@pggis/pg-sdk 5.0.0 → 5.0.11
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/README.md +8 -8
- package/dist/index.js +90 -91
- package/dist/pggis.min.css +1 -1
- package/dist/pggis.min.js +4465 -4476
- package/dist/resources/ThirdParty/Workers/z-worker-pako.js +1 -1
- package/dist/resources/Workers/{chunk-WQBKKXJC.js → chunk-35SHYARM.js} +2 -2
- package/dist/resources/Workers/{chunk-Y53SIX6D.js → chunk-37F5JSTI.js} +2 -2
- package/dist/resources/Workers/{chunk-PO64KPKA.js → chunk-3SSKC3VN.js} +2 -2
- package/dist/resources/Workers/{chunk-I3XHKING.js → chunk-3W4GT7KQ.js} +2 -2
- package/dist/resources/Workers/{chunk-VMOPYKP4.js → chunk-4IW2T6GF.js} +2 -2
- package/dist/resources/Workers/{chunk-BTPJ3H6N.js → chunk-5YEWO3HT.js} +2 -2
- package/dist/resources/Workers/{chunk-FCVV6A2F.js → chunk-64RSHJUE.js} +2 -2
- package/dist/resources/Workers/chunk-77IHZJJ3.js +26 -0
- package/dist/resources/Workers/{chunk-5GVU4LLW.js → chunk-7HTKERZY.js} +2 -2
- package/dist/resources/Workers/{chunk-7IBY6LYM.js → chunk-A56XVLQR.js} +2 -2
- package/dist/resources/Workers/{chunk-335F4KMR.js → chunk-AJYK4IVJ.js} +2 -2
- package/dist/resources/Workers/{chunk-YC4EEWUJ.js → chunk-ARG42DC4.js} +2 -2
- package/dist/resources/Workers/{chunk-5EZKANRV.js → chunk-AU7IKHOH.js} +2 -2
- package/dist/resources/Workers/{chunk-PQSWZ6QE.js → chunk-B4AA3ARO.js} +2 -2
- package/dist/resources/Workers/{chunk-HMV6ETSJ.js → chunk-CNCV5UL7.js} +2 -2
- package/dist/resources/Workers/{chunk-JU23HGY3.js → chunk-CYCB63OH.js} +2 -2
- package/dist/resources/Workers/{chunk-AHKBUIAX.js → chunk-D6AA5QVT.js} +2 -2
- package/dist/resources/Workers/{chunk-LIEFEM73.js → chunk-D6C66QON.js} +2 -2
- package/dist/resources/Workers/{chunk-BCYX7GBY.js → chunk-DEPHB2WM.js} +2 -2
- package/dist/resources/Workers/{chunk-HLFNWOQ4.js → chunk-DMEY62ID.js} +2 -2
- package/dist/resources/Workers/{chunk-QJG5NRTN.js → chunk-DQQ63PYM.js} +2 -2
- package/dist/resources/Workers/{chunk-7RJW35V3.js → chunk-ED5JPB3S.js} +2 -2
- package/dist/resources/Workers/{chunk-I7WJS3WM.js → chunk-EZUYS2JF.js} +2 -2
- package/dist/resources/Workers/{chunk-DSXZVGY7.js → chunk-FEVXJ54I.js} +2 -2
- package/dist/resources/Workers/{chunk-N6G72L23.js → chunk-G5AGHVVC.js} +2 -2
- package/dist/resources/Workers/{chunk-AOSK7NDA.js → chunk-GBYLG25F.js} +1 -1
- package/dist/resources/Workers/{chunk-YL47XCQ4.js → chunk-GILIDQNQ.js} +2 -2
- package/dist/resources/Workers/{chunk-SNN6UCXM.js → chunk-HMIYSTF6.js} +2 -2
- package/dist/resources/Workers/{chunk-YDUNCXSU.js → chunk-HTFSEEMT.js} +2 -2
- package/dist/resources/Workers/{chunk-WNAZRVVU.js → chunk-HWXX4CWK.js} +2 -2
- package/dist/resources/Workers/{chunk-4QCIHDA2.js → chunk-IYTZ52EY.js} +2 -2
- package/dist/resources/Workers/{chunk-ATTMFTQ4.js → chunk-J6UP6FLE.js} +1 -1
- package/dist/resources/Workers/{chunk-R3KD5ZAI.js → chunk-LEYMRMBK.js} +2 -2
- package/dist/resources/Workers/{chunk-QGPFMASY.js → chunk-M3MGYQSL.js} +1 -1
- package/dist/resources/Workers/{chunk-SPVHGWGM.js → chunk-N4VJKXZS.js} +2 -2
- package/dist/resources/Workers/{chunk-ABHTLV4B.js → chunk-NB3ML6JO.js} +2 -2
- package/dist/resources/Workers/{chunk-LNFOIPBT.js → chunk-OFUUQVMR.js} +2 -2
- package/dist/resources/Workers/{chunk-JOXXXMPE.js → chunk-OSW76XDF.js} +1 -1
- package/dist/resources/Workers/{chunk-DGGIK7AD.js → chunk-PSPPBZWI.js} +3 -3
- package/dist/resources/Workers/chunk-QN3VOORQ.js +26 -0
- package/dist/resources/Workers/{chunk-46IDNOB6.js → chunk-QOUAJ6TL.js} +2 -2
- package/dist/resources/Workers/{chunk-BDLVVHOG.js → chunk-RCV6KWXS.js} +2 -2
- package/dist/resources/Workers/{chunk-BGQDOF2W.js → chunk-TCGIRNHN.js} +2 -2
- package/dist/resources/Workers/{chunk-KORWG3CG.js → chunk-U4IEOH5K.js} +2 -2
- package/dist/resources/Workers/{chunk-F7XR2IV5.js → chunk-UP6I5URU.js} +2 -2
- package/dist/resources/Workers/{chunk-GBI3IATP.js → chunk-VTAIKJXX.js} +1 -1
- package/dist/resources/Workers/{chunk-72ENFGTU.js → chunk-VTBDSFTG.js} +2 -2
- package/dist/resources/Workers/{chunk-NU4XOT2V.js → chunk-VW6VD53G.js} +2 -2
- package/dist/resources/Workers/{chunk-KTDI3TD2.js → chunk-WGGIH7QW.js} +2 -2
- package/dist/resources/Workers/{chunk-SRJEQ4WA.js → chunk-WWA5PL4H.js} +2 -2
- package/dist/resources/Workers/{chunk-GRCPCORO.js → chunk-WZDE3RYP.js} +2 -2
- package/dist/resources/Workers/{chunk-RQ3X5FSK.js → chunk-XRL4AVS5.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 -1
- package/CHANGELOG.md +0 -611
- package/dist/dist/index.js +0 -1964
- package/dist/resources/Workers/chunk-3FFM6NRK.js +0 -26
- package/dist/resources/Workers/chunk-6EFYFFBI.js +0 -26
package/dist/dist/index.js
DELETED
|
@@ -1,1964 +0,0 @@
|
|
|
1
|
-
var Md=Object.defineProperty;var Ad=(l,e,t)=>e in l?Md(l,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):l[e]=t;var Ti=(l,e,t)=>(Ad(l,typeof e!="symbol"?e+"":e,t),t);var vn={};function wn(l,e){vn[l]=e}function te(l){return vn[l]}var xn={};function lt(l,e){xn[l]=e}function Ei(l){return xn[l]}import*as i from"cesium";var Cn=[Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array],Pi=1,Xe=8,Ke=class l{static from(e){if(!(e instanceof ArrayBuffer))throw new Error("Data must be an instance of ArrayBuffer.");let[t,r]=new Uint8Array(e,0,2);if(t!==219)throw new Error("Data does not appear to be in a KDBush format.");let s=r>>4;if(s!==Pi)throw new Error(`Got v${s} data when expected v${Pi}.`);let a=Cn[r&15];if(!a)throw new Error("Unrecognized array type.");let[o]=new Uint16Array(e,2,1),[n]=new Uint32Array(e,4,1);return new l(n,o,a,e)}constructor(e,t=64,r=Float64Array,s){if(isNaN(e)||e<0)throw new Error(`Unpexpected numItems value: ${e}.`);this.numItems=+e,this.nodeSize=Math.min(Math.max(+t,2),65535),this.ArrayType=r,this.IndexArrayType=e<65536?Uint16Array:Uint32Array;let a=Cn.indexOf(this.ArrayType),o=e*2*this.ArrayType.BYTES_PER_ELEMENT,n=e*this.IndexArrayType.BYTES_PER_ELEMENT,h=(8-n%8)%8;if(a<0)throw new Error(`Unexpected typed array class: ${r}.`);s&&s instanceof ArrayBuffer?(this.data=s,this.ids=new this.IndexArrayType(this.data,Xe,e),this.coords=new this.ArrayType(this.data,Xe+n+h,e*2),this._pos=e*2,this._finished=!0):(this.data=new ArrayBuffer(Xe+o+n+h),this.ids=new this.IndexArrayType(this.data,Xe,e),this.coords=new this.ArrayType(this.data,Xe+n+h,e*2),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,(Pi<<4)+a]),new Uint16Array(this.data,2,1)[0]=t,new Uint32Array(this.data,4,1)[0]=e)}add(e,t){let r=this._pos>>1;return this.ids[r]=r,this.coords[this._pos++]=e,this.coords[this._pos++]=t,r}finish(){let e=this._pos>>1;if(e!==this.numItems)throw new Error(`Added ${e} items when expected ${this.numItems}.`);return Ai(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(e,t,r,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=[];for(;h.length;){let p=h.pop()||0,f=h.pop()||0,y=h.pop()||0;if(f-y<=n){for(let C=y;C<=f;C++){let P=o[2*C],A=o[2*C+1];P>=e&&P<=r&&A>=t&&A<=s&&c.push(a[C])}continue}let _=y+f>>1,d=o[2*_],T=o[2*_+1];d>=e&&d<=r&&T>=t&&T<=s&&c.push(a[_]),(p===0?e<=d:t<=T)&&(h.push(y),h.push(_-1),h.push(1-p)),(p===0?r>=d:s>=T)&&(h.push(_+1),h.push(f),h.push(1-p))}return c}within(e,t,r){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:s,coords:a,nodeSize:o}=this,n=[0,s.length-1,0],h=[],c=r*r;for(;n.length;){let p=n.pop()||0,f=n.pop()||0,y=n.pop()||0;if(f-y<=o){for(let C=y;C<=f;C++)Tn(a[2*C],a[2*C+1],e,t)<=c&&h.push(s[C]);continue}let _=y+f>>1,d=a[2*_],T=a[2*_+1];Tn(d,T,e,t)<=c&&h.push(s[_]),(p===0?e-r<=d:t-r<=T)&&(n.push(y),n.push(_-1),n.push(1-p)),(p===0?e+r>=d:t+r>=T)&&(n.push(_+1),n.push(f),n.push(1-p))}return h}};function Ai(l,e,t,r,s,a){if(s-r<=t)return;let o=r+s>>1;En(l,e,o,r,s,a),Ai(l,e,t,r,o-1,1-a),Ai(l,e,t,o+1,s,1-a)}function En(l,e,t,r,s,a){for(;s>r;){if(s-r>600){let c=s-r+1,p=t-r+1,f=Math.log(c),y=.5*Math.exp(2*f/3),_=.5*Math.sqrt(f*y*(c-y)/c)*(p-c/2<0?-1:1),d=Math.max(r,Math.floor(t-p*y/c+_)),T=Math.min(s,Math.floor(t+(c-p)*y/c+_));En(l,e,t,d,T,a)}let o=e[2*t+a],n=r,h=s;for(Qe(l,e,r,t),e[2*s+a]>o&&Qe(l,e,r,s);n<h;){for(Qe(l,e,n,h),n++,h--;e[2*n+a]<o;)n++;for(;e[2*h+a]>o;)h--}e[2*r+a]===o?Qe(l,e,r,h):(h++,Qe(l,e,h,s)),h<=t&&(r=h+1),t<=h&&(s=h-1)}}function Qe(l,e,t,r){Mi(l,t,r),Mi(e,2*t,2*r),Mi(e,2*t+1,2*r+1)}function Mi(l,e,t){let r=l[e];l[e]=l[t],l[t]=r}function Tn(l,e,t,r){let s=l-t,a=e-r;return s*s+a*a}var bd={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:l=>l},Pn=Math.fround||(l=>e=>(l[0]=+e,l[0]))(new Float32Array(1)),Le=2,Ce=3,bi=4,xe=5,An=6,Fe=class{constructor(e){this.options=Object.assign(Object.create(bd),e),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(e){let{log:t,minZoom:r,maxZoom:s}=this.options;t&&console.time("total time");let a=`prepare ${e.length} points`;t&&console.time(a),this.points=e;let o=[];for(let h=0;h<e.length;h++){let c=e[h];if(!c.geometry)continue;let[p,f]=c.geometry.coordinates,y=Pn(ht(p)),_=Pn(ct(f));o.push(y,_,1/0,h,-1,1),this.options.reduce&&o.push(0)}let n=this.trees[s+1]=this._createTree(o);t&&console.timeEnd(a);for(let h=s;h>=r;h--){let c=+Date.now();n=this.trees[h]=this._createTree(this._cluster(n,h)),t&&console.log("z%d: %d clusters in %dms",h,n.numItems,+Date.now()-c)}return t&&console.timeEnd("total time"),this}getClusters(e,t){let r=((e[0]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,e[1])),a=e[2]===180?180:((e[2]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,e[3]));if(e[2]-e[0]>=360)r=-180,a=180;else if(r>a){let f=this.getClusters([r,s,180,o],t),y=this.getClusters([-180,s,a,o],t);return f.concat(y)}let n=this.trees[this._limitZoom(t)],h=n.range(ht(r),ct(o),ht(a),ct(s)),c=n.data,p=[];for(let f of h){let y=this.stride*f;p.push(c[y+xe]>1?Mn(c,y,this.clusterProps):this.points[c[y+Ce]])}return p}getChildren(e){let t=this._getOriginId(e),r=this._getOriginZoom(e),s="No cluster with the specified id.",a=this.trees[r];if(!a)throw new Error(s);let o=a.data;if(t*this.stride>=o.length)throw new Error(s);let n=this.options.radius/(this.options.extent*Math.pow(2,r-1)),h=o[t*this.stride],c=o[t*this.stride+1],p=a.within(h,c,n),f=[];for(let y of p){let _=y*this.stride;o[_+bi]===e&&f.push(o[_+xe]>1?Mn(o,_,this.clusterProps):this.points[o[_+Ce]])}if(f.length===0)throw new Error(s);return f}getLeaves(e,t,r){t=t||10,r=r||0;let s=[];return this._appendLeaves(s,e,t,r,0),s}getTile(e,t,r){let s=this.trees[this._limitZoom(e)],a=Math.pow(2,e),{extent:o,radius:n}=this.options,h=n/o,c=(r-h)/a,p=(r+1+h)/a,f={features:[]};return this._addTileFeatures(s.range((t-h)/a,c,(t+1+h)/a,p),s.data,t,r,a,f),t===0&&this._addTileFeatures(s.range(1-h/a,c,1,p),s.data,a,r,a,f),t===a-1&&this._addTileFeatures(s.range(0,c,h/a,p),s.data,-1,r,a,f),f.features.length?f:null}getClusterExpansionZoom(e){let t=this._getOriginZoom(e)-1;for(;t<=this.options.maxZoom;){let r=this.getChildren(e);if(t++,r.length!==1)break;e=r[0].properties.cluster_id}return t}_appendLeaves(e,t,r,s,a){let o=this.getChildren(t);for(let n of o){let h=n.properties;if(h&&h.cluster?a+h.point_count<=s?a+=h.point_count:a=this._appendLeaves(e,h.cluster_id,r,s,a):a<s?a++:e.push(n),e.length===r)break}return a}_createTree(e){let t=new Ke(e.length/this.stride|0,this.options.nodeSize,Float32Array);for(let r=0;r<e.length;r+=this.stride)t.add(e[r],e[r+1]);return t.finish(),t.data=e,t}_addTileFeatures(e,t,r,s,a,o){for(let n of e){let h=n*this.stride,c=t[h+xe]>1,p,f,y;if(c)p=bn(t,h,this.clusterProps),f=t[h],y=t[h+1];else{let T=this.points[t[h+Ce]];p=T.properties;let[C,P]=T.geometry.coordinates;f=ht(C),y=ct(P)}let _={type:1,geometry:[[Math.round(this.options.extent*(f*a-r)),Math.round(this.options.extent*(y*a-s))]],tags:p},d;c||this.options.generateId?d=t[h+Ce]:d=this.points[t[h+Ce]].id,d!==void 0&&(_.id=d),o.features.push(_)}}_limitZoom(e){return Math.max(this.options.minZoom,Math.min(Math.floor(+e),this.options.maxZoom+1))}_cluster(e,t){let{radius:r,extent:s,reduce:a,minPoints:o}=this.options,n=r/(s*Math.pow(2,t)),h=e.data,c=[],p=this.stride;for(let f=0;f<h.length;f+=p){if(h[f+Le]<=t)continue;h[f+Le]=t;let y=h[f],_=h[f+1],d=e.within(h[f],h[f+1],n),T=h[f+xe],C=T;for(let P of d){let A=P*p;h[A+Le]>t&&(C+=h[A+xe])}if(C>T&&C>=o){let P=y*T,A=_*T,O,H=-1,W=((f/p|0)<<5)+(t+1)+this.points.length;for(let J of d){let I=J*p;if(h[I+Le]<=t)continue;h[I+Le]=t;let G=h[I+xe];P+=h[I]*G,A+=h[I+1]*G,h[I+bi]=W,a&&(O||(O=this._map(h,f,!0),H=this.clusterProps.length,this.clusterProps.push(O)),a(O,this._map(h,I)))}h[f+bi]=W,c.push(P/C,A/C,1/0,W,-1,C),a&&c.push(H)}else{for(let P=0;P<p;P++)c.push(h[f+P]);if(C>1)for(let P of d){let A=P*p;if(!(h[A+Le]<=t)){h[A+Le]=t;for(let O=0;O<p;O++)c.push(h[A+O])}}}}return c}_getOriginId(e){return e-this.points.length>>5}_getOriginZoom(e){return(e-this.points.length)%32}_map(e,t,r){if(e[t+xe]>1){let o=this.clusterProps[e[t+An]];return r?Object.assign({},o):o}let s=this.points[e[t+Ce]].properties,a=this.options.map(s);return r&&a===s?Object.assign({},a):a}};function Mn(l,e,t){return{type:"Feature",id:l[e+Ce],properties:bn(l,e,t),geometry:{type:"Point",coordinates:[Sd(l[e]),Id(l[e+1])]}}}function bn(l,e,t){let r=l[e+xe],s=r>=1e4?`${Math.round(r/1e3)}k`:r>=1e3?`${Math.round(r/100)/10}k`:r,a=l[e+An],o=a===-1?{}:Object.assign({},t[a]);return Object.assign(o,{cluster:!0,cluster_id:l[e+Ce],point_count:r,point_count_abbreviated:s})}function ht(l){return l/360+.5}function ct(l){let e=Math.sin(l*Math.PI/180),t=.5-.25*Math.log((1+e)/(1-e))/Math.PI;return t<0?0:t>1?1:t}function Sd(l){return(l-.5)*360}function Id(l){let e=(180-l*360)*Math.PI/180;return 360*Math.atan(Math.exp(e))/Math.PI-90}var Sn=new i.WebMercatorProjection,Si=class{static transformCartesianToWGS84(e){if(e){let t=i.Ellipsoid.WGS84.cartesianToCartographic(e);return new U(i.Math.toDegrees((t==null?void 0:t.longitude)||0),i.Math.toDegrees((t==null?void 0:t.latitude)||0),t.height||0)}return new U(0,0)}static transformCartographicToWGS84(e){return e?new U(i.Math.toDegrees((e==null?void 0:e.longitude)||0),i.Math.toDegrees((e==null?void 0:e.latitude)||0),e.height||0):new U(0,0)}static transformWGS84ToCartesian(e){return e?i.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,i.Ellipsoid.WGS84):i.Cartesian3.ZERO}static transformWGS84ToCartographic(e){return e?i.Cartographic.fromDegrees(e.lng,e.lat,e.alt):i.Cartographic.ZERO}static transformCartesianArrayToWGS84Array(e){return e?e.map(t=>this.transformCartesianToWGS84(t)):[]}static transformWGS84ArrayToCartesianArray(e){return e?e.map(t=>this.transformWGS84ToCartesian(t)):[]}static transformWGS84ToMercator(e){let t=Sn.project(i.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new U(t.x,t.y,t.z)}static transformMercatorToWGS84(e){let t=Sn.unproject(new i.Cartesian3(e.lng,e.lat,e.alt));return new U(i.Math.toDegrees(t.longitude),i.Math.toDegrees(t.latitude),t.height)}static transformWindowToWGS84(e,t){let r=t.scene,s;if(r.mode===i.SceneMode.SCENE3D){let a=r.camera.getPickRay(e);s=r.globe.pick(a,r)}else s=r.camera.pickEllipsoid(e,i.Ellipsoid.WGS84);return this.transformCartesianToWGS84(s)}static transformWGS84ToWindow(e,t){let r=t.scene;return i.SceneTransforms.worldToWindowCoordinates(r,this.transformWGS84ToCartesian(e))}},u=Si;var pt=52.35987755982988,ie=3.141592653589793,In=6378245,Dn=.006693421622965943,Ii=class{static BD09ToGCJ02(e,t){let r=+e-.0065,s=+t-.006,a=Math.sqrt(r*r+s*s)-2e-5*Math.sin(s*pt),o=Math.atan2(s,r)-3e-6*Math.cos(r*pt),n=a*Math.cos(o),h=a*Math.sin(o);return[n,h]}static GCJ02ToBD09(e,t){t=+t,e=+e;let r=Math.sqrt(e*e+t*t)+2e-5*Math.sin(t*pt),s=Math.atan2(t,e)+3e-6*Math.cos(e*pt),a=r*Math.cos(s)+.0065,o=r*Math.sin(s)+.006;return[a,o]}static WGS84ToGCJ02(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=this.delta(e,t);return[e+r[0],t+r[1]]}}static GCJ02ToWGS84(e,t){if(t=+t,e=+e,this.out_of_china(e,t))return[e,t];{let r=[e,t],s=this.WGS84ToGCJ02(e,t),a=s[0]-e,o=s[1]-t;do s=this.WGS84ToGCJ02(r[0]-=a,r[1]-=o),a=s[0]-e,o=s[1]-t;while(Math.abs(a)>1e-7||Math.abs(o)>1e-7);return r}}static delta(e,t){let r=this.transformLng(e-105,t-35),s=this.transformLat(e-105,t-35),a=t/180*ie,o=Math.sin(a);o=1-Dn*o*o;let n=Math.sqrt(o);return r=r*180/(In/n*Math.cos(a)*ie),s=s*180/(In*(1-Dn)/(o*n)*ie),[r,s]}static transformLng(e,t){t=+t,e=+e;let r=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*ie)+20*Math.sin(2*e*ie))*2/3,r+=(20*Math.sin(e*ie)+40*Math.sin(e/3*ie))*2/3,r+=(150*Math.sin(e/12*ie)+300*Math.sin(e/30*ie))*2/3,r}static transformLat(e,t){t=+t,e=+e;let r=-100+2*e+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*ie)+20*Math.sin(2*e*ie))*2/3,r+=(20*Math.sin(t*ie)+40*Math.sin(t/3*ie))*2/3,r+=(160*Math.sin(t/12*ie)+320*Math.sin(t*ie/30))*2/3,r}static out_of_china(e,t){return t=+t,e=+e,!(e>73.66&&e<135.05&&t>3.86&&t<53.55)}},me=Ii;var Di=class l{constructor(e,t,r,s,a,o){this._lng=+e||0,this._lat=+t||0,this._alt=+r||0,this._heading=+s||0,this._pitch=+a||0,this._roll=+o||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 t=new l;return Array.isArray(e)&&(t.lng=e[0]||0,t.lat=e[1]||0,t.alt=e[2]||0,t.heading=e[3]||0,t.pitch=e[4]||0,t.roll=e[5]||0),t}static fromString(e){let t=new l;if(e&&typeof e=="string"){let r=e.split(",");t=this.fromArray(r)}return t}static fromObject(e){return new l(e.lng,e.lat,e.alt,e.heading,e.pitch,e.roll)}static deserialize(e){let t=new l,r=JSON.parse(e);return r&&(t.lng=r.lng||0,t.lat=r.lat||0,t.alt=r.alt||0,t.heading=r.heading||0,t.pitch=r.pitch||0,t.roll=r.roll||0),t}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:i.Cartesian3.distance(u.transformWGS84ToCartesian(this),u.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}}},U=Di;var Li=class{static parsePosition(e){let t=new U;return e&&(typeof e=="string"?t=U.fromString(e):Array.isArray(e)?t=U.fromArray(e):!(Object(e)instanceof U)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat")?t=U.fromObject(e):Object(e)instanceof U?t=e:Object(e)instanceof i.Cartesian3?t=u.transformCartesianToWGS84(e):Object(e)instanceof i.Cartographic&&(t=u.transformCartographicToWGS84(e))),t}static parsePositions(e){if(typeof e=="string"){if(e.indexOf("#")>=0)throw new Error("the positions invalid");e=e.split(";").filter(t=>!!t)}return e.map(t=>this.parsePosition(t))}static parsePointCoordToArray(e){return e=this.parsePosition(e),[e.lng,e.lat]}static parsePolylineCoordToArray(e){let t=[];return e=this.parsePositions(e),e.forEach(r=>{t.push([r.lng,r.lat])}),t}static parsePolygonCoordToArray(e,t=!1){let r=[];return e=this.parsePositions(e),e.forEach(s=>{r.push([s.lng,s.lat])}),t&&r.length>0&&r.push(r[0]),[r]}},g=Li;var $e={ADD:"add",REMOVE:"remove"},R={LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},Ln={ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.ScreenSpaceEventType.WHEEL},D={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"},Te={...$e,LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.ScreenSpaceEventType.MOUSE_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate"},Re={READY:"ready",TEX_READY:"texturesReady"},Q={INITIAL_TILES_LOADED:"initialTilesLoaded",ALL_TILES_LOADED:"allTilesLoaded ",LOAD_PROGRESS:"loadProgress ",TILE_FAILED:"tileFailed ",TILE_LOAD:"tileLoad",TILE_UNLOAD:"tileUnload",TILE_VISIBLE:"tileVisible"},Ee=$e,Pe={...$e,LEFT_DOWN:i.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.ScreenSpaceEventType.LEFT_UP,CLICK:i.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.ScreenSpaceEventType.LEFT_DOUBLE_CLICK},oe={...$e,POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"},ne={...$e,POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine"},E={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 Ri=class{constructor(e){this._types=e,this._cache={}}_on(e,t,r){let s=this.getEvent(e),a;return s&&t&&(a=s.addEventListener(t,r||this)),a}_off(e,t,r){let s=this.getEvent(e),a=!1;return s&&t&&(a=s.removeEventListener(t,r||this)),a}_fire(e,t){let r=this.getEvent(e);r&&r.raiseEvent(t)}_registerEvent(){Object.keys(this._types).forEach(e=>{let t=this._types[e];this._cache[t]=new i.Event})}on(e,t,r){return this._on(e,t,r)}once(e,t,r){let s=this._on(e,a=>{t(a),s&&s()},r)}off(e,t,r){return this._off(e,t,r)}fire(e,t){this._fire(e,t)}getEvent(e){return this._cache[e]||void 0}},V=Ri;var Oi=class extends V{constructor(e,t={}){super(R),this._viewer=e,this._selected=void 0,this._enableEventPropagation=t.enableEventPropagation,this._enableMouseOver=t.enableMouseOver,this._enableMouseMovePick=t.enableMouseMovePick,this._registerEvent(),this._addDefaultEvent()}_registerEvent(){let e=new i.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(i.ScreenSpaceEventType).forEach(t=>{let r=i.ScreenSpaceEventType[t];this._cache[r]=new i.Event,e.setInputAction(s=>{this._cache[r].raiseEvent(s)},r)})}_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 t=this._viewer.container.getBoundingClientRect(),r=this._viewer.container.offsetWidth/t.width,s=this._viewer.container.offsetHeight/t.height;return new i.Cartesian2(e.x*r,e.y*s)}_getMousePosition(e){let t=this._adjustPosition(e),r=this._viewer.scene,s,a,o,n;if(r.pickPositionSupported&&(s=r.pickPosition(t)),s){let h=i.Ellipsoid.WGS84.cartesianToCartographic(s);h&&(o={lng:i.Math.toDegrees(h.longitude),lat:i.Math.toDegrees(h.latitude),alt:h.height})}if(r.mode===i.SceneMode.SCENE3D&&!(this._viewer.terrainProvider instanceof i.EllipsoidTerrainProvider)){let h=r.camera.getPickRay(t);a=r.globe.pick(h,r)}else a=r.camera.pickEllipsoid(t,i.Ellipsoid.WGS84);if(a){let h=i.Ellipsoid.WGS84.cartesianToCartographic(a);h&&(n={lng:i.Math.toDegrees(h.longitude),lat:i.Math.toDegrees(h.latitude),alt:h.height})}return{windowPosition:t,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){let t=[],s=this._viewer.scene.drillPick(e);return s&&s.length&&s.forEach(a=>{t.push(this._getTargetInfo(a))}),t}_getOverlayId(e){let t;return(e==null?void 0:e.id)instanceof i.Entity?t=e.id.overlayId:e instanceof i.Cesium3DTileFeature?t=e.tileset.overlayId:((e==null?void 0:e.primitive)instanceof i.Cesium3DTileset||e!=null&&e.primitive)&&(t=e.primitive.overlayId),t}_getTargetInfo(e){let t,r,s;return(e==null?void 0:e.id)instanceof i.Entity?(r=this._viewer.getLayers().filter(a=>a.layerId===e.id.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.id.overlayId))):e instanceof i.Cesium3DTileFeature?(r=this._viewer.getLayers().filter(a=>a.layerId===e.tileset.layerId)[0],s=e,r!=null&&r.getOverlay&&(t=r.getOverlay(e.tileset.overlayId),s&&s.getPropertyNames&&s.getPropertyNames().forEach(o=>{t.attr[o]=s.getProperty(o)}))):(e==null?void 0:e.primitive)instanceof i.Cesium3DTileset?(r=this._viewer.getLayers().filter(a=>a.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))):e!=null&&e.primitive&&(r=this._viewer.getLayers().filter(a=>a.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))),{layer:r,overlay:t,feature:s,instanceId:e==null?void 0:e.instanceId}}_raiseEvent(e,t={}){var n;let r,s=this._getTargetInfo(t.target),a=s==null?void 0:s.overlay,o=s==null?void 0:s.layer;a!=null&&a.overlayEvent&&(r=a.overlayEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._enableEventPropagation)&&(o!=null&&o.layerEvent)&&(r=o.layerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._eventPropagation)&&((n=this._viewer)!=null&&n.viewerEvent)&&(r=this._viewer.viewerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),a!=null&&a.allowDrillPicking&&this._getDrillInfos(t.windowPosition).forEach(c=>{let p=c==null?void 0:c.overlay,f=c==null?void 0:c.layer;(p==null?void 0:p.overlayId)!==a.overlayId&&(p!=null&&p.overlayEvent)&&(r=p.overlayEvent.getEvent(e),(!r||r.numberOfListeners===0)&&(f!=null&&f.layerEvent)&&(r=f.layerEvent.getEvent(e)),r&&r.numberOfListeners>0&&r.raiseEvent({...c,...t}))})}_clickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.CLICK,this._getMouseInfo(e.position))}_dbClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.DB_CLICK,this._getMouseInfo(e.position))}_rightClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.RIGHT_CLICK,this._getMouseInfo(e.position))}_mouseMoveHandler(e){if(!(e!=null&&e.endPosition))return!1;if(this._enableMouseMovePick){let t=this._getMouseInfo(e.endPosition);this._viewer.canvas.style.cursor=t.target?"pointer":"default",this._raiseEvent(R.MOUSE_MOVE,t),this._enableMouseOver&&(!this._selected||this._getOverlayId(this._selected.target)!==this._getOverlayId(t.target))&&(this._raiseEvent(R.MOUSE_OUT,this._selected),this._raiseEvent(R.MOUSE_OVER,t),this._selected=t)}else this._raiseEvent(R.MOUSE_MOVE,this._getMousePosition(this._adjustPosition(e.endPosition)))}_leftDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.LEFT_DOWN,this._getMouseInfo(e.position))}_leftUpHandler(e){this._raiseEvent(R.LEFT_UP,this._getMouseInfo(e.position))}_rightDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(R.RIGHT_DOWN,this._getMouseInfo(e.position))}_rightUpHandler(e){this._raiseEvent(R.RIGHT_UP,this._getMouseInfo(e.position))}_mouseWheelHandler(e){this._raiseEvent(R.WHEEL,{movement:e})}},ki=Oi;var zi=class extends V{constructor(){super(Ln),this._registerEvent()}},Ni=zi;var Fi=class extends V{constructor(e){super(D),this._camera=e.camera,this._scene=e.scene,this._clock=e.clock}on(e,t,r){let s;switch(e){case D.CAMERA_MOVE_END:s=this._camera.moveEnd.addEventListener(t,r||this);break;case D.CAMERA_CHANGED:s=this._camera.changed.addEventListener(t,r||this);break;case D.PRE_UPDATE:s=this._scene.preUpdate.addEventListener(t,r||this);break;case D.POST_UPDATE:s=this._scene.postUpdate.addEventListener(t,r||this);break;case D.PRE_RENDER:s=this._scene.preRender.addEventListener(t,r||this);break;case D.POST_RENDER:s=this._scene.postRender.addEventListener(t,r||this);break;case D.MORPH_COMPLETE:s=this._scene.morphComplete.addEventListener(t,r||this);break;case D.CLOCK_TICK:s=this._clock.onTick.addEventListener(t,r||this);break;case D.RENDER_ERROR:s=this._scene.renderError.addEventListener(t,r||this);break;default:break}return s}off(e,t,r){let s=!1;switch(e){case D.CAMERA_MOVE_END:s=this._camera.moveEnd.removeEventListener(t,r||this);break;case D.CAMERA_CHANGED:s=this._camera.changed.removeEventListener(t,r||this);break;case D.PRE_UPDATE:s=this._scene.preUpdate.removeEventListener(t,r||this);break;case D.POST_UPDATE:s=this._scene.postUpdate.removeEventListener(t,r||this);break;case D.PRE_RENDER:s=this._scene.preRender.removeEventListener(t,r||this);break;case D.POST_RENDER:s=this._scene.postRender.removeEventListener(t,r||this);break;case D.MORPH_COMPLETE:s=this._scene.morphComplete.removeEventListener(t,r||this);break;case D.CLOCK_TICK:s=this._clock.onTick.removeEventListener(t,r||this);break;case D.RENDER_ERROR:s=this._scene.renderError.removeEventListener(t,r||this);break;default:break}return s}},Wi=Fi;var Gi=class extends V{constructor(){super(Ee),this._registerEvent()}},Hi=Gi;var Bi=class extends V{constructor(){super(Pe),this._registerEvent()}},Ui=Bi;var Vi=class extends V{constructor(){super(Te),this._registerEvent()}},ji=Vi;var Zi=class extends V{constructor(e){super(Q),this._tileset=e}on(e,t,r){return this._tileset.then(s=>{switch(e){case Q.INITIAL_TILES_LOADED:s.initialTilesLoaded.addEventListener(t,r||this);break;case Q.ALL_TILES_LOADED:s.allTilesLoaded.addEventListener(t,r||this);break;case Q.LOAD_PROGRESS:s.loadProgress.addEventListener(t,r||this);break;case Q.TILE_FAILED:s.tileFailed.addEventListener(t,r||this);break;case Q.TILE_LOAD:s.tileLoad.addEventListener(t,r||this);break;case Q.TILE_UNLOAD:s.tileUnload.addEventListener(t,r||this);break;case Q.TILE_VISIBLE:s.tileVisible.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._tileset.then(s=>{switch(e){case Q.INITIAL_TILES_LOADED:s.initialTilesLoaded.removeEventListener(t,r||this);break;case Q.ALL_TILES_LOADED:s.allTilesLoaded.removeEventListener(t,r||this);break;case Q.LOAD_PROGRESS:s.loadProgress.removeEventListener(t,r||this);break;case Q.TILE_FAILED:s.tileFailed.removeEventListener(t,r||this);break;case Q.TILE_LOAD:s.tileLoad.removeEventListener(t,r||this);break;case Q.TILE_UNLOAD:s.tileUnload.removeEventListener(t,r||this);break;case Q.TILE_VISIBLE:s.tileVisible.removeEventListener(t,r||this);break;default:break}}),!0}},Yi=Zi;var Ji=class extends V{constructor(e){super(Re),this._model=e}on(e,t,r){return this._model.then(s=>{switch(e){case Re.READY:s.readyEvent.addEventListener(t,r||this);break;case Re.TEX_READY:s.texturesReadyEvent.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._model.then(s=>{switch(e){case Re.READY:s.readyEvent.removeEventListener(t,r||this);break;case Re.TEX_READY:s.texturesReadyEvent.removeEventListener(t,r||this);break;default:break}}),!0}},qi=Ji;var Xi=class extends V{constructor(){super(oe),this._registerEvent()}},Qi=Xi;var Ki=class extends V{constructor(){super(ne),this._registerEvent()}},$i=Ki;var er=class extends V{constructor(){super(E),this._registerEvent()}},et=er;var Dd={LEFT_MIDDLE:0,LEFT_RIGHT:1},Me=Dd;var Ld="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),tr=class{static uuid(e="D"){let t=[];t[8]=t[13]=t[18]=t[23]="-",t[14]="4";let r;for(let s=0;s<36;s++)t[s]||(r=0|Math.random()*16,t[s]=Ld[s===19?r&3|8:r]);return e+"-"+t.join("")}static merge(e,...t){let r,s,a,o;for(s=0,a=t.length;s<a;s++){o=t[s];for(r in o)e[r]=o[r]}return e}static splitWords(e){return this.trim(e).split(/\s+/)}static setOptions(e,t){e.hasOwnProperty("options")||(e.options=e.options?Object.create(e.options):{});for(let r in t)e.options[r]=t[r];return e.options}static formatNum(e,t){let r=Math.pow(10,t===void 0?6:t);return Math.round(e*r)/r}static trim(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}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,t){let r=null;return function(){r&&clearTimeout(r),r=setTimeout(e,t)}}static throttle(e,t){let r=!0;return function(){if(!r)return!1;r=!1,setTimeout(()=>{e(),r=!0},t)}}static dataURLtoBlob(e){let t=e.split(","),r=t[0].match(/:(.*?);/)[1],s=atob(t[1]),a=s.length,o=new Uint8Array(a);for(;a--;)o[a]=s.charCodeAt(a);return new Blob([o],{type:r})}static isPromise(e){return Promise.resolve(e)==e}},x=tr;var ir=class{static get(e){return typeof e=="string"?document.getElementById(e):e}static getStyle(e,t){let r=e.style[t]||e.currentStyle&&e.currentStyle[t];if((!r||r==="auto")&&document.defaultView){let s=document.defaultView.getComputedStyle(e,null);r=s?s[t]:null}return r==="auto"?null:r}static create(e,t,r=null){let s=document.createElement(e);return s.className=t||"",r&&r.appendChild(s),s}static remove(e){let t=e.parentNode;t&&t.removeChild(e)}static empty(e){for(;e.firstChild;)e.removeChild(e.firstChild)}static hasClass(e,t){if(e.classList!==void 0)return e.classList.contains(t);let r=this.getClass(e);return r.length>0&&new RegExp("(^|\\s)"+t+"(\\s|$)").test(r)}static addClass(e,t){if(e.classList!==void 0){let r=x.splitWords(t);for(let s=0,a=r.length;s<a;s++)e.classList.add(r[s])}else if(!this.hasClass(e,t)){let r=this.getClass(e);this.setClass(e,(r?r+" ":"")+t)}}static removeClass(e,t){e.classList!==void 0?e.classList.remove(t):this.setClass(e,x.trim((" "+this.getClass(e)+" ").replace(" "+t+" "," ")))}static setClass(e,t){e.className.baseVal===void 0?e.className=t:e.className.baseVal=t}static getClass(e){return e.correspondingElement&&(e=e.correspondingElement),e.className.baseVal===void 0?e.className:e.className.baseVal}static createSvg(e,t,r,s){let a=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");a.setAttribute("class","svg-path"),a.setAttribute("width",e),a.setAttribute("height",t),a.setAttribute("viewBox",`0 0 ${e} ${t}`);let o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",r),a.appendChild(o),s&&s.appendChild(a),a}static parseDom(e,t,r){t=t!=null?t:!1;let s=document.createElement("div");return s.className=r||"",s.innerHTML=e,t?s:s.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,t,r=null){let s=this.create("video",t,r),a=this.create("source","",s);a.setAttribute("src",e),a.setAttribute("type","video/map4");let o=this.create("source","",s);return o.setAttribute("src",e),o.setAttribute("type","video/quicktime"),s}},b=ir;var rr=Math.PI*2,dt=100,sr=1e-4,ar=class{static distance(e,t){return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}static wholeDistance(e){let t=0;for(let r=0;r<e.length-1;r++)t+=this.distance(e[r],e[r+1]);return t}static getBaseLength(e){return Math.pow(this.wholeDistance(e),.99)}static mid(e,t){return[(e[0]+t[0])/2,(e[1]+t[1])/2]}static getCircleCenterOfThreePoints(e,t,r){let s=[(e[0]+t[0])/2,(e[1]+t[1])/2],a=[s[0]-e[1]+t[1],s[1]+e[0]-t[0]],o=[(e[0]+r[0])/2,(e[1]+r[1])/2],n=[o[0]-e[1]+r[1],o[1]+e[0]-r[0]];return this.getIntersectPoint(s,a,o,n)}static getIntersectPoint(e,t,r,s){let a,o,n,h;return e[1]===t[1]?(n=(s[0]-r[0])/(s[1]-r[1]),a=n*(e[1]-r[1])+r[0],o=e[1],[a,o]):r[1]===s[1]?(h=(t[0]-e[0])/(t[1]-e[1]),a=h*(r[1]-e[1])+e[0],o=r[1],[a,o]):(h=(t[0]-e[0])/(t[1]-e[1]),n=(s[0]-r[0])/(s[1]-r[1]),o=(h*e[1]-e[0]-n*r[1]+r[0])/(h-n),a=h*o-h*e[1]+e[0],[a,o])}static getAzimuth(e,t){let r,s=Math.asin(Math.abs(t[1]-e[1])/this.distance(e,t));return t[1]>=e[1]&&t[0]>=e[0]?r=s+Math.PI:t[1]>=e[1]&&t[0]<e[0]?r=rr-s:t[1]<e[1]&&t[0]<e[0]?r=s:t[1]<e[1]&&t[0]>=e[0]&&(r=Math.PI-s),r}static getAngleOfThreePoints(e,t,r){let s=this.getAzimuth(t,e)-this.getAzimuth(t,r);return s<0?s+rr:s}static isClockWise(e,t,r){return(r[1]-e[1])*(t[0]-e[0])>(t[1]-e[1])*(r[0]-e[0])}static getPointOnLine(e,t,r){let s=t[0]+e*(r[0]-t[0]),a=t[1]+e*(r[1]-t[1]);return[s,a]}static getCubicValue(e,t,r,s,a){e=Math.max(Math.min(e,1),0);let o=1-e,n=e*e,h=n*e,c=o*o,p=c*o,f=p*t[0]+3*c*e*r[0]+3*o*n*s[0]+h*a[0],y=p*t[1]+3*c*e*r[1]+3*o*n*s[1]+h*a[1];return[f,y]}static getThirdPoint(e,t,r,s,a){let o=this.getAzimuth(e,t),n=a?o+r:o-r,h=s*Math.cos(n),c=s*Math.sin(n);return[t[0]+h,t[1]+c]}static getArcPoints(e,t,r,s){let a,o,n=[],h=s-r;h=h<0?h+rr:h;for(let c=0;c<=dt;c++){let p=r+h*c/dt;a=e[0]+t*Math.cos(p),o=e[1]+t*Math.sin(p),n.push([a,o])}return n}static getBisectorNormals(e,t,r,s){let a=this.getNormal(t,r,s),o=Math.sqrt(a[0]*a[0]+a[1]*a[1]),n=a[0]/o,h=a[1]/o,c=this.distance(t,r),p=this.distance(r,s),f,y,_,d,T;return o>sr?this.isClockWise(t,r,s)?(f=e*c,y=r[0]-f*h,_=r[1]+f*n,T=[y,_],f=e*p,y=r[0]+f*h,_=r[1]-f*n,d=[y,_]):(f=e*c,y=r[0]+f*h,_=r[1]-f*n,T=[y,_],f=e*p,y=r[0]-f*h,_=r[1]+f*n,d=[y,_]):(y=r[0]+e*(t[0]-r[0]),_=r[1]+e*(t[1]-r[1]),T=[y,_],y=r[0]+e*(s[0]-r[0]),_=r[1]+e*(s[1]-r[1]),d=[y,_]),[T,d]}static getNormal(e,t,r){let s=e[0]-t[0],a=e[1]-t[1],o=Math.sqrt(s*s+a*a);s/=o,a/=o;let n=r[0]-t[0],h=r[1]-t[1],c=Math.sqrt(n*n+h*h);n/=c,h/=c;let p=s+n,f=a+h;return[p,f]}static getCurvePoints(e,t){let s=[this.getLeftMostControlPoint(e,t)],a,o,n,h;for(let f=0;f<t.length-2;f++)a=t[f],o=t[f+1],n=t[f+2],h=this.getBisectorNormals(e,a,o,n),s=s.concat(h);let c=this.getRightMostControlPoint(e,t);s.push(c);let p=[];for(let f=0;f<t.length-1;f++){a=t[f],o=t[f+1],p.push(a);for(let y=0;y<dt;y++){let _=this.getCubicValue(y/dt,a,s[f*2],s[f*2+1],o);p.push(_)}p.push(o)}return p}static getLeftMostControlPoint(e,t){let r=t[0],s=t[1],a=t[2],n=this.getBisectorNormals(0,r,s,a)[0],h=this.getNormal(r,s,a),c=Math.sqrt(h[0]*h[0]+h[1]*h[1]),p,f;if(c>sr){let y=this.mid(r,s),_=r[0]-y[0],d=r[1]-y[1],C=2/this.distance(r,s),P=-C*d,A=C*_,O=P*P-A*A,H=2*P*A,W=A*A-P*P,J=n[0]-y[0],I=n[1]-y[1];p=y[0]+O*J+H*I,f=y[1]+H*J+W*I}else p=r[0]+e*(s[0]-r[0]),f=r[1]+e*(s[1]-r[1]);return[p,f]}static getRightMostControlPoint(e,t){let r=t.length,s=t[r-3],a=t[r-2],o=t[r-1],h=this.getBisectorNormals(0,s,a,o)[1],c=this.getNormal(s,a,o),p=Math.sqrt(c[0]*c[0]+c[1]*c[1]),f,y;if(p>sr){let _=this.mid(a,o),d=o[0]-_[0],T=o[1]-_[1],P=2/this.distance(a,o),A=-P*T,O=P*d,H=A*A-O*O,W=2*A*O,J=O*O-A*A,I=h[0]-_[0],G=h[1]-_[1];f=_[0]+H*I+W*G,y=_[1]+W*I+J*G}else f=o[0]+e*(a[0]-o[0]),y=o[1]+e*(a[1]-o[1]);return[f,y]}static getBezierPoints(e){if(e.length<=2)return e;let t=[],r=e.length-1;for(let s=0;s<=1;s+=.01){let a=0,o=0;for(let n=0;n<=r;n++){let h=this.getBinomialFactor(r,n),c=Math.pow(s,n),p=Math.pow(1-s,r-n);a+=h*c*p*e[n][0],o+=h*c*p*e[n][1]}t.push([a,o])}return t.push(e[r]),t}static getBinomialFactor(e,t){return this.getFactorial(e)/(this.getFactorial(t)*this.getFactorial(e-t))}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 t=1;for(let r=1;r<=e;r++)t*=r;return t}static getQBSplinePoints(e){if(e.length<=2)return e;let t=2,r=[],s=e.length-t-1;r.push(e[0]);for(let a=0;a<=s;a++)for(let o=0;o<=1;o+=.05){let n=0,h=0;for(let c=0;c<=t;c++){let p=this.getQuadricBSplineFactor(c,o);n+=p*e[a+c][0],h+=p*e[a+c][1]}r.push([n,h])}return r.push(e[e.length-1]),r}static getQuadricBSplineFactor(e,t){return e===0?Math.pow(t-1,2)/2:e===1?(-2*Math.pow(t,2)+2*t+1)/2:e===2?Math.pow(t,2)/2:0}},w=ar;var Rd=!0;function mt(...l){console.warn(...l)}function Oe(...l){Rd&&console.error(...l)}var or=class l{static getTransFun(e,t){if(!e||!t||(e=l.crsName2FunName(e),t=l.crsName2FunName(t),t===e))return!1;let r=e+"2"+t;return tt[r]?tt[r]:!1}static crsName2FunName(e){switch(e){case"GCJ02":return"gcj";case"BD09":return"bd";case"WGS84":default:return"wgs"}}static getPositionValue(e,t=i.JulianDate.now()){if(!e)return e;let r;return e instanceof i.Cartesian3?r=e:e._value&&e._value instanceof i.Cartesian3?r=e._value:typeof e.getValue=="function"&&(r=e.getValue(t||i.JulianDate.now())),r}static getMaxHeight(e,t=0){if(e==null||e.length===0)return t;for(let r=0;r<e.length;r++){let s=k.parse(e[r]);r===0&&(t=s.alt),s.alt>t&&(t=s.alt)}return x.formatNum(t,k.FormatAltLength)}static getMinHeight(e,t=0){if(e==null||e.length===0)return t;for(let r=0;r<e.length;r++){let s=i.Cartographic.fromCartesian(e[r]);(r===0||s.height<t)&&(t=s.height)}return x.formatNum(t,k.FormatAltLength)}static addPositionsHeight(e,t=0){if(t=Number(t),isNaN(t)||t===0)return e;if(Array.isArray(e)){let r=[];for(let s=0;s<e.length;s++){let a=i.Cartographic.fromCartesian(e[s]),o=i.Cartesian3.fromRadians(a.longitude,a.latitude,a.height+t);r.push(o)}return r}else{let r=i.Cartographic.fromCartesian(e);return i.Cartesian3.fromRadians(r.longitude,r.latitude,r.height+t)}}static setPositionsHeight(e,t=0){if(!e)return e;if(Array.isArray(e)){let r=[];for(let s=0;s<e.length;s++){let a=i.Cartographic.fromCartesian(e[s]),o=i.Cartesian3.fromRadians(a.longitude,a.latitude,t);r.push(o)}return r}else{let r=i.Cartographic.fromCartesian(e);return i.Cartesian3.fromRadians(r.longitude,r.latitude,t)}}static getHeight(e,t,r={}){var o;let s=k.toCartographic(t),a;if(e.getHeight?a=e.getHeight(s,r?r.heightReference:0):a=e.globe.getHeight(s),i.defined(a)&&a>((o=r?r.min:0)!=null?o:-999))return a;if(r&&r.original)return s.height}static pick3DTileset(e,t){if(!t)return null;t instanceof i.Cartesian3&&(t=[t]);for(let r=0,s=t.length;r<s;++r){let a=t[r],o=i.SceneTransforms.worldToWindowCoordinates(e,a);if(!i.defined(o))continue;let n=e.pick(o,10,10);if(i.defined(n)&&i.defined(n.primitive)&&n.primitive instanceof i.Cesium3DTileset)return n.primitive}return null}static getSurfaceHeight(e,t,r={}){return r.scene=e,r.position=t,new ut(r).start()}static getSurfaceTerrainHeight(e,t){let r={scene:e,position:t,has3dtiles:!1};return new ut(r).start()}static getSurfacePosition(e,t,r={}){var o;if(!t)return t;let s=k.toCartographic(t),a=l.getHeight(e,s,r);return!i.defined(a)||((o=r.greater)==null||o)&&a<s.height?t:(i.defined(r.maxHeight)&&(a=Math.min(a,r.maxHeight)),(r.heightReference===i.HeightReference.RELATIVE_TO_GROUND||r.heightReference===i.HeightReference.RELATIVE_TO_TERRAIN||r.heightReference===i.HeightReference.RELATIVE_TO_3D_TILE)&&(s.height+=a),i.Cartesian3.fromRadians(s.longitude,s.latitude,a))}static getCurrentMousePosition(e,t,r){let s;if(e.onlyVertexPosition){if(!e.vertexAdsorption)return e.vertexAdsorption=new VertexAdsorption(e),s=e.vertexAdsorption.pick(t,16,16),s}else e.vertexAdsorption&&e.vertexAdsorption.clear();let a;try{a=e.pick(t,5,5)}catch(o){mt("getCurrentMousePosition: scene.pick \u62FE\u53D6\u65F6\u5F02\u5E38",o)}if(e.resultSupported&&!e.onlyPickTerrainPosition&&i.defined(a)){let o=l.hasPickedModel(a,r);if(o){if((o.billboard||o.point||o.label)&&!o.ellipse&&!o.model&&!o.ellipsoid)return l.getPositionValue(o.position);if(o.show){if(o.show=!1,e.requestRender(),s=l.getCurrentMousePosition(e,t,r),o.show=!0,s)return s;if(s=l._geetTargetMousePosition(e,t,a),i.defined(s))return s}if(!e.globe.show&&(s=l._geetTargetMousePosition(e,t,a),i.defined(s)))return s}else{if(i.defined(a.id)){let n=a.id;if((n.billboard||n.point||n.label)&&!n.ellipse&&!n.model&&!n.ellipsoid)return l.getPositionValue(n.position)}if(s=l._geetTargetMousePosition(e,t,a),i.defined(s))return s}}if(!e.onlyPickTerrainPosition&&e.onlyPickModelPosition)return s;if(e.mode===i.SceneMode.SCENE3D){let o=e.camera.getPickRay(t);s=e.globe.pick(o,e),!s&&(s=e.camera.pickEllipsoid(t,e.globe.ellipsoid))}else s=e.camera.pickEllipsoid(t,e.globe.ellipsoid);return i.defined(s)&&e.camera.positionCartographic.height<1e4&&i.Cartographic.fromCartesian(s).height<-5e3?null:s}static _geetTargetMousePosition(e,t,r){let s=e.result(t);if(i.defined(s)){let a=i.Cartographic.fromCartesian(s);if(a.height>=0||!i.defined(r?r.id:0)&&a.height>=-5e3)return s}}static hasPickedModel(e,t){if(i.defined(e.id)){let r=e.id;if(r._noMousePick||t&&r===t)return r}if(i.defined(e.primitive)){let r=e.primitive;if(r._noMousePick||t&&r===t)return r}if(i.defined(e.tileset)){let r=e.tileset;if(r._noMousePick||t&&r===t)return r}return null}static getCurrentMouseTerrainPosition(e,t){let r;if(e.mode===i.SceneMode.SCENE3D){let s=e.camera.getPickRay(t);r=e.globe.pick(s,e),r||(r=e.camera.pickEllipsoid(t,e.globe.ellipsoid))}else r=e.camera.pickEllipsoid(t,e.globe.ellipsoid);return r}static getMidpoint(e,t,r=.5){if(!t||!e)return;let s=k.toCartographic(e),a=k.toCartographic(t),o=(s.height+a.height)/2,n=new i.EllipsoidGeodesic(s,a).interpolateUsingFraction(r);return i.Cartesian3.fromRadians(n.longitude,n.latitude,o)}static isRepeatPoint(e,t){return!t||!e?!1:Math.abs(e.x-t.x)<.1&&Math.abs(e.y-t.y)<.1&&Math.abs(e.z-t.z)<.1}static getRotateCenterPoint(e,t,r){let s=i.Cartographic.fromCartesian(e);s.height=0;let a=i.Cartographic.toCartesian(s),o=i.Cartesian3.subtract(a,e,new i.Cartesian3);o=i.Cartesian3.normalize(o,new i.Cartesian3);let n=i.Quaternion.fromAxisAngle(o,i.Math.toRadians(r)),h=i.Matrix3.fromQuaternion(n),c=i.Matrix4.fromRotationTranslation(h),p=i.Cartesian3.subtract(t,e,new i.Cartesian3),f=i.Matrix4.multiplyByPoint(c,p,new i.Cartesian3);return i.Cartesian3.add(f,e,new i.Cartesian3)}static getOnLinePointByLen(e,t,r,s){let a=i.Transforms.eastNorthUpToFixedFrame(e),o=i.Matrix4.inverse(a,new i.Matrix4);e=i.Matrix4.multiplyByPoint(o,e,new i.Cartesian3),t=i.Matrix4.multiplyByPoint(o,t,new i.Cartesian3);let n=i.Cartesian3.subtract(t,e,new i.Cartesian3),h=i.Cartesian3.distance(e,t),c=r/h;s&&(c+=1);let p=i.Cartesian3.multiplyByScalar(n,c,new i.Cartesian3);return i.Matrix4.multiplyByPoint(a,p,new i.Cartesian3)}static getPositionByHprAndOffset(e,t,r,s,a){e=k.toCartesian(e),!r&&(r=new i.HeadingPitchRoll);let o=i.Transforms.headingPitchRollQuaternion(e,r,s,a),n=i.Matrix4.fromRotationTranslation(i.Matrix3.fromQuaternion(o,new i.Matrix3),e,new i.Matrix4);return i.Matrix4.multiplyByPoint(n,t,new i.Cartesian3)}static getPositionByDirectionAndLen(e,t,r){e=k.toCartesian(e);let s=i.Transforms.eastNorthUpToFixedFrame(e),a=i.Matrix3.fromRotationZ(i.Math.toRadians(360-(t||0))),o=i.Matrix4.fromRotationTranslation(a);return i.Matrix4.multiply(s,o,s),i.Matrix4.multiplyByPoint(s,new i.Cartesian3(r,0,0),new i.Cartesian3)}static getPositionByHprAndLen(e,t,r){e=k.toCartesian(e);let s=i.Transforms.headingPitchRollQuaternion(e,t),a=i.Matrix4.fromRotationTranslation(i.Matrix3.fromQuaternion(s,new i.Matrix3),e,new i.Matrix4);return i.Matrix4.multiplyByPoint(a,new i.Cartesian3(0,0,-r),new i.Cartesian3)}static getRayEarthPosition(e,t,r,s,a){if(!e||!t)return;t instanceof i.HeadingPitchRoll&&(t=i.Transforms.headingPitchRollQuaternion(e,t,s,a));let o=i.Matrix4.fromRotationTranslation(i.Matrix3.fromQuaternion(t,new i.Matrix3),e,new i.Matrix4);return l.getRayEarthPositionByMatrix(o,r,s)}static getRayEarthPositionByMatrix(e,t,r){let s=new i.Cartesian3,a=new i.Ray;i.Matrix4.multiplyByPoint(e,i.Cartesian3.ZERO,s),s.clone(a.origin);let o=new i.Cartesian3(0,0,t?-100:100);return l.extend2Earth(o,e,a,r)}extend2Earth(e,t,r,s){s=s||i.Ellipsoid.WGS84;let a=i.Matrix4.multiplyByPoint(t,e,new i.Cartesian3);i.Cartesian3.subtract(a,r.origin,r.direction),i.Cartesian3.normalize(r.direction,r.direction);let o=i.IntersectionTests.rayEllipsoid(r,s);if(!o)return;let n=o.start>0?o.start:o.stop,h=i.Ray.getPoint(r,n,new i.Cartesian3);if(h)try{i.Cartographic.fromCartesian(h,null,new i.Cartographic)}catch{return}return h}static getHeadingPitchRollByOrientation(e,t,r,s){if(!i.defined(t)||!i.defined(e))return new i.HeadingPitchRoll;let a=i.Matrix4.fromRotationTranslation(i.Matrix3.fromQuaternion(t,new i.Matrix3),e,new i.Matrix4);return l.getHeadingPitchRollByMatrix(a,r,s)}static getHeadingPitchRollByMatrix(e,t,r,s){return i.Transforms.fixedFrameToHeadingPitchRoll(e,t,r,s)}static getHeadingPitchRollForLine(e,t,r){e=k.toCartesian(e),t=k.toCartesian(t);let s=i.Ellipsoid.WGS84,a=new i.Cartesian3,o=new i.Matrix4,n=new i.Matrix3,h=i.Cartesian3.normalize(i.Cartesian3.subtract(t,e,a),a);i.Transforms.rotationMatrixFromPositionVelocity(e,h,s,n);let c=i.Matrix4.fromRotationTranslation(n,e,o);return r?i.Matrix4.multiplyTransformation(c,i.Axis.Z_UP_TO_X_UP,c):i.Matrix4.multiplyTransformation(c,i.Axis.X_UP_TO_Z_UP,c),i.Transforms.fixedFrameToHeadingPitchRoll(c,s)}static getReflectVector(e,t){let r=t.clone(),s=e.clone(),a=2*i.Cartesian3.dot(e,t);return i.Cartesian3.multiplyByScalar(t,a,r),i.Cartesian3.subtract(e,r,s)}static getPropertyIndex(e,t,r){let s=e&&e.property,a=s&&s.times,o=a.length;if(o===0)return{index:0};let n,h=i.Cartesian3,c=s.values,p=i.binarySearch(a,t,i.JulianDate.compare);if(p<0){if(p=~p,p===0){let I=a[p];if(n=s.backwardExtrapolationDuration,s.backwardExtrapolationType===i.ExtrapolationType.NONE||n!==0&&i.JulianDate.secondsDifference(I,t)>n)return{index:p};if(s.backwardExtrapolationType===i.ExtrapolationType.HOLD)return{position:h.unpack(c,0,r),index:p}}if(p>=o){p=o-1;let I=a[p];if(n=s.forwardExtrapolationDuration,s.forwardExtrapolationType===i.ExtrapolationType.NONE||n!==0&&i.JulianDate.secondsDifference(t,I)>n)return{index:p};if(s.forwardExtrapolationType===i.ExtrapolationType.HOLD)return p=o-1,{position:h.unpack(c,p*h.packedLength,r),index:p}}let f=s.xTable,y=s.yTable,_=s.interpolationAlgorithm,d=s.packedInterpolationLength,T=s.inputOrder;if(s.updateTableLength){s.updateTableLength=!1;let I=Math.min(_.getRequiredDataPoints(s.interpolationDegree,T),o);I!==s.numberOfPoints&&(s._numberOfPoints=I,f.length=I,y.length=I*d)}let C=s.numberOfPoints-1;if(C<1)return p=0,{index:p};let P=0,A=o-1;if(A-P+1>=C+1){let I=p-(C/2|0)-1;I<P&&(I=P);let G=I+C;G>A&&(G=A,I=G-C,I<P&&(I=P)),P=I,A=G}let H=A-P+1;for(let I=0;I<H;++I)f[I]=i.JulianDate.secondsDifference(a[P+I],a[j]);if(i.defined(h.convertPackedArrayForInterpolation))h.convertPackedArrayForInterpolation(c,P,A,y);else{let I=0,G=s.packedLength,pe=P*G,Ie=(A+1)*G;for(;pe<Ie;)y[I]=c[pe],pe++,I++}let W=i.JulianDate.secondsDifference(t,a[A]),J;if(T===0||!i.defined(_.interpolate))J=_.interpolateOrderZero(W,f,y,d,s.interpolationResult);else{let I=Math.floor(d/(T+1));J=_.interpolate(W,f,y,I,T,T,s.interpolationResult)}p=P;for(let I=P;I<=A;I++)if(i.JulianDate.compare(t,a[I])<=0){p=I-1;break}return i.defined(h.unpackInterpolationResult)?{position:h.unpackInterpolationResult(J,c,P,A,r),index:p}:{position:h.unpack(J,0,r),index:p}}return{position:h.unpack(c,p*s.packedLength,r),index:p}}},_e=or;var nr=class l{static degree2dms(e){let t=1;e<0&&(t=-1),e=Math.abs(e);let r=Math.floor(e),s=Math.floor((e-r)*60),a=Math.round((e-r)*3600%60);return a===60&&(s+=1,a=0),s===60&&(r+=1,s=0),r*=t,{degree:r,minute:s,second:a,str:r+"\xB0 "+s+"' "+a+'"'}}static dms2degree(e,t,r){let s=Math.abs(e)+t/60+r/3600;return e<0&&(s*=-1),s}static getCGCS2000EPSGByLng(e,t,r=!0){let s;if(t){let a=parseInt(e/6)+1;if(a<13||a>23)return;r?s=a+4478:s=a+4489}else{let a=parseInt((e-1.5)/3)+1;if(a<25||a>45)return;r?s=a+4488:s=a+4509}return"EPSG:"+s}static getCGCS2000EPSGByX(e){let t=parseInt(e.toString().slice(0,2));return t>=13&&t<=23?"EPSG:"+(t+4478):t>=25&&t<=45?"EPSG:"+(t+4488):void 0}static cartesian2lonlat(e,t){return k.toArray(e,t)}static cartesians2lonlats(e,t){return We.toArray(e,t)}static cartesian2mercator(e){return e?k.fromCartesian(e).toMercator():null}static cartesians2mercators(e){let t=[];for(let r=0;r<e.length;r++){let s=l.cartesian2mercator(e[r]);s&&t.push(s)}return t}static lonlat2cartesian(e,t=0){return!e||e.length<2?null:i.Cartesian3.fromDegrees(e[0],e[1],e[2]||t)}static lonlats2cartesians(e,t){let r=[];for(let s=0;s<e.length;s++){let a=e[s];if(Array.isArray(a[0])){let o=l.lonlats2cartesians(a,t);o&&o.length>0&&r.push(o)}else{let o=l.lonlat2cartesian(a,t);o&&r.push(o)}}return r}static lonlat2mercator(e){return k.fromArray(e).toMercator()}static lonlats2mercators(e){let t=[];for(let r=0;r<e.length;r++){let s=l.lonlat2mercator(e[r]);t.push(s)}return t}static mercator2cartesian(e,t){if(isNaN(e[0])||isNaN(e[1]))return null;let r=k.fromMercator(e);return i.defined(t)&&(r.alt=t),r.toCartesian()}static mercators2cartesians(e,t){let r=[];for(let s=0;s<e.length;s++){let a=l.mercator2cartesian(e[s],t);a&&r.push(a)}return r}static mercator2lonlat(e){return k.fromMercator(e).toArray()}static mercators2lonlats(e){let t=[];for(let r=0;r<e.length;r++){let s=l.mercator2lonlat(e[r]);t.push(s)}return t}static bd2gcj(e){let t=Number(e[0]),r=Number(e[1]),s=t-.0065,a=r-.006,o=Math.sqrt(s*s+a*a)-2e-5*Math.sin(a*52.35987755982988),n=Math.atan2(a,s)-3e-6*Math.cos(s*52.35987755982988),h=o*Math.cos(n),c=o*Math.sin(n);return h=Number(h.toFixed(6)),c=Number(c.toFixed(6)),[h,c]}static gcj2bd(e){let t=Number(e[0]),r=Number(e[1]),s=Math.sqrt(t*t+r*r)+2e-5*Math.sin(r*52.35987755982988),a=Math.atan2(r,t)+3e-6*Math.cos(t*52.35987755982988),o=s*Math.cos(a)+.0065,n=s*Math.sin(a)+.006;return o=Number(o.toFixed(6)),n=Number(n.toFixed(6)),[o,n]}static wgs2gcj(e){let t=Number(e[0]),r=Number(e[1]);if(l.out_of_china(t,r))return[t,r];{let s=l.transformlat(t-105,r-35),a=l.transformlng(t-105,r-35),o=r/180*Math.PI,n=Math.sin(o);n=1-.00669342162296594*n*n;let h=Math.sqrt(n);s=s*180/(6335552717000426e-9/(n*h)*Math.PI),a=a*180/(6378245/h*Math.cos(o)*Math.PI);let c=r+s,p=t+a;return p=Number(p.toFixed(6)),c=Number(c.toFixed(6)),[p,c]}}static transformlat(e,t){let r=-100+2*e+3*t+.2*t*t+.1*e*t+.2*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,r+=(20*Math.sin(t*Math.PI)+40*Math.sin(t/3*Math.PI))*2/3,r+=(160*Math.sin(t/12*Math.PI)+320*Math.sin(t*Math.PI/30))*2/3,r}static transformlng(e,t){let r=300+e+2*t+.1*e*e+.1*e*t+.1*Math.sqrt(Math.abs(e));return r+=(20*Math.sin(6*e*Math.PI)+20*Math.sin(2*e*Math.PI))*2/3,r+=(20*Math.sin(e*Math.PI)+40*Math.sin(e/3*Math.PI))*2/3,r+=(150*Math.sin(e/12*Math.PI)+300*Math.sin(e/30*Math.PI))*2/3,r}static out_of_china(e,t){return e<72.004||e>137.8347||t<.8293||t>55.8271||!1}static gcj2wgs(e){let t=Number(e[0]),r=Number(e[1]);if(l.out_of_china(t,r))return[t,r];{let s=l.transformlat(t-105,r-35),a=l.transformlng(t-105,r-35),o=r/180*Math.PI,n=Math.sin(o);n=1-.00669342162296594*n*n;let h=Math.sqrt(n);s=s*180/(6335552717000426e-9/(n*h)*Math.PI),a=a*180/(6378245/h*Math.cos(o)*Math.PI);let c=t*2-(t+a),p=r*2-(r+s);return c=Number(c.toFixed(6)),p=Number(p.toFixed(6)),[c,p]}}static bd2wgs(e){return l.gcj2wgs(l.bd2gcj(e))}static wgs2bd(e){return l.gcj2bd(l.wgs2gcj(e))}},tt=nr;var lr=class{static getViewPosition(e,t){e=g.parsePosition(e);let r=i.Math.toRadians(e.heading),s=i.Math.toRadians(e.pitch),a=s>=0?t*Math.sin(s):-1*t*Math.sin(Math.abs(s)),o=t*Math.cos(s),n,h;r<=Math.PI/2?(n=o*Math.sin(r),h=o*Math.cos(r)):r>Math.PI/2&&r<Math.PI?(n=o*Math.cos(r-Math.PI/2),h=-1*o*Math.sin(r-Math.PI/2)):r>Math.PI&&r<Math.PI*3/2?(n=-1*o*Math.sin(r-Math.PI),h=-1*o*Math.cos(r-Math.PI)):(n=-1*o*Math.sin(Math.PI*2-r),h=o*Math.cos(Math.PI*2-r));let c=i.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),p=Math.sin(i.Math.toRadians(e.lng)),f=Math.cos(i.Math.toRadians(e.lng)),y=Math.sin(i.Math.toRadians(e.lat)),_=Math.cos(i.Math.toRadians(e.lat)),d=_*a-y*h;return new i.Cartesian3(c.x+(f*d-p*n),c.y+(p*d+f*n),c.z+(y*a+_*h))}static getCameraOrientation(e){let t=new i.Matrix3;return i.Matrix3.setColumn(t,0,i.Cartesian3.negate(e.rightWC,new i.Cartesian3),t),i.Matrix3.setColumn(t,1,e.upWC,t),i.Matrix3.setColumn(t,2,e.directionWC,t),i.Quaternion.fromRotationMatrix(t,new i.Quaternion)}static setCamera(e,t,r,s){e.position=t,e.direction=i.Cartesian3.normalize(i.Cartesian3.subtract(r,t,new i.Cartesian3),new i.Cartesian3);let a=new i.Matrix3;i.Matrix3.fromRotationY(-i.Math.toRadians(s)/2,a);let o=new i.Cartesian3;i.Matrix3.multiplyByVector(a,t,o),i.Cartesian3.normalize(o,o),e.up=o}},re=lr;var hr=class{constructor(e){this._viewer=e,this._options={}}_setViewerOption(){var e,t,r;return this._viewer.delegate.shadows=(t=(e=this._options)==null?void 0:e.shadows)!=null?t:!1,this._viewer.delegate.resolutionScale=((r=this._options)==null?void 0:r.resolutionScale)||1,this}_setCanvasOption(){return this._options.tabIndex&&this._viewer.scene.canvas.setAttribute("tabIndex",this._options.tabIndex),this}_setSceneOption(){var t,r,s,a;let e=this._viewer.scene;return e.skyAtmosphere.show=(t=this._options.showAtmosphere)!=null?t:!0,e.sun.show=(r=this._options.showSun)!=null?r:!0,e.moon.show=(s=this._options.showMoon)!=null?s:!0,e.postProcessStages.fxaa.enabled=(a=this._options.enableFxaa)!=null?a:!1,e.msaaSupported&&(e.msaaSamples=+this._options.msaaSamples||1),this}_setSkyBoxOption(){var t;if(!this._options.skyBox)return this;let e=this._options.skyBox;if(e instanceof i.SkyBox)this._viewer.scene.skyBox=e;else{let r=this._viewer.scene.skyBox;r.show=(t=e.show)!=null?t:!0,e.offsetAngle&&(r.offsetAngle=e.offsetAngle),e!=null&&e.sources&&(r.sources=e.sources)}return this}_setGlobeOption(){var r,s,a,o,n,h,c,p,f,y,_,d;if(!this._options.globe)return this;let e=this._viewer.scene.globe,t=this._options.globe;if(x.merge(e,{show:(r=t==null?void 0:t.show)!=null?r:!0,showGroundAtmosphere:(s=t==null?void 0:t.showGroundAtmosphere)!=null?s:!0,enableLighting:(a=t==null?void 0:t.enableLighting)!=null?a:!1,depthTestAgainstTerrain:(o=t==null?void 0:t.depthTestAgainstTerrain)!=null?o:!1,tileCacheSize:+(t==null?void 0:t.tileCacheSize)||100,preloadSiblings:(n=t==null?void 0:t.preloadSiblings)!=null?n:!1,showSkirts:(h=t==null?void 0:t.showSkirts)!=null?h:!0,baseColor:(t==null?void 0:t.baseColor)||new i.Color(0,0,.5,1),terrainExaggeration:(t==null?void 0:t.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(t==null?void 0:t.terrainExaggerationRelativeHeight)||0}),x.merge(e.translucency,{enabled:(p=(c=t==null?void 0:t.translucency)==null?void 0:c.enabled)!=null?p:!1,backFaceAlpha:+((f=t==null?void 0:t.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(y=t==null?void 0:t.translucency)==null?void 0:y.backFaceAlphaByDistance,frontFaceAlpha:+((_=t==null?void 0:t.translucency)==null?void 0:_.frontFaceAlpha)||1,frontFaceAlphaByDistance:(d=t==null?void 0:t.translucency)==null?void 0:d.frontFaceAlphaByDistance}),t!=null&&t.filterColor){let T=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,C=T.sources.pop();T.sources.push(C.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${t.filterColor.toString()};`))}return this}_setCameraController(){var r,s,a,o,n,h,c;if(!((r=this._options)!=null&&r.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,t=this._options.cameraController;return x.merge(e,{enableInputs:(s=t==null?void 0:t.enableInputs)!=null?s:!0,enableRotate:(a=t==null?void 0:t.enableRotate)!=null?a:!0,enableTilt:(o=t==null?void 0:t.enableTilt)!=null?o:!0,enableTranslate:(n=t==null?void 0:t.enableTranslate)!=null?n:!0,enableZoom:(h=t==null?void 0:t.enableZoom)!=null?h:!0,enableCollisionDetection:(c=t==null?void 0:t.enableCollisionDetection)!=null?c:!0,minimumZoomDistance:+(t==null?void 0:t.minimumZoomDistance)||1,maximumZoomDistance:+(t==null?void 0:t.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)}},cr=hr;var pr=class{constructor(e){this._viewer=e,this._mouseMode=0}setPitchRange(e,t){let r=new i.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===i.SceneMode.SCENE3D&&(r.setInputAction(s=>{r.setInputAction(a=>{let o=!0,n=a.endPosition.y<a.startPosition.y;n&&this._viewer.camera.pitch>i.Math.toRadians(t)||!n&&this._viewer.camera.pitch<i.Math.toRadians(e)?o=!1:o=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=o},i.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===Me.LEFT_MIDDLE?i.ScreenSpaceEventType.MIDDLE_DOWN:i.ScreenSpaceEventType.RIGHT_DOWN),r.setInputAction(s=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,r.removeInputAction(i.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===Me.LEFT_MIDDLE?i.ScreenSpaceEventType.MIDDLE_UP:i.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||Me.LEFT_MIDDLE,e===Me.LEFT_MIDDLE?(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.CameraEventType.MIDDLE_DRAG,i.CameraEventType.PINCH,{eventType:i.CameraEventType.LEFT_DRAG,modifier:i.KeyboardEventModifier.CTRL},{eventType:i.CameraEventType.RIGHT_DRAG,modifier:i.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.CameraEventType.RIGHT_DRAG,i.CameraEventType.WHEEL,i.CameraEventType.PINCH]):e===Me.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.CameraEventType.RIGHT_DRAG,i.CameraEventType.PINCH,{eventType:i.CameraEventType.LEFT_DRAG,modifier:i.KeyboardEventModifier.CTRL},{eventType:i.CameraEventType.RIGHT_DRAG,modifier:i.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.CameraEventType.WHEEL,i.CameraEventType.PINCH])}},dr=pr;var Od={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"},m=Od;var kd={},mr=kd;var ur=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?m.ENABLED:m.DISABLED,this._enableHook&&this._enableHook())}get state(){return this._state}static registerType(e){e&&(mr[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getWidgetType(e){return mr[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=m.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;")}},S=ur;var fr=class extends S{constructor(){super(),this._wrapper=b.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=m.INITIALIZED}get type(){return S.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 i.ScreenSpaceEventHandler(this._viewer.canvas)}_bindEvent(){this._handler.setInputAction(e=>{this._onRightClick(e)},i.ScreenSpaceEventType.RIGHT_CLICK),this._handler.setInputAction(e=>{this._onClick(e)},i.ScreenSpaceEventType.LEFT_CLICK)}_unbindEvent(){this._handler.removeInputAction(i.ScreenSpaceEventType.RIGHT_CLICK),this._handler.removeInputAction(i.ScreenSpaceEventType.LEFT_CLICK)}_mountContent(){this._ulEl=b.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 s;if(!this._enable)return;this._overlay=void 0;let t=this._viewer.scene;this._windowPosition=e.position;let r=t.pick(e.position);if(t.pickPositionSupported&&(this._position=t.pickPosition(e.position)),this._position){let a=i.Ellipsoid.WGS84.cartesianToCartographic(this._position);a&&(this._wgs84Position={lng:i.Math.toDegrees(a.longitude),lat:i.Math.toDegrees(a.latitude),alt:a.height})}if(t.mode===i.SceneMode.SCENE3D){let a=t.camera.getPickRay(e.position);this._surfacePosition=t.globe.pick(a,t)}else this._surfacePosition=t.camera.pickEllipsoid(e.position,i.Ellipsoid.WGS84);if(this._surfacePosition){let a=i.Ellipsoid.WGS84.cartesianToCartographic(this._surfacePosition);a&&(this._wgs84SurfacePosition={lng:i.Math.toDegrees(a.longitude),lat:i.Math.toDegrees(a.latitude),alt:a.height})}if(this._instanceId=r==null?void 0:r.instanceId,(r==null?void 0:r.id)instanceof i.Entity){let a=this._viewer.getLayers().filter(o=>o.layerId===r.id.layerId)[0];a&&a.getOverlay&&(this._overlay=a.getOverlay(r.id.overlayId))}else if(r instanceof i.Cesium3DTileFeature){let a=this._viewer.getLayers().filter(o=>o.layerId===r.tileset.layerId)[0];a&&a.getOverlay&&(this._overlay=a.getOverlay(r.tileset.overlayId))}else if((r==null?void 0:r.primitive)instanceof i.Cesium3DTileset){let a=this._viewer.getLayers().filter(o=>o.layerId===r.primitive.layerId)[0];a&&a.getOverlay&&(this._overlay=a.getOverlay(r.primitive.overlayId))}else if(r!=null&&r.primitive){let a=this._viewer.getLayers().filter(o=>o.layerId===r.primitive.layerId)[0];a&&a.getOverlay&&(this._overlay=a.getOverlay(r.primitive.overlayId))}this._overlayMenu=((s=this._overlay)==null?void 0:s.contextMenu)||[],this._mountMenu(),this._updateWindowCoord(e.position)}_onClick(e){this.hide()}_updateWindowCoord(e){let t=this._ulEl.hasChildNodes()?"visible":"hidden",{x:r,y:s}=e;this._wrapper.style.cssText=`
|
|
2
|
-
visibility:${t};
|
|
3
|
-
z-index:1;
|
|
4
|
-
transform:translate3d(${Math.round(r)}px,${Math.round(s)}px, 0);
|
|
5
|
-
`}_setCustomClass(){b.setClass(this._wrapper,`pggis-context-menu ${this._config.customClass}`)}_addMenuItem(e,t,r){if(!e||!t)return this;let s=b.create("li","menu-item",null),a=b.create("a","",s);a.innerHTML=e,a.href="javascript:void(0)";let o=this;return t&&(a.onclick=()=>{t.call(r,{windowPosition:o._windowPosition,position:o._position,wgs84Position:o._wgs84Position,surfacePosition:o._surfacePosition,wgs84SurfacePosition:o._wgs84SurfacePosition,overlay:o._overlay,instanceId:o._instanceId}),o.hide()}),this._ulEl.appendChild(s),this}};S.registerType("contextmenu");var On=fr;var _r=class extends S{constructor(){super(),this._wrapper=b.create("div","widget location-bar"),this._mouseEl=void 0,this._cameraEl=void 0,this._fpsEl=void 0,this._msEl=void 0,this._lastMouseSampleTime=i.getTimestamp(),this._lastCameraSampleTime=i.getTimestamp(),this._lastFpsSampleTime=i.getTimestamp(),this._lastMsSampleTime=i.getTimestamp(),this._fpsFrameCount=0,this._msFrameCount=0,this._state=m.INITIALIZED}get type(){return S.getWidgetType("location_bar")}_installHook(){let e=this;Object.defineProperty(this._viewer,"locationBar",{get(){return e}})}_bindEvent(){this._viewer.on(R.MOUSE_MOVE,this._onMove,this),this._viewer.on(D.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.on(D.POST_UPDATE,this._onPostUpdate,this)}_unbindEvent(){this._viewer.off(R.MOUSE_MOVE,this._onMove,this),this._viewer.off(D.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.off(D.POST_UPDATE,this._onPostUpdate,this)}_mountContent(){this._fpsEl=b.create("div","fps-bar",this._wrapper),this._msEl=b.create("div","ms-bar",this._wrapper),this._cameraEl=b.create("div","camera-bar",this._wrapper),this._mouseEl=b.create("div","mouse-bar",this._wrapper),this._ready=!0}_onMove(e){let t=i.getTimestamp();if(t<this._lastMouseSampleTime+300)return;let r=e.wgs84SurfacePosition;this._mouseEl.innerHTML=`
|
|
6
|
-
<span>\u6D77\u62D4\uFF1A${(r==null?void 0:r.alt.toFixed(2))||Number.NaN} \u7C73</span>
|
|
7
|
-
<span>\u7EAC\u5EA6\uFF1A${(r==null?void 0:r.lat.toFixed(8))||Number.NaN}</span>
|
|
8
|
-
<span>\u7ECF\u5EA6\uFF1A${(r==null?void 0:r.lng.toFixed(8))||Number.NaN}</span>`,this._lastMouseSampleTime=t}_onCameraChanged(){let e=i.getTimestamp();if(e<this._lastCameraSampleTime+300)return;let t=this._viewer.cameraPosition;this._cameraEl.innerHTML=`
|
|
9
|
-
<span>\u89C6\u89D2\uFF1A${(+t.pitch).toFixed(2)}</span>
|
|
10
|
-
<span>\u89C6\u9AD8\uFF1A${(+t.alt).toFixed(2)} \u7C73</span>
|
|
11
|
-
`,this._lastCameraSampleTime=e}_onPostUpdate(){let e=i.getTimestamp();this._msFrameCount++;let t=e-this._lastMsSampleTime;if(t>200){let s=(t/this._msFrameCount).toFixed(2);this._msEl.innerHTML=`<span>${s} MS</span>`,this._lastMsSampleTime=e,this._msFrameCount=0}this._fpsFrameCount++;let r=e-this._lastFpsSampleTime;if(r>1e3){let s=this._fpsFrameCount*1e3/r|0;this._fpsEl.innerHTML=`<span>${s} FPS</span>`,this._lastFpsSampleTime=e,this._fpsFrameCount=0}}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8PtYRcn4OIRHUAAAAASUVORK5CYII=
|
|
13
|
-
`,zn=zd;var Nd=`
|
|
14
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
15
|
-
<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">
|
|
16
|
-
<defs><clipPath id="b"><rect width="120" height="120"/></clipPath></defs>
|
|
17
|
-
<g id="a" clip-path="url(#b)">
|
|
18
|
-
<g transform="translate(-216 -938)">
|
|
19
|
-
<path d="M60,120a59.721,59.721,0,0,1-33.547-10.247,60.174,60.174,0,0,1-21.738-26.4,59.921,59.921,0,0,1,5.532-56.9,60.176,60.176,0,0,1,26.4-21.738,59.92,59.92,0,0,1,56.9,5.532,60.175,60.175,0,0,1,21.738,26.4,59.921,59.921,0,0,1-5.532,56.9,60.174,60.174,0,0,1-26.4,21.738A59.625,59.625,0,0,1,60,120ZM60,2a57.73,57.73,0,0,0-32.429,9.906A58.17,58.17,0,0,0,6.558,37.424a57.923,57.923,0,0,0,5.348,55,58.17,58.17,0,0,0,25.519,21.014,57.923,57.923,0,0,0,55-5.348,58.17,58.17,0,0,0,21.014-25.518,57.924,57.924,0,0,0-5.348-55A58.169,58.169,0,0,0,82.576,6.558,57.635,57.635,0,0,0,60,2Z" transform="translate(216 938)" fill="#696e84"/><path d="M42,84A42.011,42.011,0,0,1,25.652,3.3a42.011,42.011,0,0,1,32.7,77.4A41.737,41.737,0,0,1,42,84ZM42,2A40.011,40.011,0,0,0,26.43,78.857,40.01,40.01,0,0,0,57.57,5.143,39.748,39.748,0,0,0,42,2Z" transform="translate(234 956)" opacity="0.899"/><path d="M42-4c.363,0,.731,0,1.094.013L43,.012Q42.578,0,42.153,0H42ZM53.91-2.442c.351.094.706.193,1.055.3L53.84,1.692h0c-.318-.093-.64-.183-.961-.269Zm11.1,4.6c.314.182.631.37.941.56L63.868,6.135l0,0-.005,0-.009-.005,0,0-.009-.006,0,0-.01-.006,0,0L63.807,6.1l0,0-.012-.007h0l-.012-.007h0q-.311-.189-.625-.372h0L63.14,5.7h0l-.011-.006,0,0-.01-.006,0,0L63.1,5.677l-.006,0-.007,0-.007,0-.005,0-.008,0-.005,0-.009-.005,0,0-.011-.006h0l-.012-.007h0l-.013-.008ZM74.534,9.48c.257.257.514.52.765.783l-2.9,2.76-.164-.171,0,0-.008-.008-.006-.006,0,0-.009-.009,0,0c-.1-.1-.2-.208-.3-.312l0,0-.009-.009,0,0-.008-.008,0,0-.007-.007,0,0-.005-.005-.007-.007,0,0-.008-.008,0,0-.01-.01h0l-.126-.127Zm7.314,9.525c.182.315.363.636.537.955l-3.51,1.919q-.11-.2-.221-.4h0l-.015-.027h0l-.007-.013h0l-.007-.012,0,0-.006-.011,0,0-.006-.011,0,0-.006-.011,0,0-.006-.01,0-.005,0-.009,0-.005,0-.008,0-.006,0-.008,0-.007,0-.006,0-.008,0-.006,0-.008,0-.005,0-.009,0,0-.005-.009,0,0-.006-.01,0,0-.006-.011v0l-.006-.011v0l-.007-.012h0l-.117-.2Zm4.6,11.1c.094.351.185.709.27,1.062l-3.888.938c-.037-.152-.074-.3-.113-.455h0l0-.015h0l0-.015h0l0-.014h0l0-.014h0l0-.014h0l0-.014h0l-.017-.067,0-.009v0l0-.011v0l0-.013h0l0-.014h0q-.039-.149-.078-.3ZM84,42.019l4,0c0,.363,0,.731-.013,1.093l-4-.1q.005-.212.008-.425V42.47c0-.024,0-.049,0-.073v-.143Q84,42.137,84,42.019ZM82.573,52.895l3.864,1.035c-.094.351-.194.706-.3,1.055L82.3,53.858q.141-.479.27-.963Zm-4.206,10.13,3.461,2.005c-.182.314-.371.631-.56.941l-3.412-2.087Q78.116,63.458,78.367,63.025Zm-6.688,8.694,2.827,2.83c-.257.257-.521.514-.784.764l-2.759-2.9.088-.084,0,0,.007-.006.005-.005,0,0,.009-.008h0Q71.382,72.014,71.678,71.718Zm-8.7,6.677,2,3.464c-.315.182-.636.362-.955.536L62.1,78.885l.249-.137h0l.012-.006,0,0,.01-.006.005,0,.008,0,.007,0,.007,0,.008,0,.006,0,.008,0,.005,0,.01-.005,0,0,.011-.006h0l.013-.007h0l.013-.007h0l.013-.007h0q.239-.134.475-.27ZM52.84,82.588l1.03,3.865c-.351.094-.709.184-1.062.269l-.937-3.889.213-.052.012,0,.013,0,.014,0,.011,0h0l.013,0h0Q52.5,82.679,52.84,82.588Zm-11.878,1.4c.265.006.528.01.794.012h.206l0,4c-.363,0-.731,0-1.093-.014l.1-4ZM30.124,82.3c.22.065.439.127.661.188h0l.013,0h0l.014,0h0l.012,0,.257.07L30.05,86.432c-.351-.094-.706-.194-1.055-.3ZM20.1,77.845q.317.194.638.383h0l.012.007,0,0,.009.005.005,0,.007,0,.008,0,0,0,.01.006,0,0,.16.093-2.007,3.46c-.314-.182-.631-.371-.941-.561Zm-8.53-6.9.19.2h0l.009.009,0,0,.008.008,0,0,.007.007,0,0,.006.006.005.006,0,0,.007.007,0,0,.007.007,0,0,.008.009h0c.142.146.283.29.427.434L9.437,74.49c-.257-.257-.514-.521-.764-.784ZM5.106,62.087c.06.11.12.219.181.328h0l.007.013h0l.007.012v0l.006.011v0l.006.01,0,0,0,.008,0,.006,0,.007,0,.008,0,.005,0,.009,0,0,.006.01,0,0,.006.011,0,0,.007.012v0l.007.012v0l.007.013h0q.089.159.18.317l0,0,.006.01,0,.007,0,.007.006.01,0,0,.007.013h0l-3.465,2c-.182-.315-.362-.636-.536-.955l3.511-1.916ZM1.162,51.853l.024.1,0,.009v0q.059.244.122.487h0l0,.015v0l0,.012v0l0,.01,0,.006,0,.009,0,.007,0,.008,0,.008,0,.007,0,.009,0,.006,0,.01v0l0,.01v0l0,.012v0l0,.014h0l.056.211L-2.458,53.85c-.093-.351-.184-.709-.269-1.062ZM-3.986,40.845l4,.1v.006h0v.073C0,41.33,0,41.635,0,41.943l-4-.005C-4,41.575-3.995,41.207-3.986,40.845Zm1.857-11.869,3.837,1.131q-.086.291-.167.583h0l0,.015h0l0,.01,0,.007v0c-.032.114-.063.23-.094.345L-2.426,30.03C-2.332,29.679-2.232,29.324-2.129,28.975ZM2.754,17.994l3.41,2.09c-.131.214-.259.426-.386.643v0l-.007.011,0,0-.006.01,0,.006,0,.007-.1.177L2.193,18.934C2.375,18.62,2.564,18.3,2.754,17.994Zm7.555-9.335,2.756,2.9q-.243.231-.481.464l-.006.006-.23.227L9.524,9.422C9.781,9.166,10.045,8.909,10.309,8.658Zm9.706-7.074L21.929,5.1q-.439.239-.872.489l-2-3.466C19.374,1.939,19.7,1.759,20.015,1.585ZM31.232-2.732l.933,3.89-.3.074h0l-.014,0h0l-.014,0-.015,0-.015,0-.015,0-.471.121-.015,0-.015,0-.015,0-.012,0h0l-.013,0h0l-.014,0h0L31.2,1.4,30.17-2.464C30.521-2.557,30.879-2.647,31.232-2.732Z" transform="translate(234 956)" fill="#ffc71266"/>
|
|
20
|
-
<circle cx="2.5" cy="2.5" r="2.5" transform="translate(274 943.5)" fill="#ffc712"/>
|
|
21
|
-
</g>
|
|
22
|
-
</g>
|
|
23
|
-
</svg>
|
|
24
|
-
`,Nn=Nd;var Fd=`
|
|
25
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
26
|
-
<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">
|
|
27
|
-
<defs><clipPath id="b"><rect width="120" height="120"/></clipPath></defs>
|
|
28
|
-
<g id="a" clip-path="url(#b)">
|
|
29
|
-
<g transform="translate(-216 -938)">
|
|
30
|
-
<g transform="translate(0 0)">
|
|
31
|
-
<circle cx="35" cy="35" r="35" transform="translate(241 963)" opacity="0.901"/>
|
|
32
|
-
<path d="M19-1c.35,0,.7.009,1.051.027L20,.026Q19.612.006,19.22,0H19Zm3.144.246c.345.055.694.119,1.035.192l-.208.978q-.487-.1-.983-.182Zm3.068.738c.332.108.666.227.992.353l-.36.933q-.407-.157-.823-.3l-.007,0-.007,0L25,.967l-.006,0L24.9.934ZM28.125,1.2c.311.16.621.33.923.505l-.5.864-.034-.019-.006,0-.006,0-.006,0-.006,0,0,0h0q-.354-.2-.717-.393l-.1-.05Zm2.684,1.658c.282.206.562.423.832.644l-.632.775-.036-.029h0l-.005,0h0l0,0h0l0,0,0,0q-.359-.291-.733-.565ZM33.2,4.914c.246.248.489.506.721.766l-.746.666q-.224-.25-.456-.493h0l-.009-.01,0,0L32.7,5.832l0,0-.008-.009,0,0-.008-.008,0,0L32.665,5.8l0,0-.006-.006,0,0-.006-.006-.007-.007,0,0-.008-.008,0,0-.009-.009h0l-.126-.128Zm2.039,2.406c.2.283.4.576.593.87l-.841.541v0h0l0-.005h0l0-.005h0l0-.006h0l-.015-.023h0l0-.006h0l0-.005h0l0-.005h0l0,0v0l0,0h0l-.027-.041h0l0-.006h0l0-.006h0L34.9,8.591h0q-.228-.348-.472-.686Zm1.637,2.7c.157.312.308.633.448.953l-.916.4q-.2-.459-.426-.9Zm1.191,2.922c.106.333.2.673.292,1.012l-.968.252c-.032-.121-.064-.242-.1-.362V13.8l0-.006h0l0-.007h0q-.078-.273-.163-.542Zm.713,3.074c.052.345.095.7.128,1.045l-1,.1q-.048-.5-.122-.992ZM38,19.152l1,.008c0,.35-.015.7-.035,1.051l-1-.06Q38,19.655,38,19.152Zm-.257,2.986.986.164c-.057.345-.125.693-.2,1.034l-.976-.216c.025-.111.048-.223.071-.335h0v-.007h0v-.055h0v-.006h0Q37.694,22.426,37.742,22.138Zm-.724,2.908.948.318c-.111.331-.233.664-.361.989l-.93-.368.011-.029h0l0-.006h0l0-.006h0l0-.006v0l0,0v0l0-.006v0l0,0,0,0v0l0-.005h0l0-.006h0l0-.006h0l0-.006h0l0-.006h0l.005-.013h0Q36.88,25.456,37.018,25.046ZM35.842,27.8l.886.464c-.162.309-.335.619-.513.919l-.86-.51Q35.61,28.246,35.842,27.8Zm-1.6,2.537.8.6c-.209.28-.427.558-.651.827l-.77-.639.166-.2,0,0,0-.005,0,0h0l0-.005h0l0-.006h0Q34.037,30.621,34.247,30.339Zm-1.973,2.256.7.715c-.25.244-.51.485-.772.715l-.66-.751q.132-.116.261-.234h0l.009-.009,0,0,.008-.008.006-.005.006-.005.006-.005L31.846,33l.005,0,.006-.005.006-.006,0,0,.008-.007,0,0,.008-.007,0,0,.008-.008,0,0,.009-.008,0,0,.01-.009h0l.01-.009h0l.01-.009h0l.01-.01h0l.034-.032h0l.011-.01h0C32.094,32.768,32.184,32.682,32.274,32.595Zm-2.3,1.919.578.816c-.285.2-.579.4-.874.586l-.534-.845q.286-.181.565-.371h0l.012-.008h0l.034-.023.005,0,.006,0,.006,0,.006,0,.006,0,0,0h0l.006,0h0ZM27.4,36.048l.443.9c-.313.155-.635.3-.956.441l-.395-.919q.229-.1.454-.2h0l.007,0,.007,0,.007,0,.007,0h0l.005,0h0c.14-.065.277-.131.415-.2Zm-2.784,1.109.3.955c-.334.1-.675.2-1.014.284l-.244-.97q.4-.1.8-.219h0l.008,0,.007,0,.008,0,.008,0,.008,0,.008,0h0l.119-.036Zm-2.925.654.14.99c-.345.049-.7.089-1.045.12l-.088-1c.281-.025.561-.056.839-.093h.042Zm-3.991.145q.215.015.43.024h.1l.093,0h0q.188.007.376.01l-.016,1c-.35-.005-.7-.02-1.051-.044Zm-2.965-.437c.132.03.263.059.4.086l.007,0,.007,0h.014l.007,0h.021q.262.053.527.1l-.172.985c-.344-.06-.692-.13-1.032-.208l.224-.975Zm-2.858-.9q.462.187.936.35l-.326.946c-.33-.114-.662-.238-.986-.369Zm-2.68-1.341q.145.088.292.173h0l.006,0h0l.005,0,.006,0,.006,0,.006,0,.007,0,.006,0,.006,0h0l.006,0h0l.006,0h0l.006,0h0l.006,0h0l.006,0h0l.272.153h0l.006,0,.006,0,.006,0,.006,0,.006,0,.006,0,.006,0,.006,0,.169.091-.471.882c-.308-.164-.616-.339-.915-.52ZM6.759,33.532l.192.16h0l.011.009h0l.012.01.006,0,0,0h0l0,0h0l0,0H7l.005,0H7q.265.216.537.422l-.6.8c-.278-.211-.555-.432-.822-.657l.645-.764ZM4.626,31.426l.062.071h0l.031.035h0l.009.011h0l.009.01h0l.009.01h0l.009.011h0l.009.01,0,0,.008.01,0,0,.008.009,0,0,.008.009,0,0,.008.009,0,0,.009.01,0,0,.008.009,0,0,.008.008,0,0,.008.009,0,0,.008.009,0,0,.007.008,0,0,.007.008,0,0,.007.008,0,0,.007.008,0,0,.008.008,0,0,.007.008,0,0,.008.008,0,0,.007.008,0,0,.007.008,0,0,.007.008,0,0,.007.008,0,0,.008.008,0,0L5,31.844l0,0,.007.008,0,0,.008.008,0,0,.008.008,0,0,.008.008,0,0,.007.008,0,0,.008.008,0,0,.008.008,0,0,.008.009,0,0,.009.009,0,0,.008.009,0,0,.008.009,0,0,.008.008,0,0,.008.009,0,0,.009.01,0,0,.008.009,0,0,.008.009,0,0,.008.009,0,0,.009.009,0,0,.009.01,0,0,.009.009,0,0,.008.009,0,0,.009.009,0,0,.009.01h0l.01.01,0,0,.009.009,0,0,.009.009,0,0,.009.009,0,0,.009.009h0l-.721.693c-.242-.252-.481-.513-.709-.777l.756-.654ZM2.849,29.013l.05.079h0l0,.006h0l0,0,0,0,0,0,0,0h0q.235.372.486.733l-.821.572c-.2-.287-.394-.582-.579-.879l.849-.528ZM1.474,26.35q.08.189.163.377h0l0,.006v0l0,0v0l0,0v0l0,0,0,0v0q.113.253.234.5l-.9.435c-.152-.315-.3-.638-.433-.96ZM.537,23.5q.086.354.185.7h0l0,.007h0l0,.005v.01h0q.034.119.07.238l-.958.287c-.1-.335-.193-.677-.276-1.016L.537,23.5ZM.062,20.544q.012.143.025.286h0v.007h0v.05c.013.132.027.264.043.4h0v.007h0V21.3h0v.024h0q.013.108.027.215l-.991.132c-.046-.346-.084-.7-.112-1.046Zm-1-3.073,1,.075q-.038.5-.049,1l-1-.023C-.986,18.173-.969,17.819-.942,17.472Zm.485-3.118.973.231q-.077.323-.143.65h0l-.009.045v.006h0v.006h0V15.3h0v.007h0v.007h0c-.016.082-.032.164-.047.246l-.984-.18C-.611,15.041-.538,14.694-.457,14.354Zm.972-3,.924.383q-.11.265-.212.535h0l0,.005v0l0,0v0l0,.005v0l0,0v0l0,0v0l0,0v0l0,.005v0l0,0v0l0,.005h0l-.009.025v0l0,.005h0l0,.005h0l0,.005h0l0,.005v0l0,.005h0l0,.006h0l0,.006h0l0,.006h0q-.047.127-.092.255l-.943-.333C.254,12.006.381,11.675.515,11.352Zm1.434-2.81.852.524-.08.131h0l0,.006h0l0,.005h0l0,.005h0l0,0v0l0,0v0l0,0v0l0,0,0,0,0,0,0,0,0,0,0,0v0l0,0,0,0,0,0v0l0,0,0,0,0,0v0l0,.005h0l0,.006h0l0,.006h0q-.184.309-.356.625l-.878-.478C1.589,9.146,1.766,8.839,1.949,8.542ZM3.807,5.993l.759.651-.041.047h0l-.01.011h0l-.009.011h0l-.009.01h0l-.009.011h0l-.009.011h0l-.009.01,0,0-.008.01,0,0-.008.01,0,0-.008.01,0,0-.009.01,0,0-.008.01,0,0-.008.01,0,0-.008.01v0l-.009.01h0l-.01.011h0l-.01.012h0l-.009.011h0l-.009.011h0q-.159.192-.313.389h0l-.009.012h0l-.009.011,0,0L4,7.332l0,0-.007.008,0,0-.006.007,0,.006,0,0-.008.01h0l-.033.043-.792-.61C3.357,6.533,3.58,6.258,3.807,5.993ZM6.041,3.766l.648.761-.2.176-.006.005-.006,0-.006.006,0,0-.008.007,0,0-.009.008,0,0-.01.009h0l-.011.009h0q-.24.212-.472.432l-.687-.726C5.511,4.229,5.775,3.993,6.041,3.766ZM8.6,1.916l.521.854-.236.146h0l-.006,0h0l-.005,0h0l-.005,0-.006,0h0l-.02.013-.006,0-.006,0-.006,0-.006,0-.006,0-.006,0-.006,0-.006,0h0q-.257.164-.508.336l-.565-.825C8,2.291,8.3,2.1,8.6,1.916ZM11.41.491l.38.925q-.186.077-.371.157h0l-.006,0h0l-.007,0-.007,0-.007,0-.007,0-.009,0h0l-.014.006-.007,0-.007,0-.007,0-.007,0-.007,0h0q-.207.092-.412.188h0l-.006,0-.007,0-.006,0-.006,0-.006,0,0,0-.428-.9C10.763.767,11.087.623,11.41.491Zm3.005-.963L14.644.5q-.489.115-.967.254L13.4-.2C13.733-.3,14.075-.392,14.415-.472Zm3.119-.475.072,1q-.5.036-1,.1l-.124-.992C16.833-.887,17.186-.922,17.534-.947Z" transform="translate(257 979)" fill="#696e84"/>
|
|
33
|
-
<text transform="translate(276 975)" fill="#fcbb40" font-size="12" font-family=""><tspan x="-4.506" y="0">N</tspan></text>
|
|
34
|
-
<text transform="translate(276 1021) rotate(180)" fill="#fff" font-size="12" font-family=""><tspan x="-3.444" y="0">S</tspan></text>
|
|
35
|
-
<text transform="translate(299 998) rotate(90)" fill="#fff" font-size="12" font-family=""><tspan x="-3.36" y="0">E</tspan></text>
|
|
36
|
-
<text transform="translate(253 998) rotate(-90)" fill="#fff" font-size="12" font-family=""><tspan x="-5.592" y="0">W</tspan></text>
|
|
37
|
-
<path d="M3.5,0,7,28,3.5,23.818,0,28Z" transform="translate(273 984)" fill="#fcbb40"/>
|
|
38
|
-
<g transform="translate(701.825 11.94) rotate(45)">
|
|
39
|
-
<text transform="translate(396.5 973.5)" fill="#696e84" font-size="8" font-family=""><tspan x="-5.172" y="0">NE</tspan></text>
|
|
40
|
-
<text transform="translate(396.5 1022.5) rotate(180)" fill="#696e84" font-size="8" font-family=""><tspan x="-5.816" y="0">SW</tspan></text>
|
|
41
|
-
<text transform="translate(421 998) rotate(90)" fill="#696e84" font-size="8" font-family=""><tspan x="-4.488" y="0">SE</tspan></text>
|
|
42
|
-
<text transform="translate(372 998) rotate(-90)" fill="#696e84" font-size="8" font-family=""><tspan x="-6.54" y="0">NW</tspan></text>
|
|
43
|
-
</g>
|
|
44
|
-
</g>
|
|
45
|
-
</g>
|
|
46
|
-
</g>
|
|
47
|
-
</svg>
|
|
48
|
-
`,Fn=Fd;var Wd=`
|
|
49
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
50
|
-
<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">
|
|
51
|
-
<!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
|
|
52
|
-
<title>compass-rotation-marker</title>
|
|
53
|
-
<desc>Created with Sketch.</desc>
|
|
54
|
-
<defs></defs>
|
|
55
|
-
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
|
56
|
-
<g id="compass-rotation-marker">
|
|
57
|
-
<path d="M52.4399986,26.2199993 C52.4399986,11.7390936 40.7009051,0 26.2199993,0 C11.7390936,0 0,11.7390936 0,26.2199993 C0,40.7009051 11.7390936,52.4399986 26.2199993,52.4399986 C40.7009051,52.4399986 52.4399986,40.7009051 52.4399986,26.2199993 Z" id="rotator" stroke-opacity="0.135841259" stroke="#E2A549" stroke-width="9" opacity="0.201434235"></path>
|
|
58
|
-
<path d="M0,26.2199993 C0,11.7390936 11.7390936,0 26.2199993,0 L26.2199993,9 C16.7096563,9 9,16.7096563 9,26.2199993" id="Shape" opacity="0.634561567" fill="#4990E2"></path>
|
|
59
|
-
</g>
|
|
60
|
-
</g>
|
|
61
|
-
</svg>
|
|
62
|
-
`,Wn=Wd;var Gd=`
|
|
63
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
64
|
-
<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">
|
|
65
|
-
<!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
|
|
66
|
-
<title>decrease</title>
|
|
67
|
-
<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>
|
|
68
|
-
</svg>
|
|
69
|
-
`,Gn=Gd;var Hd=`
|
|
70
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
71
|
-
<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">
|
|
72
|
-
<!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
|
|
73
|
-
<title>increase</title>
|
|
74
|
-
<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>
|
|
75
|
-
</svg>
|
|
76
|
-
`,Hn=Hd;var Bd=`
|
|
77
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
78
|
-
<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">
|
|
79
|
-
<!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
|
|
80
|
-
<title>refresh</title>
|
|
81
|
-
<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>
|
|
82
|
-
</svg>
|
|
83
|
-
`,Bn=Bd;var Ud=`
|
|
84
|
-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
85
|
-
<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">
|
|
86
|
-
<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>
|
|
87
|
-
</svg>
|
|
88
|
-
`,Un=Ud;var Vd={logo:zn,compass_outer:Nn,compass_inner:Fn,compass_rotation_marker:Wn,decrease:Gn,increase:Hn,refresh:Bn,splitter:Un},K=Vd;var gr=class extends S{constructor(){super(),this._wrapper=b.create("div","widget slider"),this._baseLayer=void 0,this._moveActive=!1,this._state=m.INITIALIZED}get type(){return S.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=b.parseDom(K.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addBaseLayer(e,t=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=t||0,this._viewer.scene.splitPosition=this._wrapper.offsetLeft/this._wrapper.parentElement.offsetWidth),this)}};S.registerType("map_split");var Vn=gr;var yr=class extends S{constructor(){super(),this._wrapper=b.create("div","widget map-switch"),this._config=void 0,this._cache=[],this._state=m.INITIALIZED}get type(){return S.getWidgetType("map_switch")}_enableHook(){!this._wrapper.parentNode&&this._viewer&&this._viewer.widgetContainer.appendChild(this._wrapper)}_installHook(){let e=this;Object.defineProperty(this._viewer,"mapSwitch",{get(){return e}}),this.enable=!0,this._wrapper.onmouseover=()=>{let t=80,r=5;e._cache.length>0&&(t=e._cache.length*(t+r)-r),this._wrapper.style.width=`${t}px`},this._wrapper.onmouseout=()=>{e._wrapper.style.width="80px"}}_addItem(e){let t=b.create("div","map-item",this._wrapper),r=this._cache.length?this._cache.length-1:0;r===0&&b.addClass(t,"active"),t.setAttribute("data-index",String(r)),t.onclick=a=>{let o=document.getElementsByClassName("map-item active");o&&o.length&&(o[0].className="map-item"),this._viewer&&(a.target.className="map-item active",this._viewer.changeBaseLayer(+a.target.getAttribute("data-index")||0))},e.iconUrl&&(t.style.cssText=`
|
|
89
|
-
background:url(${e.iconUrl});
|
|
90
|
-
`);let s=b.create("span","",t);s.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"))}};S.registerType("map_switch");var jn=yr;var vr=class extends S{constructor(){super(),this._wrapper=b.create("div","widget popup"),this._config={customClass:""},this._position=void 0,this._state=m.INITIALIZED}get type(){return S.getWidgetType("popup")}set config(e){this._config=e,e.customClass&&this._setCustomClass()}_bindEvent(){if(this._viewer&&this._wrapper){let e=this,t=this._viewer.scene;t.postRender.addEventListener(()=>{if(e._position&&e._enable&&e._updateWindowCoord&&e._wrapper.style.visibility==="visible"){let r=i.SceneTransforms.worldToWindowCoordinates(t,e._position);r&&e._updateWindowCoord(r)}})}}_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 t=e.x-this._wrapper.offsetWidth/2,r=e.y-this._wrapper.offsetHeight;this._config.position==="topleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y-this._wrapper.offsetHeight):this._config.position==="topright"?(t=e.x,r=e.y-this._wrapper.offsetHeight):this._config.position==="bottomleft"?(t=e.x-this._wrapper.offsetWidth,r=e.y):this._config.position==="bottomright"&&(t=e.x,r=e.y),this._wrapper.style.cssText=`
|
|
91
|
-
visibility:visible;
|
|
92
|
-
z-index:1;
|
|
93
|
-
transform:translate3d(${Math.round(t)}px,${Math.round(r)}px, 0);
|
|
94
|
-
`}_setCustomClass(){b.setClass(this._wrapper,`widget popup ${this._config.customClass}`)}setWrapper(e){return e&&e instanceof Element&&(this._wrapper=e,b.addClass(this._wrapper,"widget popup")),this}setPosition(e){return this._position=e,this._wrapper&&(this._wrapper.style.cssText="visibility:visible;"),this}showAt(e,t){return this.setPosition(e).setContent(t),this}};S.registerType("popup");var Zn=vr;var wr=class extends S{constructor(){super(),this._wrapper=b.create("div","widget tool-tip"),this._ready=!0,this._state=m.INITIALIZED}get type(){return S.getWidgetType("tooltip")}_installHook(){let e=this;Object.defineProperty(this._viewer,"tooltip",{get(){return e}})}_updateWindowCoord(e){let t=e.x+10,r=e.y-this._wrapper.offsetHeight/2;this._wrapper.style.cssText=`
|
|
95
|
-
visibility:visible;
|
|
96
|
-
z-index:1;
|
|
97
|
-
transform:translate3d(${Math.round(t)}px,${Math.round(r)}px, 0);
|
|
98
|
-
`}showAt(e,t){return this._enable?(e&&this._updateWindowCoord(e),this.setContent(t),this):this}};S.registerType("tooltip");var Yn=wr;var xr=class extends S{constructor(){super(),this._wrapper=b.create("div","widget hawkeye-map",null),this._wrapper.setAttribute("id",x.uuid()),this._map=void 0,this._state=m.INITIALIZED}get type(){return S.getWidgetType("hawkeye_map")}_mountContent(){let e=new i.CesiumWidget(this._wrapper,{sceneMode:i.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(D.CAMERA_CHANGED,this._syncMap,this)}_unbindEvent(){this._viewer.off(D.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 i.Cartesian2(Math.floor(this._viewer.canvas.clientWidth/2),Math.floor(this._viewer.canvas.clientHeight/2)),t=this._viewer.scene.camera.pickEllipsoid(e);if(!t)return!1;let r=i.Cartesian3.distance(t,this._viewer.scene.camera.positionWC);this._map.scene.camera.lookAt(t,new i.Cartesian3(0,0,r))}addBaseLayer(e){return!this._map||!this._enable?this:(e&&(this._map.imageryLayers.removeAll(),Array.isArray(e)||(e=[e]),e.forEach(t=>{this._map.imageryLayers.add(i.ImageryLayer.fromProviderAsync(t,{}))})),this)}};S.registerType("hawkeye_map");var Jn=xr;var Cr=class extends S{constructor(){super(),this._wrapper=b.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=m.INITIALIZED}get type(){return S.getWidgetType("compass")}_installHook(){let e=this;Object.defineProperty(this._viewer,"compass",{get(){return e}}),this._wrapper.onmousedown=t=>{this._handleMouseDown(t)},this._wrapper.ondblclick=t=>{this._handleDoubleClick(t)}}_bindEvent(){this._viewer.on(D.POST_RENDER,this._postRenderHandler,this)}_unbindEvent(){this._viewer.off(D.POST_RENDER,this._postRenderHandler,this)}_postRenderHandler(){let e=this._viewer.camera.heading;this._outRing&&(this._outRing.style.cssText=`
|
|
99
|
-
transform : rotate(-${e}rad);
|
|
100
|
-
-webkit-transform : rotate(-${e}rad);
|
|
101
|
-
`)}_mountContent(){b.create("div","out-ring-bg",this._wrapper),this._outRing=b.parseDom(K.compass_outer,!0,"out-ring"),this._wrapper.appendChild(this._outRing),this._gyro=b.parseDom(K.compass_inner,!0,"gyro"),this._wrapper.appendChild(this._gyro),this._rotation_marker=b.parseDom(K.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===i.SceneMode.MORPHING)return!0;this._compassRectangle=e.currentTarget.getBoundingClientRect();let r=this._compassRectangle.width/2,s=this._getVector(e),a=i.Cartesian2.magnitude(s)/r;if(a<50/145)this._orbit(s);else if(a<1)this._rotate(s);else return!0}_handleDoubleClick(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.SceneMode.MORPHING||!r.enableInputs)return!0;if(e.mode===i.SceneMode.COLUMBUS_VIEW&&!r.enableTranslate||(e.mode===i.SceneMode.SCENE3D||e.mode===i.SceneMode.COLUMBUS_VIEW)&&(!r.enableLook||e.mode===i.SceneMode.SCENE3D&&!r.enableRotate))return;let s=this._getCameraFocus(!0);if(!s)return;let a=e.globe.ellipsoid.cartographicToCartesian(t.positionCartographic),o=e.globe.ellipsoid.geodeticSurfaceNormal(s),n=new i.BoundingSphere(s,0);t.flyToBoundingSphere(n,{offset:new i.HeadingPitchRange(0,i.Math.PI_OVER_TWO-i.Cartesian3.angleBetween(o,t.directionWC),i.Cartesian3.distance(a,s)),duration:1.5})}_getCameraFocus(e){let t=new i.Cartesian3,r=this._viewer.scene,s=r.camera;if(r.mode!==i.SceneMode.MORPHING){if(this._viewer.delegate.trackedEntity)t=this._viewer.delegate.trackedEntity.position.getValue(this._viewer.clock.currentTime);else{let a=new i.Ray;a.origin=s.positionWC,a.direction=s.directionWC,t=r.globe.pick(a,r)}if(t){if(r.mode===i.SceneMode.SCENE2D||r.mode===i.SceneMode.COLUMBUS_VIEW){t=s.worldToCameraCoordinatesPoint(t);let a=new i.Cartographic;e&&(t=r.globe.ellipsoid.cartographicToCartesian(r.mapProjection.unproject(t,a)))}else e||(t=s.worldToCameraCoordinatesPoint(t));return t}}}_orbit(e){let t=this._viewer.scene,r=t.screenSpaceCameraController,s=t.camera;if(!(t.mode===i.SceneMode.MORPHING||!r.enableInputs)){switch(t.mode){case i.SceneMode.COLUMBUS_VIEW:if(r.enableLook)break;if(!r.enableTranslate||!r.enableTilt)return;break;case i.SceneMode.SCENE3D:if(r.enableLook)break;if(!r.enableTilt||!r.enableRotate)return;break;case i.SceneMode.SCENE2D:if(!r.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=i.getTimestamp(),this._viewer.delegate.trackedEntity)this._orbitFrame=void 0,this._orbitIsLook=!1;else{let a=this._getCameraFocus(!0);a?(this._orbitFrame=i.Transforms.eastNorthUpToFixedFrame(a,t.globe.ellipsoid),this._orbitIsLook=!1):(this._orbitFrame=i.Transforms.eastNorthUpToFixedFrame(s.positionWC,t.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,t=this._viewer.camera,r=i.getTimestamp(),s=r-this._orbitLastTimestamp,a=(this._orbitCursorOpacity-.5)*2.5/1e3,o=s*a,n=this._orbitCursorAngle+i.Math.PI_OVER_TWO,h=Math.cos(n)*o,c=Math.sin(n)*o,p;this._orbitFrame&&(p=i.Matrix4.clone(t.transform),t.lookAtTransform(this._orbitFrame)),e.mode===i.SceneMode.SCENE2D?t.move(new i.Cartesian3(h,c,0),Math.max(e.canvas.clientWidth,e.canvas.clientHeight)/100*t.positionCartographic.height*o):this._orbitIsLook?(t.look(i.Cartesian3.UNIT_Z,-h),t.look(t.right,-c)):(t.rotateLeft(h),t.rotateUp(c)),this._orbitFrame&&p&&t.lookAtTransform(p),this._orbitLastTimestamp=r}_updateAngleAndOpacity(e,t){let r=Math.atan2(-e.y,e.x);this._orbitCursorAngle=i.Math.zeroToTwoPi(r-i.Math.PI_OVER_TWO);let s=i.Cartesian2.magnitude(e),a=t/2,o=Math.min(s/a,1);this._orbitCursorOpacity=.5*o*o+.5,this._rotation_marker.style.cssText=`
|
|
102
|
-
transform: rotate(-${this._orbitCursorAngle}rad);
|
|
103
|
-
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 t=this._viewer.scene,r=t.camera,s=t.screenSpaceCameraController;if(t.mode===i.SceneMode.MORPHING||t.mode===i.SceneMode.SCENE2D||!s.enableInputs||!s.enableLook&&(t.mode===i.SceneMode.COLUMBUS_VIEW||t.mode===i.SceneMode.SCENE3D&&!s.enableRotate))return;if(this._mouseMoveHandle=o=>{this._rotateMouseMoveFunction(o)},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 o=this._getCameraFocus(!0);!o||t.mode===i.SceneMode.COLUMBUS_VIEW&&!s.enableLook&&!s.enableTranslate?this._rotateFrame=i.Transforms.eastNorthUpToFixedFrame(r.positionWC,t.globe.ellipsoid):this._rotateFrame=i.Transforms.eastNorthUpToFixedFrame(o,t.globe.ellipsoid)}let a;this._rotateFrame&&(a=i.Matrix4.clone(r.transform),r.lookAtTransform(this._rotateFrame)),this._rotateInitialCameraAngle=-r.heading,this._rotateFrame&&a&&r.lookAtTransform(a),document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1)}_rotateMouseMoveFunction(e){let t=this._viewer.camera,r=this._getVector(e),a=Math.atan2(-r.y,r.x)-this._rotateInitialCursorAngle,o=i.Math.zeroToTwoPi(this._rotateInitialCameraAngle-a),n;this._rotateFrame&&(n=i.Matrix4.clone(t.transform),t.lookAtTransform(this._rotateFrame));let h=-t.heading;t.rotateRight(o-h),this._rotateFrame&&n&&t.lookAtTransform(n)}_rotateMouseUpFunction(){document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._mouseMoveHandle=void 0,this._mouseUpHandle=void 0}_getVector(e){let t=this._compassRectangle,r=new i.Cartesian2((t.right-t.left)/2,(t.bottom-t.top)/2),s=new i.Cartesian2(e.clientX-t.left,e.clientY-t.top),a=new i.Cartesian2;return i.Cartesian2.subtract(s,r,a),a}};S.registerType("compass");var qn=Cr;var Xn=new i.EllipsoidGeodesic,ke=[1,2,3,5],Tr=[...ke,...ke.map(l=>l*10),...ke.map(l=>l*100),...ke.map(l=>l*1e3),...ke.map(l=>l*1e4),...ke.map(l=>l*1e5),...ke.map(l=>l*1e6)],Er=class extends S{constructor(){super(),this._wrapper=b.create("div","widget distance-legend"),this._labelEl=void 0,this._scaleBarEl=void 0,this._lastUpdate=i.getTimestamp(),this._state=m.INITIALIZED}get type(){return S.getWidgetType("distance_legend")}_installHook(){let e=this;Object.defineProperty(this._viewer,"distanceLegend",{get(){return e}})}_bindEvent(){this._viewer.on(D.POST_RENDER,this._updateContent,this)}_unbindEvent(){this._viewer.off(D.POST_RENDER,this._updateContent,this)}_updateContent(e,t){let r=i.getTimestamp();if(r<this._lastUpdate+250||!this._labelEl||!this._scaleBarEl)return;this._lastUpdate=r;let s=e.canvas.width,a=e.canvas.height,o=e.camera.getPickRay(new i.Cartesian2(s/2|0,a-1)),n=e.camera.getPickRay(new i.Cartesian2(1+s/2|0,a-1)),h=e.globe.pick(o,e),c=e.globe.pick(n,e);if(!h||!c)return;Xn.setEndPoints(e.globe.ellipsoid.cartesianToCartographic(h),e.globe.ellipsoid.cartesianToCartographic(c));let p=Xn.surfaceDistance,f=100,y=0;for(let _=Tr.length-1;_>=0;--_)if(Tr[_]/p<f){y=Tr[_];break}if(y){this._wrapper.style.visibility="visible",this._labelEl.innerHTML=y>=1e3?`${y/1e3} km`:`${y} m`;let _=y/p|0;this._scaleBarEl.style.cssText=`width: ${_}px; left: ${(125-_)/2}px;`}}_mountContent(){this._labelEl=b.create("div","label",this._wrapper),this._scaleBarEl=b.create("div","scale-bar",this._wrapper),this._wrapper.style.visibility="hidden",this._ready=!0}};S.registerType("distance_legend");var Qn=Er;var Pr=class extends S{constructor(){super(),this._wrapper=b.create("div","widget zoom-controller"),this._zoomInEl=void 0,this._zoomOutEl=void 0,this._refreshEl=void 0,this._state=m.INITIALIZED}get type(){return S.getWidgetType("zoom_controller")}_getCameraFocus(e){let t=new i.Ray(e.camera.positionWC,e.camera.directionWC),r=i.IntersectionTests.rayEllipsoid(t,i.Ellipsoid.WGS84);return r?i.Ray.getPoint(t,r.start):i.IntersectionTests.grazingAltitudeLocation(t,i.Ellipsoid.WGS84)}_getCameraPosition(e,t,r){let s=new i.Cartesian3,a=i.Cartesian3.subtract(t,e.position,s),o=i.Cartesian3.multiplyByScalar(a,r,s);return i.Cartesian3.add(e.position,o,s)}_zoomIn(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.SceneMode.MORPHING||!r.enableInputs||e.mode===i.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.SceneMode.SCENE2D)t.zoomIn(t.positionCartographic.height*.5);else if(e.mode===i.SceneMode.SCENE3D){let s=this._getCameraFocus(e),a=this._getCameraPosition(t,s,1/2);t.flyTo({destination:a,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_refresh(){this._viewer.camera.flyHome(1.5)}_zoomOut(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.SceneMode.MORPHING||!r.enableInputs||e.mode===i.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.SceneMode.SCENE2D)t.zoomOut(t.positionCartographic.height);else if(e.mode===i.SceneMode.SCENE3D){let s=this._getCameraFocus(e),a=this._getCameraPosition(t,s,-1);t.flyTo({destination:a,orientation:{heading:t.heading,pitch:t.pitch,roll:t.roll},duration:.5,convert:!1})}}_installHook(){let e=this;Object.defineProperty(this._viewer,"zoomController",{get(){return e}})}_mountContent(){this._zoomInEl=b.parseDom(K.increase,!0,"zoom-in"),this._refreshEl=b.parseDom(K.refresh,!0,"refresh"),this._zoomOutEl=b.parseDom(K.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}};S.registerType("zoom_controller");var Kn=Pr;var Mr=class extends S{constructor(){super(),this._wrapper=b.create("div","widget loading-mask"),this._state=m.INITIALIZED}get type(){return S.getWidgetType("loading_mask")}_installHook(){let e=this;Object.defineProperty(this._viewer,"loadingMask",{get(){return e}})}_mountContent(){let e=b.parseDom(`
|
|
104
|
-
<span></span>
|
|
105
|
-
<span></span>
|
|
106
|
-
<span></span>
|
|
107
|
-
<span></span>
|
|
108
|
-
<span></span>
|
|
109
|
-
`,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};S.registerType("loading_mask");var $n=Mr;var Ar=class extends S{constructor(){super(),this._wrapper=b.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=m.INITIALIZED}get type(){return S.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=b.parseDom(K.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}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)}};S.registerType("tileset_split");var el=Ar;var br=class extends S{constructor(){super(),this._wrapper=b.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=m.INITIALIZED}get type(){return S.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=b.parseDom(K.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.ScreenSpaceEventType.PINCH_END),this._ready=!0}_moveHandler(e){if(!this._moveActive||!this._enable)return;let t=e.endPosition.x,r=(this._wrapper.offsetLeft+t)/this._wrapper.parentElement.offsetWidth;this._wrapper.style.left=100*r+"%",this._viewer.scene.splitPosition=r}addTileset(e){return!this._viewer||!this._enable?this:(e&&(this._tileset&&this._viewer.scene.primitives.remove(this._tileset),Promise.resolve(e.delegate||e).then(t=>{this._tileset=this._viewer.scene.primitives.add(t)})),this)}addBaseLayer(e){return!this._viewer||!this._enable?this:(e&&(this._baseLayer&&this._viewer.imageryLayers.remove(this._baseLayer),Promise.resolve(e).then(t=>{this._baseLayer=this._viewer.imageryLayers.addImageryProvider(t),this._baseLayer.splitDirection=1})),this)}};S.registerType("scene_split");var tl=br;var Sr=class{constructor(){this._delegate=new i.ViewportQuad,this._viewer=void 0}update(e){this._delegate.update(e)}install(e){this._viewer=e;let t=!0,r=K.logo,s=[120,51];if(t&&!r)return!1;let a=t&&r?r:K.logo;this._delegate.rectangle=new i.BoundingRectangle(10,30,s[0]||120,s[1]||51),this._delegate.material=new i.Material({fabric:{type:"Logo-Image",uniforms:{image:a},components:{diffuse:"texture(image, materialInput.st).rgb",alpha:"texture(image, materialInput.st).a "}},translucent:function(o){return!1}}),this._viewer.scene.primitives.add(this),t||this._viewer.scene.postRender.addEventListener(()=>{this._viewer.scene.primitives.contains(this)||this._viewer.scene.primitives.add(this)})}isDestroyed(){return!1}destroy(){return this}};S.registerType("attribution");var il=Sr;function Ir(){return{popup:new Zn,contextMenu:new On,tooltip:new Yn,mapSwitch:new jn,mapSplit:new Vn,locationBar:new kn,hawkeyeMap:new Jn,compass:new qn,distanceLegend:new Qn,zoomController:new Kn,loadingMask:new $n,tilesetSplit:new el,sceneSplit:new tl,attribution:new il}}var Ge="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/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YVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=";var Yd={icon_center:ft,icon_anchor:Ge,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},Dr=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new et,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 t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:t})),this._plotEvent.fire(E.DRAW_ANCHOR,t)}_onMouseMove(e){this._viewer.tooltip.showAt(e.windowPosition,this._tooltipMess);let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor&&this._floatingAnchor.position.setValue(t),this._plotEvent.fire(E.ANCHOR_MOVING,t)}_onDoubleClick(e){this._plotEvent.fire(E.DRAW_STOP,this._getEventPosition(e))}_onRightClick(e){if(this._plotEvent.fire(E.DELETE_ANCHOR),this._anchorIds&&this._anchorIds.length>0){var t=this._anchorIds[this._anchorIds.length-1];this._anchorLayer.entities.removeById(t),this._anchorIds.splice(this._anchorIds.length-1,1)}}_onCreateAnchor({position:e,isCenter:t=!1}){var s;let r=this._anchorLayer.entities.add({position:e,billboard:{image:t?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 i.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cartesian3(0,0,-100),disableDepthTestDistance:(s=this._options.disableDepthTestDistance)!=null?s:0,heightReference:this._viewer.scene.mode===i.SceneMode.SCENE3D&&!this._options.clampToModel?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE}});return this._anchorIds.push(r.id),r}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchorIds=[]}_bindEvent(){this._viewer.on(R.CLICK,this._onClick,this),this._viewer.on(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(R.DB_CLICK,this._onDoubleClick,this),this._viewer.on(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(E.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(E.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(R.CLICK,this._onClick,this),this._viewer.off(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(R.DB_CLICK,this._onDoubleClick,this),this._viewer.off(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(E.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(E.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t={}){return this._plotEvent.fire(e,t),this}activate(e={}){return this._viewer.tooltip.enable=!0,this._options={...Yd,...e},this._anchorIds=[],this._unbindEvent(),this._bindEvent(),this.fire(E.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})}},rl=Dr;var sl="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 qd={icon_center:ft,icon_anchor:Ge,icon_midAnchor:sl,icon_size:[12,12],clampToModel:!0},Lr=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new et,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 t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties&&(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(E.EDIT_ANCHOR_STOP,{pickedAnchor:this._pickedAnchor,position:t})),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 t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;if(!t)return!1;this._pickedAnchor&&this._pickedAnchor.position&&this._pickedAnchor.properties?(this._pickedAnchor.position.setValue(t),this._plotEvent.fire(E.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:t})):this._anchors.length===0&&this._plotEvent.fire(E.ANCHOR_MOVING,{position:t})}_onRightClick(e){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(E.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:t})}_onCreateAnchor({position:e,index:t,isCenter:r=!1,isMid:s=!1}){var n;let a=s?this._options.icon_midAnchor:r?this._options.icon_center:this._options.icon_anchor,o=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 i.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cartesian3(0,0,-100),disableDepthTestDistance:(n=this._options.disableDepthTestDistance)!=null?n:0,heightReference:this._viewer.scene.mode===i.SceneMode.SCENE3D&&!this._options.clampToModel?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},properties:{isMid:s,index:t}});this._anchors.push(o)}_onUpdateAnchor({index:e,position:t}){this._anchors[e]&&this._anchors[e].position.setValue(t)}_onClearAnchor(){this._anchorLayer.entities.removeAll(),this._anchors=[]}_bindEvent(){this._viewer.on(R.CLICK,this._onClick,this),this._viewer.on(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(E.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(E.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(E.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(R.CLICK,this._onClick,this),this._viewer.off(R.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(R.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(E.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(E.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(E.CLEAR_ANCHOR,this._onClearAnchor,this)}on(e,t,r){return this._plotEvent.on(e,t,r||this),this}off(e,t,r){return this._plotEvent.off(e,t,r||this),this}fire(e,t){return this._plotEvent.fire(e,t),this}activate(e={}){return this._anchorLayer.entities.removeAll(),this._anchors=[],this._viewer.tooltip.enable=!0,this._options={...qd,...e},this._unbindEvent(),this._bindEvent(),this.fire(E.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})}},al=Lr;function Rr(){return{drawTool:new rl,editTool:new al}}var{ImageryLayer:Xd}=i,Or=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 t=0;t<this._selectedImageryLayer.cache.length;t++)this._globe.imageryLayers.remove(this._selectedImageryLayer.cache[t]);e.cache=[]}for(let t=e.layers.length-1;t>=0;t--){let r=e.layers[t],s=Xd.fromProviderAsync(r,e.options);r&&this._globe.imageryLayers.add(s,0),e.cache.push(s)}this._selectedImageryLayer=e}}addImageryLayer(e,t={}){let r=[];return Array.isArray(e)?r=e.slice(0):r=[e],this._count++,this._imageryLayers.push({id:`imagery-no-${this._count}`,layers:r,cache:[]}),this}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},kr=Or;var{BoxGeometry:ol,Cartesian3:Qd,defined:ge,DeveloperError:nl,GeometryPipeline:Kd,Matrix3:ll,Matrix4:zr,Transforms:$d,VertexFormat:em,BufferUsage:tm,CubeMap:im,loadCubeMap:rm,RenderState:sm,VertexArray:am,BlendingState:om,SceneMode:hl,ShaderProgram:nm,ShaderSource:lm,SkyBox:hm}=i,cm=`
|
|
110
|
-
uniform samplerCube u_cubeMap;
|
|
111
|
-
in vec3 v_texCoord;
|
|
112
|
-
void main()
|
|
113
|
-
{
|
|
114
|
-
vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
|
|
115
|
-
out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
|
|
116
|
-
}
|
|
117
|
-
`,pm=`
|
|
118
|
-
in vec3 position;
|
|
119
|
-
out vec3 v_texCoord;
|
|
120
|
-
uniform mat3 u_rotateMatrix;
|
|
121
|
-
void main()
|
|
122
|
-
{
|
|
123
|
-
vec3 p = czm_viewRotation * u_rotateMatrix * (czm_temeToPseudoFixed * (czm_entireFrustum.y * position));
|
|
124
|
-
gl_Position = czm_projection * vec4(p, 1.0);
|
|
125
|
-
v_texCoord = position.xyz;
|
|
126
|
-
}
|
|
127
|
-
`,Nr=class extends hm{constructor(e={}){super(e),this.offsetAngle=(e==null?void 0:e.offsetAngle)||0}update(e,t){let r=this;if(!this.show||e.mode!==hl.SCENE3D&&e.mode!==hl.MORPHING||!e.passes.render)return;let s=e.context;if(this._sources!==this.sources){this._sources=this.sources;let o=this.sources;if(!ge(o.positiveX)||!ge(o.negativeX)||!ge(o.positiveY)||!ge(o.negativeY)||!ge(o.positiveZ)||!ge(o.negativeZ))throw new nl("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof o.positiveX!=typeof o.negativeX||typeof o.positiveX!=typeof o.positiveY||typeof o.positiveX!=typeof o.negativeY||typeof o.positiveX!=typeof o.positiveZ||typeof o.positiveX!=typeof o.negativeZ)throw new nl("this.sources properties must all be the same type.");typeof o.positiveX=="string"?rm(s,this._sources).then(function(n){r._cubeMap=r._cubeMap&&r._cubeMap.destroy(),r._cubeMap=n}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new im({context:s,source:o}))}let a=this._command;if(a.modelMatrix=$d.eastNorthUpToFixedFrame(e.camera.positionWC),this.offsetAngle!==0&&zr.multiply(a.modelMatrix,zr.fromRotationTranslation(ll.fromRotationZ(this.offsetAngle/180*Math.PI)),a.modelMatrix),!ge(a.vertexArray)){a.uniformMap={u_cubeMap:function(){return r._cubeMap},u_rotateMatrix:function(){return zr.getMatrix3(a.modelMatrix,new ll)}};let o=ol.createGeometry(ol.fromDimensions({dimensions:new Qd(2,2,2),vertexFormat:em.POSITION_ONLY})),n=this._attributeLocations=Kd.createAttributeLocations(o);a.vertexArray=am.fromGeometry({context:s,geometry:o,attributeLocations:n,bufferUsage:tm._DRAW}),a.renderState=sm.fromCache({blending:om.ALPHA_BLEND})}if(!ge(a.shaderProgram)||this._useHdr!==t){let o=new lm({defines:[t?"HDR":""],sources:[cm]});a.shaderProgram=nm.fromCache({context:s,vertexShaderSource:pm,fragmentShaderSource:o,attributeLocations:this._attributeLocations}),this._useHdr=t}if(ge(this._cubeMap))return a}},cl=Nr;var dm={creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),baseLayer:!1,shouldAnimate:!0},Fr=class{constructor(e,t={}){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=Ei("baseUrl");a&&i.buildModuleUrl.setBaseUrl(a)}this._delegate=typeof e!="string"?e:new i.CesiumWidget(e,{...dm,...t}),this._delegate.canvas.parentNode.className="viewer-canvas",new ki(this,t),this._viewerEvent=new Ni,this._sceneEvent=new Wi(this),this._viewerOption=new cr(this),this._cameraOption=new dr(this),this._widgetContainer=b.create("div","viewer-widgets",typeof e=="string"?document.getElementById(e):this._delegate.container),this._layerContainer=b.create("div","viewer-layers",typeof e=="string"?document.getElementById(e):this._delegate.container),this._baseLayerPicker=new kr({globe:this._delegate.scene.globe}),this._layerGroupCache={},this._layerCache={};let r=Ir();Object.keys(r).forEach(a=>{this._use(r[a])});let s=Rr();Object.keys(s).forEach(a=>{this._use(s[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 t,r,s,a,o,n,h;let e=u.transformCartographicToWGS84((t=this.camera)==null?void 0:t.positionCartographic);return e&&(e.heading=i.Math.toDegrees((s=(r=this.camera)==null?void 0:r.heading)!=null?s:0),e.pitch=i.Math.toDegrees((o=(a=this.camera)==null?void 0:a.pitch)!=null?o:0),e.roll=i.Math.toDegrees((h=(n=this.camera)==null?void 0:n.roll)!=null?h:0)),e}get resolution(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cartesian2(e/2|0,t-1),this),s=u.transformWindowToWGS84(new i.Cartesian2(1+e/2|0,t-1),this);return!r||!s?1:Math.abs(r.lng-s.lng)}get viewBounds(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cartesian2(0,t),this),s=u.transformWindowToWGS84(new i.Cartesian2(e,0),this);return!r||!s?i.Rectangle.MAX_VALUE:i.Rectangle.fromDegrees(r.lng,r.lat,s.lng,s.lat)}get zoom(){let e=this.camera.positionCartographic.height,t=40487.57,r=7096758e-11,s=91610.74,a=-40467.74;return Math.round(a+(t-a)/(1+Math.pow(e/s,r)))}get centerPosition(){return this.camera.pickEllipsoid(new i.Cartesian2(this.canvas.clientWidth/2,this.canvas.clientHeight/2))}get centerPositionWGS84(){let e=this.centerPosition,t=i.Ellipsoid.WGS84.cartesianToCartographic(e),r=t.longitude*180/Math.PI,s=t.latitude*180/Math.PI,a=this.cameraHeight;return new U(r,s,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(Ee.ADD,this),this._layerGroupCache[e.id]=e)}_removeLayerGroup(e){e!=null&&e.layerGroupEvent&&Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(Ee.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(Pe.ADD,this),this._layerCache[e.type][e.id]=e)}_removeLayer(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.fire(Pe.REMOVE,this),delete this._layerCache[e.type][e.id])}setOptions(e){return this._viewerOption.setOptions(e),this}setPitchRange(e=-90,t=-20){return this._cameraOption.setPitchRange(e,t),this}changeSceneMode(e,t=0){return e===2?this._delegate.scene.morphTo2D(t):e===3?this._delegate.scene.morphTo3D(t):e===2.5&&this._delegate.scene.morphToColumbusView(t),this}changeMouseMode(e){return this._cameraOption.changeMouseMode(e),this}setTerrain(e){return this._delegate.scene.setTerrain(new i.Terrain(e||Promise.resolve(new i.EllipsoidTerrainProvider))),this}addBaseLayer(e,t={}){return e?(this._baseLayerPicker.addImageryLayer(e,t),this._baseLayerPicker.selectedImageryLayer||this._baseLayerPicker.changeImageryLayer(0),this.mapSwitch&&this.mapSwitch.addMap(t),this):this}changeBaseLayer(e){return this._baseLayerPicker.changeImageryLayer(e),this}getImageryLayerInfo(e){let t=this._delegate.camera.getPickRay(e);return this._delegate.imageryLayers.pickImageryLayerFeatures(t,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 t=this.getLayers().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getLayers(){let e=[];return Object.keys(this._layerCache).forEach(t=>{let r=this._layerCache[t];Object.keys(r).forEach(s=>{e.push(r[s])})}),e}eachLayer(e,t){return Object.keys(this._layerCache).forEach(r=>{let s=this._layerCache[r];Object.keys(s).forEach(a=>{e.call(t,s[a])})}),this}flyTo(e,t){return this._delegate.flyTo((e==null?void 0:e.delegate)||e,{duration:t}),this}zoomTo(e){return this._delegate.zoomTo((e==null?void 0:e.delegate)||e),this}flyToPosition(e,t,r){return e=g.parsePosition(e),this.camera.flyTo({destination:u.transformWGS84ToCartesian(e),orientation:{heading:i.Math.toRadians(e.heading),pitch:i.Math.toRadians(e.pitch),roll:i.Math.toRadians(e.roll)},complete:t,duration:r}),this}flyToPoint(e,t={}){return new Promise((r,s)=>{if(!e){r(!1);return}e=k.parse(e);let a=e.toCartesian();if(t.clampToGround)if(t.hasTerrain){_e.getSurfaceHeight(this._delegate.scene,a,{has3dtiles:!0}).then(f=>{e.alt=f.height*(this._delegate.scene.globe.terrainExaggeration||1),delete t.clampToGround,this.flyToPoint(e,t).then(y=>{r(y)})});return}else e.alt=0,a=e.toCartesian();let o=t.radius||this.getCameraDistance()||100;i.defined(t.scale)&&t.scale>0&&(o*=t.scale),i.defined(t.minHeight)&&o<t.minHeight&&(o=t.minHeight),i.defined(t.maxHeight)&&o>t.maxHeight&&(o=t.maxHeight);let n;if(i.defined(t.pitch))n=i.Math.toRadians(t.pitch);else{n=this._delegate.camera.pitch;let f=i.Math.toDegrees(n);i.defined(t.minPitch)&&f<t.minPitch&&(n=i.Math.toRadians(t.minPitch)),i.defined(t.maxPitch)&&f>t.maxPitch&&(n=i.Math.toRadians(t.maxPitch))}let h=i.defined(t.heading)?i.Math.toRadians(t.heading):this._delegate.camera.heading,c=new i.HeadingPitchRange(h,n,o),p=new i.BoundingSphere(a,0);t.duration===0?(this._delegate.camera.lookAt(a,c),!t.lock&&!this._delegate.trackedEntity&&this._delegate.camera.lookAtTransform(i.Matrix4.IDENTITY),t.complete&&t.complete(),r(!0)):this._delegate.camera.flyToBoundingSphere(p,{...t,offset:c,complete:()=>{t.complete&&t.complete(),r(!0)},cancel:()=>{t.cancel&&t.cancel(),r(!1)}})})}getCenter(){try{let e=this.scene.canvas,t=new i.Cartesian2(e.clientWidth/2,e.clientHeight/2),r=scene.camera.getPickRay(t),s=scene.globe.pick(r,scene);return s||(s=scene.camera.pickEllipsoid(t)),s?k.fromCartesian(s):void 0}catch{return}}getHeight(e,t){var o;let r=this.scene,s=k.toCartographic(e),a;if(r.getHeight?a=r.getHeight(s,t&&t.heightReference):a=r.globe.getHeight(s),i.defined(a)&&a>((o=t&&t.min)!=null?o:-999))return a;if(t!=null&&t.original)return s.height}getCameraDistance(){let e=this.getCenter();return e?(e.alt<0&&(e.alt=0),i.Cartesian3.distance(e.toCartesian(),this._delegate.camera.positionWC)):0}zoomToPosition(e,t){return this.flyToPosition(e,t,0),this}flyToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},a,o){return e?(Array.isArray(e)||(e=e.split(",")),this.camera.flyTo({destination:i.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]),orientation:{heading:i.Math.toRadians(t),pitch:i.Math.toRadians(r),roll:i.Math.toRadians(s)},complete:a,duration:o}),this):this}zoomToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},a){return this.flyToBounds(e,{heading:t,pitch:r,roll:s},a),this}on(e,t,r){return this._viewerEvent.on(e,t,r||this),this._sceneEvent.on(e,t,r||this),this}once(e,t,r){return this._viewerEvent.once(e,t,r||this),this}off(e,t,r){return this._viewerEvent.off(e,t,r||this),this._sceneEvent.off(e,t,r||this),this}destroy(){return Object.keys(this._layerCache).forEach(e=>{let t=this._layerCache[e];Object.keys(t).forEach(r=>{this._removeLayer(t[r])})}),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 r=this.canvas.toDataURL("image/png").replace("image/png","image/octet-stream"),s=document.createElement("a"),a=x.dataURLtoBlob(r),o=URL.createObjectURL(a);return s.download=`${e||"scene"}.png`,s.href=o,s.click(),this}getOffset(){var r;let e={x:0,y:0},t=(r=this._delegate)==null?void 0:r.container;if(t)if(t.getBoundingClientRect){let s=t.getBoundingClientRect();e.x=s.left,e.y=s.top}else e.x=t.offsetLeft,e.y=t.offsetTop;return e}},mm=Fr;var B=class B{constructor(e=0,t=0,r=0){this._lng=+e||0,this._lat=+t||0,this._alt=+r||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 B;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,B.FormatLength),this.lat=x.formatNum(this.lat,B.FormatLength),this.alt=x.formatNum(this.alt,B.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:i.Cartesian3.fromDegrees(this.lng,this.lat,this.alt)}toCartographic(){return i.Cartographic.fromDegrees(this.lng,this.lat,this.alt)}toMercator(){let e=Math.min(this.lng,180);e=Math.max(e,-180);let t=Math.min(this.lat,85.05112877980659);t=Math.max(t,-85.05112877980659);let r=e*2003750834e-2/180,s=Math.log(Math.tan((90+t)*Math.PI/360))/(Math.PI/180);return s=s*2003750834e-2/180,[r,s,this.alt]}equals(e){return this===e?!0:e instanceof B?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,t){if(!e)return new B;if(e instanceof B)return e;let r;if(typeof e=="string")r=B.fromString(e);else if(Array.isArray(e))r=B.fromArray(e);else if(e instanceof B)r=e.clone();else if(i.defined(e.lat)&&i.defined(e.lng)){r=new B(e.lng,e.lat,e.alt);for(let s in e)r[s]=e[s]}else e instanceof i.Cartesian3||e._value||e.getValue?(r=B.fromCartesian(e,t),r._position=e):i.defined(e.x)&&i.defined(e.y)&&i.defined(e.z)?(e=new i.Cartesian3(e.x,e.y,e.z),r=B.fromCartesian(e,t),r._position=e):(r=new B,Oe("\u5750\u6807\u89E3\u6790\u5931\u8D25\uFF0C\u8BF7\u786E\u8BA4\u53C2\u6570\u662F\u5426\u65E0\u8BEF",e));return r}static fromArray(e){let t=new B;return Array.isArray(e)&&(t.lng=e[0]||0,t.lat=e[1]||0,t.alt=e[2]||0),t}static fromString(e){let t=new B;if(e&&typeof e=="string"){let r=e.split(",");t=this.fromArray(r)}return t}static fromCartesian(e,t){let r=new B,s;if(e&&(e instanceof i.Cartesian3?s=e:e._value&&e._value instanceof i.Cartesian3?s=e._value:typeof e.getValue=="function"&&(s=e.getValue(t||i.JulianDate.now()))),s){let a=i.Cartographic.fromCartesian(s);a&&(r.lat=i.Math.toDegrees(a.latitude),r.lng=i.Math.toDegrees(a.longitude),r.alt=a.height,r.format())}return r._position=e,r}static fromCartographic(e){let t=new B;return t.lat=i.Math.toDegrees(e.latitude),t.lng=i.Math.toDegrees(e.longitude),t.alt=e.height,t}static fromMercator(e){let t=Number(e[0]),r=Number(e[1]),s=t/2003750834e-2*180,a=r/2003750834e-2*180;return a=180/Math.PI*(2*Math.atan(Math.exp(a*Math.PI/180))-Math.PI/2),new B(s,a,e[2]||0)}static toCartesian(e,t){return!e||e instanceof i.Cartesian3?e:B.parse(e,t).toCartesian(!0)}static toCartographic(e,t){return!e||e instanceof i.Cartographic?e:B.parse(e,t).toCartographic()}static toArray(e,t){let r=B.parse(e);return!r||!r.valid()?[]:r.toArray(t)}};Ti(B,"FormatLength",6),Ti(B,"FormatAltLength",1);var Wr=B,k=Wr;var Gr=class{static toCartesians(e,t){if(!e||!Array.isArray(e))return e;let r=[];return e.forEach(function(s){if(s instanceof i.Cartesian3){t?r.push(s.clone()):r.push(s);return}let a=k.parse(s);!a||!a.valid()||r.push(a.toCartesian(!0))}),r}static toCartographics(e,t){if(!e||!Array.isArray(e))return e;let r=[];return e.forEach(function(s){if(s instanceof i.Cartographic){t?r.push(s.clone()):r.push(s);return}let a=k.parse(s);!a||!a.valid()||r.push(a.toCartographic())}),r}static toPoints(e,t){if(!e||!Array.isArray(e))return e;let r=[];return e.forEach(function(s){if(s instanceof k&&!t){r.push(s);return}let a=k.parse(s);!a||!a.valid()||r.push(a)}),r}static toArray(e,t){if(!e||!Array.isArray(e))return e;let r=[];return e.forEach(function(s){if(Array.isArray(s)){r.push(s);return}let a=k.parse(s);!a||!a.valid()||r.push(a.toArray(t))}),r}},We=Gr;var Hr=class{constructor(e){this.options=e,this.scene=e.map?e.map.scene:e.scene,this.scene||Oe("SurfacePoint: \u8BF7\u4F20\u5165scene\u53C2\u6570",this.options),this._point=k.parse(e.position),this._point&&(this._position=this._point.toCartesian(),this._cartographic=this._point.toCartographic(),this._height_original=this._point.alt)}async start(){var r;if(!this._point)return this.getResult();this.scene._terrainProviderPromise&&await this.scene._terrainProviderPromise;let e=(r=this.options.has3dtiles)!=null?r:i.defined(_e.pick3DTileset(this.scene,this._position)),t=!(this.scene.terrainProvider instanceof i.EllipsoidTerrainProvider);if(this._has3dtiles=e,this._hasTerrain=t,!t&&!e)return this.getResult();if(e){let s=await this.scene.clampToHeightMostDetailed([this._position.clone()],this.options.objectsToExclude,this.options.width);if(s.length>0){let a=s[0];if(i.defined(a)){let o=i.Cartographic.fromCartesian(a),n=o?o.height:0;if(i.defined(n)&&n!==0&&n>-1e3)return this.getResult(n)}}else{let a=this.scene.sampleHeight(this._cartographic,this.options.objectsToExclude,this.options.width);if(i.defined(a)&&a>-1e3)return this.getResult(a)}}if(this._hasTerrain){let s;try{let a=this.scene.terrainProvider;a&&a.availability&&(s=await i.sampleTerrainMostDetailed(this.scene.terrainProvider,[this._cartographic]))}catch(a){mt("SurfacePoint:\u8D34\u5730\u5F62\u9AD8\u5EA6\u8BA1\u7B97\u5931\u8D25",a)}if(s&&s.length>0){let a=s[0];if(i.defined(a)&&i.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:i.Cartesian3.fromRadians(this._cartographic.longitude,this._cartographic.latitude,e),position_original:this._position,has3dtiles:this._has3dtiles,hasTerrain:this._hasTerrain}}},ut=Hr;var Br=class{constructor(e){this.options=e,this.scene=e.map?e.map.scene:e.scene,this.scene||Oe("SurfacePoints: \u8BF7\u4F20\u5165scene\u53C2\u6570",this.options),this.positions=We.toCartesians(this.options.positions)}async start(){var r;if(this.positions==null||this.positions.length===0){this.getResult();return}this.scene._terrainProviderPromise&&await this.scene._terrainProviderPromise();let e=(r=this.options.has3dtiles)!=null?r:i.defined(_e.pick3DTileset(this.scene,this.positions)),t=!(this.scene.terrainProvider instanceof i.EllipsoidTerrainProvider);return this._has3dtiles=e,this._hasTerrain=t,!t&&!e?this.getResult():this.options.exact?this._startForExact():this._startForSketchy()}async _startForExact(){var e;if(this._has3dtiles){let t=[];for(let s=0;s<this.positions.length;++s)t.push(this.positions[s].clone());let r=await this.scene.clampToHeightMostDetailed(t,this.options.objectsToExclude);for(let s=0;s<r.length;++s)!r[s]&&(r[s]=this.positions[s]);if(r.length>0)return this.options.offset&&(r=_e.addPositionsHeight(r,this.options.offset)),this.getResult(r)}if(this._hasTerrain&&this.scene.terrainProvider&&this.scene.terrainProvider.availability){let t=this.scene.globe.ellipsoid,r=t.cartesianArrayToCartographicArray(_0x1da275),s=i.Cartographic.fromCartesian(_0x1da275[0]).height,a=(e=this.options.offset)!=null?e:0,o=!1,n=await i.sampleTerrainMostDetailed(this.scene.terrainProvider,r);for(let c=0;c<n.length;++c)n[c]||(n[c]=this.positions[c]),n[c].height==null?(o=!0,n[c].height=a+s):n[c].height=a+n[c].height;let h=t.cartographicArrayToCartesianArray(n);return this.getResult(h,o)}return this.getResult()}async _startForSketchy(){let e=[];for(let t=0;t<this.positions.length;++t){let r=i.Cartographic.fromCartesian(this.positions[t]),s;if(this._has3dtiles){let a=this.scene.sampleHeight(r,this.options.objectsToExclude,this.options.width);i.defined(a)&&a>-1e3&&(s=a)}if(!i.defined(s)){let a=this.scene.globe.getHeight(r);i.defined(a)&&a>-1e3&&(s=a)}e.push(i.Cartesian3.fromRadians(r.longitude,r.latitude,s!=null?s:r.height))}return this.getResult(e)}getResult(e,t){return this.options.callback&&this.options.callback(e,t,this.positions),{positions:e||this.positions,positions_original:this.positions,noHeight:t,has3dtiles:this._has3dtiles,hasTerrain:this._hasTerrain}}},Rn=Br;var um={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"},z=um;var Ur=class extends i.WebMercatorTilingScheme{constructor(e){super(e);let t=new i.WebMercatorProjection;this._projection.project=function(r,s){return s=me.WGS84ToGCJ02(i.Math.toDegrees(r.longitude),i.Math.toDegrees(r.latitude)),s=t.project(new i.Cartographic(i.Math.toRadians(s[0]),i.Math.toRadians(s[1]))),new i.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){let a=t.unproject(r);return s=me.GCJ02ToWGS84(i.Math.toDegrees(a.longitude),i.Math.toDegrees(a.latitude)),new i.Cartographic(i.Math.toRadians(s[0]),i.Math.toRadians(s[1]))}}},_t=Ur;var pl={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}"},Vr=class extends i.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",pl[e.style]||pl.elec].join(""),e.subdomains=e.subdomains||["01","02","03","04"],e.crs==="WGS84"&&(e.tilingScheme=new _t),super(e)}};z.AMAP="amap";var dl=Vr;var fm=637099681e-2,ml=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],gt=[75,60,45,30,15,0],_m=[[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]],ul=[[-.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]],jr=class{constructor(){this.isWgs84=!1}getDistanceByMC(e,t){if(!e||!t||(e=this.convertMC2LL(e),!e))return 0;let r=this.toRadians(e.lng),s=this.toRadians(e.lat);if(t=this.convertMC2LL(t),!t)return 0;let a=this.toRadians(t.lng),o=this.toRadians(t.lat);return this.getDistance(r,a,s,o)}getDistanceByLL(e,t){if(!e||!t)return 0;e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74),t.lng=this.getLoop(t.lng,-180,180),t.lat=this.getRange(t.lat,-74,74);let r=this.toRadians(e.lng),s=this.toRadians(e.lat),a=this.toRadians(t.lng),o=this.toRadians(t.lat);return this.getDistance(r,a,s,o)}convertMC2LL(e){if(!e)return{lng:0,lat:0};let t={};if(this.isWgs84){t.lng=e.lng/2003750834e-2*180;let a=e.lat/2003750834e-2*180;return t.lat=180/Math.PI*(2*Math.atan(Math.exp(a*Math.PI/180))-Math.PI/2),{lng:t.lng.toFixed(6),lat:t.lat.toFixed(6)}}let r={lng:Math.abs(e.lng),lat:Math.abs(e.lat)},s;for(let a=0;a<ml.length;a++)if(r.lat>=ml[a]){s=_m[a];break}return t=this.convertor(e,s),{lng:t.lng.toFixed(6),lat:t.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={},o=6378137;a.lng=e.lng*Math.PI/180*o;let n=e.lat*Math.PI/180;return a.lat=o/2*Math.log((1+Math.sin(n))/(1-Math.sin(n))),{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 t={lng:e.lng,lat:e.lat},r;for(let a=0;a<gt.length;a++)if(t.lat>=gt[a]){r=ul[a];break}if(!r){for(let a=0;a<gt.length;a++)if(t.lat<=-gt[a]){r=ul[a];break}}let s=this.convertor(e,r);return{lng:parseFloat(s.lng.toFixed(2)),lat:parseFloat(s.lat.toFixed(2))}}convertor(e,t){if(!e||!t)return{lng:0,lat:0};let r=t[0]+t[1]*Math.abs(e.lng),s=Math.abs(e.lat)/t[9],a=t[2]+t[3]*s+t[4]*s*s+t[5]*s*s*s+t[6]*s*s*s*s+t[7]*s*s*s*s*s+t[8]*s*s*s*s*s*s;return r*=e.lng<0?-1:1,a*=e.lat<0?-1:1,{lng:r,lat:a}}getDistance(e,t,r,s){return fm*Math.acos(Math.sin(r)*Math.sin(s)+Math.cos(r)*Math.cos(s)*Math.cos(t-e))}toRadians(e){return Math.PI*e/180}toDegrees(e){return 180*e/Math.PI}getRange(e,t,r){return t!=null&&(e=Math.max(e,t)),r!=null&&(e=Math.min(e,r)),e}getLoop(e,t,r){for(;e>r;)e-=r-t;for(;e<t;)e+=r-t;return e}lngLatToMercator(e){return this.convertLL2MC(e)}lngLatToPoint(e){let t=this.convertLL2MC(e);return{x:t.lng,y:t.lat}}mercatorToLngLat(e){return this.convertMC2LL(e)}pointToLngLat(e){let t={lng:e.x,lat:e.y};return this.convertMC2LL(t)}pointToPixel(e,t,r,s){if(!e)return{x:0,y:0};e=this.lngLatToMercator(e);let a=this.getZoomUnits(t),o=Math.round((e.lng-r.lng)/a+s.width/2),n=Math.round((r.lat-e.lat)/a+s.height/2);return{x:o,y:n}}pixelToPoint(e,t,r,s){if(!e)return{lng:0,lat:0};let a=this.getZoomUnits(t),o=r.lng+a*(e.x-s.width/2),n=r.lat-a*(e.y-s.height/2),h={lng:o,lat:n};return this.mercatorToLngLat(h)}getZoomUnits(e){return Math.pow(2,18-e)}},fl=jr;var Zr=class extends i.WebMercatorTilingScheme{constructor(e){super(e);let t=new fl;this._projection.project=function(r,s){return s=s||{},s=me.WGS84ToGCJ02(i.Math.toDegrees(r.longitude),i.Math.toDegrees(r.latitude)),s=me.GCJ02ToBD09(s[0],s[1]),s[0]=Math.min(s[0],180),s[0]=Math.max(s[0],-180),s[1]=Math.min(s[1],74.000022),s[1]=Math.max(s[1],-71.988531),s=t.lngLatToPoint({lng:s[0],lat:s[1]}),new i.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){return s=s||{},s=t.mercatorToLngLat({lng:r.x,lat:r.y}),s=me.BD09ToGCJ02(s.lng,s.lat),s=me.GCJ02ToWGS84(s[0],s[1]),new i.Cartographic(i.Math.toRadians(s[0]),i.Math.toRadians(s[1]))},this.resolutions=e.resolutions||[]}tileXYToNativeRectangle(e,t,r,s){let a=this.resolutions[r],o=e*a,n=(e+1)*a,h=((t=-t)+1)*a,c=t*a;return i.defined(s)?(s.west=o,s.south=c,s.east=n,s.north=h,s):new i.Rectangle(o,c,n,h)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Rectangle.contains(s,e))return;let o=this._projection.project(e);if(!i.defined(o))return;let n=this.resolutions[t],h=Math.floor(o.x/n),c=-Math.floor(o.y/n);return i.defined(r)?(r.x=h,r.y=c,r):new i.Cartesian2(h,c)}},_l=Zr;var gl={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"},Yr=class extends i.UrlTemplateImageryProvider{constructor(e={}){if(e.url=e.url||[e.protocol||"",gl[e.style]||gl.custom].join(""),e.crs==="WGS84"){let t=[];for(let r=0;r<19;r++)t[r]=256*Math.pow(2,18-r);e.tilingScheme=new _l({resolutions:t,rectangleSouthwestInMeters:new i.Cartesian2(-2003772637e-2,-1247410417e-2),rectangleNortheastInMeters:new i.Cartesian2(2003772637e-2,1247410417e-2)})}else e.tilingScheme=new i.WebMercatorTilingScheme({rectangleSouthwestInMeters:new i.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new i.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,t,r){let s=this._tilingScheme.getNumberOfXTilesAtLevel(r),a=this._tilingScheme.getNumberOfYTilesAtLevel(r),o=this._url.replace("{z}",r).replace("{s}",String(1)).replace("{style}",this._style);return this._crs==="WGS84"?o=o.replace("{x}",String(e)).replace("{y}",String(-t)):o=o.replace("{x}",String(e-s/2)).replace("{y}",String(a/2-t-1)),i.ImageryProvider.loadImage(this,o)}};z.BAIDU="baidu";var yl=Yr;var gm="//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}",Jr=class extends i.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",gm.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)}};z.GEO_VIS="geoVis";var vl=Jr;var wl={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}"},qr=class extends i.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",wl[e.style]||wl.elec].join(""),e.crs==="WGS84"&&(e.tilingScheme=new _t),super(e)}};z.GOOGLE="google";var xl=qr;var ym="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",Xr=class extends i.UrlTemplateImageryProvider{constructor(e={}){super({url:[e.protocol||"",ym.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18})}};z.TDT="tdt";var Cl=Xr;var Tl={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"},Qr=class extends i.UrlTemplateImageryProvider{constructor(e={}){let t=e.url||[e.protocol||"",Tl[e.style]||Tl.elec].join("");e.url=t.replace("{style}",e.style||1),e.subdomains=e.subdomains||["1","2","3"],e.style==="img"&&(e.customTags={sx:(r,s,a,o)=>s>>4,sy:(r,s,a,o)=>(1<<o)-a>>4}),super(e)}};z.TENCENT="tencent";var El=Qr;var Kr=class{static createAMapImageryLayer(e){return Promise.resolve(new dl(e))}static createBaiduImageryLayer(e){return Promise.resolve(new yl(e))}static createGeoVisImageryLayer(e){return Promise.resolve(new vl(e))}static createGoogleImageryLayer(e){return Promise.resolve(new xl(e))}static createTdtImageryLayer(e){return Promise.resolve(new Cl(e))}static createTencentImageryLayer(e){return Promise.resolve(new El(e))}static createArcGisImageryLayer(e){return i.ArcGisMapServerImageryProvider.fromUrl(e.url,e)}static createBingImageryLayer(e){return i.BingMapsImageryProvider.fromUrl(e.url,e)}static createOSMImageryLayer(e){return Promise.resolve(new i.OpenStreetMapImageryProvider(e))}static createSingleTileImageryLayer(e){return i.SingleTileImageryProvider.fromUrl(e.url,e)}static createWMSImageryLayer(e){return Promise.resolve(new i.WebMapServiceImageryProvider(e))}static createWMTSImageryLayer(e){return Promise.resolve(new i.WebMapTileServiceImageryProvider(e))}static createXYZImageryLayer(e){return Promise.resolve(new i.UrlTemplateImageryProvider(e))}static createCoordImageryLayer(e){return Promise.resolve(new i.TileCoordinatesImageryProvider(e))}static createGridImageryLayer(e){return Promise.resolve(new i.GridImageryProvider(e))}static createMapboxImageryLayer(e){return Promise.resolve(new i.MapboxImageryProvider(e))}static createMapboxStyleImageryLayer(e){return Promise.resolve(new i.MapboxStyleImageryProvider(e))}static createTMSImageryLayer(e){return i.TileMapServiceImageryProvider.fromUrl(e.url,e)}static createImageryLayer(e,t){let r;switch(e){case z.AMAP:r=this.createAMapImageryLayer(t);break;case z.BAIDU:r=this.createBaiduImageryLayer(t);break;case z.GEO_VIS:r=this.createGeoVisImageryLayer(t);break;case z.GOOGLE:r=this.createGoogleImageryLayer(t);break;case z.TDT:r=this.createTdtImageryLayer(t);break;case z.TENCENT:r=this.createTencentImageryLayer(t);break;case z.ARCGIS:r=this.createArcGisImageryLayer(t);break;case z.BING:r=this.createBingImageryLayer(t);break;case z.OSM:r=this.createOSMImageryLayer(t);break;case z.SINGLE_TILE:r=this.createSingleTileImageryLayer(t);break;case z.WMS:r=this.createWMSImageryLayer(t);break;case z.WMTS:r=this.createWMTSImageryLayer(t);break;case z.XYZ:r=this.createXYZImageryLayer(t);break;case z.COORD:r=this.createCoordImageryLayer(t);break;case z.GRID:r=this.createGridImageryLayer(t);break;case z.MAPBOX:r=this.createMapboxImageryLayer(t);break;case z.MAPBOX_STYLE:r=this.createMapboxStyleImageryLayer(t);break;case z.TMS:r=this.createTMSImageryLayer(t);break;default:break}return r}},Pl=Kr;var $r=class extends i.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,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Rectangle.MAX_VALUE;let a=this._resolutions[r+this._zoomOffset]*this._tileSize,o=i.Math.toRadians(this._origin[0]+e*a),n=i.Math.toRadians(this._origin[1]-(t+1)*a),h=i.Math.toRadians(this._origin[0]+(e+1)*a),c=i.Math.toRadians(this._origin[1]-t*a);return s?(s.west=o,s.south=n,s.east=h,s.north=c,s):new i.Rectangle(o,n,h,c)}positionToTileXY(e,t,r){if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cartesian2;let s=this._resolutions[t+this._zoomOffset]*this._tileSize,a=i.Math.toDegrees(e.longitude),o=i.Math.toDegrees(e.latitude),n=Math.floor((a-this._origin[0])/s),h=Math.floor((this._origin[1]-o)/s);return r?(r.x=n,r.y=h,r):new i.Cartesian2(Math.max(0,n),Math.max(0,h))}},Ml=$r;var es=class extends i.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,t,r,s){if(!this._resolutions||!this._resolutions[r+this._zoomOffset])return i.Rectangle.MAX_VALUE;if(e<0||t<0)return i.Rectangle.MAX_VALUE;let a=this._resolutions[r+this._zoomOffset]*this._tileSize,o=this._origin[0]+e*a,n=this._origin[1]-(t+1)*a,h=this._origin[0]+(e+1)*a,c=this._origin[1]-t*a;return s?(s.west=o,s.south=n,s.east=h,s.north=c,s):new i.Rectangle(o,n,h,c)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Rectangle.contains(s,e))return;if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cartesian2;let a=this._resolutions[t+this._zoomOffset]*this._tileSize,n=this._projection.project(e),h=Math.floor((n.x-this._origin[0])/a),c=Math.floor((this._origin[1]-n.y)/a);return r?(r.x=h,r.y=c,r):new i.Cartesian2(Math.max(0,h),Math.max(0,c))}},Al=es;var vm={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"},Ae=vm;var ts=class{static createEllipsoidTerrain(e){return Promise.resolve(new i.EllipsoidTerrainProvider(e))}static createUrlTerrain(e){return i.CesiumTerrainProvider.fromUrl(e.url,e)}static createGoogleTerrain(e){return i.GoogleEarthEnterpriseTerrainProvider.fromUrl(e.url,e)}static createArcgisTerrain(e){return i.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}static createVRTerrain(e){return i.VRTheWorldTerrainProvider.fromUrl(e.url,e)}static createTerrain(e,t){let r;switch(e){case Ae.NONE:r=this.createEllipsoidTerrain(t);break;case Ae.XYZ:r=this.createUrlTerrain(t);break;case Ae.GOOGLE:r=this.createGoogleTerrain(t);break;case Ae.ARCGIS:r=this.createArcgisTerrain(t);break;case Ae.VR:r=this.createVRTerrain(t);break;default:break}return r}},bl=ts;var wm={},it=wm;var is=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 Ui,this._layerEvent.on(Pe.ADD,this._onAdd,this),this._layerEvent.on(Pe.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 i.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._delegate):this._viewer.scene.primitives.add(this._delegate):this._delegate instanceof i.ImageryLayer?this._viewer.imageryLayers.add(this._delegate):this._viewer.dataSources.add(this._delegate),this._addedHook&&this._addedHook(),this._state=m.ADDED)}_onRemove(){this._delegate&&this._viewer&&(this._cache={},this._delegate instanceof i.PrimitiveCollection?(this._delegate.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._delegate):this._viewer.scene.primitives.remove(this._delegate)):this._delegate instanceof i.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=m.REMOVED)}_addOverlay(e){this._cache.hasOwnProperty(e.overlayId)||(this._cache[e.overlayId]=e,this._delegate&&e.fire(Te.ADD,this),this._state===m.CLEARED&&(this._state=m.ADDED))}_removeOverlay(e){this._cache.hasOwnProperty(e.overlayId)&&(this._delegate&&e.fire(Te.REMOVE,this),delete this._cache[e.overlayId])}addOverlay(e){return this._addOverlay(e),this}addOverlays(e){return Array.isArray(e)&&e.forEach(t=>{this._addOverlay(t)}),this}removeOverlay(e){return this._removeOverlay(e),this}getOverlay(e){return this._cache[e]||void 0}getOverlayById(e){let t;return Object.keys(this._cache).forEach(r=>{this._cache[r].id===e&&(t=this._cache[r])}),t}getOverlaysByAttr(e,t){let r=[];return this.eachOverlay(s=>{s.attr[e]===t&&r.push(s)},this),r}eachOverlay(e,t){return Object.keys(this._cache).forEach(r=>{e&&e.call(t||this,this._cache[r])}),this}getOverlays(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}clear(){}remove(){this._viewer&&this._viewer.removeLayer(this)}addTo(e){return e!=null&&e.addLayer&&e.addLayer(this),this}setStyle(e){}on(e,t,r){return this._layerEvent.on(e,t,r||this),this}off(e,t,r){return this._layerEvent.off(e,t,r||this),this}fire(e,t){return this._layerEvent.fire(e,t),this}static registerType(e){e&&(it[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getLayerType(e){return it[e.toLocaleUpperCase()]||void 0}},M=is;var rs=class{constructor(e){this._id=e||x.uuid(),this._cache={},this._show=!0,this._viewer=void 0,this._layerGroupEvent=new Hi,this._layerGroupEvent.on(Ee.ADD,this._onAdd,this),this._layerGroupEvent.on(Ee.REMOVE,this._onRemove,this),this._state=m.INITIALIZED}get id(){return this._id}get type(){return M.getLayerType("layer_group")}get show(){return this._show}set show(e){this._show=e,Object.keys(this._cache).forEach(t=>{this._cache[t].show=this._show})}get layerGroupEvent(){return this._layerGroupEvent}get state(){return this._state}_onAdd(e){this._viewer=e,Object.keys(this._cache).forEach(t=>{this._viewer.addLayer(this._cache[t])}),this._state=m.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._viewer&&this._viewer.removeLayer(this._cache[e])}),this._cache={},this._state=m.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(t=>{e.push(this._cache[t])}),e}addTo(e){return e&&e.addLayerGroup&&e.addLayerGroup(this),this}remove(){return this._viewer&&this._viewer.removeLayerGroup(this),this}};M.registerType("layer_group");var Sl=rs;var xm={radius:60,maxZoom:25,style:"circle",image:"",gradientColors:{1e-4:i.Color.DEEPSKYBLUE,.001:i.Color.GREEN,.01:i.Color.ORANGE,.1:i.Color.RED},gradientImages:{},showCount:!0,fontSize:12,clusterSize:16,fontColor:i.Color.BLACK,getCountOffset:l=>({x:-3.542857*String(l).length+1.066667,y:String(l).length>3?5:4})},ss=class extends M{constructor(e,t={}){super(e),this._delegate=new i.PrimitiveCollection,this._options={...xm,...t},this._billboards=this._delegate.add(new i.BillboardCollection),this._labels=this._delegate.add(new i.LabelCollection),this._cluster=new Fe({radius:this._options.radius,maxZoom:this._options.maxZoom}),this._allCount=0,this._changedRemoveCallback=void 0,this._lastChangedTime=null,this._state=m.INITIALIZED}get type(){return M.getLayerType("cluster")}_addOverlay(e){}_removeOverlay(e){}_getCircleImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t;if(!this._cache[s]){let a=document.createElement("canvas");a.width=r,a.height=r;let o=a.getContext("2d");o.save(),o.scale(r/24,r/24),o.fillStyle=e.withAlpha(.2).toCssColorString(),o.beginPath(),o.arc(12,12,9,0,2*Math.PI),o.closePath(),o.fill(),o.beginPath(),o.arc(12,12,6,0,2*Math.PI),o.fillStyle=e.toCssColorString(),o.closePath(),o.fill(),o.restore(),this._cache[s]=a.toDataURL()}return this._cache[s]}_getClusteringImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t,a=-Math.PI/12,o=Math.PI/2,n=Math.PI/6;if(!this._cache[s]){let h=document.createElement("canvas");h.width=r,h.height=r;let c=h.getContext("2d");c.save(),c.scale(r/24,r/24),c.beginPath(),c.arc(12,12,6,0,2*Math.PI),c.fillStyle=e.toCssColorString(),c.fill(),c.closePath(),c.lineWidth=2;for(let p=0;p<3;p++)c.beginPath(),c.arc(12,12,8,a,a+o,!1),c.strokeStyle=e.withAlpha(.4).toCssColorString(),c.stroke(),c.arc(12,12,11,a,a+o,!1),c.strokeStyle=e.withAlpha(.2).toCssColorString(),c.stroke(),c.closePath(),a=a+o+n;c.restore(),this._cache[s]=h.toDataURL()}return this._cache[s]}_getClusterImage(e){let t=e/this._allCount,r;if(this._options.style==="custom"){let s=Object.keys(this._options.gradientImages).sort((a,o)=>Number(a)-Number(o));for(let a=s.length-1;a>=0;a--)if(t>=Number(s[a])){r=this._options.gradientImages[s[a]];break}r||(r=this._options.gradientImages[s[0]])}else{let s=Object.keys(this._options.gradientColors).sort((o,n)=>Number(o)-Number(n)),a;for(let o=s.length-1;o>=0;o--)if(t>=Number(s[o])){a=this._options.gradientColors[s[o]];break}a||(a=this._options.gradientColors[s[0]]),r=this._options.style==="circle"?this._getCircleImage(a,e):this._getClusteringImage(a,e)}return r}_changeCluster(e){let t=i.getTimestamp();if(this._lastChangedTime&&t-this._lastChangedTime<=1e3)return;this._lastChangedTime=t,this._cache={},this._billboards.removeAll(),this._labels.removeAll();let r=this._viewer.camera.computeViewRectangle();r||(r=this._viewer.viewBounds),this._allCount&&this._cluster.getClusters([i.Math.toDegrees(r.west),i.Math.toDegrees(r.south),i.Math.toDegrees(r.east),i.Math.toDegrees(r.north)],this._viewer.zoom).forEach(a=>{let o=x.uuid();if(a.properties.cluster){let n=a.properties.point_count,h=this._billboards.add({position:i.Cartesian3.fromDegrees(+a.geometry.coordinates[0],+a.geometry.coordinates[1]),image:this._getClusterImage(n)});if(h.layerId=this.layerId,h.overlayId=o,h.attr={count:n},this._cache[o]=h,this._options.showCount){let c=this._labels.add({position:i.Cartesian3.fromDegrees(+a.geometry.coordinates[0],+a.geometry.coordinates[1]),text:String(n),font:`${this._options.fontSize} px sans-serif`,disableDepthTestDistance:Number.POSITIVE_INFINITY,fillColor:this._options.fontColor,scale:.8,pixelOffset:this._options.getCountOffset(n)});c.layerId=this.layerId,c.overlayId=o,c.attr={count:n},this._cache[o]=c}}else{let n=this._billboards.add({position:i.Cartesian3.fromDegrees(+a.geometry.coordinates[0],+a.geometry.coordinates[1]),image:this._options.image,...a.properties.style});n.layerId=this.layerId,n.overlayId=o,n.attr=a.properties,this._cache[o]=n}})}_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(t=>{let r=g.parsePosition(t);return{type:"Feature",geometry:{type:"Point",coordinates:[r.lng,r.lat]},properties:t.attr||{}}}))),this}clear(){return this._cache={},this._allCount=0,this._state=m.CLEARED,this}};M.registerType("cluster");var Il=ss;var as=class extends M{constructor(e,t="",r={}){super(e),this._delegate=i.CzmlDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return M.getLayerType("czml")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(a=>{e.call(t,a)})}),this}};M.registerType("czml");var Dl=as;var os=class extends M{constructor(e){super(e),this._delegate=new i.CustomDataSource(e),this._state=m.INITIALIZED}get type(){return M.getLayerType("dynamic")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=m.CLEARED,this}};M.registerType("dynamic");var Ll=os;var ns=class extends M{constructor(e){super(e),this._delegate=new i.CustomDataSource(e),this._state=m.INITIALIZED}get type(){return M.getLayerType("vector")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=m.CLEARED,this}};M.registerType("vector");var ze=ns;var Cm={name:"",count:10,maximumLevel:21,dataProperty:"",callback:()=>null},ls=class extends M{constructor(e,t,r={}){super(e),this._url=t,this._options={...Cm,...r},this._levelLayers={},this._tileWidth=256,this._tileHeight=256,this._maximumLevel=this._options.maximumLevel,this._tilingScheme=this._options.tilingScheme||new i.GeographicTilingScheme,this._rectangle=this._tilingScheme.rectangle,this._credit=void 0,this._token=void 0;for(let s=0;s<this.maximumLevel;s++)this._levelLayers[String(s)]=new ze(e+"-grid-"+s);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=m.INITIALIZED}get type(){return M.getLayerType("feature_grid")}get url(){return this._url}get show(){return this._show}set show(e){this._show=e,Object.keys(this._levelLayers).forEach(t=>{this._levelLayers[t].show=e})}get token(){return this._token}get tileWidth(){if(!this.ready)throw new i.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this.ready)throw new i.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this.ready)throw new i.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new i.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}get tilingScheme(){if(!this.ready)throw new i.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new i.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(t=>{this._viewer.addLayer(this._levelLayers[t])}),this._state=m.ADDED}_onRemove(){this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach(e=>{this._viewer.removeLayer(this._levelLayers[e])}),this._state=m.REMOVED}getTileCredits(e,t,r){}requestImage(e,t,r,s){let a=this._levelLayers[String(r)],o=this._tilingScheme.tileXYToRectangle(e,t,r);return this._viewer&&o&&a&&i.Rectangle.intersection(o,this._viewer.viewBounds)&&i.Resource.fetchJson({url:this._url,queryParameters:{minX:i.Math.toDegrees(o.west),minY:i.Math.toDegrees(o.south),maxX:i.Math.toDegrees(o.east),maxY:i.Math.toDegrees(o.north),count:this._options.count}}).then(n=>{let h=n;if(this._options.dataProperty&&(h=n[this._options.dataProperty]),h&&h.length){for(let c=r+3;c<this._maximumLevel;c++)this._levelLayers[String(c)]&&this._levelLayers[String(c)].clear();h.forEach(c=>{let p=this._options.callback(c);p&&a.addOverlay(p)})}}),this._imagery}clear(){Object.keys(this._levelLayers).forEach(e=>{this._levelLayers[e].clear()}),this._state=m.CLEARED}};M.registerType("feature_grid");var Rl=ls;var Tm={},N=Tm;var hs=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 ji,this._overlayEvent.on(Te.ADD,this._onAdd,this),this._overlayEvent.on(Te.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(t=>{t.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&&(N[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getOverlayType(e){return N[e.toLocaleUpperCase()]||void 0}_getLayerCollection(e){let t;switch(e){case"point_primitive":t=this._layer.points;break;case"billboard_primitive":case"bounce_billboard_primitive":t=this._layer.billboards;break;case"label_primitive":case"bounce_label_primitive":t=this._layer.labels;break;case"polyline_primitive":t=this._layer.polylines;break;case"cloud_primitive":t=this._layer.clouds;break;default:break}return t}_mountedHook(){}_addedHook(){var e;if(!this._delegate)return!1;this._delegate instanceof Promise?this._delegate.then(t=>{var r;t.layerId=(r=this._layer)==null?void 0:r.layerId,t.overlayId=this._id}):(this._delegate.layerId=(e=this._layer)==null?void 0:e.layerId,this._delegate.overlayId=this._id)}_removedHook(){}_onAdd(e){var t,r,s,a;if(e){if(this._layer=e,this._mountedHook&&this._mountedHook(),(r=(t=this._layer)==null?void 0:t.delegate)!=null&&r.entities&&this._delegate)this._layer.delegate.entities.add(this._delegate);else if((a=(s=this._layer)==null?void 0:s.delegate)!=null&&a.add){let o=this._getLayerCollection(this.type);o?(this._delegate&&(this._delegate=o.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(n=>{this._layer.delegate.add(n)}):this.update&&this.destroy?this._layer.delegate.add(this):this._delegate&&this._layer.delegate.add(this._delegate)}this._addedHook&&this._addedHook(),this._state=m.ADDED}}_onRemove(){var e,t,r,s;if(this._layer){if((t=(e=this._layer)==null?void 0:e.delegate)!=null&&t.entities)this._layer.delegate.entities.remove(this._delegate);else if((s=(r=this._layer)==null?void 0:r.delegate)!=null&&s.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(o=>{this._layer.delegate.remove(o)}):this.update&&this.destroy?this._layer.delegate.remove(this):this._delegate&&this._layer.delegate.remove(this._delegate)}this._removedHook&&this._removedHook(),this._state=m.REMOVED}}setLabel(e,t){return this._delegate?(this._delegate instanceof i.Entity&&(this._delegate.label={...t,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,t,r){return this._overlayEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this}fire(e,t){return this._overlayEvent.fire(e,t),this}},v=hs;var cs=class extends v{constructor(e,t){super(),this._delegate=new i.Entity({billboard:{}}),this._position=g.parsePosition(e),this._icon=t,this._size=[32,32],this._state=m.INITIALIZED}get type(){return v.getOverlayType("custom_billboard")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.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,t){return this._delegate.label={...t,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 t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,a=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.CallbackProperty(()=>(s+=a,(s>=360||s<=-360)&&(s=0),s),!1)},this}};v.registerType("custom_billboard");var Ol=cs;var ps=class extends v{constructor(e,t){super(),this._delegate=new i.Entity({label:{}}),this._position=g.parsePosition(e),this._text=t,this._state=m.INITIALIZED}get type(){return v.getOverlayType("custom_label")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.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 t=this._position.copy();t.alt=e.height||0,this._delegate.polyline={...e,positions:u.transformWGS84ArrayToCartesianArray([t,this._position])}}return this}setBottomCircle(e,t={},r=0){let s=0,a=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.CallbackProperty(()=>(s+=a,(s>=360||s<=-360)&&(s=0),s),!1)},this}};v.registerType("custom_label");var kl=ps;var ds=class extends v{constructor(){super(),this._startTime=void 0,this._lastTime=void 0,this._sampledPosition=new i.SampledPositionProperty,this._cache=[],this._maxCacheSize=10,this._state=m.INITIALIZED}get maxCacheSize(){return this._maxCacheSize}set maxCacheSize(e){this._maxCacheSize=e}get position(){return u.transformCartesianToWGS84(this._sampledPosition.getValue(i.JulianDate.now()))}_removePosition(){if(this._cache.length>this._maxCacheSize){let e=i.JulianDate.addSeconds(this._cache[0],-.2,new i.JulianDate),t=i.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new i.JulianDate);this._sampledPosition.removeSamples(new i.TimeInterval({start:e,stop:t})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(e,t){this._removePosition();let r=i.JulianDate.now(),s=i.JulianDate.addSeconds(r,t,new i.JulianDate);return this._sampledPosition.addSample(s,u.transformWGS84ToCartesian(g.parsePosition(e))),this._lastTime=s,this._cache.push(this._lastTime),this}bindDom(e){return this}},yt=ds;var ms=class extends yt{constructor(e,t){super(),this._position=g.parsePosition(e),this._icon=t,this._delegate=new i.Entity({billboard:{}}),this._state=m.INITIALIZED}get type(){return v.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=i.ExtrapolationType.HOLD,this._startTime=i.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.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)}};v.registerType("dynamic_billboard");var zl=ms;var us=class extends yt{constructor(e,t){super(),this._position=g.parsePosition(e),this._modelUrl=t,this._delegate=new i.Entity({model:{}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("dynamic_model")}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._startTime=i.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._delegate.orientation=new i.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)}};v.registerType("dynamic_model");var Nl=us;function Em(l,e,t){let r=i.Cartesian3.subtract(l,e,new i.Cartesian3),s=i.Cartesian3.subtract(t,e,new i.Cartesian3),a=i.Cartesian3.cross(r,s,r);return i.Cartesian3.magnitude(a)*.5}function ye(l){let e=0;if(!Array.isArray(l))return e;l[0]instanceof i.Cartesian3||(l=u.transformWGS84ArrayToCartesianArray(l));let t=i.CoplanarPolygonGeometry.createGeometry(i.CoplanarPolygonGeometry.fromPositions({positions:l,vertexFormat:i.VertexFormat.POSITION_ONLY}));if(!t)return e;let r=t.attributes.position.values,s=t.indices;for(let a=0;a<s.length;a+=3){let o=i.Cartesian3.unpack(r,s[a]*3,new i.Cartesian3),n=i.Cartesian3.unpack(r,s[a+1]*3,new i.Cartesian3),h=i.Cartesian3.unpack(r,s[a+2]*3,new i.Cartesian3);e+=Em(o,n,h)}return e}function fs(l=[],e=0){let t=180,r=90,s=-180,a=-90;if(l.forEach(o=>{t=Math.min(t,o.lng||o.x),r=Math.min(r,o.lat||o.y),s=Math.max(s,o.lng||o.x),a=Math.max(a,o.lat||o.y)}),e>0){let o=Math.abs(s-s),n=Math.abs(a-r);t-=o*e,r-=n*e,s+=o*e,a+=n*e}return{west:t,south:r,east:s,north:a}}function ve(l){if(l&&Array.isArray(l)){let e=0;l.forEach(({alt:s})=>e=Math.max(e,s));let t=i.BoundingSphere.fromPoints(u.transformWGS84ArrayToCartesianArray(l)),r=u.transformCartesianToWGS84(t.center);return r.alt=e,r}return new U}function _s(l,e){e=e||{};let t=[];for(let r=0;r<l.length-1;r++){let s=Pm(l[r],l[r+1],e.count);s&&s.length>0&&(t=t.concat(s))}return t}function Pm(l,e,t){if(!l||!e)return null;let r=[];t=t||40;let s=function(A){return 1-2*A+A*A},a=A=>2*A-2*A*A,o=A=>A*A,n,h,c,p,f,y,_=0,d=parseFloat(l.lat),T=parseFloat(e.lat),C=parseFloat(l.lng),P=parseFloat(e.lng);P>C&&P-C>180&&C<0&&(C=360+C,P=360+P),y=0,T===d?(n=0,h=C-P):P===C?(n=Math.PI/2,h=d-T):(n=Math.atan((T-d)/(P-C)),h=(T-d)/Math.sin(n)),y===0&&(y=n+Math.PI/5),c=h/2,f=c*Math.cos(y)+C,p=c*Math.sin(y)+d;for(let A=0;A<t+1;A++){let O=C*s(_)+f*a(_)+P*o(_),H=d*s(_)+p*a(_)+T*o(_),W=l.lng,J=e.lng;r.push([W<0&&J>0?O-360:O,H]),_=_+1/t}return r}function se(l){let e=0;if(l&&Array.isArray(l))for(let t=0;t<l.length-1;t++){let r=u.transformWGS84ToCartographic(l[t]),s=u.transformWGS84ToCartographic(l[t+1]),a=new i.EllipsoidGeodesic;a.setEndPoints(r,s);let o=a.surfaceDistance;o=Math.sqrt(Math.pow(o,2)+Math.pow(s.height-r.height,2)),e+=o}return e.toFixed(3)}function we(l,e){let t=l,r=e;if(!t||!r)return 0;l instanceof i.Cartesian3||(t=g.parsePosition(l),t=u.transformWGS84ToCartesian(t)),e instanceof i.Cartesian3||(r=g.parsePosition(e),r=u.transformWGS84ToCartesian(r));let s=i.Transforms.eastNorthUpToFixedFrame(t),a=i.Cartesian3.subtract(r,t,new i.Cartesian3),o=i.Matrix4.multiplyByPointAsVector(i.Matrix4.inverse(s,new i.Matrix4),a,new i.Cartesian3),n=Math.atan2(o.y,o.x)-i.Math.PI_OVER_TWO;return n=i.Math.TWO_PI-i.Math.zeroToTwoPi(n),isNaN(n)?0:n}function He(l,e,t){return l=parseFloat(l)||0,l>=parseFloat(e)&&l<=parseFloat(t)}function F(l,e){return i.Cartesian3.midpoint(l,e,new i.Cartesian3)}function gs(l,e){let t=g.parsePosition(l),r=g.parsePosition(e);t=u.transformWGS84ToCartographic(t),r=u.transformWGS84ToCartographic(r);let s=new i.EllipsoidGeodesic(t,r).interpolateUsingFraction(.5);return new U(i.Math.toDegrees(s.longitude),i.Math.toDegrees(s.latitude),s.height)}function ys(l,e,t=0,r=50){let s=[];t=Math.max(+t,100),r=Math.max(+r,50);let a=Math.abs(l.lng-e.lng),o=Math.abs(l.lat-e.lat),n=Math.max(a,o),h=n/r;if(a>o){let c=(e.lat-l.lat)/r;l.lng-e.lng>0&&(h=-h);for(let p=0;p<r;p++){let f=t-Math.pow(-.5*n+Math.abs(h)*p,2)*4*t/Math.pow(n,2),y=l.lng+h*p,_=l.lat+c*p;s.push([y,_,f])}}else{let c=(e.lng-l.lng)/r;l.lat-e.lat>0&&(h=-h);for(let p=0;p<r;p++){let f=t-Math.pow(-.5*n+Math.abs(h)*p,2)*4*t/Math.pow(n,2),y=l.lng+c*p,_=l.lat+h*p;s.push([y,_,f])}}return s.push([e.lng,e.lat,e.alt||0]),s}var{Math:Mm}=i,Fl={};x.merge(Fl,Mm,{area:ye,bounds:fs,center:ve,curve:_s,distance:se,heading:we,isBetween:He,midCartesian:F,midPosition:gs,parabola:ys});var vs=class l extends v{constructor(e,t){super(),this._delegate=b.create("div","div-icon"),this._position=g.parsePosition(e),this._delegate.setAttribute("id",this._id),x.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=t,this._state=m.INITIALIZED}get type(){return v.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=g.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,t){var o;let r,s=i.JulianDate.now(),a=u.transformCartesianToWGS84(e.position.getValue(s));return r=new l(a,t),e.billboard&&(r.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}),r}_updateStyle(e,t,r){if(!this._show||!e)return;let s=e.x-this._delegate.offsetWidth/2,a=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(s=e.x-this._delegate.offsetWidth,a=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(s=e.x,a=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(s=e.x-this._delegate.offsetWidth,a=e.y):this._style.position==="bottomright"&&(s=e.x,a=e.y);let o=`translate3d(${Math.round(s)}px,${Math.round(a)}px, 0)`,n="scale3d(1,1,1)",h=this._style.scaleByDistance;if(t&&h){let f=h.near||0,y=h.nearValue||1,_=h.far||Number.MAX_VALUE,d=h.farValue||0,T=t/_;if(t<f)n=`scale3d(${y},${y},1)`;else if(t>_)n=`scale3d(${d},${d},1)`;else{let C=d+T*(y-d);n=`scale3d(${C},${C},1)`}}let c=!0,p=this._style.distanceDisplayCondition;t&&p&&(c=He(t,p.near||0,p.far||Number.MAX_VALUE)),this._delegate.style.transform=`${o} ${n}`,this._delegate.style.visibility=c&&r?"visible":"hidden"}_onAdd(e){this._layer=e,this._layer.delegate.appendChild(this._delegate);let t={layer:e,overlay:this,position:u.transformWGS84ToCartesian(this._position)};this._delegate.addEventListener("click",()=>{this._overlayEvent.fire(R.CLICK,t)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(R.MOUSE_OVER,t)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(R.MOUSE_OUT,t)}),this._state=m.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=m.REMOVED)}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(x.merge(this._style,e),this._style.className&&b.addClass(this._delegate,this._style.className),this)}};v.registerType("div_icon");var Wl=vs;v.registerType("div_plane");var ws=class l extends v{constructor(e,t){super(),this._delegate=new i.Entity({model:{}}),this._position=g.parsePosition(e),this._modelUrl=t,this._rotateAmount=0,this._state=m.INITIALIZED}get type(){return v.getOverlayType("model")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._rotateAmount===0&&(this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.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 i.CallbackProperty(()=>(this._position.heading+=this._rotateAmount,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))),!1)}static fromEntity(e,t){let r=i.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r)),a=new l(s,t);return a.attr={...e.properties.getValue(r)},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)}};v.registerType("model");var vt=ws;var xs=class extends v{constructor(e,t={}){super(),this._delegate=i.I3SDataProvider.fromUrl(e,t),this._state=m.INITIALIZED}get type(){return v.getOverlayType("i3s")}ready(e){return this._delegate.then(e),this}setLabel(e,t){return console.warn("not support this function"),this}};v.registerType("i3s");var Gl=xs;var Cs=class extends v{constructor(e,t={}){super(),this._delegate=i.Cesium3DTileset.fromUrl(e,t),this._tilesetEvent=new Yi(this._delegate),this._tileVisibleCallback=void 0,this._properties=void 0,this._state=m.INITIALIZED}get type(){return v.getOverlayType("tileset")}set show(e){this._show=e,this._delegate.then(t=>{t.show=e})}_bindVisibleEvent(){this._tileVisibleCallback&&this._tileVisibleCallback(),this._tileVisibleCallback=this._delegate.then(e=>{e.tileVisible.addEventListener(this._updateTile,this)})}_updateTile(e){let t=e.content;for(let r=0;r<t.featuresLength;r++){let s=t.getFeature(r);this._properties&&this._properties.length&&this._properties.forEach(a=>{s.hasProperty(a.key)&&s.getProperty(a.key)===a.keyValue&&s.setProperty(a.propertyName,a.propertyValue)})}}ready(e){return this._delegate.then(e),this}setPosition(e){return e=g.parsePosition(e),this._delegate.then(t=>{let r=i.Transforms.eastNorthUpToFixedFrame(i.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),s=i.Matrix4.fromRotationTranslation(i.Matrix3.fromHeadingPitchRoll(new i.HeadingPitchRoll(i.Math.toRadians(e.heading),i.Math.toRadians(e.pitch),i.Math.toRadians(e.roll))));i.Matrix4.multiply(r,s,r),t.root.transform=r}),this}setHeadingPitchRoll(e,t,r){return this._delegate.then(s=>{let a=s.root.transform,o=i.Matrix4.fromRotationTranslation(i.Matrix3.fromHeadingPitchRoll(new i.HeadingPitchRoll(i.Math.toRadians(e||0),i.Math.toRadians(t||0),i.Math.toRadians(r||0))));i.Matrix4.multiply(a,o,a),s.root.transform=a}),this}setLabel(e,t){return console.warn("not support this function"),this}clampToGround(){return this._delegate.then(e=>{let t=i.Cartographic.fromCartesian(e.boundingSphere.center),r=i.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),s=i.Cartesian3.fromRadians(t.longitude,t.latitude,0),a=i.Cartesian3.subtract(s,r,new i.Cartesian3);e.modelMatrix=i.Matrix4.fromTranslation(a)}),this}setHeight(e,t=!1){return this._delegate.then(r=>{let s=i.Cartographic.fromCartesian(r.boundingSphere.center),a=i.Cartesian3.fromRadians(s.longitude,s.latitude,s.height),o=i.Cartesian3.fromRadians(s.longitude,s.latitude,t?e:s.height+e),n=i.Cartesian3.subtract(o,a,new i.Cartesian3);r.modelMatrix=i.Matrix4.fromTranslation(n)}),this}setScale(e){return this._delegate.then(t=>{let r=t.root.transform;e>0&&e!==1&&i.Matrix4.multiplyByUniformScale(r,e,r),t.root.transform=r}),this}setProperties(e){return this._properties=e,this._bindVisibleEvent(),this}setSplitDirection(e){return this._delegate.then(t=>{t.splitDirection=e}),this}setCustomShader(e){return this._delegate.then(t=>{t.customShader=e}),this}setStyle(e){return e&&e instanceof i.Cesium3DTileStyle&&(this._style=e,this._delegate.then(t=>{t.style=e})),this}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._tilesetEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._tilesetEvent.off(e,t,r||this),this}};v.registerType("tileset");var Hl=Cs;var wt=Math.PI/2,Ts=class extends v{constructor(e){super(),this._positions=g.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this._state=m.INITIALIZED}get type(){return v.getOverlayType("attack_arrow")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getArrowHeadPoints(e,t,r){let s=w.getBaseLength(e),a=s*this.headHeightFactor,o=e[e.length-1];s=w.distance(o,e[e.length-2]);let n=w.distance(t,r);a>n*this.headTailFactor&&(a=n*this.headTailFactor);let h=a*this.headWidthFactor,c=a*this.neckWidthFactor;a=a>s?s:a;let p=a*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],o,0,a,!0),y=w.getThirdPoint(e[e.length-2],o,0,p,!0),_=w.getThirdPoint(o,f,wt,h,!1),d=w.getThirdPoint(o,f,wt,h,!0),T=w.getThirdPoint(o,y,wt,c,!1),C=w.getThirdPoint(o,y,wt,c,!0);return[T,_,o,d,C]}_getArrowBodyPoints(e,t,r,s){let a=w.wholeDistance(e),n=w.getBaseLength(e)*s,h=w.distance(t,r),c=(n-h)/2,p=0,f=[],y=[];for(let _=1;_<e.length-1;_++){let d=w.getAngleOfThreePoints(e[_-1],e[_],e[_+1])/2;p+=w.distance(e[_-1],e[_]);let T=(n/2-p/a*c)/Math.sin(d),C=w.getThirdPoint(e[_-1],e[_],Math.PI-d,T,!0),P=w.getThirdPoint(e[_-1],e[_],d,T,!1);f.push(C),y.push(P)}return f.concat(y)}_getHierarchy(){let e=g.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let a=[w.mid(t,r)].concat(e.slice(2)),o=this._getArrowHeadPoints(a,t,r),n=o[0],h=o[4],c=w.distance(t,r)/w.getBaseLength(a),p=this._getArrowBodyPoints(a,n,h,c),f=p.length,y=[t].concat(p.slice(0,f/2));y.push(n);let _=[r].concat(p.slice(f/2,f));return _.push(h),y=w.getQBSplinePoints(y),_=w.getQBSplinePoints(_),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions(y.concat(o,_.reverse()))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){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)}};v.registerType("attack_arrow");var Be=Ts;var $=Math.PI/2,Es=class extends v{constructor(e){super(),this._positions=g.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this._state=m.INITIALIZED}get type(){return v.getOverlayType("double_arrow")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getArrowPoints(e,t,r,s){let a=w.mid(e,t),o=w.distance(a,r),n=w.getThirdPoint(r,a,0,o*.3,!0),h=w.getThirdPoint(r,a,0,o*.5,!0);n=w.getThirdPoint(a,n,$,o/5,s),h=w.getThirdPoint(a,h,$,o/4,s);let c=[a,n,h,r],p=this._getArrowHeadPoints(c),f=p[0],y=p[4],_=w.distance(e,t)/w.getBaseLength(c)/2,d=this._getArrowBodyPoints(c,f,y,_),T=d.length,C=d.slice(0,T/2),P=d.slice(T/2,T);return C.push(f),P.push(y),C=C.reverse(),C.push(t),P=P.reverse(),P.push(e),C.reverse().concat(p,P)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],a=r*this.headWidthFactor,o=r*this.neckWidthFactor,n=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,n,!0),p=w.getThirdPoint(s,h,$,a,!1),f=w.getThirdPoint(s,h,$,a,!0),y=w.getThirdPoint(s,c,$,o,!1),_=w.getThirdPoint(s,c,$,o,!0);return[y,p,s,f,_]}_getArrowBodyPoints(e,t,r,s){let a=w.wholeDistance(e),n=w.getBaseLength(e)*s,h=w.distance(t,r),c=(n-h)/2,p=0,f=[],y=[];for(let _=1;_<e.length-1;_++){let d=w.getAngleOfThreePoints(e[_-1],e[_],e[_+1])/2;p+=w.distance(e[_-1],e[_]);let T=(n/2-p/a*c)/Math.sin(d),C=w.getThirdPoint(e[_-1],e[_],Math.PI-d,T,!0),P=w.getThirdPoint(e[_-1],e[_],d,T,!1);f.push(C),y.push(P)}return f.concat(y)}_getTempPoint4(e,t,r){let s=w.mid(e,t),a=w.distance(s,r),o=w.getAngleOfThreePoints(e,s,r),n,h,c,p;return o<$?(h=a*Math.sin(o),c=a*Math.cos(o),p=w.getThirdPoint(e,s,$,h,!1),n=w.getThirdPoint(s,p,$,c,!0)):o>=$&&o<Math.PI?(h=a*Math.sin(Math.PI-o),c=a*Math.cos(Math.PI-o),p=w.getThirdPoint(e,s,$,h,!1),n=w.getThirdPoint(s,p,$,c,!1)):o>=Math.PI&&o<Math.PI*1.5?(h=a*Math.sin(o-Math.PI),c=a*Math.cos(o-Math.PI),p=w.getThirdPoint(e,s,$,h,!0),n=w.getThirdPoint(s,p,$,c,!0)):(h=a*Math.sin(Math.PI*2-o),c=a*Math.cos(Math.PI*2-o),p=w.getThirdPoint(e,s,$,h,!0),n=w.getThirdPoint(s,p,$,c,!1)),n}_getHierarchy(){let e=this._positions.length,t,r,s=g.parsePolygonCoordToArray(this._positions)[0],a=s[0],o=s[1],n=s[2];e===3?t=this._getTempPoint4(a,o,n):t=s[3],e===3||e===4?r=w.mid(a,o):r=s[4];let h,c;w.isClockWise(a,o,n)?(h=this._getArrowPoints(a,r,t,!1),c=this._getArrowPoints(r,o,n,!0)):(h=this._getArrowPoints(o,r,n,!1),c=this._getArrowPoints(r,a,t,!0));let p=h.length,f=(p-5)/2,y=h.slice(0,f),_=h.slice(f,f+5),d=h.slice(f+5,p),T=c.slice(0,f),C=c.slice(f,f+5),P=c.slice(f+5,p);T=w.getBezierPoints(T);let A=w.getBezierPoints(P.concat(y.slice(1)));return d=w.getBezierPoints(d),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions(T.concat(C,A,_,d))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){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)}};v.registerType("double_arrow");var xt=Es;var Bl=Math.PI/2,Ps=class extends v{constructor(e){super(),this._positions=g.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this._state=m.INITIALIZED}get type(){return v.getOverlayType("fine_arrow")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getHierarchy(){let e=g.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1],s=w.getBaseLength(e),a=s*this.tailWidthFactor,o=s*this.neckWidthFactor,n=s*this.headWidthFactor,h=w.getThirdPoint(r,t,Bl,a,!0),c=w.getThirdPoint(r,t,Bl,a,!1),p=w.getThirdPoint(t,r,this.headAngle,n,!1),f=w.getThirdPoint(t,r,this.headAngle,n,!0),y=w.getThirdPoint(t,r,this.neckAngle,o,!1),_=w.getThirdPoint(t,r,this.neckAngle,o,!0);return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions([h,y,p,r,f,_,c])))}_mountedHook(){this.positions=this._positions}setLabel(e,t){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)}};v.registerType("fine_arrow");var Ct=Ps;var Am=Math.PI/2,Ul=100,Ms=class extends v{constructor(e){super(),this._positions=g.parsePositions(e),this._delegate=new i.Entity({polygon:{}}),this.t=.4,this._state=m.INITIALIZED}get type(){return v.getOverlayType("gathering_place")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getHierarchy(){let e=g.parsePolygonCoordToArray(this._positions)[0];if(this._positions.length===2){let o=w.mid(e[0],e[1]),n=w.distance(e[0],o)/.9,h=w.getThirdPoint(e[0],o,Am,n,!0);e=[e[0],h,e[1]]}let t=w.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let o=0;o<e.length-2;o++){let n=e[o],h=e[o+1],c=e[o+2],p=w.getBisectorNormals(this.t,n,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let a=[];for(let o=0;o<e.length-2;o++){let n=e[o],h=e[o+1];a.push(n);for(let c=0;c<=Ul;c++){let p=w.getCubicValue(c/Ul,n,r[o*2],r[o*2+1],h);a.push(p)}a.push(h)}return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions(a)))}_mountedHook(){this.positions=this._positions}setLabel(e,t){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)}};v.registerType("gathering_place");var Tt=Ms;var As=class extends Be{constructor(e){super(e),this._delegate=new i.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=m.INITIALIZED}get type(){return v.getOverlayType("tailed_attack_arrow")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}_getHierarchy(){let e=g.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let a=[w.mid(t,r)].concat(e.slice(2)),o=this._getArrowHeadPoints(a,t,r),n=o[0],h=o[4],c=w.distance(t,r),p=w.getBaseLength(a),f=p*this.tailWidthFactor*this.swallowTailFactor,y=w.getThirdPoint(a[1],a[0],0,f,!0),_=c/p,d=this._getArrowBodyPoints(a,n,h,_),T=d.length,C=[t].concat(d.slice(0,T/2));C.push(n);let P=[r].concat(d.slice(T/2,T));return P.push(h),C=w.getQBSplinePoints(C),P=w.getQBSplinePoints(P),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions(C.concat(o,P.reverse(),[y,C[0]]))))}};v.registerType("tailed_attack_arrow");var Et=As;var bs=class extends v{constructor(e,t,r=[32,32]){super(),this._position=g.parsePosition(e),this._icon=t,this._size=r,this._delegate={position:void 0,image:void 0,width:0,height:0},this._state=m.INITIALIZED}get type(){return v.getOverlayType("billboard_primitive")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.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)}};v.registerType("billboard_primitive");var Pt=bs;var Vl={maxOffsetY:10,offsetAmount:.1},Ss=class extends Pt{constructor(e,t){super(e,t),this._currentOffset=new i.Cartesian2(0,0),this._isUp=!0,this._state=m.INITIALIZED}get type(){return v.getOverlayType("bounce_billboard_primitive")}update(e){var s,a;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||Vl.maxOffsetY,r=((a=this._style)==null?void 0:a.offsetAmount)||Vl.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.destroyObject(this)}};v.registerType("bounce_billboard_primitive");var jl=Ss;var Is=class extends v{constructor(e,t){super(),this._position=g.parsePosition(e),this._text=t,this._delegate={position:void 0,text:void 0},this._state=m.INITIALIZED}get type(){return v.getOverlayType("label_primitive")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.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,t){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)}};v.registerType("label_primitive");var Mt=Is;var Zl={maxOffsetY:10,offsetAmount:.1},Ds=class extends Mt{constructor(e,t){super(e,t),this._currentOffset=new i.Cartesian2(0,0),this._isUp=!0,this._state=m.INITIALIZED}get type(){return v.getOverlayType("bounce_label_primitive")}update(e){var s,a;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||Zl.maxOffsetY,r=((a=this._style)==null?void 0:a.offsetAmount)||Zl.offsetAmount;this._currentOffset.y>=0?this._isUp=!0:this._currentOffset.y<=-t&&(this._isUp=!1),this._currentOffset.y+=r*(this._isUp?-1:1),this._delegate.pixelOffset=this._currentOffset}destroy(){return i.destroyObject(this)}};v.registerType("bounce_label_primitive");var Yl=Ds;var Ls=class extends v{constructor(e){super(),this._position=g.parsePosition(e),this._delegate={position:void 0,scale:{x:12,y:8}},this._state=m.INITIALIZED}get type(){return v.getOverlayType("cloud_primitive")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.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)}};v.registerType("cloud_primitive");var Jl=Ls;var bm={minRadius:10,minHeight:30,color:i.Color.RED,slices:128,speed:10},Rs=class extends v{constructor(e,t,r){super(),this._center=g.parsePosition(e),this._delegate=void 0,this._height=r,this._radius=t,this._currentHeight=r||0,this._currentRadius=10,this._style={...bm},this._state=m.INITIALIZED}get type(){return v.getOverlayType("diffuse_wall_primitive")}get center(){return this._center}set center(e){this._center=g.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=[],t=i.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._center));for(let r=0;r<this._style.slices;r++){let s=r/this._style.slices*i.Math.TWO_PI,a=Math.cos(s),o=Math.sin(s),n=new i.Cartesian3(a*this._currentRadius,o*this._currentRadius,0);e.push(i.Matrix4.multiplyByPoint(t,n,new i.Cartesian3))}return e.push(e[0]),e}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}update(e){var s;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 t=this._getPositions();if(!t||!t.length)return!1;let r=new i.WallGeometry({positions:t,minimumHeights:this._getHeights(t.length,0),maximumHeights:this._getHeights(t.length,this._currentHeight)});this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:r}),appearance:new i.MaterialAppearance({material:i.Material.fromType("WallDiffuse",{color:(s=this._style)==null?void 0:s.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 i.destroyObject(this)}};v.registerType("diffuse_wall_primitive");var ql=Rs;var Os=class extends v{constructor(e,t){super(),this._position=g.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("elec_ellipsoid_primitive")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.geometryInstances.modelMatrix=i.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._position))}get radius(){return this._radius}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry=new i.EllipsoidGeometry({radii:this._radius,maximumCone:i.Math.PI_OVER_TWO})}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.MaterialAppearance({material:i.Material.fromType("EllipsoidElectric",{color:((e=this._style)==null?void 0:e.color)||i.Color.GREEN,speed:((t=this._style)==null?void 0:t.speed)||5})}))}_mountedHook(){this.radius=this._radius,this.position=this._position,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){return this}setStyle(e={}){return Object.keys(e).length===0?this:(x.merge(this._style,e),this._setAppearance(),this)}};v.registerType("elec_ellipsoid_primitive");var Xl=Os;var ks=class extends v{constructor(e,t=1){super(),this._positions=g.parsePositions(e),this._width=t,this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("flow_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,t,r,s;this._delegate.appearance=new i.PolylineMaterialAppearance({material:i.Material.fromType("PolylineFlow",{color:((e=this._style)==null?void 0:e.color)||new i.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.speed)||1,percent:((r=this._style)==null?void 0:r.percent)||.03,gradient:((s=this._style)==null?void 0:s.gradient)||.1})})}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setLabel(e,t){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)}};v.registerType("flow_line_primitive");var Ql=ks;var Kl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGF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E2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var Sm={color:i.Color.ORANGE},zs=class extends v{constructor(e,t,r,s){super(),this._center=g.parsePosition(e),this._length=t||100,this._topRadius=r||1,this._bottomRadius=s||50,this._delegate=new i.PrimitiveCollection,this._style={...Sm},this._state=m.INITIALIZED}get type(){return v.getOverlayType("light-cylinder-primitive")}get center(){return this._center}set center(e){this._center=g.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,t){let r=i.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(e),semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0),s=i.Cartesian3.unpackArray(r.outerPositions);return s.push(s[0]),s}_createCylinderInstance(e,t,r){let s=t.slice(),a=t.length,o=2*a,n=[],h=1/(a-1),c=[],p=[],f=(_,d=0)=>{let T=i.Cartographic.fromCartesian(_);return T.height+=d,i.Cartographic.toCartesian(T)};for(let _=0;_<a;_++){p.push(f(e[_],r)),n.push(_*h,0);let d=_+1,T=(_+1)%a,C=o-d;c.push(C-1,C,_),c.push(_,T,C-1)}for(let _ in p)s.push(p[a-_-1]),n.push(1-_*h,1);let y=i.PolygonGeometry.createGeometry(new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(s),perPositionHeight:!0}));return y.indices=c,y.attributes.st.values=n,new i.GeometryInstance({geometry:y})}_getCircleImage(){let e=document.createElement("canvas");e.width=512,e.height=512;let t=e.getContext("2d");return t.fillStyle="rgba(255,255,255,0)",t.strokeStyle="rgba(255, 255, 255,255)",t.setLineDash([50,50]),t.lineWidth=30,t.beginPath(),t.arc(256,256,150,0,Math.PI*2,!0),t.stroke(),t.restore(),e}_getParticlesImage(e){let t=document.createElement("canvas");t.width=64,t.height=256;let r=t.getContext("2d");return r.clearRect(0,0,64,256),r.drawImage(e,0,0),r.drawImage(e,33,0),t}_updatePrimitives(){this._delegate.removeAll();let e=this._center.alt===0,t=this._computeEllipsePositions(this._center,this._topRadius),r=this._computeEllipsePositions(this._center,this._bottomRadius*.7),s=this._computeEllipsePositions(this._center,this._bottomRadius),a={geometryInstances:new i.GeometryInstance({geometry:new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},o=e?new i.GroundPrimitive(a):new i.Primitive(a);o.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CircleRingType,{color:this._style.color})});let n=e?new i.GroundPrimitive(a):new i.Primitive(a);n.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let h=new i.Primitive({geometryInstances:this._createCylinderInstance(t,r,this._length),appearance:new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?i.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(o),this._delegate.add(n),this._delegate.add(h)}):(this._delegate.add(o),this._delegate.add(n),this._delegate.add(h)),i.Resource.fetchImage({url:Kl}).then(c=>{let p=new i.Primitive({geometryInstances:this._createCylinderInstance(t,s,this._length),appearance:new i.EllipsoidSurfaceAppearance({material:i.Material.fromType(i.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(c)})}),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 i.destroyObject(this)}};v.registerType("light-cylinder-primitive");var $l=zs;var Ns=class extends v{constructor(e,t){super(),this._position=g.parsePosition(e),this._modelUrl=t,this._delegate=i.Model.fromGltfAsync({url:t}),this._modelEvent=new qi(this._delegate),this._state=m.INITIALIZED}get type(){return v.getOverlayType("model_primitive")}get position(){return this._position}set position(e){this._position=g.parsePosition(e);let t=u.transformWGS84ToCartesian(this._position);this._delegate.then(r=>{r.modelMatrix=i.Transforms.headingPitchRollToFixedFrame(t,new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))})}get modelUrl(){return this._modelUrl}set modelUrl(e){this._modelUrl=e,this._delegate=i.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(t=>{x.merge(t,e)}),this)}on(e,t,r){return this._overlayEvent.on(e,t,r||this),this._modelEvent.on(e,t,r||this),this}off(e,t,r){return this._overlayEvent.off(e,t,r||this),this._modelEvent.off(e,t,r||this),this}};v.registerType("model_primitive");var eh=Ns;var th={pixelSize:8,outlineColor:i.Color.BLUE,outlineWidth:2},Fs=class extends v{constructor(e){super(),this._position=g.parsePosition(e),this._delegate={position:void 0},this._state=m.INITIALIZED}get type(){return v.getOverlayType("point_primitive")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}_mountedHook(){this.position=this._position,x.merge(this._delegate,th,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,x.merge(this._style,e),x.merge(this._delegate,th,this._style),this)}};v.registerType("point_primitive");var ih=Fs;var Ws=class extends v{constructor(e){super(),this._positions=g.parsePositions(e),this._delegate={positions:[]},this._state=m.INITIALIZED}get type(){return v.getOverlayType("polyline_primitive")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return ve(this._positions)}get distance(){return se(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)}};v.registerType("polyline_primitive");var rh=Ws;var Gs=class extends v{constructor(e,t){super(),this._position=g.parsePosition(e),this._radius=t,this._delegate=new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("scan_circle_primitive")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.geometryInstances.geometry=new i.EllipseGeometry({center:u.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,t;this._style&&(this._delegate.appearance=new i.MaterialAppearance({material:i.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||i.Color.WHITE,speed:((t=this._style)==null?void 0:t.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)}};v.registerType("scan_circle_primitive");var sh=Gs;var Hs=class extends v{constructor(e,t=1){super(),this._positions=g.parsePositions(e),this._width=t,this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("trail_line_primitive")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}_setAppearance(){var e,t;this._delegate.appearance=new i.PolylineMaterialAppearance({material:i.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new i.Color(1,0,0,.7),speed:((t=this._style)==null?void 0:t.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)}};v.registerType("trail_line_primitive");var ah=Hs;var Bs=class extends v{constructor(e,t){super(),this._positions=g.parsePositions(e),this._delegate=new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}})}),this._video=t,this._state=m.INITIALIZED}get type(){return v.getOverlayType("video_primitive")}get positions(){return this._positions}set positions(e){var t,r,s,a;this._positions=g.parsePositions(e),this._delegate.geometryInstances.geometry=i.PolygonGeometry.fromPositions({positions:u.transformWGS84ArrayToCartesianArray(this._positions),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(a=this._style)==null?void 0:a.closeBottom,vertexFormat:i.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get video(){return this._video}set video(e){this._video=e,this._setAppearance()}_setAppearance(){this._delegate.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType("Image",{image:this._video})})}_mountedHook(){this.positions=this._positions,this.video=this._video}setStyle(e){var t;return Object.keys(e).length===0?this:(x.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};v.registerType("video_primitive");var oh=Bs;var Us=class extends v{constructor(e,t=[]){super(),this._positions=g.parsePositions(e),this._holes=t.map(r=>g.parsePositions(r)),this._delegate=new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("water_primitive")}get positions(){return this._positions}set positions(e){var t,r,s,a;this._positions=g.parsePositions(e),this._delegate.geometryInstances.geometry=new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(o=>new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(o)))),height:(t=this._style)==null?void 0:t.height,extrudedHeight:(r=this._style)==null?void 0:r.extrudedHeight,closeTop:(s=this._style)==null?void 0:s.closeTop,closeBottom:(a=this._style)==null?void 0:a.closeBottom,vertexFormat:i.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}_setAppearance(){var e,t,r,s,a,o,n,h;this._style&&(this._delegate.appearance=new i.EllipsoidSurfaceAppearance({material:i.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new i.Color(.2,.3,.6,1),blendColor:((t=this._style)==null?void 0:t.blendColor)||new i.Color(0,1,.699,1),specularMap:((r=this._style)==null?void 0:r.specularMap)||i.Material.DefaultImageId,normalMap:((s=this._style)==null?void 0:s.normalMap)||i.Material.DefaultImageId,frequency:((a=this._style)==null?void 0:a.frequency)||1e3,animationSpeed:((o=this._style)==null?void 0:o.animationSpeed)||.01,amplitude:((n=this._style)==null?void 0:n.amplitude)||10,specularIntensity:((h=this._style)==null?void 0:h.specularIntensity)||.5})}))}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(x.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};v.registerType("water_primitive");var nh=Us;var Vs=class l extends v{constructor(e,t){super(),this._delegate=new i.Entity({billboard:{}}),this._position=g.parsePosition(e),this._icon=t,this._size=[32,32],this._state=m.INITIALIZED}get type(){return v.getOverlayType("billboard")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.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 t,r=i.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return e.billboard&&(t=new l(s,e.billboard.image.getValue(r)),t.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(r)}),t}_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)}};v.registerType("billboard");var Ue=Vs;var js=class extends v{constructor(e,t,r,s){super(),this._position=g.parsePosition(e),this._length=t,this._width=r,this._height=s,this._delegate=new i.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("box")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get length(){return this._length}set length(e){let t=this._delegate.box.dimensions.getValue();this._length=e||0,t.x=+this._length,this._delegate.box.dimensions.setValue(t)}get width(){return this._width}set width(e){let t=this._delegate.box.dimensions.getValue();this._width=e||0,t.y=+this._width,this._delegate.box.dimensions.setValue(t)}get height(){return this._height}set height(e){let t=this._delegate.box.dimensions.getValue();this._height=e||0,t.z=+this._height,this._delegate.box.dimensions.setValue(t)}_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)}};v.registerType("box");var lh=js;var Zs=class extends v{constructor(e,t){super(),this._delegate=new i.Entity({polygon:{}}),this._center=g.parsePosition(e),this._radius=+t||0,this._rotateAmount=0,this._stRotation=0,this._state=m.INITIALIZED}get type(){return v.getOverlayType("circle")}get center(){return this._center}set center(e){this._center=g.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 i.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),i.Math.toRadians(this._stRotation)),!1)}_computeHierarchy(){let e=new i.PolygonHierarchy,t=i.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),r=i.Cartesian3.unpackArray(t.outerPositions);return r.push(r[0]),e.positions=r,e}_mountedHook(){this.center=this._center}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this._center),this._delegate.label={...t,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)}};v.registerType("circle");var At=Zs;var Ys=class l extends v{constructor(e){super(),this._positions=g.parsePositions(e),this._delegate=new i.Entity({corridor:{}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("corridor")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.corridor.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polyline){let a=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new l(a),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}_mountedHook(){this.positions=this._positions}setLabel(e,t){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)}};v.registerType("corridor");var hh=Ys;var Js=class extends v{constructor(e,t,r,s){super(),this._position=g.parsePosition(e),this._length=+t||0,this._topRadius=+r||0,this._bottomRadius=+s||0,this._delegate=new i.Entity({cylinder:{}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("cylinder")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.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,t){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)}};v.registerType("cylinder");var ch=Js;var qs=class extends v{constructor(e,t,r){super(),this._position=g.parsePosition(e),this._semiMajorAxis=+t||0,this._semiMinorAxis=+r||0,this._delegate=new i.Entity({ellipse:{}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("ellipse")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.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)}};v.registerType("ellipse");var ph=qs;var Xs=class extends v{constructor(e,t){super(),this._position=g.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Entity({ellipsoid:{}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("sphere")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.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)}};v.registerType("sphere");var dh=Xs;var Qs=class l extends v{constructor(e,t){super(),this._delegate=new i.Entity({label:{}}),this._position=g.parsePosition(e),this._text=t,this._state=m.INITIALIZED}get type(){return v.getOverlayType("label")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.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 t=i.JulianDate.now(),r=u.transformCartesianToWGS84(e.position.getValue(t)),s;return e.billboard&&(s=new l(r,e.name),s.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(t)}),s}_mountedHook(){this.position=this._position,this.text=this._text}setLabel(e,t){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)}};v.registerType("label");var bt=Qs;var Ks=class extends v{constructor(e,t,r,s={}){if(super(),this._position=g.parsePosition(e),this._width=+t||100,this._height=+r||100,s.normal&&typeof s.normal=="string"){let a=String(s.normal).toLocaleUpperCase();s.normal=a==="X"?i.Cartesian3.UNIT_X:a==="Y"?i.Cartesian3.UNIT_Y:i.Cartesian3.UNIT_Z}else s.normal=i.Cartesian3.UNIT_Z;this._normal=s.normal,this._distance=s.distance||0,this._delegate=new i.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new i.Plane(this._normal,this._distance)}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("plane")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(this._position.pitch),i.Math.toRadians(this._position.roll)))}get width(){return this._width}set width(e){let t=this._delegate.plane.dimensions.getValue();this._width=+e||0,t.x=this._width}get height(){return this._height}set height(e){let t=this._delegate.plane.dimensions.getValue();this._height=+e||0,t.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"],x.merge(this._style,e),x.merge(this._delegate.plane,e),this)}};v.registerType("plane");var mh=Ks;var uh={pixelSize:8,outlineColor:i.Color.BLUE,outlineWidth:2},$s=class l extends v{constructor(e){super(),this._delegate=new i.Entity({point:{}}),this._position=g.parsePosition(e),this._state=m.INITIALIZED}get type(){return v.getOverlayType("point")}get position(){return this._position}set position(e){this._position=g.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}static fromEntity(e){var a;let t,r=i.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return t=new l(s),t.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(r)},t}_mountedHook(){this.position=this._position,x.merge(this._delegate.point,uh,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,uh,this._style),this)}};v.registerType("point");var St=$s;var ea=class l extends v{constructor(e){super(),this._delegate=new i.Entity({polygon:{}}),this._positions=g.parsePositions(e),this._holes=[],this._state=m.INITIALIZED}get type(){return v.getOverlayType("polygon")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get holes(){return this._holes}set holes(e){e&&e.length&&(this._holes=e.map(t=>g.parsePositions(t)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get center(){return ve([...this._positions,this._positions[0]])}get area(){return ye(this._positions)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polygon){let a=u.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(r).positions);t=new l(a),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}_computeHierarchy(){let e=new i.PolygonHierarchy;return e.positions=u.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(t=>new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t))),e}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},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)}};v.registerType("polygon");var Ve=ea;var ta=class l extends v{constructor(e){super(),this._positions=g.parsePositions(e),this._delegate=new i.Entity({polyline:{}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("polyline")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.polyline.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get center(){return ve(this._positions)}get distance(){return se(this._positions)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polyline){let a=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new l(a),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this._delegate.position=u.transformWGS84ToCartesian(this.center),this._delegate.label={text:e,...t},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)}};v.registerType("polyline");var je=ta;var ia=class l extends v{constructor(e={}){super(),this._positions=g.parsePositions(e.positions||[]);let t=e.shape||e.shapePositions;switch(e.radius=e.radius||10,t){case"pipeline":this._shape=this.getShapeForPipeline(e);break;case"circle":this._shape=this.getShapeForCircle(e);break;case"star":this._shape=this.getShapeForStar(e);break;default:this._shape=t;break}this._delegate=new i.Entity({polylineVolume:{}}),this._state=m.INITIALIZED}getShapeForPipeline(e={}){let t=e.radius||1,r=e.thicknes||t/3,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 p=a;p<=o;p+=s){let f=i.Math.toRadians(p);c.push({x:t*h*Math.cos(f),y:t*n*Math.sin(f)})}for(let p=o;p>=a;p-=s){let f=i.Math.toRadians(p);c.push({x:(t-r)*h*Math.cos(f),y:(t-r)*n*Math.sin(f)})}return c}getShapeForCircle(e={}){let t=e.radius||1,r=Math.ceil(360/(e.slices||60)),s=e.startAngle||0,a=e.endAngle||s+360,o=e.vscale||1,n=e.hscale||1,h=[];for(let c=s;c<=a;c+=r){let p=i.Math.toRadians(c);h.push({x:t*n*Math.cos(p),y:t*o*Math.sin(p)})}return h}getShapeForStar(e={}){console.log(e.slices||6);let t=e.radius||1,r=e.thicknes||t/3,s=e.slices||6,a=e.startAngle||0;console.log(s);let o=i.Math.toRadians(a),n=Math.PI/s,h=2*s,c=new Array(h);for(let p=0;p<h;p++){let f=p%2===0?t:r,y=o+p*n;c[p]=new i.Cartesian2(Math.cos(y)*f,Math.sin(y)*f)}return c}get type(){return v.getOverlayType("polyline_volume")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.polylineVolume.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get shape(){return this._shape}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}static fromEntity(e,t){var a;let r,s=i.JulianDate.now();return e.polyline&&(t.positions=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s)),r=new l(t),r.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}),r}_mountedHook(){this.positions=this._positions,this.shape=this._shape}setLabel(e,t){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)}};v.registerType("polyline_volume");var fh=ia;var ra=class extends v{constructor(e){super(),this._positions=g.parsePositions(e),this._delegate=new i.Entity({rectangle:{}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("rect")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.rectangle.coordinates=i.Rectangle.fromCartesianArray(u.transformWGS84ArrayToCartesianArray(this._positions))}_mountedHook(){this.positions=this._positions}setLabel(e,t){let r=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=i.Cartographic.toCartesian(i.Rectangle.center(r,new i.Cartographic)),this._delegate.label={...t,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)}};v.registerType("rect");var It=ra;var sa=class l extends v{constructor(e){super(),this._positions=g.parsePositions(e),this._delegate=new i.Entity({wall:{}}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("wall")}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e),this._delegate.wall.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}static fromEntity(e){var s;let t,r=i.JulianDate.now();if(e.polyline){let a=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new l(a),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}_mountedHook(){this.positions=this._positions}setLabel(e,t){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)}};v.registerType("wall");var _h=sa;var aa=class extends M{constructor(e,t,r={}){if(!t)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=i.GeoJsonDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return M.getLayerType("geojson")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}_createBillboard(e){if(e.position&&e.billboard)return Ue.fromEntity(e)}_createPolyline(e){if(e.polyline)return je.fromEntity(e)}_createPolygon(e){if(e.polygon)return Ve.fromEntity(e)}_createModel(e,t){if(e)return vt.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(a=>{e.call(t,a)})}),this}toVectorLayer(){let e=new ze(this.id);return this.eachOverlay(t=>{t.billboard?e.addOverlay(this._createBillboard(t)):t.polyline?e.addOverlay(this._createPolyline(t)):t.polygon&&e.addOverlay(this._createPolygon(t))},this),e}toModelLayer(e){let t=new ze(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};M.registerType("geojson");var rt=aa;var oa=class extends M{constructor(e,t,r={}){if(!t)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=i.KmlDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return M.getLayerType("gpx")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(a=>{e.call(t,a)})}),this}};M.registerType("gpx");var gh=oa;var Im={radialColor:i.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:i.Color.YELLOW,weftColor:i.Color.WHITE,weftWidth:2},na=class extends M{constructor(e,t){super(e),this._options={...Im,...t},this._delegate=new i.CustomDataSource(e),this._state=m.INITIALIZED}get type(){return M.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:i.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:i.Cartesian3.fromDegrees(e*10,0),label:{text:e*10+"\xB0",font:"12px",fillColor:this._options.LabelColor}});for(let e=0;e<18;e++){let t=[];for(let r=0;r<129;r++)t.push(-180+r*(360/128),(e<9?e:-e)*10);this._delegate.entities.add({polyline:{positions:i.Cartesian3.fromDegreesArray(t),material:this._options.weftColor,width:this._options.weftWidth}})}}};M.registerType("graticule");var yh=na;var la=class extends M{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._isGround=!0,this._state=m.INITIALIZED}get type(){return M.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=m.CLEARED,this}};M.registerType("ground_primitive");var vh=la;var xh=[].indexOf||function(l){for(let e=0,t=this.length;e<t;e++)if(e in this&&this[e]===l)return e;return-1},Dt=`attribute vec4 position;
|
|
128
|
-
varying vec2 texcoord;
|
|
129
|
-
void main(){
|
|
130
|
-
texcoord = position.xy*0.5+0.5;
|
|
131
|
-
gl_Position = position;
|
|
132
|
-
}`,Lt=`#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
133
|
-
precision highp int;
|
|
134
|
-
precision highp float;
|
|
135
|
-
#else
|
|
136
|
-
precision mediump int;
|
|
137
|
-
precision mediump float;
|
|
138
|
-
#endif
|
|
139
|
-
uniform sampler2D source;
|
|
140
|
-
varying vec2 texcoord;`,Dm=function(){let l,e,t,r;if(window.WebGLRenderingContext!=null)return r=["WEBKIT","MOZ","MS","O"],t=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,l=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(s){let a,o,n,h,c;if(o=s.match(t),o!==null&&(s=o[1]),a=l.call(this,s),a===null){for(h=0,c=r.length;h<c;h++)if(n=r[h],a=l.call(this,n+"_"+s),a!==null)return a;return null}else return a},e=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let s,a,o,n,h,c;for(n=e.call(this),o=[],h=0,c=n.length;h<c;h++)s=n[h],a=s.match(t),a!==null&&(s=a[1]),xh.call(o,s)<0&&o.push(s);return o}},Lm=function(){let l,e,t,r,s,a,o,n,h,c,p,f,y,_;if(s=function(){let d,T,C;return d=document.createElement("canvas"),d.width=2,d.height=2,T=d.getContext("2d"),C=T.getImageData(0,0,2,2),C.data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),T.putImageData(C,0,0),d},s(),e=function(d,T){let C,P,A,O,H,W,J,I,G,pe,Ie,De,de,Ne;if(W=d.createProgram(),de=d.createShader(d.VERTEX_SHADER),d.attachShader(W,de),d.shaderSource(de,`attribute vec2 position;
|
|
141
|
-
void main(){
|
|
142
|
-
gl_Position = vec4(position, 0.0, 1.0);
|
|
143
|
-
}`),d.compileShader(de),!d.getShaderParameter(de,d.COMPILE_STATUS))throw d.getShaderInfoLog(de);if(A=d.createShader(d.FRAGMENT_SHADER),d.attachShader(W,A),d.shaderSource(A,`uniform sampler2D source;
|
|
144
|
-
void main(){
|
|
145
|
-
gl_FragColor = texture2D(source, vec2(1.0, 1.0));
|
|
146
|
-
}`),d.compileShader(A),!d.getShaderParameter(A,d.COMPILE_STATUS))throw d.getShaderInfoLog(A);if(d.linkProgram(W),!d.getProgramParameter(W,d.LINK_STATUS))throw d.getProgramInfoLog(W);return d.useProgram(W),P=function(){return d.deleteShader(A),d.deleteShader(de),d.deleteProgram(W),d.deleteBuffer(C),d.deleteTexture(G),d.deleteTexture(De),d.deleteFramebuffer(O),d.bindBuffer(d.ARRAY_BUFFER,null),d.useProgram(null),d.bindTexture(d.TEXTURE_2D,null),d.bindFramebuffer(d.FRAMEBUFFER,null)},De=d.createTexture(),d.bindTexture(d.TEXTURE_2D,De),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,2,2,0,d.RGBA,d.UNSIGNED_BYTE,null),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),O=d.createFramebuffer(),d.bindFramebuffer(d.FRAMEBUFFER,O),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,De,0),pe=s(),G=d.createTexture(),d.bindTexture(d.TEXTURE_2D,G),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,T,pe),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),Ne=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),C=d.createBuffer(),d.bindBuffer(d.ARRAY_BUFFER,C),d.bufferData(d.ARRAY_BUFFER,Ne,d.STATIC_DRAW),H=d.getAttribLocation(W,"position"),Ie=d.getUniformLocation(W,"source"),d.enableVertexAttribArray(H),d.vertexAttribPointer(H,2,d.FLOAT,!1,0,0),d.uniform1i(Ie,0),d.drawArrays(d.TRIANGLES,0,6),J=new Uint8Array(4*4),d.readPixels(0,0,2,2,d.RGBA,d.UNSIGNED_BYTE,J),I=Math.abs(J[0]-127)<10,P(),I},r=function(d,T){let C;return C=d.createTexture(),d.bindTexture(d.TEXTURE_2D,C),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,2,2,0,d.RGBA,T,null),d.getError()===0?(d.deleteTexture(C),!0):(d.deleteTexture(C),!1)},l=function(d,T){let C,P,A;return A=d.createTexture(),d.bindTexture(d.TEXTURE_2D,A),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,2,2,0,d.RGBA,T,null),P=d.createFramebuffer(),d.bindFramebuffer(d.FRAMEBUFFER,P),d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,A,0),C=d.checkFramebufferStatus(d.FRAMEBUFFER),d.deleteTexture(A),d.deleteFramebuffer(P),d.bindTexture(d.TEXTURE_2D,null),d.bindFramebuffer(d.FRAMEBUFFER,null),C===d.FRAMEBUFFER_COMPLETE},h=[],c={},p=[],t=function(){let d,T,C,P,A,O,H;d=document.createElement("canvas"),C=null;try{C=d.getContext("experimental-webgl"),C===null&&(C=d.getContext("webgl"))}catch{}if(C!=null&&(O=C.getExtension("OES_texture_float"),O===null?r(C,C.FLOAT)?(H=!0,h.push("OES_texture_float"),c.OES_texture_float={shim:!0}):(H=!1,p.push("OES_texture_float")):r(C,C.FLOAT)?(H=!0,h.push("OES_texture_float")):(H=!1,p.push("OES_texture_float")),H&&(T=C.getExtension("WEBGL_color_buffer_float"),T===null?l(C,C.FLOAT)?(h.push("WEBGL_color_buffer_float"),c.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(C,C.FLOAT)?h.push("WEBGL_color_buffer_float"):p.push("WEBGL_color_buffer_float"),T=C.getExtension("OES_texture_float_linear"),T===null?e(C,C.FLOAT)?(h.push("OES_texture_float_linear"),c.OES_texture_float_linear={shim:!0}):p.push("OES_texture_float_linear"):e(C,C.FLOAT)?h.push("OES_texture_float_linear"):p.push("OES_texture_float_linear")),P=C.getExtension("OES_texture_half_float"),P===null?r(C,36193)?(A=!0,h.push("OES_texture_half_float"),P=c.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(A=!1,p.push("OES_texture_half_float")):r(C,P.HALF_FLOAT_OES)?(A=!0,h.push("OES_texture_half_float")):(A=!1,p.push("OES_texture_half_float")),A))return T=C.getExtension("EXT_color_buffer_half_float"),T===null?l(C,P.HALF_FLOAT_OES)?(h.push("EXT_color_buffer_half_float"),c.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(C,P.HALF_FLOAT_OES)?h.push("EXT_color_buffer_half_float"):p.push("EXT_color_buffer_half_float"),T=C.getExtension("OES_texture_half_float_linear"),T===null?e(C,P.HALF_FLOAT_OES)?(h.push("OES_texture_half_float_linear"),c.OES_texture_half_float_linear={shim:!0}):p.push("OES_texture_half_float_linear"):e(C,P.HALF_FLOAT_OES)?h.push("OES_texture_half_float_linear"):p.push("OES_texture_half_float_linear")},window.WebGLRenderingContext!=null){for(t(),f={},y=0,_=p.length;y<_;y++)n=p[y],f[n]=!0;return a=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(d){let T;return T=c[d],T===void 0?f[d]?null:a.call(this,d):T},o=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let d,T,C,P,A,O,H;for(C=o.call(this),T=[],P=0,O=C.length;P<O;P++)d=C[P],f[d]===void 0&&T.push(d);for(A=0,H=h.length;A<H;A++)d=h[A],xh.call(T,d)<0&&T.push(d);return T},WebGLRenderingContext.prototype.getFloatExtension=function(d){let T,C,P,A,O,H,W,J,I,G,pe,Ie,De,de,Ne,at,ot,nt,un,fn,_n,gn,yi,yn,vi,wi;for(d.prefer==null&&(d.prefer=["half"]),d.require==null&&(d.require=[]),d.throws==null&&(d.throws=!0),de=this.getExtension("OES_texture_float"),H=this.getExtension("OES_texture_half_float"),Ie=this.getExtension("WEBGL_color_buffer_float"),A=this.getExtension("EXT_color_buffer_half_float"),De=this.getExtension("OES_texture_float_linear"),O=this.getExtension("OES_texture_half_float_linear"),pe={texture:de!==null,filterable:De!==null,renderable:Ie!==null,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},P={texture:H!==null,filterable:O!==null,renderable:A!==null,score:0,precision:"half",half:!0,single:!1,type:(yn=H!=null?H.HALF_FLOAT_OES:void 0)!=null?yn:null},C=[],pe.texture&&C.push(pe),P.texture&&C.push(P),G=[],at=0,un=C.length;at<un;at++){for(T=C[at],Ne=!0,vi=d.require,ot=0,fn=vi.length;ot<fn;ot++)n=vi[ot],T[n]===!1&&(Ne=!1);Ne&&G.push(T)}for(nt=0,_n=G.length;nt<_n;nt++)for(T=G[nt],wi=d.prefer,W=yi=0,gn=wi.length;yi<gn;W=++yi)I=wi[W],J=Math.pow(2,d.prefer.length-W-1),T[I]&&(T.score+=J);if(G.sort(function(xi,Ci){if(xi.score===Ci.score)return 0;if(xi.score<Ci.score)return 1;if(xi.score>Ci.score)return-1}),G.length===0){if(d.throws)throw"No floating point texture support that is "+d.require.join(", ");return null}else return G=G[0],{filterable:G.filterable,renderable:G.renderable,type:G.type,precision:G.precision}}}};Dm();Lm();var st=function(){function l(e,t){let r,s;this.gl=e,s=t.vertex,r=t.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,s),this.compileShader(this.fs,r),this.link(),this.value_cache={},this.uniform_cache={},this.attribCache={}}return l.prototype.attribLocation=function(e){let t=this.attribCache[e];return t===void 0&&(t=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),t},l.prototype.compileShader=function(e,t){if(this.gl.shaderSource(e,t),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 t=this.uniform_cache[e];return t===void 0&&(t=this.uniform_cache[e]=this.gl.getUniformLocation(this.program,e)),t},l.prototype.int=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1i(s,t)),this},l.prototype.vec2=function(e,t,r){let s;return s=this.uniformLoc(e),s&&this.gl.uniform2f(s,t,r),this},l.prototype.float=function(e,t){let r,s;return r=this.value_cache[e],r!==t&&(this.value_cache[e]=t,s=this.uniformLoc(e),s&&this.gl.uniform1f(s,t)),this},l}(),Rm=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}(),Ch=function(){function l(e,t){let r,s;switch(this.gl=e,t==null&&(t={}),this.channels=this.gl[((r=t.channels)!=null?r:"rgba").toUpperCase()],typeof t.type=="number"?this.type=t.type:this.type=this.gl[((s=t.type)!=null?s:"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,t){return this.width=e,this.height=t,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}(),wh=function(){function l(e,t,r){let s;this.gl=e,this.width=t,this.height=r,s=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new Ch(this.gl,{type:s.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new Rm(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,t){return this.width=e,this.height=t,this.texture.bind(0).setSize(this.width,this.height)},l}(),Om=function(){function l(e,t,r,s){let a,o,n;for(this.heatmap=e,this.gl=t,this.width=r,this.height=s,this.shader=new st(this.gl,{vertex:`attribute vec4 position, intensity;
|
|
147
|
-
varying vec2 off, dim;
|
|
148
|
-
varying float vIntensity;
|
|
149
|
-
uniform vec2 viewport;
|
|
150
|
-
|
|
151
|
-
void main(){
|
|
152
|
-
dim = abs(position.zw);
|
|
153
|
-
off = position.zw;
|
|
154
|
-
vec2 pos = position.xy + position.zw;
|
|
155
|
-
vIntensity = intensity.x;
|
|
156
|
-
gl_Position = vec4((pos/viewport)*2.0-1.0, 0.0, 1.0);
|
|
157
|
-
}`,fragment:`#ifdef GL_FRAGMENT_PRECISION_HIGH
|
|
158
|
-
precision highp int;
|
|
159
|
-
precision highp float;
|
|
160
|
-
#else
|
|
161
|
-
precision mediump int;
|
|
162
|
-
precision mediump float;
|
|
163
|
-
#endif
|
|
164
|
-
varying vec2 off, dim;
|
|
165
|
-
varying float vIntensity;
|
|
166
|
-
void main(){
|
|
167
|
-
float falloff = (1.0 - smoothstep(0.0, 1.0, length(off/dim)));
|
|
168
|
-
float intensity = falloff*vIntensity;
|
|
169
|
-
gl_FragColor = vec4(intensity);
|
|
170
|
-
}`}),this.clampShader=new st(this.gl,{vertex:Dt,fragment:Lt+`uniform float low, high;
|
|
171
|
-
void main(){
|
|
172
|
-
gl_FragColor = vec4(clamp(texture2D(source, texcoord).rgb, low, high), 1.0);
|
|
173
|
-
}`}),this.multiplyShader=new st(this.gl,{vertex:Dt,fragment:Lt+`uniform float value;
|
|
174
|
-
void main(){
|
|
175
|
-
gl_FragColor = vec4(texture2D(source, texcoord).rgb*value, 1.0);
|
|
176
|
-
}`}),this.blurShader=new st(this.gl,{vertex:Dt,fragment:Lt+`uniform vec2 viewport;
|
|
177
|
-
void main(){
|
|
178
|
-
vec4 result = vec4(0.0);
|
|
179
|
-
for(int x=-1; x<=1; x++){
|
|
180
|
-
for(int y=-1; y<=1; y++){
|
|
181
|
-
vec2 off = vec2(x,y)/viewport;
|
|
182
|
-
//float factor = 1.0 - smoothstep(0.0, 1.5, length(off));
|
|
183
|
-
float factor = 1.0;
|
|
184
|
-
result += vec4(texture2D(source, texcoord+off).rgb*factor, factor);
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
gl_FragColor = vec4(result.rgb/result.w, 1.0);
|
|
188
|
-
}`}),this.nodeBack=new wh(this.gl,this.width,this.height),this.nodeFront=new wh(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=o=0,n=this.maxPointCount;0<=n?o<n:o>n;a=0<=n?++o:--o)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,t){return this.width=e,this.height=t,this.nodeBack.resize(this.width,this.height),this.nodeFront.resize(this.width,this.height)},l.prototype.update=function(){var e,t;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),t=this.shader.attribLocation("position"),e=this.shader.attribLocation("intensity"),this.gl.enableVertexAttribArray(1),this.gl.vertexAttribPointer(t,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,t){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",t),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,t,r,s,a){return this.vertexBufferData[this.bufferIndex++]=e,this.vertexBufferData[this.bufferIndex++]=t,this.vertexBufferData[this.bufferIndex++]=r,this.vertexBufferData[this.bufferIndex++]=s,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,t,r,s){let a;return r==null&&(r=50),s==null&&(s=.2),this.pointCount>=this.maxPointCount-1&&this.update(),t=this.height-t,a=r/2,this.addVertex(e,t,-a,-a,s),this.addVertex(e,t,+a,-a,s),this.addVertex(e,t,-a,+a,s),this.addVertex(e,t,-a,+a,s),this.addVertex(e,t,+a,-a,s),this.addVertex(e,t,+a,+a,s),this.pointCount+=1},l}(),km=function(){function l(e){let t,r,s,a,o,n,h,c,p,f,y,_,d;_=e!=null?e:{},this.canvas=_.canvas,this.width=_.width,this.height=_.height,c=_.intensityToAlpha,n=_.gradientTexture,r=_.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,C,P){throw window.WebGLDebugUtils.glEnumToString(T)+" was caused by call to: "+C})),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),n?(y=this.gradientTexture=new Ch(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),typeof n=="string"?(h=new Image,h.onload=function(){return y.bind().upload(h)},h.src=n):n.width>0&&n.height>0?y.upload(n):n.onload=function(){return y.upload(n)},o=`uniform sampler2D gradientTexture;
|
|
189
|
-
vec3 getColor(float intensity){
|
|
190
|
-
return texture2D(gradientTexture, vec2(intensity, 0.0)).rgb;
|
|
191
|
-
}`):(y=null,o=`vec3 getColor(float intensity){
|
|
192
|
-
vec3 blue = vec3(0.0, 0.0, 1.0);
|
|
193
|
-
vec3 cyan = vec3(0.0, 1.0, 1.0);
|
|
194
|
-
vec3 green = vec3(0.0, 1.0, 0.0);
|
|
195
|
-
vec3 yellow = vec3(1.0, 1.0, 0.0);
|
|
196
|
-
vec3 red = vec3(1.0, 0.0, 0.0);
|
|
197
|
-
|
|
198
|
-
vec3 color = (
|
|
199
|
-
fade(-0.25, 0.25, intensity)*blue +
|
|
200
|
-
fade(0.0, 0.5, intensity)*cyan +
|
|
201
|
-
fade(0.25, 0.75, intensity)*green +
|
|
202
|
-
fade(0.5, 1.0, intensity)*yellow +
|
|
203
|
-
smoothstep(0.75, 1.0, intensity)*red
|
|
204
|
-
);
|
|
205
|
-
return color;
|
|
206
|
-
}`),c==null&&(c=!0),c?(d=r!=null?r:[0,1],s=d[0],t=d[1],p=`vec4 alphaFun(vec3 color, float intensity){
|
|
207
|
-
float alpha = smoothstep(`+s.toFixed(8)+", "+t.toFixed(8)+`, intensity);
|
|
208
|
-
return vec4(color*alpha, alpha);
|
|
209
|
-
}`):p=`vec4 alphaFun(vec3 color, float intensity){
|
|
210
|
-
return vec4(color, 1.0);
|
|
211
|
-
}`,this.shader=new st(this.gl,{vertex:Dt,fragment:Lt+(`float linstep(float low, float high, float value){
|
|
212
|
-
return clamp((value-low)/(high-low), 0.0, 1.0);
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
float fade(float low, float high, float value){
|
|
216
|
-
float mid = (low+high)*0.5;
|
|
217
|
-
float range = (high-low)*0.5;
|
|
218
|
-
float x = 1.0 - clamp(abs(mid-value)/range, 0.0, 1.0);
|
|
219
|
-
return smoothstep(0.0, 1.0, x);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
`+o+`
|
|
223
|
-
`+p+`
|
|
224
|
-
|
|
225
|
-
void main(){
|
|
226
|
-
float intensity = smoothstep(0.0, 1.0, texture2D(source, texcoord).r);
|
|
227
|
-
vec3 color = getColor(intensity);
|
|
228
|
-
gl_FragColor = alphaFun(color, intensity);
|
|
229
|
-
}`)}),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 Om(this,this.gl,this.width,this.height)}return l.prototype.adjustSize=function(){let e,t;if(t=this.canvas.offsetWidth||2,e=this.canvas.offsetHeight||2,this.width!==t||this.height!==e)return this.gl.viewport(0,0,t,e),this.canvas.width=t,this.canvas.height=e,this.width=t,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,t){return e==null&&(e=0),t==null&&(t=1),this.heights.clamp(e,t)},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,t,r,s){return this.heights.addPoint(e,t,r,s)},l.prototype.addPoints=function(e){let t,r,s,a;for(a=[],r=0,s=e.length;r<s;r++)t=e[r],a.push(this.addPoint(t.x,t.y,t.size,t.intensity));return a},l}();function ha(l){return new km(l)}var ca=new i.WebMercatorProjection,zm={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},pa=class extends M{constructor(e,t={}){super(e),this._options={...zm,...t},this._delegate=new i.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 i.Rectangle,this._boundsInMeter=void 0,this._primitive=this._delegate.add(this._isGround?new i.GroundPrimitive({geometryInstances:new i.GeometryInstance({geometry:{}}),classificationType:this._options.classificationType}):new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}})})),this._state=m.INITIALIZED}get type(){return M.getLayerType("heat-map")}_addedHook(){this._canvas.style.cssText=`
|
|
230
|
-
visibility:hidden;
|
|
231
|
-
width:${this._viewer.canvas.width}px;
|
|
232
|
-
height:${this._viewer.canvas.height}px;
|
|
233
|
-
`,this._viewer.layerContainer.appendChild(this._canvas),this._points&&this._points.length&&(this._heat=ha({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 t=e.getContext("2d"),r=t.createLinearGradient(0,0,200,0);for(let s in this._options.gradient)r.addColorStop(+s,this._options.gradient[s]);return t.fillStyle=r,t.fillRect(0,0,200,10),e}_parsePoints(e){return e.map(t=>{let r=ca.project(i.Cartographic.fromDegrees(t.lng,t.lat));return{x:(r.x-this._boundsInMeter.west)/this._scale,y:(r.y-this._boundsInMeter.south)/this._scale,size:this._options.radius,intensity:t.value||Math.random()}})}_computeBounds(){i.Rectangle.fromCartographicArray(this._points.map(e=>i.Cartographic.fromDegrees(e.lng,e.lat)),this._bounds)}_computeBoundsInMeter(){let e=ca.project(i.Rectangle.southwest(this._bounds)),t=ca.project(i.Rectangle.northeast(this._bounds));this._boundsInMeter=new i.Rectangle(e.x,e.y,t.x,t.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 i.RectangleGeometry({rectangle:this._bounds,height:this._options.height})),this._primitive.appearance=new i.MaterialAppearance({material:new i.Material({fabric:{type:"Heat-Image",uniforms:{image:this._canvas},source:`
|
|
234
|
-
uniform sampler2D image;
|
|
235
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){
|
|
236
|
-
czm_material material = czm_getDefaultMaterial(materialInput);
|
|
237
|
-
vec2 st = materialInput.st;
|
|
238
|
-
vec4 colorImage = texture(image,st);
|
|
239
|
-
if(colorImage.rgb == vec3(1.0) || colorImage.rgb == vec3(0.0)){
|
|
240
|
-
discard;
|
|
241
|
-
}
|
|
242
|
-
material.diffuse = colorImage.rgb;
|
|
243
|
-
material.alpha = colorImage.a;
|
|
244
|
-
return material;
|
|
245
|
-
}
|
|
246
|
-
`},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=ha({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=m.CLEARED,this}};M.registerType("heat-map");var Th=pa;var da=class extends M{constructor(e){super(e),this._delegate=b.create("div","html-layer",void 0),this._delegate.setAttribute("id",this._id),this._renderRemoveCallback=void 0,this._state=m.INITIALIZED}get type(){return M.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(t=>{this._cache[t].show=e})}_onAdd(e){this._viewer=e,this._viewer.layerContainer.appendChild(this._delegate);let t=this._viewer.scene;this._renderRemoveCallback=t.postRender.addEventListener(()=>{let r=this._viewer.camera.positionWC,s=this._viewer.camera.direction,a=this._viewer.getOffset();this.eachOverlay(o=>{if(o&&o.position){let n=u.transformWGS84ToCartesian(o.position),h=t.globe.ellipsoid.geodeticSurfaceNormal(n,new i.Cartesian3),c=i.SceneTransforms.worldToWindowCoordinates(t,n);c&&(c.x+=a.x,c.y+=a.y),o._updateStyle(c,i.Cartesian3.distance(n,r),i.Cartesian3.dot(s,h)<=0)}},this)},this),this._state=m.ADDED}_onRemove(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._delegate),this._state=m.REMOVED}clear(){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);return this._cache={},this._state=m.CLEARED,this}};M.registerType("html");var Eh=da;var ma=class extends M{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._state=m.INITIALIZED}get type(){return M.getLayerType("i3s")}clear(){return this._delegate.removeAll(),this._cache={},this._state=m.CLEARED,this}};M.registerType("i3s");var Ph=ma;var ua=class extends M{constructor(e,t,r={}){if(!t)throw new Error("KmlLayer: the url is empty");super(e),this._delegate=i.KmlDataSource.load(t,r),this._state=m.INITIALIZED}get type(){return M.getLayerType("kml")}get show(){return this._show}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(a=>{e.call(t,a)})}),this}};M.registerType("kml");var Mh=ua;var fa=class extends M{constructor(e,t=""){super(e),this._dataSource=i.GeoJsonDataSource.load(t),this._delegate=new i.CustomDataSource(e),this._initLabel(),this._state=m.INITIALIZED}get type(){return M.getLayerType("label")}_createLabel(e){if(e.position&&e.name)return bt.fromEntity(e)}_initLabel(){this._dataSource.then(e=>{e.entities.values.forEach(r=>{let s=this._createLabel(r);this.addOverlay(s)})})}};M.registerType("label");var Ah=fa;var _a=class extends M{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._points=this._delegate.add(new i.PointPrimitiveCollection),this._labels=this._delegate.add(new i.LabelCollection),this._billboards=this._delegate.add(new i.BillboardCollection),this._polylines=this._delegate.add(new i.PolylineCollection),this._clouds=this._delegate.add(new i.CloudCollection),this._state=m.INITIALIZED}get type(){return M.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 i.PointPrimitiveCollection),this._labels=this._delegate.add(new i.LabelCollection),this._billboards=this._delegate.add(new i.BillboardCollection),this._polylines=this._delegate.add(new i.PolylineCollection),this._clouds=this._delegate.add(new i.CloudCollection),this._cache={},this._state=m.CLEARED,this}};M.registerType("primitive");var bh=_a;var ga=class extends M{constructor(e,t,r){super(e),this._delegate=i.ImageryLayer.fromProviderAsync(t,r),this._state=m.INITIALIZED}get type(){return M.getLayerType("raster-tile")}};M.registerType("raster-tile");var Sh=ga;var ya=class extends M{constructor(e){super(e),this._delegate=new i.PrimitiveCollection,this._state=m.INITIALIZED}get type(){return M.getLayerType("tileset")}clear(){return this._delegate.removeAll(),this._cache={},this._state=m.CLEARED,this}};M.registerType("tileset");var Rt=ya;var va=class extends rt{constructor(e,t,r={}){if(!t)throw new Error("TopoJsonLayer\uFF1Athe url invalid");super(e,t,r),this._state=m.INITIALIZED}get type(){return M.getLayerType("topojson")}};rt.registerType("topojson");var Ih=va;var wa=class extends M{constructor(e){super(e),this._delegate=void 0,this._helpPrimitive=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}}),asynchronous:!0,show:!1}),this._state=m.INITIALIZED}get type(){return M.getLayerType("camera_video")}get show(){return this._show}set show(e){this._show=e,Object.keys(this._cache).forEach(t=>{this._cache[t].enabled=this._show})}_onAdd(e){this._viewer=e,this._delegate=this._viewer.scene.postProcessStages,Object.keys(this._cache).forEach(t=>{this._delegate.add(this._cache[t].delegate)}),this._viewer.scene.primitives.add(this._helpPrimitive),this._state=m.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=m.REMOVED}_updateHelpPrimitive(e,t){if(!e)return!1;this._helpPrimitive.geometryInstances=new i.GeometryInstance({geometry:new i.FrustumOutlineGeometry({origin:e.positionWC,orientation:re.getCameraOrientation(e),frustum:e.frustum}),attributes:{color:i.ColorGeometryInstanceAttribute.fromColor(t)}}),this._helpPrimitive.appearance=new i.PerInstanceColorAppearance({translucent:!1,flat:!0})}showHelp(e,t,r){return this._helpPrimitive.show=e,e&&this._updateHelpPrimitive(t.camera,r||i.Color.GREEN),this}clear(){return Object.keys(this._cache).forEach(e=>{this._delegate.remove(this._cache[e].delegate)}),this._cache={},this._state=m.CLEARED,this}};M.registerType("CameraVideo");var Dh=wa;var xa=class extends M{constructor(e){super(e),this._delegate=new i.CustomDataSource(e),this._helpPrimitive=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:{}}),asynchronous:!0,show:!1}),this._state=m.INITIALIZED}get type(){return M.getLayerType("plane_video")}get show(){return this._show}set show(e){this._show=e,Object.keys(this._cache).forEach(t=>{this._cache[t].enabled=this._show})}_addedHook(){this._viewer.scene.primitives.add(this._helpPrimitive)}_removedHook(){this._viewer.scene.primitives.remove(this._helpPrimitive)}_updateHelpPrimitive(e,t){if(!e)return!1;this._helpPrimitive.geometryInstances=new i.GeometryInstance({geometry:new i.FrustumOutlineGeometry({origin:e.positionWC,orientation:re.getCameraOrientation(e),frustum:e.frustum}),attributes:{color:i.ColorGeometryInstanceAttribute.fromColor(t)}}),this._helpPrimitive.appearance=new i.PerInstanceColorAppearance({translucent:!1,flat:!0})}showHelp(e,t,r){return this._helpPrimitive.show=e,e&&this._updateHelpPrimitive(t.camera,r||i.Color.GREEN),this}clear(){return Object.keys(this._cache).forEach(e=>{this._delegate.remove(this._cache[e].delegate)}),this._cache={},this._state=m.CLEARED,this}};M.registerType("PlaneVideo");var Lh=xa;var Ca=class{constructor(e,t){this.u=e,this.v=t,this.m=this.magnitude()}magnitude(){return Math.sqrt(this.u*this.u+this.v*this.v)}directionTo(){let t=Math.atan2(this.u,this.v)*(180/Math.PI);return t<0&&(t+=360),t}directionFrom(){return(this.directionTo()+180)%360}},Ta=Ca;var Ea=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 t=Math.ceil((this.xmax-this.xmin)/e.deltaX),r=Math.ceil((this.ymax-this.ymin)/e.deltaY);(t!==this.cols||r!==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=[],t=0,r=this,s=r.rows,a=r.cols,o=r.us,n=r.vs;for(let h=0;h<s;h++){let c=[];for(let p=0;p<a;p++,t++){let f=o[t],y=n[t],_=this.isValid(f)&&this.isValid(y);c[p]=_?new Ta(f,y):null}this.isContinuous&&c.push(c[0]),e[h]=c}return e}release(){this.grid=[]}extent(){return[this.xmin,this.ymin,this.xmax,this.ymax]}bilinearInterpolateVector(e,t,r,s,a,o){let n=1-e,h=1-t,c=n*h,p=e*h,f=n*t,y=e*t,_=r.u*c+s.u*p+a.u*f+o.u*y,d=r.v*c+s.v*p+a.v*f+o.v*y;return new Ta(_,d)}calculateRange(){if(!this.grid||!this.grid[0])return;let e=this.grid.length,t=this.grid[0].length,r,s;for(let a=0;a<e;a++)for(let o=0;o<t;o++){let n=this.grid[a][o];if(n!==null){let h=n.m||n.magnitude();r===void 0?r=h:s===void 0?(s=h,r=Math.min(r,s),s=Math.max(r,s)):(r=Math.min(h,r),s=Math.max(h,s))}}return[r,s]}isValid(e){return e!=null}getWrappedLongitudes(){let e=this.xmin,t=this.xmax;return this.wrappedX&&(this.isContinuous?(e=-180,t=180):(t=this.xmax-360,e=this.xmin-360)),[e,t]}contains(e,t){let r=this.getWrappedLongitudes(),s=r[0],a=r[1],o=e>=s&&e<=a,n;return this.deltaY>=0?n=t>=this.ymin&&t<=this.ymax:n=t>=this.ymax&&t<=this.ymin,o&&n}floorMod(e,t){return e-t*Math.floor(e/t)}getDecimalIndexes(e,t){let r=this.floorMod(e-this.xmin,360)/this.deltaX,s=(this.ymax-t)/this.deltaY;return[r,s]}valueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=Math.floor(r[0]),a=Math.floor(r[1]),o=this.clampColumnIndex(s),n=this.clampRowIndex(a);return this.valueAtIndexes(o,n)}interpolatedValueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=r[0],a=r[1];return this.interpolatePoint(s,a)}hasValueAt(e,t){return this.valueAt(e,t)!==null}interpolatePoint(e,t){let r=this.getFourSurroundingIndexes(e,t),s=r[0],a=r[1],o=r[2],n=r[3],h=this.getFourSurroundingValues(s,a,o,n);if(h){let c=h[0],p=h[1],f=h[2],y=h[3];return this.bilinearInterpolateVector(e-s,t-o,c,p,f,y)}return null}clampColumnIndex(e){let t=e;e<0&&(t=0);let r=this.cols-1;return e>r&&(t=r),t}clampRowIndex(e){let t=e;e<0&&(t=0);let r=this.rows-1;return e>r&&(t=r),t}getFourSurroundingIndexes(e,t){let r=Math.floor(e),s=r+1;this.isContinuous&&s>=this.cols&&(s=0),s=this.clampColumnIndex(s);let a=this.clampRowIndex(Math.floor(t)),o=this.clampRowIndex(a+1);return[r,s,a,o]}getFourSurroundingValues(e,t,r,s){let a;if(a=this.grid[r]){let o=a[e],n=a[t];if(this.isValid(o)&&this.isValid(n)&&(a=this.grid[s])){let h=a[e],c=a[t];if(this.isValid(h)&&this.isValid(c))return[o,n,h,c]}}return null}valueAtIndexes(e,t){return this.grid[t][e]}lonLatAtIndexes(e,t){let r=this.longitudeAtX(e),s=this.latitudeAtY(t);return[r,s]}longitudeAtX(e){let t=this.deltaX/2,r=this.xmin+t+e*this.deltaX;return this.wrappedX&&(r=r>180?r-360:r),r}latitudeAtY(e){let t=this.deltaY/2;return this.ymax-t-e*this.deltaY}randomize(e,t,r,s){e===void 0&&(e={});let a=Math.random()*(t||this.cols)|0,o=Math.random()*(r||this.rows)|0,n=s([a,o]);return n!==null?(e.x=n[0],e.y=n[1]):(e.x=this.longitudeAtX(a),e.y=this.latitudeAtY(o)),e}checkFields(){return this.isFields}},Rh=Ea;var Pa=class{constructor(e){this.options={},this.particles=[],this.ctx=e,this.animationLoop=void 0,this.animate=this.animate.bind(this)}_indexFor(e,t,r,s){return Math.max(0,Math.min(s.length-1,Math.round((e-t)/(r-t)*(s.length-1))))}_moveParticles(){if(!this.particles||!this.particles.length)return;let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=this.particles,s=this.options.maxAge,a=typeof this.options.velocityScale=="function"?this.options.velocityScale():this.options.velocityScale;for(let o=0;o<r.length;o++){let n=r[o];n.age>s&&(n.age=0,this.field.randomize(n,e,t,this.unProject));let h=n.x,c=n.y,p=this.field.interpolatedValueAt(h,c);if(p===null)n.age=s;else{let f=h+p.u*a,y=c+p.v*a;this.field.hasValueAt(f,y)?(n.xt=f,n.yt=y,n.m=p.m):(n.x=f,n.y=y,n.age=s)}n.age++}}_drawParticles(){if(!this.particles||!this.particles.length)return;let e=this.particles,t=this.ctx.globalCompositeOperation;this.ctx.globalCompositeOperation="destination-in",this.ctx.fillRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.globalCompositeOperation=t,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 r=0,s=e.length;if(this.field&&s>0){let a,o;if(this.options.minVelocity&&this.options.maxVelocity)a=this.options.minVelocity,o=this.options.maxVelocity;else{let n=this.field.range;a=n[0],o=n[1]}for(;r<s;r++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[r],a,o)}}_drawPixelParticle(e,t,r){let s=[e.x,e.y],a=[e.xt,e.yt],o=e.xt-e.x,n=e.yt-e.y;o*o+n*n>20*20||a&&s&&a[0]&&a[1]&&s[0]&&s[1]&&e.age<=this.options.maxAge&&this._drawStroke(s,a,e,t,r)}_drawCoordsParticle(e,t,r){let s=[e.x,e.y],a=[e.xt,e.yt];if(a&&s&&a[0]&&a[1]&&s[0]&&s[1]&&this.intersectsCoordinate(a)&&e.age<=this.options.maxAge){let o=this.project(s),n=this.project(a);this._drawStroke(o,n,e,t,r)}}_drawStroke(e,t,r,s,a){if(e&&t){if(this.ctx.beginPath(),this.ctx.moveTo(e[0],e[1]),this.ctx.lineTo(t[0],t[1]),typeof this.options.colorScale=="function")this.ctx.strokeStyle=this.options.colorScale(r.m);else if(Array.isArray(this.options.colorScale)){let o=this._indexFor(r.m,s,a,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[o]}typeof this.options.lineWidth=="function"&&(this.ctx.lineWidth=this.options.lineWidth(r.m)),r.x=r.xt,r.y=r.yt,this.ctx.stroke()}}_prepareParticlePaths(){let e=this.ctx.canvas.width,t=this.ctx.canvas.height,r=typeof this.options.paths=="function"?this.options.paths(this):this.options.paths,s=[];if(!this.field)return[];for(let a=0;a<r;a++)s.push(this.field.randomize({age:Math.floor(Math.random()*this.options.maxAge)},e,t,this.unProject));return s}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(),t=e-this._then;t>this.options.frameRate&&(this._then=e-t%this.options.frameRate,this.render())}setData(e){return this.field=e,this}setOptions(e){var t,r,s,a;return this.options=e,!((t=this.options)!=null&&t.maxAge)&&((r=this.options)!=null&&r.particleAge)&&(this.options.maxAge=Number(this.options.particleAge)),!((s=this.options)!=null&&s.paths)&&((a=this.options)!=null&&a.particleMultiplier)&&(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}},Oh=Pa;var Nm={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:1/25,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},Ma=class extends M{constructor(e,t={}){super(e),this._options={...Nm,...t},this._data=void 0,this._canvas=document.createElement("canvas"),this._state=m.INITIALIZED}get type(){return M.getLayerType("wind")}get show(){return this._show}set show(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}_formatData(e){let t,r;if(e.forEach(function(a){switch(a.header.parameterCategory+","+a.header.parameterNumber){case"1,2":case"2,2":t=a;break;case"1,3":case"2,3":r=a;break}}),!r||!t)return;let s=t.header;return new Rh({xmin:s.lo1,ymin:s.la1,xmax:s.lo2,ymax:s.la2,deltaX:s.dx,deltaY:s.dy,cols:s.nx,rows:s.ny,us:t.data,vs:r.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:t}=this._viewer.canvas;this._canvas.width=e,this._canvas.height=t,this._canvas.style.width=e+"px",this._canvas.style.height=t+"px",this._viewer.layerContainer.appendChild(this._canvas)}_addedHook(){let e=this._viewer.scene,t=this._viewer.camera,r=i.Ellipsoid.WGS84;this._delegate.intersectsCoordinate=s=>{if(e.mode===i.SceneMode.SCENE3D){let a=new i.EllipsoidalOccluder(r,t.position),o=i.Cartesian3.fromDegrees(s[0],s[1]);return a.isPointVisible(o)}else if(e.mode===i.SceneMode.SCENE2D)return!(s[0]===-180||s[0]===180);return!0},this._delegate.project=s=>{let a=i.Cartesian3.fromDegrees(s[0],s[1]),o=i.SceneTransforms.worldToWindowCoordinates(e,a);return[o.x,o.y]},this._delegate.unProject=s=>{let a=new i.Cartesian2(s[0],s[1]),o;if(e.mode===i.SceneMode.SCENE3D?o=e.globe.pick(t.getPickRay(a),e):o=e.camera.pickEllipsoid(a,r),!o)return null;let n=r.cartesianToCartographic(o),h=i.Math.toDegrees(n.latitude);return[i.Math.toDegrees(n.longitude),h]}}_onAdd(e){this._viewer=e,this._mountCanvas();let t=this._canvas.getContext("2d");this._delegate||(this._delegate=new Oh(t),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,t){return e&&e.checkFields&&e.checkFields()?this._data=e:Array.isArray(e)&&(this._data=this._formatData(e)),this._delegate&&(this._delegate.setData(this._data),t&&(this._options={...this._options,...t},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}};M.registerType("wind");var kh=Ma;var zh=`/**\r
|
|
247
|
-
* @license\r
|
|
248
|
-
* Cellular noise ("Worley noise") in 2D in GLSL.\r
|
|
249
|
-
* Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved.\r
|
|
250
|
-
* This code is released under the conditions of the MIT license.\r
|
|
251
|
-
* See LICENSE file for details.\r
|
|
252
|
-
*/\r
|
|
253
|
-
\r
|
|
254
|
-
//#ifdef GL_OES_standard_derivatives\r
|
|
255
|
-
// #extension GL_OES_standard_derivatives : enable\r
|
|
256
|
-
//#endif\r
|
|
257
|
-
//\r
|
|
258
|
-
//float aastep (float threshold , float value)\r
|
|
259
|
-
//{\r
|
|
260
|
-
// float afwidth = 0.7 * length ( vec2 ( dFdx ( value ), dFdy ( value )));\r
|
|
261
|
-
// return smoothstep ( threshold - afwidth , threshold + afwidth , value );\r
|
|
262
|
-
//}\r
|
|
263
|
-
\r
|
|
264
|
-
// Permutation polynomial: (34x^2 + x) mod 289\r
|
|
265
|
-
vec3 _czm_permute289(vec3 x)\r
|
|
266
|
-
{\r
|
|
267
|
-
return mod((34.0 * x + 1.0) * x, 289.0);\r
|
|
268
|
-
}\r
|
|
269
|
-
\r
|
|
270
|
-
/**\r
|
|
271
|
-
* DOC_TBA\r
|
|
272
|
-
*\r
|
|
273
|
-
* Implemented by Stefan Gustavson, and distributed under the MIT License. {@link http://openglinsights.git.sourceforge.net/git/gitweb.cgi?p=openglinsights/openglinsights;a=tree;f=proceduraltextures}\r
|
|
274
|
-
*\r
|
|
275
|
-
* @name czm_cellular\r
|
|
276
|
-
* @glslFunction\r
|
|
277
|
-
*\r
|
|
278
|
-
* @see Stefan Gustavson's chapter, <i>Procedural Textures in GLSL</i>, in <a href="http://www.openglinsights.com/">OpenGL Insights</a>.\r
|
|
279
|
-
*/\r
|
|
280
|
-
vec2 czm_cellular(vec2 P)\r
|
|
281
|
-
// Cellular noise, returning F1 and F2 in a vec2.\r
|
|
282
|
-
// Standard 3x3 search window for good F1 and F2 values\r
|
|
283
|
-
{\r
|
|
284
|
-
#define K 0.142857142857// 1/7\r
|
|
285
|
-
#define Ko 0.428571428571// 3/7\r
|
|
286
|
-
#define jitter 1.0// Less gives more regular pattern\r
|
|
287
|
-
vec2 Pi = mod(floor(P), 289.0);\r
|
|
288
|
-
vec2 Pf = fract(P);\r
|
|
289
|
-
vec3 oi = vec3(-1.0, 0.0, 1.0);\r
|
|
290
|
-
vec3 of = vec3(-0.5, 0.5, 1.5);\r
|
|
291
|
-
vec3 px = _czm_permute289(Pi.x + oi);\r
|
|
292
|
-
vec3 p = _czm_permute289(px.x + Pi.y + oi);// p11, p12, p13\r
|
|
293
|
-
vec3 ox = fract(p*K) - Ko;\r
|
|
294
|
-
vec3 oy = mod(floor(p*K), 7.0)*K - Ko;\r
|
|
295
|
-
vec3 dx = Pf.x + 0.5 + jitter*ox;\r
|
|
296
|
-
vec3 dy = Pf.y - of + jitter*oy;\r
|
|
297
|
-
vec3 d1 = dx * dx + dy * dy;// d11, d12 and d13, squared\r
|
|
298
|
-
p = _czm_permute289(px.y + Pi.y + oi);// p21, p22, p23\r
|
|
299
|
-
ox = fract(p*K) - Ko;\r
|
|
300
|
-
oy = mod(floor(p*K), 7.0)*K - Ko;\r
|
|
301
|
-
dx = Pf.x - 0.5 + jitter*ox;\r
|
|
302
|
-
dy = Pf.y - of + jitter*oy;\r
|
|
303
|
-
vec3 d2 = dx * dx + dy * dy;// d21, d22 and d23, squared\r
|
|
304
|
-
p = _czm_permute289(px.z + Pi.y + oi);// p31, p32, p33\r
|
|
305
|
-
ox = fract(p*K) - Ko;\r
|
|
306
|
-
oy = mod(floor(p*K), 7.0)*K - Ko;\r
|
|
307
|
-
dx = Pf.x - 1.5 + jitter*ox;\r
|
|
308
|
-
dy = Pf.y - of + jitter*oy;\r
|
|
309
|
-
vec3 d3 = dx * dx + dy * dy;// d31, d32 and d33, squared\r
|
|
310
|
-
// Sort out the two smallest distances (F1, F2)\r
|
|
311
|
-
vec3 d1a = min(d1, d2);\r
|
|
312
|
-
d2 = max(d1, d2);// Swap to keep candidates for F2\r
|
|
313
|
-
d2 = min(d2, d3);// neither F1 nor F2 are now in d3\r
|
|
314
|
-
d1 = min(d1a, d2);// F1 is now in d1\r
|
|
315
|
-
d2 = max(d1a, d2);// Swap to keep candidates for F2\r
|
|
316
|
-
d1.xy = (d1.x < d1.y) ? d1.xy : d1.yx;// Swap if smaller\r
|
|
317
|
-
d1.xz = (d1.x < d1.z) ? d1.xz : d1.zx;// F1 is in d1.x\r
|
|
318
|
-
d1.yz = min(d1.yz, d2.yz);// F2 is now not in d2.yz\r
|
|
319
|
-
d1.y = min(d1.y, d1.z);// nor in d1.z\r
|
|
320
|
-
d1.y = min(d1.y, d2.x);// F2 is in d1.y, we're done.\r
|
|
321
|
-
return sqrt(d1.xy);\r
|
|
322
|
-
}\r
|
|
323
|
-
`;var Nh=`/**\r
|
|
324
|
-
* @license\r
|
|
325
|
-
* Description : Array and textureless GLSL 2D/3D/4D simplex\r
|
|
326
|
-
* noise functions.\r
|
|
327
|
-
* Author : Ian McEwan, Ashima Arts.\r
|
|
328
|
-
* Maintainer : ijm\r
|
|
329
|
-
* Lastmod : 20110822 (ijm)\r
|
|
330
|
-
* License : Copyright (C) 2011 Ashima Arts. All rights reserved.\r
|
|
331
|
-
* Distributed under the MIT License. See LICENSE file.\r
|
|
332
|
-
* https://github.com/ashima/webgl-noise\r
|
|
333
|
-
*/\r
|
|
334
|
-
\r
|
|
335
|
-
vec4 _czm_mod289(vec4 x)\r
|
|
336
|
-
{\r
|
|
337
|
-
return x - floor(x * (1.0 / 289.0)) * 289.0;\r
|
|
338
|
-
}\r
|
|
339
|
-
\r
|
|
340
|
-
vec3 _czm_mod289(vec3 x)\r
|
|
341
|
-
{\r
|
|
342
|
-
return x - floor(x * (1.0 / 289.0)) * 289.0;\r
|
|
343
|
-
}\r
|
|
344
|
-
\r
|
|
345
|
-
vec2 _czm_mod289(vec2 x)\r
|
|
346
|
-
{\r
|
|
347
|
-
return x - floor(x * (1.0 / 289.0)) * 289.0;\r
|
|
348
|
-
}\r
|
|
349
|
-
\r
|
|
350
|
-
float _czm_mod289(float x)\r
|
|
351
|
-
{\r
|
|
352
|
-
return x - floor(x * (1.0 / 289.0)) * 289.0;\r
|
|
353
|
-
}\r
|
|
354
|
-
\r
|
|
355
|
-
vec4 _czm_permute(vec4 x)\r
|
|
356
|
-
{\r
|
|
357
|
-
return _czm_mod289(((x*34.0)+1.0)*x);\r
|
|
358
|
-
}\r
|
|
359
|
-
\r
|
|
360
|
-
vec3 _czm_permute(vec3 x)\r
|
|
361
|
-
{\r
|
|
362
|
-
return _czm_mod289(((x*34.0)+1.0)*x);\r
|
|
363
|
-
}\r
|
|
364
|
-
\r
|
|
365
|
-
float _czm_permute(float x)\r
|
|
366
|
-
{\r
|
|
367
|
-
return _czm_mod289(((x*34.0)+1.0)*x);\r
|
|
368
|
-
}\r
|
|
369
|
-
\r
|
|
370
|
-
vec4 _czm_taylorInvSqrt(vec4 r)\r
|
|
371
|
-
{\r
|
|
372
|
-
return 1.79284291400159 - 0.85373472095314 * r;\r
|
|
373
|
-
}\r
|
|
374
|
-
\r
|
|
375
|
-
float _czm_taylorInvSqrt(float r)\r
|
|
376
|
-
{\r
|
|
377
|
-
return 1.79284291400159 - 0.85373472095314 * r;\r
|
|
378
|
-
}\r
|
|
379
|
-
\r
|
|
380
|
-
vec4 _czm_grad4(float j, vec4 ip)\r
|
|
381
|
-
{\r
|
|
382
|
-
const vec4 ones = vec4(1.0, 1.0, 1.0, -1.0);\r
|
|
383
|
-
vec4 p, s;\r
|
|
384
|
-
\r
|
|
385
|
-
p.xyz = floor(fract (vec3(j) * ip.xyz) * 7.0) * ip.z - 1.0;\r
|
|
386
|
-
p.w = 1.5 - dot(abs(p.xyz), ones.xyz);\r
|
|
387
|
-
s = vec4(lessThan(p, vec4(0.0)));\r
|
|
388
|
-
p.xyz = p.xyz + (s.xyz*2.0 - 1.0) * s.www;\r
|
|
389
|
-
\r
|
|
390
|
-
return p;\r
|
|
391
|
-
}\r
|
|
392
|
-
\r
|
|
393
|
-
/**\r
|
|
394
|
-
* DOC_TBA\r
|
|
395
|
-
*\r
|
|
396
|
-
* Implemented by Ian McEwan, Ashima Arts, and distributed under the MIT License. {@link https://github.com/ashima/webgl-noise}\r
|
|
397
|
-
*\r
|
|
398
|
-
* @name czm_snoise\r
|
|
399
|
-
* @glslFunction\r
|
|
400
|
-
*\r
|
|
401
|
-
* @see <a href="https://github.com/ashima/webgl-noise">https://github.com/ashima/webgl-noise</a>\r
|
|
402
|
-
* @see Stefan Gustavson's paper <a href="http://www.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf">Simplex noise demystified</a>\r
|
|
403
|
-
*/\r
|
|
404
|
-
float czm_snoise(vec2 v)\r
|
|
405
|
-
{\r
|
|
406
|
-
const vec4 C = vec4(0.211324865405187, // (3.0-sqrt(3.0))/6.0\r
|
|
407
|
-
0.366025403784439, // 0.5*(sqrt(3.0)-1.0)\r
|
|
408
|
-
-0.577350269189626, // -1.0 + 2.0 * C.x\r
|
|
409
|
-
0.024390243902439);// 1.0 / 41.0\r
|
|
410
|
-
// First corner\r
|
|
411
|
-
vec2 i = floor(v + dot(v, C.yy));\r
|
|
412
|
-
vec2 x0 = v - i + dot(i, C.xx);\r
|
|
413
|
-
\r
|
|
414
|
-
// Other corners\r
|
|
415
|
-
vec2 i1;\r
|
|
416
|
-
//i1.x = step( x0.y, x0.x ); // x0.x > x0.y ? 1.0 : 0.0\r
|
|
417
|
-
//i1.y = 1.0 - i1.x;\r
|
|
418
|
-
i1 = (x0.x > x0.y) ? vec2(1.0, 0.0) : vec2(0.0, 1.0);\r
|
|
419
|
-
// x0 = x0 - 0.0 + 0.0 * C.xx ;\r
|
|
420
|
-
// x1 = x0 - i1 + 1.0 * C.xx ;\r
|
|
421
|
-
// x2 = x0 - 1.0 + 2.0 * C.xx ;\r
|
|
422
|
-
vec4 x12 = x0.xyxy + C.xxzz;\r
|
|
423
|
-
x12.xy -= i1;\r
|
|
424
|
-
\r
|
|
425
|
-
// Permutations\r
|
|
426
|
-
i = _czm_mod289(i);// Avoid truncation effect in permutation\r
|
|
427
|
-
vec3 p = _czm_permute(_czm_permute(i.y + vec3(0.0, i1.y, 1.0)) + i.x + vec3(0.0, i1.x, 1.0));\r
|
|
428
|
-
\r
|
|
429
|
-
vec3 m = max(0.5 - vec3(dot(x0, x0), dot(x12.xy, x12.xy), dot(x12.zw, x12.zw)), 0.0);\r
|
|
430
|
-
m = m*m;\r
|
|
431
|
-
m = m*m;\r
|
|
432
|
-
\r
|
|
433
|
-
// Gradients: 41 points uniformly over a line, mapped onto a diamond.\r
|
|
434
|
-
// The ring size 17*17 = 289 is close to a multiple of 41 (41*7 = 287)\r
|
|
435
|
-
vec3 x = 2.0 * fract(p * C.www) - 1.0;\r
|
|
436
|
-
vec3 h = abs(x) - 0.5;\r
|
|
437
|
-
vec3 ox = floor(x + 0.5);\r
|
|
438
|
-
vec3 a0 = x - ox;\r
|
|
439
|
-
\r
|
|
440
|
-
// Normalise gradients implicitly by scaling m\r
|
|
441
|
-
// Approximation of: m *= inversesqrt( a0*a0 + h*h );\r
|
|
442
|
-
m *= 1.79284291400159 - 0.85373472095314 * (a0*a0 + h*h);\r
|
|
443
|
-
\r
|
|
444
|
-
// Compute final noise value at P\r
|
|
445
|
-
vec3 g;\r
|
|
446
|
-
g.x = a0.x * x0.x + h.x * x0.y;\r
|
|
447
|
-
g.yz = a0.yz * x12.xz + h.yz * x12.yw;\r
|
|
448
|
-
return 130.0 * dot(m, g);\r
|
|
449
|
-
}\r
|
|
450
|
-
\r
|
|
451
|
-
float czm_snoise(vec3 v)\r
|
|
452
|
-
{\r
|
|
453
|
-
const vec2 C = vec2(1.0/6.0, 1.0/3.0);\r
|
|
454
|
-
const vec4 D = vec4(0.0, 0.5, 1.0, 2.0);\r
|
|
455
|
-
\r
|
|
456
|
-
// First corner\r
|
|
457
|
-
vec3 i = floor(v + dot(v, C.yyy));\r
|
|
458
|
-
vec3 x0 = v - i + dot(i, C.xxx);\r
|
|
459
|
-
\r
|
|
460
|
-
// Other corners\r
|
|
461
|
-
vec3 g = step(x0.yzx, x0.xyz);\r
|
|
462
|
-
vec3 l = 1.0 - g;\r
|
|
463
|
-
vec3 i1 = min(g.xyz, l.zxy);\r
|
|
464
|
-
vec3 i2 = max(g.xyz, l.zxy);\r
|
|
465
|
-
\r
|
|
466
|
-
// x0 = x0 - 0.0 + 0.0 * C.xxx;\r
|
|
467
|
-
// x1 = x0 - i1 + 1.0 * C.xxx;\r
|
|
468
|
-
// x2 = x0 - i2 + 2.0 * C.xxx;\r
|
|
469
|
-
// x3 = x0 - 1.0 + 3.0 * C.xxx;\r
|
|
470
|
-
vec3 x1 = x0 - i1 + C.xxx;\r
|
|
471
|
-
vec3 x2 = x0 - i2 + C.yyy;// 2.0*C.x = 1/3 = C.y\r
|
|
472
|
-
vec3 x3 = x0 - D.yyy;// -1.0+3.0*C.x = -0.5 = -D.y\r
|
|
473
|
-
\r
|
|
474
|
-
// Permutations\r
|
|
475
|
-
i = _czm_mod289(i);\r
|
|
476
|
-
vec4 p = _czm_permute(_czm_permute(_czm_permute(\r
|
|
477
|
-
i.z + vec4(0.0, i1.z, i2.z, 1.0))\r
|
|
478
|
-
+ i.y + vec4(0.0, i1.y, i2.y, 1.0))\r
|
|
479
|
-
+ i.x + vec4(0.0, i1.x, i2.x, 1.0));\r
|
|
480
|
-
\r
|
|
481
|
-
// Gradients: 7x7 points over a square, mapped onto an octahedron.\r
|
|
482
|
-
// The ring size 17*17 = 289 is close to a multiple of 49 (49*6 = 294)\r
|
|
483
|
-
float n_ = 0.142857142857;// 1.0/7.0\r
|
|
484
|
-
vec3 ns = n_ * D.wyz - D.xzx;\r
|
|
485
|
-
\r
|
|
486
|
-
vec4 j = p - 49.0 * floor(p * ns.z * ns.z);// mod(p,7*7)\r
|
|
487
|
-
\r
|
|
488
|
-
vec4 x_ = floor(j * ns.z);\r
|
|
489
|
-
vec4 y_ = floor(j - 7.0 * x_);// mod(j,N)\r
|
|
490
|
-
\r
|
|
491
|
-
vec4 x = x_ *ns.x + ns.yyyy;\r
|
|
492
|
-
vec4 y = y_ *ns.x + ns.yyyy;\r
|
|
493
|
-
vec4 h = 1.0 - abs(x) - abs(y);\r
|
|
494
|
-
\r
|
|
495
|
-
vec4 b0 = vec4(x.xy, y.xy);\r
|
|
496
|
-
vec4 b1 = vec4(x.zw, y.zw);\r
|
|
497
|
-
\r
|
|
498
|
-
//vec4 s0 = vec4(lessThan(b0,0.0))*2.0 - 1.0;\r
|
|
499
|
-
//vec4 s1 = vec4(lessThan(b1,0.0))*2.0 - 1.0;\r
|
|
500
|
-
vec4 s0 = floor(b0)*2.0 + 1.0;\r
|
|
501
|
-
vec4 s1 = floor(b1)*2.0 + 1.0;\r
|
|
502
|
-
vec4 sh = -step(h, vec4(0.0));\r
|
|
503
|
-
\r
|
|
504
|
-
vec4 a0 = b0.xzyw + s0.xzyw*sh.xxyy;\r
|
|
505
|
-
vec4 a1 = b1.xzyw + s1.xzyw*sh.zzww;\r
|
|
506
|
-
\r
|
|
507
|
-
vec3 p0 = vec3(a0.xy, h.x);\r
|
|
508
|
-
vec3 p1 = vec3(a0.zw, h.y);\r
|
|
509
|
-
vec3 p2 = vec3(a1.xy, h.z);\r
|
|
510
|
-
vec3 p3 = vec3(a1.zw, h.w);\r
|
|
511
|
-
\r
|
|
512
|
-
//Normalise gradients\r
|
|
513
|
-
vec4 norm = _czm_taylorInvSqrt(vec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r
|
|
514
|
-
p0 *= norm.x;\r
|
|
515
|
-
p1 *= norm.y;\r
|
|
516
|
-
p2 *= norm.z;\r
|
|
517
|
-
p3 *= norm.w;\r
|
|
518
|
-
\r
|
|
519
|
-
// Mix final noise value\r
|
|
520
|
-
vec4 m = max(0.6 - vec4(dot(x0, x0), dot(x1, x1), dot(x2, x2), dot(x3, x3)), 0.0);\r
|
|
521
|
-
m = m * m;\r
|
|
522
|
-
return 42.0 * dot(m*m, vec4(dot(p0, x0), dot(p1, x1),\r
|
|
523
|
-
dot(p2, x2), dot(p3, x3)));\r
|
|
524
|
-
}\r
|
|
525
|
-
\r
|
|
526
|
-
float czm_snoise(vec4 v)\r
|
|
527
|
-
{\r
|
|
528
|
-
const vec4 C = vec4(0.138196601125011, // (5 - sqrt(5))/20 G4\r
|
|
529
|
-
0.276393202250021, // 2 * G4\r
|
|
530
|
-
0.414589803375032, // 3 * G4\r
|
|
531
|
-
-0.447213595499958);// -1 + 4 * G4\r
|
|
532
|
-
\r
|
|
533
|
-
// (sqrt(5) - 1)/4 = F4, used once below\r
|
|
534
|
-
#define F4 0.309016994374947451\r
|
|
535
|
-
\r
|
|
536
|
-
// First corner\r
|
|
537
|
-
vec4 i = floor(v + dot(v, vec4(F4)));\r
|
|
538
|
-
vec4 x0 = v - i + dot(i, C.xxxx);\r
|
|
539
|
-
\r
|
|
540
|
-
// Other corners\r
|
|
541
|
-
\r
|
|
542
|
-
// Rank sorting originally contributed by Bill Licea-Kane, AMD (formerly ATI)\r
|
|
543
|
-
vec4 i0;\r
|
|
544
|
-
vec3 isX = step(x0.yzw, x0.xxx);\r
|
|
545
|
-
vec3 isYZ = step(x0.zww, x0.yyz);\r
|
|
546
|
-
// i0.x = dot( isX, vec3( 1.0 ) );\r
|
|
547
|
-
i0.x = isX.x + isX.y + isX.z;\r
|
|
548
|
-
i0.yzw = 1.0 - isX;\r
|
|
549
|
-
// i0.y += dot( isYZ.xy, vec2( 1.0 ) );\r
|
|
550
|
-
i0.y += isYZ.x + isYZ.y;\r
|
|
551
|
-
i0.zw += 1.0 - isYZ.xy;\r
|
|
552
|
-
i0.z += isYZ.z;\r
|
|
553
|
-
i0.w += 1.0 - isYZ.z;\r
|
|
554
|
-
\r
|
|
555
|
-
// i0 now contains the unique values 0,1,2,3 in each channel\r
|
|
556
|
-
vec4 i3 = clamp(i0, 0.0, 1.0);\r
|
|
557
|
-
vec4 i2 = clamp(i0-1.0, 0.0, 1.0);\r
|
|
558
|
-
vec4 i1 = clamp(i0-2.0, 0.0, 1.0);\r
|
|
559
|
-
\r
|
|
560
|
-
// x0 = x0 - 0.0 + 0.0 * C.xxxx\r
|
|
561
|
-
// x1 = x0 - i1 + 1.0 * C.xxxx\r
|
|
562
|
-
// x2 = x0 - i2 + 2.0 * C.xxxx\r
|
|
563
|
-
// x3 = x0 - i3 + 3.0 * C.xxxx\r
|
|
564
|
-
// x4 = x0 - 1.0 + 4.0 * C.xxxx\r
|
|
565
|
-
vec4 x1 = x0 - i1 + C.xxxx;\r
|
|
566
|
-
vec4 x2 = x0 - i2 + C.yyyy;\r
|
|
567
|
-
vec4 x3 = x0 - i3 + C.zzzz;\r
|
|
568
|
-
vec4 x4 = x0 + C.wwww;\r
|
|
569
|
-
\r
|
|
570
|
-
// Permutations\r
|
|
571
|
-
i = _czm_mod289(i);\r
|
|
572
|
-
float j0 = _czm_permute(_czm_permute(_czm_permute(_czm_permute(i.w) + i.z) + i.y) + i.x);\r
|
|
573
|
-
vec4 j1 = _czm_permute(_czm_permute(_czm_permute(_czm_permute (\r
|
|
574
|
-
i.w + vec4(i1.w, i2.w, i3.w, 1.0))\r
|
|
575
|
-
+ i.z + vec4(i1.z, i2.z, i3.z, 1.0))\r
|
|
576
|
-
+ i.y + vec4(i1.y, i2.y, i3.y, 1.0))\r
|
|
577
|
-
+ i.x + vec4(i1.x, i2.x, i3.x, 1.0));\r
|
|
578
|
-
\r
|
|
579
|
-
// Gradients: 7x7x6 points over a cube, mapped onto a 4-cross polytope\r
|
|
580
|
-
// 7*7*6 = 294, which is close to the ring size 17*17 = 289.\r
|
|
581
|
-
vec4 ip = vec4(1.0/294.0, 1.0/49.0, 1.0/7.0, 0.0);\r
|
|
582
|
-
\r
|
|
583
|
-
vec4 p0 = _czm_grad4(j0, ip);\r
|
|
584
|
-
vec4 p1 = _czm_grad4(j1.x, ip);\r
|
|
585
|
-
vec4 p2 = _czm_grad4(j1.y, ip);\r
|
|
586
|
-
vec4 p3 = _czm_grad4(j1.z, ip);\r
|
|
587
|
-
vec4 p4 = _czm_grad4(j1.w, ip);\r
|
|
588
|
-
\r
|
|
589
|
-
// Normalise gradients\r
|
|
590
|
-
vec4 norm = _czm_taylorInvSqrt(vec4(dot(p0, p0), dot(p1, p1), dot(p2, p2), dot(p3, p3)));\r
|
|
591
|
-
p0 *= norm.x;\r
|
|
592
|
-
p1 *= norm.y;\r
|
|
593
|
-
p2 *= norm.z;\r
|
|
594
|
-
p3 *= norm.w;\r
|
|
595
|
-
p4 *= _czm_taylorInvSqrt(dot(p4, p4));\r
|
|
596
|
-
\r
|
|
597
|
-
// Mix contributions from the five corners\r
|
|
598
|
-
vec3 m0 = max(0.6 - vec3(dot(x0, x0), dot(x1, x1), dot(x2, x2)), 0.0);\r
|
|
599
|
-
vec2 m1 = max(0.6 - vec2(dot(x3, x3), dot(x4, x4)), 0.0);\r
|
|
600
|
-
m0 = m0 * m0;\r
|
|
601
|
-
m1 = m1 * m1;\r
|
|
602
|
-
return 49.0 * (dot(m0*m0, vec3(dot(p0, x0), dot(p1, x1), dot(p2, x2)))\r
|
|
603
|
-
+ dot(m1*m1, vec2(dot(p3, x3), dot(p4, x4))));\r
|
|
604
|
-
}\r
|
|
605
|
-
`;var Fh=`uniform vec4 asphaltColor;\r
|
|
606
|
-
uniform float bumpSize;\r
|
|
607
|
-
uniform float roughness;\r
|
|
608
|
-
\r
|
|
609
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
610
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
611
|
-
\r
|
|
612
|
-
// From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\r
|
|
613
|
-
//Main cellular pattern\r
|
|
614
|
-
vec4 color = asphaltColor;\r
|
|
615
|
-
vec2 st = materialInput.st;\r
|
|
616
|
-
vec2 F = czm_cellular(st / bumpSize);\r
|
|
617
|
-
color.rgb -= (F.x / F.y) * 0.1;\r
|
|
618
|
-
\r
|
|
619
|
-
//Extra bumps for roughness\r
|
|
620
|
-
float noise = czm_snoise(st / bumpSize);\r
|
|
621
|
-
noise = pow(noise, 5.0) * roughness;\r
|
|
622
|
-
color.rgb += noise;\r
|
|
623
|
-
\r
|
|
624
|
-
material.diffuse = color.rgb;\r
|
|
625
|
-
material.alpha = color.a;\r
|
|
626
|
-
\r
|
|
627
|
-
return material;\r
|
|
628
|
-
}\r
|
|
629
|
-
`;var Wh=`uniform vec4 lightColor;\r
|
|
630
|
-
uniform vec4 darkColor;\r
|
|
631
|
-
uniform float frequency;\r
|
|
632
|
-
\r
|
|
633
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
634
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
635
|
-
\r
|
|
636
|
-
// From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\r
|
|
637
|
-
vec2 F = czm_cellular(materialInput.st * frequency);\r
|
|
638
|
-
float t = 1.0 - F.x * F.x;\r
|
|
639
|
-
\r
|
|
640
|
-
vec4 color = mix(lightColor, darkColor, t);\r
|
|
641
|
-
material.diffuse = color.rgb;\r
|
|
642
|
-
material.alpha = color.a;\r
|
|
643
|
-
\r
|
|
644
|
-
return material;\r
|
|
645
|
-
}\r
|
|
646
|
-
`;var Gh=`uniform vec4 brickColor;\r
|
|
647
|
-
uniform vec4 mortarColor;\r
|
|
648
|
-
uniform vec2 brickSize;\r
|
|
649
|
-
uniform vec2 brickPct;\r
|
|
650
|
-
uniform float brickRoughness;\r
|
|
651
|
-
uniform float mortarRoughness;\r
|
|
652
|
-
\r
|
|
653
|
-
#define Integral(x, p) ((floor(x) * p) + max(fract(x) - (1.0 - p), 0.0))\r
|
|
654
|
-
\r
|
|
655
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
656
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
657
|
-
\r
|
|
658
|
-
// From OpenGL Shading Language (3rd edition) pg. 194, 501\r
|
|
659
|
-
vec2 st = materialInput.st;\r
|
|
660
|
-
vec2 position = st / brickSize;\r
|
|
661
|
-
if (fract(position.y * 0.5) > 0.5) {\r
|
|
662
|
-
position.x += 0.5;\r
|
|
663
|
-
}\r
|
|
664
|
-
\r
|
|
665
|
-
//calculate whether to use brick or mortar (does AA)\r
|
|
666
|
-
vec2 filterWidth = vec2(0.02);\r
|
|
667
|
-
vec2 useBrick = (Integral(position + filterWidth, brickPct) -\r
|
|
668
|
-
Integral(position, brickPct)) / filterWidth;\r
|
|
669
|
-
float useBrickFinal = useBrick.x * useBrick.y;\r
|
|
670
|
-
vec4 color = mix(mortarColor, brickColor, useBrickFinal);\r
|
|
671
|
-
\r
|
|
672
|
-
//Apply noise to brick\r
|
|
673
|
-
vec2 brickScaled = vec2(st.x / 0.1, st.y / 0.006);\r
|
|
674
|
-
float brickNoise = abs(czm_snoise(brickScaled) * brickRoughness / 5.0);\r
|
|
675
|
-
color.rg += brickNoise * useBrickFinal;\r
|
|
676
|
-
\r
|
|
677
|
-
//Apply noise to mortar\r
|
|
678
|
-
vec2 mortarScaled = st / 0.005;\r
|
|
679
|
-
float mortarNoise = max(czm_snoise(mortarScaled) * mortarRoughness, 0.0);\r
|
|
680
|
-
color.rgb += mortarNoise * (1.0 - useBrickFinal);\r
|
|
681
|
-
\r
|
|
682
|
-
material.diffuse = color.rgb;\r
|
|
683
|
-
material.alpha = color.a;\r
|
|
684
|
-
\r
|
|
685
|
-
return material;\r
|
|
686
|
-
}\r
|
|
687
|
-
`;var Hh=`uniform vec4 cementColor;\r
|
|
688
|
-
uniform float grainScale;\r
|
|
689
|
-
uniform float roughness;\r
|
|
690
|
-
\r
|
|
691
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
692
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
693
|
-
\r
|
|
694
|
-
float noise = czm_snoise(materialInput.st / grainScale);\r
|
|
695
|
-
noise = pow(noise, 5.0) * roughness;\r
|
|
696
|
-
\r
|
|
697
|
-
vec4 color = cementColor;\r
|
|
698
|
-
color.rgb += noise;\r
|
|
699
|
-
\r
|
|
700
|
-
material.diffuse = color.rgb;\r
|
|
701
|
-
material.alpha = color.a;\r
|
|
702
|
-
\r
|
|
703
|
-
return material;\r
|
|
704
|
-
}\r
|
|
705
|
-
`;var Bh=`uniform vec4 color;\r
|
|
706
|
-
uniform float time;\r
|
|
707
|
-
\r
|
|
708
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
709
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
710
|
-
float alpha = 1.0;\r
|
|
711
|
-
if (time != 1.0)\r
|
|
712
|
-
{\r
|
|
713
|
-
float t = 0.5 + (0.5 * czm_snoise(materialInput.str / (1.0 / 10.0)));// Scale [-1, 1] to [0, 1]\r
|
|
714
|
-
\r
|
|
715
|
-
if (t > time)\r
|
|
716
|
-
{\r
|
|
717
|
-
alpha = 0.0;\r
|
|
718
|
-
}\r
|
|
719
|
-
}\r
|
|
720
|
-
\r
|
|
721
|
-
material.diffuse = color.rgb;\r
|
|
722
|
-
material.alpha = color.a * alpha;\r
|
|
723
|
-
\r
|
|
724
|
-
return material;\r
|
|
725
|
-
}\r
|
|
726
|
-
`;var Uh=`uniform vec4 lightColor;\r
|
|
727
|
-
uniform vec4 darkColor;\r
|
|
728
|
-
uniform float frequency;\r
|
|
729
|
-
\r
|
|
730
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
731
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
732
|
-
\r
|
|
733
|
-
// From Stefan Gustavson's Procedural Textures in GLSL in OpenGL Insights\r
|
|
734
|
-
vec2 F = czm_cellular(materialInput.st * frequency);\r
|
|
735
|
-
float t = 0.1 + (F.y - F.x);\r
|
|
736
|
-
\r
|
|
737
|
-
vec4 color = mix(lightColor, darkColor, t);\r
|
|
738
|
-
material.diffuse = color.rgb;\r
|
|
739
|
-
material.alpha = color.a;\r
|
|
740
|
-
\r
|
|
741
|
-
return material;\r
|
|
742
|
-
}\r
|
|
743
|
-
`;var Vh=`czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
744
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
745
|
-
\r
|
|
746
|
-
vec3 normalWC = normalize(czm_inverseViewRotation * material.normal);\r
|
|
747
|
-
vec3 positionWC = normalize(czm_inverseViewRotation * materialInput.positionToEyeEC);\r
|
|
748
|
-
float cosAngIncidence = max(dot(normalWC, positionWC), 0.0);\r
|
|
749
|
-
\r
|
|
750
|
-
material.diffuse = mix(reflection.diffuse, refraction.diffuse, cosAngIncidence);\r
|
|
751
|
-
\r
|
|
752
|
-
return material;\r
|
|
753
|
-
}\r
|
|
754
|
-
`;var jh=`uniform vec4 grassColor;\r
|
|
755
|
-
uniform vec4 dirtColor;\r
|
|
756
|
-
uniform float patchiness;\r
|
|
757
|
-
\r
|
|
758
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
759
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
760
|
-
\r
|
|
761
|
-
vec2 st = materialInput.st;\r
|
|
762
|
-
float noise1 = (czm_snoise(st * patchiness * 1.0)) * 1.0;\r
|
|
763
|
-
float noise2 = (czm_snoise(st * patchiness * 2.0)) * 0.5;\r
|
|
764
|
-
float noise3 = (czm_snoise(st * patchiness * 4.0)) * 0.25;\r
|
|
765
|
-
float noise = sin(noise1 + noise2 + noise3) * 0.1;\r
|
|
766
|
-
\r
|
|
767
|
-
vec4 color = mix(grassColor, dirtColor, noise);\r
|
|
768
|
-
\r
|
|
769
|
-
//Make thatch patterns\r
|
|
770
|
-
float verticalNoise = czm_snoise(vec2(st.x * 100.0, st.y * 20.0)) * 0.02;\r
|
|
771
|
-
float horizontalNoise = czm_snoise(vec2(st.x * 20.0, st.y * 100.0)) * 0.02;\r
|
|
772
|
-
float stripeNoise = min(verticalNoise, horizontalNoise);\r
|
|
773
|
-
\r
|
|
774
|
-
color.rgb += stripeNoise;\r
|
|
775
|
-
\r
|
|
776
|
-
material.diffuse = color.rgb;\r
|
|
777
|
-
material.alpha = color.a;\r
|
|
778
|
-
\r
|
|
779
|
-
return material;\r
|
|
780
|
-
}\r
|
|
781
|
-
`;var Zh=`uniform samplerCube cubeMap;\r
|
|
782
|
-
\r
|
|
783
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
784
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
785
|
-
\r
|
|
786
|
-
vec3 normalWC = normalize(czm_inverseViewRotation * material.normal);\r
|
|
787
|
-
vec3 positionWC = normalize(czm_inverseViewRotation * materialInput.positionToEyeEC);\r
|
|
788
|
-
vec3 reflectedWC = reflect(positionWC, normalWC);\r
|
|
789
|
-
material.diffuse = textureCube(cubeMap, reflectedWC).channels;\r
|
|
790
|
-
\r
|
|
791
|
-
return material;\r
|
|
792
|
-
}\r
|
|
793
|
-
`;var Yh=`uniform samplerCube cubeMap;\r
|
|
794
|
-
uniform float indexOfRefractionRatio;\r
|
|
795
|
-
\r
|
|
796
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
797
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
798
|
-
\r
|
|
799
|
-
vec3 normalWC = normalize(czm_inverseViewRotation * material.normal);\r
|
|
800
|
-
vec3 positionWC = normalize(czm_inverseViewRotation * materialInput.positionToEyeEC);\r
|
|
801
|
-
vec3 refractedWC = refract(positionWC, -normalWC, indexOfRefractionRatio);\r
|
|
802
|
-
material.diffuse = textureCube(cubeMap, refractedWC).channels;\r
|
|
803
|
-
\r
|
|
804
|
-
return material;\r
|
|
805
|
-
}\r
|
|
806
|
-
`;var Jh=`uniform vec4 lightColor;\r
|
|
807
|
-
uniform vec4 darkColor;\r
|
|
808
|
-
uniform float frequency;\r
|
|
809
|
-
\r
|
|
810
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
811
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
812
|
-
\r
|
|
813
|
-
vec3 scaled = materialInput.str * frequency;\r
|
|
814
|
-
float t = abs(czm_snoise(scaled));\r
|
|
815
|
-
\r
|
|
816
|
-
vec4 color = mix(lightColor, darkColor, t);\r
|
|
817
|
-
material.diffuse = color.rgb;\r
|
|
818
|
-
material.alpha = color.a;\r
|
|
819
|
-
\r
|
|
820
|
-
return material;\r
|
|
821
|
-
}\r
|
|
822
|
-
`;var qh=`uniform vec4 lightWoodColor;\r
|
|
823
|
-
uniform vec4 darkWoodColor;\r
|
|
824
|
-
uniform float ringFrequency;\r
|
|
825
|
-
uniform vec2 noiseScale;\r
|
|
826
|
-
uniform float grainFrequency;\r
|
|
827
|
-
\r
|
|
828
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
829
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
830
|
-
\r
|
|
831
|
-
//Based on wood shader from OpenGL Shading Language (3rd edition) pg. 455\r
|
|
832
|
-
vec2 st = materialInput.st;\r
|
|
833
|
-
\r
|
|
834
|
-
vec2 noisevec;\r
|
|
835
|
-
noisevec.x = czm_snoise(st * noiseScale.x);\r
|
|
836
|
-
noisevec.y = czm_snoise(st * noiseScale.y);\r
|
|
837
|
-
\r
|
|
838
|
-
vec2 location = st + noisevec;\r
|
|
839
|
-
float dist = sqrt(location.x * location.x + location.y * location.y);\r
|
|
840
|
-
dist *= ringFrequency;\r
|
|
841
|
-
\r
|
|
842
|
-
float r = fract(dist + noisevec[0] + noisevec[1]) * 2.0;\r
|
|
843
|
-
if (r > 1.0)\r
|
|
844
|
-
r = 2.0 - r;\r
|
|
845
|
-
\r
|
|
846
|
-
vec4 color = mix(lightWoodColor, darkWoodColor, r);\r
|
|
847
|
-
\r
|
|
848
|
-
//streaks\r
|
|
849
|
-
r = abs(czm_snoise(vec2(st.x * grainFrequency, st.y * grainFrequency * 0.02))) * 0.2;\r
|
|
850
|
-
color.rgb += lightWoodColor.rgb * r;\r
|
|
851
|
-
\r
|
|
852
|
-
material.diffuse = color.rgb;\r
|
|
853
|
-
material.alpha = color.a;\r
|
|
854
|
-
\r
|
|
855
|
-
return material;\r
|
|
856
|
-
}\r
|
|
857
|
-
`;i.ShaderSource._czmBuiltinsAndUniforms.czm_cellular=zh;i.ShaderSource._czmBuiltinsAndUniforms.czm_snoise=Nh;i.Material.AsphaltType="Asphalt";i.Material._materialCache.addMaterial(i.Material.AsphaltType,{fabric:{type:i.Material.AsphaltType,uniforms:{asphaltColor:new i.Color(.15,.15,.15,1),bumpSize:.02,roughness:.2},source:Fh},translucent:function(l){return l.uniforms.asphaltColor.alpha<1}});i.Material.BlobType="Blob";i.Material._materialCache.addMaterial(i.Material.BlobType,{fabric:{type:i.Material.BlobType,uniforms:{lightColor:new i.Color(1,1,1,.5),darkColor:new i.Color(0,0,1,.5),frequency:10},source:Wh},translucent:function(l){var e=l.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Material.BrickType="Brick";i.Material._materialCache.addMaterial(i.Material.BrickType,{fabric:{type:i.Material.BrickType,uniforms:{brickColor:new i.Color(.6,.3,.1,1),mortarColor:new i.Color(.8,.8,.7,1),brickSize:new i.Cartesian2(.3,.15),brickPct:new i.Cartesian2(.9,.85),brickRoughness:.2,mortarRoughness:.1},source:Gh},translucent:function(l){var e=l.uniforms;return e.brickColor.alpha<1||e.mortarColor.alpha<1}});i.Material.CementType="Cement";i.Material._materialCache.addMaterial(i.Material.CementType,{fabric:{type:i.Material.CementType,uniforms:{cementColor:new i.Color(.95,.95,.85,1),grainScale:.01,roughness:.3},source:Hh},translucent:function(l){return l.uniforms.cementColor.alpha<1}});i.Material.ErosionType="Erosion";i.Material._materialCache.addMaterial(i.Material.ErosionType,{fabric:{type:i.Material.ErosionType,uniforms:{color:new i.Color(1,0,0,.5),time:1},source:Bh},translucent:function(l){return l.uniforms.color.alpha<1}});i.Material.FacetType="Facet";i.Material._materialCache.addMaterial(i.Material.FacetType,{fabric:{type:i.Material.FacetType,uniforms:{lightColor:new i.Color(.25,.25,.25,.75),darkColor:new i.Color(.75,.75,.75,.75),frequency:10},source:Uh},translucent:function(l){var e=l.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Material.FresnelType="Fresnel";i.Material._materialCache.addMaterial(i.Material.FresnelType,{fabric:{type:i.Material.FresnelType,materials:{reflection:{type:i.Material.ReflectionType},refraction:{type:i.Material.RefractionType}},source:Vh},translucent:!1});i.Material.GrassType="Grass";i.Material._materialCache.addMaterial(i.Material.GrassType,{fabric:{type:i.Material.GrassType,uniforms:{grassColor:new i.Color(.25,.4,.1,1),dirtColor:new i.Color(.1,.1,.1,1),patchiness:1.5},source:jh},translucent:function(l){var e=l.uniforms;return e.grassColor.alpha<1||e.dirtColor.alpha<1}});i.Material.ReflectionType="Reflection";i.Material._materialCache.addMaterial(i.Material.ReflectionType,{fabric:{type:i.Material.ReflectionType,uniforms:{cubeMap:i.Material.DefaultCubeMapId,channels:"rgb"},source:Zh},translucent:!1});i.Material.RefractionType="Refraction";i.Material._materialCache.addMaterial(i.Material.RefractionType,{fabric:{type:i.Material.RefractionType,uniforms:{cubeMap:i.Material.DefaultCubeMapId,channels:"rgb",indexOfRefractionRatio:.9},source:Yh},translucent:!1});i.Material.TyeDyeType="TieDye";i.Material._materialCache.addMaterial(i.Material.TyeDyeType,{fabric:{type:i.Material.TyeDyeType,uniforms:{lightColor:new i.Color(1,1,0,.75),darkColor:new i.Color(1,0,0,.75),frequency:5},source:Jh},translucent:function(l){var e=l.uniforms;return e.lightColor.alpha<1||e.darkColor.alpha<0}});i.Material.WoodType="Wood";i.Material._materialCache.addMaterial(i.Material.WoodType,{fabric:{type:i.Material.WoodType,uniforms:{lightWoodColor:new i.Color(.6,.3,.1,1),darkWoodColor:new i.Color(.4,.2,.07,1),ringFrequency:3,noiseScale:new i.Cartesian2(.7,.5),grainFrequency:27},source:qh},translucent:function(l){let e=l.uniforms;return e.lightWoodColor.alpha<1||e.darkWoodColor.alpha<1}});var Xh=`uniform vec4 color;\r
|
|
858
|
-
uniform float speed;\r
|
|
859
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
860
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
861
|
-
vec2 st = materialInput.st;\r
|
|
862
|
-
vec2 center = vec2(0.5);\r
|
|
863
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
864
|
-
float r = 0.5 + sin(time) / 3.0;\r
|
|
865
|
-
float dis = distance(st, center);\r
|
|
866
|
-
float a = 0.0;\r
|
|
867
|
-
if (dis < r) {\r
|
|
868
|
-
a = 1.0 - smoothstep(0.0, r, dis);\r
|
|
869
|
-
}\r
|
|
870
|
-
material.alpha = pow(a, 10.0);\r
|
|
871
|
-
material.diffuse = color.rgb * a * 3.0;\r
|
|
872
|
-
return material;\r
|
|
873
|
-
}\r
|
|
874
|
-
`;var Qh=`uniform vec4 color;\r
|
|
875
|
-
uniform float speed;\r
|
|
876
|
-
\r
|
|
877
|
-
vec3 circlePing(float r, float innerTail, float frontierBorder, float timeResetSeconds, float radarPingSpeed, float fadeDistance){\r
|
|
878
|
-
float t = fract(czm_frameNumber * speed / 1000.0);\r
|
|
879
|
-
float time = mod(t, timeResetSeconds) * radarPingSpeed;\r
|
|
880
|
-
float circle;\r
|
|
881
|
-
circle += smoothstep(time - innerTail, time, r) * smoothstep(time + frontierBorder, time, r);\r
|
|
882
|
-
circle *= smoothstep(fadeDistance, 0.0, r);\r
|
|
883
|
-
return vec3(circle);\r
|
|
884
|
-
}\r
|
|
885
|
-
\r
|
|
886
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
887
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
888
|
-
vec2 st = materialInput.st * 2.0 - 1.0;\r
|
|
889
|
-
vec2 center = vec2(0.);\r
|
|
890
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
891
|
-
vec3 flagColor;\r
|
|
892
|
-
float r = length(st - center) / 4.;\r
|
|
893
|
-
flagColor += circlePing(r, 0.25, 0.025, 4.0, 0.3, 1.0) * color.rgb;\r
|
|
894
|
-
material.alpha = length(flagColor);\r
|
|
895
|
-
material.diffuse = flagColor.rgb;\r
|
|
896
|
-
return material;\r
|
|
897
|
-
}\r
|
|
898
|
-
`;var Kh=`uniform vec4 color;\r
|
|
899
|
-
uniform float speed;\r
|
|
900
|
-
\r
|
|
901
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
902
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
903
|
-
material.diffuse = 1.5 * color.rgb;\r
|
|
904
|
-
vec2 st = materialInput.st;\r
|
|
905
|
-
float dis = distance(st, vec2(0.5, 0.5));\r
|
|
906
|
-
float per = fract(czm_frameNumber * speed / 1000.0);\r
|
|
907
|
-
if (dis > per * 0.5){\r
|
|
908
|
-
material.alpha = color.a;\r
|
|
909
|
-
} else {\r
|
|
910
|
-
discard;\r
|
|
911
|
-
}\r
|
|
912
|
-
return material;\r
|
|
913
|
-
}\r
|
|
914
|
-
`;var $h=`uniform vec4 color;\r
|
|
915
|
-
uniform float speed;\r
|
|
916
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
917
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
918
|
-
vec2 st = materialInput.st * 2.0 - 1.0;\r
|
|
919
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
920
|
-
float r = length(st) * 1.2;\r
|
|
921
|
-
float a = pow(r, 2.0);\r
|
|
922
|
-
float b = sin(r * 0.8 - 1.6);\r
|
|
923
|
-
float c = sin(r - 0.010);\r
|
|
924
|
-
float s = sin(a - time * 2.0 + b) * c;\r
|
|
925
|
-
float d = abs(1.0 / (s * 10.8)) - 0.01;\r
|
|
926
|
-
material.alpha = pow(d, 10.0);\r
|
|
927
|
-
material.diffuse = color.rgb * d;\r
|
|
928
|
-
return material;\r
|
|
929
|
-
}\r
|
|
930
|
-
`;var ec=`uniform vec4 color;\r
|
|
931
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
932
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
933
|
-
vec2 st = materialInput.st;\r
|
|
934
|
-
vec2 center = st - vec2(0.5, 0.5);\r
|
|
935
|
-
float length = length(center) / 0.5;\r
|
|
936
|
-
float time = 1. - abs(czm_frameNumber / 360. - 0.5);\r
|
|
937
|
-
float param = 1. - step(length, 0.6);//\u5927\u4E8E0.6\u6A21\u7CCA\uFF0Crate = 0.6\r
|
|
938
|
-
float scale = param * length;// 0.6< length \u8FD4\u56DE0\uFF0C\u53CD\u4E4B\u8FD4\u56DE1.\r
|
|
939
|
-
float alpha = param * (1.0 - abs(scale - 0.8) / 0.2);// 0.8 < length \u8FD4\u56DE0\uFF0C\u53CD\u4E4B\u8FD4\u56DE1.\r
|
|
940
|
-
float param1 = step(length, 0.7);//\u5C0F\u4E8E0.5\u6A21\u7CCA\r
|
|
941
|
-
float scale1 = param1 * length;// 0.6< length \u8FD4\u56DE0\uFF0C\u53CD\u4E4B\u8FD4\u56DE1.\r
|
|
942
|
-
alpha += param1 * (1.0 - abs(scale1 - 0.35) / 0.35);// 0.8 < length \u8FD4\u56DE0\uFF0C\u53CD\u4E4B\u8FD4\u56DE1.\r
|
|
943
|
-
material.diffuse = color.rgb * vec3(color.a);\r
|
|
944
|
-
material.alpha = pow(alpha, 4.0);\r
|
|
945
|
-
return material;\r
|
|
946
|
-
}\r
|
|
947
|
-
`;var tc=`uniform vec4 color;\r
|
|
948
|
-
uniform sampler2D image;\r
|
|
949
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
950
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
951
|
-
vec2 st = materialInput.st;\r
|
|
952
|
-
vec2 center = st - vec2(0.5, 0.5);\r
|
|
953
|
-
float time = -czm_frameNumber * 3.1415926 / 180.;\r
|
|
954
|
-
float sin_t = sin(time);\r
|
|
955
|
-
float cos_t = cos(time);\r
|
|
956
|
-
vec2 center_rotate = vec2(center.s * cos_t - center.t * sin_t + 0.5, center.s * sin_t + center.t * cos_t + 0.5);\r
|
|
957
|
-
vec4 colorImage = texture(image, center_rotate);\r
|
|
958
|
-
vec3 temp = colorImage.rgb * color.rgb;\r
|
|
959
|
-
temp *= color.a;\r
|
|
960
|
-
material.diffuse = temp;\r
|
|
961
|
-
float length = 2. - length(center) / 0.5;\r
|
|
962
|
-
material.alpha = colorImage.a * pow(length, 0.5);\r
|
|
963
|
-
return material;\r
|
|
964
|
-
}\r
|
|
965
|
-
`;var ic=`uniform vec4 color;\r
|
|
966
|
-
uniform float speed;\r
|
|
967
|
-
\r
|
|
968
|
-
float circle(vec2 uv, float r, float blur) {\r
|
|
969
|
-
float d = length(uv) * 2.0;\r
|
|
970
|
-
float c = smoothstep(r+blur, r, d);\r
|
|
971
|
-
return c;\r
|
|
972
|
-
}\r
|
|
973
|
-
\r
|
|
974
|
-
czm_material czm_getMaterial(czm_materialInput materialInput)\r
|
|
975
|
-
{\r
|
|
976
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
977
|
-
vec2 st = materialInput.st - .5;\r
|
|
978
|
-
material.diffuse = color.rgb;\r
|
|
979
|
-
material.emission = vec3(0);\r
|
|
980
|
-
float t =fract(czm_frameNumber * speed / 1000.0);\r
|
|
981
|
-
float s = 0.3;\r
|
|
982
|
-
float radius1 = smoothstep(.0, s, t) * 0.5;\r
|
|
983
|
-
float alpha1 = circle(st, radius1, 0.01) * circle(st, radius1, -0.01);\r
|
|
984
|
-
float alpha2 = circle(st, radius1, 0.01 - radius1) * circle(st, radius1, 0.01);\r
|
|
985
|
-
float radius2 = 0.5 + smoothstep(s, 1.0, t) * 0.5;\r
|
|
986
|
-
float alpha3 = circle(st, radius1, radius2 + 0.01 - radius1) * circle(st, radius1, -0.01);\r
|
|
987
|
-
material.alpha = smoothstep(1.0, s, t) * (alpha1 + alpha2*0.1 + alpha3*0.1);\r
|
|
988
|
-
material.alpha *= color.a;\r
|
|
989
|
-
return material;\r
|
|
990
|
-
}\r
|
|
991
|
-
`;var rc=`uniform vec4 color;\r
|
|
992
|
-
uniform float speed;\r
|
|
993
|
-
\r
|
|
994
|
-
#define PI 3.14159265359\r
|
|
995
|
-
\r
|
|
996
|
-
vec2 rotate2D (vec2 _st, float _angle) {\r
|
|
997
|
-
_st = mat2(cos(_angle), -sin(_angle), sin(_angle), cos(_angle)) * _st;\r
|
|
998
|
-
return _st;\r
|
|
999
|
-
}\r
|
|
1000
|
-
\r
|
|
1001
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1002
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1003
|
-
vec2 st = materialInput.st * 2.0 - 1.0;\r
|
|
1004
|
-
st *= 1.6;\r
|
|
1005
|
-
float time = czm_frameNumber * speed / 1000.0;\r
|
|
1006
|
-
float r = length(st);\r
|
|
1007
|
-
float w = .3;\r
|
|
1008
|
-
st = rotate2D(st, (r*PI*6.-time*2.));\r
|
|
1009
|
-
float a = smoothstep(-w, .2, st.x) * smoothstep(w, .2, st.x);\r
|
|
1010
|
-
float b = abs(1./(sin(pow(r, 2.)*2.-time*1.3)*6.))*.4;\r
|
|
1011
|
-
material.alpha = a * b;\r
|
|
1012
|
-
material.diffuse = color.rgb * a * b * 3.0;\r
|
|
1013
|
-
return material;\r
|
|
1014
|
-
}\r
|
|
1015
|
-
`;var sc=`uniform vec4 color;\r
|
|
1016
|
-
uniform float speed;\r
|
|
1017
|
-
\r
|
|
1018
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1019
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1020
|
-
vec2 st = materialInput.st * 2.0 - 1.0;\r
|
|
1021
|
-
float time =czm_frameNumber * speed / 1000.0;\r
|
|
1022
|
-
float radius = length(st);\r
|
|
1023
|
-
float angle = atan(st.y/st.x);\r
|
|
1024
|
-
float radius1 = sin(time * 2.0) + sin(40.0*angle+time)*0.01;\r
|
|
1025
|
-
float radius2 = cos(time * 3.0);\r
|
|
1026
|
-
vec3 fragColor = 0.2 + 0.5 * cos(time + color.rgb + vec3(0, 2, 4));\r
|
|
1027
|
-
float inten1 = 1.0 - sqrt(abs(radius1 - radius));\r
|
|
1028
|
-
float inten2 = 1.0 - sqrt(abs(radius2 - radius));\r
|
|
1029
|
-
material.alpha = pow(inten1 + inten2, 5.0);\r
|
|
1030
|
-
material.diffuse = fragColor * (inten1 + inten2);\r
|
|
1031
|
-
return material;\r
|
|
1032
|
-
}\r
|
|
1033
|
-
`;var ac=`uniform vec4 color;\r
|
|
1034
|
-
uniform float speed;\r
|
|
1035
|
-
uniform float count;\r
|
|
1036
|
-
uniform float gradient;\r
|
|
1037
|
-
\r
|
|
1038
|
-
czm_material czm_getMaterial(czm_materialInput materialInput)\r
|
|
1039
|
-
{\r
|
|
1040
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1041
|
-
material.diffuse = 1.5 * color.rgb;\r
|
|
1042
|
-
vec2 st = materialInput.st;\r
|
|
1043
|
-
float dis = distance(st, vec2(0.5, 0.5));\r
|
|
1044
|
-
float per = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1045
|
-
if (count == 1.0){\r
|
|
1046
|
-
if (dis > per * 0.5){\r
|
|
1047
|
-
discard;\r
|
|
1048
|
-
} else {\r
|
|
1049
|
-
material.alpha = color.a * dis / per / 2.0;\r
|
|
1050
|
-
}\r
|
|
1051
|
-
} else {\r
|
|
1052
|
-
vec3 str = materialInput.str;\r
|
|
1053
|
-
if (abs(str.z) > 0.001){\r
|
|
1054
|
-
discard;\r
|
|
1055
|
-
}\r
|
|
1056
|
-
if (dis > 0.5){\r
|
|
1057
|
-
discard;\r
|
|
1058
|
-
} else {\r
|
|
1059
|
-
float perDis = 0.5 / count;\r
|
|
1060
|
-
float disNum;\r
|
|
1061
|
-
float bl = 0.0;\r
|
|
1062
|
-
for (int i = 0; i <= 999; i++){\r
|
|
1063
|
-
if (float(i) <= count){\r
|
|
1064
|
-
disNum = perDis * float(i) - dis + per / count;\r
|
|
1065
|
-
if (disNum > 0.0){\r
|
|
1066
|
-
if (disNum < perDis){\r
|
|
1067
|
-
bl = 1.0 - disNum / perDis;\r
|
|
1068
|
-
}\r
|
|
1069
|
-
else if (disNum - perDis < perDis){\r
|
|
1070
|
-
bl = 1.0 - abs(1.0 - disNum / perDis);\r
|
|
1071
|
-
}\r
|
|
1072
|
-
material.alpha = pow(bl, (1.0 + 10.0 * (1.0 - gradient)));\r
|
|
1073
|
-
}\r
|
|
1074
|
-
}\r
|
|
1075
|
-
}\r
|
|
1076
|
-
}\r
|
|
1077
|
-
}\r
|
|
1078
|
-
return material;\r
|
|
1079
|
-
}\r
|
|
1080
|
-
\r
|
|
1081
|
-
`;i.Material.CircleBlurType="CircleBlur";i.Material._materialCache.addMaterial(i.Material.CircleBlurType,{fabric:{type:i.Material.CircleBlurType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Xh},translucent:function(l){return!0}});i.Material.CircleDiffuseType="CircleDiffuse";i.Material._materialCache.addMaterial(i.Material.CircleDiffuseType,{fabric:{type:i.Material.CircleDiffuseType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Qh},translucent:function(l){return!0}});i.Material.CircleFadeType="CircleFade";i.Material._materialCache.addMaterial(i.Material.CircleFadeType,{fabric:{type:i.Material.CircleFadeType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:Kh},translucent:function(l){return!0}});i.Material.CirclePulseType="CirclePulse";i.Material._materialCache.addMaterial(i.Material.CirclePulseType,{fabric:{type:i.Material.CirclePulseType,uniforms:{color:new i.Color(1,0,0,.7),speed:12},source:$h},translucent:function(l){return!0}});i.Material.CircleRingType="CircleRing";i.Material._materialCache.addMaterial(i.Material.CircleRingType,{fabric:{type:i.Material.CircleRingType,uniforms:{color:new i.Color(1,0,0,.7)},source:ec},translucent:function(l){return!0}});i.Material.CircleRotateType="CircleRotate";i.Material._materialCache.addMaterial(i.Material.CircleRotateType,{fabric:{type:i.Material.CircleRotateType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId},source:tc},translucent:function(l){return!0}});i.Material.CircleScanType="CircleScan";i.Material._materialCache.addMaterial(i.Material.CircleScanType,{fabric:{type:i.Material.CircleScanType,uniforms:{color:new i.Color(1,0,0,.7),speed:1},source:ic},translucent:function(l){return!0}});i.Material.CircleSpiralType="CircleSpiral";i.Material._materialCache.addMaterial(i.Material.CircleSpiralType,{fabric:{type:i.Material.CircleSpiralType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:rc},translucent:function(l){return!0}});i.Material.CircleVaryType="CircleVary";i.Material._materialCache.addMaterial(i.Material.CircleVaryType,{fabric:{type:i.Material.CircleVaryType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:sc},translucent:function(l){return!0}});i.Material.CircleWaveType="CircleWave";i.Material._materialCache.addMaterial(i.Material.CircleWaveType,{fabric:{type:i.Material.CircleWaveType,uniforms:{color:new i.Color(1,0,0,.7),speed:3,count:1,gradient:.1},source:ac},translucent:function(l){return!0}});var oc=`uniform vec4 color;\r
|
|
1082
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1083
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1084
|
-
vec2 st = materialInput.st;\r
|
|
1085
|
-
float powerRatio = 1. / (fract(czm_frameNumber / 30.0) + 1.);\r
|
|
1086
|
-
float alpha = pow(1. - st.t, powerRatio);\r
|
|
1087
|
-
vec4 temp = vec4(color.rgb, alpha * color.a);\r
|
|
1088
|
-
material.diffuse = temp.rgb;\r
|
|
1089
|
-
material.alpha = temp.a;\r
|
|
1090
|
-
return material;\r
|
|
1091
|
-
}\r
|
|
1092
|
-
`;var nc=`uniform vec4 color;\r
|
|
1093
|
-
uniform sampler2D image;\r
|
|
1094
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1095
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1096
|
-
vec2 st = materialInput.st;\r
|
|
1097
|
-
float time = fract(czm_frameNumber / 90.);\r
|
|
1098
|
-
vec2 new_st = fract(st- vec2(time, time));\r
|
|
1099
|
-
vec4 colorImage = texture(image, new_st);\r
|
|
1100
|
-
vec3 diffuse = colorImage.rgb;\r
|
|
1101
|
-
float alpha = colorImage.a;\r
|
|
1102
|
-
diffuse *= color.rgb;\r
|
|
1103
|
-
alpha *= color.a;\r
|
|
1104
|
-
material.diffuse = diffuse;\r
|
|
1105
|
-
material.alpha = alpha * pow(1. - st.t, color.a);\r
|
|
1106
|
-
return material;\r
|
|
1107
|
-
}\r
|
|
1108
|
-
`;i.Material.CylinderFadeType="CylinderFade";i.Material._materialCache.addMaterial(i.Material.CylinderFadeType,{fabric:{type:i.Material.CylinderFadeType,uniforms:{color:new i.Color(1,0,0,.7)},source:oc},translucent:function(l){return!0}});i.Material.CylinderParticlesType="CylinderParticles";i.Material._materialCache.addMaterial(i.Material.CylinderParticlesType,{fabric:{type:i.Material.CylinderParticlesType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId},source:nc},translucent:function(l){return!0}});var lc=`uniform vec4 color;\r
|
|
1109
|
-
uniform float speed;\r
|
|
1110
|
-
\r
|
|
1111
|
-
#define pi 3.1415926535\r
|
|
1112
|
-
#define PI2RAD 0.01745329252\r
|
|
1113
|
-
#define TWO_PI (2. * PI)\r
|
|
1114
|
-
\r
|
|
1115
|
-
float rands(float p){\r
|
|
1116
|
-
return fract(sin(p) * 10000.0);\r
|
|
1117
|
-
}\r
|
|
1118
|
-
\r
|
|
1119
|
-
float noise(vec2 p){\r
|
|
1120
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1121
|
-
float t = time / 20000.0;\r
|
|
1122
|
-
if (t > 1.0) t -= floor(t);\r
|
|
1123
|
-
return rands(p.x * 14. + p.y * sin(t) * 0.5);\r
|
|
1124
|
-
}\r
|
|
1125
|
-
\r
|
|
1126
|
-
vec2 sw(vec2 p){\r
|
|
1127
|
-
return vec2(floor(p.x), floor(p.y));\r
|
|
1128
|
-
}\r
|
|
1129
|
-
\r
|
|
1130
|
-
vec2 se(vec2 p){\r
|
|
1131
|
-
return vec2(ceil(p.x), floor(p.y));\r
|
|
1132
|
-
}\r
|
|
1133
|
-
\r
|
|
1134
|
-
vec2 nw(vec2 p){\r
|
|
1135
|
-
return vec2(floor(p.x), ceil(p.y));\r
|
|
1136
|
-
}\r
|
|
1137
|
-
\r
|
|
1138
|
-
vec2 ne(vec2 p){\r
|
|
1139
|
-
return vec2(ceil(p.x), ceil(p.y));\r
|
|
1140
|
-
}\r
|
|
1141
|
-
\r
|
|
1142
|
-
float smoothNoise(vec2 p){\r
|
|
1143
|
-
vec2 inter = smoothstep(0.0, 1.0, fract(p));\r
|
|
1144
|
-
float s = mix(noise(sw(p)), noise(se(p)), inter.x);\r
|
|
1145
|
-
float n = mix(noise(nw(p)), noise(ne(p)), inter.x);\r
|
|
1146
|
-
return mix(s, n, inter.y);\r
|
|
1147
|
-
}\r
|
|
1148
|
-
\r
|
|
1149
|
-
float fbm(vec2 p){\r
|
|
1150
|
-
float z = 2.0;\r
|
|
1151
|
-
float rz = 0.0;\r
|
|
1152
|
-
vec2 bp = p;\r
|
|
1153
|
-
for (float i = 1.0; i < 6.0; i++){\r
|
|
1154
|
-
rz += abs((smoothNoise(p) - 0.5)* 2.0) / z;\r
|
|
1155
|
-
z *= 2.0;\r
|
|
1156
|
-
p *= 2.0;\r
|
|
1157
|
-
}\r
|
|
1158
|
-
return rz;\r
|
|
1159
|
-
}\r
|
|
1160
|
-
\r
|
|
1161
|
-
czm_material czm_getMaterial(czm_materialInput materialInput)\r
|
|
1162
|
-
{\r
|
|
1163
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1164
|
-
vec2 st = materialInput.st;\r
|
|
1165
|
-
vec2 st2 = materialInput.st;\r
|
|
1166
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1167
|
-
if (st.t < 0.5) {\r
|
|
1168
|
-
discard;\r
|
|
1169
|
-
}\r
|
|
1170
|
-
st *= 4.;\r
|
|
1171
|
-
float rz = fbm(st);\r
|
|
1172
|
-
st /= exp(mod(time * 2.0, pi));\r
|
|
1173
|
-
rz *= pow(15., 0.9);\r
|
|
1174
|
-
vec4 temp = vec4(0);\r
|
|
1175
|
-
temp = mix(color / rz, vec4(color.rgb, 0.1), 0.2);\r
|
|
1176
|
-
if (st2.s < 0.05) {\r
|
|
1177
|
-
temp = mix(vec4(color.rgb, 0.1), temp, st2.s / 0.05);\r
|
|
1178
|
-
}\r
|
|
1179
|
-
if (st2.s > 0.95){\r
|
|
1180
|
-
temp = mix(temp, vec4(color.rgb, 0.1), (st2.s - 0.95) / 0.05);\r
|
|
1181
|
-
}\r
|
|
1182
|
-
material.diffuse = temp.rgb;\r
|
|
1183
|
-
material.alpha = temp.a * 2.0;\r
|
|
1184
|
-
return material;\r
|
|
1185
|
-
}\r
|
|
1186
|
-
`;var hc=`uniform vec4 color;\r
|
|
1187
|
-
uniform float speed;\r
|
|
1188
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1189
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1190
|
-
vec2 st = materialInput.st;\r
|
|
1191
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1192
|
-
float alpha = abs(smoothstep(0.5, 1., fract(-st.t - time)));\r
|
|
1193
|
-
alpha += .1;\r
|
|
1194
|
-
material.alpha = alpha;\r
|
|
1195
|
-
material.diffuse = color.rgb;\r
|
|
1196
|
-
return material;\r
|
|
1197
|
-
}\r
|
|
1198
|
-
`;i.Material.EllipsoidElectricType="EllipsoidElectric";i.Material._materialCache.addMaterial(i.Material.EllipsoidElectricType,{fabric:{type:i.Material.EllipsoidElectricType,uniforms:{color:new i.Color(1,0,0,.7),speed:1},source:lc},translucent:function(l){return!0}});i.Material.EllipsoidTrailType="EllipsoidTrail";i.Material._materialCache.addMaterial(i.Material.EllipsoidTrailType,{fabric:{type:i.Material.EllipsoidTrailType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:hc},translucent:function(l){return!0}});var cc=`uniform vec4 color;\r
|
|
1199
|
-
uniform float speed;\r
|
|
1200
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1201
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1202
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1203
|
-
vec2 st = materialInput.st;\r
|
|
1204
|
-
float scalar = smoothstep(0.0, 1.0, time);\r
|
|
1205
|
-
material.diffuse = color.rgb * scalar;\r
|
|
1206
|
-
material.alpha = color.a * scalar;\r
|
|
1207
|
-
return material;\r
|
|
1208
|
-
}\r
|
|
1209
|
-
`;var pc=`uniform vec4 color;\r
|
|
1210
|
-
uniform float speed;\r
|
|
1211
|
-
uniform float percent;\r
|
|
1212
|
-
uniform float gradient;\r
|
|
1213
|
-
\r
|
|
1214
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1215
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1216
|
-
vec2 st = materialInput.st;\r
|
|
1217
|
-
float t =fract(czm_frameNumber * speed / 1000.0);\r
|
|
1218
|
-
t *= (1.0 + percent);\r
|
|
1219
|
-
float alpha = smoothstep(t- percent, t, st.s) * step(-t, -st.s);\r
|
|
1220
|
-
alpha += gradient;\r
|
|
1221
|
-
material.diffuse = color.rgb;\r
|
|
1222
|
-
material.alpha = alpha;\r
|
|
1223
|
-
return material;\r
|
|
1224
|
-
}\r
|
|
1225
|
-
`;var dc=`uniform sampler2D image;\r
|
|
1226
|
-
uniform float speed;\r
|
|
1227
|
-
uniform vec4 color;\r
|
|
1228
|
-
uniform vec2 repeat;\r
|
|
1229
|
-
\r
|
|
1230
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1231
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1232
|
-
vec2 st = repeat * materialInput.st;\r
|
|
1233
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1234
|
-
vec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));\r
|
|
1235
|
-
if (color.a == 0.0){\r
|
|
1236
|
-
if (colorImage.rgb == vec3(1.0) || colorImage.rgb == vec3(0.0)){\r
|
|
1237
|
-
discard;\r
|
|
1238
|
-
}\r
|
|
1239
|
-
material.alpha = colorImage.a;\r
|
|
1240
|
-
material.diffuse = colorImage.rgb;\r
|
|
1241
|
-
} else {\r
|
|
1242
|
-
material.alpha = colorImage.a * color.a;\r
|
|
1243
|
-
material.diffuse = max(color.rgb * material.alpha * 3.0, color.rgb);\r
|
|
1244
|
-
}\r
|
|
1245
|
-
return material;\r
|
|
1246
|
-
}\r
|
|
1247
|
-
`;var mc=`uniform sampler2D image;\r
|
|
1248
|
-
uniform vec4 color;\r
|
|
1249
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1250
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1251
|
-
vec2 st = materialInput.st;\r
|
|
1252
|
-
vec4 colorImage = texture(image, st);\r
|
|
1253
|
-
vec3 fragColor = color.rgb;\r
|
|
1254
|
-
material.alpha = colorImage.a * color.a * 3.;\r
|
|
1255
|
-
material.diffuse = max(fragColor.rgb + colorImage.rgb, fragColor.rgb);\r
|
|
1256
|
-
return material;\r
|
|
1257
|
-
}\r
|
|
1258
|
-
`;var uc=`uniform sampler2D image;\r
|
|
1259
|
-
uniform vec4 color;\r
|
|
1260
|
-
uniform float speed;\r
|
|
1261
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1262
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1263
|
-
vec2 st = materialInput.st;\r
|
|
1264
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1265
|
-
vec4 colorImage = texture(image, st);\r
|
|
1266
|
-
vec3 fragColor = color.rgb;\r
|
|
1267
|
-
if (st.t > 0.45 && st.t < 0.55) {\r
|
|
1268
|
-
fragColor = vec3(1.0);\r
|
|
1269
|
-
}\r
|
|
1270
|
-
if (color.a == 0.0){\r
|
|
1271
|
-
material.alpha = colorImage.a * 1.5 * fract(st.s - time);\r
|
|
1272
|
-
material.diffuse = colorImage.rgb;\r
|
|
1273
|
-
} else {\r
|
|
1274
|
-
material.alpha = colorImage.a * color.a * 1.5 * smoothstep(.0, 1., fract(st.s - time));\r
|
|
1275
|
-
material.diffuse = max(fragColor.rgb * material.alpha, fragColor.rgb);\r
|
|
1276
|
-
}\r
|
|
1277
|
-
return material;\r
|
|
1278
|
-
}\r
|
|
1279
|
-
`;var fc=`uniform vec4 color;\r
|
|
1280
|
-
uniform float speed;\r
|
|
1281
|
-
\r
|
|
1282
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1283
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1284
|
-
vec2 st = materialInput.st;\r
|
|
1285
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1286
|
-
material.diffuse = color.rgb;\r
|
|
1287
|
-
material.alpha = color.a * fract(st.s-time);\r
|
|
1288
|
-
return material;\r
|
|
1289
|
-
}\r
|
|
1290
|
-
`;i.Material.PolylineFlickerType="PolylineFlicker";i.Material._materialCache.addMaterial(i.Material.PolylineFlickerType,{fabric:{type:i.Material.PolylineFlickerType,uniforms:{color:new i.Color(1,0,0,.7),speed:1},source:cc},translucent:function(l){return!0}});i.Material.PolylineFlowType="PolylineFlow";i.Material._materialCache.addMaterial(i.Material.PolylineFlowType,{fabric:{type:i.Material.PolylineFlowType,uniforms:{color:new i.Color(1,0,0,.7),speed:1,percent:.03,gradient:.1},source:pc},translucent:function(l){return!0}});i.Material.PolylineImageTrailType="PolylineImageTrail";i.Material._materialCache.addMaterial(i.Material.PolylineImageTrailType,{fabric:{type:i.Material.PolylineImageTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:1,repeat:new i.Cartesian2(1,1)},source:dc},translucent:function(l){return!0}});i.Material.PolylineLightingType="PolylineLighting";i.Material._materialCache.addMaterial(i.Material.PolylineLightingType,{fabric:{type:i.Material.PolylineLightingType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId},source:mc},translucent:function(l){return!0}});i.Material.PolylineLightingTrailType="PolylineLightingTrail";i.Material._materialCache.addMaterial(i.Material.PolylineLightingTrailType,{fabric:{type:i.Material.PolylineLightingTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:3},source:uc},translucent:function(l){return!0}});i.Material.PolylineTrailType="PolylineTrail";i.Material._materialCache.addMaterial(i.Material.PolylineTrailType,{fabric:{type:i.Material.PolylineTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:1,repeat:new i.Cartesian2(1,1)},source:fc},translucent:function(l){return!0}});var _c=`uniform vec4 color;\r
|
|
1291
|
-
uniform float speed;\r
|
|
1292
|
-
\r
|
|
1293
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1294
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1295
|
-
vec2 st = materialInput.st * 2.0 - 1.0;\r
|
|
1296
|
-
float t = czm_frameNumber * speed / 1000.0;\r
|
|
1297
|
-
vec3 col = vec3(0.0);\r
|
|
1298
|
-
vec2 p = vec2(sin(t), cos(t));\r
|
|
1299
|
-
float d = length(st - dot(p, st) * p);\r
|
|
1300
|
-
if (dot(st, p) < 0.) {\r
|
|
1301
|
-
d = length(st);\r
|
|
1302
|
-
}\r
|
|
1303
|
-
\r
|
|
1304
|
-
col = .006 / d * color.rgb;\r
|
|
1305
|
-
\r
|
|
1306
|
-
if (distance(st, vec2(0)) > 0.99){\r
|
|
1307
|
-
col =color.rgb;\r
|
|
1308
|
-
}\r
|
|
1309
|
-
\r
|
|
1310
|
-
material.alpha = pow(length(col), 2.0);\r
|
|
1311
|
-
material.diffuse = col * 3.0;\r
|
|
1312
|
-
return material;\r
|
|
1313
|
-
}\r
|
|
1314
|
-
`;var gc=`uniform vec4 color;\r
|
|
1315
|
-
uniform float speed;\r
|
|
1316
|
-
\r
|
|
1317
|
-
#define PI 3.14159265359\r
|
|
1318
|
-
\r
|
|
1319
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1320
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1321
|
-
vec2 st = materialInput.st;\r
|
|
1322
|
-
vec2 scrPt = st * 2.0 - 1.0;\r
|
|
1323
|
-
float time = czm_frameNumber * speed / 1000.0;\r
|
|
1324
|
-
vec3 col = vec3(0.0);\r
|
|
1325
|
-
mat2 rot;\r
|
|
1326
|
-
float theta = -time * 1.0 * PI - 2.2;\r
|
|
1327
|
-
float cosTheta, sinTheta;\r
|
|
1328
|
-
cosTheta = cos(theta);\r
|
|
1329
|
-
sinTheta = sin(theta);\r
|
|
1330
|
-
rot[0][0] = cosTheta;\r
|
|
1331
|
-
rot[0][1] = -sinTheta;\r
|
|
1332
|
-
rot[1][0] = sinTheta;\r
|
|
1333
|
-
rot[1][1] = cosTheta;\r
|
|
1334
|
-
vec2 scrPtRot = rot * scrPt;\r
|
|
1335
|
-
float angle = 1.0 - (atan(scrPtRot.y, scrPtRot.x) / 6.2831 + 0.5);\r
|
|
1336
|
-
float falloff = 1.0 - length(scrPtRot);\r
|
|
1337
|
-
float ringSpacing = 0.23;\r
|
|
1338
|
-
if (mod(length(scrPtRot), ringSpacing) < 0.015 && length(scrPtRot) / ringSpacing < 5.0) {\r
|
|
1339
|
-
col += vec3(0, 0.5, 0);\r
|
|
1340
|
-
}\r
|
|
1341
|
-
col += vec3(0, 0.8, 0) * step(mod(length(scrPtRot), ringSpacing), 0.01) * step(length(scrPtRot), 1.0);\r
|
|
1342
|
-
material.alpha =pow(length(col + vec3(.5)), 5.0);\r
|
|
1343
|
-
material.diffuse = (0.5 + pow(angle, 2.0) * falloff) * color.rgb;\r
|
|
1344
|
-
return material;\r
|
|
1345
|
-
}\r
|
|
1346
|
-
`;var yc=`uniform vec4 color;\r
|
|
1347
|
-
uniform float speed;\r
|
|
1348
|
-
\r
|
|
1349
|
-
#define PI 3.14159265359\r
|
|
1350
|
-
\r
|
|
1351
|
-
float rand(vec2 co){\r
|
|
1352
|
-
return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);\r
|
|
1353
|
-
}\r
|
|
1354
|
-
\r
|
|
1355
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1356
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1357
|
-
vec2 st = materialInput.st;\r
|
|
1358
|
-
vec2 pos = st - vec2(0.5);\r
|
|
1359
|
-
float time = czm_frameNumber * speed / 1000.0;\r
|
|
1360
|
-
float r = length(pos);\r
|
|
1361
|
-
float t = atan(pos.y, pos.x) - time * 2.5;\r
|
|
1362
|
-
float a = (atan(sin(t), cos(t)) + PI)/(2.0*PI);\r
|
|
1363
|
-
float ta = 0.5;\r
|
|
1364
|
-
float v = smoothstep(ta-0.05, ta+0.05, a) * smoothstep(ta+0.05, ta-0.05, a);\r
|
|
1365
|
-
vec3 flagColor = color.rgb * v;\r
|
|
1366
|
-
float blink = pow(sin(time*1.5)*0.5+0.5, 0.8);\r
|
|
1367
|
-
flagColor = color.rgb * pow(a, 8.0*(.2+blink))*(sin(r*500.0)*.5+.5);\r
|
|
1368
|
-
flagColor = flagColor * pow(r, 0.4);\r
|
|
1369
|
-
material.alpha = length(flagColor) * 1.3;\r
|
|
1370
|
-
material.diffuse = flagColor * 3.0;\r
|
|
1371
|
-
return material;\r
|
|
1372
|
-
}\r
|
|
1373
|
-
`;i.Material.RadarLineType="RadarLine";i.Material._materialCache.addMaterial(i.Material.RadarLineType,{fabric:{type:i.Material.RadarLineType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:_c},translucent:function(l){return!0}});i.Material.RadarSweepType="RadarSweep";i.Material._materialCache.addMaterial(i.Material.RadarSweepType,{fabric:{type:i.Material.RadarSweepType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:gc},translucent:function(l){return!0}});i.Material.RadarWaveType="RadarWave";i.Material._materialCache.addMaterial(i.Material.RadarWaveType,{fabric:{type:i.Material.RadarWaveType,uniforms:{color:new i.Color(1,0,0,.7),speed:3},source:yc},translucent:function(l){return!0}});var vc=`uniform vec4 color;\r
|
|
1374
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1375
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1376
|
-
vec2 st = materialInput.st;\r
|
|
1377
|
-
material.diffuse = color.rgb * 2.0;\r
|
|
1378
|
-
material.alpha = color.a * (1.0-fract(st.t)) * 0.8;\r
|
|
1379
|
-
return material;\r
|
|
1380
|
-
}\r
|
|
1381
|
-
`;var wc=`uniform sampler2D image;\r
|
|
1382
|
-
uniform vec4 color;\r
|
|
1383
|
-
uniform float speed;\r
|
|
1384
|
-
uniform vec2 repeat;\r
|
|
1385
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1386
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1387
|
-
vec2 st = materialInput.st * repeat;\r
|
|
1388
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1389
|
-
vec4 colorImage = texture(image, vec2(fract(st.s - time), st.t));\r
|
|
1390
|
-
material.alpha = colorImage.a * color.a;\r
|
|
1391
|
-
material.diffuse = colorImage.rgb * color.rgb * 3.0;\r
|
|
1392
|
-
return material;\r
|
|
1393
|
-
}\r
|
|
1394
|
-
`;var xc=`uniform sampler2D image;\r
|
|
1395
|
-
uniform float speed;\r
|
|
1396
|
-
uniform vec4 color;\r
|
|
1397
|
-
uniform vec2 repeat;\r
|
|
1398
|
-
\r
|
|
1399
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1400
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1401
|
-
float perDis = 1.0 / repeat.y / 3.0;\r
|
|
1402
|
-
vec2 st = materialInput.st * repeat;\r
|
|
1403
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1404
|
-
vec4 colorImage = texture(image, vec2(st.s, fract(st.t - time)));\r
|
|
1405
|
-
material.alpha = colorImage.a * smoothstep(.2, 1., distance(st.t * perDis, 1. + perDis));\r
|
|
1406
|
-
material.diffuse = max(color.rgb * material.alpha * 1.5, color.rgb);\r
|
|
1407
|
-
material.emission = max(color.rgb * material.alpha * 1.5, color.rgb);\r
|
|
1408
|
-
return material;\r
|
|
1409
|
-
}\r
|
|
1410
|
-
`;var Cc=`uniform sampler2D image;\r
|
|
1411
|
-
uniform float speed;\r
|
|
1412
|
-
uniform vec4 color;\r
|
|
1413
|
-
\r
|
|
1414
|
-
czm_material czm_getMaterial(czm_materialInput materialInput){\r
|
|
1415
|
-
czm_material material = czm_getDefaultMaterial(materialInput);\r
|
|
1416
|
-
vec2 st = materialInput.st;\r
|
|
1417
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1418
|
-
vec4 colorImage = texture(image, vec2(fract(st.t - time), st.t));\r
|
|
1419
|
-
if (color.a == 0.0){\r
|
|
1420
|
-
material.alpha = colorImage.a;\r
|
|
1421
|
-
material.diffuse = colorImage.rgb;\r
|
|
1422
|
-
} else {\r
|
|
1423
|
-
material.alpha = colorImage.a * color.a;\r
|
|
1424
|
-
material.diffuse = max(color.rgb * material.alpha * 3.0, color.rgb);\r
|
|
1425
|
-
}\r
|
|
1426
|
-
return material;\r
|
|
1427
|
-
}\r
|
|
1428
|
-
`;i.Material.WallDiffuseType="WallDiffuse";i.Material._materialCache.addMaterial(i.Material.WallDiffuseType,{fabric:{type:i.Material.WallDiffuseType,uniforms:{color:new i.Color(1,0,0,.7)},source:vc},translucent:function(l){return!0}});i.Material.WallImageTrailType="WallImageTrail";i.Material._materialCache.addMaterial(i.Material.WallImageTrailType,{fabric:{type:i.Material.WallImageTrailType,uniforms:{image:i.Material.DefaultImageId,color:new i.Color(1,0,0,.7),speed:3,repeat:new i.Cartesian2(1,1)},source:wc},translucent:function(l){return!0}});i.Material.WallLineTrailType="WallLineTrail";i.Material._materialCache.addMaterial(i.Material.WallLineTrailType,{fabric:{type:i.Material.WallLineTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,repeat:new i.Cartesian2(1,1),speed:3},source:xc},translucent:function(l){return!0}});i.Material.WallTrailType="WallTrail";i.Material._materialCache.addMaterial(i.Material.WallTrailType,{fabric:{type:i.Material.WallTrailType,uniforms:{color:new i.Color(1,0,0,.7),image:i.Material.DefaultImageId,speed:1},source:Cc},translucent:function(l){return!0}});var Aa=class{constructor(e={}){this._definitionChanged=new i.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=e.color||i.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,t){return t=i.defaultValue(t,{}),t}equals(e){return this===e}},L=Aa;var Ot=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleBlurType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ot.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Tc=Ot;var kt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleDiffuseType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(kt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Ec=kt;var zt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleFadeType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(zt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Pc=zt;var Nt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.CirclePulseType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Nt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Mc=Nt;var Ft=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleScanType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ft.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Ac=Ft;var Wt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleSpiralType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Wt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var bc=Wt;var Gt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.CircleVaryType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Gt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Sc=Gt;var Ht=class l extends L{constructor(e={}){super(e),this.count=Math.max(e.count||3,1),this.gradient=i.Math.clamp(e.gradient||.1,0,1)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Material.CircleWaveType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t.count=this.count,t.gradient=this.gradient,t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ht.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Ic=Ht;var Bt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.EllipsoidElectricType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Bt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Dc=Bt;var Ut=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.EllipsoidTrailType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ut.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Lc=Ut;var Vt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.PolylineFlickerType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Vt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Rc=Vt;var jt=class l extends L{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 i.Material.PolylineFlowType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t.percent=i.Property.getValueOrUndefined(this._percent,e),t.gradient=i.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)&&i.Property.equals(this._percent,e._percent)&&i.Property.equals(this._gradient,e._gradient)}};Object.defineProperties(jt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),percent:i.createPropertyDescriptor("percent"),gradient:i.createPropertyDescriptor("gradient")});var Oc=jt;var Zt=class l extends L{constructor(e={}){var t,r;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 i.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Material.PolylineImageTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.repeat=i.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._image,e._image)&&i.Property.equals(this._repeat,e._repeat)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Zt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),image:i.createPropertyDescriptor("image"),repeat:i.createPropertyDescriptor("repeat")});var kc=Zt;var Yt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACYCAYAAACS0lH9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ0GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1s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AAAElFTkSuQmCC";var Jt=class l extends L{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Yt}getType(e){return i.Material.PolylineLightingType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._image,e._image)}};Object.defineProperties(Jt.prototype,{color:i.createPropertyDescriptor("color"),image:i.createPropertyDescriptor("image")});var zc=Jt;var qt=class l extends L{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Yt}getType(e){return i.Material.PolylineLightingTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(qt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),image:i.createPropertyDescriptor("image")});var Nc=qt;var Xt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.PolylineTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Xt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Fc=Xt;var Qt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.RadarLineType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Qt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Wc=Qt;var Kt=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.RadarSweepType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(Kt.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Gc=Kt;var $t=class l extends L{constructor(e={}){super(e)}getType(e){return i.Material.RadarWaveType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties($t.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed")});var Hc=$t;var ei=class l extends L{constructor(e={}){var t,r;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 i.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Material.WallImageTrailType}getValue(e,t){return t=i.defaultValue(t,{}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.repeat=i.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._image,e._image)&&i.Property.equals(this._repeat,e._repeat)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(ei.prototype,{image:i.createPropertyDescriptor("image"),color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),repeat:i.createPropertyDescriptor("repeat")});var Bc=ei;var Uc="data:image/png;base64,iVBORw0KG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ODg4LTI0MWU2YTFiZDJhZiIgc3RFdnQ6d2hlbj0iMjAyMS0wMi0yNFQxNDoyMDoxNiswODowMCIgc3RFdnQ6c29mdHdhcmVBZ2VudD0iQWRvYmUgUGhvdG9zaG9wIDIxLjIgKE1hY2ludG9zaCkiIHN0RXZ0OmNoYW5nZWQ9Ii8iLz4gPC9yZGY6U2VxPiA8L3htcE1NOkhpc3Rvcnk+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+eAiLkwAAAQZJREFUeJzt3LERwDAMxDAl5/1XdqYIXRiYQBULFf/svQeA/72nDwC4heACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBkzYx9RoDAmpnn9BEAN/BSAIgILkBEcAEiggsQEVyAiOACRAQXICK4ABHBBYgILkBEcAEiggsQEVyAiOACRAQXIGKAHCBigBwg4qUAEBFcgIjgAkQEFyAiuAARwQWICC5ARHABIoILEBFcgIjgAkQEFyAiuAARwQWI2MMFiNjDBYh4KQBEBBcgIrgAEcEFiAguQERwASKCCxARXICI4AJEBBcgIrgAEcEFiAguQERwASIfRmAGiWTgoMYAAAAASUVORK5CYII=";var ti=class l extends L{constructor(e={}){var t,r;super(e),this._image=void 0,this._imageSubscription=void 0,this._repeat=void 0,this._repeatSubscription=void 0,this.image=Uc,this.repeat=new i.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Material.WallLineTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.repeat=i.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)&&i.Property.equals(this._repeat,e._repeat)}};Object.defineProperties(ti.prototype,{color:i.createPropertyDescriptor("color"),image:i.createPropertyDescriptor("image"),repeat:i.createPropertyDescriptor("repeat"),speed:i.createPropertyDescriptor("speed")});var Vc=ti;var jc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZgEyAAIAAAAUAAAAiodpAAQAAAABAAAAngAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKE1hY2ludG9zaCkAMjAxODoxMDoyNiAxNTozMDozNAAABJAEAAIAAAAUAAAA1KABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAAAyMDE4OjEwOjI2IDE1OjI0OjI1ALUCxicAAAAJcEhZcwAACxMAAAsTAQCanBgAAAdgaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA1LjQuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIgogICAgICAgICAgICB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iCiAgICAgICAgICAgIHhtbG5zOnBob3Rvc2hvcD0iaHR0cDovL25zLmFkb2JlLmNvbS9waG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tp3ITbJw0RR/IE+J6KkyzMlZuLsUMHrZ8yo9YMeBrjMQezPoW4CWgYYpJ5a7aSfp1cvitOyfo27JTbIRFdHAaBhObskmLG0zYyOoO04IY1zy13TcKnR3Q5lMA2MuHfxp75VN4LgOi4ZNtf74MOUnIwCWDV/5e7uSlkbfCcRMuH2yrvBRlLgcO9xXqjIP/9lUeTLjFI3z8F+ualIvlptDJAAAAAElFTkSuQmCC";var ii=class l extends L{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=jc}getType(e){return i.Material.WallTrailType}getValue(e,t){return t||(t={}),t.color=i.Property.getValueOrUndefined(this._color,e),t.image=i.Property.getValueOrUndefined(this._image,e),t.speed=i.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._color,e._color)&&i.Property.equals(this._speed,e._speed)}};Object.defineProperties(ii.prototype,{color:i.createPropertyDescriptor("color"),speed:i.createPropertyDescriptor("speed"),image:i.createPropertyDescriptor("image")});var Zc=ii;var ri=class l{constructor(e){e=e||{},this._definitionChanged=new i.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=e.baseWaterColor||new i.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=e.blendColor||new i.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=e.specularMap||i.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=e.normalMap||i.Material.DefaultImageId,this.frequency=i.defaultValue(e.frequency,1e3),this.animationSpeed=i.defaultValue(e.animationSpeed,.01),this.amplitude=i.defaultValue(e.amplitude,10),this.specularIntensity=i.defaultValue(e.specularIntensity,.5)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Material.WaterType}getValue(e,t){return t||(t={}),t.baseWaterColor=i.Property.getValueOrUndefined(this._baseWaterColor,e),t.blendColor=i.Property.getValueOrUndefined(this._blendColor,e),t.specularMap=i.Property.getValueOrUndefined(this._specularMap,e),t.normalMap=i.Property.getValueOrUndefined(this._normalMap,e),t.frequency=this.frequency,t.animationSpeed=this.animationSpeed,t.amplitude=this.amplitude,t.specularIntensity=this.specularIntensity,t}equals(e){return this===e||e instanceof l&&i.Property.equals(this._baseWaterColor,e._baseWaterColor)}};Object.defineProperties(ri.prototype,{baseWaterColor:i.createPropertyDescriptor("baseWaterColor"),blendColor:i.createPropertyDescriptor("blendColor"),specularMap:i.createPropertyDescriptor("specularMap"),normalMap:i.createPropertyDescriptor("normalMap")});var Yc=ri;var ba=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 t=0;t<e.length-1;t++){let r=e[t],s=e[t+1];typeof r.equals=="function"&&r.equals(s)&&(console.log("element",r),console.log("element",s),e.splice(t,1),t--)}return e}_bindEvent(){this.drawTool.on(E.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(E.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(E.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.on(E.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(E.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(E.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(E.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.off(E.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236",this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.drawTool.fire(E.DRAW_STOP),this}},Z=ba;var bu={pixelSize:10,outlineColor:i.Color.BLUE,outlineWidth:5},Sa=class extends Z{constructor(e){super(),this._position=i.Cartesian3.ZERO,this._style={...bu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({position:new i.CallbackProperty(()=>this._position,!1),point:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new St(u.transformCartesianToWGS84(this._position)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(E.DRAW_STOP,e)}_onAnchorMoving(e){this._position=e}},Jc=Sa;var Su={width:3,material:i.Color.YELLOW.withAlpha(.6)},Ia=class extends Z{constructor(e){super(),this._style={...Su,...e}}_mountedHook(){this._delegate=new i.Entity({polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new je(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(E.DRAW_STOP))}},qc=Ia;var Iu={material:i.Color.YELLOW.withAlpha(.6),fill:!0,outline:!0,outlineWidth:2,outlineColor:i.Color.GREEN,width:2},Da=class extends Z{constructor(e){super(),this._style={...Iu,...e}}_mountedHook(){this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?new i.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)},polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions.length<=3?this._positions:null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new Ve(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e})}},Xc=Da;var Du={material:i.Color.YELLOW.withAlpha(.6),fill:!0},La=class extends Z{constructor(e){super(),this._maxAnchorSize=2,this._radius=0,this._style={...Du,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>{if(this._positions.length>1){if(this._radius=i.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let e=i.EllipseGeometryLibrary.computeEllipsePositions({center:this._positions[0],semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),t=i.Cartesian3.unpackArray(e.outerPositions);return t.push(t[0]),new i.PolygonHierarchy(t)}else return null},!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new At(u.transformCartesianToWGS84(this._positions[0]),this._radius).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e,isCenter:t===1}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(E.DRAW_STOP))}},Qc=La;var Lu={material:i.Color.YELLOW.withAlpha(.6)},Ra=class extends Z{constructor(e){super(),this._maxAnchorSize=2,this._style={...Lu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({rectangle:{...this._style,coordinates:new i.CallbackProperty(e=>this._positions.length>1?i.Rectangle.fromCartesianArray(this._positions):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new It(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(E.DRAW_STOP))}},Kc=Ra;var Oa=class extends Z{constructor(e){super(),this._position=i.Cartesian3.ZERO,this._style={image:Ge,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({position:new i.CallbackProperty(()=>this._position,!1),billboard:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new Ue(u.transformCartesianToWGS84(this._position),this._style.image).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(E.DRAW_STOP)}_onAnchorMoving(e){this._position=e}},$c=Oa;var si=Math.PI/2,ka=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,t,r){let s=w.getBaseLength(e),a=s*this.headHeightFactor,o=e[e.length-1];s=w.distance(o,e[e.length-2]);let n=w.distance(t,r);a>n*this.headTailFactor&&(a=n*this.headTailFactor);let h=a*this.headWidthFactor,c=a*this.neckWidthFactor;a=a>s?s:a;let p=a*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],o,0,a,!0),y=w.getThirdPoint(e[e.length-2],o,0,p,!0),_=w.getThirdPoint(o,f,si,h,!1),d=w.getThirdPoint(o,f,si,h,!0),T=w.getThirdPoint(o,y,si,c,!1),C=w.getThirdPoint(o,y,si,c,!0);return[T,_,o,d,C]}_getArrowBodyPoints(e,t,r,s){let a=w.wholeDistance(e),n=w.getBaseLength(e)*s,h=w.distance(t,r),c=(n-h)/2,p=0,f=[],y=[];for(let _=1;_<e.length-1;_++){let d=w.getAngleOfThreePoints(e[_-1],e[_],e[_+1])/2;p+=w.distance(e[_-1],e[_]);let T=(n/2-p/a*c)/Math.sin(d),C=w.getThirdPoint(e[_-1],e[_],Math.PI-d,T,!0),P=w.getThirdPoint(e[_-1],e[_],d,T,!1);f.push(C),y.push(P)}return f.concat(y)}_createHierarchy(){let e=g.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let a=[w.mid(t,r)].concat(e.slice(2)),o=this._getArrowHeadPoints(a,t,r),n=o[0],h=o[4],c=w.distance(t,r)/w.getBaseLength(a),p=this._getArrowBodyPoints(a,n,h,c),f=p.length,y=[t].concat(p.slice(0,f/2));y.push(n);let _=[r].concat(p.slice(f/2,f));return _.push(h),y=w.getQBSplinePoints(y),_=w.getQBSplinePoints(_),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions(y.concat(o,_.reverse()))))}},Ze=ka;var Ru={material:i.Color.YELLOW.withAlpha(.6),fill:!0},za=class extends Z{constructor(e){super(),this._maxAnchorSize=3,this._style={...Ru,...e},this._graphics=new Ze}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.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 Be(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(E.DRAW_STOP))}},ep=za;var ee=Math.PI/2,Na=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,t,r,s){let a=w.mid(e,t),o=w.distance(a,r),n=w.getThirdPoint(r,a,0,o*.3,!0),h=w.getThirdPoint(r,a,0,o*.5,!0);n=w.getThirdPoint(a,n,ee,o/5,s),h=w.getThirdPoint(a,h,ee,o/4,s);let c=[a,n,h,r],p=this._getArrowHeadPoints(c),f=p[0],y=p[4],_=w.distance(e,t)/w.getBaseLength(c)/2,d=this._getArrowBodyPoints(c,f,y,_),T=d.length,C=d.slice(0,T/2),P=d.slice(T/2,T);return C.push(f),P.push(y),C=C.reverse(),C.push(t),P=P.reverse(),P.push(e),C.reverse().concat(p,P)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],a=r*this.headWidthFactor,o=r*this.neckWidthFactor,n=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,n,!0),p=w.getThirdPoint(s,h,ee,a,!1),f=w.getThirdPoint(s,h,ee,a,!0),y=w.getThirdPoint(s,c,ee,o,!1),_=w.getThirdPoint(s,c,ee,o,!0);return[y,p,s,f,_]}_getArrowBodyPoints(e,t,r,s){let a=w.wholeDistance(e),n=w.getBaseLength(e)*s,h=w.distance(t,r),c=(n-h)/2,p=0,f=[],y=[];for(let _=1;_<e.length-1;_++){let d=w.getAngleOfThreePoints(e[_-1],e[_],e[_+1])/2;p+=w.distance(e[_-1],e[_]);let T=(n/2-p/a*c)/Math.sin(d),C=w.getThirdPoint(e[_-1],e[_],Math.PI-d,T,!0),P=w.getThirdPoint(e[_-1],e[_],d,T,!1);f.push(C),y.push(P)}return f.concat(y)}_getTempPoint4(e,t,r){let s=w.mid(e,t),a=w.distance(s,r),o=w.getAngleOfThreePoints(e,s,r),n,h,c,p;return o<ee?(h=a*Math.sin(o),c=a*Math.cos(o),p=w.getThirdPoint(e,s,ee,h,!1),n=w.getThirdPoint(s,p,ee,c,!0)):o>=ee&&o<Math.PI?(h=a*Math.sin(Math.PI-o),c=a*Math.cos(Math.PI-o),p=w.getThirdPoint(e,s,ee,h,!1),n=w.getThirdPoint(s,p,ee,c,!1)):o>=Math.PI&&o<Math.PI*1.5?(h=a*Math.sin(o-Math.PI),c=a*Math.cos(o-Math.PI),p=w.getThirdPoint(e,s,ee,h,!0),n=w.getThirdPoint(s,p,ee,c,!0)):(h=a*Math.sin(Math.PI*2-o),c=a*Math.cos(Math.PI*2-o),p=w.getThirdPoint(e,s,ee,h,!0),n=w.getThirdPoint(s,p,ee,c,!1)),n}_createHierarchy(){let e=this._positions.length,t,r,s=g.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],a=s[0],o=s[1],n=s[2];e===3?t=this._getTempPoint4(a,o,n):t=s[3],e===3||e===4?r=w.mid(a,o):r=s[4];let h,c;w.isClockWise(a,o,n)?(h=this._getArrowPoints(a,r,t,!1),c=this._getArrowPoints(r,o,n,!0)):(h=this._getArrowPoints(o,r,n,!1),c=this._getArrowPoints(r,a,t,!0));let p=h.length,f=(p-5)/2,y=h.slice(0,f),_=h.slice(f,f+5),d=h.slice(f+5,p),T=c.slice(0,f),C=c.slice(f,f+5),P=c.slice(f+5,p);T=w.getBezierPoints(T);let A=w.getBezierPoints(P.concat(y.slice(1)));return d=w.getBezierPoints(d),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions(T.concat(C,A,_,d))))}},ai=Na;var Ou={material:i.Color.YELLOW.withAlpha(.6),fill:!0},Fa=class extends Z{constructor(e){super(),this._maxAnchorSize=4,this._style={...Ou,...e},this._graphics=new ai}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.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 xt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(E.DRAW_STOP))}},tp=Fa;var ip=Math.PI/2,Wa=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=g.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1],s=w.getBaseLength(e),a=s*this.tailWidthFactor,o=s*this.neckWidthFactor,n=s*this.headWidthFactor,h=w.getThirdPoint(r,t,ip,a,!0),c=w.getThirdPoint(r,t,ip,a,!1),p=w.getThirdPoint(t,r,this.headAngle,n,!1),f=w.getThirdPoint(t,r,this.headAngle,n,!0),y=w.getThirdPoint(t,r,this.neckAngle,o,!1),_=w.getThirdPoint(t,r,this.neckAngle,o,!0);return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions([h,y,p,r,f,_,c])))}},oi=Wa;var ku={material:i.Color.YELLOW.withAlpha(.6),fill:!0},Ga=class extends Z{constructor(e){super(),this._maxAnchorSize=2,this._style={...ku,...e},this._graphics=new oi}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.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 Ct(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(E.DRAW_STOP))}},rp=Ga;var zu=Math.PI/2,sp=100,Ha=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=g.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0];if(this._positions.length===2){let o=w.mid(e[0],e[1]),n=w.distance(e[0],o)/.9,h=w.getThirdPoint(e[0],o,zu,n,!0);e=[e[0],h,e[1]]}let t=w.mid(e[0],e[2]);e.push(t,e[0],e[1]);let r=[];for(let o=0;o<e.length-2;o++){let n=e[o],h=e[o+1],c=e[o+2],p=w.getBisectorNormals(this.t,n,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let a=[];for(let o=0;o<e.length-2;o++){let n=e[o],h=e[o+1];a.push(n);for(let c=0;c<=sp;c++){let p=w.getCubicValue(c/sp,n,r[o*2],r[o*2+1],h);a.push(p)}a.push(h)}return new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions(a)))}},ni=Ha;var Nu={material:i.Color.YELLOW.withAlpha(.6),fill:!0},Ba=class extends Z{constructor(e){super(),this._maxAnchorSize=3,this._style={...Nu,...e},this._graphics=new ni}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.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 Tt(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(E.DRAW_STOP))}},ap=Ba;var Ua=class extends Ze{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=g.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1];w.isClockWise(e[0],e[1],e[2])&&(t=e[1],r=e[0]);let a=[w.mid(t,r)].concat(e.slice(2)),o=this._getArrowHeadPoints(a,t,r),n=o[0],h=o[4],c=w.distance(t,r),p=w.getBaseLength(a),f=p*this.tailWidthFactor*this.swallowTailFactor,y=w.getThirdPoint(a[1],a[0],0,f,!0),_=c/p,d=this._getArrowBodyPoints(a,n,h,_),T=d.length,C=[t].concat(d.slice(0,T/2));C.push(n);let P=[r].concat(d.slice(T/2,T));return P.push(h),C=w.getQBSplinePoints(C),P=w.getQBSplinePoints(P),new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(g.parsePositions(C.concat(o,P.reverse(),[y,C[0]]))))}},li=Ua;var Fu={material:i.Color.YELLOW.withAlpha(.6),fill:!0},Va=class extends Z{constructor(e){super(),this._maxAnchorSize=3,this._style={...Fu,...e},this._graphics=new li}_mountEntity(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.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 Et(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(E.DRAW_STOP))}},op=Va;var ja=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._overlay.show=!1,this._delegate=new i.Entity,this._delegate.merge(e.delegate),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_mountAnchor(){this._positions=[].concat(u.transformWGS84ArrayToCartesianArray(this._overlay.positions)),this._positions.forEach((e,t)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:e,index:t})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now());this._positions[r.index]=t}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now());this._positions[r.index]=t}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate(),this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){return this.editTool.on(E.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(E.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(E.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(E.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(E.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(E.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.tooltipMess="\u70B9\u51FB\u951A\u70B9\u79FB\u52A8,\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.editTool.fire(E.EDIT_STOP,{pickedAnchor:null,position:null}),this}},Y=ja;var Za=class extends Y{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.JulianDate.now()),this._delegate.position=new i.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},np=Za;var Ya=class extends Y{constructor(e){super(e)}_mountedHook(){this._delegate.polyline.positions=new i.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%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(i.JulianDate.now());for(let t=0;t<e.length-1;t++){let r=F(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let a=F(this._positions[s],this._positions[s-1]),o=F(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,a,t,o),this.editTool.fire(E.CLEAR_ANCHOR),this._positions.forEach((n,h)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:n,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let a=-1,o=-1,n=-1,h=-1,c=this._positions.length;if(s===0?(n=s+2,h=s+1):r.index===c-1?(a=s-2,o=s-1):(a=s-2,o=s-1,n=s+2,h=s+1),a>0){let p=F(this._positions[a],this._positions[s]);this._positions[o]=p,this.editTool.fire(E.UPDATE_ANCHOR,{index:o,position:p})}if(n>0){let p=F(this._positions[n],this._positions[s]);this._positions[h]=p,this.editTool.fire(E.UPDATE_ANCHOR,{index:h,position:p})}}}},lp=Ya;var Ja=class extends Y{constructor(e){super(e)}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(e=>this._positions.length>2?new i.PolygonHierarchy(this._positions.map(t=>t.clone())):null,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.positions=u.transformCartesianArrayToWGS84Array(this._positions.filter((e,t)=>t%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(i.JulianDate.now()).positions;e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=F(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let a,o,n=this._positions.length;s===n-1?(a=F(this._positions[s],this._positions[s-1]),o=F(this._positions[s],this._positions[0])):(a=F(this._positions[s],this._positions[s-1]),o=F(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,a,t,o),this.editTool.fire(E.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;this._positions[s]=t;let a=this._positions.length;if(!r.isMid){let o=-1,n=-1,h=-1,c=-1;s===0?(o=a-2,n=a-1,h=s+2,c=s+1):s===a-2?(o=s-2,n=s-1,h=0,c=a-1):(o=s-2,n=s-1,h=s+2,c=s+1);let p=F(this._positions[o],this._positions[s]),f=F(this._positions[h],this._positions[s]);this._positions[n]=p,this._positions[c]=f,this.editTool.fire(E.UPDATE_ANCHOR,{index:n,position:p}),this.editTool.fire(E.UPDATE_ANCHOR,{index:c,position:f})}}},hp=Ja;var qa=class extends Y{constructor(e){super(e),this._center=void 0,this._radius=0}_mountedHook(){this._radius=this._overlay.radius,this._center=u.transformWGS84ToCartesian(this._overlay.center),this._positions=[].concat([this._center,this._computeCirclePoints(this._center,this._radius)[0]]),this._delegate.polygon.hierarchy=new i.CallbackProperty(e=>{if(this._positions.length>1){if(this._radius=i.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let t=this._computeCirclePoints(this._positions[0],this._radius);return t.push(t[0]),new i.PolygonHierarchy(t)}else return null},!1),this._layer.entities.add(this._delegate)}_computeCirclePoints(e,t){let r=[],s=i.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0);return s&&s.outerPositions&&(r=i.Cartesian3.unpackArray(s.outerPositions)),r}_stoppedHook(){this._overlay.center=u.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,t)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:e,index:t,isCenter:t%2===0})})}},cp=qa;var Xa=class extends Y{constructor(e){super(e),this._overlay=e}_mountedHook(){this._delegate.rectangle.coordinates=new i.CallbackProperty(e=>this._positions.length>1?i.Rectangle.fromCartesianArray(this._positions):null,!1),this._layer.entities.add(this._delegate)}},pp=Xa;var Qa=class extends Y{constructor(e){super(e),this._position=void 0}_mountedHook(){this.editTool.tooltipMess="\u53F3\u51FB\u7ED3\u675F\u7F16\u8F91",this._position=this._delegate.position.getValue(i.JulianDate.now()),this._delegate.position=new i.CallbackProperty(()=>this._position,!1),this._layer.entities.add(this._delegate)}_stoppedHook(){this._overlay.position=u.transformCartesianToWGS84(this._position),this._overlay.show=!0,this._options.onEditStop&&this._options.onEditStop(this._overlay)}_onAnchorMoving({pickedAnchor:e,position:t}){this._position=t}},dp=Qa;var Ka=class extends Y{constructor(e){super(e),this._graphics=new Ze}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},mp=Ka;var $a=class extends Y{constructor(e){super(e),this._graphics=new ai}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},up=$a;var eo=class extends Y{constructor(e){super(e),this._graphics=new oi}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},fp=eo;var to=class extends Y{constructor(e){super(e),this._graphics=new ni}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},_p=to;var io=class extends Y{constructor(e){super(e),this._graphics=new li}_mountedHook(){this._delegate.polygon.hierarchy=new i.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},gp=io;var ro=class{constructor(e,t={}){this._viewer=e,this._options=t,this._layer=new i.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,t){let r;switch(e){case N.POINT:r=new Jc(t);break;case N.POLYLINE:r=new qc(t);break;case N.POLYGON:r=new Xc(t);break;case N.CIRCLE:r=new Qc(t);break;case N.RECT:r=new Kc(t);break;case N.BILLBOARD:r=new $c(t);break;case N.ATTACK_ARROW:r=new ep(t);break;case N.DOUBLE_ARROW:r=new tp(t);break;case N.FINE_ARROW:r=new rp(t);break;case N.TAILED_ATTACK_ARROW:r=new op(t);break;case N.GATHERING_PLACE:r=new ap(t);break;default:break}return r}_createEditWorker(e){let t;switch(e.type){case N.POINT:t=new np(e);break;case N.POLYLINE:t=new lp(e);break;case N.POLYGON:t=new hp(e);break;case N.CIRCLE:t=new cp(e);break;case N.RECT:t=new pp(e);break;case N.BILLBOARD:t=new dp(e);break;case N.ATTACK_ARROW:t=new mp(e);break;case N.DOUBLE_ARROW:t=new up(e);break;case N.FINE_ARROW:t=new fp(e);break;case N.TAILED_ATTACK_ARROW:t=new gp(e);break;case N.GATHERING_PLACE:t=new _p(e);break;default:break}return t}draw(e,t,r={},s=!1){var o;this._state="draw",this._currentWorker&&this._currentWorker.stop();let a=(r==null?void 0:r.maxAnchorSize)||999;return r&&delete r.maxAnchorSize,this._currentWorker=(o=this._createDrawWorker(e,r))==null?void 0:o.start(this,{...this._options,maxAnchorSize:a,onDrawStop:t,clampToModel:s!=null?s:this._options.clampToModel}),this}edit(e,t,r=!1){var s;return this._state="edit",this._currentWorker&&this._currentWorker.stop(),this._currentWorker=(s=this._createEditWorker(e))==null?void 0:s.start(this,{...this._options,onEditStop:t,clampToModel:r!=null?r:this._options.clampToModel}),this}clusterPositions(e,t=60){let r=e.positions||[];switch(e.type){case N.POINT:r.push(e.position);break;case N.CIRCLE:r=this.circleToCluster(e,t);break;case N.RECT:r=this.rectangleToCluster(e);break}return r}circleToCluster(e={},t=60){let r=e.center,s=i.Math.toRadians(e.radius/1e3);var a=i.Math.toRadians(r._lng),o=i.Math.toRadians(r._lat);let n=i.Math.toRadians(r._heading);t=Math.ceil(360/(t||60));let h=[];for(let c=0;c<=360;c+=t){let p=n+i.Math.toRadians(c),f=new i.Cartographic(a+s*Math.cos(p),o+s*Math.sin(p),0),y=i.Ellipsoid.WGS84.cartographicToCartesian(f),_=i.Cartographic.fromCartesian(y);h.push(new U(i.Math.toDegrees(_.longitude),i.Math.toDegrees(_.latitude),_.height||0))}return h}rectangleToCluster(e={}){let t=e.positions,r=t[0]._lng,s=t[0]._lat,a=t[1]._lng,o=t[1]._lat;t.push(new U(r,o)),t.push(new U(a,s));var n=i.Rectangle.fromDegrees(r,s,a,o);return t}stop(){this._currentWorker&&this._currentWorker.stop(),this._currentWorker=null}destroy(){return this._viewer.dataSources.remove(this._layer),this._viewer=void 0,this}},Wu=ro;var so=class{constructor(e){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}},ae=so;var Gu={},q=Gu;var ao=class extends ae{constructor(e,t={}){super(e),this._options=t,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return q.AROUND_VIEW}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.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?i.Math.toRadians(this._options.pitch):this._viewer.camera.pitch,roll:this._options.roll?i.Math.toRadians(this._options.roll):this._viewer.camera.roll}})}};q.AROUND_VIEW="around_view";var yp=ao;var oo=class extends ae{constructor(e,t,r={}){super(e),this._position=g.parsePosition(t),this._options=r,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return q.AROUND_POINT}set position(e){this._position=g.parsePosition(e)}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Math.toRadians(this._aroundAmount),(this._heading>=Math.PI*2||this._heading<=-Math.PI*2)&&(this._heading=0),this._viewer.camera.lookAt(u.transformWGS84ToCartesian(this._position),new i.HeadingPitchRange(this._heading,i.Math.toRadians(this._options.pitch||0),this._options.range||1e3))}};q.AROUND_POINT="around_point";var vp=oo;var wp=`in vec2 v_textureCoordinates;\r
|
|
1429
|
-
uniform sampler2D colorTexture;\r
|
|
1430
|
-
uniform sampler2D depthTexture;\r
|
|
1431
|
-
uniform vec3 centerWC;\r
|
|
1432
|
-
uniform vec3 normalWC;\r
|
|
1433
|
-
uniform float radius;\r
|
|
1434
|
-
uniform vec4 color;\r
|
|
1435
|
-
uniform float speed;\r
|
|
1436
|
-
\r
|
|
1437
|
-
float getDepth(){\r
|
|
1438
|
-
float z_window = czm_unpackDepth(texture(depthTexture, v_textureCoordinates));\r
|
|
1439
|
-
z_window = czm_reverseLogDepth(z_window);\r
|
|
1440
|
-
float n_range = czm_depthRange.near;\r
|
|
1441
|
-
float f_range = czm_depthRange.far;\r
|
|
1442
|
-
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\r
|
|
1443
|
-
}\r
|
|
1444
|
-
\r
|
|
1445
|
-
vec4 toEye(in vec2 uv, in float depth){\r
|
|
1446
|
-
vec2 xy = vec2((uv.x * 2.0 - 1.0), (uv.y * 2.0 - 1.0));\r
|
|
1447
|
-
vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);\r
|
|
1448
|
-
posInCamera = posInCamera / posInCamera.w;\r
|
|
1449
|
-
return posInCamera;\r
|
|
1450
|
-
}\r
|
|
1451
|
-
\r
|
|
1452
|
-
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point){\r
|
|
1453
|
-
vec3 v01 = point - planeOrigin;\r
|
|
1454
|
-
float d = dot(planeNormal, v01);\r
|
|
1455
|
-
return (point - planeNormal * d);\r
|
|
1456
|
-
}\r
|
|
1457
|
-
\r
|
|
1458
|
-
void main() {\r
|
|
1459
|
-
out_FragColor = texture(colorTexture, v_textureCoordinates);\r
|
|
1460
|
-
float depth = getDepth();\r
|
|
1461
|
-
vec4 viewPos = toEye(v_textureCoordinates, depth);\r
|
|
1462
|
-
vec4 center = czm_view * vec4(centerWC, 1);\r
|
|
1463
|
-
vec4 planeNormal = czm_view * vec4(normalWC, 0);\r
|
|
1464
|
-
vec3 prjOnPlane = pointProjectOnPlane(planeNormal.xyz, center.xyz, viewPos.xyz);\r
|
|
1465
|
-
float dis = length(prjOnPlane.xyz - center.xyz);\r
|
|
1466
|
-
float time = fract(czm_frameNumber * speed / 1000.0);\r
|
|
1467
|
-
float temp = radius * time;\r
|
|
1468
|
-
if (dis < temp) {\r
|
|
1469
|
-
float f = 1.0 - abs(temp - dis) / temp;\r
|
|
1470
|
-
f = pow(f, 4.0);\r
|
|
1471
|
-
out_FragColor = mix(out_FragColor, color, f);\r
|
|
1472
|
-
}\r
|
|
1473
|
-
}\r
|
|
1474
|
-
`;var no=class extends ae{constructor(e,t,r,s={}){super(e),this._delegate=void 0,this._position=g.parsePosition(t),this._radius=r||100,this._color=s.color||i.Color.RED,this._speed=s.speed||2}get type(){return q.CIRCLE_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cartesian3),r=this;this._delegate=new i.PostProcessStage({name:x.uuid(),fragmentShader:wp,uniforms:{centerWC:function(){return e},normalWC:function(){return t},radius:function(){return r._radius},speed:function(){return r._speed},color:function(){return r._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}};q.CIRCLE_SCAN="circle_scan";var xp=no;var lo=class extends ae{constructor(e,t={}){super(e),this._options=t,this._positions=[],this._durations=[3],this._currentIndex=0,this._timer=void 0}get type(){return q.FLYING}get positions(){return this._positions}set positions(e){this._positions=g.parsePositions(e)}get durations(){return this._durations}set durations(e){this._durations=e}_cameraFly(){let e=this,t=this._viewer.camera,r=this._positions[this._currentIndex],s=()=>{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)};r&&t.flyTo({destination:u.transformWGS84ToCartesian(r),orientation:{heading:i.Math.toRadians(r.heading),pitch:i.Math.toRadians(r.pitch),roll:i.Math.toRadians(r.roll)},complete:s,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}};q.FLYING="flying";var Cp=lo;var ho=class extends ae{constructor(e,t={}){super(e),this._options=t}get type(){return q.GLOBE_ROTATE}_icrf(e,t){if(e.mode!==i.SceneMode.SCENE3D)return!0;let r=i.Transforms.computeIcrfToFixedMatrix(t);if(r){let s=this._viewer.camera,a=i.Cartesian3.clone(s.position),o=i.Matrix4.fromRotationTranslation(r);s.lookAtTransform(o,a)}}_bindEvent(){this._viewer.clock.multiplier=this._options.speed||12*1e3,this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}_unbindEvent(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}};q.GLOBE_ROTATE="globe_rotate";var Tp=ho;var Ep=`in vec2 v_textureCoordinates;\r
|
|
1475
|
-
uniform sampler2D colorTexture;\r
|
|
1476
|
-
uniform sampler2D depthTexture;\r
|
|
1477
|
-
uniform vec3 centerWC;\r
|
|
1478
|
-
uniform vec3 planeNormalWC;\r
|
|
1479
|
-
uniform vec3 lineNormalWC;\r
|
|
1480
|
-
uniform float radius;\r
|
|
1481
|
-
uniform vec4 color;\r
|
|
1482
|
-
\r
|
|
1483
|
-
float getDepth(){\r
|
|
1484
|
-
float z_window = czm_unpackDepth(texture(depthTexture, v_textureCoordinates));\r
|
|
1485
|
-
z_window = czm_reverseLogDepth(z_window);\r
|
|
1486
|
-
float n_range = czm_depthRange.near;\r
|
|
1487
|
-
float f_range = czm_depthRange.far;\r
|
|
1488
|
-
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\r
|
|
1489
|
-
}\r
|
|
1490
|
-
\r
|
|
1491
|
-
vec4 toEye(in vec2 uv, in float depth){\r
|
|
1492
|
-
vec2 xy = vec2((uv.x * 2.0 - 1.0), (uv.y * 2.0 - 1.0));\r
|
|
1493
|
-
vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);\r
|
|
1494
|
-
posInCamera = posInCamera / posInCamera.w;\r
|
|
1495
|
-
return posInCamera;\r
|
|
1496
|
-
}\r
|
|
1497
|
-
\r
|
|
1498
|
-
bool isPointOnLineRight(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt)\r
|
|
1499
|
-
{\r
|
|
1500
|
-
vec3 v01 = testPt - ptOnLine;\r
|
|
1501
|
-
normalize(v01);\r
|
|
1502
|
-
vec3 temp = cross(v01, lineNormal);\r
|
|
1503
|
-
vec4 planeNormalEC = czm_view * vec4(planeNormalWC, 0);\r
|
|
1504
|
-
float d = dot(temp, planeNormalEC.xyz);\r
|
|
1505
|
-
return d > 0.5;\r
|
|
1506
|
-
}\r
|
|
1507
|
-
\r
|
|
1508
|
-
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point)\r
|
|
1509
|
-
{\r
|
|
1510
|
-
vec3 v01 = point -planeOrigin;\r
|
|
1511
|
-
float d = dot(planeNormal, v01);\r
|
|
1512
|
-
return (point - planeNormal * d);\r
|
|
1513
|
-
}\r
|
|
1514
|
-
\r
|
|
1515
|
-
float distancePointToLine(in vec3 ptOnLine, in vec3 lineNormal, in vec3 testPt)\r
|
|
1516
|
-
{\r
|
|
1517
|
-
vec3 tempPt = pointProjectOnPlane(lineNormal, ptOnLine, testPt);\r
|
|
1518
|
-
return length(tempPt - ptOnLine);\r
|
|
1519
|
-
}\r
|
|
1520
|
-
\r
|
|
1521
|
-
void main() {\r
|
|
1522
|
-
out_FragColor = texture(colorTexture, v_textureCoordinates);\r
|
|
1523
|
-
float depth = getDepth();\r
|
|
1524
|
-
vec4 viewPos = toEye(v_textureCoordinates, depth);\r
|
|
1525
|
-
vec4 centerEC = czm_view * vec4(centerWC, 1);\r
|
|
1526
|
-
vec4 planeNormalEC = czm_view * vec4(planeNormalWC, 0);\r
|
|
1527
|
-
vec4 lineNormalEC = czm_view * vec4(lineNormalWC, 0);\r
|
|
1528
|
-
vec3 prjOnPlane = pointProjectOnPlane(planeNormalEC.xyz, centerEC.xyz, viewPos.xyz);\r
|
|
1529
|
-
float dis = length(prjOnPlane.xyz - centerEC.xyz);\r
|
|
1530
|
-
float diameter = radius * 2.0;\r
|
|
1531
|
-
if (dis < radius){\r
|
|
1532
|
-
float f0 = 1.0 -abs(radius - dis) / radius;\r
|
|
1533
|
-
f0 = pow(f0, 64.0);\r
|
|
1534
|
-
vec3 lineEndPt = vec3(centerEC.xyz) + vec3(lineNormalEC.xyz) * radius;\r
|
|
1535
|
-
float f = 0.0;\r
|
|
1536
|
-
if (isPointOnLineRight(centerEC.xyz, lineNormalEC.xyz, prjOnPlane.xyz)) {\r
|
|
1537
|
-
float dis1= length(prjOnPlane.xyz - lineEndPt);\r
|
|
1538
|
-
f = abs(diameter - dis1) / diameter;\r
|
|
1539
|
-
f = pow(f, 3.0);\r
|
|
1540
|
-
}\r
|
|
1541
|
-
out_FragColor = mix(out_FragColor, color, f + f0);\r
|
|
1542
|
-
}\r
|
|
1543
|
-
}\r
|
|
1544
|
-
`;var co=class extends ae{constructor(e,t,r,s={}){super(e),this._position=g.parsePosition(t),this._radius=r||100,this._color=s.color||i.Color.BLUE,this._speed=s.speed||3,this._delegate=void 0}get type(){return q.RADAR_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cartesian3),r=new Date().getTime(),s=this;this._delegate=new i.PostProcessStage({name:x.uuid(),fragmentShader:Ep,uniforms:{centerWC:function(){return e},planeNormalWC:function(){return t},lineNormalWC:function(){let a=new i.Quaternion,o=new i.Matrix3,n=i.Cartesian3.cross(i.Cartesian3.UNIT_Z,t,new i.Cartesian3),h=new Date().getTime(),c=i.Math.PI*2*((h-r)/1e4)*s._speed;return i.Quaternion.fromAxisAngle(t,c,a),i.Matrix3.fromQuaternion(a,o),i.Matrix3.multiplyByVector(o,n,n),i.Cartesian3.normalize(n,n),n},radius:function(){return s._radius},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}};q.RADAR_SCAN="radar_scan";var Pp=co;var po=class{constructor(e,t=!1,r=1,s=[]){this._viewer=e,this._delegate=void 0,this._enable=t,this._gradations=r,this._selected=s,this._state=m.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?m.ENABLED:m.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=i.PostProcessStageLibrary.createBlackAndWhiteStage(),this._delegate&&(this._delegate.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this._delegate))}},Mp=po;var mo=class{constructor(e,t=!1,r=128,s=-.3,a=!1,o=1,n=3.8,h=5,c=[]){this._viewer=e,this._enable=t,this._contrast=r,this._brightness=s,this._glowOnly=a,this._delta=o,this._sigma=n,this._stepSize=h,this._selected=c,this._state=m.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?m.ENABLED:m.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}},Ap=mo;var uo=class{constructor(e,t=!1,r=1,s=[]){this._viewer=e,this._delegate=void 0,this._enable=t,this._intensity=r,this._selected=s,this._state=m.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?m.ENABLED:m.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=i.PostProcessStageLibrary.createBrightnessStage(),this._delegate&&(this._delegate.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this._delegate))}},bp=uo;var fo=class{constructor(e,t=!1,r=87,s=1,a=3.8,o=2.5,n=[]){this._viewer=e,this._delegate=void 0,this._enable=t,this._focalDistance=r,this._delta=s,this._sigma=a,this._stepSize=o,this._selected=n,this._state=m.INITIALIZED}get type(){return"depth_of_field"}get enable(){return this._enable}set enable(e){this._enable=e,i.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?m.ENABLED:m.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=i.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))}},Sp=fo;var _o=class{constructor(e,t=!1,r=6,s=61,a=.4,o=.4,n=[]){this._viewer=e,this._delegate=void 0,this._enable=t,this._intensity=r,this._distortion=s,this._dirtAmount=a,this._haloWidth=o,this._selected=n,this._state=m.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?m.ENABLED:m.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=i.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))}},Ip=_o;var go=class{constructor(e,t=!1,r=[]){this._viewer=e,this._enable=t,this._selected=r,this._state=m.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?m.ENABLED:m.DISABLED}get selected(){return this._selected}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}_createPostProcessStage(){this._delegate=i.PostProcessStageLibrary.createNightVisionStage(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate)}},Dp=go;var yo=class{constructor(e,t=!1,r=i.Color.GREEN,s=.5,a=[]){this._viewer=e,this._delegate=void 0,this._enable=t,this._color=r,this._length=s,this._selected=a,this._state=m.INITIALIZED}get type(){return"silhouette"}get enable(){return this._enable}set enable(e){this._enable=e,i.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?m.ENABLED:m.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=i.PostProcessStageLibrary.createSilhouetteStage(),this._delegate&&(this._delegate.uniforms.color=this._color,this._delegate.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this._delegate))}},Lp=yo;var Rp=`in vec2 v_textureCoordinates;
|
|
1545
|
-
uniform sampler2D colorTexture;
|
|
1546
|
-
uniform sampler2D depthTexture;
|
|
1547
|
-
uniform float u_depthThreshold;
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
void main(void) {
|
|
1551
|
-
float depth = czm_readDepth(depthTexture, v_textureCoordinates);
|
|
1552
|
-
vec4 color = texture(colorTexture, v_textureCoordinates);
|
|
1553
|
-
if (depth < 1.0 - u_depthThreshold){
|
|
1554
|
-
out_FragColor = color;
|
|
1555
|
-
} else {
|
|
1556
|
-
out_FragColor = vec4(1., 0., 0., 1.);
|
|
1557
|
-
}
|
|
1558
|
-
}
|
|
1559
|
-
`;var Op=`in vec2 v_textureCoordinates;
|
|
1560
|
-
|
|
1561
|
-
uniform sampler2D colorTexture;
|
|
1562
|
-
uniform sampler2D u_silhouetteTexture;
|
|
1563
|
-
uniform sampler2D u_redTexture;
|
|
1564
|
-
uniform vec4 u_color;
|
|
1565
|
-
|
|
1566
|
-
void main(void) {
|
|
1567
|
-
vec4 color = texture(colorTexture, v_textureCoordinates);
|
|
1568
|
-
vec4 silhouetteColor = texture(u_silhouetteTexture, v_textureCoordinates);
|
|
1569
|
-
vec4 redColor = texture(u_redTexture, v_textureCoordinates);
|
|
1570
|
-
|
|
1571
|
-
if (redColor.r == 1.0){
|
|
1572
|
-
out_FragColor = mix(color, u_color, silhouetteColor.a);
|
|
1573
|
-
} else {
|
|
1574
|
-
out_FragColor = color;
|
|
1575
|
-
}
|
|
1576
|
-
}
|
|
1577
|
-
`;var vo=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._depthThreshold=1e-5,this._color=i.Color.RED,this._state=m.INITIALIZED}get type(){return"skyLine"}set enable(e){this._enable=e,!this._delegate&&this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?m.ENABLED:m.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=i.PostProcessStageLibrary.createEdgeDetectionStage(),t=this,r=new i.PostProcessStage({fragmentShader:Rp,uniforms:{u_depthThreshold:function(){return t._depthThreshold}}}),s=new i.PostProcessStage({fragmentShader:Op,uniforms:{u_silhouetteTexture:e.name,u_redTexture:r.name,u_color:function(){return t._color}}});this._delegate=new i.PostProcessStageComposite({stages:[e,r,s],inputPreviousStageTexture:!1,uniforms:e.uniforms}),this._viewer.scene.postProcessStages.add(this._delegate)}},kp=vo;var wo=class{constructor(e){if(!e)throw Error("missing viewer param");this._blackAndWhite=new Mp(e),this._bloom=new Ap(e),this._brightness=new bp(e),this._depthOfField=new Sp(e),this._lensFlare=new Ip(e),this._night=new Dp(e),this._silhouette=new Lp(e),this._skyLine=new kp(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}},ju=wo;var zp=`in vec2 v_textureCoordinates;\r
|
|
1578
|
-
uniform sampler2D colorTexture;\r
|
|
1579
|
-
uniform sampler2D depthTexture;\r
|
|
1580
|
-
uniform vec4 fogByDistance;\r
|
|
1581
|
-
uniform vec4 fogColor;\r
|
|
1582
|
-
\r
|
|
1583
|
-
\r
|
|
1584
|
-
float getDistance(sampler2D depthTexture, vec2 texCoords){\r
|
|
1585
|
-
float depth = czm_unpackDepth(texture(depthTexture, texCoords));\r
|
|
1586
|
-
if (depth == 0.0) {\r
|
|
1587
|
-
return czm_infinity;\r
|
|
1588
|
-
}\r
|
|
1589
|
-
vec4 eyeCoordinate = czm_windowToEyeCoordinates(gl_FragCoord.xy, depth);\r
|
|
1590
|
-
return -eyeCoordinate.z / eyeCoordinate.w;\r
|
|
1591
|
-
}\r
|
|
1592
|
-
\r
|
|
1593
|
-
\r
|
|
1594
|
-
float interpolateByDistance(vec4 nearFarScalar, float distance){\r
|
|
1595
|
-
float startDistance = nearFarScalar.x;\r
|
|
1596
|
-
float startValue = nearFarScalar.y;\r
|
|
1597
|
-
float endDistance = nearFarScalar.z;\r
|
|
1598
|
-
float endValue = nearFarScalar.w;\r
|
|
1599
|
-
float t = clamp((distance - startDistance) / (endDistance - startDistance), 0.0, 1.0);\r
|
|
1600
|
-
return mix(startValue, endValue, t);\r
|
|
1601
|
-
}\r
|
|
1602
|
-
\r
|
|
1603
|
-
vec4 alphaBlend(vec4 sourceColor, vec4 destinationColor){\r
|
|
1604
|
-
return sourceColor * vec4(sourceColor.aaa, 1.0) + destinationColor * (1.0 - sourceColor.a);\r
|
|
1605
|
-
}\r
|
|
1606
|
-
\r
|
|
1607
|
-
void main(void){\r
|
|
1608
|
-
float distance = getDistance(depthTexture, v_textureCoordinates);\r
|
|
1609
|
-
vec4 sceneColor = texture(colorTexture, v_textureCoordinates);\r
|
|
1610
|
-
float blendAmount = interpolateByDistance(fogByDistance, distance);\r
|
|
1611
|
-
vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);\r
|
|
1612
|
-
out_FragColor = alphaBlend(finalFogColor, sceneColor);\r
|
|
1613
|
-
}\r
|
|
1614
|
-
`;var xo=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 i.Color(0,0,0,1),this._state=m.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 t,r,s,a;this._fogByDistance=e,this._delegate&&(this._delegate.uniforms.fogByDistance=new i.Cartesian4(((t=this._fogByDistance)==null?void 0:t.near)||10,((r=this._fogByDistance)==null?void 0:r.nearValue)||0,((s=this._fogByDistance)==null?void 0:s.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,t,r,s;this._delegate=new i.PostProcessStage({name:this._id,fragmentShader:zp,uniforms:{fogByDistance:new i.Cartesian4(((e=this._fogByDistance)==null?void 0:e.near)||10,((t=this._fogByDistance)==null?void 0:t.nearValue)||0,((r=this._fogByDistance)==null?void 0:r.far)||200,((s=this._fogByDistance)==null?void 0:s.farValue)||1),fogColor:this._color}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Np=xo;var Fp=`in vec2 v_textureCoordinates;\r
|
|
1615
|
-
uniform sampler2D colorTexture;\r
|
|
1616
|
-
uniform float speed;\r
|
|
1617
|
-
uniform float mixNum;\r
|
|
1618
|
-
\r
|
|
1619
|
-
float hash(float x){\r
|
|
1620
|
-
return fract(sin(x*23.3)*13.13);\r
|
|
1621
|
-
}\r
|
|
1622
|
-
\r
|
|
1623
|
-
void main(){\r
|
|
1624
|
-
float time = czm_frameNumber * speed / 1000.0;\r
|
|
1625
|
-
vec2 resolution = czm_viewport.zw;\r
|
|
1626
|
-
vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x, resolution.y);\r
|
|
1627
|
-
vec3 c=vec3(.1, .2, .3);\r
|
|
1628
|
-
float a=-.3;\r
|
|
1629
|
-
float si=sin(a), co=cos(a);\r
|
|
1630
|
-
uv*=mat2(co, -si, si, co);\r
|
|
1631
|
-
uv*=length(uv+vec2(0, 4.9))*.3+1.;\r
|
|
1632
|
-
float v=1.-sin(hash(floor(uv.x*100.))*2.);\r
|
|
1633
|
-
float b=clamp(abs(sin(20.*time*v+uv.y*(5./(2.+v))))-.95, 0., 1.)*10.;\r
|
|
1634
|
-
c*=v*b;\r
|
|
1635
|
-
out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c, 1), mixNum);\r
|
|
1636
|
-
}\r
|
|
1637
|
-
`;var Co=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=m.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 i.PostProcessStage({name:this._id,fragmentShader:Fp,uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Wp=Co;var Gp=`in vec2 v_textureCoordinates;\r
|
|
1638
|
-
uniform sampler2D colorTexture;\r
|
|
1639
|
-
uniform float speed;\r
|
|
1640
|
-
\r
|
|
1641
|
-
float snow(vec2 uv, float scale){\r
|
|
1642
|
-
float time = czm_frameNumber * speed / 1000.0;\r
|
|
1643
|
-
float w=smoothstep(1., 0., -uv.y*(scale/10.));\r
|
|
1644
|
-
if (w<.1)return 0.;\r
|
|
1645
|
-
uv+=time/scale;\r
|
|
1646
|
-
uv.y+=time*2./scale;\r
|
|
1647
|
-
uv.x+=sin(uv.y+time*.5)/scale;\r
|
|
1648
|
-
uv*=scale;\r
|
|
1649
|
-
vec2 s=floor(uv), f=fract(uv), p;\r
|
|
1650
|
-
float k=3., d;\r
|
|
1651
|
-
p=.5+.35*sin(11.*fract(sin((s+p+scale)*mat2(7, 3, 6, 5))*5.))-f;\r
|
|
1652
|
-
d=length(p);\r
|
|
1653
|
-
k=min(d, k);\r
|
|
1654
|
-
k=smoothstep(0., k, sin(f.x+f.y)*0.01);\r
|
|
1655
|
-
return k*w;\r
|
|
1656
|
-
}\r
|
|
1657
|
-
\r
|
|
1658
|
-
void main(){\r
|
|
1659
|
-
vec2 resolution = czm_viewport.zw;\r
|
|
1660
|
-
vec2 uv=(gl_FragCoord.xy*2.-resolution.xy)/min(resolution.x, resolution.y);\r
|
|
1661
|
-
vec3 finalColor=vec3(0);\r
|
|
1662
|
-
float c = 0.0;\r
|
|
1663
|
-
c+=snow(uv, 10.);\r
|
|
1664
|
-
c+=snow(uv, 8.);\r
|
|
1665
|
-
c+=snow(uv, 6.);\r
|
|
1666
|
-
c+=snow(uv, 5.);\r
|
|
1667
|
-
finalColor=(vec3(c));\r
|
|
1668
|
-
out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor, 1), 0.3);\r
|
|
1669
|
-
}\r
|
|
1670
|
-
`;var To=class{constructor(e){this._id=x.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._state=m.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 i.PostProcessStage({name:this._id,fragmentShader:Gp,uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Hp=To;var Bp="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAQACAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgv/xAC1EAACAQMDAgQDBQUEBAAAAX0BAgMABBEFEiExQQYTUWEHInEUMoGRoQgjQrHBFVLR8CQzYnKCCQoWFxgZGiUmJygpKjQ1Njc4OTpDREVGR0hJSlNUVVZXWFlaY2RlZmdoaWpzdHV2d3h5eoOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4eLj5OXm5+jp6vHy8/T19vf4+fr/xAAfAQADAQEBAQEBAQEBAAAAAAAAAQIDBAUGBwgJCgv/xAC1EQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre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kUjAB/KgDKIxTa0mVeyj8qZ5Q9KAKIAowK0BGPQUmwe35UAUgAOhqZX7frUvlD2o8laAEV/cGnbUblhz7Uxov7tM2yelAErRRt0OPwpi25z8rUgEnp+tJ+8/u0ATKzL3qQSt6/pVbL/AN39acN/ofzoAmNwR1H6Go2nbtj9aT5vQ0ZagBvnSe1J5jt1xT8Me36UbT6UAQnd6/rSYcd/1qx5Z9KNh9qAIlLDvSncepP0qTyzQIz7UAQFOOv60qqB3NTeWfajyj/kUARYFPDFehp3lH1FHlH1oATcT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q==";var Eo=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=m.INITIALIZED}get type(){return"cloud"}get enable(){return this._enable}set enable(e){!this._viewer.scene.mode!==i.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,t){this._rotateAmount!==0&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._delegate.modelMatrix=i.Transforms.headingPitchRollToFixedFrame(new i.Cartesian3,new i.HeadingPitchRoll(i.Math.toRadians(this._heading),0,0)))}_createPrimitive(){this._delegate=new i.Primitive({appearance:new i.EllipsoidSurfaceAppearance({material:new i.Material({fabric:{type:"Image",uniforms:{color:new i.Color(1,1,1,1),image:Bp},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})}),this._delegate.geometryInstances=new i.GeometryInstance({geometry:new i.EllipsoidGeometry({vertexFormat:i.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)}},Up=Eo;var Po=class{constructor(e){if(!e)throw Error("missing viewer param");this._fog=new Np(e),this._rain=new Wp(e),this._snow=new Hp(e),this._cloud=new Up(e)}get fog(){return this._fog}get rain(){return this._rain}get snow(){return this._snow}get cloud(){return this._cloud}},Xu=Po;var Mo=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===i.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(t=>{this._flags[t]=!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 t;switch(e.keyCode){case 87:case 38:e.shiftKey?t="moveUp":t="moveForward";break;case 83:case 40:e.shiftKey?t="moveDown":t="moveBackward";break;case 65:case 37:t="moveLeft";break;case 68:case 39:t="moveRight";break;case 81:t="turnLeft";break;case 69:t="turnRight";break;default:break}return t}_onClick(){this._viewer.scene.canvas.focus()}_onKeydown(e){let t=this._getFlagForKeyCode(e);t&&(this._flags[t]=!0)}_onKeyup(e){Object.keys(this._flags).forEach(t=>{this._flags[t]=!1})}_onTick(){let e=this._viewer.scene.camera,r=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(e.position).height/this._moveRate,s=i.Cartesian3.clone(e.position,new i.Cartesian3);this._flags.moveForward&&e.moveForward(r),this._flags.moveBackward&&e.moveBackward(r),this._flags.moveUp&&e.moveUp(r),this._flags.moveDown&&e.moveDown(r),this._flags.moveLeft&&e.moveLeft(r),this._flags.moveRight&&e.moveRight(r),this._flags.turnLeft&&e.rotate(s,-this._rotateRate),this._flags.turnRight&&e.rotate(s,this._rotateRate)}},Vp=Mo;var Ao=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(ne.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}addPath(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.fire(ne.ADD),this._cache[e.pathId]=e),this}addPaths(e){return Array.isArray(e)&&e.forEach(t=>{this.addPath(t)}),this}removePath(e){return e&&this._cache.hasOwnProperty(e.pathId)&&(delete this._cache[e.pathId],e.pathEvent.fire(ne.REMOVE)),this}getPath(e){let t=this.getPaths().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}getPaths(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}activate(e,t={}){var r;return!e||(e==null?void 0:e.pathId)===((r=this._activedPath)==null?void 0:r.pathId)||!this._cache.hasOwnProperty(e==null?void 0:e.pathId)?this:(this._viewOption=t,this._activedPath&&this.deactivate(),this._activedPath=e,this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(ne.RESET_TIME_LINE),this._viewer.on(D.POST_RENDER,this._onPostRender,this),this)}deactivate(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this}clear(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this}},jp=Ao;var bo=class{constructor(e,t,r){this._id=x.uuid(),this._bid=void 0,this._positions=g.parsePositions(e),this._duration=t||20,this._pathMode=r||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=i.JulianDate.now(),this._pathEvent=new $i,this._pathEvent.on(ne.ADD,this._onAdd,this),this._pathEvent.on(ne.REMOVE,this._onRemove,this),this._pathEvent.on(ne.POST_RENDER,this._onPostRender,this),this._pathEvent.on(ne.RESET_TIME_LINE,this._resetTimeLine,this),this._state=m.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=g.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=m.ADDED}_onRemove(){this._state=m.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this.actived)return!1;let r=i.JulianDate.now();if(i.JulianDate.lessThan(r,this._endTime)&&this._sampledPosition){let s=this._sampledPosition.getValue(r),a=this._sampledPosition.getValue(i.JulianDate.addSeconds(r,.001,new i.JulianDate));s&&a&&e.camera.lookAt(s,new i.HeadingPitchRange(we(s,a),i.Math.toRadians((t==null?void 0:t.pitch)||-20),(t==null?void 0:t.range)||2e3))}else e.camera.lookAtTransform(i.Matrix4.IDENTITY),this._actived=!1}_resetTimeLine(){if(!this._positions||!this._positions.length)return!1;let e=i.JulianDate.now(),t=0,r=[];if(this._pathMode==="speed"){let s=se(this._positions)/this._duration;r=this._positions.map((a,o,n)=>(o!==0&&(t+=se([n[o-1],a])/s),i.JulianDate.addSeconds(e,t,new i.JulianDate)))}else{let s=this._positions.length,a=(this._duration-this._duration%s)/s;r=this._positions.map((o,n)=>i.JulianDate.addSeconds(e,n*a,new i.JulianDate))}this._sampledPosition=new i.SampledPositionProperty,this._sampledPosition.addSamples(r,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:i.HermitePolynomialApproximation}),this._endTime=r[r.length-1],this._actived=!0}},Zp=bo;var Qu={FP:"1",TP:"2",TRACKED:"tracked",FREE:"free"},be=Qu;var So=class{constructor(e){this._viewer=e,this._cache={},this._delegete=new i.CustomDataSource("history-track-layer"),this._viewer.dataSources.add(this._delegete),this._activedTrack=void 0,this._viewOption={},this._stopTime=void 0,this._state=m.INITIALIZED}get delegate(){return this._delegete.entities}get state(){return this._state}_onPostRender(){Object.keys(this._cache).forEach(e=>{let t=this._cache[e];t.trackEvent&&t.trackEvent.fire(oe.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(oe.ADD,this),this._cache[e.trackId]=e),this}addTracks(e){return Array.isArray(e)&&e.forEach(t=>{this.addTrack(t)}),this}getTrack(e){let t=this.getTracks().filter(r=>r.id===e);return t&&t.length?t[0]:void 0}removeTrack(e){return e&&e.trackEvent&&this._cache.hasOwnProperty(e.trackId)&&(e.trackEvent.fire(oe.REMOVE,this),delete this._cache[e.trackId]),this}getTracks(){let e=[];return Object.keys(this._cache).forEach(t=>{e.push(this._cache[t])}),e}play(){let e=i.JulianDate.now();return Object.keys(this._cache).forEach(t=>{let r=this._cache[t];r.startTime=e,r.viewed=!1}),this._activedTrack=void 0,this._stopTime=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.on(D.POST_RENDER,this._onPostRender,this),this._state=m.PLAY,this}pause(){return this._stopTime=i.JulianDate.now(),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._state=m.PAUSE,this}restore(){if(this._state!==m.PAUSE)return this;if(this._stopTime){let e=i.JulianDate.now();Object.keys(this._cache).forEach(t=>{this._cache[t].trackEvent.fire(oe.RESET_TIME_LINE,{stopTime:this._stopTime,duration:i.JulianDate.secondsDifference(e,this._stopTime)})})}return this._viewer.off(D.POST_RENDER,this._onPostRender,this),this._viewer.on(D.POST_RENDER,this._onPostRender,this),this._state=m.PLAY,this}viewTrack(e,t={}){if(!this._cache.hasOwnProperty(e.trackId))throw new Error("TrackController: track does not added ");return this._viewOption=t,this._activedTrack&&(this._activedTrack.viewed=!1),e.viewed=!0,this._activedTrack=e,t.mode===be.FREE&&(this._viewer.camera.lookAtTransform(i.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(i.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(D.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}},Yp=So;var Ku={clampToGround:!1,clampToTileset:!1,interpolationType:"Linear",interpolationDegree:2,endDelayTime:.5,headingOffset:0},$u={width:2,material:i.Color.ORANGE,clampToGround:!0,depthFailMaterial:i.Color.ORANGE.withAlpha(.8)},Io=class{constructor(e,t,r,s){this._id=x.uuid(),this._bid=void 0,this._positions=g.parsePositions(e),this._duration=t||20,this._callback=r,this._options={...Ku,...s},this._controller=void 0,this._sampledPosition=void 0,this._velocityOrientation=void 0,this._viewed=!1,this._delegate=new i.Entity,this._pathPositions=[],this._path=new i.Entity({show:!1,polyline:{positions:new i.CallbackProperty(()=>this._pathPositions,!1)}}),this._positionIndex=0,this._timeLine=[],this._startTime=void 0,this._endTime=void 0,this._trackEvent=new Qi,this._trackEvent.on(oe.POST_RENDER,this._onPostRender,this),this._trackEvent.on(oe.ADD,this._onAdd,this),this._trackEvent.on(oe.REMOVE,this._onRemove,this),this._trackEvent.on(oe.RESET_TIME_LINE,this._resetTimeLine,this),this._state=m.INITIALIZED}get currentDistance(){return se(g.parsePositions(this._pathPositions))}get currentPosition(){let[e]=this._pathPositions.slice(-1);return g.parsePosition(e)}get allDistance(){return se(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=g.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=i.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=i.JulianDate.now()),this._state=m.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=m.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this._startTime||!this._endTime)return!1;let r=i.JulianDate.now();if(i.JulianDate.lessThanOrEquals(r,this._endTime)){let s=this._sampledPosition.getValue(r);if(!s)return!1;this._pathPositions.push(s),this._options.clampToTileset?this._delegate.position=e.scene.clampToHeight(s,[this._delegate]):this._delegate.position=s;let a=this._velocityOrientation.getValue(r);if(a){let n=i.Quaternion.fromHeadingPitchRoll(new i.HeadingPitchRoll(i.Math.toRadians(this._options.headingOffset||0),0,0),new i.Quaternion);this._delegate.orientation=i.Quaternion.multiply(a,n,new i.Quaternion)}let o=this._timeLine[this._positionIndex];if(o){let n=i.JulianDate.secondsDifference(r,o);if(n>=0&&n<=1){let h=this._positions[this._positionIndex]||void 0;if(h&&a){let c=i.Matrix3.fromQuaternion(a),p=i.Matrix4.fromRotationTranslation(c,s),f=i.Transforms.fixedFrameToHeadingPitchRoll(p);h.heading=i.Math.toDegrees(f.heading),h.pitch=i.Math.toDegrees(f.pitch),h.roll=i.Math.toDegrees(f.roll)}this._callback&&this._callback(h,this._positionIndex+1===this._positions.length),this._positionIndex++,this._options.loop&&this._positionIndex===this._positions.length&&this._restart()}}}this._setCameraView(e,t)}_restart(){this._startTime=i.JulianDate.now(),this._resetTimeLine({})}_setCameraView(e,t){var s,a,o;if(!this._viewed)return!1;let r=i.JulianDate.now();if(i.JulianDate.greaterThan(r,this._endTime))e.camera.lookAtTransform(i.Matrix4.IDENTITY),e.delegate.trackedEntity&&(e.delegate.trackedEntity=void 0),this._viewed=!1;else{let n=this._sampledPosition.getValue(r),h=this._sampledPosition.getValue(i.JulianDate.addSeconds(r,1/60,new i.JulianDate));n&&h&&((t==null?void 0:t.mode)===be.TRACKED&&((a=(s=e.delegate)==null?void 0:s.trackedEntity)==null?void 0:a.id)!==((o=this._delegate)==null?void 0:o.id)?e.delegate.trackedEntity=this._delegate:(t==null?void 0:t.mode)===be.FP?e.camera.lookAt(n,new i.HeadingPitchRange(we(n,h),i.Math.toRadians((t==null?void 0:t.pitch)||0),(t==null?void 0:t.range)||10)):(t==null?void 0:t.mode)===be.TP&&e.camera.lookAt(n,new i.HeadingPitchRange(0,i.Math.toRadians((t==null?void 0:t.pitch)||-90),(t==null?void 0:t.range)||1e3)))}}_resetTimeLine(e){var r;if(!this._startTime||!this._duration||!((r=this._positions)!=null&&r.length))return!1;let t=0;if(!(e!=null&&e.stopTime)&&!(e!=null&&e.duration)){let s=se(this._positions)/this._duration;this._timeLine=this._positions.map((a,o,n)=>(o!==0&&(t+=se([n[o-1],a])/s),i.JulianDate.addSeconds(this._startTime,t,new i.JulianDate))),this._pathPositions=[],this._positionIndex=0}else e!=null&&e.stopTime&&(e!=null&&e.duration)&&(this._duration+=e.duration,this._timeLine=this._timeLine.map(s=>(i.JulianDate.greaterThan(s,e.stopTime)&&(s=i.JulianDate.addSeconds(s,e.duration,new i.JulianDate)),s)));this._sampledPosition=new i.SampledPositionProperty,this._sampledPosition.addSamples(this._timeLine,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.ExtrapolationType.HOLD,this._options.interpolationType==="Hermite"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||2,interpolationAlgorithm:i.HermitePolynomialApproximation}):this._options.interpolationType==="Linear"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||1,interpolationAlgorithm:i.LinearApproximation}):this._options.interpolationType==="Lagrange"&&this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||5,interpolationAlgorithm:i.LagrangePolynomialApproximation}),this._velocityOrientation=new i.VelocityOrientationProperty(this._sampledPosition),this._endTime=i.JulianDate.addSeconds(this._timeLine[this._timeLine.length-1],this._options.endDelayTime,new i.JulianDate)}addPosition(e,t){return this._positions.push(g.parsePosition(e)),this._duration+=t,this._resetTimeLine({}),this}setModel(e,t){return this._delegate.model={...t,uri:e,heightReference:this._options.clampToGround?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},this}setBillboard(e,t){return this._delegate.billboard={...t,image:e,heightReference:this._options.clampToGround?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},this}setLabel(e,t){return this._delegate.label={...t,text:e,heightReference:this._options.clampToGround?i.HeightReference.CLAMP_TO_GROUND:i.HeightReference.NONE},this}setPath(e,t={}){return this._path.show=!!e,x.merge(this._path.polyline,$u,t),this}},Jp=Io;var ef={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"},le=ef;var Do=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 t=0;t<e.length-1;t++){let r=e[t],s=e[t+1];typeof r.equals=="function"&&r.equals(s)&&(console.log("element",r),console.log("element",s),e.splice(t,1),t--)}return e}_bindEvent(){this.drawTool.on(E.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(E.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(E.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.on(E.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(E.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(E.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(E.DELETE_ANCHOR,this._onDeleteAnchor,this),this.drawTool.off(E.DRAW_STOP,this._onDrawStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.drawTool.activate(t),this.drawTool.tooltipMess="\u5355\u51FB\u5F00\u59CB\u7ED8\u5236",this._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},hi=Do;var Lo=class extends hi{constructor(e){super(e)}_mountedHook(){this._delegate=new i.Entity({polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){let t=this._positions.length;this._positions.push(e),t>0&&this.drawTool.fire(E.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(E.DRAW_STOP,e))}},he=Lo;var Ro=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._delegate=new i.Entity,this._delegate.merge(e),this._options={},this._positions=[]}get editTool(){return this._viewer.editTool}_mountedHook(){}_mountAnchor(){}_onAnchorMoving({pickedAnchor:e,position:t}){}_onEditAnchorStop({pickedAnchor:e,position:t}){}_onEditStop({pickedAnchor:e,position:t}){this._unbindEvent(),this._viewer.editTool.deactivate()}_bindEvent(){return this.editTool.on(E.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(E.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(E.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(E.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(E.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(E.EDIT_STOP,this._onEditStop,this)}start(e,t){return this._viewer=e.viewer,this._layer=e.layer,this._options=t,this._viewer.editTool.deactivate(),this._viewer.editTool.activate(t),this._mountedHook(),this._mountAnchor(),this._unbindEvent(),this._bindEvent(),this}},ci=Ro;var Oo=class extends ci{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 i.CallbackProperty(()=>this._positions.length>1?this._positions:null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polyline.positions.getValue(i.JulianDate.now()));if(this._options.maxAnchorSize>2){for(let t=0;t<e.length-1;t++){let r=F(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.push(e[e.length-1]),this._positions.forEach((t,r)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}else this._positions=e,this._positions.forEach((t,r)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:t,index:r})});this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let a=F(this._positions[s],this._positions[s-1]),o=F(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,a,t,o),this.editTool.fire(E.CLEAR_ANCHOR),this._positions.forEach((n,h)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:n,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let a=-1,o=-1,n=-1,h=-1,c=this._positions.length;if(s===0?(n=s+2,h=s+1):r.index===c-1?(a=s-2,o=s-1):(a=s-2,o=s-1,n=s+2,h=s+1),a>0){let p=F(this._positions[a],this._positions[s]);this._positions[o]=p,this.editTool.fire(E.UPDATE_ANCHOR,{index:o,position:p})}if(n>0){let p=F(this._positions[n],this._positions[s]);this._positions[h]=p,this.editTool.fire(E.UPDATE_ANCHOR,{index:h,position:p})}}this._options.onCalc&&this._options.onCalc(this._positions)}},ce=Oo;var ko=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._options={}}_getSampledHeight(e,t=!1){let r=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.EllipsoidTerrainProvider)?i.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(a=>i.Cartographic.fromCartesian(a))):Promise.resolve(e.map(a=>i.Cartographic.fromCartesian(a))),s=this._viewer.scene.clampToHeightSupported&&t?this._viewer.scene.clampToHeightMostDetailed(e,this._layer.entities.values):Promise.resolve(e);return Promise.all([r,s])}_onDrawStop(e){}_onCalc(e){}_startHook(e,t){this._viewer=e.viewer,this._layer=e.layer,this._options=t,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,t){return this}},X=ko;var zo=class extends X{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Entity({polyline:{positions:new i.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ce(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 t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cartesian3),r=i.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Plane.projectPointOntoPlane(r,e[1],new i.Cartesian3),e[1]];let s=Math.abs(i.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u89D2\u5EA6\uFF1A${i.Math.toDegrees(Math.asin(s/i.Cartesian3.distance(e[0],e[1]))).toFixed(2)} \u5EA6`}}start(e,t){this._startHook(e,t);let r=new i.PolylineDashMaterialProperty({color:i.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},qp=zo;var No=class extends hi{constructor(e){super(e)}_mountedHook(){this._delegate=new i.Entity({polygon:{...this._style,hierarchy:new i.CallbackProperty(()=>this._positions.length>2?new i.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)},polyline:{...this._style,positions:new i.CallbackProperty(()=>this._positions.length<=3?this._positions:null,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(E.CREATE_ANCHOR,{position:e})}},Ye=No;var Fo=class extends ci{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 i.CallbackProperty(e=>this._positions.length>2?new i.PolygonHierarchy(this._positions):null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polygon.hierarchy.getValue(i.JulianDate.now()).positions);e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=F(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})}),this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;if(r.isMid){let a,o,n=this._positions.length;s===n-1?(a=F(this._positions[s],this._positions[s-1]),o=F(this._positions[s],this._positions[0])):(a=F(this._positions[s],this._positions[s-1]),o=F(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,a,t,o),this.editTool.fire(E.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(E.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.JulianDate.now()),s=r.index;this._positions[s]=t;let a=this._positions.length;if(!r.isMid){let o=-1,n=-1,h=-1,c=-1;s===0?(o=a-2,n=a-1,h=s+2,c=s+1):s===a-2?(o=s-2,n=s-1,h=0,c=a-1):(o=s-2,n=s-1,h=s+2,c=s+1);let p=F(this._positions[o],this._positions[s]),f=F(this._positions[h],this._positions[s]);this._positions[n]=p,this._positions[c]=f,this.editTool.fire(E.UPDATE_ANCHOR,{index:n,position:p}),this.editTool.fire(E.UPDATE_ANCHOR,{index:c,position:f})}this._options.onCalc&&this._options.onCalc(this._positions)}},Je=Fo;var Wo=class extends X{constructor(){super()}_onDrawStop(e){new Je(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;e.length>2?(this._resultLabel.position=(t=i.BoundingSphere.fromPoints(e))==null?void 0:t.center,this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ye(e).toFixed(2)} \u5E73\u65B9\u7C73`):this._resultLabel.label.text=null}start(e,t){return this._startHook(e,t),new Ye({material:t.material||i.Color.YELLOW.withAlpha(.6),perPositionHeight:!0,width:2}).start(e,this._options),this}},Xp=Wo;var Go=class extends X{constructor(){super()}_onDrawStop(e){new Je(e).start({viewer:this._viewer,layer:this._layer},this._options)}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let a=0;a<t;++a){let o=i.Math.lerp(e.west,e.east,a/(t-1)),n=i.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cartesian3.fromRadians(o,n))}return r}_onCalc(e){if(e.length>2){let t=this._lerp(i.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(t,!0).then(([r,s])=>r.map((a,o)=>({lng:a.longitude,lat:a.latitude,alt:Math.max(a.height||0,s[o]?i.Cartographic.fromCartesian(s[o]).height:0)}))).then(r=>{let s=0,a;r.forEach(o=>{o.alt>s&&(s=o.alt,a=o)}),a&&(this._resultLabel.position=i.Cartesian3.fromRadians(a.lng,a.lat,a.alt),this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`)})}}start(e,t){return this._startHook(e,t),new Ye({material:t.material||i.Color.YELLOW.withAlpha(.6),width:2}).start(e,this._options),this}},Qp=Go;var Ho=class extends X{constructor(){super()}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let a=0;a<t;++a){let o=i.Math.lerp(e.west,e.east,a/(t-1)),n=i.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cartesian3.fromRadians(o,n))}return r}_onDrawStop(e){new Je(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;if(e.length>2){this._resultLabel.position=(t=i.BoundingSphere.fromPoints(e))==null?void 0:t.center;let r=this._lerp(i.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(r.concat(e),!1).then(([s])=>s.map(a=>i.Cartesian3.fromDegrees(i.Math.toDegrees(a.longitude),i.Math.toDegrees(a.latitude),a.height))).then(s=>{this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ye(s).toFixed(2)} \u5E73\u65B9\u7C73`})}}start(e,t){return this._startHook(e,t),new Ye({material:t.material||i.Color.YELLOW.withAlpha(.6),width:2}).start(e,this._options),this}},Kp=Ho;var Bo=class extends X{constructor(){super(),this._maxAnchorSize=9999,this._positions=[]}_onDrawStop(e){for(let t=0;t<this._positions.length-2;t++)this._layer.entities.add(this.createLabel(this._positions[t],this._positions[t+1]));new ce(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 t=0;for(let r=0;r<e.length-1;r++){let s=i.Cartesian3.distance(e[r],e[r+1]);t+=s}this._resultLabel.label.text=t>1e3?`\u603B\u8DDD\u79BB\uFF1A${(t/1e3).toFixed(2)} \u516C\u91CC`:`\u603B\u8DDD\u79BB\uFF1A${t.toFixed(2)} \u7C73`}else this._resultLabel.label.text=null;this._positions=e}createLabel(e,t){let r=i.Cartesian3.distance(e,t),s=i.Cartesian3.lerp(e,t,.5,new i.Cartesian3),a=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}});return a.label.text=r>1e3?`\u8DDD\u79BB\uFF1A${(r/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${r.toFixed(2)} \u7C73`,a.position=s,a}start(e,t){return this._startHook(e,t),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},$p=Bo;var Uo=class extends X{constructor(){super(),this._maxAnchorSize=9999,this._positions=[]}_lerp(e,t,r=5){let s=[],a=i.Cartographic.fromCartesian(e),o=i.Cartographic.fromCartesian(t);for(let n=0;n<r;n++){let h=i.Math.lerp(a.longitude,o.longitude,n/r),c=i.Math.lerp(a.latitude,o.latitude,n/r),p=a.height-(a.height-o.height)*(n/r);s.push(i.Cartesian3.fromRadians(h,c,p))}return s}_onDrawStop(e){for(let t=0;t<this._positions.length-2;t++)this._layer.entities.add(this.createLabel(this._positions[t],this._positions[t+1]));new ce(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 t=[e[0]];this._resultLabel.position=e[e.length-1];for(let r=0;r<e.length-1;r++)t=t.concat(this._lerp(e[r],e[r+1],this._options.lerpNum));t.push(e[e.length-1]),this._getSampledHeight(t).then(([r,s])=>r.map((a,o)=>i.Cartesian3.fromDegrees(i.Math.toDegrees(a.longitude),i.Math.toDegrees(a.latitude),Math.max(a.height||0,s[o]?i.Cartographic.fromCartesian(s[o]).height:0)))).then(r=>{let s=0;for(let a=0;a<r.length-1;a++){let o=i.Cartesian3.distance(r[a],r[a+1]);s+=o}this._resultLabel.label.text=s>1e3?`\u603B\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u603B\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}else this._resultLabel.label.text=null;this._positions=e}createLabel(e,t){let r=i.Cartesian3.distance(e,t),s=i.Cartesian3.lerp(e,t,.5,new i.Cartesian3),a=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}});return a.label.text=r>1e3?`\u8DDD\u79BB\uFF1A${(r/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${r.toFixed(2)} \u7C73`,a.position=s,a}start(e,t){return this._startHook(e,t),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},ed=Uo;var Vo=class extends X{constructor(){super(),this._maxAnchorSize=2}_onDrawStop(e){new ce(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${i.Math.toDegrees(we(e[0],e[1])).toFixed(1)} \u5EA6`)}start(e,t){return this._startHook(e,t),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},td=Vo;var jo=class extends X{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Entity({polyline:{positions:new i.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ce(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 t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cartesian3),r=i.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Plane.projectPointOntoPlane(r,e[1],new i.Cartesian3),e[1]];let s=Math.abs(i.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.PolylineDashMaterialProperty({color:i.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},id=jo;var Zo=class extends X{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Entity({polyline:{positions:new i.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}}),this._lengthLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._heightLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._distanceLabel=new i.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}})}_onDrawStop(e){new ce(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 t=i.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cartesian3),r=i.Plane.fromPointNormal(e[0],t),s=i.Plane.projectPointOntoPlane(r,e[1],new i.Cartesian3);this._helpLinePositions=[e[0],s,e[1]];let a=i.Cartesian3.distance(e[0],s),o=Math.abs(i.Plane.getPointDistance(r,e[1])),n=i.Cartesian3.distance(e[0],e[1]);this._lengthLabel.position=i.Cartesian3.midpoint(e[0],s,new i.Cartesian3),this._lengthLabel.label.text=a>1e3?`${(a/1e3).toFixed(2)} \u516C\u91CC`:`${a.toFixed(2)} \u7C73`,this._distanceLabel.position=i.Cartesian3.midpoint(e[0],e[1],new i.Cartesian3),this._distanceLabel.label.text=n>1e3?`${(n/1e3).toFixed(2)} \u516C\u91CC`:`${n.toFixed(2)} \u7C73`,this._heightLabel.position=i.Cartesian3.midpoint(s,e[1],new i.Cartesian3),this._heightLabel.label.text=o>1e3?`${(o/1e3).toFixed(2)} \u516C\u91CC`:`${o.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.PolylineDashMaterialProperty({color:i.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,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 he({material:t.material||i.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.PolylineDashMaterialProperty({color:i.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},rd=Zo;var Yo=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.CustomDataSource("measure-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}angle(e={}){return new qp().start(this,e),this}area(e={}){return new Xp().start(this,e),this}areaHeight(e={}){return new Qp().start(this,e),this}areaSurface(e={}){return new Kp().start(this,e),this}distance(e={}){return new $p().start(this,e),this}distanceSurface(e={}){return new ed().start(this,e),this}heading(e={}){return new td().start(this,e),this}height(e={}){return new id().start(this,e),this}triangleHeight(e={}){return new rd().start(this,e),this}activate(e,t){switch(e){case le.ANGLE:this.angle(t);break;case le.AREA:this.area(t);break;case le.AREA_HEIGHT:this.areaHeight(t);break;case le.AREA_SURFACE:this.areaSurface(t);break;case le.DISTANCE:this.distance(t);break;case le.DISTANCE_SURFACE:this.distanceSurface(t);break;case le.HEADING:this.heading(t);break;case le.HEIGHT:this.height(t);break;case le.TRIANGLE_HEIGHT:this.triangleHeight(t);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}},sd=Yo;var tf={depthFail:!0,width:10,arrow:!1},Jo=class{constructor(e,t={}){this._delegate=void 0,this._positions=[],this._options={...tf,...t},this._color=this._options.color,this._positions=e.slice(),this._options.loop&&this._positions.push(e[0]),this._boundingSphere=i.BoundingSphere.fromPoints(this._positions),this._transformedBoundingSphere=i.BoundingSphere.clone(this._boundingSphere),this._modelMatrix=i.Matrix4.clone(i.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?i.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 i.Matrix4.equalsEpsilon(e,this._modelMatrix,i.Math.EPSILON10)?this:(i.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 t=this._color,r=t.withAlpha(.3),s,a;this._options.arrow?(s=new i.PolylineMaterialAppearance({material:i.Material.fromType(i.Material.PolylineArrowType,{color:t})}),this._options.depthFail&&(a=new i.PolylineMaterialAppearance({material:i.Material.fromType(i.Material.PolylineArrowType,{color:r})}))):(s=new i.PolylineColorAppearance({translucent:t.alpha!==1}),this._options.depthFail&&(a=new i.PolylineColorAppearance({translucent:r.alpha!==1})));let o=new i.PolylineGeometry({positions:this._positions,width:this._options.width,vertexFormat:i.PolylineMaterialAppearance.VERTEX_FORMAT,arcType:i.ArcType.NONE});this._delegate=new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:o,attributes:{color:i.ColorGeometryInstanceAttribute.fromColor(t),depthFailColor:i.ColorGeometryInstanceAttribute.fromColor(r)},id:this._options.id,modelMatrix:this._modelMatrix}),appearance:s,depthFailAppearance:a,asynchronous:!1}),this._transformedBoundingSphere=i.BoundingSphere.transform(this._boundingSphere,this._modelMatrix,this._transformedBoundingSphere)}this._delegate.update(e)}}isDestroyed(){return!1}destroy(){return this._delegate=this._delegate&&this._delegate.destroy(),i.destroyObject(this)}},pi=Jo;var qo={X:i.Cartesian3.UNIT_X,Y:i.Cartesian3.UNIT_Y,Z:i.Cartesian3.UNIT_Z},Xo=class{constructor(e,t={}){this._viewer=e,this._options=t,this._modelMatrix=void 0,this._active=!1,this._activeAxis=void 0,this._fixedFrame=void 0,this._offset=new i.Cartesian3,this._pickingPlane=new i.Plane(i.Cartesian3.UNIT_X,0),this._axisX=this._createAxisLine("X",i.Color.RED),this._axisY=this._createAxisLine("Y",i.Color.GREEN),this._axisZ=this._createAxisLine("Z",i.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 i.Matrix4.getTranslation(this._modelMatrix,new i.Cartesian3)}_createAxisLine(e,t){return this._viewer.scene.primitives.add(new pi([i.Cartesian3.ZERO,qo[e]],{id:"position-editor-"+e,arrow:this._options.arrow,color:t,depthFail:this._options.depthFail}))}handleLeftDown(e){console.log("handleLeftDown",e);let t=this._viewer.scene,r=t.camera,s=t.drillPick(e.position)||[];console.log(2);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}console.log(3)}if(!this._activeAxis)return;console.log(4),this._viewer.canvas.style.cursor="pointer";let a=i.Matrix4.multiplyByPointAsVector(this._fixedFrame,qo[this._activeAxis],new i.Cartesian3),o=new i.Cartesian3;Math.abs(i.Cartesian3.dot(r.upWC,a)>.7)?o=i.Cartesian3.cross(r.rightWC,a,o):o=i.Cartesian3.cross(r.upWC,a,o),i.Cartesian3.normalize(o,o),i.Plane.fromPointNormal(this.modelTranslation,o,this._pickingPlane),i.IntersectionTests.rayPlane(r.getPickRay(e.position),this._pickingPlane,this._offset),i.Cartesian3.subtract(this._offset,this.modelTranslation,this._offset),t.screenSpaceCameraController.enableInputs=!1,console.log(5)}handleMouseMove(e){if(!this._activeAxis)return;let t=this._viewer.scene.camera,r=new i.Cartesian3,s=i.IntersectionTests.rayPlane(t.getPickRay(e.endPosition),this._pickingPlane,new i.Cartesian3);if(!s)return;let a=i.Cartesian3.subtract(s,this.modelTranslation,new i.Cartesian3),o=i.Matrix4.multiplyByPointAsVector(this._fixedFrame,qo[this._activeAxis],new i.Cartesian3);i.Cartesian3.projectVector(a,o,a),i.Cartesian3.projectVector(this._offset,o,r),i.Cartesian3.subtract(a,r,a);let n=i.Cartesian3.add(this.modelTranslation,a,new i.Cartesian3);this.resetTranslation&&this.resetTranslation(n)}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=i.Transforms.eastNorthUpToFixedFrame(this.modelTranslation);let t=i.Matrix4.multiplyByUniformScale(this._fixedFrame,e,new i.Matrix4);this._axisX.modelMatrix=t,this._axisY.modelMatrix=t,this._axisZ.modelMatrix=t}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),i.destroyObject(this)}},ad=Xo;var od={X:i.Cartesian3.UNIT_X,Y:i.Cartesian3.UNIT_Y,Z:i.Cartesian3.UNIT_Z},Qo=class{constructor(e,t={}){this._viewer=e,this._options=t,this._modelMatrix=void 0,this._active=!1,this._activeAxis=void 0,this._rotationStartPoint=new i.Cartesian3,this._rotationPlane=new i.Plane(i.Cartesian3.UNIT_X,0);let r=this._getUnitCirclePositions();this._axisX=this._createAxisLine("X",r.x,i.Color.RED),this._axisY=this._createAxisLine("Y",r.y,i.Color.GREEN),this._axisZ=this._createAxisLine("Z",r.z,i.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 i.Matrix4.getTranslation(this._modelMatrix,new i.Cartesian3)}_getUnitCirclePositions(){let e=[],t=[],r=[];for(let s=0;s<360;s++){let a=i.Math.toRadians(s),o=Math.cos(a),n=Math.sin(a);e.push(new i.Cartesian3(0,o,n)),t.push(new i.Cartesian3(n,0,o)),r.push(new i.Cartesian3(o,n,0))}return{x:e,y:t,z:r}}_createAxisLine(e,t,r){return this._viewer.scene.primitives.add(new pi(t,{id:"position-editor-"+e,loop:!0,color:r,width:5,depthFail:this._options.depthFail}))}_getRotationAngle(e,t,r){let s=i.Matrix4.inverse(e,new i.Matrix4),a=i.Matrix4.multiplyByPoint(s,t,new i.Cartesian3),o=i.Matrix4.multiplyByPoint(s,r,new i.Cartesian3),n=new i.Cartesian2,h=new i.Cartesian2;this._activeAxis==="X"?(n.x=a.y,n.y=a.z,h.x=o.y,h.y=o.z):this._activeAxis==="Y"?(n.x=-a.x,n.y=a.z,h.x=-o.x,h.y=o.z):(n.x=a.x,n.y=a.y,h.x=o.x,h.y=o.y);let c=n.x*h.y-n.y*h.x>=0,p=i.Cartesian2.angleBetween(n,h);return c||(p=-p),p}handleLeftDown(e){console.log("handleLeftDown",e);let t=this._viewer.scene,r=t.drillPick(e.position)||[];console.log(1);for(let o=0;o<r.length;o++){let n=r[o];if(n.id&&n.id==="position-editor-X"){this._activeAxis="X",this._axisX.active=!0;break}else if(n.id&&n.id==="position-editor-Y"){this._activeAxis="Y",this._axisY.active=!0;break}else if(n.id&&n.id==="position-editor-Z"){this._activeAxis="Z",this._axisZ.active=!0;break}}if(!this._activeAxis)return;this._viewer.canvas.style.cursor="pointer";let s=i.Matrix4.multiplyByPoint(this._modelMatrix,od[this._activeAxis],new i.Cartesian3),a=i.Cartesian3.subtract(s,this.modelTranslation,s);i.Cartesian3.normalize(a,a),i.Plane.fromPointNormal(this.modelTranslation,a,this._rotationPlane),i.IntersectionTests.rayPlane(t.camera.getPickRay(e.position),this._rotationPlane,this._rotationStartPoint),t.screenSpaceCameraController.enableInputs=!1}handleMouseMove(e){if(!this._activeAxis)return;let t=this._viewer.scene.camera,r=i.IntersectionTests.rayPlane(t.getPickRay(e.endPosition),this._rotationPlane,new i.Cartesian3);if(!r)return;let s=this._getRotationAngle(this._modelMatrix,this._rotationStartPoint,r),a=i.Quaternion.fromAxisAngle(od[this._activeAxis],s,new i.Quaternion),o=i.Matrix3.fromQuaternion(a),n=i.Matrix4.getTranslation(this._modelMatrix,new i.Cartesian3),h=i.Transforms.eastNorthUpToFixedFrame(n),c=i.Matrix4.getMatrix3(h,new i.Matrix3);i.Matrix3.multiply(c,o,o);let p=i.Matrix4.fromRotationTranslation(o,this.modelTranslation,new i.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,t=i.Matrix4.getTranslation(this._modelMatrix,new i.Cartesian3),r=i.Transforms.eastNorthUpToFixedFrame(t),s=i.Matrix4.multiplyByUniformScale(r,e,new i.Matrix4);this._axisX.modelMatrix=s,this._axisY.modelMatrix=s,this._axisZ.modelMatrix=s}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),i.destroyObject(this)}},nd=Qo;var rf={TRANSLATION:"translation",ROTATION:"rotation"},di=rf;var sf={arrow:!0,width:8,depthFail:!0,axisLineScale:1},Ko=class{constructor(e,t={}){this._viewer=e,this._options={...sf,...t},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 ad(this._viewer,this._options),this._rotationEditor=new nd(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 i.ScreenSpaceEventHandler(this._viewer.canvas),this._handler.setInputAction(this._onLeftDown.bind(this),i.ScreenSpaceEventType.LEFT_DOWN),this._handler.setInputAction(this._onLeftUp.bind(this),i.ScreenSpaceEventType.LEFT_UP),this._handler.setInputAction(this._onMouseMove.bind(this),i.ScreenSpaceEventType.MOUSE_MOVE)}_unbindEvent(){this._handler&&(this._handler.removeInputAction(this._onLeftDown.bind(this),i.ScreenSpaceEventType.LEFT_DOWN),this._handler.removeInputAction(this._onLeftUp.bind(this),i.ScreenSpaceEventType.LEFT_UP),this._handler.removeInputAction(this._onMouseMove.bind(this),i.ScreenSpaceEventType.MOUSE_MOVE))}_setModelMatrix(){if(this._model instanceof i.Entity){let e=this._model.position.getValue(i.JulianDate.now()),t=new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(-this._position.pitch),i.Math.toRadians(this._position.roll));this._modelMatrix=i.Transforms.headingPitchRollToFixedFrame(e,t),this._activeEditor.modelMatrix=this._modelMatrix,this._activeEditor.active=!0,this._setLngLatAlt(this._modelMatrix)}else this._model instanceof Promise&&this._model.then(e=>{e instanceof i.Model?this._modelMatrix=e.modelMatrix.clone():e instanceof i.Cesium3DTileset&&(this._modelMatrix=e.root.transform.clone()),this._activeEditor.modelMatrix=this._modelMatrix,this._activeEditor.active=!0,this._setLngLatAlt(this._modelMatrix)})}_setLngLatAlt(e){let t=i.Matrix4.getTranslation(e,new i.Cartesian3),r=i.Cartographic.fromCartesian(t);this._position.lng=Number(i.Math.toDegrees(r.longitude).toFixed(8)),this._position.lat=Number(i.Math.toDegrees(r.latitude).toFixed(8)),this._position.alt=Number(r.height.toFixed(2))}_setHPR(e){this._position.heading+=Number(i.Math.toDegrees(e.heading).toFixed(8)),this._position.heading=this._position.heading%360,this._position.pitch+=Number(-i.Math.toDegrees(e.pitch).toFixed(8)),this._position.pitch=this._position.pitch%360,this._position.roll+=Number(-i.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 t=i.Transforms.fixedFrameToHeadingPitchRoll(e);if(this._setHPR(t),this._model instanceof i.Entity){let r=this._model.position.getValue(i.JulianDate.now()),s=new i.HeadingPitchRoll(i.Math.toRadians(this._position.heading),i.Math.toRadians(-this._position.pitch),i.Math.toRadians(this._position.roll));this._model.orientation=i.Transforms.headingPitchRollQuaternion(r,s)}else this._model instanceof Promise&&this._model.then(r=>{r instanceof i.Model?i.Matrix4.multiply(r.modelMatrix,i.Matrix4.fromRotationTranslation(i.Matrix3.fromHeadingPitchRoll(t)),r.modelMatrix):r instanceof i.Cesium3DTileset&&i.Matrix4.multiply(r.root.transform,i.Matrix4.fromRotationTranslation(i.Matrix3.fromHeadingPitchRoll(t)),r.root.transform)})}_resetTranslation(e){i.Matrix4.setTranslation(this._modelMatrix,e,this._modelMatrix),this._model instanceof i.Entity?this._model.position=e:this._model instanceof Promise&&this._model.then(t=>{t instanceof i.Model?i.Matrix4.setTranslation(t.modelMatrix,e,t.modelMatrix):t instanceof i.Cesium3DTileset&&i.Matrix4.setTranslation(t.root.transform,e,t.root.transform)}),this._activeEditor.modelMatrix=this._modelMatrix,this._setLngLatAlt(this._modelMatrix)}_complete(){this._callback&&this._callback(this._position)}activate(e,t){if(!this._model)throw new Error("PositionEditor: no overlay");return this._translationEditor.active=!1,this._rotationEditor.active=!1,this._activeEditor=e===di.TRANSLATION?this._translationEditor:this._rotationEditor,this._setModelMatrix(),this._handler||this._bindEvent(),this._callback=t,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}},ld=Ko;var hd=`uniform float mixNum;\r
|
|
1671
|
-
uniform sampler2D colorTexture;\r
|
|
1672
|
-
uniform sampler2D shadowMapTexture;\r
|
|
1673
|
-
uniform sampler2D videoTexture;\r
|
|
1674
|
-
uniform sampler2D maskTexture;\r
|
|
1675
|
-
uniform sampler2D depthTexture;\r
|
|
1676
|
-
uniform mat4 shadowMap_matrix;\r
|
|
1677
|
-
uniform vec4 shadowMap_lightPositionEC;\r
|
|
1678
|
-
uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;\r
|
|
1679
|
-
uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth;\r
|
|
1680
|
-
uniform vec4 disViewColor;\r
|
|
1681
|
-
uniform bool clearBlack;\r
|
|
1682
|
-
in vec2 v_textureCoordinates;\r
|
|
1683
|
-
\r
|
|
1684
|
-
vec4 toEye(in vec2 uv, in float depth){\r
|
|
1685
|
-
vec2 xy = vec2((uv.x * 2.0 - 1.0), (uv.y * 2.0 - 1.0));\r
|
|
1686
|
-
vec4 posInCamera =czm_inverseProjection * vec4(xy, depth, 1.0);\r
|
|
1687
|
-
posInCamera =posInCamera / posInCamera.w;\r
|
|
1688
|
-
return posInCamera;\r
|
|
1689
|
-
}\r
|
|
1690
|
-
\r
|
|
1691
|
-
float getDepth(in vec4 depth){\r
|
|
1692
|
-
float z_window = czm_unpackDepth(depth);\r
|
|
1693
|
-
z_window = czm_reverseLogDepth(z_window);\r
|
|
1694
|
-
float n_range = czm_depthRange.near;\r
|
|
1695
|
-
float f_range = czm_depthRange.far;\r
|
|
1696
|
-
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\r
|
|
1697
|
-
}\r
|
|
1698
|
-
\r
|
|
1699
|
-
float _czm_sampleShadowMap(sampler2D shadowMap, vec2 uv){\r
|
|
1700
|
-
return texture(shadowMap, uv).r;\r
|
|
1701
|
-
}\r
|
|
1702
|
-
\r
|
|
1703
|
-
float _czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth){\r
|
|
1704
|
-
return step(depth, _czm_sampleShadowMap(shadowMap, uv));\r
|
|
1705
|
-
}\r
|
|
1706
|
-
\r
|
|
1707
|
-
float _czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters){\r
|
|
1708
|
-
float depthBias = shadowParameters.depthBias;\r
|
|
1709
|
-
float depth = shadowParameters.depth;\r
|
|
1710
|
-
float nDotL = shadowParameters.nDotL;\r
|
|
1711
|
-
float normalShadingSmooth = shadowParameters.normalShadingSmooth;\r
|
|
1712
|
-
float darkness = shadowParameters.darkness;\r
|
|
1713
|
-
vec2 uv = shadowParameters.texCoords;\r
|
|
1714
|
-
depth -= depthBias;\r
|
|
1715
|
-
vec2 texelStepSize = shadowParameters.texelStepSize;\r
|
|
1716
|
-
float radius = 1.0;\r
|
|
1717
|
-
float dx0 = -texelStepSize.x * radius;\r
|
|
1718
|
-
float dy0 = -texelStepSize.y * radius;\r
|
|
1719
|
-
float dx1 = texelStepSize.x * radius;\r
|
|
1720
|
-
float dy1 = texelStepSize.y * radius;\r
|
|
1721
|
-
float visibility =\r
|
|
1722
|
-
(\r
|
|
1723
|
-
_czm_shadowDepthCompare(shadowMap, uv, depth)\r
|
|
1724
|
-
+_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\r
|
|
1725
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\r
|
|
1726
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\r
|
|
1727
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\r
|
|
1728
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\r
|
|
1729
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\r
|
|
1730
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\r
|
|
1731
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\r
|
|
1732
|
-
) * (1.0 / 9.0)\r
|
|
1733
|
-
;\r
|
|
1734
|
-
return visibility;\r
|
|
1735
|
-
}\r
|
|
1736
|
-
\r
|
|
1737
|
-
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point){\r
|
|
1738
|
-
vec3 v01 = point -planeOrigin;\r
|
|
1739
|
-
float d = dot(planeNormal, v01);\r
|
|
1740
|
-
return (point - planeNormal * d);\r
|
|
1741
|
-
}\r
|
|
1742
|
-
\r
|
|
1743
|
-
float ptm(vec3 pt){\r
|
|
1744
|
-
return sqrt(pt.x*pt.x + pt.y*pt.y + pt.z*pt.z);\r
|
|
1745
|
-
}\r
|
|
1746
|
-
\r
|
|
1747
|
-
\r
|
|
1748
|
-
void main()\r
|
|
1749
|
-
{\r
|
|
1750
|
-
const float PI = 3.141592653589793;\r
|
|
1751
|
-
vec4 color = texture(colorTexture, v_textureCoordinates);\r
|
|
1752
|
-
vec4 currD = texture(depthTexture, v_textureCoordinates);\r
|
|
1753
|
-
\r
|
|
1754
|
-
if (currD.r>=1.0){\r
|
|
1755
|
-
out_FragColor = color;\r
|
|
1756
|
-
return;\r
|
|
1757
|
-
}\r
|
|
1758
|
-
\r
|
|
1759
|
-
float depth = getDepth(currD);\r
|
|
1760
|
-
vec4 positionEC = toEye(v_textureCoordinates, depth);\r
|
|
1761
|
-
vec3 normalEC = vec3(1.0);\r
|
|
1762
|
-
czm_shadowParameters shadowParameters;\r
|
|
1763
|
-
shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\r
|
|
1764
|
-
shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\r
|
|
1765
|
-
shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\r
|
|
1766
|
-
shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\r
|
|
1767
|
-
shadowParameters.depthBias *= max(depth * 0.01, 1.0);\r
|
|
1768
|
-
vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);\r
|
|
1769
|
-
float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\r
|
|
1770
|
-
vec4 shadowPosition = shadowMap_matrix * positionEC;\r
|
|
1771
|
-
shadowPosition /= shadowPosition.w;\r
|
|
1772
|
-
if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) {\r
|
|
1773
|
-
out_FragColor = color;\r
|
|
1774
|
-
return;\r
|
|
1775
|
-
}\r
|
|
1776
|
-
\r
|
|
1777
|
-
shadowParameters.texCoords = shadowPosition.xy;\r
|
|
1778
|
-
shadowParameters.depth = shadowPosition.z;\r
|
|
1779
|
-
shadowParameters.nDotL = nDotL;\r
|
|
1780
|
-
float visibility = _czm_shadowVisibility(shadowMapTexture, shadowParameters);\r
|
|
1781
|
-
vec4 videoColor = texture(videoTexture, shadowPosition.xy);\r
|
|
1782
|
-
vec4 maskColor = texture(maskTexture, shadowPosition.xy);\r
|
|
1783
|
-
videoColor *= maskColor;\r
|
|
1784
|
-
\r
|
|
1785
|
-
if (clearBlack){\r
|
|
1786
|
-
if (videoColor.r + videoColor.g + videoColor.b <0.01){\r
|
|
1787
|
-
out_FragColor = color;\r
|
|
1788
|
-
return;\r
|
|
1789
|
-
}\r
|
|
1790
|
-
}\r
|
|
1791
|
-
\r
|
|
1792
|
-
if (visibility == 1.0){\r
|
|
1793
|
-
out_FragColor = mix(color, vec4(videoColor.xyz, 1.0), mixNum*videoColor.a);\r
|
|
1794
|
-
} else {\r
|
|
1795
|
-
if (abs(shadowPosition.z-0.0)<0.01){\r
|
|
1796
|
-
return;\r
|
|
1797
|
-
}\r
|
|
1798
|
-
if (clearBlack){\r
|
|
1799
|
-
out_FragColor = color;\r
|
|
1800
|
-
return;\r
|
|
1801
|
-
}\r
|
|
1802
|
-
out_FragColor = vec4(mix(color.rgb, disViewColor.rgb, disViewColor.a), disViewColor.a);\r
|
|
1803
|
-
}\r
|
|
1804
|
-
}\r
|
|
1805
|
-
`;var $o=class extends v{constructor(e,t,r){super(),this._position=g.parsePosition(e),this._video=t,this._maskUrl=r,this._viewer=void 0,this._camera=void 0,this._videoTexture=void 0,this._maskTexture=void 0,this._viewShadowMap=void 0,this._frustum=new i.PerspectiveFrustum({fov:i.Math.toRadians(60),aspectRatio:1}),this._alpha=1,this._clearBlack=!0,this._disViewColor=new i.Color(1,1,1,1),this._state=m.INITIALIZED}get type(){return v.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=g.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 t=new Image,r=this;t.onload=()=>{r._maskTexture=new i.Texture({context:r._viewer.scene.context,source:t}),r._bindEvent()},t.src=e}get camera(){return this._camera}_updateCameraState(){let e=i.Cartesian3.fromDegrees(this._position.lng,this._position.lat,this._position.alt),t=re.getViewPosition(this._position,this._frustum&&this._frustum.far||120);this._viewer&&(this._camera||(this._camera=new i.Camera(this._viewer.scene)),this._camera.frustum=this._frustum,re.setCamera(this._camera,e,t,this._position.roll))}_updateShadowMap(){this._updateCameraState(),this._viewShadowMap=new i.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 i.PostProcessStage({fragmentShader:hd,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 i.Cartesian4.fromElements(1/this._viewShadowMap._textureSize.x,1/this._viewShadowMap._textureSize.y,e.depthBias,e.normalShadingSmooth,new i.Cartesian4)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return i.Cartesian4.fromElements(e.normalOffsetScale,this._viewShadowMap._distance,this._viewShadowMap.maximumDistance,this._viewShadowMap._darkness,new i.Cartesian4)}}})}_onClockTick(){this._videoTexture&&this._videoTexture.destroy(),this._videoTexture=new i.Texture({context:this._viewer.scene.context,source:this._video,width:1,height:1,pixelFormat:i.PixelFormat.RGBA,pixelDatatype:i.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 i.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 i.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 t;return Object.keys(e).length===0?this:(this._style=e,e.fov&&(this._frustum.fov=i.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=(t=e.clearBlack)!=null?t:!0,e.disViewColor&&(this._disViewColor=e.disViewColor),this._delegate&&this._updateShadowMap(),this)}},cd=$o;var pd=new i.WebMercatorProjection,en=class extends v{constructor(e,t){super(),this._position=g.parsePosition(e),this._video=t,this._delegate=new i.Entity({plane:{}}),this._viewer=void 0,this._camera=void 0,this._frustum=new i.PerspectiveFrustum({fov:i.Math.toRadians(60),aspectRatio:1}),this._state=m.INITIALIZED}get type(){return v.getOverlayType("plane_video")}get show(){return this._show}set show(e){this._show=e}get position(){return this._position}set position(e){this._position=g.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=i.Cartesian3.fromDegrees(this._position.lng,this._position.lat,this._position.alt),t=re.getViewPosition(this._position,this._frustum&&this._frustum.far||120);return this._viewer&&(this._camera||(this._camera=new i.Camera(this._viewer.scene)),this._camera.frustum=this._frustum,re.setCamera(this._camera,e,t,this._position.roll)),{cameraPosition:e,viewPosition:t}}_updatePlane(){let{cameraPosition:e,viewPosition:t}=this._getCameraState(),r=i.Cartographic.fromCartesian(e),s=i.Cartographic.fromCartesian(t),a=new i.Cartesian3;i.Cartesian3.subtract(pd.project(r),pd.project(s),a),i.Cartesian3.normalize(a,a);let o=this._frustum.far*Math.tan(this._frustum.fov*.5)*2,n=o/this._frustum.aspectRatio;this._delegate.position=t,this._delegate.plane={dimensions:{x:o,y:n},plane:new i.Plane(a,0),material:this._video||i.Color.GREEN.withAlpha(.5)}}setStyle(e){return Object.keys(e).length===0?this:(this._style=e,e.fov&&(this._frustum.fov=i.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)}},dd=en;var{Cartesian3:mi,Ellipsoid:of,Math:md}=i;function ue(l){this._api=l,this._viewer=Object(l.getZr()).viewer,this._mapOffset=[0,0],this.dimensions=["lng","lat"]}ue.prototype.getViewer=function(){return this._viewer};ue.prototype.setMapOffset=function(l){return this._mapOffset=l,this};ue.prototype.dataToPoint=function(l){let e=[],t=mi.fromDegrees(l[0],l[1]);if(!t)return e;let r=of.WGS84.geodeticSurfaceNormal(t,new mi),s=this._viewer.camera.direction;if(mi.dot(r,s)>=0)return e;let a=this._viewer.scene.cartesianToCanvasCoordinates(t);return a?[a.x-this._mapOffset[0],a.y-this._mapOffset[1]]:e};ue.prototype.pointToData=function(l){let e=this._viewer.scene.globe.ellipsoid,t=new mi(l[0]+this._mapOffset[0],l[1]+this._mapOffset[1],0),r=e.cartesianToCartographic(t);return[md.toDegrees(r.longitude),md.toDegrees(r.latitude)]};ue.create=function(l,e){let t;l.eachComponent("GLMap",function(r){t=new ue(e),t.setMapOffset(r.__mapOffset||[0,0]),r.coordinateSystem=t}),l.eachSeries(function(r){r.get("coordinateSystem")==="GLMap"&&(r.coordinateSystem=t)})};ue.dimensions=["lng","lat"];function nf(l){ue.prototype.getViewRect=function(){let e=this._api;return new l.graphic.BoundingRect(0,0,e.getWidth(),e.getHeight())},ue.prototype.getRoamTransform=function(){return l.matrix.create()}}var ud=!1;function fd(l){if(ud)return;let{registerAction:e,registerCoordinateSystem:t,extendComponentModel:r,extendComponentView:s}=l;r({type:"GLMap",getViewer(){return Object(this.getZr()).viewer},defaultOption:{roam:!1}}),s({type:"GLMap",init:function(a,o){this.api=o,o.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,o,n){},dispose:function(){this.api.getZr().viewer.clock.onTick.removeEventListener(this.moveHandler,this)}}),nf(l),t("GLMap",ue),e({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(a,o){}),ud=!0}var tn=class extends M{constructor(e,t){let r=te("echarts");if(!r)throw new Error("miss the echarts lib");fd(r),super(e),this._option=t,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,t=document.createElement("div");return t.setAttribute("id",this._id),t.setAttribute("data-layer-type","chart-layer"),t.style.cssText=`position:absolute; top:0; left:0; width: ${e.clientWidth}px; height: ${e.clientHeight}px;pointer-events:none;`,this._viewer.layerContainer.appendChild(t),t}_onAdd(e){let t=te("echarts");this._viewer=e,this._viewer.canvas.setAttribute("tabIndex","0"),this._delegate=this._createChartElement(),this._chart=t.init(this._delegate),Object(this._chart.getZr()).viewer=e,this._option&&this._chart.setOption({...this._option,GLMap:{},animation:!1}),this._state=m.ADDED}_onRemove(){this._delegate&&this._viewer&&(this._chart.dispose(),this._viewer.layerContainer.removeChild(this._delegate),this._state=m.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}},_d=tn;var rn=class{constructor(e){this._viewer=e,this._material=i.Material.fromType(i.Material.ElevationContourType,{color:i.Color.YELLOW})}start(e,t,r){return e&&(this._material.uniforms.color=e),t&&(this._material.uniforms.width=t),r&&(this._material.uniforms.spacing=r),this._viewer.scene.globe.material=this._material,this}stop(){return this._viewer.scene.globe.material=void 0,this}},ui=rn;var sn=class{constructor(e){this._viewer=e,this._shadowsState=this._viewer.delegate.shadows}start(e,t=1600){return this._viewer.delegate.shadows=!0,this._viewer.clock.currentTime=i.JulianDate.fromDate(e),this._viewer.clock.multiplier=t,this}stop(){return this._viewer.delegate.shadows=this._shadowsState,this._viewer.clock.currentTime=i.JulianDate.now(),this._viewer.clock.multiplier=1,this}},fi=sn;var an=class{constructor(e){this._viewer=e,this._delegate=new i.PrimitiveCollection,this._viewer.scene.primitives.add(this._delegate)}_lerp(e,t,r=100){let s=[];for(let a=0;a<r;a++){let o=i.Math.lerp(e.lng,t.lng,a/r),n=i.Math.lerp(e.lat,t.lat,a/r),h=e.alt-(e.alt-t.alt)*(a/r);s.push({lng:o,lat:n,alt:h})}return s}_createLine(e,t){let r=new i.PolylineGeometry({positions:e,width:3,vertexFormat:i.PolylineMaterialAppearance.VERTEX_FORMAT,arcType:i.ArcType.NONE}),s=t.withAlpha(.6),a=new i.PolylineColorAppearance({translucent:t.alpha!==1}),o=new i.PolylineColorAppearance({translucent:s.alpha!==1});return new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:r,attributes:{color:i.ColorGeometryInstanceAttribute.fromColor(t),depthFailColor:i.ColorGeometryInstanceAttribute.fromColor(s)}}),appearance:a,depthFailAppearance:o,asynchronous:!0})}start(e,t,r,s){e=g.parsePosition(e),t=g.parsePosition(t);let a=this._lerp(e,t,s),o=a.map(p=>u.transformWGS84ToCartographic(p)),n=a.map(p=>u.transformWGS84ToCartesian(p)),h=this._viewer.terrainProvider&&!(this._viewer.terrainProvider instanceof i.EllipsoidTerrainProvider)?i.sampleTerrainMostDetailed(this._viewer.terrainProvider,o):Promise.resolve([]),c=this._viewer.scene.clampToHeightSupported?this._viewer.scene.clampToHeightMostDetailed(n,r):Promise.resolve([]);return Promise.all([h,c]).then(([p,f])=>{let y=[],_=0;return p.forEach((d,T)=>{let C=Math.max(d.height||0,f[T]?i.Cartographic.fromCartesian(f[T]).height:0);(a[T].alt<C&&_===0||_>=1&&(a[T].alt>C&&_%2!==0||a[T].alt<C&&_%2===0))&&(y.push(a[T]),_++)}),y}).then(p=>{p.length?(this._delegate.add(this._createLine([u.transformWGS84ToCartesian(e),u.transformWGS84ToCartesian(p[0])],i.Color.GREEN)),p.forEach((f,y)=>{let _=p[y+1];_=_?u.transformWGS84ToCartesian(_):u.transformWGS84ToCartesian(t),this._delegate.add(this._createLine([u.transformWGS84ToCartesian(f),_],y%2===0?i.Color.RED:i.Color.HOTPINK))})):this._delegate.add(this._createLine([u.transformWGS84ToCartesian(e),u.transformWGS84ToCartesian(t)],i.Color.GREEN))}),this}stop(){return this._delegate.removeAll(),this}},_i=an;var gd=`uniform float czzj;\r
|
|
1806
|
-
uniform float dis;\r
|
|
1807
|
-
uniform float spzj;\r
|
|
1808
|
-
uniform vec3 visibleColor;\r
|
|
1809
|
-
uniform vec3 disVisibleColor;\r
|
|
1810
|
-
uniform float mixNum;\r
|
|
1811
|
-
uniform sampler2D colorTexture;\r
|
|
1812
|
-
uniform sampler2D stcshadow;\r
|
|
1813
|
-
uniform sampler2D depthTexture;\r
|
|
1814
|
-
uniform mat4 _shadowMap_matrix;\r
|
|
1815
|
-
uniform vec4 shadowMap_lightPositionEC;\r
|
|
1816
|
-
uniform vec4 shadowMap_lightDirectionEC;\r
|
|
1817
|
-
uniform vec3 shadowMap_lightUp;\r
|
|
1818
|
-
uniform vec3 shadowMap_lightDir;\r
|
|
1819
|
-
uniform vec3 shadowMap_lightRight;\r
|
|
1820
|
-
uniform vec4 shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness;\r
|
|
1821
|
-
uniform vec4 shadowMap_texelSizeDepthBiasAndNormalShadingSmooth; in vec2 v_textureCoordinates;\r
|
|
1822
|
-
vec4 toEye(in vec2 uv, in float depth) {\r
|
|
1823
|
-
vec2 xy = vec2((uv.x * 2.0 - 1.0), (uv.y * 2.0 - 1.0));\r
|
|
1824
|
-
vec4 posInCamera = czm_inverseProjection * vec4(xy, depth, 1.0);\r
|
|
1825
|
-
posInCamera = posInCamera / posInCamera.w;\r
|
|
1826
|
-
return posInCamera;\r
|
|
1827
|
-
}\r
|
|
1828
|
-
float getDepth(in vec4 depth) {\r
|
|
1829
|
-
float z_window = czm_unpackDepth(depth);\r
|
|
1830
|
-
z_window = czm_reverseLogDepth(z_window);\r
|
|
1831
|
-
float n_range = czm_depthRange.near;\r
|
|
1832
|
-
float f_range = czm_depthRange.far;\r
|
|
1833
|
-
return (2.0 * z_window - n_range - f_range) / (f_range - n_range);\r
|
|
1834
|
-
}\r
|
|
1835
|
-
float _czm_sampleShadowMap(sampler2D shadowMap, vec2 uv) {\r
|
|
1836
|
-
return texture(shadowMap, uv).r;\r
|
|
1837
|
-
}\r
|
|
1838
|
-
float _czm_shadowDepthCompare(sampler2D shadowMap, vec2 uv, float depth) {\r
|
|
1839
|
-
return step(depth, _czm_sampleShadowMap(shadowMap, uv));\r
|
|
1840
|
-
}\r
|
|
1841
|
-
float _czm_shadowVisibility(sampler2D shadowMap, czm_shadowParameters shadowParameters) {\r
|
|
1842
|
-
float depthBias = shadowParameters.depthBias;\r
|
|
1843
|
-
float depth = shadowParameters.depth;\r
|
|
1844
|
-
float nDotL = shadowParameters.nDotL;\r
|
|
1845
|
-
float normalShadingSmooth = shadowParameters.normalShadingSmooth;\r
|
|
1846
|
-
float darkness = shadowParameters.darkness;\r
|
|
1847
|
-
vec2 uv = shadowParameters.texCoords;\r
|
|
1848
|
-
depth -= depthBias;\r
|
|
1849
|
-
vec2 texelStepSize = shadowParameters.texelStepSize;\r
|
|
1850
|
-
float radius = 1.0;\r
|
|
1851
|
-
float dx0 = -texelStepSize.x * radius;\r
|
|
1852
|
-
float dy0 = -texelStepSize.y * radius;\r
|
|
1853
|
-
float dx1 = texelStepSize.x * radius;\r
|
|
1854
|
-
float dy1 = texelStepSize.y * radius;\r
|
|
1855
|
-
float visibility =\r
|
|
1856
|
-
(\r
|
|
1857
|
-
_czm_shadowDepthCompare(shadowMap, uv, depth) +\r
|
|
1858
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy0), depth) +\r
|
|
1859
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy0), depth) +\r
|
|
1860
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy0), depth) +\r
|
|
1861
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, 0.0), depth) +\r
|
|
1862
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, 0.0), depth) +\r
|
|
1863
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx0, dy1), depth) +\r
|
|
1864
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(0.0, dy1), depth) +\r
|
|
1865
|
-
_czm_shadowDepthCompare(shadowMap, uv + vec2(dx1, dy1), depth)\r
|
|
1866
|
-
) * (1.0 / 9.0);\r
|
|
1867
|
-
return visibility;\r
|
|
1868
|
-
}\r
|
|
1869
|
-
vec3 pointProjectOnPlane(in vec3 planeNormal, in vec3 planeOrigin, in vec3 point) {\r
|
|
1870
|
-
vec3 v01 = point - planeOrigin;\r
|
|
1871
|
-
float d = dot(planeNormal, v01);\r
|
|
1872
|
-
return (point - planeNormal * d);\r
|
|
1873
|
-
}\r
|
|
1874
|
-
float ptm(vec3 pt) {\r
|
|
1875
|
-
return sqrt(pt.x * pt.x + pt.y * pt.y + pt.z * pt.z);\r
|
|
1876
|
-
}\r
|
|
1877
|
-
void main() {\r
|
|
1878
|
-
const float PI = 3.141592653589793;\r
|
|
1879
|
-
vec4 color = texture(colorTexture, v_textureCoordinates);\r
|
|
1880
|
-
vec4 currD = texture(depthTexture, v_textureCoordinates);\r
|
|
1881
|
-
if (currD.r >= 1.0) {\r
|
|
1882
|
-
out_FragColor = color;\r
|
|
1883
|
-
return;\r
|
|
1884
|
-
}\r
|
|
1885
|
-
\r
|
|
1886
|
-
float depth = getDepth(currD);\r
|
|
1887
|
-
vec4 positionEC = toEye(v_textureCoordinates, depth);\r
|
|
1888
|
-
vec3 normalEC = vec3(1.0);\r
|
|
1889
|
-
czm_shadowParameters shadowParameters;\r
|
|
1890
|
-
shadowParameters.texelStepSize = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.xy;\r
|
|
1891
|
-
shadowParameters.depthBias = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.z;\r
|
|
1892
|
-
shadowParameters.normalShadingSmooth = shadowMap_texelSizeDepthBiasAndNormalShadingSmooth.w;\r
|
|
1893
|
-
shadowParameters.darkness = shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness.w;\r
|
|
1894
|
-
shadowParameters.depthBias *= max(depth * 0.01, 1.0);\r
|
|
1895
|
-
vec3 directionEC = normalize(positionEC.xyz - shadowMap_lightPositionEC.xyz);\r
|
|
1896
|
-
float nDotL = clamp(dot(normalEC, -directionEC), 0.0, 1.0);\r
|
|
1897
|
-
vec4 shadowPosition = _shadowMap_matrix * positionEC;\r
|
|
1898
|
-
shadowPosition /= shadowPosition.w;\r
|
|
1899
|
-
if (any(lessThan(shadowPosition.xyz, vec3(0.0))) || any(greaterThan(shadowPosition.xyz, vec3(1.0)))) {\r
|
|
1900
|
-
out_FragColor = color;\r
|
|
1901
|
-
return;\r
|
|
1902
|
-
}\r
|
|
1903
|
-
\r
|
|
1904
|
-
//\u5750\u6807\u4E0E\u89C6\u70B9\u4F4D\u7F6E\u8DDD\u79BB\\uFF0C\u5927\u4E8E\u6700\u5927\u8DDD\u79BB\u5219\u820D\u5F03\u9634\u5F71\u6548\u679C\r
|
|
1905
|
-
vec4 lw = czm_inverseView * vec4(shadowMap_lightPositionEC.xyz, 1.0);\r
|
|
1906
|
-
vec4 vw = czm_inverseView * vec4(positionEC.xyz, 1.0);\r
|
|
1907
|
-
if (distance(lw.xyz, vw.xyz) > dis) {\r
|
|
1908
|
-
out_FragColor = color;\r
|
|
1909
|
-
return;\r
|
|
1910
|
-
}\r
|
|
1911
|
-
\r
|
|
1912
|
-
\r
|
|
1913
|
-
//\u6C34\u5E73\u5939\u89D2\u9650\u5236\r
|
|
1914
|
-
vec3 ptOnSP = pointProjectOnPlane(shadowMap_lightUp, lw.xyz, vw.xyz);\r
|
|
1915
|
-
directionEC = ptOnSP - lw.xyz;\r
|
|
1916
|
-
float directionECMO = ptm(directionEC.xyz);\r
|
|
1917
|
-
float shadowMap_lightDirMO = ptm(shadowMap_lightDir.xyz);\r
|
|
1918
|
-
float cosJJ = dot(directionEC, shadowMap_lightDir) / (directionECMO * shadowMap_lightDirMO);\r
|
|
1919
|
-
float degJJ = acos(cosJJ) * (180.0 / PI);\r
|
|
1920
|
-
degJJ = abs(degJJ);\r
|
|
1921
|
-
if (degJJ > spzj / 2.0) {\r
|
|
1922
|
-
out_FragColor = color;\r
|
|
1923
|
-
return;\r
|
|
1924
|
-
}\r
|
|
1925
|
-
\r
|
|
1926
|
-
//\u5782\u76F4\u5939\u89D2\u9650\u5236\r
|
|
1927
|
-
vec3 ptOnCZ = pointProjectOnPlane(shadowMap_lightRight, lw.xyz, vw.xyz);\r
|
|
1928
|
-
vec3 dirOnCZ = ptOnCZ - lw.xyz;\r
|
|
1929
|
-
float dirOnCZMO = ptm(dirOnCZ);\r
|
|
1930
|
-
float cosJJCZ = dot(dirOnCZ, shadowMap_lightDir) / (dirOnCZMO * shadowMap_lightDirMO);\r
|
|
1931
|
-
float degJJCZ = acos(cosJJCZ) * (180.0 / PI);\r
|
|
1932
|
-
degJJCZ = abs(degJJCZ);\r
|
|
1933
|
-
if (degJJCZ > czzj / 2.0) {\r
|
|
1934
|
-
out_FragColor = color;\r
|
|
1935
|
-
return;\r
|
|
1936
|
-
}\r
|
|
1937
|
-
\r
|
|
1938
|
-
shadowParameters.texCoords = shadowPosition.xy;\r
|
|
1939
|
-
shadowParameters.depth = shadowPosition.z;\r
|
|
1940
|
-
shadowParameters.nDotL = nDotL;\r
|
|
1941
|
-
float visibility = _czm_shadowVisibility(stcshadow, shadowParameters);\r
|
|
1942
|
-
if (visibility == 1.0) {\r
|
|
1943
|
-
out_FragColor = mix(color, vec4(visibleColor, 1.0), mixNum);\r
|
|
1944
|
-
} else {\r
|
|
1945
|
-
if (abs(shadowPosition.z - 0.0) < 0.01) {\r
|
|
1946
|
-
return;\r
|
|
1947
|
-
}\r
|
|
1948
|
-
out_FragColor = mix(color, vec4(disVisibleColor, 1.0), mixNum);\r
|
|
1949
|
-
}\r
|
|
1950
|
-
}\r
|
|
1951
|
-
`;var hf={visibleColor:new i.Color(0,1,0,1),disVisibleColor:new i.Color(1,0,0,1),showHelp:!1,mixNum:1,gridColor:i.Color.YELLOW,lineColor:i.Color.YELLOW.withAlpha(.3)},on=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 t=u.transformWGS84ToCartesian(e),r=re.getViewPosition(e,this._frustum.far);this._viewer&&(this._camera||(this._camera=new i.Camera(this._viewer.scene)),this._camera.frustum=this._frustum,re.setCamera(this._camera,t,r,e.roll))}_updateHelpPrimitive(e){this._viewer.scene.primitives.remove(this._ellipsoidPrimitive),this._viewer.scene.primitives.remove(this._linePrimitive);let t=i.Transforms.headingPitchRollToFixedFrame(u.transformWGS84ToCartesian(e),new i.HeadingPitchRoll((-Math.PI+this._frustum.fov)/2+i.Math.toRadians(e.heading),i.Math.toRadians(e.pitch),i.Math.toRadians(e.roll))),r=new i.Cartesian3(this._frustum.far,this._frustum.far,this._frustum.far),s=new i.EllipsoidOutlineGeometry({radii:r,innerRadii:i.Cartesian3.divideByScalar(r,20,new i.Cartesian3),minimumClock:0,maximumClock:this._frustum.fov,minimumCone:(Math.PI-this._frustum.fovy)/2,maximumCone:i.Math.toRadians(110)});this._linePrimitive=this._viewer.scene.primitives.add(new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:s,attributes:{color:i.ColorGeometryInstanceAttribute.fromColor(this._options.lineColor)}}),appearance:new i.PerInstanceColorAppearance({flat:!0,renderState:{lineWidth:Math.min(2,this._viewer.scene.maximumAliasedLineWidth)}}),modelMatrix:t})),s=new i.EllipsoidGeometry({radii:r,minimumClock:0,maximumClock:this._frustum.fov,minimumCone:(Math.PI-this._frustum.fovy)/2,maximumCone:i.Math.toRadians(110)}),this._ellipsoidPrimitive=this._viewer.scene.primitives.add(new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:s}),appearance:new i.MaterialAppearance({translucent:!1,material:i.Material.fromType(i.Material.GridType,{color:this._options.gridColor,lineCount:new i.Cartesian2(200,200)})}),modelMatrix:t}))}_createPostProcessStage(){return new i.PostProcessStage({fragmentShader:gd,uniforms:{czzj:()=>i.Math.toDegrees(this._frustum.fovy),dis:()=>this._frustum.far,spzj:()=>i.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 i.Cartesian4.fromElements(1/this._viewShadowMap._textureSize.x,1/this._viewShadowMap._textureSize.y,e.depthBias,e.normalShadingSmooth,new i.Cartesian4)},shadowMap_normalOffsetScaleDistanceMaxDistanceAndDarkness:()=>{let e=this._viewShadowMap._isPointLight?this._viewShadowMap._pointBias:this._viewShadowMap._primitiveBias;return i.Cartesian4.fromElements(e.normalOffsetScale,this._viewShadowMap._distance,this._viewShadowMap.maximumDistance,this._viewShadowMap._darkness,new i.Cartesian4)}}})}update(){this._viewShadowMap&&this._viewer.scene.frameState.shadowMaps.push(this._viewShadowMap)}start(e,t,r,s,a={}){return this._options={...hf,...a},this._frustum=new i.PerspectiveFrustum({fov:i.Math.toRadians(r),aspectRatio:s,far:t,near:.05}),e=g.parsePosition(e),this._updateCameraState(e),this._viewShadowMap=new i.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}},gi=on;var cf={CONTOUR_LINE:"ContourLine",SHADOWS:"Shadows",SIGHT_CIRCLE:"SightCircle",SIGHT_LINE:"SightLine",VIEWSHED:"Viewshed"},Se=cf;var nn=class{constructor(e){this._contourLine=new ui(e),this._shadows=new fi(e),this._sightLine=new _i(e),this._viewshed=new gi(e)}contourLine(e,t,r){return this._contourLine.start(e,t,r),this}shadows(e,t){return this._shadows.start(e||new Date,t||1600),this}sightLine(e,t,r=[],s=10){return!e||!t?this:(this._sightLine.start(e,t,r.map(a=>a.delegate||a),s),this)}sightCircle(e,t,r,s=10){if(!e||!t)return this;let a=i.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(e),semiMajorAxis:+t,semiMinorAxis:+t,rotation:0,granularity:.03},!1,!0);return i.Cartesian3.unpackArray(a.outerPositions).forEach(n=>{this.sightLine(e,u.transformCartesianToWGS84(n),r||[],s)}),this}viewshed(e,t,r,s=1.3,a={}){return!e||!t||!r?this:(this._viewshed.start(e,t,r,s,a),this)}deactivate(e){switch(e){case Se.CONTOUR_LINE:this._contourLine.stop();break;case Se.SHADOWS:this._shadows.stop();break;case Se.SIGHT_CIRCLE:case Se.SIGHT_LINE:this._sightLine.stop();break;case Se.VIEWSHED:this._viewshed.stop();break;default:this._contourLine.stop(),this._shadows.stop(),this._sightLine.stop(),this._viewshed.stop();break}return this}},yd=nn;var pf={UP:"up",DOWN:"down",LEFT:"left",RIGHT:"right",FRONT:"front",BACK:"back",NONE:"none"},fe=pf;var df={edgeWidth:0,edgeColor:i.Color.WHITE,unionClippingRegions:!1},ln=class{constructor(e={}){this._options={...df,...e},this._direction=void 0,this._distance=0,this._angle=0,this._positions=void 0,this._planeCollection=new i.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=g.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(t=>{t.distance=+e})}get angle(){return this._angle}set angle(e){this._angle=+e,this._planeCollection._planes.forEach(t=>{if(e){let r=i.Matrix3.fromRotationZ(i.Math.toRadians(+e));i.Matrix3.multiplyByVector(r,t.normal,t.normal)}})}get enable(){return this._enable}set enable(e){this._enable!==e&&(this._enable=e,this._planeCollection.enabled=this._enable,this._state=this._enable?m.ENABLED:m.DISABLED,this._enableHook&&this._enableHook())}get state(){return this._state}_enableHook(){}_mountPlanes(){}_getDirectionNoraml(e){let t;switch(e){case fe.UP:t=new i.Cartesian3(0,0,1);break;case fe.DOWN:t=new i.Cartesian3(0,0,-1);break;case fe.LEFT:t=new i.Cartesian3(-1,0,0);break;case fe.RIGHT:t=new i.Cartesian3(1,0,0);break;case fe.FRONT:t=new i.Cartesian3(0,-1,0);break;case fe.BACK:t=new i.Cartesian3(0,1,0);break;default:break}return t}_isCcw(e){if(!e||e.length<3)return!1;let t=u.transformWGS84ToCartesian(this._positions[0]),r=u.transformWGS84ToCartesian(this._positions[1]),s=u.transformWGS84ToCartesian(this._positions[2]);return(s.y-r.y)*(r.x-t.x)-(r.y-t.y)*(s.x-r.x)>0}computeGlobePlanes(){let e=[];if(this._positions&&this._positions.length>=3){let t=this._isCcw(this._positions),r=this._positions.length;for(let s=0;s<r;s++){let a=(s+1)%r;if(this._positions[s].lng===this._positions[a].lng&&this._positions[s].lat===this._positions[a].lat&&this._positions[s].alt===this._positions[a].lat)continue;let o=u.transformWGS84ToCartesian(this._positions[s]),n=u.transformWGS84ToCartesian(this._positions[a]),h=i.Cartesian3.cross(o,t?i.Cartesian3.subtract(o,n,new i.Cartesian3):i.Cartesian3.subtract(n,o,new i.Cartesian3),new i.Cartesian3);i.Cartesian3.normalize(h,h),e.push(new i.ClippingPlane(h,this._distance||0))}}return e}computeModelPlanes(e){let t=[],r=i.Matrix4.inverseTransformation(e,new i.Matrix4);if(this._positions&&this._positions.length===2){let s=i.Cartesian3.UNIT_Z,a=i.Matrix4.multiplyByPoint(r,u.transformWGS84ToCartesian(this._positions[0]),new i.Cartesian3),o=i.Matrix4.multiplyByPoint(r,u.transformWGS84ToCartesian(this._positions[1]),new i.Cartesian3),n=i.Cartesian3.subtract(o,a,new i.Cartesian3);i.Cartesian3.normalize(n,n);let h=i.Cartesian3.cross(s,n,new i.Cartesian3);t.push(new i.ClippingPlane(h,this._distance||0))}else if(this._positions&&this._positions.length>=3){let s=i.Cartesian3.UNIT_Z,a=this._isCcw(this._positions),o=this._positions.length;for(let n=0;n<o;n++){let h=(n+1)%o;if(this._positions[n].lng===this._positions[h].lng&&this._positions[n].lat===this._positions[h].lat&&this._positions[n].alt===this._positions[h].lat)continue;let c=i.Matrix4.multiplyByPoint(r,u.transformWGS84ToCartesian(this._positions[n]),new i.Cartesian3),p=i.Matrix4.multiplyByPoint(r,u.transformWGS84ToCartesian(this._positions[h]),new i.Cartesian3),f=i.Cartesian3.cross(s,i.Cartesian3.normalize(a?i.Cartesian3.subtract(c,p,new i.Cartesian3):i.Cartesian3.subtract(p,c,new i.Cartesian3),new i.Cartesian3),new i.Cartesian3);t.push(new i.ClippingPlane(f,this._distance||0))}}else if(this._direction&&this._direction!==fe.NONE){let s=this._getDirectionNoraml(this._direction);if(this._angle){let a=i.Matrix3.fromRotationZ(i.Math.toRadians(this._angle));i.Matrix3.multiplyByVector(a,s,s)}s&&t.push(new i.ClippingPlane(s,this._distance||0))}return t}},qe=ln;var hn=class extends qe{constructor(e,t={}){super(t),this._viewer=e,this._planeCollection.unionClippingRegions=!0,this._viewer.scene.globe.clippingPlanes=this._planeCollection}_mountPlanes(){let e=this.computeGlobePlanes();this._planeCollection.removeAll(),e.forEach(t=>{this._planeCollection.add(t)})}},vd=hn;var mf={lerpInterval:50,bottomImage:"",sideImage:""},cn=class extends qe{constructor(e,t={}){super({...mf,...t}),this._viewer=e,this._viewer.scene.globe.clippingPlanes=this._planeCollection,this._height=5,this._layer=new i.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 i.EllipsoidTerrainProvider)){let e=[],t=this._positions.length,r=this._options.lerpInterval;for(let s=0;s<t;s++){let a=(s+1)%t,o=u.transformWGS84ToCartographic(this._positions[s]),n=u.transformWGS84ToCartographic(this._positions[a]);for(let h=0;h<r;h++){let c=i.Math.lerp(o.longitude,n.longitude,h/r),p=i.Math.lerp(o.latitude,n.latitude,h/r);e.push(new i.Cartographic(c,p))}}i.sampleTerrainMostDetailed(this._viewer.terrainProvider,e).then(s=>{this._createSideWall(s.map(a=>i.Cartesian3.fromRadians(a.longitude,a.latitude)),s.map(a=>a.height))})}else this._createSideWall(this._positions.map(e=>u.transformWGS84ToCartesian(e)),this._positions.map(e=>e.alt))}_mountPlanes(){this._layer.removeAll(),this._planeCollection.removeAll(),this.computeGlobePlanes().forEach(t=>{this._planeCollection.add(t)}),this._drawPrimitive()}_getMinHeight(){let e=this._positions[0].alt;return this._positions.forEach(t=>{e=Math.min(e,t.alt)}),e-this._height}_createBottomPolygon(){let e=this._getMinHeight(),t=this._positions.map(a=>({lng:a.lng,lat:a.lat,alt:e})),r=new i.PolygonGeometry({polygonHierarchy:new i.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t)),perPositionHeight:!0}),s=i.PolygonGeometry.createGeometry(r);this._layer.add(new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:s}),appearance:new i.MaterialAppearance({material:i.Material.fromType(i.Material.ImageType,{image:this._options.bottomImage,repeat:new i.Cartesian2(5,5)})}),asynchronous:!1}))}_createSideWall(e,t){let r=this._getMinHeight(),s=e.map(()=>r),a=new i.WallGeometry({positions:e.concat(e[0]),maximumHeights:s.concat(s[0]),minimumHeights:t.concat(t[0])}),o=i.WallGeometry.createGeometry(a);this._layer.add(new i.Primitive({geometryInstances:new i.GeometryInstance({geometry:o}),appearance:new i.MaterialAppearance({material:i.Material.fromType(i.Material.ImageType,{image:this._options.sideImage,repeat:new i.Cartesian2(5,5)})}),asynchronous:!1}))}},wd=cn;var pn=class extends qe{constructor(e,t={}){super(t),this._tileset=e,this._delegate=e.delegate}_mountPlanes(){this._planeCollection.removeAll(),this._delegate.then(e=>{let t=e.root.transform,r=this.computeModelPlanes(t);this._planeCollection.modelMatrix=t,r.forEach(s=>{this._planeCollection.add(s)}),e.clippingPlanes=this._planeCollection})}computePlanes(){}},xd=pn;var uf={disappearHeight:1e3,disappearSeconds:.5,appearSeconds:.5},dn=class{constructor(e,t=[],r={}){this._viewer=e,this._models=t.map(s=>s.delegate||s)||[],this._options={...uf,...r},this._oriPositions=this._models.map(s=>s.position.getValue(i.JulianDate.now()))||[],this._spreadtPositions=[],this._lastPositions=[],this._currentIndex=-1}get models(){return this._models}set models(e){this._models=e.map(t=>t.delegate||t)||[],this._oriPositions=this._models.map(t=>t.position.getValue(i.JulianDate.now()))||[],this._spreadtPositions=[],this._lastPositions=[],this._currentIndex=-1}spread(e,t=2,r=1){if(e<=0)return this;let s=i.JulianDate.now();return this._models.forEach((a,o)=>{let n=a.position.getValue(s);if(n){let h=new i.SampledPositionProperty;h.forwardExtrapolationType=r;let c=i.Cartographic.fromCartesian(n);c.height+=e*o,h.addSample(i.JulianDate.addSeconds(s,-1,new i.JulianDate),n),h.addSample(i.JulianDate.addSeconds(s,t,new i.JulianDate),i.Cartographic.toCartesian(c)),a.position=h,this._spreadtPositions[o]=i.Cartographic.toCartesian(c)}else{let h=i.Cartographic.fromCartesian(this._spreadtPositions[o]||this._oriPositions[o]);h.height+=e*o,this._spreadtPositions[o]=i.Cartographic.toCartesian(h)}}),this}combine(e=2){let t=i.JulianDate.now();return this._models.forEach((r,s)=>{let a=r.position.getValue(t);if(this._spreadtPositions[s]&&a){let o=new i.SampledPositionProperty;o.forwardExtrapolationType=i.ExtrapolationType.HOLD,o.addSample(i.JulianDate.addSeconds(t,-1,new i.JulianDate),this._spreadtPositions[s]),o.addSample(i.JulianDate.addSeconds(t,e,new i.JulianDate),this._oriPositions[s]),r.position=o}}),this._currentIndex=-1,this._spreadtPositions=[],this._lastPositions=[],this}showModel(e){if(e>this._models.length-1||this._currentIndex===e)return this;let t=i.JulianDate.now(),r=this._models.length;return this._models.forEach((s,a)=>{let o=s.position.getValue(t),n=new i.SampledPositionProperty;if(a>e&&(n.forwardExtrapolationType=i.ExtrapolationType.NONE,o)){let h=i.Cartographic.fromCartesian(o);h.height+=this._options.disappearHeight/r*(a+1),n.addSample(i.JulianDate.addSeconds(t,-1,new i.JulianDate),o),n.addSample(i.JulianDate.addSeconds(t,this._options.disappearSeconds,new i.JulianDate),i.Cartographic.toCartesian(h)),s.position=n,this._lastPositions[a]=i.Cartographic.toCartesian(h)}!o&&e>=a&&(n.forwardExtrapolationType=i.ExtrapolationType.HOLD,n.addSample(i.JulianDate.addSeconds(t,-1,new i.JulianDate),this._lastPositions[a]),n.addSample(i.JulianDate.addSeconds(t,this._options.appearSeconds,new i.JulianDate),this._spreadtPositions[a]||this._oriPositions[a]),s.position=n,this._lastPositions[a]=this._spreadtPositions[a]||this._oriPositions[a])}),this._currentIndex=e,this}restore(){return this._models.forEach((e,t)=>{e.position=this._oriPositions[t]}),this._currentIndex=-1,this._lastPositions=[],this._spreadtPositions=[],this}},Cd=dn;var mn=class{static pointBuffer(e,t,r=8){var n;let s=te("turf");if(!s)throw"missing turf";let a=s.point(g.parsePointCoordToArray(e)),o=s.buffer(a,t,{units:"meters",steps:r});return((n=o==null?void 0:o.geometry)==null?void 0:n.coordinates[0])||[]}static polylineBuffer(e,t,r=8){var n;let s=te("turf");if(!s)throw"missing turf";let a=s.lineString(g.parsePolylineCoordToArray(e)),o=s.buffer(a,t,{units:"meters",steps:r});return((n=o==null?void 0:o.geometry)==null?void 0:n.coordinates[0])||[]}static polygonBuffer(e,t,r=8){var n;let s=te("turf");if(!s)throw"missing turf";let a=s.polygon(g.parsePolygonCoordToArray(e,!0)),o=s.buffer(a,t,{units:"meters",steps:r});return((n=o==null?void 0:o.geometry)==null?void 0:n.coordinates[0])||[]}static sector(e,t,r,s,a=64){var c;let o=te("turf");if(!o)throw"missing turf";let n=o.point(g.parsePointCoordToArray(e)),h=o.sector(n,t,r,s,{units:"meters",steps:a});return((c=h==null?void 0:h.geometry)==null?void 0:c.coordinates[0])||[]}static transformPolylineScale(e,t){var o;let r=te("turf");if(!r)throw"missing turf";let s=r.lineString(g.parsePolylineCoordToArray(e)),a=r.transformScale(s,t);return((o=a==null?void 0:a.geometry)==null?void 0:o.coordinates)||[]}static transformPolygonScale(e,t){var o;let r=te("turf");if(!r)throw"missing turf";let s=r.polygon(g.parsePolygonCoordToArray(e,!0)),a=r.transformScale(s,t);return((o=a==null?void 0:a.geometry)==null?void 0:o.coordinates[0])||[]}static transformPolylineRotate(e,t){var o;let r=te("turf");if(!r)throw"missing turf";let s=r.lineString(g.parsePolylineCoordToArray(e)),a=r.transformRotate(s,t);return((o=a==null?void 0:a.geometry)==null?void 0:o.coordinates)||[]}static transformPolygonRotate(e,t){var o;let r=te("turf");if(!r)throw"missing turf";let s=r.polygon(g.parsePolygonCoordToArray(e,!0)),a=r.transformRotate(s,t);return((o=a==null?void 0:a.geometry)==null?void 0:o.coordinates[0])||[]}},Td=mn;var B7=i.Cartesian2,U7=i.Cartesian3,V7=i.Matrix3,j7=i.Matrix4,Z7=i.Material,Y7=i.SceneMode,J7=i.SkyBox,q7=i.Color,X7=i.Rectangle,Q7=i.ShadowMode,K7=i.JulianDate,$7=i.HeightReference,ez=i.HorizontalOrigin,tz=i.VerticalOrigin,iz=i.CallbackProperty,rz=i.ClassificationType,sz=i.Cesium3DTileStyle,az=i.GeographicTilingScheme,oz=i.WebMercatorTilingScheme,nz=i.ColorMaterialProperty,lz=i.ImageMaterialProperty,hz=i.PolylineDashMaterialProperty,cz=i.PolylineGlowMaterialProperty,pz=i.PolylineOutlineMaterialProperty,dz=i.PolylineArrowMaterialProperty,mz=i.writeTextToCanvas,uz=i.CustomShaderMode,fz=i.CustomShaderTranslucencyMode,_z=i.CustomShader,gz=i.UniformType,yz=i.Ellipsoid,vz=i.Resource,wz=i.createGooglePhotorealistic3DTileset,xz=i.createElevationBandMaterial,Cz=i.ModelAnimationLoop,Tz=i.ClippingPlane,Ez=i.ClippingPlaneCollection,Pz=i.ClippingPolygon,Mz=i.ClippingPolygonCollection;globalThis.__cmdOut=()=>{window.setTimeout(console.clear.bind(console,"")),window.setTimeout(console.log.bind(console,`%c
|
|
1952
|
-
\u{1F30D} PanGu Gis SDK
|
|
1953
|
-
%c
|
|
1954
|
-
\u76D8\u53E4\u5730\u7406\u4FE1\u606F\u7CFB\u7EDF %c
|
|
1955
|
-
PanGu Gis For Cesium SDK %c
|
|
1956
|
-
|
|
1957
|
-
\u7248\u672C: 5.0.0 - 2025-07-10
|
|
1958
|
-
Cesium\u7248\u672C\uFF1A1.131.0
|
|
1959
|
-
\u5F00\u53D1\u4F5C\u8005: Lucas Xu <xulei0857@qq.com>
|
|
1960
|
-
\u6388\u6743\u6E56\u5317\u8702\u4E91\u8F6F\u4EF6\u6709\u9650\u516C\u53F8-\u6C38\u4E45\u4F7F\u7528\u6B64\u8F6F\u4EF6\u5F53\u524D\u7248\u672C\u3002
|
|
1961
|
-
|
|
1962
|
-
|
|
1963
|
-
\u{1F4DE}\u5FAE\u4FE1: 13635783999
|
|
1964
|
-
\u{1F3E0}\u5B98\u7F51: https://www.pggis.com`,"font-size:24px;padding-left:50px;color:#F08519","font-size:22px;padding-left:50px;color:#F08519","font-size:14px;padding-left:50px;color:#008AFF;font-style:oblique","font-size:15px;color:#008AFF"))};var Pd="./libs/pg-sdk/resources/",Ed=Pd;lt("baseUrl",Pd);var Sz={set baseUrl(l){Ed=l,lt("baseUrl",l)},get baseUrl(){return Ed}},Iz="5.0.0";export{yd as Analysis,Se as AnalysisType,q as AnimationType,vp as AroundPoint,yp as AroundView,Be as AttackArrow,Ue as Billboard,Pt as BillboardPrimitive,jl as BounceBillboardPrimitive,Yl as BounceLabelPrimitive,lh as Box,iz as CallbackProperty,re as CameraUtil,cd as CameraVideo,Dh as CameraVideoLayer,B7 as Cartesian2,U7 as Cartesian3,_d as ChartLayer,At as Circle,Tc as CircleBlurMaterialProperty,Ec as CircleDiffuseMaterialProperty,Pc as CircleFadeMaterialProperty,Mc as CirclePulseMaterialProperty,xp as CircleScan,Ac as CircleScanMaterialProperty,bc as CircleSpiralMaterialProperty,Sc as CircleVaryMaterialProperty,Ic as CircleWaveMaterialProperty,rz as ClassificationType,fe as ClippingDirection,Tz as ClippingPlane,Ez as ClippingPlaneCollection,Pz as ClippingPolygon,Mz as ClippingPolygonCollection,Jl as CloudPrimitive,Il as ClusterLayer,q7 as Color,nz as ColorMaterialProperty,ui as ContourLine,me as CoordTransform,hh as Corridor,Ol as CustomBillboard,Ml as CustomGeographicTilingScheme,kl as CustomLabel,Al as CustomMercatorTilingScheme,_z as CustomShader,uz as CustomShaderMode,fz as CustomShaderTranslucencyMode,ch as Cylinder,Dl as CzmlLayer,ql as DiffuseWallPrimitive,Wl as DivIcon,b as DomUtil,xt as DoubleArrow,zl as DynamicBillboard,Ll as DynamicLayer,Nl as DynamicModel,ju as Effect,Xl as ElecEllipsoidPrimitive,ph as Ellipse,yz as Ellipsoid,Dc as EllipsoidElectricMaterialProperty,Lc as EllipsoidTrailMaterialProperty,Rl as FeatureGridLayer,Ct as FineArrow,Ql as FlowLinePrimitive,Cp as Flying,Tt as GatheringPlace,rt as GeoJsonLayer,Td as GeoTools,az as GeographicTilingScheme,vd as GlobeClipping,Tp as GlobeRotate,gh as GpxLayer,yh as GraticuleLayer,vh as GroundPrimitiveLayer,cl as GroundSkyBox,Th as HeatMapLayer,$7 as HeightReference,ez as HorizontalOrigin,Eh as HtmlLayer,Gl as I3S,Ph as I3SLayer,lz as ImageMaterialProperty,Pl as ImageryLayerFactory,z as ImageryType,K7 as JulianDate,Vp as KeyboardRoaming,Mh as KmlLayer,bt as Label,Ah as LabelLayer,Mt as LabelPrimitive,M as Layer,Sl as LayerGroup,it as LayerType,$l as LightCylinderPrimitive,We as LngLatArray,k as LngLatPoint,Z7 as Material,Fl as Math,V7 as Matrix3,j7 as Matrix4,sd as Measure,le as MeasureType,vt as Model,Cz as ModelAnimationLoop,Re as ModelEventType,Cd as ModelManager,eh as ModelPrimitive,R as MouseEventType,Me as MouseMode,v as Overlay,N as OverlayType,g as P,g as Parse,mh as Plane,dd as PlaneVideo,Lh as PlaneVideoLayer,Wu as Plot,w as PlotUtil,St as Point,ih as PointPrimitive,Ve as Polygon,je as Polyline,dz as PolylineArrowMaterialProperty,hz as PolylineDashMaterialProperty,Rc as PolylineFlickerMaterialProperty,Oc as PolylineFlowMaterialProperty,cz as PolylineGlowMaterialProperty,kc as PolylineImageTrailMaterialProperty,zc as PolylineLightingMaterialProperty,Nc as PolylineLightingTrailMaterialProperty,pz as PolylineOutlineMaterialProperty,rh as PolylinePrimitive,Fc as PolylineTrailMaterialProperty,fh as PolylineVolume,U as Position,ld as PositionEditor,di as PositionEditorType,bh as PrimitiveLayer,Wc as RadarLineMaterialProperty,Pp as RadarScan,Gc as RadarSweepMaterialProperty,Hc as RadarWaveMaterialProperty,Sh as RasterTileLayer,It as Rect,X7 as Rectangle,vz as Resource,jp as RoamingController,Zp as RoamingPath,Rt as S3MLayer,sh as ScanCirclePrimitive,D as SceneEventType,Y7 as SceneMode,Q7 as ShadowMode,fi as Shadows,_i as SightLine,J7 as SkyBox,dh as Sphere,ut as SurfacePoint,Rn as SurfacePoints,u as T,Et as TailedAttackArrow,wd as TerrainClipping,bl as TerrainFactory,Ae as TerrainType,Q as TileSetEventType,Hl as Tileset,xd as TilesetClipping,Rt as TilesetLayer,sz as TilesetStyle,Ih as TopoJsonLayer,Jp as Track,Yp as TrackController,be as TrackViewMode,ah as TrailLinePrimitive,u as Transform,gz as UniformType,x as Util,Iz as VERSION,ze as VectorLayer,tz as VerticalOrigin,oh as VideoPrimitive,mm as Viewer,gi as Viewshed,_h as Wall,Bc as WallImageTrailMaterialProperty,Vc as WallLineTrailMaterialProperty,Zc as WallTrailMaterialProperty,Yc as WaterMaterialProperty,nh as WaterPrimitive,Xu as Weather,oz as WebMercatorTilingScheme,kh as WindLayer,Sz as config,xz as createElevationBandMaterial,wz as createGooglePhotorealistic3DTileset,te as getLib,wn as registerLib,mz as writeTextToCanvas};
|