@pggis/pg-sdk 5.1.15 → 5.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +717 -96
- package/dist/pggis.min.js +5082 -4451
- package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/resources/Workers/{chunk-AJYK4IVJ.js → chunk-335F4KMR.js} +2 -2
- package/dist/resources/Workers/chunk-3FFM6NRK.js +26 -0
- package/dist/resources/Workers/{chunk-QOUAJ6TL.js → chunk-46IDNOB6.js} +2 -2
- package/dist/resources/Workers/{chunk-IYTZ52EY.js → chunk-4QCIHDA2.js} +2 -2
- package/dist/resources/Workers/{chunk-AU7IKHOH.js → chunk-5EZKANRV.js} +2 -2
- package/dist/resources/Workers/{chunk-7HTKERZY.js → chunk-5GVU4LLW.js} +2 -2
- package/dist/resources/Workers/chunk-6EFYFFBI.js +26 -0
- package/dist/resources/Workers/{chunk-VTBDSFTG.js → chunk-72ENFGTU.js} +2 -2
- package/dist/resources/Workers/{chunk-A56XVLQR.js → chunk-7IBY6LYM.js} +2 -2
- package/dist/resources/Workers/{chunk-ED5JPB3S.js → chunk-7RJW35V3.js} +2 -2
- package/dist/resources/Workers/{chunk-NB3ML6JO.js → chunk-ABHTLV4B.js} +2 -2
- package/dist/resources/Workers/{chunk-D6AA5QVT.js → chunk-AHKBUIAX.js} +2 -2
- package/dist/resources/Workers/{chunk-GBYLG25F.js → chunk-AOSK7NDA.js} +1 -1
- package/dist/resources/Workers/{chunk-J6UP6FLE.js → chunk-ATTMFTQ4.js} +1 -1
- package/dist/resources/Workers/{chunk-DEPHB2WM.js → chunk-BCYX7GBY.js} +2 -2
- package/dist/resources/Workers/{chunk-RCV6KWXS.js → chunk-BDLVVHOG.js} +2 -2
- package/dist/resources/Workers/{chunk-TCGIRNHN.js → chunk-BGQDOF2W.js} +2 -2
- package/dist/resources/Workers/{chunk-5YEWO3HT.js → chunk-BTPJ3H6N.js} +2 -2
- package/dist/resources/Workers/{chunk-PSPPBZWI.js → chunk-DGGIK7AD.js} +3 -3
- package/dist/resources/Workers/{chunk-FEVXJ54I.js → chunk-DSXZVGY7.js} +2 -2
- package/dist/resources/Workers/{chunk-UP6I5URU.js → chunk-F7XR2IV5.js} +2 -2
- package/dist/resources/Workers/{chunk-64RSHJUE.js → chunk-FCVV6A2F.js} +2 -2
- package/dist/resources/Workers/{chunk-VTAIKJXX.js → chunk-GBI3IATP.js} +1 -1
- package/dist/resources/Workers/{chunk-WZDE3RYP.js → chunk-GRCPCORO.js} +2 -2
- package/dist/resources/Workers/{chunk-DMEY62ID.js → chunk-HLFNWOQ4.js} +2 -2
- package/dist/resources/Workers/{chunk-CNCV5UL7.js → chunk-HMV6ETSJ.js} +2 -2
- package/dist/resources/Workers/{chunk-3W4GT7KQ.js → chunk-I3XHKING.js} +2 -2
- package/dist/resources/Workers/{chunk-EZUYS2JF.js → chunk-I7WJS3WM.js} +2 -2
- package/dist/resources/Workers/{chunk-OSW76XDF.js → chunk-JOXXXMPE.js} +1 -1
- package/dist/resources/Workers/{chunk-CYCB63OH.js → chunk-JU23HGY3.js} +2 -2
- package/dist/resources/Workers/{chunk-U4IEOH5K.js → chunk-KORWG3CG.js} +2 -2
- package/dist/resources/Workers/{chunk-WGGIH7QW.js → chunk-KTDI3TD2.js} +2 -2
- package/dist/resources/Workers/{chunk-D6C66QON.js → chunk-LIEFEM73.js} +2 -2
- package/dist/resources/Workers/{chunk-OFUUQVMR.js → chunk-LNFOIPBT.js} +2 -2
- package/dist/resources/Workers/{chunk-G5AGHVVC.js → chunk-N6G72L23.js} +2 -2
- package/dist/resources/Workers/{chunk-VW6VD53G.js → chunk-NU4XOT2V.js} +2 -2
- package/dist/resources/Workers/{chunk-3SSKC3VN.js → chunk-PO64KPKA.js} +2 -2
- package/dist/resources/Workers/{chunk-B4AA3ARO.js → chunk-PQSWZ6QE.js} +2 -2
- package/dist/resources/Workers/{chunk-M3MGYQSL.js → chunk-QGPFMASY.js} +1 -1
- package/dist/resources/Workers/{chunk-DQQ63PYM.js → chunk-QJG5NRTN.js} +2 -2
- package/dist/resources/Workers/{chunk-LEYMRMBK.js → chunk-R3KD5ZAI.js} +2 -2
- package/dist/resources/Workers/{chunk-XRL4AVS5.js → chunk-RQ3X5FSK.js} +2 -2
- package/dist/resources/Workers/{chunk-HMIYSTF6.js → chunk-SNN6UCXM.js} +2 -2
- package/dist/resources/Workers/{chunk-N4VJKXZS.js → chunk-SPVHGWGM.js} +2 -2
- package/dist/resources/Workers/{chunk-WWA5PL4H.js → chunk-SRJEQ4WA.js} +2 -2
- package/dist/resources/Workers/{chunk-4IW2T6GF.js → chunk-VMOPYKP4.js} +2 -2
- package/dist/resources/Workers/{chunk-HWXX4CWK.js → chunk-WNAZRVVU.js} +2 -2
- package/dist/resources/Workers/{chunk-35SHYARM.js → chunk-WQBKKXJC.js} +2 -2
- package/dist/resources/Workers/{chunk-37F5JSTI.js → chunk-Y53SIX6D.js} +2 -2
- package/dist/resources/Workers/{chunk-ARG42DC4.js → chunk-YC4EEWUJ.js} +2 -2
- package/dist/resources/Workers/{chunk-HTFSEEMT.js → chunk-YDUNCXSU.js} +2 -2
- package/dist/resources/Workers/{chunk-GILIDQNQ.js → chunk-YL47XCQ4.js} +2 -2
- package/dist/resources/Workers/combineGeometry.js +2 -2
- package/dist/resources/Workers/createBoxGeometry.js +2 -2
- package/dist/resources/Workers/createBoxOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCircleGeometry.js +2 -2
- package/dist/resources/Workers/createCircleOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCoplanarPolygonGeometry.js +2 -2
- package/dist/resources/Workers/createCoplanarPolygonOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCorridorGeometry.js +2 -2
- package/dist/resources/Workers/createCorridorOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createCylinderGeometry.js +2 -2
- package/dist/resources/Workers/createCylinderOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createEllipseGeometry.js +2 -2
- package/dist/resources/Workers/createEllipseOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createEllipsoidGeometry.js +2 -2
- package/dist/resources/Workers/createEllipsoidOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createFrustumGeometry.js +2 -2
- package/dist/resources/Workers/createFrustumOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createGeometry.js +2 -2
- package/dist/resources/Workers/createGroundPolylineGeometry.js +2 -2
- package/dist/resources/Workers/createPlaneGeometry.js +2 -2
- package/dist/resources/Workers/createPlaneOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createPolygonGeometry.js +2 -2
- package/dist/resources/Workers/createPolygonOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineVolumeGeometry.js +2 -2
- package/dist/resources/Workers/createPolylineVolumeOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createRectangleGeometry.js +2 -2
- package/dist/resources/Workers/createRectangleOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createSimplePolylineGeometry.js +2 -2
- package/dist/resources/Workers/createSphereGeometry.js +2 -2
- package/dist/resources/Workers/createSphereOutlineGeometry.js +2 -2
- package/dist/resources/Workers/createTaskProcessorWorker.js +2 -2
- package/dist/resources/Workers/createVectorTileClampedPolylines.js +2 -2
- package/dist/resources/Workers/createVectorTileGeometries.js +2 -2
- package/dist/resources/Workers/createVectorTilePoints.js +2 -2
- package/dist/resources/Workers/createVectorTilePolygons.js +2 -2
- package/dist/resources/Workers/createVectorTilePolylines.js +2 -2
- package/dist/resources/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +2 -2
- package/dist/resources/Workers/createVerticesFromHeightmap.js +2 -2
- package/dist/resources/Workers/createVerticesFromQuantizedTerrainMesh.js +2 -2
- package/dist/resources/Workers/createWallGeometry.js +2 -2
- package/dist/resources/Workers/createWallOutlineGeometry.js +2 -2
- package/dist/resources/Workers/decodeDraco.js +2 -2
- package/dist/resources/Workers/decodeGoogleEarthEnterprisePacket.js +2 -2
- package/dist/resources/Workers/decodeI3S.js +2 -2
- package/dist/resources/Workers/gaussianSplatSorter.js +2 -2
- package/dist/resources/Workers/gaussianSplatTextureGenerator.js +2 -2
- package/dist/resources/Workers/transcodeKTX2.js +2 -2
- package/dist/resources/Workers/transferTypedArrayTest.js +1 -1
- package/dist/resources/Workers/upsampleQuantizedTerrainMesh.js +2 -2
- package/package.json +3 -3
- package/dist/resources/Workers/chunk-77IHZJJ3.js +0 -26
- package/dist/resources/Workers/chunk-QN3VOORQ.js +0 -26
package/dist/index.js
CHANGED
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* 盘古地理信息系统 PanGu Gis
|
|
3
3
|
* PanGu Gis For Cesium SDK
|
|
4
4
|
*
|
|
5
|
-
* 版本信息:5.1.
|
|
6
|
-
* 编译日期:2025-
|
|
5
|
+
* 版本信息:5.1.25
|
|
6
|
+
* 编译日期:2025-11-05
|
|
7
7
|
* 版权所有:Copyright by PanGu Gis http://www.pggis.com
|
|
8
8
|
* 使用单位:智企华章
|
|
9
9
|
*/
|
|
10
|
-
var Su=Object.create;var Ki=Object.defineProperty;var Iu=Object.getOwnPropertyDescriptor;var Lu=Object.getOwnPropertyNames;var Du=Object.getPrototypeOf,Ru=Object.prototype.hasOwnProperty;var Ou=(l,e,i)=>e in l?Ki(l,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[e]=i;var pe=(l,e)=>()=>(e||l((e={exports:{}}).exports,e),e.exports);var ku=(l,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Lu(e))!Ru.call(l,a)&&a!==i&&Ki(l,a,{get:()=>e[a],enumerable:!(s=Iu(e,a))||s.enumerable});return l};var Nu=(l,e,i)=>(i=l!=null?Su(Du(l)):{},ku(e||!l||!l.__esModule?Ki(i,"default",{value:l,enumerable:!0}):i,l));var pt=(l,e,i)=>(Ou(l,typeof e!="symbol"?e+"":e,i),i);var Ph=pe((EC,Eh)=>{"use strict";var If=(l,e,i,s)=>{let a=l&65535|0,o=l>>>16&65535|0,n=0;for(;i!==0;){n=i>2e3?2e3:i,i-=n;do a=a+e[s++]|0,o=o+a|0;while(--n);a%=65521,o%=65521}return a|o<<16|0};Eh.exports=If});var bh=pe((PC,Mh)=>{"use strict";var Lf=()=>{let l,e=[];for(var i=0;i<256;i++){l=i;for(var s=0;s<8;s++)l=l&1?3988292384^l>>>1:l>>>1;e[i]=l}return e},Df=new Uint32Array(Lf()),Rf=(l,e,i,s)=>{let a=Df,o=s+i;l^=-1;for(let n=s;n<o;n++)l=l>>>8^a[(l^e[n])&255];return l^-1};Mh.exports=Rf});var Sh=pe((MC,Ah)=>{"use strict";Ah.exports=function(e,i){let s,a,o,n,h,c,d,p,f,g,u,m,E,w,P,b,L,S,R,W,A,O,F,N,H=e.state;s=e.next_in,F=e.input,a=s+(e.avail_in-5),o=e.next_out,N=e.output,n=o-(i-e.avail_out),h=o+(e.avail_out-257),c=H.dmax,d=H.wsize,p=H.whave,f=H.wnext,g=H.window,u=H.hold,m=H.bits,E=H.lencode,w=H.distcode,P=(1<<H.lenbits)-1,b=(1<<H.distbits)-1;e:do{m<15&&(u+=F[s++]<<m,m+=8,u+=F[s++]<<m,m+=8),L=E[u&P];t:for(;;){if(S=L>>>24,u>>>=S,m-=S,S=L>>>16&255,S===0)N[o++]=L&65535;else if(S&16){R=L&65535,S&=15,S&&(m<S&&(u+=F[s++]<<m,m+=8),R+=u&(1<<S)-1,u>>>=S,m-=S),m<15&&(u+=F[s++]<<m,m+=8,u+=F[s++]<<m,m+=8),L=w[u&b];i:for(;;){if(S=L>>>24,u>>>=S,m-=S,S=L>>>16&255,S&16){if(W=L&65535,S&=15,m<S&&(u+=F[s++]<<m,m+=8,m<S&&(u+=F[s++]<<m,m+=8)),W+=u&(1<<S)-1,W>c){e.msg="invalid distance too far back",H.mode=16209;break e}if(u>>>=S,m-=S,S=o-n,W>S){if(S=W-S,S>p&&H.sane){e.msg="invalid distance too far back",H.mode=16209;break e}if(A=0,O=g,f===0){if(A+=d-S,S<R){R-=S;do N[o++]=g[A++];while(--S);A=o-W,O=N}}else if(f<S){if(A+=d+f-S,S-=f,S<R){R-=S;do N[o++]=g[A++];while(--S);if(A=0,f<R){S=f,R-=S;do N[o++]=g[A++];while(--S);A=o-W,O=N}}}else if(A+=f-S,S<R){R-=S;do N[o++]=g[A++];while(--S);A=o-W,O=N}for(;R>2;)N[o++]=O[A++],N[o++]=O[A++],N[o++]=O[A++],R-=3;R&&(N[o++]=O[A++],R>1&&(N[o++]=O[A++]))}else{A=o-W;do N[o++]=N[A++],N[o++]=N[A++],N[o++]=N[A++],R-=3;while(R>2);R&&(N[o++]=N[A++],R>1&&(N[o++]=N[A++]))}}else if(S&64){e.msg="invalid distance code",H.mode=16209;break e}else{L=w[(L&65535)+(u&(1<<S)-1)];continue i}break}}else if(S&64)if(S&32){H.mode=16191;break e}else{e.msg="invalid literal/length code",H.mode=16209;break e}else{L=E[(L&65535)+(u&(1<<S)-1)];continue t}break}}while(s<a&&o<h);R=m>>3,s-=R,m-=R<<3,u&=(1<<m)-1,e.next_in=s,e.next_out=o,e.avail_in=s<a?5+(a-s):5-(s-a),e.avail_out=o<h?257+(h-o):257-(o-h),H.hold=u,H.bits=m}});var Lh=pe((bC,Ih)=>{"use strict";var Of=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]),kf=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]),Nf=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]),zf=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]),Ff=(l,e,i,s,a,o,n,h)=>{let c=h.bits,d=0,p=0,f=0,g=0,u=0,m=0,E=0,w=0,P=0,b=0,L,S,R,W,A,O=null,F,N=new Uint16Array(16),H=new Uint16Array(16),te=null,Me,be,Ae;for(d=0;d<=15;d++)N[d]=0;for(p=0;p<s;p++)N[e[i+p]]++;for(u=c,g=15;g>=1&&N[g]===0;g--);if(u>g&&(u=g),g===0)return a[o++]=1<<24|64<<16|0,a[o++]=1<<24|64<<16|0,h.bits=1,0;for(f=1;f<g&&N[f]===0;f++);for(u<f&&(u=f),w=1,d=1;d<=15;d++)if(w<<=1,w-=N[d],w<0)return-1;if(w>0&&(l===0||g!==1))return-1;for(H[1]=0,d=1;d<15;d++)H[d+1]=H[d]+N[d];for(p=0;p<s;p++)e[i+p]!==0&&(n[H[e[i+p]]++]=p);if(l===0?(O=te=n,F=20):l===1?(O=Of,te=kf,F=257):(O=Nf,te=zf,F=0),b=0,p=0,d=f,A=o,m=u,E=0,R=-1,P=1<<u,W=P-1,l===1&&P>852||l===2&&P>592)return 1;for(;;){Me=d-E,n[p]+1<F?(be=0,Ae=n[p]):n[p]>=F?(be=te[n[p]-F],Ae=O[n[p]-F]):(be=96,Ae=0),L=1<<d-E,S=1<<m,f=S;do S-=L,a[A+(b>>E)+S]=Me<<24|be<<16|Ae|0;while(S!==0);for(L=1<<d-1;b&L;)L>>=1;if(L!==0?(b&=L-1,b+=L):b=0,p++,--N[d]===0){if(d===g)break;d=e[i+n[p]]}if(d>u&&(b&W)!==R){for(E===0&&(E=u),A+=f,m=d-E,w=1<<m;m+E<g&&(w-=N[m+E],!(w<=0));)m++,w<<=1;if(P+=1<<m,l===1&&P>852||l===2&&P>592)return 1;R=b&W,a[R]=u<<24|m<<16|A-o|0}}return b!==0&&(a[A+b]=d-E<<24|64<<16|0),h.bits=u,0};Ih.exports=Ff});var zt=pe((AC,Dh)=>{"use strict";Dh.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 mc=pe((SC,xe)=>{"use strict";var Ns=Ph(),Te=bh(),Gf=Sh(),vt=Lh(),Hf=0,sc=1,ac=2,{Z_FINISH:Rh,Z_BLOCK:Wf,Z_TREES:Ft,Z_OK:qe,Z_STREAM_END:Bf,Z_NEED_DICT:Uf,Z_STREAM_ERROR:_e,Z_DATA_ERROR:oc,Z_MEM_ERROR:zs,Z_BUF_ERROR:Vf,Z_DEFLATED:Oh}=zt(),Bt=16180,kh=16181,Nh=16182,zh=16183,Fh=16184,Gh=16185,Hh=16186,Wh=16187,Bh=16188,Uh=16189,Wt=16190,Le=16191,Ls=16192,Vh=16193,Ds=16194,Zh=16195,jh=16196,Yh=16197,qh=16198,Gt=16199,Ht=16200,Xh=16201,Jh=16202,Qh=16203,Kh=16204,$h=16205,Rs=16206,ec=16207,tc=16208,J=16209,Fs=16210,nc=16211,Zf=852,jf=592,Yf=15,qf=Yf,ic=l=>(l>>>24&255)+(l>>>8&65280)+((l&65280)<<8)+((l&255)<<24);function Xf(){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 Xe=l=>{if(!l)return 1;let e=l.state;return!e||e.strm!==l||e.mode<Bt||e.mode>nc?1:0},lc=l=>{if(Xe(l))return _e;let e=l.state;return l.total_in=l.total_out=e.total=0,l.msg="",e.wrap&&(l.adler=e.wrap&1),e.mode=Bt,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(Zf),e.distcode=e.distdyn=new Int32Array(jf),e.sane=1,e.back=-1,qe},hc=l=>{if(Xe(l))return _e;let e=l.state;return e.wsize=0,e.whave=0,e.wnext=0,lc(l)},cc=(l,e)=>{let i;if(Xe(l))return _e;let s=l.state;return e<0?(i=0,e=-e):(i=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?_e:(s.window!==null&&s.wbits!==e&&(s.window=null),s.wrap=i,s.wbits=e,hc(l))},dc=(l,e)=>{if(!l)return _e;let i=new Xf;l.state=i,i.strm=l,i.window=null,i.mode=Bt;let s=cc(l,e);return s!==qe&&(l.state=null),s},Jf=l=>dc(l,qf),rc=!0,Os,ks,Qf=l=>{if(rc){Os=new Int32Array(512),ks=new Int32Array(32);let e=0;for(;e<144;)l.lens[e++]=8;for(;e<256;)l.lens[e++]=9;for(;e<280;)l.lens[e++]=7;for(;e<288;)l.lens[e++]=8;for(vt(sc,l.lens,0,288,Os,0,l.work,{bits:9}),e=0;e<32;)l.lens[e++]=5;vt(ac,l.lens,0,32,ks,0,l.work,{bits:5}),rc=!1}l.lencode=Os,l.lenbits=9,l.distcode=ks,l.distbits=5},pc=(l,e,i,s)=>{let a,o=l.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),s>=o.wsize?(o.window.set(e.subarray(i-o.wsize,i),0),o.wnext=0,o.whave=o.wsize):(a=o.wsize-o.wnext,a>s&&(a=s),o.window.set(e.subarray(i-s,i-s+a),o.wnext),s-=a,s?(o.window.set(e.subarray(i-s,i),0),o.wnext=s,o.whave=o.wsize):(o.wnext+=a,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=a))),0},Kf=(l,e)=>{let i,s,a,o,n,h,c,d,p,f,g,u,m,E,w=0,P,b,L,S,R,W,A,O,F=new Uint8Array(4),N,H,te=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Xe(l)||!l.output||!l.input&&l.avail_in!==0)return _e;i=l.state,i.mode===Le&&(i.mode=Ls),n=l.next_out,a=l.output,c=l.avail_out,o=l.next_in,s=l.input,h=l.avail_in,d=i.hold,p=i.bits,f=h,g=c,O=qe;e:for(;;)switch(i.mode){case Bt:if(i.wrap===0){i.mode=Ls;break}for(;p<16;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if(i.wrap&2&&d===35615){i.wbits===0&&(i.wbits=15),i.check=0,F[0]=d&255,F[1]=d>>>8&255,i.check=Te(i.check,F,2,0),d=0,p=0,i.mode=kh;break}if(i.head&&(i.head.done=!1),!(i.wrap&1)||(((d&255)<<8)+(d>>8))%31){l.msg="incorrect header check",i.mode=J;break}if((d&15)!==Oh){l.msg="unknown compression method",i.mode=J;break}if(d>>>=4,p-=4,A=(d&15)+8,i.wbits===0&&(i.wbits=A),A>15||A>i.wbits){l.msg="invalid window size",i.mode=J;break}i.dmax=1<<i.wbits,i.flags=0,l.adler=i.check=1,i.mode=d&512?Uh:Le,d=0,p=0;break;case kh:for(;p<16;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if(i.flags=d,(i.flags&255)!==Oh){l.msg="unknown compression method",i.mode=J;break}if(i.flags&57344){l.msg="unknown header flags set",i.mode=J;break}i.head&&(i.head.text=d>>8&1),i.flags&512&&i.wrap&4&&(F[0]=d&255,F[1]=d>>>8&255,i.check=Te(i.check,F,2,0)),d=0,p=0,i.mode=Nh;case Nh:for(;p<32;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}i.head&&(i.head.time=d),i.flags&512&&i.wrap&4&&(F[0]=d&255,F[1]=d>>>8&255,F[2]=d>>>16&255,F[3]=d>>>24&255,i.check=Te(i.check,F,4,0)),d=0,p=0,i.mode=zh;case zh:for(;p<16;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}i.head&&(i.head.xflags=d&255,i.head.os=d>>8),i.flags&512&&i.wrap&4&&(F[0]=d&255,F[1]=d>>>8&255,i.check=Te(i.check,F,2,0)),d=0,p=0,i.mode=Fh;case Fh:if(i.flags&1024){for(;p<16;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}i.length=d,i.head&&(i.head.extra_len=d),i.flags&512&&i.wrap&4&&(F[0]=d&255,F[1]=d>>>8&255,i.check=Te(i.check,F,2,0)),d=0,p=0}else i.head&&(i.head.extra=null);i.mode=Gh;case Gh:if(i.flags&1024&&(u=i.length,u>h&&(u=h),u&&(i.head&&(A=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(s.subarray(o,o+u),A)),i.flags&512&&i.wrap&4&&(i.check=Te(i.check,s,u,o)),h-=u,o+=u,i.length-=u),i.length))break e;i.length=0,i.mode=Hh;case Hh:if(i.flags&2048){if(h===0)break e;u=0;do A=s[o+u++],i.head&&A&&i.length<65536&&(i.head.name+=String.fromCharCode(A));while(A&&u<h);if(i.flags&512&&i.wrap&4&&(i.check=Te(i.check,s,u,o)),h-=u,o+=u,A)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=Wh;case Wh:if(i.flags&4096){if(h===0)break e;u=0;do A=s[o+u++],i.head&&A&&i.length<65536&&(i.head.comment+=String.fromCharCode(A));while(A&&u<h);if(i.flags&512&&i.wrap&4&&(i.check=Te(i.check,s,u,o)),h-=u,o+=u,A)break e}else i.head&&(i.head.comment=null);i.mode=Bh;case Bh:if(i.flags&512){for(;p<16;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if(i.wrap&4&&d!==(i.check&65535)){l.msg="header crc mismatch",i.mode=J;break}d=0,p=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),l.adler=i.check=0,i.mode=Le;break;case Uh:for(;p<32;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}l.adler=i.check=ic(d),d=0,p=0,i.mode=Wt;case Wt:if(i.havedict===0)return l.next_out=n,l.avail_out=c,l.next_in=o,l.avail_in=h,i.hold=d,i.bits=p,Uf;l.adler=i.check=1,i.mode=Le;case Le:if(e===Wf||e===Ft)break e;case Ls:if(i.last){d>>>=p&7,p-=p&7,i.mode=Rs;break}for(;p<3;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}switch(i.last=d&1,d>>>=1,p-=1,d&3){case 0:i.mode=Vh;break;case 1:if(Qf(i),i.mode=Gt,e===Ft){d>>>=2,p-=2;break e}break;case 2:i.mode=jh;break;case 3:l.msg="invalid block type",i.mode=J}d>>>=2,p-=2;break;case Vh:for(d>>>=p&7,p-=p&7;p<32;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if((d&65535)!==(d>>>16^65535)){l.msg="invalid stored block lengths",i.mode=J;break}if(i.length=d&65535,d=0,p=0,i.mode=Ds,e===Ft)break e;case Ds:i.mode=Zh;case Zh:if(u=i.length,u){if(u>h&&(u=h),u>c&&(u=c),u===0)break e;a.set(s.subarray(o,o+u),n),h-=u,o+=u,c-=u,n+=u,i.length-=u;break}i.mode=Le;break;case jh:for(;p<14;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if(i.nlen=(d&31)+257,d>>>=5,p-=5,i.ndist=(d&31)+1,d>>>=5,p-=5,i.ncode=(d&15)+4,d>>>=4,p-=4,i.nlen>286||i.ndist>30){l.msg="too many length or distance symbols",i.mode=J;break}i.have=0,i.mode=Yh;case Yh:for(;i.have<i.ncode;){for(;p<3;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}i.lens[te[i.have++]]=d&7,d>>>=3,p-=3}for(;i.have<19;)i.lens[te[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,N={bits:i.lenbits},O=vt(Hf,i.lens,0,19,i.lencode,0,i.work,N),i.lenbits=N.bits,O){l.msg="invalid code lengths set",i.mode=J;break}i.have=0,i.mode=qh;case qh:for(;i.have<i.nlen+i.ndist;){for(;w=i.lencode[d&(1<<i.lenbits)-1],P=w>>>24,b=w>>>16&255,L=w&65535,!(P<=p);){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if(L<16)d>>>=P,p-=P,i.lens[i.have++]=L;else{if(L===16){for(H=P+2;p<H;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if(d>>>=P,p-=P,i.have===0){l.msg="invalid bit length repeat",i.mode=J;break}A=i.lens[i.have-1],u=3+(d&3),d>>>=2,p-=2}else if(L===17){for(H=P+3;p<H;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}d>>>=P,p-=P,A=0,u=3+(d&7),d>>>=3,p-=3}else{for(H=P+7;p<H;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}d>>>=P,p-=P,A=0,u=11+(d&127),d>>>=7,p-=7}if(i.have+u>i.nlen+i.ndist){l.msg="invalid bit length repeat",i.mode=J;break}for(;u--;)i.lens[i.have++]=A}}if(i.mode===J)break;if(i.lens[256]===0){l.msg="invalid code -- missing end-of-block",i.mode=J;break}if(i.lenbits=9,N={bits:i.lenbits},O=vt(sc,i.lens,0,i.nlen,i.lencode,0,i.work,N),i.lenbits=N.bits,O){l.msg="invalid literal/lengths set",i.mode=J;break}if(i.distbits=6,i.distcode=i.distdyn,N={bits:i.distbits},O=vt(ac,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,N),i.distbits=N.bits,O){l.msg="invalid distances set",i.mode=J;break}if(i.mode=Gt,e===Ft)break e;case Gt:i.mode=Ht;case Ht:if(h>=6&&c>=258){l.next_out=n,l.avail_out=c,l.next_in=o,l.avail_in=h,i.hold=d,i.bits=p,Gf(l,g),n=l.next_out,a=l.output,c=l.avail_out,o=l.next_in,s=l.input,h=l.avail_in,d=i.hold,p=i.bits,i.mode===Le&&(i.back=-1);break}for(i.back=0;w=i.lencode[d&(1<<i.lenbits)-1],P=w>>>24,b=w>>>16&255,L=w&65535,!(P<=p);){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if(b&&!(b&240)){for(S=P,R=b,W=L;w=i.lencode[W+((d&(1<<S+R)-1)>>S)],P=w>>>24,b=w>>>16&255,L=w&65535,!(S+P<=p);){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}d>>>=S,p-=S,i.back+=S}if(d>>>=P,p-=P,i.back+=P,i.length=L,b===0){i.mode=$h;break}if(b&32){i.back=-1,i.mode=Le;break}if(b&64){l.msg="invalid literal/length code",i.mode=J;break}i.extra=b&15,i.mode=Xh;case Xh:if(i.extra){for(H=i.extra;p<H;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}i.length+=d&(1<<i.extra)-1,d>>>=i.extra,p-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=Jh;case Jh:for(;w=i.distcode[d&(1<<i.distbits)-1],P=w>>>24,b=w>>>16&255,L=w&65535,!(P<=p);){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if(!(b&240)){for(S=P,R=b,W=L;w=i.distcode[W+((d&(1<<S+R)-1)>>S)],P=w>>>24,b=w>>>16&255,L=w&65535,!(S+P<=p);){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}d>>>=S,p-=S,i.back+=S}if(d>>>=P,p-=P,i.back+=P,b&64){l.msg="invalid distance code",i.mode=J;break}i.offset=L,i.extra=b&15,i.mode=Qh;case Qh:if(i.extra){for(H=i.extra;p<H;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}i.offset+=d&(1<<i.extra)-1,d>>>=i.extra,p-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){l.msg="invalid distance too far back",i.mode=J;break}i.mode=Kh;case Kh:if(c===0)break e;if(u=g-c,i.offset>u){if(u=i.offset-u,u>i.whave&&i.sane){l.msg="invalid distance too far back",i.mode=J;break}u>i.wnext?(u-=i.wnext,m=i.wsize-u):m=i.wnext-u,u>i.length&&(u=i.length),E=i.window}else E=a,m=n-i.offset,u=i.length;u>c&&(u=c),c-=u,i.length-=u;do a[n++]=E[m++];while(--u);i.length===0&&(i.mode=Ht);break;case $h:if(c===0)break e;a[n++]=i.length,c--,i.mode=Ht;break;case Rs:if(i.wrap){for(;p<32;){if(h===0)break e;h--,d|=s[o++]<<p,p+=8}if(g-=c,l.total_out+=g,i.total+=g,i.wrap&4&&g&&(l.adler=i.check=i.flags?Te(i.check,a,g,n-g):Ns(i.check,a,g,n-g)),g=c,i.wrap&4&&(i.flags?d:ic(d))!==i.check){l.msg="incorrect data check",i.mode=J;break}d=0,p=0}i.mode=ec;case ec:if(i.wrap&&i.flags){for(;p<32;){if(h===0)break e;h--,d+=s[o++]<<p,p+=8}if(i.wrap&4&&d!==(i.total&4294967295)){l.msg="incorrect length check",i.mode=J;break}d=0,p=0}i.mode=tc;case tc:O=Bf;break e;case J:O=oc;break e;case Fs:return zs;case nc:default:return _e}return l.next_out=n,l.avail_out=c,l.next_in=o,l.avail_in=h,i.hold=d,i.bits=p,(i.wsize||g!==l.avail_out&&i.mode<J&&(i.mode<Rs||e!==Rh))&&pc(l,l.output,l.next_out,g-l.avail_out)?(i.mode=Fs,zs):(f-=l.avail_in,g-=l.avail_out,l.total_in+=f,l.total_out+=g,i.total+=g,i.wrap&4&&g&&(l.adler=i.check=i.flags?Te(i.check,a,g,l.next_out-g):Ns(i.check,a,g,l.next_out-g)),l.data_type=i.bits+(i.last?64:0)+(i.mode===Le?128:0)+(i.mode===Gt||i.mode===Ds?256:0),(f===0&&g===0||e===Rh)&&O===qe&&(O=Vf),O)},$f=l=>{if(Xe(l))return _e;let e=l.state;return e.window&&(e.window=null),l.state=null,qe},e_=(l,e)=>{if(Xe(l))return _e;let i=l.state;return i.wrap&2?(i.head=e,e.done=!1,qe):_e},t_=(l,e)=>{let i=e.length,s,a,o;return Xe(l)||(s=l.state,s.wrap!==0&&s.mode!==Wt)?_e:s.mode===Wt&&(a=1,a=Ns(a,e,i,0),a!==s.check)?oc:(o=pc(l,e,i,i),o?(s.mode=Fs,zs):(s.havedict=1,qe))};xe.exports.inflateReset=hc;xe.exports.inflateReset2=cc;xe.exports.inflateResetKeep=lc;xe.exports.inflateInit=Jf;xe.exports.inflateInit2=dc;xe.exports.inflate=Kf;xe.exports.inflateEnd=$f;xe.exports.inflateGetHeader=e_;xe.exports.inflateSetDictionary=t_;xe.exports.inflateInfo="pako inflate (from Nodeca project)"});var uc=pe((IC,Gs)=>{"use strict";var i_=(l,e)=>Object.prototype.hasOwnProperty.call(l,e);Gs.exports.assign=function(l){let e=Array.prototype.slice.call(arguments,1);for(;e.length;){let i=e.shift();if(i){if(typeof i!="object")throw new TypeError(i+"must be non-object");for(let s in i)i_(i,s)&&(l[s]=i[s])}}return l};Gs.exports.flattenChunks=l=>{let e=0;for(let s=0,a=l.length;s<a;s++)e+=l[s].length;let i=new Uint8Array(e);for(let s=0,a=0,o=l.length;s<o;s++){let n=l[s];i.set(n,a),a+=n.length}return i}});var _c=pe((LC,Ut)=>{"use strict";var fc=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{fc=!1}var wt=new Uint8Array(256);for(let l=0;l<256;l++)wt[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;wt[254]=wt[254]=1;Ut.exports.string2buf=l=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(l);let e,i,s,a,o,n=l.length,h=0;for(a=0;a<n;a++)i=l.charCodeAt(a),(i&64512)===55296&&a+1<n&&(s=l.charCodeAt(a+1),(s&64512)===56320&&(i=65536+(i-55296<<10)+(s-56320),a++)),h+=i<128?1:i<2048?2:i<65536?3:4;for(e=new Uint8Array(h),o=0,a=0;o<h;a++)i=l.charCodeAt(a),(i&64512)===55296&&a+1<n&&(s=l.charCodeAt(a+1),(s&64512)===56320&&(i=65536+(i-55296<<10)+(s-56320),a++)),i<128?e[o++]=i:i<2048?(e[o++]=192|i>>>6,e[o++]=128|i&63):i<65536?(e[o++]=224|i>>>12,e[o++]=128|i>>>6&63,e[o++]=128|i&63):(e[o++]=240|i>>>18,e[o++]=128|i>>>12&63,e[o++]=128|i>>>6&63,e[o++]=128|i&63);return e};var r_=(l,e)=>{if(e<65534&&l.subarray&&fc)return String.fromCharCode.apply(null,l.length===e?l:l.subarray(0,e));let i="";for(let s=0;s<e;s++)i+=String.fromCharCode(l[s]);return i};Ut.exports.buf2string=(l,e)=>{let i=e||l.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(l.subarray(0,e));let s,a,o=new Array(i*2);for(a=0,s=0;s<i;){let n=l[s++];if(n<128){o[a++]=n;continue}let h=wt[n];if(h>4){o[a++]=65533,s+=h-1;continue}for(n&=h===2?31:h===3?15:7;h>1&&s<i;)n=n<<6|l[s++]&63,h--;if(h>1){o[a++]=65533;continue}n<65536?o[a++]=n:(n-=65536,o[a++]=55296|n>>10&1023,o[a++]=56320|n&1023)}return r_(o,a)};Ut.exports.utf8border=(l,e)=>{e=e||l.length,e>l.length&&(e=l.length);let i=e-1;for(;i>=0&&(l[i]&192)===128;)i--;return i<0||i===0?e:i+wt[l[i]]>e?i:e}});var yc=pe((DC,gc)=>{"use strict";gc.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 wc=pe((RC,vc)=>{"use strict";function s_(){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}vc.exports=s_});var Cc=pe((OC,xc)=>{"use strict";function a_(){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}xc.exports=a_});var Mc=pe((kC,tt)=>{"use strict";var De=mc(),Ec=uc(),Bs=_c(),Us=yc(),o_=wc(),n_=Cc(),Pc=Object.prototype.toString,{Z_NO_FLUSH:l_,Z_FINISH:h_,Z_OK:xt,Z_STREAM_END:Hs,Z_NEED_DICT:Ws,Z_STREAM_ERROR:c_,Z_DATA_ERROR:Tc,Z_MEM_ERROR:d_}=zt();function Ct(l){this.options=Ec.assign({chunkSize:1024*64,windowBits:15,to:""},l||{});let e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(l&&l.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new o_,this.strm.avail_out=0;let i=De.inflateInit2(this.strm,e.windowBits);if(i!==xt)throw new Error(Us[i]);if(this.header=new n_,De.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Bs.string2buf(e.dictionary):Pc.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(i=De.inflateSetDictionary(this.strm,e.dictionary),i!==xt)))throw new Error(Us[i])}Ct.prototype.push=function(l,e){let i=this.strm,s=this.options.chunkSize,a=this.options.dictionary,o,n,h;if(this.ended)return!1;for(e===~~e?n=e:n=e===!0?h_:l_,Pc.call(l)==="[object ArrayBuffer]"?i.input=new Uint8Array(l):i.input=l,i.next_in=0,i.avail_in=i.input.length;;){for(i.avail_out===0&&(i.output=new Uint8Array(s),i.next_out=0,i.avail_out=s),o=De.inflate(i,n),o===Ws&&a&&(o=De.inflateSetDictionary(i,a),o===xt?o=De.inflate(i,n):o===Tc&&(o=Ws));i.avail_in>0&&o===Hs&&i.state.wrap>0&&l[i.next_in]!==0;)De.inflateReset(i),o=De.inflate(i,n);switch(o){case c_:case Tc:case Ws:case d_:return this.onEnd(o),this.ended=!0,!1}if(h=i.avail_out,i.next_out&&(i.avail_out===0||o===Hs))if(this.options.to==="string"){let c=Bs.utf8border(i.output,i.next_out),d=i.next_out-c,p=Bs.buf2string(i.output,c);i.next_out=d,i.avail_out=s-d,d&&i.output.set(i.output.subarray(c,c+d),0),this.onData(p)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(!(o===xt&&h===0)){if(o===Hs)return o=De.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(i.avail_in===0)break}}return!0};Ct.prototype.onData=function(l){this.chunks.push(l)};Ct.prototype.onEnd=function(l){l===xt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Ec.flattenChunks(this.chunks)),this.chunks=[],this.err=l,this.msg=this.strm.msg};function Vs(l,e){let i=new Ct(e);if(i.push(l),i.err)throw i.msg||Us[i.err];return i.result}function p_(l,e){return e=e||{},e.raw=!0,Vs(l,e)}tt.exports.Inflate=Ct;tt.exports.inflate=Vs;tt.exports.inflateRaw=p_;tt.exports.ungzip=Vs;tt.exports.constants=zt()});var fl={};function _l(l,e){fl[l]=e}function ne(l){return fl[l]}var gl={};function Qe(l,e){gl[l]=e}function $i(l){return gl[l]}import*as r from"cesium";var yl=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],er=1,mt=8,ft=class l{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[i,s]=new Uint8Array(e,0,2);if(i!==219)throw new Error("Data does not appear to be in a KDBush format.");let a=s>>4;if(a!==er)throw new Error(`Got v${a} data when expected v${er}.`);let o=yl[s&15];if(!o)throw new Error("Unrecognized array type.");let[n]=new Uint16Array(e,2,1),[h]=new Uint32Array(e,4,1);return new l(h,n,o,e)}constructor(e,i=64,s=Float64Array,a){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+i,2),65535),this.ArrayType=s,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let o=yl.indexOf(this.ArrayType),n=e*2*this.ArrayType.BYTES_PER_ELEMENT,h=e*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-h%8)%8;if(o<0)throw new Error(`Unexpected typed array class: ${s}.`);a&&a instanceof ArrayBuffer?(this.data=a,this.ids=new this.IndexArrayType(this.data,mt,e),this.coords=new this.ArrayType(this.data,mt+h+c,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(mt+n+h+c),this.ids=new this.IndexArrayType(this.data,mt,e),this.coords=new this.ArrayType(this.data,mt+h+c,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(er<<4)+o]),new Uint16Array(this.data,2,1)[0]=i,new Uint32Array(this.data,4,1)[0]=e)}add(e,i){let s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=e,this.coords[this._pos++]=i,s}finish(){let e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return ir(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,i,s,a){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:n,nodeSize:h}=this,c=[0,o.length-1,0],d=[];for(;c.length;){let p=c.pop()||0,f=c.pop()||0,g=c.pop()||0;if(f-g<=h){for(let w=g;w<=f;w++){let P=n[2*w],b=n[2*w+1];P>=e&&P<=s&&b>=i&&b<=a&&d.push(o[w])}continue}let u=g+f>>1,m=n[2*u],E=n[2*u+1];m>=e&&m<=s&&E>=i&&E<=a&&d.push(o[u]),(p===0?e<=m:i<=E)&&(c.push(g),c.push(u-1),c.push(1-p)),(p===0?s>=m:a>=E)&&(c.push(u+1),c.push(f),c.push(1-p))}return d}within(e,i,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:a,coords:o,nodeSize:n}=this,h=[0,a.length-1,0],c=[],d=s*s;for(;h.length;){let p=h.pop()||0,f=h.pop()||0,g=h.pop()||0;if(f-g<=n){for(let w=g;w<=f;w++)vl(o[2*w],o[2*w+1],e,i)<=d&&c.push(a[w]);continue}let u=g+f>>1,m=o[2*u],E=o[2*u+1];vl(m,E,e,i)<=d&&c.push(a[u]),(p===0?e-s<=m:i-s<=E)&&(h.push(g),h.push(u-1),h.push(1-p)),(p===0?e+s>=m:i+s>=E)&&(h.push(u+1),h.push(f),h.push(1-p))}return c}};function ir(l,e,i,s,a,o){if(a-s<=i)return;let n=s+a>>1;wl(l,e,n,s,a,o),ir(l,e,i,s,n-1,1-o),ir(l,e,i,n+1,a,1-o)}function wl(l,e,i,s,a,o){for(;a>s;){if(a-s>600){let d=a-s+1,p=i-s+1,f=Math.log(d),g=.5*Math.exp(2*f/3),u=.5*Math.sqrt(f*g*(d-g)/d)*(p-d/2<0?-1:1),m=Math.max(s,Math.floor(i-p*g/d+u)),E=Math.min(a,Math.floor(i+(d-p)*g/d+u));wl(l,e,i,m,E,o)}let n=e[2*i+o],h=s,c=a;for(ut(l,e,s,i),e[2*a+o]>n&&ut(l,e,s,a);h<c;){for(ut(l,e,h,c),h++,c--;e[2*h+o]<n;)h++;for(;e[2*c+o]>n;)c--}e[2*s+o]===n?ut(l,e,s,c):(c++,ut(l,e,c,a)),c<=i&&(s=c+1),i<=c&&(a=c-1)}}function ut(l,e,i,s){tr(l,i,s),tr(e,2*i,2*s),tr(e,2*i+1,2*s+1)}function tr(l,e,i){let s=l[e];l[e]=l[i],l[i]=s}function vl(l,e,i,s){let a=l-i,o=e-s;return a*a+o*o}var zu={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:l=>l},xl=Math.fround||(l=>e=>(l[0]=+e,l[0]))(new Float32Array(1)),Ve=2,Fe=3,rr=4,ze=5,Tl=6,Ke=class{constructor(e){this.options=Object.assign(Object.create(zu),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){let{log:i,minZoom:s,maxZoom:a}=this.options;i&&console.time("total time");let o=`prepare ${e.length} points`;i&&console.time(o),this.points=e;let n=[];for(let c=0;c<e.length;c++){let d=e[c];if(!d.geometry)continue;let[p,f]=d.geometry.coordinates,g=xl(bt(p)),u=xl(At(f));n.push(g,u,1/0,c,-1,1),this.options.reduce&&n.push(0)}let h=this.trees[a+1]=this._createTree(n);i&&console.timeEnd(o);for(let c=a;c>=s;c--){let d=+Date.now();h=this.trees[c]=this._createTree(this._cluster(h,c)),i&&console.log("z%d: %d clusters in %dms",c,h.numItems,+Date.now()-d)}return i&&console.timeEnd("total time"),this}getClusters(e,i){let s=((e[0]+180)%360+360)%360-180,a=Math.max(-90,Math.min(90,e[1])),o=e[2]===180?180:((e[2]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)s=-180,o=180;else if(s>o){let f=this.getClusters([s,a,180,n],i),g=this.getClusters([-180,a,o,n],i);return f.concat(g)}let h=this.trees[this._limitZoom(i)],c=h.range(bt(s),At(n),bt(o),At(a)),d=h.data,p=[];for(let f of c){let g=this.stride*f;p.push(d[g+ze]>1?Cl(d,g,this.clusterProps):this.points[d[g+Fe]])}return p}getChildren(e){let i=this._getOriginId(e),s=this._getOriginZoom(e),a="No cluster with the specified id.",o=this.trees[s];if(!o)throw new Error(a);let n=o.data;if(i*this.stride>=n.length)throw new Error(a);let h=this.options.radius/(this.options.extent*Math.pow(2,s-1)),c=n[i*this.stride],d=n[i*this.stride+1],p=o.within(c,d,h),f=[];for(let g of p){let u=g*this.stride;n[u+rr]===e&&f.push(n[u+ze]>1?Cl(n,u,this.clusterProps):this.points[n[u+Fe]])}if(f.length===0)throw new Error(a);return f}getLeaves(e,i,s){i=i||10,s=s||0;let a=[];return this._appendLeaves(a,e,i,s,0),a}getTile(e,i,s){let a=this.trees[this._limitZoom(e)],o=Math.pow(2,e),{extent:n,radius:h}=this.options,c=h/n,d=(s-c)/o,p=(s+1+c)/o,f={features:[]};return this._addTileFeatures(a.range((i-c)/o,d,(i+1+c)/o,p),a.data,i,s,o,f),i===0&&this._addTileFeatures(a.range(1-c/o,d,1,p),a.data,o,s,o,f),i===o-1&&this._addTileFeatures(a.range(0,d,c/o,p),a.data,-1,s,o,f),f.features.length?f:null}getClusterExpansionZoom(e){let i=this._getOriginZoom(e)-1;for(;i<=this.options.maxZoom;){let s=this.getChildren(e);if(i++,s.length!==1)break;e=s[0].properties.cluster_id}return i}_appendLeaves(e,i,s,a,o){let n=this.getChildren(i);for(let h of n){let c=h.properties;if(c&&c.cluster?o+c.point_count<=a?o+=c.point_count:o=this._appendLeaves(e,c.cluster_id,s,a,o):o<a?o++:e.push(h),e.length===s)break}return o}_createTree(e){let i=new ft(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let s=0;s<e.length;s+=this.stride)i.add(e[s],e[s+1]);return i.finish(),i.data=e,i}_addTileFeatures(e,i,s,a,o,n){for(let h of e){let c=h*this.stride,d=i[c+ze]>1,p,f,g;if(d)p=El(i,c,this.clusterProps),f=i[c],g=i[c+1];else{let E=this.points[i[c+Fe]];p=E.properties;let[w,P]=E.geometry.coordinates;f=bt(w),g=At(P)}let u={type:1,geometry:[[Math.round(this.options.extent*(f*o-s)),Math.round(this.options.extent*(g*o-a))]],tags:p},m;d||this.options.generateId?m=i[c+Fe]:m=this.points[i[c+Fe]].id,m!==void 0&&(u.id=m),n.features.push(u)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,i){let{radius:s,extent:a,reduce:o,minPoints:n}=this.options,h=s/(a*Math.pow(2,i)),c=e.data,d=[],p=this.stride;for(let f=0;f<c.length;f+=p){if(c[f+Ve]<=i)continue;c[f+Ve]=i;let g=c[f],u=c[f+1],m=e.within(c[f],c[f+1],h),E=c[f+ze],w=E;for(let P of m){let b=P*p;c[b+Ve]>i&&(w+=c[b+ze])}if(w>E&&w>=n){let P=g*E,b=u*E,L,S=-1,R=((f/p|0)<<5)+(i+1)+this.points.length;for(let W of m){let A=W*p;if(c[A+Ve]<=i)continue;c[A+Ve]=i;let O=c[A+ze];P+=c[A]*O,b+=c[A+1]*O,c[A+rr]=R,o&&(L||(L=this._map(c,f,!0),S=this.clusterProps.length,this.clusterProps.push(L)),o(L,this._map(c,A)))}c[f+rr]=R,d.push(P/w,b/w,1/0,R,-1,w),o&&d.push(S)}else{for(let P=0;P<p;P++)d.push(c[f+P]);if(w>1)for(let P of m){let b=P*p;if(!(c[b+Ve]<=i)){c[b+Ve]=i;for(let L=0;L<p;L++)d.push(c[b+L])}}}}return d}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,i,s){if(e[i+ze]>1){let n=this.clusterProps[e[i+Tl]];return s?Object.assign({},n):n}let a=this.points[e[i+Fe]].properties,o=this.options.map(a);return s&&o===a?Object.assign({},o):o}};function Cl(l,e,i){return{type:"Feature",id:l[e+Fe],properties:El(l,e,i),geometry:{type:"Point",coordinates:[Fu(l[e]),Gu(l[e+1])]}}}function El(l,e,i){let s=l[e+ze],a=s>=1e4?`${Math.round(s/1e3)}k`:s>=1e3?`${Math.round(s/100)/10}k`:s,o=l[e+Tl],n=o===-1?{}:Object.assign({},i[o]);return Object.assign(n,{cluster:!0,cluster_id:l[e+Fe],point_count:s,point_count_abbreviated:a})}function bt(l){return l/360+.5}function At(l){let e=Math.sin(l*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function Fu(l){return(l-.5)*360}function Gu(l){let e=(180-l*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var Pl=new r.WebMercatorProjection,sr=class{static transformCartesianToWGS84(e){if(e){let i=r.Ellipsoid.WGS84.cartesianToCartographic(e);return new X(r.Math.toDegrees((i==null?void 0:i.longitude)||0),r.Math.toDegrees((i==null?void 0:i.latitude)||0),i.height||0)}return new X(0,0)}static transformCartographicToWGS84(e){return e?new X(r.Math.toDegrees((e==null?void 0:e.longitude)||0),r.Math.toDegrees((e==null?void 0:e.latitude)||0),e.height||0):new X(0,0)}static transformWGS84ToCartesian(e){return e?r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,r.Ellipsoid.WGS84):r.Cartesian3.ZERO}static transformWGS84ToCartographic(e){return e?r.Cartographic.fromDegrees(e.lng,e.lat,e.alt):r.Cartographic.ZERO}static transformCartesianArrayToWGS84Array(e){return e?e.map(i=>this.transformCartesianToWGS84(i)):[]}static transformWGS84ArrayToCartesianArray(e){return e?e.map(i=>this.transformWGS84ToCartesian(i)):[]}static transformWGS84ToMercator(e){let i=Pl.project(r.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new X(i.x,i.y,i.z)}static transformMercatorToWGS84(e){let i=Pl.unproject(new r.Cartesian3(e.lng,e.lat,e.alt));return new X(r.Math.toDegrees(i.longitude),r.Math.toDegrees(i.latitude),i.height)}static transformWindowToWGS84(e,i){let s=i.scene,a;if(s.mode===r.SceneMode.SCENE3D){let o=s.camera.getPickRay(e);a=s.globe.pick(o,s)}else a=s.camera.pickEllipsoid(e,r.Ellipsoid.WGS84);return this.transformCartesianToWGS84(a)}static transformWGS84ToWindow(e,i){let s=i.scene;return r.SceneTransforms.worldToWindowCoordinates(s,this.transformWGS84ToCartesian(e))}},y=sr;var St=52.35987755982988,le=3.141592653589793,Ml=6378245,bl=.006693421622965943,ar=class{static BD09ToGCJ02(e,i){let s=+e-.0065,a=+i-.006,o=Math.sqrt(s*s+a*a)-2e-5*Math.sin(a*St),n=Math.atan2(a,s)-3e-6*Math.cos(s*St),h=o*Math.cos(n),c=o*Math.sin(n);return[h,c]}static GCJ02ToBD09(e,i){i=+i,e=+e;let s=Math.sqrt(e*e+i*i)+2e-5*Math.sin(i*St),a=Math.atan2(i,e)+3e-6*Math.cos(e*St),o=s*Math.cos(a)+.0065,n=s*Math.sin(a)+.006;return[o,n]}static WGS84ToGCJ02(e,i){if(i=+i,e=+e,this.out_of_china(e,i))return[e,i];{let s=this.delta(e,i);return[e+s[0],i+s[1]]}}static GCJ02ToWGS84(e,i){if(i=+i,e=+e,this.out_of_china(e,i))return[e,i];{let s=[e,i],a=this.WGS84ToGCJ02(e,i),o=a[0]-e,n=a[1]-i;do a=this.WGS84ToGCJ02(s[0]-=o,s[1]-=n),o=a[0]-e,n=a[1]-i;while(Math.abs(o)>1e-7||Math.abs(n)>1e-7);return s}}static delta(e,i){let s=this.transformLng(e-105,i-35),a=this.transformLat(e-105,i-35),o=i/180*le,n=Math.sin(o);n=1-bl*n*n;let h=Math.sqrt(n);return s=s*180/(Ml/h*Math.cos(o)*le),a=a*180/(Ml*(1-bl)/(n*h)*le),[s,a]}static transformLng(e,i){i=+i,e=+e;let s=300+e+2*i+.1*e*e+.1*e*i+.1*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*le)+20*Math.sin(2*e*le))*2/3,s+=(20*Math.sin(e*le)+40*Math.sin(e/3*le))*2/3,s+=(150*Math.sin(e/12*le)+300*Math.sin(e/30*le))*2/3,s}static transformLat(e,i){i=+i,e=+e;let s=-100+2*e+3*i+.2*i*i+.1*e*i+.2*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*le)+20*Math.sin(2*e*le))*2/3,s+=(20*Math.sin(i*le)+40*Math.sin(i/3*le))*2/3,s+=(160*Math.sin(i/12*le)+320*Math.sin(i*le/30))*2/3,s}static out_of_china(e,i){return i=+i,e=+e,!(e>73.66&&e<135.05&&i>3.86&&i<53.55)}},Ce=ar;var or=class l{constructor(e,i,s,a,o,n){this._lng=+e||0,this._lat=+i||0,this._alt=+s||0,this._heading=+a||0,this._pitch=+o||0,this._roll=+n||0}get lng(){return this._lng}set lng(e){this._lng=+e}get lat(){return this._lat}set lat(e){this._lat=+e}get alt(){return this._alt}set alt(e){this._alt=+e}get heading(){return this._heading}set heading(e){this._heading=+e}get pitch(){return this._pitch}set pitch(e){this._pitch=+e}get roll(){return this._roll}set roll(e){this._roll=+e}static fromArray(e){let i=new l;return Array.isArray(e)&&(i.lng=e[0]||0,i.lat=e[1]||0,i.alt=e[2]||0,i.heading=e[3]||0,i.pitch=e[4]||0,i.roll=e[5]||0),i}static fromString(e){let i=new l;if(e&&typeof e=="string"){let s=e.split(",");i=this.fromArray(s)}return i}static fromObject(e){return new l(e.lng,e.lat,e.alt,e.heading,e.pitch,e.roll)}static deserialize(e){let i=new l,s=JSON.parse(e);return s&&(i.lng=s.lng||0,i.lat=s.lat||0,i.alt=s.alt||0,i.heading=s.heading||0,i.pitch=s.pitch||0,i.roll=s.roll||0),i}serialize(){let e=new l(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(e)}distance(e){return!e||!(e instanceof l)?0:r.Cartesian3.distance(y.transformWGS84ToCartesian(this),y.transformWGS84ToCartesian(e))}clone(){let e=new l;return e.lng=this.lng||0,e.lat=this.lat||0,e.alt=this.alt||0,e.heading=this.heading||0,e.pitch=this.pitch||0,e.roll=this.roll||0,e}copy(){return this.clone()}toArray(){return[this.lng,this.lat,this.alt,this.heading,this.pitch,this.roll]}toString(){return`${this.lng},${this.lat},${this.alt},${this.heading},${this.pitch},${this.roll}`}toObject(){return{lng:this.lng,lat:this.lat,alt:this.alt,heading:this.heading,pitch:this.pitch,roll:this.roll}}},X=or;var nr=class{static parsePosition(e){let i=new X;return e&&(typeof e=="string"?i=X.fromString(e):Array.isArray(e)?i=X.fromArray(e):!(Object(e)instanceof X)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat")?i=X.fromObject(e):Object(e)instanceof X?i=e:Object(e)instanceof r.Cartesian3?i=y.transformCartesianToWGS84(e):Object(e)instanceof r.Cartographic&&(i=y.transformCartographicToWGS84(e))),i}static parsePositions(e){if(typeof e=="string"){if(e.indexOf("#")>=0)throw new Error("the positions invalid");e=e.split(";").filter(i=>!!i)}return e.map(i=>this.parsePosition(i))}static parsePointCoordToArray(e){return e=this.parsePosition(e),[e.lng,e.lat]}static parsePolylineCoordToArray(e){let i=[];return e=this.parsePositions(e),e.forEach(s=>{i.push([s.lng,s.lat])}),i}static parsePolygonCoordToArray(e,i=!1){let s=[];return e=this.parsePositions(e),e.forEach(a=>{s.push([a.lng,a.lat])}),i&&s.length>0&&s.push(s[0]),[s]}},v=nr;var _t={ADD:"add",REMOVE:"remove"},B={LEFT_DOWN:r.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:r.ScreenSpaceEventType.LEFT_UP,CLICK:r.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:r.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:r.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:r.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:r.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:r.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},Al={ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",LEFT_DOWN:r.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:r.ScreenSpaceEventType.LEFT_UP,CLICK:r.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:r.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:r.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:r.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:r.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:r.ScreenSpaceEventType.WHEEL},z={CAMERA_MOVE_END:"cameraMoveEnd",CAMERA_CHANGED:"cameraChanged",PRE_UPDATE:"preUpdate",POST_UPDATE:"postUpdate",PRE_RENDER:"preRender",POST_RENDER:"postRender",MORPH_COMPLETE:"morphComplete",CLOCK_TICK:"clockTick",RENDER_ERROR:"renderError"},Ge={..._t,LEFT_DOWN:r.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:r.ScreenSpaceEventType.LEFT_UP,CLICK:r.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:r.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:r.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:r.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:r.ScreenSpaceEventType.MOUSE_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate"},Ze={READY:"ready",TEX_READY:"texturesReady"},re={INITIAL_TILES_LOADED:"initialTilesLoaded",ALL_TILES_LOADED:"allTilesLoaded ",LOAD_PROGRESS:"loadProgress ",TILE_FAILED:"tileFailed ",TILE_LOAD:"tileLoad",TILE_UNLOAD:"tileUnload",TILE_VISIBLE:"tileVisible"},He=_t,We={..._t,LEFT_DOWN:r.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:r.ScreenSpaceEventType.LEFT_UP,CLICK:r.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:r.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:r.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:r.ScreenSpaceEventType.LEFT_DOUBLE_CLICK},me={..._t,POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"},ue={..._t,POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine"},M={DRAW_START:"drawStart",DRAW_STOP:"drawStop",EDIT_START:"editStart",EDIT_STOP:"editEnd",DRAW_ANCHOR:"drawAnchor",CREATE_ANCHOR:"createAnchor",UPDATE_ANCHOR:"updateAnchor",ANCHOR_MOVING:"anchorMoving",EDIT_ANCHOR_STOP:"editAnchorStop",DELETE_ANCHOR:"deleteAnchor",CLEAR_ANCHOR:"clearAnchor"};var lr=class{constructor(e){this._types=e,this._cache={}}_on(e,i,s){let a=this.getEvent(e),o;return a&&i&&(o=a.addEventListener(i,s||this)),o}_off(e,i,s){let a=this.getEvent(e),o=!1;return a&&i&&(o=a.removeEventListener(i,s||this)),o}_fire(e,i){let s=this.getEvent(e);s&&s.raiseEvent(i)}_registerEvent(){Object.keys(this._types).forEach(e=>{let i=this._types[e];this._cache[i]=new r.Event})}on(e,i,s){return this._on(e,i,s)}once(e,i,s){let a=this._on(e,o=>{i(o),a&&a()},s)}off(e,i,s){return this._off(e,i,s)}fire(e,i){this._fire(e,i)}getEvent(e){return this._cache[e]||void 0}},Q=lr;var hr=class extends Q{constructor(e,i={}){super(B),this._viewer=e,this._selected=void 0,this._enableEventPropagation=i.enableEventPropagation,this._enableMouseOver=i.enableMouseOver,this._enableMouseMovePick=i.enableMouseMovePick,this._registerEvent(),this._addDefaultEvent()}_registerEvent(){let e=new r.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(r.ScreenSpaceEventType).forEach(i=>{let s=r.ScreenSpaceEventType[i];this._cache[s]=new r.Event,e.setInputAction(a=>{this._cache[s].raiseEvent(a)},s)})}_addDefaultEvent(){this.on(this._types.LEFT_DOWN,this._leftDownHandler,this),this.on(this._types.LEFT_UP,this._leftUpHandler,this),this.on(this._types.CLICK,this._clickHandler,this),this.on(this._types.DB_CLICK,this._dbClickHandler,this),this.on(this._types.RIGHT_DOWN,this._rightDownHandler,this),this.on(this._types.RIGHT_UP,this._rightUpHandler,this),this.on(this._types.RIGHT_CLICK,this._rightClickHandler,this),this.on(this._types.MOUSE_MOVE,this._mouseMoveHandler,this),this.on(this._types.WHEEL,this._mouseWheelHandler,this)}_adjustPosition(e){let i=this._viewer.container.getBoundingClientRect(),s=this._viewer.container.offsetWidth/i.width,a=this._viewer.container.offsetHeight/i.height;return new r.Cartesian2(e.x*s,e.y*a)}_getMousePosition(e){let i=this._adjustPosition(e),s=this._viewer.scene,a,o,n,h;if(s.pickPositionSupported&&(a=s.pickPosition(i)),a){let c=r.Ellipsoid.WGS84.cartesianToCartographic(a);c&&(n={lng:r.Math.toDegrees(c.longitude),lat:r.Math.toDegrees(c.latitude),alt:c.height})}if(s.mode===r.SceneMode.SCENE3D&&!(this._viewer.terrainProvider instanceof r.EllipsoidTerrainProvider)){let c=s.camera.getPickRay(i);o=s.globe.pick(c,s)}else o=s.camera.pickEllipsoid(i,r.Ellipsoid.WGS84);if(o){let c=r.Ellipsoid.WGS84.cartesianToCartographic(o);c&&(h={lng:r.Math.toDegrees(c.longitude),lat:r.Math.toDegrees(c.latitude),alt:c.height})}return{windowPosition:i,position:a,wgs84Position:n,surfacePosition:o,wgs84SurfacePosition:h}}_getMouseInfo(e){return{...this._getMousePosition(this._adjustPosition(e)),target:this._viewer.scene.pick(this._adjustPosition(e))}}_getDrillInfos(e){let i=[],a=this._viewer.scene.drillPick(e);return a&&a.length&&a.forEach(o=>{i.push(this._getTargetInfo(o))}),i}_getOverlayId(e){let i;return(e==null?void 0:e.id)instanceof r.Entity?i=e.id.overlayId:e instanceof r.Cesium3DTileFeature?i=e.tileset.overlayId:((e==null?void 0:e.primitive)instanceof r.Cesium3DTileset||e!=null&&e.primitive)&&(i=e.primitive.overlayId),i}_getTargetInfo(e){let i,s,a;return(e==null?void 0:e.id)instanceof r.Entity?(s=this._viewer.getLayers().filter(o=>o.layerId===e.id.layerId)[0],s!=null&&s.getOverlay&&(i=s.getOverlay(e.id.overlayId))):e instanceof r.Cesium3DTileFeature?(s=this._viewer.getLayers().filter(o=>o.layerId===e.tileset.layerId)[0],a=e,s!=null&&s.getOverlay&&(i=s.getOverlay(e.tileset.overlayId),a&&a.getPropertyNames&&a.getPropertyNames().forEach(n=>{i.attr[n]=a.getProperty(n)}))):(e==null?void 0:e.primitive)instanceof r.Cesium3DTileset?(s=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],s!=null&&s.getOverlay&&(i=s.getOverlay(e.primitive.overlayId))):e!=null&&e.primitive&&(s=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],s!=null&&s.getOverlay&&(i=s.getOverlay(e.primitive.overlayId))),{layer:s,overlay:i,feature:a,instanceId:e==null?void 0:e.instanceId}}_raiseEvent(e,i={}){var h;let s,a=this._getTargetInfo(i.target),o=a==null?void 0:a.overlay,n=a==null?void 0:a.layer;o!=null&&o.overlayEvent&&(s=o.overlayEvent.getEvent(e),s&&s.numberOfListeners>0&&s.raiseEvent({...a,...i})),(!s||s.numberOfListeners===0||this._enableEventPropagation)&&(n!=null&&n.layerEvent)&&(s=n.layerEvent.getEvent(e),s&&s.numberOfListeners>0&&s.raiseEvent({...a,...i})),(!s||s.numberOfListeners===0||this._eventPropagation)&&((h=this._viewer)!=null&&h.viewerEvent)&&(s=this._viewer.viewerEvent.getEvent(e),s&&s.numberOfListeners>0&&s.raiseEvent({...a,...i})),o!=null&&o.allowDrillPicking&&this._getDrillInfos(i.windowPosition).forEach(d=>{let p=d==null?void 0:d.overlay,f=d==null?void 0:d.layer;(p==null?void 0:p.overlayId)!==o.overlayId&&(p!=null&&p.overlayEvent)&&(s=p.overlayEvent.getEvent(e),(!s||s.numberOfListeners===0)&&(f!=null&&f.layerEvent)&&(s=f.layerEvent.getEvent(e)),s&&s.numberOfListeners>0&&s.raiseEvent({...d,...i}))})}_clickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(B.CLICK,this._getMouseInfo(e.position))}_dbClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(B.DB_CLICK,this._getMouseInfo(e.position))}_rightClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(B.RIGHT_CLICK,this._getMouseInfo(e.position))}_mouseMoveHandler(e){if(!(e!=null&&e.endPosition))return!1;if(this._enableMouseMovePick){let i=this._getMouseInfo(e.endPosition);this._viewer.canvas.style.cursor=i.target?"pointer":"default",this._raiseEvent(B.MOUSE_MOVE,i),this._enableMouseOver&&(!this._selected||this._getOverlayId(this._selected.target)!==this._getOverlayId(i.target))&&(this._raiseEvent(B.MOUSE_OUT,this._selected),this._raiseEvent(B.MOUSE_OVER,i),this._selected=i)}else this._raiseEvent(B.MOUSE_MOVE,this._getMousePosition(this._adjustPosition(e.endPosition)))}_leftDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(B.LEFT_DOWN,this._getMouseInfo(e.position))}_leftUpHandler(e){this._raiseEvent(B.LEFT_UP,this._getMouseInfo(e.position))}_rightDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(B.RIGHT_DOWN,this._getMouseInfo(e.position))}_rightUpHandler(e){this._raiseEvent(B.RIGHT_UP,this._getMouseInfo(e.position))}_mouseWheelHandler(e){this._raiseEvent(B.WHEEL,{movement:e})}},cr=hr;var dr=class extends Q{constructor(){super(Al),this._registerEvent()}},pr=dr;var mr=class extends Q{constructor(e){super(z),this._camera=e.camera,this._scene=e.scene,this._clock=e.clock}on(e,i,s){let a;switch(e){case z.CAMERA_MOVE_END:a=this._camera.moveEnd.addEventListener(i,s||this);break;case z.CAMERA_CHANGED:a=this._camera.changed.addEventListener(i,s||this);break;case z.PRE_UPDATE:a=this._scene.preUpdate.addEventListener(i,s||this);break;case z.POST_UPDATE:a=this._scene.postUpdate.addEventListener(i,s||this);break;case z.PRE_RENDER:a=this._scene.preRender.addEventListener(i,s||this);break;case z.POST_RENDER:a=this._scene.postRender.addEventListener(i,s||this);break;case z.MORPH_COMPLETE:a=this._scene.morphComplete.addEventListener(i,s||this);break;case z.CLOCK_TICK:a=this._clock.onTick.addEventListener(i,s||this);break;case z.RENDER_ERROR:a=this._scene.renderError.addEventListener(i,s||this);break;default:break}return a}off(e,i,s){let a=!1;switch(e){case z.CAMERA_MOVE_END:a=this._camera.moveEnd.removeEventListener(i,s||this);break;case z.CAMERA_CHANGED:a=this._camera.changed.removeEventListener(i,s||this);break;case z.PRE_UPDATE:a=this._scene.preUpdate.removeEventListener(i,s||this);break;case z.POST_UPDATE:a=this._scene.postUpdate.removeEventListener(i,s||this);break;case z.PRE_RENDER:a=this._scene.preRender.removeEventListener(i,s||this);break;case z.POST_RENDER:a=this._scene.postRender.removeEventListener(i,s||this);break;case z.MORPH_COMPLETE:a=this._scene.morphComplete.removeEventListener(i,s||this);break;case z.CLOCK_TICK:a=this._clock.onTick.removeEventListener(i,s||this);break;case z.RENDER_ERROR:a=this._scene.renderError.removeEventListener(i,s||this);break;default:break}return a}},ur=mr;var fr=class extends Q{constructor(){super(He),this._registerEvent()}},_r=fr;var gr=class extends Q{constructor(){super(We),this._registerEvent()}},yr=gr;var vr=class extends Q{constructor(){super(Ge),this._registerEvent()}},wr=vr;var xr=class extends Q{constructor(e){super(re),this._tileset=e}on(e,i,s){return this._tileset.then(a=>{switch(e){case re.INITIAL_TILES_LOADED:a.initialTilesLoaded.addEventListener(i,s||this);break;case re.ALL_TILES_LOADED:a.allTilesLoaded.addEventListener(i,s||this);break;case re.LOAD_PROGRESS:a.loadProgress.addEventListener(i,s||this);break;case re.TILE_FAILED:a.tileFailed.addEventListener(i,s||this);break;case re.TILE_LOAD:a.tileLoad.addEventListener(i,s||this);break;case re.TILE_UNLOAD:a.tileUnload.addEventListener(i,s||this);break;case re.TILE_VISIBLE:a.tileVisible.addEventListener(i,s||this);break;default:break}}),null}off(e,i,s){return this._tileset.then(a=>{switch(e){case re.INITIAL_TILES_LOADED:a.initialTilesLoaded.removeEventListener(i,s||this);break;case re.ALL_TILES_LOADED:a.allTilesLoaded.removeEventListener(i,s||this);break;case re.LOAD_PROGRESS:a.loadProgress.removeEventListener(i,s||this);break;case re.TILE_FAILED:a.tileFailed.removeEventListener(i,s||this);break;case re.TILE_LOAD:a.tileLoad.removeEventListener(i,s||this);break;case re.TILE_UNLOAD:a.tileUnload.removeEventListener(i,s||this);break;case re.TILE_VISIBLE:a.tileVisible.removeEventListener(i,s||this);break;default:break}}),!0}},Cr=xr;var Tr=class extends Q{constructor(e){super(Ze),this._model=e}on(e,i,s){return this._model.then(a=>{switch(e){case Ze.READY:a.readyEvent.addEventListener(i,s||this);break;case Ze.TEX_READY:a.texturesReadyEvent.addEventListener(i,s||this);break;default:break}}),null}off(e,i,s){return this._model.then(a=>{switch(e){case Ze.READY:a.readyEvent.removeEventListener(i,s||this);break;case Ze.TEX_READY:a.texturesReadyEvent.removeEventListener(i,s||this);break;default:break}}),!0}},Er=Tr;var Pr=class extends Q{constructor(){super(me),this._registerEvent()}},Mr=Pr;var br=class extends Q{constructor(){super(ue),this._registerEvent()}},Ar=br;var Sr=class extends Q{constructor(){super(M),this._registerEvent()}},gt=Sr;/**
|
|
10
|
+
var om=Object.create;var Vi=Object.defineProperty;var am=Object.getOwnPropertyDescriptor;var nm=Object.getOwnPropertyNames;var lm=Object.getPrototypeOf,hm=Object.prototype.hasOwnProperty;var cm=(l,e,i)=>e in l?Vi(l,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):l[e]=i;var pe=(l,e)=>()=>(e||l((e={exports:{}}).exports,e),e.exports);var dm=(l,e,i,s)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of nm(e))!hm.call(l,o)&&o!==i&&Vi(l,o,{get:()=>e[o],enumerable:!(s=am(e,o))||s.enumerable});return l};var pm=(l,e,i)=>(i=l!=null?om(lm(l)):{},dm(e||!l||!l.__esModule?Vi(i,"default",{value:l,enumerable:!0}):i,l));var lt=(l,e,i)=>(cm(l,typeof e!="symbol"?e+"":e,i),i);var Rh=pe((aT,Dh)=>{"use strict";var hu=(l,e,i,s)=>{let o=l&65535|0,a=l>>>16&65535|0,n=0;for(;i!==0;){n=i>2e3?2e3:i,i-=n;do o=o+e[s++]|0,a=a+o|0;while(--n);o%=65521,a%=65521}return o|a<<16|0};Dh.exports=hu});var kh=pe((nT,Oh)=>{"use strict";var cu=()=>{let l,e=[];for(var i=0;i<256;i++){l=i;for(var s=0;s<8;s++)l=l&1?3988292384^l>>>1:l>>>1;e[i]=l}return e},du=new Uint32Array(cu()),pu=(l,e,i,s)=>{let o=du,a=s+i;l^=-1;for(let n=s;n<a;n++)l=l>>>8^o[(l^e[n])&255];return l^-1};Oh.exports=pu});var Nh=pe((lT,zh)=>{"use strict";zh.exports=function(e,i){let s,o,a,n,h,c,d,p,f,g,u,m,T,w,P,M,L,S,R,B,A,O,F,N,G=e.state;s=e.next_in,F=e.input,o=s+(e.avail_in-5),a=e.next_out,N=e.output,n=a-(i-e.avail_out),h=a+(e.avail_out-257),c=G.dmax,d=G.wsize,p=G.whave,f=G.wnext,g=G.window,u=G.hold,m=G.bits,T=G.lencode,w=G.distcode,P=(1<<G.lenbits)-1,M=(1<<G.distbits)-1;e:do{m<15&&(u+=F[s++]<<m,m+=8,u+=F[s++]<<m,m+=8),L=T[u&P];t:for(;;){if(S=L>>>24,u>>>=S,m-=S,S=L>>>16&255,S===0)N[a++]=L&65535;else if(S&16){R=L&65535,S&=15,S&&(m<S&&(u+=F[s++]<<m,m+=8),R+=u&(1<<S)-1,u>>>=S,m-=S),m<15&&(u+=F[s++]<<m,m+=8,u+=F[s++]<<m,m+=8),L=w[u&M];i:for(;;){if(S=L>>>24,u>>>=S,m-=S,S=L>>>16&255,S&16){if(B=L&65535,S&=15,m<S&&(u+=F[s++]<<m,m+=8,m<S&&(u+=F[s++]<<m,m+=8)),B+=u&(1<<S)-1,B>c){e.msg="invalid distance too far back",G.mode=16209;break e}if(u>>>=S,m-=S,S=a-n,B>S){if(S=B-S,S>p&&G.sane){e.msg="invalid distance too far back",G.mode=16209;break e}if(A=0,O=g,f===0){if(A+=d-S,S<R){R-=S;do N[a++]=g[A++];while(--S);A=a-B,O=N}}else if(f<S){if(A+=d+f-S,S-=f,S<R){R-=S;do N[a++]=g[A++];while(--S);if(A=0,f<R){S=f,R-=S;do N[a++]=g[A++];while(--S);A=a-B,O=N}}}else if(A+=f-S,S<R){R-=S;do N[a++]=g[A++];while(--S);A=a-B,O=N}for(;R>2;)N[a++]=O[A++],N[a++]=O[A++],N[a++]=O[A++],R-=3;R&&(N[a++]=O[A++],R>1&&(N[a++]=O[A++]))}else{A=a-B;do N[a++]=N[A++],N[a++]=N[A++],N[a++]=N[A++],R-=3;while(R>2);R&&(N[a++]=N[A++],R>1&&(N[a++]=N[A++]))}}else if(S&64){e.msg="invalid distance code",G.mode=16209;break e}else{L=w[(L&65535)+(u&(1<<S)-1)];continue i}break}}else if(S&64)if(S&32){G.mode=16191;break e}else{e.msg="invalid literal/length code",G.mode=16209;break e}else{L=T[(L&65535)+(u&(1<<S)-1)];continue t}break}}while(s<o&&a<h);R=m>>3,s-=R,m-=R<<3,u&=(1<<m)-1,e.next_in=s,e.next_out=a,e.avail_in=s<o?5+(o-s):5-(s-o),e.avail_out=a<h?257+(h-a):257-(a-h),G.hold=u,G.bits=m}});var Wh=pe((hT,Fh)=>{"use strict";var mu=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]),uu=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]),fu=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]),_u=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]),gu=(l,e,i,s,o,a,n,h)=>{let c=h.bits,d=0,p=0,f=0,g=0,u=0,m=0,T=0,w=0,P=0,M=0,L,S,R,B,A,O=null,F,N=new Uint16Array(16),G=new Uint16Array(16),te=null,Pe,be,Me;for(d=0;d<=15;d++)N[d]=0;for(p=0;p<s;p++)N[e[i+p]]++;for(u=c,g=15;g>=1&&N[g]===0;g--);if(u>g&&(u=g),g===0)return o[a++]=1<<24|64<<16|0,o[a++]=1<<24|64<<16|0,h.bits=1,0;for(f=1;f<g&&N[f]===0;f++);for(u<f&&(u=f),w=1,d=1;d<=15;d++)if(w<<=1,w-=N[d],w<0)return-1;if(w>0&&(l===0||g!==1))return-1;for(G[1]=0,d=1;d<15;d++)G[d+1]=G[d]+N[d];for(p=0;p<s;p++)e[i+p]!==0&&(n[G[e[i+p]]++]=p);if(l===0?(O=te=n,F=20):l===1?(O=mu,te=uu,F=257):(O=fu,te=_u,F=0),M=0,p=0,d=f,A=a,m=u,T=0,R=-1,P=1<<u,B=P-1,l===1&&P>852||l===2&&P>592)return 1;for(;;){Pe=d-T,n[p]+1<F?(be=0,Me=n[p]):n[p]>=F?(be=te[n[p]-F],Me=O[n[p]-F]):(be=96,Me=0),L=1<<d-T,S=1<<m,f=S;do S-=L,o[A+(M>>T)+S]=Pe<<24|be<<16|Me|0;while(S!==0);for(L=1<<d-1;M&L;)L>>=1;if(L!==0?(M&=L-1,M+=L):M=0,p++,--N[d]===0){if(d===g)break;d=e[i+n[p]]}if(d>u&&(M&B)!==R){for(T===0&&(T=u),A+=f,m=d-T,w=1<<m;m+T<g&&(w-=N[m+T],!(w<=0));)m++,w<<=1;if(P+=1<<m,l===1&&P>852||l===2&&P>592)return 1;R=M&B,o[R]=u<<24|m<<16|A-a|0}}return M!==0&&(o[A+M]=d-T<<24|64<<16|0),h.bits=u,0};Fh.exports=gu});var Nt=pe((cT,Gh)=>{"use strict";Gh.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 Cc=pe((dT,we)=>{"use strict";var As=Rh(),Te=kh(),yu=Nh(),ft=Wh(),vu=0,pc=1,mc=2,{Z_FINISH:Hh,Z_BLOCK:wu,Z_TREES:Ft,Z_OK:je,Z_STREAM_END:Cu,Z_NEED_DICT:xu,Z_STREAM_ERROR:fe,Z_DATA_ERROR:uc,Z_MEM_ERROR:Ss,Z_BUF_ERROR:Tu,Z_DEFLATED:Bh}=Nt(),Bt=16180,Uh=16181,Vh=16182,Zh=16183,jh=16184,Yh=16185,qh=16186,Xh=16187,Jh=16188,Qh=16189,Ht=16190,Ie=16191,Ts=16192,Kh=16193,Es=16194,$h=16195,ec=16196,tc=16197,ic=16198,Wt=16199,Gt=16200,rc=16201,sc=16202,oc=16203,ac=16204,nc=16205,Ps=16206,lc=16207,hc=16208,J=16209,Is=16210,fc=16211,Eu=852,Pu=592,bu=15,Mu=bu,cc=l=>(l>>>24&255)+(l>>>8&65280)+((l&65280)<<8)+((l&255)<<24);function Au(){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 Ye=l=>{if(!l)return 1;let e=l.state;return!e||e.strm!==l||e.mode<Bt||e.mode>fc?1:0},_c=l=>{if(Ye(l))return fe;let e=l.state;return l.total_in=l.total_out=e.total=0,l.msg="",e.wrap&&(l.adler=e.wrap&1),e.mode=Bt,e.last=0,e.havedict=0,e.flags=-1,e.dmax=32768,e.head=null,e.hold=0,e.bits=0,e.lencode=e.lendyn=new Int32Array(Eu),e.distcode=e.distdyn=new Int32Array(Pu),e.sane=1,e.back=-1,je},gc=l=>{if(Ye(l))return fe;let e=l.state;return e.wsize=0,e.whave=0,e.wnext=0,_c(l)},yc=(l,e)=>{let i;if(Ye(l))return fe;let s=l.state;return e<0?(i=0,e=-e):(i=(e>>4)+5,e<48&&(e&=15)),e&&(e<8||e>15)?fe:(s.window!==null&&s.wbits!==e&&(s.window=null),s.wrap=i,s.wbits=e,gc(l))},vc=(l,e)=>{if(!l)return fe;let i=new Au;l.state=i,i.strm=l,i.window=null,i.mode=Bt;let s=yc(l,e);return s!==je&&(l.state=null),s},Su=l=>vc(l,Mu),dc=!0,bs,Ms,Iu=l=>{if(dc){bs=new Int32Array(512),Ms=new Int32Array(32);let e=0;for(;e<144;)l.lens[e++]=8;for(;e<256;)l.lens[e++]=9;for(;e<280;)l.lens[e++]=7;for(;e<288;)l.lens[e++]=8;for(ft(pc,l.lens,0,288,bs,0,l.work,{bits:9}),e=0;e<32;)l.lens[e++]=5;ft(mc,l.lens,0,32,Ms,0,l.work,{bits:5}),dc=!1}l.lencode=bs,l.lenbits=9,l.distcode=Ms,l.distbits=5},wc=(l,e,i,s)=>{let o,a=l.state;return a.window===null&&(a.wsize=1<<a.wbits,a.wnext=0,a.whave=0,a.window=new Uint8Array(a.wsize)),s>=a.wsize?(a.window.set(e.subarray(i-a.wsize,i),0),a.wnext=0,a.whave=a.wsize):(o=a.wsize-a.wnext,o>s&&(o=s),a.window.set(e.subarray(i-s,i-s+o),a.wnext),s-=o,s?(a.window.set(e.subarray(i-s,i),0),a.wnext=s,a.whave=a.wsize):(a.wnext+=o,a.wnext===a.wsize&&(a.wnext=0),a.whave<a.wsize&&(a.whave+=o))),0},Lu=(l,e)=>{let i,s,o,a,n,h,c,d,p,f,g,u,m,T,w=0,P,M,L,S,R,B,A,O,F=new Uint8Array(4),N,G,te=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Ye(l)||!l.output||!l.input&&l.avail_in!==0)return fe;i=l.state,i.mode===Ie&&(i.mode=Ts),n=l.next_out,o=l.output,c=l.avail_out,a=l.next_in,s=l.input,h=l.avail_in,d=i.hold,p=i.bits,f=h,g=c,O=je;e:for(;;)switch(i.mode){case Bt:if(i.wrap===0){i.mode=Ts;break}for(;p<16;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if(i.wrap&2&&d===35615){i.wbits===0&&(i.wbits=15),i.check=0,F[0]=d&255,F[1]=d>>>8&255,i.check=Te(i.check,F,2,0),d=0,p=0,i.mode=Uh;break}if(i.head&&(i.head.done=!1),!(i.wrap&1)||(((d&255)<<8)+(d>>8))%31){l.msg="incorrect header check",i.mode=J;break}if((d&15)!==Bh){l.msg="unknown compression method",i.mode=J;break}if(d>>>=4,p-=4,A=(d&15)+8,i.wbits===0&&(i.wbits=A),A>15||A>i.wbits){l.msg="invalid window size",i.mode=J;break}i.dmax=1<<i.wbits,i.flags=0,l.adler=i.check=1,i.mode=d&512?Qh:Ie,d=0,p=0;break;case Uh:for(;p<16;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if(i.flags=d,(i.flags&255)!==Bh){l.msg="unknown compression method",i.mode=J;break}if(i.flags&57344){l.msg="unknown header flags set",i.mode=J;break}i.head&&(i.head.text=d>>8&1),i.flags&512&&i.wrap&4&&(F[0]=d&255,F[1]=d>>>8&255,i.check=Te(i.check,F,2,0)),d=0,p=0,i.mode=Vh;case Vh:for(;p<32;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}i.head&&(i.head.time=d),i.flags&512&&i.wrap&4&&(F[0]=d&255,F[1]=d>>>8&255,F[2]=d>>>16&255,F[3]=d>>>24&255,i.check=Te(i.check,F,4,0)),d=0,p=0,i.mode=Zh;case Zh:for(;p<16;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}i.head&&(i.head.xflags=d&255,i.head.os=d>>8),i.flags&512&&i.wrap&4&&(F[0]=d&255,F[1]=d>>>8&255,i.check=Te(i.check,F,2,0)),d=0,p=0,i.mode=jh;case jh:if(i.flags&1024){for(;p<16;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}i.length=d,i.head&&(i.head.extra_len=d),i.flags&512&&i.wrap&4&&(F[0]=d&255,F[1]=d>>>8&255,i.check=Te(i.check,F,2,0)),d=0,p=0}else i.head&&(i.head.extra=null);i.mode=Yh;case Yh:if(i.flags&1024&&(u=i.length,u>h&&(u=h),u&&(i.head&&(A=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Uint8Array(i.head.extra_len)),i.head.extra.set(s.subarray(a,a+u),A)),i.flags&512&&i.wrap&4&&(i.check=Te(i.check,s,u,a)),h-=u,a+=u,i.length-=u),i.length))break e;i.length=0,i.mode=qh;case qh:if(i.flags&2048){if(h===0)break e;u=0;do A=s[a+u++],i.head&&A&&i.length<65536&&(i.head.name+=String.fromCharCode(A));while(A&&u<h);if(i.flags&512&&i.wrap&4&&(i.check=Te(i.check,s,u,a)),h-=u,a+=u,A)break e}else i.head&&(i.head.name=null);i.length=0,i.mode=Xh;case Xh:if(i.flags&4096){if(h===0)break e;u=0;do A=s[a+u++],i.head&&A&&i.length<65536&&(i.head.comment+=String.fromCharCode(A));while(A&&u<h);if(i.flags&512&&i.wrap&4&&(i.check=Te(i.check,s,u,a)),h-=u,a+=u,A)break e}else i.head&&(i.head.comment=null);i.mode=Jh;case Jh:if(i.flags&512){for(;p<16;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if(i.wrap&4&&d!==(i.check&65535)){l.msg="header crc mismatch",i.mode=J;break}d=0,p=0}i.head&&(i.head.hcrc=i.flags>>9&1,i.head.done=!0),l.adler=i.check=0,i.mode=Ie;break;case Qh:for(;p<32;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}l.adler=i.check=cc(d),d=0,p=0,i.mode=Ht;case Ht:if(i.havedict===0)return l.next_out=n,l.avail_out=c,l.next_in=a,l.avail_in=h,i.hold=d,i.bits=p,xu;l.adler=i.check=1,i.mode=Ie;case Ie:if(e===wu||e===Ft)break e;case Ts:if(i.last){d>>>=p&7,p-=p&7,i.mode=Ps;break}for(;p<3;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}switch(i.last=d&1,d>>>=1,p-=1,d&3){case 0:i.mode=Kh;break;case 1:if(Iu(i),i.mode=Wt,e===Ft){d>>>=2,p-=2;break e}break;case 2:i.mode=ec;break;case 3:l.msg="invalid block type",i.mode=J}d>>>=2,p-=2;break;case Kh:for(d>>>=p&7,p-=p&7;p<32;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if((d&65535)!==(d>>>16^65535)){l.msg="invalid stored block lengths",i.mode=J;break}if(i.length=d&65535,d=0,p=0,i.mode=Es,e===Ft)break e;case Es:i.mode=$h;case $h:if(u=i.length,u){if(u>h&&(u=h),u>c&&(u=c),u===0)break e;o.set(s.subarray(a,a+u),n),h-=u,a+=u,c-=u,n+=u,i.length-=u;break}i.mode=Ie;break;case ec:for(;p<14;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if(i.nlen=(d&31)+257,d>>>=5,p-=5,i.ndist=(d&31)+1,d>>>=5,p-=5,i.ncode=(d&15)+4,d>>>=4,p-=4,i.nlen>286||i.ndist>30){l.msg="too many length or distance symbols",i.mode=J;break}i.have=0,i.mode=tc;case tc:for(;i.have<i.ncode;){for(;p<3;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}i.lens[te[i.have++]]=d&7,d>>>=3,p-=3}for(;i.have<19;)i.lens[te[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,N={bits:i.lenbits},O=ft(vu,i.lens,0,19,i.lencode,0,i.work,N),i.lenbits=N.bits,O){l.msg="invalid code lengths set",i.mode=J;break}i.have=0,i.mode=ic;case ic:for(;i.have<i.nlen+i.ndist;){for(;w=i.lencode[d&(1<<i.lenbits)-1],P=w>>>24,M=w>>>16&255,L=w&65535,!(P<=p);){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if(L<16)d>>>=P,p-=P,i.lens[i.have++]=L;else{if(L===16){for(G=P+2;p<G;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if(d>>>=P,p-=P,i.have===0){l.msg="invalid bit length repeat",i.mode=J;break}A=i.lens[i.have-1],u=3+(d&3),d>>>=2,p-=2}else if(L===17){for(G=P+3;p<G;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}d>>>=P,p-=P,A=0,u=3+(d&7),d>>>=3,p-=3}else{for(G=P+7;p<G;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}d>>>=P,p-=P,A=0,u=11+(d&127),d>>>=7,p-=7}if(i.have+u>i.nlen+i.ndist){l.msg="invalid bit length repeat",i.mode=J;break}for(;u--;)i.lens[i.have++]=A}}if(i.mode===J)break;if(i.lens[256]===0){l.msg="invalid code -- missing end-of-block",i.mode=J;break}if(i.lenbits=9,N={bits:i.lenbits},O=ft(pc,i.lens,0,i.nlen,i.lencode,0,i.work,N),i.lenbits=N.bits,O){l.msg="invalid literal/lengths set",i.mode=J;break}if(i.distbits=6,i.distcode=i.distdyn,N={bits:i.distbits},O=ft(mc,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,N),i.distbits=N.bits,O){l.msg="invalid distances set",i.mode=J;break}if(i.mode=Wt,e===Ft)break e;case Wt:i.mode=Gt;case Gt:if(h>=6&&c>=258){l.next_out=n,l.avail_out=c,l.next_in=a,l.avail_in=h,i.hold=d,i.bits=p,yu(l,g),n=l.next_out,o=l.output,c=l.avail_out,a=l.next_in,s=l.input,h=l.avail_in,d=i.hold,p=i.bits,i.mode===Ie&&(i.back=-1);break}for(i.back=0;w=i.lencode[d&(1<<i.lenbits)-1],P=w>>>24,M=w>>>16&255,L=w&65535,!(P<=p);){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if(M&&!(M&240)){for(S=P,R=M,B=L;w=i.lencode[B+((d&(1<<S+R)-1)>>S)],P=w>>>24,M=w>>>16&255,L=w&65535,!(S+P<=p);){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}d>>>=S,p-=S,i.back+=S}if(d>>>=P,p-=P,i.back+=P,i.length=L,M===0){i.mode=nc;break}if(M&32){i.back=-1,i.mode=Ie;break}if(M&64){l.msg="invalid literal/length code",i.mode=J;break}i.extra=M&15,i.mode=rc;case rc:if(i.extra){for(G=i.extra;p<G;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}i.length+=d&(1<<i.extra)-1,d>>>=i.extra,p-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=sc;case sc:for(;w=i.distcode[d&(1<<i.distbits)-1],P=w>>>24,M=w>>>16&255,L=w&65535,!(P<=p);){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if(!(M&240)){for(S=P,R=M,B=L;w=i.distcode[B+((d&(1<<S+R)-1)>>S)],P=w>>>24,M=w>>>16&255,L=w&65535,!(S+P<=p);){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}d>>>=S,p-=S,i.back+=S}if(d>>>=P,p-=P,i.back+=P,M&64){l.msg="invalid distance code",i.mode=J;break}i.offset=L,i.extra=M&15,i.mode=oc;case oc:if(i.extra){for(G=i.extra;p<G;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}i.offset+=d&(1<<i.extra)-1,d>>>=i.extra,p-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){l.msg="invalid distance too far back",i.mode=J;break}i.mode=ac;case ac:if(c===0)break e;if(u=g-c,i.offset>u){if(u=i.offset-u,u>i.whave&&i.sane){l.msg="invalid distance too far back",i.mode=J;break}u>i.wnext?(u-=i.wnext,m=i.wsize-u):m=i.wnext-u,u>i.length&&(u=i.length),T=i.window}else T=o,m=n-i.offset,u=i.length;u>c&&(u=c),c-=u,i.length-=u;do o[n++]=T[m++];while(--u);i.length===0&&(i.mode=Gt);break;case nc:if(c===0)break e;o[n++]=i.length,c--,i.mode=Gt;break;case Ps:if(i.wrap){for(;p<32;){if(h===0)break e;h--,d|=s[a++]<<p,p+=8}if(g-=c,l.total_out+=g,i.total+=g,i.wrap&4&&g&&(l.adler=i.check=i.flags?Te(i.check,o,g,n-g):As(i.check,o,g,n-g)),g=c,i.wrap&4&&(i.flags?d:cc(d))!==i.check){l.msg="incorrect data check",i.mode=J;break}d=0,p=0}i.mode=lc;case lc:if(i.wrap&&i.flags){for(;p<32;){if(h===0)break e;h--,d+=s[a++]<<p,p+=8}if(i.wrap&4&&d!==(i.total&4294967295)){l.msg="incorrect length check",i.mode=J;break}d=0,p=0}i.mode=hc;case hc:O=Cu;break e;case J:O=uc;break e;case Is:return Ss;case fc:default:return fe}return l.next_out=n,l.avail_out=c,l.next_in=a,l.avail_in=h,i.hold=d,i.bits=p,(i.wsize||g!==l.avail_out&&i.mode<J&&(i.mode<Ps||e!==Hh))&&wc(l,l.output,l.next_out,g-l.avail_out)?(i.mode=Is,Ss):(f-=l.avail_in,g-=l.avail_out,l.total_in+=f,l.total_out+=g,i.total+=g,i.wrap&4&&g&&(l.adler=i.check=i.flags?Te(i.check,o,g,l.next_out-g):As(i.check,o,g,l.next_out-g)),l.data_type=i.bits+(i.last?64:0)+(i.mode===Ie?128:0)+(i.mode===Wt||i.mode===Es?256:0),(f===0&&g===0||e===Hh)&&O===je&&(O=Tu),O)},Du=l=>{if(Ye(l))return fe;let e=l.state;return e.window&&(e.window=null),l.state=null,je},Ru=(l,e)=>{if(Ye(l))return fe;let i=l.state;return i.wrap&2?(i.head=e,e.done=!1,je):fe},Ou=(l,e)=>{let i=e.length,s,o,a;return Ye(l)||(s=l.state,s.wrap!==0&&s.mode!==Ht)?fe:s.mode===Ht&&(o=1,o=As(o,e,i,0),o!==s.check)?uc:(a=wc(l,e,i,i),a?(s.mode=Is,Ss):(s.havedict=1,je))};we.exports.inflateReset=gc;we.exports.inflateReset2=yc;we.exports.inflateResetKeep=_c;we.exports.inflateInit=Su;we.exports.inflateInit2=vc;we.exports.inflate=Lu;we.exports.inflateEnd=Du;we.exports.inflateGetHeader=Ru;we.exports.inflateSetDictionary=Ou;we.exports.inflateInfo="pako inflate (from Nodeca project)"});var xc=pe((pT,Ls)=>{"use strict";var ku=(l,e)=>Object.prototype.hasOwnProperty.call(l,e);Ls.exports.assign=function(l){let e=Array.prototype.slice.call(arguments,1);for(;e.length;){let i=e.shift();if(i){if(typeof i!="object")throw new TypeError(i+"must be non-object");for(let s in i)ku(i,s)&&(l[s]=i[s])}}return l};Ls.exports.flattenChunks=l=>{let e=0;for(let s=0,o=l.length;s<o;s++)e+=l[s].length;let i=new Uint8Array(e);for(let s=0,o=0,a=l.length;s<a;s++){let n=l[s];i.set(n,o),o+=n.length}return i}});var Ec=pe((mT,Ut)=>{"use strict";var Tc=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{Tc=!1}var _t=new Uint8Array(256);for(let l=0;l<256;l++)_t[l]=l>=252?6:l>=248?5:l>=240?4:l>=224?3:l>=192?2:1;_t[254]=_t[254]=1;Ut.exports.string2buf=l=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(l);let e,i,s,o,a,n=l.length,h=0;for(o=0;o<n;o++)i=l.charCodeAt(o),(i&64512)===55296&&o+1<n&&(s=l.charCodeAt(o+1),(s&64512)===56320&&(i=65536+(i-55296<<10)+(s-56320),o++)),h+=i<128?1:i<2048?2:i<65536?3:4;for(e=new Uint8Array(h),a=0,o=0;a<h;o++)i=l.charCodeAt(o),(i&64512)===55296&&o+1<n&&(s=l.charCodeAt(o+1),(s&64512)===56320&&(i=65536+(i-55296<<10)+(s-56320),o++)),i<128?e[a++]=i:i<2048?(e[a++]=192|i>>>6,e[a++]=128|i&63):i<65536?(e[a++]=224|i>>>12,e[a++]=128|i>>>6&63,e[a++]=128|i&63):(e[a++]=240|i>>>18,e[a++]=128|i>>>12&63,e[a++]=128|i>>>6&63,e[a++]=128|i&63);return e};var zu=(l,e)=>{if(e<65534&&l.subarray&&Tc)return String.fromCharCode.apply(null,l.length===e?l:l.subarray(0,e));let i="";for(let s=0;s<e;s++)i+=String.fromCharCode(l[s]);return i};Ut.exports.buf2string=(l,e)=>{let i=e||l.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(l.subarray(0,e));let s,o,a=new Array(i*2);for(o=0,s=0;s<i;){let n=l[s++];if(n<128){a[o++]=n;continue}let h=_t[n];if(h>4){a[o++]=65533,s+=h-1;continue}for(n&=h===2?31:h===3?15:7;h>1&&s<i;)n=n<<6|l[s++]&63,h--;if(h>1){a[o++]=65533;continue}n<65536?a[o++]=n:(n-=65536,a[o++]=55296|n>>10&1023,a[o++]=56320|n&1023)}return zu(a,o)};Ut.exports.utf8border=(l,e)=>{e=e||l.length,e>l.length&&(e=l.length);let i=e-1;for(;i>=0&&(l[i]&192)===128;)i--;return i<0||i===0?e:i+_t[l[i]]>e?i:e}});var bc=pe((uT,Pc)=>{"use strict";Pc.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 Ac=pe((fT,Mc)=>{"use strict";function Nu(){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}Mc.exports=Nu});var Ic=pe((_T,Sc)=>{"use strict";function Fu(){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}Sc.exports=Fu});var Oc=pe((gT,it)=>{"use strict";var Le=Cc(),Dc=xc(),Os=Ec(),ks=bc(),Wu=Ac(),Gu=Ic(),Rc=Object.prototype.toString,{Z_NO_FLUSH:Hu,Z_FINISH:Bu,Z_OK:gt,Z_STREAM_END:Ds,Z_NEED_DICT:Rs,Z_STREAM_ERROR:Uu,Z_DATA_ERROR:Lc,Z_MEM_ERROR:Vu}=Nt();function yt(l){this.options=Dc.assign({chunkSize:1024*64,windowBits:15,to:""},l||{});let e=this.options;e.raw&&e.windowBits>=0&&e.windowBits<16&&(e.windowBits=-e.windowBits,e.windowBits===0&&(e.windowBits=-15)),e.windowBits>=0&&e.windowBits<16&&!(l&&l.windowBits)&&(e.windowBits+=32),e.windowBits>15&&e.windowBits<48&&(e.windowBits&15||(e.windowBits|=15)),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Wu,this.strm.avail_out=0;let i=Le.inflateInit2(this.strm,e.windowBits);if(i!==gt)throw new Error(ks[i]);if(this.header=new Gu,Le.inflateGetHeader(this.strm,this.header),e.dictionary&&(typeof e.dictionary=="string"?e.dictionary=Os.string2buf(e.dictionary):Rc.call(e.dictionary)==="[object ArrayBuffer]"&&(e.dictionary=new Uint8Array(e.dictionary)),e.raw&&(i=Le.inflateSetDictionary(this.strm,e.dictionary),i!==gt)))throw new Error(ks[i])}yt.prototype.push=function(l,e){let i=this.strm,s=this.options.chunkSize,o=this.options.dictionary,a,n,h;if(this.ended)return!1;for(e===~~e?n=e:n=e===!0?Bu:Hu,Rc.call(l)==="[object ArrayBuffer]"?i.input=new Uint8Array(l):i.input=l,i.next_in=0,i.avail_in=i.input.length;;){for(i.avail_out===0&&(i.output=new Uint8Array(s),i.next_out=0,i.avail_out=s),a=Le.inflate(i,n),a===Rs&&o&&(a=Le.inflateSetDictionary(i,o),a===gt?a=Le.inflate(i,n):a===Lc&&(a=Rs));i.avail_in>0&&a===Ds&&i.state.wrap>0&&l[i.next_in]!==0;)Le.inflateReset(i),a=Le.inflate(i,n);switch(a){case Uu:case Lc:case Rs:case Vu:return this.onEnd(a),this.ended=!0,!1}if(h=i.avail_out,i.next_out&&(i.avail_out===0||a===Ds))if(this.options.to==="string"){let c=Os.utf8border(i.output,i.next_out),d=i.next_out-c,p=Os.buf2string(i.output,c);i.next_out=d,i.avail_out=s-d,d&&i.output.set(i.output.subarray(c,c+d),0),this.onData(p)}else this.onData(i.output.length===i.next_out?i.output:i.output.subarray(0,i.next_out));if(!(a===gt&&h===0)){if(a===Ds)return a=Le.inflateEnd(this.strm),this.onEnd(a),this.ended=!0,!0;if(i.avail_in===0)break}}return!0};yt.prototype.onData=function(l){this.chunks.push(l)};yt.prototype.onEnd=function(l){l===gt&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=Dc.flattenChunks(this.chunks)),this.chunks=[],this.err=l,this.msg=this.strm.msg};function zs(l,e){let i=new yt(e);if(i.push(l),i.err)throw i.msg||ks[i.err];return i.result}function Zu(l,e){return e=e||{},e.raw=!0,zs(l,e)}it.exports.Inflate=yt;it.exports.inflate=zs;it.exports.inflateRaw=Zu;it.exports.ungzip=zs;it.exports.constants=Nt()});var Al={};function Qe(l,e){Al[l]=e}function ce(l){return Al[l]}var Sl={};function Be(l,e){Sl[l]=e}function Zi(l){return Sl[l]}import*as r from"cesium";var Il=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],ji=1,ht=8,dt=class l{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[i,s]=new Uint8Array(e,0,2);if(i!==219)throw new Error("Data does not appear to be in a KDBush format.");let o=s>>4;if(o!==ji)throw new Error(`Got v${o} data when expected v${ji}.`);let a=Il[s&15];if(!a)throw new Error("Unrecognized array type.");let[n]=new Uint16Array(e,2,1),[h]=new Uint32Array(e,4,1);return new l(h,n,a,e)}constructor(e,i=64,s=Float64Array,o){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+i,2),65535),this.ArrayType=s,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let a=Il.indexOf(this.ArrayType),n=e*2*this.ArrayType.BYTES_PER_ELEMENT,h=e*this.IndexArrayType.BYTES_PER_ELEMENT,c=(8-h%8)%8;if(a<0)throw new Error(`Unexpected typed array class: ${s}.`);o&&o instanceof ArrayBuffer?(this.data=o,this.ids=new this.IndexArrayType(this.data,ht,e),this.coords=new this.ArrayType(this.data,ht+h+c,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(ht+n+h+c),this.ids=new this.IndexArrayType(this.data,ht,e),this.coords=new this.ArrayType(this.data,ht+h+c,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(ji<<4)+a]),new Uint16Array(this.data,2,1)[0]=i,new Uint32Array(this.data,4,1)[0]=e)}add(e,i){let s=this._pos>>1;return this.ids[s]=s,this.coords[this._pos++]=e,this.coords[this._pos++]=i,s}finish(){let e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return qi(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,i,s,o){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:a,coords:n,nodeSize:h}=this,c=[0,a.length-1,0],d=[];for(;c.length;){let p=c.pop()||0,f=c.pop()||0,g=c.pop()||0;if(f-g<=h){for(let w=g;w<=f;w++){let P=n[2*w],M=n[2*w+1];P>=e&&P<=s&&M>=i&&M<=o&&d.push(a[w])}continue}let u=g+f>>1,m=n[2*u],T=n[2*u+1];m>=e&&m<=s&&T>=i&&T<=o&&d.push(a[u]),(p===0?e<=m:i<=T)&&(c.push(g),c.push(u-1),c.push(1-p)),(p===0?s>=m:o>=T)&&(c.push(u+1),c.push(f),c.push(1-p))}return d}within(e,i,s){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:o,coords:a,nodeSize:n}=this,h=[0,o.length-1,0],c=[],d=s*s;for(;h.length;){let p=h.pop()||0,f=h.pop()||0,g=h.pop()||0;if(f-g<=n){for(let w=g;w<=f;w++)Ll(a[2*w],a[2*w+1],e,i)<=d&&c.push(o[w]);continue}let u=g+f>>1,m=a[2*u],T=a[2*u+1];Ll(m,T,e,i)<=d&&c.push(o[u]),(p===0?e-s<=m:i-s<=T)&&(h.push(g),h.push(u-1),h.push(1-p)),(p===0?e+s>=m:i+s>=T)&&(h.push(u+1),h.push(f),h.push(1-p))}return c}};function qi(l,e,i,s,o,a){if(o-s<=i)return;let n=s+o>>1;Dl(l,e,n,s,o,a),qi(l,e,i,s,n-1,1-a),qi(l,e,i,n+1,o,1-a)}function Dl(l,e,i,s,o,a){for(;o>s;){if(o-s>600){let d=o-s+1,p=i-s+1,f=Math.log(d),g=.5*Math.exp(2*f/3),u=.5*Math.sqrt(f*g*(d-g)/d)*(p-d/2<0?-1:1),m=Math.max(s,Math.floor(i-p*g/d+u)),T=Math.min(o,Math.floor(i+(d-p)*g/d+u));Dl(l,e,i,m,T,a)}let n=e[2*i+a],h=s,c=o;for(ct(l,e,s,i),e[2*o+a]>n&&ct(l,e,s,o);h<c;){for(ct(l,e,h,c),h++,c--;e[2*h+a]<n;)h++;for(;e[2*c+a]>n;)c--}e[2*s+a]===n?ct(l,e,s,c):(c++,ct(l,e,c,o)),c<=i&&(s=c+1),i<=c&&(o=c-1)}}function ct(l,e,i,s){Yi(l,i,s),Yi(e,2*i,2*s),Yi(e,2*i+1,2*s+1)}function Yi(l,e,i){let s=l[e];l[e]=l[i],l[i]=s}function Ll(l,e,i,s){let o=l-i,a=e-s;return o*o+a*a}var mm={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:l=>l},Rl=Math.fround||(l=>e=>(l[0]=+e,l[0]))(new Float32Array(1)),Ue=2,Ne=3,Xi=4,ze=5,kl=6,Ke=class{constructor(e){this.options=Object.assign(Object.create(mm),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){let{log:i,minZoom:s,maxZoom:o}=this.options;i&&console.time("total time");let a=`prepare ${e.length} points`;i&&console.time(a),this.points=e;let n=[];for(let c=0;c<e.length;c++){let d=e[c];if(!d.geometry)continue;let[p,f]=d.geometry.coordinates,g=Rl(bt(p)),u=Rl(Mt(f));n.push(g,u,1/0,c,-1,1),this.options.reduce&&n.push(0)}let h=this.trees[o+1]=this._createTree(n);i&&console.timeEnd(a);for(let c=o;c>=s;c--){let d=+Date.now();h=this.trees[c]=this._createTree(this._cluster(h,c)),i&&console.log("z%d: %d clusters in %dms",c,h.numItems,+Date.now()-d)}return i&&console.timeEnd("total time"),this}getClusters(e,i){let s=((e[0]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,e[1])),a=e[2]===180?180:((e[2]+180)%360+360)%360-180,n=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)s=-180,a=180;else if(s>a){let f=this.getClusters([s,o,180,n],i),g=this.getClusters([-180,o,a,n],i);return f.concat(g)}let h=this.trees[this._limitZoom(i)],c=h.range(bt(s),Mt(n),bt(a),Mt(o)),d=h.data,p=[];for(let f of c){let g=this.stride*f;p.push(d[g+ze]>1?Ol(d,g,this.clusterProps):this.points[d[g+Ne]])}return p}getChildren(e){let i=this._getOriginId(e),s=this._getOriginZoom(e),o="No cluster with the specified id.",a=this.trees[s];if(!a)throw new Error(o);let n=a.data;if(i*this.stride>=n.length)throw new Error(o);let h=this.options.radius/(this.options.extent*Math.pow(2,s-1)),c=n[i*this.stride],d=n[i*this.stride+1],p=a.within(c,d,h),f=[];for(let g of p){let u=g*this.stride;n[u+Xi]===e&&f.push(n[u+ze]>1?Ol(n,u,this.clusterProps):this.points[n[u+Ne]])}if(f.length===0)throw new Error(o);return f}getLeaves(e,i,s){i=i||10,s=s||0;let o=[];return this._appendLeaves(o,e,i,s,0),o}getTile(e,i,s){let o=this.trees[this._limitZoom(e)],a=Math.pow(2,e),{extent:n,radius:h}=this.options,c=h/n,d=(s-c)/a,p=(s+1+c)/a,f={features:[]};return this._addTileFeatures(o.range((i-c)/a,d,(i+1+c)/a,p),o.data,i,s,a,f),i===0&&this._addTileFeatures(o.range(1-c/a,d,1,p),o.data,a,s,a,f),i===a-1&&this._addTileFeatures(o.range(0,d,c/a,p),o.data,-1,s,a,f),f.features.length?f:null}getClusterExpansionZoom(e){let i=this._getOriginZoom(e)-1;for(;i<=this.options.maxZoom;){let s=this.getChildren(e);if(i++,s.length!==1)break;e=s[0].properties.cluster_id}return i}_appendLeaves(e,i,s,o,a){let n=this.getChildren(i);for(let h of n){let c=h.properties;if(c&&c.cluster?a+c.point_count<=o?a+=c.point_count:a=this._appendLeaves(e,c.cluster_id,s,o,a):a<o?a++:e.push(h),e.length===s)break}return a}_createTree(e){let i=new dt(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let s=0;s<e.length;s+=this.stride)i.add(e[s],e[s+1]);return i.finish(),i.data=e,i}_addTileFeatures(e,i,s,o,a,n){for(let h of e){let c=h*this.stride,d=i[c+ze]>1,p,f,g;if(d)p=zl(i,c,this.clusterProps),f=i[c],g=i[c+1];else{let T=this.points[i[c+Ne]];p=T.properties;let[w,P]=T.geometry.coordinates;f=bt(w),g=Mt(P)}let u={type:1,geometry:[[Math.round(this.options.extent*(f*a-s)),Math.round(this.options.extent*(g*a-o))]],tags:p},m;d||this.options.generateId?m=i[c+Ne]:m=this.points[i[c+Ne]].id,m!==void 0&&(u.id=m),n.features.push(u)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,i){let{radius:s,extent:o,reduce:a,minPoints:n}=this.options,h=s/(o*Math.pow(2,i)),c=e.data,d=[],p=this.stride;for(let f=0;f<c.length;f+=p){if(c[f+Ue]<=i)continue;c[f+Ue]=i;let g=c[f],u=c[f+1],m=e.within(c[f],c[f+1],h),T=c[f+ze],w=T;for(let P of m){let M=P*p;c[M+Ue]>i&&(w+=c[M+ze])}if(w>T&&w>=n){let P=g*T,M=u*T,L,S=-1,R=((f/p|0)<<5)+(i+1)+this.points.length;for(let B of m){let A=B*p;if(c[A+Ue]<=i)continue;c[A+Ue]=i;let O=c[A+ze];P+=c[A]*O,M+=c[A+1]*O,c[A+Xi]=R,a&&(L||(L=this._map(c,f,!0),S=this.clusterProps.length,this.clusterProps.push(L)),a(L,this._map(c,A)))}c[f+Xi]=R,d.push(P/w,M/w,1/0,R,-1,w),a&&d.push(S)}else{for(let P=0;P<p;P++)d.push(c[f+P]);if(w>1)for(let P of m){let M=P*p;if(!(c[M+Ue]<=i)){c[M+Ue]=i;for(let L=0;L<p;L++)d.push(c[M+L])}}}}return d}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,i,s){if(e[i+ze]>1){let n=this.clusterProps[e[i+kl]];return s?Object.assign({},n):n}let o=this.points[e[i+Ne]].properties,a=this.options.map(o);return s&&a===o?Object.assign({},a):a}};function Ol(l,e,i){return{type:"Feature",id:l[e+Ne],properties:zl(l,e,i),geometry:{type:"Point",coordinates:[um(l[e]),fm(l[e+1])]}}}function zl(l,e,i){let s=l[e+ze],o=s>=1e4?`${Math.round(s/1e3)}k`:s>=1e3?`${Math.round(s/100)/10}k`:s,a=l[e+kl],n=a===-1?{}:Object.assign({},i[a]);return Object.assign(n,{cluster:!0,cluster_id:l[e+Ne],point_count:s,point_count_abbreviated:o})}function bt(l){return l/360+.5}function Mt(l){let e=Math.sin(l*Math.PI/180),i=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return i<0?0:i>1?1:i}function um(l){return(l-.5)*360}function fm(l){let e=(180-l*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var Nl=new r.WebMercatorProjection,Ji=class{static transformCartesianToWGS84(e){if(e){let i=r.Ellipsoid.WGS84.cartesianToCartographic(e);return new X(r.Math.toDegrees((i==null?void 0:i.longitude)||0),r.Math.toDegrees((i==null?void 0:i.latitude)||0),i.height||0)}return new X(0,0)}static transformCartographicToWGS84(e){return e?new X(r.Math.toDegrees((e==null?void 0:e.longitude)||0),r.Math.toDegrees((e==null?void 0:e.latitude)||0),e.height||0):new X(0,0)}static transformWGS84ToCartesian(e){return e?r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,r.Ellipsoid.WGS84):r.Cartesian3.ZERO}static transformWGS84ToCartographic(e){return e?r.Cartographic.fromDegrees(e.lng,e.lat,e.alt):r.Cartographic.ZERO}static transformCartesianArrayToWGS84Array(e){return e?e.map(i=>this.transformCartesianToWGS84(i)):[]}static transformWGS84ArrayToCartesianArray(e){return e?e.map(i=>this.transformWGS84ToCartesian(i)):[]}static transformWGS84ToMercator(e){let i=Nl.project(r.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new X(i.x,i.y,i.z)}static transformMercatorToWGS84(e){let i=Nl.unproject(new r.Cartesian3(e.lng,e.lat,e.alt));return new X(r.Math.toDegrees(i.longitude),r.Math.toDegrees(i.latitude),i.height)}static transformWindowToWGS84(e,i){let s=i.scene,o;if(s.mode===r.SceneMode.SCENE3D){let a=s.camera.getPickRay(e);o=s.globe.pick(a,s)}else o=s.camera.pickEllipsoid(e,r.Ellipsoid.WGS84);return this.transformCartesianToWGS84(o)}static transformWGS84ToWindow(e,i){let s=i.scene;return r.SceneTransforms.worldToWindowCoordinates(s,this.transformWGS84ToCartesian(e))}},y=Ji;var At=52.35987755982988,ne=3.141592653589793,Fl=6378245,Wl=.006693421622965943,Qi=class{static BD09ToGCJ02(e,i){let s=+e-.0065,o=+i-.006,a=Math.sqrt(s*s+o*o)-2e-5*Math.sin(o*At),n=Math.atan2(o,s)-3e-6*Math.cos(s*At),h=a*Math.cos(n),c=a*Math.sin(n);return[h,c]}static GCJ02ToBD09(e,i){i=+i,e=+e;let s=Math.sqrt(e*e+i*i)+2e-5*Math.sin(i*At),o=Math.atan2(i,e)+3e-6*Math.cos(e*At),a=s*Math.cos(o)+.0065,n=s*Math.sin(o)+.006;return[a,n]}static WGS84ToGCJ02(e,i){if(i=+i,e=+e,this.out_of_china(e,i))return[e,i];{let s=this.delta(e,i);return[e+s[0],i+s[1]]}}static GCJ02ToWGS84(e,i){if(i=+i,e=+e,this.out_of_china(e,i))return[e,i];{let s=[e,i],o=this.WGS84ToGCJ02(e,i),a=o[0]-e,n=o[1]-i;do o=this.WGS84ToGCJ02(s[0]-=a,s[1]-=n),a=o[0]-e,n=o[1]-i;while(Math.abs(a)>1e-7||Math.abs(n)>1e-7);return s}}static delta(e,i){let s=this.transformLng(e-105,i-35),o=this.transformLat(e-105,i-35),a=i/180*ne,n=Math.sin(a);n=1-Wl*n*n;let h=Math.sqrt(n);return s=s*180/(Fl/h*Math.cos(a)*ne),o=o*180/(Fl*(1-Wl)/(n*h)*ne),[s,o]}static transformLng(e,i){i=+i,e=+e;let s=300+e+2*i+.1*e*e+.1*e*i+.1*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*ne)+20*Math.sin(2*e*ne))*2/3,s+=(20*Math.sin(e*ne)+40*Math.sin(e/3*ne))*2/3,s+=(150*Math.sin(e/12*ne)+300*Math.sin(e/30*ne))*2/3,s}static transformLat(e,i){i=+i,e=+e;let s=-100+2*e+3*i+.2*i*i+.1*e*i+.2*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*ne)+20*Math.sin(2*e*ne))*2/3,s+=(20*Math.sin(i*ne)+40*Math.sin(i/3*ne))*2/3,s+=(160*Math.sin(i/12*ne)+320*Math.sin(i*ne/30))*2/3,s}static out_of_china(e,i){return i=+i,e=+e,!(e>73.66&&e<135.05&&i>3.86&&i<53.55)}},xe=Qi;var Ki=class l{constructor(e,i,s,o,a,n){this._lng=+e||0,this._lat=+i||0,this._alt=+s||0,this._heading=+o||0,this._pitch=+a||0,this._roll=+n||0}get lng(){return this._lng}set lng(e){this._lng=+e}get lat(){return this._lat}set lat(e){this._lat=+e}get alt(){return this._alt}set alt(e){this._alt=+e}get heading(){return this._heading}set heading(e){this._heading=+e}get pitch(){return this._pitch}set pitch(e){this._pitch=+e}get roll(){return this._roll}set roll(e){this._roll=+e}static fromArray(e){let i=new l;return Array.isArray(e)&&(i.lng=e[0]||0,i.lat=e[1]||0,i.alt=e[2]||0,i.heading=e[3]||0,i.pitch=e[4]||0,i.roll=e[5]||0),i}static fromString(e){let i=new l;if(e&&typeof e=="string"){let s=e.split(",");i=this.fromArray(s)}return i}static fromObject(e){return new l(e.lng,e.lat,e.alt,e.heading,e.pitch,e.roll)}static deserialize(e){let i=new l,s=JSON.parse(e);return s&&(i.lng=s.lng||0,i.lat=s.lat||0,i.alt=s.alt||0,i.heading=s.heading||0,i.pitch=s.pitch||0,i.roll=s.roll||0),i}serialize(){let e=new l(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(e)}distance(e){return!e||!(e instanceof l)?0:r.Cartesian3.distance(y.transformWGS84ToCartesian(this),y.transformWGS84ToCartesian(e))}clone(){let e=new l;return e.lng=this.lng||0,e.lat=this.lat||0,e.alt=this.alt||0,e.heading=this.heading||0,e.pitch=this.pitch||0,e.roll=this.roll||0,e}copy(){return this.clone()}toArray(){return[this.lng,this.lat,this.alt,this.heading,this.pitch,this.roll]}toString(){return`${this.lng},${this.lat},${this.alt},${this.heading},${this.pitch},${this.roll}`}toObject(){return{lng:this.lng,lat:this.lat,alt:this.alt,heading:this.heading,pitch:this.pitch,roll:this.roll}}},X=Ki;var $i=class{static parsePosition(e){let i=new X;return e&&(typeof e=="string"?i=X.fromString(e):Array.isArray(e)?i=X.fromArray(e):!(Object(e)instanceof X)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat")?i=X.fromObject(e):Object(e)instanceof X?i=e:Object(e)instanceof r.Cartesian3?i=y.transformCartesianToWGS84(e):Object(e)instanceof r.Cartographic&&(i=y.transformCartographicToWGS84(e))),i}static parsePositions(e){if(typeof e=="string"){if(e.indexOf("#")>=0)throw new Error("the positions invalid");e=e.split(";").filter(i=>!!i)}return e.map(i=>this.parsePosition(i))}static parsePointCoordToArray(e){return e=this.parsePosition(e),[e.lng,e.lat]}static parsePolylineCoordToArray(e){let i=[];return e=this.parsePositions(e),e.forEach(s=>{i.push([s.lng,s.lat])}),i}static parsePolygonCoordToArray(e,i=!1){let s=[];return e=this.parsePositions(e),e.forEach(o=>{s.push([o.lng,o.lat])}),i&&s.length>0&&s.push(s[0]),[s]}},v=$i;var pt={ADD:"add",REMOVE:"remove"},St={LEFT_DOWN:r.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:r.ScreenSpaceEventType.LEFT_UP,CLICK:r.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:r.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:r.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:r.ScreenSpaceEventType.LEFT_DOUBLE_CLICK},H={...St,MOUSE_MOVE:r.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:r.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},Gl={...St,MOUSE_MOVE:r.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:r.ScreenSpaceEventType.WHEEL,ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect"},W={CAMERA_MOVE_END:"cameraMoveEnd",CAMERA_CHANGED:"cameraChanged",PRE_UPDATE:"preUpdate",POST_UPDATE:"postUpdate",PRE_RENDER:"preRender",POST_RENDER:"postRender",MORPH_COMPLETE:"morphComplete",CLOCK_TICK:"clockTick",RENDER_ERROR:"renderError"},Fe={...pt,...St,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate"},$e={READY:"ready",TEX_READY:"texturesReady"},se={INITIAL_TILES_LOADED:"initialTilesLoaded",ALL_TILES_LOADED:"allTilesLoaded ",LOAD_PROGRESS:"loadProgress ",TILE_FAILED:"tileFailed ",TILE_LOAD:"tileLoad",TILE_UNLOAD:"tileUnload",TILE_VISIBLE:"tileVisible"},We=pt,Ge={...pt,...St},me={...pt,POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"},ue={...pt,POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine"},b={DRAW_START:"drawStart",DRAW_STOP:"drawStop",EDIT_START:"editStart",EDIT_STOP:"editEnd",DRAW_ANCHOR:"drawAnchor",CREATE_ANCHOR:"createAnchor",UPDATE_ANCHOR:"updateAnchor",ANCHOR_MOVING:"anchorMoving",EDIT_ANCHOR_STOP:"editAnchorStop",DELETE_ANCHOR:"deleteAnchor",CLEAR_ANCHOR:"clearAnchor"};var er=class{constructor(e){this._types=e,this._cache={}}_on(e,i,s){let o=this.getEvent(e),a;return o&&i&&(a=o.addEventListener(i,s||this)),a}_off(e,i,s){let o=this.getEvent(e),a=!1;return o&&i&&(a=o.removeEventListener(i,s||this)),a}_fire(e,i){let s=this.getEvent(e);s&&s.raiseEvent(i)}_registerEvent(){Object.keys(this._types).forEach(e=>{let i=this._types[e];this._cache[i]=new r.Event})}on(e,i,s){return this._on(e,i,s)}once(e,i,s){let o=this._on(e,a=>{i(a),o&&o()},s)}off(e,i,s){return this._off(e,i,s)}fire(e,i){this._fire(e,i)}getEvent(e){return this._cache[e]||void 0}},$=er;var tr=class extends ${constructor(e,i={}){super(H),this._viewer=e,this._selected=void 0,this._enableEventPropagation=i.enableEventPropagation,this._enableMouseOver=i.enableMouseOver,this._enableMouseMovePick=i.enableMouseMovePick,this._registerEvent(),this._addDefaultEvent()}set enableEventPropagation(e){this._enableEventPropagation=e}get enableEventPropagation(){return this._enableEventPropagation}set enableMouseOver(e){this._enableMouseOver=e}get enableMouseOver(){return this._enableMouseOver}set enableMouseMovePick(e){this._enableMouseMovePick=e}get enableMouseMovePick(){return this._enableMouseMovePick}_registerEvent(){let e=new r.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(r.ScreenSpaceEventType).forEach(i=>{let s=r.ScreenSpaceEventType[i];this._cache[s]=new r.Event,e.setInputAction(o=>{this._cache[s].raiseEvent(o)},s)})}_addDefaultEvent(){this.on(this._types.LEFT_DOWN,this._leftDownHandler,this),this.on(this._types.LEFT_UP,this._leftUpHandler,this),this.on(this._types.CLICK,this._clickHandler,this),this.on(this._types.DB_CLICK,this._dbClickHandler,this),this.on(this._types.RIGHT_DOWN,this._rightDownHandler,this),this.on(this._types.RIGHT_UP,this._rightUpHandler,this),this.on(this._types.RIGHT_CLICK,this._rightClickHandler,this),this.on(this._types.MOUSE_MOVE,this._mouseMoveHandler,this),this.on(this._types.WHEEL,this._mouseWheelHandler,this)}_adjustPosition(e){let i=this._viewer.container.getBoundingClientRect(),s=this._viewer.container.offsetWidth/i.width,o=this._viewer.container.offsetHeight/i.height;return new r.Cartesian2(e.x*s,e.y*o)}_getMousePosition(e){let i=this._viewer.scene,s,o,a,n,h=c=>{if(!c)return;let d=r.Ellipsoid.WGS84.cartesianToCartographic(c);if(d)return{lng:r.Math.toDegrees(d.longitude),lat:r.Math.toDegrees(d.latitude),alt:d.height}};if(i.pickPositionSupported&&(s=i.pickPosition(e),o=h(s)),i.mode===r.SceneMode.SCENE3D&&!(this._viewer.terrainProvider instanceof r.EllipsoidTerrainProvider)){let c=i.camera.getPickRay(e);a=i.globe.pick(c,i)}else a=i.camera.pickEllipsoid(e,r.Ellipsoid.WGS84);return n=h(a),{windowPosition:e,position:s,wgs84Position:o,surfacePosition:a,wgs84SurfacePosition:n}}_getMouseInfo(e){return{...this._getMousePosition(this._adjustPosition(e)),target:this._viewer.scene.pick(this._adjustPosition(e))}}_getDrillInfos(e,i){var n;let s=[],a=this._viewer.scene.drillPick(e)||[];for(let h of a){let c=this._getTargetInfo(h);((n=c==null?void 0:c.overlay)==null?void 0:n.overlayId)!==i.overlayId&&s.push(c)}return s}_getTargetObject(e){let i=null,s=null;return(e==null?void 0:e.id)instanceof r.Entity?s=e.id:e instanceof r.Cesium3DTileFeature?(s=e.tileset,i=e):((e==null?void 0:e.primitive)instanceof r.Cesium3DTileset||e!=null&&e.primitive)&&(s=e.primitive),{overlayId:s==null?void 0:s.overlayId,layerId:s==null?void 0:s.layerId,object:s,feature:i}}_getTargetInfo(e){let{overlayId:i,layerId:s,feature:o}=this._getTargetObject(e),a=this._viewer.getLayers(),n=s?a.find(c=>c.layerId===s):null,h=i&&(n!=null&&n.getOverlay)?n.getOverlay(i):null;if(h&&(o!=null&&o.getPropertyNames)){let c=o.getPropertyNames()||[];for(let d of c)h.attr[d]=o.getProperty(d)}return{layer:n,overlay:h,feature:o,instanceId:e==null?void 0:e.instanceId}}_raiseEvent(e,i={}){var d;let s=this._getTargetInfo(i.target)||{},{overlay:o,layer:a}=s,n=(p,f)=>{if(!p||typeof p.getEvent!="function")return!1;let g=p.getEvent(e);return!g||g.numberOfListeners<=0?!1:(g.raiseEvent(f),!0)},h={...s,...i},c=n(o==null?void 0:o.overlayEvent,h);if(o!=null&&o.allowDrillPicking){let p=this._getDrillInfos(i.windowPosition,o)||[];for(let f of p){let g=f==null?void 0:f.overlay,u=f==null?void 0:f.layer,m={...f,...i};n(g.overlayEvent,m)||n(u==null?void 0:u.layerEvent,m)}}(!c||this._enableEventPropagation)&&(c=n(a==null?void 0:a.layerEvent,h)),(!c||this._enableEventPropagation)&&n((d=this._viewer)==null?void 0:d.viewerEvent,h)}_clickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(H.CLICK,this._getMouseInfo(e.position))}_dbClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(H.DB_CLICK,this._getMouseInfo(e.position))}_rightClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(H.RIGHT_CLICK,this._getMouseInfo(e.position))}_mouseMoveHandler(e){if(!(e!=null&&e.endPosition))return!1;if(this._enableMouseMovePick){let i=this._getMouseInfo(e.endPosition);this._viewer.canvas.style.cursor=i.target?"pointer":"default",this._raiseEvent(H.MOUSE_MOVE,i),this._enableMouseOver&&(!this._selected||this._getTargetObject(this._selected.target).overlayId!==this._getTargetObject(i.target).overlayId)&&(this._raiseEvent(H.MOUSE_OUT,this._selected),this._raiseEvent(H.MOUSE_OVER,i),this._selected=i)}else this._raiseEvent(H.MOUSE_MOVE,this._getMousePosition(this._adjustPosition(e.endPosition)))}_leftDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(H.LEFT_DOWN,this._getMouseInfo(e.position))}_leftUpHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(H.LEFT_UP,this._getMouseInfo(e.position))}_rightDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(H.RIGHT_DOWN,this._getMouseInfo(e.position))}_rightUpHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(H.RIGHT_UP,this._getMouseInfo(e.position))}_mouseWheelHandler(e){this._raiseEvent(H.WHEEL,{movement:e})}},ir=tr;var rr=class extends ${constructor(){super(Gl),this._registerEvent()}},sr=rr;var or=class extends ${constructor(e){super(W),this._camera=e.camera,this._scene=e.scene,this._clock=e.clock}on(e,i,s){let o;switch(e){case W.CAMERA_MOVE_END:o=this._camera.moveEnd.addEventListener(i,s||this);break;case W.CAMERA_CHANGED:o=this._camera.changed.addEventListener(i,s||this);break;case W.PRE_UPDATE:o=this._scene.preUpdate.addEventListener(i,s||this);break;case W.POST_UPDATE:o=this._scene.postUpdate.addEventListener(i,s||this);break;case W.PRE_RENDER:o=this._scene.preRender.addEventListener(i,s||this);break;case W.POST_RENDER:o=this._scene.postRender.addEventListener(i,s||this);break;case W.MORPH_COMPLETE:o=this._scene.morphComplete.addEventListener(i,s||this);break;case W.CLOCK_TICK:o=this._clock.onTick.addEventListener(i,s||this);break;case W.RENDER_ERROR:o=this._scene.renderError.addEventListener(i,s||this);break;default:break}return o}off(e,i,s){let o=!1;switch(e){case W.CAMERA_MOVE_END:o=this._camera.moveEnd.removeEventListener(i,s||this);break;case W.CAMERA_CHANGED:o=this._camera.changed.removeEventListener(i,s||this);break;case W.PRE_UPDATE:o=this._scene.preUpdate.removeEventListener(i,s||this);break;case W.POST_UPDATE:o=this._scene.postUpdate.removeEventListener(i,s||this);break;case W.PRE_RENDER:o=this._scene.preRender.removeEventListener(i,s||this);break;case W.POST_RENDER:o=this._scene.postRender.removeEventListener(i,s||this);break;case W.MORPH_COMPLETE:o=this._scene.morphComplete.removeEventListener(i,s||this);break;case W.CLOCK_TICK:o=this._clock.onTick.removeEventListener(i,s||this);break;case W.RENDER_ERROR:o=this._scene.renderError.removeEventListener(i,s||this);break;default:break}return o}},ar=or;var nr=class extends ${constructor(){super(We),this._registerEvent()}},lr=nr;var hr=class extends ${constructor(){super(Ge),this._registerEvent()}},cr=hr;var dr=class extends ${constructor(){super(Fe),this._registerEvent()}},pr=dr;var mr=class extends ${constructor(e){super(se),this._tileset=e}on(e,i,s){return this._tileset.then(o=>{switch(e){case se.INITIAL_TILES_LOADED:o.initialTilesLoaded.addEventListener(i,s||this);break;case se.ALL_TILES_LOADED:o.allTilesLoaded.addEventListener(i,s||this);break;case se.LOAD_PROGRESS:o.loadProgress.addEventListener(i,s||this);break;case se.TILE_FAILED:o.tileFailed.addEventListener(i,s||this);break;case se.TILE_LOAD:o.tileLoad.addEventListener(i,s||this);break;case se.TILE_UNLOAD:o.tileUnload.addEventListener(i,s||this);break;case se.TILE_VISIBLE:o.tileVisible.addEventListener(i,s||this);break;default:break}}),null}off(e,i,s){return this._tileset.then(o=>{switch(e){case se.INITIAL_TILES_LOADED:o.initialTilesLoaded.removeEventListener(i,s||this);break;case se.ALL_TILES_LOADED:o.allTilesLoaded.removeEventListener(i,s||this);break;case se.LOAD_PROGRESS:o.loadProgress.removeEventListener(i,s||this);break;case se.TILE_FAILED:o.tileFailed.removeEventListener(i,s||this);break;case se.TILE_LOAD:o.tileLoad.removeEventListener(i,s||this);break;case se.TILE_UNLOAD:o.tileUnload.removeEventListener(i,s||this);break;case se.TILE_VISIBLE:o.tileVisible.removeEventListener(i,s||this);break;default:break}}),!0}},ur=mr;var fr=class extends ${constructor(e){super($e),this._model=e}on(e,i,s){return this._model.then(o=>{switch(e){case $e.READY:o.readyEvent.addEventListener(i,s||this);break;case $e.TEX_READY:o.texturesReadyEvent.addEventListener(i,s||this);break;default:break}}),null}off(e,i,s){return this._model.then(o=>{switch(e){case $e.READY:o.readyEvent.removeEventListener(i,s||this);break;case $e.TEX_READY:o.texturesReadyEvent.removeEventListener(i,s||this);break;default:break}}),!0}},_r=fr;var gr=class extends ${constructor(){super(me),this._registerEvent()}},yr=gr;var vr=class extends ${constructor(){super(ue),this._registerEvent()}},wr=vr;var Cr=class extends ${constructor(){super(b),this._registerEvent()}},mt=Cr;/**
|
|
11
11
|
* 鼠标模式枚举
|
|
12
12
|
* 定义3D场景中鼠标交互的不同模式,控制相机的旋转和倾斜操作方式
|
|
13
13
|
*
|
|
@@ -35,7 +35,7 @@ var Su=Object.create;var Ki=Object.defineProperty;var Iu=Object.getOwnPropertyDe
|
|
|
35
35
|
* @property {number} LEFT_MIDDLE - 左键拖动,中键倾斜
|
|
36
36
|
* @license MIT
|
|
37
37
|
* @copyright © 2025 Company Name
|
|
38
|
-
*/var Hu={LEFT_RIGHT:0,LEFT_MIDDLE:1},we=Hu;var Wu="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),Ir=class{static uuid(e="D"){let i=[];i[8]=i[13]=i[18]=i[23]="-",i[14]="4";let s;for(let a=0;a<36;a++)i[a]||(s=0|Math.random()*16,i[a]=Wu[a===19?s&3|8:s]);return e+"-"+i.join("")}static merge(e,...i){let s,a,o,n;for(a=0,o=i.length;a<o;a++){n=i[a];for(s in n)e[s]=n[s]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,i){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let s in i)e.options[s]=i[s];return e.options}static formatNum(e,i){let s=Math.pow(10,i===void 0?6:i);return Math.round(e*s)/s}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static getStrLength(e){}static template(e,i,s=!1){return!e||typeof e!="string"?"":e.replace(/\{([^{}]+)\}/g,(a,o)=>{let n=o.trim();return i&&typeof i=="object"&&i.hasOwnProperty(n)?i[n]:s?"":a})}static emptyImageUrl(){return function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}()}static checkPosition(e){return e&&e.hasOwnProperty("_lng")&&e.hasOwnProperty("_lat")&&e.hasOwnProperty("_alt")}static debounce(e,i){let s=null;return function(){s&&clearTimeout(s),s=setTimeout(e,i)}}static throttle(e,i){let s=!0;return function(){if(!s)return!1;s=!1,setTimeout(()=>{e(),s=!0},i)}}static dataURLtoBlob(e){let i=e.split(","),s=i[0].match(/:(.*?);/)[1],a=atob(i[1]),o=a.length,n=new Uint8Array(o);for(;o--;)n[o]=a.charCodeAt(o);return new Blob([n],{type:s})}static isPromise(e){return Promise.resolve(e)===e}},T=Ir;var Lr=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,i){let s=e.style[i]||e.currentStyle&&e.currentStyle[i];if((!s||s==="auto")&&document.defaultView){let a=document.defaultView.getComputedStyle(e,null);s=a?a[i]:null}return s==="auto"?null:s}static create(e,i,s=null){let a=document.createElement(e);return a.className=i||"",s&&s.appendChild(a),a}static remove(e){let i=e.parentNode;i&&i.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,i){if(e.classList!==void 0)return e.classList.contains(i);let s=this.getClass(e);return s.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(s)}static addClass(e,i){if(e.classList!==void 0){let s=T.splitWords(i);for(let a=0,o=s.length;a<o;a++)e.classList.add(s[a])}else if(!this.hasClass(e,i)){let s=this.getClass(e);this.setClass(e,(s?s+" ":"")+i)}}static removeClass(e,i){e.classList!==void 0?e.classList.remove(i):this.setClass(e,T.trim((" "+this.getClass(e)+" ").replace(" "+i+" "," ")))}static setClass(e,i){e.className.baseVal===void 0?e.className=i:e.className.baseVal=i}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,i,s,a){let o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",i),o.setAttribute("viewBox",`0 0 ${e} ${i}`);let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",s),o.appendChild(n),a&&a.appendChild(o),o}static parseDom(e,i,s){i=i!=null?i:!1;let a=document.createElement("div");return a.className=s||"",a.innerHTML=e,i?a:a.childNodes}static enterFullscreen(e){e&&(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen())}static exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}static createVideo(e,i,s=null){let a=this.create("video",i,s),o=this.create("source","",a);o.setAttribute("src",e),o.setAttribute("type","video/map4");let n=this.create("source","",a);return n.setAttribute("src",e),n.setAttribute("type","video/quicktime"),a}},D=Lr;var Dr=Math.PI*2,It=100,Rr=1e-4,Or=class{static distance(e,i){return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}static wholeDistance(e){let i=0;for(let s=0;s<e.length-1;s++)i+=this.distance(e[s],e[s+1]);return i}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,i){return[(e[0]+i[0])/2,(e[1]+i[1])/2]}static getCircleCenterOfThreePoints(e,i,s){let a=[(e[0]+i[0])/2,(e[1]+i[1])/2],o=[a[0]-e[1]+i[1],a[1]+e[0]-i[0]],n=[(e[0]+s[0])/2,(e[1]+s[1])/2],h=[n[0]-e[1]+s[1],n[1]+e[0]-s[0]];return this.getIntersectPoint(a,o,n,h)}static getIntersectPoint(e,i,s,a){let o,n,h,c;return e[1]===i[1]?(h=(a[0]-s[0])/(a[1]-s[1]),o=h*(e[1]-s[1])+s[0],n=e[1],[o,n]):s[1]===a[1]?(c=(i[0]-e[0])/(i[1]-e[1]),o=c*(s[1]-e[1])+e[0],n=s[1],[o,n]):(c=(i[0]-e[0])/(i[1]-e[1]),h=(a[0]-s[0])/(a[1]-s[1]),n=(c*e[1]-e[0]-h*s[1]+s[0])/(c-h),o=c*n-c*e[1]+e[0],[o,n])}static getAzimuth(e,i){let s,a=Math.asin(Math.abs(i[1]-e[1])/this.distance(e,i));return i[1]>=e[1]&&i[0]>=e[0]?s=a+Math.PI:i[1]>=e[1]&&i[0]<e[0]?s=Dr-a:i[1]<e[1]&&i[0]<e[0]?s=a:i[1]<e[1]&&i[0]>=e[0]&&(s=Math.PI-a),s}static getAngleOfThreePoints(e,i,s){let a=this.getAzimuth(i,e)-this.getAzimuth(i,s);return a<0?a+Dr:a}static isClockWise(e,i,s){return(s[1]-e[1])*(i[0]-e[0])>(i[1]-e[1])*(s[0]-e[0])}static getPointOnLine(e,i,s){let a=i[0]+e*(s[0]-i[0]),o=i[1]+e*(s[1]-i[1]);return[a,o]}static getCubicValue(e,i,s,a,o){e=Math.max(Math.min(e,1),0);let n=1-e,h=e*e,c=h*e,d=n*n,p=d*n,f=p*i[0]+3*d*e*s[0]+3*n*h*a[0]+c*o[0],g=p*i[1]+3*d*e*s[1]+3*n*h*a[1]+c*o[1];return[f,g]}static getThirdPoint(e,i,s,a,o){let n=this.getAzimuth(e,i),h=o?n+s:n-s,c=a*Math.cos(h),d=a*Math.sin(h);return[i[0]+c,i[1]+d]}static getArcPoints(e,i,s,a){let o,n,h=[],c=a-s;c=c<0?c+Dr:c;for(let d=0;d<=It;d++){let p=s+c*d/It;o=e[0]+i*Math.cos(p),n=e[1]+i*Math.sin(p),h.push([o,n])}return h}static getBisectorNormals(e,i,s,a){let o=this.getNormal(i,s,a),n=Math.sqrt(o[0]*o[0]+o[1]*o[1]),h=o[0]/n,c=o[1]/n,d=this.distance(i,s),p=this.distance(s,a),f,g,u,m,E;return n>Rr?this.isClockWise(i,s,a)?(f=e*d,g=s[0]-f*c,u=s[1]+f*h,E=[g,u],f=e*p,g=s[0]+f*c,u=s[1]-f*h,m=[g,u]):(f=e*d,g=s[0]+f*c,u=s[1]-f*h,E=[g,u],f=e*p,g=s[0]-f*c,u=s[1]+f*h,m=[g,u]):(g=s[0]+e*(i[0]-s[0]),u=s[1]+e*(i[1]-s[1]),E=[g,u],g=s[0]+e*(a[0]-s[0]),u=s[1]+e*(a[1]-s[1]),m=[g,u]),[E,m]}static getNormal(e,i,s){let a=e[0]-i[0],o=e[1]-i[1],n=Math.sqrt(a*a+o*o);a/=n,o/=n;let h=s[0]-i[0],c=s[1]-i[1],d=Math.sqrt(h*h+c*c);h/=d,c/=d;let p=a+h,f=o+c;return[p,f]}static getCurvePoints(e,i){let a=[this.getLeftMostControlPoint(e,i)],o,n,h,c;for(let f=0;f<i.length-2;f++)o=i[f],n=i[f+1],h=i[f+2],c=this.getBisectorNormals(e,o,n,h),a=a.concat(c);let d=this.getRightMostControlPoint(e,i);a.push(d);let p=[];for(let f=0;f<i.length-1;f++){o=i[f],n=i[f+1],p.push(o);for(let g=0;g<It;g++){let u=this.getCubicValue(g/It,o,a[f*2],a[f*2+1],n);p.push(u)}p.push(n)}return p}static getLeftMostControlPoint(e,i){let s=i[0],a=i[1],o=i[2],h=this.getBisectorNormals(0,s,a,o)[0],c=this.getNormal(s,a,o),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p,f;if(d>Rr){let g=this.mid(s,a),u=s[0]-g[0],m=s[1]-g[1],w=2/this.distance(s,a),P=-w*m,b=w*u,L=P*P-b*b,S=2*P*b,R=b*b-P*P,W=h[0]-g[0],A=h[1]-g[1];p=g[0]+L*W+S*A,f=g[1]+S*W+R*A}else p=s[0]+e*(a[0]-s[0]),f=s[1]+e*(a[1]-s[1]);return[p,f]}static getRightMostControlPoint(e,i){let s=i.length,a=i[s-3],o=i[s-2],n=i[s-1],c=this.getBisectorNormals(0,a,o,n)[1],d=this.getNormal(a,o,n),p=Math.sqrt(d[0]*d[0]+d[1]*d[1]),f,g;if(p>Rr){let u=this.mid(o,n),m=n[0]-u[0],E=n[1]-u[1],P=2/this.distance(o,n),b=-P*E,L=P*m,S=b*b-L*L,R=2*b*L,W=L*L-b*b,A=c[0]-u[0],O=c[1]-u[1];f=u[0]+S*A+R*O,g=u[1]+R*A+W*O}else f=n[0]+e*(o[0]-n[0]),g=n[1]+e*(o[1]-n[1]);return[f,g]}static getBezierPoints(e){if(e.length<=2)return e;let i=[],s=e.length-1;for(let a=0;a<=1;a+=.01){let o=0,n=0;for(let h=0;h<=s;h++){let c=this.getBinomialFactor(s,h),d=Math.pow(a,h),p=Math.pow(1-a,s-h);o+=c*d*p*e[h][0],n+=c*d*p*e[h][1]}i.push([o,n])}return i.push(e[s]),i}static getBinomialFactor(e,i){return this.getFactorial(e)/(this.getFactorial(i)*this.getFactorial(e-i))}static getFactorial(e){if(e<=1)return 1;if(e===2)return 2;if(e===3)return 6;if(e===4)return 24;if(e===5)return 120;let i=1;for(let s=1;s<=e;s++)i*=s;return i}static getQBSplinePoints(e){if(e.length<=2)return e;let i=2,s=[],a=e.length-i-1;s.push(e[0]);for(let o=0;o<=a;o++)for(let n=0;n<=1;n+=.05){let h=0,c=0;for(let d=0;d<=i;d++){let p=this.getQuadricBSplineFactor(d,n);h+=p*e[o+d][0],c+=p*e[o+d][1]}s.push([h,c])}return s.push(e[e.length-1]),s}static getQuadricBSplineFactor(e,i){return e===0?Math.pow(i-1,2)/2:e===1?(-2*Math.pow(i,2)+2*i+1)/2:e===2?Math.pow(i,2)/2:0}},C=Or;var Bu=!0;function Lt(...l){console.warn(...l)}function je(...l){Bu&&console.error(...l)}var kr=class l{static getTransFun(e,i){if(!e||!i||(e=l.crsName2FunName(e),i=l.crsName2FunName(i),i===e))return!1;let s=e+"2"+i;return yt[s]?yt[s]:!1}static crsName2FunName(e){switch(e){case"GCJ02":return"gcj";case"BD09":return"bd";case"WGS84":default:return"wgs"}}static getPositionValue(e,i=r.JulianDate.now()){if(!e)return e;let s;return e instanceof r.Cartesian3?s=e:e._value&&e._value instanceof r.Cartesian3?s=e._value:typeof e.getValue=="function"&&(s=e.getValue(i||r.JulianDate.now())),s}static getMaxHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=U.parse(e[s]);s===0&&(i=a.alt),a.alt>i&&(i=a.alt)}return T.formatNum(i,U.FormatAltLength)}static getMinHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let a=r.Cartographic.fromCartesian(e[s]);(s===0||a.height<i)&&(i=a.height)}return T.formatNum(i,U.FormatAltLength)}static addPositionsHeight(e,i=0){if(i=Number(i),isNaN(i)||i===0)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,o.height+i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,s.height+i)}}static setPositionsHeight(e,i=0){if(!e)return e;if(Array.isArray(e)){let s=[];for(let a=0;a<e.length;a++){let o=r.Cartographic.fromCartesian(e[a]),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,i)}}static getHeight(e,i,s={}){var n;let a=U.toCartographic(i),o;if(e.getHeight?o=e.getHeight(a,s?s.heightReference:0):o=e.globe.getHeight(a),r.defined(o)&&o>((n=s?s.min:0)!=null?n:-999))return o;if(s&&s.original)return a.height}static pick3DTileset(e,i){if(!i)return null;i instanceof r.Cartesian3&&(i=[i]);for(let s=0,a=i.length;s<a;++s){let o=i[s],n=r.SceneTransforms.worldToWindowCoordinates(e,o);if(!r.defined(n))continue;let h=e.pick(n,10,10);if(r.defined(h)&&r.defined(h.primitive)&&h.primitive instanceof r.Cesium3DTileset)return h.primitive}return null}static getSurfaceHeight(e,i,s={}){return s.scene=e,s.position=i,new Dt(s).start()}static getSurfaceTerrainHeight(e,i){let s={scene:e,position:i,has3dtiles:!1};return new Dt(s).start()}static getSurfacePosition(e,i,s={}){var n;if(!i)return i;let a=U.toCartographic(i),o=l.getHeight(e,a,s);return!r.defined(o)||((n=s.greater)==null||n)&&o<a.height?i:(r.defined(s.maxHeight)&&(o=Math.min(o,s.maxHeight)),(s.heightReference===r.HeightReference.RELATIVE_TO_GROUND||s.heightReference===r.HeightReference.RELATIVE_TO_TERRAIN||s.heightReference===r.HeightReference.RELATIVE_TO_3D_TILE)&&(a.height+=o),r.Cartesian3.fromRadians(a.longitude,a.latitude,o))}static getCurrentMousePosition(e,i,s){let a;if(e.onlyVertexPosition){if(!e.vertexAdsorption)return e.vertexAdsorption=new VertexAdsorption(e),a=e.vertexAdsorption.pick(i,16,16),a}else e.vertexAdsorption&&e.vertexAdsorption.clear();let o;try{o=e.pick(i,5,5)}catch(n){Lt("getCurrentMousePosition: scene.pick \u62FE\u53D6\u65F6\u5F02\u5E38",n)}if(e.resultSupported&&!e.onlyPickTerrainPosition&&r.defined(o)){let n=l.hasPickedModel(o,s);if(n){if((n.billboard||n.point||n.label)&&!n.ellipse&&!n.model&&!n.ellipsoid)return l.getPositionValue(n.position);if(n.show){if(n.show=!1,e.requestRender(),a=l.getCurrentMousePosition(e,i,s),n.show=!0,a)return a;if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}if(!e.globe.show&&(a=l._geetTargetMousePosition(e,i,o),r.defined(a)))return a}else{if(r.defined(o.id)){let h=o.id;if((h.billboard||h.point||h.label)&&!h.ellipse&&!h.model&&!h.ellipsoid)return l.getPositionValue(h.position)}if(a=l._geetTargetMousePosition(e,i,o),r.defined(a))return a}}if(!e.onlyPickTerrainPosition&&e.onlyPickModelPosition)return a;if(e.mode===r.SceneMode.SCENE3D){let n=e.camera.getPickRay(i);a=e.globe.pick(n,e),!a&&(a=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else a=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return r.defined(a)&&e.camera.positionCartographic.height<1e4&&r.Cartographic.fromCartesian(a).height<-5e3?null:a}static _geetTargetMousePosition(e,i,s){let a=e.result(i);if(r.defined(a)){let o=r.Cartographic.fromCartesian(a);if(o.height>=0||!r.defined(s?s.id:0)&&o.height>=-5e3)return a}}static hasPickedModel(e,i){if(r.defined(e.id)){let s=e.id;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.primitive)){let s=e.primitive;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.tileset)){let s=e.tileset;if(s._noMousePick||i&&s===i)return s}return null}static getCurrentMouseTerrainPosition(e,i){let s;if(e.mode===r.SceneMode.SCENE3D){let a=e.camera.getPickRay(i);s=e.globe.pick(a,e),s||(s=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else s=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return s}static getMidpoint(e,i,s=.5){if(!i||!e)return;let a=U.toCartographic(e),o=U.toCartographic(i),n=(a.height+o.height)/2,h=new r.EllipsoidGeodesic(a,o).interpolateUsingFraction(s);return r.Cartesian3.fromRadians(h.longitude,h.latitude,n)}static isRepeatPoint(e,i){return!i||!e?!1:Math.abs(e.x-i.x)<.1&&Math.abs(e.y-i.y)<.1&&Math.abs(e.z-i.z)<.1}static getRotateCenterPoint(e,i,s){let a=r.Cartographic.fromCartesian(e);a.height=0;let o=r.Cartographic.toCartesian(a),n=r.Cartesian3.subtract(o,e,new r.Cartesian3);n=r.Cartesian3.normalize(n,new r.Cartesian3);let h=r.Quaternion.fromAxisAngle(n,r.Math.toRadians(s)),c=r.Matrix3.fromQuaternion(h),d=r.Matrix4.fromRotationTranslation(c),p=r.Cartesian3.subtract(i,e,new r.Cartesian3),f=r.Matrix4.multiplyByPoint(d,p,new r.Cartesian3);return r.Cartesian3.add(f,e,new r.Cartesian3)}static getOnLinePointByLen(e,i,s,a){let o=r.Transforms.eastNorthUpToFixedFrame(e),n=r.Matrix4.inverse(o,new r.Matrix4);e=r.Matrix4.multiplyByPoint(n,e,new r.Cartesian3),i=r.Matrix4.multiplyByPoint(n,i,new r.Cartesian3);let h=r.Cartesian3.subtract(i,e,new r.Cartesian3),c=r.Cartesian3.distance(e,i),d=s/c;a&&(d+=1);let p=r.Cartesian3.multiplyByScalar(h,d,new r.Cartesian3);return r.Matrix4.multiplyByPoint(o,p,new r.Cartesian3)}static getPositionByHprAndOffset(e,i,s,a,o){e=U.toCartesian(e),!s&&(s=new r.HeadingPitchRoll);let n=r.Transforms.headingPitchRollQuaternion(e,s,a,o),h=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(n,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(h,i,new r.Cartesian3)}static getPositionByDirectionAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.eastNorthUpToFixedFrame(e),o=r.Matrix3.fromRotationZ(r.Math.toRadians(360-(i||0))),n=r.Matrix4.fromRotationTranslation(o);return r.Matrix4.multiply(a,n,a),r.Matrix4.multiplyByPoint(a,new r.Cartesian3(s,0,0),new r.Cartesian3)}static getPositionByHprAndLen(e,i,s){e=U.toCartesian(e);let a=r.Transforms.headingPitchRollQuaternion(e,i),o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(a,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(o,new r.Cartesian3(0,0,-s),new r.Cartesian3)}static getRayEarthPosition(e,i,s,a,o){if(!e||!i)return;i instanceof r.HeadingPitchRoll&&(i=r.Transforms.headingPitchRollQuaternion(e,i,a,o));let n=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getRayEarthPositionByMatrix(n,s,a)}static getRayEarthPositionByMatrix(e,i,s){let a=new r.Cartesian3,o=new r.Ray;r.Matrix4.multiplyByPoint(e,r.Cartesian3.ZERO,a),a.clone(o.origin);let n=new r.Cartesian3(0,0,i?-100:100);return l.extend2Earth(n,e,o,s)}extend2Earth(e,i,s,a){a=a||r.Ellipsoid.WGS84;let o=r.Matrix4.multiplyByPoint(i,e,new r.Cartesian3);r.Cartesian3.subtract(o,s.origin,s.direction),r.Cartesian3.normalize(s.direction,s.direction);let n=r.IntersectionTests.rayEllipsoid(s,a);if(!n)return;let h=n.start>0?n.start:n.stop,c=r.Ray.getPoint(s,h,new r.Cartesian3);if(c)try{r.Cartographic.fromCartesian(c,null,new r.Cartographic)}catch{return}return c}static getHeadingPitchRollByOrientation(e,i,s,a){if(!r.defined(i)||!r.defined(e))return new r.HeadingPitchRoll;let o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getHeadingPitchRollByMatrix(o,s,a)}static getHeadingPitchRollByMatrix(e,i,s,a){return r.Transforms.fixedFrameToHeadingPitchRoll(e,i,s,a)}static getHeadingPitchRollForLine(e,i,s){e=U.toCartesian(e),i=U.toCartesian(i);let a=r.Ellipsoid.WGS84,o=new r.Cartesian3,n=new r.Matrix4,h=new r.Matrix3,c=r.Cartesian3.normalize(r.Cartesian3.subtract(i,e,o),o);r.Transforms.rotationMatrixFromPositionVelocity(e,c,a,h);let d=r.Matrix4.fromRotationTranslation(h,e,n);return s?r.Matrix4.multiplyTransformation(d,r.Axis.Z_UP_TO_X_UP,d):r.Matrix4.multiplyTransformation(d,r.Axis.X_UP_TO_Z_UP,d),r.Transforms.fixedFrameToHeadingPitchRoll(d,a)}static getReflectVector(e,i){let s=i.clone(),a=e.clone(),o=2*r.Cartesian3.dot(e,i);return r.Cartesian3.multiplyByScalar(i,o,s),r.Cartesian3.subtract(e,s,a)}static getPropertyIndex(e,i,s){let a=e&&e.property,o=a&&a.times,n=o.length;if(n===0)return{index:0};let h,c=r.Cartesian3,d=a.values,p=r.binarySearch(o,i,r.JulianDate.compare);if(p<0){if(p=~p,p===0){let A=o[p];if(h=a.backwardExtrapolationDuration,a.backwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(A,i)>h)return{index:p};if(a.backwardExtrapolationType===r.ExtrapolationType.HOLD)return{position:c.unpack(d,0,s),index:p}}if(p>=n){p=n-1;let A=o[p];if(h=a.forwardExtrapolationDuration,a.forwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(i,A)>h)return{index:p};if(a.forwardExtrapolationType===r.ExtrapolationType.HOLD)return p=n-1,{position:c.unpack(d,p*c.packedLength,s),index:p}}let f=a.xTable,g=a.yTable,u=a.interpolationAlgorithm,m=a.packedInterpolationLength,E=a.inputOrder;if(a.updateTableLength){a.updateTableLength=!1;let A=Math.min(u.getRequiredDataPoints(a.interpolationDegree,E),n);A!==a.numberOfPoints&&(a._numberOfPoints=A,f.length=A,g.length=A*m)}let w=a.numberOfPoints-1;if(w<1)return p=0,{index:p};let P=0,b=n-1;if(b-P+1>=w+1){let A=p-(w/2|0)-1;A<P&&(A=P);let O=A+w;O>b&&(O=b,A=O-w,A<P&&(A=P)),P=A,b=O}let S=b-P+1;for(let A=0;A<S;++A)f[A]=r.JulianDate.secondsDifference(o[P+A],o[j]);if(r.defined(c.convertPackedArrayForInterpolation))c.convertPackedArrayForInterpolation(d,P,b,g);else{let A=0,O=a.packedLength,F=P*O,N=(b+1)*O;for(;F<N;)g[A]=d[F],F++,A++}let R=r.JulianDate.secondsDifference(i,o[b]),W;if(E===0||!r.defined(u.interpolate))W=u.interpolateOrderZero(R,f,g,m,a.interpolationResult);else{let A=Math.floor(m/(E+1));W=u.interpolate(R,f,g,A,E,E,a.interpolationResult)}p=P;for(let A=P;A<=b;A++)if(r.JulianDate.compare(i,o[A])<=0){p=A-1;break}return r.defined(c.unpackInterpolationResult)?{position:c.unpackInterpolationResult(W,d,P,b,s),index:p}:{position:c.unpack(W,0,s),index:p}}return{position:c.unpack(d,p*a.packedLength,s),index:p}}},Se=kr;var Nr=class l{static degree2dms(e){let i=1;e<0&&(i=-1),e=Math.abs(e);let s=Math.floor(e),a=Math.floor((e-s)*60),o=Math.round((e-s)*3600%60);return o===60&&(a+=1,o=0),a===60&&(s+=1,a=0),s*=i,{degree:s,minute:a,second:o,str:s+"\xB0 "+a+"' "+o+'"'}}static dms2degree(e,i,s){let a=Math.abs(e)+i/60+s/3600;return e<0&&(a*=-1),a}static getCGCS2000EPSGByLng(e,i,s=!0){let a;if(i){let o=parseInt(e/6)+1;if(o<13||o>23)return;s?a=o+4478:a=o+4489}else{let o=parseInt((e-1.5)/3)+1;if(o<25||o>45)return;s?a=o+4488:a=o+4509}return"EPSG:"+a}static getCGCS2000EPSGByX(e){let i=parseInt(e.toString().slice(0,2));return i>=13&&i<=23?"EPSG:"+(i+4478):i>=25&&i<=45?"EPSG:"+(i+4488):void 0}static cartesian2lonlat(e,i){return U.toArray(e,i)}static cartesians2lonlats(e,i){return $e.toArray(e,i)}static cartesian2mercator(e){return e?U.fromCartesian(e).toMercator():null}static cartesians2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.cartesian2mercator(e[s]);a&&i.push(a)}return i}static lonlat2cartesian(e,i=0){return!e||e.length<2?null:r.Cartesian3.fromDegrees(e[0],e[1],e[2]||i)}static lonlats2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=e[a];if(Array.isArray(o[0])){let n=l.lonlats2cartesians(o,i);n&&n.length>0&&s.push(n)}else{let n=l.lonlat2cartesian(o,i);n&&s.push(n)}}return s}static lonlat2mercator(e){return U.fromArray(e).toMercator()}static lonlats2mercators(e){let i=[];for(let s=0;s<e.length;s++){let a=l.lonlat2mercator(e[s]);i.push(a)}return i}static mercator2cartesian(e,i){if(isNaN(e[0])||isNaN(e[1]))return null;let s=U.fromMercator(e);return r.defined(i)&&(s.alt=i),s.toCartesian()}static mercators2cartesians(e,i){let s=[];for(let a=0;a<e.length;a++){let o=l.mercator2cartesian(e[a],i);o&&s.push(o)}return s}static mercator2lonlat(e){return U.fromMercator(e).toArray()}static mercators2lonlats(e){let i=[];for(let s=0;s<e.length;s++){let a=l.mercator2lonlat(e[s]);i.push(a)}return i}static bd2gcj(e){let i=Number(e[0]),s=Number(e[1]),a=i-.0065,o=s-.006,n=Math.sqrt(a*a+o*o)-2e-5*Math.sin(o*52.35987755982988),h=Math.atan2(o,a)-3e-6*Math.cos(a*52.35987755982988),c=n*Math.cos(h),d=n*Math.sin(h);return c=Number(c.toFixed(6)),d=Number(d.toFixed(6)),[c,d]}static gcj2bd(e){let i=Number(e[0]),s=Number(e[1]),a=Math.sqrt(i*i+s*s)+2e-5*Math.sin(s*52.35987755982988),o=Math.atan2(s,i)+3e-6*Math.cos(i*52.35987755982988),n=a*Math.cos(o)+.0065,h=a*Math.sin(o)+.006;return n=Number(n.toFixed(6)),h=Number(h.toFixed(6)),[n,h]}static wgs2gcj(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=s+a,p=i+o;return p=Number(p.toFixed(6)),d=Number(d.toFixed(6)),[p,d]}}static transformlat(e,i){let s=-100+2*e+3*i+.2*i*i+.1*e*i+.2*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(i*Math.PI)+40*Math.sin(i/3*Math.PI))*2/3,s+=(160*Math.sin(i/12*Math.PI)+320*Math.sin(i*Math.PI/30))*2/3,s}static transformlng(e,i){let s=300+e+2*i+.1*e*e+.1*e*i+.1*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))*2/3,s+=(150*Math.sin(e/12*Math.PI)+300*Math.sin(e/30*Math.PI))*2/3,s}static out_of_china(e,i){return e<72.004||e>137.8347||i<.8293||i>55.8271||!1}static gcj2wgs(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let a=l.transformlat(i-105,s-35),o=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);a=a*180/(6335552717000426e-9/(h*c)*Math.PI),o=o*180/(6378245/c*Math.cos(n)*Math.PI);let d=i*2-(i+o),p=s*2-(s+a);return d=Number(d.toFixed(6)),p=Number(p.toFixed(6)),[d,p]}}static bd2wgs(e){return l.gcj2wgs(l.bd2gcj(e))}static wgs2bd(e){return l.gcj2bd(l.wgs2gcj(e))}},yt=Nr;var zr=class{static getViewPosition(e,i){e=v.parsePosition(e);let s=r.Math.toRadians(e.heading),a=r.Math.toRadians(e.pitch),o=a>=0?i*Math.sin(a):-1*i*Math.sin(Math.abs(a)),n=i*Math.cos(a),h,c;s<=Math.PI/2?(h=n*Math.sin(s),c=n*Math.cos(s)):s>Math.PI/2&&s<Math.PI?(h=n*Math.cos(s-Math.PI/2),c=-1*n*Math.sin(s-Math.PI/2)):s>Math.PI&&s<Math.PI*3/2?(h=-1*n*Math.sin(s-Math.PI),c=-1*n*Math.cos(s-Math.PI)):(h=-1*n*Math.sin(Math.PI*2-s),c=n*Math.cos(Math.PI*2-s));let d=r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),p=Math.sin(r.Math.toRadians(e.lng)),f=Math.cos(r.Math.toRadians(e.lng)),g=Math.sin(r.Math.toRadians(e.lat)),u=Math.cos(r.Math.toRadians(e.lat)),m=u*o-g*c;return new r.Cartesian3(d.x+(f*m-p*h),d.y+(p*m+f*h),d.z+(g*o+u*c))}static getCameraOrientation(e){let i=new r.Matrix3;return r.Matrix3.setColumn(i,0,r.Cartesian3.negate(e.rightWC,new r.Cartesian3),i),r.Matrix3.setColumn(i,1,e.upWC,i),r.Matrix3.setColumn(i,2,e.directionWC,i),r.Quaternion.fromRotationMatrix(i,new r.Quaternion)}static setCamera(e,i,s,a){e.position=i,e.direction=r.Cartesian3.normalize(r.Cartesian3.subtract(s,i,new r.Cartesian3),new r.Cartesian3);let o=new r.Matrix3;r.Matrix3.fromRotationY(-r.Math.toRadians(a)/2,o);let n=new r.Cartesian3;r.Matrix3.multiplyByVector(o,i,n),r.Cartesian3.normalize(n,n),e.up=n}},he=zr;var Fr=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,i,s;return this._viewer.delegate.shadows=(i=(e=this._options)==null?void 0:e.shadows)!=null?i:!1,this._viewer.delegate.resolutionScale=((s=this._options)==null?void 0:s.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var i,s,a,o;let e=this._viewer.scene;return e.skyAtmosphere.show=(i=this._options.showAtmosphere)!=null?i:!0,e.sun.show=(s=this._options.showSun)!=null?s:!0,e.moon.show=(a=this._options.showMoon)!=null?a:!0,e.postProcessStages.fxaa.enabled=(o=this._options.enableFxaa)!=null?o:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var i;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof r.SkyBox)this._viewer.scene.skyBox=e;else{let s=this._viewer.scene.skyBox;s.show=(i=e.show)!=null?i:!0,e.offsetAngle&&(s.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(s.sources=e.sources)}return this}_setGlobeOption(){var s,a,o,n,h,c,d,p,f,g,u,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,i=this._options.globe;if(T.merge(e,{show:(s=i==null?void 0:i.show)!=null?s:!0,showGroundAtmosphere:(a=i==null?void 0:i.showGroundAtmosphere)!=null?a:!0,enableLighting:(o=i==null?void 0:i.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(n=i==null?void 0:i.depthTestAgainstTerrain)!=null?n:!1,tileCacheSize:+(i==null?void 0:i.tileCacheSize)||100,preloadSiblings:(h=i==null?void 0:i.preloadSiblings)!=null?h:!1,showSkirts:(c=i==null?void 0:i.showSkirts)!=null?c:!0,baseColor:(i==null?void 0:i.baseColor)||new r.Color(0,0,.5,1),terrainExaggeration:(i==null?void 0:i.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(i==null?void 0:i.terrainExaggerationRelativeHeight)||0}),T.merge(e.translucency,{enabled:(p=(d=i==null?void 0:i.translucency)==null?void 0:d.enabled)!=null?p:!1,backFaceAlpha:+((f=i==null?void 0:i.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(g=i==null?void 0:i.translucency)==null?void 0:g.backFaceAlphaByDistance,frontFaceAlpha:+((u=i==null?void 0:i.translucency)==null?void 0:u.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=i==null?void 0:i.translucency)==null?void 0:m.frontFaceAlphaByDistance}),i!=null&&i.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,w=E.sources.pop();E.sources.push(w.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${i.filterColor.toString()};`))}return this}_setCameraController(){var s,a,o,n,h,c,d;if(!((s=this._options)!=null&&s.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,i=this._options.cameraController;return T.merge(e,{enableInputs:(a=i==null?void 0:i.enableInputs)!=null?a:!0,enableRotate:(o=i==null?void 0:i.enableRotate)!=null?o:!0,enableTilt:(n=i==null?void 0:i.enableTilt)!=null?n:!0,enableTranslate:(h=i==null?void 0:i.enableTranslate)!=null?h:!0,enableZoom:(c=i==null?void 0:i.enableZoom)!=null?c:!0,enableCollisionDetection:(d=i==null?void 0:i.enableCollisionDetection)!=null?d:!0,minimumZoomDistance:+(i==null?void 0:i.minimumZoomDistance)||1,maximumZoomDistance:+(i==null?void 0:i.maximumZoomDistance)||40489014}),this}setOptions(e){return Object.keys(e).length===0?this:(this._options={...this._options,...e},this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController(),this)}},Gr=Fr;var Hr=class{constructor(e){this._viewer=e,this._mouseMode=we.LEFT_RIGHT}setPitchRange(e,i){let s=new r.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===r.SceneMode.SCENE3D&&(s.setInputAction(a=>{s.setInputAction(o=>{let n=!0,h=o.endPosition.y<o.startPosition.y;h&&this._viewer.camera.pitch>r.Math.toRadians(i)||!h&&this._viewer.camera.pitch<r.Math.toRadians(e)?n=!1:n=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=n},r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN),s.setInputAction(a=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,s.removeInputAction(r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_UP:r.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||we.LEFT_RIGHT,e===we.LEFT_MIDDLE?(console.log("\u5207\u6362\u9F20\u6807\u6A21\u5F0F\u4E3A\uFF1A\u5DE6\u952E+\u4E2D\u952E"),this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.MIDDLE_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.WHEEL,r.CameraEventType.PINCH]):e===we.LEFT_RIGHT&&(console.log("\u5207\u6362\u9F20\u6807\u6A21\u5F0F\u4E3A\uFF1A\u5DE6\u952E+\u53F3\u952E"),this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.WHEEL,r.CameraEventType.PINCH,{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}])}},Wr=Hr;/**
|
|
38
|
+
*/var _m={LEFT_RIGHT:0,LEFT_MIDDLE:1},ye=_m;var gm="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),xr=class{static uuid(e="D"){let i=[];i[8]=i[13]=i[18]=i[23]="-",i[14]="4";let s;for(let o=0;o<36;o++)i[o]||(s=0|Math.random()*16,i[o]=gm[o===19?s&3|8:s]);return e+"-"+i.join("")}static merge(e,...i){let s,o,a,n;for(o=0,a=i.length;o<a;o++){n=i[o];for(s in n)e[s]=n[s]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,i){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let s in i)e.options[s]=i[s];return e.options}static formatNum(e,i){let s=Math.pow(10,i===void 0?6:i);return Math.round(e*s)/s}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}static getStrLength(e){}static template(e,i,s=!1){return!e||typeof e!="string"?"":e.replace(/\{([^{}]+)\}/g,(o,a)=>{let n=a.trim();return i&&typeof i=="object"&&i.hasOwnProperty(n)?i[n]:s?"":o})}static emptyImageUrl(){return function(){return"data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs="}()}static checkPosition(e){return e&&e.hasOwnProperty("_lng")&&e.hasOwnProperty("_lat")&&e.hasOwnProperty("_alt")}static debounce(e,i){let s=null;return function(){s&&clearTimeout(s),s=setTimeout(e,i)}}static throttle(e,i){let s=!0;return function(){if(!s)return!1;s=!1,setTimeout(()=>{e(),s=!0},i)}}static dataURLtoBlob(e){let i=e.split(","),s=i[0].match(/:(.*?);/)[1],o=atob(i[1]),a=o.length,n=new Uint8Array(a);for(;a--;)n[a]=o.charCodeAt(a);return new Blob([n],{type:s})}static isPromise(e){return Promise.resolve(e)===e}},x=xr;var Tr=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,i){let s=e.style[i]||e.currentStyle&&e.currentStyle[i];if((!s||s==="auto")&&document.defaultView){let o=document.defaultView.getComputedStyle(e,null);s=o?o[i]:null}return s==="auto"?null:s}static create(e,i,s=null){let o=document.createElement(e);return o.className=i||"",s&&s.appendChild(o),o}static remove(e){let i=e.parentNode;i&&i.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,i){if(e.classList!==void 0)return e.classList.contains(i);let s=this.getClass(e);return s.length>0&&new RegExp("(^|\\s)"+i+"(\\s|$)").test(s)}static addClass(e,i){if(e.classList!==void 0){let s=x.splitWords(i);for(let o=0,a=s.length;o<a;o++)e.classList.add(s[o])}else if(!this.hasClass(e,i)){let s=this.getClass(e);this.setClass(e,(s?s+" ":"")+i)}}static removeClass(e,i){e.classList!==void 0?e.classList.remove(i):this.setClass(e,x.trim((" "+this.getClass(e)+" ").replace(" "+i+" "," ")))}static setClass(e,i){e.className.baseVal===void 0?e.className=i:e.className.baseVal=i}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,i,s,o){let a=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");a.setAttribute("class","svg-path"),a.setAttribute("width",e),a.setAttribute("height",i),a.setAttribute("viewBox",`0 0 ${e} ${i}`);let n=document.createElementNS("http://www.w3.org/2000/svg","path");return n.setAttribute("d",s),a.appendChild(n),o&&o.appendChild(a),a}static parseDom(e,i,s){i=i!=null?i:!1;let o=document.createElement("div");return o.className=s||"",o.innerHTML=e,i?o:o.childNodes}static enterFullscreen(e){e&&(e.requestFullscreen?e.requestFullscreen():e.msRequestFullscreen?e.msRequestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen&&e.webkitRequestFullscreen())}static exitFullscreen(){document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen()}static createVideo(e,i,s=null){let o=this.create("video",i,s),a=this.create("source","",o);a.setAttribute("src",e),a.setAttribute("type","video/map4");let n=this.create("source","",o);return n.setAttribute("src",e),n.setAttribute("type","video/quicktime"),o}},D=Tr;var Er=Math.PI*2,It=100,Pr=1e-4,br=class{static distance(e,i){return Math.sqrt(Math.pow(e[0]-i[0],2)+Math.pow(e[1]-i[1],2))}static wholeDistance(e){let i=0;for(let s=0;s<e.length-1;s++)i+=this.distance(e[s],e[s+1]);return i}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,i){return[(e[0]+i[0])/2,(e[1]+i[1])/2]}static getCircleCenterOfThreePoints(e,i,s){let o=[(e[0]+i[0])/2,(e[1]+i[1])/2],a=[o[0]-e[1]+i[1],o[1]+e[0]-i[0]],n=[(e[0]+s[0])/2,(e[1]+s[1])/2],h=[n[0]-e[1]+s[1],n[1]+e[0]-s[0]];return this.getIntersectPoint(o,a,n,h)}static getIntersectPoint(e,i,s,o){let a,n,h,c;return e[1]===i[1]?(h=(o[0]-s[0])/(o[1]-s[1]),a=h*(e[1]-s[1])+s[0],n=e[1],[a,n]):s[1]===o[1]?(c=(i[0]-e[0])/(i[1]-e[1]),a=c*(s[1]-e[1])+e[0],n=s[1],[a,n]):(c=(i[0]-e[0])/(i[1]-e[1]),h=(o[0]-s[0])/(o[1]-s[1]),n=(c*e[1]-e[0]-h*s[1]+s[0])/(c-h),a=c*n-c*e[1]+e[0],[a,n])}static getAzimuth(e,i){let s,o=Math.asin(Math.abs(i[1]-e[1])/this.distance(e,i));return i[1]>=e[1]&&i[0]>=e[0]?s=o+Math.PI:i[1]>=e[1]&&i[0]<e[0]?s=Er-o:i[1]<e[1]&&i[0]<e[0]?s=o:i[1]<e[1]&&i[0]>=e[0]&&(s=Math.PI-o),s}static getAngleOfThreePoints(e,i,s){let o=this.getAzimuth(i,e)-this.getAzimuth(i,s);return o<0?o+Er:o}static isClockWise(e,i,s){return(s[1]-e[1])*(i[0]-e[0])>(i[1]-e[1])*(s[0]-e[0])}static getPointOnLine(e,i,s){let o=i[0]+e*(s[0]-i[0]),a=i[1]+e*(s[1]-i[1]);return[o,a]}static getCubicValue(e,i,s,o,a){e=Math.max(Math.min(e,1),0);let n=1-e,h=e*e,c=h*e,d=n*n,p=d*n,f=p*i[0]+3*d*e*s[0]+3*n*h*o[0]+c*a[0],g=p*i[1]+3*d*e*s[1]+3*n*h*o[1]+c*a[1];return[f,g]}static getThirdPoint(e,i,s,o,a){let n=this.getAzimuth(e,i),h=a?n+s:n-s,c=o*Math.cos(h),d=o*Math.sin(h);return[i[0]+c,i[1]+d]}static getArcPoints(e,i,s,o){let a,n,h=[],c=o-s;c=c<0?c+Er:c;for(let d=0;d<=It;d++){let p=s+c*d/It;a=e[0]+i*Math.cos(p),n=e[1]+i*Math.sin(p),h.push([a,n])}return h}static getBisectorNormals(e,i,s,o){let a=this.getNormal(i,s,o),n=Math.sqrt(a[0]*a[0]+a[1]*a[1]),h=a[0]/n,c=a[1]/n,d=this.distance(i,s),p=this.distance(s,o),f,g,u,m,T;return n>Pr?this.isClockWise(i,s,o)?(f=e*d,g=s[0]-f*c,u=s[1]+f*h,T=[g,u],f=e*p,g=s[0]+f*c,u=s[1]-f*h,m=[g,u]):(f=e*d,g=s[0]+f*c,u=s[1]-f*h,T=[g,u],f=e*p,g=s[0]-f*c,u=s[1]+f*h,m=[g,u]):(g=s[0]+e*(i[0]-s[0]),u=s[1]+e*(i[1]-s[1]),T=[g,u],g=s[0]+e*(o[0]-s[0]),u=s[1]+e*(o[1]-s[1]),m=[g,u]),[T,m]}static getNormal(e,i,s){let o=e[0]-i[0],a=e[1]-i[1],n=Math.sqrt(o*o+a*a);o/=n,a/=n;let h=s[0]-i[0],c=s[1]-i[1],d=Math.sqrt(h*h+c*c);h/=d,c/=d;let p=o+h,f=a+c;return[p,f]}static getCurvePoints(e,i){let o=[this.getLeftMostControlPoint(e,i)],a,n,h,c;for(let f=0;f<i.length-2;f++)a=i[f],n=i[f+1],h=i[f+2],c=this.getBisectorNormals(e,a,n,h),o=o.concat(c);let d=this.getRightMostControlPoint(e,i);o.push(d);let p=[];for(let f=0;f<i.length-1;f++){a=i[f],n=i[f+1],p.push(a);for(let g=0;g<It;g++){let u=this.getCubicValue(g/It,a,o[f*2],o[f*2+1],n);p.push(u)}p.push(n)}return p}static getLeftMostControlPoint(e,i){let s=i[0],o=i[1],a=i[2],h=this.getBisectorNormals(0,s,o,a)[0],c=this.getNormal(s,o,a),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),p,f;if(d>Pr){let g=this.mid(s,o),u=s[0]-g[0],m=s[1]-g[1],w=2/this.distance(s,o),P=-w*m,M=w*u,L=P*P-M*M,S=2*P*M,R=M*M-P*P,B=h[0]-g[0],A=h[1]-g[1];p=g[0]+L*B+S*A,f=g[1]+S*B+R*A}else p=s[0]+e*(o[0]-s[0]),f=s[1]+e*(o[1]-s[1]);return[p,f]}static getRightMostControlPoint(e,i){let s=i.length,o=i[s-3],a=i[s-2],n=i[s-1],c=this.getBisectorNormals(0,o,a,n)[1],d=this.getNormal(o,a,n),p=Math.sqrt(d[0]*d[0]+d[1]*d[1]),f,g;if(p>Pr){let u=this.mid(a,n),m=n[0]-u[0],T=n[1]-u[1],P=2/this.distance(a,n),M=-P*T,L=P*m,S=M*M-L*L,R=2*M*L,B=L*L-M*M,A=c[0]-u[0],O=c[1]-u[1];f=u[0]+S*A+R*O,g=u[1]+R*A+B*O}else f=n[0]+e*(a[0]-n[0]),g=n[1]+e*(a[1]-n[1]);return[f,g]}static getBezierPoints(e){if(e.length<=2)return e;let i=[],s=e.length-1;for(let o=0;o<=1;o+=.01){let a=0,n=0;for(let h=0;h<=s;h++){let c=this.getBinomialFactor(s,h),d=Math.pow(o,h),p=Math.pow(1-o,s-h);a+=c*d*p*e[h][0],n+=c*d*p*e[h][1]}i.push([a,n])}return i.push(e[s]),i}static getBinomialFactor(e,i){return this.getFactorial(e)/(this.getFactorial(i)*this.getFactorial(e-i))}static getFactorial(e){if(e<=1)return 1;if(e===2)return 2;if(e===3)return 6;if(e===4)return 24;if(e===5)return 120;let i=1;for(let s=1;s<=e;s++)i*=s;return i}static getQBSplinePoints(e){if(e.length<=2)return e;let i=2,s=[],o=e.length-i-1;s.push(e[0]);for(let a=0;a<=o;a++)for(let n=0;n<=1;n+=.05){let h=0,c=0;for(let d=0;d<=i;d++){let p=this.getQuadricBSplineFactor(d,n);h+=p*e[a+d][0],c+=p*e[a+d][1]}s.push([h,c])}return s.push(e[e.length-1]),s}static getQuadricBSplineFactor(e,i){return e===0?Math.pow(i-1,2)/2:e===1?(-2*Math.pow(i,2)+2*i+1)/2:e===2?Math.pow(i,2)/2:0}},E=br;var ym=!0;function Lt(...l){console.warn(...l)}function Ve(...l){ym&&console.error(...l)}var Mr=class l{static getTransFun(e,i){if(!e||!i||(e=l.crsName2FunName(e),i=l.crsName2FunName(i),i===e))return!1;let s=e+"2"+i;return ut[s]?ut[s]:!1}static crsName2FunName(e){switch(e){case"GCJ02":return"gcj";case"BD09":return"bd";case"WGS84":default:return"wgs"}}static getPositionValue(e,i=r.JulianDate.now()){if(!e)return e;let s;return e instanceof r.Cartesian3?s=e:e._value&&e._value instanceof r.Cartesian3?s=e._value:typeof e.getValue=="function"&&(s=e.getValue(i||r.JulianDate.now())),s}static getMaxHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let o=U.parse(e[s]);s===0&&(i=o.alt),o.alt>i&&(i=o.alt)}return x.formatNum(i,U.FormatAltLength)}static getMinHeight(e,i=0){if(e==null||e.length===0)return i;for(let s=0;s<e.length;s++){let o=r.Cartographic.fromCartesian(e[s]);(s===0||o.height<i)&&(i=o.height)}return x.formatNum(i,U.FormatAltLength)}static addPositionsHeight(e,i=0){if(i=Number(i),isNaN(i)||i===0)return e;if(Array.isArray(e)){let s=[];for(let o=0;o<e.length;o++){let a=r.Cartographic.fromCartesian(e[o]),n=r.Cartesian3.fromRadians(a.longitude,a.latitude,a.height+i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,s.height+i)}}static setPositionsHeight(e,i=0){if(!e)return e;if(Array.isArray(e)){let s=[];for(let o=0;o<e.length;o++){let a=r.Cartographic.fromCartesian(e[o]),n=r.Cartesian3.fromRadians(a.longitude,a.latitude,i);s.push(n)}return s}else{let s=r.Cartographic.fromCartesian(e);return r.Cartesian3.fromRadians(s.longitude,s.latitude,i)}}static getHeight(e,i,s={}){var n;let o=U.toCartographic(i),a;if(e.getHeight?a=e.getHeight(o,s?s.heightReference:0):a=e.globe.getHeight(o),r.defined(a)&&a>((n=s?s.min:0)!=null?n:-999))return a;if(s&&s.original)return o.height}static pick3DTileset(e,i){if(!i)return null;i instanceof r.Cartesian3&&(i=[i]);for(let s=0,o=i.length;s<o;++s){let a=i[s],n=r.SceneTransforms.worldToWindowCoordinates(e,a);if(!r.defined(n))continue;let h=e.pick(n,10,10);if(r.defined(h)&&r.defined(h.primitive)&&h.primitive instanceof r.Cesium3DTileset)return h.primitive}return null}static getSurfaceHeight(e,i,s={}){return s.scene=e,s.position=i,new Dt(s).start()}static getSurfaceTerrainHeight(e,i){let s={scene:e,position:i,has3dtiles:!1};return new Dt(s).start()}static getSurfacePosition(e,i,s={}){var n;if(!i)return i;let o=U.toCartographic(i),a=l.getHeight(e,o,s);return!r.defined(a)||((n=s.greater)==null||n)&&a<o.height?i:(r.defined(s.maxHeight)&&(a=Math.min(a,s.maxHeight)),(s.heightReference===r.HeightReference.RELATIVE_TO_GROUND||s.heightReference===r.HeightReference.RELATIVE_TO_TERRAIN||s.heightReference===r.HeightReference.RELATIVE_TO_3D_TILE)&&(o.height+=a),r.Cartesian3.fromRadians(o.longitude,o.latitude,a))}static getCurrentMousePosition(e,i,s){let o;if(e.onlyVertexPosition){if(!e.vertexAdsorption)return e.vertexAdsorption=new VertexAdsorption(e),o=e.vertexAdsorption.pick(i,16,16),o}else e.vertexAdsorption&&e.vertexAdsorption.clear();let a;try{a=e.pick(i,5,5)}catch(n){Lt("getCurrentMousePosition: scene.pick \u62FE\u53D6\u65F6\u5F02\u5E38",n)}if(e.resultSupported&&!e.onlyPickTerrainPosition&&r.defined(a)){let n=l.hasPickedModel(a,s);if(n){if((n.billboard||n.point||n.label)&&!n.ellipse&&!n.model&&!n.ellipsoid)return l.getPositionValue(n.position);if(n.show){if(n.show=!1,e.requestRender(),o=l.getCurrentMousePosition(e,i,s),n.show=!0,o)return o;if(o=l._geetTargetMousePosition(e,i,a),r.defined(o))return o}if(!e.globe.show&&(o=l._geetTargetMousePosition(e,i,a),r.defined(o)))return o}else{if(r.defined(a.id)){let h=a.id;if((h.billboard||h.point||h.label)&&!h.ellipse&&!h.model&&!h.ellipsoid)return l.getPositionValue(h.position)}if(o=l._geetTargetMousePosition(e,i,a),r.defined(o))return o}}if(!e.onlyPickTerrainPosition&&e.onlyPickModelPosition)return o;if(e.mode===r.SceneMode.SCENE3D){let n=e.camera.getPickRay(i);o=e.globe.pick(n,e),!o&&(o=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else o=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return r.defined(o)&&e.camera.positionCartographic.height<1e4&&r.Cartographic.fromCartesian(o).height<-5e3?null:o}static _geetTargetMousePosition(e,i,s){let o=e.result(i);if(r.defined(o)){let a=r.Cartographic.fromCartesian(o);if(a.height>=0||!r.defined(s?s.id:0)&&a.height>=-5e3)return o}}static hasPickedModel(e,i){if(r.defined(e.id)){let s=e.id;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.primitive)){let s=e.primitive;if(s._noMousePick||i&&s===i)return s}if(r.defined(e.tileset)){let s=e.tileset;if(s._noMousePick||i&&s===i)return s}return null}static getCurrentMouseTerrainPosition(e,i){let s;if(e.mode===r.SceneMode.SCENE3D){let o=e.camera.getPickRay(i);s=e.globe.pick(o,e),s||(s=e.camera.pickEllipsoid(i,e.globe.ellipsoid))}else s=e.camera.pickEllipsoid(i,e.globe.ellipsoid);return s}static getMidpoint(e,i,s=.5){if(!i||!e)return;let o=U.toCartographic(e),a=U.toCartographic(i),n=(o.height+a.height)/2,h=new r.EllipsoidGeodesic(o,a).interpolateUsingFraction(s);return r.Cartesian3.fromRadians(h.longitude,h.latitude,n)}static isRepeatPoint(e,i){return!i||!e?!1:Math.abs(e.x-i.x)<.1&&Math.abs(e.y-i.y)<.1&&Math.abs(e.z-i.z)<.1}static getRotateCenterPoint(e,i,s){let o=r.Cartographic.fromCartesian(e);o.height=0;let a=r.Cartographic.toCartesian(o),n=r.Cartesian3.subtract(a,e,new r.Cartesian3);n=r.Cartesian3.normalize(n,new r.Cartesian3);let h=r.Quaternion.fromAxisAngle(n,r.Math.toRadians(s)),c=r.Matrix3.fromQuaternion(h),d=r.Matrix4.fromRotationTranslation(c),p=r.Cartesian3.subtract(i,e,new r.Cartesian3),f=r.Matrix4.multiplyByPoint(d,p,new r.Cartesian3);return r.Cartesian3.add(f,e,new r.Cartesian3)}static getOnLinePointByLen(e,i,s,o){let a=r.Transforms.eastNorthUpToFixedFrame(e),n=r.Matrix4.inverse(a,new r.Matrix4);e=r.Matrix4.multiplyByPoint(n,e,new r.Cartesian3),i=r.Matrix4.multiplyByPoint(n,i,new r.Cartesian3);let h=r.Cartesian3.subtract(i,e,new r.Cartesian3),c=r.Cartesian3.distance(e,i),d=s/c;o&&(d+=1);let p=r.Cartesian3.multiplyByScalar(h,d,new r.Cartesian3);return r.Matrix4.multiplyByPoint(a,p,new r.Cartesian3)}static getPositionByHprAndOffset(e,i,s,o,a){e=U.toCartesian(e),!s&&(s=new r.HeadingPitchRoll);let n=r.Transforms.headingPitchRollQuaternion(e,s,o,a),h=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(n,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(h,i,new r.Cartesian3)}static getPositionByDirectionAndLen(e,i,s){e=U.toCartesian(e);let o=r.Transforms.eastNorthUpToFixedFrame(e),a=r.Matrix3.fromRotationZ(r.Math.toRadians(360-(i||0))),n=r.Matrix4.fromRotationTranslation(a);return r.Matrix4.multiply(o,n,o),r.Matrix4.multiplyByPoint(o,new r.Cartesian3(s,0,0),new r.Cartesian3)}static getPositionByHprAndLen(e,i,s){e=U.toCartesian(e);let o=r.Transforms.headingPitchRollQuaternion(e,i),a=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(o,new r.Matrix3),e,new r.Matrix4);return r.Matrix4.multiplyByPoint(a,new r.Cartesian3(0,0,-s),new r.Cartesian3)}static getRayEarthPosition(e,i,s,o,a){if(!e||!i)return;i instanceof r.HeadingPitchRoll&&(i=r.Transforms.headingPitchRollQuaternion(e,i,o,a));let n=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getRayEarthPositionByMatrix(n,s,o)}static getRayEarthPositionByMatrix(e,i,s){let o=new r.Cartesian3,a=new r.Ray;r.Matrix4.multiplyByPoint(e,r.Cartesian3.ZERO,o),o.clone(a.origin);let n=new r.Cartesian3(0,0,i?-100:100);return l.extend2Earth(n,e,a,s)}extend2Earth(e,i,s,o){o=o||r.Ellipsoid.WGS84;let a=r.Matrix4.multiplyByPoint(i,e,new r.Cartesian3);r.Cartesian3.subtract(a,s.origin,s.direction),r.Cartesian3.normalize(s.direction,s.direction);let n=r.IntersectionTests.rayEllipsoid(s,o);if(!n)return;let h=n.start>0?n.start:n.stop,c=r.Ray.getPoint(s,h,new r.Cartesian3);if(c)try{r.Cartographic.fromCartesian(c,null,new r.Cartographic)}catch{return}return c}static getHeadingPitchRollByOrientation(e,i,s,o){if(!r.defined(i)||!r.defined(e))return new r.HeadingPitchRoll;let a=r.Matrix4.fromRotationTranslation(r.Matrix3.fromQuaternion(i,new r.Matrix3),e,new r.Matrix4);return l.getHeadingPitchRollByMatrix(a,s,o)}static getHeadingPitchRollByMatrix(e,i,s,o){return r.Transforms.fixedFrameToHeadingPitchRoll(e,i,s,o)}static getHeadingPitchRollForLine(e,i,s){e=U.toCartesian(e),i=U.toCartesian(i);let o=r.Ellipsoid.WGS84,a=new r.Cartesian3,n=new r.Matrix4,h=new r.Matrix3,c=r.Cartesian3.normalize(r.Cartesian3.subtract(i,e,a),a);r.Transforms.rotationMatrixFromPositionVelocity(e,c,o,h);let d=r.Matrix4.fromRotationTranslation(h,e,n);return s?r.Matrix4.multiplyTransformation(d,r.Axis.Z_UP_TO_X_UP,d):r.Matrix4.multiplyTransformation(d,r.Axis.X_UP_TO_Z_UP,d),r.Transforms.fixedFrameToHeadingPitchRoll(d,o)}static getReflectVector(e,i){let s=i.clone(),o=e.clone(),a=2*r.Cartesian3.dot(e,i);return r.Cartesian3.multiplyByScalar(i,a,s),r.Cartesian3.subtract(e,s,o)}static getPropertyIndex(e,i,s){let o=e&&e.property,a=o&&o.times,n=a.length;if(n===0)return{index:0};let h,c=r.Cartesian3,d=o.values,p=r.binarySearch(a,i,r.JulianDate.compare);if(p<0){if(p=~p,p===0){let A=a[p];if(h=o.backwardExtrapolationDuration,o.backwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(A,i)>h)return{index:p};if(o.backwardExtrapolationType===r.ExtrapolationType.HOLD)return{position:c.unpack(d,0,s),index:p}}if(p>=n){p=n-1;let A=a[p];if(h=o.forwardExtrapolationDuration,o.forwardExtrapolationType===r.ExtrapolationType.NONE||h!==0&&r.JulianDate.secondsDifference(i,A)>h)return{index:p};if(o.forwardExtrapolationType===r.ExtrapolationType.HOLD)return p=n-1,{position:c.unpack(d,p*c.packedLength,s),index:p}}let f=o.xTable,g=o.yTable,u=o.interpolationAlgorithm,m=o.packedInterpolationLength,T=o.inputOrder;if(o.updateTableLength){o.updateTableLength=!1;let A=Math.min(u.getRequiredDataPoints(o.interpolationDegree,T),n);A!==o.numberOfPoints&&(o._numberOfPoints=A,f.length=A,g.length=A*m)}let w=o.numberOfPoints-1;if(w<1)return p=0,{index:p};let P=0,M=n-1;if(M-P+1>=w+1){let A=p-(w/2|0)-1;A<P&&(A=P);let O=A+w;O>M&&(O=M,A=O-w,A<P&&(A=P)),P=A,M=O}let S=M-P+1;for(let A=0;A<S;++A)f[A]=r.JulianDate.secondsDifference(a[P+A],a[j]);if(r.defined(c.convertPackedArrayForInterpolation))c.convertPackedArrayForInterpolation(d,P,M,g);else{let A=0,O=o.packedLength,F=P*O,N=(M+1)*O;for(;F<N;)g[A]=d[F],F++,A++}let R=r.JulianDate.secondsDifference(i,a[M]),B;if(T===0||!r.defined(u.interpolate))B=u.interpolateOrderZero(R,f,g,m,o.interpolationResult);else{let A=Math.floor(m/(T+1));B=u.interpolate(R,f,g,A,T,T,o.interpolationResult)}p=P;for(let A=P;A<=M;A++)if(r.JulianDate.compare(i,a[A])<=0){p=A-1;break}return r.defined(c.unpackInterpolationResult)?{position:c.unpackInterpolationResult(B,d,P,M,s),index:p}:{position:c.unpack(B,0,s),index:p}}return{position:c.unpack(d,p*o.packedLength,s),index:p}}},Ae=Mr;var Ar=class l{static degree2dms(e){let i=1;e<0&&(i=-1),e=Math.abs(e);let s=Math.floor(e),o=Math.floor((e-s)*60),a=Math.round((e-s)*3600%60);return a===60&&(o+=1,a=0),o===60&&(s+=1,o=0),s*=i,{degree:s,minute:o,second:a,str:s+"\xB0 "+o+"' "+a+'"'}}static dms2degree(e,i,s){let o=Math.abs(e)+i/60+s/3600;return e<0&&(o*=-1),o}static getCGCS2000EPSGByLng(e,i,s=!0){let o;if(i){let a=parseInt(e/6)+1;if(a<13||a>23)return;s?o=a+4478:o=a+4489}else{let a=parseInt((e-1.5)/3)+1;if(a<25||a>45)return;s?o=a+4488:o=a+4509}return"EPSG:"+o}static getCGCS2000EPSGByX(e){let i=parseInt(e.toString().slice(0,2));return i>=13&&i<=23?"EPSG:"+(i+4478):i>=25&&i<=45?"EPSG:"+(i+4488):void 0}static cartesian2lonlat(e,i){return U.toArray(e,i)}static cartesians2lonlats(e,i){return et.toArray(e,i)}static cartesian2mercator(e){return e?U.fromCartesian(e).toMercator():null}static cartesians2mercators(e){let i=[];for(let s=0;s<e.length;s++){let o=l.cartesian2mercator(e[s]);o&&i.push(o)}return i}static lonlat2cartesian(e,i=0){return!e||e.length<2?null:r.Cartesian3.fromDegrees(e[0],e[1],e[2]||i)}static lonlats2cartesians(e,i){let s=[];for(let o=0;o<e.length;o++){let a=e[o];if(Array.isArray(a[0])){let n=l.lonlats2cartesians(a,i);n&&n.length>0&&s.push(n)}else{let n=l.lonlat2cartesian(a,i);n&&s.push(n)}}return s}static lonlat2mercator(e){return U.fromArray(e).toMercator()}static lonlats2mercators(e){let i=[];for(let s=0;s<e.length;s++){let o=l.lonlat2mercator(e[s]);i.push(o)}return i}static mercator2cartesian(e,i){if(isNaN(e[0])||isNaN(e[1]))return null;let s=U.fromMercator(e);return r.defined(i)&&(s.alt=i),s.toCartesian()}static mercators2cartesians(e,i){let s=[];for(let o=0;o<e.length;o++){let a=l.mercator2cartesian(e[o],i);a&&s.push(a)}return s}static mercator2lonlat(e){return U.fromMercator(e).toArray()}static mercators2lonlats(e){let i=[];for(let s=0;s<e.length;s++){let o=l.mercator2lonlat(e[s]);i.push(o)}return i}static bd2gcj(e){let i=Number(e[0]),s=Number(e[1]),o=i-.0065,a=s-.006,n=Math.sqrt(o*o+a*a)-2e-5*Math.sin(a*52.35987755982988),h=Math.atan2(a,o)-3e-6*Math.cos(o*52.35987755982988),c=n*Math.cos(h),d=n*Math.sin(h);return c=Number(c.toFixed(6)),d=Number(d.toFixed(6)),[c,d]}static gcj2bd(e){let i=Number(e[0]),s=Number(e[1]),o=Math.sqrt(i*i+s*s)+2e-5*Math.sin(s*52.35987755982988),a=Math.atan2(s,i)+3e-6*Math.cos(i*52.35987755982988),n=o*Math.cos(a)+.0065,h=o*Math.sin(a)+.006;return n=Number(n.toFixed(6)),h=Number(h.toFixed(6)),[n,h]}static wgs2gcj(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let o=l.transformlat(i-105,s-35),a=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);o=o*180/(6335552717000426e-9/(h*c)*Math.PI),a=a*180/(6378245/c*Math.cos(n)*Math.PI);let d=s+o,p=i+a;return p=Number(p.toFixed(6)),d=Number(d.toFixed(6)),[p,d]}}static transformlat(e,i){let s=-100+2*e+3*i+.2*i*i+.1*e*i+.2*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(i*Math.PI)+40*Math.sin(i/3*Math.PI))*2/3,s+=(160*Math.sin(i/12*Math.PI)+320*Math.sin(i*Math.PI/30))*2/3,s}static transformlng(e,i){let s=300+e+2*i+.1*e*e+.1*e*i+.1*Math.sqrt(Math.abs(e));return s+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,s+=(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))*2/3,s+=(150*Math.sin(e/12*Math.PI)+300*Math.sin(e/30*Math.PI))*2/3,s}static out_of_china(e,i){return e<72.004||e>137.8347||i<.8293||i>55.8271||!1}static gcj2wgs(e){let i=Number(e[0]),s=Number(e[1]);if(l.out_of_china(i,s))return[i,s];{let o=l.transformlat(i-105,s-35),a=l.transformlng(i-105,s-35),n=s/180*Math.PI,h=Math.sin(n);h=1-.00669342162296594*h*h;let c=Math.sqrt(h);o=o*180/(6335552717000426e-9/(h*c)*Math.PI),a=a*180/(6378245/c*Math.cos(n)*Math.PI);let d=i*2-(i+a),p=s*2-(s+o);return d=Number(d.toFixed(6)),p=Number(p.toFixed(6)),[d,p]}}static bd2wgs(e){return l.gcj2wgs(l.bd2gcj(e))}static wgs2bd(e){return l.gcj2bd(l.wgs2gcj(e))}},ut=Ar;var Sr=class{static getViewPosition(e,i){e=v.parsePosition(e);let s=r.Math.toRadians(e.heading),o=r.Math.toRadians(e.pitch),a=o>=0?i*Math.sin(o):-1*i*Math.sin(Math.abs(o)),n=i*Math.cos(o),h,c;s<=Math.PI/2?(h=n*Math.sin(s),c=n*Math.cos(s)):s>Math.PI/2&&s<Math.PI?(h=n*Math.cos(s-Math.PI/2),c=-1*n*Math.sin(s-Math.PI/2)):s>Math.PI&&s<Math.PI*3/2?(h=-1*n*Math.sin(s-Math.PI),c=-1*n*Math.cos(s-Math.PI)):(h=-1*n*Math.sin(Math.PI*2-s),c=n*Math.cos(Math.PI*2-s));let d=r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),p=Math.sin(r.Math.toRadians(e.lng)),f=Math.cos(r.Math.toRadians(e.lng)),g=Math.sin(r.Math.toRadians(e.lat)),u=Math.cos(r.Math.toRadians(e.lat)),m=u*a-g*c;return new r.Cartesian3(d.x+(f*m-p*h),d.y+(p*m+f*h),d.z+(g*a+u*c))}static getCameraOrientation(e){let i=new r.Matrix3;return r.Matrix3.setColumn(i,0,r.Cartesian3.negate(e.rightWC,new r.Cartesian3),i),r.Matrix3.setColumn(i,1,e.upWC,i),r.Matrix3.setColumn(i,2,e.directionWC,i),r.Quaternion.fromRotationMatrix(i,new r.Quaternion)}static setCamera(e,i,s,o){e.position=i,e.direction=r.Cartesian3.normalize(r.Cartesian3.subtract(s,i,new r.Cartesian3),new r.Cartesian3);let a=new r.Matrix3;r.Matrix3.fromRotationY(-r.Math.toRadians(o)/2,a);let n=new r.Cartesian3;r.Matrix3.multiplyByVector(a,i,n),r.Cartesian3.normalize(n,n),e.up=n}},le=Sr;var Ir=class{constructor(e){this._viewer=e,this._viewer.scene.screenSpaceCameraController.maximumZoomDistance=40489014,this._options={}}_setViewerOption(){var e,i,s;return this._viewer.delegate.shadows=(i=(e=this._options)==null?void 0:e.shadows)!=null?i:!1,this._viewer.delegate.resolutionScale=((s=this._options)==null?void 0:s.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var i,s,o,a,n;let e=this._viewer.scene;return e.skyAtmosphere.show=(i=this._options.showAtmosphere)!=null?i:!0,e.sun.show=(s=this._options.showSun)!=null?s:!0,e.moon.show=(o=this._options.showMoon)!=null?o:!0,e.postProcessStages.fxaa.enabled=(a=this._options.enableFxaa)!=null?a:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),e.verticalExaggeration=this._options.verticalExaggeration||1,e.verticalExaggerationRelativeHeight=(n=this._options.verticalExaggerationRelativeHeight)!=null?n:0,this}_setSkyBoxOption(){var i;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof r.SkyBox)this._viewer.scene.skyBox=e;else{let s=this._viewer.scene.skyBox;s.show=(i=e.show)!=null?i:!0,e.offsetAngle&&(s.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(s.sources=e.sources)}return this}_setGlobeOption(){var s,o,a,n,h,c,d,p,f,g,u,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,i=this._options.globe;if(x.merge(e,{show:(s=i==null?void 0:i.show)!=null?s:!0,showGroundAtmosphere:(o=i==null?void 0:i.showGroundAtmosphere)!=null?o:!0,enableLighting:(a=i==null?void 0:i.enableLighting)!=null?a:!1,depthTestAgainstTerrain:(n=i==null?void 0:i.depthTestAgainstTerrain)!=null?n:!1,tileCacheSize:+(i==null?void 0:i.tileCacheSize)||100,preloadSiblings:(h=i==null?void 0:i.preloadSiblings)!=null?h:!1,showSkirts:(c=i==null?void 0:i.showSkirts)!=null?c:!0,baseColor:(i==null?void 0:i.baseColor)||new r.Color(0,0,.5,1),terrainExaggeration:(i==null?void 0:i.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(i==null?void 0:i.terrainExaggerationRelativeHeight)||0}),x.merge(e.translucency,{enabled:(p=(d=i==null?void 0:i.translucency)==null?void 0:d.enabled)!=null?p:!1,backFaceAlpha:+((f=i==null?void 0:i.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(g=i==null?void 0:i.translucency)==null?void 0:g.backFaceAlphaByDistance,frontFaceAlpha:+((u=i==null?void 0:i.translucency)==null?void 0:u.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=i==null?void 0:i.translucency)==null?void 0:m.frontFaceAlphaByDistance}),i!=null&&i.filterColor){let T=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,w=T.sources.pop();T.sources.push(w.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${i.filterColor.toString()};`))}return this}_setCameraController(){var s,o,a,n,h,c,d;if(!((s=this._options)!=null&&s.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,i=this._options.cameraController;return x.merge(e,{enableInputs:(o=i==null?void 0:i.enableInputs)!=null?o:!0,enableRotate:(a=i==null?void 0:i.enableRotate)!=null?a:!0,enableTilt:(n=i==null?void 0:i.enableTilt)!=null?n:!0,enableTranslate:(h=i==null?void 0:i.enableTranslate)!=null?h:!0,enableZoom:(c=i==null?void 0:i.enableZoom)!=null?c:!0,enableCollisionDetection:(d=i==null?void 0:i.enableCollisionDetection)!=null?d:!0,minimumZoomDistance:+(i==null?void 0:i.minimumZoomDistance)||1,maximumZoomDistance:+(i==null?void 0:i.maximumZoomDistance)||40489014}),this}setOptions(e){return Object.keys(e).length===0?this:(this._options={...this._options,...e},this._setViewerOption()._setCanvasOption()._setSceneOption()._setSkyBoxOption()._setGlobeOption()._setCameraController(),this)}},Lr=Ir;var Dr=class{constructor(e){this._viewer=e,this._mouseMode=ye.LEFT_RIGHT}setPitchRange(e,i){let s=new r.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===r.SceneMode.SCENE3D&&(s.setInputAction(o=>{s.setInputAction(a=>{let n=!0,h=a.endPosition.y<a.startPosition.y;h&&this._viewer.camera.pitch>r.Math.toRadians(i)||!h&&this._viewer.camera.pitch<r.Math.toRadians(e)?n=!1:n=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=n},r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===ye.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_DOWN:r.ScreenSpaceEventType.RIGHT_DOWN),s.setInputAction(o=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,s.removeInputAction(r.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===ye.LEFT_MIDDLE?r.ScreenSpaceEventType.MIDDLE_UP:r.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||ye.LEFT_RIGHT,e===ye.LEFT_MIDDLE?(console.log("\u5207\u6362\u9F20\u6807\u6A21\u5F0F\u4E3A\uFF1A\u5DE6\u952E+\u4E2D\u952E"),this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.MIDDLE_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.WHEEL,r.CameraEventType.PINCH]):e===ye.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[r.CameraEventType.RIGHT_DRAG,r.CameraEventType.PINCH,{eventType:r.CameraEventType.LEFT_DRAG,modifier:r.KeyboardEventModifier.CTRL},{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[r.CameraEventType.WHEEL,r.CameraEventType.PINCH,{eventType:r.CameraEventType.RIGHT_DRAG,modifier:r.KeyboardEventModifier.CTRL}])}},Rr=Dr;/**
|
|
39
39
|
* 选项配置模块入口
|
|
40
40
|
* 提供鼠标模式、视图选项和相机选项的配置功能
|
|
41
41
|
*
|
|
@@ -69,17 +69,17 @@ var Su=Object.create;var Ki=Object.defineProperty;var Iu=Object.getOwnPropertyDe
|
|
|
69
69
|
* @exports CameraOption - 相机选项配置类
|
|
70
70
|
* @license MIT
|
|
71
71
|
* @copyright © 2025 Company Name
|
|
72
|
-
*/var
|
|
72
|
+
*/var vm={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore",LOADING:"loading",LOADED:"loaded",ERROR:"error",SUCCESS:"success",PROCESSING:"processing",COMPLETED:"completed",CANCELED:"canceled",ACTIVE:"active",INACTIVE:"inactive",VISIBLE:"visible",HIDDEN:"hidden",LOCKED:"locked",UNLOCKED:"unlocked",SELECTED:"selected",UNSELECTED:"unselected",FOCUSED:"focused",BLURRED:"blurred",DRAGGING:"dragging",RESIZING:"resizing",EDITING:"editing",SAVING:"saving",SYNCING:"syncing",CONNECTED:"connected",DISCONNECTED:"disconnected",ONLINE:"online",OFFLINE:"offline"},_=vm;var wm={COMPASS:"compass",ZOOM:"zoom",DISTANCE_LEGEND:"distanceLegend",LOCATION_BAR:"locationBar",POPUP:"popup",TOOLTIP:"tooltip",LOADING_MASK:"loadingMask",ANIMATION_CONTROLLER:"animationController",LAYER_SWITCHER:"layerSwitcher",MEASURE_TOOL:"measureTool",DRAW_TOOL:"drawTool",EDIT_TOOL:"editTool",TIME_SLIDER:"timeSlider",ATTRIBUTE_TABLE:"attributeTable",LEGEND:"legend",BASEMAP_SWITCHER:"basemapSwitcher",SEARCH_BAR:"searchBar",COORDINATE_CONVERTER:"coordinateConverter",PRINT_TOOL:"printTool",SHARE_TOOL:"shareTool",SETTINGS_PANEL:"settingsPanel",HELP_PANEL:"helpPanel",INFO_PANEL:"infoPanel",STATISTICS_PANEL:"statisticsPanel",FILTER_PANEL:"filterPanel",TIMELINE:"timeline",WEATHER_PANEL:"weatherPanel",TRAFFIC_PANEL:"trafficPanel",BOOKMARK_PANEL:"bookmarkPanel",HISTORY_PANEL:"historyPanel",NAVIGATION_PANEL:"navigationPanel",ANALYSIS_PANEL:"analysisPanel",TOOLBAR:"toolbar",STATUS_BAR:"statusBar",CONSOLE_PANEL:"consolePanel",CUSTOM_WIDGET:"customWidget"},Or=wm;var kr=class{constructor(){this._viewer=void 0,this._enable=!1,this._wrapper=void 0,this._ready=!1}get enable(){return this._enable}set enable(e){this._enable!==e&&(this._enable=e,this._state=this._enable?_.ENABLED:_.DISABLED,this._enableHook&&this._enableHook())}get state(){return this._state}static registerType(e){e&&(Or[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getWidgetType(e){return Or[e.toLocaleUpperCase()]||void 0}_mountContent(){}_bindEvent(){}_unbindEvent(){}_enableHook(){!this._ready&&this._mountContent(),this._enable?(!this._wrapper.parentNode&&this._viewer.widgetContainer.appendChild(this._wrapper),this._bindEvent()):(this._unbindEvent(),this._wrapper.parentNode&&this._viewer.widgetContainer.removeChild(this._wrapper))}_updateWindowCoord(e){}_installHook(){}_getViewerOffset(){return this._viewer?this._viewer.getOffset():{x:0,y:0}}install(e){this._viewer=e,this._installHook&&this._installHook(),this._state=_.INSTALLED}setWrapper(e){return this}setContent(e){if(e&&typeof e=="string")this._wrapper.innerHTML=e;else if(e&&e instanceof Element){for(;this._wrapper.hasChildNodes();)this._wrapper.removeChild(this._wrapper.firstChild);this._wrapper.appendChild(e)}return this}hide(){this._wrapper&&(this._wrapper.style.cssText="visibility:hidden;")}},z=kr;var zr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget context-menu"),this._ulEl=void 0,this._handler=void 0,this._overlay=void 0,this._position=void 0,this._wgs84Position=void 0,this._surfacePosition=void 0,this._wgs84SurfacePosition=void 0,this._windowPosition=void 0,this._instanceId=void 0,this._config={},this._defaultMenu=[{label:"\u98DE\u5230\u9ED8\u8BA4\u4F4D\u7F6E",callback:()=>{this._viewer.camera.flyHome(1.5)},context:this},{label:"\u53D6\u6D88\u98DE\u884C",callback:()=>{this._viewer.camera.cancelFlight()},context:this}],this._overlayMenu=[],this._state=_.INITIALIZED}get type(){return z.getWidgetType("contextmenu")}set DEFAULT_MENU(e){this._defaultMenu=e}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_installHook(){let e=this;Object.defineProperty(this._viewer,"contextMenu",{get(){return e}}),this._handler=new r.ScreenSpaceEventHandler(this._viewer.canvas)}_bindEvent(){this._handler.setInputAction(e=>{this._onRightClick(e)},r.ScreenSpaceEventType.RIGHT_CLICK),this._handler.setInputAction(e=>{this._onClick(e)},r.ScreenSpaceEventType.LEFT_CLICK)}_unbindEvent(){this._handler.removeInputAction(r.ScreenSpaceEventType.RIGHT_CLICK),this._handler.removeInputAction(r.ScreenSpaceEventType.LEFT_CLICK)}_mountContent(){this._ulEl=D.create("ul","menu-list",this._wrapper),this._ready=!0}_mountMenu(){for(;this._ulEl.hasChildNodes();)this._ulEl.removeChild(this._ulEl.firstChild);this._overlayMenu&&this._overlayMenu.length&&this._overlayMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)}),this._defaultMenu&&this._defaultMenu.length&&this._defaultMenu.forEach(e=>{this._addMenuItem(e.label,e.callback,e.context||this)})}_onRightClick(e){var o;if(!this._enable)return;this._overlay=void 0;let i=this._viewer.scene;this._windowPosition=e.position;let s=i.pick(e.position);if(i.pickPositionSupported&&(this._position=i.pickPosition(e.position)),this._position){let a=r.Ellipsoid.WGS84.cartesianToCartographic(this._position);a&&(this._wgs84Position={lng:r.Math.toDegrees(a.longitude),lat:r.Math.toDegrees(a.latitude),alt:a.height})}if(i.mode===r.SceneMode.SCENE3D){let a=i.camera.getPickRay(e.position);this._surfacePosition=i.globe.pick(a,i)}else this._surfacePosition=i.camera.pickEllipsoid(e.position,r.Ellipsoid.WGS84);if(this._surfacePosition){let a=r.Ellipsoid.WGS84.cartesianToCartographic(this._surfacePosition);a&&(this._wgs84SurfacePosition={lng:r.Math.toDegrees(a.longitude),lat:r.Math.toDegrees(a.latitude),alt:a.height})}if(this._instanceId=s==null?void 0:s.instanceId,(s==null?void 0:s.id)instanceof r.Entity){let a=this._viewer.getLayers().filter(n=>n.layerId===s.id.layerId)[0];a&&a.getOverlay&&(this._overlay=a.getOverlay(s.id.overlayId))}else if(s instanceof r.Cesium3DTileFeature){let a=this._viewer.getLayers().filter(n=>n.layerId===s.tileset.layerId)[0];a&&a.getOverlay&&(this._overlay=a.getOverlay(s.tileset.overlayId))}else if((s==null?void 0:s.primitive)instanceof r.Cesium3DTileset){let a=this._viewer.getLayers().filter(n=>n.layerId===s.primitive.layerId)[0];a&&a.getOverlay&&(this._overlay=a.getOverlay(s.primitive.overlayId))}else if(s!=null&&s.primitive){let a=this._viewer.getLayers().filter(n=>n.layerId===s.primitive.layerId)[0];a&&a.getOverlay&&(this._overlay=a.getOverlay(s.primitive.overlayId))}this._overlayMenu=((o=this._overlay)==null?void 0:o.contextMenu)||[],this._mountMenu(),this._updateWindowCoord(e.position)}_onClick(e){this.hide()}_updateWindowCoord(e){let i=this._ulEl.hasChildNodes()?"visible":"hidden",{x:s,y:o}=e;this._wrapper.style.cssText=`
|
|
73
73
|
visibility:${i};
|
|
74
74
|
z-index:1;
|
|
75
|
-
transform:translate3d(${Math.round(s)}px,${Math.round(
|
|
76
|
-
`}_setCustomClass(){D.setClass(this._wrapper,`pggis-context-menu ${this._config.customClass}`)}_addMenuItem(e,i,s){if(!e||!i)return this;let
|
|
75
|
+
transform:translate3d(${Math.round(s)}px,${Math.round(o)}px, 0);
|
|
76
|
+
`}_setCustomClass(){D.setClass(this._wrapper,`pggis-context-menu ${this._config.customClass}`)}_addMenuItem(e,i,s){if(!e||!i)return this;let o=D.create("li","menu-item",null),a=D.create("a","",o);a.innerHTML=e,a.href="javascript:void(0)";let n=this;return i&&(a.onclick=()=>{i.call(s,{windowPosition:n._windowPosition,position:n._position,wgs84Position:n._wgs84Position,surfacePosition:n._surfacePosition,wgs84SurfacePosition:n._wgs84SurfacePosition,overlay:n._overlay,instanceId:n._instanceId}),n.hide()}),this._ulEl.appendChild(o),this}};z.registerType("contextmenu");var Bl=zr;var Nr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget location-bar"),this._mouseEl=void 0,this._cameraEl=void 0,this._fpsEl=void 0,this._msEl=void 0,this._lastMouseSampleTime=r.getTimestamp(),this._lastCameraSampleTime=r.getTimestamp(),this._lastFpsSampleTime=r.getTimestamp(),this._lastMsSampleTime=r.getTimestamp(),this._fpsFrameCount=0,this._msFrameCount=0,this._state=_.INITIALIZED}get type(){return z.getWidgetType("location_bar")}_installHook(){let e=this;Object.defineProperty(this._viewer,"locationBar",{get(){return e}})}_bindEvent(){this._viewer.on(H.MOUSE_MOVE,this._onMove,this),this._viewer.on(W.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.on(W.POST_UPDATE,this._onPostUpdate,this)}_unbindEvent(){this._viewer.off(H.MOUSE_MOVE,this._onMove,this),this._viewer.off(W.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.off(W.POST_UPDATE,this._onPostUpdate,this)}_mountContent(){this._fpsEl=D.create("div","fps-bar",this._wrapper),this._msEl=D.create("div","ms-bar",this._wrapper),this._cameraEl=D.create("div","camera-bar",this._wrapper),this._mouseEl=D.create("div","mouse-bar",this._wrapper),this._ready=!0}_onMove(e){let i=r.getTimestamp();if(i<this._lastMouseSampleTime+300)return;let s=e.wgs84SurfacePosition;this._mouseEl.innerHTML=`
|
|
77
77
|
<span>\u6D77\u62D4\uFF1A${(s==null?void 0:s.alt.toFixed(2))||Number.NaN} \u7C73</span>
|
|
78
78
|
<span>\u7EAC\u5EA6\uFF1A${(s==null?void 0:s.lat.toFixed(8))||Number.NaN}</span>
|
|
79
79
|
<span>\u7ECF\u5EA6\uFF1A${(s==null?void 0:s.lng.toFixed(8))||Number.NaN}</span>`,this._lastMouseSampleTime=i}_onCameraChanged(){let e=r.getTimestamp();if(e<this._lastCameraSampleTime+300)return;let i=this._viewer.cameraPosition;this._cameraEl.innerHTML=`
|
|
80
80
|
<span>\u89C6\u89D2\uFF1A${(+i.pitch).toFixed(2)}</span>
|
|
81
81
|
<span>\u89C6\u9AD8\uFF1A${(+i.alt).toFixed(2)} \u7C73</span>
|
|
82
|
-
`,this._lastCameraSampleTime=e}_onPostUpdate(){let e=r.getTimestamp();this._msFrameCount++;let i=e-this._lastMsSampleTime;if(i>200){let
|
|
82
|
+
`,this._lastCameraSampleTime=e}_onPostUpdate(){let e=r.getTimestamp();this._msFrameCount++;let i=e-this._lastMsSampleTime;if(i>200){let o=(i/this._msFrameCount).toFixed(2);this._msEl.innerHTML=`<span>${o} MS</span>`,this._lastMsSampleTime=e,this._msFrameCount=0}this._fpsFrameCount++;let s=e-this._lastFpsSampleTime;if(s>1e3){let o=this._fpsFrameCount*1e3/s|0;this._fpsEl.innerHTML=`<span>${o} FPS</span>`,this._lastFpsSampleTime=e,this._fpsFrameCount=0}}};z.registerType("location_bar");var Ul=Nr;/**
|
|
83
83
|
* @file SVG图标模块 - 公司Logo
|
|
84
84
|
* @module icons/logo
|
|
85
85
|
* @author Lucas Xu
|
|
@@ -93,8 +93,8 @@ var Su=Object.create;var Ki=Object.defineProperty;var Iu=Object.getOwnPropertyDe
|
|
|
93
93
|
* @property {string} logo - base64编码的SVG图标数据
|
|
94
94
|
* @license MIT
|
|
95
95
|
* @copyright © 2025 Company Name
|
|
96
|
-
*/var
|
|
97
|
-
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAAsTAAALEwEAmpwYAAAE7mlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNy4xLWMwMDAgNzkuYjBmOGJlOSwgMjAyMS8xMi8wOC0xOToxMToyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4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u8xpkONul+nc12Qq8z9gTrPRc7APbFYi0PptztiHL6r/xUf/ofweaEg0RHOXgxiAx7axDwNISMBS7XsmHjPcTqFf9/u6idMSDK/D0DMIMe1ICnfAs7VlcacLy24ACweY/Y74j4zVAcNnOxZDhBiEiAQcMLLGGrENIZ9yLupeRydLoPvZhGw6u7PTdexuDBISPTo3sd5be+6l/R9Z94Szff6g7utsLJcGUKIVK1Yuhd3Hc0+37iTYlvJjIGqbKDxFt5sXmjg6BobBQszGcnYuD+/+PWtvdEHb+SG4o3IJDHLcSemnrhKpzE9JylFWeiHAHvbh1p3tmJJtJVk6/4TwyIvOap06VNAFVmTw502S94mQhFQMvn+ju+k/fpy9+vFxOb1sRA8nena71D4Ad9GKFSslgLNgd/SuAntCmAGdzymSzijA0sTR4SZun2ri6BjWep61pLvzgXavBTpuNhGBpGiT494v3OBW4Qe3kuNuYa2HwKaIF4TBAhkD3jTuTEnBppAz2U6JyAuetPynICRAiYKaKYtGb9EUhntNIVGdYiK7o3cI4FpasWIlAPTCbj8PAHXs+cIGdIEr5ASIItZqDqvkANZqf6OSZTB6hJkLYE7D7tzCANpEVAPJEjnORpLOenLctcJxN4AoZGMGwSaHnYp2XyghS3AYpfdu440/y67CsCub67B80stZ2I2wbwAw1QUsAPQDOAZAD6wD9vRR6mcndsEnapMQZYAiMLvMJgfmTKcFkgM7g2IQNSFEg0g0AQiwKbAxuc5g/6zV/vTEARDArvp3AJgAgJ0BC1hwLAcwp3MwsPfAQrC7aitYR0nBdngEwBKAA2anM4bdEJB/lj8R6cSQ0AawHcB67KQ8/z+ky4KshcUpowAAAABJRU5ErkJggg==`,Vl=Cm;var xm=`
|
|
98
98
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
99
99
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="120" height="120" viewBox="0 0 120 120">
|
|
100
100
|
<defs><clipPath id="b"><rect width="120" height="120"/></clipPath></defs>
|
|
@@ -105,7 +105,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
|
|
|
105
105
|
</g>
|
|
106
106
|
</g>
|
|
107
107
|
</svg>
|
|
108
|
-
`,
|
|
108
|
+
`,Zl=xm;var Tm=`
|
|
109
109
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
110
110
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="96" height="96" viewBox="0 0 120 120">
|
|
111
111
|
<defs><clipPath id="b"><rect width="120" height="120"/></clipPath></defs>
|
|
@@ -129,7 +129,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
|
|
|
129
129
|
</g>
|
|
130
130
|
</g>
|
|
131
131
|
</svg>
|
|
132
|
-
`,
|
|
132
|
+
`,jl=Tm;var Em=`
|
|
133
133
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
134
134
|
<svg width="92px" height="92px" viewBox="0 0 53 53" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
|
135
135
|
<!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
|
|
@@ -143,54 +143,54 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
|
|
|
143
143
|
</g>
|
|
144
144
|
</g>
|
|
145
145
|
</svg>
|
|
146
|
-
`,
|
|
146
|
+
`,Yl=Em;var Pm=`
|
|
147
147
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
148
148
|
<svg width="50px" height="6px" viewBox="0 0 50 6" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
|
149
149
|
<!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
|
|
150
150
|
<title>decrease</title>
|
|
151
151
|
<path d="M46.6183575,0.657894737 L3.30112724,0.657894737 C1.44927539,0.657894737 0,1.66880618 0,2.96052632 C0,4.25224645 1.44927539,5.26315789 3.30112724,5.26315789 L46.6988728,5.26315789 C48.5507246,5.26315789 50,4.25224645 50,2.96052632 C49.9194847,1.66880618 48.4702093,0.657894737 46.6183575,0.657894737 L46.6183575,0.657894737 L46.6183575,0.657894737 Z" id="Shape"></path>
|
|
152
152
|
</svg>
|
|
153
|
-
`,
|
|
153
|
+
`,ql=Pm;var bm=`
|
|
154
154
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
155
155
|
<svg width="50px" height="50px" viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
|
156
156
|
<!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
|
|
157
157
|
<title>increase</title>
|
|
158
158
|
<path d="M0,25 C0,25.3514939 0.131810207,25.659051 0.373462207,25.900703 C0.615114207,26.142355 0.922671379,26.2741652 1.27416517,26.2741652 L23.7258348,26.2741652 L23.7258348,48.7258348 C23.7258348,49.0773286 23.857645,49.3848858 24.099297,49.6265378 C24.3189807,49.8462214 24.6485061,50 25,50 C25.7029877,50 26.2741652,49.4288225 26.2741652,48.7258348 L26.2741652,26.2741652 L48.7258348,26.2741652 C49.4288225,26.2741652 50,25.7029877 50,25 C50,24.2970123 49.4288225,23.7258348 48.7258348,23.7258348 L26.2741652,23.7258348 L26.2741652,1.27416517 C26.2741652,0.571177517 25.7029877,0 25,0 C24.2970123,0 23.7258348,0.571177517 23.7258348,1.27416517 L23.7258348,23.7258348 L1.27416517,23.7258348 C0.571177517,23.7258348 0,24.2970123 0,25 L0,25 L0,25 L0,25 Z" id="Shape"></path>
|
|
159
159
|
</svg>
|
|
160
|
-
`,
|
|
160
|
+
`,Xl=bm;var Mm=`
|
|
161
161
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
162
162
|
<svg width="50px" height="50px" viewBox="0 0 50 50" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sketch="http://www.bohemiancoding.com/sketch/ns">
|
|
163
163
|
<!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
|
|
164
164
|
<title>refresh</title>
|
|
165
165
|
<path d="M48.2758621,0 C47.2844828,0 46.5086207,0.775193846 46.5086207,1.76571923 L46.5086207,12.2308355 C42.0689655,4.78036173 34.0086207,0 25,0 C11.2068965,0 0,11.1972438 0,25.0215332 C0,38.8458226 11.2068965,50 25,50 C38.7931035,50 50,38.8027562 50,25.0215332 C50,24.0310078 49.2241379,23.2558139 48.2327587,23.2558139 C47.2413793,23.2558139 46.4655172,24.0310078 46.4655172,25.0215332 C46.4655172,36.8647717 36.8103448,46.5116279 24.9568965,46.5116279 C13.1034483,46.5116279 3.49137933,36.8217054 3.49137933,24.9784668 C3.49137933,13.1352283 13.1465517,3.48837212 25,3.48837212 C33.4913793,3.48837212 41.0775862,8.44099913 44.5258621,16.0206718 L32.1551724,16.0206718 C31.1637931,16.0206718 30.3879311,16.7958657 30.3879311,17.7863911 C30.3879311,18.7769164 31.1637931,19.5521103 32.1551724,19.5521103 L48.2327587,19.5521103 C49.2241379,19.5521103 50,18.7769164 50,17.7863911 L50,1.72265288 C50,0.775193846 49.2241379,0 48.2758621,0 L48.2758621,0 L48.2758621,0 Z" id="Shape"></path>
|
|
166
166
|
</svg>
|
|
167
|
-
`,
|
|
167
|
+
`,Jl=Mm;var Am=`
|
|
168
168
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
169
169
|
<svg width="19px" height="28px" viewBox="0 0 19 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
170
170
|
<path d="M0.6551724,2.3448276 L0.6551724,25.6551724 C0.6551724,26.6454761 1.4579722,27.4482759 2.4482759,27.4482759 C3.4385796,27.4482759 4.2413793,26.6454761 4.2413793,25.6551724 L4.2413793,2.3448276 C4.2413793,1.3545239 3.4385796,0.5517241 2.4482759,0.5517241 C1.4579722,0.5517241 0.6551724,1.3545239 0.6551724,2.3448276 L0.6551724,2.3448276 Z M7.6551724,2.3448276 L7.6551724,25.6551724 C7.6551724,26.6454761 8.4579722,27.4482759 9.4482759,27.4482759 C10.4385796,27.4482759 11.2413793,26.6454761 11.2413793,25.6551724 L11.2413793,2.3448276 C11.2413793,1.3545239 10.4385796,0.5517241 9.4482759,0.5517241 C8.4579722,0.5517241 7.6551724,1.3545239 7.6551724,2.3448276 L7.6551724,2.3448276 Z M14.6551724,2.3448276 L14.6551724,25.6551724 C14.6551724,26.6454761 15.4579722,27.4482759 16.4482759,27.4482759 C17.4385796,27.4482759 18.2413793,26.6454761 18.2413793,25.6551724 L18.2413793,2.3448276 C18.2413793,1.3545239 17.4385796,0.5517241 16.4482759,0.5517241 C15.4579722,0.5517241 14.6551724,1.3545239 14.6551724,2.3448276 L14.6551724,2.3448276 Z" id="splitter"></path>
|
|
171
171
|
</svg>
|
|
172
|
-
`,
|
|
172
|
+
`,Ql=Am;var Sm={logo:Vl,compass_outer:Zl,compass_inner:jl,compass_rotation_marker:Yl,decrease:ql,increase:Xl,refresh:Jl,splitter:Ql},re=Sm;var Fr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._baseLayer=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return z.getWidgetType("map_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._baseLayer?this._viewer.scene.splitPosition=this._baseLayer.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=D.parseDom(re.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(o=>{s._moveHandler(o)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(o=>{s._moveHandler(o)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}addBaseLayer(e,i=1){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),this._baseLayer=this._viewer.imageryLayers.addImageryProvider(e),this._baseLayer.splitDirection=i||0,this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};z.registerType("map_split");var Kl=Fr;var Wr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget map-switch"),this._config=void 0,this._cache=[],this._state=_.INITIALIZED}get type(){return z.getWidgetType("map_switch")}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSwitch",{get(){return e}}),this.enable=!0,this._wrapper.onmouseover=()=>{let i=80,s=5;e._cache.length>0&&(i=e._cache.length*(i+s)-s),this._wrapper.style.width=`${i}px`},this._wrapper.onmouseout=()=>{e._wrapper.style.width="80px"}}_addItem(e){let i=D.create("div","map-item",this._wrapper),s=this._cache.length?this._cache.length-1:0;s===0&&D.addClass(i,"active"),i.setAttribute("data-index",String(s)),i.onclick=a=>{let n=document.getElementsByClassName("map-item active");n&&n.length&&(n[0].className="map-item"),this._viewer&&(a.target.className="map-item active",this._viewer.changeBaseLayer(+a.target.getAttribute("data-index")||0))},e.iconUrl&&(i.style.cssText=`
|
|
173
173
|
background:url(${e.iconUrl});
|
|
174
|
-
`);let
|
|
174
|
+
`);let o=D.create("span","",i);o.innerHTML=e.name||"\u5730\u56FE"}addMap(e={}){this._enable&&(this._cache.push(e),this._addItem(e),this._cache.length>1&&(this._wrapper.style.visibility="visible"))}};z.registerType("map_switch");var $l=Wr;var Gr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget popup"),this._config={customClass:""},this._position=void 0,this._state=_.INITIALIZED}get type(){return z.getWidgetType("popup")}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_bindEvent(){if(this._viewer&&this._wrapper){let e=this,i=this._viewer.scene;i.postRender.addEventListener(()=>{if(e._position&&e._enable&&e._updateWindowCoord&&e._wrapper.style.visibility==="visible"){let s=r.SceneTransforms.worldToWindowCoordinates(i,e._position);s&&e._updateWindowCoord(s)}})}}_mountContent(){this._wrapper.style.visibility="hidden"}_installHook(){this.enable=!0,this._bindEvent();let e=this;Object.defineProperty(this._viewer,"popup",{get(){return e}})}_updateWindowCoord(e){let i=e.x-this._wrapper.offsetWidth/2,s=e.y-this._wrapper.offsetHeight;this._config.position==="topleft"?(i=e.x-this._wrapper.offsetWidth,s=e.y-this._wrapper.offsetHeight):this._config.position==="topright"?(i=e.x,s=e.y-this._wrapper.offsetHeight):this._config.position==="bottomleft"?(i=e.x-this._wrapper.offsetWidth,s=e.y):this._config.position==="bottomright"&&(i=e.x,s=e.y),this._wrapper.style.cssText=`
|
|
175
175
|
visibility:visible;
|
|
176
176
|
z-index:1;
|
|
177
177
|
transform:translate3d(${Math.round(i)}px,${Math.round(s)}px, 0);
|
|
178
|
-
`}_setCustomClass(){D.setClass(this._wrapper,`widget popup ${this._config.customClass}`)}setWrapper(e){return e&&e instanceof Element&&(this._wrapper=e,D.addClass(this._wrapper,"widget popup")),this}setPosition(e){return this._position=e,this._wrapper&&(this._wrapper.style.cssText="visibility:visible;"),this}showAt(e,i){return this.setPosition(e).setContent(i),this}};
|
|
178
|
+
`}_setCustomClass(){D.setClass(this._wrapper,`widget popup ${this._config.customClass}`)}setWrapper(e){return e&&e instanceof Element&&(this._wrapper=e,D.addClass(this._wrapper,"widget popup")),this}setPosition(e){return this._position=e,this._wrapper&&(this._wrapper.style.cssText="visibility:visible;"),this}showAt(e,i){return this.setPosition(e).setContent(i),this}};z.registerType("popup");var eh=Gr;var Hr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget tool-tip"),this._ready=!0,this._state=_.INITIALIZED}get type(){return z.getWidgetType("tooltip")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tooltip",{get(){return e}})}_updateWindowCoord(e){let i=e.x+10,s=e.y-this._wrapper.offsetHeight/2;this._wrapper.style.cssText=`
|
|
179
179
|
visibility:visible;
|
|
180
180
|
z-index:1;
|
|
181
181
|
transform:translate3d(${Math.round(i)}px,${Math.round(s)}px, 0);
|
|
182
|
-
`}showAt(e,i){return this._enable?(e&&this._updateWindowCoord(e),this.setContent(i),this):this}};
|
|
182
|
+
`}showAt(e,i){return this._enable?(e&&this._updateWindowCoord(e),this.setContent(i),this):this}};z.registerType("tooltip");var th=Hr;var Br=class extends z{constructor(){super(),this._wrapper=D.create("div","widget hawkeye-map",null),this._wrapper.setAttribute("id",x.uuid()),this._map=void 0,this._state=_.INITIALIZED}get type(){return z.getWidgetType("hawkeye_map")}_mountContent(){let e=new r.CesiumWidget(this._wrapper,{sceneMode:r.SceneMode.SCENE2D,creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),baseLayer:!1});e.imageryLayers.removeAll(),e.canvas.parentNode.className="viewer-canvas",x.merge(e.scene.screenSpaceCameraController,{enableRotate:!1,enableTranslate:!1,enableZoom:!1,enableTilt:!1,enableLook:!1,maximumZoomDistance:40489014}),this._map=e,this._ready=!0}_bindEvent(){this._viewer.on(W.CAMERA_CHANGED,this._syncMap,this)}_unbindEvent(){this._viewer.off(W.CAMERA_CHANGED,this._syncMap,this)}_installHook(){let e=this;Object.defineProperty(this._viewer,"hawkeyeMap",{get(){return e}}),this._viewer.camera.percentageChanged=.01}_syncMap(){let e=new r.Cartesian2(Math.floor(this._viewer.canvas.clientWidth/2),Math.floor(this._viewer.canvas.clientHeight/2)),i=this._viewer.scene.camera.pickEllipsoid(e);if(!i)return!1;let s=r.Cartesian3.distance(i,this._viewer.scene.camera.positionWC);this._map.scene.camera.lookAt(i,new r.Cartesian3(0,0,s))}addBaseLayer(e){return!this._map||!this._enable?this:(e&&(this._map.imageryLayers.removeAll(),Array.isArray(e)||(e=[e]),e.forEach(i=>{this._map.imageryLayers.add(r.ImageryLayer.fromProviderAsync(i,{}))})),this)}};z.registerType("hawkeye_map");var ih=Br;var Ur=class extends z{constructor(){super(),this._wrapper=D.create("div","widget compass"),this._compassRectangle=void 0,this._outRing=void 0,this._gyro=void 0,this._rotation_marker=void 0,this._orbitCursorAngle=0,this._orbitCursorOpacity=0,this._orbitLastTimestamp=0,this._orbitFrame=void 0,this._orbitIsLook=!1,this._rotateInitialCursorAngle=void 0,this._rotateFrame=void 0,this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._state=_.INITIALIZED}get type(){return z.getWidgetType("compass")}_installHook(){let e=this;Object.defineProperty(this._viewer,"compass",{get(){return e}}),this._wrapper.onmousedown=i=>{this._handleMouseDown(i)},this._wrapper.ondblclick=i=>{this._handleDoubleClick(i)}}_bindEvent(){this._viewer.on(W.POST_RENDER,this._postRenderHandler,this)}_unbindEvent(){this._viewer.off(W.POST_RENDER,this._postRenderHandler,this)}_postRenderHandler(){let e=this._viewer.camera.heading;this._outRing&&(this._outRing.style.cssText=`
|
|
183
183
|
transform : rotate(-${e}rad);
|
|
184
184
|
-webkit-transform : rotate(-${e}rad);
|
|
185
|
-
`)}_mountContent(){D.create("div","out-ring-bg",this._wrapper),this._outRing=D.parseDom(
|
|
185
|
+
`)}_mountContent(){D.create("div","out-ring-bg",this._wrapper),this._outRing=D.parseDom(re.compass_outer,!0,"out-ring"),this._wrapper.appendChild(this._outRing),this._gyro=D.parseDom(re.compass_inner,!0,"gyro"),this._wrapper.appendChild(this._gyro),this._rotation_marker=D.parseDom(re.compass_rotation_marker,!0,"rotation_marker"),this._wrapper.appendChild(this._rotation_marker),this._rotation_marker.style.visibility="hidden",this._ready=!0}_handleMouseDown(e){if(this._viewer.scene.mode===r.SceneMode.MORPHING)return!0;this._compassRectangle=e.currentTarget.getBoundingClientRect();let s=this._compassRectangle.width/2,o=this._getVector(e),a=r.Cartesian2.magnitude(o)/s;if(a<50/145)this._orbit(o);else if(a<1)this._rotate(o);else return!0}_handleDoubleClick(){let e=this._viewer.scene,i=e.camera,s=e.screenSpaceCameraController;if(e.mode===r.SceneMode.MORPHING||!s.enableInputs)return!0;if(e.mode===r.SceneMode.COLUMBUS_VIEW&&!s.enableTranslate||(e.mode===r.SceneMode.SCENE3D||e.mode===r.SceneMode.COLUMBUS_VIEW)&&(!s.enableLook||e.mode===r.SceneMode.SCENE3D&&!s.enableRotate))return;let o=this._getCameraFocus(!0);if(!o)return;let a=e.globe.ellipsoid.cartographicToCartesian(i.positionCartographic),n=e.globe.ellipsoid.geodeticSurfaceNormal(o),h=new r.BoundingSphere(o,0);i.flyToBoundingSphere(h,{offset:new r.HeadingPitchRange(0,r.Math.PI_OVER_TWO-r.Cartesian3.angleBetween(n,i.directionWC),r.Cartesian3.distance(a,o)),duration:1.5})}_getCameraFocus(e){let i=new r.Cartesian3,s=this._viewer.scene,o=s.camera;if(s.mode!==r.SceneMode.MORPHING){if(this._viewer.delegate.trackedEntity)i=this._viewer.delegate.trackedEntity.position.getValue(this._viewer.clock.currentTime);else{let a=new r.Ray;a.origin=o.positionWC,a.direction=o.directionWC,i=s.globe.pick(a,s)}if(i){if(s.mode===r.SceneMode.SCENE2D||s.mode===r.SceneMode.COLUMBUS_VIEW){i=o.worldToCameraCoordinatesPoint(i);let a=new r.Cartographic;e&&(i=s.globe.ellipsoid.cartographicToCartesian(s.mapProjection.unproject(i,a)))}else e||(i=o.worldToCameraCoordinatesPoint(i));return i}}}_orbit(e){let i=this._viewer.scene,s=i.screenSpaceCameraController,o=i.camera;if(!(i.mode===r.SceneMode.MORPHING||!s.enableInputs)){switch(i.mode){case r.SceneMode.COLUMBUS_VIEW:if(s.enableLook)break;if(!s.enableTranslate||!s.enableTilt)return;break;case r.SceneMode.SCENE3D:if(s.enableLook)break;if(!s.enableTilt||!s.enableRotate)return;break;case r.SceneMode.SCENE2D:if(!s.enableTranslate)return;break}if(this._mouseMoveHandle=a=>{this._orbitMouseMoveFunction(a)},this._mouseUpHandle=()=>{this._orbitMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._orbitLastTimestamp=r.getTimestamp(),this._viewer.delegate.trackedEntity)this._orbitFrame=void 0,this._orbitIsLook=!1;else{let a=this._getCameraFocus(!0);a?(this._orbitFrame=r.Transforms.eastNorthUpToFixedFrame(a,i.globe.ellipsoid),this._orbitIsLook=!1):(this._orbitFrame=r.Transforms.eastNorthUpToFixedFrame(o.positionWC,i.globe.ellipsoid),this._orbitIsLook=!0)}this._rotation_marker.style.visibility="visible",this._gyro.className+=" gyro-active",document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.addEventListener(this._orbitTickFunction,this),this._updateAngleAndOpacity(e,this._compassRectangle.width)}}_orbitTickFunction(){let e=this._viewer.scene,i=this._viewer.camera,s=r.getTimestamp(),o=s-this._orbitLastTimestamp,a=(this._orbitCursorOpacity-.5)*2.5/1e3,n=o*a,h=this._orbitCursorAngle+r.Math.PI_OVER_TWO,c=Math.cos(h)*n,d=Math.sin(h)*n,p;this._orbitFrame&&(p=r.Matrix4.clone(i.transform),i.lookAtTransform(this._orbitFrame)),e.mode===r.SceneMode.SCENE2D?i.move(new r.Cartesian3(c,d,0),Math.max(e.canvas.clientWidth,e.canvas.clientHeight)/100*i.positionCartographic.height*n):this._orbitIsLook?(i.look(r.Cartesian3.UNIT_Z,-c),i.look(i.right,-d)):(i.rotateLeft(c),i.rotateUp(d)),this._orbitFrame&&p&&i.lookAtTransform(p),this._orbitLastTimestamp=s}_updateAngleAndOpacity(e,i){let s=Math.atan2(-e.y,e.x);this._orbitCursorAngle=r.Math.zeroToTwoPi(s-r.Math.PI_OVER_TWO);let o=r.Cartesian2.magnitude(e),a=i/2,n=Math.min(o/a,1);this._orbitCursorOpacity=.5*n*n+.5,this._rotation_marker.style.cssText=`
|
|
186
186
|
transform: rotate(-${this._orbitCursorAngle}rad);
|
|
187
|
-
opacity: ${this._orbitCursorOpacity}`}_orbitMouseMoveFunction(e){this._updateAngleAndOpacity(this._getVector(e),this._compassRectangle.width)}_orbitMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.removeEventListener(this._orbitTickFunction,this),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._rotation_marker.style.visibility="hidden",this._gyro.className=this._gyro.className.replace(" gyro-active","")}_rotate(e){let i=this._viewer.scene,s=i.camera,
|
|
187
|
+
opacity: ${this._orbitCursorOpacity}`}_orbitMouseMoveFunction(e){this._updateAngleAndOpacity(this._getVector(e),this._compassRectangle.width)}_orbitMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._viewer.clock.onTick.removeEventListener(this._orbitTickFunction,this),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0,this._rotation_marker.style.visibility="hidden",this._gyro.className=this._gyro.className.replace(" gyro-active","")}_rotate(e){let i=this._viewer.scene,s=i.camera,o=i.screenSpaceCameraController;if(i.mode===r.SceneMode.MORPHING||i.mode===r.SceneMode.SCENE2D||!o.enableInputs||!o.enableLook&&(i.mode===r.SceneMode.COLUMBUS_VIEW||i.mode===r.SceneMode.SCENE3D&&!o.enableRotate))return;if(this._mouseMoveHandle=n=>{this._rotateMouseMoveFunction(n)},this._mouseUpHandle=()=>{this._rotateMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._rotateInitialCursorAngle=Math.atan2(-e.y,e.x),this._viewer.delegate.trackedEntity)this._rotateFrame=void 0;else{let n=this._getCameraFocus(!0);!n||i.mode===r.SceneMode.COLUMBUS_VIEW&&!o.enableLook&&!o.enableTranslate?this._rotateFrame=r.Transforms.eastNorthUpToFixedFrame(s.positionWC,i.globe.ellipsoid):this._rotateFrame=r.Transforms.eastNorthUpToFixedFrame(n,i.globe.ellipsoid)}let a;this._rotateFrame&&(a=r.Matrix4.clone(s.transform),s.lookAtTransform(this._rotateFrame)),this._rotateInitialCameraAngle=-s.heading,this._rotateFrame&&a&&s.lookAtTransform(a),document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1)}_rotateMouseMoveFunction(e){let i=this._viewer.camera,s=this._getVector(e),a=Math.atan2(-s.y,s.x)-this._rotateInitialCursorAngle,n=r.Math.zeroToTwoPi(this._rotateInitialCameraAngle-a),h;this._rotateFrame&&(h=r.Matrix4.clone(i.transform),i.lookAtTransform(this._rotateFrame));let c=-i.heading;i.rotateRight(n-c),this._rotateFrame&&h&&i.lookAtTransform(h)}_rotateMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0}_getVector(e){let i=this._compassRectangle,s=new r.Cartesian2((i.right-i.left)/2,(i.bottom-i.top)/2),o=new r.Cartesian2(e.clientX-i.left,e.clientY-i.top),a=new r.Cartesian2;return r.Cartesian2.subtract(o,s,a),a}};z.registerType("compass");var rh=Ur;var sh=new r.EllipsoidGeodesic,Ze=[1,2,3,5],Vr=[...Ze,...Ze.map(l=>l*10),...Ze.map(l=>l*100),...Ze.map(l=>l*1e3),...Ze.map(l=>l*1e4),...Ze.map(l=>l*1e5),...Ze.map(l=>l*1e6)],Zr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget distance-legend"),this._labelEl=void 0,this._scaleBarEl=void 0,this._lastUpdate=r.getTimestamp(),this._state=_.INITIALIZED}get type(){return z.getWidgetType("distance_legend")}_installHook(){let e=this;Object.defineProperty(this._viewer,"distanceLegend",{get(){return e}})}_bindEvent(){this._viewer.on(W.POST_RENDER,this._updateContent,this)}_unbindEvent(){this._viewer.off(W.POST_RENDER,this._updateContent,this)}_updateContent(e,i){let s=r.getTimestamp();if(s<this._lastUpdate+250||!this._labelEl||!this._scaleBarEl)return;this._lastUpdate=s;let o=e.canvas.width,a=e.canvas.height,n=e.camera.getPickRay(new r.Cartesian2(o/2|0,a-1)),h=e.camera.getPickRay(new r.Cartesian2(1+o/2|0,a-1)),c=e.globe.pick(n,e),d=e.globe.pick(h,e);if(!c||!d)return;sh.setEndPoints(e.globe.ellipsoid.cartesianToCartographic(c),e.globe.ellipsoid.cartesianToCartographic(d));let p=sh.surfaceDistance,f=100,g=0;for(let u=Vr.length-1;u>=0;--u)if(Vr[u]/p<f){g=Vr[u];break}if(g){this._wrapper.style.visibility="visible",this._labelEl.innerHTML=g>=1e3?`${g/1e3} km`:`${g} m`;let u=g/p|0;this._scaleBarEl.style.cssText=`width: ${u}px; left: ${(125-u)/2}px;`}}_mountContent(){this._labelEl=D.create("div","label",this._wrapper),this._scaleBarEl=D.create("div","scale-bar",this._wrapper),this._wrapper.style.visibility="hidden",this._ready=!0}};z.registerType("distance_legend");var oh=Zr;var jr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget zoom-controller"),this._zoomInEl=void 0,this._zoomOutEl=void 0,this._refreshEl=void 0,this._state=_.INITIALIZED}get type(){return z.getWidgetType("zoom_controller")}_getCameraFocus(e){let i=new r.Ray(e.camera.positionWC,e.camera.directionWC),s=r.IntersectionTests.rayEllipsoid(i,r.Ellipsoid.WGS84);return s?r.Ray.getPoint(i,s.start):r.IntersectionTests.grazingAltitudeLocation(i,r.Ellipsoid.WGS84)}_getCameraPosition(e,i,s){let o=new r.Cartesian3,a=r.Cartesian3.subtract(i,e.position,o),n=r.Cartesian3.multiplyByScalar(a,s,o);return r.Cartesian3.add(e.position,n,o)}_zoomIn(){let e=this._viewer.scene,i=e.camera,s=e.screenSpaceCameraController;if(e.mode===r.SceneMode.MORPHING||!s.enableInputs||e.mode===r.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===r.SceneMode.SCENE2D)i.zoomIn(i.positionCartographic.height*.5);else if(e.mode===r.SceneMode.SCENE3D){let o=this._getCameraFocus(e),a=this._getCameraPosition(i,o,1/2);i.flyTo({destination:a,orientation:{heading:i.heading,pitch:i.pitch,roll:i.roll},duration:.5,convert:!1})}}_refresh(){this._viewer.camera.flyHome(1.5)}_zoomOut(){let e=this._viewer.scene,i=e.camera,s=e.screenSpaceCameraController;if(e.mode===r.SceneMode.MORPHING||!s.enableInputs||e.mode===r.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===r.SceneMode.SCENE2D)i.zoomOut(i.positionCartographic.height);else if(e.mode===r.SceneMode.SCENE3D){let o=this._getCameraFocus(e),a=this._getCameraPosition(i,o,-1);i.flyTo({destination:a,orientation:{heading:i.heading,pitch:i.pitch,roll:i.roll},duration:.5,convert:!1})}}_installHook(){let e=this;Object.defineProperty(this._viewer,"zoomController",{get(){return e}})}_mountContent(){this._zoomInEl=D.parseDom(re.increase,!0,"zoom-in"),this._refreshEl=D.parseDom(re.refresh,!0,"refresh"),this._zoomOutEl=D.parseDom(re.decrease,!0,"zoom-out"),this._wrapper.appendChild(this._zoomInEl),this._wrapper.appendChild(this._refreshEl),this._wrapper.appendChild(this._zoomOutEl);let e=this;this._zoomInEl.onclick=()=>{e._zoomIn()},this._refreshEl.onclick=()=>{e._refresh()},this._zoomOutEl.onclick=()=>{e._zoomOut()},this._ready=!0}};z.registerType("zoom_controller");var ah=jr;var Yr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget loading-mask"),this._state=_.INITIALIZED}get type(){return z.getWidgetType("loading_mask")}_installHook(){let e=this;Object.defineProperty(this._viewer,"loadingMask",{get(){return e}})}_mountContent(){let e=D.parseDom(`
|
|
188
188
|
<span></span>
|
|
189
189
|
<span></span>
|
|
190
190
|
<span></span>
|
|
191
191
|
<span></span>
|
|
192
192
|
<span></span>
|
|
193
|
-
`,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};k.registerType("loading_mask");var Xl=ts;var is=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.getWidgetType("tileset_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tilesetSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._tileset?this._viewer.scene.splitPosition=this._tileset.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),this._tileset=this._viewer.scene.primitives.add(e.delegate||e),this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};k.registerType("tileset_split");var Jl=is;var rs=class extends k{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return k.getWidgetType("scene_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"sceneSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._viewer.scene.splitPosition=1}_mountContent(){let e=D.parseDom(se.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(a=>{s._moveHandler(a)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(i=>{this._tileset=this._viewer.scene.primitives.add(i)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(i=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(i),this._baseLayer.splitDirection=1})),this)}};k.registerType("scene_split");var Ql=rs;var ss=class{constructor(){this._delegate=new r.ViewportQuad,this._viewer=void 0}update(e){this._delegate.update(e)}install(e){this._viewer=e;let i=!0,s=se.logo,a=[86,26];if(i&&!s)return!1;let o=i&&s?s:se.logo;this._delegate.rectangle=new r.BoundingRectangle(2,1,a[0]||86,a[1]||26),this._delegate.material=new r.Material({fabric:{type:"Logo-Image",uniforms:{image:o},components:{diffuse:"texture(image, materialInput.st).rgb",alpha:"texture(image, materialInput.st).a "}},translucent:function(n){return!1}}),this._viewer.scene.primitives.add(this),i||this._viewer.scene.postRender.addEventListener(()=>{this._viewer.scene.primitives.contains(this)||this._viewer.scene.primitives.add(this)})}isDestroyed(){return!1}destroy(){return this}};k.registerType("attribution");var Kl=ss;function as(){return{popup:new Bl,contextMenu:new Il,tooltip:new Ul,mapSwitch:new Wl,mapSplit:new Hl,locationBar:new Ll,hawkeyeMap:new Vl,compass:new Zl,distanceLegend:new Yl,zoomController:new ql,loadingMask:new Xl,tilesetSplit:new Jl,sceneSplit:new Ql,attribution:new Kl}}var et="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/3/fff7w//9/A2S9cK/9//i1g4GZqeSdcwnzn4v38HmXgSs3gIGnKfEXIyebOQMDwwWQGMwgh/9fvu8hxhAY4Ix1ZeCdnPOTkYNNgoGB4QMT2DWfv6/50riIaENA4Pvi3Qy/T99k//v0TQOIDzLI4P/nb/zfJm8g2hAY+Nq8hIFJmC8DbNDfp28Sfqw7zEKyKQwMDL8OXQKFLShsDJgYmRhN/j58SY45YPDn1hMOUFpjYmBj5aHEIBhg+vvw5QVWPWWyDWBk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NYB/A6b1Qz9EzRMAAAAASUVORK5CYII=";var rf={icon_center:Rt,icon_anchor:et,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},os=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new gt,this._tooltipMess=void 0,this._anchorIds=[]}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){return this._options.clampToModel&&e.position?e.position:e.surfacePosition}_onClick(e){let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:i})),this._plotEvent.fire(M.DRAW_ANCHOR,i)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,i)}_onDoubleClick(e){this._plotEvent.fire(M.DRAW_STOP,this._getEventPosition(e))}_onRightClick(e){if(this._plotEvent.fire(M.DELETE_ANCHOR),this._anchorIds&&this._anchorIds.length>0){var i=this._anchorIds[this._anchorIds.length-1];this._anchorLayer.entities.removeById(i),this._anchorIds.splice(this._anchorIds.length-1,1)}}_onCreateAnchor({position:e,isCenter:i=!1}){var a;let s=this._anchorLayer.entities.add({position:e,billboard:{image:i?this._options.icon_center:this._options.icon_anchor,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(a=this._options.disableDepthTestDistance)!=null?a:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE}});return this._anchorIds.push(s.id),s}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchorIds=[]}_bindEvent(){this._viewer.on(B.CLICK,this._onClick,this),this._viewer.on(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(B.DB_CLICK,this._onDoubleClick,this),this._viewer.on(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(B.CLICK,this._onClick,this),this._viewer.off(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(B.DB_CLICK,this._onDoubleClick,this),this._viewer.off(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i={}){return this._plotEvent.fire(e,i),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...rf,...e},this._anchorIds=[],this._unbindEvent(),this._bindEvent(),this.fire(M.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this._anchorIds=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},$l=os;var eh="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACDElEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSscO/l7x3ff/378fz9n++Hr//4fezmz+9ffvz7/eHr33eP3/6Z8P//fwF0fSguevv5X6UwL1PbwoNfGRrWfGJ48PoPiuUOWuwMDSH8DHryrB8FuZkcGBgYLsDk4AZ9/Pavg5mJscS24SXzhQe/8XmXocCLl6Etgv8XJxujOcwwmEEOX37830OMITCQYM/NMD1F8CcHK6MEAwPDByaQ+Ofv/9fUrvpItCEgsODgV4aTt3+xP3n3twHEBxlk8On7P/4J2z4TbQgMNKz5yCDCy5QBNujJu78Ja05+YyHZFAYGhgPXfjJ8+PoPFDYGTEyMDCYPXv8lxxwwuPnsDwcorTGxsTDyoEczOYDp4es/Fwzk2cg2gI2F8QeIZjJWYjtgoMBKliEC3EwMlmpsIK9dAMXaBn8TTgYFUdLDu8CTl+H2iz/nYenow8uPf+cvyBQiyRCQxcU+vH9VJViKGKDpiEGcn7lIW5b1MbGGgby0qVTk75vPf1eCUgFIDDnTCrz5/O/S1ce/ZROmv8PIsDAAyrhLcoT/MDIybJcSZPaDiaOXRwIvP/7tE+dnTtx45js4wV148Ass4aDFwRBkxvlXVZLlz4ev/4okBJinIWvEVbApvP38L/LT93/2vJxMoEzJ8OXHv6sKoiy7QdkMQzUDAwMAuq71NKWtMMgAAAAASUVORK5CYII=";var af={icon_center:Rt,icon_anchor:et,icon_midAnchor:eh,icon_size:[12,12],clampToModel:!0},ns=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new gt,this._tooltipMess=void 0,this._pickedAnchor=void 0,this._isMoving=!1,this._anchors=[]}set tooltipMess(e){this._tooltipMess=e}_onClick(e){if(this._isMoving){let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:i})),this._isMoving=!1}else{if(!e.target||!e.target.id)return!1;this._pickedAnchor=e.target.id,this._isMoving=!0}}_onMouseMove(e){if(this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess),!this._isMoving&&this._anchors.length!==0)return!1;let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(M.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:i})):this._anchors.length===0&&this._plotEvent.fire(M.ANCHOR_MOVING,{position:i})}_onRightClick(e){let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(M.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:i})}_onCreateAnchor({position:e,index:i,isCenter:s=!1,isMid:a=!1}){var h;let o=a?this._options.icon_midAnchor:s?this._options.icon_center:this._options.icon_anchor,n=this._anchorLayer.entities.add({position:e,billboard:{image:o,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(h=this._options.disableDepthTestDistance)!=null?h:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},properties:{isMid:a,index:i}});this._anchors.push(n)}_onUpdateAnchor({index:e,position:i}){this._anchors[e]&&this._anchors[e].position.setValue(i)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(B.CLICK,this._onClick,this),this._viewer.on(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(M.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(B.CLICK,this._onClick,this),this._viewer.off(B.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(B.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(M.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(M.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(M.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i){return this._plotEvent.fire(e,i),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...af,...e},this._unbindEvent(),this._bindEvent(),this.fire(M.EDIT_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._anchors=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"editTool",{value:this,writable:!1})}},th=ns;function ls(){return{drawTool:new $l,editTool:new th}}var{ImageryLayer:of}=r,hs=class{constructor(e={}){if(!e.globe)throw new Error("globe is required");this._globe=e.globe,this._imageryLayers=[],this._selectedImageryLayer=void 0,this._count=0}get selectedImageryLayer(){return this._selectedImageryLayer}set selectedImageryLayer(e){if((!e||!e.layers)&&new Error("imagery format error"),!(this._selectedImageryLayer&&e.id===this._selectedImageryLayer.id)){if(this._selectedImageryLayer&&e.id!==this._selectedImageryLayer.id){for(let i=0;i<this._selectedImageryLayer.cache.length;i++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[i]);e.cache=[]}for(let i=e.layers.length-1;i>=0;i--){let s=e.layers[i],a=of.fromProviderAsync(s,e.options);s&&this._globe.imageryLayers.add(a,0),e.cache.push(a)}this._selectedImageryLayer=e}}addImageryLayer(e,i={}){let s=[];return Array.isArray(e)?s=e.slice(0):s=[e],this._count++,this._imageryLayers.push({id:`imagery-no-${this._count}`,layers:s,cache:[]}),this}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},cs=hs;var{BoxGeometry:ih,Cartesian3:nf,defined:Ie,DeveloperError:rh,GeometryPipeline:lf,Matrix3:sh,Matrix4:ds,Transforms:hf,VertexFormat:cf,BufferUsage:df,CubeMap:pf,loadCubeMap:mf,RenderState:uf,VertexArray:ff,BlendingState:_f,SceneMode:ah,ShaderProgram:gf,ShaderSource:yf,SkyBox:vf}=r,wf=`
|
|
193
|
+
`,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};z.registerType("loading_mask");var nh=Yr;var qr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return z.getWidgetType("tileset_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tilesetSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._tileset?this._viewer.scene.splitPosition=this._tileset.splitDirection>0?1:0:this._viewer.scene.splitPosition=0}_mountContent(){let e=D.parseDom(re.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(o=>{s._moveHandler(o)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(o=>{s._moveHandler(o)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),this._tileset=this._viewer.scene.primitives.add(e.delegate||e),this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};z.registerType("tileset_split");var lh=qr;var Xr=class extends z{constructor(){super(),this._wrapper=D.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=_.INITIALIZED}get type(){return z.getWidgetType("scene_split")}_installHook(){let e=this;Object.defineProperty(this._viewer,"sceneSplit",{get(){return e}})}_bindEvent(){this._viewer.scene.splitPosition=.5,this._wrapper.style.left="50%"}_unbindEvent(){this._viewer.scene.splitPosition=1}_mountContent(){let e=D.parseDom(re.splitter,!0,"splitter");this._wrapper.appendChild(e);let i=new r.ScreenSpaceEventHandler(e),s=this;i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(()=>{s._moveActive=!0},r.ScreenSpaceEventType.PINCH_START),i.setInputAction(o=>{s._moveHandler(o)},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(o=>{s._moveHandler(o)},r.ScreenSpaceEventType.PINCH_MOVE),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(()=>{s._moveActive=!1},r.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let i=e.endPosition.x,s=(this._wrapper.offsetLeft+i)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*s+"%",this._viewer.scene.splitPosition=s}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(i=>{this._tileset=this._viewer.scene.primitives.add(i)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(i=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(i),this._baseLayer.splitDirection=1})),this)}};z.registerType("scene_split");var hh=Xr;var Jr=class{constructor(){this._delegate=new r.ViewportQuad,this._viewer=void 0}update(e){this._delegate.update(e)}install(e){this._viewer=e;let i=!0,s=re.logo,o=[86,26];if(i&&!s)return!1;let a=i&&s?s:re.logo;this._delegate.rectangle=new r.BoundingRectangle(2,1,o[0]||86,o[1]||26),this._delegate.material=new r.Material({fabric:{type:"Logo-Image",uniforms:{image:a},components:{diffuse:"texture(image, materialInput.st).rgb",alpha:"texture(image, materialInput.st).a "}},translucent:function(n){return!1}}),this._viewer.scene.primitives.add(this),i||this._viewer.scene.postRender.addEventListener(()=>{this._viewer.scene.primitives.contains(this)||this._viewer.scene.primitives.add(this)})}isDestroyed(){return!1}destroy(){return this}};z.registerType("attribution");var ch=Jr;function Qr(){return{popup:new eh,contextMenu:new Bl,tooltip:new th,mapSwitch:new $l,mapSplit:new Kl,locationBar:new Ul,hawkeyeMap:new ih,compass:new rh,distanceLegend:new oh,zoomController:new ah,loadingMask:new nh,tilesetSplit:new lh,sceneSplit:new hh,attribution:new ch}}var tt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/3/fff7w//9/A2S9cK/9//i1g4GZqeSdcwnzn4v38HmXgSs3gIGnKfEXIyebOQMDwwWQGMwgh/9fvu8hxhAY4Ix1ZeCdnPOTkYNNgoGB4QMT2DWfv6/50riIaENA4Pvi3Qy/T99k//v0TQOIDzLI4P/nb/zfJm8g2hAY+Nq8hIFJmC8DbNDfp28Sfqw7zEKyKQwMDL8OXQKFLShsDJgYmRhN/j58SY45YPDn1hMOUFpjYmBj5aHEIBhg+vvw5QVWPWWyDWBkY/kBoplYjVQPsOgrkWeIADcDq7kmyGsXQLG2gd3XkoFZXpxkg7hzAhn+3nl6HpaOPvx79X4+35xikgwBWcxVEPSXWUW6iAGajhiYxASLWLTkHxNrGMhLAmsb/v57+2klAwPDAbAYUjEi8O/tp0t/rj2U/ZTSy4ArJtns9Bj4F5T9YWBk2M4kKewHNxytPBL49+p9H5OYYOLPzcfBCQ6WbUAGsAdY/2VWkfrz/+PXIiZxwWkorsRRsCn8e/cp8v+nb/aMvFygTMnw/8v3q8zy4rsZGBgWYKhmYGAAAN6EGE9igaT+AAAAAElFTkSuQmCC";var Rt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAAB+klEQVQ4jZ2UT2gTQRTGv5nd7G7TsNnW1QimWC+CghBEqJ7sSTx50oM3iwhejSJ486J4qdWLt6JXsQdPVdRDj0WQBqEehKJotLbEbrLNJvtnZlYmZEub1rLJB8Mw8+b9Zt7Me0PiOMY+KgGwuubv3ba3JKinjUfBj7dC+D6L1tt+82Pke5/agnsRZ+4GC38/iePY6vXbcSLBnXtUGXnYdObQWJ8BC6s7NjeGzyJfuAXNONGgSn4SQCWxbYEE33xECL3zZ+WyEvpf9gsXpn0dVuFuSKgxkcAS0GQsvA9pIIlyI1cweuRBQIh+GECddk4jvLn62nRqiFTTeYWgtaTzaPW+HEtQKeabebc2mxqSqLE2A6qO3uyAeLR6rdWYV/umAPC9RQjuyrspUYCeYVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=";var Dm={icon_center:Rt,icon_anchor:tt,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},Kr=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new mt,this._tooltipMess=void 0,this._anchorIds=[]}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){return this._options.clampToModel&&e.position?e.position:e.surfacePosition}_onClick(e){let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:i})),this._plotEvent.fire(b.DRAW_ANCHOR,i)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let i=this._getEventPosition(e);if(!i)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(i),this._plotEvent.fire(b.ANCHOR_MOVING,i)}_onDoubleClick(e){this._plotEvent.fire(b.DRAW_STOP,this._getEventPosition(e))}_onRightClick(e){if(this._plotEvent.fire(b.DELETE_ANCHOR),this._anchorIds&&this._anchorIds.length>0){var i=this._anchorIds[this._anchorIds.length-1];this._anchorLayer.entities.removeById(i),this._anchorIds.splice(this._anchorIds.length-1,1)}}_onCreateAnchor({position:e,isCenter:i=!1}){var o;let s=this._anchorLayer.entities.add({position:e,billboard:{image:i?this._options.icon_center:this._options.icon_anchor,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(o=this._options.disableDepthTestDistance)!=null?o:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE}});return this._anchorIds.push(s.id),s}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchorIds=[]}_bindEvent(){this._viewer.on(H.CLICK,this._onClick,this),this._viewer.on(H.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(H.DB_CLICK,this._onDoubleClick,this),this._viewer.on(H.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(b.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(b.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(H.CLICK,this._onClick,this),this._viewer.off(H.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(H.DB_CLICK,this._onDoubleClick,this),this._viewer.off(H.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(b.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(b.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i={}){return this._plotEvent.fire(e,i),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...Dm,...e},this._anchorIds=[],this._unbindEvent(),this._bindEvent(),this.fire(b.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this._anchorIds=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},dh=Kr;var ph="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACDElEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSscO/l7x3ff/378fz9n++Hr//4fezmz+9ffvz7/eHr33eP3/6Z8P//fwF0fSguevv5X6UwL1PbwoNfGRrWfGJ48PoPiuUOWuwMDSH8DHryrB8FuZkcGBgYLsDk4AZ9/Pavg5mJscS24SXzhQe/8XmXocCLl6Etgv8XJxujOcwwmEEOX37830OMITCQYM/NMD1F8CcHK6MEAwPDByaQ+Ofv/9fUrvpItCEgsODgV4aTt3+xP3n3twHEBxlk8On7P/4J2z4TbQgMNKz5yCDCy5QBNujJu78Ja05+YyHZFAYGhgPXfjJ8+PoPFDYGTEyMDCYPXv8lxxwwuPnsDwcorTGxsTDyoEczOYDp4es/Fwzk2cg2gI2F8QeIZjJWYjtgoMBKliEC3EwMlmpsIK9dAMXaBn8TTgYFUdLDu8CTl+H2iz/nYenow8uPf+cvyBQiyRCQxcU+vH9VJViKGKDpiEGcn7lIW5b1MbGGgby0qVTk75vPf1eCUgFIDDnTCrz5/O/S1ce/ZROmv8PIsDAAyrhLcoT/MDIybJcSZPaDiaOXRwIvP/7tE+dnTtx45js4wV148Ass4aDFwRBkxvlXVZLlz4ev/4okBJinIWvEVbApvP38L/LT93/2vJxMoEzJ8OXHv6sKoiy7QdkMQzUDAwMAuq71NKWtMMgAAAAASUVORK5CYII=";var Om={icon_center:Rt,icon_anchor:tt,icon_midAnchor:ph,icon_size:[12,12],clampToModel:!1},$r=class{constructor(){this._viewer=void 0,this._anchorLayer=new r.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new mt,this._tooltipMess=void 0,this._pickedAnchor=void 0,this._isMoving=!1,this._anchors=[]}set tooltipMess(e){this._tooltipMess=e}_onClick(e){if(this._isMoving){let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(b.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:i})),this._isMoving=!1}else{if(!e.target||!e.target.id)return!1;this._pickedAnchor=e.target.id,this._isMoving=!0}}_onMouseMove(e){if(this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess),!this._isMoving&&this._anchors.length!==0)return!1;let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!i)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(i),this._plotEvent.fire(b.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:i})):this._anchors.length===0&&this._plotEvent.fire(b.ANCHOR_MOVING,{position:i})}_onRightClick(e){let i=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(b.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:i})}_onCreateAnchor({position:e,index:i,isCenter:s=!1,isMid:o=!1}){var h;let a=o?this._options.icon_midAnchor:s?this._options.icon_center:this._options.icon_anchor,n=this._anchorLayer.entities.add({position:e,billboard:{image:a,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new r.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new r.Cartesian3(0,0,-100),disableDepthTestDistance:(h=this._options.disableDepthTestDistance)!=null?h:0,heightReference:this._viewer.scene.mode===r.SceneMode.SCENE3D&&!this._options.clampToModel?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},properties:{isMid:o,index:i}});this._anchors.push(n)}_onUpdateAnchor({index:e,position:i}){this._anchors[e]&&this._anchors[e].position.setValue(i)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(H.CLICK,this._onClick,this),this._viewer.on(H.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(H.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(b.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(b.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(b.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(H.CLICK,this._onClick,this),this._viewer.off(H.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(H.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(b.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(b.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(b.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,i,s){return this._plotEvent.on(e,i,s||this),this}off(e,i,s){return this._plotEvent.off(e,i,s||this),this}fire(e,i){return this._plotEvent.fire(e,i),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...Om,...e},this._unbindEvent(),this._bindEvent(),this.fire(b.EDIT_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._anchors=[],this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"editTool",{value:this,writable:!1})}},mh=$r;function es(){return{drawTool:new dh,editTool:new mh}}var{ImageryLayer:km}=r,ts=class{constructor(e={}){if(!e.globe)throw new Error("globe is required");this._globe=e.globe,this._imageryLayers=[],this._selectedImageryLayer=void 0,this._count=0}get selectedImageryLayer(){return this._selectedImageryLayer}set selectedImageryLayer(e){if((!e||!e.layers)&&new Error("imagery format error"),!(this._selectedImageryLayer&&e.id===this._selectedImageryLayer.id)){if(this._selectedImageryLayer&&e.id!==this._selectedImageryLayer.id){for(let i=0;i<this._selectedImageryLayer.cache.length;i++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[i]);e.cache=[]}for(let i=e.layers.length-1;i>=0;i--){let s=e.layers[i],o=km.fromProviderAsync(s,e.options);s&&this._globe.imageryLayers.add(o,0),e.cache.push(o)}this._selectedImageryLayer=e}}addImageryLayer(e,i={}){let s=[];return Array.isArray(e)?s=e.slice(0):s=[e],this._count++,this._imageryLayers.push({id:`imagery-no-${this._count}`,layers:s,cache:[]}),this}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},is=ts;var{BoxGeometry:uh,Cartesian3:zm,defined:Se,DeveloperError:fh,GeometryPipeline:Nm,Matrix3:_h,Matrix4:rs,Transforms:Fm,VertexFormat:Wm,BufferUsage:Gm,CubeMap:Hm,loadCubeMap:Bm,RenderState:Um,VertexArray:Vm,BlendingState:Zm,SceneMode:gh,ShaderProgram:jm,ShaderSource:Ym,SkyBox:qm}=r,Xm=`
|
|
194
194
|
uniform samplerCube u_cubeMap;
|
|
195
195
|
in vec3 v_texCoord;
|
|
196
196
|
void main()
|
|
@@ -198,7 +198,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
|
|
|
198
198
|
vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
|
|
199
199
|
out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
|
|
200
200
|
}
|
|
201
|
-
`,
|
|
201
|
+
`,Jm=`
|
|
202
202
|
in vec3 position;
|
|
203
203
|
out vec3 v_texCoord;
|
|
204
204
|
uniform mat3 u_rotateMatrix;
|
|
@@ -208,7 +208,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
|
|
|
208
208
|
gl_Position = czm_projection * vec4(p, 1.0);
|
|
209
209
|
v_texCoord = position.xyz;
|
|
210
210
|
}
|
|
211
|
-
`,ps=class extends vf{constructor(e={}){super(e),this.offsetAngle=(e==null?void 0:e.offsetAngle)||0}update(e,i){let s=this;if(!this.show||e.mode!==ah.SCENE3D&&e.mode!==ah.MORPHING||!e.passes.render)return;let a=e.context;if(this._sources!==this.sources){this._sources=this.sources;let n=this.sources;if(!Ie(n.positiveX)||!Ie(n.negativeX)||!Ie(n.positiveY)||!Ie(n.negativeY)||!Ie(n.positiveZ)||!Ie(n.negativeZ))throw new rh("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof n.positiveX!=typeof n.negativeX||typeof n.positiveX!=typeof n.positiveY||typeof n.positiveX!=typeof n.negativeY||typeof n.positiveX!=typeof n.positiveZ||typeof n.positiveX!=typeof n.negativeZ)throw new rh("this.sources properties must all be the same type.");typeof n.positiveX=="string"?mf(a,this._sources).then(function(h){s._cubeMap=s._cubeMap&&s._cubeMap.destroy(),s._cubeMap=h}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new pf({context:a,source:n}))}let o=this._command;if(o.modelMatrix=hf.eastNorthUpToFixedFrame(e.camera.positionWC),this.offsetAngle!==0&&ds.multiply(o.modelMatrix,ds.fromRotationTranslation(sh.fromRotationZ(this.offsetAngle/180*Math.PI)),o.modelMatrix),!Ie(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return s._cubeMap},u_rotateMatrix:function(){return ds.getMatrix3(o.modelMatrix,new sh)}};let n=ih.createGeometry(ih.fromDimensions({dimensions:new nf(2,2,2),vertexFormat:cf.POSITION_ONLY})),h=this._attributeLocations=lf.createAttributeLocations(n);o.vertexArray=ff.fromGeometry({context:a,geometry:n,attributeLocations:h,bufferUsage:df._DRAW}),o.renderState=uf.fromCache({blending:_f.ALPHA_BLEND})}if(!Ie(o.shaderProgram)||this._useHdr!==i){let n=new yf({defines:[i?"HDR":""],sources:[wf]});o.shaderProgram=gf.fromCache({context:a,vertexShaderSource:xf,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._useHdr=i}if(Ie(this._cubeMap))return o}},oh=ps;var Cf={creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),baseLayer:!1,shouldAnimate:!0},ms=class{constructor(e,i={}){if(__cmdOut&&__cmdOut(),!e||typeof e=="string"&&!document.getElementById(e))throw new Error("Viewer: the container is empty");if(e instanceof HTMLElement)throw new Error("Viewer: not support the type container");if(typeof e=="string"){let o=$i("baseUrl");o&&r.buildModuleUrl.setBaseUrl(o)}this._delegate=typeof e!="string"?e:new r.CesiumWidget(e,{...Cf,...i}),this._delegate.canvas.parentNode.className="viewer-canvas",new cr(this,i),this._viewerEvent=new pr,this._sceneEvent=new ur(this),this._viewerOption=new Gr(this),this._cameraOption=new Wr(this),this._cameraOption.changeMouseMode(we.LEFT_RIGHT),this._widgetContainer=D.create("div","viewer-widgets",typeof e=="string"?document.getElementById(e):this._delegate.container),this._layerContainer=D.create("div","viewer-layers",typeof e=="string"?document.getElementById(e):this._delegate.container),this._baseLayerPicker=new cs({globe:this._delegate.scene.globe}),this._layerGroupCache={},this._layerCache={};let s=as();Object.keys(s).forEach(o=>{this._use(s[o])});let a=ls();Object.keys(a).forEach(o=>{this._use(a[o])})}get delegate(){return this._delegate}get container(){return this._delegate.container}get widgetContainer(){return this._widgetContainer}get layerContainer(){return this._layerContainer}get scene(){return this._delegate.scene}get camera(){return this._delegate.camera}get canvas(){return this._delegate.scene.canvas}get dataSources(){return this._delegate.dataSources}get imageryLayers(){return this._delegate.imageryLayers}get terrainProvider(){return this._delegate.terrainProvider}get entities(){return this._delegate.entities}get postProcessStages(){return this._delegate.scene.postProcessStages}get clock(){return this._delegate.clock}get viewerEvent(){return this._viewerEvent}get cameraPosition(){var i,s,a,o,n,h,c;let e=y.transformCartographicToWGS84((i=this.camera)==null?void 0:i.positionCartographic);return e&&(e.heading=r.Math.toDegrees((a=(s=this.camera)==null?void 0:s.heading)!=null?a:0),e.pitch=r.Math.toDegrees((n=(o=this.camera)==null?void 0:o.pitch)!=null?n:0),e.roll=r.Math.toDegrees((c=(h=this.camera)==null?void 0:h.roll)!=null?c:0)),e}get resolution(){let e=this.scene.canvas.width,i=this.scene.canvas.height,s=y.transformWindowToWGS84(new r.Cartesian2(e/2|0,i-1),this),a=y.transformWindowToWGS84(new r.Cartesian2(1+e/2|0,i-1),this);return!s||!a?1:Math.abs(s.lng-a.lng)}get viewBounds(){let e=this.scene.canvas.width,i=this.scene.canvas.height,s=y.transformWindowToWGS84(new r.Cartesian2(0,i),this),a=y.transformWindowToWGS84(new r.Cartesian2(e,0),this);return!s||!a?r.Rectangle.MAX_VALUE:r.Rectangle.fromDegrees(s.lng,s.lat,a.lng,a.lat)}get zoom(){let e=this.camera.positionCartographic.height,i=40487.57,s=7096758e-11,a=91610.74,o=-40467.74;return Math.round(o+(i-o)/(1+Math.pow(e/a,s)))}get centerPosition(){return this.camera.pickEllipsoid(new r.Cartesian2(this.canvas.clientWidth/2,this.canvas.clientHeight/2))}get centerPositionWGS84(){let e=this.centerPosition,i=r.Ellipsoid.WGS84.cartesianToCartographic(e),s=i.longitude*180/Math.PI,a=i.latitude*180/Math.PI,o=this.cameraHeight;return new X(s,a,0,o)}get cameraHeight(){return this.scene.globe.ellipsoid.cartesianToCartographic(this.camera.position).height}_use(e){return e&&e.install&&e.install(this),this}_addLayerGroup(e){e!=null&&e.layerGroupEvent&&!Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(He.ADD,this),this._layerGroupCache[e.id]=e)}_removeLayerGroup(e){e!=null&&e.layerGroupEvent&&Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(He.REMOVE,this),delete this._layerGroupCache[e.id])}_addLayer(e){!this._layerCache[e.type]&&(this._layerCache[e.type]={}),Object(this._layerCache[e.type]).hasOwnProperty(e.id)||(e.fire(We.ADD,this),this._layerCache[e.type][e.id]=e)}_removeLayer(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.fire(We.REMOVE,this),delete this._layerCache[e.type][e.id])}setOptions(e){return this._viewerOption.setOptions(e),this}setPitchRange(e=-90,i=-20){return this._cameraOption.setPitchRange(e,i),this}changeSceneMode(e,i=0){return e===2?this._delegate.scene.morphTo2D(i):e===3?this._delegate.scene.morphTo3D(i):e===2.5&&this._delegate.scene.morphToColumbusView(i),this}changeMouseMode(e){return this._cameraOption.changeMouseMode(e),this}setTerrain(e){return this._delegate.scene.setTerrain(new r.Terrain(e||Promise.resolve(new r.EllipsoidTerrainProvider))),this}addBaseLayer(e,i={}){return e?(this._baseLayerPicker.addImageryLayer(e,i),this._baseLayerPicker.selectedImageryLayer||this._baseLayerPicker.changeImageryLayer(0),this.mapSwitch&&this.mapSwitch.addMap(i),this):this}changeBaseLayer(e){return this._baseLayerPicker.changeImageryLayer(e),this}getImageryLayerInfo(e){let i=this._delegate.camera.getPickRay(e);return this._delegate.imageryLayers.pickImageryLayerFeatures(i,this._delegate.scene)}addLayerGroup(e){return this._addLayerGroup(e),this}removeLayerGroup(e){return this._removeLayerGroup(e),this}getLayerGroup(e){return this._layerGroupCache[e]||void 0}addLayer(e){return this._addLayer(e),this}removeLayer(e){return this._removeLayer(e),this}hasLayer(e){return Object(this._layerCache[e.type]).hasOwnProperty(e.id)}getLayer(e){let i=this.getLayers().filter(s=>s.id===e);return i&&i.length?i[0]:void 0}getLayers(){let e=[];return Object.keys(this._layerCache).forEach(i=>{let s=this._layerCache[i];Object.keys(s).forEach(a=>{e.push(s[a])})}),e}eachLayer(e,i){return Object.keys(this._layerCache).forEach(s=>{let a=this._layerCache[s];Object.keys(a).forEach(o=>{e.call(i,a[o])})}),this}flyTo(e,i){return this._delegate.flyTo((e==null?void 0:e.delegate)||e,{duration:i}),this}zoomTo(e){return this._delegate.zoomTo((e==null?void 0:e.delegate)||e),this}flyToPosition(e,i,s){return e=v.parsePosition(e),this.camera.flyTo({destination:y.transformWGS84ToCartesian(e),orientation:{heading:r.Math.toRadians(e.heading),pitch:r.Math.toRadians(e.pitch),roll:r.Math.toRadians(e.roll)},complete:i,duration:s}),this}flyToPoint(e,i={}){return new Promise((s,a)=>{if(!e){s(!1);return}e=U.parse(e);let o=e.toCartesian();if(i.clampToGround)if(i.hasTerrain){Se.getSurfaceHeight(this._delegate.scene,o,{has3dtiles:!0}).then(f=>{e.alt=f.height*(this._delegate.scene.globe.terrainExaggeration||1),delete i.clampToGround,this.flyToPoint(e,i).then(g=>{s(g)})});return}else e.alt=0,o=e.toCartesian();let n=i.radius||this.getCameraDistance()||100;r.defined(i.scale)&&i.scale>0&&(n*=i.scale),r.defined(i.minHeight)&&n<i.minHeight&&(n=i.minHeight),r.defined(i.maxHeight)&&n>i.maxHeight&&(n=i.maxHeight);let h;if(r.defined(i.pitch))h=r.Math.toRadians(i.pitch);else{h=this._delegate.camera.pitch;let f=r.Math.toDegrees(h);r.defined(i.minPitch)&&f<i.minPitch&&(h=r.Math.toRadians(i.minPitch)),r.defined(i.maxPitch)&&f>i.maxPitch&&(h=r.Math.toRadians(i.maxPitch))}let c=r.defined(i.heading)?r.Math.toRadians(i.heading):this._delegate.camera.heading,d=new r.HeadingPitchRange(c,h,n),p=new r.BoundingSphere(o,0);i.duration===0?(this._delegate.camera.lookAt(o,d),!i.lock&&!this._delegate.trackedEntity&&this._delegate.camera.lookAtTransform(r.Matrix4.IDENTITY),i.complete&&i.complete(),s(!0)):this._delegate.camera.flyToBoundingSphere(p,{...i,offset:d,complete:()=>{i.complete&&i.complete(),s(!0)},cancel:()=>{i.cancel&&i.cancel(),s(!1)}})})}getCenter(){try{let e=this.scene.canvas,i=new r.Cartesian2(e.clientWidth/2,e.clientHeight/2),s=scene.camera.getPickRay(i),a=scene.globe.pick(s,scene);return a||(a=scene.camera.pickEllipsoid(i)),a?U.fromCartesian(a):void 0}catch{return}}getHeight(e,i){var n;let s=this.scene,a=U.toCartographic(e),o;if(s.getHeight?o=s.getHeight(a,i&&i.heightReference):o=s.globe.getHeight(a),r.defined(o)&&o>((n=i&&i.min)!=null?n:-999))return o;if(i!=null&&i.original)return a.height}getCameraDistance(){let e=this.getCenter();return e?(e.alt<0&&(e.alt=0),r.Cartesian3.distance(e.toCartesian(),this._delegate.camera.positionWC)):0}zoomToPosition(e,i){return this.flyToPosition(e,i,0),this}flyToBounds(e,{heading:i=0,pitch:s=0,roll:a=0},o,n){return e?(Array.isArray(e)||(e=e.split(",")),this.camera.flyTo({destination:r.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]),orientation:{heading:r.Math.toRadians(i),pitch:r.Math.toRadians(s),roll:r.Math.toRadians(a)},complete:o,duration:n}),this):this}zoomToBounds(e,{heading:i=0,pitch:s=0,roll:a=0},o){return this.flyToBounds(e,{heading:i,pitch:s,roll:a},o),this}on(e,i,s){return this._viewerEvent.on(e,i,s||this),this._sceneEvent.on(e,i,s||this),this}once(e,i,s){return this._viewerEvent.once(e,i,s||this),this}off(e,i,s){return this._viewerEvent.off(e,i,s||this),this._sceneEvent.off(e,i,s||this),this}destroy(){return Object.keys(this._layerCache).forEach(e=>{let i=this._layerCache[e];Object.keys(i).forEach(s=>{this._removeLayer(i[s])})}),this._delegate.destroy(),this._delegate=void 0,this._baseLayerPicker=void 0,this._layerCache={},this._widgetContainer.parentNode.removeChild(this._widgetContainer),this._widgetContainer=void 0,this._layerContainer.parentNode.removeChild(this._layerContainer),this._layerContainer=void 0,this}exportScene(e){this.scene.render();let s=this.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),a=document.createElement("a"),o=T.dataURLtoBlob(s),n=URL.createObjectURL(o);return a.download=`${e||"scene"}.png`,a.href=n,a.click(),this}getOffset(){var s;let e={x:0,y:0},i=(s=this._delegate)==null?void 0:s.container;if(i)if(i.getBoundingClientRect){let a=i.getBoundingClientRect();e.x=a.left,e.y=a.top}else e.x=i.offsetLeft,e.y=i.offsetTop;return e}},Tf=ms;var q=class q{constructor(e=0,i=0,s=0){this._lng=+e||0,this._lat=+i||0,this._alt=+s||0}get lng(){return this._lng}set lng(e){this._lng=+e}get lat(){return this._lat}set lat(e){this._lat=+e}get alt(){return this._alt}set alt(e){this._alt=+e}clone(){let e=new q;return e.lng=this.lng||0,e.lat=this.lat||0,e.alt=this.alt||0,e}format(){return this.lng=T.formatNum(this.lng,q.FormatLength),this.lat=T.formatNum(this.lat,q.FormatLength),this.alt=T.formatNum(this.alt,q.FormatAltLength),this}toArray(e){return this.format(),e?[this.lng,this.lat]:[this.lng,this.lat,this.alt]}toString(){return this.format(),"".concat(this.lng,",").concat(this.lat,",").concat(this.alt)}toCartesian(e=!1){return!e&&this._position?this._position:r.Cartesian3.fromDegrees(this.lng,this.lat,this.alt)}toCartographic(){return r.Cartographic.fromDegrees(this.lng,this.lat,this.alt)}toMercator(){let e=Math.min(this.lng,180);e=Math.max(e,-180);let i=Math.min(this.lat,85.05112877980659);i=Math.max(i,-85.05112877980659);let s=e*2003750834e-2/180,a=Math.log(Math.tan((90+i)*Math.PI/360))/(Math.PI/180);return a=a*2003750834e-2/180,[s,a,this.alt]}equals(e){return this===e?!0:e instanceof q?this._alt===e._alt&&this._lat===e._lat&&this._lng===e._lng:!1}valid(){return isNaN(this._lat)||isNaN(this._lng)||this._lat<-90||this._lat>90||this._lng<-180||this._lng>180?!1:!(this._lat===0&&this._lng===0&&this._alt===0)}static parse(e,i){if(!e)return new q;if(e instanceof q)return e;let s;if(typeof e=="string")s=q.fromString(e);else if(Array.isArray(e))s=q.fromArray(e);else if(e instanceof q)s=e.clone();else if(r.defined(e.lat)&&r.defined(e.lng)){s=new q(e.lng,e.lat,e.alt);for(let a in e)s[a]=e[a]}else e instanceof r.Cartesian3||e._value||e.getValue?(s=q.fromCartesian(e,i),s._position=e):r.defined(e.x)&&r.defined(e.y)&&r.defined(e.z)?(e=new r.Cartesian3(e.x,e.y,e.z),s=q.fromCartesian(e,i),s._position=e):(s=new q,je("\u5750\u6807\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u786E\u8BA4\u53C2\u6570\u662F\u5426\u65E0\u8BEF",e));return s}static fromArray(e){let i=new q;return Array.isArray(e)&&(i.lng=e[0]||0,i.lat=e[1]||0,i.alt=e[2]||0),i}static fromString(e){let i=new q;if(e&&typeof e=="string"){let s=e.split(",");i=this.fromArray(s)}return i}static fromCartesian(e,i){let s=new q,a;if(e&&(e instanceof r.Cartesian3?a=e:e._value&&e._value instanceof r.Cartesian3?a=e._value:typeof e.getValue=="function"&&(a=e.getValue(i||r.JulianDate.now()))),a){let o=r.Cartographic.fromCartesian(a);o&&(s.lat=r.Math.toDegrees(o.latitude),s.lng=r.Math.toDegrees(o.longitude),s.alt=o.height,s.format())}return s._position=e,s}static fromCartographic(e){let i=new q;return i.lat=r.Math.toDegrees(e.latitude),i.lng=r.Math.toDegrees(e.longitude),i.alt=e.height,i}static fromMercator(e){let i=Number(e[0]),s=Number(e[1]),a=i/2003750834e-2*180,o=s/2003750834e-2*180;return o=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),new q(a,o,e[2]||0)}static toCartesian(e,i){return!e||e instanceof r.Cartesian3?e:q.parse(e,i).toCartesian(!0)}static toCartographic(e,i){return!e||e instanceof r.Cartographic?e:q.parse(e,i).toCartographic()}static toArray(e,i){let s=q.parse(e);return!s||!s.valid()?[]:s.toArray(i)}};pt(q,"FormatLength",6),pt(q,"FormatAltLength",1);var us=q,U=us;var fs=class{static toCartesians(e,i){if(!e||!Array.isArray(e))return e;let s=[];return e.forEach(function(a){if(a instanceof r.Cartesian3){i?s.push(a.clone()):s.push(a);return}let o=U.parse(a);!o||!o.valid()||s.push(o.toCartesian(!0))}),s}static toCartographics(e,i){if(!e||!Array.isArray(e))return e;let s=[];return e.forEach(function(a){if(a instanceof r.Cartographic){i?s.push(a.clone()):s.push(a);return}let o=U.parse(a);!o||!o.valid()||s.push(o.toCartographic())}),s}static toPoints(e,i){if(!e||!Array.isArray(e))return e;let s=[];return e.forEach(function(a){if(a instanceof U&&!i){s.push(a);return}let o=U.parse(a);!o||!o.valid()||s.push(o)}),s}static toArray(e,i){if(!e||!Array.isArray(e))return e;let s=[];return e.forEach(function(a){if(Array.isArray(a)){s.push(a);return}let o=U.parse(a);!o||!o.valid()||s.push(o.toArray(i))}),s}},$e=fs;var _s=class{constructor(e){this.options=e,this.scene=e.map?e.map.scene:e.scene,this.scene||je("SurfacePoint: \u8BF7\u4F20\u5165scene\u53C2\u6570",this.options),this._point=U.parse(e.position),this._point&&(this._position=this._point.toCartesian(),this._cartographic=this._point.toCartographic(),this._height_original=this._point.alt)}async start(){var s;if(!this._point)return this.getResult();this.scene._terrainProviderPromise&&await this.scene._terrainProviderPromise;let e=(s=this.options.has3dtiles)!=null?s:r.defined(Se.pick3DTileset(this.scene,this._position)),i=!(this.scene.terrainProvider instanceof r.EllipsoidTerrainProvider);if(this._has3dtiles=e,this._hasTerrain=i,!i&&!e)return this.getResult();if(e){let a=await this.scene.clampToHeightMostDetailed([this._position.clone()],this.options.objectsToExclude,this.options.width);if(a.length>0){let o=a[0];if(r.defined(o)){let n=r.Cartographic.fromCartesian(o),h=n?n.height:0;if(r.defined(h)&&h!==0&&h>-1e3)return this.getResult(h)}}else{let o=this.scene.sampleHeight(this._cartographic,this.options.objectsToExclude,this.options.width);if(r.defined(o)&&o>-1e3)return this.getResult(o)}}if(this._hasTerrain){let a;try{let o=this.scene.terrainProvider;o&&o.availability&&(a=await r.sampleTerrainMostDetailed(this.scene.terrainProvider,[this._cartographic]))}catch(o){Lt("SurfacePoint:\u8D34\u5730\u5F62\u9AD8\u5EA6\u8BA1\u7B97\u5931\u8D25",o)}if(a&&a.length>0){let o=a[0];if(r.defined(o)&&r.defined(o.height))return this.getResult(o.height)}else return this.getResult(this.scene.globe.getHeight(this._cartographic)||0)}return this.getResult()}getResult(e=0){return this.options.callback&&this.options.callback(e)&&(this._point.alt=e),{height:e,height_original:this._height_original,point:this._point,position:r.Cartesian3.fromRadians(this._cartographic.longitude,this._cartographic.latitude,e),position_original:this._position,has3dtiles:this._has3dtiles,hasTerrain:this._hasTerrain}}},Dt=_s;var gs=class{constructor(e){this.options=e,this.scene=e.map?e.map.scene:e.scene,this.scene||je("SurfacePoints: \u8BF7\u4F20\u5165scene\u53C2\u6570",this.options),this.positions=$e.toCartesians(this.options.positions)}async start(){var s;if(this.positions==null||this.positions.length===0){this.getResult();return}this.scene._terrainProviderPromise&&await this.scene._terrainProviderPromise();let e=(s=this.options.has3dtiles)!=null?s:r.defined(Se.pick3DTileset(this.scene,this.positions)),i=!(this.scene.terrainProvider instanceof r.EllipsoidTerrainProvider);return this._has3dtiles=e,this._hasTerrain=i,!i&&!e?this.getResult():this.options.exact?this._startForExact():this._startForSketchy()}async _startForExact(){var e;if(this._has3dtiles){let i=[];for(let a=0;a<this.positions.length;++a)i.push(this.positions[a].clone());let s=await this.scene.clampToHeightMostDetailed(i,this.options.objectsToExclude);for(let a=0;a<s.length;++a)!s[a]&&(s[a]=this.positions[a]);if(s.length>0)return this.options.offset&&(s=Se.addPositionsHeight(s,this.options.offset)),this.getResult(s)}if(this._hasTerrain&&this.scene.terrainProvider&&this.scene.terrainProvider.availability){let i=this.scene.globe.ellipsoid,s=i.cartesianArrayToCartographicArray(_0x1da275),a=r.Cartographic.fromCartesian(_0x1da275[0]).height,o=(e=this.options.offset)!=null?e:0,n=!1,h=await r.sampleTerrainMostDetailed(this.scene.terrainProvider,s);for(let d=0;d<h.length;++d)h[d]||(h[d]=this.positions[d]),h[d].height==null?(n=!0,h[d].height=o+a):h[d].height=o+h[d].height;let c=i.cartographicArrayToCartesianArray(h);return this.getResult(c,n)}return this.getResult()}async _startForSketchy(){let e=[];for(let i=0;i<this.positions.length;++i){let s=r.Cartographic.fromCartesian(this.positions[i]),a;if(this._has3dtiles){let o=this.scene.sampleHeight(s,this.options.objectsToExclude,this.options.width);r.defined(o)&&o>-1e3&&(a=o)}if(!r.defined(a)){let o=this.scene.globe.getHeight(s);r.defined(o)&&o>-1e3&&(a=o)}e.push(r.Cartesian3.fromRadians(s.longitude,s.latitude,a!=null?a:s.height))}return this.getResult(e)}getResult(e,i){return this.options.callback&&this.options.callback(e,i,this.positions),{positions:e||this.positions,positions_original:this.positions,noHeight:i,has3dtiles:this._has3dtiles,hasTerrain:this._hasTerrain}}},Sl=gs;var Ef={ARCGIS:"arcgis",BING:"bing",OSM:"osm",SINGLE_TILE:"single_tile",WMS:"wms",WMTS:"wmts",XYZ:"xyz",COORD:"coord",AMAP:"amap",BAIDU:"baidu",GOOGLE:"google",TDT:"tdt",TENCENT:"tencent",GEO_VIS:"geo_vis",GRID:"grid",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",TMS:"tms"},V=Ef;var ys=class extends r.WebMercatorTilingScheme{constructor(e){super(e);let i=new r.WebMercatorProjection;this._projection.project=function(s,a){return a=Ce.WGS84ToGCJ02(r.Math.toDegrees(s.longitude),r.Math.toDegrees(s.latitude)),a=i.project(new r.Cartographic(r.Math.toRadians(a[0]),r.Math.toRadians(a[1]))),new r.Cartesian2(a.x,a.y)},this._projection.unproject=function(s,a){let o=i.unproject(s);return a=Ce.GCJ02ToWGS84(r.Math.toDegrees(o.longitude),r.Math.toDegrees(o.latitude)),new r.Cartographic(r.Math.toRadians(a[0]),r.Math.toRadians(a[1]))}}},Ot=ys;var nh={img:"//webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",elec:"//webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",cva:"//webst{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"},vs=class extends r.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",nh[e.style]||nh.elec].join(""),e.subdomains=e.subdomains||["01","02","03","04"],e.crs==="WGS84"&&(e.tilingScheme=new Ot),super(e)}};V.AMAP="amap";var lh=vs;var Pf=637099681e-2,hh=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],kt=[75,60,45,30,15,0],Mf=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],ch=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],ws=class{constructor(){this.isWgs84=!1}getDistanceByMC(e,i){if(!e||!i||(e=this.convertMC2LL(e),!e))return 0;let s=this.toRadians(e.lng),a=this.toRadians(e.lat);if(i=this.convertMC2LL(i),!i)return 0;let o=this.toRadians(i.lng),n=this.toRadians(i.lat);return this.getDistance(s,o,a,n)}getDistanceByLL(e,i){if(!e||!i)return 0;e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74),i.lng=this.getLoop(i.lng,-180,180),i.lat=this.getRange(i.lat,-74,74);let s=this.toRadians(e.lng),a=this.toRadians(e.lat),o=this.toRadians(i.lng),n=this.toRadians(i.lat);return this.getDistance(s,o,a,n)}convertMC2LL(e){if(!e)return{lng:0,lat:0};let i={};if(this.isWgs84){i.lng=e.lng/2003750834e-2*180;let o=e.lat/2003750834e-2*180;return i.lat=180/Math.PI*(2*Math.atan(Math.exp(o*Math.PI/180))-Math.PI/2),{lng:i.lng.toFixed(6),lat:i.lat.toFixed(6)}}let s={lng:Math.abs(e.lng),lat:Math.abs(e.lat)},a;for(let o=0;o<hh.length;o++)if(s.lat>=hh[o]){a=Mf[o];break}return i=this.convertor(e,a),{lng:i.lng.toFixed(6),lat:i.lat.toFixed(6)}}convertLL2MC(e){if(!e)return{lng:0,lat:0};if(e.lng>180||e.lng<-180||e.lat>90||e.lat<-90)return e;if(this.isWgs84){let o={},n=6378137;o.lng=e.lng*Math.PI/180*n;let h=e.lat*Math.PI/180;return o.lat=n/2*Math.log((1+Math.sin(h))/(1-Math.sin(h))),{lng:parseFloat(o.lng.toFixed(2)),lat:parseFloat(o.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);let i={lng:e.lng,lat:e.lat},s;for(let o=0;o<kt.length;o++)if(i.lat>=kt[o]){s=ch[o];break}if(!s){for(let o=0;o<kt.length;o++)if(i.lat<=-kt[o]){s=ch[o];break}}let a=this.convertor(e,s);return{lng:parseFloat(a.lng.toFixed(2)),lat:parseFloat(a.lat.toFixed(2))}}convertor(e,i){if(!e||!i)return{lng:0,lat:0};let s=i[0]+i[1]*Math.abs(e.lng),a=Math.abs(e.lat)/i[9],o=i[2]+i[3]*a+i[4]*a*a+i[5]*a*a*a+i[6]*a*a*a*a+i[7]*a*a*a*a*a+i[8]*a*a*a*a*a*a;return s*=e.lng<0?-1:1,o*=e.lat<0?-1:1,{lng:s,lat:o}}getDistance(e,i,s,a){return Pf*Math.acos(Math.sin(s)*Math.sin(a)+Math.cos(s)*Math.cos(a)*Math.cos(i-e))}toRadians(e){return Math.PI*e/180}toDegrees(e){return 180*e/Math.PI}getRange(e,i,s){return i!=null&&(e=Math.max(e,i)),s!=null&&(e=Math.min(e,s)),e}getLoop(e,i,s){for(;e>s;)e-=s-i;for(;e<i;)e+=s-i;return e}lngLatToMercator(e){return this.convertLL2MC(e)}lngLatToPoint(e){let i=this.convertLL2MC(e);return{x:i.lng,y:i.lat}}mercatorToLngLat(e){return this.convertMC2LL(e)}pointToLngLat(e){let i={lng:e.x,lat:e.y};return this.convertMC2LL(i)}pointToPixel(e,i,s,a){if(!e)return{x:0,y:0};e=this.lngLatToMercator(e);let o=this.getZoomUnits(i),n=Math.round((e.lng-s.lng)/o+a.width/2),h=Math.round((s.lat-e.lat)/o+a.height/2);return{x:n,y:h}}pixelToPoint(e,i,s,a){if(!e)return{lng:0,lat:0};let o=this.getZoomUnits(i),n=s.lng+o*(e.x-a.width/2),h=s.lat-o*(e.y-a.height/2),c={lng:n,lat:h};return this.mercatorToLngLat(c)}getZoomUnits(e){return Math.pow(2,18-e)}},dh=ws;var xs=class extends r.WebMercatorTilingScheme{constructor(e){super(e);let i=new dh;this._projection.project=function(s,a){return a=a||{},a=Ce.WGS84ToGCJ02(r.Math.toDegrees(s.longitude),r.Math.toDegrees(s.latitude)),a=Ce.GCJ02ToBD09(a[0],a[1]),a[0]=Math.min(a[0],180),a[0]=Math.max(a[0],-180),a[1]=Math.min(a[1],74.000022),a[1]=Math.max(a[1],-71.988531),a=i.lngLatToPoint({lng:a[0],lat:a[1]}),new r.Cartesian2(a.x,a.y)},this._projection.unproject=function(s,a){return a=a||{},a=i.mercatorToLngLat({lng:s.x,lat:s.y}),a=Ce.BD09ToGCJ02(a.lng,a.lat),a=Ce.GCJ02ToWGS84(a[0],a[1]),new r.Cartographic(r.Math.toRadians(a[0]),r.Math.toRadians(a[1]))},this.resolutions=e.resolutions||[]}tileXYToNativeRectangle(e,i,s,a){let o=this.resolutions[s],n=e*o,h=(e+1)*o,c=((i=-i)+1)*o,d=i*o;return r.defined(a)?(a.west=n,a.south=d,a.east=h,a.north=c,a):new r.Rectangle(n,d,h,c)}positionToTileXY(e,i,s){let a=this._rectangle;if(!r.Rectangle.contains(a,e))return;let n=this._projection.project(e);if(!r.defined(n))return;let h=this.resolutions[i],c=Math.floor(n.x/h),d=-Math.floor(n.y/h);return r.defined(s)?(s.x=c,s.y=d,s):new r.Cartesian2(c,d)}},ph=xs;var mh={img:"//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",vec:"//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",custom:"//api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}",traffic:"//its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2"},Cs=class extends r.UrlTemplateImageryProvider{constructor(e={}){if(e.url=e.url||[e.protocol||"",mh[e.style]||mh.custom].join(""),e.crs==="WGS84"){let i=[];for(let s=0;s<19;s++)i[s]=256*Math.pow(2,18-s);e.tilingScheme=new ph({resolutions:i,rectangleSouthwestInMeters:new r.Cartesian2(-2003772637e-2,-1247410417e-2),rectangleNortheastInMeters:new r.Cartesian2(2003772637e-2,1247410417e-2)})}else e.tilingScheme=new r.WebMercatorTilingScheme({rectangleSouthwestInMeters:new r.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new r.Cartesian2(33554054,33746824)});e.maximumLevel=18,super(e),this._rectangle=this._tilingScheme.rectangle,this._url=e.url,this._crs=e.crs||"BD09",this._style=e.style||"normal"}requestImage(e,i,s){let a=this._tilingScheme.getNumberOfXTilesAtLevel(s),o=this._tilingScheme.getNumberOfYTilesAtLevel(s),n=this._url.replace("{z}",s).replace("{s}",String(1)).replace("{style}",this._style);return this._crs==="WGS84"?n=n.replace("{x}",String(e)).replace("{y}",String(-i)):n=n.replace("{x}",String(e-a/2)).replace("{y}",String(o/2-i-1)),r.ImageryProvider.loadImage(this,n)}};V.BAIDU="baidu";var uh=Cs;var bf="//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}",Ts=class extends r.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",bf.replace(/\{style\}/g,e.style||"vec").replace(/\{format\}/g,e.format||"png").replace(/\{key\}/g,e.key||"")].join(""),e.subdomains=e.subdomains||["1","2","3"],super(e)}};V.GEO_VIS="geoVis";var fh=Ts;var _h={img:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}",elec:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x={x}&y={y}&z={z}",cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=h&x={x}&y={y}&z={z}",ter:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=t@131,r&x={x}&y={y}&z={z}",img_cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=y&x={x}&y={y}&z={z}"},Es=class extends r.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",_h[e.style]||_h.elec].join(""),e.crs==="WGS84"&&(e.tilingScheme=new Ot),super(e)}};V.GOOGLE="google";var gh=Es;var Nt=class{constructor(e){this.options=e}static getTheme(e){return this.THEMES[e]||this.THEMES.grayscale}static getThemeList(){return Object.keys(this.THEMES).map(e=>({key:e,...this.THEMES[e]}))}static async convertToTheme(e,i="grayscale"){let s=document.createElement("canvas");s.width=e.width,s.height=e.height;let a=s.getContext("2d");a.drawImage(e,0,0);let o=a.getImageData(0,0,s.width,s.height),n=o.data,h;typeof i=="object"?h=i:h=this.getTheme(i);let c=new Map;for(let[d,p]of h.colorList){let f=`${d[0]},${d[1]},${d[2]}`;c.set(f,p)}for(let d=0;d<n.length;d+=4){let p=n[d],f=n[d+1],g=n[d+2],u=`${p},${f},${g}`;if(c.has(u)){let m=c.get(u);n[d]=m[0],n[d+1]=m[1],n[d+2]=m[2]}else{let m=Number.MAX_VALUE,E=null;for(let[w,P]of h.colorList){let b=Math.sqrt(Math.pow(p-w[0],2)+Math.pow(f-w[1],2)+Math.pow(g-w[2],2));b<m&&(m=b,E=P)}E&&m<50?(n[d]=E[0],n[d+1]=E[1],n[d+2]=E[2]):(n[d]=h.defaultColor[0],n[d+1]=h.defaultColor[1],n[d+2]=h.defaultColor[2])}}return a.putImageData(o,0,0),a.filter="contrast(1.1) brightness(1.05)",a.drawImage(s,0,0),await createImageBitmap(s)}};pt(Nt,"THEMES",{grayscale:{name:"\u7ECF\u5178\u7070",colorList:[[[245,244,238],[0,23,47]],[[254,240,145],[0,2,5]],[[200,200,200],[50,50,50]]],defaultColor:[40,67,102]},fresh:{name:"\u6E05\u65B0\u7EFF",colorList:[[[245,244,238],[220,240,230]],[[254,240,145],[200,230,180]],[[200,200,200],[180,200,190]]],defaultColor:[150,180,170]},orange:{name:"\u6D3B\u529B\u6A59",colorList:[[[245,244,238],[255,245,235]],[[254,240,145],[255,220,170]],[[200,200,200],[220,180,150]]],defaultColor:[200,140,100]},techBlue:{name:"\u79D1\u6280\u84DD",colorList:[[[245,244,238],[0,100,200]],[[254,240,145],[0,150,255]],[[200,200,200],[50,100,150]]],defaultColor:[0,80,160]},freshGreen:{name:"\u6DE1\u96C5\u7EFF",colorList:[[[245,244,238],[180,220,180]],[[254,240,145],[150,200,150]],[[200,200,200],[120,180,120]]],defaultColor:[100,160,100]},purple:{name:"\u4F18\u96C5\u7D2B",colorList:[[[245,244,238],[240,230,250]],[[254,240,145],[220,190,240]],[[200,200,200],[180,150,200]]],defaultColor:[150,100,180]}});var Ps=Nt;var Af="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",Ms=class extends r.UrlTemplateImageryProvider{constructor(e={}){e.style=e.style||"vec",e.colorScheme=e.colorScheme||"default",super({url:[e.protocol||"",Af.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18}),this._options=e}async requestImage(e,i,s,a){let o=await super.requestImage(e,i,s,a);return this._options.colorScheme==="default"||!Ps.THEMES[this._options.colorScheme]||this._options.style!=="vec"?o:this.convertToGrayscale(o,this._options.colorScheme)}async convertToGrayscale(e,i="grayscale"){return await Ps.convertToTheme(e,i)}};V.TDT="tdt";var yh=Ms;var vh={img:"//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400",elec:"//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347"},bs=class extends r.UrlTemplateImageryProvider{constructor(e={}){let i=e.url||[e.protocol||"",vh[e.style]||vh.elec].join("");e.url=i.replace("{style}",e.style||1),e.subdomains=e.subdomains||["1","2","3"],e.style==="img"&&(e.customTags={sx:(s,a,o,n)=>a>>4,sy:(s,a,o,n)=>(1<<n)-o>>4}),super(e)}};V.TENCENT="tencent";var wh=bs;var As=class{static createAMapImageryLayer(e){return Promise.resolve(new lh(e))}static createBaiduImageryLayer(e){return Promise.resolve(new uh(e))}static createGeoVisImageryLayer(e){return Promise.resolve(new fh(e))}static createGoogleImageryLayer(e){return Promise.resolve(new gh(e))}static createTdtImageryLayer(e){return Promise.resolve(new yh(e))}static createTencentImageryLayer(e){return Promise.resolve(new wh(e))}static createArcGisImageryLayer(e){return r.ArcGisMapServerImageryProvider.fromUrl(e.url,e)}static createBingImageryLayer(e){return r.BingMapsImageryProvider.fromUrl(e.url,e)}static createOSMImageryLayer(e){return Promise.resolve(new r.OpenStreetMapImageryProvider(e))}static createSingleTileImageryLayer(e){return r.SingleTileImageryProvider.fromUrl(e.url,e)}static createWMSImageryLayer(e){return Promise.resolve(new r.WebMapServiceImageryProvider(e))}static createWMTSImageryLayer(e){return Promise.resolve(new r.WebMapTileServiceImageryProvider(e))}static createXYZImageryLayer(e){return Promise.resolve(new r.UrlTemplateImageryProvider(e))}static createCoordImageryLayer(e){return Promise.resolve(new r.TileCoordinatesImageryProvider(e))}static createGridImageryLayer(e){return Promise.resolve(new r.GridImageryProvider(e))}static createMapboxImageryLayer(e){return Promise.resolve(new r.MapboxImageryProvider(e))}static createMapboxStyleImageryLayer(e){return Promise.resolve(new r.MapboxStyleImageryProvider(e))}static createTMSImageryLayer(e){return r.TileMapServiceImageryProvider.fromUrl(e.url,e)}static createImageryLayer(e,i){let s;switch(e){case V.AMAP:s=this.createAMapImageryLayer(i);break;case V.BAIDU:s=this.createBaiduImageryLayer(i);break;case V.GEO_VIS:s=this.createGeoVisImageryLayer(i);break;case V.GOOGLE:s=this.createGoogleImageryLayer(i);break;case V.TDT:s=this.createTdtImageryLayer(i);break;case V.TENCENT:s=this.createTencentImageryLayer(i);break;case V.ARCGIS:s=this.createArcGisImageryLayer(i);break;case V.BING:s=this.createBingImageryLayer(i);break;case V.OSM:s=this.createOSMImageryLayer(i);break;case V.SINGLE_TILE:s=this.createSingleTileImageryLayer(i);break;case V.WMS:s=this.createWMSImageryLayer(i);break;case V.WMTS:s=this.createWMTSImageryLayer(i);break;case V.XYZ:s=this.createXYZImageryLayer(i);break;case V.COORD:s=this.createCoordImageryLayer(i);break;case V.GRID:s=this.createGridImageryLayer(i);break;case V.MAPBOX:s=this.createMapboxImageryLayer(i);break;case V.MAPBOX_STYLE:s=this.createMapboxStyleImageryLayer(i);break;case V.TMS:s=this.createTMSImageryLayer(i);break;default:break}return s}},xh=As;var Ss=class extends r.GeographicTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-180,90],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToRectangle(e,i,s,a){if(!this._resolutions||!this._resolutions[s+this._zoomOffset])return r.Rectangle.MAX_VALUE;let o=this._resolutions[s+this._zoomOffset]*this._tileSize,n=r.Math.toRadians(this._origin[0]+e*o),h=r.Math.toRadians(this._origin[1]-(i+1)*o),c=r.Math.toRadians(this._origin[0]+(e+1)*o),d=r.Math.toRadians(this._origin[1]-i*o);return a?(a.west=n,a.south=h,a.east=c,a.north=d,a):new r.Rectangle(n,h,c,d)}positionToTileXY(e,i,s){if(!this._resolutions||!this._resolutions[i+this._zoomOffset])return new r.Cartesian2;let a=this._resolutions[i+this._zoomOffset]*this._tileSize,o=r.Math.toDegrees(e.longitude),n=r.Math.toDegrees(e.latitude),h=Math.floor((o-this._origin[0])/a),c=Math.floor((this._origin[1]-n)/a);return s?(s.x=h,s.y=c,s):new r.Cartesian2(Math.max(0,h),Math.max(0,c))}},Ch=Ss;var Is=class extends r.WebMercatorTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-200375083427892e-7,200375083427892e-7],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToNativeRectangle(e,i,s,a){if(!this._resolutions||!this._resolutions[s+this._zoomOffset])return r.Rectangle.MAX_VALUE;if(e<0||i<0)return r.Rectangle.MAX_VALUE;let o=this._resolutions[s+this._zoomOffset]*this._tileSize,n=this._origin[0]+e*o,h=this._origin[1]-(i+1)*o,c=this._origin[0]+(e+1)*o,d=this._origin[1]-i*o;return a?(a.west=n,a.south=h,a.east=c,a.north=d,a):new r.Rectangle(n,h,c,d)}positionToTileXY(e,i,s){let a=this._rectangle;if(!r.Rectangle.contains(a,e))return;if(!this._resolutions||!this._resolutions[i+this._zoomOffset])return new r.Cartesian2;let o=this._resolutions[i+this._zoomOffset]*this._tileSize,h=this._projection.project(e),c=Math.floor((h.x-this._origin[0])/o),d=Math.floor((this._origin[1]-h.y)/o);return s?(s.x=c,s.y=d,s):new r.Cartesian2(Math.max(0,c),Math.max(0,d))}},Th=Is;var Sf={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr",GEO:"geo",TDT:"tdt"},fe=Sf;var bc=Nu(Mc(),1);function Vt(l,e,i,s,a,o){let n=l.tileXYToRectangle(i,s,a);return r.defined(r.Rectangle.intersection(n,e,o))}function m_(l){let e=[[[0,0,1,0]]],i=e.length,s=new r.TileAvailability(l.tilingScheme,19);for(let a=0;a<i;++a){let o=e[a];for(let n=0;n<o.length;++n){let h=o[n];s.addAvailableTileRange(a,h[0],h[1],h[2],h[3])}}return s}function u_(l,e,i,s,a){let o=new r.HeightmapTerrainData({buffer:l._transformBuffer(e),width:l._width,height:l._height,childTileMask:l._getChildTileMask(s,a,i),structure:l._terrainDataStructure});return o._skirtHeight=6e3,l.availability.addAvailableTileRange(i,s,a,s,a),o}var Zs=class extends r.CustomHeightmapTerrainProvider{constructor(e){if(e=r.defaultValue(e,{}),super({...e,ellipsoid:r.Ellipsoid.WGS84,width:64,height:64}),!r.defined(e.url))throw new r.DeveloperError("options.url is required.");this._dataType=r.defaultValue(e.dataType,"int16"),this._url=e.url,this._subdomains=e.subdomains,this._token=e.token,this._rectangles=[],this._topLevel=5,this._bottomLevel=11,this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0},this._availability=m_(this)}get availability(){return this._availability}requestTileGeometry(e,i,s,a){if(s>=this._bottomLevel)return Promise.reject(`${s}\u8BE5\u7EA7\u522B\u4E0D\u53D1\u9001\u8BF7\u6C42!`);if(s<this._topLevel)return Promise.resolve(new r.HeightmapTerrainData({buffer:this._getVHeightBuffer(),width:this._width,height:this._height,childTileMask:this._getChildTileMask(e,i,s),structure:this._terrainDataStructure}));let o="",n=this._url;Array.isArray(this._subdomains)&&this._subdomains.length&&(o=this._subdomains[(e+i)%this._subdomains.length],n=n.replace("{s}",o)),n=n.replace("{token}",this._token).replace("{x}",e).replace("{y}",i).replace("{z}",s+1);let h=r.Resource.fetchArrayBuffer({url:n,request:a});if(h)return h.then(c=>c.byteLength<1e3?Promise.reject("\u65E0\u6548\u6570\u636E"):(0,bc.inflate)(c)).then(c=>u_(this,c,s,e,i))}getTileDataAvailable(e,i,s){if(s<this._bottomLevel)return!0}_transformBuffer(e){let i=2;this._dataType==="int16"?i=2:this._dataType==="float"&&(i=4);let s=e;if(s.length!==22500*i)return null;let a,o,n,h,c=new ArrayBuffer(i),d=new DataView(c),p=this._width,f=this._height,g=new Uint8Array(p*f*4);for(let u=0;u<f;u++)for(let m=0;m<p;m++){n=parseInt(149*u/(f-1)),h=parseInt(149*m/(p-1)),o=i*(150*n+h),i===4?(d.setInt8(0,s[o]),d.setInt8(1,s[o+1]),d.setInt8(2,s[o+2]),d.setInt8(3,s[o+3]),a=d.getFloat32(0,!0)):a=s[o]+256*s[o+1],(1e4<a||a<-2e3)&&(a=0);let E=(a+1e3)/.001,w=4*(u*p+m);g[w]=E/65536,g[1+w]=(E-256*g[w]*256)/256,g[2+w]=E-256*g[w]*256-256*g[1+w],g[3+w]=255}return g}_getVHeightBuffer(){let e=this._vHeightBuffer;if(!r.defined(e)){e=new Uint8ClampedArray(this._width*this._height*4);for(let i=0;i<this._width*this._height*4;)e[i++]=15,e[i++]=66,e[i++]=64,e[i++]=255;this._vHeightBuffer=e}return e}_getChildTileMask(e,i,s){let a=new r.Rectangle,o=this._tilingScheme,n=this._rectangles,h=o.tileXYToRectangle(e,i,s),c=0;for(let d=0;d<n.length&&c!==15;++d){let p=n[d];if(!(p.maxLevel<=s)){let f=p.rectangle,g=r.Rectangle.intersection(f,h,a);r.defined(g)&&(Vt(o,f,2*e,2*i,s+1,a)&&(c|=4),Vt(o,f,2*e+1,2*i,s+1,a)&&(c|=8),Vt(o,f,2*e,2*i+1,s+1,a)&&(c|=1),Vt(o,f,2*e+1,2*i+1,s+1,a)&&(c|=2))}}return c}},it=Zs;var js=class extends it{constructor(e={}){if(!e.urls){let i=e.url||"https://t{s}.tianditu.gov.cn/mapservice/swdx",s=e.key||"",a;Array.isArray(e.subdomains)?a=e.subdomains.slice():r.defined(e.subdomains)&&e.subdomains.length>0?a=e.subdomains.split(""):a=["0","1","2","3","4","5","6","7"],e.subdomains=a,e.url=i+"?T=elv_c&tk="+s}super(e),this._layers=[]}};fe.TDT="tdt";var Zt=js;var Ys=class{static createEllipsoidTerrain(e){return Promise.resolve(new r.EllipsoidTerrainProvider(e))}static createUrlTerrain(e){return r.CesiumTerrainProvider.fromUrl(e.url,e)}static createGoogleTerrain(e){return r.GoogleEarthEnterpriseTerrainProvider.fromUrl(e.url,e)}static createArcgisTerrain(e){return r.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}static createVRTerrain(e){return r.VRTheWorldTerrainProvider.fromUrl(e.url,e)}static createGeoTerrain(e){return Promise.resolve(new it(e))}static createTdtTerrain(e){return Promise.resolve(new Zt(e))}static createTerrain(e,i){let s;switch(e){case fe.NONE:s=this.createEllipsoidTerrain(i);break;case fe.XYZ:s=this.createUrlTerrain(i);break;case fe.GOOGLE:s=this.createGoogleTerrain(i);break;case fe.ARCGIS:s=this.createArcgisTerrain(i);break;case fe.VR:s=this.createVRTerrain(i);break;case fe.GEO:s=this.createGeoTerrain(i);break;case fe.TDT:s=this.createTdtTerrain(i);break;default:break}return s}},Ac=Ys;var f_={enable:!1},qs=class{constructor(e={}){var i;this._viewer=viewer,this._options={...f_,...e},this._id=(i=e.id)!=null?i:r.createGuid(),this._enabled=!1,this._state=_.INITIALIZED}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,this._state=this._enabled?_.ENABLED:_.DISABLED,this._enabledHook&&this._enabledHook())}_enabledHook(){}_mountedHook(){}_addedHook(){}_removedHook(){}},jt=qs;var Xs=class extends jt{constructor(e,i={}){var s,a,o,n,h,c,d,p;super(i),this._viewer=e,this._color=(s=i.color)!=null?s:new r.Color(0,0,0,.9),this._alpha=(a=i.alpha)!=null?a:.9,this._enableCollisionDetection=(o=i.enableCollisionDetection)!=null?o:!1,this._enableLevel=(n=i.enableLevel)!=null?n:2,this._depthTestOld=this._viewer.scene.globe.depthTestAgainstTerrain,this._frontFaceAlphaByDistance=(h=i.frontFaceAlphaByDistance)!=null?h:new r.NearFarScalar(500,.9,3e3,1),this._undergroundColorAlphaByDistance=(c=i.undergroundColorAlphaByDistance)!=null?c:new r.NearFarScalar(500,.8,5e3,1),this._zoomLevelSettings=(d=i.zoomLevelSettings)!=null?d:null,this._enableHeightThreshold=(p=i.enableHeightThreshold)!=null?p:200,this._cameraMoveListener=this._viewer.scene.camera.changed.addEventListener(()=>{this._updateUndergroundState()})}get translucency(){return this._viewer.scene.globe.translucency}set alpha(e){this._viewer&&this._alpha!==e&&(this._alpha=e,this.translucency.frontFaceAlpha=this._alpha)}get alpha(){return this._alpha}set enableCollisionDetection(e){this._enableCollisionDetection=e,this._enabled&&(this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1)}get enableCollisionDetection(){return this._enableCollisionDetection}set enableHeightThreshold(e){this._enableHeightThreshold=e}get enableHeightThreshold(){return this._enableHeightThreshold}set enableLevel(e){this._enableLevel=e}get enableLevel(){if(this._zoomLevelSettings){let e=this._getZoomLevel();for(let i of this._zoomLevelSettings)if(e>=i.minZoomLevel&&(!i.maxZoomLevel||e<=i.maxZoomLevel))return i.enableLevel}return this._enableLevel}_getZoomLevel(){let e=this._getCameraHeight(),i=this._viewer.camera.frustum.fov,s=Math.log2(156543.03392*512/(e*Math.tan(i/2)*2));return Math.max(0,s)}_getCameraHeight(){let e=this._viewer.camera.position,i=r.Cartographic.fromCartesian(e);return i?i.height:0}_updateUndergroundState(){if(!this._enabled)return;if(this.enableLevel>0)if(this._getCameraHeight()>this._enableHeightThreshold){this._disabledHook();return}else this._enabledHook();else this._disabledHook()}_enabledHook(){switch(this.enableLevel){case 0:this._viewer.scene.globe.undergroundColor=void 0,this._viewer.scene.globe.undergroundColorAlphaByDistance=void 0,this._viewer.scene.depthTestAgainstTerrain=this._depthTestOld,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1,this.translucency.enabled=!1;break;case 1:this._viewer.scene.globe.undergroundColor=this._color,this._viewer.scene.globe.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,this._viewer.scene.depthTestAgainstTerrain=!0,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1,this.translucency.enabled=!1;break;case 2:this._viewer.scene.globe.undergroundColor=this._color,this._viewer.scene.depthTestAgainstTerrain=!0,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1,this.translucency.enabled=!0,this.translucency.frontFaceAlpha=this._alpha,this.translucency.frontFaceAlphaByDistance=this._frontFaceAlphaByDistance,this._viewer.scene.globe.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance;break;default:this._viewer.scene.globe.undergroundColor=this._color,this._viewer.scene.depthTestAgainstTerrain=!0,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1,this.translucency.enabled=!0,this.translucency.frontFaceAlpha=this._alpha,this.translucency.frontFaceAlphaByDistance=this._frontFaceAlphaByDistance,this._viewer.scene.globe.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance}}_disabledHook(){this._viewer.scene.globe.undergroundColor=void 0,this._viewer.scene.globe.undergroundColorAlphaByDistance=void 0,this._viewer.scene.depthTestAgainstTerrain=this._depthTestOld,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!0,this.translucency.enabled=!1}set enabled(e){this._enabled!==e&&(super.enabled=e,e?this._updateUndergroundState():this._disabledHook())}},Sc=Xs;var __={VECTOR:"vector",HEAT_MAP:"heat-map",WIND:"wind",LAYER_GROUP:"layer_group",TOPOJSON:"topojson",TILESET:"tileset",TDT_DM:"tdt_dm",S3M:"s3m",RASTER_TILE:"raster-tile",PRIMITIVE:"primitive",PLANE_VIDEO:"plane_video",LABEL:"label",KML:"kml",I3S:"i3s",HTML:"html",GROUND_PRIMITIVE:"ground_primitive",GRATICULE:"graticule",GPX:"gpx",GEOJSON:"geojson",FEATURE_GRID:"feature_grid",DYNAMIC:"dynamic",CZML:"czml",CLUSTER:"cluster",CAMERA_VIDEO:"camera_video"},Tt=__;var Js=class{constructor(e){this._id=T.uuid(),this._bid=e||T.uuid(),this._delegate=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},this._layerEvent=new yr,this._layerEvent.on(We.ADD,this._onAdd,this),this._layerEvent.on(We.REMOVE,this._onRemove,this)}get layerId(){return this._id}get id(){return this._bid}get delegate(){return this._delegate}set show(e){this._show=e,this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}get layerEvent(){return this._layerEvent}set attr(e){this._attr=e}get attr(){return this._attr}get state(){return this._state}_addedHook(){}_removedHook(){}_onAdd(e){this._viewer=e,this._delegate&&(this._delegate instanceof r.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._delegate):this._viewer.scene.primitives.add(this._delegate):this._delegate instanceof r.ImageryLayer?this._viewer.imageryLayers.add(this._delegate):this._viewer.dataSources.add(this._delegate),this._addedHook&&this._addedHook(),this._state=_.ADDED)}_onRemove(){this._delegate&&this._viewer&&(this._cache={},this._delegate instanceof r.PrimitiveCollection?(this._delegate.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._delegate):this._viewer.scene.primitives.remove(this._delegate)):this._delegate instanceof r.ImageryLayer?this._viewer.imageryLayers.remove(this._delegate,!1):this._delegate instanceof Promise?(this._delegate.then(e=>{e.entities.removeAll()}),this._viewer.dataSources.remove(this._delegate)):(this._delegate.entities&&this._delegate.entities.removeAll(),this._viewer.dataSources.remove(this._delegate)),this._removedHook&&this._removedHook(),this._state=_.REMOVED)}_addOverlay(e){this._cache.hasOwnProperty(e.overlayId)||(this._cache[e.overlayId]=e,this._delegate&&e.fire(Ge.ADD,this),this._state===_.CLEARED&&(this._state=_.ADDED))}_removeOverlay(e){this._cache.hasOwnProperty(e.overlayId)&&(this._delegate&&e.fire(Ge.REMOVE,this),delete this._cache[e.overlayId])}addOverlay(e){return this._addOverlay(e),this}addOverlays(e){return Array.isArray(e)&&e.forEach(i=>{this._addOverlay(i)}),this}removeOverlay(e){return this._removeOverlay(e),this}getOverlay(e){return this._cache[e]||void 0}getOverlayById(e){let i;return Object.keys(this._cache).forEach(s=>{this._cache[s].id===e&&(i=this._cache[s])}),i}getOverlaysByAttr(e,i){let s=[];return this.eachOverlay(a=>{a.attr[e]===i&&s.push(a)},this),s}eachOverlay(e,i){return Object.keys(this._cache).forEach(s=>{e&&e.call(i||this,this._cache[s])}),this}getOverlays(){let e=[];return Object.keys(this._cache).forEach(i=>{e.push(this._cache[i])}),e}clear(){}remove(){this._viewer&&this._viewer.removeLayer(this)}addTo(e){return e!=null&&e.addLayer&&e.addLayer(this),this}setStyle(e){}on(e,i,s){return this._layerEvent.on(e,i,s||this),this}off(e,i,s){return this._layerEvent.off(e,i,s||this),this}fire(e,i){return this._layerEvent.fire(e,i),this}static registerType(e){e&&(Tt[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getLayerType(e){return Tt[e.toLocaleUpperCase()]||void 0}},I=Js;var Qs=class{constructor(e){this._id=e||T.uuid(),this._cache={},this._show=!0,this._viewer=void 0,this._layerGroupEvent=new _r,this._layerGroupEvent.on(He.ADD,this._onAdd,this),this._layerGroupEvent.on(He.REMOVE,this._onRemove,this),this._state=_.INITIALIZED}get id(){return this._id}get type(){return I.getLayerType("layer_group")}get show(){return this._show}set show(e){this._show=e,Object.keys(this._cache).forEach(i=>{this._cache[i].show=this._show})}get layerGroupEvent(){return this._layerGroupEvent}get state(){return this._state}_onAdd(e){this._viewer=e,Object.keys(this._cache).forEach(i=>{this._viewer.addLayer(this._cache[i])}),this._state=_.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._viewer&&this._viewer.removeLayer(this._cache[e])}),this._cache={},this._state=_.REMOVED}addLayer(e){return Object(this._cache).hasOwnProperty(e.id)||(this._cache[e.id]=e,this._viewer&&this._viewer.addLayer(e)),this}removeLayer(e){return Object(this._cache).hasOwnProperty(e.id)&&(this._viewer&&this._viewer.removeLayer(e),delete this._cache[e.id]),this}getLayer(e){return this._cache[e]||void 0}getLayers(){let e=[];return Object.keys(this._cache).forEach(i=>{e.push(this._cache[i])}),e}addTo(e){return e&&e.addLayerGroup&&e.addLayerGroup(this),this}remove(){return this._viewer&&this._viewer.removeLayerGroup(this),this}};I.registerType("layer_group");var Ic=Qs;var g_={radius:60,maxZoom:25,style:"circle",image:"",gradientColors:{1e-4:r.Color.DEEPSKYBLUE,.001:r.Color.GREEN,.01:r.Color.ORANGE,.1:r.Color.RED},gradientImages:{},showCount:!0,fontSize:12,clusterSize:16,fontColor:r.Color.BLACK,getCountOffset:l=>({x:-3.542857*String(l).length+1.066667,y:String(l).length>3?5:4})},Ks=class extends I{constructor(e,i={}){super(e),this._delegate=new r.PrimitiveCollection,this._options={...g_,...i},this._billboards=this._delegate.add(new r.BillboardCollection),this._labels=this._delegate.add(new r.LabelCollection),this._cluster=new Ke({radius:this._options.radius,maxZoom:this._options.maxZoom}),this._allCount=0,this._changedRemoveCallback=void 0,this._lastChangedTime=null,this._state=_.INITIALIZED}get type(){return I.getLayerType("cluster")}_addOverlay(e){}_removeOverlay(e){}_getCircleImage(e,i){let s=this._options.clusterSize*(String(i).length+1),a=e.toCssColorString()+"-"+i;if(!this._cache[a]){let o=document.createElement("canvas");o.width=s,o.height=s;let n=o.getContext("2d");n.save(),n.scale(s/24,s/24),n.fillStyle=e.withAlpha(.2).toCssColorString(),n.beginPath(),n.arc(12,12,9,0,2*Math.PI),n.closePath(),n.fill(),n.beginPath(),n.arc(12,12,6,0,2*Math.PI),n.fillStyle=e.toCssColorString(),n.closePath(),n.fill(),n.restore(),this._cache[a]=o.toDataURL()}return this._cache[a]}_getClusteringImage(e,i){let s=this._options.clusterSize*(String(i).length+1),a=e.toCssColorString()+"-"+i,o=-Math.PI/12,n=Math.PI/2,h=Math.PI/6;if(!this._cache[a]){let c=document.createElement("canvas");c.width=s,c.height=s;let d=c.getContext("2d");d.save(),d.scale(s/24,s/24),d.beginPath(),d.arc(12,12,6,0,2*Math.PI),d.fillStyle=e.toCssColorString(),d.fill(),d.closePath(),d.lineWidth=2;for(let p=0;p<3;p++)d.beginPath(),d.arc(12,12,8,o,o+n,!1),d.strokeStyle=e.withAlpha(.4).toCssColorString(),d.stroke(),d.arc(12,12,11,o,o+n,!1),d.strokeStyle=e.withAlpha(.2).toCssColorString(),d.stroke(),d.closePath(),o=o+n+h;d.restore(),this._cache[a]=c.toDataURL()}return this._cache[a]}_getClusterImage(e){let i=e/this._allCount,s;if(this._options.style==="custom"){let a=Object.keys(this._options.gradientImages).sort((o,n)=>Number(o)-Number(n));for(let o=a.length-1;o>=0;o--)if(i>=Number(a[o])){s=this._options.gradientImages[a[o]];break}s||(s=this._options.gradientImages[a[0]])}else{let a=Object.keys(this._options.gradientColors).sort((n,h)=>Number(n)-Number(h)),o;for(let n=a.length-1;n>=0;n--)if(i>=Number(a[n])){o=this._options.gradientColors[a[n]];break}o||(o=this._options.gradientColors[a[0]]),s=this._options.style==="circle"?this._getCircleImage(o,e):this._getClusteringImage(o,e)}return s}_changeCluster(e){let i=r.getTimestamp();if(this._lastChangedTime&&i-this._lastChangedTime<=1e3)return;this._lastChangedTime=i,this._cache={},this._billboards.removeAll(),this._labels.removeAll();let s=this._viewer.camera.computeViewRectangle();s||(s=this._viewer.viewBounds),this._allCount&&this._cluster.getClusters([r.Math.toDegrees(s.west),r.Math.toDegrees(s.south),r.Math.toDegrees(s.east),r.Math.toDegrees(s.north)],this._viewer.zoom).forEach(o=>{let n=T.uuid();if(o.properties.cluster){let h=o.properties.point_count,c=this._billboards.add({position:r.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._getClusterImage(h)});if(c.layerId=this.layerId,c.overlayId=n,c.attr={count:h},this._cache[n]=c,this._options.showCount){let d=this._labels.add({position:r.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),text:String(h),font:`${this._options.fontSize} px sans-serif`,disableDepthTestDistance:Number.POSITIVE_INFINITY,fillColor:this._options.fontColor,scale:.8,pixelOffset:this._options.getCountOffset(h)});d.layerId=this.layerId,d.overlayId=n,d.attr={count:h},this._cache[n]=d}}else{let h=this._billboards.add({position:r.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._options.image,...o.properties.style});h.layerId=this.layerId,h.overlayId=n,h.attr=o.properties,this._cache[n]=h}})}_addedHook(){this._changedRemoveCallback=this._viewer.camera.changed.addEventListener(this._changeCluster,this)}_removedHook(){this._changedRemoveCallback&&this._changedRemoveCallback()}setPoints(e=[]){return e.length&&(this._allCount=e.length,this._cluster.load(e.map(i=>{let s=v.parsePosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[s.lng,s.lat]},properties:i.attr||{}}}))),this}clear(){return this._cache={},this._allCount=0,this._state=_.CLEARED,this}};I.registerType("cluster");var Lc=Ks;var $s=class extends I{constructor(e,i="",s={}){super(e),this._delegate=r.CzmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("czml")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}};I.registerType("czml");var Dc=$s;var ea=class extends I{constructor(e){super(e),this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("dynamic")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("dynamic");var Rc=ea;var ta=class extends I{constructor(e){super(e),this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("vector")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("vector");var Je=ta;var y_={name:"",count:10,maximumLevel:21,dataProperty:"",callback:()=>null},ia=class extends I{constructor(e,i,s={}){super(e),this._url=i,this._options={...y_,...s},this._levelLayers={},this._tileWidth=256,this._tileHeight=256,this._maximumLevel=this._options.maximumLevel,this._tilingScheme=this._options.tilingScheme||new r.GeographicTilingScheme,this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._token=void 0;for(let a=0;a<this.maximumLevel;a++)this._levelLayers[String(a)]=new Je(e+"-grid-"+a);this._viewer=void 0,this._imageryLayer=void 0,this._imagery=document.createElement("canvas"),this._imagery.width=this._tileWidth,this._imagery.height=this._tileHeight,this._state=_.INITIALIZED}get type(){return I.getLayerType("feature_grid")}get url(){return this._url}get show(){return this._show}set show(e){this._show=e,Object.keys(this._levelLayers).forEach(i=>{this._levelLayers[i].show=e})}get token(){return this._token}get tileWidth(){if(!this.ready)throw new r.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this.ready)throw new r.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this.ready)throw new r.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new r.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}get tilingScheme(){if(!this.ready)throw new r.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new r.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get ready(){return!!this._url}get credit(){return this._credit}get hasAlphaChannel(){return!0}_onAdd(e){this._viewer=e,this._imageryLayer=this._viewer.imageryLayers.addImageryProvider(this),Object.keys(this._levelLayers).forEach(i=>{this._viewer.addLayer(this._levelLayers[i])}),this._state=_.ADDED}_onRemove(){this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach(e=>{this._viewer.removeLayer(this._levelLayers[e])}),this._state=_.REMOVED}getTileCredits(e,i,s){}requestImage(e,i,s,a){let o=this._levelLayers[String(s)],n=this._tilingScheme.tileXYToRectangle(e,i,s);return this._viewer&&n&&o&&r.Rectangle.intersection(n,this._viewer.viewBounds)&&r.Resource.fetchJson({url:this._url,queryParameters:{minX:r.Math.toDegrees(n.west),minY:r.Math.toDegrees(n.south),maxX:r.Math.toDegrees(n.east),maxY:r.Math.toDegrees(n.north),count:this._options.count}}).then(h=>{let c=h;if(this._options.dataProperty&&(c=h[this._options.dataProperty]),c&&c.length){for(let d=s+3;d<this._maximumLevel;d++)this._levelLayers[String(d)]&&this._levelLayers[String(d)].clear();c.forEach(d=>{let p=this._options.callback(d);p&&o.addOverlay(p)})}}),this._imagery}clear(){Object.keys(this._levelLayers).forEach(e=>{this._levelLayers[e].clear()}),this._state=_.CLEARED}};I.registerType("feature_grid");var Oc=ia;var v_={},Z=v_;var ra=class{constructor(){this._id=T.uuid(),this._bid=T.uuid(),this._delegate=void 0,this._layer=void 0,this._state=void 0,this._show=!0,this._style={},this._attr={},this._allowDrillPicking=!1,this._contextMenu=[],this._overlayEvent=new wr,this._overlayEvent.on(Ge.ADD,this._onAdd,this),this._overlayEvent.on(Ge.REMOVE,this._onRemove,this)}get overlayId(){return this._id}get type(){return""}get id(){return this._bid}set id(e){this._bid=e}get show(){return this._show}set show(e){this._show=e,T.isPromise(this._delegate)?this._delegate.then(i=>{i.show=this._show}):this._delegate&&(this._delegate.show=this._show)}get attr(){return this._attr}set attr(e){this._attr=e}get allowDrillPicking(){return this._allowDrillPicking}set allowDrillPicking(e){this._allowDrillPicking=e}get overlayEvent(){return this._overlayEvent}get delegate(){return this._delegate}get state(){return this._state}get contextMenu(){return this._contextMenu}set contextMenu(e){this._contextMenu=e}static registerType(e){e&&(Z[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getOverlayType(e){return Z[e.toLocaleUpperCase()]||void 0}_getLayerCollection(e){let i;switch(e){case"point_primitive":i=this._layer.points;break;case"billboard_primitive":case"bounce_billboard_primitive":i=this._layer.billboards;break;case"label_primitive":case"bounce_label_primitive":i=this._layer.labels;break;case"polyline_primitive":i=this._layer.polylines;break;case"cloud_primitive":i=this._layer.clouds;break;default:break}return i}_mountedHook(){}_addedHook(){var e;if(!this._delegate)return!1;this._delegate instanceof Promise?this._delegate.then(i=>{var s;i.layerId=(s=this._layer)==null?void 0:s.layerId,i.overlayId=this._id}):(this._delegate.layerId=(e=this._layer)==null?void 0:e.layerId,this._delegate.overlayId=this._id)}_removedHook(){}_onAdd(e){var i,s,a,o;if(e){if(this._layer=e,this._mountedHook&&this._mountedHook(),(s=(i=this._layer)==null?void 0:i.delegate)!=null&&s.entities&&this._delegate)this._layer.delegate.entities.add(this._delegate);else if((o=(a=this._layer)==null?void 0:a.delegate)!=null&&o.add){let n=this._getLayerCollection(this.type);n?(this._delegate&&(this._delegate=n.add(this._delegate)),T.merge(this._delegate,this._style),this.update&&this.destroy&&this._layer.delegate.add(this)):T.isPromise(this._delegate)?this._delegate.then(h=>{this._layer.delegate.add(h)}):this.update&&this.destroy?this._layer.delegate.add(this):this._delegate&&this._layer.delegate.add(this._delegate)}this._addedHook&&this._addedHook(),this._state=_.ADDED}}_onRemove(){var e,i,s,a;if(this._layer){if((i=(e=this._layer)==null?void 0:e.delegate)!=null&&i.entities)this._layer.delegate.entities.remove(this._delegate);else if((a=(s=this._layer)==null?void 0:s.delegate)!=null&&a.remove){let o=this._getLayerCollection(this.type);o?(this._delegate&&o.remove(this._delegate),this.update&&this.destroy&&this._layer.delegate.remove(this)):T.isPromise(this._delegate)?this._delegate.then(n=>{this._layer.delegate.remove(n)}):this.update&&this.destroy?this._layer.delegate.remove(this):this._delegate&&this._layer.delegate.remove(this._delegate)}this._removedHook&&this._removedHook(),this._state=_.REMOVED}}setLabel(e,i){return this._delegate?(this._delegate instanceof r.Entity&&(this._delegate.label={...i,text:e}),this):this}setStyle(e){return this}remove(){return this._layer&&this._layer.removeOverlay(this),this}addTo(e){return e&&e.addOverlay&&e.addOverlay(this),this}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this}fire(e,i){return this._overlayEvent.fire(e,i),this}},x=ra;var sa=class extends x{constructor(e,i){super(),this._delegate=new r.Entity({billboard:{}}),this._position=v.parsePosition(e),this._icon=i,this._size=[32,32],this._state=_.INITIALIZED}get type(){return x.getOverlayType("custom_billboard")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("CustomBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setLabel(e,i){return this._delegate.label={...i,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.billboard,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let i=this._position.copy();i.alt=e.height||0,this._delegate.polyline={...e,positions:y.transformWGS84ArrayToCartesianArray([i,this._position])}}return this}setBottomCircle(e,i={},s=0){let a=0,o=s;return this._delegate.ellipse={...i,semiMajorAxis:e,semiMinorAxis:e,stRotation:new r.CallbackProperty(()=>(a+=o,(a>=360||a<=-360)&&(a=0),a),!1)},this}};x.registerType("custom_billboard");var kc=sa;var aa=class extends x{constructor(e,i){super(),this._delegate=new r.Entity({label:{}}),this._position=v.parsePosition(e),this._text=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("custom_label")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.label.text=this._text}_mountedHook(){this.position=this._position,this.text=this._text}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,T.merge(this._style,e),T.merge(this._delegate.label,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let i=this._position.copy();i.alt=e.height||0,this._delegate.polyline={...e,positions:y.transformWGS84ArrayToCartesianArray([i,this._position])}}return this}setBottomCircle(e,i={},s=0){let a=0,o=s;return this._delegate.ellipse={...i,semiMajorAxis:e,semiMinorAxis:e,stRotation:new r.CallbackProperty(()=>(a+=o,(a>=360||a<=-360)&&(a=0),a),!1)},this}};x.registerType("custom_label");var Nc=aa;var oa=class extends x{constructor(){super(),this._startTime=void 0,this._lastTime=void 0,this._sampledPosition=new r.SampledPositionProperty,this._cache=[],this._maxCacheSize=10,this._state=_.INITIALIZED}get maxCacheSize(){return this._maxCacheSize}set maxCacheSize(e){this._maxCacheSize=e}get position(){return y.transformCartesianToWGS84(this._sampledPosition.getValue(r.JulianDate.now()))}_removePosition(){if(this._cache.length>this._maxCacheSize){let e=r.JulianDate.addSeconds(this._cache[0],-.2,new r.JulianDate),i=r.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new r.JulianDate);this._sampledPosition.removeSamples(new r.TimeInterval({start:e,stop:i})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(e,i){this._removePosition();let s=r.JulianDate.now(),a=r.JulianDate.addSeconds(s,i,new r.JulianDate);return this._sampledPosition.addSample(a,y.transformWGS84ToCartesian(v.parsePosition(e))),this._lastTime=a,this._cache.push(this._lastTime),this}bindDom(e){return this}},Yt=oa;var na=class extends Yt{constructor(e,i){super(),this._position=v.parsePosition(e),this._icon=i,this._delegate=new r.Entity({billboard:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("dynamic_billboard")}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("DynamicBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}_mountedHook(){this._sampledPosition.forwardExtrapolationType=r.ExtrapolationType.HOLD,this._startTime=r.JulianDate.now(),this._sampledPosition.addSample(this._startTime,y.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._cache.push(this._startTime),this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.billboard,e),this)}};x.registerType("dynamic_billboard");var zc=na;var la=class extends Yt{constructor(e,i){super(),this._position=v.parsePosition(e),this._modelUrl=i,this._delegate=new r.Entity({model:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("dynamic_model")}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}_mountedHook(){this._sampledPosition.forwardExtrapolationType=r.ExtrapolationType.HOLD,this._startTime=r.JulianDate.now(),this._sampledPosition.addSample(this._startTime,y.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._delegate.orientation=new r.VelocityOrientationProperty(this._sampledPosition),this._cache.push(this._startTime),this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,T.merge(this._style,e),T.merge(this._delegate.model,e),this)}};x.registerType("dynamic_model");var Fc=la;function w_(l,e,i){let s=r.Cartesian3.subtract(l,e,new r.Cartesian3),a=r.Cartesian3.subtract(i,e,new r.Cartesian3),o=r.Cartesian3.cross(s,a,s);return r.Cartesian3.magnitude(o)*.5}function Re(l){let e=0;if(!Array.isArray(l))return e;l[0]instanceof r.Cartesian3||(l=y.transformWGS84ArrayToCartesianArray(l));let i=r.CoplanarPolygonGeometry.createGeometry(r.CoplanarPolygonGeometry.fromPositions({positions:l,vertexFormat:r.VertexFormat.POSITION_ONLY}));if(!i)return e;let s=i.attributes.position.values,a=i.indices;for(let o=0;o<a.length;o+=3){let n=r.Cartesian3.unpack(s,a[o]*3,new r.Cartesian3),h=r.Cartesian3.unpack(s,a[o+1]*3,new r.Cartesian3),c=r.Cartesian3.unpack(s,a[o+2]*3,new r.Cartesian3);e+=w_(n,h,c)}return e}function ha(l=[],e=0){let i=180,s=90,a=-180,o=-90;if(l.forEach(n=>{i=Math.min(i,n.lng||n.x),s=Math.min(s,n.lat||n.y),a=Math.max(a,n.lng||n.x),o=Math.max(o,n.lat||n.y)}),e>0){let n=Math.abs(a-a),h=Math.abs(o-s);i-=n*e,s-=h*e,a+=n*e,o+=h*e}return{west:i,south:s,east:a,north:o}}function Oe(l){if(l&&Array.isArray(l)){let e=0;l.forEach(({alt:a})=>e=Math.max(e,a));let i=r.BoundingSphere.fromPoints(y.transformWGS84ArrayToCartesianArray(l)),s=y.transformCartesianToWGS84(i.center);return s.alt=e,s}return new X}function ca(l,e){e=e||{};let i=[];for(let s=0;s<l.length-1;s++){let a=x_(l[s],l[s+1],e.count);a&&a.length>0&&(i=i.concat(a))}return i}function x_(l,e,i){if(!l||!e)return null;let s=[];i=i||40;let a=function(b){return 1-2*b+b*b},o=b=>2*b-2*b*b,n=b=>b*b,h,c,d,p,f,g,u=0,m=parseFloat(l.lat),E=parseFloat(e.lat),w=parseFloat(l.lng),P=parseFloat(e.lng);P>w&&P-w>180&&w<0&&(w=360+w,P=360+P),g=0,E===m?(h=0,c=w-P):P===w?(h=Math.PI/2,c=m-E):(h=Math.atan((E-m)/(P-w)),c=(E-m)/Math.sin(h)),g===0&&(g=h+Math.PI/5),d=c/2,f=d*Math.cos(g)+w,p=d*Math.sin(g)+m;for(let b=0;b<i+1;b++){let L=w*a(u)+f*o(u)+P*n(u),S=m*a(u)+p*o(u)+E*n(u),R=l.lng,W=e.lng;s.push([R<0&&W>0?L-360:L,S]),u=u+1/i}return s}function ce(l){let e=0;if(l&&Array.isArray(l))for(let i=0;i<l.length-1;i++){let s=y.transformWGS84ToCartographic(l[i]),a=y.transformWGS84ToCartographic(l[i+1]),o=new r.EllipsoidGeodesic;o.setEndPoints(s,a);let n=o.surfaceDistance;n=Math.sqrt(Math.pow(n,2)+Math.pow(a.height-s.height,2)),e+=n}return e.toFixed(3)}function ke(l,e){let i=l,s=e;if(!i||!s)return 0;l instanceof r.Cartesian3||(i=v.parsePosition(l),i=y.transformWGS84ToCartesian(i)),e instanceof r.Cartesian3||(s=v.parsePosition(e),s=y.transformWGS84ToCartesian(s));let a=r.Transforms.eastNorthUpToFixedFrame(i),o=r.Cartesian3.subtract(s,i,new r.Cartesian3),n=r.Matrix4.multiplyByPointAsVector(r.Matrix4.inverse(a,new r.Matrix4),o,new r.Cartesian3),h=Math.atan2(n.y,n.x)-r.Math.PI_OVER_TWO;return h=r.Math.TWO_PI-r.Math.zeroToTwoPi(h),isNaN(h)?0:h}function rt(l,e,i){return l=parseFloat(l)||0,l>=parseFloat(e)&&l<=parseFloat(i)}function Y(l,e){return r.Cartesian3.midpoint(l,e,new r.Cartesian3)}function da(l,e){let i=v.parsePosition(l),s=v.parsePosition(e);i=y.transformWGS84ToCartographic(i),s=y.transformWGS84ToCartographic(s);let a=new r.EllipsoidGeodesic(i,s).interpolateUsingFraction(.5);return new X(r.Math.toDegrees(a.longitude),r.Math.toDegrees(a.latitude),a.height)}function pa(l,e,i=0,s=50){let a=[];i=Math.max(+i,100),s=Math.max(+s,50);let o=Math.abs(l.lng-e.lng),n=Math.abs(l.lat-e.lat),h=Math.max(o,n),c=h/s;if(o>n){let d=(e.lat-l.lat)/s;l.lng-e.lng>0&&(c=-c);for(let p=0;p<s;p++){let f=i-Math.pow(-.5*h+Math.abs(c)*p,2)*4*i/Math.pow(h,2),g=l.lng+c*p,u=l.lat+d*p;a.push([g,u,f])}}else{let d=(e.lng-l.lng)/s;l.lat-e.lat>0&&(c=-c);for(let p=0;p<s;p++){let f=i-Math.pow(-.5*h+Math.abs(c)*p,2)*4*i/Math.pow(h,2),g=l.lng+d*p,u=l.lat+c*p;a.push([g,u,f])}}return a.push([e.lng,e.lat,e.alt||0]),a}/**
|
|
211
|
+
`,ss=class extends qm{constructor(e={}){super(e),this.offsetAngle=(e==null?void 0:e.offsetAngle)||0}update(e,i){let s=this;if(!this.show||e.mode!==gh.SCENE3D&&e.mode!==gh.MORPHING||!e.passes.render)return;let o=e.context;if(this._sources!==this.sources){this._sources=this.sources;let n=this.sources;if(!Se(n.positiveX)||!Se(n.negativeX)||!Se(n.positiveY)||!Se(n.negativeY)||!Se(n.positiveZ)||!Se(n.negativeZ))throw new fh("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof n.positiveX!=typeof n.negativeX||typeof n.positiveX!=typeof n.positiveY||typeof n.positiveX!=typeof n.negativeY||typeof n.positiveX!=typeof n.positiveZ||typeof n.positiveX!=typeof n.negativeZ)throw new fh("this.sources properties must all be the same type.");typeof n.positiveX=="string"?Bm(o,this._sources).then(function(h){s._cubeMap=s._cubeMap&&s._cubeMap.destroy(),s._cubeMap=h}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Hm({context:o,source:n}))}let a=this._command;if(a.modelMatrix=Fm.eastNorthUpToFixedFrame(e.camera.positionWC),this.offsetAngle!==0&&rs.multiply(a.modelMatrix,rs.fromRotationTranslation(_h.fromRotationZ(this.offsetAngle/180*Math.PI)),a.modelMatrix),!Se(a.vertexArray)){a.uniformMap={u_cubeMap:function(){return s._cubeMap},u_rotateMatrix:function(){return rs.getMatrix3(a.modelMatrix,new _h)}};let n=uh.createGeometry(uh.fromDimensions({dimensions:new zm(2,2,2),vertexFormat:Wm.POSITION_ONLY})),h=this._attributeLocations=Nm.createAttributeLocations(n);a.vertexArray=Vm.fromGeometry({context:o,geometry:n,attributeLocations:h,bufferUsage:Gm._DRAW}),a.renderState=Um.fromCache({blending:Zm.ALPHA_BLEND})}if(!Se(a.shaderProgram)||this._useHdr!==i){let n=new Ym({defines:[i?"HDR":""],sources:[Xm]});a.shaderProgram=jm.fromCache({context:o,vertexShaderSource:Jm,fragmentShaderSource:n,attributeLocations:this._attributeLocations}),this._useHdr=i}if(Se(this._cubeMap))return a}},Qm=ss;var Km={creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),baseLayer:!1,shouldAnimate:!0},os=class{constructor(e,i={}){if(__cmdOut&&__cmdOut(),!e||typeof e=="string"&&!document.getElementById(e))throw new Error("Viewer: the container is empty");if(e instanceof HTMLElement)throw new Error("Viewer: not support the type container");if(typeof e=="string"){let a=Zi("baseUrl");a&&r.buildModuleUrl.setBaseUrl(a)}this._delegate=typeof e!="string"?e:new r.CesiumWidget(e,{...Km,...i}),this._delegate.canvas.parentNode.className="viewer-canvas",this._mouseEvent=new ir(this,i),this._viewerEvent=new sr,this._sceneEvent=new ar(this),this._viewerOption=new Lr(this),this._cameraOption=new Rr(this),this._cameraOption.changeMouseMode(ye.LEFT_RIGHT),this._widgetContainer=D.create("div","viewer-widgets",typeof e=="string"?document.getElementById(e):this._delegate.container),this._layerContainer=D.create("div","viewer-layers",typeof e=="string"?document.getElementById(e):this._delegate.container),this._baseLayerPicker=new is({globe:this._delegate.scene.globe}),this._layerGroupCache={},this._layerCache={};let s=Qr();Object.keys(s).forEach(a=>{this._use(s[a])});let o=es();Object.keys(o).forEach(a=>{this._use(o[a])})}get delegate(){return this._delegate}get container(){return this._delegate.container}get widgetContainer(){return this._widgetContainer}get layerContainer(){return this._layerContainer}get scene(){return this._delegate.scene}get camera(){return this._delegate.camera}get canvas(){return this._delegate.scene.canvas}get dataSources(){return this._delegate.dataSources}get imageryLayers(){return this._delegate.imageryLayers}get terrainProvider(){return this._delegate.terrainProvider}get entities(){return this._delegate.entities}get postProcessStages(){return this._delegate.scene.postProcessStages}get clock(){return this._delegate.clock}get viewerEvent(){return this._viewerEvent}get cameraPosition(){var i,s,o,a,n,h,c;let e=y.transformCartographicToWGS84((i=this.camera)==null?void 0:i.positionCartographic);return e&&(e.heading=r.Math.toDegrees((o=(s=this.camera)==null?void 0:s.heading)!=null?o:0),e.pitch=r.Math.toDegrees((n=(a=this.camera)==null?void 0:a.pitch)!=null?n:0),e.roll=r.Math.toDegrees((c=(h=this.camera)==null?void 0:h.roll)!=null?c:0)),e}get resolution(){let e=this.scene.canvas.width,i=this.scene.canvas.height,s=y.transformWindowToWGS84(new r.Cartesian2(e/2|0,i-1),this),o=y.transformWindowToWGS84(new r.Cartesian2(1+e/2|0,i-1),this);return!s||!o?1:Math.abs(s.lng-o.lng)}get viewBounds(){let e=this.scene.canvas.width,i=this.scene.canvas.height,s=y.transformWindowToWGS84(new r.Cartesian2(0,i),this),o=y.transformWindowToWGS84(new r.Cartesian2(e,0),this);return!s||!o?r.Rectangle.MAX_VALUE:r.Rectangle.fromDegrees(s.lng,s.lat,o.lng,o.lat)}get zoom(){let e=this.camera.positionCartographic.height,i=40487.57,s=7096758e-11,o=91610.74,a=-40467.74;return Math.round(a+(i-a)/(1+Math.pow(e/o,s)))}set enableEventPropagation(e){this._mouseEvent.enableEventPropagation=e}get enableEventPropagation(){return this._mouseEvent.enableEventPropagation}set enableMouseOver(e){this._mouseEvent.enableMouseOver=e}get enableMouseOver(){return this._mouseEvent.enableMouseOver}set enableMouseMovePick(e){this._mouseEvent.enableMouseMovePick=e}get enableMouseMovePick(){return this._mouseEvent.enableMouseMovePick}get centerPosition(){return this.camera.pickEllipsoid(new r.Cartesian2(this.canvas.clientWidth/2,this.canvas.clientHeight/2))}get centerPositionWGS84(){let e=this.centerPosition,i=r.Ellipsoid.WGS84.cartesianToCartographic(e),s=i.longitude*180/Math.PI,o=i.latitude*180/Math.PI,a=this.cameraHeight;return new X(s,o,0,a)}get cameraHeight(){return this.scene.globe.ellipsoid.cartesianToCartographic(this.camera.position).height}_use(e){return e&&e.install&&e.install(this),this}_addLayerGroup(e){e!=null&&e.layerGroupEvent&&!Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(We.ADD,this),this._layerGroupCache[e.id]=e)}_removeLayerGroup(e){e!=null&&e.layerGroupEvent&&Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(We.REMOVE,this),delete this._layerGroupCache[e.id])}_addLayer(e){!this._layerCache[e.type]&&(this._layerCache[e.type]={}),Object(this._layerCache[e.type]).hasOwnProperty(e.id)||(e.fire(Ge.ADD,this),this._layerCache[e.type][e.id]=e)}_removeLayer(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.fire(Ge.REMOVE,this),delete this._layerCache[e.type][e.id])}setOptions(e){return this._viewerOption.setOptions(e),this}setPitchRange(e=-90,i=-20){return this._cameraOption.setPitchRange(e,i),this}changeSceneMode(e,i=0){return e===2?this._delegate.scene.morphTo2D(i):e===3?this._delegate.scene.morphTo3D(i):e===2.5&&this._delegate.scene.morphToColumbusView(i),this}changeMouseMode(e){return this._cameraOption.changeMouseMode(e),this}setTerrain(e){return this._delegate.scene.setTerrain(new r.Terrain(e||Promise.resolve(new r.EllipsoidTerrainProvider))),this}addBaseLayer(e,i={}){return e?(this._baseLayerPicker.addImageryLayer(e,i),this._baseLayerPicker.selectedImageryLayer||this._baseLayerPicker.changeImageryLayer(0),this.mapSwitch&&this.mapSwitch.addMap(i),this):this}changeBaseLayer(e){return this._baseLayerPicker.changeImageryLayer(e),this}getImageryLayerInfo(e){let i=this._delegate.camera.getPickRay(e);return this._delegate.imageryLayers.pickImageryLayerFeatures(i,this._delegate.scene)}addLayerGroup(e){return this._addLayerGroup(e),this}removeLayerGroup(e){return this._removeLayerGroup(e),this}getLayerGroup(e){return this._layerGroupCache[e]||void 0}addLayer(e){return this._addLayer(e),this}removeLayer(e){return this._removeLayer(e),this}hasLayer(e){return Object(this._layerCache[e.type]).hasOwnProperty(e.id)}getLayer(e){let i=this.getLayers().filter(s=>s.id===e);return i&&i.length?i[0]:void 0}getLayers(){let e=[];return Object.keys(this._layerCache).forEach(i=>{let s=this._layerCache[i];Object.keys(s).forEach(o=>{e.push(s[o])})}),e}eachLayer(e,i){return Object.keys(this._layerCache).forEach(s=>{let o=this._layerCache[s];Object.keys(o).forEach(a=>{e.call(i,o[a])})}),this}flyTo(e,i){return this._delegate.flyTo((e==null?void 0:e.delegate)||e,{duration:i}),this}zoomTo(e){return this._delegate.zoomTo((e==null?void 0:e.delegate)||e),this}flyToPosition(e,i,s){return e=v.parsePosition(e),this.camera.flyTo({destination:y.transformWGS84ToCartesian(e),orientation:{heading:r.Math.toRadians(e.heading),pitch:r.Math.toRadians(e.pitch),roll:r.Math.toRadians(e.roll)},complete:i,duration:s}),this}flyToPoint(e,i={}){return new Promise((s,o)=>{if(!e){s(!1);return}e=U.parse(e);let a=e.toCartesian();if(i.clampToGround)if(i.hasTerrain){Ae.getSurfaceHeight(this._delegate.scene,a,{has3dtiles:!0}).then(f=>{e.alt=f.height*(this._delegate.scene.globe.terrainExaggeration||1),delete i.clampToGround,this.flyToPoint(e,i).then(g=>{s(g)})});return}else e.alt=0,a=e.toCartesian();let n=i.radius||this.getCameraDistance()||100;r.defined(i.scale)&&i.scale>0&&(n*=i.scale),r.defined(i.minHeight)&&n<i.minHeight&&(n=i.minHeight),r.defined(i.maxHeight)&&n>i.maxHeight&&(n=i.maxHeight);let h;if(r.defined(i.pitch))h=r.Math.toRadians(i.pitch);else{h=this._delegate.camera.pitch;let f=r.Math.toDegrees(h);r.defined(i.minPitch)&&f<i.minPitch&&(h=r.Math.toRadians(i.minPitch)),r.defined(i.maxPitch)&&f>i.maxPitch&&(h=r.Math.toRadians(i.maxPitch))}let c=r.defined(i.heading)?r.Math.toRadians(i.heading):this._delegate.camera.heading,d=new r.HeadingPitchRange(c,h,n),p=new r.BoundingSphere(a,0);i.duration===0?(this._delegate.camera.lookAt(a,d),!i.lock&&!this._delegate.trackedEntity&&this._delegate.camera.lookAtTransform(r.Matrix4.IDENTITY),i.complete&&i.complete(),s(!0)):this._delegate.camera.flyToBoundingSphere(p,{...i,offset:d,complete:()=>{i.complete&&i.complete(),s(!0)},cancel:()=>{i.cancel&&i.cancel(),s(!1)}})})}getCenter(){try{let e=this.scene.canvas,i=new r.Cartesian2(e.clientWidth/2,e.clientHeight/2),s=scene.camera.getPickRay(i),o=scene.globe.pick(s,scene);return o||(o=scene.camera.pickEllipsoid(i)),o?U.fromCartesian(o):void 0}catch{return}}getHeight(e,i){var n;let s=this.scene,o=U.toCartographic(e),a;if(s.getHeight?a=s.getHeight(o,i&&i.heightReference):a=s.globe.getHeight(o),r.defined(a)&&a>((n=i&&i.min)!=null?n:-999))return a;if(i!=null&&i.original)return o.height}getCameraDistance(){let e=this.getCenter();return e?(e.alt<0&&(e.alt=0),r.Cartesian3.distance(e.toCartesian(),this._delegate.camera.positionWC)):0}zoomToPosition(e,i){return this.flyToPosition(e,i,0),this}flyToBounds(e,{heading:i=0,pitch:s=0,roll:o=0},a,n){return e?(Array.isArray(e)||(e=e.split(",")),this.camera.flyTo({destination:r.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]),orientation:{heading:r.Math.toRadians(i),pitch:r.Math.toRadians(s),roll:r.Math.toRadians(o)},complete:a,duration:n}),this):this}zoomToBounds(e,{heading:i=0,pitch:s=0,roll:o=0},a){return this.flyToBounds(e,{heading:i,pitch:s,roll:o},a),this}on(e,i,s){return this._viewerEvent.on(e,i,s||this),this._sceneEvent.on(e,i,s||this),this}once(e,i,s){return this._viewerEvent.once(e,i,s||this),this}off(e,i,s){return this._viewerEvent.off(e,i,s||this),this._sceneEvent.off(e,i,s||this),this}destroy(){return Object.keys(this._layerCache).forEach(e=>{let i=this._layerCache[e];Object.keys(i).forEach(s=>{this._removeLayer(i[s])})}),this._delegate.destroy(),this._delegate=void 0,this._baseLayerPicker=void 0,this._layerCache={},this._widgetContainer.parentNode.removeChild(this._widgetContainer),this._widgetContainer=void 0,this._layerContainer.parentNode.removeChild(this._layerContainer),this._layerContainer=void 0,this}exportScene(e){this.scene.render();let s=this.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),o=document.createElement("a"),a=x.dataURLtoBlob(s),n=URL.createObjectURL(a);return o.download=`${e||"scene"}.png`,o.href=n,o.click(),this}getOffset(){var s;let e={x:0,y:0},i=(s=this._delegate)==null?void 0:s.container;if(i)if(i.getBoundingClientRect){let o=i.getBoundingClientRect();e.x=o.left,e.y=o.top}else e.x=i.offsetLeft,e.y=i.offsetTop;return e}},$m=os;var q=class q{constructor(e=0,i=0,s=0){this._lng=+e||0,this._lat=+i||0,this._alt=+s||0}get lng(){return this._lng}set lng(e){this._lng=+e}get lat(){return this._lat}set lat(e){this._lat=+e}get alt(){return this._alt}set alt(e){this._alt=+e}clone(){let e=new q;return e.lng=this.lng||0,e.lat=this.lat||0,e.alt=this.alt||0,e}format(){return this.lng=x.formatNum(this.lng,q.FormatLength),this.lat=x.formatNum(this.lat,q.FormatLength),this.alt=x.formatNum(this.alt,q.FormatAltLength),this}toArray(e){return this.format(),e?[this.lng,this.lat]:[this.lng,this.lat,this.alt]}toString(){return this.format(),"".concat(this.lng,",").concat(this.lat,",").concat(this.alt)}toCartesian(e=!1){return!e&&this._position?this._position:r.Cartesian3.fromDegrees(this.lng,this.lat,this.alt)}toCartographic(){return r.Cartographic.fromDegrees(this.lng,this.lat,this.alt)}toMercator(){let e=Math.min(this.lng,180);e=Math.max(e,-180);let i=Math.min(this.lat,85.05112877980659);i=Math.max(i,-85.05112877980659);let s=e*2003750834e-2/180,o=Math.log(Math.tan((90+i)*Math.PI/360))/(Math.PI/180);return o=o*2003750834e-2/180,[s,o,this.alt]}equals(e){return this===e?!0:e instanceof q?this._alt===e._alt&&this._lat===e._lat&&this._lng===e._lng:!1}valid(){return isNaN(this._lat)||isNaN(this._lng)||this._lat<-90||this._lat>90||this._lng<-180||this._lng>180?!1:!(this._lat===0&&this._lng===0&&this._alt===0)}static parse(e,i){if(!e)return new q;if(e instanceof q)return e;let s;if(typeof e=="string")s=q.fromString(e);else if(Array.isArray(e))s=q.fromArray(e);else if(e instanceof q)s=e.clone();else if(r.defined(e.lat)&&r.defined(e.lng)){s=new q(e.lng,e.lat,e.alt);for(let o in e)s[o]=e[o]}else e instanceof r.Cartesian3||e._value||e.getValue?(s=q.fromCartesian(e,i),s._position=e):r.defined(e.x)&&r.defined(e.y)&&r.defined(e.z)?(e=new r.Cartesian3(e.x,e.y,e.z),s=q.fromCartesian(e,i),s._position=e):(s=new q,Ve("\u5750\u6807\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u786E\u8BA4\u53C2\u6570\u662F\u5426\u65E0\u8BEF",e));return s}static fromArray(e){let i=new q;return Array.isArray(e)&&(i.lng=e[0]||0,i.lat=e[1]||0,i.alt=e[2]||0),i}static fromString(e){let i=new q;if(e&&typeof e=="string"){let s=e.split(",");i=this.fromArray(s)}return i}static fromCartesian(e,i){let s=new q,o;if(e&&(e instanceof r.Cartesian3?o=e:e._value&&e._value instanceof r.Cartesian3?o=e._value:typeof e.getValue=="function"&&(o=e.getValue(i||r.JulianDate.now()))),o){let a=r.Cartographic.fromCartesian(o);a&&(s.lat=r.Math.toDegrees(a.latitude),s.lng=r.Math.toDegrees(a.longitude),s.alt=a.height,s.format())}return s._position=e,s}static fromCartographic(e){let i=new q;return i.lat=r.Math.toDegrees(e.latitude),i.lng=r.Math.toDegrees(e.longitude),i.alt=e.height,i}static fromMercator(e){let i=Number(e[0]),s=Number(e[1]),o=i/2003750834e-2*180,a=s/2003750834e-2*180;return a=180/Math.PI*(2*Math.atan(Math.exp(a*Math.PI/180))-Math.PI/2),new q(o,a,e[2]||0)}static toCartesian(e,i){return!e||e instanceof r.Cartesian3?e:q.parse(e,i).toCartesian(!0)}static toCartographic(e,i){return!e||e instanceof r.Cartographic?e:q.parse(e,i).toCartographic()}static toArray(e,i){let s=q.parse(e);return!s||!s.valid()?[]:s.toArray(i)}};lt(q,"FormatLength",6),lt(q,"FormatAltLength",1);var as=q,U=as;var ns=class{static toCartesians(e,i){if(!e||!Array.isArray(e))return e;let s=[];return e.forEach(function(o){if(o instanceof r.Cartesian3){i?s.push(o.clone()):s.push(o);return}let a=U.parse(o);!a||!a.valid()||s.push(a.toCartesian(!0))}),s}static toCartographics(e,i){if(!e||!Array.isArray(e))return e;let s=[];return e.forEach(function(o){if(o instanceof r.Cartographic){i?s.push(o.clone()):s.push(o);return}let a=U.parse(o);!a||!a.valid()||s.push(a.toCartographic())}),s}static toPoints(e,i){if(!e||!Array.isArray(e))return e;let s=[];return e.forEach(function(o){if(o instanceof U&&!i){s.push(o);return}let a=U.parse(o);!a||!a.valid()||s.push(a)}),s}static toArray(e,i){if(!e||!Array.isArray(e))return e;let s=[];return e.forEach(function(o){if(Array.isArray(o)){s.push(o);return}let a=U.parse(o);!a||!a.valid()||s.push(a.toArray(i))}),s}},et=ns;var ls=class{constructor(e){this.options=e,this.scene=e.map?e.map.scene:e.scene,this.scene||Ve("SurfacePoint: \u8BF7\u4F20\u5165scene\u53C2\u6570",this.options),this._point=U.parse(e.position),this._point&&(this._position=this._point.toCartesian(),this._cartographic=this._point.toCartographic(),this._height_original=this._point.alt)}async start(){var s;if(!this._point)return this.getResult();this.scene._terrainProviderPromise&&await this.scene._terrainProviderPromise;let e=(s=this.options.has3dtiles)!=null?s:r.defined(Ae.pick3DTileset(this.scene,this._position)),i=!(this.scene.terrainProvider instanceof r.EllipsoidTerrainProvider);if(this._has3dtiles=e,this._hasTerrain=i,!i&&!e)return this.getResult();if(e){let o=await this.scene.clampToHeightMostDetailed([this._position.clone()],this.options.objectsToExclude,this.options.width);if(o.length>0){let a=o[0];if(r.defined(a)){let n=r.Cartographic.fromCartesian(a),h=n?n.height:0;if(r.defined(h)&&h!==0&&h>-1e3)return this.getResult(h)}}else{let a=this.scene.sampleHeight(this._cartographic,this.options.objectsToExclude,this.options.width);if(r.defined(a)&&a>-1e3)return this.getResult(a)}}if(this._hasTerrain){let o;try{let a=this.scene.terrainProvider;a&&a.availability&&(o=await r.sampleTerrainMostDetailed(this.scene.terrainProvider,[this._cartographic]))}catch(a){Lt("SurfacePoint:\u8D34\u5730\u5F62\u9AD8\u5EA6\u8BA1\u7B97\u5931\u8D25",a)}if(o&&o.length>0){let a=o[0];if(r.defined(a)&&r.defined(a.height))return this.getResult(a.height)}else return this.getResult(this.scene.globe.getHeight(this._cartographic)||0)}return this.getResult()}getResult(e=0){return this.options.callback&&this.options.callback(e)&&(this._point.alt=e),{height:e,height_original:this._height_original,point:this._point,position:r.Cartesian3.fromRadians(this._cartographic.longitude,this._cartographic.latitude,e),position_original:this._position,has3dtiles:this._has3dtiles,hasTerrain:this._hasTerrain}}},Dt=ls;var hs=class{constructor(e){this.options=e,this.scene=e.map?e.map.scene:e.scene,this.scene||Ve("SurfacePoints: \u8BF7\u4F20\u5165scene\u53C2\u6570",this.options),this.positions=et.toCartesians(this.options.positions)}async start(){var s;if(this.positions==null||this.positions.length===0){this.getResult();return}this.scene._terrainProviderPromise&&await this.scene._terrainProviderPromise();let e=(s=this.options.has3dtiles)!=null?s:r.defined(Ae.pick3DTileset(this.scene,this.positions)),i=!(this.scene.terrainProvider instanceof r.EllipsoidTerrainProvider);return this._has3dtiles=e,this._hasTerrain=i,!i&&!e?this.getResult():this.options.exact?this._startForExact():this._startForSketchy()}async _startForExact(){var e;if(this._has3dtiles){let i=[];for(let o=0;o<this.positions.length;++o)i.push(this.positions[o].clone());let s=await this.scene.clampToHeightMostDetailed(i,this.options.objectsToExclude);for(let o=0;o<s.length;++o)!s[o]&&(s[o]=this.positions[o]);if(s.length>0)return this.options.offset&&(s=Ae.addPositionsHeight(s,this.options.offset)),this.getResult(s)}if(this._hasTerrain&&this.scene.terrainProvider&&this.scene.terrainProvider.availability){let i=this.scene.globe.ellipsoid,s=i.cartesianArrayToCartographicArray(_0x1da275),o=r.Cartographic.fromCartesian(_0x1da275[0]).height,a=(e=this.options.offset)!=null?e:0,n=!1,h=await r.sampleTerrainMostDetailed(this.scene.terrainProvider,s);for(let d=0;d<h.length;++d)h[d]||(h[d]=this.positions[d]),h[d].height==null?(n=!0,h[d].height=a+o):h[d].height=a+h[d].height;let c=i.cartographicArrayToCartesianArray(h);return this.getResult(c,n)}return this.getResult()}async _startForSketchy(){let e=[];for(let i=0;i<this.positions.length;++i){let s=r.Cartographic.fromCartesian(this.positions[i]),o;if(this._has3dtiles){let a=this.scene.sampleHeight(s,this.options.objectsToExclude,this.options.width);r.defined(a)&&a>-1e3&&(o=a)}if(!r.defined(o)){let a=this.scene.globe.getHeight(s);r.defined(a)&&a>-1e3&&(o=a)}e.push(r.Cartesian3.fromRadians(s.longitude,s.latitude,o!=null?o:s.height))}return this.getResult(e)}getResult(e,i){return this.options.callback&&this.options.callback(e,i,this.positions),{positions:e||this.positions,positions_original:this.positions,noHeight:i,has3dtiles:this._has3dtiles,hasTerrain:this._hasTerrain}}},Hl=hs;var eu={ARCGIS:"arcgis",BING:"bing",COORD:"coord",AMAP:"amap",BAIDU:"baidu",GOOGLE:"google",TDT:"tdt",TENCENT:"tencent",GEO_VIS:"geo_vis",GRID:"grid",GOOGLE_2D:"google_2d",OSM:"osm",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",SINGLE_TILE:"single_tile",TMS:"tms",WMS:"wms",WMTS:"wmts",XYZ:"xyz"},V=eu;var cs=class extends r.WebMercatorTilingScheme{constructor(e){super(e);let i=new r.WebMercatorProjection;this._projection.project=function(s,o){return o=xe.WGS84ToGCJ02(r.Math.toDegrees(s.longitude),r.Math.toDegrees(s.latitude)),o=i.project(new r.Cartographic(r.Math.toRadians(o[0]),r.Math.toRadians(o[1]))),new r.Cartesian2(o.x,o.y)},this._projection.unproject=function(s,o){let a=i.unproject(s);return o=xe.GCJ02ToWGS84(r.Math.toDegrees(a.longitude),r.Math.toDegrees(a.latitude)),new r.Cartographic(r.Math.toRadians(o[0]),r.Math.toRadians(o[1]))}}},Ot=cs;var yh={img:"//webst{s}.is.autonavi.com/appmaptile?style=6&x={x}&y={y}&z={z}",elec:"//webrd{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}",cva:"//webst{s}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}"},ds=class extends r.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",yh[e.style]||yh.elec].join(""),e.subdomains=e.subdomains||["01","02","03","04"],e.crs==="WGS84"&&(e.tilingScheme=new Ot),super(e)}};V.AMAP="amap";var vh=ds;var tu=637099681e-2,wh=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],kt=[75,60,45,30,15,0],iu=[[1410526172116255e-23,898305509648872e-20,-1.9939833816331,200.9824383106796,-187.2403703815547,91.6087516669843,-23.38765649603339,2.57121317296198,-.03801003308653,173379812e-1],[-7435856389565537e-24,8983055097726239e-21,-.78625201886289,96.32687599759846,-1.85204757529826,-59.36935905485877,47.40033549296737,-16.50741931063887,2.28786674699375,1026014486e-2],[-3030883460898826e-23,898305509983578e-20,.30071316287616,59.74293618442277,7.357984074871,-25.38371002664745,13.45380521110908,-3.29883767235584,.32710905363475,685681737e-2],[-1981981304930552e-23,8983055099779535e-21,.03278182852591,40.31678527705744,.65659298677277,-4.44255534477492,.85341911805263,.12923347998204,-.04625736007561,448277706e-2],[309191371068437e-23,8983055096812155e-21,6995724062e-14,23.10934304144901,-.00023663490511,-.6321817810242,-.00663494467273,.03430082397953,-.00466043876332,25551644e-1],[2890871144776878e-24,8983055095805407e-21,-3068298e-14,7.47137025468032,-353937994e-14,-.02145144861037,-1234426596e-14,.00010322952773,-323890364e-14,826088.5]],Ch=[[-.0015702102444,111320.7020616939,0x60e374c3105a3,-0x24bb4115e2e164,0x5cc55543bb0ae8,-0x7ce070193f3784,0x5e7ca61ddf8150,-0x261a578d8b24d0,0x665d60f3742ca,82.5],[.0008277824516172526,111320.7020463578,6477955746671607e-7,-4082003173641316e-6,1077490566351142e-5,-1517187553151559e-5,1205306533862167e-5,-5124939663577472e-6,9133119359512032e-7,67.5],[.00337398766765,111320.7020202162,4481351045890365e-9,-2339375119931662e-8,7968221547186455e-8,-1159649932797253e-7,9723671115602145e-8,-4366194633752821e-8,8477230501135234e-9,52.5],[.00220636496208,111320.7020209128,51751.86112841131,3796837749470245e-9,992013.7397791013,-122195221711287e-8,1340652697009075e-9,-620943.6990984312,144416.9293806241,37.5],[-.0003441963504368392,111320.7020576856,278.2353980772752,2485758690035394e-9,6070.750963243378,54821.18345352118,9540.606633304236,-2710.55326746645,1405.483844121726,22.5],[-.0003218135878613132,111320.7020701615,.00369383431289,823725.6402795718,.46104986909093,2351.343141331292,1.58060784298199,8.77738589078284,.37238884252424,7.45]],ps=class{constructor(){this.isWgs84=!1}getDistanceByMC(e,i){if(!e||!i||(e=this.convertMC2LL(e),!e))return 0;let s=this.toRadians(e.lng),o=this.toRadians(e.lat);if(i=this.convertMC2LL(i),!i)return 0;let a=this.toRadians(i.lng),n=this.toRadians(i.lat);return this.getDistance(s,a,o,n)}getDistanceByLL(e,i){if(!e||!i)return 0;e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74),i.lng=this.getLoop(i.lng,-180,180),i.lat=this.getRange(i.lat,-74,74);let s=this.toRadians(e.lng),o=this.toRadians(e.lat),a=this.toRadians(i.lng),n=this.toRadians(i.lat);return this.getDistance(s,a,o,n)}convertMC2LL(e){if(!e)return{lng:0,lat:0};let i={};if(this.isWgs84){i.lng=e.lng/2003750834e-2*180;let a=e.lat/2003750834e-2*180;return i.lat=180/Math.PI*(2*Math.atan(Math.exp(a*Math.PI/180))-Math.PI/2),{lng:i.lng.toFixed(6),lat:i.lat.toFixed(6)}}let s={lng:Math.abs(e.lng),lat:Math.abs(e.lat)},o;for(let a=0;a<wh.length;a++)if(s.lat>=wh[a]){o=iu[a];break}return i=this.convertor(e,o),{lng:i.lng.toFixed(6),lat:i.lat.toFixed(6)}}convertLL2MC(e){if(!e)return{lng:0,lat:0};if(e.lng>180||e.lng<-180||e.lat>90||e.lat<-90)return e;if(this.isWgs84){let a={},n=6378137;a.lng=e.lng*Math.PI/180*n;let h=e.lat*Math.PI/180;return a.lat=n/2*Math.log((1+Math.sin(h))/(1-Math.sin(h))),{lng:parseFloat(a.lng.toFixed(2)),lat:parseFloat(a.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);let i={lng:e.lng,lat:e.lat},s;for(let a=0;a<kt.length;a++)if(i.lat>=kt[a]){s=Ch[a];break}if(!s){for(let a=0;a<kt.length;a++)if(i.lat<=-kt[a]){s=Ch[a];break}}let o=this.convertor(e,s);return{lng:parseFloat(o.lng.toFixed(2)),lat:parseFloat(o.lat.toFixed(2))}}convertor(e,i){if(!e||!i)return{lng:0,lat:0};let s=i[0]+i[1]*Math.abs(e.lng),o=Math.abs(e.lat)/i[9],a=i[2]+i[3]*o+i[4]*o*o+i[5]*o*o*o+i[6]*o*o*o*o+i[7]*o*o*o*o*o+i[8]*o*o*o*o*o*o;return s*=e.lng<0?-1:1,a*=e.lat<0?-1:1,{lng:s,lat:a}}getDistance(e,i,s,o){return tu*Math.acos(Math.sin(s)*Math.sin(o)+Math.cos(s)*Math.cos(o)*Math.cos(i-e))}toRadians(e){return Math.PI*e/180}toDegrees(e){return 180*e/Math.PI}getRange(e,i,s){return i!=null&&(e=Math.max(e,i)),s!=null&&(e=Math.min(e,s)),e}getLoop(e,i,s){for(;e>s;)e-=s-i;for(;e<i;)e+=s-i;return e}lngLatToMercator(e){return this.convertLL2MC(e)}lngLatToPoint(e){let i=this.convertLL2MC(e);return{x:i.lng,y:i.lat}}mercatorToLngLat(e){return this.convertMC2LL(e)}pointToLngLat(e){let i={lng:e.x,lat:e.y};return this.convertMC2LL(i)}pointToPixel(e,i,s,o){if(!e)return{x:0,y:0};e=this.lngLatToMercator(e);let a=this.getZoomUnits(i),n=Math.round((e.lng-s.lng)/a+o.width/2),h=Math.round((s.lat-e.lat)/a+o.height/2);return{x:n,y:h}}pixelToPoint(e,i,s,o){if(!e)return{lng:0,lat:0};let a=this.getZoomUnits(i),n=s.lng+a*(e.x-o.width/2),h=s.lat-a*(e.y-o.height/2),c={lng:n,lat:h};return this.mercatorToLngLat(c)}getZoomUnits(e){return Math.pow(2,18-e)}},xh=ps;var ms=class extends r.WebMercatorTilingScheme{constructor(e){super(e);let i=new xh;this._projection.project=function(s,o){return o=o||{},o=xe.WGS84ToGCJ02(r.Math.toDegrees(s.longitude),r.Math.toDegrees(s.latitude)),o=xe.GCJ02ToBD09(o[0],o[1]),o[0]=Math.min(o[0],180),o[0]=Math.max(o[0],-180),o[1]=Math.min(o[1],74.000022),o[1]=Math.max(o[1],-71.988531),o=i.lngLatToPoint({lng:o[0],lat:o[1]}),new r.Cartesian2(o.x,o.y)},this._projection.unproject=function(s,o){return o=o||{},o=i.mercatorToLngLat({lng:s.x,lat:s.y}),o=xe.BD09ToGCJ02(o.lng,o.lat),o=xe.GCJ02ToWGS84(o[0],o[1]),new r.Cartographic(r.Math.toRadians(o[0]),r.Math.toRadians(o[1]))},this.resolutions=e.resolutions||[]}tileXYToNativeRectangle(e,i,s,o){let a=this.resolutions[s],n=e*a,h=(e+1)*a,c=((i=-i)+1)*a,d=i*a;return r.defined(o)?(o.west=n,o.south=d,o.east=h,o.north=c,o):new r.Rectangle(n,d,h,c)}positionToTileXY(e,i,s){let o=this._rectangle;if(!r.Rectangle.contains(o,e))return;let n=this._projection.project(e);if(!r.defined(n))return;let h=this.resolutions[i],c=Math.floor(n.x/h),d=-Math.floor(n.y/h);return r.defined(s)?(s.x=c,s.y=d,s):new r.Cartesian2(c,d)}},Th=ms;var Eh={img:"//shangetu{s}.map.bdimg.com/it/u=x={x};y={y};z={z};v=009;type=sate&fm=46",vec:"//online{s}.map.bdimg.com/tile/?qt=tile&x={x}&y={y}&z={z}&styles=sl&v=020",custom:"//api{s}.map.bdimg.com/customimage/tile?&x={x}&y={y}&z={z}&scale=1&customid={style}",traffic:"//its.map.baidu.com:8002/traffic/TrafficTileService?time={time}&label={labelStyle}&v=016&level={z}&x={x}&y={y}&scaler=2"},us=class extends r.UrlTemplateImageryProvider{constructor(e={}){if(e.url=e.url||[e.protocol||"",Eh[e.style]||Eh.custom].join(""),e.crs==="WGS84"){let i=[];for(let s=0;s<19;s++)i[s]=256*Math.pow(2,18-s);e.tilingScheme=new Th({resolutions:i,rectangleSouthwestInMeters:new r.Cartesian2(-2003772637e-2,-1247410417e-2),rectangleNortheastInMeters:new r.Cartesian2(2003772637e-2,1247410417e-2)})}else e.tilingScheme=new r.WebMercatorTilingScheme({rectangleSouthwestInMeters:new r.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new r.Cartesian2(33554054,33746824)});e.maximumLevel=18,super(e),this._rectangle=this._tilingScheme.rectangle,this._url=e.url,this._crs=e.crs||"BD09",this._style=e.style||"normal"}requestImage(e,i,s){let o=this._tilingScheme.getNumberOfXTilesAtLevel(s),a=this._tilingScheme.getNumberOfYTilesAtLevel(s),n=this._url.replace("{z}",s).replace("{s}",String(1)).replace("{style}",this._style);return this._crs==="WGS84"?n=n.replace("{x}",String(e)).replace("{y}",String(-i)):n=n.replace("{x}",String(e-o/2)).replace("{y}",String(a/2-i-1)),r.ImageryProvider.loadImage(this,n)}};V.BAIDU="baidu";var Ph=us;var ru="//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}",fs=class extends r.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",ru.replace(/\{style\}/g,e.style||"vec").replace(/\{format\}/g,e.format||"png").replace(/\{key\}/g,e.key||"")].join(""),e.subdomains=e.subdomains||["1","2","3"],super(e)}};V.GEO_VIS="geoVis";var bh=fs;var Mh={img:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=s&x={x}&y={y}&z={z}",elec:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=m&x={x}&y={y}&z={z}",cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=h&x={x}&y={y}&z={z}",ter:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=t@131,r&x={x}&y={y}&z={z}",img_cva:"https://gac-geo.googlecnapps.cn/maps/vt?lyrs=y&x={x}&y={y}&z={z}"},_s=class extends r.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Mh[e.style]||Mh.elec].join(""),e.crs==="WGS84"&&(e.tilingScheme=new Ot),super(e)}};V.GOOGLE="google";var Ah=_s;var zt=class{constructor(e){this.options=e}static getTheme(e){return this.THEMES[e]||this.THEMES.grayscale}static getThemeList(){return Object.keys(this.THEMES).map(e=>({key:e,...this.THEMES[e]}))}static async convertToTheme(e,i="grayscale"){let s=document.createElement("canvas");s.width=e.width,s.height=e.height;let o=s.getContext("2d");o.drawImage(e,0,0);let a=o.getImageData(0,0,s.width,s.height),n=a.data,h;typeof i=="object"?h=i:h=this.getTheme(i);let c=new Map;for(let[d,p]of h.colorList){let f=`${d[0]},${d[1]},${d[2]}`;c.set(f,p)}for(let d=0;d<n.length;d+=4){let p=n[d],f=n[d+1],g=n[d+2],u=`${p},${f},${g}`;if(c.has(u)){let m=c.get(u);n[d]=m[0],n[d+1]=m[1],n[d+2]=m[2]}else{let m=Number.MAX_VALUE,T=null;for(let[w,P]of h.colorList){let M=Math.sqrt(Math.pow(p-w[0],2)+Math.pow(f-w[1],2)+Math.pow(g-w[2],2));M<m&&(m=M,T=P)}T&&m<50?(n[d]=T[0],n[d+1]=T[1],n[d+2]=T[2]):(n[d]=h.defaultColor[0],n[d+1]=h.defaultColor[1],n[d+2]=h.defaultColor[2])}}return o.putImageData(a,0,0),o.filter="contrast(1.1) brightness(1.05)",o.drawImage(s,0,0),await createImageBitmap(s)}};lt(zt,"THEMES",{grayscale:{name:"\u7ECF\u5178\u7070",colorList:[[[245,244,238],[0,23,47]],[[254,240,145],[0,2,5]],[[200,200,200],[50,50,50]]],defaultColor:[40,67,102]},fresh:{name:"\u6E05\u65B0\u7EFF",colorList:[[[245,244,238],[220,240,230]],[[254,240,145],[200,230,180]],[[200,200,200],[180,200,190]]],defaultColor:[150,180,170]},orange:{name:"\u6D3B\u529B\u6A59",colorList:[[[245,244,238],[255,245,235]],[[254,240,145],[255,220,170]],[[200,200,200],[220,180,150]]],defaultColor:[200,140,100]},techBlue:{name:"\u79D1\u6280\u84DD",colorList:[[[245,244,238],[0,100,200]],[[254,240,145],[0,150,255]],[[200,200,200],[50,100,150]]],defaultColor:[0,80,160]},freshGreen:{name:"\u6DE1\u96C5\u7EFF",colorList:[[[245,244,238],[180,220,180]],[[254,240,145],[150,200,150]],[[200,200,200],[120,180,120]]],defaultColor:[100,160,100]},purple:{name:"\u4F18\u96C5\u7D2B",colorList:[[[245,244,238],[240,230,250]],[[254,240,145],[220,190,240]],[[200,200,200],[180,150,200]]],defaultColor:[150,100,180]}});var gs=zt;var su="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",ys=class extends r.UrlTemplateImageryProvider{constructor(e={}){e.style=e.style||"vec",e.colorScheme=e.colorScheme||"default",super({url:[e.protocol||"",su.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18}),this._options=e}async requestImage(e,i,s,o){let a=await super.requestImage(e,i,s,o);return this._options.colorScheme==="default"||!gs.THEMES[this._options.colorScheme]||this._options.style!=="vec"?a:this.convertToGrayscale(a,this._options.colorScheme)}async convertToGrayscale(e,i="grayscale"){return await gs.convertToTheme(e,i)}};V.TDT="tdt";var Sh=ys;var Ih={img:"//p{s}.map.gtimg.com/sateTiles/{z}/{sx}/{sy}/{x}_{reverseY}.jpg?version=400",elec:"//rt{s}.map.gtimg.com/tile?z={z}&x={x}&y={reverseY}&styleid={style}&scene=0&version=347"},vs=class extends r.UrlTemplateImageryProvider{constructor(e={}){let i=e.url||[e.protocol||"",Ih[e.style]||Ih.elec].join("");e.url=i.replace("{style}",e.style||1),e.subdomains=e.subdomains||["1","2","3"],e.style==="img"&&(e.customTags={sx:(s,o,a,n)=>o>>4,sy:(s,o,a,n)=>(1<<n)-a>>4}),super(e)}};V.TENCENT="tencent";var Lh=vs;var ws=class{static createAMapImageryLayer(e){return Promise.resolve(new vh(e))}static createBaiduImageryLayer(e){return Promise.resolve(new Ph(e))}static createGeoVisImageryLayer(e){return Promise.resolve(new bh(e))}static createGoogleImageryLayer(e){return Promise.resolve(new Ah(e))}static createTdtImageryLayer(e){return Promise.resolve(new Sh(e))}static createTencentImageryLayer(e){return Promise.resolve(new Lh(e))}static createArcGisImageryLayer(e){return r.ArcGisMapServerImageryProvider.fromUrl(e.url,e)}static createBingImageryLayer(e){return r.BingMapsImageryProvider.fromUrl(e.url,e)}static createOSMImageryLayer(e){return Promise.resolve(new r.OpenStreetMapImageryProvider(e))}static createSingleTileImageryLayer(e){return r.SingleTileImageryProvider.fromUrl(e.url,e)}static createWMSImageryLayer(e){return Promise.resolve(new r.WebMapServiceImageryProvider(e))}static createGoogle2DImageryLayer(e){let i=r.Google2DImageryProvider;return e.assetId?i.fromIonAssetId(e):i.fromUrl(e)}static createWMTSImageryLayer(e){return Promise.resolve(new r.WebMapTileServiceImageryProvider(e))}static createXYZImageryLayer(e){return Promise.resolve(new r.UrlTemplateImageryProvider(e))}static createCoordImageryLayer(e){return Promise.resolve(new r.TileCoordinatesImageryProvider(e))}static createGridImageryLayer(e){return Promise.resolve(new r.GridImageryProvider(e))}static createMapboxImageryLayer(e){return Promise.resolve(new r.MapboxImageryProvider(e))}static createMapboxStyleImageryLayer(e){return Promise.resolve(new r.MapboxStyleImageryProvider(e))}static createTMSImageryLayer(e){return r.TileMapServiceImageryProvider.fromUrl(e.url,e)}static createImageryLayer(e,i){let s;switch(e){case V.AMAP:s=this.createAMapImageryLayer(i);break;case V.BAIDU:s=this.createBaiduImageryLayer(i);break;case V.GEO_VIS:s=this.createGeoVisImageryLayer(i);break;case V.GOOGLE:s=this.createGoogleImageryLayer(i);break;case V.TDT:s=this.createTdtImageryLayer(i);break;case V.TENCENT:s=this.createTencentImageryLayer(i);break;case V.ARCGIS:s=this.createArcGisImageryLayer(i);break;case V.BING:s=this.createBingImageryLayer(i);break;case V.OSM:s=this.createOSMImageryLayer(i);break;case V.SINGLE_TILE:s=this.createSingleTileImageryLayer(i);break;case V.WMS:s=this.createWMSImageryLayer(i);break;case V.WMTS:s=this.createWMTSImageryLayer(i);break;case V.XYZ:s=this.createXYZImageryLayer(i);break;case V.COORD:s=this.createCoordImageryLayer(i);break;case V.GRID:s=this.createGridImageryLayer(i);break;case V.GOOGLE_2D:s=this.createGoogle2DImageryLayer(i);break;case V.MAPBOX:s=this.createMapboxImageryLayer(i);break;case V.MAPBOX_STYLE:s=this.createMapboxStyleImageryLayer(i);break;case V.TMS:s=this.createTMSImageryLayer(i);break;default:break}return s}},ou=ws;var Cs=class extends r.GeographicTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-180,90],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToRectangle(e,i,s,o){if(!this._resolutions||!this._resolutions[s+this._zoomOffset])return r.Rectangle.MAX_VALUE;let a=this._resolutions[s+this._zoomOffset]*this._tileSize,n=r.Math.toRadians(this._origin[0]+e*a),h=r.Math.toRadians(this._origin[1]-(i+1)*a),c=r.Math.toRadians(this._origin[0]+(e+1)*a),d=r.Math.toRadians(this._origin[1]-i*a);return o?(o.west=n,o.south=h,o.east=c,o.north=d,o):new r.Rectangle(n,h,c,d)}positionToTileXY(e,i,s){if(!this._resolutions||!this._resolutions[i+this._zoomOffset])return new r.Cartesian2;let o=this._resolutions[i+this._zoomOffset]*this._tileSize,a=r.Math.toDegrees(e.longitude),n=r.Math.toDegrees(e.latitude),h=Math.floor((a-this._origin[0])/o),c=Math.floor((this._origin[1]-n)/o);return s?(s.x=h,s.y=c,s):new r.Cartesian2(Math.max(0,h),Math.max(0,c))}},au=Cs;var xs=class extends r.WebMercatorTilingScheme{constructor(e={}){super(e),this._origin=e.origin||[-200375083427892e-7,200375083427892e-7],this._zoomOffset=e.zoomOffset||0,this._tileSize=e.tileSize||256,this._resolutions=e.resolutions||[]}get zoomOffset(){return this._zoomOffset}tileXYToNativeRectangle(e,i,s,o){if(!this._resolutions||!this._resolutions[s+this._zoomOffset])return r.Rectangle.MAX_VALUE;if(e<0||i<0)return r.Rectangle.MAX_VALUE;let a=this._resolutions[s+this._zoomOffset]*this._tileSize,n=this._origin[0]+e*a,h=this._origin[1]-(i+1)*a,c=this._origin[0]+(e+1)*a,d=this._origin[1]-i*a;return o?(o.west=n,o.south=h,o.east=c,o.north=d,o):new r.Rectangle(n,h,c,d)}positionToTileXY(e,i,s){let o=this._rectangle;if(!r.Rectangle.contains(o,e))return;if(!this._resolutions||!this._resolutions[i+this._zoomOffset])return new r.Cartesian2;let a=this._resolutions[i+this._zoomOffset]*this._tileSize,h=this._projection.project(e),c=Math.floor((h.x-this._origin[0])/a),d=Math.floor((this._origin[1]-h.y)/a);return s?(s.x=c,s.y=d,s):new r.Cartesian2(Math.max(0,c),Math.max(0,d))}},nu=xs;var lu={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr",GEO:"geo",TDT:"tdt"},ve=lu;var kc=pm(Oc(),1);function Vt(l,e,i,s,o,a){let n=l.tileXYToRectangle(i,s,o);return r.defined(r.Rectangle.intersection(n,e,a))}function ju(l){let e=[[[0,0,1,0]]],i=e.length,s=new r.TileAvailability(l.tilingScheme,19);for(let o=0;o<i;++o){let a=e[o];for(let n=0;n<a.length;++n){let h=a[n];s.addAvailableTileRange(o,h[0],h[1],h[2],h[3])}}return s}function Yu(l,e,i,s,o){let a=new r.HeightmapTerrainData({buffer:l._transformBuffer(e),width:l._width,height:l._height,childTileMask:l._getChildTileMask(s,o,i),structure:l._terrainDataStructure});return a._skirtHeight=6e3,l.availability.addAvailableTileRange(i,s,o,s,o),a}var Ns=class extends r.CustomHeightmapTerrainProvider{constructor(e){if(e=r.defaultValue(e,{}),super({...e,ellipsoid:r.Ellipsoid.WGS84,width:64,height:64}),!r.defined(e.url))throw new r.DeveloperError("options.url is required.");this._dataType=r.defaultValue(e.dataType,"int16"),this._url=e.url,this._subdomains=e.subdomains,this._token=e.token,this._rectangles=[],this._topLevel=5,this._bottomLevel=11,this._terrainDataStructure={heightScale:.001,heightOffset:-1e3,elementsPerHeight:3,stride:4,elementMultiplier:256,isBigEndian:!0},this._availability=ju(this)}get availability(){return this._availability}requestTileGeometry(e,i,s,o){if(s>=this._bottomLevel)return Promise.reject(`${s}\u8BE5\u7EA7\u522B\u4E0D\u53D1\u9001\u8BF7\u6C42!`);if(s<this._topLevel)return Promise.resolve(new r.HeightmapTerrainData({buffer:this._getVHeightBuffer(),width:this._width,height:this._height,childTileMask:this._getChildTileMask(e,i,s),structure:this._terrainDataStructure}));let a="",n=this._url;Array.isArray(this._subdomains)&&this._subdomains.length&&(a=this._subdomains[(e+i)%this._subdomains.length],n=n.replace("{s}",a)),n=n.replace("{token}",this._token).replace("{x}",e).replace("{y}",i).replace("{z}",s+1);let h=r.Resource.fetchArrayBuffer({url:n,request:o});if(h)return h.then(c=>c.byteLength<1e3?Promise.reject("\u65E0\u6548\u6570\u636E"):(0,kc.inflate)(c)).then(c=>Yu(this,c,s,e,i))}getTileDataAvailable(e,i,s){if(s<this._bottomLevel)return!0}_transformBuffer(e){let i=2;this._dataType==="int16"?i=2:this._dataType==="float"&&(i=4);let s=e;if(s.length!==22500*i)return null;let o,a,n,h,c=new ArrayBuffer(i),d=new DataView(c),p=this._width,f=this._height,g=new Uint8Array(p*f*4);for(let u=0;u<f;u++)for(let m=0;m<p;m++){n=parseInt(149*u/(f-1)),h=parseInt(149*m/(p-1)),a=i*(150*n+h),i===4?(d.setInt8(0,s[a]),d.setInt8(1,s[a+1]),d.setInt8(2,s[a+2]),d.setInt8(3,s[a+3]),o=d.getFloat32(0,!0)):o=s[a]+256*s[a+1],(1e4<o||o<-2e3)&&(o=0);let T=(o+1e3)/.001,w=4*(u*p+m);g[w]=T/65536,g[1+w]=(T-256*g[w]*256)/256,g[2+w]=T-256*g[w]*256-256*g[1+w],g[3+w]=255}return g}_getVHeightBuffer(){let e=this._vHeightBuffer;if(!r.defined(e)){e=new Uint8ClampedArray(this._width*this._height*4);for(let i=0;i<this._width*this._height*4;)e[i++]=15,e[i++]=66,e[i++]=64,e[i++]=255;this._vHeightBuffer=e}return e}_getChildTileMask(e,i,s){let o=new r.Rectangle,a=this._tilingScheme,n=this._rectangles,h=a.tileXYToRectangle(e,i,s),c=0;for(let d=0;d<n.length&&c!==15;++d){let p=n[d];if(!(p.maxLevel<=s)){let f=p.rectangle,g=r.Rectangle.intersection(f,h,o);r.defined(g)&&(Vt(a,f,2*e,2*i,s+1,o)&&(c|=4),Vt(a,f,2*e+1,2*i,s+1,o)&&(c|=8),Vt(a,f,2*e,2*i+1,s+1,o)&&(c|=1),Vt(a,f,2*e+1,2*i+1,s+1,o)&&(c|=2))}}return c}},vt=Ns;var Fs=class extends vt{constructor(e={}){if(!e.urls){let i=e.url||"https://t{s}.tianditu.gov.cn/mapservice/swdx",s=e.key||"",o;Array.isArray(e.subdomains)?o=e.subdomains.slice():r.defined(e.subdomains)&&e.subdomains.length>0?o=e.subdomains.split(""):o=["0","1","2","3","4","5","6","7"],e.subdomains=o,e.url=i+"?T=elv_c&tk="+s}super(e),this._layers=[]}};ve.TDT="tdt";var Ws=Fs;var Gs=class{static createEllipsoidTerrain(e){return Promise.resolve(new r.EllipsoidTerrainProvider(e))}static createUrlTerrain(e){return r.CesiumTerrainProvider.fromUrl(e.url,e)}static createGoogleTerrain(e){return r.GoogleEarthEnterpriseTerrainProvider.fromUrl(e.url,e)}static createArcgisTerrain(e){return r.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}static createVRTerrain(e){return r.VRTheWorldTerrainProvider.fromUrl(e.url,e)}static createGeoTerrain(e){return Promise.resolve(new vt(e))}static createTdtTerrain(e){return Promise.resolve(new Ws(e))}static createTerrain(e,i){let s;switch(e){case ve.NONE:s=this.createEllipsoidTerrain(i);break;case ve.XYZ:s=this.createUrlTerrain(i);break;case ve.GOOGLE:s=this.createGoogleTerrain(i);break;case ve.ARCGIS:s=this.createArcgisTerrain(i);break;case ve.VR:s=this.createVRTerrain(i);break;case ve.GEO:s=this.createGeoTerrain(i);break;case ve.TDT:s=this.createTdtTerrain(i);break;default:break}return s}},qu=Gs;var Xu={VECTOR:"vector",HEAT_MAP:"heat-map",WIND:"wind",LAYER_GROUP:"layer_group",TOPOJSON:"topojson",TILESET:"tileset",TDT_DM:"tdt_dm",S3M:"s3m",RASTER_TILE:"raster-tile",PRIMITIVE:"primitive",PLANE_VIDEO:"plane_video",LABEL:"label",KML:"kml",I3S:"i3s",HTML:"html",GROUND_PRIMITIVE:"ground_primitive",GRATICULE:"graticule",GPX:"gpx",GEOJSON:"geojson",FEATURE_GRID:"feature_grid",DYNAMIC:"dynamic",CZML:"czml",CLUSTER:"cluster",CAMERA_VIDEO:"camera_video"},Zt=Xu;var Hs=class{constructor(e){this._id=x.uuid(),this._bid=e||x.uuid(),this._delegate=void 0,this._viewer=void 0,this._state=void 0,this._show=!0,this._isGround=!1,this._cache={},this._attr={},this._layerEvent=new cr,this._layerEvent.on(Ge.ADD,this._onAdd,this),this._layerEvent.on(Ge.REMOVE,this._onRemove,this)}get layerId(){return this._id}get id(){return this._bid}get delegate(){return this._delegate}set show(e){this._show=e,this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}get layerEvent(){return this._layerEvent}set attr(e){this._attr=e}get attr(){return this._attr}get state(){return this._state}_addedHook(){}_removedHook(){}_onAdd(e){this._viewer=e,this._delegate&&(this._delegate instanceof r.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._delegate):this._viewer.scene.primitives.add(this._delegate):this._delegate instanceof r.ImageryLayer?this._viewer.imageryLayers.add(this._delegate):this._viewer.dataSources.add(this._delegate),this._addedHook&&this._addedHook(),this._state=_.ADDED)}_onRemove(){this._delegate&&this._viewer&&(this._cache={},this._delegate instanceof r.PrimitiveCollection?(this._delegate.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._delegate):this._viewer.scene.primitives.remove(this._delegate)):this._delegate instanceof r.ImageryLayer?this._viewer.imageryLayers.remove(this._delegate,!1):this._delegate instanceof Promise?(this._delegate.then(e=>{e.entities.removeAll()}),this._viewer.dataSources.remove(this._delegate)):(this._delegate.entities&&this._delegate.entities.removeAll(),this._viewer.dataSources.remove(this._delegate)),this._removedHook&&this._removedHook(),this._state=_.REMOVED)}_addOverlay(e){this._cache.hasOwnProperty(e.overlayId)||(this._cache[e.overlayId]=e,this._delegate&&e.fire(Fe.ADD,this),this._state===_.CLEARED&&(this._state=_.ADDED))}_removeOverlay(e){this._cache.hasOwnProperty(e.overlayId)&&(this._delegate&&e.fire(Fe.REMOVE,this),delete this._cache[e.overlayId])}addOverlay(e){return this._addOverlay(e),this}addOverlays(e){return Array.isArray(e)&&e.forEach(i=>{this._addOverlay(i)}),this}removeOverlay(e){return this._removeOverlay(e),this}getOverlay(e){return this._cache[e]||void 0}getOverlayById(e){let i;return Object.keys(this._cache).forEach(s=>{this._cache[s].id===e&&(i=this._cache[s])}),i}getOverlaysByAttr(e,i){let s=[];return this.eachOverlay(o=>{o.attr[e]===i&&s.push(o)},this),s}eachOverlay(e,i){return Object.keys(this._cache).forEach(s=>{e&&e.call(i||this,this._cache[s])}),this}getOverlays(){let e=[];return Object.keys(this._cache).forEach(i=>{e.push(this._cache[i])}),e}clear(){}remove(){this._viewer&&this._viewer.removeLayer(this)}addTo(e){return e!=null&&e.addLayer&&e.addLayer(this),this}setStyle(e){}on(e,i,s){return this._layerEvent.on(e,i,s||this),this}off(e,i,s){return this._layerEvent.off(e,i,s||this),this}fire(e,i){return this._layerEvent.fire(e,i),this}static registerType(e){e&&(Zt[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getLayerType(e){return Zt[e.toLocaleUpperCase()]||void 0}},I=Hs;var Bs=class{constructor(e){this._id=e||x.uuid(),this._cache={},this._show=!0,this._viewer=void 0,this._layerGroupEvent=new lr,this._layerGroupEvent.on(We.ADD,this._onAdd,this),this._layerGroupEvent.on(We.REMOVE,this._onRemove,this),this._state=_.INITIALIZED}get id(){return this._id}get type(){return I.getLayerType("layer_group")}get show(){return this._show}set show(e){this._show=e,Object.keys(this._cache).forEach(i=>{this._cache[i].show=this._show})}get layerGroupEvent(){return this._layerGroupEvent}get state(){return this._state}_onAdd(e){this._viewer=e,Object.keys(this._cache).forEach(i=>{this._viewer.addLayer(this._cache[i])}),this._state=_.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._viewer&&this._viewer.removeLayer(this._cache[e])}),this._cache={},this._state=_.REMOVED}addLayer(e){return Object(this._cache).hasOwnProperty(e.id)||(this._cache[e.id]=e,this._viewer&&this._viewer.addLayer(e)),this}removeLayer(e){return Object(this._cache).hasOwnProperty(e.id)&&(this._viewer&&this._viewer.removeLayer(e),delete this._cache[e.id]),this}getLayer(e){return this._cache[e]||void 0}getLayers(){let e=[];return Object.keys(this._cache).forEach(i=>{e.push(this._cache[i])}),e}addTo(e){return e&&e.addLayerGroup&&e.addLayerGroup(this),this}remove(){return this._viewer&&this._viewer.removeLayerGroup(this),this}};I.registerType("layer_group");var Ju=Bs;var Qu={radius:60,maxZoom:25,style:"circle",image:"",gradientColors:{1e-4:r.Color.DEEPSKYBLUE,.001:r.Color.GREEN,.01:r.Color.ORANGE,.1:r.Color.RED},gradientImages:{},showCount:!0,fontSize:12,clusterSize:16,fontColor:r.Color.BLACK,getCountOffset:l=>({x:-3.542857*String(l).length+1.066667,y:String(l).length>3?5:4})},Us=class extends I{constructor(e,i={}){super(e),this._delegate=new r.PrimitiveCollection,this._options={...Qu,...i},this._billboards=this._delegate.add(new r.BillboardCollection),this._labels=this._delegate.add(new r.LabelCollection),this._cluster=new Ke({radius:this._options.radius,maxZoom:this._options.maxZoom}),this._allCount=0,this._changedRemoveCallback=void 0,this._lastChangedTime=null,this._state=_.INITIALIZED}get type(){return I.getLayerType("cluster")}_addOverlay(e){}_removeOverlay(e){}_getCircleImage(e,i){let s=this._options.clusterSize*(String(i).length+1),o=e.toCssColorString()+"-"+i;if(!this._cache[o]){let a=document.createElement("canvas");a.width=s,a.height=s;let n=a.getContext("2d");n.save(),n.scale(s/24,s/24),n.fillStyle=e.withAlpha(.2).toCssColorString(),n.beginPath(),n.arc(12,12,9,0,2*Math.PI),n.closePath(),n.fill(),n.beginPath(),n.arc(12,12,6,0,2*Math.PI),n.fillStyle=e.toCssColorString(),n.closePath(),n.fill(),n.restore(),this._cache[o]=a.toDataURL()}return this._cache[o]}_getClusteringImage(e,i){let s=this._options.clusterSize*(String(i).length+1),o=e.toCssColorString()+"-"+i,a=-Math.PI/12,n=Math.PI/2,h=Math.PI/6;if(!this._cache[o]){let c=document.createElement("canvas");c.width=s,c.height=s;let d=c.getContext("2d");d.save(),d.scale(s/24,s/24),d.beginPath(),d.arc(12,12,6,0,2*Math.PI),d.fillStyle=e.toCssColorString(),d.fill(),d.closePath(),d.lineWidth=2;for(let p=0;p<3;p++)d.beginPath(),d.arc(12,12,8,a,a+n,!1),d.strokeStyle=e.withAlpha(.4).toCssColorString(),d.stroke(),d.arc(12,12,11,a,a+n,!1),d.strokeStyle=e.withAlpha(.2).toCssColorString(),d.stroke(),d.closePath(),a=a+n+h;d.restore(),this._cache[o]=c.toDataURL()}return this._cache[o]}_getClusterImage(e){let i=e/this._allCount,s;if(this._options.style==="custom"){let o=Object.keys(this._options.gradientImages).sort((a,n)=>Number(a)-Number(n));for(let a=o.length-1;a>=0;a--)if(i>=Number(o[a])){s=this._options.gradientImages[o[a]];break}s||(s=this._options.gradientImages[o[0]])}else{let o=Object.keys(this._options.gradientColors).sort((n,h)=>Number(n)-Number(h)),a;for(let n=o.length-1;n>=0;n--)if(i>=Number(o[n])){a=this._options.gradientColors[o[n]];break}a||(a=this._options.gradientColors[o[0]]),s=this._options.style==="circle"?this._getCircleImage(a,e):this._getClusteringImage(a,e)}return s}_changeCluster(e){let i=r.getTimestamp();if(this._lastChangedTime&&i-this._lastChangedTime<=1e3)return;this._lastChangedTime=i,this._cache={},this._billboards.removeAll(),this._labels.removeAll();let s=this._viewer.camera.computeViewRectangle();s||(s=this._viewer.viewBounds),this._allCount&&this._cluster.getClusters([r.Math.toDegrees(s.west),r.Math.toDegrees(s.south),r.Math.toDegrees(s.east),r.Math.toDegrees(s.north)],this._viewer.zoom).forEach(a=>{let n=x.uuid();if(a.properties.cluster){let h=a.properties.point_count,c=this._billboards.add({position:r.Cartesian3.fromDegrees(+a.geometry.coordinates[0],+a.geometry.coordinates[1]),image:this._getClusterImage(h)});if(c.layerId=this.layerId,c.overlayId=n,c.attr={count:h},this._cache[n]=c,this._options.showCount){let d=this._labels.add({position:r.Cartesian3.fromDegrees(+a.geometry.coordinates[0],+a.geometry.coordinates[1]),text:String(h),font:`${this._options.fontSize} px sans-serif`,disableDepthTestDistance:Number.POSITIVE_INFINITY,fillColor:this._options.fontColor,scale:.8,pixelOffset:this._options.getCountOffset(h)});d.layerId=this.layerId,d.overlayId=n,d.attr={count:h},this._cache[n]=d}}else{let h=this._billboards.add({position:r.Cartesian3.fromDegrees(+a.geometry.coordinates[0],+a.geometry.coordinates[1]),image:this._options.image,...a.properties.style});h.layerId=this.layerId,h.overlayId=n,h.attr=a.properties,this._cache[n]=h}})}_addedHook(){this._changedRemoveCallback=this._viewer.camera.changed.addEventListener(this._changeCluster,this)}_removedHook(){this._changedRemoveCallback&&this._changedRemoveCallback()}setPoints(e=[]){return e.length&&(this._allCount=e.length,this._cluster.load(e.map(i=>{let s=v.parsePosition(i);return{type:"Feature",geometry:{type:"Point",coordinates:[s.lng,s.lat]},properties:i.attr||{}}}))),this}clear(){return this._cache={},this._allCount=0,this._state=_.CLEARED,this}};I.registerType("cluster");var Ku=Us;var Vs=class extends I{constructor(e,i="",s={}){super(e),this._delegate=r.CzmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("czml")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(a=>{e.call(i,a)})}),this}};I.registerType("czml");var $u=Vs;var Zs=class extends I{constructor(e){super(e),this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("dynamic")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("dynamic");var ef=Zs;var js=class extends I{constructor(e){super(e),this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("vector")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("vector");var rt=js;var tf={name:"",count:10,maximumLevel:21,dataProperty:"",callback:()=>null},Ys=class extends I{constructor(e,i,s={}){super(e),this._url=i,this._options={...tf,...s},this._levelLayers={},this._tileWidth=256,this._tileHeight=256,this._maximumLevel=this._options.maximumLevel,this._tilingScheme=this._options.tilingScheme||new r.GeographicTilingScheme,this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._token=void 0;for(let o=0;o<this.maximumLevel;o++)this._levelLayers[String(o)]=new rt(e+"-grid-"+o);this._viewer=void 0,this._imageryLayer=void 0,this._imagery=document.createElement("canvas"),this._imagery.width=this._tileWidth,this._imagery.height=this._tileHeight,this._state=_.INITIALIZED}get type(){return I.getLayerType("feature_grid")}get url(){return this._url}get show(){return this._show}set show(e){this._show=e,Object.keys(this._levelLayers).forEach(i=>{this._levelLayers[i].show=e})}get token(){return this._token}get tileWidth(){if(!this.ready)throw new r.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this.ready)throw new r.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this.ready)throw new r.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new r.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}get tilingScheme(){if(!this.ready)throw new r.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new r.DeveloperError("rectangle must not be called before the imagery provider is ready.");return this._rectangle}get ready(){return!!this._url}get credit(){return this._credit}get hasAlphaChannel(){return!0}_onAdd(e){this._viewer=e,this._imageryLayer=this._viewer.imageryLayers.addImageryProvider(this),Object.keys(this._levelLayers).forEach(i=>{this._viewer.addLayer(this._levelLayers[i])}),this._state=_.ADDED}_onRemove(){this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach(e=>{this._viewer.removeLayer(this._levelLayers[e])}),this._state=_.REMOVED}getTileCredits(e,i,s){}requestImage(e,i,s,o){let a=this._levelLayers[String(s)],n=this._tilingScheme.tileXYToRectangle(e,i,s);return this._viewer&&n&&a&&r.Rectangle.intersection(n,this._viewer.viewBounds)&&r.Resource.fetchJson({url:this._url,queryParameters:{minX:r.Math.toDegrees(n.west),minY:r.Math.toDegrees(n.south),maxX:r.Math.toDegrees(n.east),maxY:r.Math.toDegrees(n.north),count:this._options.count}}).then(h=>{let c=h;if(this._options.dataProperty&&(c=h[this._options.dataProperty]),c&&c.length){for(let d=s+3;d<this._maximumLevel;d++)this._levelLayers[String(d)]&&this._levelLayers[String(d)].clear();c.forEach(d=>{let p=this._options.callback(d);p&&a.addOverlay(p)})}}),this._imagery}clear(){Object.keys(this._levelLayers).forEach(e=>{this._levelLayers[e].clear()}),this._state=_.CLEARED}};I.registerType("feature_grid");var rf=Ys;var sf={},Z=sf;var qs=class{constructor(){this._id=x.uuid(),this._bid=x.uuid(),this._delegate=void 0,this._layer=void 0,this._state=void 0,this._show=!0,this._style={},this._attr={},this._allowDrillPicking=!1,this._contextMenu=[],this._overlayEvent=new pr,this._overlayEvent.on(Fe.ADD,this._onAdd,this),this._overlayEvent.on(Fe.REMOVE,this._onRemove,this)}get overlayId(){return this._id}get type(){return""}get id(){return this._bid}set id(e){this._bid=e}get show(){return this._show}set show(e){this._show=e,x.isPromise(this._delegate)?this._delegate.then(i=>{i.show=this._show}):this._delegate&&(this._delegate.show=this._show)}get attr(){return this._attr}set attr(e){this._attr=e}get allowDrillPicking(){return this._allowDrillPicking}set allowDrillPicking(e){this._allowDrillPicking=e}get overlayEvent(){return this._overlayEvent}get delegate(){return this._delegate}get state(){return this._state}get contextMenu(){return this._contextMenu}set contextMenu(e){this._contextMenu=e}static registerType(e){e&&(Z[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getOverlayType(e){return Z[e.toLocaleUpperCase()]||void 0}_getLayerCollection(e){let i;switch(e){case"point_primitive":i=this._layer.points;break;case"billboard_primitive":case"bounce_billboard_primitive":i=this._layer.billboards;break;case"label_primitive":case"bounce_label_primitive":i=this._layer.labels;break;case"polyline_primitive":i=this._layer.polylines;break;case"cloud_primitive":i=this._layer.clouds;break;default:break}return i}_mountedHook(){}_addedHook(){var e;if(!this._delegate)return!1;this._delegate instanceof Promise?this._delegate.then(i=>{var s;i.layerId=(s=this._layer)==null?void 0:s.layerId,i.overlayId=this._id}):(this._delegate.layerId=(e=this._layer)==null?void 0:e.layerId,this._delegate.overlayId=this._id)}_removedHook(){}_onAdd(e){var i,s,o,a;if(e){if(this._layer=e,this._mountedHook&&this._mountedHook(),(s=(i=this._layer)==null?void 0:i.delegate)!=null&&s.entities&&this._delegate)this._layer.delegate.entities.add(this._delegate);else if((a=(o=this._layer)==null?void 0:o.delegate)!=null&&a.add){let n=this._getLayerCollection(this.type);n?(this._delegate&&(this._delegate=n.add(this._delegate)),x.merge(this._delegate,this._style),this.update&&this.destroy&&this._layer.delegate.add(this)):x.isPromise(this._delegate)?this._delegate.then(h=>{this._layer.delegate.add(h)}):this.update&&this.destroy?this._layer.delegate.add(this):this._delegate&&this._layer.delegate.add(this._delegate)}this._addedHook&&this._addedHook(),this._state=_.ADDED}}_onRemove(){var e,i,s,o;if(this._layer){if((i=(e=this._layer)==null?void 0:e.delegate)!=null&&i.entities)this._layer.delegate.entities.remove(this._delegate);else if((o=(s=this._layer)==null?void 0:s.delegate)!=null&&o.remove){let a=this._getLayerCollection(this.type);a?(this._delegate&&a.remove(this._delegate),this.update&&this.destroy&&this._layer.delegate.remove(this)):x.isPromise(this._delegate)?this._delegate.then(n=>{this._layer.delegate.remove(n)}):this.update&&this.destroy?this._layer.delegate.remove(this):this._delegate&&this._layer.delegate.remove(this._delegate)}this._removedHook&&this._removedHook(),this._state=_.REMOVED}}setLabel(e,i){return this._delegate?(this._delegate instanceof r.Entity&&(this._delegate.label={...i,text:e}),this):this}setStyle(e){return this}remove(){return this._layer&&this._layer.removeOverlay(this),this}addTo(e){return e&&e.addOverlay&&e.addOverlay(this),this}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this}fire(e,i){return this._overlayEvent.fire(e,i),this}},C=qs;var Xs=class extends C{constructor(e,i){super(),this._delegate=new r.Entity({billboard:{}}),this._position=v.parsePosition(e),this._icon=i,this._size=[32,32],this._state=_.INITIALIZED}get type(){return C.getOverlayType("custom_billboard")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("CustomBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setLabel(e,i){return this._delegate.label={...i,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,x.merge(this._style,e),x.merge(this._delegate.billboard,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let i=this._position.copy();i.alt=e.height||0,this._delegate.polyline={...e,positions:y.transformWGS84ArrayToCartesianArray([i,this._position])}}return this}setBottomCircle(e,i={},s=0){let o=0,a=s;return this._delegate.ellipse={...i,semiMajorAxis:e,semiMinorAxis:e,stRotation:new r.CallbackProperty(()=>(o+=a,(o>=360||o<=-360)&&(o=0),o),!1)},this}};C.registerType("custom_billboard");var of=Xs;var Js=class extends C{constructor(e,i){super(),this._delegate=new r.Entity({label:{}}),this._position=v.parsePosition(e),this._text=i,this._state=_.INITIALIZED}get type(){return C.getOverlayType("custom_label")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.label.text=this._text}_mountedHook(){this.position=this._position,this.text=this._text}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,x.merge(this._style,e),x.merge(this._delegate.label,e),this)}setVLine(e={}){if(this._position.alt>0&&!this._delegate.polyline){let i=this._position.copy();i.alt=e.height||0,this._delegate.polyline={...e,positions:y.transformWGS84ArrayToCartesianArray([i,this._position])}}return this}setBottomCircle(e,i={},s=0){let o=0,a=s;return this._delegate.ellipse={...i,semiMajorAxis:e,semiMinorAxis:e,stRotation:new r.CallbackProperty(()=>(o+=a,(o>=360||o<=-360)&&(o=0),o),!1)},this}};C.registerType("custom_label");var af=Js;var Qs=class extends C{constructor(){super(),this._startTime=void 0,this._lastTime=void 0,this._sampledPosition=new r.SampledPositionProperty,this._cache=[],this._maxCacheSize=10,this._state=_.INITIALIZED}get maxCacheSize(){return this._maxCacheSize}set maxCacheSize(e){this._maxCacheSize=e}get position(){return y.transformCartesianToWGS84(this._sampledPosition.getValue(r.JulianDate.now()))}_removePosition(){if(this._cache.length>this._maxCacheSize){let e=r.JulianDate.addSeconds(this._cache[0],-.2,new r.JulianDate),i=r.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new r.JulianDate);this._sampledPosition.removeSamples(new r.TimeInterval({start:e,stop:i})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(e,i){this._removePosition();let s=r.JulianDate.now(),o=r.JulianDate.addSeconds(s,i,new r.JulianDate);return this._sampledPosition.addSample(o,y.transformWGS84ToCartesian(v.parsePosition(e))),this._lastTime=o,this._cache.push(this._lastTime),this}bindDom(e){return this}},jt=Qs;var Ks=class extends jt{constructor(e,i){super(),this._position=v.parsePosition(e),this._icon=i,this._delegate=new r.Entity({billboard:{}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("dynamic_billboard")}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("DynamicBillboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}_mountedHook(){this._sampledPosition.forwardExtrapolationType=r.ExtrapolationType.HOLD,this._startTime=r.JulianDate.now(),this._sampledPosition.addSample(this._startTime,y.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._cache.push(this._startTime),this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,x.merge(this._style,e),x.merge(this._delegate.billboard,e),this)}};C.registerType("dynamic_billboard");var nf=Ks;var $s=class extends jt{constructor(e,i){super(),this._position=v.parsePosition(e),this._modelUrl=i,this._delegate=new r.Entity({model:{}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("dynamic_model")}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}_mountedHook(){this._sampledPosition.forwardExtrapolationType=r.ExtrapolationType.HOLD,this._startTime=r.JulianDate.now(),this._sampledPosition.addSample(this._startTime,y.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._delegate.orientation=new r.VelocityOrientationProperty(this._sampledPosition),this._cache.push(this._startTime),this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,x.merge(this._style,e),x.merge(this._delegate.model,e),this)}};C.registerType("dynamic_model");var lf=$s;function hf(l,e,i){let s=r.Cartesian3.subtract(l,e,new r.Cartesian3),o=r.Cartesian3.subtract(i,e,new r.Cartesian3),a=r.Cartesian3.cross(s,o,s);return r.Cartesian3.magnitude(a)*.5}function De(l){let e=0;if(!Array.isArray(l))return e;l[0]instanceof r.Cartesian3||(l=y.transformWGS84ArrayToCartesianArray(l));let i=r.CoplanarPolygonGeometry.createGeometry(r.CoplanarPolygonGeometry.fromPositions({positions:l,vertexFormat:r.VertexFormat.POSITION_ONLY}));if(!i)return e;let s=i.attributes.position.values,o=i.indices;for(let a=0;a<o.length;a+=3){let n=r.Cartesian3.unpack(s,o[a]*3,new r.Cartesian3),h=r.Cartesian3.unpack(s,o[a+1]*3,new r.Cartesian3),c=r.Cartesian3.unpack(s,o[a+2]*3,new r.Cartesian3);e+=hf(n,h,c)}return e}function eo(l=[],e=0){let i=180,s=90,o=-180,a=-90;if(l.forEach(n=>{i=Math.min(i,n.lng||n.x),s=Math.min(s,n.lat||n.y),o=Math.max(o,n.lng||n.x),a=Math.max(a,n.lat||n.y)}),e>0){let n=Math.abs(o-o),h=Math.abs(a-s);i-=n*e,s-=h*e,o+=n*e,a+=h*e}return{west:i,south:s,east:o,north:a}}function Re(l){if(l&&Array.isArray(l)){let e=0;l.forEach(({alt:o})=>e=Math.max(e,o));let i=r.BoundingSphere.fromPoints(y.transformWGS84ArrayToCartesianArray(l)),s=y.transformCartesianToWGS84(i.center);return s.alt=e,s}return new X}function to(l,e){e=e||{};let i=[];for(let s=0;s<l.length-1;s++){let o=cf(l[s],l[s+1],e.count);o&&o.length>0&&(i=i.concat(o))}return i}function cf(l,e,i){if(!l||!e)return null;let s=[];i=i||40;let o=function(M){return 1-2*M+M*M},a=M=>2*M-2*M*M,n=M=>M*M,h,c,d,p,f,g,u=0,m=parseFloat(l.lat),T=parseFloat(e.lat),w=parseFloat(l.lng),P=parseFloat(e.lng);P>w&&P-w>180&&w<0&&(w=360+w,P=360+P),g=0,T===m?(h=0,c=w-P):P===w?(h=Math.PI/2,c=m-T):(h=Math.atan((T-m)/(P-w)),c=(T-m)/Math.sin(h)),g===0&&(g=h+Math.PI/5),d=c/2,f=d*Math.cos(g)+w,p=d*Math.sin(g)+m;for(let M=0;M<i+1;M++){let L=w*o(u)+f*a(u)+P*n(u),S=m*o(u)+p*a(u)+T*n(u),R=l.lng,B=e.lng;s.push([R<0&&B>0?L-360:L,S]),u=u+1/i}return s}function he(l){let e=0;if(l&&Array.isArray(l))for(let i=0;i<l.length-1;i++){let s=y.transformWGS84ToCartographic(l[i]),o=y.transformWGS84ToCartographic(l[i+1]),a=new r.EllipsoidGeodesic;a.setEndPoints(s,o);let n=a.surfaceDistance;n=Math.sqrt(Math.pow(n,2)+Math.pow(o.height-s.height,2)),e+=n}return e.toFixed(3)}function Oe(l,e){let i=l,s=e;if(!i||!s)return 0;l instanceof r.Cartesian3||(i=v.parsePosition(l),i=y.transformWGS84ToCartesian(i)),e instanceof r.Cartesian3||(s=v.parsePosition(e),s=y.transformWGS84ToCartesian(s));let o=r.Transforms.eastNorthUpToFixedFrame(i),a=r.Cartesian3.subtract(s,i,new r.Cartesian3),n=r.Matrix4.multiplyByPointAsVector(r.Matrix4.inverse(o,new r.Matrix4),a,new r.Cartesian3),h=Math.atan2(n.y,n.x)-r.Math.PI_OVER_TWO;return h=r.Math.TWO_PI-r.Math.zeroToTwoPi(h),isNaN(h)?0:h}function qe(l,e,i){return l=parseFloat(l)||0,l>=parseFloat(e)&&l<=parseFloat(i)}function Y(l,e){return r.Cartesian3.midpoint(l,e,new r.Cartesian3)}function io(l,e){let i=v.parsePosition(l),s=v.parsePosition(e);i=y.transformWGS84ToCartographic(i),s=y.transformWGS84ToCartographic(s);let o=new r.EllipsoidGeodesic(i,s).interpolateUsingFraction(.5);return new X(r.Math.toDegrees(o.longitude),r.Math.toDegrees(o.latitude),o.height)}function ro(l,e,i=0,s=50){let o=[];i=Math.max(+i,100),s=Math.max(+s,50);let a=Math.abs(l.lng-e.lng),n=Math.abs(l.lat-e.lat),h=Math.max(a,n),c=h/s;if(a>n){let d=(e.lat-l.lat)/s;l.lng-e.lng>0&&(c=-c);for(let p=0;p<s;p++){let f=i-Math.pow(-.5*h+Math.abs(c)*p,2)*4*i/Math.pow(h,2),g=l.lng+c*p,u=l.lat+d*p;o.push([g,u,f])}}else{let d=(e.lng-l.lng)/s;l.lat-e.lat>0&&(c=-c);for(let p=0;p<s;p++){let f=i-Math.pow(-.5*h+Math.abs(c)*p,2)*4*i/Math.pow(h,2),g=l.lng+d*p,u=l.lat+c*p;o.push([g,u,f])}}return o.push([e.lng,e.lat,e.alt||0]),o}/**
|
|
212
212
|
* @file 数学工具模块入口
|
|
213
213
|
* @module math
|
|
214
214
|
* @author Lucas Xu
|
|
@@ -236,7 +236,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
|
|
|
236
236
|
* @exports Math - 数学工具对象
|
|
237
237
|
* @license MIT
|
|
238
238
|
* @copyright © 2025 Company Name
|
|
239
|
-
*/var{Math:C_}=r,Gc={};T.merge(Gc,C_,{area:Re,bounds:ha,center:Oe,curve:ca,distance:ce,heading:ke,isBetween:rt,midCartesian:Y,midPosition:da,parabola:pa});var ma=class l extends x{constructor(e,i){super(),this._delegate=D.create("div","div-icon"),this._position=v.parsePosition(e),this._delegate.setAttribute("id",this._id),T.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("div_icon")}get show(){return this._show}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden"}get position(){return this._position}set position(e){this._position=v.parsePosition(e)}get content(){return this._delegate.childNodes||[]}set content(e){if(e&&typeof e=="string")this._delegate.innerHTML=e;else if(e&&e instanceof Element){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);this._delegate.appendChild(e)}}static fromEntity(e,i){var n;let s,a=r.JulianDate.now(),o=y.transformCartesianToWGS84(e.position.getValue(a));return s=new l(o,i),e.billboard&&(s.attr={...(n=e==null?void 0:e.properties)==null?void 0:n.getValue(a)}),s}_updateStyle(e,i,s){if(!this._show||!e)return;let a=e.x-this._delegate.offsetWidth/2,o=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(a=e.x-this._delegate.offsetWidth,o=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(a=e.x,o=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(a=e.x-this._delegate.offsetWidth,o=e.y):this._style.position==="bottomright"&&(a=e.x,o=e.y);let n=`translate3d(${Math.round(a)}px,${Math.round(o)}px, 0)`,h="scale3d(1,1,1)",c=this._style.scaleByDistance;if(i&&c){let f=c.near||0,g=c.nearValue||1,u=c.far||Number.MAX_VALUE,m=c.farValue||0,E=i/u;if(i<f)h=`scale3d(${g},${g},1)`;else if(i>u)h=`scale3d(${m},${m},1)`;else{let w=m+E*(g-m);h=`scale3d(${w},${w},1)`}}let d=!0,p=this._style.distanceDisplayCondition;i&&p&&(d=rt(i,p.near||0,p.far||Number.MAX_VALUE)),this._delegate.style.transform=`${n} ${h}`,this._delegate.style.visibility=d&&s?"visible":"hidden"}_onAdd(e){this._layer=e,this._layer.delegate.appendChild(this._delegate);let i={layer:e,overlay:this,position:y.transformWGS84ToCartesian(this._position)};this._delegate.addEventListener("click",()=>{this._overlayEvent.fire(B.CLICK,i)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(B.MOUSE_OVER,i)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(B.MOUSE_OUT,i)}),this._state=_.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=_.REMOVED)}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this._style.className&&D.addClass(this._delegate,this._style.className),this)}};x.registerType("div_icon");var Hc=ma;x.registerType("div_plane");var ua=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({model:{}}),this._position=v.parsePosition(e),this._modelUrl=i,this._rotateAmount=0,this._state=_.INITIALIZED}get type(){return x.getOverlayType("model")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._rotateAmount===0&&(this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll))))}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=+e,this._delegate.orientation=new r.CallbackProperty(()=>(this._position.heading+=this._rotateAmount,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))),!1)}static fromEntity(e,i){let s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s)),o=new l(a,i);return o.attr={...e.properties.getValue(s)},o}_mountedHook(){this.position=this._position,this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,T.merge(this._style,e),T.merge(this._delegate.model,e),this)}};x.registerType("model");var qt=ua;var fa=class extends x{constructor(e,i={}){super(),this._delegate=r.I3SDataProvider.fromUrl(e,i),this._state=_.INITIALIZED}get type(){return x.getOverlayType("i3s")}ready(e){return this._delegate.then(e),this}setLabel(e,i){return console.warn("not support this function"),this}};x.registerType("i3s");var Wc=fa;var _a=class extends x{constructor(e,i={}){super(),this._delegate=r.Cesium3DTileset.fromUrl(e,i),this._tilesetEvent=new Cr(this._delegate),this._tileVisibleCallback=void 0,this._properties=void 0,this._state=_.INITIALIZED}get type(){return x.getOverlayType("tileset")}set show(e){this._show=e,this._delegate.then(i=>{i.show=e})}_bindVisibleEvent(){this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._delegate.then(e=>{e.tileVisible.addEventListener(this._updateTile,this)})}_updateTile(e){let i=e.content;for(let s=0;s<i.featuresLength;s++){let a=i.getFeature(s);this._properties&&this._properties.length&&this._properties.forEach(o=>{a.hasProperty(o.key)&&a.getProperty(o.key)===o.keyValue&&a.setProperty(o.propertyName,o.propertyValue)})}}ready(e){return this._delegate.then(e),this}setPosition(e){return e=v.parsePosition(e),this._delegate.then(i=>{let s=r.Transforms.eastNorthUpToFixedFrame(r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),a=r.Matrix4.fromRotationTranslation(r.Matrix3.fromHeadingPitchRoll(new r.HeadingPitchRoll(r.Math.toRadians(e.heading),r.Math.toRadians(e.pitch),r.Math.toRadians(e.roll))));r.Matrix4.multiply(s,a,s),i.root.transform=s}),this}setHeadingPitchRoll(e,i,s){return this._delegate.then(a=>{let o=a.root.transform,n=r.Matrix4.fromRotationTranslation(r.Matrix3.fromHeadingPitchRoll(new r.HeadingPitchRoll(r.Math.toRadians(e||0),r.Math.toRadians(i||0),r.Math.toRadians(s||0))));r.Matrix4.multiply(o,n,o),a.root.transform=o}),this}setLabel(e,i){return console.warn("not support this function"),this}clampToGround(){return this._delegate.then(e=>{let i=r.Cartographic.fromCartesian(e.boundingSphere.center),s=r.Cartesian3.fromRadians(i.longitude,i.latitude,i.height),a=r.Cartesian3.fromRadians(i.longitude,i.latitude,0),o=r.Cartesian3.subtract(a,s,new r.Cartesian3);e.modelMatrix=r.Matrix4.fromTranslation(o)}),this}setHeight(e,i=!1){return this._delegate.then(s=>{let a=r.Cartographic.fromCartesian(s.boundingSphere.center),o=r.Cartesian3.fromRadians(a.longitude,a.latitude,a.height),n=r.Cartesian3.fromRadians(a.longitude,a.latitude,i?e:a.height+e),h=r.Cartesian3.subtract(n,o,new r.Cartesian3);s.modelMatrix=r.Matrix4.fromTranslation(h)}),this}setScale(e){return this._delegate.then(i=>{let s=i.root.transform;e>0&&e!==1&&r.Matrix4.multiplyByUniformScale(s,e,s),i.root.transform=s}),this}setProperties(e){return this._properties=e,this._bindVisibleEvent(),this}setSplitDirection(e){return this._delegate.then(i=>{i.splitDirection=e}),this}setCustomShader(e){return this._delegate.then(i=>{i.customShader=e}),this}setStyle(e){return e&&e instanceof r.Cesium3DTileStyle&&(this._style=e,this._delegate.then(i=>{i.style=e})),this}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this._tilesetEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this._tilesetEvent.off(e,i,s||this),this}};x.registerType("tileset");var Bc=_a;var Xt=Math.PI/2,ga=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this._state=_.INITIALIZED}get type(){return x.getOverlayType("attack_arrow")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getArrowHeadPoints(e,i,s){let a=C.getBaseLength(e),o=a*this.headHeightFactor,n=e[e.length-1];a=C.distance(n,e[e.length-2]);let h=C.distance(i,s);o>h*this.headTailFactor&&(o=h*this.headTailFactor);let c=o*this.headWidthFactor,d=o*this.neckWidthFactor;o=o>a?a:o;let p=o*this.neckHeightFactor,f=C.getThirdPoint(e[e.length-2],n,0,o,!0),g=C.getThirdPoint(e[e.length-2],n,0,p,!0),u=C.getThirdPoint(n,f,Xt,c,!1),m=C.getThirdPoint(n,f,Xt,c,!0),E=C.getThirdPoint(n,g,Xt,d,!1),w=C.getThirdPoint(n,g,Xt,d,!0);return[E,u,n,m,w]}_getArrowBodyPoints(e,i,s,a){let o=C.wholeDistance(e),h=C.getBaseLength(e)*a,c=C.distance(i,s),d=(h-c)/2,p=0,f=[],g=[];for(let u=1;u<e.length-1;u++){let m=C.getAngleOfThreePoints(e[u-1],e[u],e[u+1])/2;p+=C.distance(e[u-1],e[u]);let E=(h/2-p/o*d)/Math.sin(m),w=C.getThirdPoint(e[u-1],e[u],Math.PI-m,E,!0),P=C.getThirdPoint(e[u-1],e[u],m,E,!1);f.push(w),g.push(P)}return f.concat(g)}_getHierarchy(){let e=v.parsePolygonCoordToArray(this._positions)[0],i=e[0],s=e[1];C.isClockWise(e[0],e[1],e[2])&&(i=e[1],s=e[0]);let o=[C.mid(i,s)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,i,s),h=n[0],c=n[4],d=C.distance(i,s)/C.getBaseLength(o),p=this._getArrowBodyPoints(o,h,c,d),f=p.length,g=[i].concat(p.slice(0,f/2));g.push(h);let u=[s].concat(p.slice(f/2,f));return u.push(c),g=C.getQBSplinePoints(g),u=C.getQBSplinePoints(u),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(g.concat(n,u.reverse()))))}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("attack_arrow");var st=ga;var ae=Math.PI/2,ya=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polygon:{}}),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this._state=_.INITIALIZED}get type(){return x.getOverlayType("double_arrow")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getArrowPoints(e,i,s,a){let o=C.mid(e,i),n=C.distance(o,s),h=C.getThirdPoint(s,o,0,n*.3,!0),c=C.getThirdPoint(s,o,0,n*.5,!0);h=C.getThirdPoint(o,h,ae,n/5,a),c=C.getThirdPoint(o,c,ae,n/4,a);let d=[o,h,c,s],p=this._getArrowHeadPoints(d),f=p[0],g=p[4],u=C.distance(e,i)/C.getBaseLength(d)/2,m=this._getArrowBodyPoints(d,f,g,u),E=m.length,w=m.slice(0,E/2),P=m.slice(E/2,E);return w.push(f),P.push(g),w=w.reverse(),w.push(i),P=P.reverse(),P.push(e),w.reverse().concat(p,P)}_getArrowHeadPoints(e){let s=C.getBaseLength(e)*this.headHeightFactor,a=e[e.length-1],o=s*this.headWidthFactor,n=s*this.neckWidthFactor,h=s*this.neckHeightFactor,c=C.getThirdPoint(e[e.length-2],a,0,s,!0),d=C.getThirdPoint(e[e.length-2],a,0,h,!0),p=C.getThirdPoint(a,c,ae,o,!1),f=C.getThirdPoint(a,c,ae,o,!0),g=C.getThirdPoint(a,d,ae,n,!1),u=C.getThirdPoint(a,d,ae,n,!0);return[g,p,a,f,u]}_getArrowBodyPoints(e,i,s,a){let o=C.wholeDistance(e),h=C.getBaseLength(e)*a,c=C.distance(i,s),d=(h-c)/2,p=0,f=[],g=[];for(let u=1;u<e.length-1;u++){let m=C.getAngleOfThreePoints(e[u-1],e[u],e[u+1])/2;p+=C.distance(e[u-1],e[u]);let E=(h/2-p/o*d)/Math.sin(m),w=C.getThirdPoint(e[u-1],e[u],Math.PI-m,E,!0),P=C.getThirdPoint(e[u-1],e[u],m,E,!1);f.push(w),g.push(P)}return f.concat(g)}_getTempPoint4(e,i,s){let a=C.mid(e,i),o=C.distance(a,s),n=C.getAngleOfThreePoints(e,a,s),h,c,d,p;return n<ae?(c=o*Math.sin(n),d=o*Math.cos(n),p=C.getThirdPoint(e,a,ae,c,!1),h=C.getThirdPoint(a,p,ae,d,!0)):n>=ae&&n<Math.PI?(c=o*Math.sin(Math.PI-n),d=o*Math.cos(Math.PI-n),p=C.getThirdPoint(e,a,ae,c,!1),h=C.getThirdPoint(a,p,ae,d,!1)):n>=Math.PI&&n<Math.PI*1.5?(c=o*Math.sin(n-Math.PI),d=o*Math.cos(n-Math.PI),p=C.getThirdPoint(e,a,ae,c,!0),h=C.getThirdPoint(a,p,ae,d,!0)):(c=o*Math.sin(Math.PI*2-n),d=o*Math.cos(Math.PI*2-n),p=C.getThirdPoint(e,a,ae,c,!0),h=C.getThirdPoint(a,p,ae,d,!1)),h}_getHierarchy(){let e=this._positions.length,i,s,a=v.parsePolygonCoordToArray(this._positions)[0],o=a[0],n=a[1],h=a[2];e===3?i=this._getTempPoint4(o,n,h):i=a[3],e===3||e===4?s=C.mid(o,n):s=a[4];let c,d;C.isClockWise(o,n,h)?(c=this._getArrowPoints(o,s,i,!1),d=this._getArrowPoints(s,n,h,!0)):(c=this._getArrowPoints(n,s,h,!1),d=this._getArrowPoints(s,o,i,!0));let p=c.length,f=(p-5)/2,g=c.slice(0,f),u=c.slice(f,f+5),m=c.slice(f+5,p),E=d.slice(0,f),w=d.slice(f,f+5),P=d.slice(f+5,p);E=C.getBezierPoints(E);let b=C.getBezierPoints(P.concat(g.slice(1)));return m=C.getBezierPoints(m),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(E.concat(w,b,u,m))))}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("double_arrow");var Jt=ya;var Uc=Math.PI/2,va=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polygon:{}}),this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this._state=_.INITIALIZED}get type(){return x.getOverlayType("fine_arrow")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getHierarchy(){let e=v.parsePolygonCoordToArray(this._positions)[0],i=e[0],s=e[1],a=C.getBaseLength(e),o=a*this.tailWidthFactor,n=a*this.neckWidthFactor,h=a*this.headWidthFactor,c=C.getThirdPoint(s,i,Uc,o,!0),d=C.getThirdPoint(s,i,Uc,o,!1),p=C.getThirdPoint(i,s,this.headAngle,h,!1),f=C.getThirdPoint(i,s,this.headAngle,h,!0),g=C.getThirdPoint(i,s,this.neckAngle,n,!1),u=C.getThirdPoint(i,s,this.neckAngle,n,!0);return new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions([c,g,p,s,f,u,d])))}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("fine_arrow");var Qt=va;var T_=Math.PI/2,Vc=100,wa=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polygon:{}}),this.t=.4,this._state=_.INITIALIZED}get type(){return x.getOverlayType("gathering_place")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getHierarchy(){let e=v.parsePolygonCoordToArray(this._positions)[0];if(this._positions.length===2){let n=C.mid(e[0],e[1]),h=C.distance(e[0],n)/.9,c=C.getThirdPoint(e[0],n,T_,h,!0);e=[e[0],c,e[1]]}let i=C.mid(e[0],e[2]);e.push(i,e[0],e[1]);let s=[];for(let n=0;n<e.length-2;n++){let h=e[n],c=e[n+1],d=e[n+2],p=C.getBisectorNormals(this.t,h,c,d);s=s.concat(p)}let a=s.length;s=[s[a-1]].concat(s.slice(0,a-1));let o=[];for(let n=0;n<e.length-2;n++){let h=e[n],c=e[n+1];o.push(h);for(let d=0;d<=Vc;d++){let p=C.getCubicValue(d/Vc,h,s[n*2],s[n*2+1],c);o.push(p)}o.push(c)}return new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(o)))}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("gathering_place");var Kt=wa;var xa=class extends st{constructor(e){super(e),this._delegate=new r.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1,this._state=_.INITIALIZED}get type(){return x.getOverlayType("tailed_attack_arrow")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getHierarchy(){let e=v.parsePolygonCoordToArray(this._positions)[0],i=e[0],s=e[1];C.isClockWise(e[0],e[1],e[2])&&(i=e[1],s=e[0]);let o=[C.mid(i,s)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,i,s),h=n[0],c=n[4],d=C.distance(i,s),p=C.getBaseLength(o),f=p*this.tailWidthFactor*this.swallowTailFactor,g=C.getThirdPoint(o[1],o[0],0,f,!0),u=d/p,m=this._getArrowBodyPoints(o,h,c,u),E=m.length,w=[i].concat(m.slice(0,E/2));w.push(h);let P=[s].concat(m.slice(E/2,E));return P.push(c),w=C.getQBSplinePoints(w),P=C.getQBSplinePoints(P),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(w.concat(n,P.reverse(),[g,w[0]]))))}};x.registerType("tailed_attack_arrow");var $t=xa;var Ca=class extends x{constructor(e,i,s=[32,32]){super(),this._position=v.parsePosition(e),this._icon=i,this._size=s,this._delegate={position:void 0,image:void 0,width:0,height:0},this._state=_.INITIALIZED}get type(){return x.getOverlayType("billboard_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("Billboard Primitive: the size invalid");this._size=e,this._delegate.width=this._size[0]||32,this._delegate.height=this._size[1]||32}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.image&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate,e),this)}};x.registerType("billboard_primitive");var ei=Ca;var Zc={maxOffsetY:10,offsetAmount:.1},Ta=class extends ei{constructor(e,i){super(e,i),this._currentOffset=new r.Cartesian2(0,0),this._isUp=!0,this._state=_.INITIALIZED}get type(){return x.getOverlayType("bounce_billboard_primitive")}update(e){var a,o;if(!this._show)return;let i=((a=this._style)==null?void 0:a.maxOffsetY)||Zc.maxOffsetY,s=((o=this._style)==null?void 0:o.offsetAmount)||Zc.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-i&&(this._isUp=!1),this._currentOffset.y+=s*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return r.destroyObject(this)}};x.registerType("bounce_billboard_primitive");var jc=Ta;var Ea=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._text=i,this._delegate={position:void 0,text:void 0},this._state=_.INITIALIZED}get type(){return x.getOverlayType("label_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.text=this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.text,T.merge(this._style,e),T.merge(this._delegate,e),this)}};x.registerType("label_primitive");var ti=Ea;var Yc={maxOffsetY:10,offsetAmount:.1},Pa=class extends ti{constructor(e,i){super(e,i),this._currentOffset=new r.Cartesian2(0,0),this._isUp=!0,this._state=_.INITIALIZED}get type(){return x.getOverlayType("bounce_label_primitive")}update(e){var a,o;if(!this._show)return;let i=((a=this._style)==null?void 0:a.maxOffsetY)||Yc.maxOffsetY,s=((o=this._style)==null?void 0:o.offsetAmount)||Yc.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-i&&(this._isUp=!1),this._currentOffset.y+=s*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return r.destroyObject(this)}};x.registerType("bounce_label_primitive");var qc=Pa;var Ma=class extends x{constructor(e){super(),this._position=v.parsePosition(e),this._delegate={position:void 0,scale:{x:12,y:8}},this._state=_.INITIALIZED}get type(){return x.getOverlayType("cloud_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate,e),this)}};x.registerType("cloud_primitive");var Xc=Ma;var E_={minRadius:10,minHeight:30,color:r.Color.RED,slices:128,speed:10},ba=class extends x{constructor(e,i,s){super(),this._center=v.parsePosition(e),this._delegate=void 0,this._height=s,this._radius=i,this._currentHeight=s||0,this._currentRadius=10,this._style={...E_},this._state=_.INITIALIZED}get type(){return x.getOverlayType("diffuse_wall_primitive")}get center(){return this._center}set center(e){this._center=v.parsePosition(e)}get radius(){return this._radius}set radius(e){this._radius=e}get height(){return this._height}set height(e){this._height=e}_getPositions(){let e=[],i=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center));for(let s=0;s<this._style.slices;s++){let a=s/this._style.slices*r.Math.TWO_PI,o=Math.cos(a),n=Math.sin(a),h=new r.Cartesian3(o*this._currentRadius,n*this._currentRadius,0);e.push(r.Matrix4.multiplyByPoint(i,h,new r.Cartesian3))}return e.push(e[0]),e}_getHeights(e,i){let s=[];for(let a=0;a<e;a++)s.push(i);return s}update(e){var a;if(this._delegate=this._delegate&&this._delegate.destroy(),this._currentRadius+=this._radius/this._style.speed/20,this._currentHeight-=this._height/this._style.speed/20,(this._currentRadius>this._radius||this._currentHeight<this._style.minHeight)&&(this._currentRadius=this._style.minRadius,this._currentHeight=this._height),!this._style.slices||this._style.slices<3)return!1;let i=this._getPositions();if(!i||!i.length)return!1;let s=new r.WallGeometry({positions:i,minimumHeights:this._getHeights(i.length,0),maximumHeights:this._getHeights(i.length,this._currentHeight)});this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:s}),appearance:new r.MaterialAppearance({material:r.Material.fromType("WallDiffuse",{color:(a=this._style)==null?void 0:a.color}),flat:!0}),asynchronous:!1}),this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this)}destroy(){return r.destroyObject(this)}};x.registerType("diffuse_wall_primitive");var Jc=ba;var Aa=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i||{x:10,y:10,z:10},this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("elec_ellipsoid_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.geometryInstances.modelMatrix=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._position))}get radius(){return this._radius}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry=new r.EllipsoidGeometry({radii:this._radius,maximumCone:r.Math.PI_OVER_TWO})}_setAppearance(){var e,i;this._style&&(this._delegate.appearance=new r.MaterialAppearance({material:r.Material.fromType("EllipsoidElectric",{color:((e=this._style)==null?void 0:e.color)||r.Color.GREEN,speed:((i=this._style)==null?void 0:i.speed)||5})}))}_mountedHook(){this.radius=this._radius,this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setLabel(e,i){return this}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),this._setAppearance(),this)}};x.registerType("elec_ellipsoid_primitive");var Qc=Aa;var Sa=class extends x{constructor(e,i=1){super(),this._positions=v.parsePositions(e),this._width=i,this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("flow_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolylineGeometry({positions:y.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,i,s,a;this._delegate.appearance=new r.PolylineMaterialAppearance({material:r.Material.fromType("PolylineFlow",{color:((e=this._style)==null?void 0:e.color)||new r.Color(1,0,0,.7),speed:((i=this._style)==null?void 0:i.speed)||1,percent:((s=this._style)==null?void 0:s.percent)||.03,gradient:((a=this._style)==null?void 0:a.gradient)||.1})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setLabel(e,i){return this}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("flow_line_primitive");var Kc=Sa;/**
|
|
239
|
+
*/var{Math:df}=r,zc={};x.merge(zc,df,{area:De,bounds:eo,center:Re,curve:to,distance:he,heading:Oe,isBetween:qe,midCartesian:Y,midPosition:io,parabola:ro});var so=class l extends C{constructor(e,i){super(),this._delegate=D.create("div","div-icon"),this._position=v.parsePosition(e),this._delegate.setAttribute("id",this._id),x.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=i,this._state=_.INITIALIZED}get type(){return C.getOverlayType("div_icon")}get show(){return this._show}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden"}get position(){return this._position}set position(e){this._position=v.parsePosition(e)}get content(){return this._delegate.childNodes||[]}set content(e){if(e&&typeof e=="string")this._delegate.innerHTML=e;else if(e&&e instanceof Element){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);this._delegate.appendChild(e)}}static fromEntity(e,i){var n;let s,o=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(o));return s=new l(a,i),e.billboard&&(s.attr={...(n=e==null?void 0:e.properties)==null?void 0:n.getValue(o)}),s}_updateStyle(e,i,s){if(!this._show||!e)return;let o=e.x-this._delegate.offsetWidth/2,a=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(o=e.x-this._delegate.offsetWidth,a=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(o=e.x,a=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(o=e.x-this._delegate.offsetWidth,a=e.y):this._style.position==="bottomright"&&(o=e.x,a=e.y);let n=`translate3d(${Math.round(o)}px,${Math.round(a)}px, 0)`,h="scale3d(1,1,1)",c=this._style.scaleByDistance;if(i&&c){let f=c.near||0,g=c.nearValue||1,u=c.far||Number.MAX_VALUE,m=c.farValue||0,T=i/u;if(i<f)h=`scale3d(${g},${g},1)`;else if(i>u)h=`scale3d(${m},${m},1)`;else{let w=m+T*(g-m);h=`scale3d(${w},${w},1)`}}let d=!0,p=this._style.distanceDisplayCondition;i&&p&&(d=qe(i,p.near||0,p.far||Number.MAX_VALUE)),this._delegate.style.transform=`${n} ${h}`,this._delegate.style.visibility=d&&s?"visible":"hidden"}_onAdd(e){this._layer=e,this._layer.delegate.appendChild(this._delegate);let i={layer:e,overlay:this,position:y.transformWGS84ToCartesian(this._position)};this._delegate.addEventListener("click",()=>{this._overlayEvent.fire(H.CLICK,i)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(H.MOUSE_OVER,i)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(H.MOUSE_OUT,i)}),this._state=_.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=_.REMOVED)}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(x.merge(this._style,e),this._style.className&&D.addClass(this._delegate,this._style.className),this)}};C.registerType("div_icon");var pf=so;var oo=class l extends C{constructor(e,i){super(),this._delegate=D.create("div","div-plane"),this._position=v.parsePosition(e),this._delegate.setAttribute("id",this._id),x.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=i,this._state=_.INITIALIZED}get type(){return C.getOverlayType("div_plane")}get show(){return this._show}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden"}get position(){return this._position}set position(e){this._position=v.parsePosition(e)}get content(){return this._delegate.childNodes||[]}set content(e){if(e&&typeof e=="string")this._delegate.innerHTML=e;else if(e&&e instanceof Element){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);this._delegate.appendChild(e)}}static fromEntity(e,i){var n;let s,o=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(o));return s=new l(a,i),e.billboard&&(s.attr={...(n=e==null?void 0:e.properties)==null?void 0:n.getValue(o)}),s}_updateStyle(e,i,s){if(!this._show||!e)return;let o=e.x-this._delegate.offsetWidth/2,a=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(o=e.x-this._delegate.offsetWidth,a=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(o=e.x,a=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(o=e.x-this._delegate.offsetWidth,a=e.y):this._style.position==="bottomright"&&(o=e.x,a=e.y);let n=`translate3d(${Math.round(o)}px,${Math.round(a)}px, 0)`,h="scale3d(1,1,1)",c=this._style.scaleByDistance;if(i&&c){let f=c.near||0,g=c.nearValue||1,u=c.far||Number.MAX_VALUE,m=c.farValue||0,T=i/u;if(i<f)h=`scale3d(${g},${g},1)`;else if(i>u)h=`scale3d(${m},${m},1)`;else{let w=m+T*(g-m);h=`scale3d(${w},${w},1)`}}let d=!0,p=this._style.distanceDisplayCondition;i&&p&&(d=qe(i,p.near||0,p.far||Number.MAX_VALUE)),this._delegate.style.transform=`${n} ${h}`,this._delegate.style.visibility=d&&s?"visible":"hidden"}_onAdd(e){this._layer=e,this._layer.delegate.appendChild(this._delegate);let i={layer:e,overlay:this,position:y.transformWGS84ToCartesian(this._position)};this._delegate.addEventListener("click",()=>{this._overlayEvent.fire(H.CLICK,i)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(H.MOUSE_OVER,i)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(H.MOUSE_OUT,i)}),this._state=_.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=_.REMOVED)}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(x.merge(this._style,e),this._style.className&&D.addClass(this._delegate,this._style.className),this)}};C.registerType("div_plane");var mf=oo;var ao=class l extends C{constructor(e,i){super(),this._delegate=new r.Entity({model:{}}),this._position=v.parsePosition(e),this._modelUrl=i,this._rotateAmount=0,this._state=_.INITIALIZED}get type(){return C.getOverlayType("model")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._rotateAmount===0&&(this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll))))}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=+e,this._delegate.orientation=new r.CallbackProperty(()=>(this._position.heading+=this._rotateAmount,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))),!1)}static fromEntity(e,i){let s=r.JulianDate.now(),o=y.transformCartesianToWGS84(e.position.getValue(s)),a=new l(o,i);return a.attr={...e.properties.getValue(s)},a}_mountedHook(){this.position=this._position,this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,x.merge(this._style,e),x.merge(this._delegate.model,e),this)}};C.registerType("model");var no=ao;var lo=class extends C{constructor(e,i={}){super(),this._delegate=r.I3SDataProvider.fromUrl(e,i),this._state=_.INITIALIZED}get type(){return C.getOverlayType("i3s")}ready(e){return this._delegate.then(e),this}setLabel(e,i){return console.warn("not support this function"),this}};C.registerType("i3s");var uf=lo;var ho=class extends C{constructor(e,i={}){super(),this._delegate=r.Cesium3DTileset.fromUrl(e,i),this._tilesetEvent=new ur(this._delegate),this._tileVisibleCallback=void 0,this._properties=void 0,this._state=_.INITIALIZED}get type(){return C.getOverlayType("tileset")}set show(e){this._show=e,this._delegate.then(i=>{i.show=e})}_bindVisibleEvent(){this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._delegate.then(e=>{e.tileVisible.addEventListener(this._updateTile,this)})}_updateTile(e){let i=e.content;for(let s=0;s<i.featuresLength;s++){let o=i.getFeature(s);this._properties&&this._properties.length&&this._properties.forEach(a=>{o.hasProperty(a.key)&&o.getProperty(a.key)===a.keyValue&&o.setProperty(a.propertyName,a.propertyValue)})}}ready(e){return this._delegate.then(e),this}setPosition(e){return e=v.parsePosition(e),this._delegate.then(i=>{let s=r.Transforms.eastNorthUpToFixedFrame(r.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),o=r.Matrix4.fromRotationTranslation(r.Matrix3.fromHeadingPitchRoll(new r.HeadingPitchRoll(r.Math.toRadians(e.heading),r.Math.toRadians(e.pitch),r.Math.toRadians(e.roll))));r.Matrix4.multiply(s,o,s),i.root.transform=s}),this}setHeadingPitchRoll(e,i,s){return this._delegate.then(o=>{let a=o.root.transform,n=r.Matrix4.fromRotationTranslation(r.Matrix3.fromHeadingPitchRoll(new r.HeadingPitchRoll(r.Math.toRadians(e||0),r.Math.toRadians(i||0),r.Math.toRadians(s||0))));r.Matrix4.multiply(a,n,a),o.root.transform=a}),this}setLabel(e,i){return console.warn("not support this function"),this}clampToGround(){return this._delegate.then(e=>{let i=r.Cartographic.fromCartesian(e.boundingSphere.center),s=r.Cartesian3.fromRadians(i.longitude,i.latitude,i.height),o=r.Cartesian3.fromRadians(i.longitude,i.latitude,0),a=r.Cartesian3.subtract(o,s,new r.Cartesian3);e.modelMatrix=r.Matrix4.fromTranslation(a)}),this}setHeight(e,i=!1){return this._delegate.then(s=>{let o=r.Cartographic.fromCartesian(s.boundingSphere.center),a=r.Cartesian3.fromRadians(o.longitude,o.latitude,o.height),n=r.Cartesian3.fromRadians(o.longitude,o.latitude,i?e:o.height+e),h=r.Cartesian3.subtract(n,a,new r.Cartesian3);s.modelMatrix=r.Matrix4.fromTranslation(h)}),this}setScale(e){return this._delegate.then(i=>{let s=i.root.transform;e>0&&e!==1&&r.Matrix4.multiplyByUniformScale(s,e,s),i.root.transform=s}),this}setProperties(e){return this._properties=e,this._bindVisibleEvent(),this}setSplitDirection(e){return this._delegate.then(i=>{i.splitDirection=e}),this}setCustomShader(e){return this._delegate.then(i=>{i.customShader=e}),this}setStyle(e){return e&&e instanceof r.Cesium3DTileStyle&&(this._style=e,this._delegate.then(i=>{i.style=e})),this}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this._tilesetEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this._tilesetEvent.off(e,i,s||this),this}};C.registerType("tileset");var ff=ho;var Yt=Math.PI/2,co=class extends C{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this._state=_.INITIALIZED}get type(){return C.getOverlayType("attack_arrow")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getArrowHeadPoints(e,i,s){let o=E.getBaseLength(e),a=o*this.headHeightFactor,n=e[e.length-1];o=E.distance(n,e[e.length-2]);let h=E.distance(i,s);a>h*this.headTailFactor&&(a=h*this.headTailFactor);let c=a*this.headWidthFactor,d=a*this.neckWidthFactor;a=a>o?o:a;let p=a*this.neckHeightFactor,f=E.getThirdPoint(e[e.length-2],n,0,a,!0),g=E.getThirdPoint(e[e.length-2],n,0,p,!0),u=E.getThirdPoint(n,f,Yt,c,!1),m=E.getThirdPoint(n,f,Yt,c,!0),T=E.getThirdPoint(n,g,Yt,d,!1),w=E.getThirdPoint(n,g,Yt,d,!0);return[T,u,n,m,w]}_getArrowBodyPoints(e,i,s,o){let a=E.wholeDistance(e),h=E.getBaseLength(e)*o,c=E.distance(i,s),d=(h-c)/2,p=0,f=[],g=[];for(let u=1;u<e.length-1;u++){let m=E.getAngleOfThreePoints(e[u-1],e[u],e[u+1])/2;p+=E.distance(e[u-1],e[u]);let T=(h/2-p/a*d)/Math.sin(m),w=E.getThirdPoint(e[u-1],e[u],Math.PI-m,T,!0),P=E.getThirdPoint(e[u-1],e[u],m,T,!1);f.push(w),g.push(P)}return f.concat(g)}_getHierarchy(){let e=v.parsePolygonCoordToArray(this._positions)[0],i=e[0],s=e[1];E.isClockWise(e[0],e[1],e[2])&&(i=e[1],s=e[0]);let a=[E.mid(i,s)].concat(e.slice(2)),n=this._getArrowHeadPoints(a,i,s),h=n[0],c=n[4],d=E.distance(i,s)/E.getBaseLength(a),p=this._getArrowBodyPoints(a,h,c,d),f=p.length,g=[i].concat(p.slice(0,f/2));g.push(h);let u=[s].concat(p.slice(f/2,f));return u.push(c),g=E.getQBSplinePoints(g),u=E.getQBSplinePoints(u),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(g.concat(n,u.reverse()))))}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.polygon,e),this)}};C.registerType("attack_arrow");var wt=co;var oe=Math.PI/2,po=class extends C{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polygon:{}}),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this._state=_.INITIALIZED}get type(){return C.getOverlayType("double_arrow")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getArrowPoints(e,i,s,o){let a=E.mid(e,i),n=E.distance(a,s),h=E.getThirdPoint(s,a,0,n*.3,!0),c=E.getThirdPoint(s,a,0,n*.5,!0);h=E.getThirdPoint(a,h,oe,n/5,o),c=E.getThirdPoint(a,c,oe,n/4,o);let d=[a,h,c,s],p=this._getArrowHeadPoints(d),f=p[0],g=p[4],u=E.distance(e,i)/E.getBaseLength(d)/2,m=this._getArrowBodyPoints(d,f,g,u),T=m.length,w=m.slice(0,T/2),P=m.slice(T/2,T);return w.push(f),P.push(g),w=w.reverse(),w.push(i),P=P.reverse(),P.push(e),w.reverse().concat(p,P)}_getArrowHeadPoints(e){let s=E.getBaseLength(e)*this.headHeightFactor,o=e[e.length-1],a=s*this.headWidthFactor,n=s*this.neckWidthFactor,h=s*this.neckHeightFactor,c=E.getThirdPoint(e[e.length-2],o,0,s,!0),d=E.getThirdPoint(e[e.length-2],o,0,h,!0),p=E.getThirdPoint(o,c,oe,a,!1),f=E.getThirdPoint(o,c,oe,a,!0),g=E.getThirdPoint(o,d,oe,n,!1),u=E.getThirdPoint(o,d,oe,n,!0);return[g,p,o,f,u]}_getArrowBodyPoints(e,i,s,o){let a=E.wholeDistance(e),h=E.getBaseLength(e)*o,c=E.distance(i,s),d=(h-c)/2,p=0,f=[],g=[];for(let u=1;u<e.length-1;u++){let m=E.getAngleOfThreePoints(e[u-1],e[u],e[u+1])/2;p+=E.distance(e[u-1],e[u]);let T=(h/2-p/a*d)/Math.sin(m),w=E.getThirdPoint(e[u-1],e[u],Math.PI-m,T,!0),P=E.getThirdPoint(e[u-1],e[u],m,T,!1);f.push(w),g.push(P)}return f.concat(g)}_getTempPoint4(e,i,s){let o=E.mid(e,i),a=E.distance(o,s),n=E.getAngleOfThreePoints(e,o,s),h,c,d,p;return n<oe?(c=a*Math.sin(n),d=a*Math.cos(n),p=E.getThirdPoint(e,o,oe,c,!1),h=E.getThirdPoint(o,p,oe,d,!0)):n>=oe&&n<Math.PI?(c=a*Math.sin(Math.PI-n),d=a*Math.cos(Math.PI-n),p=E.getThirdPoint(e,o,oe,c,!1),h=E.getThirdPoint(o,p,oe,d,!1)):n>=Math.PI&&n<Math.PI*1.5?(c=a*Math.sin(n-Math.PI),d=a*Math.cos(n-Math.PI),p=E.getThirdPoint(e,o,oe,c,!0),h=E.getThirdPoint(o,p,oe,d,!0)):(c=a*Math.sin(Math.PI*2-n),d=a*Math.cos(Math.PI*2-n),p=E.getThirdPoint(e,o,oe,c,!0),h=E.getThirdPoint(o,p,oe,d,!1)),h}_getHierarchy(){let e=this._positions.length,i,s,o=v.parsePolygonCoordToArray(this._positions)[0],a=o[0],n=o[1],h=o[2];e===3?i=this._getTempPoint4(a,n,h):i=o[3],e===3||e===4?s=E.mid(a,n):s=o[4];let c,d;E.isClockWise(a,n,h)?(c=this._getArrowPoints(a,s,i,!1),d=this._getArrowPoints(s,n,h,!0)):(c=this._getArrowPoints(n,s,h,!1),d=this._getArrowPoints(s,a,i,!0));let p=c.length,f=(p-5)/2,g=c.slice(0,f),u=c.slice(f,f+5),m=c.slice(f+5,p),T=d.slice(0,f),w=d.slice(f,f+5),P=d.slice(f+5,p);T=E.getBezierPoints(T);let M=E.getBezierPoints(P.concat(g.slice(1)));return m=E.getBezierPoints(m),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(T.concat(w,M,u,m))))}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.polygon,e),this)}};C.registerType("double_arrow");var mo=po;var Nc=Math.PI/2,uo=class extends C{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polygon:{}}),this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this._state=_.INITIALIZED}get type(){return C.getOverlayType("fine_arrow")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getHierarchy(){let e=v.parsePolygonCoordToArray(this._positions)[0],i=e[0],s=e[1],o=E.getBaseLength(e),a=o*this.tailWidthFactor,n=o*this.neckWidthFactor,h=o*this.headWidthFactor,c=E.getThirdPoint(s,i,Nc,a,!0),d=E.getThirdPoint(s,i,Nc,a,!1),p=E.getThirdPoint(i,s,this.headAngle,h,!1),f=E.getThirdPoint(i,s,this.headAngle,h,!0),g=E.getThirdPoint(i,s,this.neckAngle,n,!1),u=E.getThirdPoint(i,s,this.neckAngle,n,!0);return new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions([c,g,p,s,f,u,d])))}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.polygon,e),this)}};C.registerType("fine_arrow");var fo=uo;var _f=Math.PI/2,Fc=100,_o=class extends C{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polygon:{}}),this.t=.4,this._state=_.INITIALIZED}get type(){return C.getOverlayType("gathering_place")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getHierarchy(){let e=v.parsePolygonCoordToArray(this._positions)[0];if(this._positions.length===2){let n=E.mid(e[0],e[1]),h=E.distance(e[0],n)/.9,c=E.getThirdPoint(e[0],n,_f,h,!0);e=[e[0],c,e[1]]}let i=E.mid(e[0],e[2]);e.push(i,e[0],e[1]);let s=[];for(let n=0;n<e.length-2;n++){let h=e[n],c=e[n+1],d=e[n+2],p=E.getBisectorNormals(this.t,h,c,d);s=s.concat(p)}let o=s.length;s=[s[o-1]].concat(s.slice(0,o-1));let a=[];for(let n=0;n<e.length-2;n++){let h=e[n],c=e[n+1];a.push(h);for(let d=0;d<=Fc;d++){let p=E.getCubicValue(d/Fc,h,s[n*2],s[n*2+1],c);a.push(p)}a.push(c)}return new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(a)))}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.polygon,e),this)}};C.registerType("gathering_place");var go=_o;var yo=class extends wt{constructor(e){super(e),this._delegate=new r.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1,this._state=_.INITIALIZED}get type(){return C.getOverlayType("tailed_attack_arrow")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getHierarchy(){let e=v.parsePolygonCoordToArray(this._positions)[0],i=e[0],s=e[1];E.isClockWise(e[0],e[1],e[2])&&(i=e[1],s=e[0]);let a=[E.mid(i,s)].concat(e.slice(2)),n=this._getArrowHeadPoints(a,i,s),h=n[0],c=n[4],d=E.distance(i,s),p=E.getBaseLength(a),f=p*this.tailWidthFactor*this.swallowTailFactor,g=E.getThirdPoint(a[1],a[0],0,f,!0),u=d/p,m=this._getArrowBodyPoints(a,h,c,u),T=m.length,w=[i].concat(m.slice(0,T/2));w.push(h);let P=[s].concat(m.slice(T/2,T));return P.push(c),w=E.getQBSplinePoints(w),P=E.getQBSplinePoints(P),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(w.concat(n,P.reverse(),[g,w[0]]))))}};C.registerType("tailed_attack_arrow");var vo=yo;var wo=class extends C{constructor(e,i,s=[32,32]){super(),this._position=v.parsePosition(e),this._icon=i,this._size=s,this._delegate={position:void 0,image:void 0,width:0,height:0},this._state=_.INITIALIZED}get type(){return C.getOverlayType("billboard_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("Billboard Primitive: the size invalid");this._size=e,this._delegate.width=this._size[0]||32,this._delegate.height=this._size[1]||32}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.image&&delete e.width&&delete e.height,x.merge(this._style,e),x.merge(this._delegate,e),this)}};C.registerType("billboard_primitive");var Co=wo;var Wc={maxOffsetY:10,offsetAmount:.1},xo=class extends Co{constructor(e,i){super(e,i),this._currentOffset=new r.Cartesian2(0,0),this._isUp=!0,this._state=_.INITIALIZED}get type(){return C.getOverlayType("bounce_billboard_primitive")}update(e){var o,a;if(!this._show)return;let i=((o=this._style)==null?void 0:o.maxOffsetY)||Wc.maxOffsetY,s=((a=this._style)==null?void 0:a.offsetAmount)||Wc.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-i&&(this._isUp=!1),this._currentOffset.y+=s*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return r.destroyObject(this)}};C.registerType("bounce_billboard_primitive");var gf=xo;var To=class extends C{constructor(e,i){super(),this._position=v.parsePosition(e),this._text=i,this._delegate={position:void 0,text:void 0},this._state=_.INITIALIZED}get type(){return C.getOverlayType("label_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.text=this._text}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position&&delete e.text,x.merge(this._style,e),x.merge(this._delegate,e),this)}};C.registerType("label_primitive");var Eo=To;var Gc={maxOffsetY:10,offsetAmount:.1},Po=class extends Eo{constructor(e,i){super(e,i),this._currentOffset=new r.Cartesian2(0,0),this._isUp=!0,this._state=_.INITIALIZED}get type(){return C.getOverlayType("bounce_label_primitive")}update(e){var o,a;if(!this._show)return;let i=((o=this._style)==null?void 0:o.maxOffsetY)||Gc.maxOffsetY,s=((a=this._style)==null?void 0:a.offsetAmount)||Gc.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-i&&(this._isUp=!1),this._currentOffset.y+=s*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return r.destroyObject(this)}};C.registerType("bounce_label_primitive");var yf=Po;var bo=class extends C{constructor(e){super(),this._position=v.parsePosition(e),this._delegate={position:void 0,scale:{x:12,y:8}},this._state=_.INITIALIZED}get type(){return C.getOverlayType("cloud_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,x.merge(this._style,e),x.merge(this._delegate,e),this)}};C.registerType("cloud_primitive");var vf=bo;var wf={minRadius:10,minHeight:30,color:r.Color.RED,slices:128,speed:10},Mo=class extends C{constructor(e,i,s){super(),this._center=v.parsePosition(e),this._delegate=void 0,this._height=s,this._radius=i,this._currentHeight=s||0,this._currentRadius=10,this._style={...wf},this._state=_.INITIALIZED}get type(){return C.getOverlayType("diffuse_wall_primitive")}get center(){return this._center}set center(e){this._center=v.parsePosition(e)}get radius(){return this._radius}set radius(e){this._radius=e}get height(){return this._height}set height(e){this._height=e}_getPositions(){let e=[],i=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center));for(let s=0;s<this._style.slices;s++){let o=s/this._style.slices*r.Math.TWO_PI,a=Math.cos(o),n=Math.sin(o),h=new r.Cartesian3(a*this._currentRadius,n*this._currentRadius,0);e.push(r.Matrix4.multiplyByPoint(i,h,new r.Cartesian3))}return e.push(e[0]),e}_getHeights(e,i){let s=[];for(let o=0;o<e;o++)s.push(i);return s}update(e){var o;if(this._delegate=this._delegate&&this._delegate.destroy(),this._currentRadius+=this._radius/this._style.speed/20,this._currentHeight-=this._height/this._style.speed/20,(this._currentRadius>this._radius||this._currentHeight<this._style.minHeight)&&(this._currentRadius=this._style.minRadius,this._currentHeight=this._height),!this._style.slices||this._style.slices<3)return!1;let i=this._getPositions();if(!i||!i.length)return!1;let s=new r.WallGeometry({positions:i,minimumHeights:this._getHeights(i.length,0),maximumHeights:this._getHeights(i.length,this._currentHeight)});this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:s}),appearance:new r.MaterialAppearance({material:r.Material.fromType("WallDiffuse",{color:(o=this._style)==null?void 0:o.color}),flat:!0}),asynchronous:!1}),this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(x.merge(this._style,e),this)}destroy(){return r.destroyObject(this)}};C.registerType("diffuse_wall_primitive");var Cf=Mo;var Ao=class extends C{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i||{x:10,y:10,z:10},this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("elec_ellipsoid_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.geometryInstances.modelMatrix=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._position))}get radius(){return this._radius}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry=new r.EllipsoidGeometry({radii:this._radius,maximumCone:r.Math.PI_OVER_TWO})}_setAppearance(){var e,i;this._style&&(this._delegate.appearance=new r.MaterialAppearance({material:r.Material.fromType("EllipsoidElectric",{color:((e=this._style)==null?void 0:e.color)||r.Color.GREEN,speed:((i=this._style)==null?void 0:i.speed)||5})}))}_mountedHook(){this.radius=this._radius,this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setLabel(e,i){return this}setStyle(e={}){return Object.keys(e).length===0?this:(x.merge(this._style,e),this._setAppearance(),this)}};C.registerType("elec_ellipsoid_primitive");var xf=Ao;var So=class extends C{constructor(e,i=1){super(),this._positions=v.parsePositions(e),this._width=i,this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("flow_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolylineGeometry({positions:y.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,i,s,o;this._delegate.appearance=new r.PolylineMaterialAppearance({material:r.Material.fromType("PolylineFlow",{color:((e=this._style)==null?void 0:e.color)||new r.Color(1,0,0,.7),speed:((i=this._style)==null?void 0:i.speed)||1,percent:((s=this._style)==null?void 0:s.percent)||.03,gradient:((o=this._style)==null?void 0:o.gradient)||.1})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setLabel(e,i){return this}setStyle(e={}){return Object.keys(e).length===0?this:(x.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};C.registerType("flow_line_primitive");var Tf=So;/**
|
|
240
240
|
* @file 粒子图像模块 - base64编码
|
|
241
241
|
* @module images/base64
|
|
242
242
|
* @author Lucas Xu
|
|
@@ -250,12 +250,12 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKwAAAA0CAYAAAAXBNP2AAAACXBIWXMAAA
|
|
|
250
250
|
* @property {string} IMG_PARTICLES - base64编码的粒子图像数据
|
|
251
251
|
* @license MIT
|
|
252
252
|
* @copyright © 2025 Company Name
|
|
253
|
-
*/var $c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFh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COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var P_={color:r.Color.ORANGE},Ia=class extends x{constructor(e,i,s,a){super(),this._center=v.parsePosition(e),this._length=i||100,this._topRadius=s||1,this._bottomRadius=a||50,this._delegate=new r.PrimitiveCollection,this._style={...P_},this._state=_.INITIALIZED}get type(){return x.getOverlayType("light-cylinder-primitive")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._updatePrimitives()}get length(){return this._length}set length(e){this._length=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}_computeEllipsePositions(e,i){let s=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(e),semiMajorAxis:i,semiMinorAxis:i,rotation:0,granularity:.005},!1,!0),a=r.Cartesian3.unpackArray(s.outerPositions);return a.push(a[0]),a}_createCylinderInstance(e,i,s){let a=i.slice(),o=i.length,n=2*o,h=[],c=1/(o-1),d=[],p=[],f=(u,m=0)=>{let E=r.Cartographic.fromCartesian(u);return E.height+=m,r.Cartographic.toCartesian(E)};for(let u=0;u<o;u++){p.push(f(e[u],s)),h.push(u*c,0);let m=u+1,E=(u+1)%o,w=n-m;d.push(w-1,w,u),d.push(u,E,w-1)}for(let u in p)a.push(p[o-u-1]),h.push(1-u*c,1);let g=r.PolygonGeometry.createGeometry(new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(a),perPositionHeight:!0}));return g.indices=d,g.attributes.st.values=h,new r.GeometryInstance({geometry:g})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let i=e.getContext("2d");return i.fillStyle="rgba(255,255,255,0)",i.strokeStyle="rgba(255, 255, 255,255)",i.setLineDash([50,50]),i.lineWidth=30,i.beginPath(),i.arc(256,256,150,0,Math.PI*2,!0),i.stroke(),i.restore(),e}_getParticlesImage(e){let i=document.createElement("canvas");i.width=64,i.height=256;let s=i.getContext("2d");return s.clearRect(0,0,64,256),s.drawImage(e,0,0),s.drawImage(e,33,0),i}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,i=this._computeEllipsePositions(this._center,this._topRadius),s=this._computeEllipsePositions(this._center,this._bottomRadius*.7),a=this._computeEllipsePositions(this._center,this._bottomRadius),o={geometryInstances:new r.GeometryInstance({geometry:new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},n=e?new r.GroundPrimitive(o):new r.Primitive(o);n.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRingType,{color:this._style.color})});let h=e?new r.GroundPrimitive(o):new r.Primitive(o);h.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let c=new r.Primitive({geometryInstances:this._createCylinderInstance(i,s,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?r.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)}):(this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)),r.Resource.fetchImage({url:$c}).then(d=>{let p=new r.Primitive({geometryInstances:this._createCylinderInstance(i,a,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(d)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this)}destroy(){return r.destroyObject(this)}};x.registerType("light-cylinder-primitive");var ed=Ia;var La=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._modelUrl=i,this._delegate=r.Model.fromGltfAsync({url:i}),this._modelEvent=new Er(this._delegate),this._state=_.INITIALIZED}get type(){return x.getOverlayType("model_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e);let i=y.transformWGS84ToCartesian(this._position);this._delegate.then(s=>{s.modelMatrix=r.Transforms.headingPitchRollToFixedFrame(i,new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))})}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate=r.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(T.merge(this._style,e),this._delegate.then(i=>{T.merge(i,e)}),this)}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this._modelEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this._modelEvent.off(e,i,s||this),this}};x.registerType("model_primitive");var td=La;var id={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},Da=class extends x{constructor(e){super(),this._position=v.parsePosition(e),this._delegate={position:void 0},this._state=_.INITIALIZED}get type(){return x.getOverlayType("point_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}_mountedHook(){this.position=this._position,T.merge(this._delegate,id,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate,id,this._style),this)}};x.registerType("point_primitive");var rd=Da;var Ra=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate={positions:[]},this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return Oe(this._positions)}get distance(){return ce(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate,e),this)}};x.registerType("polyline_primitive");var sd=Ra;var Oa=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i,this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("scan_circle_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.geometryInstances.geometry=new r.EllipseGeometry({center:y.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get radius(){return this._radius}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}_setAppearance(){var e,i;this._style&&(this._delegate.appearance=new r.MaterialAppearance({material:r.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||r.Color.WHITE,speed:((i=this._style)==null?void 0:i.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("scan_circle_primitive");var ad=Oa;var ka=class extends x{constructor(e,i=1){super(),this._positions=v.parsePositions(e),this._width=i,this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("trail_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolylineGeometry({positions:y.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,i;this._delegate.appearance=new r.PolylineMaterialAppearance({material:r.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new r.Color(1,0,0,.7),speed:((i=this._style)==null?void 0:i.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(T.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("trail_line_primitive");var od=ka;var Na=class extends x{constructor(e,i){super(),this._positions=v.parsePositions(e),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._video=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("video_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=r.PolygonGeometry.fromPositions({positions:y.transformWGS84ArrayToCartesianArray(this._positions),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get video(){return this._video}set video(e){this._video=e,this._setAppearance()}_setAppearance(){this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};x.registerType("video_primitive");var nd=Na;var za=class extends x{constructor(e,i=[]){super(),this._positions=v.parsePositions(e),this._holes=i.map(s=>v.parsePositions(s)),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("water_primitive")}get positions(){return this._positions}set positions(e){var i,s,a,o;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(n=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(n)))),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(a=this._style)==null?void 0:a.closeTop,closeBottom:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}_setAppearance(){var e,i,s,a,o,n,h,c;this._style&&(this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new r.Color(.2,.3,.6,1),blendColor:((i=this._style)==null?void 0:i.blendColor)||new r.Color(0,1,.699,1),specularMap:((s=this._style)==null?void 0:s.specularMap)||r.Material.DefaultImageId,normalMap:((a=this._style)==null?void 0:a.normalMap)||r.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((n=this._style)==null?void 0:n.animationSpeed)||.01,amplitude:((h=this._style)==null?void 0:h.amplitude)||10,specularIntensity:((c=this._style)==null?void 0:c.specularIntensity)||.5})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var i;return Object.keys(e).length===0?this:(T.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};x.registerType("water_primitive");var ld=za;var Fa=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({billboard:{}}),this._position=v.parsePosition(e),this._icon=i,this._size=[32,32],this._state=_.INITIALIZED}get type(){return x.getOverlayType("billboard")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return e.billboard&&(i=new l(a,e.billboard.image.getValue(s)),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}),i}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.billboard,e),this)}};x.registerType("billboard");var at=Fa;var Ga=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=i,this._width=s,this._height=a,this._delegate=new r.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("box")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){let i=this._delegate.box.dimensions.getValue();this._length=e||0,i.x=+this._length,this._delegate.box.dimensions.setValue(i)}get width(){return this._width}set width(e){let i=this._delegate.box.dimensions.getValue();this._width=e||0,i.y=+this._width,this._delegate.box.dimensions.setValue(i)}get height(){return this._height}set height(e){let i=this._delegate.box.dimensions.getValue();this._height=e||0,i.z=+this._height,this._delegate.box.dimensions.setValue(i)}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,T.merge(this._style,e),T.merge(this._delegate.box,e),this)}};x.registerType("box");var hd=Ga;var Ha=class extends x{constructor(e,i){super(),this._delegate=new r.Entity({polygon:{}}),this._center=v.parsePosition(e),this._radius=+i||0,this._rotateAmount=0,this._stRotation=0,this._state=_.INITIALIZED}get type(){return x.getOverlayType("circle")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new r.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),r.Math.toRadians(this._stRotation)),!1)}_computeHierarchy(){let e=new r.PolygonHierarchy,i=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),s=r.Cartesian3.unpackArray(i.outerPositions);return s.push(s[0]),e.positions=s,e}_mountedHook(){this.center=this._center}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this._center),this._delegate.label={...i,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("circle");var ii=Ha;var Wa=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({corridor:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("corridor")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.corridor.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.corridor,e),this)}};x.registerType("corridor");var cd=Wa;var Ba=class extends x{constructor(e,i,s,a){super(),this._position=v.parsePosition(e),this._length=+i||0,this._topRadius=+s||0,this._bottomRadius=+a||0,this._delegate=new r.Entity({cylinder:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("cylinder")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,T.merge(this._style,e),T.merge(this._delegate.cylinder,e),this)}};x.registerType("cylinder");var dd=Ba;var Ua=class extends x{constructor(e,i,s){super(),this._position=v.parsePosition(e),this._semiMajorAxis=+i||0,this._semiMinorAxis=+s||0,this._delegate=new r.Entity({ellipse:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("ellipse")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get semiMajorAxis(){return this._semiMajorAxis}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMinorAxis(){return this._semiMinorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,T.merge(this._style,e),T.merge(this._delegate.ellipse,e),this)}};x.registerType("ellipse");var pd=Ua;var Va=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i||{x:10,y:10,z:10},this._delegate=new r.Entity({ellipsoid:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("sphere")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get radius(){return this._radius}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,T.merge(this._style,e),T.merge(this._delegate.ellipsoid,e),this)}};x.registerType("sphere");var md=Va;var Za=class l extends x{constructor(e,i){super(),this._delegate=new r.Entity({label:{}}),this._position=v.parsePosition(e),this._text=i,this._state=_.INITIALIZED}get type(){return x.getOverlayType("label")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.label.text=this._text}static fromEntity(e){var o;let i=r.JulianDate.now(),s=y.transformCartesianToWGS84(e.position.getValue(i)),a;return e.billboard&&(a=new l(s,e.name),a.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(i)}),a}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,T.merge(this._style,e),T.merge(this._delegate.label,e),this)}};x.registerType("label");var ri=Za;var ja=class extends x{constructor(e,i,s,a={}){if(super(),this._position=v.parsePosition(e),this._width=+i||100,this._height=+s||100,a.normal&&typeof a.normal=="string"){let o=String(a.normal).toLocaleUpperCase();a.normal=o==="X"?r.Cartesian3.UNIT_X:o==="Y"?r.Cartesian3.UNIT_Y:r.Cartesian3.UNIT_Z}else a.normal=r.Cartesian3.UNIT_Z;this._normal=a.normal,this._distance=a.distance||0,this._delegate=new r.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new r.Plane(this._normal,this._distance)}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("plane")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get width(){return this._width}set width(e){let i=this._delegate.plane.dimensions.getValue();this._width=+e||0,i.x=this._width}get height(){return this._height}set height(e){let i=this._delegate.plane.dimensions.getValue();this._height=+e||0,i.y=this._height}get distance(){return this._distance}set distance(e){this._distance=e,this._delegate.plane.plane.distance=e}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],T.merge(this._style,e),T.merge(this._delegate.plane,e),this)}};x.registerType("plane");var ud=ja;var fd={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},Ya=class l extends x{constructor(e){super(),this._delegate=new r.Entity({point:{}}),this._position=v.parsePosition(e),this._state=_.INITIALIZED}get type(){return x.getOverlayType("point")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}static fromEntity(e){var o;let i,s=r.JulianDate.now(),a=y.transformCartesianToWGS84(e.position.getValue(s));return i=new l(a),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)},i}_mountedHook(){this.position=this._position,T.merge(this._delegate.point,fd,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,T.merge(this._style,e),T.merge(this._delegate.point,fd,this._style),this)}};x.registerType("point");var si=Ya;var qa=class l extends x{constructor(e){super(),this._delegate=new r.Entity({polygon:{}}),this._positions=v.parsePositions(e),this._holes=[],this._state=_.INITIALIZED}get type(){return x.getOverlayType("polygon")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get holes(){return this._holes}set holes(e){e&&e.length&&(this._holes=e.map(i=>v.parsePositions(i)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get center(){return Oe([...this._positions,this._positions[0]])}get area(){return Re(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polygon){let o=y.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(s).positions);i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_computeHierarchy(){let e=new r.PolygonHierarchy;return e.positions=y.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(i=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(i))),e}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polygon,e),this)}};x.registerType("polygon");var ot=qa;var Xa=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polyline:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polyline.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return Oe(this._positions)}get distance(){return ce(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polyline,e),this)}};x.registerType("polyline");var nt=Xa;var Ja=class extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({rectangle:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("rect")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.rectangle.coordinates=r.Rectangle.fromCartesianArray(y.transformWGS84ArrayToCartesianArray(this._positions))}_mountedHook(){this.positions=this._positions}setLabel(e,i){let s=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=r.Cartographic.toCartesian(r.Rectangle.center(s,new r.Cartographic)),this._delegate.label={...i,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.rectangle,e),this)}};x.registerType("rect");var ai=Ja;var Qa=class l extends x{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({wall:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("wall")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.wall.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var a;let i,s=r.JulianDate.now();if(e.polyline){let o=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.wall,e),this)}};x.registerType("wall");var _d=Qa;var Ka=class{static getShapeForPipeline(e={}){let i=e.radius||1,s=e.thicknes||i/3,a=Math.ceil(360/(e.slices||60)),o=e.startAngle||0,n=e.endAngle||o+360,h=e.vscale||1,c=e.hscale||1,d=[];for(let p=o;p<=n;p+=a){let f=r.Math.toRadians(p);d.push({x:i*c*Math.cos(f),y:i*h*Math.sin(f)})}for(let p=n;p>=o;p-=a){let f=r.Math.toRadians(p);d.push({x:(i-s)*c*Math.cos(f),y:(i-s)*h*Math.sin(f)})}return d}static getShapeForCircle(e={}){let i=e.radius||1,s=Math.ceil(360/(e.slices||60)),a=e.startAngle||0,o=e.endAngle||a+360,n=e.vscale||1,h=e.hscale||1,c=[];for(let d=a;d<=o;d+=s){let p=r.Math.toRadians(d);c.push({x:i*h*Math.cos(p),y:i*n*Math.sin(p)})}return c}static getShapeForStar(e={}){console.log(e.slices||6);let i=e.radius||1,s=e.thicknes||i/3,a=e.slices||6,o=e.startAngle||0;console.log(a);let n=r.Math.toRadians(o),h=Math.PI/a,c=2*a,d=new Array(c);for(let p=0;p<c;p++){let f=p%2===0?i:s,g=n+p*h;d[p]=new r.Cartesian2(Math.cos(g)*f,Math.sin(g)*f)}return d}},Ne=Ka;var $a=class l extends x{constructor(e={}){super(),this._positions=v.parsePositions(e.positions||[]);let i=e.shape||e.shapePositions;switch(e.radius=e.radius||10,i){case"pipeline":this._shape=Ne.getShapeForPipeline(e);break;case"circle":this._shape=Ne.getShapeForCircle(e);break;case"star":this._shape=Ne.getShapeForStar(e);break;default:this._shape=i;break}this._delegate=new r.Entity({polylineVolume:{}}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_volume")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polylineVolume.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get shape(){return this._shape}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),T.merge(this._delegate.polylineVolume,e),this)}};x.registerType("polyline_volume");var gd=$a;var eo=class l extends x{constructor(e={}){super(),e.radius=e.radius||10,e.alpha=e.alpha||.8,e.color=e.color||r.Color.RED,this._alpha=e.alpha,this._color=e.color.withAlpha(this._alpha),console.log("PolylineAdapter",e);let i=e.branches;this._centerRadius=0,i==null||i.forEach(s=>{this._centerRadius=Math.max(this._centerRadius,s.radius)}),this._center=v.parsePosition(e.center),this._type=e.type||i.length>2?"multiway":"elbow",this._instances=[],this._type==="multiway"&&i.length>2?i&&i.forEach(s=>{let a={lat:this._center.lat,lng:this._center.lng,alt:this._center.alt+(this._centerRadius-s.radius)};this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([a,...s.positions]),shapePositions:Ne.getShapeForPipeline({radius:s.radius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}}))}):this._type==="elbow"&&i.length===2&&this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([...i[0].positions.reverse(),this._center,...i[1].positions]),shapePositions:Ne.getShapeForPipeline({radius:this._centerRadius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}})),this._center.alt=this._center.alt+this._centerRadius,this._instances.push(new r.GeometryInstance({geometry:new r.SphereGeometry({radius:this._centerRadius*1.2,stackPartitions:e.slices,slicePartitions:e.slices,vertexFormat:r.VertexFormat.POSITION_AND_NORMAL}),modelMatrix:r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center)),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}})),this._delegate=new r.Primitive({geometryInstances:this._instances,appearance:new r.PerInstanceColorAppearance({flat:!0,faceForward:!0}),asynchronous:!1}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("polyline_adapter")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.modelMatrix=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center))}static fromEntity(e,i){var o;let s,a=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(a)),s=new l(i),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(a)}),s}_mountedHook(){}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,T.merge(this._style,e),e.alpha&&(this._alpha=e.alpha),e.color&&(this._color=e.color.withAlpha(this._alpha),console.log("------------",e.color),this._instances.forEach(i=>{console.log("------------",i.attributes),i.attributes&&i.attributes.color&&(i.attributes.color=r.ColorGeometryInstanceAttribute.fromColor(this._color))})),this)}};x.registerType("polyline_adapter");var yd=eo;var to=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=r.GeoJsonDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("geojson")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}_createBillboard(e){return e.position&&e.billboard?at.fromEntity(e):null}_createPolyline(e){if(e.polyline)return nt.fromEntity(e)}_createPolygon(e){if(e.polygon)return ot.fromEntity(e)}_createModel(e,i){if(e)return qt.fromEntity(e,i)}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}toVectorLayer(){let e=new Je(this.id);return this.eachOverlay(i=>{i.billboard?e.addOverlay(this._createBillboard(i)):i.polyline?e.addOverlay(this._createPolyline(i)):i.polygon&&e.addOverlay(this._createPolygon(i))},this),e}toModelLayer(e){let i=new Je(this.id);return this.eachOverlay(s=>{i.addOverlay(this._createModel(s,e))},this),i}};I.registerType("geojson");var Et=to;var io=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=r.KmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("gpx")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}};I.registerType("gpx");var vd=io;var M_={radialColor:r.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:r.Color.YELLOW,weftColor:r.Color.WHITE,weftWidth:2},ro=class extends I{constructor(e,i){super(e),this._options={...M_,...i},this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:r.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let i=[];for(let s=0;s<129;s++)i.push(-180+s*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray(i),material:this._options.weftColor,width:this._options.weftWidth}})}}};I.registerType("graticule");var wd=ro;var so=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._isGround=!0,this._state=_.INITIALIZED}get type(){return I.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("ground_primitive");var xd=so;var Td=[].indexOf||function(l){for(let e=0,i=this.length;e<i;e++)if(e in this&&this[e]===l)return e;return-1},oi=`attribute vec4 position;
|
|
253
|
+
*/var Hc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEP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ORANGE},Io=class extends C{constructor(e,i,s,o){super(),this._center=v.parsePosition(e),this._length=i||100,this._topRadius=s||1,this._bottomRadius=o||50,this._delegate=new r.PrimitiveCollection,this._style={...Ef},this._state=_.INITIALIZED}get type(){return C.getOverlayType("light-cylinder-primitive")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._updatePrimitives()}get length(){return this._length}set length(e){this._length=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}_computeEllipsePositions(e,i){let s=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(e),semiMajorAxis:i,semiMinorAxis:i,rotation:0,granularity:.005},!1,!0),o=r.Cartesian3.unpackArray(s.outerPositions);return o.push(o[0]),o}_createCylinderInstance(e,i,s){let o=i.slice(),a=i.length,n=2*a,h=[],c=1/(a-1),d=[],p=[],f=(u,m=0)=>{let T=r.Cartographic.fromCartesian(u);return T.height+=m,r.Cartographic.toCartesian(T)};for(let u=0;u<a;u++){p.push(f(e[u],s)),h.push(u*c,0);let m=u+1,T=(u+1)%a,w=n-m;d.push(w-1,w,u),d.push(u,T,w-1)}for(let u in p)o.push(p[a-u-1]),h.push(1-u*c,1);let g=r.PolygonGeometry.createGeometry(new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(o),perPositionHeight:!0}));return g.indices=d,g.attributes.st.values=h,new r.GeometryInstance({geometry:g})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let i=e.getContext("2d");return i.fillStyle="rgba(255,255,255,0)",i.strokeStyle="rgba(255, 255, 255,255)",i.setLineDash([50,50]),i.lineWidth=30,i.beginPath(),i.arc(256,256,150,0,Math.PI*2,!0),i.stroke(),i.restore(),e}_getParticlesImage(e){let i=document.createElement("canvas");i.width=64,i.height=256;let s=i.getContext("2d");return s.clearRect(0,0,64,256),s.drawImage(e,0,0),s.drawImage(e,33,0),i}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,i=this._computeEllipsePositions(this._center,this._topRadius),s=this._computeEllipsePositions(this._center,this._bottomRadius*.7),o=this._computeEllipsePositions(this._center,this._bottomRadius),a={geometryInstances:new r.GeometryInstance({geometry:new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},n=e?new r.GroundPrimitive(a):new r.Primitive(a);n.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRingType,{color:this._style.color})});let h=e?new r.GroundPrimitive(a):new r.Primitive(a);h.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let c=new r.Primitive({geometryInstances:this._createCylinderInstance(i,s,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?r.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)}):(this._delegate.add(n),this._delegate.add(h),this._delegate.add(c)),r.Resource.fetchImage({url:Hc}).then(d=>{let p=new r.Primitive({geometryInstances:this._createCylinderInstance(i,o,this._length),appearance:new r.EllipsoidSurfaceAppearance({material:r.Material.fromType(r.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(d)})}),asynchronous:!1});this._delegate.add(p)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(x.merge(this._style,e),this)}destroy(){return r.destroyObject(this)}};C.registerType("light-cylinder-primitive");var Pf=Io;var Lo=class extends C{constructor(e,i){super(),this._position=v.parsePosition(e),this._modelUrl=i,this._delegate=r.Model.fromGltfAsync({url:i}),this._modelEvent=new _r(this._delegate),this._state=_.INITIALIZED}get type(){return C.getOverlayType("model_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e);let i=y.transformWGS84ToCartesian(this._position);this._delegate.then(s=>{s.modelMatrix=r.Transforms.headingPitchRollToFixedFrame(i,new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))})}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate=r.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(x.merge(this._style,e),this._delegate.then(i=>{x.merge(i,e)}),this)}on(e,i,s){return this._overlayEvent.on(e,i,s||this),this._modelEvent.on(e,i,s||this),this}off(e,i,s){return this._overlayEvent.off(e,i,s||this),this._modelEvent.off(e,i,s||this),this}};C.registerType("model_primitive");var bf=Lo;var Bc={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},Do=class extends C{constructor(e){super(),this._position=v.parsePosition(e),this._delegate={position:void 0},this._state=_.INITIALIZED}get type(){return C.getOverlayType("point_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}_mountedHook(){this.position=this._position,x.merge(this._delegate,Bc,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,x.merge(this._style,e),x.merge(this._delegate,Bc,this._style),this)}};C.registerType("point_primitive");var Mf=Do;var Ro=class extends C{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate={positions:[]},this._state=_.INITIALIZED}get type(){return C.getOverlayType("polyline_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return Re(this._positions)}get distance(){return he(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate,e),this)}};C.registerType("polyline_primitive");var Af=Ro;var Oo=class extends C{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i,this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("scan_circle_primitive")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.geometryInstances.geometry=new r.EllipseGeometry({center:y.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get radius(){return this._radius}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}_setAppearance(){var e,i;this._style&&(this._delegate.appearance=new r.MaterialAppearance({material:r.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||r.Color.WHITE,speed:((i=this._style)==null?void 0:i.speed)||10})}))}_mountedHook(){this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(x.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};C.registerType("scan_circle_primitive");var Sf=Oo;var ko=class extends C{constructor(e,i=1){super(),this._positions=v.parsePositions(e),this._width=i,this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("trail_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolylineGeometry({positions:y.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,i;this._delegate.appearance=new r.PolylineMaterialAppearance({material:r.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new r.Color(1,0,0,.7),speed:((i=this._style)==null?void 0:i.speed)||5})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e={}){return Object.keys(e).length===0?this:(x.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};C.registerType("trail_line_primitive");var If=ko;var zo=class extends C{constructor(e,i){super(),this._positions=v.parsePositions(e),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}})}),this._video=i,this._state=_.INITIALIZED}get type(){return C.getOverlayType("video_primitive")}get positions(){return this._positions}set positions(e){var i,s,o,a;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=r.PolygonGeometry.fromPositions({positions:y.transformWGS84ArrayToCartesianArray(this._positions),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(o=this._style)==null?void 0:o.closeTop,closeBottom:(a=this._style)==null?void 0:a.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get video(){return this._video}set video(e){this._video=e,this._setAppearance()}_setAppearance(){this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var i;return Object.keys(e).length===0?this:(x.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};C.registerType("video_primitive");var Lf=zo;var No=class extends C{constructor(e,i=[]){super(),this._positions=v.parsePositions(e),this._holes=i.map(s=>v.parsePositions(s)),this._delegate=new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("water_primitive")}get positions(){return this._positions}set positions(e){var i,s,o,a;this._positions=v.parsePositions(e),this._delegate.geometryInstances.geometry=new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(n=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(n)))),height:(i=this._style)==null?void 0:i.height,extrudedHeight:(s=this._style)==null?void 0:s.extrudedHeight,closeTop:(o=this._style)==null?void 0:o.closeTop,closeBottom:(a=this._style)==null?void 0:a.closeBottom,vertexFormat:r.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}_setAppearance(){var e,i,s,o,a,n,h,c;this._style&&(this._delegate.appearance=new r.EllipsoidSurfaceAppearance({material:r.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new r.Color(.2,.3,.6,1),blendColor:((i=this._style)==null?void 0:i.blendColor)||new r.Color(0,1,.699,1),specularMap:((s=this._style)==null?void 0:s.specularMap)||r.Material.DefaultImageId,normalMap:((o=this._style)==null?void 0:o.normalMap)||r.Material.DefaultImageId,frequency:((a=this._style)==null?void 0:a.frequency)||1e3,animationSpeed:((n=this._style)==null?void 0:n.animationSpeed)||.01,amplitude:((h=this._style)==null?void 0:h.amplitude)||10,specularIntensity:((c=this._style)==null?void 0:c.specularIntensity)||.5})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var i;return Object.keys(e).length===0?this:(x.merge(this._style,e),(i=this._style)!=null&&i.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};C.registerType("water_primitive");var Df=No;var Fo=class l extends C{constructor(e,i){super(),this._delegate=new r.Entity({billboard:{}}),this._position=v.parsePosition(e),this._icon=i,this._size=[32,32],this._state=_.INITIALIZED}get type(){return C.getOverlayType("billboard")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get icon(){return this._icon}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get size(){return this._size}set size(e){if(!Array.isArray(e))throw new Error("Billboard: the size invalid");this._size=e,this._delegate.billboard.width=this._size[0]||32,this._delegate.billboard.height=this._size[1]||32}static fromEntity(e){var a;let i,s=r.JulianDate.now(),o=y.transformCartesianToWGS84(e.position.getValue(s));return e.billboard&&(i=new l(o,e.billboard.image.getValue(s)),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}),i}_mountedHook(){this.position=this._position,this.icon=this._icon,this.size=this._size}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.image&&delete e.width&&delete e.height,x.merge(this._style,e),x.merge(this._delegate.billboard,e),this)}};C.registerType("billboard");var Ct=Fo;var Wo=class extends C{constructor(e,i,s,o){super(),this._position=v.parsePosition(e),this._length=i,this._width=s,this._height=o,this._delegate=new r.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("box")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){let i=this._delegate.box.dimensions.getValue();this._length=e||0,i.x=+this._length,this._delegate.box.dimensions.setValue(i)}get width(){return this._width}set width(e){let i=this._delegate.box.dimensions.getValue();this._width=e||0,i.y=+this._width,this._delegate.box.dimensions.setValue(i)}get height(){return this._height}set height(e){let i=this._delegate.box.dimensions.getValue();this._height=e||0,i.z=+this._height,this._delegate.box.dimensions.setValue(i)}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,x.merge(this._style,e),x.merge(this._delegate.box,e),this)}};C.registerType("box");var Rf=Wo;var Go=class extends C{constructor(e,i){super(),this._delegate=new r.Entity({polygon:{}}),this._center=v.parsePosition(e),this._radius=+i||0,this._rotateAmount=0,this._stRotation=0,this._state=_.INITIALIZED}get type(){return C.getOverlayType("circle")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new r.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),r.Math.toRadians(this._stRotation)),!1)}_computeHierarchy(){let e=new r.PolygonHierarchy,i=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),s=r.Cartesian3.unpackArray(i.outerPositions);return s.push(s[0]),e.positions=s,e}_mountedHook(){this.center=this._center}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this._center),this._delegate.label={...i,text:e},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.polygon,e),this)}};C.registerType("circle");var Ho=Go;var Bo=class l extends C{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({corridor:{}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("corridor")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.corridor.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var o;let i,s=r.JulianDate.now();if(e.polyline){let a=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(a),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.corridor,e),this)}};C.registerType("corridor");var Of=Bo;var Uo=class extends C{constructor(e,i,s,o){super(),this._position=v.parsePosition(e),this._length=+i||0,this._topRadius=+s||0,this._bottomRadius=+o||0,this._delegate=new r.Entity({cylinder:{}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("cylinder")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get topRadius(){return this._topRadius}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get bottomRadius(){return this._bottomRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}_mountedHook(){this.position=this._position,this.length=this._length,this.topRadius=this._topRadius,this.bottomRadius=this._bottomRadius}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.topRadius&&delete e.bottomRadius,x.merge(this._style,e),x.merge(this._delegate.cylinder,e),this)}};C.registerType("cylinder");var kf=Uo;var Vo=class extends C{constructor(e,i,s){super(),this._position=v.parsePosition(e),this._semiMajorAxis=+i||0,this._semiMinorAxis=+s||0,this._delegate=new r.Entity({ellipse:{}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("ellipse")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get semiMajorAxis(){return this._semiMajorAxis}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMinorAxis(){return this._semiMinorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}_mountedHook(){this.position=this._position,this.semiMajorAxis=this._semiMajorAxis,this.semiMinorAxis=this._semiMinorAxis}setStyle(e){return Object.keys(e).length===0?this:(delete e.semiMajorAxis&&delete e.semiMinorAxis,x.merge(this._style,e),x.merge(this._delegate.ellipse,e),this)}};C.registerType("ellipse");var zf=Vo;var Zo=class extends C{constructor(e,i){super(),this._position=v.parsePosition(e),this._radius=i||{x:10,y:10,z:10},this._delegate=new r.Entity({ellipsoid:{}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("sphere")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get radius(){return this._radius}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,x.merge(this._style,e),x.merge(this._delegate.ellipsoid,e),this)}};C.registerType("sphere");var Nf=Zo;var jo=class l extends C{constructor(e,i){super(),this._delegate=new r.Entity({label:{}}),this._position=v.parsePosition(e),this._text=i,this._state=_.INITIALIZED}get type(){return C.getOverlayType("label")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}get text(){return this._text}set text(e){this._text=e,this._delegate.label.text=this._text}static fromEntity(e){var a;let i=r.JulianDate.now(),s=y.transformCartesianToWGS84(e.position.getValue(i)),o;return e.billboard&&(o=new l(s,e.name),o.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(i)}),o}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,i){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,x.merge(this._style,e),x.merge(this._delegate.label,e),this)}};C.registerType("label");var Yo=jo;var qo=class extends C{constructor(e,i,s,o={}){if(super(),this._position=v.parsePosition(e),this._width=+i||100,this._height=+s||100,o.normal&&typeof o.normal=="string"){let a=String(o.normal).toLocaleUpperCase();o.normal=a==="X"?r.Cartesian3.UNIT_X:a==="Y"?r.Cartesian3.UNIT_Y:r.Cartesian3.UNIT_Z}else o.normal=r.Cartesian3.UNIT_Z;this._normal=o.normal,this._distance=o.distance||0,this._delegate=new r.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new r.Plane(this._normal,this._distance)}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("plane")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position),this._delegate.orientation=r.Transforms.headingPitchRollQuaternion(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(this._position.pitch),r.Math.toRadians(this._position.roll)))}get width(){return this._width}set width(e){let i=this._delegate.plane.dimensions.getValue();this._width=+e||0,i.x=this._width}get height(){return this._height}set height(e){let i=this._delegate.plane.dimensions.getValue();this._height=+e||0,i.y=this._height}get distance(){return this._distance}set distance(e){let i=this._delegate.plane;this._distance=e,i.distance=e}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],x.merge(this._style,e),x.merge(this._delegate.plane,e),this)}};C.registerType("plane");var Ff=qo;var Uc={pixelSize:8,outlineColor:r.Color.BLUE,outlineWidth:2},Xo=class l extends C{constructor(e){super(),this._delegate=new r.Entity({point:{}}),this._position=v.parsePosition(e),this._state=_.INITIALIZED}get type(){return C.getOverlayType("point")}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._delegate.position=y.transformWGS84ToCartesian(this._position)}static fromEntity(e){var a;let i,s=r.JulianDate.now(),o=y.transformCartesianToWGS84(e.position.getValue(s));return i=new l(o),i.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)},i}_mountedHook(){this.position=this._position,x.merge(this._delegate.point,Uc,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,x.merge(this._style,e),x.merge(this._delegate.point,Uc,this._style),this)}};C.registerType("point");var Jo=Xo;var Qo=class l extends C{constructor(e){super(),this._delegate=new r.Entity({polygon:{}}),this._positions=v.parsePositions(e),this._holes=[],this._state=_.INITIALIZED}get type(){return C.getOverlayType("polygon")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get holes(){return this._holes}set holes(e){e&&e.length&&(this._holes=e.map(i=>v.parsePositions(i)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get center(){return Re([...this._positions,this._positions[0]])}get area(){return De(this._positions)}static fromEntity(e){var o;let i,s=r.JulianDate.now();if(e.polygon){let a=y.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(s).positions);i=new l(a),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return i}_computeHierarchy(){let e=new r.PolygonHierarchy;return e.positions=y.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(i=>new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(i))),e}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.polygon,e),this)}};C.registerType("polygon");var xt=Qo;var Ko=class l extends C{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polyline:{positions:new r.CallbackProperty(()=>y.transformWGS84ArrayToCartesianArray(this._positions),!1)}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("polyline")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e)}get center(){return Re(this._positions)}get distance(){return he(this._positions)}static fromEntity(e){var o;let i,s=r.JulianDate.now();if(e.polyline){let a=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(a),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this._delegate.position=y.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...i},this}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.polyline,e),this)}};C.registerType("polyline");var Tt=Ko;var $o=class extends C{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({rectangle:{}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("rect")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.rectangle.coordinates=r.Rectangle.fromCartesianArray(y.transformWGS84ArrayToCartesianArray(this._positions))}_mountedHook(){this.positions=this._positions}setLabel(e,i){let s=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=r.Cartographic.toCartesian(r.Rectangle.center(s,new r.Cartographic)),this._delegate.label={...i,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.rectangle,e),this)}};C.registerType("rect");var ea=$o;var ta=class l extends C{constructor(e){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({wall:{}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("wall")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.wall.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var o;let i,s=r.JulianDate.now();if(e.polyline){let a=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));i=new l(a),i.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return i}_mountedHook(){this.positions=this._positions}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.wall,e),this)}};C.registerType("wall");var Wf=ta;var ia=class extends C{constructor(e,i={}){super(),this._positions=v.parsePositions(e),this._delegate=new r.Entity({polyline:{}}),this.resolution=i.resolution||100,this.curveType=i.curveType||"spline",this.showControlPoints=i.showControlPoints||!1,this.controlPointStyle=i.controlPointStyle||{pixelSize:8,color:r.Color.YELLOW,outlineColor:r.Color.BLACK,outlineWidth:2},this._controlPointEntities=[],this._state=_.INITIALIZED}get type(){return C.getOverlayType("bezier_curve")}set positions(e){this._positions=v.parsePositions(e),this._updateCurve()}get positions(){return this._positions}_calculateBezierPoints(){if(this._positions.length<2)return[];let e=y.transformWGS84ArrayToCartesianArray(this._positions),i=[],s=e.length;return this.curveType==="auto"?s===2?i=this._calculateLinear(e):s===3?i=this._calculateQuadraticBezier(e):s===4?i=this._calculateCubicBezier(e):i=this._calculateCardinalSpline(e):this.curveType==="quadratic"&&s>=3?i=this._calculateQuadraticBezier(e.slice(0,3)):this.curveType==="cubic"&&s>=4?i=this._calculateCubicBezier(e.slice(0,4)):this.curveType==="spline"?i=this._calculateCardinalSpline(e):i=this._calculateLinear(e),i}_calculateLinear(e){if(e.length<2)return e;let i=[],s=e[0],o=e[1];for(let a=0;a<=this.resolution;a++){let n=a/this.resolution,h=new r.Cartesian3(s.x+n*(o.x-s.x),s.y+n*(o.y-s.y),s.z+n*(o.z-s.z));i.push(h)}return i}_calculateQuadraticBezier(e){if(e.length<3)return e;let i=[],[s,o,a]=e;for(let n=0;n<=this.resolution;n++){let h=n/this.resolution,c=1-h,d=new r.Cartesian3(c*c*s.x+2*c*h*o.x+h*h*a.x,c*c*s.y+2*c*h*o.y+h*h*a.y,c*c*s.z+2*c*h*o.z+h*h*a.z);i.push(d)}return i}_calculateCubicBezier(e){if(e.length<4)return e;let i=[],[s,o,a,n]=e;for(let h=0;h<=this.resolution;h++){let c=h/this.resolution,d=1-c,p=new r.Cartesian3(d*d*d*s.x+3*d*d*c*o.x+3*d*c*c*a.x+c*c*c*n.x,d*d*d*s.y+3*d*d*c*o.y+3*d*c*c*a.y+c*c*c*n.y,d*d*d*s.z+3*d*d*c*o.z+3*d*c*c*a.z+c*c*c*n.z);i.push(p)}return i}_calculateMultiSegmentBezier(e){return e.length<4?e.length===3?this._calculateQuadraticBezier(e):this._calculateLinear(e):this._calculateContinuousCubicBezier(e)}_calculateContinuousCubicBezier(e){if(e.length<4)return this._calculateQuadraticBezier(e.slice(0,3));let i=[];if(e.length===4)return this._calculateCubicBezier(e);let s=e,o=s.length-1;for(let a=0;a<o;a++){let n=s[Math.max(0,a-1)],h=s[a],c=s[a+1],d=s[Math.min(s.length-1,a+2)],p=this._generateBezierControlPoints(n,h,c,d),f=this._calculateCubicBezier(p),g=a===0?0:1;i.push(...f.slice(g))}return i}_generateBezierControlPoints(e,i,s,o){let n=new r.Cartesian3(.5*(s.x-e.x),.5*(s.y-e.y),.5*(s.z-e.z)),h=new r.Cartesian3(.5*(o.x-i.x),.5*(o.y-i.y),.5*(o.z-i.z)),c=new r.Cartesian3(i.x+n.x/3,i.y+n.y/3,i.z+n.z/3),d=new r.Cartesian3(s.x-h.x/3,s.y-h.y/3,s.z-h.z/3);return[i,c,d,s]}_calculateCardinalSpline(e){if(e.length<3)return this._calculateLinear(e);let i=[],s=.5,o=[e[0],...e,e[e.length-1]];for(let a=1;a<o.length-2;a++){let n=o[a-1],h=o[a],c=o[a+1],d=o[a+2];for(let p=0;p<=1;p+=1/this.resolution){if(a===1&&p===0){i.push(h);continue}let f=p*p,g=f*p,u=2*g-3*f+1,m=-2*g+3*f,T=g-2*f+p,w=g-f,P=new r.Cartesian3(s*(c.x-n.x),s*(c.y-n.y),s*(c.z-n.z)),M=new r.Cartesian3(s*(d.x-h.x),s*(d.y-h.y),s*(d.z-h.z)),L=new r.Cartesian3(u*h.x+m*c.x+T*P.x+w*M.x,u*h.y+m*c.y+T*P.y+w*M.y,u*h.z+m*c.z+T*P.z+w*M.z);i.push(L)}}return i}_updateCurve(){let e=this._calculateBezierPoints();this._delegate.polyline.positions=e,this.showControlPoints&&this._updateControlPoints()}_updateControlPoints(){if(this._clearControlPoints(),!this.showControlPoints)return;y.transformWGS84ArrayToCartesianArray(this._positions).forEach((i,s)=>{let o=new r.Entity({position:i,point:{...this.controlPointStyle,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:`C${s}`,font:"12pt sans-serif",pixelOffset:new r.Cartesian2(0,-25),fillColor:r.Color.WHITE,outlineColor:r.Color.BLACK,outlineWidth:1,style:r.LabelStyle.FILL_AND_OUTLINE,disableDepthTestDistance:Number.POSITIVE_INFINITY}});this._controlPointEntities.push(o)})}_clearControlPoints(){this._controlPointEntities.forEach(e=>{e&&e.parent&&e.parent.entities.remove(e)}),this._controlPointEntities=[]}_mountedHook(){this.positions=this._positions}setCurveType(e){return this.curveType=e,this._updateCurve(),this}setResolution(e){return this.resolution=Math.max(10,Math.min(1e3,e)),this._updateCurve(),this}setShowControlPoints(e){return this.showControlPoints=e,e?this._updateControlPoints():this._clearControlPoints(),this}setLabel(e,i){if(e){let s=this._calculateBezierPoints();if(s.length>0){let o=Math.floor(s.length/2);this._delegate.label={text:e,position:s[o],...i}}}return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.polyline,e),e.controlPointStyle&&(this.controlPointStyle={...this.controlPointStyle,...e.controlPointStyle},this.showControlPoints&&this._updateControlPoints()),this)}getCurveLength(){let e=this._calculateBezierPoints(),i=0;for(let s=1;s<e.length;s++)i+=r.Cartesian3.distance(e[s-1],e[s]);return i}getPointAtParameter(e){e=Math.max(0,Math.min(1,e));let i=this._calculateBezierPoints(),s=Math.floor(e*(i.length-1));return i[s]||i[i.length-1]}destroy(){var e;this._clearControlPoints(),(e=super.destroy)==null||e.call(this)}};C.registerType("bezier_curve");var qt=ia;var ra=class{static getShapeForPipeline(e={}){let i=e.radius||1,s=e.thicknes||i/3,o=Math.ceil(360/(e.slices||60)),a=e.startAngle||0,n=e.endAngle||a+360,h=e.vscale||1,c=e.hscale||1,d=[];for(let p=a;p<=n;p+=o){let f=r.Math.toRadians(p);d.push({x:i*c*Math.cos(f),y:i*h*Math.sin(f)})}for(let p=n;p>=a;p-=o){let f=r.Math.toRadians(p);d.push({x:(i-s)*c*Math.cos(f),y:(i-s)*h*Math.sin(f)})}return d}static getShapeForCircle(e={}){let i=e.radius||1,s=Math.ceil(360/(e.slices||60)),o=e.startAngle||0,a=e.endAngle||o+360,n=e.vscale||1,h=e.hscale||1,c=[];for(let d=o;d<=a;d+=s){let p=r.Math.toRadians(d);c.push({x:i*h*Math.cos(p),y:i*n*Math.sin(p)})}return c}static getShapeForStar(e={}){console.log(e.slices||6);let i=e.radius||1,s=e.thicknes||i/3,o=e.slices||6,a=e.startAngle||0;console.log(o);let n=r.Math.toRadians(a),h=Math.PI/o,c=2*o,d=new Array(c);for(let p=0;p<c;p++){let f=p%2===0?i:s,g=n+p*h;d[p]=new r.Cartesian2(Math.cos(g)*f,Math.sin(g)*f)}return d}},He=ra;var sa=class l extends C{constructor(e={}){super(),this._positions=v.parsePositions(e.positions||[]);let i=e.shape||e.shapePositions;switch(e.radius=e.radius||10,i){case"pipeline":this._shape=He.getShapeForPipeline(e);break;case"circle":this._shape=He.getShapeForCircle(e);break;case"star":this._shape=He.getShapeForStar(e);break;default:this._shape=i;break}this._delegate=new r.Entity({polylineVolume:{}}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("polyline_volume")}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._delegate.polylineVolume.positions=y.transformWGS84ArrayToCartesianArray(this._positions)}get shape(){return this._shape}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}static fromEntity(e,i){var a;let s,o=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(o)),s=new l(i),s.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(o)}),s}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),x.merge(this._delegate.polylineVolume,e),this)}};C.registerType("polyline_volume");var Gf=sa;var oa=class l extends C{constructor(e={}){super(),e.radius=e.radius||10,e.alpha=e.alpha||.8,e.color=e.color||r.Color.RED,this._alpha=e.alpha,this._color=e.color.withAlpha(this._alpha);let i=e.branches;this._centerRadius=0,i==null||i.forEach(s=>{this._centerRadius=Math.max(this._centerRadius,s.radius)}),this._center=v.parsePosition(e.center),this._type=e.type||i.length>2?"multiway":"elbow",this._instances=[],this._type==="multiway"&&i.length>2?i&&i.forEach(s=>{let o={lat:this._center.lat,lng:this._center.lng,alt:this._center.alt+(this._centerRadius-s.radius)};this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([o,...s.positions]),shapePositions:He.getShapeForPipeline({radius:s.radius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}}))}):this._type==="elbow"&&i.length===2&&this._instances.push(new r.GeometryInstance({geometry:new r.PolylineVolumeGeometry({polylinePositions:y.transformWGS84ArrayToCartesianArray([...i[0].positions.reverse(),this._center,...i[1].positions]),shapePositions:He.getShapeForPipeline({radius:this._centerRadius}),cornerType:r.CornerType.MITERED,vertexFormat:r.PerInstanceColorAppearance.VERTEX_FORMAT}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}})),this._center.alt=this._center.alt+this._centerRadius,this._instances.push(new r.GeometryInstance({geometry:new r.SphereGeometry({radius:this._centerRadius*1.2,stackPartitions:e.slices,slicePartitions:e.slices,vertexFormat:r.VertexFormat.POSITION_AND_NORMAL}),modelMatrix:r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center)),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._color)}})),this._delegate=new r.Primitive({geometryInstances:this._instances,appearance:new r.PerInstanceColorAppearance({flat:!0,faceForward:!0}),asynchronous:!1}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("polyline_adapter")}get center(){return this._center}set center(e){this._center=v.parsePosition(e),this._delegate.modelMatrix=r.Transforms.eastNorthUpToFixedFrame(y.transformWGS84ToCartesian(this._center))}static fromEntity(e,i){var a;let s,o=r.JulianDate.now();return e.polyline&&(i.positions=y.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(o)),s=new l(i),s.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(o)}),s}_mountedHook(){}setLabel(e,i){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,x.merge(this._style,e),e.alpha&&(this._alpha=e.alpha),e.color&&(this._color=e.color.withAlpha(this._alpha),this._instances.forEach(i=>{i.attributes&&i.attributes.color&&(i.attributes.color=r.ColorGeometryInstanceAttribute.fromColor(this._color))})),this)}};C.registerType("polyline_adapter");var Hf=oa;var aa=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=r.GeoJsonDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("geojson")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}_createBillboard(e){return e.position&&e.billboard?Ct.fromEntity(e):null}_createPolyline(e){if(e.polyline)return Tt.fromEntity(e)}_createPolygon(e){if(e.polygon)return xt.fromEntity(e)}_createModel(e,i){if(e)return no.fromEntity(e,i)}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(a=>{e.call(i,a)})}),this}toVectorLayer(){let e=new rt(this.id);return this.eachOverlay(i=>{i.billboard?e.addOverlay(this._createBillboard(i)):i.polyline?e.addOverlay(this._createPolyline(i)):i.polygon&&e.addOverlay(this._createPolygon(i))},this),e}toModelLayer(e){let i=new rt(this.id);return this.eachOverlay(s=>{i.addOverlay(this._createModel(s,e))},this),i}};I.registerType("geojson");var Xt=aa;var na=class extends I{constructor(e,i,s={}){if(!i)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=r.KmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("gpx")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(a=>{e.call(i,a)})}),this}};I.registerType("gpx");var Bf=na;var Uf={radialColor:r.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:r.Color.YELLOW,weftColor:r.Color.WHITE,weftWidth:2},la=class extends I{constructor(e,i){super(e),this._options={...Uf,...i},this._delegate=new r.CustomDataSource(e),this._state=_.INITIALIZED}get type(){return I.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray([e*10,89.5,e*10,-89.5]),material:this._options.radialColor,width:this._options.radialWidth},show:this._options.showRadial}),this._delegate.entities.add({position:r.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let i=[];for(let s=0;s<129;s++)i.push(-180+s*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:r.Cartesian3.fromDegreesArray(i),material:this._options.weftColor,width:this._options.weftWidth}})}}};I.registerType("graticule");var Vf=la;var ha=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._isGround=!0,this._state=_.INITIALIZED}get type(){return I.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("ground_primitive");var Zf=ha;var Zc=[].indexOf||function(l){for(let e=0,i=this.length;e<i;e++)if(e in this&&this[e]===l)return e;return-1},Jt=`attribute vec4 position;
|
|
254
254
|
varying vec2 texcoord;
|
|
255
255
|
void main(){
|
|
256
256
|
texcoord = position.xy*0.5+0.5;
|
|
257
257
|
gl_Position = position;
|
|
258
|
-
}`,
|
|
258
|
+
}`,Qt=`#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
259
259
|
precision highp int;
|
|
260
260
|
precision highp float;
|
|
261
261
|
#else
|
|
@@ -263,13 +263,13 @@ void main(){
|
|
|
263
263
|
precision mediump float;
|
|
264
264
|
#endif
|
|
265
265
|
uniform sampler2D source;
|
|
266
|
-
varying vec2 texcoord;`,
|
|
266
|
+
varying vec2 texcoord;`,jf=function(){let l,e,i,s;if(window.WebGLRenderingContext!=null)return s=["WEBKIT","MOZ","MS","O"],i=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,l=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(o){let a,n,h,c,d;if(n=o.match(i),n!==null&&(o=n[1]),a=l.call(this,o),a===null){for(c=0,d=s.length;c<d;c++)if(h=s[c],a=l.call(this,h+"_"+o),a!==null)return a;return null}else return a},e=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let o,a,n,h,c,d;for(h=e.call(this),n=[],c=0,d=h.length;c<d;c++)o=h[c],a=o.match(i),a!==null&&(o=a[1]),Zc.call(n,o)<0&&n.push(o);return n}},Yf=function(){let l,e,i,s,o,a,n,h,c,d,p,f,g,u;if(o=function(){let m,T,w;return m=document.createElement("canvas"),m.width=2,m.height=2,T=m.getContext("2d"),w=T.getImageData(0,0,2,2),w.data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),T.putImageData(w,0,0),m},o(),e=function(m,T){let w,P,M,L,S,R,B,A,O,F,N,G,te,Pe;if(R=m.createProgram(),te=m.createShader(m.VERTEX_SHADER),m.attachShader(R,te),m.shaderSource(te,`attribute vec2 position;
|
|
267
267
|
void main(){
|
|
268
268
|
gl_Position = vec4(position, 0.0, 1.0);
|
|
269
|
-
}`),m.compileShader(te),!m.getShaderParameter(te,m.COMPILE_STATUS))throw m.getShaderInfoLog(te);if(
|
|
269
|
+
}`),m.compileShader(te),!m.getShaderParameter(te,m.COMPILE_STATUS))throw m.getShaderInfoLog(te);if(M=m.createShader(m.FRAGMENT_SHADER),m.attachShader(R,M),m.shaderSource(M,`uniform sampler2D source;
|
|
270
270
|
void main(){
|
|
271
271
|
gl_FragColor = texture2D(source, vec2(1.0, 1.0));
|
|
272
|
-
}`),m.compileShader(b),!m.getShaderParameter(b,m.COMPILE_STATUS))throw m.getShaderInfoLog(b);if(m.linkProgram(R),!m.getProgramParameter(R,m.LINK_STATUS))throw m.getProgramInfoLog(R);return m.useProgram(R),P=function(){return m.deleteShader(b),m.deleteShader(te),m.deleteProgram(R),m.deleteBuffer(w),m.deleteTexture(O),m.deleteTexture(H),m.deleteFramebuffer(L),m.bindBuffer(m.ARRAY_BUFFER,null),m.useProgram(null),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null)},H=m.createTexture(),m.bindTexture(m.TEXTURE_2D,H),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,m.UNSIGNED_BYTE,null),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),L=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,L),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,H,0),F=a(),O=m.createTexture(),m.bindTexture(m.TEXTURE_2D,O),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,E,F),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),Me=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),w=m.createBuffer(),m.bindBuffer(m.ARRAY_BUFFER,w),m.bufferData(m.ARRAY_BUFFER,Me,m.STATIC_DRAW),S=m.getAttribLocation(R,"position"),N=m.getUniformLocation(R,"source"),m.enableVertexAttribArray(S),m.vertexAttribPointer(S,2,m.FLOAT,!1,0,0),m.uniform1i(N,0),m.drawArrays(m.TRIANGLES,0,6),W=new Uint8Array(4*4),m.readPixels(0,0,2,2,m.RGBA,m.UNSIGNED_BYTE,W),A=Math.abs(W[0]-127)<10,P(),A},s=function(m,E){let w;return w=m.createTexture(),m.bindTexture(m.TEXTURE_2D,w),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),m.getError()===0?(m.deleteTexture(w),!0):(m.deleteTexture(w),!1)},l=function(m,E){let w,P,b;return b=m.createTexture(),m.bindTexture(m.TEXTURE_2D,b),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),P=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,P),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,b,0),w=m.checkFramebufferStatus(m.FRAMEBUFFER),m.deleteTexture(b),m.deleteFramebuffer(P),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null),w===m.FRAMEBUFFER_COMPLETE},c=[],d={},p=[],i=function(){let m,E,w,P,b,L,S;m=document.createElement("canvas"),w=null;try{w=m.getContext("experimental-webgl"),w===null&&(w=m.getContext("webgl"))}catch{}if(w!=null&&(L=w.getExtension("OES_texture_float"),L===null?s(w,w.FLOAT)?(S=!0,c.push("OES_texture_float"),d.OES_texture_float={shim:!0}):(S=!1,p.push("OES_texture_float")):s(w,w.FLOAT)?(S=!0,c.push("OES_texture_float")):(S=!1,p.push("OES_texture_float")),S&&(E=w.getExtension("WEBGL_color_buffer_float"),E===null?l(w,w.FLOAT)?(c.push("WEBGL_color_buffer_float"),d.WEBGL_color_buffer_float={shim:!0,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("WEBGL_color_buffer_float"):l(w,w.FLOAT)?c.push("WEBGL_color_buffer_float"):p.push("WEBGL_color_buffer_float"),E=w.getExtension("OES_texture_float_linear"),E===null?e(w,w.FLOAT)?(c.push("OES_texture_float_linear"),d.OES_texture_float_linear={shim:!0}):p.push("OES_texture_float_linear"):e(w,w.FLOAT)?c.push("OES_texture_float_linear"):p.push("OES_texture_float_linear")),P=w.getExtension("OES_texture_half_float"),P===null?s(w,36193)?(b=!0,c.push("OES_texture_half_float"),P=d.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(b=!1,p.push("OES_texture_half_float")):s(w,P.HALF_FLOAT_OES)?(b=!0,c.push("OES_texture_half_float")):(b=!1,p.push("OES_texture_half_float")),b))return E=w.getExtension("EXT_color_buffer_half_float"),E===null?l(w,P.HALF_FLOAT_OES)?(c.push("EXT_color_buffer_half_float"),d.EXT_color_buffer_half_float={shim:!0,RGBA16F_EXT:34842,RGB16F_EXT:34843,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("EXT_color_buffer_half_float"):l(w,P.HALF_FLOAT_OES)?c.push("EXT_color_buffer_half_float"):p.push("EXT_color_buffer_half_float"),E=w.getExtension("OES_texture_half_float_linear"),E===null?e(w,P.HALF_FLOAT_OES)?(c.push("OES_texture_half_float_linear"),d.OES_texture_half_float_linear={shim:!0}):p.push("OES_texture_half_float_linear"):e(w,P.HALF_FLOAT_OES)?c.push("OES_texture_half_float_linear"):p.push("OES_texture_half_float_linear")},window.WebGLRenderingContext!=null){for(i(),f={},g=0,u=p.length;g<u;g++)h=p[g],f[h]=!0;return o=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(m){let E;return E=d[m],E===void 0?f[m]?null:o.call(this,m):E},n=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let m,E,w,P,b,L,S;for(w=n.call(this),E=[],P=0,L=w.length;P<L;P++)m=w[P],f[m]===void 0&&E.push(m);for(b=0,S=c.length;b<S;b++)m=c[b],Td.call(E,m)<0&&E.push(m);return E},WebGLRenderingContext.prototype.getFloatExtension=function(m){let E,w,P,b,L,S,R,W,A,O,F,N,H,te,Me,be,Ae,Mt,cl,dl,pl,ml,Yi,ul,qi,Xi;for(m.prefer==null&&(m.prefer=["half"]),m.require==null&&(m.require=[]),m.throws==null&&(m.throws=!0),te=this.getExtension("OES_texture_float"),S=this.getExtension("OES_texture_half_float"),N=this.getExtension("WEBGL_color_buffer_float"),b=this.getExtension("EXT_color_buffer_half_float"),H=this.getExtension("OES_texture_float_linear"),L=this.getExtension("OES_texture_half_float_linear"),F={texture:te!==null,filterable:H!==null,renderable:N!==null,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},P={texture:S!==null,filterable:L!==null,renderable:b!==null,score:0,precision:"half",half:!0,single:!1,type:(ul=S!=null?S.HALF_FLOAT_OES:void 0)!=null?ul:null},w=[],F.texture&&w.push(F),P.texture&&w.push(P),O=[],be=0,cl=w.length;be<cl;be++){for(E=w[be],Me=!0,qi=m.require,Ae=0,dl=qi.length;Ae<dl;Ae++)h=qi[Ae],E[h]===!1&&(Me=!1);Me&&O.push(E)}for(Mt=0,pl=O.length;Mt<pl;Mt++)for(E=O[Mt],Xi=m.prefer,R=Yi=0,ml=Xi.length;Yi<ml;R=++Yi)A=Xi[R],W=Math.pow(2,m.prefer.length-R-1),E[A]&&(E.score+=W);if(O.sort(function(Ji,Qi){if(Ji.score===Qi.score)return 0;if(Ji.score<Qi.score)return 1;if(Ji.score>Qi.score)return-1}),O.length===0){if(m.throws)throw"No floating point texture support that is "+m.require.join(", ");return null}else return O=O[0],{filterable:O.filterable,renderable:O.renderable,type:O.type,precision:O.precision}}}};b_();A_();var Pt=function(){function l(e,i){let s,a;this.gl=e,a=i.vertex,s=i.fragment,this.program=this.gl.createProgram(),this.vs=this.gl.createShader(this.gl.VERTEX_SHADER),this.fs=this.gl.createShader(this.gl.FRAGMENT_SHADER),this.gl.attachShader(this.program,this.vs),this.gl.attachShader(this.program,this.fs),this.compileShader(this.vs,a),this.compileShader(this.fs,s),this.link(),this.value_cache={},this.uniform_cache={},this.attribCache={}}return l.prototype.attribLocation=function(e){let i=this.attribCache[e];return i===void 0&&(i=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),i},l.prototype.compileShader=function(e,i){if(this.gl.shaderSource(e,i),this.gl.compileShader(e),!this.gl.getShaderParameter(e,this.gl.COMPILE_STATUS))throw"Shader Compile Error: "+this.gl.getShaderInfoLog(e)},l.prototype.link=function(){if(this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw"Shader Link Error: "+this.gl.getProgramInfoLog(this.program)},l.prototype.use=function(){return this.gl.useProgram(this.program),this},l.prototype.uniformLoc=function(e){let i=this.uniform_cache[e];return i===void 0&&(i=this.uniform_cache[e]=this.gl.getUniformLocation(this.program,e)),i},l.prototype.int=function(e,i){let s,a;return s=this.value_cache[e],s!==i&&(this.value_cache[e]=i,a=this.uniformLoc(e),a&&this.gl.uniform1i(a,i)),this},l.prototype.vec2=function(e,i,s){let a;return a=this.uniformLoc(e),a&&this.gl.uniform2f(a,i,s),this},l.prototype.float=function(e,i){let s,a;return s=this.value_cache[e],s!==i&&(this.value_cache[e]=i,a=this.uniformLoc(e),a&&this.gl.uniform1f(a,i)),this},l}(),S_=function(){function l(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return l.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},l.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},l.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},l.prototype.check=function(){let e;switch(e=this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER),e){case this.gl.FRAMEBUFFER_UNSUPPORTED:throw"Framebuffer is unsupported";case this.gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Framebuffer incomplete attachment";case this.gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Framebuffer incomplete dimensions";case this.gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Framebuffer incomplete missing attachment"}return this},l.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},l.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},l.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},l}(),Ed=function(){function l(e,i){let s,a;switch(this.gl=e,i==null&&(i={}),this.channels=this.gl[((s=i.channels)!=null?s:"rgba").toUpperCase()],typeof i.type=="number"?this.type=i.type:this.type=this.gl[((a=i.type)!=null?a:"unsigned_byte").toUpperCase()],this.channels){case this.gl.RGBA:this.chancount=4;break;case this.gl.RGB:this.chancount=3;break;case this.gl.LUMINANCE_ALPHA:this.chancount=2;break;default:this.chancount=1}this.target=this.gl.TEXTURE_2D,this.handle=this.gl.createTexture()}return l.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},l.prototype.bind=function(e){if(e==null&&(e=0),e>15)throw"Texture unit too large: "+e;return this.gl.activeTexture(this.gl.TEXTURE0+e),this.gl.bindTexture(this.target,this.handle),this},l.prototype.setSize=function(e,i){return this.width=e,this.height=i,this.gl.texImage2D(this.target,0,this.channels,this.width,this.height,0,this.channels,this.type,null),this},l.prototype.upload=function(e){return this.width=e.width,this.height=e.height,this.gl.texImage2D(this.target,0,this.channels,this.channels,this.type,e),this},l.prototype.linear=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this},l.prototype.nearest=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this},l.prototype.clampToEdge=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this},l.prototype.repeat=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.REPEAT),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.REPEAT),this},l}(),Cd=function(){function l(e,i,s){let a;this.gl=e,this.width=i,this.height=s,a=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new Ed(this.gl,{type:a.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new S_(this.gl).bind().color(this.texture).unbind()}return l.prototype.use=function(){return this.fbo.bind()},l.prototype.bind=function(e){return this.texture.bind(e)},l.prototype.end=function(){return this.fbo.unbind()},l.prototype.resize=function(e,i){return this.width=e,this.height=i,this.texture.bind(0).setSize(this.width,this.height)},l}(),I_=function(){function l(e,i,s,a){let o,n,h;for(this.heatmap=e,this.gl=i,this.width=s,this.height=a,this.shader=new Pt(this.gl,{vertex:`attribute vec4 position, intensity;
|
|
272
|
+
}`),m.compileShader(M),!m.getShaderParameter(M,m.COMPILE_STATUS))throw m.getShaderInfoLog(M);if(m.linkProgram(R),!m.getProgramParameter(R,m.LINK_STATUS))throw m.getProgramInfoLog(R);return m.useProgram(R),P=function(){return m.deleteShader(M),m.deleteShader(te),m.deleteProgram(R),m.deleteBuffer(w),m.deleteTexture(O),m.deleteTexture(G),m.deleteFramebuffer(L),m.bindBuffer(m.ARRAY_BUFFER,null),m.useProgram(null),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null)},G=m.createTexture(),m.bindTexture(m.TEXTURE_2D,G),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,m.UNSIGNED_BYTE,null),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),L=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,L),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,G,0),F=o(),O=m.createTexture(),m.bindTexture(m.TEXTURE_2D,O),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,T,F),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),Pe=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),w=m.createBuffer(),m.bindBuffer(m.ARRAY_BUFFER,w),m.bufferData(m.ARRAY_BUFFER,Pe,m.STATIC_DRAW),S=m.getAttribLocation(R,"position"),N=m.getUniformLocation(R,"source"),m.enableVertexAttribArray(S),m.vertexAttribPointer(S,2,m.FLOAT,!1,0,0),m.uniform1i(N,0),m.drawArrays(m.TRIANGLES,0,6),B=new Uint8Array(4*4),m.readPixels(0,0,2,2,m.RGBA,m.UNSIGNED_BYTE,B),A=Math.abs(B[0]-127)<10,P(),A},s=function(m,T){let w;return w=m.createTexture(),m.bindTexture(m.TEXTURE_2D,w),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,T,null),m.getError()===0?(m.deleteTexture(w),!0):(m.deleteTexture(w),!1)},l=function(m,T){let w,P,M;return M=m.createTexture(),m.bindTexture(m.TEXTURE_2D,M),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,T,null),P=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,P),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,M,0),w=m.checkFramebufferStatus(m.FRAMEBUFFER),m.deleteTexture(M),m.deleteFramebuffer(P),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null),w===m.FRAMEBUFFER_COMPLETE},c=[],d={},p=[],i=function(){let m,T,w,P,M,L,S;m=document.createElement("canvas"),w=null;try{w=m.getContext("experimental-webgl"),w===null&&(w=m.getContext("webgl"))}catch{}if(w!=null&&(L=w.getExtension("OES_texture_float"),L===null?s(w,w.FLOAT)?(S=!0,c.push("OES_texture_float"),d.OES_texture_float={shim:!0}):(S=!1,p.push("OES_texture_float")):s(w,w.FLOAT)?(S=!0,c.push("OES_texture_float")):(S=!1,p.push("OES_texture_float")),S&&(T=w.getExtension("WEBGL_color_buffer_float"),T===null?l(w,w.FLOAT)?(c.push("WEBGL_color_buffer_float"),d.WEBGL_color_buffer_float={shim:!0,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("WEBGL_color_buffer_float"):l(w,w.FLOAT)?c.push("WEBGL_color_buffer_float"):p.push("WEBGL_color_buffer_float"),T=w.getExtension("OES_texture_float_linear"),T===null?e(w,w.FLOAT)?(c.push("OES_texture_float_linear"),d.OES_texture_float_linear={shim:!0}):p.push("OES_texture_float_linear"):e(w,w.FLOAT)?c.push("OES_texture_float_linear"):p.push("OES_texture_float_linear")),P=w.getExtension("OES_texture_half_float"),P===null?s(w,36193)?(M=!0,c.push("OES_texture_half_float"),P=d.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(M=!1,p.push("OES_texture_half_float")):s(w,P.HALF_FLOAT_OES)?(M=!0,c.push("OES_texture_half_float")):(M=!1,p.push("OES_texture_half_float")),M))return T=w.getExtension("EXT_color_buffer_half_float"),T===null?l(w,P.HALF_FLOAT_OES)?(c.push("EXT_color_buffer_half_float"),d.EXT_color_buffer_half_float={shim:!0,RGBA16F_EXT:34842,RGB16F_EXT:34843,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863}):p.push("EXT_color_buffer_half_float"):l(w,P.HALF_FLOAT_OES)?c.push("EXT_color_buffer_half_float"):p.push("EXT_color_buffer_half_float"),T=w.getExtension("OES_texture_half_float_linear"),T===null?e(w,P.HALF_FLOAT_OES)?(c.push("OES_texture_half_float_linear"),d.OES_texture_half_float_linear={shim:!0}):p.push("OES_texture_half_float_linear"):e(w,P.HALF_FLOAT_OES)?c.push("OES_texture_half_float_linear"):p.push("OES_texture_half_float_linear")},window.WebGLRenderingContext!=null){for(i(),f={},g=0,u=p.length;g<u;g++)h=p[g],f[h]=!0;return a=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(m){let T;return T=d[m],T===void 0?f[m]?null:a.call(this,m):T},n=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let m,T,w,P,M,L,S;for(w=n.call(this),T=[],P=0,L=w.length;P<L;P++)m=w[P],f[m]===void 0&&T.push(m);for(M=0,S=c.length;M<S;M++)m=c[M],Zc.call(T,m)<0&&T.push(m);return T},WebGLRenderingContext.prototype.getFloatExtension=function(m){let T,w,P,M,L,S,R,B,A,O,F,N,G,te,Pe,be,Me,Pt,Tl,El,Pl,bl,Wi,Ml,Gi,Hi;for(m.prefer==null&&(m.prefer=["half"]),m.require==null&&(m.require=[]),m.throws==null&&(m.throws=!0),te=this.getExtension("OES_texture_float"),S=this.getExtension("OES_texture_half_float"),N=this.getExtension("WEBGL_color_buffer_float"),M=this.getExtension("EXT_color_buffer_half_float"),G=this.getExtension("OES_texture_float_linear"),L=this.getExtension("OES_texture_half_float_linear"),F={texture:te!==null,filterable:G!==null,renderable:N!==null,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},P={texture:S!==null,filterable:L!==null,renderable:M!==null,score:0,precision:"half",half:!0,single:!1,type:(Ml=S!=null?S.HALF_FLOAT_OES:void 0)!=null?Ml:null},w=[],F.texture&&w.push(F),P.texture&&w.push(P),O=[],be=0,Tl=w.length;be<Tl;be++){for(T=w[be],Pe=!0,Gi=m.require,Me=0,El=Gi.length;Me<El;Me++)h=Gi[Me],T[h]===!1&&(Pe=!1);Pe&&O.push(T)}for(Pt=0,Pl=O.length;Pt<Pl;Pt++)for(T=O[Pt],Hi=m.prefer,R=Wi=0,bl=Hi.length;Wi<bl;R=++Wi)A=Hi[R],B=Math.pow(2,m.prefer.length-R-1),T[A]&&(T.score+=B);if(O.sort(function(Bi,Ui){if(Bi.score===Ui.score)return 0;if(Bi.score<Ui.score)return 1;if(Bi.score>Ui.score)return-1}),O.length===0){if(m.throws)throw"No floating point texture support that is "+m.require.join(", ");return null}else return O=O[0],{filterable:O.filterable,renderable:O.renderable,type:O.type,precision:O.precision}}}};jf();Yf();var Et=function(){function l(e,i){let s,o;this.gl=e,o=i.vertex,s=i.fragment,this.program=this.gl.createProgram(),this.vs=this.gl.createShader(this.gl.VERTEX_SHADER),this.fs=this.gl.createShader(this.gl.FRAGMENT_SHADER),this.gl.attachShader(this.program,this.vs),this.gl.attachShader(this.program,this.fs),this.compileShader(this.vs,o),this.compileShader(this.fs,s),this.link(),this.value_cache={},this.uniform_cache={},this.attribCache={}}return l.prototype.attribLocation=function(e){let i=this.attribCache[e];return i===void 0&&(i=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),i},l.prototype.compileShader=function(e,i){if(this.gl.shaderSource(e,i),this.gl.compileShader(e),!this.gl.getShaderParameter(e,this.gl.COMPILE_STATUS))throw"Shader Compile Error: "+this.gl.getShaderInfoLog(e)},l.prototype.link=function(){if(this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))throw"Shader Link Error: "+this.gl.getProgramInfoLog(this.program)},l.prototype.use=function(){return this.gl.useProgram(this.program),this},l.prototype.uniformLoc=function(e){let i=this.uniform_cache[e];return i===void 0&&(i=this.uniform_cache[e]=this.gl.getUniformLocation(this.program,e)),i},l.prototype.int=function(e,i){let s,o;return s=this.value_cache[e],s!==i&&(this.value_cache[e]=i,o=this.uniformLoc(e),o&&this.gl.uniform1i(o,i)),this},l.prototype.vec2=function(e,i,s){let o;return o=this.uniformLoc(e),o&&this.gl.uniform2f(o,i,s),this},l.prototype.float=function(e,i){let s,o;return s=this.value_cache[e],s!==i&&(this.value_cache[e]=i,o=this.uniformLoc(e),o&&this.gl.uniform1f(o,i)),this},l}(),qf=function(){function l(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return l.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},l.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},l.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},l.prototype.check=function(){let e;switch(e=this.gl.checkFramebufferStatus(this.gl.FRAMEBUFFER),e){case this.gl.FRAMEBUFFER_UNSUPPORTED:throw"Framebuffer is unsupported";case this.gl.FRAMEBUFFER_INCOMPLETE_ATTACHMENT:throw"Framebuffer incomplete attachment";case this.gl.FRAMEBUFFER_INCOMPLETE_DIMENSIONS:throw"Framebuffer incomplete dimensions";case this.gl.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:throw"Framebuffer incomplete missing attachment"}return this},l.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},l.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},l.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},l}(),jc=function(){function l(e,i){let s,o;switch(this.gl=e,i==null&&(i={}),this.channels=this.gl[((s=i.channels)!=null?s:"rgba").toUpperCase()],typeof i.type=="number"?this.type=i.type:this.type=this.gl[((o=i.type)!=null?o:"unsigned_byte").toUpperCase()],this.channels){case this.gl.RGBA:this.chancount=4;break;case this.gl.RGB:this.chancount=3;break;case this.gl.LUMINANCE_ALPHA:this.chancount=2;break;default:this.chancount=1}this.target=this.gl.TEXTURE_2D,this.handle=this.gl.createTexture()}return l.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},l.prototype.bind=function(e){if(e==null&&(e=0),e>15)throw"Texture unit too large: "+e;return this.gl.activeTexture(this.gl.TEXTURE0+e),this.gl.bindTexture(this.target,this.handle),this},l.prototype.setSize=function(e,i){return this.width=e,this.height=i,this.gl.texImage2D(this.target,0,this.channels,this.width,this.height,0,this.channels,this.type,null),this},l.prototype.upload=function(e){return this.width=e.width,this.height=e.height,this.gl.texImage2D(this.target,0,this.channels,this.channels,this.type,e),this},l.prototype.linear=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.LINEAR),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.LINEAR),this},l.prototype.nearest=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.target,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this},l.prototype.clampToEdge=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this},l.prototype.repeat=function(){return this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_S,this.gl.REPEAT),this.gl.texParameteri(this.target,this.gl.TEXTURE_WRAP_T,this.gl.REPEAT),this},l}(),Vc=function(){function l(e,i,s){let o;this.gl=e,this.width=i,this.height=s,o=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new jc(this.gl,{type:o.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new qf(this.gl).bind().color(this.texture).unbind()}return l.prototype.use=function(){return this.fbo.bind()},l.prototype.bind=function(e){return this.texture.bind(e)},l.prototype.end=function(){return this.fbo.unbind()},l.prototype.resize=function(e,i){return this.width=e,this.height=i,this.texture.bind(0).setSize(this.width,this.height)},l}(),Xf=function(){function l(e,i,s,o){let a,n,h;for(this.heatmap=e,this.gl=i,this.width=s,this.height=o,this.shader=new Et(this.gl,{vertex:`attribute vec4 position, intensity;
|
|
273
273
|
varying vec2 off, dim;
|
|
274
274
|
varying float vIntensity;
|
|
275
275
|
uniform vec2 viewport;
|
|
@@ -293,13 +293,13 @@ void main(){
|
|
|
293
293
|
float falloff = (1.0 - smoothstep(0.0, 1.0, length(off/dim)));
|
|
294
294
|
float intensity = falloff*vIntensity;
|
|
295
295
|
gl_FragColor = vec4(intensity);
|
|
296
|
-
}`}),this.clampShader=new
|
|
296
|
+
}`}),this.clampShader=new Et(this.gl,{vertex:Jt,fragment:Qt+`uniform float low, high;
|
|
297
297
|
void main(){
|
|
298
298
|
gl_FragColor = vec4(clamp(texture2D(source, texcoord).rgb, low, high), 1.0);
|
|
299
|
-
}`}),this.multiplyShader=new
|
|
299
|
+
}`}),this.multiplyShader=new Et(this.gl,{vertex:Jt,fragment:Qt+`uniform float value;
|
|
300
300
|
void main(){
|
|
301
301
|
gl_FragColor = vec4(texture2D(source, texcoord).rgb*value, 1.0);
|
|
302
|
-
}`}),this.blurShader=new
|
|
302
|
+
}`}),this.blurShader=new Et(this.gl,{vertex:Jt,fragment:Qt+`uniform vec2 viewport;
|
|
303
303
|
void main(){
|
|
304
304
|
vec4 result = vec4(0.0);
|
|
305
305
|
for(int x=-1; x<=1; x++){
|
|
@@ -311,7 +311,7 @@ void main(){
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
gl_FragColor = vec4(result.rgb/result.w, 1.0);
|
|
314
|
-
}`}),this.nodeBack=new
|
|
314
|
+
}`}),this.nodeBack=new Vc(this.gl,this.width,this.height),this.nodeFront=new Vc(this.gl,this.width,this.height),this.vertexBuffer=this.gl.createBuffer(),this.vertexSize=8,this.maxPointCount=1024*10,this.vertexBufferData=new Float32Array(this.maxPointCount*this.vertexSize*6),this.vertexBufferViews=[],a=n=0,h=this.maxPointCount;0<=h?n<h:n>h;a=0<=h?++n:--n)this.vertexBufferViews.push(new Float32Array(this.vertexBufferData.buffer,0,a*this.vertexSize*6));this.bufferIndex=0,this.pointCount=0}return l.prototype.resize=function(e,i){return this.width=e,this.height=i,this.nodeBack.resize(this.width,this.height),this.nodeFront.resize(this.width,this.height)},l.prototype.update=function(){var e,i;if(this.pointCount>0)return this.gl.enable(this.gl.BLEND),this.nodeFront.use(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.vertexBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.vertexBufferViews[this.pointCount],this.gl.STREAM_DRAW),i=this.shader.attribLocation("position"),e=this.shader.attribLocation("intensity"),this.gl.enableVertexAttribArray(1),this.gl.vertexAttribPointer(i,4,this.gl.FLOAT,!1,8*4,0),this.gl.vertexAttribPointer(e,4,this.gl.FLOAT,!1,8*4,4*4),this.shader.use().vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,this.pointCount*6),this.gl.disableVertexAttribArray(1),this.pointCount=0,this.bufferIndex=0,this.nodeFront.end(),this.gl.disable(this.gl.BLEND)},l.prototype.clear=function(){return this.nodeFront.use(),this.gl.clearColor(0,0,0,1),this.gl.clear(this.gl.COLOR_BUFFER_BIT),this.nodeFront.end()},l.prototype.clamp=function(e,i){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.clampShader.use().int("source",0).float("low",e).float("high",i),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},l.prototype.multiply=function(e){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.multiplyShader.use().int("source",0).float("value",e),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},l.prototype.blur=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.heatmap.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.nodeFront.bind(0),this.nodeBack.use(),this.blurShader.use().int("source",0).vec2("viewport",this.width,this.height),this.gl.drawArrays(this.gl.TRIANGLES,0,6),this.nodeBack.end(),this.swap()},l.prototype.swap=function(){let e=this.nodeFront;return this.nodeFront=this.nodeBack,this.nodeBack=e},l.prototype.addVertex=function(e,i,s,o,a){return this.vertexBufferData[this.bufferIndex++]=e,this.vertexBufferData[this.bufferIndex++]=i,this.vertexBufferData[this.bufferIndex++]=s,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=a,this.vertexBufferData[this.bufferIndex++]=a,this.vertexBufferData[this.bufferIndex++]=a,this.vertexBufferData[this.bufferIndex++]=a},l.prototype.addPoint=function(e,i,s,o){let a;return s==null&&(s=50),o==null&&(o=.2),this.pointCount>=this.maxPointCount-1&&this.update(),i=this.height-i,a=s/2,this.addVertex(e,i,-a,-a,o),this.addVertex(e,i,+a,-a,o),this.addVertex(e,i,-a,+a,o),this.addVertex(e,i,-a,+a,o),this.addVertex(e,i,+a,-a,o),this.addVertex(e,i,+a,+a,o),this.pointCount+=1},l}(),Jf=function(){function l(e){let i,s,o,a,n,h,c,d,p,f,g,u,m;u=e!=null?e:{},this.canvas=u.canvas,this.width=u.width,this.height=u.height,d=u.intensityToAlpha,h=u.gradientTexture,s=u.alphaRange,this.canvas||(this.canvas=document.createElement("canvas"));try{if(this.gl=this.canvas.getContext("experimental-webgl",{depth:!1,antialias:!1}),this.gl===null&&(this.gl=this.canvas.getContext("webgl",{depth:!1,antialias:!1}),this.gl===null))throw"WebGL not supported"}catch(T){throw a=T,"WebGL not supported"}window.WebGLDebugUtils!=null&&(this.gl=window.WebGLDebugUtils.makeDebugContext(this.gl,function(T,w,P){throw window.WebGLDebugUtils.glEnumToString(T)+" was caused by call to: "+w})),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),h?(g=this.gradientTexture=new jc(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),typeof h=="string"?(c=new Image,c.onload=function(){return g.bind().upload(c)},c.src=h):h.width>0&&h.height>0?g.upload(h):h.onload=function(){return g.upload(h)},n=`uniform sampler2D gradientTexture;
|
|
315
315
|
vec3 getColor(float intensity){
|
|
316
316
|
return texture2D(gradientTexture, vec2(intensity, 0.0)).rgb;
|
|
317
317
|
}`):(g=null,n=`vec3 getColor(float intensity){
|
|
@@ -329,12 +329,12 @@ vec3 getColor(float intensity){
|
|
|
329
329
|
smoothstep(0.75, 1.0, intensity)*red
|
|
330
330
|
);
|
|
331
331
|
return color;
|
|
332
|
-
}`),d==null&&(d=!0),d?(m=s!=null?s:[0,1],
|
|
333
|
-
float alpha = smoothstep(`+
|
|
332
|
+
}`),d==null&&(d=!0),d?(m=s!=null?s:[0,1],o=m[0],i=m[1],p=`vec4 alphaFun(vec3 color, float intensity){
|
|
333
|
+
float alpha = smoothstep(`+o.toFixed(8)+", "+i.toFixed(8)+`, intensity);
|
|
334
334
|
return vec4(color*alpha, alpha);
|
|
335
335
|
}`):p=`vec4 alphaFun(vec3 color, float intensity){
|
|
336
336
|
return vec4(color, 1.0);
|
|
337
|
-
}`,this.shader=new
|
|
337
|
+
}`,this.shader=new Et(this.gl,{vertex:Jt,fragment:Qt+(`float linstep(float low, float high, float value){
|
|
338
338
|
return clamp((value-low)/(high-low), 0.0, 1.0);
|
|
339
339
|
}
|
|
340
340
|
|
|
@@ -352,11 +352,11 @@ void main(){
|
|
|
352
352
|
float intensity = smoothstep(0.0, 1.0, texture2D(source, texcoord).r);
|
|
353
353
|
vec3 color = getColor(intensity);
|
|
354
354
|
gl_FragColor = alphaFun(color, intensity);
|
|
355
|
-
}`)}),this.width==null&&(this.width=this.canvas.offsetWidth||2),this.height==null&&(this.height=this.canvas.offsetHeight||2),this.canvas.width=this.width,this.canvas.height=this.height,this.gl.viewport(0,0,this.width,this.height),this.quad=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),f=new Float32Array([-1,-1,0,1,1,-1,0,1,-1,1,0,1,-1,1,0,1,1,-1,0,1,1,1,0,1]),this.gl.bufferData(this.gl.ARRAY_BUFFER,f,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.heights=new
|
|
355
|
+
}`)}),this.width==null&&(this.width=this.canvas.offsetWidth||2),this.height==null&&(this.height=this.canvas.offsetHeight||2),this.canvas.width=this.width,this.canvas.height=this.height,this.gl.viewport(0,0,this.width,this.height),this.quad=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),f=new Float32Array([-1,-1,0,1,1,-1,0,1,-1,1,0,1,-1,1,0,1,1,-1,0,1,1,1,0,1]),this.gl.bufferData(this.gl.ARRAY_BUFFER,f,this.gl.STATIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,null),this.heights=new Xf(this,this.gl,this.width,this.height)}return l.prototype.adjustSize=function(){let e,i;if(i=this.canvas.offsetWidth||2,e=this.canvas.offsetHeight||2,this.width!==i||this.height!==e)return this.gl.viewport(0,0,i,e),this.canvas.width=i,this.canvas.height=e,this.width=i,this.height=e,this.heights.resize(this.width,this.height)},l.prototype.display=function(){return this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quad),this.gl.vertexAttribPointer(0,4,this.gl.FLOAT,!1,0,0),this.heights.nodeFront.bind(0),this.gradientTexture&&this.gradientTexture.bind(1),this.shader.use().int("source",0).int("gradientTexture",1),this.gl.drawArrays(this.gl.TRIANGLES,0,6)},l.prototype.update=function(){return this.heights.update()},l.prototype.clear=function(){return this.heights.clear()},l.prototype.clamp=function(e,i){return e==null&&(e=0),i==null&&(i=1),this.heights.clamp(e,i)},l.prototype.multiply=function(e){return e==null&&(e=.95),this.heights.multiply(e)},l.prototype.blur=function(){return this.heights.blur()},l.prototype.addPoint=function(e,i,s,o){return this.heights.addPoint(e,i,s,o)},l.prototype.addPoints=function(e){let i,s,o,a;for(a=[],s=0,o=e.length;s<o;s++)i=e[s],a.push(this.addPoint(i.x,i.y,i.size,i.intensity));return a},l}();function ca(l){return new Jf(l)}var da=new r.WebMercatorProjection,Qf={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},pa=class extends I{constructor(e,i={}){super(e),this._options={...Qf,...i},this._delegate=new r.PrimitiveCollection,this._isGround=this._options.useGround,this._canvas=document.createElement("canvas"),this._canvas.setAttribute("id",e),this._heat=void 0,this._scale=1,this._points=[],this._bounds=new r.Rectangle,this._boundsInMeter=void 0,this._primitive=this._delegate.add(this._isGround?new r.GroundPrimitive({geometryInstances:new r.GeometryInstance({geometry:{}}),classificationType:this._options.classificationType}):new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}})})),this._state=_.INITIALIZED}get type(){return I.getLayerType("heat-map")}_addedHook(){this._canvas.style.cssText=`
|
|
356
356
|
visibility:hidden;
|
|
357
357
|
width:${this._viewer.canvas.width}px;
|
|
358
358
|
height:${this._viewer.canvas.height}px;
|
|
359
|
-
`,this._viewer.layerContainer.appendChild(this._canvas),this._points&&this._points.length&&(this._heat=
|
|
359
|
+
`,this._viewer.layerContainer.appendChild(this._canvas),this._points&&this._points.length&&(this._heat=ca({canvas:this._canvas,gradientTexture:this._createGradientTexture()}),this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update())}_createGradientTexture(){if(!this._options.gradient)return;let e=document.createElement("canvas");e.width=200,e.height=10;let i=e.getContext("2d"),s=i.createLinearGradient(0,0,200,0);for(let o in this._options.gradient)s.addColorStop(+o,this._options.gradient[o]);return i.fillStyle=s,i.fillRect(0,0,200,10),e}_parsePoints(e){return e.map(i=>{let s=da.project(r.Cartographic.fromDegrees(i.lng,i.lat));return{x:(s.x-this._boundsInMeter.west)/this._scale,y:(s.y-this._boundsInMeter.south)/this._scale,size:this._options.radius,intensity:i.value||Math.random()}})}_computeBounds(){r.Rectangle.fromCartographicArray(this._points.map(e=>r.Cartographic.fromDegrees(e.lng,e.lat)),this._bounds)}_computeBoundsInMeter(){let e=da.project(r.Rectangle.southwest(this._bounds)),i=da.project(r.Rectangle.northeast(this._bounds));this._boundsInMeter=new r.Rectangle(e.x,e.y,i.x,i.y)}_update(){if(!this._points||!this._points.length)return!1;this._heat.adjustSize(),this._heat.update(),this._heat.display(),this._primitive&&this._primitive.geometryInstances&&(this._primitive.geometryInstances.geometry=new r.RectangleGeometry({rectangle:this._bounds,height:this._options.height})),this._primitive.appearance=new r.MaterialAppearance({material:new r.Material({fabric:{type:"Heat-Image",uniforms:{image:this._canvas},source:`
|
|
360
360
|
uniform sampler2D image;
|
|
361
361
|
czm_material czm_getMaterial(czm_materialInput materialInput){
|
|
362
362
|
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
@@ -369,7 +369,7 @@ void main(){
|
|
|
369
369
|
material.alpha = colorImage.a;
|
|
370
370
|
return material;
|
|
371
371
|
}
|
|
372
|
-
`},translucent:function(e){return!0}}),flat:!0})}setPoints(e){return this._points=e,this._computeBounds(),this._computeBoundsInMeter(),this._viewer&&(this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat=ao({canvas:this._canvas,gradientTexture:this._createGradientTexture()})),this._heat&&(this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update()),this}clear(){return this._heat.clear(),this._points=[],this._state=_.CLEARED,this}};I.registerType("heat-map");var Pd=no;var lo=class extends I{constructor(e){super(e),this._delegate=D.create("div","html-layer",void 0),this._delegate.setAttribute("id",this._id),this._renderRemoveCallback=void 0,this._state=_.INITIALIZED}get type(){return I.getLayerType("html")}get show(){return this._show}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden",Object.keys(this._cache).forEach(i=>{this._cache[i].show=e})}_onAdd(e){this._viewer=e,this._viewer.layerContainer.appendChild(this._delegate);let i=this._viewer.scene;this._renderRemoveCallback=i.postRender.addEventListener(()=>{let s=this._viewer.camera.positionWC,a=this._viewer.camera.direction,o=this._viewer.getOffset();this.eachOverlay(n=>{if(n&&n.position){let h=y.transformWGS84ToCartesian(n.position),c=i.globe.ellipsoid.geodeticSurfaceNormal(h,new r.Cartesian3),d=r.SceneTransforms.worldToWindowCoordinates(i,h);d&&(d.x+=o.x,d.y+=o.y),n._updateStyle(d,r.Cartesian3.distance(h,s),r.Cartesian3.dot(a,c)<=0)}},this)},this),this._state=_.ADDED}_onRemove(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._delegate),this._state=_.REMOVED}clear(){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);return this._cache={},this._state=_.CLEARED,this}};I.registerType("html");var Md=lo;var ho=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._state=_.INITIALIZED}get type(){return I.getLayerType("i3s")}clear(){return this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("i3s");var bd=ho;var co=class extends I{constructor(e,i,s={}){if(!i)throw new Error("KmlLayer: the url is empty");super(e),this._delegate=r.KmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("kml")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(o=>{e.call(i,o)})}),this}};I.registerType("kml");var Ad=co;var po=class extends I{constructor(e,i=""){super(e),this._dataSource=r.GeoJsonDataSource.load(i),this._delegate=new r.CustomDataSource(e),this._initLabel(),this._state=_.INITIALIZED}get type(){return I.getLayerType("label")}_createLabel(e){if(e.position&&e.name)return ri.fromEntity(e)}_initLabel(){this._dataSource.then(e=>{e.entities.values.forEach(s=>{let a=this._createLabel(s);this.addOverlay(a)})})}};I.registerType("label");var Sd=po;var mo=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._points=this._delegate.add(new r.PointPrimitiveCollection),this._labels=this._delegate.add(new r.LabelCollection),this._billboards=this._delegate.add(new r.BillboardCollection),this._polylines=this._delegate.add(new r.PolylineCollection),this._clouds=this._delegate.add(new r.CloudCollection),this._state=_.INITIALIZED}get type(){return I.getLayerType("primitive")}get points(){return this._points}get labels(){return this._labels}get billboards(){return this._billboards}get polylines(){return this._polylines}get clouds(){return this._clouds}clear(){return this._delegate&&this._delegate.removeAll(),this._points=this._delegate.add(new r.PointPrimitiveCollection),this._labels=this._delegate.add(new r.LabelCollection),this._billboards=this._delegate.add(new r.BillboardCollection),this._polylines=this._delegate.add(new r.PolylineCollection),this._clouds=this._delegate.add(new r.CloudCollection),this._cache={},this._state=_.CLEARED,this}};I.registerType("primitive");var Id=mo;var uo=class extends I{constructor(e,i,s){super(e),this._delegate=r.ImageryLayer.fromProviderAsync(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("raster-tile")}};I.registerType("raster-tile");var Ld=uo;var fo=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._state=_.INITIALIZED}get type(){return I.getLayerType("tileset")}async loadTileset(e,i={}){try{let s=await r.Cesium3DTileset.fromUrl(e,i);return this._delegate.add(s),this._state=_.LOADED,this}catch(s){throw console.error("Failed to load tileset:",s),s}}clear(){return this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("tileset");var li=fo;var _o=class extends Et{constructor(e,i,s={}){if(!i)throw new Error("TopoJsonLayer\uFF1Athe url invalid");super(e,i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("topojson")}};Et.registerType("topojson");var Dd=_o;var go=class extends I{constructor(e){super(e),this._delegate=void 0,this._helpPrimitive=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0,show:!1}),this._state=_.INITIALIZED}get type(){return I.getLayerType("camera_video")}get show(){return this._show}set show(e){this._show=e,Object.keys(this._cache).forEach(i=>{this._cache[i].enabled=this._show})}_onAdd(e){this._viewer=e,this._delegate=this._viewer.scene.postProcessStages,Object.keys(this._cache).forEach(i=>{this._delegate.add(this._cache[i].delegate)}),this._viewer.scene.primitives.add(this._helpPrimitive),this._state=_.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._delegate.remove(this._cache[e].delegate)}),this._viewer.scene.primitives.remove(this._helpPrimitive),this._cache={},this._state=_.REMOVED}_updateHelpPrimitive(e,i){if(!e)return!1;this._helpPrimitive.geometryInstances=new r.GeometryInstance({geometry:new r.FrustumOutlineGeometry({origin:e.positionWC,orientation:he.getCameraOrientation(e),frustum:e.frustum}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(i)}}),this._helpPrimitive.appearance=new r.PerInstanceColorAppearance({translucent:!1,flat:!0})}showHelp(e,i,s){return this._helpPrimitive.show=e,e&&this._updateHelpPrimitive(i.camera,s||r.Color.GREEN),this}clear(){return Object.keys(this._cache).forEach(e=>{this._delegate.remove(this._cache[e].delegate)}),this._cache={},this._state=_.CLEARED,this}};I.registerType("CameraVideo");var Rd=go;var yo=class extends I{constructor(e){super(e),this._delegate=new r.CustomDataSource(e),this._helpPrimitive=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0,show:!1}),this._state=_.INITIALIZED}get type(){return I.getLayerType("plane_video")}get show(){return this._show}set show(e){this._show=e,Object.keys(this._cache).forEach(i=>{this._cache[i].enabled=this._show})}_addedHook(){this._viewer.scene.primitives.add(this._helpPrimitive)}_removedHook(){this._viewer.scene.primitives.remove(this._helpPrimitive)}_updateHelpPrimitive(e,i){if(!e)return!1;this._helpPrimitive.geometryInstances=new r.GeometryInstance({geometry:new r.FrustumOutlineGeometry({origin:e.positionWC,orientation:he.getCameraOrientation(e),frustum:e.frustum}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(i)}}),this._helpPrimitive.appearance=new r.PerInstanceColorAppearance({translucent:!1,flat:!0})}showHelp(e,i,s){return this._helpPrimitive.show=e,e&&this._updateHelpPrimitive(i.camera,s||r.Color.GREEN),this}clear(){return Object.keys(this._cache).forEach(e=>{this._delegate.remove(this._cache[e].delegate)}),this._cache={},this._state=_.CLEARED,this}};I.registerType("PlaneVideo");var Od=yo;var vo=class{constructor(e,i){this.u=e,this.v=i,this.m=this.magnitude()}magnitude(){return Math.sqrt(this.u*this.u+this.v*this.v)}directionTo(){let i=Math.atan2(this.u,this.v)*(180/Math.PI);return i<0&&(i+=360),i}directionFrom(){return(this.directionTo()+180)%360}},wo=vo;var xo=class{constructor(e){this.grid=[],this.xmin=e.xmin,this.xmax=e.xmax,this.ymin=e.ymin,this.ymax=e.ymax,this.cols=e.cols,this.rows=e.rows,this.us=e.us,this.vs=e.vs,this.deltaX=e.deltaX,this.deltaY=e.deltaY,this.deltaY<0&&this.ymin<this.ymax?console.warn("[wind-core]: The data is flipY"):(this.ymin=Math.min(e.ymax,e.ymin),this.ymax=Math.max(e.ymax,e.ymin)),this.isFields=!0;let i=Math.ceil((this.xmax-this.xmin)/e.deltaX),s=Math.ceil((this.ymax-this.ymin)/e.deltaY);(i!==this.cols||s!==this.rows)&&console.warn("[wind-core]: The data grid not equal"),this.isContinuous=Math.floor(this.cols*e.deltaX)>=360,this.wrappedX="wrappedX"in e?e.wrappedX:this.xmax>180,this.grid=this.buildGrid(),this.range=this.calculateRange()}buildGrid(){let e=[],i=0,s=this,a=s.rows,o=s.cols,n=s.us,h=s.vs;for(let c=0;c<a;c++){let d=[];for(let p=0;p<o;p++,i++){let f=n[i],g=h[i],u=this.isValid(f)&&this.isValid(g);d[p]=u?new wo(f,g):null}this.isContinuous&&d.push(d[0]),e[c]=d}return e}release(){this.grid=[]}extent(){return[this.xmin,this.ymin,this.xmax,this.ymax]}bilinearInterpolateVector(e,i,s,a,o,n){let h=1-e,c=1-i,d=h*c,p=e*c,f=h*i,g=e*i,u=s.u*d+a.u*p+o.u*f+n.u*g,m=s.v*d+a.v*p+o.v*f+n.v*g;return new wo(u,m)}calculateRange(){if(!this.grid||!this.grid[0])return;let e=this.grid.length,i=this.grid[0].length,s,a;for(let o=0;o<e;o++)for(let n=0;n<i;n++){let h=this.grid[o][n];if(h!==null){let c=h.m||h.magnitude();s===void 0?s=c:a===void 0?(a=c,s=Math.min(s,a),a=Math.max(s,a)):(s=Math.min(c,s),a=Math.max(c,a))}}return[s,a]}isValid(e){return e!=null}getWrappedLongitudes(){let e=this.xmin,i=this.xmax;return this.wrappedX&&(this.isContinuous?(e=-180,i=180):(i=this.xmax-360,e=this.xmin-360)),[e,i]}contains(e,i){let s=this.getWrappedLongitudes(),a=s[0],o=s[1],n=e>=a&&e<=o,h;return this.deltaY>=0?h=i>=this.ymin&&i<=this.ymax:h=i>=this.ymax&&i<=this.ymin,n&&h}floorMod(e,i){return e-i*Math.floor(e/i)}getDecimalIndexes(e,i){let s=this.floorMod(e-this.xmin,360)/this.deltaX,a=(this.ymax-i)/this.deltaY;return[s,a]}valueAt(e,i){if(!this.contains(e,i))return null;let s=this.getDecimalIndexes(e,i),a=Math.floor(s[0]),o=Math.floor(s[1]),n=this.clampColumnIndex(a),h=this.clampRowIndex(o);return this.valueAtIndexes(n,h)}interpolatedValueAt(e,i){if(!this.contains(e,i))return null;let s=this.getDecimalIndexes(e,i),a=s[0],o=s[1];return this.interpolatePoint(a,o)}hasValueAt(e,i){return this.valueAt(e,i)!==null}interpolatePoint(e,i){let s=this.getFourSurroundingIndexes(e,i),a=s[0],o=s[1],n=s[2],h=s[3],c=this.getFourSurroundingValues(a,o,n,h);if(c){let d=c[0],p=c[1],f=c[2],g=c[3];return this.bilinearInterpolateVector(e-a,i-n,d,p,f,g)}return null}clampColumnIndex(e){let i=e;e<0&&(i=0);let s=this.cols-1;return e>s&&(i=s),i}clampRowIndex(e){let i=e;e<0&&(i=0);let s=this.rows-1;return e>s&&(i=s),i}getFourSurroundingIndexes(e,i){let s=Math.floor(e),a=s+1;this.isContinuous&&a>=this.cols&&(a=0),a=this.clampColumnIndex(a);let o=this.clampRowIndex(Math.floor(i)),n=this.clampRowIndex(o+1);return[s,a,o,n]}getFourSurroundingValues(e,i,s,a){let o;if(o=this.grid[s]){let n=o[e],h=o[i];if(this.isValid(n)&&this.isValid(h)&&(o=this.grid[a])){let c=o[e],d=o[i];if(this.isValid(c)&&this.isValid(d))return[n,h,c,d]}}return null}valueAtIndexes(e,i){return this.grid[i][e]}lonLatAtIndexes(e,i){let s=this.longitudeAtX(e),a=this.latitudeAtY(i);return[s,a]}longitudeAtX(e){let i=this.deltaX/2,s=this.xmin+i+e*this.deltaX;return this.wrappedX&&(s=s>180?s-360:s),s}latitudeAtY(e){let i=this.deltaY/2;return this.ymax-i-e*this.deltaY}randomize(e,i,s,a){e===void 0&&(e={});let o=Math.random()*(i||this.cols)|0,n=Math.random()*(s||this.rows)|0,h=a([o,n]);return h!==null?(e.x=h[0],e.y=h[1]):(e.x=this.longitudeAtX(o),e.y=this.latitudeAtY(n)),e}checkFields(){return this.isFields}},kd=xo;var Co=class{constructor(e){this.options={},this.particles=[],this.ctx=e,this.animationLoop=void 0,this.animate=this.animate.bind(this)}_indexFor(e,i,s,a){return Math.max(0,Math.min(a.length-1,Math.round((e-i)/(s-i)*(a.length-1))))}_moveParticles(){if(!this.particles||!this.particles.length)return;let e=this.ctx.canvas.width,i=this.ctx.canvas.height,s=this.particles,a=this.options.maxAge,o=typeof this.options.velocityScale=="function"?this.options.velocityScale():this.options.velocityScale;for(let n=0;n<s.length;n++){let h=s[n];h.age>a&&(h.age=0,this.field.randomize(h,e,i,this.unProject));let c=h.x,d=h.y,p=this.field.interpolatedValueAt(c,d);if(p===null)h.age=a;else{let f=c+p.u*o,g=d+p.v*o;this.field.hasValueAt(f,g)?(h.xt=f,h.yt=g,h.m=p.m):(h.x=f,h.y=g,h.age=a)}h.age++}}_drawParticles(){if(!this.particles||!this.particles.length)return;let e=this.particles,i=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=i,this.ctx.globalAlpha=this.options.globalAlpha,this.ctx.fillStyle="rgba(0, 0, 0, "+this.options.globalAlpha+")",this.ctx.lineWidth=this.options.lineWidth?this.options.lineWidth:1,this.ctx.strokeStyle=this.options.colorScale?this.options.colorScale:"#fff";let s=0,a=e.length;if(this.field&&a>0){let o,n;if(this.options.minVelocity&&this.options.maxVelocity)o=this.options.minVelocity,n=this.options.maxVelocity;else{let h=this.field.range;o=h[0],n=h[1]}for(;s<a;s++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[s],o,n)}}_drawPixelParticle(e,i,s){let a=[e.x,e.y],o=[e.xt,e.yt],n=e.xt-e.x,h=e.yt-e.y;n*n+h*h>20*20||o&&a&&o[0]&&o[1]&&a[0]&&a[1]&&e.age<=this.options.maxAge&&this._drawStroke(a,o,e,i,s)}_drawCoordsParticle(e,i,s){let a=[e.x,e.y],o=[e.xt,e.yt];if(o&&a&&o[0]&&o[1]&&a[0]&&a[1]&&this.intersectsCoordinate(o)&&e.age<=this.options.maxAge){let n=this.project(a),h=this.project(o);this._drawStroke(n,h,e,i,s)}}_drawStroke(e,i,s,a,o){if(e&&i){if(this.ctx.beginPath(),this.ctx.moveTo(e[0],e[1]),this.ctx.lineTo(i[0],i[1]),typeof this.options.colorScale=="function")this.ctx.strokeStyle=this.options.colorScale(s.m);else if(Array.isArray(this.options.colorScale)){let n=this._indexFor(s.m,a,o,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[n]}typeof this.options.lineWidth=="function"&&(this.ctx.lineWidth=this.options.lineWidth(s.m)),s.x=s.xt,s.y=s.yt,this.ctx.stroke()}}_prepareParticlePaths(){let e=this.ctx.canvas.width,i=this.ctx.canvas.height,s=typeof this.options.paths=="function"?this.options.paths(this):this.options.paths,a=[];if(!this.field)return[];for(let o=0;o<s;o++)a.push(this.field.randomize({age:Math.floor(Math.random()*this.options.maxAge)},e,i,this.unProject));return a}project(){throw new Error("project must be override")}unProject(){throw new Error("unProject must be override")}intersectsCoordinate(e){throw new Error("must be override")}prerender(){this.field&&(this.particles=this._prepareParticlePaths(),!this.starting&&!this.forceStop&&(this.starting=!0,this._then=Date.now(),this.animate()))}render(){return this._moveParticles(),this._drawParticles(),this}clearCanvas(){this.stop(),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.forceStop=!1}start(){this.starting=!0,this.forceStop=!1,this._then=Date.now(),this.animate()}stop(){cancelAnimationFrame(this.animationLoop),this.starting=!1,this.forceStop=!0}animate(){this.animationLoop&&cancelAnimationFrame(this.animationLoop),this.animationLoop=requestAnimationFrame(this.animate);let e=Date.now(),i=e-this._then;i>this.options.frameRate&&(this._then=e-i%this.options.frameRate,this.render())}setData(e){return this.field=e,this}setOptions(e){var i,s,a,o;return this.options=e,!((i=this.options)!=null&&i.maxAge)&&((s=this.options)!=null&&s.particleAge)&&(this.options.maxAge=Number(this.options.particleAge)),!((a=this.options)!=null&&a.paths)&&((o=this.options)!=null&&o.particleMultiplier)&&(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}},Nd=Co;var R_={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:1/25,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},To=class extends I{constructor(e,i={}){super(e),this._options={...R_,...i},this._data=void 0,this._canvas=document.createElement("canvas"),this._state=_.INITIALIZED}get type(){return I.getLayerType("wind")}get show(){return this._show}set show(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}_formatData(e){let i,s;if(e.forEach(function(o){switch(o.header.parameterCategory+","+o.header.parameterNumber){case"1,2":case"2,2":i=o;break;case"1,3":case"2,3":s=o;break}}),!s||!i)return;let a=i.header;return new kd({xmin:a.lo1,ymin:a.la1,xmax:a.lo2,ymax:a.la2,deltaX:a.dx,deltaY:a.dy,cols:a.nx,rows:a.ny,us:i.data,vs:s.data})}_mountCanvas(){if(!this._viewer||!this._canvas)return;this._canvas.style.cssText="position:absolute; left:0; top:0;user-select:none;pointer-events: none;",this._canvas.className="pggis-wind-layer";let{width:e,height:i}=this._viewer.canvas;this._canvas.width=e,this._canvas.height=i,this._canvas.style.width=e+"px",this._canvas.style.height=i+"px",this._viewer.layerContainer.appendChild(this._canvas)}_addedHook(){let e=this._viewer.scene,i=this._viewer.camera,s=r.Ellipsoid.WGS84;this._delegate.intersectsCoordinate=a=>{if(e.mode===r.SceneMode.SCENE3D){let o=new r.EllipsoidalOccluder(s,i.position),n=r.Cartesian3.fromDegrees(a[0],a[1]);return o.isPointVisible(n)}else if(e.mode===r.SceneMode.SCENE2D)return!(a[0]===-180||a[0]===180);return!0},this._delegate.project=a=>{let o=r.Cartesian3.fromDegrees(a[0],a[1]),n=r.SceneTransforms.worldToWindowCoordinates(e,o);return[n.x,n.y]},this._delegate.unProject=a=>{let o=new r.Cartesian2(a[0],a[1]),n;if(e.mode===r.SceneMode.SCENE3D?n=e.globe.pick(i.getPickRay(o),e):n=e.camera.pickEllipsoid(o,s),!n)return null;let h=s.cartesianToCartographic(n),c=r.Math.toDegrees(h.latitude);return[r.Math.toDegrees(h.longitude),c]}}_onAdd(e){this._viewer=e,this._mountCanvas();let i=this._canvas.getContext("2d");this._delegate||(this._delegate=new Nd(i),this._delegate.setOptions(this._options),this._addedHook()),this._data&&(this._delegate.setData(this._data),this._delegate.prerender(),this._delegate.render())}_onRemove(){this._delegate&&this._delegate.stop(),this._canvas&&this._viewer.layerContainer.removeChild(this._canvas),delete this._canvas}setData(e,i){return e&&e.checkFields&&e.checkFields()?this._data=e:Array.isArray(e)&&(this._data=this._formatData(e)),this._delegate&&(this._delegate.setData(this._data),i&&(this._options={...this._options,...i},this._delegate.setOptions(this._options)),this._delegate.prerender(),this._delegate.render()),this}setOptions(e){return this._options={...this._options,...e},this._delegate&&(this._delegate.setOptions(this._options),this._delegate.prerender(),this._delegate.render()),this}};I.registerType("wind");var zd=To;var Fd=`/**\r
|
|
372
|
+
`},translucent:function(e){return!0}}),flat:!0})}setPoints(e){return this._points=e,this._computeBounds(),this._computeBoundsInMeter(),this._viewer&&(this._scale=Math.min(Math.abs(this._boundsInMeter.west-this._boundsInMeter.east)/this._viewer.canvas.width,Math.abs(this._boundsInMeter.north-this._boundsInMeter.south)/this._viewer.canvas.height),this._heat=ca({canvas:this._canvas,gradientTexture:this._createGradientTexture()})),this._heat&&(this._heat.blur(),this._heat.addPoints(this._parsePoints(this._points)),this._update()),this}clear(){return this._heat.clear(),this._points=[],this._state=_.CLEARED,this}};I.registerType("heat-map");var Kf=pa;var ma=class extends I{constructor(e){super(e),this._delegate=D.create("div","html-layer",void 0),this._delegate.setAttribute("id",this._id),this._renderRemoveCallback=void 0,this._state=_.INITIALIZED}get type(){return I.getLayerType("html")}get show(){return this._show}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden",Object.keys(this._cache).forEach(i=>{this._cache[i].show=e})}_onAdd(e){this._viewer=e,this._viewer.layerContainer.appendChild(this._delegate);let i=this._viewer.scene;this._renderRemoveCallback=i.postRender.addEventListener(()=>{let s=this._viewer.camera.positionWC,o=this._viewer.camera.direction,a=this._viewer.getOffset();this.eachOverlay(n=>{if(n&&n.position){let h=y.transformWGS84ToCartesian(n.position),c=i.globe.ellipsoid.geodeticSurfaceNormal(h,new r.Cartesian3),d=r.SceneTransforms.worldToWindowCoordinates(i,h);d&&(d.x+=a.x,d.y+=a.y),n._updateStyle(d,r.Cartesian3.distance(h,s),r.Cartesian3.dot(o,c)<=0)}},this)},this),this._state=_.ADDED}_onRemove(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._delegate),this._state=_.REMOVED}clear(){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);return this._cache={},this._state=_.CLEARED,this}};I.registerType("html");var $f=ma;var ua=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._state=_.INITIALIZED}get type(){return I.getLayerType("i3s")}clear(){return this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("i3s");var e_=ua;var fa=class extends I{constructor(e,i,s={}){if(!i)throw new Error("KmlLayer: the url is empty");super(e),this._delegate=r.KmlDataSource.load(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("kml")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(i=>{i.show=this._show})}eachOverlay(e,i){if(this._delegate)return this._delegate.then(s=>{s.entities.values.forEach(a=>{e.call(i,a)})}),this}};I.registerType("kml");var t_=fa;var _a=class extends I{constructor(e,i=""){super(e),this._dataSource=r.GeoJsonDataSource.load(i),this._delegate=new r.CustomDataSource(e),this._initLabel(),this._state=_.INITIALIZED}get type(){return I.getLayerType("label")}_createLabel(e){if(e.position&&e.name)return Yo.fromEntity(e)}_initLabel(){this._dataSource.then(e=>{e.entities.values.forEach(s=>{let o=this._createLabel(s);this.addOverlay(o)})})}};I.registerType("label");var i_=_a;var ga=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._points=this._delegate.add(new r.PointPrimitiveCollection),this._labels=this._delegate.add(new r.LabelCollection),this._billboards=this._delegate.add(new r.BillboardCollection),this._polylines=this._delegate.add(new r.PolylineCollection),this._clouds=this._delegate.add(new r.CloudCollection),this._state=_.INITIALIZED}get type(){return I.getLayerType("primitive")}get points(){return this._points}get labels(){return this._labels}get billboards(){return this._billboards}get polylines(){return this._polylines}get clouds(){return this._clouds}clear(){return this._delegate&&this._delegate.removeAll(),this._points=this._delegate.add(new r.PointPrimitiveCollection),this._labels=this._delegate.add(new r.LabelCollection),this._billboards=this._delegate.add(new r.BillboardCollection),this._polylines=this._delegate.add(new r.PolylineCollection),this._clouds=this._delegate.add(new r.CloudCollection),this._cache={},this._state=_.CLEARED,this}};I.registerType("primitive");var r_=ga;var ya=class extends I{constructor(e,i,s){super(e),this._delegate=r.ImageryLayer.fromProviderAsync(i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("raster-tile")}};I.registerType("raster-tile");var s_=ya;var va=class extends I{constructor(e){super(e),this._delegate=new r.PrimitiveCollection,this._state=_.INITIALIZED}get type(){return I.getLayerType("tileset")}async loadTileset(e,i={}){try{let s=await r.Cesium3DTileset.fromUrl(e,i);return this._delegate.add(s),this._state=_.LOADED,this}catch(s){throw console.error("Failed to load tileset:",s),s}}clear(){return this._delegate.removeAll(),this._cache={},this._state=_.CLEARED,this}};I.registerType("tileset");var Yc=va;var wa=class extends Xt{constructor(e,i,s={}){if(!i)throw new Error("TopoJsonLayer\uFF1Athe url invalid");super(e,i,s),this._state=_.INITIALIZED}get type(){return I.getLayerType("topojson")}};Xt.registerType("topojson");var o_=wa;var Ca=class extends I{constructor(e){super(e),this._delegate=void 0,this._helpPrimitive=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0,show:!1}),this._state=_.INITIALIZED}get type(){return I.getLayerType("camera_video")}get show(){return this._show}set show(e){this._show=e,Object.keys(this._cache).forEach(i=>{this._cache[i].enabled=this._show})}_onAdd(e){this._viewer=e,this._delegate=this._viewer.scene.postProcessStages,Object.keys(this._cache).forEach(i=>{this._delegate.add(this._cache[i].delegate)}),this._viewer.scene.primitives.add(this._helpPrimitive),this._state=_.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._delegate.remove(this._cache[e].delegate)}),this._viewer.scene.primitives.remove(this._helpPrimitive),this._cache={},this._state=_.REMOVED}_updateHelpPrimitive(e,i){if(!e)return!1;this._helpPrimitive.geometryInstances=new r.GeometryInstance({geometry:new r.FrustumOutlineGeometry({origin:e.positionWC,orientation:le.getCameraOrientation(e),frustum:e.frustum}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(i)}}),this._helpPrimitive.appearance=new r.PerInstanceColorAppearance({translucent:!1,flat:!0})}showHelp(e,i,s){return this._helpPrimitive.show=e,e&&this._updateHelpPrimitive(i.camera,s||r.Color.GREEN),this}clear(){return Object.keys(this._cache).forEach(e=>{this._delegate.remove(this._cache[e].delegate)}),this._cache={},this._state=_.CLEARED,this}};I.registerType("CameraVideo");var a_=Ca;var xa=class extends I{constructor(e){super(e),this._delegate=new r.CustomDataSource(e),this._helpPrimitive=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:{}}),asynchronous:!0,show:!1}),this._state=_.INITIALIZED}get type(){return I.getLayerType("plane_video")}get show(){return this._show}set show(e){this._show=e,Object.keys(this._cache).forEach(i=>{this._cache[i].enabled=this._show})}_addedHook(){this._viewer.scene.primitives.add(this._helpPrimitive)}_removedHook(){this._viewer.scene.primitives.remove(this._helpPrimitive)}_updateHelpPrimitive(e,i){if(!e)return!1;this._helpPrimitive.geometryInstances=new r.GeometryInstance({geometry:new r.FrustumOutlineGeometry({origin:e.positionWC,orientation:le.getCameraOrientation(e),frustum:e.frustum}),attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(i)}}),this._helpPrimitive.appearance=new r.PerInstanceColorAppearance({translucent:!1,flat:!0})}showHelp(e,i,s){return this._helpPrimitive.show=e,e&&this._updateHelpPrimitive(i.camera,s||r.Color.GREEN),this}clear(){return Object.keys(this._cache).forEach(e=>{this._delegate.remove(this._cache[e].delegate)}),this._cache={},this._state=_.CLEARED,this}};I.registerType("PlaneVideo");var n_=xa;var Ta=class{constructor(e,i){this.u=e,this.v=i,this.m=this.magnitude()}magnitude(){return Math.sqrt(this.u*this.u+this.v*this.v)}directionTo(){let i=Math.atan2(this.u,this.v)*(180/Math.PI);return i<0&&(i+=360),i}directionFrom(){return(this.directionTo()+180)%360}},Ea=Ta;var Pa=class{constructor(e){this.grid=[],this.xmin=e.xmin,this.xmax=e.xmax,this.ymin=e.ymin,this.ymax=e.ymax,this.cols=e.cols,this.rows=e.rows,this.us=e.us,this.vs=e.vs,this.deltaX=e.deltaX,this.deltaY=e.deltaY,this.deltaY<0&&this.ymin<this.ymax?console.warn("[wind-core]: The data is flipY"):(this.ymin=Math.min(e.ymax,e.ymin),this.ymax=Math.max(e.ymax,e.ymin)),this.isFields=!0;let i=Math.ceil((this.xmax-this.xmin)/e.deltaX),s=Math.ceil((this.ymax-this.ymin)/e.deltaY);(i!==this.cols||s!==this.rows)&&console.warn("[wind-core]: The data grid not equal"),this.isContinuous=Math.floor(this.cols*e.deltaX)>=360,this.wrappedX="wrappedX"in e?e.wrappedX:this.xmax>180,this.grid=this.buildGrid(),this.range=this.calculateRange()}buildGrid(){let e=[],i=0,s=this,o=s.rows,a=s.cols,n=s.us,h=s.vs;for(let c=0;c<o;c++){let d=[];for(let p=0;p<a;p++,i++){let f=n[i],g=h[i],u=this.isValid(f)&&this.isValid(g);d[p]=u?new Ea(f,g):null}this.isContinuous&&d.push(d[0]),e[c]=d}return e}release(){this.grid=[]}extent(){return[this.xmin,this.ymin,this.xmax,this.ymax]}bilinearInterpolateVector(e,i,s,o,a,n){let h=1-e,c=1-i,d=h*c,p=e*c,f=h*i,g=e*i,u=s.u*d+o.u*p+a.u*f+n.u*g,m=s.v*d+o.v*p+a.v*f+n.v*g;return new Ea(u,m)}calculateRange(){if(!this.grid||!this.grid[0])return;let e=this.grid.length,i=this.grid[0].length,s,o;for(let a=0;a<e;a++)for(let n=0;n<i;n++){let h=this.grid[a][n];if(h!==null){let c=h.m||h.magnitude();s===void 0?s=c:o===void 0?(o=c,s=Math.min(s,o),o=Math.max(s,o)):(s=Math.min(c,s),o=Math.max(c,o))}}return[s,o]}isValid(e){return e!=null}getWrappedLongitudes(){let e=this.xmin,i=this.xmax;return this.wrappedX&&(this.isContinuous?(e=-180,i=180):(i=this.xmax-360,e=this.xmin-360)),[e,i]}contains(e,i){let s=this.getWrappedLongitudes(),o=s[0],a=s[1],n=e>=o&&e<=a,h;return this.deltaY>=0?h=i>=this.ymin&&i<=this.ymax:h=i>=this.ymax&&i<=this.ymin,n&&h}floorMod(e,i){return e-i*Math.floor(e/i)}getDecimalIndexes(e,i){let s=this.floorMod(e-this.xmin,360)/this.deltaX,o=(this.ymax-i)/this.deltaY;return[s,o]}valueAt(e,i){if(!this.contains(e,i))return null;let s=this.getDecimalIndexes(e,i),o=Math.floor(s[0]),a=Math.floor(s[1]),n=this.clampColumnIndex(o),h=this.clampRowIndex(a);return this.valueAtIndexes(n,h)}interpolatedValueAt(e,i){if(!this.contains(e,i))return null;let s=this.getDecimalIndexes(e,i),o=s[0],a=s[1];return this.interpolatePoint(o,a)}hasValueAt(e,i){return this.valueAt(e,i)!==null}interpolatePoint(e,i){let s=this.getFourSurroundingIndexes(e,i),o=s[0],a=s[1],n=s[2],h=s[3],c=this.getFourSurroundingValues(o,a,n,h);if(c){let d=c[0],p=c[1],f=c[2],g=c[3];return this.bilinearInterpolateVector(e-o,i-n,d,p,f,g)}return null}clampColumnIndex(e){let i=e;e<0&&(i=0);let s=this.cols-1;return e>s&&(i=s),i}clampRowIndex(e){let i=e;e<0&&(i=0);let s=this.rows-1;return e>s&&(i=s),i}getFourSurroundingIndexes(e,i){let s=Math.floor(e),o=s+1;this.isContinuous&&o>=this.cols&&(o=0),o=this.clampColumnIndex(o);let a=this.clampRowIndex(Math.floor(i)),n=this.clampRowIndex(a+1);return[s,o,a,n]}getFourSurroundingValues(e,i,s,o){let a;if(a=this.grid[s]){let n=a[e],h=a[i];if(this.isValid(n)&&this.isValid(h)&&(a=this.grid[o])){let c=a[e],d=a[i];if(this.isValid(c)&&this.isValid(d))return[n,h,c,d]}}return null}valueAtIndexes(e,i){return this.grid[i][e]}lonLatAtIndexes(e,i){let s=this.longitudeAtX(e),o=this.latitudeAtY(i);return[s,o]}longitudeAtX(e){let i=this.deltaX/2,s=this.xmin+i+e*this.deltaX;return this.wrappedX&&(s=s>180?s-360:s),s}latitudeAtY(e){let i=this.deltaY/2;return this.ymax-i-e*this.deltaY}randomize(e,i,s,o){e===void 0&&(e={});let a=Math.random()*(i||this.cols)|0,n=Math.random()*(s||this.rows)|0,h=o([a,n]);return h!==null?(e.x=h[0],e.y=h[1]):(e.x=this.longitudeAtX(a),e.y=this.latitudeAtY(n)),e}checkFields(){return this.isFields}},qc=Pa;var ba=class{constructor(e){this.options={},this.particles=[],this.ctx=e,this.animationLoop=void 0,this.animate=this.animate.bind(this)}_indexFor(e,i,s,o){return Math.max(0,Math.min(o.length-1,Math.round((e-i)/(s-i)*(o.length-1))))}_moveParticles(){if(!this.particles||!this.particles.length)return;let e=this.ctx.canvas.width,i=this.ctx.canvas.height,s=this.particles,o=this.options.maxAge,a=typeof this.options.velocityScale=="function"?this.options.velocityScale():this.options.velocityScale;for(let n=0;n<s.length;n++){let h=s[n];h.age>o&&(h.age=0,this.field.randomize(h,e,i,this.unProject));let c=h.x,d=h.y,p=this.field.interpolatedValueAt(c,d);if(p===null)h.age=o;else{let f=c+p.u*a,g=d+p.v*a;this.field.hasValueAt(f,g)?(h.xt=f,h.yt=g,h.m=p.m):(h.x=f,h.y=g,h.age=o)}h.age++}}_drawParticles(){if(!this.particles||!this.particles.length)return;let e=this.particles,i=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=i,this.ctx.globalAlpha=this.options.globalAlpha,this.ctx.fillStyle="rgba(0, 0, 0, "+this.options.globalAlpha+")",this.ctx.lineWidth=this.options.lineWidth?this.options.lineWidth:1,this.ctx.strokeStyle=this.options.colorScale?this.options.colorScale:"#fff";let s=0,o=e.length;if(this.field&&o>0){let a,n;if(this.options.minVelocity&&this.options.maxVelocity)a=this.options.minVelocity,n=this.options.maxVelocity;else{let h=this.field.range;a=h[0],n=h[1]}for(;s<o;s++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[s],a,n)}}_drawPixelParticle(e,i,s){let o=[e.x,e.y],a=[e.xt,e.yt],n=e.xt-e.x,h=e.yt-e.y;n*n+h*h>20*20||a&&o&&a[0]&&a[1]&&o[0]&&o[1]&&e.age<=this.options.maxAge&&this._drawStroke(o,a,e,i,s)}_drawCoordsParticle(e,i,s){let o=[e.x,e.y],a=[e.xt,e.yt];if(a&&o&&a[0]&&a[1]&&o[0]&&o[1]&&this.intersectsCoordinate(a)&&e.age<=this.options.maxAge){let n=this.project(o),h=this.project(a);this._drawStroke(n,h,e,i,s)}}_drawStroke(e,i,s,o,a){if(e&&i){if(this.ctx.beginPath(),this.ctx.moveTo(e[0],e[1]),this.ctx.lineTo(i[0],i[1]),typeof this.options.colorScale=="function")this.ctx.strokeStyle=this.options.colorScale(s.m);else if(Array.isArray(this.options.colorScale)){let n=this._indexFor(s.m,o,a,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[n]}typeof this.options.lineWidth=="function"&&(this.ctx.lineWidth=this.options.lineWidth(s.m)),s.x=s.xt,s.y=s.yt,this.ctx.stroke()}}_prepareParticlePaths(){let e=this.ctx.canvas.width,i=this.ctx.canvas.height,s=typeof this.options.paths=="function"?this.options.paths(this):this.options.paths,o=[];if(!this.field)return[];for(let a=0;a<s;a++)o.push(this.field.randomize({age:Math.floor(Math.random()*this.options.maxAge)},e,i,this.unProject));return o}project(){throw new Error("project must be override")}unProject(){throw new Error("unProject must be override")}intersectsCoordinate(e){throw new Error("must be override")}prerender(){this.field&&(this.particles=this._prepareParticlePaths(),!this.starting&&!this.forceStop&&(this.starting=!0,this._then=Date.now(),this.animate()))}render(){return this._moveParticles(),this._drawParticles(),this}clearCanvas(){this.stop(),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.forceStop=!1}start(){this.starting=!0,this.forceStop=!1,this._then=Date.now(),this.animate()}stop(){cancelAnimationFrame(this.animationLoop),this.starting=!1,this.forceStop=!0}animate(){this.animationLoop&&cancelAnimationFrame(this.animationLoop),this.animationLoop=requestAnimationFrame(this.animate);let e=Date.now(),i=e-this._then;i>this.options.frameRate&&(this._then=e-i%this.options.frameRate,this.render())}setData(e){return this.field=e,this}setOptions(e){var i,s,o,a;return this.options=e,!((i=this.options)!=null&&i.maxAge)&&((s=this.options)!=null&&s.particleAge)&&(this.options.maxAge=Number(this.options.particleAge)),!((o=this.options)!=null&&o.paths)&&((a=this.options)!=null&&a.particleMultiplier)&&(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}},Xc=ba;var l_={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:1/25,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},Ma=class extends I{constructor(e,i={}){super(e),this._options={...l_,...i},this._data=void 0,this._canvas=document.createElement("canvas"),this._state=_.INITIALIZED}get type(){return I.getLayerType("wind")}get show(){return this._show}set show(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}_formatData(e){let i,s;if(e.forEach(function(a){switch(a.header.parameterCategory+","+a.header.parameterNumber){case"1,2":case"2,2":i=a;break;case"1,3":case"2,3":s=a;break}}),!s||!i)return;let o=i.header;return new qc({xmin:o.lo1,ymin:o.la1,xmax:o.lo2,ymax:o.la2,deltaX:o.dx,deltaY:o.dy,cols:o.nx,rows:o.ny,us:i.data,vs:s.data})}_mountCanvas(){if(!this._viewer||!this._canvas)return;this._canvas.style.cssText="position:absolute; left:0; top:0;user-select:none;pointer-events: none;",this._canvas.className="pggis-wind-layer";let{width:e,height:i}=this._viewer.canvas;this._canvas.width=e,this._canvas.height=i,this._canvas.style.width=e+"px",this._canvas.style.height=i+"px",this._viewer.layerContainer.appendChild(this._canvas)}_addedHook(){let e=this._viewer.scene,i=this._viewer.camera,s=r.Ellipsoid.WGS84;this._delegate.intersectsCoordinate=o=>{if(e.mode===r.SceneMode.SCENE3D){let a=new r.EllipsoidalOccluder(s,i.position),n=r.Cartesian3.fromDegrees(o[0],o[1]);return a.isPointVisible(n)}else if(e.mode===r.SceneMode.SCENE2D)return!(o[0]===-180||o[0]===180);return!0},this._delegate.project=o=>{let a=r.Cartesian3.fromDegrees(o[0],o[1]),n=r.SceneTransforms.worldToWindowCoordinates(e,a);return[n.x,n.y]},this._delegate.unProject=o=>{let a=new r.Cartesian2(o[0],o[1]),n;if(e.mode===r.SceneMode.SCENE3D?n=e.globe.pick(i.getPickRay(a),e):n=e.camera.pickEllipsoid(a,s),!n)return null;let h=s.cartesianToCartographic(n),c=r.Math.toDegrees(h.latitude);return[r.Math.toDegrees(h.longitude),c]}}_onAdd(e){this._viewer=e,this._mountCanvas();let i=this._canvas.getContext("2d");this._delegate||(this._delegate=new Xc(i),this._delegate.setOptions(this._options),this._addedHook()),this._data&&(this._delegate.setData(this._data),this._delegate.prerender(),this._delegate.render())}_onRemove(){this._delegate&&this._delegate.stop(),this._canvas&&this._viewer.layerContainer.removeChild(this._canvas),delete this._canvas}setData(e,i){return e&&e.checkFields&&e.checkFields()?this._data=e:Array.isArray(e)&&(this._data=this._formatData(e)),this._delegate&&(this._delegate.setData(this._data),i&&(this._options={...this._options,...i},this._delegate.setOptions(this._options)),this._delegate.prerender(),this._delegate.render()),this}setOptions(e){return this._options={...this._options,...e},this._delegate&&(this._delegate.setOptions(this._options),this._delegate.prerender(),this._delegate.render()),this}};I.registerType("wind");var h_=Ma;var c_={enable:!1},Aa=class{constructor(e={}){var i;this._viewer=viewer,this._options={...c_,...e},this._id=(i=e.id)!=null?i:r.createGuid(),this._enabled=!1,this._state=_.INITIALIZED}get enabled(){return this._enabled}set enabled(e){this._enabled!==e&&(this._enabled=e,this._state=this._enabled?_.ENABLED:_.DISABLED,this._enabledHook&&this._enabledHook())}_enabledHook(){}_mountedHook(){}_addedHook(){}_removedHook(){}},Kt=Aa;var Sa=class extends Kt{constructor(e,i={}){var s,o,a,n,h,c,d,p;super(i),this._viewer=e,this._color=(s=i.color)!=null?s:new r.Color(0,0,0,.9),this._alpha=(o=i.alpha)!=null?o:.9,this._enableCollisionDetection=(a=i.enableCollisionDetection)!=null?a:!1,this._enableLevel=(n=i.enableLevel)!=null?n:2,this._depthTestOld=this._viewer.scene.globe.depthTestAgainstTerrain,this._frontFaceAlphaByDistance=(h=i.frontFaceAlphaByDistance)!=null?h:new r.NearFarScalar(500,.9,3e3,1),this._undergroundColorAlphaByDistance=(c=i.undergroundColorAlphaByDistance)!=null?c:new r.NearFarScalar(500,.8,5e3,1),this._zoomLevelSettings=(d=i.zoomLevelSettings)!=null?d:null,this._enableHeightThreshold=(p=i.enableHeightThreshold)!=null?p:200,this._cameraMoveListener=this._viewer.scene.camera.changed.addEventListener(()=>{this._updateUndergroundState()})}get translucency(){return this._viewer.scene.globe.translucency}set alpha(e){this._viewer&&this._alpha!==e&&(this._alpha=e,this.translucency.frontFaceAlpha=this._alpha)}get alpha(){return this._alpha}set enableCollisionDetection(e){this._enableCollisionDetection=e,this._enabled&&(this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1)}get enableCollisionDetection(){return this._enableCollisionDetection}set enableHeightThreshold(e){this._enableHeightThreshold=e}get enableHeightThreshold(){return this._enableHeightThreshold}set enableLevel(e){this._enableLevel=e}get enableLevel(){if(this._zoomLevelSettings){let e=this._getZoomLevel();for(let i of this._zoomLevelSettings)if(e>=i.minZoomLevel&&(!i.maxZoomLevel||e<=i.maxZoomLevel))return i.enableLevel}return this._enableLevel}_getZoomLevel(){let e=this._getCameraHeight(),i=this._viewer.camera.frustum.fov,s=Math.log2(156543.03392*512/(e*Math.tan(i/2)*2));return Math.max(0,s)}_getCameraHeight(){let e=this._viewer.camera.position,i=r.Cartographic.fromCartesian(e);return i?i.height:0}_updateUndergroundState(){if(!this._enabled)return;if(this.enableLevel>0)if(this._getCameraHeight()>this._enableHeightThreshold){this._disabledHook();return}else this._enabledHook();else this._disabledHook()}_enabledHook(){switch(this.enableLevel){case 0:this._viewer.scene.globe.undergroundColor=void 0,this._viewer.scene.globe.undergroundColorAlphaByDistance=void 0,this._viewer.scene.depthTestAgainstTerrain=this._depthTestOld,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1,this.translucency.enabled=!1;break;case 1:this._viewer.scene.globe.undergroundColor=this._color,this._viewer.scene.globe.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance,this._viewer.scene.depthTestAgainstTerrain=!0,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1,this.translucency.enabled=!1;break;case 2:this._viewer.scene.globe.undergroundColor=this._color,this._viewer.scene.depthTestAgainstTerrain=!0,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1,this.translucency.enabled=!0,this.translucency.frontFaceAlpha=this._alpha,this.translucency.frontFaceAlphaByDistance=this._frontFaceAlphaByDistance,this._viewer.scene.globe.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance;break;default:this._viewer.scene.globe.undergroundColor=this._color,this._viewer.scene.depthTestAgainstTerrain=!0,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1,this.translucency.enabled=!0,this.translucency.frontFaceAlpha=this._alpha,this.translucency.frontFaceAlphaByDistance=this._frontFaceAlphaByDistance,this._viewer.scene.globe.undergroundColorAlphaByDistance=this._undergroundColorAlphaByDistance}}_disabledHook(){this._viewer.scene.globe.undergroundColor=void 0,this._viewer.scene.globe.undergroundColorAlphaByDistance=void 0,this._viewer.scene.depthTestAgainstTerrain=this._depthTestOld,this._viewer.scene.screenSpaceCameraController.enableCollisionDetection=!0,this.translucency.enabled=!1}set enabled(e){this._enabled!==e&&(super.enabled=e,e?this._updateUndergroundState():this._disabledHook())}},Jc=Sa;var Qc=`/**\r
|
|
373
373
|
* \u7EC6\u80DE\u566A\u58F0\uFF08Worley\u566A\u58F0\uFF09\u7740\u8272\u5668\r
|
|
374
374
|
* \u5B9E\u73B02D\u7EC6\u80DE\u566A\u58F0\u7B97\u6CD5\uFF0C\u8FD4\u56DEF1\u548CF2\u8DDD\u79BB\u503C\r
|
|
375
375
|
* \u57FA\u4E8EStefan Gustavson\u7684\u7B97\u6CD5\u5B9E\u73B0\uFF0C\u4F7F\u7528MIT\u8BB8\u53EF\u8BC1\r
|
|
@@ -448,7 +448,7 @@ vec2 czm_cellular(vec2 P)\r
|
|
|
448
448
|
d1.y = min(d1.y, d2.x);// F2 is in d1.y, we're done.\r
|
|
449
449
|
return sqrt(d1.xy);\r
|
|
450
450
|
}\r
|
|
451
|
-
`;var
|
|
451
|
+
`;var Kc=`/**\r
|
|
452
452
|
* \u5355\u7EAF\u5F62\u566A\u58F0\u7740\u8272\u5668\r
|
|
453
453
|
* \u5B9E\u73B02D/3D/4D\u5355\u7EAF\u5F62\u566A\u58F0\u7B97\u6CD5\uFF0C\u65E0\u6570\u7EC4\u548C\u7EB9\u7406\u4F9D\u8D56\r
|
|
454
454
|
* \u57FA\u4E8EIan McEwan\u548CAshima Arts\u7684\u7B97\u6CD5\u5B9E\u73B0\uFF0C\u4F7F\u7528MIT\u8BB8\u53EF\u8BC1\r
|
|
@@ -728,7 +728,7 @@ float czm_snoise(vec4 v)\r
|
|
|
728
728
|
return 49.0 * (dot(m0*m0, vec3(dot(p0, x0), dot(p1, x1), dot(p2, x2)))\r
|
|
729
729
|
+ dot(m1*m1, vec2(dot(p3, x3), dot(p4, x4))));\r
|
|
730
730
|
}\r
|
|
731
|
-
`;var
|
|
731
|
+
`;var $c=`/**\r
|
|
732
732
|
* \u6CA5\u9752\u6750\u8D28\u7740\u8272\u5668\r
|
|
733
733
|
* \u521B\u5EFA\u6CA5\u9752\u8DEF\u9762\u6548\u679C\uFF0C\u5305\u542B\u7EC6\u80DE\u566A\u58F0\u548C\u7C97\u7CD9\u5EA6\u5904\u7406\r
|
|
734
734
|
* @author Lucas Xu\r
|
|
@@ -767,7 +767,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
767
767
|
\r
|
|
768
768
|
return material;\r
|
|
769
769
|
}\r
|
|
770
|
-
`;var
|
|
770
|
+
`;var ed=`/**\r
|
|
771
771
|
* \u6591\u70B9\u6750\u8D28\u7740\u8272\u5668\r
|
|
772
772
|
* \u521B\u5EFA\u6591\u70B9\u6548\u679C\uFF0C\u4F7F\u7528\u7EC6\u80DE\u566A\u58F0\u751F\u6210\u6709\u673A\u6591\u70B9\u56FE\u6848\r
|
|
773
773
|
* @author Lucas Xu\r
|
|
@@ -799,7 +799,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
799
799
|
\r
|
|
800
800
|
return material;\r
|
|
801
801
|
}\r
|
|
802
|
-
`;var
|
|
802
|
+
`;var td=`/**\r
|
|
803
803
|
* \u7816\u5899\u6750\u8D28\u7740\u8272\u5668\r
|
|
804
804
|
* \u521B\u5EFA\u7816\u5899\u6548\u679C\uFF0C\u5305\u542B\u7816\u5757\u548C\u7802\u6D46\u7684\u7CBE\u786E\u8BA1\u7B97\r
|
|
805
805
|
* @author Lucas Xu\r
|
|
@@ -859,7 +859,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
859
859
|
\r
|
|
860
860
|
return material;\r
|
|
861
861
|
}\r
|
|
862
|
-
`;var
|
|
862
|
+
`;var id=`/**\r
|
|
863
863
|
* \u6C34\u6CE5\u6750\u8D28\u7740\u8272\u5668\r
|
|
864
864
|
* \u521B\u5EFA\u6C34\u6CE5\u8868\u9762\u6548\u679C\uFF0C\u5305\u542B\u9897\u7C92\u566A\u58F0\u548C\u7C97\u7CD9\u5EA6\u5904\u7406\r
|
|
865
865
|
* @author Lucas Xu\r
|
|
@@ -892,7 +892,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
892
892
|
\r
|
|
893
893
|
return material;\r
|
|
894
894
|
}\r
|
|
895
|
-
`;var
|
|
895
|
+
`;var rd=`/**\r
|
|
896
896
|
* \u4FB5\u8680\u6750\u8D28\u7740\u8272\u5668\r
|
|
897
897
|
* \u521B\u5EFA\u4FB5\u8680\u6548\u679C\uFF0C\u57FA\u4E8E\u65F6\u95F4\u53C2\u6570\u63A7\u5236\u6750\u8D28\u900F\u660E\u5EA6\r
|
|
898
898
|
* @author Lucas Xu\r
|
|
@@ -927,7 +927,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
927
927
|
\r
|
|
928
928
|
return material;\r
|
|
929
929
|
}\r
|
|
930
|
-
`;var
|
|
930
|
+
`;var sd=`/**\r
|
|
931
931
|
* \u523B\u9762\u6750\u8D28\u7740\u8272\u5668\r
|
|
932
932
|
* \u521B\u5EFA\u523B\u9762\u6548\u679C\uFF0C\u4F7F\u7528\u7EC6\u80DE\u566A\u58F0\u751F\u6210\u591A\u9762\u4F53\u5916\u89C2\r
|
|
933
933
|
* @author Lucas Xu\r
|
|
@@ -959,7 +959,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
959
959
|
\r
|
|
960
960
|
return material;\r
|
|
961
961
|
}\r
|
|
962
|
-
`;var
|
|
962
|
+
`;var od=`/**\r
|
|
963
963
|
* \u83F2\u6D85\u5C14\u6750\u8D28\u7740\u8272\u5668\r
|
|
964
964
|
* \u521B\u5EFA\u83F2\u6D85\u5C14\u6548\u679C\uFF0C\u57FA\u4E8E\u89C6\u89D2\u548C\u6CD5\u7EBF\u5939\u89D2\u6DF7\u5408\u53CD\u5C04\u548C\u6298\u5C04\r
|
|
965
965
|
* @author Lucas Xu\r
|
|
@@ -982,7 +982,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
982
982
|
\r
|
|
983
983
|
return material;\r
|
|
984
984
|
}\r
|
|
985
|
-
`;var
|
|
985
|
+
`;var ad=`/**\r
|
|
986
986
|
* \u8349\u5730\u6750\u8D28\u7740\u8272\u5668\r
|
|
987
987
|
* \u521B\u5EFA\u8349\u5730\u6548\u679C\uFF0C\u5305\u542B\u591A\u9891\u566A\u58F0\u548C\u8305\u8349\u7EB9\u7406\r
|
|
988
988
|
* @author Lucas Xu\r
|
|
@@ -1024,7 +1024,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1024
1024
|
\r
|
|
1025
1025
|
return material;\r
|
|
1026
1026
|
}\r
|
|
1027
|
-
`;var
|
|
1027
|
+
`;var nd=`/**\r
|
|
1028
1028
|
* \u53CD\u5C04\u6750\u8D28\u7740\u8272\u5668\r
|
|
1029
1029
|
* \u521B\u5EFA\u73AF\u5883\u53CD\u5C04\u6548\u679C\uFF0C\u57FA\u4E8E\u7ACB\u65B9\u4F53\u8D34\u56FE\u5B9E\u73B0\u955C\u9762\u53CD\u5C04\r
|
|
1030
1030
|
* @author Lucas Xu\r
|
|
@@ -1049,7 +1049,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1049
1049
|
\r
|
|
1050
1050
|
return material;\r
|
|
1051
1051
|
}\r
|
|
1052
|
-
`;var
|
|
1052
|
+
`;var ld=`/**\r
|
|
1053
1053
|
* \u6298\u5C04\u6750\u8D28\u7740\u8272\u5668\r
|
|
1054
1054
|
* \u521B\u5EFA\u6298\u5C04\u6548\u679C\uFF0C\u57FA\u4E8E\u7ACB\u65B9\u4F53\u8D34\u56FE\u548C\u6298\u5C04\u7387\u5B9E\u73B0\u5149\u7EBF\u6298\u5C04\r
|
|
1055
1055
|
* @author Lucas Xu\r
|
|
@@ -1076,7 +1076,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1076
1076
|
\r
|
|
1077
1077
|
return material;\r
|
|
1078
1078
|
}\r
|
|
1079
|
-
`;var
|
|
1079
|
+
`;var hd=`/**\r
|
|
1080
1080
|
* \u624E\u67D3\u6750\u8D28\u7740\u8272\u5668\r
|
|
1081
1081
|
* \u521B\u5EFA\u624E\u67D3\u6548\u679C\uFF0C\u4F7F\u7528\u566A\u58F0\u751F\u6210\u989C\u8272\u6E10\u53D8\u56FE\u6848\r
|
|
1082
1082
|
* @author Lucas Xu\r
|
|
@@ -1107,7 +1107,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1107
1107
|
\r
|
|
1108
1108
|
return material;\r
|
|
1109
1109
|
}\r
|
|
1110
|
-
`;var
|
|
1110
|
+
`;var cd=`/**\r
|
|
1111
1111
|
* \u6728\u6750\u6750\u8D28\u7740\u8272\u5668\r
|
|
1112
1112
|
* \u521B\u5EFA\u6728\u6750\u7EB9\u7406\u6548\u679C\uFF0C\u5305\u542B\u5E74\u8F6E\u548C\u6728\u7EB9\u7EB9\u7406\r
|
|
1113
1113
|
* @author Lucas Xu\r
|
|
@@ -1159,7 +1159,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1159
1159
|
\r
|
|
1160
1160
|
return material;\r
|
|
1161
1161
|
}\r
|
|
1162
|
-
`;r.ShaderSource._czmBuiltinsAndUniforms.czm_cellular=
|
|
1162
|
+
`;r.ShaderSource._czmBuiltinsAndUniforms.czm_cellular=Qc;r.ShaderSource._czmBuiltinsAndUniforms.czm_snoise=Kc;r.Material.AsphaltType="Asphalt";r.Material._materialCache.addMaterial(r.Material.AsphaltType,{fabric:{type:r.Material.AsphaltType,uniforms:{asphaltColor:new r.Color(.15,.15,.15,1),bumpSize:.02,roughness:.2},source:$c},translucent:function(l){return l.uniforms.asphaltColor.alpha<1}});r.Material.BlobType="Blob";r.Material._materialCache.addMaterial(r.Material.BlobType,{fabric:{type:r.Material.BlobType,uniforms:{lightColor:new r.Color(1,1,1,.5),darkColor:new r.Color(0,0,1,.5),frequency:10},source:ed},translucent:function(l){var e=l.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});r.Material.BrickType="Brick";r.Material._materialCache.addMaterial(r.Material.BrickType,{fabric:{type:r.Material.BrickType,uniforms:{brickColor:new r.Color(.6,.3,.1,1),mortarColor:new r.Color(.8,.8,.7,1),brickSize:new r.Cartesian2(.3,.15),brickPct:new r.Cartesian2(.9,.85),brickRoughness:.2,mortarRoughness:.1},source:td},translucent:function(l){var e=l.uniforms;return e.brickColor.alpha<1||e.mortarColor.alpha<1}});r.Material.CementType="Cement";r.Material._materialCache.addMaterial(r.Material.CementType,{fabric:{type:r.Material.CementType,uniforms:{cementColor:new r.Color(.95,.95,.85,1),grainScale:.01,roughness:.3},source:id},translucent:function(l){return l.uniforms.cementColor.alpha<1}});r.Material.ErosionType="Erosion";r.Material._materialCache.addMaterial(r.Material.ErosionType,{fabric:{type:r.Material.ErosionType,uniforms:{color:new r.Color(1,0,0,.5),time:1},source:rd},translucent:function(l){return l.uniforms.color.alpha<1}});r.Material.FacetType="Facet";r.Material._materialCache.addMaterial(r.Material.FacetType,{fabric:{type:r.Material.FacetType,uniforms:{lightColor:new r.Color(.25,.25,.25,.75),darkColor:new r.Color(.75,.75,.75,.75),frequency:10},source:sd},translucent:function(l){var e=l.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});r.Material.FresnelType="Fresnel";r.Material._materialCache.addMaterial(r.Material.FresnelType,{fabric:{type:r.Material.FresnelType,materials:{reflection:{type:r.Material.ReflectionType},refraction:{type:r.Material.RefractionType}},source:od},translucent:!1});r.Material.GrassType="Grass";r.Material._materialCache.addMaterial(r.Material.GrassType,{fabric:{type:r.Material.GrassType,uniforms:{grassColor:new r.Color(.25,.4,.1,1),dirtColor:new r.Color(.1,.1,.1,1),patchiness:1.5},source:ad},translucent:function(l){var e=l.uniforms;return e.grassColor.alpha<1||e.dirtColor.alpha<1}});r.Material.ReflectionType="Reflection";r.Material._materialCache.addMaterial(r.Material.ReflectionType,{fabric:{type:r.Material.ReflectionType,uniforms:{cubeMap:r.Material.DefaultCubeMapId,channels:"rgb"},source:nd},translucent:!1});r.Material.RefractionType="Refraction";r.Material._materialCache.addMaterial(r.Material.RefractionType,{fabric:{type:r.Material.RefractionType,uniforms:{cubeMap:r.Material.DefaultCubeMapId,channels:"rgb",indexOfRefractionRatio:.9},source:ld},translucent:!1});r.Material.TyeDyeType="TieDye";r.Material._materialCache.addMaterial(r.Material.TyeDyeType,{fabric:{type:r.Material.TyeDyeType,uniforms:{lightColor:new r.Color(1,1,0,.75),darkColor:new r.Color(1,0,0,.75),frequency:5},source:hd},translucent:function(l){var e=l.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});r.Material.WoodType="Wood";r.Material._materialCache.addMaterial(r.Material.WoodType,{fabric:{type:r.Material.WoodType,uniforms:{lightWoodColor:new r.Color(.6,.3,.1,1),darkWoodColor:new r.Color(.4,.2,.07,1),ringFrequency:3,noiseScale:new r.Cartesian2(.7,.5),grainFrequency:27},source:cd},translucent:function(l){let e=l.uniforms;return e.lightWoodColor.alpha<1||e.darkWoodColor.alpha<1}});var dd=`/**\r
|
|
1163
1163
|
* \u5706\u5F62\u6A21\u7CCA\u6750\u8D28\u7740\u8272\u5668\r
|
|
1164
1164
|
* \u521B\u5EFA\u52A8\u6001\u6A21\u7CCA\u5706\u5F62\u6548\u679C\uFF0C\u5706\u5F62\u534A\u5F84\u968F\u65F6\u95F4\u53D8\u5316\r
|
|
1165
1165
|
* @author Lucas Xu\r
|
|
@@ -1200,7 +1200,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1200
1200
|
\r
|
|
1201
1201
|
return material;\r
|
|
1202
1202
|
}\r
|
|
1203
|
-
`;var
|
|
1203
|
+
`;var pd=`/**\r
|
|
1204
1204
|
* \u5706\u5F62\u6269\u6563\u6750\u8D28\u7740\u8272\u5668\r
|
|
1205
1205
|
* \u7528\u4E8E\u521B\u5EFA\u5706\u5F62\u6269\u6563\u6548\u679C\u7684\u7247\u6BB5\u7740\u8272\u5668\r
|
|
1206
1206
|
* @author Lucas Xu\r
|
|
@@ -1254,7 +1254,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1254
1254
|
material.diffuse = flagColor.rgb;\r
|
|
1255
1255
|
return material;\r
|
|
1256
1256
|
}\r
|
|
1257
|
-
`;var
|
|
1257
|
+
`;var md=`/**\r
|
|
1258
1258
|
* \u5706\u5F62\u6DE1\u5165\u6DE1\u51FA\u6750\u8D28\u7740\u8272\u5668\r
|
|
1259
1259
|
* \u521B\u5EFA\u57FA\u4E8E\u65F6\u95F4\u7684\u5706\u5F62\u6DE1\u5165\u6DE1\u51FA\u6548\u679C\uFF0C\u8D85\u51FA\u534A\u5F84\u7684\u90E8\u5206\u4F1A\u88AB\u4E22\u5F03\r
|
|
1260
1260
|
* @author Lucas Xu\r
|
|
@@ -1294,7 +1294,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1294
1294
|
\r
|
|
1295
1295
|
return material;\r
|
|
1296
1296
|
}\r
|
|
1297
|
-
`;var
|
|
1297
|
+
`;var ud=`/**\r
|
|
1298
1298
|
* \u5706\u5F62\u8109\u51B2\u6750\u8D28\u7740\u8272\u5668\r
|
|
1299
1299
|
* \u521B\u5EFA\u590D\u6742\u7684\u5706\u5F62\u8109\u51B2\u6CE2\u52A8\u6548\u679C\uFF0C\u4F7F\u7528\u4E09\u89D2\u51FD\u6570\u751F\u6210\u52A8\u6001\u6CE2\u7EB9\r
|
|
1300
1300
|
* @author Lucas Xu\r
|
|
@@ -1338,7 +1338,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1338
1338
|
\r
|
|
1339
1339
|
return material;\r
|
|
1340
1340
|
}\r
|
|
1341
|
-
`;var
|
|
1341
|
+
`;var fd=`/**\r
|
|
1342
1342
|
* \u5706\u5F62\u73AF\u6750\u8D28\u7740\u8272\u5668\r
|
|
1343
1343
|
* \u521B\u5EFA\u5706\u5F62\u73AF\u6548\u679C\uFF0C\u5305\u542B\u5185\u5916\u73AF\u7684\u900F\u660E\u5EA6\u8BA1\u7B97\r
|
|
1344
1344
|
* @author Lucas Xu\r
|
|
@@ -1382,7 +1382,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1382
1382
|
\r
|
|
1383
1383
|
return material;\r
|
|
1384
1384
|
}\r
|
|
1385
|
-
`;var
|
|
1385
|
+
`;var _d=`/**\r
|
|
1386
1386
|
* \u5706\u5F62\u65CB\u8F6C\u6750\u8D28\u7740\u8272\u5668\r
|
|
1387
1387
|
* \u521B\u5EFA\u5706\u5F62\u65CB\u8F6C\u6548\u679C\uFF0C\u4F7F\u7528\u7EB9\u7406\u8D34\u56FE\u548C\u65CB\u8F6C\u77E9\u9635\r
|
|
1388
1388
|
* @author Lucas Xu\r
|
|
@@ -1433,7 +1433,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1433
1433
|
\r
|
|
1434
1434
|
return material;\r
|
|
1435
1435
|
}\r
|
|
1436
|
-
`;var
|
|
1436
|
+
`;var gd=`/**\r
|
|
1437
1437
|
* \u5706\u5F62\u626B\u63CF\u6750\u8D28\u7740\u8272\u5668\r
|
|
1438
1438
|
* \u521B\u5EFA\u5706\u5F62\u626B\u63CF\u6548\u679C\uFF0C\u5305\u542B\u591A\u4E2A\u540C\u5FC3\u5706\u73AF\u7684\u900F\u660E\u5EA6\u53D8\u5316\r
|
|
1439
1439
|
* @author Lucas Xu\r
|
|
@@ -1495,7 +1495,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)\r
|
|
|
1495
1495
|
\r
|
|
1496
1496
|
return material;\r
|
|
1497
1497
|
}\r
|
|
1498
|
-
`;var
|
|
1498
|
+
`;var yd=`/**\r
|
|
1499
1499
|
* \u5706\u5F62\u87BA\u65CB\u6750\u8D28\u7740\u8272\u5668\r
|
|
1500
1500
|
* \u521B\u5EFA\u5706\u5F62\u87BA\u65CB\u6548\u679C\uFF0C\u4F7F\u7528\u65CB\u8F6C\u77E9\u9635\u548C\u4E09\u89D2\u51FD\u6570\u751F\u6210\u87BA\u65CB\u56FE\u6848\r
|
|
1501
1501
|
* @author Lucas Xu\r
|
|
@@ -1555,7 +1555,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1555
1555
|
\r
|
|
1556
1556
|
return material;\r
|
|
1557
1557
|
}\r
|
|
1558
|
-
`;var
|
|
1558
|
+
`;var vd=`/**\r
|
|
1559
1559
|
* \u5706\u5F62\u53D8\u5316\u6750\u8D28\u7740\u8272\u5668\r
|
|
1560
1560
|
* \u521B\u5EFA\u5706\u5F62\u53D8\u5316\u6548\u679C\uFF0C\u4F7F\u7528\u4E09\u89D2\u51FD\u6570\u751F\u6210\u52A8\u6001\u53D8\u5316\u7684\u5706\u5F62\u56FE\u6848\r
|
|
1561
1561
|
* @author Lucas Xu\r
|
|
@@ -1602,7 +1602,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1602
1602
|
\r
|
|
1603
1603
|
return material;\r
|
|
1604
1604
|
}\r
|
|
1605
|
-
`;var
|
|
1605
|
+
`;var wd=`/**\r
|
|
1606
1606
|
* \u5706\u5F62\u6CE2\u7EB9\u6750\u8D28\u7740\u8272\u5668\r
|
|
1607
1607
|
* \u521B\u5EFA\u5706\u5F62\u6CE2\u7EB9\u6548\u679C\uFF0C\u652F\u6301\u5355\u6CE2\u7EB9\u548C\u591A\u6CE2\u7EB9\u6A21\u5F0F\r
|
|
1608
1608
|
* @author Lucas Xu\r
|
|
@@ -1688,7 +1688,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)\r
|
|
|
1688
1688
|
return material;\r
|
|
1689
1689
|
}\r
|
|
1690
1690
|
\r
|
|
1691
|
-
`;r.Material.CircleBlurType="CircleBlur";r.Material._materialCache.addMaterial(r.Material.CircleBlurType,{fabric:{type:r.Material.CircleBlurType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:
|
|
1691
|
+
`;r.Material.CircleBlurType="CircleBlur";r.Material._materialCache.addMaterial(r.Material.CircleBlurType,{fabric:{type:r.Material.CircleBlurType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:dd},translucent:function(l){return!0}});r.Material.CircleDiffuseType="CircleDiffuse";r.Material._materialCache.addMaterial(r.Material.CircleDiffuseType,{fabric:{type:r.Material.CircleDiffuseType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:pd},translucent:function(l){return!0}});r.Material.CircleFadeType="CircleFade";r.Material._materialCache.addMaterial(r.Material.CircleFadeType,{fabric:{type:r.Material.CircleFadeType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:md},translucent:function(l){return!0}});r.Material.CirclePulseType="CirclePulse";r.Material._materialCache.addMaterial(r.Material.CirclePulseType,{fabric:{type:r.Material.CirclePulseType,uniforms:{color:new r.Color(1,0,0,.7),speed:12},source:ud},translucent:function(l){return!0}});r.Material.CircleRingType="CircleRing";r.Material._materialCache.addMaterial(r.Material.CircleRingType,{fabric:{type:r.Material.CircleRingType,uniforms:{color:new r.Color(1,0,0,.7)},source:fd},translucent:function(l){return!0}});r.Material.CircleRotateType="CircleRotate";r.Material._materialCache.addMaterial(r.Material.CircleRotateType,{fabric:{type:r.Material.CircleRotateType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId},source:_d},translucent:function(l){return!0}});r.Material.CircleScanType="CircleScan";r.Material._materialCache.addMaterial(r.Material.CircleScanType,{fabric:{type:r.Material.CircleScanType,uniforms:{color:new r.Color(1,0,0,.7),speed:1},source:gd},translucent:function(l){return!0}});r.Material.CircleSpiralType="CircleSpiral";r.Material._materialCache.addMaterial(r.Material.CircleSpiralType,{fabric:{type:r.Material.CircleSpiralType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:yd},translucent:function(l){return!0}});r.Material.CircleVaryType="CircleVary";r.Material._materialCache.addMaterial(r.Material.CircleVaryType,{fabric:{type:r.Material.CircleVaryType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:vd},translucent:function(l){return!0}});r.Material.CircleWaveType="CircleWave";r.Material._materialCache.addMaterial(r.Material.CircleWaveType,{fabric:{type:r.Material.CircleWaveType,uniforms:{color:new r.Color(1,0,0,.7),speed:3,count:1,gradient:.1},source:wd},translucent:function(l){return!0}});var Cd=`/**\r
|
|
1692
1692
|
* \u5706\u67F1\u4F53\u6DE1\u5165\u6DE1\u51FA\u6750\u8D28\u7740\u8272\u5668\r
|
|
1693
1693
|
* \u521B\u5EFA\u5706\u67F1\u4F53\u6DE1\u5165\u6DE1\u51FA\u6548\u679C\uFF0C\u5305\u542B\u57FA\u4E8E\u65F6\u95F4\u7684\u900F\u660E\u5EA6\u53D8\u5316\r
|
|
1694
1694
|
* @author Lucas Xu\r
|
|
@@ -1713,7 +1713,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1713
1713
|
material.alpha = temp.a;\r
|
|
1714
1714
|
return material;\r
|
|
1715
1715
|
}\r
|
|
1716
|
-
`;var
|
|
1716
|
+
`;var xd=`/**\r
|
|
1717
1717
|
* \u5706\u67F1\u4F53\u7C92\u5B50\u6750\u8D28\u7740\u8272\u5668\r
|
|
1718
1718
|
* \u521B\u5EFA\u5706\u67F1\u4F53\u7C92\u5B50\u6548\u679C\uFF0C\u5305\u542B\u7EB9\u7406\u52A8\u753B\u548C\u5782\u76F4\u6E10\u53D8\r
|
|
1719
1719
|
* @author Lucas Xu\r
|
|
@@ -1744,7 +1744,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1744
1744
|
material.alpha = alpha * pow(1. - st.t, color.a);\r
|
|
1745
1745
|
return material;\r
|
|
1746
1746
|
}\r
|
|
1747
|
-
`;r.Material.CylinderFadeType="CylinderFade";r.Material._materialCache.addMaterial(r.Material.CylinderFadeType,{fabric:{type:r.Material.CylinderFadeType,uniforms:{color:new r.Color(1,0,0,.7)},source:
|
|
1747
|
+
`;r.Material.CylinderFadeType="CylinderFade";r.Material._materialCache.addMaterial(r.Material.CylinderFadeType,{fabric:{type:r.Material.CylinderFadeType,uniforms:{color:new r.Color(1,0,0,.7)},source:Cd},translucent:function(l){return!0}});r.Material.CylinderParticlesType="CylinderParticles";r.Material._materialCache.addMaterial(r.Material.CylinderParticlesType,{fabric:{type:r.Material.CylinderParticlesType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId},source:xd},translucent:function(l){return!0}});var Td=`/**\r
|
|
1748
1748
|
* \u692D\u5706\u4F53\u7535\u5149\u6750\u8D28\u7740\u8272\u5668\r
|
|
1749
1749
|
* \u521B\u5EFA\u692D\u5706\u4F53\u7535\u5149\u6548\u679C\uFF0C\u4F7F\u7528\u5206\u5F62\u5E03\u6717\u8FD0\u52A8(FBM)\u751F\u6210\u7535\u5149\u7EB9\u7406\r
|
|
1750
1750
|
* @author Lucas Xu\r
|
|
@@ -1838,7 +1838,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)\r
|
|
|
1838
1838
|
material.alpha = temp.a * 2.0;\r
|
|
1839
1839
|
return material;\r
|
|
1840
1840
|
}\r
|
|
1841
|
-
`;var
|
|
1841
|
+
`;var Ed=`/**\r
|
|
1842
1842
|
* \u692D\u5706\u4F53\u8F68\u8FF9\u6750\u8D28\u7740\u8272\u5668\r
|
|
1843
1843
|
* \u521B\u5EFA\u692D\u5706\u4F53\u8F68\u8FF9\u52A8\u753B\u6548\u679C\uFF0C\u5305\u542B\u5782\u76F4\u65B9\u5411\u7684\u8F68\u8FF9\u6D41\u52A8\r
|
|
1844
1844
|
* @author Lucas Xu\r
|
|
@@ -1865,7 +1865,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1865
1865
|
material.diffuse = color.rgb;\r
|
|
1866
1866
|
return material;\r
|
|
1867
1867
|
}\r
|
|
1868
|
-
`;r.Material.EllipsoidElectricType="EllipsoidElectric";r.Material._materialCache.addMaterial(r.Material.EllipsoidElectricType,{fabric:{type:r.Material.EllipsoidElectricType,uniforms:{color:new r.Color(1,0,0,.7),speed:1},source:
|
|
1868
|
+
`;r.Material.EllipsoidElectricType="EllipsoidElectric";r.Material._materialCache.addMaterial(r.Material.EllipsoidElectricType,{fabric:{type:r.Material.EllipsoidElectricType,uniforms:{color:new r.Color(1,0,0,.7),speed:1},source:Td},translucent:function(l){return!0}});r.Material.EllipsoidTrailType="EllipsoidTrail";r.Material._materialCache.addMaterial(r.Material.EllipsoidTrailType,{fabric:{type:r.Material.EllipsoidTrailType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:Ed},translucent:function(l){return!0}});var Pd=`/**\r
|
|
1869
1869
|
* \u6298\u7EBF\u95EA\u70C1\u6750\u8D28\u7740\u8272\u5668\r
|
|
1870
1870
|
* \u521B\u5EFA\u6298\u7EBF\u95EA\u70C1\u6548\u679C\uFF0C\u4EAE\u5EA6\u968F\u65F6\u95F4\u53D8\u5316\r
|
|
1871
1871
|
* @author Lucas Xu\r
|
|
@@ -1898,7 +1898,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1898
1898
|
\r
|
|
1899
1899
|
return material;\r
|
|
1900
1900
|
}\r
|
|
1901
|
-
`;var
|
|
1901
|
+
`;var bd=`/**\r
|
|
1902
1902
|
* \u6298\u7EBF\u6D41\u52A8\u6750\u8D28\u7740\u8272\u5668\r
|
|
1903
1903
|
* \u7528\u4E8E\u521B\u5EFA\u6298\u7EBF\u6D41\u52A8\u6548\u679C\u7684\u7247\u6BB5\u7740\u8272\u5668\r
|
|
1904
1904
|
* @author Lucas Xu\r
|
|
@@ -1936,7 +1936,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1936
1936
|
material.alpha = alpha;\r
|
|
1937
1937
|
return material;\r
|
|
1938
1938
|
}\r
|
|
1939
|
-
`;var
|
|
1939
|
+
`;var Md=`/**\r
|
|
1940
1940
|
* \u6298\u7EBF\u56FE\u50CF\u8F68\u8FF9\u6750\u8D28\u7740\u8272\u5668\r
|
|
1941
1941
|
* \u521B\u5EFA\u6298\u7EBF\u56FE\u50CF\u8F68\u8FF9\u6548\u679C\uFF0C\u652F\u6301\u7EB9\u7406\u52A8\u753B\u548C\u989C\u8272\u6DF7\u5408\r
|
|
1942
1942
|
* @author Lucas Xu\r
|
|
@@ -1985,7 +1985,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
1985
1985
|
\r
|
|
1986
1986
|
return material;\r
|
|
1987
1987
|
}\r
|
|
1988
|
-
`;var
|
|
1988
|
+
`;var Ad=`/**\r
|
|
1989
1989
|
* \u6298\u7EBF\u5149\u7167\u6750\u8D28\u7740\u8272\u5668\r
|
|
1990
1990
|
* \u521B\u5EFA\u6298\u7EBF\u5149\u7167\u6548\u679C\uFF0C\u7ED3\u5408\u7EB9\u7406\u548C\u989C\u8272\u751F\u6210\u53D1\u5149\u6548\u679C\r
|
|
1991
1991
|
* @author Lucas Xu\r
|
|
@@ -2020,7 +2020,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2020
2020
|
\r
|
|
2021
2021
|
return material;\r
|
|
2022
2022
|
}\r
|
|
2023
|
-
`;var
|
|
2023
|
+
`;var Sd=`/**\r
|
|
2024
2024
|
* \u6298\u7EBF\u5149\u7167\u8F68\u8FF9\u6750\u8D28\u7740\u8272\u5668\r
|
|
2025
2025
|
* \u521B\u5EFA\u6298\u7EBF\u5149\u7167\u8F68\u8FF9\u6548\u679C\uFF0C\u5305\u542B\u4E2D\u5FC3\u9AD8\u4EAE\u548C\u6D41\u52A8\u52A8\u753B\r
|
|
2026
2026
|
* @author Lucas Xu\r
|
|
@@ -2069,7 +2069,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2069
2069
|
\r
|
|
2070
2070
|
return material;\r
|
|
2071
2071
|
}\r
|
|
2072
|
-
`;var
|
|
2072
|
+
`;var Id=`/**\r
|
|
2073
2073
|
* \u6298\u7EBF\u8F68\u8FF9\u6750\u8D28\u7740\u8272\u5668\r
|
|
2074
2074
|
* \u521B\u5EFA\u6298\u7EBF\u8F68\u8FF9\u52A8\u753B\u6548\u679C\uFF0C\u5305\u542B\u6D41\u52A8\u8F68\u8FF9\u548C\u900F\u660E\u5EA6\u6E10\u53D8\r
|
|
2075
2075
|
* @author Lucas Xu\r
|
|
@@ -2094,7 +2094,612 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2094
2094
|
material.alpha = color.a * fract(st.s-time);\r
|
|
2095
2095
|
return material;\r
|
|
2096
2096
|
}\r
|
|
2097
|
-
`;
|
|
2097
|
+
`;var Ld=`#ifdef GL_OES_standard_derivatives
|
|
2098
|
+
#extension GL_OES_standard_derivatives : enable
|
|
2099
|
+
#endif
|
|
2100
|
+
|
|
2101
|
+
|
|
2102
|
+
uniform vec4 color;
|
|
2103
|
+
uniform float dashLength;
|
|
2104
|
+
uniform float dashPattern;
|
|
2105
|
+
|
|
2106
|
+
uniform float maskLength;
|
|
2107
|
+
uniform float outlineWidth;
|
|
2108
|
+
uniform vec4 outlineColor;
|
|
2109
|
+
|
|
2110
|
+
in float v_polylineAngle;
|
|
2111
|
+
in float v_width; // \u7EBF\u6BB5\u5BBD\u5EA6
|
|
2112
|
+
mat2 rotate(float rad) {
|
|
2113
|
+
float c = cos(rad);
|
|
2114
|
+
float s = sin(rad);
|
|
2115
|
+
return mat2(
|
|
2116
|
+
c, s,
|
|
2117
|
+
-s, c
|
|
2118
|
+
);
|
|
2119
|
+
}
|
|
2120
|
+
// \u8BA1\u7B97\u7ED9\u5B9A\u8F93\u5165\u7684\u6750\u8D28
|
|
2121
|
+
// \u6805\u680F\u5F62\u72B6\u7684polyline\u662F\u4EE5\u865A\u7EBF\u6750\u8D28\u672A\u57FA\u7840\uFF0C\u5F80\u865A\u7EBF\u7A7A\u9699\u91CC\u9762\u586B\u5145\u5916\u8F6E\u5ED3\u662F\u900F\u660E\u7684\u5916\u8F6E\u5ED3\u7EBF\u6240\u7ED8\u5236\u7684
|
|
2122
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
2123
|
+
{
|
|
2124
|
+
// \u83B7\u53D6\u9ED8\u8BA4\u7684\u6750\u8D28
|
|
2125
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
2126
|
+
|
|
2127
|
+
// \u5916\u8F6E\u5ED3\u7EB9\u7406\u90E8\u5206
|
|
2128
|
+
// \u83B7\u53D6\u6807\u51C6\u5316\u7684\u7EB9\u7406\u5750\u6807
|
|
2129
|
+
vec2 st = materialInput.st;
|
|
2130
|
+
//v_width\u662F\u6574\u4E2A\u7EBF\u5BBD\uFF0CoutlineWidth\u662F\u8F6E\u5ED3\u7EBF\u5BBD\uFF0C\u4E24\u8005\u5DEE\u503C\u7684\u4E00\u534A\u5C31\u662F\u5916\u8F6E\u5ED3\u7EBF\u5185\u90E8\u7EBF\u6761\u7684\u5BBD\u5EA6
|
|
2131
|
+
float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;
|
|
2132
|
+
// \u5224\u65AD\u5F53\u524D\u7684\u7EB9\u7406\u5750\u6807\u662F\u5426\u5728\u5185\u90E8\u7EBF\u6761\u8303\u56F4\u5185\uFF0C\u5982\u679C\u5728\u8303\u56F4\u5185\uFF0Cb\u503C\u5C06\u4E3A1\uFF0C\u5426\u5219\u4E3A0\u3002step(edge, x)\u51FD\u6570\u4F1A\u8FD4\u56DE\u4E00\u4E2A\u503C\uFF0C\u5982\u679Cx < edge\uFF0C\u8FD4\u56DE0.0\uFF0C\u5426\u5219\u8FD4\u56DE1.0
|
|
2133
|
+
float b = step(0.5 - halfInteriorWidth, st.t);
|
|
2134
|
+
b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);
|
|
2135
|
+
//\u8BA1\u7B97\u5F53\u524D\u7247\u5143\u8DDD\u79BB\u6700\u8FD1\u7684\u989C\u8272\u5206\u9694\u7EBF\u7684\u8DDD\u79BB\uFF0C\u8FD9\u4E2A\u8DDD\u79BB\u5C06\u88AB\u7528\u4E8E\u540E\u9762\u7684\u6297\u952F\u9F7F\u5904\u7406\u3002
|
|
2136
|
+
float d1 = abs(st.t - (0.5 - halfInteriorWidth));
|
|
2137
|
+
float d2 = abs(st.t - (0.5 + halfInteriorWidth));
|
|
2138
|
+
float dist = min(d1, d2);
|
|
2139
|
+
// \u6839\u636Eb\u7684\u503C\u9009\u62E9\u989C\u8272\uFF0C\u5982\u679Cb\u662F1\uFF0C\u5219\u9009\u62E9color\uFF0C\u5426\u5219\u9009\u62E9outlineColor\u3002\u8FD9\u5C31\u786E\u5B9A\u4E86\u5F53\u524D\u7247\u5143\u7684\u57FA\u7840\u989C\u8272
|
|
2140
|
+
vec4 currentColor = mix(outlineColor, color, b);
|
|
2141
|
+
// \u4F7F\u7528czm_antialias()\u51FD\u6570\u8FDB\u884C\u6297\u952F\u9F7F\u5904\u7406\uFF0C\u8F93\u5165\u53C2\u6570\u5305\u62EC\u8F6E\u5ED3\u8272\uFF0C\u5185\u90E8\u8272\uFF0C\u5F53\u524D\u8272\u548C\u8DDD\u79BB
|
|
2142
|
+
vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);
|
|
2143
|
+
// \u5BF9\u7ECF\u8FC7\u6297\u952F\u9F7F\u5904\u7406\u540E\u7684\u989C\u8272\u8FDB\u884C\u4F3D\u9A6C\u6821\u6B63
|
|
2144
|
+
vec4 gapColor = czm_gammaCorrect(outColor);
|
|
2145
|
+
|
|
2146
|
+
|
|
2147
|
+
// \u865A\u7EBF\u7EB9\u7406\u90E8\u5206
|
|
2148
|
+
// \u8BA1\u7B97\u65CB\u8F6C\u540E\u7684\u7247\u5143\u4F4D\u7F6E\u3002
|
|
2149
|
+
vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;
|
|
2150
|
+
// \u8BA1\u7B97\u5F53\u524D\u7247\u5143\u5728\u865A\u7EBF\u6A21\u5F0F\u4E2D\u7684\u4F4D\u7F6E\u3002
|
|
2151
|
+
float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));
|
|
2152
|
+
// \u8BA1\u7B97\u5BF9\u5E94\u865A\u7EBF\u6A21\u5F0F\u7684\u7D22\u5F15\u4F4D\u7F6E\u3002
|
|
2153
|
+
float maskIndex = floor(dashPosition * maskLength);
|
|
2154
|
+
// \u901A\u8FC7\u4F7F\u7528\u865A\u7EBF\u6A21\u5F0F\u548C\u7D22\u5F15\u4F4D\u7F6E\uFF0C\u8BA1\u7B97\u5F53\u524D\u4F4D\u7F6E\u662F\u5426\u5E94\u6709\u7EBF\u6761\u3002
|
|
2155
|
+
float maskTest = floor(dashPattern / pow(2.0, maskIndex));
|
|
2156
|
+
// \u5982\u679C\u5F53\u524D\u4F4D\u7F6E\u5E94\u4E3A\u865A\u7EBF\u7684\u95F4\u9694\u90E8\u5206\uFF0C\u5219\u989C\u8272\u8BBE\u4E3AgapColor\uFF0C\u5426\u5219\u8BBE\u4E3Acolor\u3002
|
|
2157
|
+
vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;
|
|
2158
|
+
if (fragColor.a < 0.005) {
|
|
2159
|
+
discard;
|
|
2160
|
+
}
|
|
2161
|
+
// \u8BBE\u7F6E\u6750\u8D28\u7684\u989C\u8272\u548C\u900F\u660E\u5EA6\uFF0C\u540E\u8FD4\u56DE\u5904\u7406\u8FC7\u540E\u7684\u6750\u8D28
|
|
2162
|
+
fragColor = czm_gammaCorrect(fragColor);
|
|
2163
|
+
material.emission = fragColor.rgb;
|
|
2164
|
+
material.alpha = fragColor.a;
|
|
2165
|
+
return material;
|
|
2166
|
+
}
|
|
2167
|
+
`;var Dd=`#ifdef GL_OES_standard_derivatives
|
|
2168
|
+
#extension GL_OES_standard_derivatives : enable
|
|
2169
|
+
#endif
|
|
2170
|
+
|
|
2171
|
+
uniform vec4 color;
|
|
2172
|
+
uniform float repeatFactor;// \u91CD\u590D\u7BAD\u5934\u7684\u6B21\u6570
|
|
2173
|
+
uniform bool antiClockWise; // \u786E\u5B9A\u7BAD\u5934\u7684\u65B9\u5411
|
|
2174
|
+
|
|
2175
|
+
// \u4E00\u4E2A\u8F85\u52A9\u51FD\u6570\uFF0C\u7ED9\u5B9A\u4E24\u70B9(p0, p1)\u548C\u4E00\u4E2Ax\u5750\u6807\uFF0C\u8FD4\u56DE\u76F4\u7EBF\u4E0A\u5BF9\u5E94\u7684y\u5750\u6807
|
|
2176
|
+
float getPointOnLine(vec2 p0, vec2 p1, float x)
|
|
2177
|
+
{
|
|
2178
|
+
float slope = (p0.y - p1.y) / (p0.x - p1.x);// \u8BA1\u7B97\u659C\u7387
|
|
2179
|
+
return slope * (x - p0.x) + p0.y;// \u4F7F\u7528\u659C\u7387\u516C\u5F0F\u8FD4\u56DEy\u5750\u6807
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
// \u4E3B\u6750\u8D28\u51FD\u6570\uFF0C\u5C06\u88ABCesium\u8C03\u7528\u4EE5\u83B7\u5F97\u6BCF\u4E2A\u7247\u5143\u7684\u6750\u8D28\u5C5E\u6027
|
|
2183
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
2184
|
+
{
|
|
2185
|
+
czm_material material = czm_getDefaultMaterial(materialInput);// \u83B7\u53D6\u9ED8\u8BA4\u6750\u8D28
|
|
2186
|
+
|
|
2187
|
+
vec2 st = materialInput.st;// \u83B7\u53D6\u5F53\u524D\u7247\u5143\u7684\u7EB9\u7406\u5750\u6807
|
|
2188
|
+
|
|
2189
|
+
if (antiClockWise) { // \u6839\u636EantiClockWise\u7684\u503C\u9009\u62E9\u6027\u5730\u7FFB\u8F6Cs\u5750\u6807
|
|
2190
|
+
st.s = 1.0 - st.s;
|
|
2191
|
+
}
|
|
2192
|
+
|
|
2193
|
+
float arrowWidth = 1.0 / repeatFactor;// \u6BCF\u4E2A\u7BAD\u5934\u7684\u5BBD\u5EA6
|
|
2194
|
+
|
|
2195
|
+
// \u4F7F\u7528mod\u51FD\u6570\u5C06\u7247\u5143\u7684s\u5750\u6807\u6620\u5C04\u5230[0, arrowWidth]\u7684\u8303\u56F4\u5185\uFF0C\u4ECE\u800C\u5B9E\u73B0\u7BAD\u5934\u7684\u91CD\u590D
|
|
2196
|
+
st.s = mod(st.s, arrowWidth) / arrowWidth;
|
|
2197
|
+
|
|
2198
|
+
// \u5982\u679C\u53EF\u7528\uFF0C\u4F7F\u7528fwidth\u51FD\u6570\u6765\u83B7\u5F97\u7BAD\u5934\u7684\u5BBD\u5EA6\uFF0C\u5426\u5219\u4F7F\u7528\u56FA\u5B9A\u503C
|
|
2199
|
+
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
|
|
2200
|
+
float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;
|
|
2201
|
+
#else
|
|
2202
|
+
float base = 0.995;
|
|
2203
|
+
#endif
|
|
2204
|
+
|
|
2205
|
+
vec2 center = vec2(1.0, 0.5);// \u7BAD\u5934\u7684\u9876\u70B9\u5750\u6807
|
|
2206
|
+
|
|
2207
|
+
// \u589E\u5927\u7BAD\u5934\u7684\u5C3A\u5BF8\u6765\u8986\u76D6\u7A7A\u9699
|
|
2208
|
+
center.s += 0.01;
|
|
2209
|
+
|
|
2210
|
+
// \u8BA1\u7B97\u7BAD\u5934\u4E0A\u90E8\u548C\u4E0B\u90E8\u76F4\u7EBF\u4E0A\u7684\u70B9
|
|
2211
|
+
float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
|
|
2212
|
+
float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);
|
|
2213
|
+
|
|
2214
|
+
float halfWidth = 0.15;// \u7BAD\u5934\u7684\u534A\u5BBD
|
|
2215
|
+
// \u8BA1\u7B97\u7BAD\u5934\u4E3B\u4F53\u90E8\u5206\u7684\u7EB9\u7406\u5750\u6807
|
|
2216
|
+
float s = step(0.5 - halfWidth, st.t);
|
|
2217
|
+
s *= 1.0 - step(0.5 + halfWidth, st.t);
|
|
2218
|
+
s *= 1.0 - step(base, st.s);
|
|
2219
|
+
|
|
2220
|
+
// \u8BA1\u7B97\u7BAD\u5934\u9876\u90E8\u90E8\u5206\u7684\u7EB9\u7406\u5750\u6807
|
|
2221
|
+
float t = step(base, st.s);
|
|
2222
|
+
t *= 1.0 - step(ptOnUpperLine, st.t);
|
|
2223
|
+
t *= step(ptOnLowerLine, st.t);
|
|
2224
|
+
|
|
2225
|
+
// \u8BA1\u7B97\u7247\u5143\u4E0E\u7BAD\u5934\u8FB9\u754C\u7684\u8DDD\u79BB\uFF0C\u4EE5\u4FBF\u8FDB\u884C\u6297\u952F\u9F7F\u5904\u7406
|
|
2226
|
+
float dist;
|
|
2227
|
+
if (st.s < base)
|
|
2228
|
+
{
|
|
2229
|
+
float d1 = abs(st.t - (0.5 - halfWidth));
|
|
2230
|
+
float d2 = abs(st.t - (0.5 + halfWidth));
|
|
2231
|
+
dist = min(d1, d2);
|
|
2232
|
+
}
|
|
2233
|
+
else
|
|
2234
|
+
{
|
|
2235
|
+
float d1 = czm_infinity;
|
|
2236
|
+
if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
|
|
2237
|
+
{
|
|
2238
|
+
d1 = abs(st.s - base);
|
|
2239
|
+
}
|
|
2240
|
+
float d2 = abs(st.t - ptOnUpperLine);
|
|
2241
|
+
float d3 = abs(st.t - ptOnLowerLine);
|
|
2242
|
+
dist = min(min(d1, d2), d3);
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
vec4 outsideColor = vec4(0.0);// \u5916\u90E8\u989C\u8272\uFF08\u975E\u7BAD\u5934\u90E8\u5206\uFF09
|
|
2246
|
+
// \u6839\u636Es\u548Ct\u7684\u503C\u6DF7\u5408\u989C\u8272\uFF0C\u5982\u679C\u7247\u5143\u4F4D\u4E8E\u7BAD\u5934\u4E0A\uFF0C\u5219\u4F7F\u7528\u7BAD\u5934\u989C\u8272\uFF0C\u5426\u5219\u4F7F\u7528\u5916\u90E8\u989C\u8272
|
|
2247
|
+
vec4 currentColor = mix(outsideColor, color, clamp(s + t, 0.0, 1.0));
|
|
2248
|
+
// \u4F7F\u7528czm_antialias\u51FD\u6570\u8FDB\u884C\u6297\u952F\u9F7F\u5904\u7406
|
|
2249
|
+
vec4 outColor = czm_antialias(outsideColor, color, currentColor, dist);
|
|
2250
|
+
|
|
2251
|
+
outColor = czm_gammaCorrect(outColor);
|
|
2252
|
+
material.diffuse = outColor.rgb;// \u8BBE\u7F6E\u6750\u8D28\u7684\u6F2B\u53CD\u5C04\u989C\u8272
|
|
2253
|
+
material.alpha = outColor.a;// \u8BBE\u7F6E\u6750\u8D28\u7684\u900F\u660E\u5EA6
|
|
2254
|
+
|
|
2255
|
+
return material;// \u8FD4\u56DE\u6750\u8D28
|
|
2256
|
+
}
|
|
2257
|
+
|
|
2258
|
+
|
|
2259
|
+
`;var Rd=`#ifdef GL_OES_standard_derivatives
|
|
2260
|
+
#extension GL_OES_standard_derivatives : enable
|
|
2261
|
+
#endif
|
|
2262
|
+
|
|
2263
|
+
uniform vec4 color;
|
|
2264
|
+
uniform vec4 gapColor;
|
|
2265
|
+
uniform float dashLength;
|
|
2266
|
+
uniform float dashPattern;
|
|
2267
|
+
|
|
2268
|
+
in float v_polylineAngle;
|
|
2269
|
+
in float v_width;
|
|
2270
|
+
|
|
2271
|
+
const float maskLength = 16.0;
|
|
2272
|
+
|
|
2273
|
+
mat2 rotate(float rad) {
|
|
2274
|
+
float c = cos(rad);
|
|
2275
|
+
float s = sin(rad);
|
|
2276
|
+
return mat2(
|
|
2277
|
+
c, s,
|
|
2278
|
+
-s, c
|
|
2279
|
+
);
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
float getPointOnLine(vec2 p0, vec2 p1, float x)
|
|
2283
|
+
{
|
|
2284
|
+
float slope = (p0.y - p1.y) / (p0.x - p1.x);
|
|
2285
|
+
return slope * (x - p0.x) + p0.y;
|
|
2286
|
+
}
|
|
2287
|
+
|
|
2288
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
2289
|
+
{
|
|
2290
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
2291
|
+
|
|
2292
|
+
vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;
|
|
2293
|
+
|
|
2294
|
+
// Get the relative position within the dash from 0 to 1
|
|
2295
|
+
float dashPosition = fract(pos.x / (dashLength * czm_pixelRatio));
|
|
2296
|
+
// Figure out the mask index.
|
|
2297
|
+
float maskIndex = floor(dashPosition * maskLength);
|
|
2298
|
+
// Test the bit mask.
|
|
2299
|
+
float maskTest = floor(dashPattern / pow(2.0, maskIndex));
|
|
2300
|
+
vec4 fragColor = (mod(maskTest, 2.0) < 1.0) ? gapColor : color;
|
|
2301
|
+
|
|
2302
|
+
vec2 st = materialInput.st;
|
|
2303
|
+
|
|
2304
|
+
#ifdef GL_OES_standard_derivatives
|
|
2305
|
+
float base = 1.0 - abs(fwidth(st.s)) * 10.0 * czm_pixelRatio;
|
|
2306
|
+
#else
|
|
2307
|
+
float base = 0.975; // 2.5% of the line will be the arrow head
|
|
2308
|
+
#endif
|
|
2309
|
+
|
|
2310
|
+
vec2 center = vec2(1.0, 0.5);
|
|
2311
|
+
float ptOnUpperLine = getPointOnLine(vec2(base, 1.0), center, st.s);
|
|
2312
|
+
float ptOnLowerLine = getPointOnLine(vec2(base, 0.0), center, st.s);
|
|
2313
|
+
|
|
2314
|
+
float halfWidth = 0.15;
|
|
2315
|
+
float s = step(0.5 - halfWidth, st.t);
|
|
2316
|
+
s *= 1.0 - step(0.5 + halfWidth, st.t);
|
|
2317
|
+
s *= 1.0 - step(base, st.s);
|
|
2318
|
+
|
|
2319
|
+
float t = step(base, materialInput.st.s);
|
|
2320
|
+
t *= 1.0 - step(ptOnUpperLine, st.t);
|
|
2321
|
+
t *= step(ptOnLowerLine, st.t);
|
|
2322
|
+
|
|
2323
|
+
// Find the distance from the closest separator (region between two colors)
|
|
2324
|
+
float dist;
|
|
2325
|
+
if (st.s < base)
|
|
2326
|
+
{
|
|
2327
|
+
if (fragColor.a < 0.005) { // matches 0/255 and 1/255
|
|
2328
|
+
discard;
|
|
2329
|
+
}
|
|
2330
|
+
float d1 = abs(st.t - (0.5 - halfWidth));
|
|
2331
|
+
float d2 = abs(st.t - (0.5 + halfWidth));
|
|
2332
|
+
dist = min(d1, d2);
|
|
2333
|
+
}
|
|
2334
|
+
else
|
|
2335
|
+
{
|
|
2336
|
+
fragColor = color;
|
|
2337
|
+
float d1 = czm_infinity;
|
|
2338
|
+
if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
|
|
2339
|
+
{
|
|
2340
|
+
d1 = abs(st.s - base);
|
|
2341
|
+
}
|
|
2342
|
+
float d2 = abs(st.t - ptOnUpperLine);
|
|
2343
|
+
float d3 = abs(st.t - ptOnLowerLine);
|
|
2344
|
+
dist = min(min(d1, d2), d3);
|
|
2345
|
+
}
|
|
2346
|
+
|
|
2347
|
+
vec4 outsideColor = vec4(0.0);
|
|
2348
|
+
vec4 currentColor = mix(outsideColor, fragColor, clamp(s + t, 0.0, 1.0));
|
|
2349
|
+
vec4 outColor = czm_antialias(outsideColor, fragColor, currentColor, dist);
|
|
2350
|
+
|
|
2351
|
+
outColor = czm_gammaCorrect(outColor);
|
|
2352
|
+
material.diffuse = outColor.rgb;
|
|
2353
|
+
material.alpha = outColor.a;
|
|
2354
|
+
return material;
|
|
2355
|
+
}
|
|
2356
|
+
`;var Od=`#ifdef GL_OES_standard_derivatives
|
|
2357
|
+
#extension GL_OES_standard_derivatives : enable
|
|
2358
|
+
#endif
|
|
2359
|
+
|
|
2360
|
+
uniform vec4 color;
|
|
2361
|
+
uniform vec4 directionColor; // \u7BAD\u5934\u989C\u8272
|
|
2362
|
+
uniform vec4 outlineColor; // \u8FB9\u754C\u989C\u8272
|
|
2363
|
+
uniform float outlineWidth; // \u8FB9\u754C\u5BBD\u5EA6
|
|
2364
|
+
|
|
2365
|
+
in float v_width; // \u7EBF\u6BB5\u5BBD\u5EA6
|
|
2366
|
+
in float v_polylineAngle; // \u7EBF\u6BB5\u89D2\u5EA6
|
|
2367
|
+
|
|
2368
|
+
const float fragLength = 100.0; // \u6BCF\u4E2A\u7BAD\u5934\u7EBF\u6BB5\u6709\u591A\u957F
|
|
2369
|
+
const float startPosition = 0.45; // \u5F00\u59CB\u7684\u4F4D\u7F6E\uFF0C\u4ECE 0 \uFF5E 1
|
|
2370
|
+
const float endPosition = 0.55; // \u7ED3\u675F\u7684\u4F4D\u7F6E\uFF0C\u4ECE 0 \uFF5E 1
|
|
2371
|
+
|
|
2372
|
+
mat2 rotate(float rad) {
|
|
2373
|
+
float c = cos(rad);
|
|
2374
|
+
float s = sin(rad);
|
|
2375
|
+
return mat2(
|
|
2376
|
+
c, s,
|
|
2377
|
+
-s, c
|
|
2378
|
+
);
|
|
2379
|
+
}
|
|
2380
|
+
|
|
2381
|
+
float getPointOnLine(vec2 p0, vec2 p1, float x)
|
|
2382
|
+
{
|
|
2383
|
+
float slope = (p0.y - p1.y) / (p0.x - p1.x); // \u6839\u636E\u4E24\u4E2A\u70B9\u83B7\u53D6\u659C\u7387
|
|
2384
|
+
return slope * (x - p0.x) + p0.y; // \u6839\u636E\u659C\u7387\u548C x \u503C\u83B7\u53D6 y \u503C
|
|
2385
|
+
}
|
|
2386
|
+
|
|
2387
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
2388
|
+
{
|
|
2389
|
+
// \u7528 Dash \u7684\u65B9\u5F0F\u6E32\u67D3\u6B63\u5E38\u7684\u7EBF
|
|
2390
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
2391
|
+
vec2 st = materialInput.st;
|
|
2392
|
+
|
|
2393
|
+
// copy from polyline outline
|
|
2394
|
+
float halfInteriorWidth = 0.5 * (v_width - outlineWidth) / v_width;
|
|
2395
|
+
float b = step(0.5 - halfInteriorWidth, st.t);
|
|
2396
|
+
b *= 1.0 - step(0.5 + halfInteriorWidth, st.t);
|
|
2397
|
+
|
|
2398
|
+
// Find the distance from the closest separator (region between two colors)
|
|
2399
|
+
float d1 = abs(st.t - (0.5 - halfInteriorWidth));
|
|
2400
|
+
float d2 = abs(st.t - (0.5 + halfInteriorWidth));
|
|
2401
|
+
float dist = min(d1, d2);
|
|
2402
|
+
|
|
2403
|
+
vec4 currentColor = mix(outlineColor, color, b);
|
|
2404
|
+
vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist);
|
|
2405
|
+
outColor = czm_gammaCorrect(outColor);
|
|
2406
|
+
|
|
2407
|
+
// \u83B7\u53D6\u5F53\u524D\u4F4D\u7F6E\u5904\u4E8E\u7A97\u53E3\u7684\u76F8\u5BF9\u4F4D\u7F6E\uFF08\u50CF\u7D20\u503C\uFF09
|
|
2408
|
+
vec2 pos = rotate(v_polylineAngle) * gl_FragCoord.xy;
|
|
2409
|
+
|
|
2410
|
+
// \u83B7\u53D6\u5F53\u524D\u4F4D\u7F6E\u5904\u4E8E\u7BAD\u5934\u7EBF\u6BB5\u7684\u54EA\u90E8\u5206, 0 ~ 1
|
|
2411
|
+
float maskS = fract(pos.x / (fragLength * czm_pixelRatio));
|
|
2412
|
+
// float maskS = fract(st.s / (abs(fwidth(st.s)) * fragLength * czm_pixelRatio));
|
|
2413
|
+
float maskT = st.t;
|
|
2414
|
+
// \u5224\u65AD\u662F\u6B63\u5E38\u7684\u7EBF\u8FD8\u662F\u7BAD\u5934
|
|
2415
|
+
bool isDirection = (maskS > startPosition) && (maskS <= endPosition);
|
|
2416
|
+
|
|
2417
|
+
vec4 fragColor;
|
|
2418
|
+
if (isDirection) {
|
|
2419
|
+
// \u6E32\u67D3\u7BAD\u5934
|
|
2420
|
+
float arrowWidth = (endPosition - startPosition) / 2.0;
|
|
2421
|
+
float midS = startPosition + arrowWidth;
|
|
2422
|
+
|
|
2423
|
+
float t = 1.0;
|
|
2424
|
+
if (maskS < midS) {
|
|
2425
|
+
// \u5DE6\u8FB9\u7684\u4E09\u89D2\u5F62
|
|
2426
|
+
vec2 center = vec2(midS, 0.5);
|
|
2427
|
+
float ptOnUpperLine = getPointOnLine(vec2(startPosition, 1.0), center, maskS); // \u4E09\u89D2\u5F62\u4E0A\u8FB9\u7684\u7EBF
|
|
2428
|
+
float ptOnLowerLine = getPointOnLine(vec2(startPosition, 0.0), center, maskS); // \u4E09\u89D2\u5F62\u4E0B\u8FB9\u7684\u7EBF
|
|
2429
|
+
|
|
2430
|
+
t *= 1.0 - step(ptOnUpperLine, maskT); // \u4F4E\u4E8E\u4E0A\u9762\u7684\u7EBF
|
|
2431
|
+
t *= step(ptOnLowerLine, maskT); // \u800C\u4E14\u9AD8\u4E8E\u4E0B\u9762\u7684\u7EBF
|
|
2432
|
+
t = 1.0 - t; // \u53D6\u53CD
|
|
2433
|
+
} else {
|
|
2434
|
+
// \u53F3\u8FB9\u7684\u4E09\u89D2\u5F62
|
|
2435
|
+
vec2 center = vec2(endPosition, 0.5);
|
|
2436
|
+
float ptOnUpperLine = getPointOnLine(vec2(midS, 1.0), center, maskS); // \u4E09\u89D2\u5F62\u4E0A\u8FB9\u7684\u7EBF
|
|
2437
|
+
float ptOnLowerLine = getPointOnLine(vec2(midS, 0.0), center, maskS); // \u4E09\u89D2\u5F62\u4E0B\u8FB9\u7684\u7EBF
|
|
2438
|
+
|
|
2439
|
+
t *= 1.0 - step(ptOnUpperLine, maskT); // \u4F4E\u4E8E\u4E0A\u9762\u7684\u7EBF
|
|
2440
|
+
t *= step(ptOnLowerLine, maskT); // \u800C\u4E14\u9AD8\u4E8E\u4E0B\u9762\u7684\u7EBF
|
|
2441
|
+
}
|
|
2442
|
+
|
|
2443
|
+
vec4 outsideColor = outColor;
|
|
2444
|
+
vec4 currentColor = mix(outsideColor, directionColor, clamp(t, 0.0, 1.0));
|
|
2445
|
+
fragColor = currentColor;
|
|
2446
|
+
} else {
|
|
2447
|
+
fragColor = outColor;
|
|
2448
|
+
}
|
|
2449
|
+
|
|
2450
|
+
fragColor = czm_gammaCorrect(fragColor);
|
|
2451
|
+
material.diffuse = fragColor.rgb;
|
|
2452
|
+
material.alpha = fragColor.a;
|
|
2453
|
+
return material;
|
|
2454
|
+
}
|
|
2455
|
+
`;var kd=`uniform vec4 color; // \u7EBF\u4E3B\u4F53\u989C\u8272
|
|
2456
|
+
uniform float startType; // \u8D77\u59CB\u70B9\u7684\u7C7B\u578B
|
|
2457
|
+
uniform float endType; // \u7EC8\u70B9\u7684\u7C7B\u578B
|
|
2458
|
+
uniform vec4 outlineColor; // \u8FB9\u754C\u989C\u8272
|
|
2459
|
+
uniform bool outlineShow;
|
|
2460
|
+
uniform float lineWidth;
|
|
2461
|
+
|
|
2462
|
+
const float SHAPE_TYPE_NORMAL = 0.0; // \u666E\u901A
|
|
2463
|
+
const float SHAPE_TYPE_ARROW= 1.0; // \u7BAD\u5934
|
|
2464
|
+
const float SHAPE_TYPE_CIRCLE = 2.0; // \u5706
|
|
2465
|
+
const float SHAPE_TYPE_END = 3.0; // \u7EC8\u6B62\u7AD6\u7EBF
|
|
2466
|
+
|
|
2467
|
+
const float ratio = 2.5; // \u7EBF\u5BBD\u548Cbase\u7684\u6BD4\u4F8B\uFF0C\u6D4B\u8BD5\u7ECF\u9A8C\u503C
|
|
2468
|
+
|
|
2469
|
+
float outlineWidth = 0.005; // \u6548\u679C\u6BD4\u8F83\u597D\u7684\u7ECF\u9A8C\u503C\uFF0C\u540E\u9762\u6709\u9700\u8981\u518D\u4F20\u5165
|
|
2470
|
+
|
|
2471
|
+
float getArrowPointOnLine(vec2 p0, vec2 p1, float x){
|
|
2472
|
+
float slope = (p0.y - p1.y) / (p0.x - p1.x);
|
|
2473
|
+
return slope * (x - p0.x) + p0.y;
|
|
2474
|
+
}
|
|
2475
|
+
|
|
2476
|
+
float getCirclePointOnLine(vec2 center, float radius, float x, float upper) {
|
|
2477
|
+
// \u8BA1\u7B97 x \u5230\u5706\u5FC3\u7684\u6C34\u5E73\u8DDD\u79BB\u7684\u5E73\u65B9
|
|
2478
|
+
float dx = x - center.x;
|
|
2479
|
+
|
|
2480
|
+
// \u5728\u5706\u65B9\u7A0B\u4E2D\u6C42\u89E3\u51FA y \u53D8\u5316\u90E8
|
|
2481
|
+
float dy = sqrt(radius * radius - dx * dx);
|
|
2482
|
+
|
|
2483
|
+
dy = dy * 0.5 / radius;
|
|
2484
|
+
|
|
2485
|
+
// \u6839\u636E upper \u7684\u503C\u51B3\u5B9A\u4E0A\u8FB9\u8FD8\u662F\u4E0B\u8FB9
|
|
2486
|
+
if (upper == 1.0) {
|
|
2487
|
+
return center.y + dy; // \u4E0A\u534A\u8FB9
|
|
2488
|
+
} else {
|
|
2489
|
+
return center.y - dy; // \u4E0B\u534A\u8FB9
|
|
2490
|
+
}
|
|
2491
|
+
}
|
|
2492
|
+
|
|
2493
|
+
czm_material czm_getMaterial(czm_materialInput materialInput)
|
|
2494
|
+
{
|
|
2495
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
2496
|
+
|
|
2497
|
+
vec2 st = materialInput.st;
|
|
2498
|
+
|
|
2499
|
+
#if (__VERSION__ == 300 || defined(GL_OES_standard_derivatives))
|
|
2500
|
+
float base = 1.0 - abs(fwidth(st.s)) * lineWidth * ratio * czm_pixelRatio;
|
|
2501
|
+
#else
|
|
2502
|
+
// If no derivatives available (IE 10?), 2.5% of the line will be the arrow head
|
|
2503
|
+
float base = 0.975;
|
|
2504
|
+
#endif
|
|
2505
|
+
|
|
2506
|
+
float reverseBase = 1.0 - base;
|
|
2507
|
+
float halfB = reverseBase / 2.0;
|
|
2508
|
+
float baseLeft = reverseBase;
|
|
2509
|
+
|
|
2510
|
+
if(startType == SHAPE_TYPE_END) {
|
|
2511
|
+
baseLeft = halfB;
|
|
2512
|
+
}
|
|
2513
|
+
|
|
2514
|
+
if(endType == SHAPE_TYPE_END) {
|
|
2515
|
+
base += halfB;
|
|
2516
|
+
}
|
|
2517
|
+
|
|
2518
|
+
// \u8FD9\u91CC\u7528\u6765\u89E3\u51B3\u5706\u5F62\u7AEF\u70B9\u7684\u88C2\u7F1D\u95EE\u9898
|
|
2519
|
+
float circleOffset = 0.01 * baseLeft;
|
|
2520
|
+
|
|
2521
|
+
float halfWidth = 0.08;
|
|
2522
|
+
|
|
2523
|
+
// \u5DE6\u4FA7
|
|
2524
|
+
if(st.s < baseLeft) {
|
|
2525
|
+
|
|
2526
|
+
if(outlineShow) {
|
|
2527
|
+
halfWidth += outlineWidth;
|
|
2528
|
+
}
|
|
2529
|
+
|
|
2530
|
+
float ptOnUpperLineLeft = 0.5 + halfWidth;
|
|
2531
|
+
float ptOnLowerLineLeft = 0.5 - halfWidth;
|
|
2532
|
+
|
|
2533
|
+
if(startType == SHAPE_TYPE_CIRCLE && st.s < baseLeft - circleOffset) {
|
|
2534
|
+
float r = baseLeft / 2.0;
|
|
2535
|
+
vec2 leftCenter = vec2(r, 0.5);
|
|
2536
|
+
|
|
2537
|
+
ptOnUpperLineLeft = getCirclePointOnLine(leftCenter, r, st.s, 1.0);
|
|
2538
|
+
ptOnLowerLineLeft = getCirclePointOnLine(leftCenter, r, st.s, 0.0);
|
|
2539
|
+
} else if(startType == SHAPE_TYPE_END) {
|
|
2540
|
+
ptOnUpperLineLeft = 1.0;
|
|
2541
|
+
ptOnLowerLineLeft = 0.0;
|
|
2542
|
+
} else if(startType == SHAPE_TYPE_ARROW) {
|
|
2543
|
+
vec2 leftCenter = vec2(0.0, 0.5);
|
|
2544
|
+
ptOnUpperLineLeft = getArrowPointOnLine(vec2(baseLeft, 1.0), leftCenter, st.s);
|
|
2545
|
+
ptOnLowerLineLeft = getArrowPointOnLine(vec2(baseLeft, 0.0), leftCenter, st.s);
|
|
2546
|
+
}
|
|
2547
|
+
|
|
2548
|
+
float t = 1.0 - step(ptOnUpperLineLeft, st.t);
|
|
2549
|
+
t *= step(ptOnLowerLineLeft, st.t);
|
|
2550
|
+
|
|
2551
|
+
float d1 = czm_infinity;
|
|
2552
|
+
if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
|
|
2553
|
+
{
|
|
2554
|
+
d1 = abs(st.s - baseLeft);
|
|
2555
|
+
}
|
|
2556
|
+
float d2 = abs(st.t - ptOnUpperLineLeft);
|
|
2557
|
+
float d3 = abs(st.t - ptOnLowerLineLeft);
|
|
2558
|
+
float dist = min(min(d1, d2), d3);
|
|
2559
|
+
|
|
2560
|
+
float dtUpper = abs(st.t - ptOnUpperLineLeft);
|
|
2561
|
+
dtUpper = step(dtUpper, outlineWidth);
|
|
2562
|
+
|
|
2563
|
+
float dtLower = abs(st.t - ptOnLowerLineLeft);
|
|
2564
|
+
dtLower = step(dtLower, outlineWidth);
|
|
2565
|
+
|
|
2566
|
+
vec4 contentColor;
|
|
2567
|
+
if(outlineShow) {
|
|
2568
|
+
contentColor = mix(color, outlineColor, clamp(dtUpper + dtLower, 0.0, 1.0));
|
|
2569
|
+
} else {
|
|
2570
|
+
contentColor = color;
|
|
2571
|
+
}
|
|
2572
|
+
|
|
2573
|
+
vec4 outsideColor = vec4(0.0);
|
|
2574
|
+
vec4 currentColor = mix(outsideColor, contentColor, clamp(t, 0.0, 1.0));
|
|
2575
|
+
vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist, 0.05);
|
|
2576
|
+
|
|
2577
|
+
outColor = czm_gammaCorrect(outColor);
|
|
2578
|
+
material.diffuse = outColor.rgb;
|
|
2579
|
+
material.alpha = outColor.a;
|
|
2580
|
+
|
|
2581
|
+
return material;
|
|
2582
|
+
} else if(st.s <= base) {
|
|
2583
|
+
|
|
2584
|
+
float fuzzFactor = 0.1; // \u6548\u679C\u6BD4\u8F83\u597D\u7684\u7ECF\u9A8C\u503C
|
|
2585
|
+
if(lineWidth > 10.0) {
|
|
2586
|
+
fuzzFactor = 0.05; // \u6548\u679C\u6BD4\u8F83\u597D\u7684\u7ECF\u9A8C\u503C
|
|
2587
|
+
}
|
|
2588
|
+
|
|
2589
|
+
if(outlineShow) {
|
|
2590
|
+
halfWidth += outlineWidth;
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
float ptOnUpperLineRight = 0.5 + halfWidth;
|
|
2594
|
+
float ptOnLowerLineRight = 0.5 - halfWidth;
|
|
2595
|
+
|
|
2596
|
+
float s = step(0.5 - halfWidth, st.t);
|
|
2597
|
+
s *= 1.0 - step(0.5 + halfWidth, st.t);
|
|
2598
|
+
s *= 1.0 - step(base, st.s);
|
|
2599
|
+
|
|
2600
|
+
float t = step(base, materialInput.st.s);
|
|
2601
|
+
t *= 1.0 - step(ptOnUpperLineRight, st.t);
|
|
2602
|
+
t *= step(ptOnLowerLineRight, st.t);
|
|
2603
|
+
|
|
2604
|
+
// Find the distance from the closest separator (region between two colors)
|
|
2605
|
+
float d1 = abs(st.t - (0.5 - halfWidth));
|
|
2606
|
+
float d2 = abs(st.t - (0.5 + halfWidth));
|
|
2607
|
+
float dist = min(d1, d2);
|
|
2608
|
+
|
|
2609
|
+
float dtUpper = abs(st.t - (0.5 + halfWidth));
|
|
2610
|
+
dtUpper = step(dtUpper, outlineWidth);
|
|
2611
|
+
|
|
2612
|
+
float dtLower = abs(st.t - (0.5 - halfWidth));
|
|
2613
|
+
dtLower = step(dtLower, outlineWidth);
|
|
2614
|
+
|
|
2615
|
+
vec4 contentColor;
|
|
2616
|
+
if(outlineShow) {
|
|
2617
|
+
contentColor = mix(color, outlineColor, clamp(dtUpper + dtLower, 0.0, 1.0));
|
|
2618
|
+
} else {
|
|
2619
|
+
contentColor = color;
|
|
2620
|
+
}
|
|
2621
|
+
|
|
2622
|
+
vec4 outsideColor = vec4(contentColor.r, contentColor.g, contentColor.b, 0.0);
|
|
2623
|
+
vec4 currentColor = mix(outsideColor, contentColor, clamp(s + t, 0.0, 1.0));
|
|
2624
|
+
|
|
2625
|
+
vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist, fuzzFactor);
|
|
2626
|
+
|
|
2627
|
+
|
|
2628
|
+
float delta = outlineWidth * 10.0;
|
|
2629
|
+
|
|
2630
|
+
outColor = czm_gammaCorrect(outColor);
|
|
2631
|
+
material.diffuse = outColor.rgb;
|
|
2632
|
+
material.alpha = outColor.a;
|
|
2633
|
+
return material;
|
|
2634
|
+
} else {
|
|
2635
|
+
|
|
2636
|
+
if(outlineShow) {
|
|
2637
|
+
halfWidth += outlineWidth;
|
|
2638
|
+
}
|
|
2639
|
+
|
|
2640
|
+
float ptOnUpperLineRight = 0.5 + halfWidth;
|
|
2641
|
+
float ptOnLowerLineRight = 0.5 - halfWidth;
|
|
2642
|
+
|
|
2643
|
+
if(endType == SHAPE_TYPE_CIRCLE && st.s > base + circleOffset) {
|
|
2644
|
+
float r = reverseBase / 2.0;
|
|
2645
|
+
vec2 rightCenter = vec2(1.0 - r, 0.5);
|
|
2646
|
+
|
|
2647
|
+
ptOnUpperLineRight = getCirclePointOnLine(rightCenter, r, st.s, 1.0);
|
|
2648
|
+
ptOnLowerLineRight = getCirclePointOnLine(rightCenter, r, st.s, 0.0);
|
|
2649
|
+
} else if(endType == SHAPE_TYPE_END) {
|
|
2650
|
+
ptOnUpperLineRight = 1.0;
|
|
2651
|
+
ptOnLowerLineRight = 0.0;
|
|
2652
|
+
} else if(endType == SHAPE_TYPE_ARROW) {
|
|
2653
|
+
vec2 rightCenter = vec2(1.0, 0.5);
|
|
2654
|
+
|
|
2655
|
+
ptOnUpperLineRight = getArrowPointOnLine(vec2(base, 1.0), rightCenter, st.s);
|
|
2656
|
+
ptOnLowerLineRight = getArrowPointOnLine(vec2(base, 0.0), rightCenter, st.s);
|
|
2657
|
+
}
|
|
2658
|
+
|
|
2659
|
+
float s = step(0.5 - halfWidth, st.t);
|
|
2660
|
+
s *= 1.0 - step(0.5 + halfWidth, st.t);
|
|
2661
|
+
s *= 1.0 - step(base, st.s);
|
|
2662
|
+
|
|
2663
|
+
float t = step(base, materialInput.st.s);
|
|
2664
|
+
t *= 1.0 - step(ptOnUpperLineRight, st.t);
|
|
2665
|
+
t *= step(ptOnLowerLineRight, st.t);
|
|
2666
|
+
|
|
2667
|
+
// Find the distance from the closest separator (region between two colors)
|
|
2668
|
+
|
|
2669
|
+
float d1 = czm_infinity;
|
|
2670
|
+
if (st.t < 0.5 - halfWidth && st.t > 0.5 + halfWidth)
|
|
2671
|
+
{
|
|
2672
|
+
d1 = abs(st.s - base);
|
|
2673
|
+
}
|
|
2674
|
+
float d2 = abs(st.t - ptOnUpperLineRight);
|
|
2675
|
+
float d3 = abs(st.t - ptOnLowerLineRight);
|
|
2676
|
+
float dist = min(min(d1, d2), d3);
|
|
2677
|
+
|
|
2678
|
+
float dtUpper = abs(st.t - ptOnUpperLineRight);
|
|
2679
|
+
dtUpper = step(dtUpper, outlineWidth);
|
|
2680
|
+
|
|
2681
|
+
float dtLower = abs(st.t - ptOnLowerLineRight);
|
|
2682
|
+
dtLower = step(dtLower, outlineWidth);
|
|
2683
|
+
|
|
2684
|
+
vec4 contentColor;
|
|
2685
|
+
if(outlineShow) {
|
|
2686
|
+
contentColor = mix(color, outlineColor, clamp(dtUpper + dtLower, 0.0, 1.0));
|
|
2687
|
+
} else {
|
|
2688
|
+
contentColor = color;
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2691
|
+
vec4 outsideColor = vec4(contentColor.r, contentColor.g, contentColor.b, 0.0);
|
|
2692
|
+
vec4 currentColor = mix(outsideColor, contentColor, clamp(s + t, 0.0, 1.0));
|
|
2693
|
+
|
|
2694
|
+
vec4 outColor = czm_antialias(outlineColor, color, currentColor, dist, 0.05);
|
|
2695
|
+
|
|
2696
|
+
outColor = czm_gammaCorrect(outColor);
|
|
2697
|
+
material.diffuse = outColor.rgb;
|
|
2698
|
+
material.alpha = outColor.a;
|
|
2699
|
+
return material;
|
|
2700
|
+
}
|
|
2701
|
+
}
|
|
2702
|
+
`;r.Material.PolylineFlickerType="PolylineFlicker";r.Material._materialCache.addMaterial(r.Material.PolylineFlickerType,{fabric:{type:r.Material.PolylineFlickerType,uniforms:{color:new r.Color(1,0,0,.7),speed:1},source:Pd},translucent:function(l){return!0}});r.Material.PolylineFlowType="PolylineFlow";r.Material._materialCache.addMaterial(r.Material.PolylineFlowType,{fabric:{type:r.Material.PolylineFlowType,uniforms:{color:new r.Color(1,0,0,.7),speed:1,percent:.03,gradient:.1},source:bd},translucent:function(l){return!0}});r.Material.PolylineImageTrailType="PolylineImageTrail";r.Material._materialCache.addMaterial(r.Material.PolylineImageTrailType,{fabric:{type:r.Material.PolylineImageTrailType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId,speed:1,repeat:new r.Cartesian2(1,1)},source:Md},translucent:function(l){return!0}});r.Material.PolylineLightingType="PolylineLighting";r.Material._materialCache.addMaterial(r.Material.PolylineLightingType,{fabric:{type:r.Material.PolylineLightingType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId},source:Ad},translucent:function(l){return!0}});r.Material.PolylineLightingTrailType="PolylineLightingTrail";r.Material._materialCache.addMaterial(r.Material.PolylineLightingTrailType,{fabric:{type:r.Material.PolylineLightingTrailType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId,speed:3},source:Sd},translucent:function(l){return!0}});r.Material.PolylineTrailType="PolylineTrail";r.Material._materialCache.addMaterial(r.Material.PolylineTrailType,{fabric:{type:r.Material.PolylineTrailType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId,speed:1,repeat:new r.Cartesian2(1,1)},source:Id},translucent:function(l){return!0}});r.Material.PolylineFenceType="PolylineFence";r.Material._materialCache.addMaterial(r.Material.PolylineFenceType,{fabric:{type:r.Material.PolylineFenceType,uniforms:{color:new r.Color(1,1,1,1),outlineColor:new r.Color(1,1,1,1),dashLength:10,dashPattern:15,outlineWidth:16,maskLength:20},source:Ld},translucent:function(l){return!0}});r.Material.PolylineMultiArrowType="PolylineMultiArrow";r.Material._materialCache.addMaterial(r.Material.PolylineMultiArrowType,{strict:!0,fabric:{type:r.Material.PolylineMultiArrowType,uniforms:{color:r.Color.WHITE,repeatFactor:1,antiClockWise:!0},source:Dd},translucent:function(l){return!0}});r.Material.PolylineDashArrowType="PolylineDashArrow";r.Material._materialCache.addMaterial(r.Material.PolylineDashArrowType,{strict:!0,fabric:{type:r.Material.PolylineDashArrowType,uniforms:{color:r.Color.WHITE,gapColor:r.Color.TRANSPARENT,dashLength:16,dashPattern:255},source:Rd},translucent:function(l){return!0}});r.Material.PolylineDirectionType="PolylineDirection";r.Material._materialCache.addMaterial(r.Material.PolylineDirectionType,{fabric:{type:r.Material.PolylineDirectionType,uniforms:{color:new r.Color(0,1,1,1),directionColor:new r.Color(1,1,1,1),outlineColor:new r.Color(1,1,1,1),outlineWidth:0},source:Od},translucent:function(l){return!0}});r.Material.PolylineCustomEndpointType="PolylineCustomEndpoint";r.Material._materialCache.addMaterial(r.Material.PolylineCustomEndpointType,{strict:!0,fabric:{type:r.Material.PolylineCustomEndpointType,uniforms:{color:r.Color.WHITE,startType:0,endType:0,outlineColor:r.Color.WHITE,outlineShow:!1,lineWidth:3},source:kd},translucent:function(l){return!0}});var zd=`/**\r
|
|
2098
2703
|
* \u96F7\u8FBE\u7EBF\u6750\u8D28\u7740\u8272\u5668\r
|
|
2099
2704
|
* \u521B\u5EFA\u96F7\u8FBE\u626B\u63CF\u7EBF\u6548\u679C\uFF0C\u5305\u542B\u65CB\u8F6C\u626B\u63CF\u7EBF\u548C\u4E2D\u5FC3\u5149\u6655\r
|
|
2100
2705
|
* @author Lucas Xu\r
|
|
@@ -2132,7 +2737,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2132
2737
|
material.diffuse = col * 3.0;\r
|
|
2133
2738
|
return material;\r
|
|
2134
2739
|
}\r
|
|
2135
|
-
`;var
|
|
2740
|
+
`;var Nd=`/**\r
|
|
2136
2741
|
* \u96F7\u8FBE\u626B\u63CF\u6750\u8D28\u7740\u8272\u5668\r
|
|
2137
2742
|
* \u521B\u5EFA\u96F7\u8FBE\u626B\u63CF\u6548\u679C\uFF0C\u5305\u542B\u65CB\u8F6C\u626B\u63CF\u7EBF\u548C\u73AF\u5F62\u7F51\u683C\r
|
|
2138
2743
|
* @author Lucas Xu\r
|
|
@@ -2184,7 +2789,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2184
2789
|
material.diffuse = (0.5 + pow(angle, 2.0) * falloff) * color.rgb;\r
|
|
2185
2790
|
return material;\r
|
|
2186
2791
|
}\r
|
|
2187
|
-
`;var
|
|
2792
|
+
`;var Fd=`/**\r
|
|
2188
2793
|
* \u96F7\u8FBE\u6CE2\u6750\u8D28\u7740\u8272\u5668\r
|
|
2189
2794
|
* \u521B\u5EFA\u96F7\u8FBE\u6CE2\u6269\u6563\u6548\u679C\uFF0C\u5305\u542B\u65CB\u8F6C\u6CE2\u675F\u548C\u95EA\u70C1\u5149\u6655\r
|
|
2190
2795
|
* @author Lucas Xu\r
|
|
@@ -2232,7 +2837,23 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2232
2837
|
material.diffuse = flagColor * 3.0;\r
|
|
2233
2838
|
return material;\r
|
|
2234
2839
|
}\r
|
|
2235
|
-
`;
|
|
2840
|
+
`;var Wd=`uniform vec4 color;
|
|
2841
|
+
uniform float speed;
|
|
2842
|
+
uniform float repeat;
|
|
2843
|
+
uniform float thickness;
|
|
2844
|
+
czm_material czm_getMaterial(czm_materialInput materialInput){
|
|
2845
|
+
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
2846
|
+
float sp = 1.0 / repeat;
|
|
2847
|
+
vec2 st = materialInput.st;
|
|
2848
|
+
float dis = distance(st, vec2(0.5));
|
|
2849
|
+
float t = czm_frameNumber * speed / 1000.0;
|
|
2850
|
+
float m = mod(dis - fract(t), sp);
|
|
2851
|
+
float a = step(sp * (1.0 - thickness), m);
|
|
2852
|
+
material.diffuse = color.rgb;
|
|
2853
|
+
material.alpha = a * color.a;
|
|
2854
|
+
return material;
|
|
2855
|
+
}
|
|
2856
|
+
`;r.Material.RadarLineType="RadarLine";r.Material._materialCache.addMaterial(r.Material.RadarLineType,{fabric:{type:r.Material.RadarLineType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:zd},translucent:function(l){return!0}});r.Material.RadarSweepType="RadarSweep";r.Material._materialCache.addMaterial(r.Material.RadarSweepType,{fabric:{type:r.Material.RadarSweepType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:Nd},translucent:function(l){return!0}});r.Material.RadarWaveType="RadarWave";r.Material._materialCache.addMaterial(r.Material.RadarWaveType,{fabric:{type:r.Material.RadarWaveType,uniforms:{color:new r.Color(1,0,0,.7),speed:3},source:Fd},translucent:function(l){return!0}});r.Material.RadarOuterType="RadarOuter";r.Material._materialCache.addMaterial(r.Material.RadarOuterType,{fabric:{type:r.Material.RadarOuterType,uniforms:{color:new r.Color(1,0,0,.7),speed:3,repeat:30,thickness:.3},source:Wd},translucent:function(l){return!0}});var Gd=`/**\r
|
|
2236
2857
|
* \u5899\u4F53\u6F2B\u53CD\u5C04\u6750\u8D28\u7740\u8272\u5668\r
|
|
2237
2858
|
* \u521B\u5EFA\u5899\u4F53\u57FA\u7840\u6F2B\u53CD\u5C04\u6548\u679C\uFF0C\u5305\u542B\u5782\u76F4\u6E10\u53D8\u900F\u660E\u5EA6\r
|
|
2238
2859
|
* @author Lucas Xu\r
|
|
@@ -2254,7 +2875,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2254
2875
|
material.alpha = color.a * (1.0-fract(st.t)) * 0.8;\r
|
|
2255
2876
|
return material;\r
|
|
2256
2877
|
}\r
|
|
2257
|
-
`;var
|
|
2878
|
+
`;var Hd=`/**\r
|
|
2258
2879
|
* \u5899\u4F53\u56FE\u50CF\u8F68\u8FF9\u6750\u8D28\u7740\u8272\u5668\r
|
|
2259
2880
|
* \u521B\u5EFA\u5899\u4F53\u56FE\u50CF\u8F68\u8FF9\u6548\u679C\uFF0C\u652F\u6301\u7EB9\u7406\u52A8\u753B\u548C\u989C\u8272\u6DF7\u5408\r
|
|
2260
2881
|
* @author Lucas Xu\r
|
|
@@ -2293,7 +2914,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2293
2914
|
\r
|
|
2294
2915
|
return material;\r
|
|
2295
2916
|
}\r
|
|
2296
|
-
`;var
|
|
2917
|
+
`;var Bd=`/**\r
|
|
2297
2918
|
* \u5899\u4F53\u7EBF\u6761\u8F68\u8FF9\u6750\u8D28\u7740\u8272\u5668\r
|
|
2298
2919
|
* \u521B\u5EFA\u5899\u4F53\u7EBF\u6761\u8F68\u8FF9\u6548\u679C\uFF0C\u652F\u6301\u5782\u76F4\u65B9\u5411\u7684\u7EB9\u7406\u52A8\u753B\u548C\u53D1\u5149\u6548\u679C\r
|
|
2299
2920
|
* @author Lucas Xu\r
|
|
@@ -2338,7 +2959,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2338
2959
|
\r
|
|
2339
2960
|
return material;\r
|
|
2340
2961
|
}\r
|
|
2341
|
-
`;var
|
|
2962
|
+
`;var Ud=`/**\r
|
|
2342
2963
|
* \u5899\u4F53\u8F68\u8FF9\u6750\u8D28\u7740\u8272\u5668\r
|
|
2343
2964
|
* \u521B\u5EFA\u5899\u4F53\u8F68\u8FF9\u6548\u679C\uFF0C\u652F\u6301\u5782\u76F4\u65B9\u5411\u7684\u7EB9\u7406\u52A8\u753B\u548C\u989C\u8272\u6DF7\u5408\r
|
|
2344
2965
|
* @author Lucas Xu\r
|
|
@@ -2381,7 +3002,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2381
3002
|
\r
|
|
2382
3003
|
return material;\r
|
|
2383
3004
|
}\r
|
|
2384
|
-
`;r.Material.WallDiffuseType="WallDiffuse";r.Material._materialCache.addMaterial(r.Material.WallDiffuseType,{fabric:{type:r.Material.WallDiffuseType,uniforms:{color:new r.Color(1,0,0,.7)},source:xp},translucent:function(l){return!0}});r.Material.WallImageTrailType="WallImageTrail";r.Material._materialCache.addMaterial(r.Material.WallImageTrailType,{fabric:{type:r.Material.WallImageTrailType,uniforms:{image:r.Material.DefaultImageId,color:new r.Color(1,0,0,.7),speed:3,repeat:new r.Cartesian2(1,1)},source:Cp},translucent:function(l){return!0}});r.Material.WallLineTrailType="WallLineTrail";r.Material._materialCache.addMaterial(r.Material.WallLineTrailType,{fabric:{type:r.Material.WallLineTrailType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId,repeat:new r.Cartesian2(1,1),speed:3},source:Tp},translucent:function(l){return!0}});r.Material.WallTrailType="WallTrail";r.Material._materialCache.addMaterial(r.Material.WallTrailType,{fabric:{type:r.Material.WallTrailType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId,speed:1},source:Ep},translucent:function(l){return!0}});var Eo=class{constructor(e={}){this._definitionChanged=new r.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=e.color||r.Color.fromBytes(0,255,255,255),this.speed=e.speed||1}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return null}getValue(e,i){return i=r.defaultValue(i,{}),i}equals(e){return this===e}},G=Eo;var hi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.CircleBlurType}getValue(e,i){return i=r.defaultValue(i,{}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(hi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Pp=hi;var ci=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.CircleDiffuseType}getValue(e,i){return i=r.defaultValue(i,{}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(ci.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Mp=ci;var di=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.CircleFadeType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(di.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var bp=di;var pi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.CirclePulseType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(pi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Ap=pi;var mi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.CircleScanType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(mi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Sp=mi;var ui=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.CircleSpiralType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(ui.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Ip=ui;var fi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.CircleVaryType}getValue(e,i){return i=r.defaultValue(i,{}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(fi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Lp=fi;var _i=class l extends G{constructor(e={}){super(e),this.count=Math.max(e.count||3,1),this.gradient=r.Math.clamp(e.gradient||.1,0,1)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return r.Material.CircleWaveType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i.count=this.count,i.gradient=this.gradient,i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(_i.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Dp=_i;var gi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.EllipsoidElectricType}getValue(e,i){return i=r.defaultValue(i,{}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(gi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Rp=gi;var yi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.EllipsoidTrailType}getValue(e,i){return i=r.defaultValue(i,{}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(yi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Op=yi;var vi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.PolylineFlickerType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(vi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var kp=vi;var wi=class l extends G{constructor(e={}){super(e),this._percent=void 0,this._percentSubscription=void 0,this._gradient=void 0,this._gradientSubscription=void 0,this.percent=e.percent||.03,this.gradient=e.gradient||.1}getType(e){return r.Material.PolylineFlowType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i.percent=r.Property.getValueOrUndefined(this._percent,e),i.gradient=r.Property.getValueOrUndefined(this._gradient,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)&&r.Property.equals(this._percent,e._percent)&&r.Property.equals(this._gradient,e._gradient)}};Object.defineProperties(wi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),percent:r.createPropertyDescriptor("percent"),gradient:r.createPropertyDescriptor("gradient")});var Np=wi;var xi=class l extends G{constructor(e={}){var i,s;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new r.Cartesian2(((i=e.repeat)==null?void 0:i.x)||1,((s=e.repeat)==null?void 0:s.y)||1)}getType(e){return r.Material.PolylineImageTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.repeat=r.Property.getValueOrUndefined(this._repeat,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._image,e._image)&&r.Property.equals(this._repeat,e._repeat)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(xi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),image:r.createPropertyDescriptor("image"),repeat:r.createPropertyDescriptor("repeat")});var zp=xi;var Ci="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACYCAYAAACS0lH9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ0GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VFdmV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ChkAQCAQgoAABRSAACgkIc/ABSaJC+uQwAAu7wFAACFFAAAKDR//wCAIhYAACjkEiAAFLIAAEChSfLyOgQAsMuXAAGgkLcAAKCQAgAAhbwFAACFFAAAKOQIAAAKTZJ/rkMAALsUAAAo5AgAAAr5EiAAFFIAAKCQOwAAUEgBAIBCk+TVdQgAYNckeXMdAgDYNUneXocAAHZNkvfXIQCAXZPkv+sQAMCuSfLvdQgAYNckeXcdAgDY5RIgABSaJK+vQwAAu/wWAAAUmiRP1yEAgF2T5HEdAgDYNUl+XocAAHZNkm/XIQCAXZPky3UIAGDXJPl8HQIA2DVJPl6HAAB2TZIP1yEAgF2T5NN1CABgl0uAAFBokny9DgEA7Jok369DAAC7JsmP6xAAwC4FAAAK+S0AACikAABAoUny6zoEALDLHQAAKKQAAEAhRwAAUGiS/L4OAQDsUgAAoJAjAAAopAAAQKFJ8v91CABgly8BAkChSfK4DgEA7PIWAAAUsgAAQCFvAQBAIQsAABRSAACgkEuAAFDo+ToAALDPlwABoJACAACFFAAAKOQtAAAoZAEAgEIWAAAopAAAQCEFAAAKuQMAAIUsAABQyKeAAaCQBQAACrkDAACFHAEAQCELAAAUsgAAQCELAAAUsgAAQCELAAAUsgAAQCEFAAAKOQIAgEIWAAAo5LcAAKCQAgAAhRwBAEAhCwAAFLIAAEAhCwAAFLIAAEAhBQAACvkSIAAUsgAAQCEFAAAKKQAAUMhrgABQyAIAAIUUAAAo5AgAAApZAACgkAIAAIUUAAAo5A4AABT6A6gaPQ6/wRIfAAAAAElFTkSuQmCC";var Ti=class l extends G{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ci}getType(e){return r.Material.PolylineLightingType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._image,e._image)}};Object.defineProperties(Ti.prototype,{color:r.createPropertyDescriptor("color"),image:r.createPropertyDescriptor("image")});var Fp=Ti;var Ei=class l extends G{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ci}getType(e){return r.Material.PolylineLightingTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ei.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),image:r.createPropertyDescriptor("image")});var Gp=Ei;var Pi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.PolylineTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Pi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Hp=Pi;var Mi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.RadarLineType}getValue(e,i){return i=r.defaultValue(i,{}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Mi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Wp=Mi;var bi=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.RadarSweepType}getValue(e,i){return i=r.defaultValue(i,{}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(bi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Bp=bi;var Ai=class l extends G{constructor(e={}){super(e)}getType(e){return r.Material.RadarWaveType}getValue(e,i){return i=r.defaultValue(i,{}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ai.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var Up=Ai;var Si=class l extends G{constructor(e={}){var i,s;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new r.Cartesian2(((i=e.repeat)==null?void 0:i.x)||1,((s=e.repeat)==null?void 0:s.y)||1)}getType(e){return r.Material.WallImageTrailType}getValue(e,i){return i=r.defaultValue(i,{}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.repeat=r.Property.getValueOrUndefined(this._repeat,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._image,e._image)&&r.Property.equals(this._repeat,e._repeat)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Si.prototype,{image:r.createPropertyDescriptor("image"),color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),repeat:r.createPropertyDescriptor("repeat")});var Vp=Si;var Zp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAABACAYAAABWdc94AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGx2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi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JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+eAiLkwAAAQZJREFUeJzt3LERwDAMxDAl5/1XdqYIXRiYQBULFf/svQeA/72nDwC4heACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBkzYx9RoDAmpnn9BEAN/BSAIgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXIGKAHCBigBwg4qUAEBFcgIjgAkQEFyAiuAARwQWICC5ARHABIoILEBFcgIjgAkQEFyAiuAARwQWI2MMFiNjDBYh4KQBEBBcgIrgAEcEFiAguQERwASKCCxARXICI4AJEBBcgIrgAEcEFiAguQERwASIfRmAGiWTgoMYAAAAASUVORK5CYII=";var Ii=class l extends G{constructor(e={}){var i,s;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=Zp,this.repeat=new r.Cartesian2(((i=e.repeat)==null?void 0:i.x)||1,((s=e.repeat)==null?void 0:s.y)||1)}getType(e){return r.Material.WallLineTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.repeat=r.Property.getValueOrUndefined(this._repeat,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)&&r.Property.equals(this._repeat,e._repeat)}};Object.defineProperties(Ii.prototype,{color:r.createPropertyDescriptor("color"),image:r.createPropertyDescriptor("image"),repeat:r.createPropertyDescriptor("repeat"),speed:r.createPropertyDescriptor("speed")});var jp=Ii;var Yp="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZ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}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Yp}getType(e){return r.Material.WallTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Li.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),image:r.createPropertyDescriptor("image")});var qp=Li;var Di=class l{constructor(e){e=e||{},this._definitionChanged=new r.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=e.baseWaterColor||new r.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=e.blendColor||new r.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=e.specularMap||r.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=e.normalMap||r.Material.DefaultImageId,this.frequency=r.defaultValue(e.frequency,1e3),this.animationSpeed=r.defaultValue(e.animationSpeed,.01),this.amplitude=r.defaultValue(e.amplitude,10),this.specularIntensity=r.defaultValue(e.specularIntensity,.5)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return r.Material.WaterType}getValue(e,i){return i||(i={}),i.baseWaterColor=r.Property.getValueOrUndefined(this._baseWaterColor,e),i.blendColor=r.Property.getValueOrUndefined(this._blendColor,e),i.specularMap=r.Property.getValueOrUndefined(this._specularMap,e),i.normalMap=r.Property.getValueOrUndefined(this._normalMap,e),i.frequency=this.frequency,i.animationSpeed=this.animationSpeed,i.amplitude=this.amplitude,i.specularIntensity=this.specularIntensity,i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._baseWaterColor,e._baseWaterColor)}};Object.defineProperties(Di.prototype,{baseWaterColor:r.createPropertyDescriptor("baseWaterColor"),blendColor:r.createPropertyDescriptor("blendColor"),specularMap:r.createPropertyDescriptor("specularMap"),normalMap:r.createPropertyDescriptor("normalMap")});var Xp=Di;/**
|
|
3005
|
+
`;r.Material.WallDiffuseType="WallDiffuse";r.Material._materialCache.addMaterial(r.Material.WallDiffuseType,{fabric:{type:r.Material.WallDiffuseType,uniforms:{color:new r.Color(1,0,0,.7)},source:Gd},translucent:function(l){return!0}});r.Material.WallImageTrailType="WallImageTrail";r.Material._materialCache.addMaterial(r.Material.WallImageTrailType,{fabric:{type:r.Material.WallImageTrailType,uniforms:{image:r.Material.DefaultImageId,color:new r.Color(1,0,0,.7),speed:3,repeat:new r.Cartesian2(1,1)},source:Hd},translucent:function(l){return!0}});r.Material.WallLineTrailType="WallLineTrail";r.Material._materialCache.addMaterial(r.Material.WallLineTrailType,{fabric:{type:r.Material.WallLineTrailType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId,repeat:new r.Cartesian2(1,1),speed:3},source:Bd},translucent:function(l){return!0}});r.Material.WallTrailType="WallTrail";r.Material._materialCache.addMaterial(r.Material.WallTrailType,{fabric:{type:r.Material.WallTrailType,uniforms:{color:new r.Color(1,0,0,.7),image:r.Material.DefaultImageId,speed:1},source:Ud},translucent:function(l){return!0}});var Ia=class{constructor(e={}){this._definitionChanged=new r.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=e.color||r.Color.fromBytes(0,255,255,255),this.speed=e.speed||1}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return null}getValue(e,i){return i=typeof i=="undefined"?{}:i,i}equals(e){return this===e}},k=Ia;var $t=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.CircleBlurType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties($t.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var s0=$t;var ei=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.CircleDiffuseType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(ei.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var o0=ei;var ti=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.CircleFadeType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(ti.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var a0=ti;var ii=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.CirclePulseType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(ii.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var n0=ii;var ri=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.CircleScanType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(ri.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var l0=ri;var si=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.CircleSpiralType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(si.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var h0=si;var oi=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.CircleVaryType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(oi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var c0=oi;var ai=class l extends k{constructor(e={}){super(e),this.count=Math.max(e.count||3,1),this.gradient=r.Math.clamp(e.gradient||.1,0,1)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return r.Material.CircleWaveType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i.count=this.count,i.gradient=this.gradient,i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(ai.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var d0=ai;var ni=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.EllipsoidElectricType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(ni.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var p0=ni;var li=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.EllipsoidTrailType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(li.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var m0=li;var hi=class l extends k{constructor(e={}){super(e),this.color=e.color||r.Color.WHITE,this._startType=void 0,this._startTypeSubscription=void 0,this.startType=e.startType,this._endType=void 0,this._endTypeSubscription=void 0,this.endType=e.endType,this._outlineShow=void 0,this._outlineShowSubscription=void 0,this.outlineShow=e.outlineShow||!1,this._lineWidth=void 0,this._lineWidthSubscription=void 0,this.lineWidth=e.lineWidth,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this.outlineColor=e.outlineColor||(this.outlineShow?r.Color.WHITE:this.color)}getType(e){return r.Material.PolylineCustomEndpointType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.startType=r.Property.getValueOrUndefined(this._startType,e),i.endType=r.Property.getValueOrUndefined(this._endType,e),i.outlineShow=r.Property.getValueOrUndefined(this._outlineShow,e),i.lineWidth=r.Property.getValueOrUndefined(this._lineWidth,e),i.outlineColor=r.Property.getValueOrUndefined(this._outlineColor,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._startType,e._startType)&&r.Property.equals(this._endType,e._endType)&&r.Property.equals(this._outlineShow,e._outlineShow)&&r.Property.equals(this._lineWidth,e._lineWidth)&&r.Property.equals(this._outlineColor,e._outlineColor)}};Object.defineProperties(hi.prototype,{color:r.createPropertyDescriptor("color"),startType:r.createPropertyDescriptor("startType"),endType:r.createPropertyDescriptor("endType"),outlineShow:r.createPropertyDescriptor("outlineShow"),lineWidth:r.createPropertyDescriptor("lineWidth"),outlineColor:r.createPropertyDescriptor("outlineColor")});var u0=hi;var ci=class l extends k{constructor(e={}){super(e),this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.outlineWidth=e.outlineWidth,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this.outlineColor=e.outlineColor}getType(e){return r.Material.PolylineDirectionType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.outlineWidth=r.Property.getValueOrUndefined(this._outlineWidth,e),i.outlineColor=r.Property.getValueOrUndefined(this._outlineColor,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._outlineWidth,e._outlineWidth)&&r.Property.equals(this._outlineColor,e._outlineColor)}};Object.defineProperties(ci.prototype,{color:r.createPropertyDescriptor("color"),outlineWidth:r.createPropertyDescriptor("outlineWidth"),outlineColor:r.createPropertyDescriptor("outlineColor")});var f0=ci;var di=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.PolylineDashArrowType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)}};Object.defineProperties(di.prototype,{color:r.createPropertyDescriptor("color")});var _0=di;var pi=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.PolylineEmissionType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)}};Object.defineProperties(pi.prototype,{color:r.createPropertyDescriptor("color")});var g0=pi;var mi=class l extends k{constructor(e={}){var i,s;super(e),this.color=e.color||r.Color.WHITE,this._outlineColor=void 0,this._outlineColorSubscription=void 0,this.outlineColor=e.outlineColor||new r.Color(1,1,1,0),this._outlineWidth=void 0,this._outlineWidthSubscription=void 0,this.outlineWidth=(i=e.outlineWidth)!=null?i:10,this._maskLength=void 0,this._maskLengthSubscription=void 0,this.maskLength=(s=e.maskLength)!=null?s:20}getType(e){return r.Material.PolylineFenceType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.outlineColor=r.Property.getValueOrUndefined(this._outlineColor,e),i.outlineWidth=r.Property.getValueOrUndefined(this._outlineWidth,e),i.maskLength=r.Property.getValueOrUndefined(this._maskLength,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._outlineColor,e._outlineColor)&&r.Property.equals(this._outlineWidth,e._outlineWidth)&&r.Property.equals(this._maskLength,e._maskLength)}};Object.defineProperties(mi.prototype,{color:r.createPropertyDescriptor("color"),outlineColor:r.createPropertyDescriptor("outlineColor"),outlineWidth:r.createPropertyDescriptor("outlineWidth"),maskLength:r.createPropertyDescriptor("maskLength")});var y0=mi;var ui=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.PolylineFlickerType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(ui.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var v0=ui;var fi=class l extends k{constructor(e={}){super(e),this._percent=void 0,this._percentSubscription=void 0,this._gradient=void 0,this._gradientSubscription=void 0,this.percent=e.percent||.03,this.gradient=e.gradient||.1}getType(e){return r.Material.PolylineFlowType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i.percent=r.Property.getValueOrUndefined(this._percent,e),i.gradient=r.Property.getValueOrUndefined(this._gradient,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)&&r.Property.equals(this._percent,e._percent)&&r.Property.equals(this._gradient,e._gradient)}};Object.defineProperties(fi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),percent:r.createPropertyDescriptor("percent"),gradient:r.createPropertyDescriptor("gradient")});var w0=fi;var _i=class l extends k{constructor(e={}){var i,s;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new r.Cartesian2(((i=e.repeat)==null?void 0:i.x)||1,((s=e.repeat)==null?void 0:s.y)||1)}getType(e){return r.Material.PolylineImageTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.repeat=r.Property.getValueOrUndefined(this._repeat,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._image,e._image)&&r.Property.equals(this._repeat,e._repeat)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(_i.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),image:r.createPropertyDescriptor("image"),repeat:r.createPropertyDescriptor("repeat")});var C0=_i;var gi="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACYCAYAAACS0lH9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ0GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0RXZ0PSJodHRwOi8vbnMuYWRvYmUuY29tL3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gELuAABAIQsAABRSAACgkAIAAIXcAQCAQhYAAChkAQCAQgoAABRSAACgkIc/ABSaJC+uQwAAu7wFAACFFAAAKDR//wCAIhYAACjkEiAAFLIAAEChSfLyOgQAsMuXAAGgkLcAAKCQAgAAhbwFAACFFAAAKOQIAAAKTZJ/rkMAALsUAAAo5AgAAAr5EiAAFFIAAKCQOwAAUEgBAIBCk+TVdQgAYNckeXMdAgDYNUneXocAAHZNkvfXIQCAXZPkv+sQAMCuSfLvdQgAYNckeXcdAgDY5RIgABSaJK+vQwAAu/wWAAAUmiRP1yEAgF2T5HEdAgDYNUl+XocAAHZNkm/XIQCAXZPky3UIAGDXJPl8HQIA2DVJPl6HAAB2TZIP1yEAgF2T5NN1CABgl0uAAFBokny9DgEA7Jok369DAAC7JsmP6xAAwC4FAAAK+S0AACikAABAoUny6zoEALDLHQAAKKQAAEAhRwAAUGiS/L4OAQDsUgAAoJAjAAAopAAAQKFJ8v91CABgly8BAkChSfK4DgEA7PIWAAAUsgAAQCFvAQBAIQsAABRSAACgkEuAAFDo+ToAALDPlwABoJACAACFFAAAKOQtAAAoZAEAgEIWAAAopAAAQCEFAAAKuQMAAIUsAABQyKeAAaCQBQAACrkDAACFHAEAQCELAAAUsgAAQCELAAAUsgAAQCELAAAUsgAAQCEFAAAKOQIAgEIWAAAo5LcAAKCQAgAAhRwBAEAhCwAAFLIAAEAhCwAAFLIAAEAhBQAACvkSIAAUsgAAQCEFAAAKKQAAUMhrgABQyAIAAIUUAAAo5AgAAApZAACgkAIAAIUUAAAo5A4AABT6A6gaPQ6/wRIfAAAAAElFTkSuQmCC";var yi=class l extends k{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=gi}getType(e){return r.Material.PolylineLightingType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._image,e._image)}};Object.defineProperties(yi.prototype,{color:r.createPropertyDescriptor("color"),image:r.createPropertyDescriptor("image")});var T0=yi;var vi=class l extends k{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=gi}getType(e){return r.Material.PolylineLightingTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(vi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),image:r.createPropertyDescriptor("image")});var E0=vi;var wi=class l extends k{constructor(e={}){super(e),this._repeatFactor=void 0,this._repeatFactorSubscription=void 0,this.repeatFactor=e.repeatFactor,this._antiClockWise=void 0,this._antiClockWiseSubscription=void 0,this.antiClockWise=e.antiClockWise}getType(e){return r.Material.PolylineMultiArrowType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.repeatFactor=r.Property.getValueOrUndefined(this._repeatFactor,e),i.antiClockWise=r.Property.getValueOrUndefined(this._antiClockWise,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._repeatFactor,e._repeatFactor)&&r.Property.equals(this._antiClockWise,e._antiClockWise)}};Object.defineProperties(wi.prototype,{color:r.createPropertyDescriptor("color"),repeatFactor:r.createPropertyDescriptor("repeatFactor"),antiClockWise:r.createPropertyDescriptor("antiClockWise")});var P0=wi;var Ci=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.PolylineTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ci.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var b0=Ci;var xi=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.RadarLineType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(xi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var M0=xi;var Ti=class l extends k{constructor(e={}){super(e),this._repeat=void 0,this._repeatSubscription=void 0,this._thickness=void 0,this._thicknessSubscription=void 0,this.repeat=e.repeat||30,this.thickness=e.thickness||.3}getType(e){return r.Material.RadarOuterType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i.repeat=r.Property.getValueOrUndefined(this._repeat,e),i.thickness=r.Property.getValueOrUndefined(this._thickness,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)&&r.Property.equals(this._repeat,e._repeat)&&r.Property.equals(this._thickness,e._thickness)}};Object.defineProperties(Ti.prototype,{color:r.createPropertyDescriptor("color"),repeat:r.createPropertyDescriptor("repeat"),thickness:r.createPropertyDescriptor("thickness"),speed:r.createPropertyDescriptor("speed")});var A0=Ti;var Ei=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.RadarSweepType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ei.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var S0=Ei;var Pi=class l extends k{constructor(e={}){super(e)}getType(e){return r.Material.RadarWaveType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Pi.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed")});var I0=Pi;var bi=class l extends k{constructor(e={}){var i,s;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=e.image,this.repeat=new r.Cartesian2(((i=e.repeat)==null?void 0:i.x)||1,((s=e.repeat)==null?void 0:s.y)||1)}getType(e){return r.Material.WallImageTrailType}getValue(e,i){return i=typeof i=="undefined"?{}:i,i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.repeat=r.Property.getValueOrUndefined(this._repeat,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._image,e._image)&&r.Property.equals(this._repeat,e._repeat)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(bi.prototype,{image:r.createPropertyDescriptor("image"),color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),repeat:r.createPropertyDescriptor("repeat")});var L0=bi;var Vd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAABACAYAAABWdc94AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGx2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM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l5/1XdqYIXRiYQBULFf/svQeA/72nDwC4heACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBkzYx9RoDAmpnn9BEAN/BSAIgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXIGKAHCBigBwg4qUAEBFcgIjgAkQEFyAiuAARwQWICC5ARHABIoILEBFcgIjgAkQEFyAiuAARwQWI2MMFiNjDBYh4KQBEBBcgIrgAEcEFiAguQERwASKCCxARXICI4AJEBBcgIrgAEcEFiAguQERwASIfRmAGiWTgoMYAAAAASUVORK5CYII=";var Mi=class l extends k{constructor(e={}){var i,s;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=Vd,this.repeat=new r.Cartesian2(((i=e.repeat)==null?void 0:i.x)||1,((s=e.repeat)==null?void 0:s.y)||1)}getType(e){return r.Material.WallLineTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.repeat=r.Property.getValueOrUndefined(this._repeat,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)&&r.Property.equals(this._repeat,e._repeat)}};Object.defineProperties(Mi.prototype,{color:r.createPropertyDescriptor("color"),image:r.createPropertyDescriptor("image"),repeat:r.createPropertyDescriptor("repeat"),speed:r.createPropertyDescriptor("speed")});var R0=Mi;var Zd="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZgEyAAIAAAAUAAAAiodpAAQAAAABAAAAngAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIw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JzNyEpNPERms08NCa7cYJ3hA5tKmttiMuRTluTTwNX4O8TpJ6iTtJXXFz5wdJ9bg1t0PAKTK00dehQngLjgvAVRrK0T4xslIj8yqbcLXbCaBrfY2K2NjlsQUO4kbMr6HPrp7H8bVn8VbeA//DSDvnb4M+SqsQx5/ClAvhTV6fG7yj61La27049IQdbnxqVeGGisFqhuDTAoenAV0V2xMG6LNWBNPP0nfXO5w/UPnDnALuGo+b2TfU3wnlzvpI3pkWBmuHPTJKhuDadU2XhBjDy6KNVdEa9FeY8fFGQ9d8tTGIY15/jDCyB0QoIVLBoTkgtdg7gM1n/oTF/DdySCQBaY4eMYDi+wJ6oRrNMWKU0HyxugOiFqTeu3KA43Nm92QdovX93YT9KmIwr+OanD7I6b+cHQJ5OlbNLhvQWJb86+gA8Z1F22SqqMbriyd+gBGmYKJm90jP/wizzj3gcNmve/5HYDgDsgHkJkoxdsIx6Mz2P8kfIAn2a9iBUDaw0+fi2FF2KppXpz0sdgxbgzCjjvxt01/dXCLj957oO/A2QEYvf7tpFsgLCgG/w9NjGZycTU0MdXlJD/H5hbjUQg+G2PssYuLXvvowwdfn8AH23cBbfrnH43yc5ixj0Fv1TpIiJ+SXZbvOBu/xRBX2WzzhDHBFmKolcu6dtdw9WB8srVP3IlXngN28cvgLl6uf4Gl/F2AidwB6pzMuWC7EUm89gOTiU+cjicN1i+vW80tp3ITbJw0RR/IE+J6KkyzMlZuLsUMHrZ8yo9YMeBrjMQezPoW4CWgYYpJ5a7aSfp1cvitOyfo27JTbIRFdHAaBhObskmLG0zYyOoO04IY1zy13TcKnR3Q5lMA2MuHfxp75VN4LgOi4ZNtf74MOUnIwCWDV/5e7uSlkbfCcRMuH2yrvBRlLgcO9xXqjIP/9lUeTLjFI3z8F+ualIvlptDJAAAAAElFTkSuQmCC";var Ai=class l extends k{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Zd}getType(e){return r.Material.WallTrailType}getValue(e,i){return i||(i={}),i.color=r.Property.getValueOrUndefined(this._color,e),i.image=r.Property.getValueOrUndefined(this._image,e),i.speed=r.Property.getValueOrUndefined(this._speed,e),i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._color,e._color)&&r.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ai.prototype,{color:r.createPropertyDescriptor("color"),speed:r.createPropertyDescriptor("speed"),image:r.createPropertyDescriptor("image")});var k0=Ai;var Si=class l{constructor(e){e=e||{},this._definitionChanged=new r.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=e.baseWaterColor||new r.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=e.blendColor||new r.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=e.specularMap||r.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=e.normalMap||r.Material.DefaultImageId,this.frequency=r.defaultValue(e.frequency,1e3),this.animationSpeed=r.defaultValue(e.animationSpeed,.01),this.amplitude=r.defaultValue(e.amplitude,10),this.specularIntensity=r.defaultValue(e.specularIntensity,.5)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return r.Material.WaterType}getValue(e,i){return i||(i={}),i.baseWaterColor=r.Property.getValueOrUndefined(this._baseWaterColor,e),i.blendColor=r.Property.getValueOrUndefined(this._blendColor,e),i.specularMap=r.Property.getValueOrUndefined(this._specularMap,e),i.normalMap=r.Property.getValueOrUndefined(this._normalMap,e),i.frequency=this.frequency,i.animationSpeed=this.animationSpeed,i.amplitude=this.amplitude,i.specularIntensity=this.specularIntensity,i}equals(e){return this===e||e instanceof l&&r.Property.equals(this._baseWaterColor,e._baseWaterColor)}};Object.defineProperties(Si.prototype,{baseWaterColor:r.createPropertyDescriptor("baseWaterColor"),blendColor:r.createPropertyDescriptor("blendColor"),specularMap:r.createPropertyDescriptor("specularMap"),normalMap:r.createPropertyDescriptor("normalMap")});var z0=Si;/**
|
|
2385
3006
|
* @file 材质模块入口
|
|
2386
3007
|
* @module material
|
|
2387
3008
|
* @author Lucas Xu
|
|
@@ -2394,17 +3015,17 @@ czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
|
2394
3015
|
* color: Cesium.Color.RED,
|
|
2395
3016
|
* speed: 1.0
|
|
2396
3017
|
* });
|
|
2397
|
-
*
|
|
3018
|
+
*
|
|
2398
3019
|
* // 使用多段线流动材质
|
|
2399
3020
|
* const polylineMaterial = new PolylineFlowMaterialProperty({
|
|
2400
3021
|
* color: Cesium.Color.BLUE,
|
|
2401
3022
|
* speed: 2.0
|
|
2402
3023
|
* });
|
|
2403
|
-
*
|
|
3024
|
+
*
|
|
2404
3025
|
* @exports * - 导出所有材质属性类
|
|
2405
3026
|
* @license MIT
|
|
2406
3027
|
* @copyright © 2025 Company Name
|
|
2407
|
-
*/var Po=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_stoppedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._positions.length<=1?this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236":this.drawTool.tooltipMess="\u5355\u51FB\u589E\u52A0\u70B9\uFF0C\u53F3\u51FB\u5220\u9664\u70B9\uFF0C\u53CC\u51FB\u5B8C\u6210\u7ED8\u5236"}_onDeleteAnchor(){this._positions.length>1&&this._positions.splice(this._positions.length-2,1),this._positions.length<=1&&(this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236")}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._removeSamePoint(this._positions),this._delegate&&this._layer.entities.remove(this._delegate),this._stoppedHook()}_removeSamePoint(e=[]){if(e.length<2)return e;for(let i=0;i<e.length-1;i++){let s=e[i],a=e[i+1];typeof s.equals=="function"&&s.equals(a)&&(console.log("element",s),console.log("element",a),e.splice(i,1),i--)}return e}_bindEvent(){this.drawTool.on(M.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(M.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(M.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.on(M.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(M.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(M.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(M.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.off(M.DRAW_STOP,this._onDrawStop,this)}start(e,i){return this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(i),this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236",this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.drawTool.fire(M.DRAW_STOP),this}},K=Po;var E0={pixelSize:10,outlineColor:r.Color.BLUE,outlineWidth:5},Mo=class extends K{constructor(e){super(),this._position=r.Cartesian3.ZERO,this._style={...E0,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({position:new r.CallbackProperty(()=>this._position,!1),point:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new si(y.transformCartesianToWGS84(this._position)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(M.DRAW_STOP,e)}_onAnchorMoving(e){this._position=e}},Jp=Mo;var P0={width:3,material:r.Color.YELLOW.withAlpha(.6)},bo=class extends K{constructor(e){super(),this._style={...P0,...e}}_mountedHook(){this._delegate=new r.Entity({polyline:{...this._style,positions:new r.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new nt(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e}),i>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(M.DRAW_STOP))}},Qp=bo;var M0={material:r.Color.YELLOW.withAlpha(.6),fill:!0,outline:!0,outlineWidth:2,outlineColor:r.Color.GREEN,width:2},Ao=class extends K{constructor(e){super(),this._style={...M0,...e}}_mountedHook(){this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?new r.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)},polyline:{...this._style,positions:new r.CallbackProperty(()=>this._positions.length<=3?this._positions:null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ot(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e})}},Kp=Ao;var b0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},So=class extends K{constructor(e){super(),this._maxAnchorSize=2,this._radius=0,this._style={...b0,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>{if(this._positions.length>1){if(this._radius=r.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let e=r.EllipseGeometryLibrary.computeEllipsePositions({center:this._positions[0],semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),i=r.Cartesian3.unpackArray(e.outerPositions);return i.push(i[0]),new r.PolygonHierarchy(i)}else return null},!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ii(y.transformCartesianToWGS84(this._positions[0]),this._radius).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e,isCenter:i===1}),i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(M.DRAW_STOP))}},$p=So;var A0={material:r.Color.YELLOW.withAlpha(.6)},Io=class extends K{constructor(e){super(),this._maxAnchorSize=2,this._style={...A0,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({rectangle:{...this._style,coordinates:new r.CallbackProperty(e=>this._positions.length>1?r.Rectangle.fromCartesianArray(this._positions):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ai(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e}),i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(M.DRAW_STOP))}},em=Io;var Lo=class extends K{constructor(e){super(),this._position=r.Cartesian3.ZERO,this._style={image:et,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({position:new r.CallbackProperty(()=>this._position,!1),billboard:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new at(y.transformCartesianToWGS84(this._position),this._style.image).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(M.DRAW_STOP)}_onAnchorMoving(e){this._position=e}},tm=Lo;var Ri=Math.PI/2,Do=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8}get positions(){return this._positions}set positions(e){this._positions=e}get hierarchy(){return this._createHierarchy()}_getArrowHeadPoints(e,i,s){let a=C.getBaseLength(e),o=a*this.headHeightFactor,n=e[e.length-1];a=C.distance(n,e[e.length-2]);let h=C.distance(i,s);o>h*this.headTailFactor&&(o=h*this.headTailFactor);let c=o*this.headWidthFactor,d=o*this.neckWidthFactor;o=o>a?a:o;let p=o*this.neckHeightFactor,f=C.getThirdPoint(e[e.length-2],n,0,o,!0),g=C.getThirdPoint(e[e.length-2],n,0,p,!0),u=C.getThirdPoint(n,f,Ri,c,!1),m=C.getThirdPoint(n,f,Ri,c,!0),E=C.getThirdPoint(n,g,Ri,d,!1),w=C.getThirdPoint(n,g,Ri,d,!0);return[E,u,n,m,w]}_getArrowBodyPoints(e,i,s,a){let o=C.wholeDistance(e),h=C.getBaseLength(e)*a,c=C.distance(i,s),d=(h-c)/2,p=0,f=[],g=[];for(let u=1;u<e.length-1;u++){let m=C.getAngleOfThreePoints(e[u-1],e[u],e[u+1])/2;p+=C.distance(e[u-1],e[u]);let E=(h/2-p/o*d)/Math.sin(m),w=C.getThirdPoint(e[u-1],e[u],Math.PI-m,E,!0),P=C.getThirdPoint(e[u-1],e[u],m,E,!1);f.push(w),g.push(P)}return f.concat(g)}_createHierarchy(){let e=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0],i=e[0],s=e[1];C.isClockWise(e[0],e[1],e[2])&&(i=e[1],s=e[0]);let o=[C.mid(i,s)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,i,s),h=n[0],c=n[4],d=C.distance(i,s)/C.getBaseLength(o),p=this._getArrowBodyPoints(o,h,c,d),f=p.length,g=[i].concat(p.slice(0,f/2));g.push(h);let u=[s].concat(p.slice(f/2,f));return u.push(c),g=C.getQBSplinePoints(g),u=C.getQBSplinePoints(u),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(g.concat(n,u.reverse()))))}},lt=Do;var S0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},Ro=class extends K{constructor(e){super(),this._maxAnchorSize=3,this._style={...S0,...e},this._graphics=new lt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new st(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(M.DRAW_STOP))}},im=Ro;var oe=Math.PI/2,Oo=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15}get positions(){return this._positions}set positions(e){this._positions=e}get hierarchy(){return this._createHierarchy()}_getArrowPoints(e,i,s,a){let o=C.mid(e,i),n=C.distance(o,s),h=C.getThirdPoint(s,o,0,n*.3,!0),c=C.getThirdPoint(s,o,0,n*.5,!0);h=C.getThirdPoint(o,h,oe,n/5,a),c=C.getThirdPoint(o,c,oe,n/4,a);let d=[o,h,c,s],p=this._getArrowHeadPoints(d),f=p[0],g=p[4],u=C.distance(e,i)/C.getBaseLength(d)/2,m=this._getArrowBodyPoints(d,f,g,u),E=m.length,w=m.slice(0,E/2),P=m.slice(E/2,E);return w.push(f),P.push(g),w=w.reverse(),w.push(i),P=P.reverse(),P.push(e),w.reverse().concat(p,P)}_getArrowHeadPoints(e){let s=C.getBaseLength(e)*this.headHeightFactor,a=e[e.length-1],o=s*this.headWidthFactor,n=s*this.neckWidthFactor,h=s*this.neckHeightFactor,c=C.getThirdPoint(e[e.length-2],a,0,s,!0),d=C.getThirdPoint(e[e.length-2],a,0,h,!0),p=C.getThirdPoint(a,c,oe,o,!1),f=C.getThirdPoint(a,c,oe,o,!0),g=C.getThirdPoint(a,d,oe,n,!1),u=C.getThirdPoint(a,d,oe,n,!0);return[g,p,a,f,u]}_getArrowBodyPoints(e,i,s,a){let o=C.wholeDistance(e),h=C.getBaseLength(e)*a,c=C.distance(i,s),d=(h-c)/2,p=0,f=[],g=[];for(let u=1;u<e.length-1;u++){let m=C.getAngleOfThreePoints(e[u-1],e[u],e[u+1])/2;p+=C.distance(e[u-1],e[u]);let E=(h/2-p/o*d)/Math.sin(m),w=C.getThirdPoint(e[u-1],e[u],Math.PI-m,E,!0),P=C.getThirdPoint(e[u-1],e[u],m,E,!1);f.push(w),g.push(P)}return f.concat(g)}_getTempPoint4(e,i,s){let a=C.mid(e,i),o=C.distance(a,s),n=C.getAngleOfThreePoints(e,a,s),h,c,d,p;return n<oe?(c=o*Math.sin(n),d=o*Math.cos(n),p=C.getThirdPoint(e,a,oe,c,!1),h=C.getThirdPoint(a,p,oe,d,!0)):n>=oe&&n<Math.PI?(c=o*Math.sin(Math.PI-n),d=o*Math.cos(Math.PI-n),p=C.getThirdPoint(e,a,oe,c,!1),h=C.getThirdPoint(a,p,oe,d,!1)):n>=Math.PI&&n<Math.PI*1.5?(c=o*Math.sin(n-Math.PI),d=o*Math.cos(n-Math.PI),p=C.getThirdPoint(e,a,oe,c,!0),h=C.getThirdPoint(a,p,oe,d,!0)):(c=o*Math.sin(Math.PI*2-n),d=o*Math.cos(Math.PI*2-n),p=C.getThirdPoint(e,a,oe,c,!0),h=C.getThirdPoint(a,p,oe,d,!1)),h}_createHierarchy(){let e=this._positions.length,i,s,a=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0],o=a[0],n=a[1],h=a[2];e===3?i=this._getTempPoint4(o,n,h):i=a[3],e===3||e===4?s=C.mid(o,n):s=a[4];let c,d;C.isClockWise(o,n,h)?(c=this._getArrowPoints(o,s,i,!1),d=this._getArrowPoints(s,n,h,!0)):(c=this._getArrowPoints(n,s,h,!1),d=this._getArrowPoints(s,o,i,!0));let p=c.length,f=(p-5)/2,g=c.slice(0,f),u=c.slice(f,f+5),m=c.slice(f+5,p),E=d.slice(0,f),w=d.slice(f,f+5),P=d.slice(f+5,p);E=C.getBezierPoints(E);let b=C.getBezierPoints(P.concat(g.slice(1)));return m=C.getBezierPoints(m),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(E.concat(w,b,u,m))))}},Oi=Oo;var I0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},ko=class extends K{constructor(e){super(),this._maxAnchorSize=4,this._style={...I0,...e},this._graphics=new Oi}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Jt(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(M.DRAW_STOP))}},rm=ko;var sm=Math.PI/2,No=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13}get positions(){return this._positions}set positions(e){this._positions=e}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0],i=e[0],s=e[1],a=C.getBaseLength(e),o=a*this.tailWidthFactor,n=a*this.neckWidthFactor,h=a*this.headWidthFactor,c=C.getThirdPoint(s,i,sm,o,!0),d=C.getThirdPoint(s,i,sm,o,!1),p=C.getThirdPoint(i,s,this.headAngle,h,!1),f=C.getThirdPoint(i,s,this.headAngle,h,!0),g=C.getThirdPoint(i,s,this.neckAngle,n,!1),u=C.getThirdPoint(i,s,this.neckAngle,n,!0);return new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions([c,g,p,s,f,u,d])))}},ki=No;var L0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},zo=class extends K{constructor(e){super(),this._maxAnchorSize=2,this._style={...L0,...e},this._graphics=new ki}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Qt(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(M.DRAW_STOP))}},am=zo;var D0=Math.PI/2,om=100,Fo=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.t=.4}get positions(){return this._positions}set positions(e){this._positions=e}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0];if(this._positions.length===2){let n=C.mid(e[0],e[1]),h=C.distance(e[0],n)/.9,c=C.getThirdPoint(e[0],n,D0,h,!0);e=[e[0],c,e[1]]}let i=C.mid(e[0],e[2]);e.push(i,e[0],e[1]);let s=[];for(let n=0;n<e.length-2;n++){let h=e[n],c=e[n+1],d=e[n+2],p=C.getBisectorNormals(this.t,h,c,d);s=s.concat(p)}let a=s.length;s=[s[a-1]].concat(s.slice(0,a-1));let o=[];for(let n=0;n<e.length-2;n++){let h=e[n],c=e[n+1];o.push(h);for(let d=0;d<=om;d++){let p=C.getCubicValue(d/om,h,s[n*2],s[n*2+1],c);o.push(p)}o.push(c)}return new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(o)))}},Ni=Fo;var R0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},Go=class extends K{constructor(e){super(),this._maxAnchorSize=3,this._style={...R0,...e},this._graphics=new Ni}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Kt(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(M.DRAW_STOP))}},nm=Go;var Ho=class extends lt{constructor(e){super(e),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1}_createHierarchy(){let e=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0],i=e[0],s=e[1];C.isClockWise(e[0],e[1],e[2])&&(i=e[1],s=e[0]);let o=[C.mid(i,s)].concat(e.slice(2)),n=this._getArrowHeadPoints(o,i,s),h=n[0],c=n[4],d=C.distance(i,s),p=C.getBaseLength(o),f=p*this.tailWidthFactor*this.swallowTailFactor,g=C.getThirdPoint(o[1],o[0],0,f,!0),u=d/p,m=this._getArrowBodyPoints(o,h,c,u),E=m.length,w=[i].concat(m.slice(0,E/2));w.push(h);let P=[s].concat(m.slice(E/2,E));return P.push(c),w=C.getQBSplinePoints(w),P=C.getQBSplinePoints(P),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(w.concat(n,P.reverse(),[g,w[0]]))))}},zi=Ho;var O0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},Wo=class extends K{constructor(e){super(),this._maxAnchorSize=3,this._style={...O0,...e},this._graphics=new zi}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new $t(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(M.DRAW_STOP))}},lm=Wo;var Bo=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._overlay.show=!1,this._delegate=new r.Entity,this._delegate.merge(e.delegate),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_stoppedHook(){this._overlay.positions=y.transformCartesianArrayToWGS84Array(this._positions),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[].concat(y.transformWGS84ArrayToCartesianArray(this._overlay.positions)),this._positions.forEach((e,i)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:e,index:i})})}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now());this._positions[s.index]=i}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now());this._positions[s.index]=i}_onEditStop({pickedAnchor:e,position:i}){this._unbindEvent(),this._viewer.editTool.deactivate(),this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){return this.editTool.on(M.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(M.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(M.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(M.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(M.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(M.EDIT_STOP,this._onEditStop,this)}start(e,i){return this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._viewer.editTool.deactivate(),this._viewer.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._viewer.editTool.activate(i),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.editTool.fire(M.EDIT_STOP,{pickedAnchor:null,position:null}),this}},$=Bo;var Uo=class extends ${constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(r.JulianDate.now()),this._delegate.position=new r.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=y.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:i}){this._position=i}},hm=Uo;var Vo=class extends ${constructor(e){super(e)}_mountedHook(){this._delegate.polyline.positions=new r.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=y.transformCartesianArrayToWGS84Array(this._positions.filter((e,i)=>i%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polyline.positions.getValue(r.JulianDate.now());for(let i=0;i<e.length-1;i++){let s=Y(e[i],e[i+1]);this._positions.push(e[i]),this._positions.push(s)}this._positions.push(e[e.length-1]),this._positions.forEach((i,s)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:i,index:s,isMid:s%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),a=s.index;if(s.isMid){let o=Y(this._positions[a],this._positions[a-1]),n=Y(this._positions[a],this._positions[a+1]);this._positions.splice(a,1,o,i,n),this.editTool.fire(M.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),a=s.index;if(this._positions[a]=i,!s.isMid&&this._options.maxAnchorSize>2){let o=-1,n=-1,h=-1,c=-1,d=this._positions.length;if(a===0?(h=a+2,c=a+1):s.index===d-1?(o=a-2,n=a-1):(o=a-2,n=a-1,h=a+2,c=a+1),o>0){let p=Y(this._positions[o],this._positions[a]);this._positions[n]=p,this.editTool.fire(M.UPDATE_ANCHOR,{index:n,position:p})}if(h>0){let p=Y(this._positions[h],this._positions[a]);this._positions[c]=p,this.editTool.fire(M.UPDATE_ANCHOR,{index:c,position:p})}}}},cm=Vo;var Zo=class extends ${constructor(e){super(e)}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(e=>this._positions.length>2?new r.PolygonHierarchy(this._positions.map(i=>i.clone())):null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=y.transformCartesianArrayToWGS84Array(this._positions.filter((e,i)=>i%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polygon.hierarchy.getValue(r.JulianDate.now()).positions;e.push(e[0]);for(let i=0;i<e.length-1;i++){let s=Y(e[i],e[i+1]);this._positions.push(e[i]),this._positions.push(s)}this._positions.forEach((i,s)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:i,index:s,isMid:s%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),a=s.index;if(s.isMid){let o,n,h=this._positions.length;a===h-1?(o=Y(this._positions[a],this._positions[a-1]),n=Y(this._positions[a],this._positions[0])):(o=Y(this._positions[a],this._positions[a-1]),n=Y(this._positions[a],this._positions[a+1])),this._positions.splice(a,1,o,i,n),this.editTool.fire(M.CLEAR_ANCHOR),this._positions.forEach((c,d)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:c,index:d,isMid:d%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),a=s.index;this._positions[a]=i;let o=this._positions.length;if(!s.isMid){let n=-1,h=-1,c=-1,d=-1;a===0?(n=o-2,h=o-1,c=a+2,d=a+1):a===o-2?(n=a-2,h=a-1,c=0,d=o-1):(n=a-2,h=a-1,c=a+2,d=a+1);let p=Y(this._positions[n],this._positions[a]),f=Y(this._positions[c],this._positions[a]);this._positions[h]=p,this._positions[d]=f,this.editTool.fire(M.UPDATE_ANCHOR,{index:h,position:p}),this.editTool.fire(M.UPDATE_ANCHOR,{index:d,position:f})}}},dm=Zo;var jo=class extends ${constructor(e){super(e),this._center=void 0,this._radius=0}_mountedHook(){this._radius=this._overlay.radius,this._center=y.transformWGS84ToCartesian(this._overlay.center),this._positions=[].concat([this._center,this._computeCirclePoints(this._center,this._radius)[0]]),this._delegate.polygon.hierarchy=new r.CallbackProperty(e=>{if(this._positions.length>1){if(this._radius=r.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let i=this._computeCirclePoints(this._positions[0],this._radius);return i.push(i[0]),new r.PolygonHierarchy(i)}else return null},!1),this._layer.entities.add(this._delegate)}_computeCirclePoints(e,i){let s=[],a=r.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:i,semiMinorAxis:i,rotation:0,granularity:.005},!1,!0);return a&&a.outerPositions&&(s=r.Cartesian3.unpackArray(a.outerPositions)),s}_stoppedHook(){this._overlay.center=y.transformCartesianToWGS84(this._positions[0]),this._overlay.radius=this._radius,this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions.forEach((e,i)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:e,index:i,isCenter:i%2===0})})}},pm=jo;var Yo=class extends ${constructor(e){super(e),this._overlay=e}_mountedHook(){this._delegate.rectangle.coordinates=new r.CallbackProperty(e=>this._positions.length>1?r.Rectangle.fromCartesianArray(this._positions):null,!1),this._layer.entities.add(this._delegate)}},mm=Yo;var qo=class extends ${constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(r.JulianDate.now()),this._delegate.position=new r.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=y.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:i}){this._position=i}},um=qo;var Xo=class extends ${constructor(e){super(e),this._graphics=new lt}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},fm=Xo;var Jo=class extends ${constructor(e){super(e),this._graphics=new Oi}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},_m=Jo;var Qo=class extends ${constructor(e){super(e),this._graphics=new ki}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},gm=Qo;var Ko=class extends ${constructor(e){super(e),this._graphics=new Ni}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},ym=Ko;var $o=class extends ${constructor(e){super(e),this._graphics=new zi}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},vm=$o;var en=class{constructor(e,i={}){this._viewer=e,this._options=i,this._layer=new r.CustomDataSource("plot-layer"),this._viewer.dataSources.add(this._layer),this._currentWorker=void 0,this._state=void 0}get viewer(){return this._viewer}get layer(){return this._layer}get state(){return this._state}_createDrawWorker(e,i){let s;switch(e){case Z.POINT:s=new Jp(i);break;case Z.POLYLINE:s=new Qp(i);break;case Z.POLYGON:s=new Kp(i);break;case Z.CIRCLE:s=new $p(i);break;case Z.RECT:s=new em(i);break;case Z.BILLBOARD:s=new tm(i);break;case Z.ATTACK_ARROW:s=new im(i);break;case Z.DOUBLE_ARROW:s=new rm(i);break;case Z.FINE_ARROW:s=new am(i);break;case Z.TAILED_ATTACK_ARROW:s=new lm(i);break;case Z.GATHERING_PLACE:s=new nm(i);break;default:break}return s}_createEditWorker(e){let i;switch(e.type){case Z.POINT:i=new hm(e);break;case Z.POLYLINE:i=new cm(e);break;case Z.POLYGON:i=new dm(e);break;case Z.CIRCLE:i=new pm(e);break;case Z.RECT:i=new mm(e);break;case Z.BILLBOARD:i=new um(e);break;case Z.ATTACK_ARROW:i=new fm(e);break;case Z.DOUBLE_ARROW:i=new _m(e);break;case Z.FINE_ARROW:i=new gm(e);break;case Z.TAILED_ATTACK_ARROW:i=new vm(e);break;case Z.GATHERING_PLACE:i=new ym(e);break;default:break}return i}draw(e,i,s={},a=!1){var n;this._state="draw",this._currentWorker&&this._currentWorker.stop();let o=(s==null?void 0:s.maxAnchorSize)||999;return s&&delete s.maxAnchorSize,this._currentWorker=(n=this._createDrawWorker(e,s))==null?void 0:n.start(this,{...this._options,maxAnchorSize:o,onDrawStop:i,clampToModel:a!=null?a:this._options.clampToModel}),this}edit(e,i,s=!1){var a;return this._state="edit",this._currentWorker&&this._currentWorker.stop(),this._currentWorker=(a=this._createEditWorker(e))==null?void 0:a.start(this,{...this._options,onEditStop:i,clampToModel:s!=null?s:this._options.clampToModel}),this}clusterPositions(e,i=60){let s=e.positions||[];switch(e.type){case Z.POINT:s.push(e.position);break;case Z.CIRCLE:s=this.circleToCluster(e,i);break;case Z.RECT:s=this.rectangleToCluster(e);break}return s}circleToCluster(e={},i=60){let s=e.center,a=r.Math.toRadians(e.radius/1e3);var o=r.Math.toRadians(s._lng),n=r.Math.toRadians(s._lat);let h=r.Math.toRadians(s._heading);i=Math.ceil(360/(i||60));let c=[];for(let d=0;d<=360;d+=i){let p=h+r.Math.toRadians(d),f=new r.Cartographic(o+a*Math.cos(p),n+a*Math.sin(p),0),g=r.Ellipsoid.WGS84.cartographicToCartesian(f),u=r.Cartographic.fromCartesian(g);c.push(new X(r.Math.toDegrees(u.longitude),r.Math.toDegrees(u.latitude),u.height||0))}return c}rectangleToCluster(e={}){let i=e.positions,s=i[0]._lng,a=i[0]._lat,o=i[1]._lng,n=i[1]._lat;i.push(new X(s,n)),i.push(new X(o,a));var h=r.Rectangle.fromDegrees(s,a,o,n);return i}stop(){this._currentWorker&&this._currentWorker.stop(),this._currentWorker=null}destroy(){return this._viewer.dataSources.remove(this._layer),this._viewer=void 0,this}},k0=en;var tn=class{constructor(e,i={}){this._viewer=e,this._options={}}_bindEvent(){}_unbindEvent(){}start(){if(this._viewer.clock.shouldAnimate=!0,this._unbindEvent(),this._options.duration){let e=setTimeout(()=>{this._unbindEvent(),this._options.callback&&this._options.callback.call(this._options.context||this),clearTimeout(e)},Number(this._options.duration)*1e3)}return this._bindEvent(),this}stop(){return this._unbindEvent(),this}},de=tn;var N0={AROUND_VIEW:"AroundView",AROUND_POINT:"AroundPoint",CIRCLE_SCAN:"CircleScan",FLYING:"Flying",GLOBE_ROTATE:"GlobeRotate",RADAR_SCAN:"RadarScan"},ee=N0;var rn=class extends de{constructor(e,i={}){super(e),this._options=i,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return ee.AROUND_VIEW}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,i){this._heading+=r.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.setView({orientation:{heading:this._heading,pitch:this._options.pitch?r.Math.toRadians(this._options.pitch):this._viewer.camera.pitch,roll:this._options.roll?r.Math.toRadians(this._options.roll):this._viewer.camera.roll}})}};ee.AROUND_VIEW="around_view";var wm=rn;var sn=class extends de{constructor(e,i,s={}){super(e),this._position=v.parsePosition(i),this._options=s,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return ee.AROUND_POINT}set position(e){this._position=v.parsePosition(e)}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,i){this._heading+=r.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.lookAt(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRange(this._heading,r.Math.toRadians(this._options.pitch||0),this._options.range||1e3))}};ee.AROUND_POINT="around_point";var xm=sn;var Cm=`/**\r
|
|
3028
|
+
*/var La=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_stoppedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._positions.length<=1?this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236":this.drawTool.tooltipMess="\u5355\u51FB\u589E\u52A0\u70B9\uFF0C\u53F3\u51FB\u5220\u9664\u70B9\uFF0C\u53CC\u51FB\u5B8C\u6210\u7ED8\u5236"}_onDeleteAnchor(){this._positions.length>1&&this._positions.splice(this._positions.length-2,1),this._positions.length<=1&&(this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236")}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._removeSamePoint(this._positions),this._delegate&&this._layer.entities.remove(this._delegate),this._stoppedHook()}_removeSamePoint(e=[]){if(e.length<2)return e;for(let i=0;i<e.length-1;i++){let s=e[i],o=e[i+1];typeof s.equals=="function"&&s.equals(o)&&(console.log("element",s),console.log("element",o),e.splice(i,1),i--)}return e}_bindEvent(){this.drawTool.on(b.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(b.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(b.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.on(b.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(b.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(b.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(b.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.off(b.DRAW_STOP,this._onDrawStop,this)}start(e,i){return this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(i),this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236",this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.drawTool.fire(b.DRAW_STOP),this}},Q=La;var N0={pixelSize:10,outlineColor:r.Color.BLUE,outlineWidth:5},Da=class extends Q{constructor(e){super(),this._position=r.Cartesian3.ZERO,this._style={...N0,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({position:new r.CallbackProperty(()=>this._position,!1),point:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new Jo(y.transformCartesianToWGS84(this._position)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(b.DRAW_STOP,e)}_onAnchorMoving(e){this._position=e}},jd=Da;var F0={width:3,material:r.Color.YELLOW.withAlpha(.6)},Ra=class extends Q{constructor(e){super(),this._style={...F0,...e}}_mountedHook(){this._delegate=new r.Entity({polyline:{...this._style,positions:new r.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Tt(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e}),i>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(b.DRAW_STOP))}},Yd=Ra;var W0={material:r.Color.YELLOW.withAlpha(.6),fill:!0,outline:!0,outlineWidth:2,outlineColor:r.Color.GREEN,width:2},Oa=class extends Q{constructor(e){super(),this._style={...W0,...e}}_mountedHook(){this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?new r.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)},polyline:{...this._style,positions:new r.CallbackProperty(()=>this._positions.length<=3?this._positions:null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new xt(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e})}},qd=Oa;var G0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},ka=class extends Q{constructor(e){super(),this._maxAnchorSize=2,this._radius=0,this._style={...G0,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>{if(this._positions.length>1){if(this._radius=r.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let e=r.EllipseGeometryLibrary.computeEllipsePositions({center:this._positions[0],semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),i=r.Cartesian3.unpackArray(e.outerPositions);return i.push(i[0]),new r.PolygonHierarchy(i)}else return null},!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Ho(y.transformCartesianToWGS84(this._positions[0]),this._radius).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e,isCenter:i===1}),i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(b.DRAW_STOP))}},Xd=ka;var H0={material:r.Color.YELLOW.withAlpha(.6)},za=class extends Q{constructor(e){super(),this._maxAnchorSize=2,this._style={...H0,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({rectangle:{...this._style,coordinates:new r.CallbackProperty(e=>this._positions.length>1?r.Rectangle.fromCartesianArray(this._positions):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ea(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e}),i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(b.DRAW_STOP))}},Jd=za;var Na=class extends Q{constructor(e){super(),this._position=r.Cartesian3.ZERO,this._style={image:tt,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({position:new r.CallbackProperty(()=>this._position,!1),billboard:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new Ct(y.transformCartesianToWGS84(this._position),this._style.image).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(b.DRAW_STOP)}_onAnchorMoving(e){this._position=e}},Qd=Na;var Ii=Math.PI/2,Fa=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8}get positions(){return this._positions}set positions(e){this._positions=e}get hierarchy(){return this._createHierarchy()}_getArrowHeadPoints(e,i,s){let o=E.getBaseLength(e),a=o*this.headHeightFactor,n=e[e.length-1];o=E.distance(n,e[e.length-2]);let h=E.distance(i,s);a>h*this.headTailFactor&&(a=h*this.headTailFactor);let c=a*this.headWidthFactor,d=a*this.neckWidthFactor;a=a>o?o:a;let p=a*this.neckHeightFactor,f=E.getThirdPoint(e[e.length-2],n,0,a,!0),g=E.getThirdPoint(e[e.length-2],n,0,p,!0),u=E.getThirdPoint(n,f,Ii,c,!1),m=E.getThirdPoint(n,f,Ii,c,!0),T=E.getThirdPoint(n,g,Ii,d,!1),w=E.getThirdPoint(n,g,Ii,d,!0);return[T,u,n,m,w]}_getArrowBodyPoints(e,i,s,o){let a=E.wholeDistance(e),h=E.getBaseLength(e)*o,c=E.distance(i,s),d=(h-c)/2,p=0,f=[],g=[];for(let u=1;u<e.length-1;u++){let m=E.getAngleOfThreePoints(e[u-1],e[u],e[u+1])/2;p+=E.distance(e[u-1],e[u]);let T=(h/2-p/a*d)/Math.sin(m),w=E.getThirdPoint(e[u-1],e[u],Math.PI-m,T,!0),P=E.getThirdPoint(e[u-1],e[u],m,T,!1);f.push(w),g.push(P)}return f.concat(g)}_createHierarchy(){let e=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0],i=e[0],s=e[1];E.isClockWise(e[0],e[1],e[2])&&(i=e[1],s=e[0]);let a=[E.mid(i,s)].concat(e.slice(2)),n=this._getArrowHeadPoints(a,i,s),h=n[0],c=n[4],d=E.distance(i,s)/E.getBaseLength(a),p=this._getArrowBodyPoints(a,h,c,d),f=p.length,g=[i].concat(p.slice(0,f/2));g.push(h);let u=[s].concat(p.slice(f/2,f));return u.push(c),g=E.getQBSplinePoints(g),u=E.getQBSplinePoints(u),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(g.concat(n,u.reverse()))))}},st=Fa;var B0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},Wa=class extends Q{constructor(e){super(),this._maxAnchorSize=3,this._style={...B0,...e},this._graphics=new st}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new wt(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(b.DRAW_STOP))}},Kd=Wa;var ae=Math.PI/2,Ga=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15}get positions(){return this._positions}set positions(e){this._positions=e}get hierarchy(){return this._createHierarchy()}_getArrowPoints(e,i,s,o){let a=E.mid(e,i),n=E.distance(a,s),h=E.getThirdPoint(s,a,0,n*.3,!0),c=E.getThirdPoint(s,a,0,n*.5,!0);h=E.getThirdPoint(a,h,ae,n/5,o),c=E.getThirdPoint(a,c,ae,n/4,o);let d=[a,h,c,s],p=this._getArrowHeadPoints(d),f=p[0],g=p[4],u=E.distance(e,i)/E.getBaseLength(d)/2,m=this._getArrowBodyPoints(d,f,g,u),T=m.length,w=m.slice(0,T/2),P=m.slice(T/2,T);return w.push(f),P.push(g),w=w.reverse(),w.push(i),P=P.reverse(),P.push(e),w.reverse().concat(p,P)}_getArrowHeadPoints(e){let s=E.getBaseLength(e)*this.headHeightFactor,o=e[e.length-1],a=s*this.headWidthFactor,n=s*this.neckWidthFactor,h=s*this.neckHeightFactor,c=E.getThirdPoint(e[e.length-2],o,0,s,!0),d=E.getThirdPoint(e[e.length-2],o,0,h,!0),p=E.getThirdPoint(o,c,ae,a,!1),f=E.getThirdPoint(o,c,ae,a,!0),g=E.getThirdPoint(o,d,ae,n,!1),u=E.getThirdPoint(o,d,ae,n,!0);return[g,p,o,f,u]}_getArrowBodyPoints(e,i,s,o){let a=E.wholeDistance(e),h=E.getBaseLength(e)*o,c=E.distance(i,s),d=(h-c)/2,p=0,f=[],g=[];for(let u=1;u<e.length-1;u++){let m=E.getAngleOfThreePoints(e[u-1],e[u],e[u+1])/2;p+=E.distance(e[u-1],e[u]);let T=(h/2-p/a*d)/Math.sin(m),w=E.getThirdPoint(e[u-1],e[u],Math.PI-m,T,!0),P=E.getThirdPoint(e[u-1],e[u],m,T,!1);f.push(w),g.push(P)}return f.concat(g)}_getTempPoint4(e,i,s){let o=E.mid(e,i),a=E.distance(o,s),n=E.getAngleOfThreePoints(e,o,s),h,c,d,p;return n<ae?(c=a*Math.sin(n),d=a*Math.cos(n),p=E.getThirdPoint(e,o,ae,c,!1),h=E.getThirdPoint(o,p,ae,d,!0)):n>=ae&&n<Math.PI?(c=a*Math.sin(Math.PI-n),d=a*Math.cos(Math.PI-n),p=E.getThirdPoint(e,o,ae,c,!1),h=E.getThirdPoint(o,p,ae,d,!1)):n>=Math.PI&&n<Math.PI*1.5?(c=a*Math.sin(n-Math.PI),d=a*Math.cos(n-Math.PI),p=E.getThirdPoint(e,o,ae,c,!0),h=E.getThirdPoint(o,p,ae,d,!0)):(c=a*Math.sin(Math.PI*2-n),d=a*Math.cos(Math.PI*2-n),p=E.getThirdPoint(e,o,ae,c,!0),h=E.getThirdPoint(o,p,ae,d,!1)),h}_createHierarchy(){let e=this._positions.length,i,s,o=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0],a=o[0],n=o[1],h=o[2];e===3?i=this._getTempPoint4(a,n,h):i=o[3],e===3||e===4?s=E.mid(a,n):s=o[4];let c,d;E.isClockWise(a,n,h)?(c=this._getArrowPoints(a,s,i,!1),d=this._getArrowPoints(s,n,h,!0)):(c=this._getArrowPoints(n,s,h,!1),d=this._getArrowPoints(s,a,i,!0));let p=c.length,f=(p-5)/2,g=c.slice(0,f),u=c.slice(f,f+5),m=c.slice(f+5,p),T=d.slice(0,f),w=d.slice(f,f+5),P=d.slice(f+5,p);T=E.getBezierPoints(T);let M=E.getBezierPoints(P.concat(g.slice(1)));return m=E.getBezierPoints(m),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(T.concat(w,M,u,m))))}},Li=Ga;var U0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},Ha=class extends Q{constructor(e){super(),this._maxAnchorSize=4,this._style={...U0,...e},this._graphics=new Li}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new mo(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(b.DRAW_STOP))}},$d=Ha;var ep=Math.PI/2,Ba=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13}get positions(){return this._positions}set positions(e){this._positions=e}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0],i=e[0],s=e[1],o=E.getBaseLength(e),a=o*this.tailWidthFactor,n=o*this.neckWidthFactor,h=o*this.headWidthFactor,c=E.getThirdPoint(s,i,ep,a,!0),d=E.getThirdPoint(s,i,ep,a,!1),p=E.getThirdPoint(i,s,this.headAngle,h,!1),f=E.getThirdPoint(i,s,this.headAngle,h,!0),g=E.getThirdPoint(i,s,this.neckAngle,n,!1),u=E.getThirdPoint(i,s,this.neckAngle,n,!0);return new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions([c,g,p,s,f,u,d])))}},Di=Ba;var V0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},Ua=class extends Q{constructor(e){super(),this._maxAnchorSize=2,this._style={...V0,...e},this._graphics=new Di}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new fo(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(b.DRAW_STOP))}},tp=Ua;var Z0=Math.PI/2,ip=100,Va=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.t=.4}get positions(){return this._positions}set positions(e){this._positions=e}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0];if(this._positions.length===2){let n=E.mid(e[0],e[1]),h=E.distance(e[0],n)/.9,c=E.getThirdPoint(e[0],n,Z0,h,!0);e=[e[0],c,e[1]]}let i=E.mid(e[0],e[2]);e.push(i,e[0],e[1]);let s=[];for(let n=0;n<e.length-2;n++){let h=e[n],c=e[n+1],d=e[n+2],p=E.getBisectorNormals(this.t,h,c,d);s=s.concat(p)}let o=s.length;s=[s[o-1]].concat(s.slice(0,o-1));let a=[];for(let n=0;n<e.length-2;n++){let h=e[n],c=e[n+1];a.push(h);for(let d=0;d<=ip;d++){let p=E.getCubicValue(d/ip,h,s[n*2],s[n*2+1],c);a.push(p)}a.push(c)}return new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(a)))}},Ri=Va;var j0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},Za=class extends Q{constructor(e){super(),this._maxAnchorSize=3,this._style={...j0,...e},this._graphics=new Ri}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new go(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(b.DRAW_STOP))}},rp=Za;var ja=class extends st{constructor(e){super(e),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.tailWidthFactor=.1,this.headTailFactor=.8,this.swallowTailFactor=1}_createHierarchy(){let e=v.parsePolygonCoordToArray(y.transformCartesianArrayToWGS84Array(this._positions))[0],i=e[0],s=e[1];E.isClockWise(e[0],e[1],e[2])&&(i=e[1],s=e[0]);let a=[E.mid(i,s)].concat(e.slice(2)),n=this._getArrowHeadPoints(a,i,s),h=n[0],c=n[4],d=E.distance(i,s),p=E.getBaseLength(a),f=p*this.tailWidthFactor*this.swallowTailFactor,g=E.getThirdPoint(a[1],a[0],0,f,!0),u=d/p,m=this._getArrowBodyPoints(a,h,c,u),T=m.length,w=[i].concat(m.slice(0,T/2));w.push(h);let P=[s].concat(m.slice(T/2,T));return P.push(c),w=E.getQBSplinePoints(w),P=E.getQBSplinePoints(P),new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(v.parsePositions(w.concat(n,P.reverse(),[g,w[0]]))))}},Oi=ja;var Y0={material:r.Color.YELLOW.withAlpha(.6),fill:!0},Ya=class extends Q{constructor(e){super(),this._maxAnchorSize=3,this._style={...Y0,...e},this._graphics=new Oi}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new vo(y.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,i>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(b.DRAW_STOP))}},sp=Ya;var q0={width:3,material:r.Color.CYAN,clampToGround:!0},qa=class extends Q{constructor(e,i={}){super(),this._minAnchorSize=i.minPoints||2,this._curveType=i.curveType||"spline",this._resolution=i.resolution||100,this._showControlPoints=(i.showControlPoints||!1)!==!1,this._style={...q0,...e},this._previewCurve=new qt([],{curveType:this._curveType,resolution:this._resolution,showControlPoints:this._showControlPoints})}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u6DFB\u52A0\u63A7\u5236\u70B9\uFF0C\u53F3\u51FB\u5B8C\u6210\u7ED8\u5236",this._delegate=new r.Entity({polyline:{...this._style,positions:new r.CallbackProperty(()=>{if(this._positions.length>=this._minAnchorSize){let e=y.transformCartesianArrayToWGS84Array(this._positions);return this._previewCurve.positions=e,this._previewCurve._calculateBezierPoints()}return this._positions},!1)}}),this._layer.entities.add(this._delegate),this._createControlPointsPreview()}_createControlPointsPreview(){this._showControlPoints&&(this._controlPointsEntity=new r.Entity({point:{pixelSize:0}}),this._controlPointsEntity.position=new r.CallbackProperty(()=>this._positions[this._positions.length-1]||new r.Cartesian3,!1),this._layer.entities.add(this._controlPointsEntity))}_stoppedHook(){let e=null;if(this._positions.length>=this._minAnchorSize){let i=y.transformCartesianArrayToWGS84Array(this._positions);e=new qt(i,{curveType:this._curveType,resolution:this._resolution,showControlPoints:this._showControlPoints}).setStyle(this._style)}this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){if(this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e}),this._showControlPoints){let i=this._layer.entities.add({position:e,point:{pixelSize:8,color:r.Color.YELLOW,outlineColor:r.Color.BLACK,outlineWidth:2,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:`C${this._positions.length-1}`,font:"12pt sans-serif",pixelOffset:new r.Cartesian2(0,-25),fillColor:r.Color.WHITE,outlineColor:r.Color.BLACK,outlineWidth:1,style:r.LabelStyle.FILL_AND_OUTLINE}});this._tempControlPoints||(this._tempControlPoints=[]),this._tempControlPoints.push(i)}this._positions.length<this._minAnchorSize?this.drawTool.tooltipMess=`\u8FD8\u9700\u8981 ${this._minAnchorSize-this._positions.length} \u4E2A\u63A7\u5236\u70B9`:this.drawTool.tooltipMess="\u7EE7\u7EED\u6DFB\u52A0\u63A7\u5236\u70B9\u6216\u53F3\u51FB\u5B8C\u6210"}_onDrawRight(e){this._positions.length>=this._minAnchorSize&&this.drawTool.fire(b.DRAW_STOP)}setCurveType(e){this._curveType=e,this._previewCurve&&this._previewCurve.setCurveType(e)}setResolution(e){this._resolution=e,this._previewCurve&&this._previewCurve.setResolution(e)}_cleanup(){var e;this._tempControlPoints&&(this._tempControlPoints.forEach(i=>{this._layer.entities.remove(i)}),this._tempControlPoints=[]),(e=super._cleanup)==null||e.call(this)}},op=qa;var Xa=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._overlay.show=!1,this._delegate=new r.Entity,this._delegate.merge(e.delegate),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_stoppedHook(){this._overlay.positions=y.transformCartesianArrayToWGS84Array(this._positions),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[].concat(y.transformWGS84ArrayToCartesianArray(this._overlay.positions)),this._positions.forEach((e,i)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:e,index:i})})}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now());this._positions[s.index]=i}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now());this._positions[s.index]=i}_onEditStop({pickedAnchor:e,position:i}){this._unbindEvent(),this._viewer.editTool.deactivate(),this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){return this.editTool.on(b.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(b.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(b.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(b.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(b.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(b.EDIT_STOP,this._onEditStop,this)}start(e,i){return this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._viewer.editTool.deactivate(),this._viewer.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._viewer.editTool.activate(i),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.editTool.fire(b.EDIT_STOP,{pickedAnchor:null,position:null}),this}},K=Xa;var Ja=class extends K{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(r.JulianDate.now()),this._delegate.position=new r.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=y.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:i}){this._position=i}},ap=Ja;var Qa=class extends K{constructor(e){super(e)}_mountedHook(){this._delegate.polyline.positions=new r.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=y.transformCartesianArrayToWGS84Array(this._positions.filter((e,i)=>i%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polyline.positions.getValue(r.JulianDate.now());for(let i=0;i<e.length-1;i++){let s=Y(e[i],e[i+1]);this._positions.push(e[i]),this._positions.push(s)}this._positions.push(e[e.length-1]),this._positions.forEach((i,s)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:i,index:s,isMid:s%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),o=s.index;if(s.isMid){let a=Y(this._positions[o],this._positions[o-1]),n=Y(this._positions[o],this._positions[o+1]);this._positions.splice(o,1,a,i,n),this.editTool.fire(b.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),o=s.index;if(this._positions[o]=i,!s.isMid&&this._options.maxAnchorSize>2){let a=-1,n=-1,h=-1,c=-1,d=this._positions.length;if(o===0?(h=o+2,c=o+1):s.index===d-1?(a=o-2,n=o-1):(a=o-2,n=o-1,h=o+2,c=o+1),a>0){let p=Y(this._positions[a],this._positions[o]);this._positions[n]=p,this.editTool.fire(b.UPDATE_ANCHOR,{index:n,position:p})}if(h>0){let p=Y(this._positions[h],this._positions[o]);this._positions[c]=p,this.editTool.fire(b.UPDATE_ANCHOR,{index:c,position:p})}}}},np=Qa;var Ka=class extends K{constructor(e){super(e)}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(e=>this._positions.length>2?new r.PolygonHierarchy(this._positions.map(i=>i.clone())):null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=y.transformCartesianArrayToWGS84Array(this._positions.filter((e,i)=>i%2===0)),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[];let e=this._overlay.delegate.polygon.hierarchy.getValue(r.JulianDate.now()).positions;e.push(e[0]);for(let i=0;i<e.length-1;i++){let s=Y(e[i],e[i+1]);this._positions.push(e[i]),this._positions.push(s)}this._positions.forEach((i,s)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:i,index:s,isMid:s%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),o=s.index;if(s.isMid){let a,n,h=this._positions.length;o===h-1?(a=Y(this._positions[o],this._positions[o-1]),n=Y(this._positions[o],this._positions[0])):(a=Y(this._positions[o],this._positions[o-1]),n=Y(this._positions[o],this._positions[o+1])),this._positions.splice(o,1,a,i,n),this.editTool.fire(b.CLEAR_ANCHOR),this._positions.forEach((c,d)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:c,index:d,isMid:d%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),o=s.index;this._positions[o]=i;let a=this._positions.length;if(!s.isMid){let n=-1,h=-1,c=-1,d=-1;o===0?(n=a-2,h=a-1,c=o+2,d=o+1):o===a-2?(n=o-2,h=o-1,c=0,d=a-1):(n=o-2,h=o-1,c=o+2,d=o+1);let p=Y(this._positions[n],this._positions[o]),f=Y(this._positions[c],this._positions[o]);this._positions[h]=p,this._positions[d]=f,this.editTool.fire(b.UPDATE_ANCHOR,{index:h,position:p}),this.editTool.fire(b.UPDATE_ANCHOR,{index:d,position:f})}}},lp=Ka;var $a=class extends K{constructor(e){super(e),this._center=void 0,this._radius=0}_mountedHook(){this._radius=this._overlay.radius,this._center=y.transformWGS84ToCartesian(this._overlay.center),this._positions=[].concat([this._center,this._computeCirclePoints(this._center,this._radius)[0]]),this._delegate.polygon.hierarchy=new r.CallbackProperty(e=>{if(this._positions.length>1){if(this._radius=r.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let i=this._computeCirclePoints(this._positions[0],this._radius);return i.push(i[0]),new r.PolygonHierarchy(i)}else return null},!1),this._layer.entities.add(this._delegate)}_computeCirclePoints(e,i){let s=[],o=r.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:i,semiMinorAxis:i,rotation:0,granularity:.005},!1,!0);return o&&o.outerPositions&&(s=r.Cartesian3.unpackArray(o.outerPositions)),s}_stoppedHook(){this._overlay.center=y.transformCartesianToWGS84(this._positions[0]),this._overlay.radius=this._radius,this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions.forEach((e,i)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:e,index:i,isCenter:i%2===0})})}},hp=$a;var en=class extends K{constructor(e){super(e),this._overlay=e}_mountedHook(){this._delegate.rectangle.coordinates=new r.CallbackProperty(e=>this._positions.length>1?r.Rectangle.fromCartesianArray(this._positions):null,!1),this._layer.entities.add(this._delegate)}},cp=en;var tn=class extends K{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(r.JulianDate.now()),this._delegate.position=new r.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=y.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:i}){this._position=i}},dp=tn;var rn=class extends K{constructor(e){super(e),this._graphics=new st}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},pp=rn;var sn=class extends K{constructor(e){super(e),this._graphics=new Li}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},mp=sn;var on=class extends K{constructor(e){super(e),this._graphics=new Di}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},up=on;var an=class extends K{constructor(e){super(e),this._graphics=new Ri}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},fp=an;var nn=class extends K{constructor(e){super(e),this._graphics=new Oi}_mountedHook(){this._delegate.polygon.hierarchy=new r.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},_p=nn;var ln=class extends K{constructor(e,i={}){super(e),this._options={showAnchors:!0,allowAddPoints:!0,allowRemovePoints:!0,minPoints:2,maxPoints:20,...i},this._previewCurve=e,this._anchors=[],this._isEditing=!1}_mountedHook(){var e;try{this._delegate.polyline.positions=new r.CallbackProperty(()=>{if(this._positions.length>=2){let i=y.transformCartesianArrayToWGS84Array(this._positions);return this._previewCurve.positions=i,this._previewCurve._calculateBezierPoints()}return this._positions},!1),this._delegate.polyline.width=(this._delegate.polyline.width||3)+1,this._delegate.polyline.material=r.Color.ORANGE.withAlpha(.8),this._layer.entities.add(this._delegate),this._createAnchors(),this._setupDragHandlers(),this._isEditing=!0,(e=this.editTool)==null||e.fire(b.EDIT_START,{overlay:this._overlay,positions:this._positions})}catch(i){console.error("Failed to mount EditBezierCurve:",i),this._cleanup()}}_createAnchors(){this._options.showAnchors&&(this._cleanupAnchors(),this._anchors=[],this._positions.forEach((e,i)=>{let s=this._layer.entities.add({position:e,point:{pixelSize:10,color:r.Color.LIME,outlineColor:r.Color.BLACK,outlineWidth:2,heightReference:r.HeightReference.CLAMP_TO_GROUND,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:`C${i}`,font:"12pt sans-serif",pixelOffset:new r.Cartesian2(0,-30),fillColor:r.Color.WHITE,outlineColor:r.Color.BLACK,outlineWidth:2,style:r.LabelStyle.FILL_AND_OUTLINE}});s._editIndex=i,this._anchors.push(s)}))}_setupDragHandlers(){if(!this.editTool||!this.editTool.viewer)return;let e=this.editTool.viewer,i=new r.ScreenSpaceEventHandler(e.scene.canvas),s=!1,o=null,a=-1;i.setInputAction(n=>{let h=e.scene.pick(n.position);h&&h.id&&this._anchors.includes(h.id)&&(s=!0,o=h.id,a=o._editIndex,e.scene.screenSpaceCameraController.enableRotate=!1,e.scene.screenSpaceCameraController.enableTranslate=!1,e.scene.screenSpaceCameraController.enableZoom=!1)},r.ScreenSpaceEventType.LEFT_DOWN),i.setInputAction(n=>{if(s&&o){let h=e.camera.getPickRay(n.endPosition),c=e.scene.globe.pick(h,e.scene);c&&this.updateAnchorPosition(a,c)}},r.ScreenSpaceEventType.MOUSE_MOVE),i.setInputAction(()=>{s&&(s=!1,o=null,a=-1,e.scene.screenSpaceCameraController.enableRotate=!0,e.scene.screenSpaceCameraController.enableTranslate=!0,e.scene.screenSpaceCameraController.enableZoom=!0)},r.ScreenSpaceEventType.LEFT_UP),i.setInputAction(n=>{let h=e.scene.pick(n.position);if(h&&h.id&&this._anchors.includes(h.id)){let c=h.id._editIndex;this._showContextMenu(n.position,c)}},r.ScreenSpaceEventType.RIGHT_CLICK),this._dragHandler=i}_showContextMenu(e,i){var o;let s=[];this._options.allowAddPoints&&this._positions.length<this._options.maxPoints&&s.push({text:"\u5728\u6B64\u5904\u63D2\u5165\u70B9",action:()=>{let a=this.editTool.viewer.camera.getPickRay(e),n=this.editTool.viewer.scene.globe.pick(a,this.editTool.viewer.scene);n&&this.addControlPoint(n,i+1)}}),this._options.allowRemovePoints&&this._positions.length>this._options.minPoints&&s.push({text:"\u5220\u9664\u6B64\u70B9",action:()=>{this.removeControlPoint(i)}}),(o=this.editTool)==null||o.fire(b.SHOW_CONTEXT_MENU,{position:e,anchorIndex:i,actions:s,overlay:this._overlay})}updateAnchorPosition(e,i){var s;if(e>=0&&e<this._positions.length){this._positions[e]=i,this._anchors[e]&&(this._anchors[e].position=i);let o=y.transformCartesianArrayToWGS84Array(this._positions);this._overlay.positions=o,(s=this.editTool)==null||s.fire(b.EDIT_ANCHOR_UPDATE,{overlay:this._overlay,anchorIndex:e,position:i,positions:this._positions})}}addControlPoint(e,i=-1){var o;if(this._positions.length>=this._options.maxPoints)return console.warn(`\u5DF2\u8FBE\u5230\u6700\u5927\u63A7\u5236\u70B9\u6570\u91CF (${this._options.maxPoints})`),!1;i===-1?this._positions.push(e):this._positions.splice(i,0,e),this._createAnchors();let s=y.transformCartesianArrayToWGS84Array(this._positions);return this._overlay.positions=s,(o=this.editTool)==null||o.fire(b.EDIT_ANCHOR_ADD,{overlay:this._overlay,position:e,insertIndex:i,positions:this._positions}),!0}removeControlPoint(e){var i;if(this._positions.length<=this._options.minPoints)return console.warn(`\u81F3\u5C11\u9700\u8981 ${this._options.minPoints} \u4E2A\u63A7\u5236\u70B9`),!1;if(e>=0&&e<this._positions.length){let s=this._positions.splice(e,1)[0];this._createAnchors();let o=y.transformCartesianArrayToWGS84Array(this._positions);return this._overlay.positions=o,(i=this.editTool)==null||i.fire(b.EDIT_ANCHOR_REMOVE,{overlay:this._overlay,anchorIndex:e,removedPosition:s,positions:this._positions}),!0}return!1}_cleanupAnchors(){this._anchors&&(this._anchors.forEach(e=>{this._layer.entities.remove(e)}),this._anchors=[])}finishEdit(){var e;this._isEditing&&(this._cleanup(),this._cleanupAnchors(),this._dragHandler&&(this._dragHandler.destroy(),this._dragHandler=null),this._isEditing=!1,(e=this.editTool)==null||e.fire(b.EDIT_STOP,{overlay:this._overlay,positions:this._positions}))}cancelEdit(){var e;this._isEditing&&(this._overlay.positions=this._originalPositions,this._cleanup(),(e=this.editTool)==null||e.fire(b.EDIT_CANCEL,{overlay:this._overlay}),this._isEditing=!1)}getEditState(){return{isEditing:this._isEditing,positions:this._positions,controlPointCount:this._positions.length,canAddPoints:this._positions.length<this._options.maxPoints,canRemovePoints:this._positions.length>this._options.minPoints,curveType:this._overlay.curveType,curveLength:this._overlay.getCurveLength()}}_cleanup(){var e;if(this._cleanupAnchors(),this._dragHandler&&(this._dragHandler.destroy(),this._dragHandler=null),this.editTool&&this.editTool.viewer){let i=this.editTool.viewer;i.scene.screenSpaceCameraController.enableRotate=!0,i.scene.screenSpaceCameraController.enableTranslate=!0,i.scene.screenSpaceCameraController.enableZoom=!0}(e=super._cleanup)==null||e.call(this)}destroy(){var e;this.cancelEdit(),this._previewCurve=null,(e=super.destroy)==null||e.call(this)}},gp=ln;var hn=class{constructor(e,i={}){this._viewer=e,this._options=i,this._layer=new r.CustomDataSource("plot-layer"),this._viewer.dataSources.add(this._layer),this._currentWorker=void 0,this._state=void 0}get viewer(){return this._viewer}get layer(){return this._layer}get state(){return this._state}_createDrawWorker(e,i){let s;switch(e){case Z.POINT:s=new jd(i);break;case Z.POLYLINE:s=new Yd(i);break;case Z.POLYGON:s=new qd(i);break;case Z.CIRCLE:s=new Xd(i);break;case Z.RECT:s=new Jd(i);break;case Z.BILLBOARD:s=new Qd(i);break;case Z.ATTACK_ARROW:s=new Kd(i);break;case Z.DOUBLE_ARROW:s=new $d(i);break;case Z.FINE_ARROW:s=new tp(i);break;case Z.TAILED_ATTACK_ARROW:s=new sp(i);break;case Z.GATHERING_PLACE:s=new rp(i);break;case Z.BEZIER_CURVE:s=new op(i);break;default:break}return s}_createEditWorker(e){let i;switch(e.type){case Z.POINT:i=new ap(e);break;case Z.POLYLINE:i=new np(e);break;case Z.POLYGON:i=new lp(e);break;case Z.CIRCLE:i=new hp(e);break;case Z.RECT:i=new cp(e);break;case Z.BILLBOARD:i=new dp(e);break;case Z.ATTACK_ARROW:i=new pp(e);break;case Z.DOUBLE_ARROW:i=new mp(e);break;case Z.FINE_ARROW:i=new up(e);break;case Z.TAILED_ATTACK_ARROW:i=new _p(e);break;case Z.GATHERING_PLACE:i=new fp(e);break;case Z.BEZIER_CURVE:i=new gp(e);break;default:break}return i}draw(e,i,s={},o=!1){var n;this._state="draw",this._currentWorker&&this._currentWorker.stop();let a=(s==null?void 0:s.maxAnchorSize)||999;return s&&delete s.maxAnchorSize,this._currentWorker=(n=this._createDrawWorker(e,s))==null?void 0:n.start(this,{...this._options,maxAnchorSize:a,onDrawStop:i,clampToModel:o!=null?o:this._options.clampToModel}),this}edit(e,i,s=!1){var o;return this._state="edit",this._currentWorker&&this._currentWorker.stop(),this._currentWorker=(o=this._createEditWorker(e))==null?void 0:o.start(this,{...this._options,onEditStop:i,clampToModel:s!=null?s:this._options.clampToModel}),this}clusterPositions(e,i=60){let s=e.positions||[];switch(e.type){case Z.POINT:s.push(e.position);break;case Z.CIRCLE:s=this.circleToCluster(e,i);break;case Z.RECT:s=this.rectangleToCluster(e);break}return s}circleToCluster(e={},i=60){let s=e.center,o=r.Math.toRadians(e.radius/1e3);var a=r.Math.toRadians(s._lng),n=r.Math.toRadians(s._lat);let h=r.Math.toRadians(s._heading);i=Math.ceil(360/(i||60));let c=[];for(let d=0;d<=360;d+=i){let p=h+r.Math.toRadians(d),f=new r.Cartographic(a+o*Math.cos(p),n+o*Math.sin(p),0),g=r.Ellipsoid.WGS84.cartographicToCartesian(f),u=r.Cartographic.fromCartesian(g);c.push(new X(r.Math.toDegrees(u.longitude),r.Math.toDegrees(u.latitude),u.height||0))}return c}rectangleToCluster(e={}){let i=e.positions,s=i[0]._lng,o=i[0]._lat,a=i[1]._lng,n=i[1]._lat;i.push(new X(s,n)),i.push(new X(a,o));var h=r.Rectangle.fromDegrees(s,o,a,n);return i}stop(){this._currentWorker&&this._currentWorker.stop(),this._currentWorker=null}destroy(){return this._viewer.dataSources.remove(this._layer),this._viewer=void 0,this}},X0=hn;var cn=class{constructor(e,i={}){this._viewer=e,this._options={}}_bindEvent(){}_unbindEvent(){}start(){if(this._viewer.clock.shouldAnimate=!0,this._unbindEvent(),this._options.duration){let e=setTimeout(()=>{this._unbindEvent(),this._options.callback&&this._options.callback.call(this._options.context||this),clearTimeout(e)},Number(this._options.duration)*1e3)}return this._bindEvent(),this}stop(){return this._unbindEvent(),this}},de=cn;var J0={AROUND_VIEW:"AroundView",AROUND_POINT:"AroundPoint",CIRCLE_SCAN:"CircleScan",FLYING:"Flying",GLOBE_ROTATE:"GlobeRotate",RADAR_SCAN:"RadarScan"},ee=J0;var dn=class extends de{constructor(e,i={}){super(e),this._options=i,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return ee.AROUND_VIEW}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,i){this._heading+=r.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.setView({orientation:{heading:this._heading,pitch:this._options.pitch?r.Math.toRadians(this._options.pitch):this._viewer.camera.pitch,roll:this._options.roll?r.Math.toRadians(this._options.roll):this._viewer.camera.roll}})}};ee.AROUND_VIEW="around_view";var Q0=dn;var pn=class extends de{constructor(e,i,s={}){super(e),this._position=v.parsePosition(i),this._options=s,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return ee.AROUND_POINT}set position(e){this._position=v.parsePosition(e)}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,i){this._heading+=r.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.lookAt(y.transformWGS84ToCartesian(this._position),new r.HeadingPitchRange(this._heading,r.Math.toRadians(this._options.pitch||0),this._options.range||1e3))}};ee.AROUND_POINT="around_point";var K0=pn;var yp=`/**\r
|
|
2408
3029
|
* \u5706\u5F62\u626B\u63CF\u7740\u8272\u5668\r
|
|
2409
3030
|
* \u521B\u5EFA\u5706\u5F62\u626B\u63CF\u6548\u679C\uFF0C\u7528\u4E8E\u96F7\u8FBE\u626B\u63CF\u3001\u533A\u57DF\u68C0\u6D4B\u7B49\u53EF\u89C6\u5316\u6548\u679C\r
|
|
2410
3031
|
* \u57FA\u4E8E\u6DF1\u5EA6\u7EB9\u7406\u548C\u4E16\u754C\u5750\u6807\u8BA1\u7B97\u5706\u5F62\u626B\u63CF\u52A8\u753B\r
|
|
@@ -2488,7 +3109,7 @@ void main() {\r
|
|
|
2488
3109
|
out_FragColor = mix(out_FragColor, color, f);\r
|
|
2489
3110
|
}\r
|
|
2490
3111
|
}\r
|
|
2491
|
-
`;var
|
|
3112
|
+
`;var mn=class extends de{constructor(e,i,s,o={}){super(e),this._delegate=void 0,this._position=v.parsePosition(i),this._radius=s||100,this._color=o.color||r.Color.RED,this._speed=o.speed||2}get type(){return ee.CIRCLE_SCAN}_mountContent(){let e=y.transformWGS84ToCartesian(this._position),i=r.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new r.Cartesian3),s=this;this._delegate=new r.PostProcessStage({name:x.uuid(),fragmentShader:yp,uniforms:{centerWC:function(){return e},normalWC:function(){return i},radius:function(){return s._radius},speed:function(){return s._speed},color:function(){return s._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};ee.CIRCLE_SCAN="circle_scan";var eg=mn;var un=class extends de{constructor(e,i={}){super(e),this._options=i,this._positions=[],this._durations=[3],this._currentIndex=0,this._timer=void 0}get type(){return ee.FLYING}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e)}get durations(){return this._durations}set durations(e){this._durations=e}_cameraFly(){let e=this,i=this._viewer.camera,s=this._positions[this._currentIndex],o=()=>{let a=e._positions[e._currentIndex+1];a?(e._currentIndex++,e._currentIndex<=e._positions.length-1&&(e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3))):!a&&e._options.loop&&(e._currentIndex=0,e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3)),e._options.callback&&e._options.callback(e._currentIndex)};s&&i.flyTo({destination:y.transformWGS84ToCartesian(s),orientation:{heading:r.Math.toRadians(s.heading),pitch:r.Math.toRadians(s.pitch),roll:r.Math.toRadians(s.roll)},complete:o,duration:this._durations.length===1?this._durations[0]:this._durations[this._currentIndex]})}start(){return this._positions&&this._positions.length&&(this._currentIndex=0,this._cameraFly()),this}pause(){return this._viewer.camera.cancelFlight(),this._timer&&clearTimeout(this._timer),this}restore(){return this._positions&&this._positions.length&&this._cameraFly(),this}};ee.FLYING="flying";var tg=un;var fn=class extends de{constructor(e,i={}){super(e),this._options=i}get type(){return ee.GLOBE_ROTATE}_icrf(e,i){if(e.mode!==r.SceneMode.SCENE3D)return!0;let s=r.Transforms.computeIcrfToFixedMatrix(i);if(s){let o=this._viewer.camera,a=r.Cartesian3.clone(o.position),n=r.Matrix4.fromRotationTranslation(s);o.lookAtTransform(n,a)}}_bindEvent(){this._viewer.clock.multiplier=this._options.speed||12*1e3,this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}_unbindEvent(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}};ee.GLOBE_ROTATE="globe_rotate";var ig=fn;var vp=`/**\r
|
|
2492
3113
|
* \u96F7\u8FBE\u626B\u63CF\u7740\u8272\u5668\r
|
|
2493
3114
|
* \u7528\u4E8E\u521B\u5EFA\u96F7\u8FBE\u626B\u63CF\u6548\u679C\u7684\u7247\u6BB5\u7740\u8272\u5668\r
|
|
2494
3115
|
* @author Lucas Xu\r
|
|
@@ -2618,7 +3239,7 @@ void main() {\r
|
|
|
2618
3239
|
out_FragColor = mix(out_FragColor, color, f + f0);\r
|
|
2619
3240
|
}\r
|
|
2620
3241
|
}\r
|
|
2621
|
-
`;var
|
|
3242
|
+
`;var _n=class extends de{constructor(e,i,s,o={}){super(e),this._position=v.parsePosition(i),this._radius=s||100,this._color=o.color||r.Color.BLUE,this._speed=o.speed||3,this._delegate=void 0}get type(){return ee.RADAR_SCAN}_mountContent(){let e=y.transformWGS84ToCartesian(this._position),i=r.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new r.Cartesian3),s=new Date().getTime(),o=this;this._delegate=new r.PostProcessStage({name:x.uuid(),fragmentShader:vp,uniforms:{centerWC:function(){return e},planeNormalWC:function(){return i},lineNormalWC:function(){let a=new r.Quaternion,n=new r.Matrix3,h=r.Cartesian3.cross(r.Cartesian3.UNIT_Z,i,new r.Cartesian3),c=new Date().getTime(),d=r.Math.PI*2*((c-s)/1e4)*o._speed;return r.Quaternion.fromAxisAngle(i,d,a),r.Matrix3.fromQuaternion(a,n),r.Matrix3.multiplyByVector(n,h,h),r.Cartesian3.normalize(h,h),h},radius:function(){return o._radius},color:function(){return o._color}}})}start(){return!this._delegate&&this._mountContent(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate),this}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._delegate=void 0,this}};ee.RADAR_SCAN="radar_scan";var sg=_n;var gn=class{constructor(e,i=!1,s=1,o=[]){this._viewer=e,this._delegate=void 0,this._enable=i,this._gradations=s,this._selected=o,this._state=_.INITIALIZED}get type(){return"black_and_white"}get enable(){return this._enable}set enable(e){this._enable=e,!this._delegate&&this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?_.ENABLED:_.DISABLED}get gradations(){return this._gradations}set gradations(e){this._gradations=e,this._delegate&&(this._delegate.uniforms.gradations=e)}get selected(){return this._selected}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}_createPostProcessStage(){this._delegate=r.PostProcessStageLibrary.createBlackAndWhiteStage(),this._delegate&&(this._delegate.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this._delegate))}},wp=gn;var yn=class{constructor(e,i=!1,s=128,o=-.3,a=!1,n=1,h=3.8,c=5,d=[]){this._viewer=e,this._enable=i,this._contrast=s,this._brightness=o,this._glowOnly=a,this._delta=n,this._sigma=h,this._stepSize=c,this._selected=d,this._state=_.INITIALIZED}get type(){return"bloom"}get enable(){return this._enable}set enable(e){this._enable=e,!this._delegate&&this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?_.ENABLED:_.DISABLED}get contrast(){return this._contrast}set contrast(e){this._contrast=e,this._delegate&&(this._delegate.uniforms.contrast=e)}get brightness(){return this._brightness}set brightness(e){this._brightness=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get glowOnly(){return this._glowOnly}set glowOnly(e){this._glowOnly=e,this._delegate&&(this._delegate.uniforms.glowOnly=e)}get delta(){return this._delta}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get sigma(){return this._sigma}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get stepSize(){return this._stepSize}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get selected(){return this._selected}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}_createPostProcessStage(){this._delegate=this._viewer.scene.postProcessStages.bloom,this._delegate.uniforms.contrast=this._contrast,this._delegate.uniforms.brightness=this._brightness,this._delegate.uniforms.glowOnly=this._glowOnly,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize}},Cp=yn;var vn=class{constructor(e,i=!1,s=1,o=[]){this._viewer=e,this._delegate=void 0,this._enable=i,this._intensity=s,this._selected=o,this._state=_.INITIALIZED}get type(){return"brightness"}get enable(){return this._enable}set enable(e){this._enable=e,!this._delegate&&this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?_.ENABLED:_.DISABLED}get intensity(){return this._intensity}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get selected(){return this._selected}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}_createPostProcessStage(){this._delegate=r.PostProcessStageLibrary.createBrightnessStage(),this._delegate&&(this._delegate.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this._delegate))}},xp=vn;var wn=class{constructor(e,i=!1,s=87,o=1,a=3.8,n=2.5,h=[]){this._viewer=e,this._delegate=void 0,this._enable=i,this._focalDistance=s,this._delta=o,this._sigma=a,this._stepSize=n,this._selected=h,this._state=_.INITIALIZED}get type(){return"depth_of_field"}get enable(){return this._enable}set enable(e){this._enable=e,r.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?_.ENABLED:_.DISABLED}get focalDistance(){return this._focalDistance}set focalDistance(e){this._focalDistance=e,this._delegate&&(this._delegate.uniforms.focalDistance=e)}get delta(){return this._delta}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get sigma(){return this._sigma}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get stepSize(){return this._stepSize}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get selected(){return this._selected}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}_createPostProcessStage(){this._delegate=r.PostProcessStageLibrary.createDepthOfFieldStage(),this._delegate&&(this._delegate.uniforms.focalDistance=this._focalDistance,this._delegate.uniforms.delta=this._delta,this._delegate.uniforms.sigma=this._sigma,this._delegate.uniforms.stepSize=this._stepSize,this._viewer.scene.postProcessStages.add(this._delegate))}},Tp=wn;var Cn=class{constructor(e,i=!1,s=6,o=61,a=.4,n=.4,h=[]){this._viewer=e,this._delegate=void 0,this._enable=i,this._intensity=s,this._distortion=o,this._dirtAmount=a,this._haloWidth=n,this._selected=h,this._state=_.INITIALIZED}get type(){return"lens_flare"}get enable(){return this._enable}set enable(e){this._enable=e,!this._delegate&&this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?_.ENABLED:_.DISABLED}get intensity(){return this._intensity}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.intensity=e)}get distortion(){return this._distortion}set distortion(e){this._distortion=e,this._delegate&&(this._delegate.uniforms.distortion=e)}get dirtAmount(){return this._dirtAmount}set dirtAmount(e){this._dirtAmount=e,this._delegate&&(this._delegate.uniforms.dirtAmount=e)}get haloWidth(){return this._haloWidth}set haloWidth(e){this._haloWidth=e,this._delegate&&(this._delegate.uniforms.haloWidth=e)}get selected(){return this._selected}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}_createPostProcessStage(){this._delegate=r.PostProcessStageLibrary.createLensFlareStage(),this._delegate&&(this._delegate.uniforms.intensity=this._intensity,this._delegate.uniforms.distortion=this._distortion,this._delegate.uniforms.dirtAmount=this._dirtAmount,this._delegate.uniforms.haloWidth=this._haloWidth,this._viewer.scene.postProcessStages.add(this._delegate))}},Ep=Cn;var xn=class{constructor(e,i=!1,s=[]){this._viewer=e,this._enable=i,this._selected=s,this._state=_.INITIALIZED}get type(){return"night"}get enable(){return this._enable}set enable(e){this._enable=e,!this._delegate&&this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?_.ENABLED:_.DISABLED}get selected(){return this._selected}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}_createPostProcessStage(){this._delegate=r.PostProcessStageLibrary.createNightVisionStage(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate)}},Pp=xn;var Tn=class{constructor(e,i=!1,s=r.Color.GREEN,o=.5,a=[]){this._viewer=e,this._delegate=void 0,this._enable=i,this._color=s,this._length=o,this._selected=a,this._state=_.INITIALIZED}get type(){return"silhouette"}get enable(){return this._enable}set enable(e){this._enable=e,r.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?_.ENABLED:_.DISABLED}get color(){return this._color}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get length(){return this._length}set length(e){this._length=e,this._delegate&&(this._delegate.uniforms.length=e)}get selected(){return this._selected}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}_createPostProcessStage(){this._delegate=r.PostProcessStageLibrary.createSilhouetteStage(),this._delegate&&(this._delegate.uniforms.color=this._color,this._delegate.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this._delegate))}},bp=Tn;var Mp=`/**
|
|
2622
3243
|
* \u5929\u7A7A\u7EBF\u7EA2\u8272\u6807\u8BB0\u7740\u8272\u5668
|
|
2623
3244
|
* \u6839\u636E\u6DF1\u5EA6\u9608\u503C\u521B\u5EFA\u7EA2\u8272\u6807\u8BB0\u6548\u679C\uFF0C\u7528\u4E8E\u6807\u8BC6\u5929\u7A7A\u7EBF\u533A\u57DF
|
|
2624
3245
|
* @author Lucas Xu
|
|
@@ -2647,7 +3268,7 @@ void main(void) {
|
|
|
2647
3268
|
out_FragColor = vec4(1., 0., 0., 1.);
|
|
2648
3269
|
}
|
|
2649
3270
|
}
|
|
2650
|
-
`;var
|
|
3271
|
+
`;var Ap=`/**
|
|
2651
3272
|
* \u5929\u7A7A\u7EBF\u7740\u8272\u5668
|
|
2652
3273
|
* \u7528\u4E8E\u5929\u7A7A\u7EBF\u6548\u679C\u6E32\u67D3\uFF0C\u6839\u636E\u8F6E\u5ED3\u7EB9\u7406\u548C\u7EA2\u8272\u7EB9\u7406\u8FDB\u884C\u989C\u8272\u6DF7\u5408
|
|
2653
3274
|
* @author Lucas Xu
|
|
@@ -2680,7 +3301,7 @@ void main(void) {
|
|
|
2680
3301
|
out_FragColor = color;
|
|
2681
3302
|
}
|
|
2682
3303
|
}
|
|
2683
|
-
`;var
|
|
3304
|
+
`;var En=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._depthThreshold=1e-5,this._color=r.Color.RED,this._state=_.INITIALIZED}get type(){return"skyLine"}set enable(e){this._enable=e,!this._delegate&&this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?_.ENABLED:_.DISABLED}get enable(){return this._enable}set depthThreshold(e){this._depthThreshold=e}get depthThreshold(){return this._depthThreshold}set color(e){this._color=e}get color(){return this._color}_createPostProcessStage(){let e=r.PostProcessStageLibrary.createEdgeDetectionStage(),i=this,s=new r.PostProcessStage({fragmentShader:Mp,uniforms:{u_depthThreshold:function(){return i._depthThreshold}}}),o=new r.PostProcessStage({fragmentShader:Ap,uniforms:{u_silhouetteTexture:e.name,u_redTexture:s.name,u_color:function(){return i._color}}});this._delegate=new r.PostProcessStageComposite({stages:[e,s,o],inputPreviousStageTexture:!1,uniforms:e.uniforms}),this._viewer.scene.postProcessStages.add(this._delegate)}},Sp=En;var Pn=class{constructor(e){if(!e)throw Error("missing viewer param");this._blackAndWhite=new wp(e),this._bloom=new Cp(e),this._brightness=new xp(e),this._depthOfField=new Tp(e),this._lensFlare=new Ep(e),this._night=new Pp(e),this._silhouette=new bp(e),this._skyLine=new Sp(e)}get blackAndWhite(){return this._blackAndWhite}get bloom(){return this._bloom}get brightness(){return this._brightness}get depthOfField(){return this._depthOfField}get lensFlare(){return this._lensFlare}get night(){return this._night}get silhouette(){return this._silhouette}get skyLine(){return this._skyLine}},ng=Pn;var Ip=`/**\r
|
|
2684
3305
|
* \u96FE\u6548\u679C\u7740\u8272\u5668\r
|
|
2685
3306
|
* \u7528\u4E8E\u521B\u5EFA\u573A\u666F\u4E2D\u7684\u96FE\u6548\u679C\r
|
|
2686
3307
|
* @author Lucas Xu\r
|
|
@@ -2753,7 +3374,7 @@ void main(void){\r
|
|
|
2753
3374
|
// Alpha\u6DF7\u5408\u96FE\u6548\u679C\u548C\u573A\u666F\u989C\u8272\r
|
|
2754
3375
|
out_FragColor = alphaBlend(finalFogColor, sceneColor);\r
|
|
2755
3376
|
}\r
|
|
2756
|
-
`;var
|
|
3377
|
+
`;var bn=class{constructor(e){this._id=x.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._fogByDistance={near:10,nearValue:0,far:2e3,farValue:1},this._color=new r.Color(0,0,0,1),this._state=_.INITIALIZED}get type(){return"fog"}get enable(){return this._enable}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get fogByDistance(){return this._fogByDistance}set fogByDistance(e){var i,s,o,a;this._fogByDistance=e,this._delegate&&(this._delegate.uniforms.fogByDistance=new r.Cartesian4(((i=this._fogByDistance)==null?void 0:i.near)||10,((s=this._fogByDistance)==null?void 0:s.nearValue)||0,((o=this._fogByDistance)==null?void 0:o.far)||2e3,((a=this._fogByDistance)==null?void 0:a.farValue)||1))}get color(){return this._color}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.fogColor=e)}_createPostProcessStage(){var e,i,s,o;this._delegate=new r.PostProcessStage({name:this._id,fragmentShader:Ip,uniforms:{fogByDistance:new r.Cartesian4(((e=this._fogByDistance)==null?void 0:e.near)||10,((i=this._fogByDistance)==null?void 0:i.nearValue)||0,((s=this._fogByDistance)==null?void 0:s.far)||200,((o=this._fogByDistance)==null?void 0:o.farValue)||1),fogColor:this._color}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Lp=bn;var Dp=`/**\r
|
|
2757
3378
|
* \u96E8\u6548\u679C\u7740\u8272\u5668\r
|
|
2758
3379
|
* \u7528\u4E8E\u521B\u5EFA\u573A\u666F\u4E2D\u7684\u96E8\u6EF4\u6548\u679C\r
|
|
2759
3380
|
* @author Lucas Xu\r
|
|
@@ -2805,7 +3426,7 @@ void main(){\r
|
|
|
2805
3426
|
// \u6DF7\u5408\u539F\u59CB\u989C\u8272\u548C\u96E8\u6EF4\u6548\u679C\r
|
|
2806
3427
|
out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c, 1), mixNum);\r
|
|
2807
3428
|
}\r
|
|
2808
|
-
`;var
|
|
3429
|
+
`;var Mn=class{constructor(e){this._id=x.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=_.INITIALIZED}get type(){return"rain"}get enable(){return this._enable}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get speed(){return this._speed}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get mixNum(){return this._mixNum}set mixNum(e){this._mixNum=e,this._delegate&&(this._delegate.uniforms.mixNum=e)}_createPostProcessStage(){this._delegate=new r.PostProcessStage({name:this._id,fragmentShader:Dp,uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Rp=Mn;var Op=`/**\r
|
|
2809
3430
|
* \u96EA\u6548\u679C\u7740\u8272\u5668\r
|
|
2810
3431
|
* \u7528\u4E8E\u521B\u5EFA\u573A\u666F\u4E2D\u7684\u96EA\u82B1\u98D8\u843D\u6548\u679C\r
|
|
2811
3432
|
* @author Lucas Xu\r
|
|
@@ -2866,7 +3487,7 @@ void main(){\r
|
|
|
2866
3487
|
// \u6DF7\u5408\u539F\u59CB\u989C\u8272\u548C\u96EA\u82B1\u6548\u679C\r
|
|
2867
3488
|
out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor, 1), 0.3);\r
|
|
2868
3489
|
}\r
|
|
2869
|
-
`;var wn=class{constructor(e){this._id=T.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._state=_.INITIALIZED}get type(){return"snow"}get enable(){return this._enable}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get speed(){return this._speed}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}_createPostProcessStage(){this._delegate=new r.PostProcessStage({name:this._id,fragmentShader:Bm,uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Um=wn;var Vm="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AO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er=e,this._delegate=void 0,this._rotateAmount=0,this._enable=!1,this._heading=0,this._state=_.INITIALIZED}get type(){return"cloud"}get enable(){return this._enable}set enable(e){!this._viewer.scene.mode!==r.SceneMode.SCENE3D&&(this._delegate||this._createPrimitive(),this._enable=this._delegate.show=e,this._enable?this._viewer.scene.postUpdate.addEventListener(this._onRotate,this):this._viewer.scene.postUpdate.removeEventListener(this._onRotate,this))}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=e}_onRotate(e,i){this._rotateAmount!==0&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._delegate.modelMatrix=r.Transforms.headingPitchRollToFixedFrame(new r.Cartesian3,new r.HeadingPitchRoll(r.Math.toRadians(this._heading),0,0)))}_createPrimitive(){this._delegate=new r.Primitive({appearance:new r.EllipsoidSurfaceAppearance({material:new r.Material({fabric:{type:"Image",uniforms:{color:new r.Color(1,1,1,1),image:Vm},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})}),this._delegate.geometryInstances=new r.GeometryInstance({geometry:new r.EllipsoidGeometry({vertexFormat:r.VertexFormat.POSITION_AND_ST,radii:this._viewer.scene.globe.ellipsoid.radii}),id:this._id}),this._delegate.show=this._enable,this._viewer.scene.primitives.add(this._delegate)}},Zm=xn;var Cn=class{constructor(e){if(!e)throw Error("missing viewer param");this._fog=new Gm(e),this._rain=new Wm(e),this._snow=new Um(e),this._cloud=new Zm(e)}get fog(){return this._fog}get rain(){return this._rain}get snow(){return this._snow}get cloud(){return this._cloud}},j0=Cn;var Tn=class{constructor(e){this._viewer=e,this._enable=!1,this._moveRate=100,this._rotateRate=.01,this._flags={moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,turnLeft:!1,turnRight:!1}}get enable(){return this._enable}set enable(e){this._enable!==e&&this._viewer.scene.mode===r.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}get moveRate(){return this._moveRate}set moveRate(e){this._moveRate=e}get rotateRate(){return this._rotateRate}set rotateRate(e){this._rotateRate=e}_bindEvent(){let e=this._viewer.scene.canvas;e.setAttribute("tabindex","0"),e.addEventListener("click",this._onClick.bind(this),!1),this._viewer.clock.onTick.addEventListener(this._onTick,this),document.addEventListener("keydown",this._onKeydown.bind(this),!1),document.addEventListener("keyup",this._onKeyup.bind(this),!1)}_unbindEvent(){Object.keys(this._flags).forEach(i=>{this._flags[i]=!1});let e=this._viewer.scene.canvas;e.removeAttribute("tabindex"),e.removeEventListener("click",this._onClick,!1),this._viewer.clock.onTick.removeEventListener(this._onTick,this),document.removeEventListener("keydown",this._onKeydown,!1),document.removeEventListener("keyup",this._onKeyup,!1)}_getFlagForKeyCode(e){let i;switch(e.keyCode){case 87:case 38:e.shiftKey?i="moveUp":i="moveForward";break;case 83:case 40:e.shiftKey?i="moveDown":i="moveBackward";break;case 65:case 37:i="moveLeft";break;case 68:case 39:i="moveRight";break;case 81:i="turnLeft";break;case 69:i="turnRight";break;default:break}return i}_onClick(){this._viewer.scene.canvas.focus()}_onKeydown(e){let i=this._getFlagForKeyCode(e);i&&(this._flags[i]=!0)}_onKeyup(e){Object.keys(this._flags).forEach(i=>{this._flags[i]=!1})}_onTick(){let e=this._viewer.scene.camera,s=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(e.position).height/this._moveRate,a=r.Cartesian3.clone(e.position,new r.Cartesian3);this._flags.moveForward&&e.moveForward(s),this._flags.moveBackward&&e.moveBackward(s),this._flags.moveUp&&e.moveUp(s),this._flags.moveDown&&e.moveDown(s),this._flags.moveLeft&&e.moveLeft(s),this._flags.moveRight&&e.moveRight(s),this._flags.turnLeft&&e.rotate(a,-this._rotateRate),this._flags.turnRight&&e.rotate(a,this._rotateRate)}},jm=Tn;var En=class{constructor(e){this._viewer=e,this._viewOption={},this._cache={},this._activedPath=void 0}_onPostRender(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(ue.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}addPath(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.fire(ue.ADD),this._cache[e.pathId]=e),this}addPaths(e){return Array.isArray(e)&&e.forEach(i=>{this.addPath(i)}),this}removePath(e){return e&&this._cache.hasOwnProperty(e.pathId)&&(delete this._cache[e.pathId],e.pathEvent.fire(ue.REMOVE)),this}getPath(e){let i=this.getPaths().filter(s=>s.id===e);return i&&i.length?i[0]:void 0}getPaths(){let e=[];return Object.keys(this._cache).forEach(i=>{e.push(this._cache[i])}),e}activate(e,i={}){var s;return!e||(e==null?void 0:e.pathId)===((s=this._activedPath)==null?void 0:s.pathId)||!this._cache.hasOwnProperty(e==null?void 0:e.pathId)?this:(this._viewOption=i,this._activedPath&&this.deactivate(),this._activedPath=e,this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(ue.RESET_TIME_LINE),this._viewer.on(z.POST_RENDER,this._onPostRender,this),this)}deactivate(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(z.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this}clear(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(z.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this}},Ym=En;var Pn=class{constructor(e,i,s){this._id=T.uuid(),this._bid=void 0,this._positions=v.parsePositions(e),this._duration=i||20,this._pathMode=s||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=r.JulianDate.now(),this._pathEvent=new Ar,this._pathEvent.on(ue.ADD,this._onAdd,this),this._pathEvent.on(ue.REMOVE,this._onRemove,this),this._pathEvent.on(ue.POST_RENDER,this._onPostRender,this),this._pathEvent.on(ue.RESET_TIME_LINE,this._resetTimeLine,this),this._state=_.INITIALIZED}get pathId(){return this._id}get id(){return this._bid}set id(e){this._bid=e}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e)}get duration(){return this._duration}set duration(e){this._duration=e}get pathMode(){return this._pathMode}set pathMode(e){this._pathMode=e}get pathEvent(){return this._pathEvent}get actived(){return this._actived}set actived(e){this._actived=e}get state(){return this._state}_onAdd(){this._state=_.ADDED}_onRemove(){this._state=_.REMOVED}_onPostRender({viewer:e,viewOption:i}){if(!this.actived)return!1;let s=r.JulianDate.now();if(r.JulianDate.lessThan(s,this._endTime)&&this._sampledPosition){let a=this._sampledPosition.getValue(s),o=this._sampledPosition.getValue(r.JulianDate.addSeconds(s,.001,new r.JulianDate));a&&o&&e.camera.lookAt(a,new r.HeadingPitchRange(ke(a,o),r.Math.toRadians((i==null?void 0:i.pitch)||-20),(i==null?void 0:i.range)||2e3))}else e.camera.lookAtTransform(r.Matrix4.IDENTITY),this._actived=!1}_resetTimeLine(){if(!this._positions||!this._positions.length)return!1;let e=r.JulianDate.now(),i=0,s=[];if(this._pathMode==="speed"){let a=ce(this._positions)/this._duration;s=this._positions.map((o,n,h)=>(n!==0&&(i+=ce([h[n-1],o])/a),r.JulianDate.addSeconds(e,i,new r.JulianDate)))}else{let a=this._positions.length,o=(this._duration-this._duration%a)/a;s=this._positions.map((n,h)=>r.JulianDate.addSeconds(e,h*o,new r.JulianDate))}this._sampledPosition=new r.SampledPositionProperty,this._sampledPosition.addSamples(s,y.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=r.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:r.HermitePolynomialApproximation}),this._endTime=s[s.length-1],this._actived=!0}},qm=Pn;var Y0={FP:"1",TP:"2",TRACKED:"tracked",FREE:"free"},Be=Y0;var Mn=class{constructor(e){this._viewer=e,this._cache={},this._delegete=new r.CustomDataSource("history-track-layer"),this._viewer.dataSources.add(this._delegete),this._activedTrack=void 0,this._viewOption={},this._stopTime=void 0,this._state=_.INITIALIZED}get delegate(){return this._delegete.entities}get state(){return this._state}_onPostRender(){Object.keys(this._cache).forEach(e=>{let i=this._cache[e];i.trackEvent&&i.trackEvent.fire(me.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}),this._viewer.scene.requestRender()}addTrack(e){return e&&e.trackEvent&&!this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(me.ADD,this),this._cache[e.trackId]=e),this}addTracks(e){return Array.isArray(e)&&e.forEach(i=>{this.addTrack(i)}),this}getTrack(e){let i=this.getTracks().filter(s=>s.id===e);return i&&i.length?i[0]:void 0}removeTrack(e){return e&&e.trackEvent&&this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(me.REMOVE,this),delete this._cache[e.trackId]),this}getTracks(){let e=[];return Object.keys(this._cache).forEach(i=>{e.push(this._cache[i])}),e}play(){let e=r.JulianDate.now();return Object.keys(this._cache).forEach(i=>{let s=this._cache[i];s.startTime=e,s.viewed=!1}),this._activedTrack=void 0,this._stopTime=void 0,this._viewer.off(z.POST_RENDER,this._onPostRender,this),this._viewer.on(z.POST_RENDER,this._onPostRender,this),this._state=_.PLAY,this}pause(){return this._stopTime=r.JulianDate.now(),this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this._viewer.off(z.POST_RENDER,this._onPostRender,this),this._state=_.PAUSE,this}restore(){if(this._state!==_.PAUSE)return this;if(this._stopTime){let e=r.JulianDate.now();Object.keys(this._cache).forEach(i=>{this._cache[i].trackEvent.fire(me.RESET_TIME_LINE,{stopTime:this._stopTime,duration:r.JulianDate.secondsDifference(e,this._stopTime)})})}return this._viewer.off(z.POST_RENDER,this._onPostRender,this),this._viewer.on(z.POST_RENDER,this._onPostRender,this),this._state=_.PLAY,this}viewTrack(e,i={}){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return this._viewOption=i,this._activedTrack&&(this._activedTrack.viewed=!1),e.viewed=!0,this._activedTrack=e,i.mode===Be.FREE&&(this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0),this}releaseTrack(e){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return e.viewed&&(e.viewed=!1),this._activedTrack=void 0,this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}clear(){return Object.keys(this._cache).forEach(e=>{this.removeTrack(this._cache[e])}),this._activedTrack&&(this._activedTrack.viewed=!1),this._activedTrack=void 0,this._viewer.off(z.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}},Xm=Mn;var q0={clampToGround:!1,clampToTileset:!1,interpolationType:"Linear",interpolationDegree:2,endDelayTime:.5,headingOffset:0},X0={width:2,material:r.Color.ORANGE,clampToGround:!0,depthFailMaterial:r.Color.ORANGE.withAlpha(.8)},bn=class{constructor(e,i,s,a){this._id=T.uuid(),this._bid=void 0,this._positions=v.parsePositions(e),this._duration=i||20,this._callback=s,this._options={...q0,...a},this._controller=void 0,this._sampledPosition=void 0,this._velocityOrientation=void 0,this._viewed=!1,this._delegate=new r.Entity,this._pathPositions=[],this._path=new r.Entity({show:!1,polyline:{positions:new r.CallbackProperty(()=>this._pathPositions,!1)}}),this._positionIndex=0,this._timeLine=[],this._startTime=void 0,this._endTime=void 0,this._trackEvent=new Mr,this._trackEvent.on(me.POST_RENDER,this._onPostRender,this),this._trackEvent.on(me.ADD,this._onAdd,this),this._trackEvent.on(me.REMOVE,this._onRemove,this),this._trackEvent.on(me.RESET_TIME_LINE,this._resetTimeLine,this),this._state=_.INITIALIZED}get currentDistance(){return ce(v.parsePositions(this._pathPositions))}get currentPosition(){let[e]=this._pathPositions.slice(-1);return v.parsePosition(e)}get allDistance(){return ce(this._positions)}get trackId(){return this._id}get id(){return this._bid}set id(e){this._bid=e}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._resetTimeLine({})}get duration(){return this._duration}set duration(e){this._duration=e,this._resetTimeLine({})}get startTime(){return this._startTime}set startTime(e){e instanceof Date?this._startTime=r.JulianDate.fromDate(e):this._startTime=e,this._resetTimeLine({})}get viewed(){return this._viewed}set viewed(e){this._viewed=e}get trackEvent(){return this._trackEvent}get state(){return this._state}_onAdd(e){if(!e)return!1;this._controller=e,this._controller.delegate.add(this._delegate),this._controller.delegate.add(this._path),!this._startTime&&(this._startTime=r.JulianDate.now()),this._state=_.ADDED}_onRemove(){if(!this._controller)return!1;this._controller.delegate.remove(this._delegate),this._controller.delegate.remove(this._path),this._viewed=!1,this._startTime=void 0,this._state=_.REMOVED}_onPostRender({viewer:e,viewOption:i}){if(!this._startTime||!this._endTime)return!1;let s=r.JulianDate.now();if(r.JulianDate.lessThanOrEquals(s,this._endTime)){let a=this._sampledPosition.getValue(s);if(!a)return!1;this._pathPositions.push(a),this._options.clampToTileset?this._delegate.position=e.scene.clampToHeight(a,[this._delegate]):this._delegate.position=a;let o=this._velocityOrientation.getValue(s);if(o){let h=r.Quaternion.fromHeadingPitchRoll(new r.HeadingPitchRoll(r.Math.toRadians(this._options.headingOffset||0),0,0),new r.Quaternion);this._delegate.orientation=r.Quaternion.multiply(o,h,new r.Quaternion)}let n=this._timeLine[this._positionIndex];if(n){let h=r.JulianDate.secondsDifference(s,n);if(h>=0&&h<=1){let c=this._positions[this._positionIndex]||void 0;if(c&&o){let d=r.Matrix3.fromQuaternion(o),p=r.Matrix4.fromRotationTranslation(d,a),f=r.Transforms.fixedFrameToHeadingPitchRoll(p);c.heading=r.Math.toDegrees(f.heading),c.pitch=r.Math.toDegrees(f.pitch),c.roll=r.Math.toDegrees(f.roll)}this._callback&&this._callback(c,this._positionIndex+1===this._positions.length),this._positionIndex++,this._options.loop&&this._positionIndex===this._positions.length&&this._restart()}}}this._setCameraView(e,i)}_restart(){this._startTime=r.JulianDate.now(),this._resetTimeLine({})}_setCameraView(e,i){var a,o,n;if(!this._viewed)return!1;let s=r.JulianDate.now();if(r.JulianDate.greaterThan(s,this._endTime))e.camera.lookAtTransform(r.Matrix4.IDENTITY),e.delegate.trackedEntity&&(e.delegate.trackedEntity=void 0),this._viewed=!1;else{let h=this._sampledPosition.getValue(s),c=this._sampledPosition.getValue(r.JulianDate.addSeconds(s,1/60,new r.JulianDate));h&&c&&((i==null?void 0:i.mode)===Be.TRACKED&&((o=(a=e.delegate)==null?void 0:a.trackedEntity)==null?void 0:o.id)!==((n=this._delegate)==null?void 0:n.id)?e.delegate.trackedEntity=this._delegate:(i==null?void 0:i.mode)===Be.FP?e.camera.lookAt(h,new r.HeadingPitchRange(ke(h,c),r.Math.toRadians((i==null?void 0:i.pitch)||0),(i==null?void 0:i.range)||10)):(i==null?void 0:i.mode)===Be.TP&&e.camera.lookAt(h,new r.HeadingPitchRange(0,r.Math.toRadians((i==null?void 0:i.pitch)||-90),(i==null?void 0:i.range)||1e3)))}}_resetTimeLine(e){var s;if(!this._startTime||!this._duration||!((s=this._positions)!=null&&s.length))return!1;let i=0;if(!(e!=null&&e.stopTime)&&!(e!=null&&e.duration)){let a=ce(this._positions)/this._duration;this._timeLine=this._positions.map((o,n,h)=>(n!==0&&(i+=ce([h[n-1],o])/a),r.JulianDate.addSeconds(this._startTime,i,new r.JulianDate))),this._pathPositions=[],this._positionIndex=0}else e!=null&&e.stopTime&&(e!=null&&e.duration)&&(this._duration+=e.duration,this._timeLine=this._timeLine.map(a=>r.JulianDate.addSeconds(a,e.duration,new r.JulianDate)));this._sampledPosition=new r.SampledPositionProperty,this._sampledPosition.addSamples(this._timeLine,y.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=r.ExtrapolationType.HOLD,this._options.interpolationType==="Hermite"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||2,interpolationAlgorithm:r.HermitePolynomialApproximation}):this._options.interpolationType==="Linear"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||1,interpolationAlgorithm:r.LinearApproximation}):this._options.interpolationType==="Lagrange"&&this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||5,interpolationAlgorithm:r.LagrangePolynomialApproximation}),this._velocityOrientation=new r.VelocityOrientationProperty(this._sampledPosition),this._endTime=r.JulianDate.addSeconds(this._timeLine[this._timeLine.length-1],this._options.endDelayTime,new r.JulianDate)}addPosition(e,i){return this._positions.push(v.parsePosition(e)),this._duration+=i,this._resetTimeLine({}),this}setModel(e,i){return this._delegate.model={...i,uri:e,heightReference:this._options.clampToGround?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},this}setBillboard(e,i){return this._delegate.billboard={...i,image:e,heightReference:this._options.clampToGround?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},this}setLabel(e,i){return this._delegate.label={...i,text:e,heightReference:this._options.clampToGround?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},this}setPath(e,i={}){return this._path.show=!!e,T.merge(this._path.polyline,X0,i),this}},Jm=bn;var J0={ANGLE:"angle",AREA:"area",AREA_HEIGHT:"area_height",AREA_SURFACE:"area_surface",DISTANCE:"distance",DISTANCE_SURFACE:"distance_surface",HEADING:"heading",HEIGHT:"height",TRIANGLE_HEIGHT:"triangle_height"},ge=J0;var An=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions),this._positions.length<=1?this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236":this.drawTool.tooltipMess="\u5355\u51FB\u589E\u52A0\u70B9\uFF0C\u53F3\u51FB\u5220\u9664\u70B9\uFF0C\u53CC\u51FB\u5B8C\u6210\u7ED8\u5236"}_onDeleteAnchor(){this._positions.length>1&&(this._positions.splice(this._positions.length-2,1),this._options.onCalc&&this._options.onCalc(this._positions)),this._positions.length<=1&&(this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236")}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._removeSamePoint(this._positions),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_removeSamePoint(e=[]){if(e.length<2)return e;for(let i=0;i<e.length-1;i++){let s=e[i],a=e[i+1];typeof s.equals=="function"&&s.equals(a)&&(e.splice(i,1),i--)}return e}_bindEvent(){this.drawTool.on(M.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(M.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(M.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.on(M.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(M.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(M.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(M.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.off(M.DRAW_STOP,this._onDrawStop,this)}start(e,i){return this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(i),this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236",this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},Fi=An;var Sn=class extends Fi{constructor(e){super(e)}_mountedHook(){this._delegate=new r.Entity({polyline:{...this._style,positions:new r.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),i>0&&this.drawTool.fire(M.CREATE_ANCHOR,{position:e}),i>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(M.DRAW_STOP,e))}},ye=Sn;var In=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._delegate=new r.Entity,this._delegate.merge(e),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_mountAnchor(){}_onAnchorMoving({pickedAnchor:e,position:i}){}_onEditAnchorStop({pickedAnchor:e,position:i}){}_onEditStop({pickedAnchor:e,position:i}){this._unbindEvent(),this._viewer.editTool.deactivate()}_bindEvent(){return this.editTool.on(M.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(M.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(M.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(M.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(M.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(M.EDIT_STOP,this._onEditStop,this)}start(e,i){return this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._viewer.editTool.deactivate(),this._viewer.editTool.activate(i),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}},Gi=In;var Ln=class extends Gi{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polyline.positions=new r.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polyline.positions.getValue(r.JulianDate.now()));if(this._options.maxAnchorSize>2){for(let i=0;i<e.length-1;i++){let s=Y(e[i],e[i+1]);this._positions.push(e[i]),this._positions.push(s)}this._positions.push(e[e.length-1]),this._positions.forEach((i,s)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:i,index:s,isMid:s%2!==0})})}else this._positions=e,this._positions.forEach((i,s)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:i,index:s})});this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),a=s.index;if(s.isMid){let o=Y(this._positions[a],this._positions[a-1]),n=Y(this._positions[a],this._positions[a+1]);this._positions.splice(a,1,o,i,n),this.editTool.fire(M.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),a=s.index;if(this._positions[a]=i,!s.isMid&&this._options.maxAnchorSize>2){let o=-1,n=-1,h=-1,c=-1,d=this._positions.length;if(a===0?(h=a+2,c=a+1):s.index===d-1?(o=a-2,n=a-1):(o=a-2,n=a-1,h=a+2,c=a+1),o>0){let p=Y(this._positions[o],this._positions[a]);this._positions[n]=p,this.editTool.fire(M.UPDATE_ANCHOR,{index:n,position:p})}if(h>0){let p=Y(this._positions[h],this._positions[a]);this._positions[c]=p,this.editTool.fire(M.UPDATE_ANCHOR,{index:c,position:p})}}this._options.onCalc&&this._options.onCalc(this._positions)}},ve=Ln;var Dn=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new r.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,i=!1){let s=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof r.EllipsoidTerrainProvider)?r.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>r.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>r.Cartographic.fromCartesian(o))),a=this._viewer.scene.clampToHeightSupported&&i?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([s,a])}_onDrawStop(e){}_onCalc(e){}_startHook(e,i){this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,i){return this}},ie=Dn;var Rn=class extends ie{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new r.Entity({polyline:{positions:new r.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ve(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let i=r.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new r.Cartesian3),s=r.Plane.fromPointNormal(e[0],i);this._helpLinePositions=[e[0],r.Plane.projectPointOntoPlane(s,e[1],new r.Cartesian3),e[1]];let a=Math.abs(r.Plane.getPointDistance(s,e[1]));this._resultLabel.label.text=`\u89D2\u5EA6\uFF1A${r.Math.toDegrees(Math.asin(a/r.Cartesian3.distance(e[0],e[1]))).toFixed(2)} \u5EA6`}}start(e,i){this._startHook(e,i);let s=new r.PolylineDashMaterialProperty({color:r.Color.GREENYELLOW});return this._helpLine.polyline.material=s,this._helpLine.polyline.depthFailMaterial=s,this._layer.entities.add(this._helpLine),new ye({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2,clampToGround:!1}).start(e,{...i,maxAnchorSize:this._maxAnchorSize}),this}},Qm=Rn;var On=class extends Fi{constructor(e){super(e)}_mountedHook(){this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?new r.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)},polyline:{...this._style,positions:new r.CallbackProperty(()=>this._positions.length<=3?this._positions:null,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(M.CREATE_ANCHOR,{position:e})}},ht=On;var kn=class extends Gi{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polygon.hierarchy=new r.CallbackProperty(e=>this._positions.length>2?new r.PolygonHierarchy(this._positions):null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polygon.hierarchy.getValue(r.JulianDate.now()).positions);e.push(e[0]);for(let i=0;i<e.length-1;i++){let s=Y(e[i],e[i+1]);this._positions.push(e[i]),this._positions.push(s)}this._positions.forEach((i,s)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:i,index:s,isMid:s%2!==0})}),this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),a=s.index;if(s.isMid){let o,n,h=this._positions.length;a===h-1?(o=Y(this._positions[a],this._positions[a-1]),n=Y(this._positions[a],this._positions[0])):(o=Y(this._positions[a],this._positions[a-1]),n=Y(this._positions[a],this._positions[a+1])),this._positions.splice(a,1,o,i,n),this.editTool.fire(M.CLEAR_ANCHOR),this._positions.forEach((c,d)=>{this.editTool.fire(M.CREATE_ANCHOR,{position:c,index:d,isMid:d%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),a=s.index;this._positions[a]=i;let o=this._positions.length;if(!s.isMid){let n=-1,h=-1,c=-1,d=-1;a===0?(n=o-2,h=o-1,c=a+2,d=a+1):a===o-2?(n=a-2,h=a-1,c=0,d=o-1):(n=a-2,h=a-1,c=a+2,d=a+1);let p=Y(this._positions[n],this._positions[a]),f=Y(this._positions[c],this._positions[a]);this._positions[h]=p,this._positions[d]=f,this.editTool.fire(M.UPDATE_ANCHOR,{index:h,position:p}),this.editTool.fire(M.UPDATE_ANCHOR,{index:d,position:f})}this._options.onCalc&&this._options.onCalc(this._positions)}},ct=kn;var Nn=class extends ie{constructor(){super()}_onDrawStop(e){new ct(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var i;e.length>2?(this._resultLabel.position=(i=r.BoundingSphere.fromPoints(e))==null?void 0:i.center,this._resultLabel.label.text=`\u9762\u79EF\uFF1A${Re(e).toFixed(2)} \u5E73\u65B9\u7C73`):this._resultLabel.label.text=null}start(e,i){return this._startHook(e,i),new ht({material:i.material||r.Color.YELLOW.withAlpha(.6),perPositionHeight:!0,width:2}).start(e,this._options),this}},Km=Nn;var zn=class extends ie{constructor(){super()}_onDrawStop(e){new ct(e).start({viewer:this._viewer,layer:this._layer},this._options)}_lerp(e,i=4){let s=[];for(let a=0;a<i;++a)for(let o=0;o<i;++o){let n=r.Math.lerp(e.west,e.east,o/(i-1)),h=r.Math.lerp(e.south,e.north,a/(i-1));s.push(r.Cartesian3.fromRadians(n,h))}return s}_onCalc(e){if(e.length>2){let i=this._lerp(r.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(i,!0).then(([s,a])=>s.map((o,n)=>({lng:o.longitude,lat:o.latitude,alt:Math.max(o.height||0,a[n]?r.Cartographic.fromCartesian(a[n]).height:0)}))).then(s=>{let a=0,o;s.forEach(n=>{n.alt>a&&(a=n.alt,o=n)}),o&&(this._resultLabel.position=r.Cartesian3.fromRadians(o.lng,o.lat,o.alt),this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${a.toFixed(2)} \u7C73`)})}}start(e,i){return this._startHook(e,i),new ht({material:i.material||r.Color.YELLOW.withAlpha(.6),width:2}).start(e,this._options),this}},$m=zn;var Fn=class extends ie{constructor(){super()}_lerp(e,i=4){let s=[];for(let a=0;a<i;++a)for(let o=0;o<i;++o){let n=r.Math.lerp(e.west,e.east,o/(i-1)),h=r.Math.lerp(e.south,e.north,a/(i-1));s.push(r.Cartesian3.fromRadians(n,h))}return s}_onDrawStop(e){new ct(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var i;if(e.length>2){this._resultLabel.position=(i=r.BoundingSphere.fromPoints(e))==null?void 0:i.center;let s=this._lerp(r.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(s.concat(e),!1).then(([a])=>a.map(o=>r.Cartesian3.fromDegrees(r.Math.toDegrees(o.longitude),r.Math.toDegrees(o.latitude),o.height))).then(a=>{this._resultLabel.label.text=`\u9762\u79EF\uFF1A${Re(a).toFixed(2)} \u5E73\u65B9\u7C73`})}}start(e,i){return this._startHook(e,i),new ht({material:i.material||r.Color.YELLOW.withAlpha(.6),width:2}).start(e,this._options),this}},eu=Fn;var Gn=class extends ie{constructor(){super(),this._maxAnchorSize=9999,this._positions=[]}_onDrawStop(e){for(let i=0;i<this._positions.length-2;i++)this._layer.entities.add(this.createLabel(this._positions[i],this._positions[i+1]));new ve(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[e.length-1];let i=0;for(let s=0;s<e.length-1;s++){let a=r.Cartesian3.distance(e[s],e[s+1]);i+=a}this._resultLabel.label.text=i>1e3?`\u603B\u8DDD\u79BB\uFF1A${(i/1e3).toFixed(2)} \u516C\u91CC`:`\u603B\u8DDD\u79BB\uFF1A${i.toFixed(2)} \u7C73`}else this._resultLabel.label.text=null;this._positions=e}createLabel(e,i){let s=r.Cartesian3.distance(e,i),a=r.Cartesian3.lerp(e,i,.5,new r.Cartesian3),o=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}});return o.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`,o.position=a,o}start(e,i){return this._startHook(e,i),new ye({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2,clampToGround:!1}).start(e,{...i,maxAnchorSize:this._maxAnchorSize}),this}},tu=Gn;var Hn=class extends ie{constructor(){super(),this._maxAnchorSize=9999,this._positions=[]}_lerp(e,i,s=5){let a=[],o=r.Cartographic.fromCartesian(e),n=r.Cartographic.fromCartesian(i);for(let h=0;h<s;h++){let c=r.Math.lerp(o.longitude,n.longitude,h/s),d=r.Math.lerp(o.latitude,n.latitude,h/s),p=o.height-(o.height-n.height)*(h/s);a.push(r.Cartesian3.fromRadians(c,d,p))}return a}_onDrawStop(e){for(let i=0;i<this._positions.length-2;i++)this._layer.entities.add(this.createLabel(this._positions[i],this._positions[i+1]));new ve(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let i=[e[0]];this._resultLabel.position=e[e.length-1];for(let s=0;s<e.length-1;s++)i=i.concat(this._lerp(e[s],e[s+1],this._options.lerpNum));i.push(e[e.length-1]),this._getSampledHeight(i).then(([s,a])=>s.map((o,n)=>r.Cartesian3.fromDegrees(r.Math.toDegrees(o.longitude),r.Math.toDegrees(o.latitude),Math.max(o.height||0,a[n]?r.Cartographic.fromCartesian(a[n]).height:0)))).then(s=>{let a=0;for(let o=0;o<s.length-1;o++){let n=r.Cartesian3.distance(s[o],s[o+1]);a+=n}this._resultLabel.label.text=a>1e3?`\u603B\u8DDD\u79BB\uFF1A${(a/1e3).toFixed(2)} \u516C\u91CC`:`\u603B\u8DDD\u79BB\uFF1A${a.toFixed(2)} \u7C73`})}else this._resultLabel.label.text=null;this._positions=e}createLabel(e,i){let s=r.Cartesian3.distance(e,i),a=r.Cartesian3.lerp(e,i,.5,new r.Cartesian3),o=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}});return o.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`,o.position=a,o}start(e,i){return this._startHook(e,i),new ye({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},iu=Hn;var Wn=class extends ie{constructor(){super(),this._maxAnchorSize=2}_onDrawStop(e){new ve(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){e.length>0&&(this._startLabel.position=e[0]),e.length>1&&(this._resultLabel.position=e[e.length-1],this._resultLabel.label.text=`\u504F\u822A\uFF1A${r.Math.toDegrees(ke(e[0],e[1])).toFixed(1)} \u5EA6`)}start(e,i){return this._startHook(e,i),new ye({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},ru=Wn;var Bn=class extends ie{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new r.Entity({polyline:{positions:new r.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ve(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let i=r.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new r.Cartesian3),s=r.Plane.fromPointNormal(e[0],i);this._helpLinePositions=[e[0],r.Plane.projectPointOntoPlane(s,e[1],new r.Cartesian3),e[1]];let a=Math.abs(r.Plane.getPointDistance(s,e[1]));this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${a.toFixed(2)} \u7C73`}}start(e,i){this._startHook(e,i);let s=new r.PolylineDashMaterialProperty({color:r.Color.GREENYELLOW});return this._helpLine.polyline.material=s,this._helpLine.polyline.depthFailMaterial=s,this._layer.entities.add(this._helpLine),new ye({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},su=Bn;var Un=class extends ie{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new r.Entity({polyline:{positions:new r.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}}),this._lengthLabel=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._heightLabel=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._distanceLabel=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}})}_onDrawStop(e){new ve(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let i=r.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new r.Cartesian3),s=r.Plane.fromPointNormal(e[0],i),a=r.Plane.projectPointOntoPlane(s,e[1],new r.Cartesian3);this._helpLinePositions=[e[0],a,e[1]];let o=r.Cartesian3.distance(e[0],a),n=Math.abs(r.Plane.getPointDistance(s,e[1])),h=r.Cartesian3.distance(e[0],e[1]);this._lengthLabel.position=r.Cartesian3.midpoint(e[0],a,new r.Cartesian3),this._lengthLabel.label.text=o>1e3?`${(o/1e3).toFixed(2)} \u516C\u91CC`:`${o.toFixed(2)} \u7C73`,this._distanceLabel.position=r.Cartesian3.midpoint(e[0],e[1],new r.Cartesian3),this._distanceLabel.label.text=h>1e3?`${(h/1e3).toFixed(2)} \u516C\u91CC`:`${h.toFixed(2)} \u7C73`,this._heightLabel.position=r.Cartesian3.midpoint(a,e[1],new r.Cartesian3),this._heightLabel.label.text=n>1e3?`${(n/1e3).toFixed(2)} \u516C\u91CC`:`${n.toFixed(2)} \u7C73`}}start(e,i){this._startHook(e,i);let s=new r.PolylineDashMaterialProperty({color:r.Color.GREENYELLOW});return this._helpLine.polyline.material=s,this._helpLine.polyline.depthFailMaterial=s,this._layer.entities.add(this._helpLine),this._layer.entities.add(this._lengthLabel),this._layer.entities.add(this._heightLabel),this._layer.entities.add(this._distanceLabel),new ye({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2,clampToGround:!1}).start(e,{...i,maxAnchorSize:this._maxAnchorSize}),this}},au=Un;var Vn=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new r.CustomDataSource("measure-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}angle(e={}){return new Qm().start(this,e),this}area(e={}){return new Km().start(this,e),this}areaHeight(e={}){return new $m().start(this,e),this}areaSurface(e={}){return new eu().start(this,e),this}distance(e={}){return new tu().start(this,e),this}distanceSurface(e={}){return new iu().start(this,e),this}heading(e={}){return new ru().start(this,e),this}height(e={}){return new su().start(this,e),this}triangleHeight(e={}){return new au().start(this,e),this}activate(e,i){switch(e){case ge.ANGLE:this.angle(i);break;case ge.AREA:this.area(i);break;case ge.AREA_HEIGHT:this.areaHeight(i);break;case ge.AREA_SURFACE:this.areaSurface(i);break;case ge.DISTANCE:this.distance(i);break;case ge.DISTANCE_SURFACE:this.distanceSurface(i);break;case ge.HEADING:this.heading(i);break;case ge.HEIGHT:this.height(i);break;case ge.TRIANGLE_HEIGHT:this.triangleHeight(i);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},ou=Vn;var Q0={depthFail:!0,width:10,arrow:!1},Zn=class{constructor(e,i={}){this._delegate=void 0,this._positions=[],this._options={...Q0,...i},this._color=this._options.color,this._positions=e.slice(),this._options.loop&&this._positions.push(e[0]),this._boundingSphere=r.BoundingSphere.fromPoints(this._positions),this._transformedBoundingSphere=r.BoundingSphere.clone(this._boundingSphere),this._modelMatrix=r.Matrix4.clone(r.Matrix4.IDENTITY),this._active=!1,this._show=!1,this._update=!0}get show(){return this._show}set show(e){return this._show=e,this}get active(){return this._active}set active(e){return this._active=e,this._color=e?r.Color.YELLOW:this._options.color,this._update=!0,this}get positions(){return this._positions}set positions(e){return this._positions=e.slice(),this._options.loop&&this._positions.push(e[0]),this}get modelMatrix(){return this._modelMatrix}set modelMatrix(e){return r.Matrix4.equalsEpsilon(e,this._modelMatrix,r.Math.EPSILON10)?this:(r.Matrix4.clone(e,this._modelMatrix),this._update=!0,this)}get boundingVolume(){return this._transformedBoundingSphere}update(e){if(this._show){if(this._update){this._update=!1,this._delegate=this._delegate&&this._delegate.destroy();let i=this._color,s=i.withAlpha(.3),a,o;this._options.arrow?(a=new r.PolylineMaterialAppearance({material:r.Material.fromType(r.Material.PolylineArrowType,{color:i})}),this._options.depthFail&&(o=new r.PolylineMaterialAppearance({material:r.Material.fromType(r.Material.PolylineArrowType,{color:s})}))):(a=new r.PolylineColorAppearance({translucent:i.alpha!==1}),this._options.depthFail&&(o=new r.PolylineColorAppearance({translucent:s.alpha!==1})));let n=new r.PolylineGeometry({positions:this._positions,width:this._options.width,vertexFormat:r.PolylineMaterialAppearance.VERTEX_FORMAT,arcType:r.ArcType.NONE});this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:n,attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(i),depthFailColor:r.ColorGeometryInstanceAttribute.fromColor(s)},id:this._options.id,modelMatrix:this._modelMatrix}),appearance:a,depthFailAppearance:o,asynchronous:!1}),this._transformedBoundingSphere=r.BoundingSphere.transform(this._boundingSphere,this._modelMatrix,this._transformedBoundingSphere)}this._delegate.update(e)}}isDestroyed(){return!1}destroy(){return this._delegate=this._delegate&&this._delegate.destroy(),r.destroyObject(this)}},Hi=Zn;var jn={X:r.Cartesian3.UNIT_X,Y:r.Cartesian3.UNIT_Y,Z:r.Cartesian3.UNIT_Z},Yn=class{constructor(e,i={}){this._viewer=e,this._options=i,this._modelMatrix=void 0,this._active=!1,this._activeAxis=void 0,this._fixedFrame=void 0,this._offset=new r.Cartesian3,this._pickingPlane=new r.Plane(r.Cartesian3.UNIT_X,0),this._axisX=this._createAxisLine("X",r.Color.RED),this._axisY=this._createAxisLine("Y",r.Color.GREEN),this._axisZ=this._createAxisLine("Z",r.Color.BLUE),this.resetTranslation=void 0,this.complete=void 0}set modelMatrix(e){return this._modelMatrix=e,this.update(),this}get active(){return this._active}set active(e){return this._active=e,this._axisX.show=this._active,this._axisY.show=this._active,this._axisZ.show=this._active,this}get modelTranslation(){return r.Matrix4.getTranslation(this._modelMatrix,new r.Cartesian3)}_createAxisLine(e,i){return this._viewer.scene.primitives.add(new Hi([r.Cartesian3.ZERO,jn[e]],{id:"position-editor-"+e,arrow:this._options.arrow,color:i,depthFail:this._options.depthFail}))}handleLeftDown(e){console.log("handleLeftDown",e);let i=this._viewer.scene,s=i.camera,a=i.drillPick(e.position)||[];console.log(2);for(let h=0;h<a.length;h++){let c=a[h];if(c.id&&c.id==="position-editor-X"){this._activeAxis="X",this._axisX.active=!0;break}else if(c.id&&c.id==="position-editor-Y"){this._activeAxis="Y",this._axisY.active=!0;break}else if(c.id&&c.id==="position-editor-Z"){this._activeAxis="Z",this._axisZ.active=!0;break}console.log(3)}if(!this._activeAxis)return;console.log(4),this._viewer.canvas.style.cursor="pointer";let o=r.Matrix4.multiplyByPointAsVector(this._fixedFrame,jn[this._activeAxis],new r.Cartesian3),n=new r.Cartesian3;Math.abs(r.Cartesian3.dot(s.upWC,o)>.7)?n=r.Cartesian3.cross(s.rightWC,o,n):n=r.Cartesian3.cross(s.upWC,o,n),r.Cartesian3.normalize(n,n),r.Plane.fromPointNormal(this.modelTranslation,n,this._pickingPlane),r.IntersectionTests.rayPlane(s.getPickRay(e.position),this._pickingPlane,this._offset),r.Cartesian3.subtract(this._offset,this.modelTranslation,this._offset),i.screenSpaceCameraController.enableInputs=!1,console.log(5)}handleMouseMove(e){if(!this._activeAxis)return;let i=this._viewer.scene.camera,s=new r.Cartesian3,a=r.IntersectionTests.rayPlane(i.getPickRay(e.endPosition),this._pickingPlane,new r.Cartesian3);if(!a)return;let o=r.Cartesian3.subtract(a,this.modelTranslation,new r.Cartesian3),n=r.Matrix4.multiplyByPointAsVector(this._fixedFrame,jn[this._activeAxis],new r.Cartesian3);r.Cartesian3.projectVector(o,n,o),r.Cartesian3.projectVector(this._offset,n,s),r.Cartesian3.subtract(o,s,o);let h=r.Cartesian3.add(this.modelTranslation,o,new r.Cartesian3);this.resetTranslation&&this.resetTranslation(h)}handleLeftUp(e){this._viewer.canvas.style.cursor="default",this._activeAxis=void 0,this._axisX.active=!1,this._axisY.active=!1,this._axisZ.active=!1,this._viewer.scene.screenSpaceCameraController.enableInputs=!0,this.complete&&this.complete()}update(){let e=5*this._options.axisLineScale;this._fixedFrame=r.Transforms.eastNorthUpToFixedFrame(this.modelTranslation);let i=r.Matrix4.multiplyByUniformScale(this._fixedFrame,e,new r.Matrix4);this._axisX.modelMatrix=i,this._axisY.modelMatrix=i,this._axisZ.modelMatrix=i}isDestroyed(){return!1}destroy(){this.active=!1;let e=this._viewer.scene;e.primitives.remove(this._axisX),e.primitives.remove(this._axisY),e.primitives.remove(this._axisZ),r.destroyObject(this)}},nu=Yn;var lu={X:r.Cartesian3.UNIT_X,Y:r.Cartesian3.UNIT_Y,Z:r.Cartesian3.UNIT_Z},qn=class{constructor(e,i={}){this._viewer=e,this._options=i,this._modelMatrix=void 0,this._active=!1,this._activeAxis=void 0,this._rotationStartPoint=new r.Cartesian3,this._rotationPlane=new r.Plane(r.Cartesian3.UNIT_X,0);let s=this._getUnitCirclePositions();this._axisX=this._createAxisLine("X",s.x,r.Color.RED),this._axisY=this._createAxisLine("Y",s.y,r.Color.GREEN),this._axisZ=this._createAxisLine("Z",s.z,r.Color.BLUE),this.resetRotation=void 0,this.complete=void 0}set modelMatrix(e){console.log(e),this._modelMatrix=e,this.update()}get active(){return this._active}set active(e){return this._active=e,this._axisX.show=e,this._axisY.show=e,this._axisZ.show=e,this}get modelTranslation(){return r.Matrix4.getTranslation(this._modelMatrix,new r.Cartesian3)}_getUnitCirclePositions(){let e=[],i=[],s=[];for(let a=0;a<360;a++){let o=r.Math.toRadians(a),n=Math.cos(o),h=Math.sin(o);e.push(new r.Cartesian3(0,n,h)),i.push(new r.Cartesian3(h,0,n)),s.push(new r.Cartesian3(n,h,0))}return{x:e,y:i,z:s}}_createAxisLine(e,i,s){return this._viewer.scene.primitives.add(new Hi(i,{id:"position-editor-"+e,loop:!0,color:s,width:5,depthFail:this._options.depthFail}))}_getRotationAngle(e,i,s){let a=r.Matrix4.inverse(e,new r.Matrix4),o=r.Matrix4.multiplyByPoint(a,i,new r.Cartesian3),n=r.Matrix4.multiplyByPoint(a,s,new r.Cartesian3),h=new r.Cartesian2,c=new r.Cartesian2;this._activeAxis==="X"?(h.x=o.y,h.y=o.z,c.x=n.y,c.y=n.z):this._activeAxis==="Y"?(h.x=-o.x,h.y=o.z,c.x=-n.x,c.y=n.z):(h.x=o.x,h.y=o.y,c.x=n.x,c.y=n.y);let d=h.x*c.y-h.y*c.x>=0,p=r.Cartesian2.angleBetween(h,c);return d||(p=-p),p}handleLeftDown(e){console.log("handleLeftDown",e);let i=this._viewer.scene,s=i.drillPick(e.position)||[];console.log(1);for(let n=0;n<s.length;n++){let h=s[n];if(h.id&&h.id==="position-editor-X"){this._activeAxis="X",this._axisX.active=!0;break}else if(h.id&&h.id==="position-editor-Y"){this._activeAxis="Y",this._axisY.active=!0;break}else if(h.id&&h.id==="position-editor-Z"){this._activeAxis="Z",this._axisZ.active=!0;break}}if(!this._activeAxis)return;this._viewer.canvas.style.cursor="pointer";let a=r.Matrix4.multiplyByPoint(this._modelMatrix,lu[this._activeAxis],new r.Cartesian3),o=r.Cartesian3.subtract(a,this.modelTranslation,a);r.Cartesian3.normalize(o,o),r.Plane.fromPointNormal(this.modelTranslation,o,this._rotationPlane),r.IntersectionTests.rayPlane(i.camera.getPickRay(e.position),this._rotationPlane,this._rotationStartPoint),i.screenSpaceCameraController.enableInputs=!1}handleMouseMove(e){if(!this._activeAxis)return;let i=this._viewer.scene.camera,s=r.IntersectionTests.rayPlane(i.getPickRay(e.endPosition),this._rotationPlane,new r.Cartesian3);if(!s)return;let a=this._getRotationAngle(this._modelMatrix,this._rotationStartPoint,s),o=r.Quaternion.fromAxisAngle(lu[this._activeAxis],a,new r.Quaternion),n=r.Matrix3.fromQuaternion(o),h=r.Matrix4.getTranslation(this._modelMatrix,new r.Cartesian3),c=r.Transforms.eastNorthUpToFixedFrame(h),d=r.Matrix4.getMatrix3(c,new r.Matrix3);r.Matrix3.multiply(d,n,n);let p=r.Matrix4.fromRotationTranslation(n,this.modelTranslation,new r.Matrix4);this.resetRotation&&this.resetRotation(p)}handleLeftUp(e){this._viewer.canvas.style.cursor="default",this._activeAxis=void 0,this._axisX.active=!1,this._axisY.active=!1,this._axisZ.active=!1,this._viewer.scene.screenSpaceCameraController.enableInputs=!0,this.complete&&this.complete()}update(){let e=5*this._options.axisLineScale,i=r.Matrix4.getTranslation(this._modelMatrix,new r.Cartesian3),s=r.Transforms.eastNorthUpToFixedFrame(i),a=r.Matrix4.multiplyByUniformScale(s,e,new r.Matrix4);this._axisX.modelMatrix=a,this._axisY.modelMatrix=a,this._axisZ.modelMatrix=a}isDestroyed(){return!1}destroy(){this.active=!1;let e=this._viewer.scene;return e.primitives.remove(this._axisX),e.primitives.remove(this._axisY),e.primitives.remove(this._axisZ),r.destroyObject(this)}},hu=qn;var K0={TRANSLATION:"translation",ROTATION:"rotation"},Wi=K0;var $0={arrow:!0,width:8,depthFail:!0,axisLineScale:1},Xn=class{constructor(e,i={}){this._viewer=e,this._options={...$0,...i},this._modelMatrix=void 0,this._model=void 0,this._handler=void 0,this._activeEditor=void 0,this._callback=void 0,this._position={lng:0,lat:0,alt:0,heading:0,pitch:0,roll:0},this._translationEditor=new nu(this._viewer,this._options),this._rotationEditor=new hu(this._viewer,this._options),this._translationEditor.resetTranslation=this._resetTranslation.bind(this),this._translationEditor.complete=this._complete.bind(this),this._rotationEditor.resetRotation=this._resetRotation.bind(this),this._rotationEditor.complete=this._complete.bind(this)}set overlay(e){return this._model=e.delegate||e,this._position=e.position||{lng:0,lat:0,alt:0,heading:0,pitch:0,roll:0},this}_bindEvent(){this._handler=new r.ScreenSpaceEventHandler(this._viewer.canvas),this._handler.setInputAction(this._onLeftDown.bind(this),r.ScreenSpaceEventType.LEFT_DOWN),this._handler.setInputAction(this._onLeftUp.bind(this),r.ScreenSpaceEventType.LEFT_UP),this._handler.setInputAction(this._onMouseMove.bind(this),r.ScreenSpaceEventType.MOUSE_MOVE)}_unbindEvent(){this._handler&&(this._handler.removeInputAction(this._onLeftDown.bind(this),r.ScreenSpaceEventType.LEFT_DOWN),this._handler.removeInputAction(this._onLeftUp.bind(this),r.ScreenSpaceEventType.LEFT_UP),this._handler.removeInputAction(this._onMouseMove.bind(this),r.ScreenSpaceEventType.MOUSE_MOVE))}_setModelMatrix(){if(this._model instanceof r.Entity){let e=this._model.position.getValue(r.JulianDate.now()),i=new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(-this._position.pitch),r.Math.toRadians(this._position.roll));this._modelMatrix=r.Transforms.headingPitchRollToFixedFrame(e,i),this._activeEditor.modelMatrix=this._modelMatrix,this._activeEditor.active=!0,this._setLngLatAlt(this._modelMatrix)}else this._model instanceof Promise&&this._model.then(e=>{e instanceof r.Model?this._modelMatrix=e.modelMatrix.clone():e instanceof r.Cesium3DTileset&&(this._modelMatrix=e.root.transform.clone()),this._activeEditor.modelMatrix=this._modelMatrix,this._activeEditor.active=!0,this._setLngLatAlt(this._modelMatrix)})}_setLngLatAlt(e){let i=r.Matrix4.getTranslation(e,new r.Cartesian3),s=r.Cartographic.fromCartesian(i);this._position.lng=Number(r.Math.toDegrees(s.longitude).toFixed(8)),this._position.lat=Number(r.Math.toDegrees(s.latitude).toFixed(8)),this._position.alt=Number(s.height.toFixed(2))}_setHPR(e){this._position.heading+=Number(r.Math.toDegrees(e.heading).toFixed(8)),this._position.heading=this._position.heading%360,this._position.pitch+=Number(-r.Math.toDegrees(e.pitch).toFixed(8)),this._position.pitch=this._position.pitch%360,this._position.roll+=Number(-r.Math.toDegrees(e.roll).toFixed(8)),this._position.roll=this._position.roll%360}_onLeftDown(e){this._activeEditor&&this._activeEditor.handleLeftDown(e)}_onMouseMove(e){this._activeEditor&&this._activeEditor.handleMouseMove(e)}_onLeftUp(e){this._activeEditor&&this._activeEditor.handleLeftUp(e)}_resetRotation(e){let i=r.Transforms.fixedFrameToHeadingPitchRoll(e);if(this._setHPR(i),this._model instanceof r.Entity){let s=this._model.position.getValue(r.JulianDate.now()),a=new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(-this._position.pitch),r.Math.toRadians(this._position.roll));this._model.orientation=r.Transforms.headingPitchRollQuaternion(s,a)}else this._model instanceof Promise&&this._model.then(s=>{s instanceof r.Model?r.Matrix4.multiply(s.modelMatrix,r.Matrix4.fromRotationTranslation(r.Matrix3.fromHeadingPitchRoll(i)),s.modelMatrix):s instanceof r.Cesium3DTileset&&r.Matrix4.multiply(s.root.transform,r.Matrix4.fromRotationTranslation(r.Matrix3.fromHeadingPitchRoll(i)),s.root.transform)})}_resetTranslation(e){r.Matrix4.setTranslation(this._modelMatrix,e,this._modelMatrix),this._model instanceof r.Entity?this._model.position=e:this._model instanceof Promise&&this._model.then(i=>{i instanceof r.Model?r.Matrix4.setTranslation(i.modelMatrix,e,i.modelMatrix):i instanceof r.Cesium3DTileset&&r.Matrix4.setTranslation(i.root.transform,e,i.root.transform)}),this._activeEditor.modelMatrix=this._modelMatrix,this._setLngLatAlt(this._modelMatrix)}_complete(){this._callback&&this._callback(this._position)}activate(e,i){if(!this._model)throw new Error("PositionEditor: no overlay");return this._translationEditor.active=!1,this._rotationEditor.active=!1,this._activeEditor=e===Wi.TRANSLATION?this._translationEditor:this._rotationEditor,this._setModelMatrix(),this._handler||this._bindEvent(),this._callback=i,this}deactivate(){return this._unbindEvent(),this._handler&&this._handler.destroy(),this._handler=void 0,this._translationEditor.active=!1,this._rotationEditor.active=!1,this._activeEditor=void 0,this._modelMatrix=void 0,this}},cu=Xn;var du=`/**\r
|
|
3490
|
+
`;var An=class{constructor(e){this._id=x.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._state=_.INITIALIZED}get type(){return"snow"}get enable(){return this._enable}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get speed(){return this._speed}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}_createPostProcessStage(){this._delegate=new r.PostProcessStage({name:this._id,fragmentShader:Op,uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._delegate)}},kp=An;var zp="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAQACAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EA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5GM+9VfJ2vjp9K05LhVGFdWqizNI2cUAV3jy3tTtgqUg96TaRQBFtq5AhxnOPbPNRbaRjgdjQBpxlyME0NEe1ZIlIPHFBmfruOaALksTHpzVNllzgUhuZf7xpFunHXBoAnVmXhwDTXEZ6AihLtByy/1pHuEY5HH1FAFchW6GjYAM7hSOd3QiqsoYUANuHX1rOYgnippM1XPWgD//1uPHWrEZqADmrMa0AWY2NTKxqOND/kVYERoAbuPtQWPpUnlGjyjQAxXx2FSfaWHYU3y2o8tqAFM5b7wz+FJ5uew/AUeW1L5TUAJ5p7Unmt707yjR5RoAYWJ5NL5jDpTvKNKIjQBFuY0pYnrUvkn1H60eV7/zoAh60lWPJH+QaBAPX9DQBBS1Y8hfX9DQIU9T+RoArEU3bV3yU9/ypwjjHUfoaAKGwilCn0rRAiHr+RqZZ414CfpQBlCJj2pPKb0rVMynsfyppkUjAB/KgDKIxTa0mVeyj8qZ5Q9KAKIAowK0BGPQUmwe35UAUgAOhqZX7frUvlD2o8laAEV/cGnbUblhz7Uxov7tM2yelAErRRt0OPwpi25z8rUgEnp+tJ+8/u0ATKzL3qQSt6/pVbL/AN39acN/ofzoAmNwR1H6Go2nbtj9aT5vQ0ZagBvnSe1J5jt1xT8Me36UbT6UAQnd6/rSYcd/1qx5Z9KNh9qAIlLDvSncepP0qTyzQIz7UAQFOOv60qqB3NTeWfajyj/kUARYFPDFehp3lH1FHlH1oATcT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q==";var Sn=class{constructor(e){this._id=x.uuid(),this._viewer=e,this._delegate=void 0,this._rotateAmount=0,this._enable=!1,this._heading=0,this._state=_.INITIALIZED}get type(){return"cloud"}get enable(){return this._enable}set enable(e){!this._viewer.scene.mode!==r.SceneMode.SCENE3D&&(this._delegate||this._createPrimitive(),this._enable=this._delegate.show=e,this._enable?this._viewer.scene.postUpdate.addEventListener(this._onRotate,this):this._viewer.scene.postUpdate.removeEventListener(this._onRotate,this))}get rotateAmount(){return this._rotateAmount}set rotateAmount(e){this._rotateAmount=e}_onRotate(e,i){this._rotateAmount!==0&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._delegate.modelMatrix=r.Transforms.headingPitchRollToFixedFrame(new r.Cartesian3,new r.HeadingPitchRoll(r.Math.toRadians(this._heading),0,0)))}_createPrimitive(){this._delegate=new r.Primitive({appearance:new r.EllipsoidSurfaceAppearance({material:new r.Material({fabric:{type:"Image",uniforms:{color:new r.Color(1,1,1,1),image:zp},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})}),this._delegate.geometryInstances=new r.GeometryInstance({geometry:new r.EllipsoidGeometry({vertexFormat:r.VertexFormat.POSITION_AND_ST,radii:this._viewer.scene.globe.ellipsoid.radii}),id:this._id}),this._delegate.show=this._enable,this._viewer.scene.primitives.add(this._delegate)}},Np=Sn;var In=class{constructor(e){if(!e)throw Error("missing viewer param");this._fog=new Lp(e),this._rain=new Rp(e),this._snow=new kp(e),this._cloud=new Np(e)}get fog(){return this._fog}get rain(){return this._rain}get snow(){return this._snow}get cloud(){return this._cloud}},pg=In;var Ln=class{constructor(e){this._viewer=e,this._enable=!1,this._moveRate=100,this._rotateRate=.01,this._flags={moveForward:!1,moveBackward:!1,moveUp:!1,moveDown:!1,moveLeft:!1,moveRight:!1,turnLeft:!1,turnRight:!1}}get enable(){return this._enable}set enable(e){this._enable!==e&&this._viewer.scene.mode===r.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}get moveRate(){return this._moveRate}set moveRate(e){this._moveRate=e}get rotateRate(){return this._rotateRate}set rotateRate(e){this._rotateRate=e}_bindEvent(){let e=this._viewer.scene.canvas;e.setAttribute("tabindex","0"),e.addEventListener("click",this._onClick.bind(this),!1),this._viewer.clock.onTick.addEventListener(this._onTick,this),document.addEventListener("keydown",this._onKeydown.bind(this),!1),document.addEventListener("keyup",this._onKeyup.bind(this),!1)}_unbindEvent(){Object.keys(this._flags).forEach(i=>{this._flags[i]=!1});let e=this._viewer.scene.canvas;e.removeAttribute("tabindex"),e.removeEventListener("click",this._onClick,!1),this._viewer.clock.onTick.removeEventListener(this._onTick,this),document.removeEventListener("keydown",this._onKeydown,!1),document.removeEventListener("keyup",this._onKeyup,!1)}_getFlagForKeyCode(e){let i;switch(e.keyCode){case 87:case 38:e.shiftKey?i="moveUp":i="moveForward";break;case 83:case 40:e.shiftKey?i="moveDown":i="moveBackward";break;case 65:case 37:i="moveLeft";break;case 68:case 39:i="moveRight";break;case 81:i="turnLeft";break;case 69:i="turnRight";break;default:break}return i}_onClick(){this._viewer.scene.canvas.focus()}_onKeydown(e){let i=this._getFlagForKeyCode(e);i&&(this._flags[i]=!0)}_onKeyup(e){Object.keys(this._flags).forEach(i=>{this._flags[i]=!1})}_onTick(){let e=this._viewer.scene.camera,s=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(e.position).height/this._moveRate,o=r.Cartesian3.clone(e.position,new r.Cartesian3);this._flags.moveForward&&e.moveForward(s),this._flags.moveBackward&&e.moveBackward(s),this._flags.moveUp&&e.moveUp(s),this._flags.moveDown&&e.moveDown(s),this._flags.moveLeft&&e.moveLeft(s),this._flags.moveRight&&e.moveRight(s),this._flags.turnLeft&&e.rotate(o,-this._rotateRate),this._flags.turnRight&&e.rotate(o,this._rotateRate)}},mg=Ln;var Dn=class{constructor(e){this._viewer=e,this._viewOption={},this._cache={},this._activedPath=void 0}_onPostRender(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(ue.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}addPath(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.fire(ue.ADD),this._cache[e.pathId]=e),this}addPaths(e){return Array.isArray(e)&&e.forEach(i=>{this.addPath(i)}),this}removePath(e){return e&&this._cache.hasOwnProperty(e.pathId)&&(delete this._cache[e.pathId],e.pathEvent.fire(ue.REMOVE)),this}getPath(e){let i=this.getPaths().filter(s=>s.id===e);return i&&i.length?i[0]:void 0}getPaths(){let e=[];return Object.keys(this._cache).forEach(i=>{e.push(this._cache[i])}),e}activate(e,i={}){var s;return!e||(e==null?void 0:e.pathId)===((s=this._activedPath)==null?void 0:s.pathId)||!this._cache.hasOwnProperty(e==null?void 0:e.pathId)?this:(this._viewOption=i,this._activedPath&&this.deactivate(),this._activedPath=e,this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(ue.RESET_TIME_LINE),this._viewer.on(W.POST_RENDER,this._onPostRender,this),this)}deactivate(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(W.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this}clear(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(W.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this}},ug=Dn;var Rn=class{constructor(e,i,s){this._id=x.uuid(),this._bid=void 0,this._positions=v.parsePositions(e),this._duration=i||20,this._pathMode=s||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=r.JulianDate.now(),this._pathEvent=new wr,this._pathEvent.on(ue.ADD,this._onAdd,this),this._pathEvent.on(ue.REMOVE,this._onRemove,this),this._pathEvent.on(ue.POST_RENDER,this._onPostRender,this),this._pathEvent.on(ue.RESET_TIME_LINE,this._resetTimeLine,this),this._state=_.INITIALIZED}get pathId(){return this._id}get id(){return this._bid}set id(e){this._bid=e}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e)}get duration(){return this._duration}set duration(e){this._duration=e}get pathMode(){return this._pathMode}set pathMode(e){this._pathMode=e}get pathEvent(){return this._pathEvent}get actived(){return this._actived}set actived(e){this._actived=e}get state(){return this._state}_onAdd(){this._state=_.ADDED}_onRemove(){this._state=_.REMOVED}_onPostRender({viewer:e,viewOption:i}){if(!this.actived)return!1;let s=r.JulianDate.now();if(r.JulianDate.lessThan(s,this._endTime)&&this._sampledPosition){let o=this._sampledPosition.getValue(s),a=this._sampledPosition.getValue(r.JulianDate.addSeconds(s,.001,new r.JulianDate));o&&a&&e.camera.lookAt(o,new r.HeadingPitchRange(Oe(o,a),r.Math.toRadians((i==null?void 0:i.pitch)||-20),(i==null?void 0:i.range)||2e3))}else e.camera.lookAtTransform(r.Matrix4.IDENTITY),this._actived=!1}_resetTimeLine(){if(!this._positions||!this._positions.length)return!1;let e=r.JulianDate.now(),i=0,s=[];if(this._pathMode==="speed"){let o=he(this._positions)/this._duration;s=this._positions.map((a,n,h)=>(n!==0&&(i+=he([h[n-1],a])/o),r.JulianDate.addSeconds(e,i,new r.JulianDate)))}else{let o=this._positions.length,a=(this._duration-this._duration%o)/o;s=this._positions.map((n,h)=>r.JulianDate.addSeconds(e,h*a,new r.JulianDate))}this._sampledPosition=new r.SampledPositionProperty,this._sampledPosition.addSamples(s,y.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=r.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:r.HermitePolynomialApproximation}),this._endTime=s[s.length-1],this._actived=!0}},fg=Rn;var _g={FP:"1",TP:"2",TRACKED:"tracked",FREE:"free"},Xe=_g;var On=class{constructor(e){this._viewer=e,this._cache={},this._delegete=new r.CustomDataSource("history-track-layer"),this._viewer.dataSources.add(this._delegete),this._activedTrack=void 0,this._viewOption={},this._stopTime=void 0,this._state=_.INITIALIZED}get delegate(){return this._delegete.entities}get state(){return this._state}_onPostRender(){Object.keys(this._cache).forEach(e=>{let i=this._cache[e];i.trackEvent&&i.trackEvent.fire(me.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}),this._viewer.scene.requestRender()}addTrack(e){return e&&e.trackEvent&&!this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(me.ADD,this),this._cache[e.trackId]=e),this}addTracks(e){return Array.isArray(e)&&e.forEach(i=>{this.addTrack(i)}),this}getTrack(e){let i=this.getTracks().filter(s=>s.id===e);return i&&i.length?i[0]:void 0}removeTrack(e){return e&&e.trackEvent&&this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(me.REMOVE,this),delete this._cache[e.trackId]),this}getTracks(){let e=[];return Object.keys(this._cache).forEach(i=>{e.push(this._cache[i])}),e}play(){let e=r.JulianDate.now();return Object.keys(this._cache).forEach(i=>{let s=this._cache[i];s.startTime=e,s.viewed=!1}),this._activedTrack=void 0,this._stopTime=void 0,this._viewer.off(W.POST_RENDER,this._onPostRender,this),this._viewer.on(W.POST_RENDER,this._onPostRender,this),this._state=_.PLAY,this}pause(){return this._stopTime=r.JulianDate.now(),this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this._viewer.off(W.POST_RENDER,this._onPostRender,this),this._state=_.PAUSE,this}restore(){if(this._state!==_.PAUSE)return this;if(this._stopTime){let e=r.JulianDate.now();Object.keys(this._cache).forEach(i=>{this._cache[i].trackEvent.fire(me.RESET_TIME_LINE,{stopTime:this._stopTime,duration:r.JulianDate.secondsDifference(e,this._stopTime)})})}return this._viewer.off(W.POST_RENDER,this._onPostRender,this),this._viewer.on(W.POST_RENDER,this._onPostRender,this),this._state=_.PLAY,this}viewTrack(e,i={}){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return this._viewOption=i,this._activedTrack&&(this._activedTrack.viewed=!1),e.viewed=!0,this._activedTrack=e,i.mode===Xe.FREE&&(this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0),this}releaseTrack(e){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return e.viewed&&(e.viewed=!1),this._activedTrack=void 0,this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}clear(){return Object.keys(this._cache).forEach(e=>{this.removeTrack(this._cache[e])}),this._activedTrack&&(this._activedTrack.viewed=!1),this._activedTrack=void 0,this._viewer.off(W.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(r.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}},gg=On;var yg={clampToGround:!1,clampToTileset:!1,interpolationType:"Linear",interpolationDegree:2,endDelayTime:.5,headingOffset:0},vg={width:2,material:r.Color.ORANGE,clampToGround:!0,depthFailMaterial:r.Color.ORANGE.withAlpha(.8)},kn=class{constructor(e,i,s,o){this._id=x.uuid(),this._bid=void 0,this._positions=v.parsePositions(e),this._duration=i||20,this._callback=s,this._options={...yg,...o},this._controller=void 0,this._sampledPosition=void 0,this._velocityOrientation=void 0,this._viewed=!1,this._delegate=new r.Entity,this._pathPositions=[],this._path=new r.Entity({show:!1,polyline:{positions:new r.CallbackProperty(()=>this._pathPositions,!1)}}),this._positionIndex=0,this._timeLine=[],this._startTime=void 0,this._endTime=void 0,this._trackEvent=new yr,this._trackEvent.on(me.POST_RENDER,this._onPostRender,this),this._trackEvent.on(me.ADD,this._onAdd,this),this._trackEvent.on(me.REMOVE,this._onRemove,this),this._trackEvent.on(me.RESET_TIME_LINE,this._resetTimeLine,this),this._state=_.INITIALIZED}get currentDistance(){return he(v.parsePositions(this._pathPositions))}get currentPosition(){let[e]=this._pathPositions.slice(-1);return v.parsePosition(e)}get allDistance(){return he(this._positions)}get trackId(){return this._id}get id(){return this._bid}set id(e){this._bid=e}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._resetTimeLine({})}get duration(){return this._duration}set duration(e){this._duration=e,this._resetTimeLine({})}get startTime(){return this._startTime}set startTime(e){e instanceof Date?this._startTime=r.JulianDate.fromDate(e):this._startTime=e,this._resetTimeLine({})}get viewed(){return this._viewed}set viewed(e){this._viewed=e}get trackEvent(){return this._trackEvent}get state(){return this._state}_onAdd(e){if(!e)return!1;this._controller=e,this._controller.delegate.add(this._delegate),this._controller.delegate.add(this._path),!this._startTime&&(this._startTime=r.JulianDate.now()),this._state=_.ADDED}_onRemove(){if(!this._controller)return!1;this._controller.delegate.remove(this._delegate),this._controller.delegate.remove(this._path),this._viewed=!1,this._startTime=void 0,this._state=_.REMOVED}_onPostRender({viewer:e,viewOption:i}){if(!this._startTime||!this._endTime)return!1;let s=r.JulianDate.now();if(r.JulianDate.lessThanOrEquals(s,this._endTime)){let o=this._sampledPosition.getValue(s);if(!o)return!1;this._pathPositions.push(o),this._options.clampToTileset?this._delegate.position=e.scene.clampToHeight(o,[this._delegate]):this._delegate.position=o;let a=this._velocityOrientation.getValue(s);if(a){let h=r.Quaternion.fromHeadingPitchRoll(new r.HeadingPitchRoll(r.Math.toRadians(this._options.headingOffset||0),0,0),new r.Quaternion);this._delegate.orientation=r.Quaternion.multiply(a,h,new r.Quaternion)}let n=this._timeLine[this._positionIndex];if(n){let h=r.JulianDate.secondsDifference(s,n);if(h>=0&&h<=1){let c=this._positions[this._positionIndex]||void 0;if(c&&a){let d=r.Matrix3.fromQuaternion(a),p=r.Matrix4.fromRotationTranslation(d,o),f=r.Transforms.fixedFrameToHeadingPitchRoll(p);c.heading=r.Math.toDegrees(f.heading),c.pitch=r.Math.toDegrees(f.pitch),c.roll=r.Math.toDegrees(f.roll)}this._callback&&this._callback(c,this._positionIndex+1===this._positions.length),this._positionIndex++,this._options.loop&&this._positionIndex===this._positions.length&&this._restart()}}}this._setCameraView(e,i)}_restart(){this._startTime=r.JulianDate.now(),this._resetTimeLine({})}_setCameraView(e,i){var o,a,n;if(!this._viewed)return!1;let s=r.JulianDate.now();if(r.JulianDate.greaterThan(s,this._endTime))e.camera.lookAtTransform(r.Matrix4.IDENTITY),e.delegate.trackedEntity&&(e.delegate.trackedEntity=void 0),this._viewed=!1;else{let h=this._sampledPosition.getValue(s),c=this._sampledPosition.getValue(r.JulianDate.addSeconds(s,1/60,new r.JulianDate));h&&c&&((i==null?void 0:i.mode)===Xe.TRACKED&&((a=(o=e.delegate)==null?void 0:o.trackedEntity)==null?void 0:a.id)!==((n=this._delegate)==null?void 0:n.id)?e.delegate.trackedEntity=this._delegate:(i==null?void 0:i.mode)===Xe.FP?e.camera.lookAt(h,new r.HeadingPitchRange(Oe(h,c),r.Math.toRadians((i==null?void 0:i.pitch)||0),(i==null?void 0:i.range)||10)):(i==null?void 0:i.mode)===Xe.TP&&e.camera.lookAt(h,new r.HeadingPitchRange(0,r.Math.toRadians((i==null?void 0:i.pitch)||-90),(i==null?void 0:i.range)||1e3)))}}_resetTimeLine(e){var s;if(!this._startTime||!this._duration||!((s=this._positions)!=null&&s.length))return!1;let i=0;if(!(e!=null&&e.stopTime)&&!(e!=null&&e.duration)){let o=he(this._positions)/this._duration;this._timeLine=this._positions.map((a,n,h)=>(n!==0&&(i+=he([h[n-1],a])/o),r.JulianDate.addSeconds(this._startTime,i,new r.JulianDate))),this._pathPositions=[],this._positionIndex=0}else e!=null&&e.stopTime&&(e!=null&&e.duration)&&(this._duration+=e.duration,this._timeLine=this._timeLine.map(o=>r.JulianDate.addSeconds(o,e.duration,new r.JulianDate)));this._sampledPosition=new r.SampledPositionProperty,this._sampledPosition.addSamples(this._timeLine,y.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=r.ExtrapolationType.HOLD,this._options.interpolationType==="Hermite"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||2,interpolationAlgorithm:r.HermitePolynomialApproximation}):this._options.interpolationType==="Linear"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||1,interpolationAlgorithm:r.LinearApproximation}):this._options.interpolationType==="Lagrange"&&this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||5,interpolationAlgorithm:r.LagrangePolynomialApproximation}),this._velocityOrientation=new r.VelocityOrientationProperty(this._sampledPosition),this._endTime=r.JulianDate.addSeconds(this._timeLine[this._timeLine.length-1],this._options.endDelayTime,new r.JulianDate)}addPosition(e,i){return this._positions.push(v.parsePosition(e)),this._duration+=i,this._resetTimeLine({}),this}setModel(e,i){return this._delegate.model={...i,uri:e,heightReference:this._options.clampToGround?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},this}setBillboard(e,i){return this._delegate.billboard={...i,image:e,heightReference:this._options.clampToGround?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},this}setLabel(e,i){return this._delegate.label={...i,text:e,heightReference:this._options.clampToGround?r.HeightReference.CLAMP_TO_GROUND:r.HeightReference.NONE},this}setPath(e,i={}){return this._path.show=!!e,x.merge(this._path.polyline,vg,i),this}},wg=kn;var Cg={ANGLE:"angle",AREA:"area",AREA_HEIGHT:"area_height",AREA_SURFACE:"area_surface",DISTANCE:"distance",DISTANCE_SURFACE:"distance_surface",HEADING:"heading",HEIGHT:"height",TRIANGLE_HEIGHT:"triangle_height"},Ce=Cg;var zn=class{constructor(e){this._style=e,this._viewer=void 0,this._layer=void 0,this._delegate=void 0,this._options={},this._positions=[]}get drawTool(){return this._viewer.drawTool}_mountedHook(){}_onDrawAnchor(e){}_onAnchorMoving(e){this._positions.pop(),this._positions.push(e),this._options.onCalc&&this._options.onCalc(this._positions),this._positions.length<=1?this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236":this.drawTool.tooltipMess="\u5355\u51FB\u589E\u52A0\u70B9\uFF0C\u53F3\u51FB\u5220\u9664\u70B9\uFF0C\u53CC\u51FB\u5B8C\u6210\u7ED8\u5236"}_onDeleteAnchor(){this._positions.length>1&&(this._positions.splice(this._positions.length-2,1),this._options.onCalc&&this._options.onCalc(this._positions)),this._positions.length<=1&&(this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236")}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._removeSamePoint(this._positions),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_removeSamePoint(e=[]){if(e.length<2)return e;for(let i=0;i<e.length-1;i++){let s=e[i],o=e[i+1];typeof s.equals=="function"&&s.equals(o)&&(e.splice(i,1),i--)}return e}_bindEvent(){this.drawTool.on(b.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(b.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(b.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.on(b.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(b.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(b.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(b.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.off(b.DRAW_STOP,this._onDrawStop,this)}start(e,i){return this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(i),this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236",this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},ki=zn;var Nn=class extends ki{constructor(e){super(e)}_mountedHook(){this._delegate=new r.Entity({polyline:{...this._style,positions:new r.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let i=this._positions.length;this._positions.push(e),i>0&&this.drawTool.fire(b.CREATE_ANCHOR,{position:e}),i>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(b.DRAW_STOP,e))}},_e=Nn;var Fn=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._delegate=new r.Entity,this._delegate.merge(e),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_mountAnchor(){}_onAnchorMoving({pickedAnchor:e,position:i}){}_onEditAnchorStop({pickedAnchor:e,position:i}){}_onEditStop({pickedAnchor:e,position:i}){this._unbindEvent(),this._viewer.editTool.deactivate()}_bindEvent(){return this.editTool.on(b.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(b.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(b.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(b.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(b.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(b.EDIT_STOP,this._onEditStop,this)}start(e,i){return this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._viewer.editTool.deactivate(),this._viewer.editTool.activate(i),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}},zi=Fn;var Wn=class extends zi{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polyline.positions=new r.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polyline.positions.getValue(r.JulianDate.now()));if(this._options.maxAnchorSize>2){for(let i=0;i<e.length-1;i++){let s=Y(e[i],e[i+1]);this._positions.push(e[i]),this._positions.push(s)}this._positions.push(e[e.length-1]),this._positions.forEach((i,s)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:i,index:s,isMid:s%2!==0})})}else this._positions=e,this._positions.forEach((i,s)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:i,index:s})});this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),o=s.index;if(s.isMid){let a=Y(this._positions[o],this._positions[o-1]),n=Y(this._positions[o],this._positions[o+1]);this._positions.splice(o,1,a,i,n),this.editTool.fire(b.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),o=s.index;if(this._positions[o]=i,!s.isMid&&this._options.maxAnchorSize>2){let a=-1,n=-1,h=-1,c=-1,d=this._positions.length;if(o===0?(h=o+2,c=o+1):s.index===d-1?(a=o-2,n=o-1):(a=o-2,n=o-1,h=o+2,c=o+1),a>0){let p=Y(this._positions[a],this._positions[o]);this._positions[n]=p,this.editTool.fire(b.UPDATE_ANCHOR,{index:n,position:p})}if(h>0){let p=Y(this._positions[h],this._positions[o]);this._positions[c]=p,this.editTool.fire(b.UPDATE_ANCHOR,{index:c,position:p})}}this._options.onCalc&&this._options.onCalc(this._positions)}},ge=Wn;var Gn=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new r.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,i=!1){let s=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof r.EllipsoidTerrainProvider)?r.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(a=>r.Cartographic.fromCartesian(a))):Promise.resolve(e.map(a=>r.Cartographic.fromCartesian(a))),o=this._viewer.scene.clampToHeightSupported&&i?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([s,o])}_onDrawStop(e){}_onCalc(e){}_startHook(e,i){this._viewer=e.viewer,this._layer=e.layer,this._options=i,this._options.onDrawStop=this._onDrawStop.bind(this),this._options.onCalc=this._onCalc.bind(this),this._layer.entities.add(this._startLabel),this._layer.entities.add(this._resultLabel)}start(e,i){return this}},ie=Gn;var Hn=class extends ie{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new r.Entity({polyline:{positions:new r.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ge(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let i=r.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new r.Cartesian3),s=r.Plane.fromPointNormal(e[0],i);this._helpLinePositions=[e[0],r.Plane.projectPointOntoPlane(s,e[1],new r.Cartesian3),e[1]];let o=Math.abs(r.Plane.getPointDistance(s,e[1]));this._resultLabel.label.text=`\u89D2\u5EA6\uFF1A${r.Math.toDegrees(Math.asin(o/r.Cartesian3.distance(e[0],e[1]))).toFixed(2)} \u5EA6`}}start(e,i){this._startHook(e,i);let s=new r.PolylineDashMaterialProperty({color:r.Color.GREENYELLOW});return this._helpLine.polyline.material=s,this._helpLine.polyline.depthFailMaterial=s,this._layer.entities.add(this._helpLine),new _e({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2,clampToGround:!1}).start(e,{...i,maxAnchorSize:this._maxAnchorSize}),this}},Fp=Hn;var Bn=class extends ki{constructor(e){super(e)}_mountedHook(){this._delegate=new r.Entity({polygon:{...this._style,hierarchy:new r.CallbackProperty(()=>this._positions.length>2?new r.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)},polyline:{...this._style,positions:new r.CallbackProperty(()=>this._positions.length<=3?this._positions:null,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(b.CREATE_ANCHOR,{position:e})}},ot=Bn;var Un=class extends zi{constructor(e){super(e)}_mountedHook(){this.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._delegate.polygon.hierarchy=new r.CallbackProperty(e=>this._positions.length>2?new r.PolygonHierarchy(this._positions):null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polygon.hierarchy.getValue(r.JulianDate.now()).positions);e.push(e[0]);for(let i=0;i<e.length-1;i++){let s=Y(e[i],e[i+1]);this._positions.push(e[i]),this._positions.push(s)}this._positions.forEach((i,s)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:i,index:s,isMid:s%2!==0})}),this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),o=s.index;if(s.isMid){let a,n,h=this._positions.length;o===h-1?(a=Y(this._positions[o],this._positions[o-1]),n=Y(this._positions[o],this._positions[0])):(a=Y(this._positions[o],this._positions[o-1]),n=Y(this._positions[o],this._positions[o+1])),this._positions.splice(o,1,a,i,n),this.editTool.fire(b.CLEAR_ANCHOR),this._positions.forEach((c,d)=>{this.editTool.fire(b.CREATE_ANCHOR,{position:c,index:d,isMid:d%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:i}){let s=e.properties.getValue(r.JulianDate.now()),o=s.index;this._positions[o]=i;let a=this._positions.length;if(!s.isMid){let n=-1,h=-1,c=-1,d=-1;o===0?(n=a-2,h=a-1,c=o+2,d=o+1):o===a-2?(n=o-2,h=o-1,c=0,d=a-1):(n=o-2,h=o-1,c=o+2,d=o+1);let p=Y(this._positions[n],this._positions[o]),f=Y(this._positions[c],this._positions[o]);this._positions[h]=p,this._positions[d]=f,this.editTool.fire(b.UPDATE_ANCHOR,{index:h,position:p}),this.editTool.fire(b.UPDATE_ANCHOR,{index:d,position:f})}this._options.onCalc&&this._options.onCalc(this._positions)}},at=Un;var Vn=class extends ie{constructor(){super()}_onDrawStop(e){new at(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var i;e.length>2?(this._resultLabel.position=(i=r.BoundingSphere.fromPoints(e))==null?void 0:i.center,this._resultLabel.label.text=`\u9762\u79EF\uFF1A${De(e).toFixed(2)} \u5E73\u65B9\u7C73`):this._resultLabel.label.text=null}start(e,i){return this._startHook(e,i),new ot({material:i.material||r.Color.YELLOW.withAlpha(.6),perPositionHeight:!0,width:2}).start(e,this._options),this}},Wp=Vn;var Zn=class extends ie{constructor(){super()}_onDrawStop(e){new at(e).start({viewer:this._viewer,layer:this._layer},this._options)}_lerp(e,i=4){let s=[];for(let o=0;o<i;++o)for(let a=0;a<i;++a){let n=r.Math.lerp(e.west,e.east,a/(i-1)),h=r.Math.lerp(e.south,e.north,o/(i-1));s.push(r.Cartesian3.fromRadians(n,h))}return s}_onCalc(e){if(e.length>2){let i=this._lerp(r.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(i,!0).then(([s,o])=>s.map((a,n)=>({lng:a.longitude,lat:a.latitude,alt:Math.max(a.height||0,o[n]?r.Cartographic.fromCartesian(o[n]).height:0)}))).then(s=>{let o=0,a;s.forEach(n=>{n.alt>o&&(o=n.alt,a=n)}),a&&(this._resultLabel.position=r.Cartesian3.fromRadians(a.lng,a.lat,a.alt),this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${o.toFixed(2)} \u7C73`)})}}start(e,i){return this._startHook(e,i),new ot({material:i.material||r.Color.YELLOW.withAlpha(.6),width:2}).start(e,this._options),this}},Gp=Zn;var jn=class extends ie{constructor(){super()}_lerp(e,i=4){let s=[];for(let o=0;o<i;++o)for(let a=0;a<i;++a){let n=r.Math.lerp(e.west,e.east,a/(i-1)),h=r.Math.lerp(e.south,e.north,o/(i-1));s.push(r.Cartesian3.fromRadians(n,h))}return s}_onDrawStop(e){new at(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var i;if(e.length>2){this._resultLabel.position=(i=r.BoundingSphere.fromPoints(e))==null?void 0:i.center;let s=this._lerp(r.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(s.concat(e),!1).then(([o])=>o.map(a=>r.Cartesian3.fromDegrees(r.Math.toDegrees(a.longitude),r.Math.toDegrees(a.latitude),a.height))).then(o=>{this._resultLabel.label.text=`\u9762\u79EF\uFF1A${De(o).toFixed(2)} \u5E73\u65B9\u7C73`})}}start(e,i){return this._startHook(e,i),new ot({material:i.material||r.Color.YELLOW.withAlpha(.6),width:2}).start(e,this._options),this}},Hp=jn;var Yn=class extends ie{constructor(){super(),this._maxAnchorSize=9999,this._positions=[]}_onDrawStop(e){for(let i=0;i<this._positions.length-2;i++)this._layer.entities.add(this.createLabel(this._positions[i],this._positions[i+1]));new ge(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[e.length-1];let i=0;for(let s=0;s<e.length-1;s++){let o=r.Cartesian3.distance(e[s],e[s+1]);i+=o}this._resultLabel.label.text=i>1e3?`\u603B\u8DDD\u79BB\uFF1A${(i/1e3).toFixed(2)} \u516C\u91CC`:`\u603B\u8DDD\u79BB\uFF1A${i.toFixed(2)} \u7C73`}else this._resultLabel.label.text=null;this._positions=e}createLabel(e,i){let s=r.Cartesian3.distance(e,i),o=r.Cartesian3.lerp(e,i,.5,new r.Cartesian3),a=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}});return a.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`,a.position=o,a}start(e,i){return this._startHook(e,i),new _e({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2,clampToGround:!1}).start(e,{...i,maxAnchorSize:this._maxAnchorSize}),this}},Bp=Yn;var qn=class extends ie{constructor(){super(),this._maxAnchorSize=9999,this._positions=[]}_lerp(e,i,s=5){let o=[],a=r.Cartographic.fromCartesian(e),n=r.Cartographic.fromCartesian(i);for(let h=0;h<s;h++){let c=r.Math.lerp(a.longitude,n.longitude,h/s),d=r.Math.lerp(a.latitude,n.latitude,h/s),p=a.height-(a.height-n.height)*(h/s);o.push(r.Cartesian3.fromRadians(c,d,p))}return o}_onDrawStop(e){for(let i=0;i<this._positions.length-2;i++)this._layer.entities.add(this.createLabel(this._positions[i],this._positions[i+1]));new ge(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let i=[e[0]];this._resultLabel.position=e[e.length-1];for(let s=0;s<e.length-1;s++)i=i.concat(this._lerp(e[s],e[s+1],this._options.lerpNum));i.push(e[e.length-1]),this._getSampledHeight(i).then(([s,o])=>s.map((a,n)=>r.Cartesian3.fromDegrees(r.Math.toDegrees(a.longitude),r.Math.toDegrees(a.latitude),Math.max(a.height||0,o[n]?r.Cartographic.fromCartesian(o[n]).height:0)))).then(s=>{let o=0;for(let a=0;a<s.length-1;a++){let n=r.Cartesian3.distance(s[a],s[a+1]);o+=n}this._resultLabel.label.text=o>1e3?`\u603B\u8DDD\u79BB\uFF1A${(o/1e3).toFixed(2)} \u516C\u91CC`:`\u603B\u8DDD\u79BB\uFF1A${o.toFixed(2)} \u7C73`})}else this._resultLabel.label.text=null;this._positions=e}createLabel(e,i){let s=r.Cartesian3.distance(e,i),o=r.Cartesian3.lerp(e,i,.5,new r.Cartesian3),a=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}});return a.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`,a.position=o,a}start(e,i){return this._startHook(e,i),new _e({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Up=qn;var Xn=class extends ie{constructor(){super(),this._maxAnchorSize=2}_onDrawStop(e){new ge(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){e.length>0&&(this._startLabel.position=e[0]),e.length>1&&(this._resultLabel.position=e[e.length-1],this._resultLabel.label.text=`\u504F\u822A\uFF1A${r.Math.toDegrees(Oe(e[0],e[1])).toFixed(1)} \u5EA6`)}start(e,i){return this._startHook(e,i),new _e({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Vp=Xn;var Jn=class extends ie{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new r.Entity({polyline:{positions:new r.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ge(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){this._resultLabel.position=e[1];let i=r.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new r.Cartesian3),s=r.Plane.fromPointNormal(e[0],i);this._helpLinePositions=[e[0],r.Plane.projectPointOntoPlane(s,e[1],new r.Cartesian3),e[1]];let o=Math.abs(r.Plane.getPointDistance(s,e[1]));this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${o.toFixed(2)} \u7C73`}}start(e,i){this._startHook(e,i);let s=new r.PolylineDashMaterialProperty({color:r.Color.GREENYELLOW});return this._helpLine.polyline.material=s,this._helpLine.polyline.depthFailMaterial=s,this._layer.entities.add(this._helpLine),new _e({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Zp=Jn;var Qn=class extends ie{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new r.Entity({polyline:{positions:new r.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}}),this._lengthLabel=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._heightLabel=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._distanceLabel=new r.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}})}_onDrawStop(e){new ge(e).start({viewer:this._viewer,layer:this._layer},{...this._options,maxAnchorSize:this._maxAnchorSize})}_onCalc(e){if(e.length>0&&(this._startLabel.position=e[0]),e.length>1){let i=r.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new r.Cartesian3),s=r.Plane.fromPointNormal(e[0],i),o=r.Plane.projectPointOntoPlane(s,e[1],new r.Cartesian3);this._helpLinePositions=[e[0],o,e[1]];let a=r.Cartesian3.distance(e[0],o),n=Math.abs(r.Plane.getPointDistance(s,e[1])),h=r.Cartesian3.distance(e[0],e[1]);this._lengthLabel.position=r.Cartesian3.midpoint(e[0],o,new r.Cartesian3),this._lengthLabel.label.text=a>1e3?`${(a/1e3).toFixed(2)} \u516C\u91CC`:`${a.toFixed(2)} \u7C73`,this._distanceLabel.position=r.Cartesian3.midpoint(e[0],e[1],new r.Cartesian3),this._distanceLabel.label.text=h>1e3?`${(h/1e3).toFixed(2)} \u516C\u91CC`:`${h.toFixed(2)} \u7C73`,this._heightLabel.position=r.Cartesian3.midpoint(o,e[1],new r.Cartesian3),this._heightLabel.label.text=n>1e3?`${(n/1e3).toFixed(2)} \u516C\u91CC`:`${n.toFixed(2)} \u7C73`}}start(e,i){this._startHook(e,i);let s=new r.PolylineDashMaterialProperty({color:r.Color.GREENYELLOW});return this._helpLine.polyline.material=s,this._helpLine.polyline.depthFailMaterial=s,this._layer.entities.add(this._helpLine),this._layer.entities.add(this._lengthLabel),this._layer.entities.add(this._heightLabel),this._layer.entities.add(this._distanceLabel),new _e({material:i.material||r.Color.YELLOW.withAlpha(.6),depthFailMaterial:i.depthFailMaterial||new r.PolylineDashMaterialProperty({color:r.Color.YELLOW.withAlpha(.6)}),width:i.width||2,clampToGround:!1}).start(e,{...i,maxAnchorSize:this._maxAnchorSize}),this}},jp=Qn;var Kn=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new r.CustomDataSource("measure-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}angle(e={}){return new Fp().start(this,e),this}area(e={}){return new Wp().start(this,e),this}areaHeight(e={}){return new Gp().start(this,e),this}areaSurface(e={}){return new Hp().start(this,e),this}distance(e={}){return new Bp().start(this,e),this}distanceSurface(e={}){return new Up().start(this,e),this}heading(e={}){return new Vp().start(this,e),this}height(e={}){return new Zp().start(this,e),this}triangleHeight(e={}){return new jp().start(this,e),this}activate(e,i){switch(e){case Ce.ANGLE:this.angle(i);break;case Ce.AREA:this.area(i);break;case Ce.AREA_HEIGHT:this.areaHeight(i);break;case Ce.AREA_SURFACE:this.areaSurface(i);break;case Ce.DISTANCE:this.distance(i);break;case Ce.DISTANCE_SURFACE:this.distanceSurface(i);break;case Ce.HEADING:this.heading(i);break;case Ce.HEIGHT:this.height(i);break;case Ce.TRIANGLE_HEIGHT:this.triangleHeight(i);break;default:break}return this}deactivate(){return this._layer.entities.removeAll(),this._viewer.drawTool.tooltipMess="",this._viewer.drawTool.deactivate(),this._viewer.editTool.tooltipMess="",this._viewer.editTool.deactivate(),this}},xg=Kn;var Tg={depthFail:!0,width:10,arrow:!1},$n=class{constructor(e,i={}){this._delegate=void 0,this._positions=[],this._options={...Tg,...i},this._color=this._options.color,this._positions=e.slice(),this._options.loop&&this._positions.push(e[0]),this._boundingSphere=r.BoundingSphere.fromPoints(this._positions),this._transformedBoundingSphere=r.BoundingSphere.clone(this._boundingSphere),this._modelMatrix=r.Matrix4.clone(r.Matrix4.IDENTITY),this._active=!1,this._show=!1,this._update=!0}get show(){return this._show}set show(e){return this._show=e,this}get active(){return this._active}set active(e){return this._active=e,this._color=e?r.Color.YELLOW:this._options.color,this._update=!0,this}get positions(){return this._positions}set positions(e){return this._positions=e.slice(),this._options.loop&&this._positions.push(e[0]),this}get modelMatrix(){return this._modelMatrix}set modelMatrix(e){return r.Matrix4.equalsEpsilon(e,this._modelMatrix,r.Math.EPSILON10)?this:(r.Matrix4.clone(e,this._modelMatrix),this._update=!0,this)}get boundingVolume(){return this._transformedBoundingSphere}update(e){if(this._show){if(this._update){this._update=!1,this._delegate=this._delegate&&this._delegate.destroy();let i=this._color,s=i.withAlpha(.3),o,a;this._options.arrow?(o=new r.PolylineMaterialAppearance({material:r.Material.fromType(r.Material.PolylineArrowType,{color:i})}),this._options.depthFail&&(a=new r.PolylineMaterialAppearance({material:r.Material.fromType(r.Material.PolylineArrowType,{color:s})}))):(o=new r.PolylineColorAppearance({translucent:i.alpha!==1}),this._options.depthFail&&(a=new r.PolylineColorAppearance({translucent:s.alpha!==1})));let n=new r.PolylineGeometry({positions:this._positions,width:this._options.width,vertexFormat:r.PolylineMaterialAppearance.VERTEX_FORMAT,arcType:r.ArcType.NONE});this._delegate=new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:n,attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(i),depthFailColor:r.ColorGeometryInstanceAttribute.fromColor(s)},id:this._options.id,modelMatrix:this._modelMatrix}),appearance:o,depthFailAppearance:a,asynchronous:!1}),this._transformedBoundingSphere=r.BoundingSphere.transform(this._boundingSphere,this._modelMatrix,this._transformedBoundingSphere)}this._delegate.update(e)}}isDestroyed(){return!1}destroy(){return this._delegate=this._delegate&&this._delegate.destroy(),r.destroyObject(this)}},Ni=$n;var el={X:r.Cartesian3.UNIT_X,Y:r.Cartesian3.UNIT_Y,Z:r.Cartesian3.UNIT_Z},tl=class{constructor(e,i={}){this._viewer=e,this._options=i,this._modelMatrix=void 0,this._active=!1,this._activeAxis=void 0,this._fixedFrame=void 0,this._offset=new r.Cartesian3,this._pickingPlane=new r.Plane(r.Cartesian3.UNIT_X,0),this._axisX=this._createAxisLine("X",r.Color.RED),this._axisY=this._createAxisLine("Y",r.Color.GREEN),this._axisZ=this._createAxisLine("Z",r.Color.BLUE),this.resetTranslation=void 0,this.complete=void 0}set modelMatrix(e){return this._modelMatrix=e,this.update(),this}get active(){return this._active}set active(e){return this._active=e,this._axisX.show=this._active,this._axisY.show=this._active,this._axisZ.show=this._active,this}get modelTranslation(){return r.Matrix4.getTranslation(this._modelMatrix,new r.Cartesian3)}_createAxisLine(e,i){return this._viewer.scene.primitives.add(new Ni([r.Cartesian3.ZERO,el[e]],{id:"position-editor-"+e,arrow:this._options.arrow,color:i,depthFail:this._options.depthFail}))}handleLeftDown(e){console.log("handleLeftDown",e);let i=this._viewer.scene,s=i.camera,o=i.drillPick(e.position)||[];console.log(2);for(let h=0;h<o.length;h++){let c=o[h];if(c.id&&c.id==="position-editor-X"){this._activeAxis="X",this._axisX.active=!0;break}else if(c.id&&c.id==="position-editor-Y"){this._activeAxis="Y",this._axisY.active=!0;break}else if(c.id&&c.id==="position-editor-Z"){this._activeAxis="Z",this._axisZ.active=!0;break}console.log(3)}if(!this._activeAxis)return;console.log(4),this._viewer.canvas.style.cursor="pointer";let a=r.Matrix4.multiplyByPointAsVector(this._fixedFrame,el[this._activeAxis],new r.Cartesian3),n=new r.Cartesian3;Math.abs(r.Cartesian3.dot(s.upWC,a)>.7)?n=r.Cartesian3.cross(s.rightWC,a,n):n=r.Cartesian3.cross(s.upWC,a,n),r.Cartesian3.normalize(n,n),r.Plane.fromPointNormal(this.modelTranslation,n,this._pickingPlane),r.IntersectionTests.rayPlane(s.getPickRay(e.position),this._pickingPlane,this._offset),r.Cartesian3.subtract(this._offset,this.modelTranslation,this._offset),i.screenSpaceCameraController.enableInputs=!1,console.log(5)}handleMouseMove(e){if(!this._activeAxis)return;let i=this._viewer.scene.camera,s=new r.Cartesian3,o=r.IntersectionTests.rayPlane(i.getPickRay(e.endPosition),this._pickingPlane,new r.Cartesian3);if(!o)return;let a=r.Cartesian3.subtract(o,this.modelTranslation,new r.Cartesian3),n=r.Matrix4.multiplyByPointAsVector(this._fixedFrame,el[this._activeAxis],new r.Cartesian3);r.Cartesian3.projectVector(a,n,a),r.Cartesian3.projectVector(this._offset,n,s),r.Cartesian3.subtract(a,s,a);let h=r.Cartesian3.add(this.modelTranslation,a,new r.Cartesian3);this.resetTranslation&&this.resetTranslation(h)}handleLeftUp(e){this._viewer.canvas.style.cursor="default",this._activeAxis=void 0,this._axisX.active=!1,this._axisY.active=!1,this._axisZ.active=!1,this._viewer.scene.screenSpaceCameraController.enableInputs=!0,this.complete&&this.complete()}update(){let e=5*this._options.axisLineScale;this._fixedFrame=r.Transforms.eastNorthUpToFixedFrame(this.modelTranslation);let i=r.Matrix4.multiplyByUniformScale(this._fixedFrame,e,new r.Matrix4);this._axisX.modelMatrix=i,this._axisY.modelMatrix=i,this._axisZ.modelMatrix=i}isDestroyed(){return!1}destroy(){this.active=!1;let e=this._viewer.scene;e.primitives.remove(this._axisX),e.primitives.remove(this._axisY),e.primitives.remove(this._axisZ),r.destroyObject(this)}},Yp=tl;var qp={X:r.Cartesian3.UNIT_X,Y:r.Cartesian3.UNIT_Y,Z:r.Cartesian3.UNIT_Z},il=class{constructor(e,i={}){this._viewer=e,this._options=i,this._modelMatrix=void 0,this._active=!1,this._activeAxis=void 0,this._rotationStartPoint=new r.Cartesian3,this._rotationPlane=new r.Plane(r.Cartesian3.UNIT_X,0);let s=this._getUnitCirclePositions();this._axisX=this._createAxisLine("X",s.x,r.Color.RED),this._axisY=this._createAxisLine("Y",s.y,r.Color.GREEN),this._axisZ=this._createAxisLine("Z",s.z,r.Color.BLUE),this.resetRotation=void 0,this.complete=void 0}set modelMatrix(e){console.log(e),this._modelMatrix=e,this.update()}get active(){return this._active}set active(e){return this._active=e,this._axisX.show=e,this._axisY.show=e,this._axisZ.show=e,this}get modelTranslation(){return r.Matrix4.getTranslation(this._modelMatrix,new r.Cartesian3)}_getUnitCirclePositions(){let e=[],i=[],s=[];for(let o=0;o<360;o++){let a=r.Math.toRadians(o),n=Math.cos(a),h=Math.sin(a);e.push(new r.Cartesian3(0,n,h)),i.push(new r.Cartesian3(h,0,n)),s.push(new r.Cartesian3(n,h,0))}return{x:e,y:i,z:s}}_createAxisLine(e,i,s){return this._viewer.scene.primitives.add(new Ni(i,{id:"position-editor-"+e,loop:!0,color:s,width:5,depthFail:this._options.depthFail}))}_getRotationAngle(e,i,s){let o=r.Matrix4.inverse(e,new r.Matrix4),a=r.Matrix4.multiplyByPoint(o,i,new r.Cartesian3),n=r.Matrix4.multiplyByPoint(o,s,new r.Cartesian3),h=new r.Cartesian2,c=new r.Cartesian2;this._activeAxis==="X"?(h.x=a.y,h.y=a.z,c.x=n.y,c.y=n.z):this._activeAxis==="Y"?(h.x=-a.x,h.y=a.z,c.x=-n.x,c.y=n.z):(h.x=a.x,h.y=a.y,c.x=n.x,c.y=n.y);let d=h.x*c.y-h.y*c.x>=0,p=r.Cartesian2.angleBetween(h,c);return d||(p=-p),p}handleLeftDown(e){console.log("handleLeftDown",e);let i=this._viewer.scene,s=i.drillPick(e.position)||[];console.log(1);for(let n=0;n<s.length;n++){let h=s[n];if(h.id&&h.id==="position-editor-X"){this._activeAxis="X",this._axisX.active=!0;break}else if(h.id&&h.id==="position-editor-Y"){this._activeAxis="Y",this._axisY.active=!0;break}else if(h.id&&h.id==="position-editor-Z"){this._activeAxis="Z",this._axisZ.active=!0;break}}if(!this._activeAxis)return;this._viewer.canvas.style.cursor="pointer";let o=r.Matrix4.multiplyByPoint(this._modelMatrix,qp[this._activeAxis],new r.Cartesian3),a=r.Cartesian3.subtract(o,this.modelTranslation,o);r.Cartesian3.normalize(a,a),r.Plane.fromPointNormal(this.modelTranslation,a,this._rotationPlane),r.IntersectionTests.rayPlane(i.camera.getPickRay(e.position),this._rotationPlane,this._rotationStartPoint),i.screenSpaceCameraController.enableInputs=!1}handleMouseMove(e){if(!this._activeAxis)return;let i=this._viewer.scene.camera,s=r.IntersectionTests.rayPlane(i.getPickRay(e.endPosition),this._rotationPlane,new r.Cartesian3);if(!s)return;let o=this._getRotationAngle(this._modelMatrix,this._rotationStartPoint,s),a=r.Quaternion.fromAxisAngle(qp[this._activeAxis],o,new r.Quaternion),n=r.Matrix3.fromQuaternion(a),h=r.Matrix4.getTranslation(this._modelMatrix,new r.Cartesian3),c=r.Transforms.eastNorthUpToFixedFrame(h),d=r.Matrix4.getMatrix3(c,new r.Matrix3);r.Matrix3.multiply(d,n,n);let p=r.Matrix4.fromRotationTranslation(n,this.modelTranslation,new r.Matrix4);this.resetRotation&&this.resetRotation(p)}handleLeftUp(e){this._viewer.canvas.style.cursor="default",this._activeAxis=void 0,this._axisX.active=!1,this._axisY.active=!1,this._axisZ.active=!1,this._viewer.scene.screenSpaceCameraController.enableInputs=!0,this.complete&&this.complete()}update(){let e=5*this._options.axisLineScale,i=r.Matrix4.getTranslation(this._modelMatrix,new r.Cartesian3),s=r.Transforms.eastNorthUpToFixedFrame(i),o=r.Matrix4.multiplyByUniformScale(s,e,new r.Matrix4);this._axisX.modelMatrix=o,this._axisY.modelMatrix=o,this._axisZ.modelMatrix=o}isDestroyed(){return!1}destroy(){this.active=!1;let e=this._viewer.scene;return e.primitives.remove(this._axisX),e.primitives.remove(this._axisY),e.primitives.remove(this._axisZ),r.destroyObject(this)}},Xp=il;var Eg={TRANSLATION:"translation",ROTATION:"rotation"},rl=Eg;var Pg={arrow:!0,width:8,depthFail:!0,axisLineScale:1},sl=class{constructor(e,i={}){this._viewer=e,this._options={...Pg,...i},this._modelMatrix=void 0,this._model=void 0,this._handler=void 0,this._activeEditor=void 0,this._callback=void 0,this._position={lng:0,lat:0,alt:0,heading:0,pitch:0,roll:0},this._translationEditor=new Yp(this._viewer,this._options),this._rotationEditor=new Xp(this._viewer,this._options),this._translationEditor.resetTranslation=this._resetTranslation.bind(this),this._translationEditor.complete=this._complete.bind(this),this._rotationEditor.resetRotation=this._resetRotation.bind(this),this._rotationEditor.complete=this._complete.bind(this)}set overlay(e){return this._model=e.delegate||e,this._position=e.position||{lng:0,lat:0,alt:0,heading:0,pitch:0,roll:0},this}_bindEvent(){this._handler=new r.ScreenSpaceEventHandler(this._viewer.canvas),this._handler.setInputAction(this._onLeftDown.bind(this),r.ScreenSpaceEventType.LEFT_DOWN),this._handler.setInputAction(this._onLeftUp.bind(this),r.ScreenSpaceEventType.LEFT_UP),this._handler.setInputAction(this._onMouseMove.bind(this),r.ScreenSpaceEventType.MOUSE_MOVE)}_unbindEvent(){this._handler&&(this._handler.removeInputAction(this._onLeftDown.bind(this),r.ScreenSpaceEventType.LEFT_DOWN),this._handler.removeInputAction(this._onLeftUp.bind(this),r.ScreenSpaceEventType.LEFT_UP),this._handler.removeInputAction(this._onMouseMove.bind(this),r.ScreenSpaceEventType.MOUSE_MOVE))}_setModelMatrix(){if(this._model instanceof r.Entity){let e=this._model.position.getValue(r.JulianDate.now()),i=new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(-this._position.pitch),r.Math.toRadians(this._position.roll));this._modelMatrix=r.Transforms.headingPitchRollToFixedFrame(e,i),this._activeEditor.modelMatrix=this._modelMatrix,this._activeEditor.active=!0,this._setLngLatAlt(this._modelMatrix)}else this._model instanceof Promise&&this._model.then(e=>{e instanceof r.Model?this._modelMatrix=e.modelMatrix.clone():e instanceof r.Cesium3DTileset&&(this._modelMatrix=e.root.transform.clone()),this._activeEditor.modelMatrix=this._modelMatrix,this._activeEditor.active=!0,this._setLngLatAlt(this._modelMatrix)})}_setLngLatAlt(e){let i=r.Matrix4.getTranslation(e,new r.Cartesian3),s=r.Cartographic.fromCartesian(i);this._position.lng=Number(r.Math.toDegrees(s.longitude).toFixed(8)),this._position.lat=Number(r.Math.toDegrees(s.latitude).toFixed(8)),this._position.alt=Number(s.height.toFixed(2))}_setHPR(e){this._position.heading+=Number(r.Math.toDegrees(e.heading).toFixed(8)),this._position.heading=this._position.heading%360,this._position.pitch+=Number(-r.Math.toDegrees(e.pitch).toFixed(8)),this._position.pitch=this._position.pitch%360,this._position.roll+=Number(-r.Math.toDegrees(e.roll).toFixed(8)),this._position.roll=this._position.roll%360}_onLeftDown(e){this._activeEditor&&this._activeEditor.handleLeftDown(e)}_onMouseMove(e){this._activeEditor&&this._activeEditor.handleMouseMove(e)}_onLeftUp(e){this._activeEditor&&this._activeEditor.handleLeftUp(e)}_resetRotation(e){let i=r.Transforms.fixedFrameToHeadingPitchRoll(e);if(this._setHPR(i),this._model instanceof r.Entity){let s=this._model.position.getValue(r.JulianDate.now()),o=new r.HeadingPitchRoll(r.Math.toRadians(this._position.heading),r.Math.toRadians(-this._position.pitch),r.Math.toRadians(this._position.roll));this._model.orientation=r.Transforms.headingPitchRollQuaternion(s,o)}else this._model instanceof Promise&&this._model.then(s=>{s instanceof r.Model?r.Matrix4.multiply(s.modelMatrix,r.Matrix4.fromRotationTranslation(r.Matrix3.fromHeadingPitchRoll(i)),s.modelMatrix):s instanceof r.Cesium3DTileset&&r.Matrix4.multiply(s.root.transform,r.Matrix4.fromRotationTranslation(r.Matrix3.fromHeadingPitchRoll(i)),s.root.transform)})}_resetTranslation(e){r.Matrix4.setTranslation(this._modelMatrix,e,this._modelMatrix),this._model instanceof r.Entity?this._model.position=e:this._model instanceof Promise&&this._model.then(i=>{i instanceof r.Model?r.Matrix4.setTranslation(i.modelMatrix,e,i.modelMatrix):i instanceof r.Cesium3DTileset&&r.Matrix4.setTranslation(i.root.transform,e,i.root.transform)}),this._activeEditor.modelMatrix=this._modelMatrix,this._setLngLatAlt(this._modelMatrix)}_complete(){this._callback&&this._callback(this._position)}activate(e,i){if(!this._model)throw new Error("PositionEditor: no overlay");return this._translationEditor.active=!1,this._rotationEditor.active=!1,this._activeEditor=e===rl.TRANSLATION?this._translationEditor:this._rotationEditor,this._setModelMatrix(),this._handler||this._bindEvent(),this._callback=i,this}deactivate(){return this._unbindEvent(),this._handler&&this._handler.destroy(),this._handler=void 0,this._translationEditor.active=!1,this._rotationEditor.active=!1,this._activeEditor=void 0,this._modelMatrix=void 0,this}},bg=sl;var Jp=`/**\r
|
|
2870
3491
|
* \u6444\u50CF\u673A\u89C6\u9891\u7740\u8272\u5668\r
|
|
2871
3492
|
* \u7528\u4E8E\u5C06\u89C6\u9891\u7EB9\u7406\u6295\u5F71\u5230\u573A\u666F\u4E2D\u7684\u7740\u8272\u5668\r
|
|
2872
3493
|
* @author Lucas Xu\r
|
|
@@ -3092,7 +3713,7 @@ void main()\r
|
|
|
3092
3713
|
out_FragColor = vec4(mix(color.rgb, disViewColor.rgb, disViewColor.a), disViewColor.a);\r
|
|
3093
3714
|
}\r
|
|
3094
3715
|
}\r
|
|
3095
|
-
`;var Jn=class extends x{constructor(e,i,s){super(),this._position=v.parsePosition(e),this._video=i,this._maskUrl=s,this._viewer=void 0,this._camera=void 0,this._videoTexture=void 0,this._maskTexture=void 0,this._viewShadowMap=void 0,this._frustum=new r.PerspectiveFrustum({fov:r.Math.toRadians(60),aspectRatio:1}),this._alpha=1,this._clearBlack=!0,this._disViewColor=new r.Color(1,1,1,1),this._state=_.INITIALIZED}get type(){return x.getOverlayType("camera_video")}get show(){return this._show}set show(e){this._show=e,this._delegate&&(this._delegate.enabled=e)}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._updateShadowMap()}get video(){return this._video}set video(e){this._video=e}get maskUrl(){return this._maskUrl}set maskUrl(e){this._unbindEvent(),this._maskUrl=e;let i=new Image,s=this;i.onload=()=>{s._maskTexture=new r.Texture({context:s._viewer.scene.context,source:i}),s._bindEvent()},i.src=e}get camera(){return this._camera}_updateCameraState(){let e=r.Cartesian3.fromDegrees(this._position.lng,this._position.lat,this._position.alt),i=he.getViewPosition(this._position,this._frustum&&this._frustum.far||120);this._viewer&&(this._camera||(this._camera=new r.Camera(this._viewer.scene)),this._camera.frustum=this._frustum,he.setCamera(this._camera,e,i,this._position.roll))}_updateShadowMap(){this._updateCameraState(),this._viewShadowMap=new r.ShadowMap({lightCamera:this._camera,enable:!1,isPointLight:!1,isSpotLight:!0,cascadesEnabled:!1,context:this._viewer.scene.context,pointLightRadius:this._frustum.far})}_createPostProcessStage(){this._delegate=new r.PostProcessStage({fragmentShader:du,uniforms:{mixNum:()=>this._alpha,clearBlack:()=>this._clearBlack,disViewColor:()=>this._disViewColor,videoTexture:()=>this._videoTexture,maskTexture:()=>this._maskTexture,shadowMapTexture:()=>this._viewShadowMap._shadowMapTexture,shadowMap_matrix:()=>this._viewShadowMap._shadowMapMatrix,shadowMap_lightPositionEC:()=>this._viewShadowMap._lightPositionEC,shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return r.Cartesian4.fromElements(1/this._viewShadowMap._textureSize.x,1/this._viewShadowMap._textureSize.y,e.depthBias,e.normalShadingSmooth,new r.Cartesian4)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return r.Cartesian4.fromElements(e.normalOffsetScale,this._viewShadowMap._distance,this._viewShadowMap.maximumDistance,this._viewShadowMap._darkness,new r.Cartesian4)}}})}_onClockTick(){this._videoTexture&&this._videoTexture.destroy(),this._videoTexture=new r.Texture({context:this._viewer.scene.context,source:this._video,width:1,height:1,pixelFormat:r.PixelFormat.RGBA,pixelDatatype:r.PixelDatatype.UNSIGNED_BYTE})}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onClockTick,this)}_unbindEvent(){this._viewer.clock.onTick.removeEventListener(this._onClockTick,this)}_mountedHook(){this._viewer=this._layer._viewer,this._maskTexture=new r.Texture({context:this._viewer.scene.context,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1}),this._maskUrl?(this._videoTexture=new r.Texture({context:this._viewer.scene.context,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1}),this.maskUrl=this._maskUrl):this._bindEvent(),this._updateShadowMap(),this._createPostProcessStage(),this._viewer.scene.primitives.add(this)}_removedHook(){this._unbindEvent(),this._viewShadowMap=void 0}isDestroyed(){return!1}update(){this._viewShadowMap&&this._viewer.scene.frameState.shadowMaps.push(this._viewShadowMap)}setStyle(e){let i;return Object.keys(e).length===0?this:(this._style=e,e.fov&&(this._frustum.fov=r.Math.toRadians(e.fov)),e.near&&(this._frustum.near=e.near),e.far&&(this._frustum.far=e.far),e.aspectRatio&&(this._frustum.aspectRatio=e.aspectRatio),e.alpha&&(this._alpha=e.alpha),this._clearBlack=(i=e.clearBlack)!=null?i:!0,e.disViewColor&&(this._disViewColor=e.disViewColor),this._delegate&&this._updateShadowMap(),this)}},pu=Jn;var mu=new r.WebMercatorProjection,Qn=class extends x{constructor(e,i){super(),this._position=v.parsePosition(e),this._video=i,this._delegate=new r.Entity({plane:{}}),this._viewer=void 0,this._camera=void 0,this._frustum=new r.PerspectiveFrustum({fov:r.Math.toRadians(60),aspectRatio:1}),this._state=_.INITIALIZED}get type(){return x.getOverlayType("plane_video")}get show(){return this._show}set show(e){this._show=e}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._updatePlane()}get video(){return this._video}set video(e){this._video=e}get camera(){return this._camera}_mountedHook(){this._viewer=this._layer._viewer,this._updatePlane()}_getCameraState(){let e=r.Cartesian3.fromDegrees(this._position.lng,this._position.lat,this._position.alt),i=he.getViewPosition(this._position,this._frustum&&this._frustum.far||120);return this._viewer&&(this._camera||(this._camera=new r.Camera(this._viewer.scene)),this._camera.frustum=this._frustum,he.setCamera(this._camera,e,i,this._position.roll)),{cameraPosition:e,viewPosition:i}}_updatePlane(){let{cameraPosition:e,viewPosition:i}=this._getCameraState(),s=r.Cartographic.fromCartesian(e),a=r.Cartographic.fromCartesian(i),o=new r.Cartesian3;r.Cartesian3.subtract(mu.project(s),mu.project(a),o),r.Cartesian3.normalize(o,o);let n=this._frustum.far*Math.tan(this._frustum.fov*.5)*2,h=n/this._frustum.aspectRatio;this._delegate.position=i,this._delegate.plane={dimensions:{x:n,y:h},plane:new r.Plane(o,0),material:this._video||r.Color.GREEN.withAlpha(.5)}}setStyle(e){return Object.keys(e).length===0?this:(this._style=e,e.fov&&(this._frustum.fov=r.Math.toRadians(e.fov)),e.near&&(this._frustum.near=e.near),e.far&&(this._frustum.far=e.far),e.aspectRatio&&(this._frustum.aspectRatio=e.aspectRatio),this._delegate&&this._updatePlane(),this)}},uu=Qn;var{Cartesian3:Bi,Ellipsoid:tg,Math:fu}=r;function Ee(l){this._api=l,this._viewer=Object(l.getZr()).viewer,this._mapOffset=[0,0],this.dimensions=["lng","lat"]}Ee.prototype.getViewer=function(){return this._viewer};Ee.prototype.setMapOffset=function(l){return this._mapOffset=l,this};Ee.prototype.dataToPoint=function(l){let e=[],i=Bi.fromDegrees(l[0],l[1]);if(!i)return e;let s=tg.WGS84.geodeticSurfaceNormal(i,new Bi),a=this._viewer.camera.direction;if(Bi.dot(s,a)>=0)return e;let o=this._viewer.scene.cartesianToCanvasCoordinates(i);return o?[o.x-this._mapOffset[0],o.y-this._mapOffset[1]]:e};Ee.prototype.pointToData=function(l){let e=this._viewer.scene.globe.ellipsoid,i=new Bi(l[0]+this._mapOffset[0],l[1]+this._mapOffset[1],0),s=e.cartesianToCartographic(i);return[fu.toDegrees(s.longitude),fu.toDegrees(s.latitude)]};Ee.create=function(l,e){let i;l.eachComponent("GLMap",function(s){i=new Ee(e),i.setMapOffset(s.__mapOffset||[0,0]),s.coordinateSystem=i}),l.eachSeries(function(s){s.get("coordinateSystem")==="GLMap"&&(s.coordinateSystem=i)})};Ee.dimensions=["lng","lat"];function ig(l){Ee.prototype.getViewRect=function(){let e=this._api;return new l.graphic.BoundingRect(0,0,e.getWidth(),e.getHeight())},Ee.prototype.getRoamTransform=function(){return l.matrix.create()}}var _u=!1;function gu(l){if(_u)return;let{registerAction:e,registerCoordinateSystem:i,extendComponentModel:s,extendComponentView:a}=l;s({type:"GLMap",getViewer(){return Object(this.getZr()).viewer},defaultOption:{roam:!1}}),a({type:"GLMap",init:function(o,n){this.api=n,n.getZr().viewer.clock.onTick.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.getZr().dom.style.visibility!=="hidden"&&this.api.dispatchAction({type:"GLMapRoam"})},render:function(o,n,h){},dispose:function(){this.api.getZr().viewer.clock.onTick.removeEventListener(this.moveHandler,this)}}),ig(l),i("GLMap",Ee),e({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(o,n){}),_u=!0}var Kn=class extends I{constructor(e,i){let s=ne("echarts");if(!s)throw new Error("miss the echarts lib");gu(s),super(e),this._option=i,this._delegate=void 0,this._chart=void 0}set show(e){this._show=e,this._delegate.style.visibility=e?"visible":"hidden"}get show(){return this._show}_createChartElement(){let e=this._viewer.scene.canvas,i=document.createElement("div");return i.setAttribute("id",this._id),i.setAttribute("data-layer-type","chart-layer"),i.style.cssText=`position:absolute; top:0; left:0; width: ${e.clientWidth}px; height: ${e.clientHeight}px;pointer-events:none;`,this._viewer.layerContainer.appendChild(i),i}_onAdd(e){let i=ne("echarts");this._viewer=e,this._viewer.canvas.setAttribute("tabIndex","0"),this._delegate=this._createChartElement(),this._chart=i.init(this._delegate),Object(this._chart.getZr()).viewer=e,this._option&&this._chart.setOption({...this._option,GLMap:{},animation:!1}),this._state=_.ADDED}_onRemove(){this._delegate&&this._viewer&&(this._chart.dispose(),this._viewer.layerContainer.removeChild(this._delegate),this._state=_.REMOVED)}setOption(e={}){return this._option=e,this._chart&&this._chart.setOption({...e,GLMap:{},animation:!1}),this}clear(){return this._chart.clear(),this}resize(){return this._chart.resize(),this}},yu=Kn;var $n=class{constructor(e){this._viewer=e,this._material=r.Material.fromType(r.Material.ElevationContourType,{color:r.Color.YELLOW})}start(e,i,s){return e&&(this._material.uniforms.color=e),i&&(this._material.uniforms.width=i),s&&(this._material.uniforms.spacing=s),this._viewer.scene.globe.material=this._material,this}stop(){return this._viewer.scene.globe.material=void 0,this}},Ui=$n;var el=class{constructor(e){this._viewer=e,this._shadowsState=this._viewer.delegate.shadows}start(e,i=1600){return this._viewer.delegate.shadows=!0,this._viewer.clock.currentTime=r.JulianDate.fromDate(e),this._viewer.clock.multiplier=i,this}stop(){return this._viewer.delegate.shadows=this._shadowsState,this._viewer.clock.currentTime=r.JulianDate.now(),this._viewer.clock.multiplier=1,this}},Vi=el;var tl=class{constructor(e){this._viewer=e,this._delegate=new r.PrimitiveCollection,this._viewer.scene.primitives.add(this._delegate)}_lerp(e,i,s=100){let a=[];for(let o=0;o<s;o++){let n=r.Math.lerp(e.lng,i.lng,o/s),h=r.Math.lerp(e.lat,i.lat,o/s),c=e.alt-(e.alt-i.alt)*(o/s);a.push({lng:n,lat:h,alt:c})}return a}_createLine(e,i){let s=new r.PolylineGeometry({positions:e,width:3,vertexFormat:r.PolylineMaterialAppearance.VERTEX_FORMAT,arcType:r.ArcType.NONE}),a=i.withAlpha(.6),o=new r.PolylineColorAppearance({translucent:i.alpha!==1}),n=new r.PolylineColorAppearance({translucent:a.alpha!==1});return new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:s,attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(i),depthFailColor:r.ColorGeometryInstanceAttribute.fromColor(a)}}),appearance:o,depthFailAppearance:n,asynchronous:!0})}start(e,i,s,a){e=v.parsePosition(e),i=v.parsePosition(i);let o=this._lerp(e,i,a),n=o.map(p=>y.transformWGS84ToCartographic(p)),h=o.map(p=>y.transformWGS84ToCartesian(p)),c=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof r.EllipsoidTerrainProvider)?r.sampleTerrainMostDetailed(this._viewer.terrainProvider,n):Promise.resolve([]),d=this._viewer.scene.clampToHeightSupported?this._viewer.scene.clampToHeightMostDetailed(h,s):Promise.resolve([]);return Promise.all([c,d]).then(([p,f])=>{let g=[],u=0;return p.forEach((m,E)=>{let w=Math.max(m.height||0,f[E]?r.Cartographic.fromCartesian(f[E]).height:0);(o[E].alt<w&&u===0||u>=1&&(o[E].alt>w&&u%2!==0||o[E].alt<w&&u%2===0))&&(g.push(o[E]),u++)}),g}).then(p=>{p.length?(this._delegate.add(this._createLine([y.transformWGS84ToCartesian(e),y.transformWGS84ToCartesian(p[0])],r.Color.GREEN)),p.forEach((f,g)=>{let u=p[g+1];u=u?y.transformWGS84ToCartesian(u):y.transformWGS84ToCartesian(i),this._delegate.add(this._createLine([y.transformWGS84ToCartesian(f),u],g%2===0?r.Color.RED:r.Color.HOTPINK))})):this._delegate.add(this._createLine([y.transformWGS84ToCartesian(e),y.transformWGS84ToCartesian(i)],r.Color.GREEN))}),this}stop(){return this._delegate.removeAll(),this}},Zi=tl;var vu=`/**\r
|
|
3716
|
+
`;var ol=class extends C{constructor(e,i,s){super(),this._position=v.parsePosition(e),this._video=i,this._maskUrl=s,this._viewer=void 0,this._camera=void 0,this._videoTexture=void 0,this._maskTexture=void 0,this._viewShadowMap=void 0,this._frustum=new r.PerspectiveFrustum({fov:r.Math.toRadians(60),aspectRatio:1}),this._alpha=1,this._clearBlack=!0,this._disViewColor=new r.Color(1,1,1,1),this._state=_.INITIALIZED}get type(){return C.getOverlayType("camera_video")}get show(){return this._show}set show(e){this._show=e,this._delegate&&(this._delegate.enabled=e)}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._updateShadowMap()}get video(){return this._video}set video(e){this._video=e}get maskUrl(){return this._maskUrl}set maskUrl(e){this._unbindEvent(),this._maskUrl=e;let i=new Image,s=this;i.onload=()=>{s._maskTexture=new r.Texture({context:s._viewer.scene.context,source:i}),s._bindEvent()},i.src=e}get camera(){return this._camera}_updateCameraState(){let e=r.Cartesian3.fromDegrees(this._position.lng,this._position.lat,this._position.alt),i=le.getViewPosition(this._position,this._frustum&&this._frustum.far||120);this._viewer&&(this._camera||(this._camera=new r.Camera(this._viewer.scene)),this._camera.frustum=this._frustum,le.setCamera(this._camera,e,i,this._position.roll))}_updateShadowMap(){this._updateCameraState(),this._viewShadowMap=new r.ShadowMap({lightCamera:this._camera,enable:!1,isPointLight:!1,isSpotLight:!0,cascadesEnabled:!1,context:this._viewer.scene.context,pointLightRadius:this._frustum.far})}_createPostProcessStage(){this._delegate=new r.PostProcessStage({fragmentShader:Jp,uniforms:{mixNum:()=>this._alpha,clearBlack:()=>this._clearBlack,disViewColor:()=>this._disViewColor,videoTexture:()=>this._videoTexture,maskTexture:()=>this._maskTexture,shadowMapTexture:()=>this._viewShadowMap._shadowMapTexture,shadowMap_matrix:()=>this._viewShadowMap._shadowMapMatrix,shadowMap_lightPositionEC:()=>this._viewShadowMap._lightPositionEC,shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return r.Cartesian4.fromElements(1/this._viewShadowMap._textureSize.x,1/this._viewShadowMap._textureSize.y,e.depthBias,e.normalShadingSmooth,new r.Cartesian4)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return r.Cartesian4.fromElements(e.normalOffsetScale,this._viewShadowMap._distance,this._viewShadowMap.maximumDistance,this._viewShadowMap._darkness,new r.Cartesian4)}}})}_onClockTick(){this._videoTexture&&this._videoTexture.destroy(),this._videoTexture=new r.Texture({context:this._viewer.scene.context,source:this._video,width:1,height:1,pixelFormat:r.PixelFormat.RGBA,pixelDatatype:r.PixelDatatype.UNSIGNED_BYTE})}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onClockTick,this)}_unbindEvent(){this._viewer.clock.onTick.removeEventListener(this._onClockTick,this)}_mountedHook(){this._viewer=this._layer._viewer,this._maskTexture=new r.Texture({context:this._viewer.scene.context,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1}),this._maskUrl?(this._videoTexture=new r.Texture({context:this._viewer.scene.context,source:{width:1,height:1,arrayBufferView:new Uint8Array([255,255,255,255])},flipY:!1}),this.maskUrl=this._maskUrl):this._bindEvent(),this._updateShadowMap(),this._createPostProcessStage(),this._viewer.scene.primitives.add(this)}_removedHook(){this._unbindEvent(),this._viewShadowMap=void 0}isDestroyed(){return!1}update(){this._viewShadowMap&&this._viewer.scene.frameState.shadowMaps.push(this._viewShadowMap)}setStyle(e){let i;return Object.keys(e).length===0?this:(this._style=e,e.fov&&(this._frustum.fov=r.Math.toRadians(e.fov)),e.near&&(this._frustum.near=e.near),e.far&&(this._frustum.far=e.far),e.aspectRatio&&(this._frustum.aspectRatio=e.aspectRatio),e.alpha&&(this._alpha=e.alpha),this._clearBlack=(i=e.clearBlack)!=null?i:!0,e.disViewColor&&(this._disViewColor=e.disViewColor),this._delegate&&this._updateShadowMap(),this)}},Ag=ol;var Qp=new r.WebMercatorProjection,al=class extends C{constructor(e,i){super(),this._position=v.parsePosition(e),this._video=i,this._delegate=new r.Entity({plane:{}}),this._viewer=void 0,this._camera=void 0,this._frustum=new r.PerspectiveFrustum({fov:r.Math.toRadians(60),aspectRatio:1}),this._state=_.INITIALIZED}get type(){return C.getOverlayType("plane_video")}get show(){return this._show}set show(e){this._show=e}get position(){return this._position}set position(e){this._position=v.parsePosition(e),this._updatePlane()}get video(){return this._video}set video(e){this._video=e}get camera(){return this._camera}_mountedHook(){this._viewer=this._layer._viewer,this._updatePlane()}_getCameraState(){let e=r.Cartesian3.fromDegrees(this._position.lng,this._position.lat,this._position.alt),i=le.getViewPosition(this._position,this._frustum&&this._frustum.far||120);return this._viewer&&(this._camera||(this._camera=new r.Camera(this._viewer.scene)),this._camera.frustum=this._frustum,le.setCamera(this._camera,e,i,this._position.roll)),{cameraPosition:e,viewPosition:i}}_updatePlane(){let{cameraPosition:e,viewPosition:i}=this._getCameraState(),s=r.Cartographic.fromCartesian(e),o=r.Cartographic.fromCartesian(i),a=new r.Cartesian3;r.Cartesian3.subtract(Qp.project(s),Qp.project(o),a),r.Cartesian3.normalize(a,a);let n=this._frustum.far*Math.tan(this._frustum.fov*.5)*2,h=n/this._frustum.aspectRatio;this._delegate.position=i,this._delegate.plane={dimensions:{x:n,y:h},plane:new r.Plane(a,0),material:this._video||r.Color.GREEN.withAlpha(.5)}}setStyle(e){return Object.keys(e).length===0?this:(this._style=e,e.fov&&(this._frustum.fov=r.Math.toRadians(e.fov)),e.near&&(this._frustum.near=e.near),e.far&&(this._frustum.far=e.far),e.aspectRatio&&(this._frustum.aspectRatio=e.aspectRatio),this._delegate&&this._updatePlane(),this)}},Sg=al;var{Cartesian3:Fi,Ellipsoid:Ig,Math:Kp}=r;function Ee(l){this._api=l,this._viewer=Object(l.getZr()).viewer,this._mapOffset=[0,0],this.dimensions=["lng","lat"]}Ee.prototype.getViewer=function(){return this._viewer};Ee.prototype.setMapOffset=function(l){return this._mapOffset=l,this};Ee.prototype.dataToPoint=function(l){let e=[],i=Fi.fromDegrees(l[0],l[1]);if(!i)return e;let s=Ig.WGS84.geodeticSurfaceNormal(i,new Fi),o=this._viewer.camera.direction;if(Fi.dot(s,o)>=0)return e;let a=this._viewer.scene.cartesianToCanvasCoordinates(i);return a?[a.x-this._mapOffset[0],a.y-this._mapOffset[1]]:e};Ee.prototype.pointToData=function(l){let e=this._viewer.scene.globe.ellipsoid,i=new Fi(l[0]+this._mapOffset[0],l[1]+this._mapOffset[1],0),s=e.cartesianToCartographic(i);return[Kp.toDegrees(s.longitude),Kp.toDegrees(s.latitude)]};Ee.create=function(l,e){let i;l.eachComponent("GLMap",function(s){i=new Ee(e),i.setMapOffset(s.__mapOffset||[0,0]),s.coordinateSystem=i}),l.eachSeries(function(s){s.get("coordinateSystem")==="GLMap"&&(s.coordinateSystem=i)})};Ee.dimensions=["lng","lat"];function Lg(l){Ee.prototype.getViewRect=function(){let e=this._api;return new l.graphic.BoundingRect(0,0,e.getWidth(),e.getHeight())},Ee.prototype.getRoamTransform=function(){return l.matrix.create()}}var $p=!1;function em(l){if($p)return;let{registerAction:e,registerCoordinateSystem:i,extendComponentModel:s,extendComponentView:o}=l;s({type:"GLMap",getViewer(){return Object(this.getZr()).viewer},defaultOption:{roam:!1}}),o({type:"GLMap",init:function(a,n){this.api=n,n.getZr().viewer.clock.onTick.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.getZr().dom.style.visibility!=="hidden"&&this.api.dispatchAction({type:"GLMapRoam"})},render:function(a,n,h){},dispose:function(){this.api.getZr().viewer.clock.onTick.removeEventListener(this.moveHandler,this)}}),Lg(l),i("GLMap",Ee),e({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(a,n){}),$p=!0}var nl=class extends I{constructor(e,i){let s=ce("echarts");if(!s)throw new Error("miss the echarts lib");em(s),super(e),this._option=i,this._delegate=void 0,this._chart=void 0}set show(e){this._show=e,this._delegate.style.visibility=e?"visible":"hidden"}get show(){return this._show}_createChartElement(){let e=this._viewer.scene.canvas,i=document.createElement("div");return i.setAttribute("id",this._id),i.setAttribute("data-layer-type","chart-layer"),i.style.cssText=`position:absolute; top:0; left:0; width: ${e.clientWidth}px; height: ${e.clientHeight}px;pointer-events:none;`,this._viewer.layerContainer.appendChild(i),i}_onAdd(e){let i=ce("echarts");this._viewer=e,this._viewer.canvas.setAttribute("tabIndex","0"),this._delegate=this._createChartElement(),this._chart=i.init(this._delegate),Object(this._chart.getZr()).viewer=e,this._option&&this._chart.setOption({...this._option,GLMap:{},animation:!1}),this._state=_.ADDED}_onRemove(){this._delegate&&this._viewer&&(this._chart.dispose(),this._viewer.layerContainer.removeChild(this._delegate),this._state=_.REMOVED)}setOption(e={}){return this._option=e,this._chart&&this._chart.setOption({...e,GLMap:{},animation:!1}),this}clear(){return this._chart.clear(),this}resize(){return this._chart.resize(),this}},Dg=nl;var ll=class{constructor(e){this._viewer=e,this._material=r.Material.fromType(r.Material.ElevationContourType,{color:r.Color.YELLOW})}start(e,i,s){return e&&(this._material.uniforms.color=e),i&&(this._material.uniforms.width=i),s&&(this._material.uniforms.spacing=s),this._viewer.scene.globe.material=this._material,this}stop(){return this._viewer.scene.globe.material=void 0,this}},hl=ll;var cl=class{constructor(e){this._viewer=e,this._shadowsState=this._viewer.delegate.shadows}start(e,i=1600){return this._viewer.delegate.shadows=!0,this._viewer.clock.currentTime=r.JulianDate.fromDate(e),this._viewer.clock.multiplier=i,this}stop(){return this._viewer.delegate.shadows=this._shadowsState,this._viewer.clock.currentTime=r.JulianDate.now(),this._viewer.clock.multiplier=1,this}},dl=cl;var pl=class{constructor(e){this._viewer=e,this._delegate=new r.PrimitiveCollection,this._viewer.scene.primitives.add(this._delegate)}_lerp(e,i,s=100){let o=[];for(let a=0;a<s;a++){let n=r.Math.lerp(e.lng,i.lng,a/s),h=r.Math.lerp(e.lat,i.lat,a/s),c=e.alt-(e.alt-i.alt)*(a/s);o.push({lng:n,lat:h,alt:c})}return o}_createLine(e,i){let s=new r.PolylineGeometry({positions:e,width:3,vertexFormat:r.PolylineMaterialAppearance.VERTEX_FORMAT,arcType:r.ArcType.NONE}),o=i.withAlpha(.6),a=new r.PolylineColorAppearance({translucent:i.alpha!==1}),n=new r.PolylineColorAppearance({translucent:o.alpha!==1});return new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:s,attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(i),depthFailColor:r.ColorGeometryInstanceAttribute.fromColor(o)}}),appearance:a,depthFailAppearance:n,asynchronous:!0})}start(e,i,s,o){e=v.parsePosition(e),i=v.parsePosition(i);let a=this._lerp(e,i,o),n=a.map(p=>y.transformWGS84ToCartographic(p)),h=a.map(p=>y.transformWGS84ToCartesian(p)),c=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof r.EllipsoidTerrainProvider)?r.sampleTerrainMostDetailed(this._viewer.terrainProvider,n):Promise.resolve([]),d=this._viewer.scene.clampToHeightSupported?this._viewer.scene.clampToHeightMostDetailed(h,s):Promise.resolve([]);return Promise.all([c,d]).then(([p,f])=>{let g=[],u=0;return p.forEach((m,T)=>{let w=Math.max(m.height||0,f[T]?r.Cartographic.fromCartesian(f[T]).height:0);(a[T].alt<w&&u===0||u>=1&&(a[T].alt>w&&u%2!==0||a[T].alt<w&&u%2===0))&&(g.push(a[T]),u++)}),g}).then(p=>{p.length?(this._delegate.add(this._createLine([y.transformWGS84ToCartesian(e),y.transformWGS84ToCartesian(p[0])],r.Color.GREEN)),p.forEach((f,g)=>{let u=p[g+1];u=u?y.transformWGS84ToCartesian(u):y.transformWGS84ToCartesian(i),this._delegate.add(this._createLine([y.transformWGS84ToCartesian(f),u],g%2===0?r.Color.RED:r.Color.HOTPINK))})):this._delegate.add(this._createLine([y.transformWGS84ToCartesian(e),y.transformWGS84ToCartesian(i)],r.Color.GREEN))}),this}stop(){return this._delegate.removeAll(),this}},ml=pl;var tm=`/**\r
|
|
3096
3717
|
* \u89C6\u57DF\u5206\u6790\u7740\u8272\u5668\r
|
|
3097
3718
|
* \u7528\u4E8E\u89C6\u57DF\u5206\u6790\u6548\u679C\u7684\u7247\u6BB5\u7740\u8272\u5668\r
|
|
3098
3719
|
* @author Lucas Xu\r
|
|
@@ -3272,13 +3893,13 @@ void main() {\r
|
|
|
3272
3893
|
out_FragColor = mix(color, vec4(disVisibleColor, 1.0), mixNum);\r
|
|
3273
3894
|
}\r
|
|
3274
3895
|
}\r
|
|
3275
|
-
`;var sg={visibleColor:new r.Color(0,1,0,1),disVisibleColor:new r.Color(1,0,0,1),showHelp:!1,mixNum:1,gridColor:r.Color.YELLOW,lineColor:r.Color.YELLOW.withAlpha(.3)},il=class{constructor(e){this._viewer=e,this._frustum=void 0,this._camera=void 0,this._viewShadowMap=void 0,this._delegate=void 0,this._options={},this._linePrimitive=void 0,this._ellipsoidPrimitive=void 0,this._viewer.scene.primitives.add(this)}_updateCameraState(e){let i=y.transformWGS84ToCartesian(e),s=he.getViewPosition(e,this._frustum.far);this._viewer&&(this._camera||(this._camera=new r.Camera(this._viewer.scene)),this._camera.frustum=this._frustum,he.setCamera(this._camera,i,s,e.roll))}_updateHelpPrimitive(e){this._viewer.scene.primitives.remove(this._ellipsoidPrimitive),this._viewer.scene.primitives.remove(this._linePrimitive);let i=r.Transforms.headingPitchRollToFixedFrame(y.transformWGS84ToCartesian(e),new r.HeadingPitchRoll((-Math.PI+this._frustum.fov)/2+r.Math.toRadians(e.heading),r.Math.toRadians(e.pitch),r.Math.toRadians(e.roll))),s=new r.Cartesian3(this._frustum.far,this._frustum.far,this._frustum.far),a=new r.EllipsoidOutlineGeometry({radii:s,innerRadii:r.Cartesian3.divideByScalar(s,20,new r.Cartesian3),minimumClock:0,maximumClock:this._frustum.fov,minimumCone:(Math.PI-this._frustum.fovy)/2,maximumCone:r.Math.toRadians(110)});this._linePrimitive=this._viewer.scene.primitives.add(new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:a,attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._options.lineColor)}}),appearance:new r.PerInstanceColorAppearance({flat:!0,renderState:{lineWidth:Math.min(2,this._viewer.scene.maximumAliasedLineWidth)}}),modelMatrix:i})),a=new r.EllipsoidGeometry({radii:s,minimumClock:0,maximumClock:this._frustum.fov,minimumCone:(Math.PI-this._frustum.fovy)/2,maximumCone:r.Math.toRadians(110)}),this._ellipsoidPrimitive=this._viewer.scene.primitives.add(new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:a}),appearance:new r.MaterialAppearance({translucent:!1,material:r.Material.fromType(r.Material.GridType,{color:this._options.gridColor,lineCount:new r.Cartesian2(200,200)})}),modelMatrix:i}))}_createPostProcessStage(){return new r.PostProcessStage({fragmentShader:vu,uniforms:{czzj:()=>r.Math.toDegrees(this._frustum.fovy),dis:()=>this._frustum.far,spzj:()=>r.Math.toDegrees(this._frustum.fov),visibleColor:()=>this._options.visibleColor,disVisibleColor:()=>this._options.disVisibleColor,mixNum:()=>this._options.mixNum,stcshadow:()=>this._viewShadowMap._shadowMapTexture,_shadowMap_matrix:()=>this._viewShadowMap._shadowMapMatrix,shadowMap_lightPositionEC:()=>this._viewShadowMap._lightPositionEC,shadowMap_lightDirectionEC:()=>this._viewShadowMap._lightDirectionEC,shadowMap_lightUp:()=>this._viewShadowMap._lightCamera.up,shadowMap_lightDir:()=>this._viewShadowMap._lightCamera.direction,shadowMap_lightRight:()=>this._viewShadowMap._lightCamera.right,shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return r.Cartesian4.fromElements(1/this._viewShadowMap._textureSize.x,1/this._viewShadowMap._textureSize.y,e.depthBias,e.normalShadingSmooth,new r.Cartesian4)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return r.Cartesian4.fromElements(e.normalOffsetScale,this._viewShadowMap._distance,this._viewShadowMap.maximumDistance,this._viewShadowMap._darkness,new r.Cartesian4)}}})}update(){this._viewShadowMap&&this._viewer.scene.frameState.shadowMaps.push(this._viewShadowMap)}start(e,i,s,a,o={}){return this._options={...sg,...o},this._frustum=new r.PerspectiveFrustum({fov:r.Math.toRadians(s),aspectRatio:a,far:i,near:.05}),e=v.parsePosition(e),this._updateCameraState(e),this._viewShadowMap=new r.ShadowMap({lightCamera:this._camera,enable:!1,isPointLight:!1,isSpotLight:!0,cascadesEnabled:!1,context:this._viewer.scene.context,pointLightRadius:this._frustum.far,darkness:1}),this._delegate||(this._delegate=this._createPostProcessStage(),this._viewer.scene.postProcessStages.add(this._delegate),this._delegate.enabled=!0),this._options.showHelp?this._updateHelpPrimitive(e):(this._ellipsoidPrimitive&&this._viewer.scene.primitives.remove(this._ellipsoidPrimitive),this._linePrimitive&&this._viewer.scene.primitives.remove(this._linePrimitive),this._ellipsoidPrimitive=void 0,this._linePrimitive=void 0),this}isDestroyed(){return!1}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._ellipsoidPrimitive&&this._viewer.scene.primitives.remove(this._ellipsoidPrimitive),this._linePrimitive&&this._viewer.scene.primitives.remove(this._linePrimitive),this._delegate=void 0,this._ellipsoidPrimitive=void 0,this._linePrimitive=void 0,this._viewShadowMap=void 0,this._frustum=void 0,this}},ji=il;var ag={CONTOUR_LINE:"ContourLine",SHADOWS:"Shadows",SIGHT_CIRCLE:"SightCircle",SIGHT_LINE:"SightLine",VIEWSHED:"Viewshed"},Ue=ag;var rl=class{constructor(e){this._contourLine=new Ui(e),this._shadows=new Vi(e),this._sightLine=new Zi(e),this._viewshed=new ji(e)}contourLine(e,i,s){return this._contourLine.start(e,i,s),this}shadows(e,i){return this._shadows.start(e||new Date,i||1600),this}sightLine(e,i,s=[],a=10){return!e||!i?this:(this._sightLine.start(e,i,s.map(o=>o.delegate||o),a),this)}sightCircle(e,i,s,a=10){if(!e||!i)return this;let o=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(e),semiMajorAxis:+i,semiMinorAxis:+i,rotation:0,granularity:.03},!1,!0);return r.Cartesian3.unpackArray(o.outerPositions).forEach(h=>{this.sightLine(e,y.transformCartesianToWGS84(h),s||[],a)}),this}viewshed(e,i,s,a=1.3,o={}){return!e||!i||!s?this:(this._viewshed.start(e,i,s,a,o),this)}deactivate(e){switch(e){case Ue.CONTOUR_LINE:this._contourLine.stop();break;case Ue.SHADOWS:this._shadows.stop();break;case Ue.SIGHT_CIRCLE:case Ue.SIGHT_LINE:this._sightLine.stop();break;case Ue.VIEWSHED:this._viewshed.stop();break;default:this._contourLine.stop(),this._shadows.stop(),this._sightLine.stop(),this._viewshed.stop();break}return this}},wu=rl;var og={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",FRONT:"front",BACK:"back",NONE:"none"},Pe=og;var ng={edgeWidth:0,edgeColor:r.Color.WHITE,unionClippingRegions:!1},sl=class{constructor(e={}){this._options={...ng,...e},this._direction=void 0,this._distance=0,this._angle=0,this._positions=void 0,this._planeCollection=new r.ClippingPlaneCollection({edgeWidth:this._options.edgeWidth,edgeColor:this._options.edgeColor,unionClippingRegions:this._options.unionClippingRegions}),this._enable=!1}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._direction=void 0,this._mountPlanes()}get direction(){return this._direction}set direction(e){this._positions=[],this._direction=e,this._mountPlanes()}get distance(){return this._distance}set distance(e){this._distance=+e,this._planeCollection._planes.forEach(i=>{i.distance=+e})}get angle(){return this._angle}set angle(e){this._angle=+e,this._planeCollection._planes.forEach(i=>{if(e){let s=r.Matrix3.fromRotationZ(r.Math.toRadians(+e));r.Matrix3.multiplyByVector(s,i.normal,i.normal)}})}get enable(){return this._enable}set enable(e){this._enable!==e&&(this._enable=e,this._planeCollection.enabled=this._enable,this._state=this._enable?_.ENABLED:_.DISABLED,this._enableHook&&this._enableHook())}get state(){return this._state}_enableHook(){}_mountPlanes(){}_getDirectionNoraml(e){let i;switch(e){case Pe.UP:i=new r.Cartesian3(0,0,1);break;case Pe.DOWN:i=new r.Cartesian3(0,0,-1);break;case Pe.LEFT:i=new r.Cartesian3(-1,0,0);break;case Pe.RIGHT:i=new r.Cartesian3(1,0,0);break;case Pe.FRONT:i=new r.Cartesian3(0,-1,0);break;case Pe.BACK:i=new r.Cartesian3(0,1,0);break;default:break}return i}_isCcw(e){if(!e||e.length<3)return!1;let i=y.transformWGS84ToCartesian(this._positions[0]),s=y.transformWGS84ToCartesian(this._positions[1]),a=y.transformWGS84ToCartesian(this._positions[2]);return(a.y-s.y)*(s.x-i.x)-(s.y-i.y)*(a.x-s.x)>0}computeGlobePlanes(){let e=[];if(this._positions&&this._positions.length>=3){let i=this._isCcw(this._positions),s=this._positions.length;for(let a=0;a<s;a++){let o=(a+1)%s;if(this._positions[a].lng===this._positions[o].lng&&this._positions[a].lat===this._positions[o].lat&&this._positions[a].alt===this._positions[o].lat)continue;let n=y.transformWGS84ToCartesian(this._positions[a]),h=y.transformWGS84ToCartesian(this._positions[o]),c=r.Cartesian3.cross(n,i?r.Cartesian3.subtract(n,h,new r.Cartesian3):r.Cartesian3.subtract(h,n,new r.Cartesian3),new r.Cartesian3);r.Cartesian3.normalize(c,c),e.push(new r.ClippingPlane(c,this._distance||0))}}return e}computeModelPlanes(e){let i=[],s=r.Matrix4.inverseTransformation(e,new r.Matrix4);if(this._positions&&this._positions.length===2){let a=r.Cartesian3.UNIT_Z,o=r.Matrix4.multiplyByPoint(s,y.transformWGS84ToCartesian(this._positions[0]),new r.Cartesian3),n=r.Matrix4.multiplyByPoint(s,y.transformWGS84ToCartesian(this._positions[1]),new r.Cartesian3),h=r.Cartesian3.subtract(n,o,new r.Cartesian3);r.Cartesian3.normalize(h,h);let c=r.Cartesian3.cross(a,h,new r.Cartesian3);i.push(new r.ClippingPlane(c,this._distance||0))}else if(this._positions&&this._positions.length>=3){let a=r.Cartesian3.UNIT_Z,o=this._isCcw(this._positions),n=this._positions.length;for(let h=0;h<n;h++){let c=(h+1)%n;if(this._positions[h].lng===this._positions[c].lng&&this._positions[h].lat===this._positions[c].lat&&this._positions[h].alt===this._positions[c].lat)continue;let d=r.Matrix4.multiplyByPoint(s,y.transformWGS84ToCartesian(this._positions[h]),new r.Cartesian3),p=r.Matrix4.multiplyByPoint(s,y.transformWGS84ToCartesian(this._positions[c]),new r.Cartesian3),f=r.Cartesian3.cross(a,r.Cartesian3.normalize(o?r.Cartesian3.subtract(d,p,new r.Cartesian3):r.Cartesian3.subtract(p,d,new r.Cartesian3),new r.Cartesian3),new r.Cartesian3);i.push(new r.ClippingPlane(f,this._distance||0))}}else if(this._direction&&this._direction!==Pe.NONE){let a=this._getDirectionNoraml(this._direction);if(this._angle){let o=r.Matrix3.fromRotationZ(r.Math.toRadians(this._angle));r.Matrix3.multiplyByVector(o,a,a)}a&&i.push(new r.ClippingPlane(a,this._distance||0))}return i}},dt=sl;var al=class extends dt{constructor(e,i={}){super(i),this._viewer=e,this._planeCollection.unionClippingRegions=!0,this._viewer.scene.globe.clippingPlanes=this._planeCollection}_mountPlanes(){let e=this.computeGlobePlanes();this._planeCollection.removeAll(),e.forEach(i=>{this._planeCollection.add(i)})}},xu=al;var lg={lerpInterval:50,bottomImage:"",sideImage:""},ol=class extends dt{constructor(e,i={}){super({...lg,...i}),this._viewer=e,this._viewer.scene.globe.clippingPlanes=this._planeCollection,this._height=5,this._layer=new r.PrimitiveCollection,this._viewer.scene.primitives.add(this._layer)}get height(){return this._height}set height(e){this._height=e,this._layer.removeAll(),this._drawPrimitive()}_enableHook(){this._layer.show=this._enable}_drawPrimitive(){if(this._planeCollection.length)if(this._createBottomPolygon(),this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof r.EllipsoidTerrainProvider)){let e=[],i=this._positions.length,s=this._options.lerpInterval;for(let a=0;a<i;a++){let o=(a+1)%i,n=y.transformWGS84ToCartographic(this._positions[a]),h=y.transformWGS84ToCartographic(this._positions[o]);for(let c=0;c<s;c++){let d=r.Math.lerp(n.longitude,h.longitude,c/s),p=r.Math.lerp(n.latitude,h.latitude,c/s);e.push(new r.Cartographic(d,p))}}r.sampleTerrainMostDetailed(this._viewer.terrainProvider,e).then(a=>{this._createSideWall(a.map(o=>r.Cartesian3.fromRadians(o.longitude,o.latitude)),a.map(o=>o.height))})}else this._createSideWall(this._positions.map(e=>y.transformWGS84ToCartesian(e)),this._positions.map(e=>e.alt))}_mountPlanes(){this._layer.removeAll(),this._planeCollection.removeAll(),this.computeGlobePlanes().forEach(i=>{this._planeCollection.add(i)}),this._drawPrimitive()}_getMinHeight(){let e=this._positions[0].alt;return this._positions.forEach(i=>{e=Math.min(e,i.alt)}),e-this._height}_createBottomPolygon(){let e=this._getMinHeight(),i=this._positions.map(o=>({lng:o.lng,lat:o.lat,alt:e})),s=new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(i)),perPositionHeight:!0}),a=r.PolygonGeometry.createGeometry(s);this._layer.add(new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:a}),appearance:new r.MaterialAppearance({material:r.Material.fromType(r.Material.ImageType,{image:this._options.bottomImage,repeat:new r.Cartesian2(5,5)})}),asynchronous:!1}))}_createSideWall(e,i){let s=this._getMinHeight(),a=e.map(()=>s),o=new r.WallGeometry({positions:e.concat(e[0]),maximumHeights:a.concat(a[0]),minimumHeights:i.concat(i[0])}),n=r.WallGeometry.createGeometry(o);this._layer.add(new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:n}),appearance:new r.MaterialAppearance({material:r.Material.fromType(r.Material.ImageType,{image:this._options.sideImage,repeat:new r.Cartesian2(5,5)})}),asynchronous:!1}))}},Cu=ol;var nl=class extends dt{constructor(e,i={}){super(i),this._tileset=e,this._delegate=this._tileset.readyPromise}_mountPlanes(){this._planeCollection.removeAll(),this._delegate.then(e=>{let i=e.root.transform,s=this.computeModelPlanes(i);this._planeCollection.modelMatrix=i,s.forEach(a=>{this._planeCollection.add(a)}),e.clippingPlanes=this._planeCollection})}computePlanes(){}},Tu=nl;var hg={disappearHeight:1e3,disappearSeconds:.5,appearSeconds:.5},ll=class{constructor(e,i=[],s={}){this._viewer=e,this._models=i.map(a=>a.delegate||a)||[],this._options={...hg,...s},this._oriPositions=this._models.map(a=>a.position.getValue(r.JulianDate.now()))||[],this._spreadtPositions=[],this._lastPositions=[],this._currentIndex=-1}get models(){return this._models}set models(e){this._models=e.map(i=>i.delegate||i)||[],this._oriPositions=this._models.map(i=>i.position.getValue(r.JulianDate.now()))||[],this._spreadtPositions=[],this._lastPositions=[],this._currentIndex=-1}spread(e,i=2,s=r.ExtrapolationType.HOLD){if(e<=0)return this;let a=r.JulianDate.now();return this._models.forEach((o,n)=>{let h=o.position.getValue(a);if(h){let c=new r.SampledPositionProperty;c.forwardExtrapolationType=s;let d=r.Cartographic.fromCartesian(h);d.height+=e*n,c.addSample(r.JulianDate.addSeconds(a,-1,new r.JulianDate),h),c.addSample(r.JulianDate.addSeconds(a,i,new r.JulianDate),r.Cartographic.toCartesian(d)),o.position=c,this._spreadtPositions[n]=r.Cartographic.toCartesian(d)}else{let c=r.Cartographic.fromCartesian(this._spreadtPositions[n]||this._oriPositions[n]);c.height+=e*n,this._spreadtPositions[n]=r.Cartographic.toCartesian(c)}}),this}combine(e=2){let i=r.JulianDate.now();return this._models.forEach((s,a)=>{let o=s.position.getValue(i);if(this._spreadtPositions[a]&&o){let n=new r.SampledPositionProperty;n.forwardExtrapolationType=r.ExtrapolationType.HOLD,n.addSample(r.JulianDate.addSeconds(i,-1,new r.JulianDate),this._spreadtPositions[a]),n.addSample(r.JulianDate.addSeconds(i,e,new r.JulianDate),this._oriPositions[a]),s.position=n}}),this._currentIndex=-1,this._spreadtPositions=[],this._lastPositions=[],this}showModel(e){if(e>this._models.length-1||this._currentIndex===e)return this;let i=r.JulianDate.now(),s=this._models.length;return this._models.forEach((a,o)=>{let n=a.position.getValue(i),h=new r.SampledPositionProperty;if(o>e&&(h.forwardExtrapolationType=r.ExtrapolationType.NONE,n)){let c=r.Cartographic.fromCartesian(n);c.height+=this._options.disappearHeight/s*(o+1),h.addSample(r.JulianDate.addSeconds(i,-1,new r.JulianDate),n),h.addSample(r.JulianDate.addSeconds(i,this._options.disappearSeconds,new r.JulianDate),r.Cartographic.toCartesian(c)),t.position=h,this._lastPositions[o]=r.Cartographic.toCartesian(c)}!n&&e>=o&&(h.forwardExtrapolationType=r.ExtrapolationType.HOLD,h.addSample(r.JulianDate.addSeconds(i,-1,new r.JulianDate),this._lastPositions[o]),h.addSample(r.JulianDate.addSeconds(i,this._options.appearSeconds,new r.JulianDate),this._spreadtPositions[o]||this._oriPositions[o]),t.position=h,this._lastPositions[o]=this._spreadtPositions[o]||this._oriPositions[o])}),this._currentIndex=e,this}restore(){return this._models.forEach((e,i)=>{e.position=this._oriPositions[i]}),this._currentIndex=-1,this._lastPositions=[],this._spreadtPositions=[],this}},Eu=ll;var hl=class{static pointBuffer(e,i,s=8){var h;let a=ne("turf");if(!a)throw"missing turf";let o=a.point(v.parsePointCoordToArray(e)),n=a.buffer(o,i,{units:"meters",steps:s});return((h=n==null?void 0:n.geometry)==null?void 0:h.coordinates[0])||[]}static polylineBuffer(e,i,s=8){var h;let a=ne("turf");if(!a)throw"missing turf";let o=a.lineString(v.parsePolylineCoordToArray(e)),n=a.buffer(o,i,{units:"meters",steps:s});return((h=n==null?void 0:n.geometry)==null?void 0:h.coordinates[0])||[]}static polygonBuffer(e,i,s=8){var h;let a=ne("turf");if(!a)throw"missing turf";let o=a.polygon(v.parsePolygonCoordToArray(e,!0)),n=a.buffer(o,i,{units:"meters",steps:s});return((h=n==null?void 0:n.geometry)==null?void 0:h.coordinates[0])||[]}static sector(e,i,s,a,o=64){var d;let n=ne("turf");if(!n)throw"missing turf";let h=n.point(v.parsePointCoordToArray(e)),c=n.sector(h,i,s,a,{units:"meters",steps:o});return((d=c==null?void 0:c.geometry)==null?void 0:d.coordinates[0])||[]}static transformPolylineScale(e,i){var n;let s=ne("turf");if(!s)throw"missing turf";let a=s.lineString(v.parsePolylineCoordToArray(e)),o=s.transformScale(a,i);return((n=o==null?void 0:o.geometry)==null?void 0:n.coordinates)||[]}static transformPolygonScale(e,i){var n;let s=ne("turf");if(!s)throw"missing turf";let a=s.polygon(v.parsePolygonCoordToArray(e,!0)),o=s.transformScale(a,i);return((n=o==null?void 0:o.geometry)==null?void 0:n.coordinates[0])||[]}static transformPolylineRotate(e,i){var n;let s=ne("turf");if(!s)throw"missing turf";let a=s.lineString(v.parsePolylineCoordToArray(e)),o=s.transformRotate(a,i);return((n=o==null?void 0:o.geometry)==null?void 0:n.coordinates)||[]}static transformPolygonRotate(e,i){var n;let s=ne("turf");if(!s)throw"missing turf";let a=s.polygon(v.parsePolygonCoordToArray(e,!0)),o=s.transformRotate(a,i);return((n=o==null?void 0:o.geometry)==null?void 0:n.coordinates[0])||[]}},Pu=hl;import{NearFarScalar as LG}from"cesium";var RG=r.Cartesian2,OG=r.Cartesian3,kG=r.Matrix3,NG=r.Matrix4,zG=r.Material,FG=r.SceneMode,GG=r.SkyBox,HG=r.Color,WG=r.Rectangle,BG=r.ShadowMode,UG=r.JulianDate,VG=r.HeightReference,ZG=r.HorizontalOrigin,jG=r.VerticalOrigin,YG=r.CallbackProperty,qG=r.ClassificationType,XG=r.Cesium3DTileStyle,JG=r.GeographicTilingScheme,QG=r.WebMercatorTilingScheme,KG=r.ColorMaterialProperty,$G=r.ImageMaterialProperty,eH=r.PolylineDashMaterialProperty,tH=r.PolylineGlowMaterialProperty,iH=r.PolylineOutlineMaterialProperty,rH=r.PolylineArrowMaterialProperty,sH=r.writeTextToCanvas,aH=r.CustomShaderMode,oH=r.CustomShaderTranslucencyMode,nH=r.CustomShader,lH=r.UniformType,hH=r.Ellipsoid,cH=r.Resource,dH=r.createGooglePhotorealistic3DTileset,pH=r.createElevationBandMaterial,mH=r.ModelAnimationLoop,uH=r.ClippingPlane,fH=r.ClippingPlaneCollection,_H=r.ClippingPolygon,gH=r.ClippingPolygonCollection,yH=r.UrlTemplateImageryProvider,vH=r.WebMercatorProjection,wH=r.WebMapServiceImageryProvider,xH=r.FeatureDetection,CH=r.TextureUniform,TH=r.LightingModel;globalThis.__cmdOut=()=>{window.setTimeout(console.log.bind(console,`
|
|
3896
|
+
`;var Og={visibleColor:new r.Color(0,1,0,1),disVisibleColor:new r.Color(1,0,0,1),showHelp:!1,mixNum:1,gridColor:r.Color.YELLOW,lineColor:r.Color.YELLOW.withAlpha(.3)},ul=class{constructor(e){this._viewer=e,this._frustum=void 0,this._camera=void 0,this._viewShadowMap=void 0,this._delegate=void 0,this._options={},this._linePrimitive=void 0,this._ellipsoidPrimitive=void 0,this._viewer.scene.primitives.add(this)}_updateCameraState(e){let i=y.transformWGS84ToCartesian(e),s=le.getViewPosition(e,this._frustum.far);this._viewer&&(this._camera||(this._camera=new r.Camera(this._viewer.scene)),this._camera.frustum=this._frustum,le.setCamera(this._camera,i,s,e.roll))}_updateHelpPrimitive(e){this._viewer.scene.primitives.remove(this._ellipsoidPrimitive),this._viewer.scene.primitives.remove(this._linePrimitive);let i=r.Transforms.headingPitchRollToFixedFrame(y.transformWGS84ToCartesian(e),new r.HeadingPitchRoll((-Math.PI+this._frustum.fov)/2+r.Math.toRadians(e.heading),r.Math.toRadians(e.pitch),r.Math.toRadians(e.roll))),s=new r.Cartesian3(this._frustum.far,this._frustum.far,this._frustum.far),o=new r.EllipsoidOutlineGeometry({radii:s,innerRadii:r.Cartesian3.divideByScalar(s,20,new r.Cartesian3),minimumClock:0,maximumClock:this._frustum.fov,minimumCone:(Math.PI-this._frustum.fovy)/2,maximumCone:r.Math.toRadians(110)});this._linePrimitive=this._viewer.scene.primitives.add(new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:o,attributes:{color:r.ColorGeometryInstanceAttribute.fromColor(this._options.lineColor)}}),appearance:new r.PerInstanceColorAppearance({flat:!0,renderState:{lineWidth:Math.min(2,this._viewer.scene.maximumAliasedLineWidth)}}),modelMatrix:i})),o=new r.EllipsoidGeometry({radii:s,minimumClock:0,maximumClock:this._frustum.fov,minimumCone:(Math.PI-this._frustum.fovy)/2,maximumCone:r.Math.toRadians(110)}),this._ellipsoidPrimitive=this._viewer.scene.primitives.add(new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:o}),appearance:new r.MaterialAppearance({translucent:!1,material:r.Material.fromType(r.Material.GridType,{color:this._options.gridColor,lineCount:new r.Cartesian2(200,200)})}),modelMatrix:i}))}_createPostProcessStage(){return new r.PostProcessStage({fragmentShader:tm,uniforms:{czzj:()=>r.Math.toDegrees(this._frustum.fovy),dis:()=>this._frustum.far,spzj:()=>r.Math.toDegrees(this._frustum.fov),visibleColor:()=>this._options.visibleColor,disVisibleColor:()=>this._options.disVisibleColor,mixNum:()=>this._options.mixNum,stcshadow:()=>this._viewShadowMap._shadowMapTexture,_shadowMap_matrix:()=>this._viewShadowMap._shadowMapMatrix,shadowMap_lightPositionEC:()=>this._viewShadowMap._lightPositionEC,shadowMap_lightDirectionEC:()=>this._viewShadowMap._lightDirectionEC,shadowMap_lightUp:()=>this._viewShadowMap._lightCamera.up,shadowMap_lightDir:()=>this._viewShadowMap._lightCamera.direction,shadowMap_lightRight:()=>this._viewShadowMap._lightCamera.right,shadowMap_texelSizeDepthBiasAndNormalShadingSmooth:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return r.Cartesian4.fromElements(1/this._viewShadowMap._textureSize.x,1/this._viewShadowMap._textureSize.y,e.depthBias,e.normalShadingSmooth,new r.Cartesian4)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return r.Cartesian4.fromElements(e.normalOffsetScale,this._viewShadowMap._distance,this._viewShadowMap.maximumDistance,this._viewShadowMap._darkness,new r.Cartesian4)}}})}update(){this._viewShadowMap&&this._viewer.scene.frameState.shadowMaps.push(this._viewShadowMap)}start(e,i,s,o,a={}){return this._options={...Og,...a},this._frustum=new r.PerspectiveFrustum({fov:r.Math.toRadians(s),aspectRatio:o,far:i,near:.05}),e=v.parsePosition(e),this._updateCameraState(e),this._viewShadowMap=new r.ShadowMap({lightCamera:this._camera,enable:!1,isPointLight:!1,isSpotLight:!0,cascadesEnabled:!1,context:this._viewer.scene.context,pointLightRadius:this._frustum.far,darkness:1}),this._delegate||(this._delegate=this._createPostProcessStage(),this._viewer.scene.postProcessStages.add(this._delegate),this._delegate.enabled=!0),this._options.showHelp?this._updateHelpPrimitive(e):(this._ellipsoidPrimitive&&this._viewer.scene.primitives.remove(this._ellipsoidPrimitive),this._linePrimitive&&this._viewer.scene.primitives.remove(this._linePrimitive),this._ellipsoidPrimitive=void 0,this._linePrimitive=void 0),this}isDestroyed(){return!1}stop(){return this._delegate&&this._viewer.scene.postProcessStages.remove(this._delegate),this._ellipsoidPrimitive&&this._viewer.scene.primitives.remove(this._ellipsoidPrimitive),this._linePrimitive&&this._viewer.scene.primitives.remove(this._linePrimitive),this._delegate=void 0,this._ellipsoidPrimitive=void 0,this._linePrimitive=void 0,this._viewShadowMap=void 0,this._frustum=void 0,this}},fl=ul;var kg={CONTOUR_LINE:"ContourLine",SHADOWS:"Shadows",SIGHT_CIRCLE:"SightCircle",SIGHT_LINE:"SightLine",VIEWSHED:"Viewshed"},Je=kg;var _l=class{constructor(e){this._contourLine=new hl(e),this._shadows=new dl(e),this._sightLine=new ml(e),this._viewshed=new fl(e)}contourLine(e,i,s){return this._contourLine.start(e,i,s),this}shadows(e,i){return this._shadows.start(e||new Date,i||1600),this}sightLine(e,i,s=[],o=10){return!e||!i?this:(this._sightLine.start(e,i,s.map(a=>a.delegate||a),o),this)}sightCircle(e,i,s,o=10){if(!e||!i)return this;let a=r.EllipseGeometryLibrary.computeEllipsePositions({center:y.transformWGS84ToCartesian(e),semiMajorAxis:+i,semiMinorAxis:+i,rotation:0,granularity:.03},!1,!0);return r.Cartesian3.unpackArray(a.outerPositions).forEach(h=>{this.sightLine(e,y.transformCartesianToWGS84(h),s||[],o)}),this}viewshed(e,i,s,o=1.3,a={}){return!e||!i||!s?this:(this._viewshed.start(e,i,s,o,a),this)}deactivate(e){switch(e){case Je.CONTOUR_LINE:this._contourLine.stop();break;case Je.SHADOWS:this._shadows.stop();break;case Je.SIGHT_CIRCLE:case Je.SIGHT_LINE:this._sightLine.stop();break;case Je.VIEWSHED:this._viewshed.stop();break;default:this._contourLine.stop(),this._shadows.stop(),this._sightLine.stop(),this._viewshed.stop();break}return this}},zg=_l;var Ng={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",FRONT:"front",BACK:"back",NONE:"none"},ke=Ng;var Fg={edgeWidth:0,edgeColor:r.Color.WHITE,unionClippingRegions:!1},gl=class{constructor(e={}){this._options={...Fg,...e},this._direction=void 0,this._distance=0,this._angle=0,this._positions=void 0,this._planeCollection=new r.ClippingPlaneCollection({edgeWidth:this._options.edgeWidth,edgeColor:this._options.edgeColor,unionClippingRegions:this._options.unionClippingRegions}),this._enable=!1}get positions(){return this._positions}set positions(e){this._positions=v.parsePositions(e),this._direction=void 0,this._mountPlanes()}get direction(){return this._direction}set direction(e){this._positions=[],this._direction=e,this._mountPlanes()}get distance(){return this._distance}set distance(e){this._distance=+e,this._planeCollection._planes.forEach(i=>{i.distance=+e})}get angle(){return this._angle}set angle(e){this._angle=+e,this._planeCollection._planes.forEach(i=>{if(e){let s=r.Matrix3.fromRotationZ(r.Math.toRadians(+e));r.Matrix3.multiplyByVector(s,i.normal,i.normal)}})}get enable(){return this._enable}set enable(e){this._enable!==e&&(this._enable=e,this._planeCollection.enabled=this._enable,this._state=this._enable?_.ENABLED:_.DISABLED,this._enableHook&&this._enableHook())}get state(){return this._state}_enableHook(){}_mountPlanes(){}_getDirectionNoraml(e){let i;switch(e){case ke.UP:i=new r.Cartesian3(0,0,1);break;case ke.DOWN:i=new r.Cartesian3(0,0,-1);break;case ke.LEFT:i=new r.Cartesian3(-1,0,0);break;case ke.RIGHT:i=new r.Cartesian3(1,0,0);break;case ke.FRONT:i=new r.Cartesian3(0,-1,0);break;case ke.BACK:i=new r.Cartesian3(0,1,0);break;default:break}return i}_isCcw(e){if(!e||e.length<3)return!1;let i=y.transformWGS84ToCartesian(this._positions[0]),s=y.transformWGS84ToCartesian(this._positions[1]),o=y.transformWGS84ToCartesian(this._positions[2]);return(o.y-s.y)*(s.x-i.x)-(s.y-i.y)*(o.x-s.x)>0}computeGlobePlanes(){let e=[];if(this._positions&&this._positions.length>=3){let i=this._isCcw(this._positions),s=this._positions.length;for(let o=0;o<s;o++){let a=(o+1)%s;if(this._positions[o].lng===this._positions[a].lng&&this._positions[o].lat===this._positions[a].lat&&this._positions[o].alt===this._positions[a].lat)continue;let n=y.transformWGS84ToCartesian(this._positions[o]),h=y.transformWGS84ToCartesian(this._positions[a]),c=r.Cartesian3.cross(n,i?r.Cartesian3.subtract(n,h,new r.Cartesian3):r.Cartesian3.subtract(h,n,new r.Cartesian3),new r.Cartesian3);r.Cartesian3.normalize(c,c),e.push(new r.ClippingPlane(c,this._distance||0))}}return e}computeModelPlanes(e){let i=[],s=r.Matrix4.inverseTransformation(e,new r.Matrix4);if(this._positions&&this._positions.length===2){let o=r.Cartesian3.UNIT_Z,a=r.Matrix4.multiplyByPoint(s,y.transformWGS84ToCartesian(this._positions[0]),new r.Cartesian3),n=r.Matrix4.multiplyByPoint(s,y.transformWGS84ToCartesian(this._positions[1]),new r.Cartesian3),h=r.Cartesian3.subtract(n,a,new r.Cartesian3);r.Cartesian3.normalize(h,h);let c=r.Cartesian3.cross(o,h,new r.Cartesian3);i.push(new r.ClippingPlane(c,this._distance||0))}else if(this._positions&&this._positions.length>=3){let o=r.Cartesian3.UNIT_Z,a=this._isCcw(this._positions),n=this._positions.length;for(let h=0;h<n;h++){let c=(h+1)%n;if(this._positions[h].lng===this._positions[c].lng&&this._positions[h].lat===this._positions[c].lat&&this._positions[h].alt===this._positions[c].lat)continue;let d=r.Matrix4.multiplyByPoint(s,y.transformWGS84ToCartesian(this._positions[h]),new r.Cartesian3),p=r.Matrix4.multiplyByPoint(s,y.transformWGS84ToCartesian(this._positions[c]),new r.Cartesian3),f=r.Cartesian3.cross(o,r.Cartesian3.normalize(a?r.Cartesian3.subtract(d,p,new r.Cartesian3):r.Cartesian3.subtract(p,d,new r.Cartesian3),new r.Cartesian3),new r.Cartesian3);i.push(new r.ClippingPlane(f,this._distance||0))}}else if(this._direction&&this._direction!==ke.NONE){let o=this._getDirectionNoraml(this._direction);if(this._angle){let a=r.Matrix3.fromRotationZ(r.Math.toRadians(this._angle));r.Matrix3.multiplyByVector(a,o,o)}o&&i.push(new r.ClippingPlane(o,this._distance||0))}return i}},nt=gl;var yl=class extends nt{constructor(e,i={}){super(i),this._viewer=e,this._planeCollection.unionClippingRegions=!0,this._viewer.scene.globe.clippingPlanes=this._planeCollection}_mountPlanes(){let e=this.computeGlobePlanes();this._planeCollection.removeAll(),e.forEach(i=>{this._planeCollection.add(i)})}},Wg=yl;var Gg={lerpInterval:50,bottomImage:"",sideImage:""},vl=class extends nt{constructor(e,i={}){super({...Gg,...i}),this._viewer=e,this._viewer.scene.globe.clippingPlanes=this._planeCollection,this._height=5,this._layer=new r.PrimitiveCollection,this._viewer.scene.primitives.add(this._layer)}get height(){return this._height}set height(e){this._height=e,this._layer.removeAll(),this._drawPrimitive()}_enableHook(){this._layer.show=this._enable}_drawPrimitive(){if(this._planeCollection.length)if(this._createBottomPolygon(),this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof r.EllipsoidTerrainProvider)){let e=[],i=this._positions.length,s=this._options.lerpInterval;for(let o=0;o<i;o++){let a=(o+1)%i,n=y.transformWGS84ToCartographic(this._positions[o]),h=y.transformWGS84ToCartographic(this._positions[a]);for(let c=0;c<s;c++){let d=r.Math.lerp(n.longitude,h.longitude,c/s),p=r.Math.lerp(n.latitude,h.latitude,c/s);e.push(new r.Cartographic(d,p))}}r.sampleTerrainMostDetailed(this._viewer.terrainProvider,e).then(o=>{this._createSideWall(o.map(a=>r.Cartesian3.fromRadians(a.longitude,a.latitude)),o.map(a=>a.height))})}else this._createSideWall(this._positions.map(e=>y.transformWGS84ToCartesian(e)),this._positions.map(e=>e.alt))}_mountPlanes(){this._layer.removeAll(),this._planeCollection.removeAll(),this.computeGlobePlanes().forEach(i=>{this._planeCollection.add(i)}),this._drawPrimitive()}_getMinHeight(){let e=this._positions[0].alt;return this._positions.forEach(i=>{e=Math.min(e,i.alt)}),e-this._height}_createBottomPolygon(){let e=this._getMinHeight(),i=this._positions.map(a=>({lng:a.lng,lat:a.lat,alt:e})),s=new r.PolygonGeometry({polygonHierarchy:new r.PolygonHierarchy(y.transformWGS84ArrayToCartesianArray(i)),perPositionHeight:!0}),o=r.PolygonGeometry.createGeometry(s);this._layer.add(new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:o}),appearance:new r.MaterialAppearance({material:r.Material.fromType(r.Material.ImageType,{image:this._options.bottomImage,repeat:new r.Cartesian2(5,5)})}),asynchronous:!1}))}_createSideWall(e,i){let s=this._getMinHeight(),o=e.map(()=>s),a=new r.WallGeometry({positions:e.concat(e[0]),maximumHeights:o.concat(o[0]),minimumHeights:i.concat(i[0])}),n=r.WallGeometry.createGeometry(a);this._layer.add(new r.Primitive({geometryInstances:new r.GeometryInstance({geometry:n}),appearance:new r.MaterialAppearance({material:r.Material.fromType(r.Material.ImageType,{image:this._options.sideImage,repeat:new r.Cartesian2(5,5)})}),asynchronous:!1}))}},Hg=vl;var wl=class extends nt{constructor(e,i={}){super(i),this._tileset=e,this._delegate=this._tileset.readyPromise}_mountPlanes(){this._planeCollection.removeAll(),this._delegate.then(e=>{let i=e.root.transform,s=this.computeModelPlanes(i);this._planeCollection.modelMatrix=i,s.forEach(o=>{this._planeCollection.add(o)}),e.clippingPlanes=this._planeCollection})}computePlanes(){}},Bg=wl;var Ug={disappearHeight:1e3,disappearSeconds:.5,appearSeconds:.5},Cl=class{constructor(e,i=[],s={}){this._viewer=e,this._models=i.map(o=>o.delegate||o)||[],this._options={...Ug,...s},this._oriPositions=this._models.map(o=>o.position.getValue(r.JulianDate.now()))||[],this._spreadtPositions=[],this._lastPositions=[],this._currentIndex=-1}get models(){return this._models}set models(e){this._models=e.map(i=>i.delegate||i)||[],this._oriPositions=this._models.map(i=>i.position.getValue(r.JulianDate.now()))||[],this._spreadtPositions=[],this._lastPositions=[],this._currentIndex=-1}spread(e,i=2,s=r.ExtrapolationType.HOLD){if(e<=0)return this;let o=r.JulianDate.now();return this._models.forEach((a,n)=>{let h=a.position.getValue(o);if(h){let c=new r.SampledPositionProperty;c.forwardExtrapolationType=s;let d=r.Cartographic.fromCartesian(h);d.height+=e*n,c.addSample(r.JulianDate.addSeconds(o,-1,new r.JulianDate),h),c.addSample(r.JulianDate.addSeconds(o,i,new r.JulianDate),r.Cartographic.toCartesian(d)),a.position=c,this._spreadtPositions[n]=r.Cartographic.toCartesian(d)}else{let c=r.Cartographic.fromCartesian(this._spreadtPositions[n]||this._oriPositions[n]);c.height+=e*n,this._spreadtPositions[n]=r.Cartographic.toCartesian(c)}}),this}combine(e=2){let i=r.JulianDate.now();return this._models.forEach((s,o)=>{let a=s.position.getValue(i);if(this._spreadtPositions[o]&&a){let n=new r.SampledPositionProperty;n.forwardExtrapolationType=r.ExtrapolationType.HOLD,n.addSample(r.JulianDate.addSeconds(i,-1,new r.JulianDate),this._spreadtPositions[o]),n.addSample(r.JulianDate.addSeconds(i,e,new r.JulianDate),this._oriPositions[o]),s.position=n}}),this._currentIndex=-1,this._spreadtPositions=[],this._lastPositions=[],this}showModel(e){if(e>this._models.length-1||this._currentIndex===e)return this;let i=r.JulianDate.now(),s=this._models.length;return this._models.forEach((o,a)=>{let n=o.position.getValue(i),h=new r.SampledPositionProperty;if(a>e&&(h.forwardExtrapolationType=r.ExtrapolationType.NONE,n)){let c=r.Cartographic.fromCartesian(n);c.height+=this._options.disappearHeight/s*(a+1),h.addSample(r.JulianDate.addSeconds(i,-1,new r.JulianDate),n),h.addSample(r.JulianDate.addSeconds(i,this._options.disappearSeconds,new r.JulianDate),r.Cartographic.toCartesian(c)),t.position=h,this._lastPositions[a]=r.Cartographic.toCartesian(c)}!n&&e>=a&&(h.forwardExtrapolationType=r.ExtrapolationType.HOLD,h.addSample(r.JulianDate.addSeconds(i,-1,new r.JulianDate),this._lastPositions[a]),h.addSample(r.JulianDate.addSeconds(i,this._options.appearSeconds,new r.JulianDate),this._spreadtPositions[a]||this._oriPositions[a]),t.position=h,this._lastPositions[a]=this._spreadtPositions[a]||this._oriPositions[a])}),this._currentIndex=e,this}restore(){return this._models.forEach((e,i)=>{e.position=this._oriPositions[i]}),this._currentIndex=-1,this._lastPositions=[],this._spreadtPositions=[],this}},Vg=Cl;var xl=class{static pointBuffer(e,i,s=8){var h;let o=ce("turf");if(!o)throw"missing turf";let a=o.point(v.parsePointCoordToArray(e)),n=o.buffer(a,i,{units:"meters",steps:s});return((h=n==null?void 0:n.geometry)==null?void 0:h.coordinates[0])||[]}static polylineBuffer(e,i,s=8){var h;let o=ce("turf");if(!o)throw"missing turf";let a=o.lineString(v.parsePolylineCoordToArray(e)),n=o.buffer(a,i,{units:"meters",steps:s});return((h=n==null?void 0:n.geometry)==null?void 0:h.coordinates[0])||[]}static polygonBuffer(e,i,s=8){var h;let o=ce("turf");if(!o)throw"missing turf";let a=o.polygon(v.parsePolygonCoordToArray(e,!0)),n=o.buffer(a,i,{units:"meters",steps:s});return((h=n==null?void 0:n.geometry)==null?void 0:h.coordinates[0])||[]}static sector(e,i,s,o,a=64){var d;let n=ce("turf");if(!n)throw"missing turf";let h=n.point(v.parsePointCoordToArray(e)),c=n.sector(h,i,s,o,{units:"meters",steps:a});return((d=c==null?void 0:c.geometry)==null?void 0:d.coordinates[0])||[]}static transformPolylineScale(e,i){var n;let s=ce("turf");if(!s)throw"missing turf";let o=s.lineString(v.parsePolylineCoordToArray(e)),a=s.transformScale(o,i);return((n=a==null?void 0:a.geometry)==null?void 0:n.coordinates)||[]}static transformPolygonScale(e,i){var n;let s=ce("turf");if(!s)throw"missing turf";let o=s.polygon(v.parsePolygonCoordToArray(e,!0)),a=s.transformScale(o,i);return((n=a==null?void 0:a.geometry)==null?void 0:n.coordinates[0])||[]}static transformPolylineRotate(e,i){var n;let s=ce("turf");if(!s)throw"missing turf";let o=s.lineString(v.parsePolylineCoordToArray(e)),a=s.transformRotate(o,i);return((n=a==null?void 0:a.geometry)==null?void 0:n.coordinates)||[]}static transformPolygonRotate(e,i){var n;let s=ce("turf");if(!s)throw"missing turf";let o=s.polygon(v.parsePolygonCoordToArray(e,!0)),a=s.transformRotate(o,i);return((n=a==null?void 0:a.geometry)==null?void 0:n.coordinates[0])||[]}},Zg=xl;import{NearFarScalar as vH}from"cesium";var CH=r.Cartesian2,xH=r.Cartesian3,TH=r.Matrix3,EH=r.Matrix4,PH=r.Material,bH=r.SceneMode,MH=r.SkyBox,AH=r.Color,SH=r.Rectangle,IH=r.ShadowMode,LH=r.JulianDate,DH=r.HeightReference,RH=r.HorizontalOrigin,OH=r.VerticalOrigin,kH=r.CallbackProperty,zH=r.ClassificationType,NH=r.Cesium3DTileStyle,FH=r.GeographicTilingScheme,WH=r.WebMercatorTilingScheme,GH=r.ColorMaterialProperty,HH=r.ImageMaterialProperty,BH=r.PolylineDashMaterialProperty,UH=r.PolylineGlowMaterialProperty,VH=r.PolylineOutlineMaterialProperty,ZH=r.PolylineArrowMaterialProperty,jH=r.writeTextToCanvas,YH=r.CustomShaderMode,qH=r.CustomShaderTranslucencyMode,XH=r.CustomShader,JH=r.UniformType,QH=r.Ellipsoid,KH=r.Resource,$H=r.createGooglePhotorealistic3DTileset,eB=r.createElevationBandMaterial,tB=r.ModelAnimationLoop,iB=r.ClippingPlane,rB=r.ClippingPlaneCollection,sB=r.ClippingPolygon,oB=r.ClippingPolygonCollection,aB=r.UrlTemplateImageryProvider,nB=r.WebMercatorProjection,lB=r.WebMapServiceImageryProvider,hB=r.FeatureDetection,cB=r.TextureUniform,dB=r.LightingModel;globalThis.__cmdOut=()=>{window.setTimeout(console.clear.bind(console,"")),window.setTimeout(console.log.bind(console,`
|
|
3276
3897
|
%c \u{1F30D} \u76D8\u53E4 Gis SDK
|
|
3277
3898
|
|
|
3278
3899
|
%c \u76D8\u53E4\u5730\u7406\u4FE1\u606F\u7CFB\u7EDF
|
|
3279
3900
|
%c PanGu Gis For Cesium SDK
|
|
3280
3901
|
%c \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500
|
|
3281
|
-
%c \u{1F680} \u7248\u672C: %c5.1.
|
|
3902
|
+
%c \u{1F680} \u7248\u672C: %c5.1.25 - 2025-11-05
|
|
3282
3903
|
%c \u{1F310} EUM\u7248\u672C\uFF1A%c1.131.0
|
|
3283
3904
|
%c \u{1F468}\u200D\u{1F4BB} \u5F00\u53D1\u4F5C\u8005: %cLucas Xu <xulei0857@qq.com>
|
|
3284
3905
|
%c \u{1F4DC} \u6388\u6743\uFF1A%c\u667A\u4F01\u534E\u7AE0-\u6C38\u4E45\u4F7F\u7528\u6B64\u8F6F\u4EF6\u5F53\u524D\u7248\u672C\u3002
|
|
@@ -3287,4 +3908,4 @@ void main() {\r
|
|
|
3287
3908
|
%c \u{1F3E0} \u5B98\u7F51: %chttps://www.pggis.com
|
|
3288
3909
|
|
|
3289
3910
|
%c
|
|
3290
|
-
`,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var
|
|
3911
|
+
`,'font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #008AFF; text-align: center;','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 24px; font-weight: 600; color: #F08519; text-align: center; ','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 16px; font-weight: 600; color: #FFC712; text-align: center;font-style:oblique','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #718096; text-align: center; letter-spacing: 0.5px; padding: 4px 0','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #4A5568; font-weight: 600','font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif; font-size: 14px; color: #282829',"font-family: monospace; font-size: 14px; color: transparent"))};var sm="./libs/pg-sdk/resources/",im=sm,rm=!1;Be("baseUrl",sm);var uB={set baseUrl(l){im=l,Be("baseUrl",l)},get baseUrl(){return im}};function fB(l={}){return rm?Promise.resolve():new Promise((e,i)=>{l.baseUrl&&(this.config.baseUrl=l.baseUrl),l.cesium&&Qe("cesium",l.Cesium),l.echarts&&Qe("echarts",l.echarts),l.turf&&Qe("turf",l.turf),rm=!0,Be("isInitialized",!0),Be("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)})}var _B="5.1.25";export{zg as Analysis,Je as AnalysisType,de as Animation,ee as AnimationType,K0 as AroundPoint,Q0 as AroundView,wt as AttackArrow,is as BaseLayerPicker,qt as BezierCurve,Ct as Billboard,Co as BillboardPrimitive,gf as BounceBillboardPrimitive,yf as BounceLabelPrimitive,Rf as Box,kH as CallbackProperty,le as CameraUtil,Ag as CameraVideo,a_ as CameraVideoLayer,CH as Cartesian2,xH as Cartesian3,Dg as ChartLayer,Ho as Circle,s0 as CircleBlurMaterialProperty,o0 as CircleDiffuseMaterialProperty,a0 as CircleFadeMaterialProperty,n0 as CirclePulseMaterialProperty,eg as CircleScan,l0 as CircleScanMaterialProperty,h0 as CircleSpiralMaterialProperty,c0 as CircleVaryMaterialProperty,d0 as CircleWaveMaterialProperty,zH as ClassificationType,ke as ClippingDirection,iB as ClippingPlane,rB as ClippingPlaneCollection,sB as ClippingPolygon,oB as ClippingPolygonCollection,vf as CloudPrimitive,Ku as ClusterLayer,AH as Color,GH as ColorMaterialProperty,hl as ContourLine,xe as CoordTransform,Of as Corridor,of as CustomBillboard,au as CustomGeographicTilingScheme,af as CustomLabel,nu as CustomMercatorTilingScheme,XH as CustomShader,YH as CustomShaderMode,qH as CustomShaderTranslucencyMode,kf as Cylinder,$u as CzmlLayer,Cf as DiffuseWallPrimitive,pf as DivIcon,mf as DivPlane,D as DomUtil,mo as DoubleArrow,nf as DynamicBillboard,ef as DynamicLayer,lf as DynamicModel,ng as Effect,xf as ElecEllipsoidPrimitive,zf as Ellipse,QH as Ellipsoid,p0 as EllipsoidElectricMaterialProperty,m0 as EllipsoidTrailMaterialProperty,$ as Event,hB as FeatureDetection,rf as FeatureGridLayer,fo as FineArrow,Tf as FlowLinePrimitive,tg as Flying,go as GatheringPlace,Xt as GeoJsonLayer,vt as GeoTerrainProvider,Zg as GeoTools,FH as GeographicTilingScheme,Wg as GlobeClipping,ig as GlobeRotate,Bf as GpxLayer,Vf as GraticuleLayer,Zf as GroundPrimitiveLayer,Qm as GroundSkyBox,Kf as HeatMapLayer,DH as HeightReference,RH as HorizontalOrigin,$f as HtmlLayer,uf as I3S,e_ as I3SLayer,HH as ImageMaterialProperty,ou as ImageryLayerFactory,V as ImageryType,LH as JulianDate,mg as KeyboardRoaming,t_ as KmlLayer,Yo as Label,i_ as LabelLayer,Eo as LabelPrimitive,I as Layer,cr as LayerEvent,Ge as LayerEventType,Ju as LayerGroup,lr as LayerGroupEvent,We as LayerGroupEventType,Zt as LayerType,Pf as LightCylinderPrimitive,dB as LightingModel,et as LngLatArray,U as LngLatPoint,PH as Material,zc as Math,TH as Matrix3,EH as Matrix4,xg as Measure,Ce as MeasureType,no as Model,tB as ModelAnimationLoop,_r as ModelEvent,$e as ModelEventType,Vg as ModelManager,bf as ModelPrimitive,ir as MouseEvent,H as MouseEventType,ye as MouseMode,vH as NearFarScalar,C as Overlay,pr as OverlayEvent,Fe as OverlayEventType,Z as OverlayType,v as P,v as Parse,wr as PathEvent,ue as PathEventType,Ff as Plane,Sg as PlaneVideo,n_ as PlaneVideoLayer,X0 as Plot,mt as PlotEvent,b as PlotEventType,E as PlotUtil,Jo as Point,Mf as PointPrimitive,xt as Polygon,Tt as Polyline,Hf as PolylineAdapter,ZH as PolylineArrowMaterialProperty,u0 as PolylineCustomEndpointMaterialProperty,_0 as PolylineDashArrowMaterialProperty,BH as PolylineDashMaterialProperty,f0 as PolylineDirectionMaterialProperty,g0 as PolylineEmissionMaterialProperty,y0 as PolylineFenceMaterialProperty,v0 as PolylineFlickerMaterialProperty,w0 as PolylineFlowMaterialProperty,UH as PolylineGlowMaterialProperty,C0 as PolylineImageTrailMaterialProperty,T0 as PolylineLightingMaterialProperty,E0 as PolylineLightingTrailMaterialProperty,P0 as PolylineMultiArrowMaterialProperty,VH as PolylineOutlineMaterialProperty,Af as PolylinePrimitive,He as PolylineShape,b0 as PolylineTrailMaterialProperty,Gf as PolylineVolume,X as Position,bg as PositionEditor,rl as PositionEditorType,r_ as PrimitiveLayer,M0 as RadarLineMaterialProperty,A0 as RadarOuterMaterialProperty,sg as RadarScan,S0 as RadarSweepMaterialProperty,I0 as RadarWaveMaterialProperty,s_ as RasterTileLayer,ea as Rect,SH as Rectangle,KH as Resource,ug as RoamingController,fg as RoamingPath,Yc as S3MLayer,Sf as ScanCirclePrimitive,ar as SceneEvent,W as SceneEventType,bH as SceneMode,IH as ShadowMode,dl as Shadows,ml as SightLine,MH as SkyBox,Nf as Sphere,Dt as SurfacePoint,Hl as SurfacePoints,y as T,vo as TailedAttackArrow,Ws as TdtTerrainProvider,Hg as TerrainClipping,qu as TerrainFactory,ve as TerrainType,cB as TextureUniform,Kt as Thing,se as TileSetEventType,ff as Tileset,Bg as TilesetClipping,ur as TilesetEvent,Yc as TilesetLayer,NH as TilesetStyle,o_ as TopoJsonLayer,wg as Track,gg as TrackController,yr as TrackEvent,me as TrackEventType,Xe as TrackViewMode,If as TrailLinePrimitive,y as Transform,Jc as Underground,JH as UniformType,aB as UrlTemplateImageryProvider,x as Util,_B as VERSION,rt as VectorLayer,OH as VerticalOrigin,Lf as VideoPrimitive,$m as Viewer,sr as ViewerEvent,Gl as ViewerEventType,fl as Viewshed,Wf as Wall,L0 as WallImageTrailMaterialProperty,R0 as WallLineTrailMaterialProperty,k0 as WallTrailMaterialProperty,z0 as WaterMaterialProperty,Df as WaterPrimitive,pg as Weather,lB as WebMapServiceImageryProvider,nB as WebMercatorProjection,WH as WebMercatorTilingScheme,h_ as WindLayer,uB as config,eB as createElevationBandMaterial,$H as createGooglePhotorealistic3DTileset,fB as ready,Qe as registerLib,Be as setParam,jH as writeTextToCanvas};
|