@gmgis/gm-sdk 1.12.3 → 1.12.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/gm.min.js CHANGED
@@ -4,7 +4,7 @@
4
4
  * @github http://gitlab.greatmap.com.cn:10000/gmgis/gm-sdk.git
5
5
  * @author XIN <1130779739@qq.com>
6
6
  * @organization dvgis
7
- * @version 1.12.3
7
+ * @version 1.12.4
8
8
  *
9
9
  * Copyright (c) 2019-present Caven Chen
10
10
  *
@@ -15765,7 +15765,7 @@ void main()
15765
15765
  `;function kbt(e){e=g(e,g.EMPTY_OBJECT);let t=c(e.typedArray),n=c(e.url);if(t===n)throw new w("exactly one of options.typedArray, options.url must be defined");if(t&&(!c(e.width)||!c(e.height)))throw new w("options.width and options.height are required when options.typedArray is defined");this.typedArray=e.typedArray,this.width=e.width,this.height=e.height,this.pixelFormat=g(e.pixelFormat,Le.RGBA),this.pixelDatatype=g(e.pixelDatatype,ze.UNSIGNED_BYTE);let i=e.url;typeof i=="string"&&(i=Te.createIfNeeded(i)),this.resource=i;let r=g(e.repeat,!0)?hn.REPEAT:hn.CLAMP_TO_EDGE;this.sampler=new Jt({wrapS:r,wrapT:r,minificationFilter:e.minificationFilter,magnificationFilter:e.magnificationFilter,maximumAnisotropy:e.maximumAnisotropy})}var Dxe=kbt;var zbt={FLOAT:"float",VEC2:"vec2",VEC3:"vec3",VEC4:"vec4",MAT2:"mat2",MAT3:"mat2",MAT4:"mat4"},Ixe=Object.freeze(zbt);var Vbt={SIGX:"SIGX",SIGY:"SIGY",SIGZ:"SIGZ",VARX:"VARX",VARY:"VARY",VARZ:"VARZ",SIGR:"VARZ"},Oxe=Object.freeze(Vbt);function Hbt(e){async function t({data:i}){let o=[],r={id:i.id,result:void 0,error:void 0};self.CESIUM_BASE_URL=i.baseUrl;try{let s=await e(i.parameters,o);r.result=s}catch(s){s instanceof Error?r.error={name:s.name,message:s.message,stack:s.stack}:r.error=s}i.canTransferArrayBuffer||(o.length=0);try{postMessage(r,o)}catch(s){r.result=void 0,r.error=`postMessage failed with error: ${Vp(s)}
15766
15766
  with responseMessage: ${JSON.stringify(r)}`,postMessage(r)}}function n(i){var o;postMessage({id:(o=i.data)==null?void 0:o.id,error:`postMessage failed with error: ${JSON.stringify(i)}`})}return self.onmessage=t,self.onmessageerror=n,self}var Pxe=Hbt;globalThis.CESIUM_VERSION="1.122";var Gbt={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:e=>e},Rxe=Math.fround||(e=>t=>(e[0]=+t,e[0]))(new Float32Array(1)),cx=2,Uy=3,u7=4,By=5,Lxe=6,GI=class{constructor(t){this.options=Object.assign(Object.create(Gbt),t),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[]}load(t){let{log:n,minZoom:i,maxZoom:o}=this.options;n&&console.time("total time");let r=`prepare ${t.length} points`;n&&console.time(r),this.points=t;let s=[];for(let l=0;l<t.length;l++){let u=t[l];if(!u.geometry)continue;let[f,h]=u.geometry.coordinates,m=Rxe(PH(f)),p=Rxe(RH(h));s.push(m,p,1/0,l,-1,1),this.options.reduce&&s.push(0)}let a=this.trees[o+1]=this._createTree(s);n&&console.timeEnd(r);for(let l=o;l>=i;l--){let u=+Date.now();a=this.trees[l]=this._createTree(this._cluster(a,l)),n&&console.log("z%d: %d clusters in %dms",l,a.numItems,+Date.now()-u)}return n&&console.timeEnd("total time"),this}getClusters(t,n){let i=((t[0]+180)%360+360)%360-180,o=Math.max(-90,Math.min(90,t[1])),r=t[2]===180?180:((t[2]+180)%360+360)%360-180,s=Math.max(-90,Math.min(90,t[3]));if(t[2]-t[0]>=360)i=-180,r=180;else if(i>r){let h=this.getClusters([i,o,180,s],n),m=this.getClusters([-180,o,r,s],n);return h.concat(m)}let a=this.trees[this._limitZoom(n)],l=a.range(PH(i),RH(s),PH(r),RH(o)),u=a.data,f=[];for(let h of l){let m=this.stride*h;f.push(u[m+By]>1?Mxe(u,m,this.clusterProps):this.points[u[m+Uy]])}return f}getChildren(t){let n=this._getOriginId(t),i=this._getOriginZoom(t),o="No cluster with the specified id.",r=this.trees[i];if(!r)throw new Error(o);let s=r.data;if(n*this.stride>=s.length)throw new Error(o);let a=this.options.radius/(this.options.extent*Math.pow(2,i-1)),l=s[n*this.stride],u=s[n*this.stride+1],f=r.within(l,u,a),h=[];for(let m of f){let p=m*this.stride;s[p+u7]===t&&h.push(s[p+By]>1?Mxe(s,p,this.clusterProps):this.points[s[p+Uy]])}if(h.length===0)throw new Error(o);return h}getLeaves(t,n,i){n=n||10,i=i||0;let o=[];return this._appendLeaves(o,t,n,i,0),o}getTile(t,n,i){let o=this.trees[this._limitZoom(t)],r=Math.pow(2,t),{extent:s,radius:a}=this.options,l=a/s,u=(i-l)/r,f=(i+1+l)/r,h={features:[]};return this._addTileFeatures(o.range((n-l)/r,u,(n+1+l)/r,f),o.data,n,i,r,h),n===0&&this._addTileFeatures(o.range(1-l/r,u,1,f),o.data,r,i,r,h),n===r-1&&this._addTileFeatures(o.range(0,u,l/r,f),o.data,-1,i,r,h),h.features.length?h:null}getClusterExpansionZoom(t){let n=this._getOriginZoom(t)-1;for(;n<=this.options.maxZoom;){let i=this.getChildren(t);if(n++,i.length!==1)break;t=i[0].properties.cluster_id}return n}_appendLeaves(t,n,i,o,r){let s=this.getChildren(n);for(let a of s){let l=a.properties;if(l&&l.cluster?r+l.point_count<=o?r+=l.point_count:r=this._appendLeaves(t,l.cluster_id,i,o,r):r<o?r++:t.push(a),t.length===i)break}return r}_createTree(t){let n=new ib(t.length/this.stride|0,this.options.nodeSize,Float32Array);for(let i=0;i<t.length;i+=this.stride)n.add(t[i],t[i+1]);return n.finish(),n.data=t,n}_addTileFeatures(t,n,i,o,r,s){for(let a of t){let l=a*this.stride,u=n[l+By]>1,f,h,m;if(u)f=Nxe(n,l,this.clusterProps),h=n[l],m=n[l+1];else{let b=this.points[n[l+Uy]];f=b.properties;let[x,T]=b.geometry.coordinates;h=PH(x),m=RH(T)}let p={type:1,geometry:[[Math.round(this.options.extent*(h*r-i)),Math.round(this.options.extent*(m*r-o))]],tags:f},_;u||this.options.generateId?_=n[l+Uy]:_=this.points[n[l+Uy]].id,_!==void 0&&(p.id=_),s.features.push(p)}}_limitZoom(t){return Math.max(this.options.minZoom,Math.min(Math.floor(+t),this.options.maxZoom+1))}_cluster(t,n){let{radius:i,extent:o,reduce:r,minPoints:s}=this.options,a=i/(o*Math.pow(2,n)),l=t.data,u=[],f=this.stride;for(let h=0;h<l.length;h+=f){if(l[h+cx]<=n)continue;l[h+cx]=n;let m=l[h],p=l[h+1],_=t.within(l[h],l[h+1],a),b=l[h+By],x=b;for(let T of _){let E=T*f;l[E+cx]>n&&(x+=l[E+By])}if(x>b&&x>=s){let T=m*b,E=p*b,S,A=-1,v=((h/f|0)<<5)+(n+1)+this.points.length;for(let I of _){let M=I*f;if(l[M+cx]<=n)continue;l[M+cx]=n;let P=l[M+By];T+=l[M]*P,E+=l[M+1]*P,l[M+u7]=v,r&&(S||(S=this._map(l,h,!0),A=this.clusterProps.length,this.clusterProps.push(S)),r(S,this._map(l,M)))}l[h+u7]=v,u.push(T/x,E/x,1/0,v,-1,x),r&&u.push(A)}else{for(let T=0;T<f;T++)u.push(l[h+T]);if(x>1)for(let T of _){let E=T*f;if(!(l[E+cx]<=n)){l[E+cx]=n;for(let S=0;S<f;S++)u.push(l[E+S])}}}}return u}_getOriginId(t){return t-this.points.length>>5}_getOriginZoom(t){return(t-this.points.length)%32}_map(t,n,i){if(t[n+By]>1){let s=this.clusterProps[t[n+Lxe]];return i?Object.assign({},s):s}let o=this.points[t[n+Uy]].properties,r=this.options.map(o);return i&&r===o?Object.assign({},r):r}};function Mxe(e,t,n){return{type:"Feature",id:e[t+Uy],properties:Nxe(e,t,n),geometry:{type:"Point",coordinates:[jbt(e[t]),Wbt(e[t+1])]}}}function Nxe(e,t,n){let i=e[t+By],o=i>=1e4?`${Math.round(i/1e3)}k`:i>=1e3?`${Math.round(i/100)/10}k`:i,r=e[t+Lxe],s=r===-1?{}:Object.assign({},n[r]);return Object.assign(s,{cluster:!0,cluster_id:e[t+Uy],point_count:i,point_count_abbreviated:o})}function PH(e){return e/360+.5}function RH(e){let t=Math.sin(e*Math.PI/180),n=.5-.25*Math.log((1+t)/(1-t))/Math.PI;return n<0?0:n>1?1:n}function jbt(e){return(e-.5)*360}function Wbt(e){let t=(180-e*360)*Math.PI/180;return 360*Math.atan(Math.exp(t))/Math.PI-90}var qbt="11.1.0";return Kxe(Ybt);})();
15767
15767
 
15768
- var GM=(()=>{var Zd=Object.create;var Ve=Object.defineProperty;var qd=Object.getOwnPropertyDescriptor;var Xd=Object.getOwnPropertyNames;var Jd=Object.getPrototypeOf,Kd=Object.prototype.hasOwnProperty;var Qd=(n,e,t)=>e in n?Ve(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var $d=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),ep=(n,e)=>{for(var t in e)Ve(n,t,{get:e[t],enumerable:!0})},xl=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Xd(e))!Kd.call(n,s)&&s!==t&&Ve(n,s,{get:()=>e[s],enumerable:!(r=qd(e,s))||r.enumerable});return n};var tp=(n,e,t)=>(t=n!=null?Zd(Jd(n)):{},xl(e||!n||!n.__esModule?Ve(t,"default",{value:n,enumerable:!0}):t,n)),ip=n=>xl(Ve({},"__esModule",{value:!0}),n);var ni=(n,e,t)=>(Qd(n,typeof e!="symbol"?e+"":e,t),t);var Sl=$d((F_,bl)=>{bl.exports=GM_Common});var I_={};ep(I_,{Analysis:()=>hl,AnalysisType:()=>lt,AnimationType:()=>V,AroundPoint:()=>nn,AroundView:()=>on,AttackArrow:()=>Le,Billboard:()=>ge,BillboardPrimitive:()=>Qe,BounceBillboardPrimitive:()=>br,BounceLabelPrimitive:()=>Mr,Box:()=>ss,CallbackProperty:()=>$u,Cartesian2:()=>Nu,Cartesian3:()=>Wu,ChartLayer:()=>Xs,Circle:()=>et,CircleBlurMaterialProperty:()=>ra,CircleDiffuseMaterialProperty:()=>sa,CircleFadeMaterialProperty:()=>oa,CirclePulseMaterialProperty:()=>aa,CircleScan:()=>hn,CircleScanMaterialProperty:()=>na,CircleSpiralMaterialProperty:()=>la,CircleVaryMaterialProperty:()=>ha,CircleWaveMaterialProperty:()=>ca,ClassificationType:()=>e_,ClippingPlane:()=>w_,ClippingPlaneCollection:()=>T_,ClippingPolygon:()=>C_,ClippingPolygonCollection:()=>x_,CloudPrimitive:()=>Dr,ClusterLayer:()=>Bi,Color:()=>Yu,ColorMaterialProperty:()=>s_,CoordTransform:()=>he,Corridor:()=>ns,CustomBillboard:()=>$i,CustomGeographicTilingScheme:()=>Bo,CustomLabel:()=>tr,CustomMercatorTilingScheme:()=>jo,CustomShader:()=>m_,CustomShaderMode:()=>d_,CustomShaderTranslucencyMode:()=>p_,Cylinder:()=>hs,CzmlLayer:()=>ji,DiffuseWallPrimitive:()=>Rr,DivIcon:()=>mr,DomUtil:()=>S,DoubleArrow:()=>qe,DynamicBillboard:()=>sr,DynamicLayer:()=>Zi,DynamicModel:()=>ar,Effect:()=>_d,ElecEllipsoidPrimitive:()=>kr,Ellipse:()=>ds,Ellipsoid:()=>__,EllipsoidElectricMaterialProperty:()=>da,EllipsoidTrailMaterialProperty:()=>pa,FeatureGridLayer:()=>Ji,FineArrow:()=>Xe,FlowLinePrimitive:()=>zr,Flying:()=>dn,GatheringPlace:()=>Je,GeoJsonLayer:()=>st,GeoTools:()=>gl,GeographicTilingScheme:()=>i_,GlobeRotate:()=>mn,GpxLayer:()=>Ms,GraticuleLayer:()=>Ds,GroundPrimitiveLayer:()=>Rs,GroundSkyBox:()=>mo,HeatMapLayer:()=>Uh,HeightReference:()=>Ju,HorizontalOrigin:()=>Ku,HtmlLayer:()=>ks,I3S:()=>fr,I3SLayer:()=>zs,ImageMaterialProperty:()=>o_,ImageryLayerFactory:()=>Go,ImageryType:()=>R,JulianDate:()=>Xu,KeyboardRoaming:()=>An,KmlLayer:()=>Ns,Label:()=>tt,LabelLayer:()=>Gs,LabelPrimitive:()=>$e,Layer:()=>P,LayerGroup:()=>zi,LayerType:()=>Fe,LightCylinderPrimitive:()=>Nr,Material:()=>Bu,Math:()=>dr,Matrix3:()=>Gu,Matrix4:()=>Uu,Measure:()=>il,MeasureType:()=>ie,Model:()=>De,ModelAnimationLoop:()=>v_,ModelEventType:()=>be,ModelPrimitive:()=>Gr,MouseEventType:()=>L,MouseMode:()=>we,Overlay:()=>g,OverlayType:()=>F,P:()=>_,Parse:()=>_,Plane:()=>fs,Plot:()=>od,PlotAnalysis:()=>_l,PlotAnalysisType:()=>ht,Point:()=>it,PointPrimitive:()=>Br,Polygon:()=>ye,Polyline:()=>ve,PolylineArrowMaterialProperty:()=>h_,PolylineDashMaterialProperty:()=>a_,PolylineFlickerMaterialProperty:()=>ma,PolylineFlowMaterialProperty:()=>ua,PolylineGlowMaterialProperty:()=>n_,PolylineImageTrailMaterialProperty:()=>_a,PolylineLightingMaterialProperty:()=>fa,PolylineLightingTrailMaterialProperty:()=>ga,PolylineOutlineMaterialProperty:()=>l_,PolylinePrimitive:()=>jr,PolylineTrailMaterialProperty:()=>ya,PolylineVolume:()=>Ts,Position:()=>j,PrimitiveLayer:()=>Bs,RadarLineMaterialProperty:()=>va,RadarScan:()=>_n,RadarSweepMaterialProperty:()=>wa,RadarWaveMaterialProperty:()=>Ta,RasterTileLayer:()=>js,Rect:()=>rt,Rectangle:()=>Zu,ReflectionWaterPrimitive:()=>ts,Resource:()=>f_,RoamingController:()=>Ln,RoamingPath:()=>On,ScanCirclePrimitive:()=>Zr,SceneEventType:()=>A,SceneMode:()=>Vu,ShadowMode:()=>qu,Shp2JsonLayer:()=>Ss,SkyBox:()=>ju,Sphere:()=>ms,T:()=>u,TailedAttackArrow:()=>Ke,TerrainFactory:()=>Zo,TerrainType:()=>xe,TileSetEventType:()=>Z,Tileset:()=>yr,TilesetLayer:()=>Zs,TilesetStyle:()=>t_,Track:()=>Hn,TrackController:()=>Fn,TrackViewMode:()=>Ee,TrailLinePrimitive:()=>Xr,Transform:()=>u,UniformType:()=>u_,Util:()=>v,VERSION:()=>S_,VectorLayer:()=>ce,VerticalOrigin:()=>Qu,VideoPrimitive:()=>Kr,Viewer:()=>Eh,Wall:()=>Es,WallImageTrailMaterialProperty:()=>Ca,WallLineTrailMaterialProperty:()=>xa,WallTrailMaterialProperty:()=>Ea,WaterMaterialProperty:()=>Pa,WaterPrimitive:()=>$r,Weather:()=>Ed,WindLayer:()=>jh,config:()=>P_,createElevationBandMaterial:()=>y_,createGooglePhotorealistic3DTileset:()=>g_,ebMercatorTilingScheme:()=>r_,getLib:()=>me,ready:()=>b_,registerLib:()=>pe,writeTextToCanvas:()=>c_});var El={};function pe(n,e){El[n]=e}function me(n){return El[n]}var Pl={};function mt(n,e){Pl[n]=e}function ut(n){return Pl[n]}var rp={},Fe=rp;var i=tp(Sl(),1);pe("Cesium",i.Cesium);pe("Supercluster",i.Supercluster);var sp="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),li=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]=sp[s===19?r&3|8:r]);return e+"-"+t.join("")}static merge(e,...t){let r,s,o,a;for(s=0,o=t.length;s<o;s++){a=t[s];for(r in a)e[r]=a[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]),o=s.length,a=new Uint8Array(o);for(;o--;)a[o]=s.charCodeAt(o);return new Blob([a],{type:r})}static isPromise(e){return Promise.resolve(e)==e}},v=li;var hi=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=v.splitWords(t);for(let s=0,o=r.length;s<o;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,v.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 o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",t),o.setAttribute("viewBox",`0 0 ${e} ${t}`);let a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("d",r),o.appendChild(a),s&&s.appendChild(o),o}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),o=this.create("source","",s);o.setAttribute("src",e),o.setAttribute("type","video/map4");let a=this.create("source","",s);return a.setAttribute("src",e),a.setAttribute("type","video/quicktime"),s}},S=hi;var ci=Math.PI*2,_t=100,di=1e-4,pi=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],o=[s[0]-e[1]+t[1],s[1]+e[0]-t[0]],a=[(e[0]+r[0])/2,(e[1]+r[1])/2],l=[a[0]-e[1]+r[1],a[1]+e[0]-r[0]];return this.getIntersectPoint(s,o,a,l)}static getIntersectPoint(e,t,r,s){let o,a,l,h;return e[1]===t[1]?(l=(s[0]-r[0])/(s[1]-r[1]),o=l*(e[1]-r[1])+r[0],a=e[1],[o,a]):r[1]===s[1]?(h=(t[0]-e[0])/(t[1]-e[1]),o=h*(r[1]-e[1])+e[0],a=r[1],[o,a]):(h=(t[0]-e[0])/(t[1]-e[1]),l=(s[0]-r[0])/(s[1]-r[1]),a=(h*e[1]-e[0]-l*r[1]+r[0])/(h-l),o=h*a-h*e[1]+e[0],[o,a])}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=ci-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+ci: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]),o=t[1]+e*(r[1]-t[1]);return[s,o]}static getCubicValue(e,t,r,s,o){e=Math.max(Math.min(e,1),0);let a=1-e,l=e*e,h=l*e,c=a*a,d=c*a,f=d*t[0]+3*c*e*r[0]+3*a*l*s[0]+h*o[0],T=d*t[1]+3*c*e*r[1]+3*a*l*s[1]+h*o[1];return[f,T]}static getThirdPoint(e,t,r,s,o){let a=this.getAzimuth(e,t),l=o?a+r:a-r,h=s*Math.cos(l),c=s*Math.sin(l);return[t[0]+h,t[1]+c]}static getArcPoints(e,t,r,s){let o,a,l=[],h=s-r;h=h<0?h+ci:h;for(let c=0;c<=_t;c++){let d=r+h*c/_t;o=e[0]+t*Math.cos(d),a=e[1]+t*Math.sin(d),l.push([o,a])}return l}static getBisectorNormals(e,t,r,s){let o=this.getNormal(t,r,s),a=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=o[0]/a,h=o[1]/a,c=this.distance(t,r),d=this.distance(r,s),f,T,y,m,E;return a>di?this.isClockWise(t,r,s)?(f=e*c,T=r[0]-f*h,y=r[1]+f*l,E=[T,y],f=e*d,T=r[0]+f*h,y=r[1]-f*l,m=[T,y]):(f=e*c,T=r[0]+f*h,y=r[1]-f*l,E=[T,y],f=e*d,T=r[0]-f*h,y=r[1]+f*l,m=[T,y]):(T=r[0]+e*(t[0]-r[0]),y=r[1]+e*(t[1]-r[1]),E=[T,y],T=r[0]+e*(s[0]-r[0]),y=r[1]+e*(s[1]-r[1]),m=[T,y]),[E,m]}static getNormal(e,t,r){let s=e[0]-t[0],o=e[1]-t[1],a=Math.sqrt(s*s+o*o);s/=a,o/=a;let l=r[0]-t[0],h=r[1]-t[1],c=Math.sqrt(l*l+h*h);l/=c,h/=c;let d=s+l,f=o+h;return[d,f]}static getCurvePoints(e,t){let s=[this.getLeftMostControlPoint(e,t)],o,a,l,h;for(let f=0;f<t.length-2;f++)o=t[f],a=t[f+1],l=t[f+2],h=this.getBisectorNormals(e,o,a,l),s=s.concat(h);let c=this.getRightMostControlPoint(e,t);s.push(c);let d=[];for(let f=0;f<t.length-1;f++){o=t[f],a=t[f+1],d.push(o);for(let T=0;T<_t;T++){let y=this.getCubicValue(T/_t,o,s[f*2],s[f*2+1],a);d.push(y)}d.push(a)}return d}static getLeftMostControlPoint(e,t){let r=t[0],s=t[1],o=t[2],l=this.getBisectorNormals(0,r,s,o)[0],h=this.getNormal(r,s,o),c=Math.sqrt(h[0]*h[0]+h[1]*h[1]),d,f;if(c>di){let T=this.mid(r,s),y=r[0]-T[0],m=r[1]-T[1],x=2/this.distance(r,s),b=-x*m,I=x*y,N=b*b-I*I,H=2*b*I,W=I*I-b*b,ee=l[0]-T[0],le=l[1]-T[1];d=T[0]+N*ee+H*le,f=T[1]+H*ee+W*le}else d=r[0]+e*(s[0]-r[0]),f=r[1]+e*(s[1]-r[1]);return[d,f]}static getRightMostControlPoint(e,t){let r=t.length,s=t[r-3],o=t[r-2],a=t[r-1],h=this.getBisectorNormals(0,s,o,a)[1],c=this.getNormal(s,o,a),d=Math.sqrt(c[0]*c[0]+c[1]*c[1]),f,T;if(d>di){let y=this.mid(o,a),m=a[0]-y[0],E=a[1]-y[1],b=2/this.distance(o,a),I=-b*E,N=b*m,H=I*I-N*N,W=2*I*N,ee=N*N-I*I,le=h[0]-y[0],Y=h[1]-y[1];f=y[0]+H*le+W*Y,T=y[1]+W*le+ee*Y}else f=a[0]+e*(o[0]-a[0]),T=a[1]+e*(o[1]-a[1]);return[f,T]}static getBezierPoints(e){if(e.length<=2)return e;let t=[],r=e.length-1;for(let s=0;s<=1;s+=.01){let o=0,a=0;for(let l=0;l<=r;l++){let h=this.getBinomialFactor(r,l),c=Math.pow(s,l),d=Math.pow(1-s,r-l);o+=h*c*d*e[l][0],a+=h*c*d*e[l][1]}t.push([o,a])}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 o=0;o<=s;o++)for(let a=0;a<=1;a+=.05){let l=0,h=0;for(let c=0;c<=t;c++){let d=this.getQuadricBSplineFactor(c,a);l+=d*e[o+c][0],h+=d*e[o+c][1]}r.push([l,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=pi;var op={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"},p=op;var je={ADD:"add",REMOVE:"remove"},L={LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.Cesium.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},Il={ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.Cesium.ScreenSpaceEventType.WHEEL},A={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"},Pe={...je,LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate"},be={READY:"ready",TEX_READY:"texturesReady"},Z={INITIAL_TILES_LOADED:"initialTilesLoaded",ALL_TILES_LOADED:"allTilesLoaded ",LOAD_PROGRESS:"loadProgress ",TILE_FAILED:"tileFailed ",TILE_LOAD:"tileLoad",TILE_UNLOAD:"tileUnload",TILE_VISIBLE:"tileVisible"},Se=je,Ie={...je,LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK},re={...je,POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"},se={...je,POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine"},C={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",CLEAR_ANCHOR:"clearAnchor"};var mi=class{constructor(e){this._types=e,this._cache={}}_on(e,t,r){let s=this.getEvent(e),o;return s&&t&&(o=s.addEventListener(t,r||this)),o}_off(e,t,r){let s=this.getEvent(e),o=!1;return s&&t&&(o=s.removeEventListener(t,r||this)),o}_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.Cesium.Event})}on(e,t,r){return this._on(e,t,r)}once(e,t,r){let s=this._on(e,o=>{t(o),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}},G=mi;var ui=class extends G{constructor(e,t={}){super(L),this._viewer=e,this._selected=void 0,this._enableEventPropagation=t.enableEventPropagation,this._enableMouseOver=t.enableMouseOver,this._registerEvent(),this._addDefaultEvent()}_registerEvent(){let e=new i.Cesium.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(i.Cesium.ScreenSpaceEventType).forEach(t=>{let r=i.Cesium.ScreenSpaceEventType[t];this._cache[r]=new i.Cesium.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=t.width/this._viewer.container.offsetWidth,s=t.height/this._viewer.container.offsetHeight,o=window.devicePixelRatio,a=(e.x-t.left)/r/o,l=(e.y-t.top)/s/o;return new i.Cesium.Cartesian2(a,l)}_getMouseInfo(e){let t=this._viewer.scene,r=t.pick(e),s,o,a,l;if(t.pickPositionSupported&&(s=t.pickPosition(e)),s){let h=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(s);h&&(a={lng:i.Cesium.Math.toDegrees(h.longitude),lat:i.Cesium.Math.toDegrees(h.latitude),alt:h.height})}if(t.mode===i.Cesium.SceneMode.SCENE3D&&!(this._viewer.terrainProvider instanceof i.Cesium.EllipsoidTerrainProvider)){let h=t.camera.getPickRay(e);o=t.globe.pick(h,t)}else o=t.camera.pickEllipsoid(e,i.Cesium.Ellipsoid.WGS84);if(o){let h=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(o);h&&(l={lng:i.Cesium.Math.toDegrees(h.longitude),lat:i.Cesium.Math.toDegrees(h.latitude),alt:h.height})}return{target:r,windowPosition:e,position:s,wgs84Position:a,surfacePosition:o,wgs84SurfacePosition:l}}_getDrillInfos(e){let t=[],s=this._viewer.scene.drillPick(e);return s&&s.length&&s.forEach(o=>{t.push(this._getTargetInfo(o))}),t}_getOverlayId(e){let t;return(e==null?void 0:e.id)instanceof i.Cesium.Entity?t=e.id.overlayId:e instanceof i.Cesium.Cesium3DTileFeature?t=e.tileset.overlayId:((e==null?void 0:e.primitive)instanceof i.Cesium.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.Cesium.Entity?(r=this._viewer.getLayers().filter(o=>o.layerId===e.id.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.id.overlayId))):e instanceof i.Cesium.Cesium3DTileFeature?(r=this._viewer.getLayers().filter(o=>o.layerId===e.tileset.layerId)[0],s=e,r!=null&&r.getOverlay&&(t=r.getOverlay(e.tileset.overlayId),s&&s.getPropertyNames&&s.getPropertyNames().forEach(a=>{t.attr[a]=s.getProperty(a)}))):(e==null?void 0:e.primitive)instanceof i.Cesium.Cesium3DTileset?(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))):e!=null&&e.primitive&&(r=this._viewer.getLayers().filter(o=>o.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 l;let r,s=this._getTargetInfo(t.target),o=s==null?void 0:s.overlay,a=s==null?void 0:s.layer;o!=null&&o.overlayEvent&&(r=o.overlayEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._eventPropagation)&&(a!=null&&a.layerEvent)&&(r=a.layerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._enableEventPropagation)&&((l=this._viewer)!=null&&l.viewerEvent)&&(r=this._viewer.viewerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),o!=null&&o.allowDrillPicking&&this._getDrillInfos(t.windowPosition).forEach(c=>{let d=c==null?void 0:c.overlay,f=c==null?void 0:c.layer;(d==null?void 0:d.overlayId)!==o.overlayId&&(d!=null&&d.overlayEvent)&&(r=d.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(L.CLICK,this._getMouseInfo(e.position))}_dbClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.DB_CLICK,this._getMouseInfo(e.position))}_rightClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.RIGHT_CLICK,this._getMouseInfo(e.position))}_mouseMoveHandler(e){if(!(e!=null&&e.endPosition))return!1;let t=this._getMouseInfo(e.endPosition);this._viewer.canvas.style.cursor=t.target?"pointer":"default",this._raiseEvent(L.MOUSE_MOVE,t),this._enableMouseOver&&(!this._selected||this._getOverlayId(this._selected.target)!==this._getOverlayId(t.target))&&(this._raiseEvent(L.MOUSE_OUT,this._selected),this._raiseEvent(L.MOUSE_OVER,t),this._selected=t)}_leftDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.LEFT_DOWN,this._getMouseInfo(e.position))}_leftUpHandler(e){this._raiseEvent(L.LEFT_UP,this._getMouseInfo(e.position))}_rightDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.RIGHT_DOWN,this._getMouseInfo(e.position))}_rightUpHandler(e){this._raiseEvent(L.RIGHT_UP,this._getMouseInfo(e.position))}_mouseWheelHandler(e){this._raiseEvent(L.WHEEL,{movement:e})}},_i=ui;var fi=class extends G{constructor(){super(Il),this._registerEvent()}},gi=fi;var yi=class extends G{constructor(e){super(A),this._camera=e.camera,this._scene=e.scene,this._clock=e.clock}on(e,t,r){let s;switch(e){case A.CAMERA_MOVE_END:s=this._camera.moveEnd.addEventListener(t,r||this);break;case A.CAMERA_CHANGED:s=this._camera.changed.addEventListener(t,r||this);break;case A.PRE_UPDATE:s=this._scene.preUpdate.addEventListener(t,r||this);break;case A.POST_UPDATE:s=this._scene.postUpdate.addEventListener(t,r||this);break;case A.PRE_RENDER:s=this._scene.preRender.addEventListener(t,r||this);break;case A.POST_RENDER:s=this._scene.postRender.addEventListener(t,r||this);break;case A.MORPH_COMPLETE:s=this._scene.morphComplete.addEventListener(t,r||this);break;case A.CLOCK_TICK:s=this._clock.onTick.addEventListener(t,r||this);break;case A.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 A.CAMERA_MOVE_END:s=this._camera.moveEnd.removeEventListener(t,r||this);break;case A.CAMERA_CHANGED:s=this._camera.changed.removeEventListener(t,r||this);break;case A.PRE_UPDATE:s=this._scene.preUpdate.removeEventListener(t,r||this);break;case A.POST_UPDATE:s=this._scene.postUpdate.removeEventListener(t,r||this);break;case A.PRE_RENDER:s=this._scene.preRender.removeEventListener(t,r||this);break;case A.POST_RENDER:s=this._scene.postRender.removeEventListener(t,r||this);break;case A.MORPH_COMPLETE:s=this._scene.morphComplete.removeEventListener(t,r||this);break;case A.CLOCK_TICK:s=this._clock.onTick.removeEventListener(t,r||this);break;case A.RENDER_ERROR:s=this._scene.renderError.removeEventListener(t,r||this);break;default:break}return s}},vi=yi;var wi=class extends G{constructor(){super(Se),this._registerEvent()}},Ti=wi;var Ci=class extends G{constructor(){super(Ie),this._registerEvent()}},xi=Ci;var Ei=class extends G{constructor(){super(Pe),this._registerEvent()}},Pi=Ei;var bi=class extends G{constructor(e){super(Z),this._tileset=e}on(e,t,r){return this._tileset.then(s=>{switch(e){case Z.INITIAL_TILES_LOADED:s.initialTilesLoaded.addEventListener(t,r||this);break;case Z.ALL_TILES_LOADED:s.allTilesLoaded.addEventListener(t,r||this);break;case Z.LOAD_PROGRESS:s.loadProgress.addEventListener(t,r||this);break;case Z.TILE_FAILED:s.tileFailed.addEventListener(t,r||this);break;case Z.TILE_LOAD:s.tileLoad.addEventListener(t,r||this);break;case Z.TILE_UNLOAD:s.tileUnload.addEventListener(t,r||this);break;case Z.TILE_VISIBLE:s.tileVisible.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._tileset.then(s=>{switch(e){case Z.INITIAL_TILES_LOADED:s.initialTilesLoaded.removeEventListener(t,r||this);break;case Z.ALL_TILES_LOADED:s.allTilesLoaded.removeEventListener(t,r||this);break;case Z.LOAD_PROGRESS:s.loadProgress.removeEventListener(t,r||this);break;case Z.TILE_FAILED:s.tileFailed.removeEventListener(t,r||this);break;case Z.TILE_LOAD:s.tileLoad.removeEventListener(t,r||this);break;case Z.TILE_UNLOAD:s.tileUnload.removeEventListener(t,r||this);break;case Z.TILE_VISIBLE:s.tileVisible.removeEventListener(t,r||this);break;default:break}}),!0}},Si=bi;var Ii=class extends G{constructor(e){super(be),this._model=e}on(e,t,r){return this._model.then(s=>{switch(e){case be.READY:s.readyEvent.addEventListener(t,r||this);break;case be.TEX_READY:s.texturesReadyEvent.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._model.then(s=>{switch(e){case be.READY:s.readyEvent.removeEventListener(t,r||this);break;case be.TEX_READY:s.texturesReadyEvent.removeEventListener(t,r||this);break;default:break}}),!0}},Mi=Ii;var Ai=class extends G{constructor(){super(re),this._registerEvent()}},Di=Ai;var Li=class extends G{constructor(){super(se),this._registerEvent()}},Ri=Li;var Oi=class extends G{constructor(){super(C),this._registerEvent()}},Ye=Oi;var ki=class{constructor(e){this._id=v.uuid(),this._bid=e||v.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 xi,this._layerEvent.on(Ie.ADD,this._onAdd,this),this._layerEvent.on(Ie.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.Cesium.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._delegate):this._viewer.scene.primitives.add(this._delegate):this._delegate instanceof i.Cesium.ImageryLayer?this._viewer.imageryLayers.add(this._delegate):this._viewer.dataSources.add(this._delegate),this._addedHook&&this._addedHook(),this._state=p.ADDED)}_onRemove(){this._delegate&&this._viewer&&(this._cache={},this._delegate instanceof i.Cesium.PrimitiveCollection?(this._delegate.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._delegate):this._viewer.scene.primitives.remove(this._delegate)):this._delegate instanceof i.Cesium.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=p.REMOVED)}_addOverlay(e){this._cache.hasOwnProperty(e.overlayId)||(this._cache[e.overlayId]=e,this._delegate&&e.fire(Pe.ADD,this),this._state===p.CLEARED&&(this._state=p.ADDED))}_removeOverlay(e){this._cache.hasOwnProperty(e.overlayId)&&(this._delegate&&e.fire(Pe.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&&(Fe[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getLayerType(e){return Fe[e.toLocaleUpperCase()]||void 0}},P=ki;var Fi=class{constructor(e){this._id=e||v.uuid(),this._cache={},this._show=!0,this._viewer=void 0,this._layerGroupEvent=new Ti,this._layerGroupEvent.on(Se.ADD,this._onAdd,this),this._layerGroupEvent.on(Se.REMOVE,this._onRemove,this),this._state=p.INITIALIZED}get id(){return this._id}get type(){return P.getLayerType("layer_group")}set show(e){this._show=e,Object.keys(this._cache).forEach(t=>{this._cache[t].show=this._show})}get show(){return 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=p.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._viewer&&this._viewer.removeLayer(this._cache[e])}),this._cache={},this._state=p.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}};P.registerType("layer_group");var zi=Fi;var Ml=new i.Cesium.WebMercatorProjection,Hi=class{static transformCartesianToWGS84(e){if(e){let t=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(e);return new j(i.Cesium.Math.toDegrees((t==null?void 0:t.longitude)||0),i.Cesium.Math.toDegrees((t==null?void 0:t.latitude)||0),t.height||0)}return new j(0,0)}static transformCartographicToWGS84(e){return e?new j(i.Cesium.Math.toDegrees((e==null?void 0:e.longitude)||0),i.Cesium.Math.toDegrees((e==null?void 0:e.latitude)||0),e.height||0):new j(0,0)}static transformWGS84ToCartesian(e){return e?i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,i.Cesium.Ellipsoid.WGS84):i.Cesium.Cartesian3.ZERO}static transformWGS84ToCartographic(e){return e?i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt):i.Cesium.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=Ml.project(i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new j(t.x,t.y,t.z)}static transformMercatorToWGS84(e){let t=Ml.unproject(new i.Cesium.Cartesian3(e.lng,e.lat,e.alt));return new j(i.Cesium.Math.toDegrees(t.longitude),i.Cesium.Math.toDegrees(t.latitude),t.height)}static transformWindowToWGS84(e,t){let r=t.scene,s;if(r.mode===i.Cesium.SceneMode.SCENE3D){let o=r.camera.getPickRay(e);s=r.globe.pick(o,r)}else s=r.camera.pickEllipsoid(e,i.Cesium.Ellipsoid.WGS84);return this.transformCartesianToWGS84(s)}static transformWGS84ToWindow(e,t){let r=t.scene;return i.Cesium.SceneTransforms.worldToWindowCoordinates(r,this.transformWGS84ToCartesian(e))}},u=Hi;var ft=52.35987755982988,K=3.141592653589793,Al=6378245,Dl=.006693421622965943,Ni=class{static BD09ToGCJ02(e,t){let r=+e-.0065,s=+t-.006,o=Math.sqrt(r*r+s*s)-2e-5*Math.sin(s*ft),a=Math.atan2(s,r)-3e-6*Math.cos(r*ft),l=o*Math.cos(a),h=o*Math.sin(a);return[l,h]}static GCJ02ToBD09(e,t){t=+t,e=+e;let r=Math.sqrt(e*e+t*t)+2e-5*Math.sin(t*ft),s=Math.atan2(t,e)+3e-6*Math.cos(e*ft),o=r*Math.cos(s)+.0065,a=r*Math.sin(s)+.006;return[o,a]}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),o=s[0]-e,a=s[1]-t;do s=this.WGS84ToGCJ02(r[0]-=o,r[1]-=a),o=s[0]-e,a=s[1]-t;while(Math.abs(o)>1e-7||Math.abs(a)>1e-7);return r}}static delta(e,t){let r=this.transformLng(e-105,t-35),s=this.transformLat(e-105,t-35),o=t/180*K,a=Math.sin(o);a=1-Dl*a*a;let l=Math.sqrt(a);return r=r*180/(Al/l*Math.cos(o)*K),s=s*180/(Al*(1-Dl)/(a*l)*K),[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*K)+20*Math.sin(2*e*K))*2/3,r+=(20*Math.sin(e*K)+40*Math.sin(e/3*K))*2/3,r+=(150*Math.sin(e/12*K)+300*Math.sin(e/30*K))*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*K)+20*Math.sin(2*e*K))*2/3,r+=(20*Math.sin(t*K)+40*Math.sin(t/3*K))*2/3,r+=(160*Math.sin(t/12*K)+320*Math.sin(t*K/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)}},he=Ni;var Wi=class n{constructor(e,t,r,s,o,a){this._lng=+e||0,this._lat=+t||0,this._alt=+r||0,this._heading=+s||0,this._pitch=+o||0,this._roll=+a||0}set lng(e){this._lng=+e}get lng(){return this._lng}set lat(e){this._lat=+e}get lat(){return this._lat}set alt(e){this._alt=+e}get alt(){return this._alt}set heading(e){this._heading=+e}get heading(){return this._heading}set pitch(e){this._pitch=+e}get pitch(){return this._pitch}set roll(e){this._roll=+e}get roll(){return this._roll}serialize(){let e=new n(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(e)}distance(e){return!e||!(e instanceof n)?0:i.Cesium.Cartesian3.distance(u.transformWGS84ToCartesian(this),u.transformWGS84ToCartesian(e))}clone(){let e=new n;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}}static fromArray(e){let t=new n;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 n;if(e&&typeof e=="string"){let r=e.split(",");t=this.fromArray(r)}return t}static fromObject(e){return new n(e.lng,e.lat,e.alt,e.heading,e.pitch,e.roll)}static deserialize(e){let t=new n,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}},j=Wi;var Gi=class{static parsePosition(e){let t=new j;return e&&(typeof e=="string"?t=j.fromString(e):Array.isArray(e)?t=j.fromArray(e):!(Object(e)instanceof j)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat")?t=j.fromObject(e):Object(e)instanceof j?t=e:Object(e)instanceof i.Cesium.Cartesian3?t=u.transformCartesianToWGS84(e):Object(e)instanceof i.Cesium.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]}},_=Gi;var ap={radius:60,maxZoom:25,style:"circle",image:"",gradientColors:{1e-4:i.Cesium.Color.DEEPSKYBLUE,.001:i.Cesium.Color.GREEN,.01:i.Cesium.Color.ORANGE,.1:i.Cesium.Color.RED},gradientImages:{},showCount:!0,fontSize:12,clusterSize:16,fontColor:i.Cesium.Color.BLACK,getCountOffset:n=>({x:-3.542857*String(n).length+1.066667,y:String(n).length>3?5:4})},Ui=class extends P{constructor(e,t={}){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._options={...ap,...t},this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._cluster=new i.Supercluster({radius:this._options.radius,maxZoom:this._options.maxZoom}),this._allCount=0,this._changedRemoveCallback=void 0,this._lastChangedTime=null,this._state=p.INITIALIZED}get type(){return P.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 o=document.createElement("canvas");o.width=r,o.height=r;let a=o.getContext("2d");a.save(),a.scale(r/24,r/24),a.fillStyle=e.withAlpha(.2).toCssColorString(),a.beginPath(),a.arc(12,12,9,0,2*Math.PI),a.closePath(),a.fill(),a.beginPath(),a.arc(12,12,6,0,2*Math.PI),a.fillStyle=e.toCssColorString(),a.closePath(),a.fill(),a.restore(),this._cache[s]=o.toDataURL()}return this._cache[s]}_getClusteringImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t,o=-Math.PI/12,a=Math.PI/2,l=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 d=0;d<3;d++)c.beginPath(),c.arc(12,12,8,o,o+a,!1),c.strokeStyle=e.withAlpha(.4).toCssColorString(),c.stroke(),c.arc(12,12,11,o,o+a,!1),c.strokeStyle=e.withAlpha(.2).toCssColorString(),c.stroke(),c.closePath(),o=o+a+l;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((o,a)=>Number(o)-Number(a));for(let o=s.length-1;o>=0;o--)if(t>=Number(s[o])){r=this._options.gradientImages[s[o]];break}r||(r=this._options.gradientImages[s[0]])}else{let s=Object.keys(this._options.gradientColors).sort((a,l)=>Number(a)-Number(l)),o;for(let a=s.length-1;a>=0;a--)if(t>=Number(s[a])){o=this._options.gradientColors[s[a]];break}o||(o=this._options.gradientColors[s[0]]),r=this._options.style==="circle"?this._getCircleImage(o,e):this._getClusteringImage(o,e)}return r}_changeCluster(e){let t=i.Cesium.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.Cesium.Math.toDegrees(r.west),i.Cesium.Math.toDegrees(r.south),i.Cesium.Math.toDegrees(r.east),i.Cesium.Math.toDegrees(r.north)],this._viewer.zoom).forEach(o=>{let a=v.uuid();if(o.properties.cluster){let l=o.properties.point_count,h=this._billboards.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._getClusterImage(l)});if(h.layerId=this.layerId,h.overlayId=a,h.attr={count:l},this._cache[a]=h,this._options.showCount){let c=this._labels.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),text:String(l),font:`${this._options.fontSize} px sans-serif`,disableDepthTestDistance:Number.POSITIVE_INFINITY,fillColor:this._options.fontColor,scale:.8,pixelOffset:this._options.getCountOffset(l)});c.layerId=this.layerId,c.overlayId=a,c.attr={count:l},this._cache[a]=c}}else{let l=this._billboards.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._options.image,...o.properties.style});l.layerId=this.layerId,l.overlayId=a,l.attr=o.properties,this._cache[a]=l}})}_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=_.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=p.CLEARED,this}};P.registerType("cluster");var Bi=Ui;var Vi=class extends P{constructor(e,t="",r={}){super(e),this._delegate=i.Cesium.CzmlDataSource.load(t,r),this._state=p.INITIALIZED}get type(){return P.getLayerType("czml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("czml");var ji=Vi;var Yi=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.CustomDataSource(e),this._state=p.INITIALIZED}get type(){return P.getLayerType("dynamic")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=p.CLEARED,this}};P.registerType("dynamic");var Zi=Yi;var qi=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.CustomDataSource(e),this._state=p.INITIALIZED}get type(){return P.getLayerType("vector")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=p.CLEARED,this}};P.registerType("vector");var ce=qi;var np={name:"",count:10,maximumLevel:21,dataProperty:"",callback:()=>null},Xi=class extends P{constructor(e,t,r={}){super(e),this._url=t,this._options={...np,...r},this._levelLayers={},this._tileWidth=256,this._tileHeight=256,this._maximumLevel=this._options.maximumLevel,this._tilingScheme=this._options.tilingScheme||new i.Cesium.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 ce(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=p.INITIALIZED}get type(){return P.getLayerType("feature_grid")}get url(){return this._url}set show(e){this._show=e,Object.keys(this._levelLayers).forEach(t=>{this._levelLayers[t].show=e})}get show(){return this._show}get token(){return this._token}get tileWidth(){if(!this.ready)throw new i.Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this.ready)throw new i.Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this.ready)throw new i.Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new i.Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}get tilingScheme(){if(!this.ready)throw new i.Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new i.Cesium.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=p.ADDED}_onRemove(){this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach(e=>{this._viewer.removeLayer(this._levelLayers[e])}),this._state=p.REMOVED}getTileCredits(e,t,r){}requestImage(e,t,r,s){let o=this._levelLayers[String(r)],a=this._tilingScheme.tileXYToRectangle(e,t,r);return this._viewer&&a&&o&&i.Cesium.Rectangle.intersection(a,this._viewer.viewBounds)&&i.Cesium.Resource.fetchJson({url:this._url,queryParameters:{minX:i.Cesium.Math.toDegrees(a.west),minY:i.Cesium.Math.toDegrees(a.south),maxX:i.Cesium.Math.toDegrees(a.east),maxY:i.Cesium.Math.toDegrees(a.north),count:this._options.count}}).then(l=>{let h=l;if(this._options.dataProperty&&(h=l[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 d=this._options.callback(c);d&&o.addOverlay(d)})}}),this._imagery}clear(){Object.keys(this._levelLayers).forEach(e=>{this._levelLayers[e].clear()}),this._state=p.CLEARED}};P.registerType("feature_grid");var Ji=Xi;var lp={},F=lp;var Ki=class{constructor(){this._id=v.uuid(),this._bid=v.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 Pi,this._overlayEvent.on(Pe.ADD,this._onAdd,this),this._overlayEvent.on(Pe.REMOVE,this._onRemove,this)}get overlayId(){return this._id}get type(){return""}set id(e){this._bid=e}get id(){return this._bid}set show(e){this._show=e,v.isPromise(this._delegate)?this._delegate.then(t=>{t.show=this._show}):this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}set attr(e){this._attr=e}get attr(){return this._attr}set allowDrillPicking(e){this._allowDrillPicking=e}get allowDrillPicking(){return this._allowDrillPicking}get overlayEvent(){return this._overlayEvent}get delegate(){return this._delegate}get state(){return this._state}set contextMenu(e){this._contextMenu=e}get contextMenu(){return this._contextMenu}_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,o;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((o=(s=this._layer)==null?void 0:s.delegate)!=null&&o.add){let a=this._getLayerCollection(this.type);a?(this._delegate&&(this._delegate=a.add(this._delegate)),v.merge(this._delegate,this._style),this.update&&this.destroy&&this._layer.delegate.add(this)):v.isPromise(this._delegate)?this._delegate.then(l=>{this._layer.delegate.add(l)}):this.update&&this.destroy?this._layer.delegate.add(this):this._delegate&&this._layer.delegate.add(this._delegate)}this._addedHook&&this._addedHook(),this._state=p.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 o=this._getLayerCollection(this.type);o?(this._delegate&&o.remove(this._delegate),this.update&&this.destroy&&this._layer.delegate.remove(this)):v.isPromise(this._delegate)?this._delegate.then(a=>{this._layer.delegate.remove(a)}):this.update&&this.destroy?this._layer.delegate.remove(this):this._delegate&&this._layer.delegate.remove(this._delegate)}this._removedHook&&this._removedHook(),this._state=p.REMOVED}}setLabel(e,t){return this._delegate?(this._delegate instanceof i.Cesium.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}static registerType(e){e&&(F[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getOverlayType(e){return F[e.toLocaleUpperCase()]||void 0}},g=Ki;var Qi=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({billboard:{}}),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._state=p.INITIALIZED}get type(){return g.getOverlayType("custom_billboard")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}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}get size(){return this._size}_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,v.merge(this._style,e),v.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,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.Cesium.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_billboard");var $i=Qi;var er=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({label:{}}),this._position=_.parsePosition(e),this._text=t,this._state=p.INITIALIZED}get type(){return g.getOverlayType("custom_label")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.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,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.Cesium.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_label");var tr=er;var ir=class extends g{constructor(){super(),this._startTime=void 0,this._lastTime=void 0,this._sampledPosition=new i.Cesium.SampledPositionProperty,this._cache=[],this._maxCacheSize=10,this._state=p.INITIALIZED}set maxCacheSize(e){this._maxCacheSize=e}get maxCacheSize(){return this._maxCacheSize}get position(){return u.transformCartesianToWGS84(this._sampledPosition.getValue(i.Cesium.JulianDate.now()))}_removePosition(){if(this._cache.length>this._maxCacheSize){let e=i.Cesium.JulianDate.addSeconds(this._cache[0],-.2,new i.Cesium.JulianDate),t=i.Cesium.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new i.Cesium.JulianDate);this._sampledPosition.removeSamples(new i.Cesium.TimeInterval({start:e,stop:t})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(e,t){this._removePosition();let r=i.Cesium.JulianDate.now(),s=i.Cesium.JulianDate.addSeconds(r,t,new i.Cesium.JulianDate);return this._sampledPosition.addSample(s,u.transformWGS84ToCartesian(_.parsePosition(e))),this._lastTime=s,this._cache.push(this._lastTime),this}bindDom(e){return this}},gt=ir;var rr=class extends gt{constructor(e,t){super(),this._position=_.parsePosition(e),this._icon=t,this._delegate=new i.Cesium.Entity({billboard:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("dynamic_billboard")}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}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}get size(){return this._size}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._startTime=i.Cesium.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,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}};g.registerType("dynamic_billboard");var sr=rr;var or=class extends gt{constructor(e,t){super(),this._position=_.parsePosition(e),this._modelUrl=t,this._delegate=new i.Cesium.Entity({model:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("dynamic_model")}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._startTime=i.Cesium.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._delegate.orientation=new i.Cesium.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,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}};g.registerType("dynamic_model");var ar=or;function hp(n,e,t){let r=i.Cesium.Cartesian3.subtract(n,e,new i.Cesium.Cartesian3),s=i.Cesium.Cartesian3.subtract(t,e,new i.Cesium.Cartesian3),o=i.Cesium.Cartesian3.cross(r,s,r);return i.Cesium.Cartesian3.magnitude(o)*.5}function ue(n){let e=0;if(!Array.isArray(n))return e;n[0]instanceof i.Cesium.Cartesian3||(n=u.transformWGS84ArrayToCartesianArray(n));let t=i.Cesium.CoplanarPolygonGeometry.createGeometry(i.Cesium.CoplanarPolygonGeometry.fromPositions({positions:n,vertexFormat:i.Cesium.VertexFormat.POSITION_ONLY}));if(!t)return e;let r=t.attributes.position.values,s=t.indices;for(let o=0;o<s.length;o+=3){let a=i.Cesium.Cartesian3.unpack(r,s[o]*3,new i.Cesium.Cartesian3),l=i.Cesium.Cartesian3.unpack(r,s[o+1]*3,new i.Cesium.Cartesian3),h=i.Cesium.Cartesian3.unpack(r,s[o+2]*3,new i.Cesium.Cartesian3);e+=hp(a,l,h)}return e}function nr(n=[],e=0){let t=180,r=90,s=-180,o=-90;if(n.forEach(a=>{t=Math.min(t,a.lng||a.x),r=Math.min(r,a.lat||a.y),s=Math.max(s,a.lng||a.x),o=Math.max(o,a.lat||a.y)}),e>0){let a=Math.abs(s-s),l=Math.abs(o-r);t-=a*e,r-=l*e,s+=a*e,o+=l*e}return{west:t,south:r,east:s,north:o}}function _e(n){if(n&&Array.isArray(n)){let e=0;n.forEach(({alt:s})=>e=Math.max(e,s));let t=i.Cesium.BoundingSphere.fromPoints(u.transformWGS84ArrayToCartesianArray(n)),r=u.transformCartesianToWGS84(t.center);return r.alt=e,r}return new j}function lr(n,e){e=e||{};let t=[];for(let r=0;r<n.length-1;r++){let s=cp(n[r],n[r+1],e.count);s&&s.length>0&&(t=t.concat(s))}return t}function cp(n,e,t){if(!n||!e)return null;let r=[];t=t||40;let s=function(I){return 1-2*I+I*I},o=I=>2*I-2*I*I,a=I=>I*I,l,h,c,d,f,T,y=0,m=parseFloat(n.lat),E=parseFloat(e.lat),x=parseFloat(n.lng),b=parseFloat(e.lng);b>x&&b-x>180&&x<0&&(x=360+x,b=360+b),T=0,E===m?(l=0,h=x-b):b===x?(l=Math.PI/2,h=m-E):(l=Math.atan((E-m)/(b-x)),h=(E-m)/Math.sin(l)),T===0&&(T=l+Math.PI/5),c=h/2,f=c*Math.cos(T)+x,d=c*Math.sin(T)+m;for(let I=0;I<t+1;I++){let N=x*s(y)+f*o(y)+b*a(y),H=m*s(y)+d*o(y)+E*a(y),W=n.lng,ee=e.lng;r.push([W<0&&ee>0?N-360:N,H]),y=y+1/t}return r}function Q(n){let e=0;if(n&&Array.isArray(n))for(let t=0;t<n.length-1;t++){let r=u.transformWGS84ToCartographic(n[t]),s=u.transformWGS84ToCartographic(n[t+1]),o=new i.Cesium.EllipsoidGeodesic;o.setEndPoints(r,s);let a=o.surfaceDistance;a=Math.sqrt(Math.pow(a,2)+Math.pow(s.height-r.height,2)),e+=a}return e.toFixed(3)}function fe(n,e){let t=n,r=e;if(!t||!r)return 0;n instanceof i.Cesium.Cartesian3||(t=_.parsePosition(n),t=u.transformWGS84ToCartesian(t)),e instanceof i.Cesium.Cartesian3||(r=_.parsePosition(e),r=u.transformWGS84ToCartesian(r));let s=i.Cesium.Transforms.eastNorthUpToFixedFrame(t),o=i.Cesium.Cartesian3.subtract(r,t,new i.Cesium.Cartesian3),a=i.Cesium.Matrix4.multiplyByPointAsVector(i.Cesium.Matrix4.inverse(s,new i.Cesium.Matrix4),o,new i.Cesium.Cartesian3),l=Math.atan2(a.y,a.x)-i.Cesium.Math.PI_OVER_TWO;return l=i.Cesium.Math.TWO_PI-i.Cesium.Math.zeroToTwoPi(l),isNaN(l)?0:l}function Ze(n,e,t){return n=parseFloat(n)||0,n>=parseFloat(e)&&n<=parseFloat(t)}function k(n,e){return i.Cesium.Cartesian3.midpoint(n,e,new i.Cesium.Cartesian3)}function hr(n,e){let t=_.parsePosition(n),r=_.parsePosition(e);t=u.transformWGS84ToCartographic(t),r=u.transformWGS84ToCartographic(r);let s=new i.Cesium.EllipsoidGeodesic(t,r).interpolateUsingFraction(.5);return new j(i.Cesium.Math.toDegrees(s.longitude),i.Cesium.Math.toDegrees(s.latitude),s.height)}function cr(n,e,t=0,r=50){let s=[];t=Math.max(+t,100),r=Math.max(+r,50);let o=Math.abs(n.lng-e.lng),a=Math.abs(n.lat-e.lat),l=Math.max(o,a),h=l/r;if(o>a){let c=(e.lat-n.lat)/r;n.lng-e.lng>0&&(h=-h);for(let d=0;d<r;d++){let f=t-Math.pow(-.5*l+Math.abs(h)*d,2)*4*t/Math.pow(l,2),T=n.lng+h*d,y=n.lat+c*d;s.push([T,y,f])}}else{let c=(e.lng-n.lng)/r;n.lat-e.lat>0&&(h=-h);for(let d=0;d<r;d++){let f=t-Math.pow(-.5*l+Math.abs(h)*d,2)*4*t/Math.pow(l,2),T=n.lng+c*d,y=n.lat+h*d;s.push([T,y,f])}}return s.push([e.lng,e.lat,e.alt||0]),s}var{Math:dp}=i.Cesium,dr={};v.merge(dr,dp,{area:ue,bounds:nr,center:_e,curve:lr,distance:Q,heading:fe,isBetween:Ze,midCartesian:k,midPosition:hr,parabola:cr});var pr=class n extends g{constructor(e,t){super(),this._delegate=S.create("div","div-icon"),this._position=_.parsePosition(e),this._delegate.setAttribute("id",this._id),v.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=t,this._state=p.INITIALIZED}get type(){return g.getOverlayType("div_icon")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden"}get show(){return this._show}set position(e){this._position=_.parsePosition(e)}get position(){return this._position}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)}}get content(){return this._delegate.childNodes||[]}_updateStyle(e,t,r){if(!this._show||!e)return;let s=e.x-this._delegate.offsetWidth/2,o=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(s=e.x-this._delegate.offsetWidth,o=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(s=e.x,o=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(s=e.x-this._delegate.offsetWidth,o=e.y):this._style.position==="bottomright"&&(s=e.x,o=e.y);let a=`translate3d(${Math.round(s)}px,${Math.round(o)}px, 0)`,l="scale3d(1,1,1)",h=this._style.scaleByDistance;if(t&&h){let f=h.near||0,T=h.nearValue||1,y=h.far||Number.MAX_VALUE,m=h.farValue||0,E=t/y;if(t<f)l=`scale3d(${T},${T},1)`;else if(t>y)l=`scale3d(${m},${m},1)`;else{let x=m+E*(T-m);l=`scale3d(${x},${x},1)`}}let c=!0,d=this._style.distanceDisplayCondition;t&&d&&(c=Ze(t,d.near||0,d.far||Number.MAX_VALUE)),this._delegate.style.transform=`${a} ${l}`,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(L.CLICK,t)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(L.MOUSE_OVER,t)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(L.MOUSE_OUT,t)}),this._state=p.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=p.REMOVED)}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._style.className&&S.addClass(this._delegate,this._style.className),this)}static fromEntity(e,t){var a;let r,s=i.Cesium.JulianDate.now(),o=u.transformCartesianToWGS84(e.position.getValue(s));return r=new n(o,t),e.billboard&&(r.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}),r}};g.registerType("div_icon");var mr=pr;var ur=class n extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({model:{}}),this._position=_.parsePosition(e),this._modelUrl=t,this._rotateAmount=0,this._state=p.INITIALIZED}get type(){return g.getOverlayType("model")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._rotateAmount===0&&(this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll))))}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}set rotateAmount(e){this._rotateAmount=+e,this._delegate.orientation=new i.Cesium.CallbackProperty(()=>(this._position.heading+=this._rotateAmount,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))),!1)}get rotateAmount(){return this._rotateAmount}_mountedHook(){this.position=this._position,this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}static fromEntity(e,t){let r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r)),o=new n(s,t);return o.attr={...e.properties.getValue(r)},o}};g.registerType("model");var De=ur;var _r=class extends g{constructor(e,t={}){super(),this._delegate=i.Cesium.I3SDataProvider.fromUrl(e,t),this._state=p.INITIALIZED}get type(){return g.getOverlayType("i3s")}ready(e){return this._delegate.then(e),this}setLabel(e,t){return console.warn("not support this function"),this}};g.registerType("i3s");var fr=_r;var gr=class extends g{constructor(e,t={}){super(),this._delegate=i.Cesium.Cesium3DTileset.fromUrl(e,t),this._tilesetEvent=new Si(this._delegate),this._tileVisibleCallback=void 0,this._properties=void 0,this._state=p.INITIALIZED}get type(){return g.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(o=>{s.hasProperty(o.key)&&s.getProperty(o.key)===o.keyValue&&s.setProperty(o.propertyName,o.propertyValue)})}}ready(e){return this._delegate.then(e),this}setPosition(e){return e=_.parsePosition(e),this._delegate.then(t=>{let r=i.Cesium.Transforms.eastNorthUpToFixedFrame(i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),s=i.Cesium.Matrix4.fromRotationTranslation(i.Cesium.Matrix3.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(e.heading),i.Cesium.Math.toRadians(e.pitch),i.Cesium.Math.toRadians(e.roll))));i.Cesium.Matrix4.multiply(r,s,r),t.root.transform=r}),this}setHeadingPitchRoll(e,t,r){return this._delegate.then(s=>{let o=s.root.transform,a=i.Cesium.Matrix4.fromRotationTranslation(i.Cesium.Matrix3.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(e||0),i.Cesium.Math.toRadians(t||0),i.Cesium.Math.toRadians(r||0))));i.Cesium.Matrix4.multiply(o,a,o),s.root.transform=o}),this}setLabel(e,t){return console.warn("not support this function"),this}clampToGround(){return this._delegate.then(e=>{let t=i.Cesium.Cartographic.fromCartesian(e.boundingSphere.center),r=i.Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),s=i.Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,0),o=i.Cesium.Cartesian3.subtract(s,r,new i.Cesium.Cartesian3);e.modelMatrix=i.Cesium.Matrix4.fromTranslation(o)}),this}setHeight(e,t=!1){return this._delegate.then(r=>{let s=i.Cesium.Cartographic.fromCartesian(r.boundingSphere.center),o=i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,s.height),a=i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,t?e:s.height+e),l=i.Cesium.Cartesian3.subtract(a,o,new i.Cesium.Cartesian3);r.modelMatrix=i.Cesium.Matrix4.fromTranslation(l)}),this}setScale(e){return this._delegate.then(t=>{let r=t.root.transform;e>0&&e!==1&&i.Cesium.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.Cesium.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}};g.registerType("tileset");var yr=gr;var yt=Math.PI/2,vr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this._state=p.INITIALIZED}get type(){return g.getOverlayType("attack_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowHeadPoints(e,t,r){let s=w.getBaseLength(e),o=s*this.headHeightFactor,a=e[e.length-1];s=w.distance(a,e[e.length-2]);let l=w.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let d=o*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],a,0,o,!0),T=w.getThirdPoint(e[e.length-2],a,0,d,!0),y=w.getThirdPoint(a,f,yt,h,!1),m=w.getThirdPoint(a,f,yt,h,!0),E=w.getThirdPoint(a,T,yt,c,!1),x=w.getThirdPoint(a,T,yt,c,!0);return[E,y,a,m,x]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,d=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;d+=w.distance(e[y-1],e[y]);let E=(l/2-d/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getHierarchy(){let e=_.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 o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r)/w.getBaseLength(o),d=this._getArrowBodyPoints(o,l,h,c),f=d.length,T=[t].concat(d.slice(0,f/2));T.push(l);let y=[r].concat(d.slice(f/2,f));return y.push(h),T=w.getQBSplinePoints(T),y=w.getQBSplinePoints(y),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(T.concat(a,y.reverse()))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("attack_arrow");var Le=vr;var X=Math.PI/2,wr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this._state=p.INITIALIZED}get type(){return g.getOverlayType("double_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowPoints(e,t,r,s){let o=w.mid(e,t),a=w.distance(o,r),l=w.getThirdPoint(r,o,0,a*.3,!0),h=w.getThirdPoint(r,o,0,a*.5,!0);l=w.getThirdPoint(o,l,X,a/5,s),h=w.getThirdPoint(o,h,X,a/4,s);let c=[o,l,h,r],d=this._getArrowHeadPoints(c),f=d[0],T=d[4],y=w.distance(e,t)/w.getBaseLength(c)/2,m=this._getArrowBodyPoints(c,f,T,y),E=m.length,x=m.slice(0,E/2),b=m.slice(E/2,E);return x.push(f),b.push(T),x=x.reverse(),x.push(t),b=b.reverse(),b.push(e),x.reverse().concat(d,b)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,a=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,l,!0),d=w.getThirdPoint(s,h,X,o,!1),f=w.getThirdPoint(s,h,X,o,!0),T=w.getThirdPoint(s,c,X,a,!1),y=w.getThirdPoint(s,c,X,a,!0);return[T,d,s,f,y]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,d=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;d+=w.distance(e[y-1],e[y]);let E=(l/2-d/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getTempPoint4(e,t,r){let s=w.mid(e,t),o=w.distance(s,r),a=w.getAngleOfThreePoints(e,s,r),l,h,c,d;return a<X?(h=o*Math.sin(a),c=o*Math.cos(a),d=w.getThirdPoint(e,s,X,h,!1),l=w.getThirdPoint(s,d,X,c,!0)):a>=X&&a<Math.PI?(h=o*Math.sin(Math.PI-a),c=o*Math.cos(Math.PI-a),d=w.getThirdPoint(e,s,X,h,!1),l=w.getThirdPoint(s,d,X,c,!1)):a>=Math.PI&&a<Math.PI*1.5?(h=o*Math.sin(a-Math.PI),c=o*Math.cos(a-Math.PI),d=w.getThirdPoint(e,s,X,h,!0),l=w.getThirdPoint(s,d,X,c,!0)):(h=o*Math.sin(Math.PI*2-a),c=o*Math.cos(Math.PI*2-a),d=w.getThirdPoint(e,s,X,h,!0),l=w.getThirdPoint(s,d,X,c,!1)),l}_getHierarchy(){let e=this._positions.length,t,r,s=_.parsePolygonCoordToArray(this._positions)[0],o=s[0],a=s[1],l=s[2];e===3?t=this._getTempPoint4(o,a,l):t=s[3],e===3||e===4?r=w.mid(o,a):r=s[4];let h,c;w.isClockWise(o,a,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,a,l,!0)):(h=this._getArrowPoints(a,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let d=h.length,f=(d-5)/2,T=h.slice(0,f),y=h.slice(f,f+5),m=h.slice(f+5,d),E=c.slice(0,f),x=c.slice(f,f+5),b=c.slice(f+5,d);E=w.getBezierPoints(E);let I=w.getBezierPoints(b.concat(T.slice(1)));return m=w.getBezierPoints(m),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(E.concat(x,I,y,m))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("double_arrow");var qe=wr;var Ll=Math.PI/2,Tr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this._state=p.INITIALIZED}get type(){return g.getOverlayType("fine_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1],s=w.getBaseLength(e),o=s*this.tailWidthFactor,a=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=w.getThirdPoint(r,t,Ll,o,!0),c=w.getThirdPoint(r,t,Ll,o,!1),d=w.getThirdPoint(t,r,this.headAngle,l,!1),f=w.getThirdPoint(t,r,this.headAngle,l,!0),T=w.getThirdPoint(t,r,this.neckAngle,a,!1),y=w.getThirdPoint(t,r,this.neckAngle,a,!0);return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions([h,T,d,r,f,y,c])))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("fine_arrow");var Xe=Tr;var pp=Math.PI/2,Rl=100,Cr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.t=.4,this._state=p.INITIALIZED}get type(){return g.getOverlayType("gathering_place")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0];if(this._positions.length===2){let a=w.mid(e[0],e[1]),l=w.distance(e[0],a)/.9,h=w.getThirdPoint(e[0],a,pp,l,!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 a=0;a<e.length-2;a++){let l=e[a],h=e[a+1],c=e[a+2],d=w.getBisectorNormals(this.t,l,h,c);r=r.concat(d)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1];o.push(l);for(let c=0;c<=Rl;c++){let d=w.getCubicValue(c/Rl,l,r[a*2],r[a*2+1],h);o.push(d)}o.push(h)}return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(o)))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("gathering_place");var Je=Cr;var xr=class extends Le{constructor(e){super(e),this._delegate=new i.Cesium.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=p.INITIALIZED}get type(){return g.getOverlayType("tailed_attack_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.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 o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r),d=w.getBaseLength(o),f=d*this.tailWidthFactor*this.swallowTailFactor,T=w.getThirdPoint(o[1],o[0],0,f,!0),y=c/d,m=this._getArrowBodyPoints(o,l,h,y),E=m.length,x=[t].concat(m.slice(0,E/2));x.push(l);let b=[r].concat(m.slice(E/2,E));return b.push(h),x=w.getQBSplinePoints(x),b=w.getQBSplinePoints(b),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(x.concat(a,b.reverse(),[T,x[0]]))))}};g.registerType("tailed_attack_arrow");var Ke=xr;var Er=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._delegate={position:void 0,image:void 0,width:0,height:0},this._state=p.INITIALIZED}get type(){return g.getOverlayType("billboard_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.image=this._icon}get icon(){return this._icon}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}get size(){return this._size}_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,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("billboard_primitive");var Qe=Er;var Ol={maxOffsetY:10,offsetAmount:.1},Pr=class extends Qe{constructor(e,t){super(e,t),this._currentOffset=new i.Cesium.Cartesian2(0,0),this._isUp=!0,this._state=p.INITIALIZED}get type(){return g.getOverlayType("bounce_billboard_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||Ol.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||Ol.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.Cesium.destroyObject(this)}};g.registerType("bounce_billboard_primitive");var br=Pr;var Sr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._text=t,this._delegate={position:void 0,text:void 0},this._state=p.INITIALIZED}get type(){return g.getOverlayType("label_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.text=this._text}get text(){return 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,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("label_primitive");var $e=Sr;var kl={maxOffsetY:10,offsetAmount:.1},Ir=class extends $e{constructor(e,t){super(e,t),this._currentOffset=new i.Cesium.Cartesian2(0,0),this._isUp=!0,this._state=p.INITIALIZED}get type(){return g.getOverlayType("bounce_label_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||kl.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||kl.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.Cesium.destroyObject(this)}};g.registerType("bounce_label_primitive");var Mr=Ir;var Ar=class extends g{constructor(e){super(),this._position=_.parsePosition(e),this._delegate={position:void 0,scale:{x:12,y:8}},this._state=p.INITIALIZED}get type(){return g.getOverlayType("cloud_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("cloud_primitive");var Dr=Ar;var mp={minRadius:10,minHeight:30,color:i.Cesium.Color.RED,slices:128,speed:10},Lr=class extends g{constructor(e,t,r){super(),this._center=_.parsePosition(e),this._delegate=void 0,this._height=r,this._radius=t,this._currentHeight=r||0,this._currentRadius=10,this._style={...mp},this._state=p.INITIALIZED}get type(){return g.getOverlayType("diffuse_wall_primitive")}set center(e){this._center=_.parsePosition(e)}get center(){return this._center}set radius(e){this._radius=e}get radius(){return this._radius}set height(e){this._height=e}get height(){return this._height}_getPositions(){let e=[],t=i.Cesium.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._center));for(let r=0;r<this._style.slices;r++){let s=r/this._style.slices*i.Cesium.Math.TWO_PI,o=Math.cos(s),a=Math.sin(s),l=new i.Cesium.Cartesian3(o*this._currentRadius,a*this._currentRadius,0);e.push(i.Cesium.Matrix4.multiplyByPoint(t,l,new i.Cesium.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.Cesium.WallGeometry({positions:t,minimumHeights:this._getHeights(t.length,0),maximumHeights:this._getHeights(t.length,this._currentHeight)});this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:r}),appearance:new i.Cesium.MaterialAppearance({material:i.Cesium.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:(v.merge(this._style,e),this)}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("diffuse_wall_primitive");var Rr=Lr;var Or=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("elec_ellipsoid_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.geometryInstances.modelMatrix=i.Cesium.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._position))}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry=new i.Cesium.EllipsoidGeometry({radii:this._radius,maximumCone:i.Cesium.Math.PI_OVER_TWO})}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("EllipsoidElectric",{color:((e=this._style)==null?void 0:e.color)||i.Cesium.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:(v.merge(this._style,e),this._setAppearance(),this)}};g.registerType("elec_ellipsoid_primitive");var kr=Or;var Fr=class extends g{constructor(e,t=1){super(),this._positions=_.parsePositions(e),this._width=t,this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("flow_line_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._delegate.appearance=new i.Cesium.PolylineMaterialAppearance({material:i.Cesium.Material.fromType("PolylineFlow",{color:((e=this._style)==null?void 0:e.color)||new i.Cesium.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:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("flow_line_primitive");var zr=Fr;var Fl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1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CWU0S5bqkmdAa3LQEwcZDAfkZ3tthQfkwNkVeeD6kiuaUabcp6DpS9YyalrAdQ8bT1EFQVUabarND9fNuyB2gREYAABCAAAQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var up={color:i.Cesium.Color.ORANGE},Hr=class extends g{constructor(e,t,r,s){super(),this._center=_.parsePosition(e),this._length=t||100,this._topRadius=r||1,this._bottomRadius=s||50,this._delegate=new i.Cesium.PrimitiveCollection,this._style={...up},this._state=p.INITIALIZED}get type(){return g.getOverlayType("light-cylinder-primitive")}set center(e){this._center=_.parsePosition(e),this._updatePrimitives()}get center(){return this._center}set length(e){this._length=e,this._updatePrimitives()}get length(){return this._length}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}_computeEllipsePositions(e,t){let r=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(e),semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0),s=i.Cesium.Cartesian3.unpackArray(r.outerPositions);return s.push(s[0]),s}_createCylinderInstance(e,t,r){let s=t.slice(),o=t.length,a=2*o,l=[],h=1/(o-1),c=[],d=[],f=(y,m=0)=>{let E=i.Cesium.Cartographic.fromCartesian(y);return E.height+=m,i.Cesium.Cartographic.toCartesian(E)};for(let y=0;y<o;y++){d.push(f(e[y],r)),l.push(y*h,0);let m=y+1,E=(y+1)%o,x=a-m;c.push(x-1,x,y),c.push(y,E,x-1)}for(let y in d)s.push(d[o-y-1]),l.push(1-y*h,1);let T=i.Cesium.PolygonGeometry.createGeometry(new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(s),perPositionHeight:!0}));return T.indices=c,T.attributes.st.values=l,new i.Cesium.GeometryInstance({geometry:T})}_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),o={geometryInstances:new i.Cesium.GeometryInstance({geometry:new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},a=e?new i.Cesium.GroundPrimitive(o):new i.Cesium.Primitive(o);a.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CircleRingType,{color:this._style.color})});let l=e?new i.Cesium.GroundPrimitive(o):new i.Cesium.Primitive(o);l.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let h=new i.Cesium.Primitive({geometryInstances:this._createCylinderInstance(t,r,this._length),appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?i.Cesium.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(a),this._delegate.add(l),this._delegate.add(h)}):(this._delegate.add(a),this._delegate.add(l),this._delegate.add(h)),i.Cesium.Resource.fetchImage({url:Fl}).then(c=>{let d=new i.Cesium.Primitive({geometryInstances:this._createCylinderInstance(t,s,this._length),appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CylinderParticlesType,{color:this._style.color,image:this._getParticlesImage(c)})}),asynchronous:!1});this._delegate.add(d)})}_mountedHook(){this.center=this._center}update(e){this._delegate.update(e)}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this)}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("light-cylinder-primitive");var Nr=Hr;var Wr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._modelUrl=t,this._delegate=i.Cesium.Model.fromGltfAsync({url:t}),this._modelEvent=new Mi(this._delegate),this._state=p.INITIALIZED}get type(){return g.getOverlayType("model_primitive")}set position(e){this._position=_.parsePosition(e);let t=u.transformWGS84ToCartesian(this._position);this._delegate.then(r=>{r.modelMatrix=i.Cesium.Transforms.headingPitchRollToFixedFrame(t,new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))})}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate=i.Cesium.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}get modelUrl(){return this._modelUrl}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._delegate.then(t=>{v.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}};g.registerType("model_primitive");var Gr=Wr;var zl={pixelSize:8,outlineColor:i.Cesium.Color.BLUE,outlineWidth:2},Ur=class extends g{constructor(e){super(),this._position=_.parsePosition(e),this._delegate={position:void 0},this._state=p.INITIALIZED}get type(){return g.getOverlayType("point_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate,zl,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,zl,this._style),this)}};g.registerType("point_primitive");var Br=Ur;var Vr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate={positions:[]},this._state=p.INITIALIZED}get type(){return g.getOverlayType("polyline_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return _e(this._positions)}get distance(){return Q(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("polyline_primitive");var jr=Vr;var Yr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t,this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("scan_circle_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.geometryInstances.geometry=new i.Cesium.EllipseGeometry({center:u.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||i.Cesium.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:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("scan_circle_primitive");var Zr=Yr;var qr=class extends g{constructor(e,t=1){super(),this._positions=_.parsePositions(e),this._width=t,this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("trail_line_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t;this._delegate.appearance=new i.Cesium.PolylineMaterialAppearance({material:i.Cesium.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new i.Cesium.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:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("trail_line_primitive");var Xr=qr;var Jr=class extends g{constructor(e,t){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._video=t,this._state=p.INITIALIZED}get type(){return g.getOverlayType("video_primitive")}set positions(e){var t,r,s,o;this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=i.Cesium.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:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}set video(e){this._video=e,this._setAppearance()}get video(){return this._video}_setAppearance(){this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.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:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};g.registerType("video_primitive");var Kr=Jr;var Qr=class extends g{constructor(e,t=[]){super(),this._positions=_.parsePositions(e),this._holes=t.map(r=>_.parsePositions(r)),this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("water_primitive")}set positions(e){var t,r,s,o;this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(a=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(a)))),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:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}_setAppearance(){var e,t,r,s,o,a,l,h;this._style&&(this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new i.Cesium.Color(.2,.3,.6,1),blendColor:((t=this._style)==null?void 0:t.blendColor)||new i.Cesium.Color(0,1,.699,1),specularMap:((r=this._style)==null?void 0:r.specularMap)||i.Cesium.Material.DefaultImageId,normalMap:((s=this._style)==null?void 0:s.normalMap)||i.Cesium.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((a=this._style)==null?void 0:a.animationSpeed)||.01,amplitude:((l=this._style)==null?void 0:l.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:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("water_primitive");var $r=Qr;var es=class extends g{constructor(e,t=[]){super(),this._positions=_.parsePositions(e),this._holes=t.map(r=>_.parsePositions(r)),this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("reflection_water_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(t=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t)))),perPositionHeight:!0})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._style&&(this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:new i.Cesium.Material({fabric:{type:"ReflectionWaterPlane",uniforms:{image:"",waterNormal:new i.Cesium.Cartesian3,fadeFactor:1,normalMap:((e=this._style)==null?void 0:e.normalMap)||i.Cesium.Material.DefaultImageId,fresnelParams:new i.Cesium.Cartesian3(.8,1,5),specularMap:"czm_defaultImage",baseWaterColor:i.Cesium.Color.fromCssColorString("rgba(45, 95, 146, 1.0)"),blendColor:new i.Cesium.Color,frequency:2e3,animationSpeed:((t=this._style)==null?void 0:t.animationSpeed)||.01,amplitude:((r=this._style)==null?void 0:r.amplitude)||5,specularIntensity:((s=this._style)==null?void 0:s.specularIntensity)||.8},source:`
15768
+ var GM=(()=>{var Zp=Object.create;var Ve=Object.defineProperty;var qp=Object.getOwnPropertyDescriptor;var Xp=Object.getOwnPropertyNames;var Jp=Object.getPrototypeOf,Kp=Object.prototype.hasOwnProperty;var Qp=(n,e,t)=>e in n?Ve(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var $p=(n,e)=>()=>(e||n((e={exports:{}}).exports,e),e.exports),ed=(n,e)=>{for(var t in e)Ve(n,t,{get:e[t],enumerable:!0})},xl=(n,e,t,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Xp(e))!Kp.call(n,s)&&s!==t&&Ve(n,s,{get:()=>e[s],enumerable:!(r=qp(e,s))||r.enumerable});return n};var td=(n,e,t)=>(t=n!=null?Zp(Jp(n)):{},xl(e||!n||!n.__esModule?Ve(t,"default",{value:n,enumerable:!0}):t,n)),id=n=>xl(Ve({},"__esModule",{value:!0}),n);var ni=(n,e,t)=>(Qp(n,typeof e!="symbol"?e+"":e,t),t);var Sl=$p((F_,bl)=>{bl.exports=GM_Common});var I_={};ed(I_,{Analysis:()=>hl,AnalysisType:()=>lt,AnimationType:()=>V,AroundPoint:()=>nn,AroundView:()=>on,AttackArrow:()=>Le,Billboard:()=>ge,BillboardPrimitive:()=>Qe,BounceBillboardPrimitive:()=>br,BounceLabelPrimitive:()=>Mr,Box:()=>ss,CallbackProperty:()=>$u,Cartesian2:()=>Nu,Cartesian3:()=>Wu,ChartLayer:()=>Xs,Circle:()=>et,CircleBlurMaterialProperty:()=>ra,CircleDiffuseMaterialProperty:()=>sa,CircleFadeMaterialProperty:()=>oa,CirclePulseMaterialProperty:()=>aa,CircleScan:()=>hn,CircleScanMaterialProperty:()=>na,CircleSpiralMaterialProperty:()=>la,CircleVaryMaterialProperty:()=>ha,CircleWaveMaterialProperty:()=>ca,ClassificationType:()=>e_,ClippingPlane:()=>w_,ClippingPlaneCollection:()=>T_,ClippingPolygon:()=>C_,ClippingPolygonCollection:()=>x_,CloudPrimitive:()=>Dr,ClusterLayer:()=>Bi,Color:()=>Yu,ColorMaterialProperty:()=>s_,CoordTransform:()=>he,Corridor:()=>ns,CustomBillboard:()=>$i,CustomGeographicTilingScheme:()=>Bo,CustomLabel:()=>tr,CustomMercatorTilingScheme:()=>jo,CustomShader:()=>m_,CustomShaderMode:()=>p_,CustomShaderTranslucencyMode:()=>d_,Cylinder:()=>hs,CzmlLayer:()=>ji,DiffuseWallPrimitive:()=>Rr,DivIcon:()=>mr,DomUtil:()=>S,DoubleArrow:()=>qe,DynamicBillboard:()=>sr,DynamicLayer:()=>Zi,DynamicModel:()=>ar,Effect:()=>_p,ElecEllipsoidPrimitive:()=>kr,Ellipse:()=>ps,Ellipsoid:()=>__,EllipsoidElectricMaterialProperty:()=>pa,EllipsoidTrailMaterialProperty:()=>da,FeatureGridLayer:()=>Ji,FineArrow:()=>Xe,FlowLinePrimitive:()=>zr,Flying:()=>pn,GatheringPlace:()=>Je,GeoJsonLayer:()=>st,GeoTools:()=>gl,GeographicTilingScheme:()=>i_,GlobeRotate:()=>mn,GpxLayer:()=>Ms,GraticuleLayer:()=>Ds,GroundPrimitiveLayer:()=>Rs,GroundSkyBox:()=>mo,HeatMapLayer:()=>Uh,HeightReference:()=>Ju,HorizontalOrigin:()=>Ku,HtmlLayer:()=>ks,I3S:()=>fr,I3SLayer:()=>zs,ImageMaterialProperty:()=>o_,ImageryLayerFactory:()=>Go,ImageryType:()=>R,JulianDate:()=>Xu,KeyboardRoaming:()=>An,KmlLayer:()=>Ns,Label:()=>tt,LabelLayer:()=>Gs,LabelPrimitive:()=>$e,Layer:()=>P,LayerGroup:()=>zi,LayerType:()=>Fe,LightCylinderPrimitive:()=>Nr,Material:()=>Bu,Math:()=>pr,Matrix3:()=>Gu,Matrix4:()=>Uu,Measure:()=>il,MeasureType:()=>ie,Model:()=>De,ModelAnimationLoop:()=>v_,ModelEventType:()=>be,ModelPrimitive:()=>Gr,MouseEventType:()=>L,MouseMode:()=>we,Overlay:()=>g,OverlayType:()=>F,P:()=>_,Parse:()=>_,Plane:()=>fs,Plot:()=>op,PlotAnalysis:()=>_l,PlotAnalysisType:()=>ht,Point:()=>it,PointPrimitive:()=>Br,Polygon:()=>ye,Polyline:()=>ve,PolylineArrowMaterialProperty:()=>h_,PolylineDashMaterialProperty:()=>a_,PolylineFlickerMaterialProperty:()=>ma,PolylineFlowMaterialProperty:()=>ua,PolylineGlowMaterialProperty:()=>n_,PolylineImageTrailMaterialProperty:()=>_a,PolylineLightingMaterialProperty:()=>fa,PolylineLightingTrailMaterialProperty:()=>ga,PolylineOutlineMaterialProperty:()=>l_,PolylinePrimitive:()=>jr,PolylineTrailMaterialProperty:()=>ya,PolylineVolume:()=>Ts,Position:()=>j,PrimitiveLayer:()=>Bs,RadarLineMaterialProperty:()=>va,RadarScan:()=>_n,RadarSweepMaterialProperty:()=>wa,RadarWaveMaterialProperty:()=>Ta,RasterTileLayer:()=>js,Rect:()=>rt,Rectangle:()=>Zu,ReflectionWaterPrimitive:()=>ts,Resource:()=>f_,RoamingController:()=>Ln,RoamingPath:()=>On,ScanCirclePrimitive:()=>Zr,SceneEventType:()=>A,SceneMode:()=>Vu,ShadowMode:()=>qu,Shp2JsonLayer:()=>Ss,SkyBox:()=>ju,Sphere:()=>ms,T:()=>u,TailedAttackArrow:()=>Ke,TerrainFactory:()=>Zo,TerrainType:()=>xe,TileSetEventType:()=>Z,Tileset:()=>yr,TilesetLayer:()=>Zs,TilesetStyle:()=>t_,Track:()=>Hn,TrackController:()=>Fn,TrackViewMode:()=>Ee,TrailLinePrimitive:()=>Xr,Transform:()=>u,UniformType:()=>u_,Util:()=>v,VERSION:()=>S_,VectorLayer:()=>ce,VerticalOrigin:()=>Qu,VideoPrimitive:()=>Kr,Viewer:()=>Eh,Wall:()=>Es,WallImageTrailMaterialProperty:()=>Ca,WallLineTrailMaterialProperty:()=>xa,WallTrailMaterialProperty:()=>Ea,WaterMaterialProperty:()=>Pa,WaterPrimitive:()=>$r,Weather:()=>Ep,WindLayer:()=>jh,config:()=>P_,createElevationBandMaterial:()=>y_,createGooglePhotorealistic3DTileset:()=>g_,ebMercatorTilingScheme:()=>r_,getLib:()=>me,ready:()=>b_,registerLib:()=>de,writeTextToCanvas:()=>c_});var El={};function de(n,e){El[n]=e}function me(n){return El[n]}var Pl={};function mt(n,e){Pl[n]=e}function ut(n){return Pl[n]}var rd={},Fe=rd;var i=td(Sl(),1);de("Cesium",i.Cesium);de("Supercluster",i.Supercluster);var sd="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),li=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]=sd[s===19?r&3|8:r]);return e+"-"+t.join("")}static merge(e,...t){let r,s,o,a;for(s=0,o=t.length;s<o;s++){a=t[s];for(r in a)e[r]=a[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]),o=s.length,a=new Uint8Array(o);for(;o--;)a[o]=s.charCodeAt(o);return new Blob([a],{type:r})}static isPromise(e){return Promise.resolve(e)==e}},v=li;var hi=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=v.splitWords(t);for(let s=0,o=r.length;s<o;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,v.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 o=document.createElementNS("http://www.w3.org/2000/svg","svg:svg");o.setAttribute("class","svg-path"),o.setAttribute("width",e),o.setAttribute("height",t),o.setAttribute("viewBox",`0 0 ${e} ${t}`);let a=document.createElementNS("http://www.w3.org/2000/svg","path");return a.setAttribute("d",r),o.appendChild(a),s&&s.appendChild(o),o}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),o=this.create("source","",s);o.setAttribute("src",e),o.setAttribute("type","video/map4");let a=this.create("source","",s);return a.setAttribute("src",e),a.setAttribute("type","video/quicktime"),s}},S=hi;var ci=Math.PI*2,_t=100,pi=1e-4,di=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],o=[s[0]-e[1]+t[1],s[1]+e[0]-t[0]],a=[(e[0]+r[0])/2,(e[1]+r[1])/2],l=[a[0]-e[1]+r[1],a[1]+e[0]-r[0]];return this.getIntersectPoint(s,o,a,l)}static getIntersectPoint(e,t,r,s){let o,a,l,h;return e[1]===t[1]?(l=(s[0]-r[0])/(s[1]-r[1]),o=l*(e[1]-r[1])+r[0],a=e[1],[o,a]):r[1]===s[1]?(h=(t[0]-e[0])/(t[1]-e[1]),o=h*(r[1]-e[1])+e[0],a=r[1],[o,a]):(h=(t[0]-e[0])/(t[1]-e[1]),l=(s[0]-r[0])/(s[1]-r[1]),a=(h*e[1]-e[0]-l*r[1]+r[0])/(h-l),o=h*a-h*e[1]+e[0],[o,a])}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=ci-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+ci: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]),o=t[1]+e*(r[1]-t[1]);return[s,o]}static getCubicValue(e,t,r,s,o){e=Math.max(Math.min(e,1),0);let a=1-e,l=e*e,h=l*e,c=a*a,p=c*a,f=p*t[0]+3*c*e*r[0]+3*a*l*s[0]+h*o[0],T=p*t[1]+3*c*e*r[1]+3*a*l*s[1]+h*o[1];return[f,T]}static getThirdPoint(e,t,r,s,o){let a=this.getAzimuth(e,t),l=o?a+r:a-r,h=s*Math.cos(l),c=s*Math.sin(l);return[t[0]+h,t[1]+c]}static getArcPoints(e,t,r,s){let o,a,l=[],h=s-r;h=h<0?h+ci:h;for(let c=0;c<=_t;c++){let p=r+h*c/_t;o=e[0]+t*Math.cos(p),a=e[1]+t*Math.sin(p),l.push([o,a])}return l}static getBisectorNormals(e,t,r,s){let o=this.getNormal(t,r,s),a=Math.sqrt(o[0]*o[0]+o[1]*o[1]),l=o[0]/a,h=o[1]/a,c=this.distance(t,r),p=this.distance(r,s),f,T,y,m,E;return a>pi?this.isClockWise(t,r,s)?(f=e*c,T=r[0]-f*h,y=r[1]+f*l,E=[T,y],f=e*p,T=r[0]+f*h,y=r[1]-f*l,m=[T,y]):(f=e*c,T=r[0]+f*h,y=r[1]-f*l,E=[T,y],f=e*p,T=r[0]-f*h,y=r[1]+f*l,m=[T,y]):(T=r[0]+e*(t[0]-r[0]),y=r[1]+e*(t[1]-r[1]),E=[T,y],T=r[0]+e*(s[0]-r[0]),y=r[1]+e*(s[1]-r[1]),m=[T,y]),[E,m]}static getNormal(e,t,r){let s=e[0]-t[0],o=e[1]-t[1],a=Math.sqrt(s*s+o*o);s/=a,o/=a;let l=r[0]-t[0],h=r[1]-t[1],c=Math.sqrt(l*l+h*h);l/=c,h/=c;let p=s+l,f=o+h;return[p,f]}static getCurvePoints(e,t){let s=[this.getLeftMostControlPoint(e,t)],o,a,l,h;for(let f=0;f<t.length-2;f++)o=t[f],a=t[f+1],l=t[f+2],h=this.getBisectorNormals(e,o,a,l),s=s.concat(h);let c=this.getRightMostControlPoint(e,t);s.push(c);let p=[];for(let f=0;f<t.length-1;f++){o=t[f],a=t[f+1],p.push(o);for(let T=0;T<_t;T++){let y=this.getCubicValue(T/_t,o,s[f*2],s[f*2+1],a);p.push(y)}p.push(a)}return p}static getLeftMostControlPoint(e,t){let r=t[0],s=t[1],o=t[2],l=this.getBisectorNormals(0,r,s,o)[0],h=this.getNormal(r,s,o),c=Math.sqrt(h[0]*h[0]+h[1]*h[1]),p,f;if(c>pi){let T=this.mid(r,s),y=r[0]-T[0],m=r[1]-T[1],x=2/this.distance(r,s),b=-x*m,I=x*y,N=b*b-I*I,H=2*b*I,W=I*I-b*b,ee=l[0]-T[0],le=l[1]-T[1];p=T[0]+N*ee+H*le,f=T[1]+H*ee+W*le}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],o=t[r-2],a=t[r-1],h=this.getBisectorNormals(0,s,o,a)[1],c=this.getNormal(s,o,a),p=Math.sqrt(c[0]*c[0]+c[1]*c[1]),f,T;if(p>pi){let y=this.mid(o,a),m=a[0]-y[0],E=a[1]-y[1],b=2/this.distance(o,a),I=-b*E,N=b*m,H=I*I-N*N,W=2*I*N,ee=N*N-I*I,le=h[0]-y[0],Y=h[1]-y[1];f=y[0]+H*le+W*Y,T=y[1]+W*le+ee*Y}else f=a[0]+e*(o[0]-a[0]),T=a[1]+e*(o[1]-a[1]);return[f,T]}static getBezierPoints(e){if(e.length<=2)return e;let t=[],r=e.length-1;for(let s=0;s<=1;s+=.01){let o=0,a=0;for(let l=0;l<=r;l++){let h=this.getBinomialFactor(r,l),c=Math.pow(s,l),p=Math.pow(1-s,r-l);o+=h*c*p*e[l][0],a+=h*c*p*e[l][1]}t.push([o,a])}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 o=0;o<=s;o++)for(let a=0;a<=1;a+=.05){let l=0,h=0;for(let c=0;c<=t;c++){let p=this.getQuadricBSplineFactor(c,a);l+=p*e[o+c][0],h+=p*e[o+c][1]}r.push([l,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=di;var od={INITIALIZED:"initialized",ADDED:"added",REMOVED:"removed",CLEARED:"cleared",INSTALLED:"installed",ENABLED:"enabled",DISABLED:"disabled",PLAY:"play",PAUSE:"pause",RESTORE:"restore"},d=od;var je={ADD:"add",REMOVE:"remove"},L={LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.Cesium.ScreenSpaceEventType.WHEEL,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout"},Il={ADD_LAYER:"addLayer",REMOVE_LAYER:"removeLayer",ADD_EFFECT:"addEffect",REMOVE_EFFECT:"removeEffect",LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,WHEEL:i.Cesium.ScreenSpaceEventType.WHEEL},A={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"},Pe={...je,LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK,MOUSE_MOVE:i.Cesium.ScreenSpaceEventType.MOUSE_MOVE,MOUSE_OVER:"mouseover",MOUSE_OUT:"mouseout",POSITION_UPDATE:"positionUpdate"},be={READY:"ready",TEX_READY:"texturesReady"},Z={INITIAL_TILES_LOADED:"initialTilesLoaded",ALL_TILES_LOADED:"allTilesLoaded ",LOAD_PROGRESS:"loadProgress ",TILE_FAILED:"tileFailed ",TILE_LOAD:"tileLoad",TILE_UNLOAD:"tileUnload",TILE_VISIBLE:"tileVisible"},Se=je,Ie={...je,LEFT_DOWN:i.Cesium.ScreenSpaceEventType.LEFT_DOWN,LEFT_UP:i.Cesium.ScreenSpaceEventType.LEFT_UP,CLICK:i.Cesium.ScreenSpaceEventType.LEFT_CLICK,RIGHT_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN,RIGHT_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP,RIGHT_CLICK:i.Cesium.ScreenSpaceEventType.RIGHT_CLICK,DB_CLICK:i.Cesium.ScreenSpaceEventType.LEFT_DOUBLE_CLICK},re={...je,POST_RENDER:"postRender",ACTIVATE:"activate",DEACTIVATE:"deactivate",RESET_TIME_LINE:"restTimeLine"},se={...je,POST_RENDER:"postRender",RESET_TIME_LINE:"restTimeLine"},C={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",CLEAR_ANCHOR:"clearAnchor"};var mi=class{constructor(e){this._types=e,this._cache={}}_on(e,t,r){let s=this.getEvent(e),o;return s&&t&&(o=s.addEventListener(t,r||this)),o}_off(e,t,r){let s=this.getEvent(e),o=!1;return s&&t&&(o=s.removeEventListener(t,r||this)),o}_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.Cesium.Event})}on(e,t,r){return this._on(e,t,r)}once(e,t,r){let s=this._on(e,o=>{t(o),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}},G=mi;var ui=class extends G{constructor(e,t={}){super(L),this._viewer=e,this._selected=void 0,this._enableEventPropagation=t.enableEventPropagation,this._enableMouseOver=t.enableMouseOver,this._registerEvent(),this._addDefaultEvent()}_registerEvent(){let e=new i.Cesium.ScreenSpaceEventHandler(this._viewer.canvas);Object.keys(i.Cesium.ScreenSpaceEventType).forEach(t=>{let r=i.Cesium.ScreenSpaceEventType[t];this._cache[r]=new i.Cesium.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=t.width/this._viewer.container.offsetWidth,s=t.height/this._viewer.container.offsetHeight,o=window.devicePixelRatio,a=e.x/r/o,l=e.y/s/o;return new i.Cesium.Cartesian2(a,l)}_getMouseInfo(e){let t=this._viewer.scene,r=t.pick(e),s,o,a,l;if(t.pickPositionSupported&&(s=t.pickPosition(e)),s){let h=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(s);h&&(a={lng:i.Cesium.Math.toDegrees(h.longitude),lat:i.Cesium.Math.toDegrees(h.latitude),alt:h.height})}if(t.mode===i.Cesium.SceneMode.SCENE3D&&!(this._viewer.terrainProvider instanceof i.Cesium.EllipsoidTerrainProvider)){let h=t.camera.getPickRay(e);o=t.globe.pick(h,t)}else o=t.camera.pickEllipsoid(e,i.Cesium.Ellipsoid.WGS84);if(o){let h=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(o);h&&(l={lng:i.Cesium.Math.toDegrees(h.longitude),lat:i.Cesium.Math.toDegrees(h.latitude),alt:h.height})}return{target:r,windowPosition:e,position:s,wgs84Position:a,surfacePosition:o,wgs84SurfacePosition:l}}_getDrillInfos(e){let t=[],s=this._viewer.scene.drillPick(e);return s&&s.length&&s.forEach(o=>{t.push(this._getTargetInfo(o))}),t}_getOverlayId(e){let t;return(e==null?void 0:e.id)instanceof i.Cesium.Entity?t=e.id.overlayId:e instanceof i.Cesium.Cesium3DTileFeature?t=e.tileset.overlayId:((e==null?void 0:e.primitive)instanceof i.Cesium.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.Cesium.Entity?(r=this._viewer.getLayers().filter(o=>o.layerId===e.id.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.id.overlayId))):e instanceof i.Cesium.Cesium3DTileFeature?(r=this._viewer.getLayers().filter(o=>o.layerId===e.tileset.layerId)[0],s=e,r!=null&&r.getOverlay&&(t=r.getOverlay(e.tileset.overlayId),s&&s.getPropertyNames&&s.getPropertyNames().forEach(a=>{t.attr[a]=s.getProperty(a)}))):(e==null?void 0:e.primitive)instanceof i.Cesium.Cesium3DTileset?(r=this._viewer.getLayers().filter(o=>o.layerId===e.primitive.layerId)[0],r!=null&&r.getOverlay&&(t=r.getOverlay(e.primitive.overlayId))):e!=null&&e.primitive&&(r=this._viewer.getLayers().filter(o=>o.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 l;let r,s=this._getTargetInfo(t.target),o=s==null?void 0:s.overlay,a=s==null?void 0:s.layer;o!=null&&o.overlayEvent&&(r=o.overlayEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._eventPropagation)&&(a!=null&&a.layerEvent)&&(r=a.layerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),(!r||r.numberOfListeners===0||this._enableEventPropagation)&&((l=this._viewer)!=null&&l.viewerEvent)&&(r=this._viewer.viewerEvent.getEvent(e),r&&r.numberOfListeners>0&&r.raiseEvent({...s,...t})),o!=null&&o.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)!==o.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(L.CLICK,this._getMouseInfo(e.position))}_dbClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.DB_CLICK,this._getMouseInfo(e.position))}_rightClickHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.RIGHT_CLICK,this._getMouseInfo(e.position))}_mouseMoveHandler(e){if(!(e!=null&&e.endPosition))return!1;let t=this._getMouseInfo(e.endPosition);this._viewer.canvas.style.cursor=t.target?"pointer":"default",this._raiseEvent(L.MOUSE_MOVE,t),this._enableMouseOver&&(!this._selected||this._getOverlayId(this._selected.target)!==this._getOverlayId(t.target))&&(this._raiseEvent(L.MOUSE_OUT,this._selected),this._raiseEvent(L.MOUSE_OVER,t),this._selected=t)}_leftDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.LEFT_DOWN,this._getMouseInfo(e.position))}_leftUpHandler(e){this._raiseEvent(L.LEFT_UP,this._getMouseInfo(e.position))}_rightDownHandler(e){if(!(e!=null&&e.position))return!1;this._raiseEvent(L.RIGHT_DOWN,this._getMouseInfo(e.position))}_rightUpHandler(e){this._raiseEvent(L.RIGHT_UP,this._getMouseInfo(e.position))}_mouseWheelHandler(e){this._raiseEvent(L.WHEEL,{movement:e})}},_i=ui;var fi=class extends G{constructor(){super(Il),this._registerEvent()}},gi=fi;var yi=class extends G{constructor(e){super(A),this._camera=e.camera,this._scene=e.scene,this._clock=e.clock}on(e,t,r){let s;switch(e){case A.CAMERA_MOVE_END:s=this._camera.moveEnd.addEventListener(t,r||this);break;case A.CAMERA_CHANGED:s=this._camera.changed.addEventListener(t,r||this);break;case A.PRE_UPDATE:s=this._scene.preUpdate.addEventListener(t,r||this);break;case A.POST_UPDATE:s=this._scene.postUpdate.addEventListener(t,r||this);break;case A.PRE_RENDER:s=this._scene.preRender.addEventListener(t,r||this);break;case A.POST_RENDER:s=this._scene.postRender.addEventListener(t,r||this);break;case A.MORPH_COMPLETE:s=this._scene.morphComplete.addEventListener(t,r||this);break;case A.CLOCK_TICK:s=this._clock.onTick.addEventListener(t,r||this);break;case A.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 A.CAMERA_MOVE_END:s=this._camera.moveEnd.removeEventListener(t,r||this);break;case A.CAMERA_CHANGED:s=this._camera.changed.removeEventListener(t,r||this);break;case A.PRE_UPDATE:s=this._scene.preUpdate.removeEventListener(t,r||this);break;case A.POST_UPDATE:s=this._scene.postUpdate.removeEventListener(t,r||this);break;case A.PRE_RENDER:s=this._scene.preRender.removeEventListener(t,r||this);break;case A.POST_RENDER:s=this._scene.postRender.removeEventListener(t,r||this);break;case A.MORPH_COMPLETE:s=this._scene.morphComplete.removeEventListener(t,r||this);break;case A.CLOCK_TICK:s=this._clock.onTick.removeEventListener(t,r||this);break;case A.RENDER_ERROR:s=this._scene.renderError.removeEventListener(t,r||this);break;default:break}return s}},vi=yi;var wi=class extends G{constructor(){super(Se),this._registerEvent()}},Ti=wi;var Ci=class extends G{constructor(){super(Ie),this._registerEvent()}},xi=Ci;var Ei=class extends G{constructor(){super(Pe),this._registerEvent()}},Pi=Ei;var bi=class extends G{constructor(e){super(Z),this._tileset=e}on(e,t,r){return this._tileset.then(s=>{switch(e){case Z.INITIAL_TILES_LOADED:s.initialTilesLoaded.addEventListener(t,r||this);break;case Z.ALL_TILES_LOADED:s.allTilesLoaded.addEventListener(t,r||this);break;case Z.LOAD_PROGRESS:s.loadProgress.addEventListener(t,r||this);break;case Z.TILE_FAILED:s.tileFailed.addEventListener(t,r||this);break;case Z.TILE_LOAD:s.tileLoad.addEventListener(t,r||this);break;case Z.TILE_UNLOAD:s.tileUnload.addEventListener(t,r||this);break;case Z.TILE_VISIBLE:s.tileVisible.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._tileset.then(s=>{switch(e){case Z.INITIAL_TILES_LOADED:s.initialTilesLoaded.removeEventListener(t,r||this);break;case Z.ALL_TILES_LOADED:s.allTilesLoaded.removeEventListener(t,r||this);break;case Z.LOAD_PROGRESS:s.loadProgress.removeEventListener(t,r||this);break;case Z.TILE_FAILED:s.tileFailed.removeEventListener(t,r||this);break;case Z.TILE_LOAD:s.tileLoad.removeEventListener(t,r||this);break;case Z.TILE_UNLOAD:s.tileUnload.removeEventListener(t,r||this);break;case Z.TILE_VISIBLE:s.tileVisible.removeEventListener(t,r||this);break;default:break}}),!0}},Si=bi;var Ii=class extends G{constructor(e){super(be),this._model=e}on(e,t,r){return this._model.then(s=>{switch(e){case be.READY:s.readyEvent.addEventListener(t,r||this);break;case be.TEX_READY:s.texturesReadyEvent.addEventListener(t,r||this);break;default:break}}),null}off(e,t,r){return this._model.then(s=>{switch(e){case be.READY:s.readyEvent.removeEventListener(t,r||this);break;case be.TEX_READY:s.texturesReadyEvent.removeEventListener(t,r||this);break;default:break}}),!0}},Mi=Ii;var Ai=class extends G{constructor(){super(re),this._registerEvent()}},Di=Ai;var Li=class extends G{constructor(){super(se),this._registerEvent()}},Ri=Li;var Oi=class extends G{constructor(){super(C),this._registerEvent()}},Ye=Oi;var ki=class{constructor(e){this._id=v.uuid(),this._bid=e||v.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 xi,this._layerEvent.on(Ie.ADD,this._onAdd,this),this._layerEvent.on(Ie.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.Cesium.PrimitiveCollection?this._isGround?this._viewer.scene.groundPrimitives.add(this._delegate):this._viewer.scene.primitives.add(this._delegate):this._delegate instanceof i.Cesium.ImageryLayer?this._viewer.imageryLayers.add(this._delegate):this._viewer.dataSources.add(this._delegate),this._addedHook&&this._addedHook(),this._state=d.ADDED)}_onRemove(){this._delegate&&this._viewer&&(this._cache={},this._delegate instanceof i.Cesium.PrimitiveCollection?(this._delegate.removeAll(),this._isGround?this._viewer.scene.groundPrimitives.remove(this._delegate):this._viewer.scene.primitives.remove(this._delegate)):this._delegate instanceof i.Cesium.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=d.REMOVED)}_addOverlay(e){this._cache.hasOwnProperty(e.overlayId)||(this._cache[e.overlayId]=e,this._delegate&&e.fire(Pe.ADD,this),this._state===d.CLEARED&&(this._state=d.ADDED))}_removeOverlay(e){this._cache.hasOwnProperty(e.overlayId)&&(this._delegate&&e.fire(Pe.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&&(Fe[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getLayerType(e){return Fe[e.toLocaleUpperCase()]||void 0}},P=ki;var Fi=class{constructor(e){this._id=e||v.uuid(),this._cache={},this._show=!0,this._viewer=void 0,this._layerGroupEvent=new Ti,this._layerGroupEvent.on(Se.ADD,this._onAdd,this),this._layerGroupEvent.on(Se.REMOVE,this._onRemove,this),this._state=d.INITIALIZED}get id(){return this._id}get type(){return P.getLayerType("layer_group")}set show(e){this._show=e,Object.keys(this._cache).forEach(t=>{this._cache[t].show=this._show})}get show(){return 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=d.ADDED}_onRemove(){Object.keys(this._cache).forEach(e=>{this._viewer&&this._viewer.removeLayer(this._cache[e])}),this._cache={},this._state=d.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}};P.registerType("layer_group");var zi=Fi;var Ml=new i.Cesium.WebMercatorProjection,Hi=class{static transformCartesianToWGS84(e){if(e){let t=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(e);return new j(i.Cesium.Math.toDegrees((t==null?void 0:t.longitude)||0),i.Cesium.Math.toDegrees((t==null?void 0:t.latitude)||0),t.height||0)}return new j(0,0)}static transformCartographicToWGS84(e){return e?new j(i.Cesium.Math.toDegrees((e==null?void 0:e.longitude)||0),i.Cesium.Math.toDegrees((e==null?void 0:e.latitude)||0),e.height||0):new j(0,0)}static transformWGS84ToCartesian(e){return e?i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt,i.Cesium.Ellipsoid.WGS84):i.Cesium.Cartesian3.ZERO}static transformWGS84ToCartographic(e){return e?i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt):i.Cesium.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=Ml.project(i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt));return new j(t.x,t.y,t.z)}static transformMercatorToWGS84(e){let t=Ml.unproject(new i.Cesium.Cartesian3(e.lng,e.lat,e.alt));return new j(i.Cesium.Math.toDegrees(t.longitude),i.Cesium.Math.toDegrees(t.latitude),t.height)}static transformWindowToWGS84(e,t){let r=t.scene,s;if(r.mode===i.Cesium.SceneMode.SCENE3D){let o=r.camera.getPickRay(e);s=r.globe.pick(o,r)}else s=r.camera.pickEllipsoid(e,i.Cesium.Ellipsoid.WGS84);return this.transformCartesianToWGS84(s)}static transformWGS84ToWindow(e,t){let r=t.scene;return i.Cesium.SceneTransforms.worldToWindowCoordinates(r,this.transformWGS84ToCartesian(e))}},u=Hi;var ft=52.35987755982988,K=3.141592653589793,Al=6378245,Dl=.006693421622965943,Ni=class{static BD09ToGCJ02(e,t){let r=+e-.0065,s=+t-.006,o=Math.sqrt(r*r+s*s)-2e-5*Math.sin(s*ft),a=Math.atan2(s,r)-3e-6*Math.cos(r*ft),l=o*Math.cos(a),h=o*Math.sin(a);return[l,h]}static GCJ02ToBD09(e,t){t=+t,e=+e;let r=Math.sqrt(e*e+t*t)+2e-5*Math.sin(t*ft),s=Math.atan2(t,e)+3e-6*Math.cos(e*ft),o=r*Math.cos(s)+.0065,a=r*Math.sin(s)+.006;return[o,a]}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),o=s[0]-e,a=s[1]-t;do s=this.WGS84ToGCJ02(r[0]-=o,r[1]-=a),o=s[0]-e,a=s[1]-t;while(Math.abs(o)>1e-7||Math.abs(a)>1e-7);return r}}static delta(e,t){let r=this.transformLng(e-105,t-35),s=this.transformLat(e-105,t-35),o=t/180*K,a=Math.sin(o);a=1-Dl*a*a;let l=Math.sqrt(a);return r=r*180/(Al/l*Math.cos(o)*K),s=s*180/(Al*(1-Dl)/(a*l)*K),[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*K)+20*Math.sin(2*e*K))*2/3,r+=(20*Math.sin(e*K)+40*Math.sin(e/3*K))*2/3,r+=(150*Math.sin(e/12*K)+300*Math.sin(e/30*K))*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*K)+20*Math.sin(2*e*K))*2/3,r+=(20*Math.sin(t*K)+40*Math.sin(t/3*K))*2/3,r+=(160*Math.sin(t/12*K)+320*Math.sin(t*K/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)}},he=Ni;var Wi=class n{constructor(e,t,r,s,o,a){this._lng=+e||0,this._lat=+t||0,this._alt=+r||0,this._heading=+s||0,this._pitch=+o||0,this._roll=+a||0}set lng(e){this._lng=+e}get lng(){return this._lng}set lat(e){this._lat=+e}get lat(){return this._lat}set alt(e){this._alt=+e}get alt(){return this._alt}set heading(e){this._heading=+e}get heading(){return this._heading}set pitch(e){this._pitch=+e}get pitch(){return this._pitch}set roll(e){this._roll=+e}get roll(){return this._roll}serialize(){let e=new n(this._lng,this._lat,this._alt,this._heading,this._pitch,this._roll);return JSON.stringify(e)}distance(e){return!e||!(e instanceof n)?0:i.Cesium.Cartesian3.distance(u.transformWGS84ToCartesian(this),u.transformWGS84ToCartesian(e))}clone(){let e=new n;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}}static fromArray(e){let t=new n;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 n;if(e&&typeof e=="string"){let r=e.split(",");t=this.fromArray(r)}return t}static fromObject(e){return new n(e.lng,e.lat,e.alt,e.heading,e.pitch,e.roll)}static deserialize(e){let t=new n,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}},j=Wi;var Gi=class{static parsePosition(e){let t=new j;return e&&(typeof e=="string"?t=j.fromString(e):Array.isArray(e)?t=j.fromArray(e):!(Object(e)instanceof j)&&Object(e).hasOwnProperty("lng")&&Object(e).hasOwnProperty("lat")?t=j.fromObject(e):Object(e)instanceof j?t=e:Object(e)instanceof i.Cesium.Cartesian3?t=u.transformCartesianToWGS84(e):Object(e)instanceof i.Cesium.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]}},_=Gi;var ad={radius:60,maxZoom:25,style:"circle",image:"",gradientColors:{1e-4:i.Cesium.Color.DEEPSKYBLUE,.001:i.Cesium.Color.GREEN,.01:i.Cesium.Color.ORANGE,.1:i.Cesium.Color.RED},gradientImages:{},showCount:!0,fontSize:12,clusterSize:16,fontColor:i.Cesium.Color.BLACK,getCountOffset:n=>({x:-3.542857*String(n).length+1.066667,y:String(n).length>3?5:4})},Ui=class extends P{constructor(e,t={}){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._options={...ad,...t},this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._cluster=new i.Supercluster({radius:this._options.radius,maxZoom:this._options.maxZoom}),this._allCount=0,this._changedRemoveCallback=void 0,this._lastChangedTime=null,this._state=d.INITIALIZED}get type(){return P.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 o=document.createElement("canvas");o.width=r,o.height=r;let a=o.getContext("2d");a.save(),a.scale(r/24,r/24),a.fillStyle=e.withAlpha(.2).toCssColorString(),a.beginPath(),a.arc(12,12,9,0,2*Math.PI),a.closePath(),a.fill(),a.beginPath(),a.arc(12,12,6,0,2*Math.PI),a.fillStyle=e.toCssColorString(),a.closePath(),a.fill(),a.restore(),this._cache[s]=o.toDataURL()}return this._cache[s]}_getClusteringImage(e,t){let r=this._options.clusterSize*(String(t).length+1),s=e.toCssColorString()+"-"+t,o=-Math.PI/12,a=Math.PI/2,l=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,o,o+a,!1),c.strokeStyle=e.withAlpha(.4).toCssColorString(),c.stroke(),c.arc(12,12,11,o,o+a,!1),c.strokeStyle=e.withAlpha(.2).toCssColorString(),c.stroke(),c.closePath(),o=o+a+l;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((o,a)=>Number(o)-Number(a));for(let o=s.length-1;o>=0;o--)if(t>=Number(s[o])){r=this._options.gradientImages[s[o]];break}r||(r=this._options.gradientImages[s[0]])}else{let s=Object.keys(this._options.gradientColors).sort((a,l)=>Number(a)-Number(l)),o;for(let a=s.length-1;a>=0;a--)if(t>=Number(s[a])){o=this._options.gradientColors[s[a]];break}o||(o=this._options.gradientColors[s[0]]),r=this._options.style==="circle"?this._getCircleImage(o,e):this._getClusteringImage(o,e)}return r}_changeCluster(e){let t=i.Cesium.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.Cesium.Math.toDegrees(r.west),i.Cesium.Math.toDegrees(r.south),i.Cesium.Math.toDegrees(r.east),i.Cesium.Math.toDegrees(r.north)],this._viewer.zoom).forEach(o=>{let a=v.uuid();if(o.properties.cluster){let l=o.properties.point_count,h=this._billboards.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._getClusterImage(l)});if(h.layerId=this.layerId,h.overlayId=a,h.attr={count:l},this._cache[a]=h,this._options.showCount){let c=this._labels.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),text:String(l),font:`${this._options.fontSize} px sans-serif`,disableDepthTestDistance:Number.POSITIVE_INFINITY,fillColor:this._options.fontColor,scale:.8,pixelOffset:this._options.getCountOffset(l)});c.layerId=this.layerId,c.overlayId=a,c.attr={count:l},this._cache[a]=c}}else{let l=this._billboards.add({position:i.Cesium.Cartesian3.fromDegrees(+o.geometry.coordinates[0],+o.geometry.coordinates[1]),image:this._options.image,...o.properties.style});l.layerId=this.layerId,l.overlayId=a,l.attr=o.properties,this._cache[a]=l}})}_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=_.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=d.CLEARED,this}};P.registerType("cluster");var Bi=Ui;var Vi=class extends P{constructor(e,t="",r={}){super(e),this._delegate=i.Cesium.CzmlDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("czml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("czml");var ji=Vi;var Yi=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.CustomDataSource(e),this._state=d.INITIALIZED}get type(){return P.getLayerType("dynamic")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("dynamic");var Zi=Yi;var qi=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.CustomDataSource(e),this._state=d.INITIALIZED}get type(){return P.getLayerType("vector")}clear(){return this._delegate.entities&&this._delegate.entities.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("vector");var ce=qi;var nd={name:"",count:10,maximumLevel:21,dataProperty:"",callback:()=>null},Xi=class extends P{constructor(e,t,r={}){super(e),this._url=t,this._options={...nd,...r},this._levelLayers={},this._tileWidth=256,this._tileHeight=256,this._maximumLevel=this._options.maximumLevel,this._tilingScheme=this._options.tilingScheme||new i.Cesium.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 ce(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=d.INITIALIZED}get type(){return P.getLayerType("feature_grid")}get url(){return this._url}set show(e){this._show=e,Object.keys(this._levelLayers).forEach(t=>{this._levelLayers[t].show=e})}get show(){return this._show}get token(){return this._token}get tileWidth(){if(!this.ready)throw new i.Cesium.DeveloperError("tileWidth must not be called before the imagery provider is ready.");return this._tileWidth}get tileHeight(){if(!this.ready)throw new i.Cesium.DeveloperError("tileHeight must not be called before the imagery provider is ready.");return this._tileHeight}get maximumLevel(){if(!this.ready)throw new i.Cesium.DeveloperError("maximumLevel must not be called before the imagery provider is ready.");return this._maximumLevel}get minimumLevel(){if(!this.ready)throw new i.Cesium.DeveloperError("minimumLevel must not be called before the imagery provider is ready.");return 0}get tilingScheme(){if(!this.ready)throw new i.Cesium.DeveloperError("tilingScheme must not be called before the imagery provider is ready.");return this._tilingScheme}get rectangle(){if(!this.ready)throw new i.Cesium.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=d.ADDED}_onRemove(){this._imageryLayer&&this._viewer.imageryLayers.remove(this._imageryLayer),Object.keys(this._levelLayers).forEach(e=>{this._viewer.removeLayer(this._levelLayers[e])}),this._state=d.REMOVED}getTileCredits(e,t,r){}requestImage(e,t,r,s){let o=this._levelLayers[String(r)],a=this._tilingScheme.tileXYToRectangle(e,t,r);return this._viewer&&a&&o&&i.Cesium.Rectangle.intersection(a,this._viewer.viewBounds)&&i.Cesium.Resource.fetchJson({url:this._url,queryParameters:{minX:i.Cesium.Math.toDegrees(a.west),minY:i.Cesium.Math.toDegrees(a.south),maxX:i.Cesium.Math.toDegrees(a.east),maxY:i.Cesium.Math.toDegrees(a.north),count:this._options.count}}).then(l=>{let h=l;if(this._options.dataProperty&&(h=l[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&&o.addOverlay(p)})}}),this._imagery}clear(){Object.keys(this._levelLayers).forEach(e=>{this._levelLayers[e].clear()}),this._state=d.CLEARED}};P.registerType("feature_grid");var Ji=Xi;var ld={},F=ld;var Ki=class{constructor(){this._id=v.uuid(),this._bid=v.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 Pi,this._overlayEvent.on(Pe.ADD,this._onAdd,this),this._overlayEvent.on(Pe.REMOVE,this._onRemove,this)}get overlayId(){return this._id}get type(){return""}set id(e){this._bid=e}get id(){return this._bid}set show(e){this._show=e,v.isPromise(this._delegate)?this._delegate.then(t=>{t.show=this._show}):this._delegate&&(this._delegate.show=this._show)}get show(){return this._show}set attr(e){this._attr=e}get attr(){return this._attr}set allowDrillPicking(e){this._allowDrillPicking=e}get allowDrillPicking(){return this._allowDrillPicking}get overlayEvent(){return this._overlayEvent}get delegate(){return this._delegate}get state(){return this._state}set contextMenu(e){this._contextMenu=e}get contextMenu(){return this._contextMenu}_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,o;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((o=(s=this._layer)==null?void 0:s.delegate)!=null&&o.add){let a=this._getLayerCollection(this.type);a?(this._delegate&&(this._delegate=a.add(this._delegate)),v.merge(this._delegate,this._style),this.update&&this.destroy&&this._layer.delegate.add(this)):v.isPromise(this._delegate)?this._delegate.then(l=>{this._layer.delegate.add(l)}):this.update&&this.destroy?this._layer.delegate.add(this):this._delegate&&this._layer.delegate.add(this._delegate)}this._addedHook&&this._addedHook(),this._state=d.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 o=this._getLayerCollection(this.type);o?(this._delegate&&o.remove(this._delegate),this.update&&this.destroy&&this._layer.delegate.remove(this)):v.isPromise(this._delegate)?this._delegate.then(a=>{this._layer.delegate.remove(a)}):this.update&&this.destroy?this._layer.delegate.remove(this):this._delegate&&this._layer.delegate.remove(this._delegate)}this._removedHook&&this._removedHook(),this._state=d.REMOVED}}setLabel(e,t){return this._delegate?(this._delegate instanceof i.Cesium.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}static registerType(e){e&&(F[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getOverlayType(e){return F[e.toLocaleUpperCase()]||void 0}},g=Ki;var Qi=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({billboard:{}}),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._state=d.INITIALIZED}get type(){return g.getOverlayType("custom_billboard")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}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}get size(){return this._size}_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,v.merge(this._style,e),v.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,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.Cesium.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_billboard");var $i=Qi;var er=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({label:{}}),this._position=_.parsePosition(e),this._text=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("custom_label")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return this._text}_mountedHook(){this.position=this._position,this.text=this._text}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.text,v.merge(this._style,e),v.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,o=r;return this._delegate.ellipse={...t,semiMajorAxis:e,semiMinorAxis:e,stRotation:new i.Cesium.CallbackProperty(()=>(s+=o,(s>=360||s<=-360)&&(s=0),s),!1)},this}};g.registerType("custom_label");var tr=er;var ir=class extends g{constructor(){super(),this._startTime=void 0,this._lastTime=void 0,this._sampledPosition=new i.Cesium.SampledPositionProperty,this._cache=[],this._maxCacheSize=10,this._state=d.INITIALIZED}set maxCacheSize(e){this._maxCacheSize=e}get maxCacheSize(){return this._maxCacheSize}get position(){return u.transformCartesianToWGS84(this._sampledPosition.getValue(i.Cesium.JulianDate.now()))}_removePosition(){if(this._cache.length>this._maxCacheSize){let e=i.Cesium.JulianDate.addSeconds(this._cache[0],-.2,new i.Cesium.JulianDate),t=i.Cesium.JulianDate.addSeconds(this._cache[this._cache.length-this._maxCacheSize],-.2,new i.Cesium.JulianDate);this._sampledPosition.removeSamples(new i.Cesium.TimeInterval({start:e,stop:t})),this._cache.splice(0,this._cache.length-this._maxCacheSize)}}addPosition(e,t){this._removePosition();let r=i.Cesium.JulianDate.now(),s=i.Cesium.JulianDate.addSeconds(r,t,new i.Cesium.JulianDate);return this._sampledPosition.addSample(s,u.transformWGS84ToCartesian(_.parsePosition(e))),this._lastTime=s,this._cache.push(this._lastTime),this}bindDom(e){return this}},gt=ir;var rr=class extends gt{constructor(e,t){super(),this._position=_.parsePosition(e),this._icon=t,this._delegate=new i.Cesium.Entity({billboard:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("dynamic_billboard")}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}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}get size(){return this._size}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._startTime=i.Cesium.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,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}};g.registerType("dynamic_billboard");var sr=rr;var or=class extends gt{constructor(e,t){super(),this._position=_.parsePosition(e),this._modelUrl=t,this._delegate=new i.Cesium.Entity({model:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("dynamic_model")}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}_mountedHook(){this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._startTime=i.Cesium.JulianDate.now(),this._sampledPosition.addSample(this._startTime,u.transformWGS84ToCartesian(this._position)),this._delegate.position=this._sampledPosition,this._delegate.orientation=new i.Cesium.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,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}};g.registerType("dynamic_model");var ar=or;function hd(n,e,t){let r=i.Cesium.Cartesian3.subtract(n,e,new i.Cesium.Cartesian3),s=i.Cesium.Cartesian3.subtract(t,e,new i.Cesium.Cartesian3),o=i.Cesium.Cartesian3.cross(r,s,r);return i.Cesium.Cartesian3.magnitude(o)*.5}function ue(n){let e=0;if(!Array.isArray(n))return e;n[0]instanceof i.Cesium.Cartesian3||(n=u.transformWGS84ArrayToCartesianArray(n));let t=i.Cesium.CoplanarPolygonGeometry.createGeometry(i.Cesium.CoplanarPolygonGeometry.fromPositions({positions:n,vertexFormat:i.Cesium.VertexFormat.POSITION_ONLY}));if(!t)return e;let r=t.attributes.position.values,s=t.indices;for(let o=0;o<s.length;o+=3){let a=i.Cesium.Cartesian3.unpack(r,s[o]*3,new i.Cesium.Cartesian3),l=i.Cesium.Cartesian3.unpack(r,s[o+1]*3,new i.Cesium.Cartesian3),h=i.Cesium.Cartesian3.unpack(r,s[o+2]*3,new i.Cesium.Cartesian3);e+=hd(a,l,h)}return e}function nr(n=[],e=0){let t=180,r=90,s=-180,o=-90;if(n.forEach(a=>{t=Math.min(t,a.lng||a.x),r=Math.min(r,a.lat||a.y),s=Math.max(s,a.lng||a.x),o=Math.max(o,a.lat||a.y)}),e>0){let a=Math.abs(s-s),l=Math.abs(o-r);t-=a*e,r-=l*e,s+=a*e,o+=l*e}return{west:t,south:r,east:s,north:o}}function _e(n){if(n&&Array.isArray(n)){let e=0;n.forEach(({alt:s})=>e=Math.max(e,s));let t=i.Cesium.BoundingSphere.fromPoints(u.transformWGS84ArrayToCartesianArray(n)),r=u.transformCartesianToWGS84(t.center);return r.alt=e,r}return new j}function lr(n,e){e=e||{};let t=[];for(let r=0;r<n.length-1;r++){let s=cd(n[r],n[r+1],e.count);s&&s.length>0&&(t=t.concat(s))}return t}function cd(n,e,t){if(!n||!e)return null;let r=[];t=t||40;let s=function(I){return 1-2*I+I*I},o=I=>2*I-2*I*I,a=I=>I*I,l,h,c,p,f,T,y=0,m=parseFloat(n.lat),E=parseFloat(e.lat),x=parseFloat(n.lng),b=parseFloat(e.lng);b>x&&b-x>180&&x<0&&(x=360+x,b=360+b),T=0,E===m?(l=0,h=x-b):b===x?(l=Math.PI/2,h=m-E):(l=Math.atan((E-m)/(b-x)),h=(E-m)/Math.sin(l)),T===0&&(T=l+Math.PI/5),c=h/2,f=c*Math.cos(T)+x,p=c*Math.sin(T)+m;for(let I=0;I<t+1;I++){let N=x*s(y)+f*o(y)+b*a(y),H=m*s(y)+p*o(y)+E*a(y),W=n.lng,ee=e.lng;r.push([W<0&&ee>0?N-360:N,H]),y=y+1/t}return r}function Q(n){let e=0;if(n&&Array.isArray(n))for(let t=0;t<n.length-1;t++){let r=u.transformWGS84ToCartographic(n[t]),s=u.transformWGS84ToCartographic(n[t+1]),o=new i.Cesium.EllipsoidGeodesic;o.setEndPoints(r,s);let a=o.surfaceDistance;a=Math.sqrt(Math.pow(a,2)+Math.pow(s.height-r.height,2)),e+=a}return e.toFixed(3)}function fe(n,e){let t=n,r=e;if(!t||!r)return 0;n instanceof i.Cesium.Cartesian3||(t=_.parsePosition(n),t=u.transformWGS84ToCartesian(t)),e instanceof i.Cesium.Cartesian3||(r=_.parsePosition(e),r=u.transformWGS84ToCartesian(r));let s=i.Cesium.Transforms.eastNorthUpToFixedFrame(t),o=i.Cesium.Cartesian3.subtract(r,t,new i.Cesium.Cartesian3),a=i.Cesium.Matrix4.multiplyByPointAsVector(i.Cesium.Matrix4.inverse(s,new i.Cesium.Matrix4),o,new i.Cesium.Cartesian3),l=Math.atan2(a.y,a.x)-i.Cesium.Math.PI_OVER_TWO;return l=i.Cesium.Math.TWO_PI-i.Cesium.Math.zeroToTwoPi(l),isNaN(l)?0:l}function Ze(n,e,t){return n=parseFloat(n)||0,n>=parseFloat(e)&&n<=parseFloat(t)}function k(n,e){return i.Cesium.Cartesian3.midpoint(n,e,new i.Cesium.Cartesian3)}function hr(n,e){let t=_.parsePosition(n),r=_.parsePosition(e);t=u.transformWGS84ToCartographic(t),r=u.transformWGS84ToCartographic(r);let s=new i.Cesium.EllipsoidGeodesic(t,r).interpolateUsingFraction(.5);return new j(i.Cesium.Math.toDegrees(s.longitude),i.Cesium.Math.toDegrees(s.latitude),s.height)}function cr(n,e,t=0,r=50){let s=[];t=Math.max(+t,100),r=Math.max(+r,50);let o=Math.abs(n.lng-e.lng),a=Math.abs(n.lat-e.lat),l=Math.max(o,a),h=l/r;if(o>a){let c=(e.lat-n.lat)/r;n.lng-e.lng>0&&(h=-h);for(let p=0;p<r;p++){let f=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),T=n.lng+h*p,y=n.lat+c*p;s.push([T,y,f])}}else{let c=(e.lng-n.lng)/r;n.lat-e.lat>0&&(h=-h);for(let p=0;p<r;p++){let f=t-Math.pow(-.5*l+Math.abs(h)*p,2)*4*t/Math.pow(l,2),T=n.lng+c*p,y=n.lat+h*p;s.push([T,y,f])}}return s.push([e.lng,e.lat,e.alt||0]),s}var{Math:pd}=i.Cesium,pr={};v.merge(pr,pd,{area:ue,bounds:nr,center:_e,curve:lr,distance:Q,heading:fe,isBetween:Ze,midCartesian:k,midPosition:hr,parabola:cr});var dr=class n extends g{constructor(e,t){super(),this._delegate=S.create("div","div-icon"),this._position=_.parsePosition(e),this._delegate.setAttribute("id",this._id),v.merge(this._delegate.style,{position:"absolute",top:"0",left:"0"}),this.content=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("div_icon")}set show(e){this._show=e,this._delegate.style.visibility=this._show?"visible":"hidden"}get show(){return this._show}set position(e){this._position=_.parsePosition(e)}get position(){return this._position}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)}}get content(){return this._delegate.childNodes||[]}_updateStyle(e,t,r){if(!this._show||!e)return;let s=e.x-this._delegate.offsetWidth/2,o=e.y-this._delegate.offsetHeight/2;this._style.position==="topleft"?(s=e.x-this._delegate.offsetWidth,o=e.y-this._delegate.offsetHeight):this._style.position==="topright"?(s=e.x,o=e.y-this._delegate.offsetHeight):this._style.position==="bottomleft"?(s=e.x-this._delegate.offsetWidth,o=e.y):this._style.position==="bottomright"&&(s=e.x,o=e.y);let a=`translate3d(${Math.round(s)}px,${Math.round(o)}px, 0)`,l="scale3d(1,1,1)",h=this._style.scaleByDistance;if(t&&h){let f=h.near||0,T=h.nearValue||1,y=h.far||Number.MAX_VALUE,m=h.farValue||0,E=t/y;if(t<f)l=`scale3d(${T},${T},1)`;else if(t>y)l=`scale3d(${m},${m},1)`;else{let x=m+E*(T-m);l=`scale3d(${x},${x},1)`}}let c=!0,p=this._style.distanceDisplayCondition;t&&p&&(c=Ze(t,p.near||0,p.far||Number.MAX_VALUE)),this._delegate.style.transform=`${a} ${l}`,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(L.CLICK,t)}),this._delegate.addEventListener("mouseover",()=>{this._overlayEvent.fire(L.MOUSE_OVER,t)}),this._delegate.addEventListener("mouseout",()=>{this._overlayEvent.fire(L.MOUSE_OUT,t)}),this._state=d.ADDED}_onRemove(){this._layer&&(this._layer.delegate.removeChild(this._delegate),this._state=d.REMOVED)}setLabel(e,t){return this}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._style.className&&S.addClass(this._delegate,this._style.className),this)}static fromEntity(e,t){var a;let r,s=i.Cesium.JulianDate.now(),o=u.transformCartesianToWGS84(e.position.getValue(s));return r=new n(o,t),e.billboard&&(r.attr={...(a=e==null?void 0:e.properties)==null?void 0:a.getValue(s)}),r}};g.registerType("div_icon");var mr=dr;var ur=class n extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({model:{}}),this._position=_.parsePosition(e),this._modelUrl=t,this._rotateAmount=0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("model")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._rotateAmount===0&&(this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll))))}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate.model.uri=this._modelUrl}get modelUrl(){return this._modelUrl}set rotateAmount(e){this._rotateAmount=+e,this._delegate.orientation=new i.Cesium.CallbackProperty(()=>(this._position.heading+=this._rotateAmount,(this._position.heading>=360||this._position.heading<=-360)&&(this._position.heading=0),i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))),!1)}get rotateAmount(){return this._rotateAmount}_mountedHook(){this.position=this._position,this.modelUrl=this._modelUrl}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.uri,v.merge(this._style,e),v.merge(this._delegate.model,e),this)}static fromEntity(e,t){let r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r)),o=new n(s,t);return o.attr={...e.properties.getValue(r)},o}};g.registerType("model");var De=ur;var _r=class extends g{constructor(e,t={}){super(),this._delegate=i.Cesium.I3SDataProvider.fromUrl(e,t),this._state=d.INITIALIZED}get type(){return g.getOverlayType("i3s")}ready(e){return this._delegate.then(e),this}setLabel(e,t){return console.warn("not support this function"),this}};g.registerType("i3s");var fr=_r;var gr=class extends g{constructor(e,t={}){super(),this._delegate=i.Cesium.Cesium3DTileset.fromUrl(e,t),this._tilesetEvent=new Si(this._delegate),this._tileVisibleCallback=void 0,this._properties=void 0,this._state=d.INITIALIZED}get type(){return g.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(o=>{s.hasProperty(o.key)&&s.getProperty(o.key)===o.keyValue&&s.setProperty(o.propertyName,o.propertyValue)})}}ready(e){return this._delegate.then(e),this}setPosition(e){return e=_.parsePosition(e),this._delegate.then(t=>{let r=i.Cesium.Transforms.eastNorthUpToFixedFrame(i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt)),s=i.Cesium.Matrix4.fromRotationTranslation(i.Cesium.Matrix3.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(e.heading),i.Cesium.Math.toRadians(e.pitch),i.Cesium.Math.toRadians(e.roll))));i.Cesium.Matrix4.multiply(r,s,r),t.root.transform=r}),this}setHeadingPitchRoll(e,t,r){return this._delegate.then(s=>{let o=s.root.transform,a=i.Cesium.Matrix4.fromRotationTranslation(i.Cesium.Matrix3.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(e||0),i.Cesium.Math.toRadians(t||0),i.Cesium.Math.toRadians(r||0))));i.Cesium.Matrix4.multiply(o,a,o),s.root.transform=o}),this}setLabel(e,t){return console.warn("not support this function"),this}clampToGround(){return this._delegate.then(e=>{let t=i.Cesium.Cartographic.fromCartesian(e.boundingSphere.center),r=i.Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,t.height),s=i.Cesium.Cartesian3.fromRadians(t.longitude,t.latitude,0),o=i.Cesium.Cartesian3.subtract(s,r,new i.Cesium.Cartesian3);e.modelMatrix=i.Cesium.Matrix4.fromTranslation(o)}),this}setHeight(e,t=!1){return this._delegate.then(r=>{let s=i.Cesium.Cartographic.fromCartesian(r.boundingSphere.center),o=i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,s.height),a=i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,t?e:s.height+e),l=i.Cesium.Cartesian3.subtract(a,o,new i.Cesium.Cartesian3);r.modelMatrix=i.Cesium.Matrix4.fromTranslation(l)}),this}setScale(e){return this._delegate.then(t=>{let r=t.root.transform;e>0&&e!==1&&i.Cesium.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.Cesium.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}};g.registerType("tileset");var yr=gr;var yt=Math.PI/2,vr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.18,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this.headTailFactor=.8,this._state=d.INITIALIZED}get type(){return g.getOverlayType("attack_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowHeadPoints(e,t,r){let s=w.getBaseLength(e),o=s*this.headHeightFactor,a=e[e.length-1];s=w.distance(a,e[e.length-2]);let l=w.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],a,0,o,!0),T=w.getThirdPoint(e[e.length-2],a,0,p,!0),y=w.getThirdPoint(a,f,yt,h,!1),m=w.getThirdPoint(a,f,yt,h,!0),E=w.getThirdPoint(a,T,yt,c,!1),x=w.getThirdPoint(a,T,yt,c,!0);return[E,y,a,m,x]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getHierarchy(){let e=_.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 o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r)/w.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),f=p.length,T=[t].concat(p.slice(0,f/2));T.push(l);let y=[r].concat(p.slice(f/2,f));return y.push(h),T=w.getQBSplinePoints(T),y=w.getQBSplinePoints(y),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(T.concat(a,y.reverse()))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("attack_arrow");var Le=vr;var X=Math.PI/2,wr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15,this._state=d.INITIALIZED}get type(){return g.getOverlayType("double_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getArrowPoints(e,t,r,s){let o=w.mid(e,t),a=w.distance(o,r),l=w.getThirdPoint(r,o,0,a*.3,!0),h=w.getThirdPoint(r,o,0,a*.5,!0);l=w.getThirdPoint(o,l,X,a/5,s),h=w.getThirdPoint(o,h,X,a/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),f=p[0],T=p[4],y=w.distance(e,t)/w.getBaseLength(c)/2,m=this._getArrowBodyPoints(c,f,T,y),E=m.length,x=m.slice(0,E/2),b=m.slice(E/2,E);return x.push(f),b.push(T),x=x.reverse(),x.push(t),b=b.reverse(),b.push(e),x.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,a=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,l,!0),p=w.getThirdPoint(s,h,X,o,!1),f=w.getThirdPoint(s,h,X,o,!0),T=w.getThirdPoint(s,c,X,a,!1),y=w.getThirdPoint(s,c,X,a,!0);return[T,p,s,f,y]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getTempPoint4(e,t,r){let s=w.mid(e,t),o=w.distance(s,r),a=w.getAngleOfThreePoints(e,s,r),l,h,c,p;return a<X?(h=o*Math.sin(a),c=o*Math.cos(a),p=w.getThirdPoint(e,s,X,h,!1),l=w.getThirdPoint(s,p,X,c,!0)):a>=X&&a<Math.PI?(h=o*Math.sin(Math.PI-a),c=o*Math.cos(Math.PI-a),p=w.getThirdPoint(e,s,X,h,!1),l=w.getThirdPoint(s,p,X,c,!1)):a>=Math.PI&&a<Math.PI*1.5?(h=o*Math.sin(a-Math.PI),c=o*Math.cos(a-Math.PI),p=w.getThirdPoint(e,s,X,h,!0),l=w.getThirdPoint(s,p,X,c,!0)):(h=o*Math.sin(Math.PI*2-a),c=o*Math.cos(Math.PI*2-a),p=w.getThirdPoint(e,s,X,h,!0),l=w.getThirdPoint(s,p,X,c,!1)),l}_getHierarchy(){let e=this._positions.length,t,r,s=_.parsePolygonCoordToArray(this._positions)[0],o=s[0],a=s[1],l=s[2];e===3?t=this._getTempPoint4(o,a,l):t=s[3],e===3||e===4?r=w.mid(o,a):r=s[4];let h,c;w.isClockWise(o,a,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,a,l,!0)):(h=this._getArrowPoints(a,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,f=(p-5)/2,T=h.slice(0,f),y=h.slice(f,f+5),m=h.slice(f+5,p),E=c.slice(0,f),x=c.slice(f,f+5),b=c.slice(f+5,p);E=w.getBezierPoints(E);let I=w.getBezierPoints(b.concat(T.slice(1)));return m=w.getBezierPoints(m),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(E.concat(x,I,y,m))))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("double_arrow");var qe=wr;var Ll=Math.PI/2,Tr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.tailWidthFactor=.15,this.neckWidthFactor=.2,this.headWidthFactor=.25,this.headAngle=Math.PI/8.5,this.neckAngle=Math.PI/13,this._state=d.INITIALIZED}get type(){return g.getOverlayType("fine_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0],t=e[0],r=e[1],s=w.getBaseLength(e),o=s*this.tailWidthFactor,a=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=w.getThirdPoint(r,t,Ll,o,!0),c=w.getThirdPoint(r,t,Ll,o,!1),p=w.getThirdPoint(t,r,this.headAngle,l,!1),f=w.getThirdPoint(t,r,this.headAngle,l,!0),T=w.getThirdPoint(t,r,this.neckAngle,a,!1),y=w.getThirdPoint(t,r,this.neckAngle,a,!0);return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions([h,T,p,r,f,y,c])))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("fine_arrow");var Xe=Tr;var dd=Math.PI/2,Rl=100,Cr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polygon:{}}),this.t=.4,this._state=d.INITIALIZED}get type(){return g.getOverlayType("gathering_place")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.parsePolygonCoordToArray(this._positions)[0];if(this._positions.length===2){let a=w.mid(e[0],e[1]),l=w.distance(e[0],a)/.9,h=w.getThirdPoint(e[0],a,dd,l,!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 a=0;a<e.length-2;a++){let l=e[a],h=e[a+1],c=e[a+2],p=w.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1];o.push(l);for(let c=0;c<=Rl;c++){let p=w.getCubicValue(c/Rl,l,r[a*2],r[a*2+1],h);o.push(p)}o.push(h)}return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(o)))}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("gathering_place");var Je=Cr;var xr=class extends Le{constructor(e){super(e),this._delegate=new i.Cesium.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=d.INITIALIZED}get type(){return g.getOverlayType("tailed_attack_arrow")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._getHierarchy()}get positions(){return this._positions}_getHierarchy(){let e=_.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 o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r),p=w.getBaseLength(o),f=p*this.tailWidthFactor*this.swallowTailFactor,T=w.getThirdPoint(o[1],o[0],0,f,!0),y=c/p,m=this._getArrowBodyPoints(o,l,h,y),E=m.length,x=[t].concat(m.slice(0,E/2));x.push(l);let b=[r].concat(m.slice(E/2,E));return b.push(h),x=w.getQBSplinePoints(x),b=w.getQBSplinePoints(b),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(x.concat(a,b.reverse(),[T,x[0]]))))}};g.registerType("tailed_attack_arrow");var Ke=xr;var Er=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._delegate={position:void 0,image:void 0,width:0,height:0},this._state=d.INITIALIZED}get type(){return g.getOverlayType("billboard_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.image=this._icon}get icon(){return this._icon}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}get size(){return this._size}_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,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("billboard_primitive");var Qe=Er;var Ol={maxOffsetY:10,offsetAmount:.1},Pr=class extends Qe{constructor(e,t){super(e,t),this._currentOffset=new i.Cesium.Cartesian2(0,0),this._isUp=!0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("bounce_billboard_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||Ol.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||Ol.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.Cesium.destroyObject(this)}};g.registerType("bounce_billboard_primitive");var br=Pr;var Sr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._text=t,this._delegate={position:void 0,text:void 0},this._state=d.INITIALIZED}get type(){return g.getOverlayType("label_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.text=this._text}get text(){return 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,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("label_primitive");var $e=Sr;var kl={maxOffsetY:10,offsetAmount:.1},Ir=class extends $e{constructor(e,t){super(e,t),this._currentOffset=new i.Cesium.Cartesian2(0,0),this._isUp=!0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("bounce_label_primitive")}update(e){var s,o;if(!this._show)return;let t=((s=this._style)==null?void 0:s.maxOffsetY)||kl.maxOffsetY,r=((o=this._style)==null?void 0:o.offsetAmount)||kl.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.Cesium.destroyObject(this)}};g.registerType("bounce_label_primitive");var Mr=Ir;var Ar=class extends g{constructor(e){super(),this._position=_.parsePosition(e),this._delegate={position:void 0,scale:{x:12,y:8}},this._state=d.INITIALIZED}get type(){return g.getOverlayType("cloud_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("cloud_primitive");var Dr=Ar;var md={minRadius:10,minHeight:30,color:i.Cesium.Color.RED,slices:128,speed:10},Lr=class extends g{constructor(e,t,r){super(),this._center=_.parsePosition(e),this._delegate=void 0,this._height=r,this._radius=t,this._currentHeight=r||0,this._currentRadius=10,this._style={...md},this._state=d.INITIALIZED}get type(){return g.getOverlayType("diffuse_wall_primitive")}set center(e){this._center=_.parsePosition(e)}get center(){return this._center}set radius(e){this._radius=e}get radius(){return this._radius}set height(e){this._height=e}get height(){return this._height}_getPositions(){let e=[],t=i.Cesium.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._center));for(let r=0;r<this._style.slices;r++){let s=r/this._style.slices*i.Cesium.Math.TWO_PI,o=Math.cos(s),a=Math.sin(s),l=new i.Cesium.Cartesian3(o*this._currentRadius,a*this._currentRadius,0);e.push(i.Cesium.Matrix4.multiplyByPoint(t,l,new i.Cesium.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.Cesium.WallGeometry({positions:t,minimumHeights:this._getHeights(t.length,0),maximumHeights:this._getHeights(t.length,this._currentHeight)});this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:r}),appearance:new i.Cesium.MaterialAppearance({material:i.Cesium.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:(v.merge(this._style,e),this)}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("diffuse_wall_primitive");var Rr=Lr;var Or=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("elec_ellipsoid_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.geometryInstances.modelMatrix=i.Cesium.Transforms.eastNorthUpToFixedFrame(u.transformWGS84ToCartesian(this._position))}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry=new i.Cesium.EllipsoidGeometry({radii:this._radius,maximumCone:i.Cesium.Math.PI_OVER_TWO})}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("EllipsoidElectric",{color:((e=this._style)==null?void 0:e.color)||i.Cesium.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:(v.merge(this._style,e),this._setAppearance(),this)}};g.registerType("elec_ellipsoid_primitive");var kr=Or;var Fr=class extends g{constructor(e,t=1){super(),this._positions=_.parsePositions(e),this._width=t,this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("flow_line_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._delegate.appearance=new i.Cesium.PolylineMaterialAppearance({material:i.Cesium.Material.fromType("PolylineFlow",{color:((e=this._style)==null?void 0:e.color)||new i.Cesium.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:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("flow_line_primitive");var zr=Fr;var Fl="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAEACAYAAADSoXR2AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkI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AQhAAAIQoM770UgBXARCIr/koDogVlzgrWuxemBKd0m4JnBed0+5ZQ9gn3BK5LK+P4y5ewoB8DFiKO91COLFfwVuTCZV1hSoYw1APZCsFIkbN1Haaa87wwiKQe6eT27AEX6esPVVd8/kOOdAz/oz9FE0p+uGIKUeqE5C8xgSKiICEIAABCAAAQhAAAIQgAAEIAABCECA6AA+sbkREyDUUYlKD6ggZwzRkr8tewBhusisv+0in5qE/hFchoZTE0TL4p8sTbtIpyahQ4Ag5fKpSVBmfdDECvQTZjoM0U9N6KgkwH9xY7PXpPiCmq5yuaLVldHIO7jgNi5XfOEhCqNh9udHV/RnC5YAUDTftdV4/ivvwEoRVS9XXPWa1FIT5ird8jpSB+BDN3rO8AaGMnGy0I0QRYTvdk6NkOsucuhGCMAgI8Q0isaHbmAevNMhiD4P6iZhstANGiQE2PEGCRo2NcgAsQDwKnxWFdlT17/duWU1BJmuHz6A5bwbEsCScgh+qAHit3Jr1oooOPExdRBLbeJjSpuwuy30AAH+CDAAPH5ltESNYl4AAAAASUVORK5CYII=";var ud={color:i.Cesium.Color.ORANGE},Hr=class extends g{constructor(e,t,r,s){super(),this._center=_.parsePosition(e),this._length=t||100,this._topRadius=r||1,this._bottomRadius=s||50,this._delegate=new i.Cesium.PrimitiveCollection,this._style={...ud},this._state=d.INITIALIZED}get type(){return g.getOverlayType("light-cylinder-primitive")}set center(e){this._center=_.parsePosition(e),this._updatePrimitives()}get center(){return this._center}set length(e){this._length=e,this._updatePrimitives()}get length(){return this._length}set topRadius(e){this._topRadius=e,this._updatePrimitives()}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=e,this._updatePrimitives()}get bottomRadius(){return this._bottomRadius}_computeEllipsePositions(e,t){let r=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(e),semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0),s=i.Cesium.Cartesian3.unpackArray(r.outerPositions);return s.push(s[0]),s}_createCylinderInstance(e,t,r){let s=t.slice(),o=t.length,a=2*o,l=[],h=1/(o-1),c=[],p=[],f=(y,m=0)=>{let E=i.Cesium.Cartographic.fromCartesian(y);return E.height+=m,i.Cesium.Cartographic.toCartesian(E)};for(let y=0;y<o;y++){p.push(f(e[y],r)),l.push(y*h,0);let m=y+1,E=(y+1)%o,x=a-m;c.push(x-1,x,y),c.push(y,E,x-1)}for(let y in p)s.push(p[o-y-1]),l.push(1-y*h,1);let T=i.Cesium.PolygonGeometry.createGeometry(new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(s),perPositionHeight:!0}));return T.indices=c,T.attributes.st.values=l,new i.Cesium.GeometryInstance({geometry:T})}_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),o={geometryInstances:new i.Cesium.GeometryInstance({geometry:new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(this._computeEllipsePositions(this._center,this._bottomRadius*2)),perPositionHeight:!e}),asynchronous:!1})},a=e?new i.Cesium.GroundPrimitive(o):new i.Cesium.Primitive(o);a.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CircleRingType,{color:this._style.color})});let l=e?new i.Cesium.GroundPrimitive(o):new i.Cesium.Primitive(o);l.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CircleRotateType,{color:this._style.color,image:this._getCircleImage()})});let h=new i.Cesium.Primitive({geometryInstances:this._createCylinderInstance(t,r,this._length),appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.Material.CylinderFadeType,{color:this._style.color})}),asynchronous:!1});e?i.Cesium.GroundPrimitive.initializeTerrainHeights().then(()=>{this._delegate.add(a),this._delegate.add(l),this._delegate.add(h)}):(this._delegate.add(a),this._delegate.add(l),this._delegate.add(h)),i.Cesium.Resource.fetchImage({url:Fl}).then(c=>{let p=new i.Cesium.Primitive({geometryInstances:this._createCylinderInstance(t,s,this._length),appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType(i.Cesium.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:(v.merge(this._style,e),this)}destroy(){return i.Cesium.destroyObject(this)}};g.registerType("light-cylinder-primitive");var Nr=Hr;var Wr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._modelUrl=t,this._delegate=i.Cesium.Model.fromGltfAsync({url:t}),this._modelEvent=new Mi(this._delegate),this._state=d.INITIALIZED}get type(){return g.getOverlayType("model_primitive")}set position(e){this._position=_.parsePosition(e);let t=u.transformWGS84ToCartesian(this._position);this._delegate.then(r=>{r.modelMatrix=i.Cesium.Transforms.headingPitchRollToFixedFrame(t,new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))})}get position(){return this._position}set modelUrl(e){this._modelUrl=e,this._delegate=i.Cesium.Model.fromGltfAsync({url:e,...this._style}),this.position=this._position}get modelUrl(){return this._modelUrl}_mountedHook(){this.position=this._position}setStyle(e){return!e||Object.keys(e).length===0?this:(v.merge(this._style,e),this._delegate.then(t=>{v.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}};g.registerType("model_primitive");var Gr=Wr;var zl={pixelSize:8,outlineColor:i.Cesium.Color.BLUE,outlineWidth:2},Ur=class extends g{constructor(e){super(),this._position=_.parsePosition(e),this._delegate={position:void 0},this._state=d.INITIALIZED}get type(){return g.getOverlayType("point_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate,zl,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate,zl,this._style),this)}};g.registerType("point_primitive");var Br=Ur;var Vr=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate={positions:[]},this._state=d.INITIALIZED}get type(){return g.getOverlayType("polyline_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return _e(this._positions)}get distance(){return Q(this._positions)}_mountedHook(){this.positions=this._positions}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate,e),this)}};g.registerType("polyline_primitive");var jr=Vr;var Yr=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t,this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("scan_circle_primitive")}set position(e){this._position=_.parsePosition(e),this._delegate.geometryInstances.geometry=new i.Cesium.EllipseGeometry({center:u.transformWGS84ToCartesian(this._position),semiMajorAxis:this._radius,semiMinorAxis:this._radius})}get position(){return this._position}set radius(e){this._radius=e,this._delegate.geometryInstances.geometry.semiMajorAxis=this._radius,this._delegate.geometryInstances.geometry.semiMinorAxis=this._radius}get radius(){return this._radius}_setAppearance(){var e,t;this._style&&(this._delegate.appearance=new i.Cesium.MaterialAppearance({material:i.Cesium.Material.fromType("CircleScan",{color:((e=this._style)==null?void 0:e.color)||i.Cesium.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:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("scan_circle_primitive");var Zr=Yr;var qr=class extends g{constructor(e,t=1){super(),this._positions=_.parsePositions(e),this._width=t,this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("trail_line_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolylineGeometry({positions:u.transformWGS84ArrayToCartesianArray(this._positions),width:this._width})}get positions(){return this._positions}_setAppearance(){var e,t;this._delegate.appearance=new i.Cesium.PolylineMaterialAppearance({material:i.Cesium.Material.fromType("PolylineTrail",{color:((e=this._style)==null?void 0:e.color)||new i.Cesium.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:(v.merge(this._style,e),e.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("trail_line_primitive");var Xr=qr;var Jr=class extends g{constructor(e,t){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})}),this._video=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("video_primitive")}set positions(e){var t,r,s,o;this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=i.Cesium.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:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}set video(e){this._video=e,this._setAppearance()}get video(){return this._video}_setAppearance(){this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.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:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this)}};g.registerType("video_primitive");var Kr=Jr;var Qr=class extends g{constructor(e,t=[]){super(),this._positions=_.parsePositions(e),this._holes=t.map(r=>_.parsePositions(r)),this._delegate=new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("water_primitive")}set positions(e){var t,r,s,o;this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(a=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(a)))),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:(o=this._style)==null?void 0:o.closeBottom,vertexFormat:i.Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT})}get positions(){return this._positions}_setAppearance(){var e,t,r,s,o,a,l,h;this._style&&(this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:i.Cesium.Material.fromType("Water",{baseWaterColor:((e=this._style)==null?void 0:e.baseWaterColor)||new i.Cesium.Color(.2,.3,.6,1),blendColor:((t=this._style)==null?void 0:t.blendColor)||new i.Cesium.Color(0,1,.699,1),specularMap:((r=this._style)==null?void 0:r.specularMap)||i.Cesium.Material.DefaultImageId,normalMap:((s=this._style)==null?void 0:s.normalMap)||i.Cesium.Material.DefaultImageId,frequency:((o=this._style)==null?void 0:o.frequency)||1e3,animationSpeed:((a=this._style)==null?void 0:a.animationSpeed)||.01,amplitude:((l=this._style)==null?void 0:l.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:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("water_primitive");var $r=Qr;var es=class extends g{constructor(e,t=[]){super(),this._positions=_.parsePositions(e),this._holes=t.map(r=>_.parsePositions(r)),this._delegate=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),asynchronous:!0}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("reflection_water_primitive")}set positions(e){this._positions=_.parsePositions(e),this._delegate.geometryInstances.geometry=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(this._positions),this._holes.map(t=>new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(t)))),perPositionHeight:!0})}get positions(){return this._positions}_setAppearance(){var e,t,r,s;this._style&&(this._delegate.appearance=new i.Cesium.EllipsoidSurfaceAppearance({material:new i.Cesium.Material({fabric:{type:"ReflectionWaterPlane",uniforms:{image:"",waterNormal:new i.Cesium.Cartesian3,fadeFactor:1,normalMap:((e=this._style)==null?void 0:e.normalMap)||i.Cesium.Material.DefaultImageId,fresnelParams:new i.Cesium.Cartesian3(.8,1,5),specularMap:"czm_defaultImage",baseWaterColor:i.Cesium.Color.fromCssColorString("rgba(45, 95, 146, 1.0)"),blendColor:new i.Cesium.Color,frequency:2e3,animationSpeed:((t=this._style)==null?void 0:t.animationSpeed)||.01,amplitude:((r=this._style)==null?void 0:r.amplitude)||5,specularIntensity:((s=this._style)==null?void 0:s.specularIntensity)||.8},source:`
15769
15769
  uniform sampler2D image;
15770
15770
  uniform vec3 waterNormal;
15771
15771
  uniform vec3 fresnelParams; // x\u4E3A\u6700\u5C0F\u53CD\u5C04\u7CFB\u6570\uFF0Cy\u4E3A\u6700\u5927\u53CD\u5C04\u7CFB\u6570\uFF0Cz\u4E3A\u89C6\u7EBF\u56E0\u5B50
@@ -15824,21 +15824,21 @@ var GM=(()=>{var Zd=Object.create;var Ve=Object.defineProperty;var qd=Object.get
15824
15824
  material.shininess = 10.0;
15825
15825
  return material;
15826
15826
  }
15827
- `}})}))}_calcCenterPoint(e,t=0){let r=new Cartesian3;e.forEach(o=>{Cartesian3.add(r,o,r)});let s=Cartesian3.multiplyByScalar(r,1/e.length,r);if(t){let o=Cartographic.fromCartesian(s),a=new Cartographic(o.longitude,o.latitude,t);s=Cartographic.toCartesian(a)}return s}_getMirrorCamera(e,t,r){let s=Cartesian3.subtract(r,e.position,new Cartesian3),o=-Cartesian3.dot(t,s),a=Cartesian3.multiplyByScalar(t,2*o,new Cartesian3),l=Cartesian3.subtract(e.position,a,new Cartesian3),h=Cartesian3.dot(t,e.directionWC),c=Cartesian3.multiplyByScalar(t,2*h,new Cartesian3),d=Cartesian3.subtract(e.directionWC,c,new Cartesian3);Cartesian3.normalize(d,d);let f=Cartesian3.dot(t,e.upWC),T=Cartesian3.multiplyByScalar(t,2*f,new Cartesian3),y=Cartesian3.subtract(e.upWC,T,new Cartesian3),m=i.Cesium.Camera.clone(e);return m.position=l,m.up=y,m.direction=d,m.right=Cartesian3.cross(y,d,new Cartesian3),m}_renderToFbo(e,t,r){let s=t._frameState;t.globe.show=!1;let o=t.context,a=o.uniformState,l=t._defaultView.camera;t._defaultView.camera=r;let h=t._defaultView;t._view=h,t.updateFrameState(),s.passes.render=!0,s.passes.postProcess=t.postProcessStages.hasSelected;let c=new i.Cesium.Cesium3DTilePassState({pass:i.Cesium.Cesium3DTilePass.RENDER});s.tilesetPassState=c;let d=i.Cesium.defaultValue(t.backgroundColor,i.Cesium.Color.BLACK);s.backgroundColor=d,s.atmosphere=t.atmosphere,t.fog.update(s),a.update(s),t._computeCommandList.length=0,t._overlayCommandList.length=0;let f=h.viewport;f.x=0,f.y=0,f.width=o.drawingBufferWidth,f.height=o.drawingBufferHeight;let T=h.passState;T.framebuffer=e,T.blendingEnabled=void 0,T.scissorTest=void 0,T.viewport=i.Cesium.BoundingRectangle.clone(f,T.viewport),t.updateEnvironment(),t.updateAndExecuteCommands(T,d),t.resolveFramebuffers(T),T.framebuffer=void 0,o.endFrame(),t.globe.show=!0,t._defaultView.camera=l}_clipAnyModel(e,t,r){let s=null,o=null;if(e instanceof Cesium3DTileset)o=e,s=Matrix4.multiply(o.modelMatrix,o.root.transform,new Matrix4),Matrix4.inverse(s,s);else if(e instanceof Model)o=e,s=Matrix4.inverse(o.modelMatrix,new Matrix4);else{if(!e.model)return;s=Transforms.eastNorthUpToFixedFrame(e.position.getValue(new i.Cesium.JulianDate)),Matrix4.inverse(s,s),o=e.model}let a=new ClippingPlaneCollection,l=Plane.fromPointNormal(t,r),h=Plane.transform(l,s);return a.add(h),o.clippingPlanes=a,a}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("water_primitive");var ts=es;var is=class n extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({billboard:{}}),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._state=p.INITIALIZED}get type(){return g.getOverlayType("billboard")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}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}get size(){return this._size}_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,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}static fromEntity(e){var o;let t,r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return e.billboard&&(t=new n(s,e.billboard.image.getValue(r)),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)}),t}};g.registerType("billboard");var ge=is;var rs=class extends g{constructor(e,t,r,s){super(),this._position=_.parsePosition(e),this._length=t,this._width=r,this._height=s,this._delegate=new i.Cesium.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("box")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}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 length(){return this._length}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 width(){return this._width}set height(e){let t=this._delegate.box.dimensions.getValue();this._height=e||0,t.z=+this._height,this._delegate.box.dimensions.setValue(t)}get height(){return this._height}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.box,e),this)}};g.registerType("box");var ss=rs;var os=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({polygon:{}}),this._center=_.parsePosition(e),this._radius=+t||0,this._rotateAmount=0,this._stRotation=0,this._state=p.INITIALIZED}get type(){return g.getOverlayType("circle")}set center(e){this._center=_.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get center(){return this._center}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new i.Cesium.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),i.Cesium.Math.toRadians(this._stRotation)),!1)}get rotateAmount(){return this._rotateAmount}_computeHierarchy(){let e=new i.Cesium.PolygonHierarchy,t=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),r=i.Cesium.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,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("circle");var et=os;var as=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({corridor:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("corridor")}set positions(e){this._positions=_.parsePositions(e),this._delegate.corridor.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.corridor,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("corridor");var ns=as;var ls=class extends g{constructor(e,t,r,s){super(),this._position=_.parsePosition(e),this._length=+t||0,this._topRadius=+r||0,this._bottomRadius=+s||0,this._delegate=new i.Cesium.Entity({cylinder:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("cylinder")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get length(){return this._length}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}get bottomRadius(){return 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,v.merge(this._style,e),v.merge(this._delegate.cylinder,e),this)}};g.registerType("cylinder");var hs=ls;var cs=class extends g{constructor(e,t,r){super(),this._position=_.parsePosition(e),this._semiMajorAxis=+t||0,this._semiMinorAxis=+r||0,this._delegate=new i.Cesium.Entity({ellipse:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("ellipse")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMajorAxis(){return this._semiMajorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}get semiMinorAxis(){return 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,v.merge(this._style,e),v.merge(this._delegate.ellipse,e),this)}};g.registerType("ellipse");var ds=cs;var ps=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Cesium.Entity({ellipsoid:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("sphere")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}get radius(){return this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,v.merge(this._style,e),v.merge(this._delegate.ellipsoid,e),this)}};g.registerType("ellipsoid");var ms=ps;var us=class n extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({label:{}}),this._position=_.parsePosition(e),this._text=t,this._state=p.INITIALIZED}get type(){return g.getOverlayType("label")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return 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.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}static fromEntity(e){var o;let t=i.Cesium.JulianDate.now(),r=u.transformCartesianToWGS84(e.position.getValue(t)),s;return e.billboard&&(s=new n(r,e.name),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(t)}),s}};g.registerType("label");var tt=us;var _s=class extends g{constructor(e,t,r,s={}){if(super(),this._position=_.parsePosition(e),this._width=+t||100,this._height=+r||100,s.normal&&typeof s.normal=="string"){let o=String(s.normal).toLocaleUpperCase();s.normal=o==="X"?i.Cesium.Cartesian3.UNIT_X:o==="Y"?i.Cesium.Cartesian3.UNIT_Y:i.Cesium.Cartesian3.UNIT_Z}else s.normal=i.Cesium.Cartesian3.UNIT_Z;this._normal=s.normal,this._distance=s.distance||0,this._delegate=new i.Cesium.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new i.Cesium.Plane(this._normal,this._distance)}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("plane")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set width(e){let t=this._delegate.plane.dimensions.getValue();this._width=+e||0,t.x=this._width}get width(){return this._width}set height(e){let t=this._delegate.plane.dimensions.getValue();this._height=+e||0,t.y=this._height}get height(){return this._height}set distance(e){let t=this._delegate.plane.dimensions.getValue();this._distance=e,t.distance=e}get distance(){return this._distance}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],v.merge(this._style,e),v.merge(this._delegate.plane,e),this)}};g.registerType("plane");var fs=_s;var Hl={pixelSize:8,outlineColor:i.Cesium.Color.BLUE,outlineWidth:2},gs=class n extends g{constructor(e){super(),this._delegate=new i.Cesium.Entity({point:{}}),this._position=_.parsePosition(e),this._state=p.INITIALIZED}get type(){return g.getOverlayType("point")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate.point,Hl,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate.point,Hl,this._style),this)}static fromEntity(e){var o;let t,r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return t=new n(s),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)},t}};g.registerType("point");var it=gs;var ys=class n extends g{constructor(e){super(),this._delegate=new i.Cesium.Entity({polygon:{}}),this._positions=_.parsePositions(e),this._holes=[],this._state=p.INITIALIZED}get type(){return g.getOverlayType("polygon")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get positions(){return this._positions}set holes(e){e&&e.length&&(this._holes=e.map(t=>_.parsePositions(t)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get holes(){return this._holes}get center(){return _e([...this._positions,this._positions[0]])}get area(){return ue(this._positions)}_computeHierarchy(){let e=new i.Cesium.PolygonHierarchy;return e.positions=u.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(t=>new i.Cesium.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,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polygon){let o=u.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(r).positions);t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polygon");var ye=ys;var vs=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polyline:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("polyline")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polyline.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return _e(this._positions)}get distance(){return Q(this._positions)}_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,v.merge(this._style,e),v.merge(this._delegate.polyline,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polyline");var ve=vs;var ws=class n extends g{constructor(e,t){super(),this._positions=_.parsePositions(e),this._shape=t||[],this._delegate=new i.Cesium.Entity({polylineVolume:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("polyline_volume")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polylineVolume.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}get shape(){return this._shape}_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&&delete e.shape,v.merge(this._style,e),v.merge(this._delegate.polylineVolume,e),this)}static fromEntity(e,t){var o;let r,s=i.Cesium.JulianDate.now();if(e.polyline){let a=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));r=new n(a,t),r.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return r}};g.registerType("polyline_volume");var Ts=ws;var Cs=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({rectangle:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("rect")}set positions(e){this._positions=_.parsePositions(e),this._delegate.rectangle.coordinates=i.Cesium.Rectangle.fromCartesianArray(u.transformWGS84ArrayToCartesianArray(this._positions))}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){let r=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=i.Cesium.Cartographic.toCartesian(i.Cesium.Rectangle.center(r,new i.Cesium.Cartographic)),this._delegate.label={...t,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.rectangle,e),this)}};g.registerType("rect");var rt=Cs;var xs=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({wall:{}}),this._state=p.INITIALIZED}get type(){return g.getOverlayType("wall")}set positions(e){this._positions=_.parsePositions(e),this._delegate.wall.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.wall,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("wall");var Es=xs;var Ps=class extends P{constructor(e,t,r={}){if(!t)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=i.Cesium.GeoJsonDataSource.load(t,r),this._state=p.INITIALIZED}get type(){return P.getLayerType("geojson")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return ge.fromEntity(e)}_createPolyline(e){if(e.polyline)return ve.fromEntity(e)}_createPolygon(e){if(e.polygon)return ye.fromEntity(e)}_createModel(e,t){if(e)return De.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new ce(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 ce(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};P.registerType("geojson");var st=Ps;var bs=class extends P{constructor(e,t,r={}){if(!t)throw new Error("Shp2JsonLayer\uFF1Athe url invalid");if(!me("shpUtil"))throw new Error("miss the shpUtil lib");super(e);let o=this._init(t,r);this._delegate=i.Cesium.GeoJsonDataSource.load(o,r),this._state=p.INITIALIZED}async _init(e,t){var s;return await shpUtil.toGeoJSON(e,void 0,(s=t.encoding)!=null?s:"gbk",t.crs)}get type(){return P.getLayerType("shp")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return ge.fromEntity(e)}_createPolyline(e){if(e.polyline)return ve.fromEntity(e)}_createPolygon(e){if(e.polygon)return ye.fromEntity(e)}_createModel(e,t){if(e)return De.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new ce(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 ce(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};P.registerType("shp");var Ss=bs;var Is=class extends P{constructor(e,t,r={}){if(!t)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=i.Cesium.KmlDataSource.load(t,r),this._state=p.INITIALIZED}get type(){return P.getLayerType("gpx")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("gpx");var Ms=Is;var _p={radialColor:i.Cesium.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:i.Cesium.Color.YELLOW,weftColor:i.Cesium.Color.WHITE,weftWidth:2},As=class extends P{constructor(e,t){super(e),this._options={..._p,...t},this._delegate=new i.Cesium.CustomDataSource(e),this._state=p.INITIALIZED}get type(){return P.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:i.Cesium.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.Cesium.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.Cesium.Cartesian3.fromDegreesArray(t),material:this._options.weftColor,width:this._options.weftWidth}})}}};P.registerType("graticule");var Ds=As;var Ls=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._isGround=!0,this._state=p.INITIALIZED}get type(){return P.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=p.CLEARED,this}};P.registerType("ground_primitive");var Rs=Ls;var Os=class extends P{constructor(e){super(e),this._delegate=S.create("div","html-layer",void 0),this._delegate.setAttribute("id",this._id),this._renderRemoveCallback=void 0,this._state=p.INITIALIZED}get type(){return P.getLayerType("html")}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})}get show(){return this._show}_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,o=this._viewer.getOffset();this.eachOverlay(a=>{if(a&&a.position){let l=u.transformWGS84ToCartesian(a.position),h=t.globe.ellipsoid.geodeticSurfaceNormal(l,new i.Cesium.Cartesian3),c=i.Cesium.SceneTransforms.worldToWindowCoordinates(t,l);c&&(c.x+=o.x,c.y+=o.y),a._updateStyle(c,i.Cesium.Cartesian3.distance(l,r),i.Cesium.Cartesian3.dot(s,h)<=0)}},this)},this),this._state=p.ADDED}_onRemove(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._delegate),this._state=p.REMOVED}clear(){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);return this._cache={},this._state=p.CLEARED,this}};P.registerType("html");var ks=Os;var Fs=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._state=p.INITIALIZED}get type(){return P.getLayerType("i3s")}clear(){return this._delegate.removeAll(),this._cache={},this._state=p.CLEARED,this}};P.registerType("i3s");var zs=Fs;var Hs=class extends P{constructor(e,t,r={}){if(!t)throw new Error("KmlLayer: the url is empty");super(e),this._delegate=i.Cesium.KmlDataSource.load(t,r),this._state=p.INITIALIZED}get type(){return P.getLayerType("kml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("kml");var Ns=Hs;var Ws=class extends P{constructor(e,t=""){super(e),this._dataSource=i.Cesium.GeoJsonDataSource.load(t),this._delegate=new i.Cesium.CustomDataSource(e),this._initLabel(),this._state=p.INITIALIZED}get type(){return P.getLayerType("label")}_createLabel(e){if(e.position&&e.name)return tt.fromEntity(e)}_initLabel(){this._dataSource.then(e=>{e.entities.values.forEach(r=>{let s=this._createLabel(r);this.addOverlay(s)})})}};P.registerType("label");var Gs=Ws;var Us=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._points=this._delegate.add(new i.Cesium.PointPrimitiveCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._polylines=this._delegate.add(new i.Cesium.PolylineCollection),this._clouds=this._delegate.add(new i.Cesium.CloudCollection),this._state=p.INITIALIZED}get type(){return P.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.Cesium.PointPrimitiveCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._polylines=this._delegate.add(new i.Cesium.PolylineCollection),this._clouds=this._delegate.add(new i.Cesium.CloudCollection),this._cache={},this._state=p.CLEARED,this}};P.registerType("primitive");var Bs=Us;var Vs=class extends P{constructor(e,t,r){super(e),this._delegate=i.Cesium.ImageryLayer.fromProviderAsync(t,r),this._state=p.INITIALIZED}get type(){return P.getLayerType("raster-tile")}};P.registerType("raster-tile");var js=Vs;var Ys=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._state=p.INITIALIZED}get type(){return P.getLayerType("tileset")}clear(){return this._delegate.removeAll(),this._cache={},this._state=p.CLEARED,this}};P.registerType("tileset");var Zs=Ys;st.registerType("topojson");var qs=class extends P{constructor(e,t){if(!me("echarts"))throw new Error("miss the echarts lib");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=me("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=p.ADDED}_onRemove(){this._delegate&&this._viewer&&(this._chart.dispose(),this._viewer.layerContainer.removeChild(this._delegate),this._state=p.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}},Xs=qs;var{Cartesian3:vt,Ellipsoid:fp,Math:Nl}=i.Cesium;function Wl(n){function e(t){this._api=t,this._viewer=Object(t.getZr()).viewer,this._mapOffset=[0,0],this.dimensions=["lng","lat"]}return e.prototype.getViewer=function(){return this._viewer},e.prototype.setMapOffset=function(t){return this._mapOffset=t,this},e.prototype.dataToPoint=function(t){let r=[],s=vt.fromDegrees(t[0],t[1]);if(!s)return r;let o=fp.WGS84.geodeticSurfaceNormal(s,new vt),a=this._viewer.camera.direction;if(vt.dot(o,a)>=0)return r;let l=this._viewer.scene.cartesianToCanvasCoordinates(s);return l?[l.x-this._mapOffset[0],l.y-this._mapOffset[1]]:r},e.prototype.pointToData=function(t){let r=this._viewer.scene.globe.ellipsoid,s=new vt(t[0]+this._mapOffset[0],t[1]+this._mapOffset[1],0),o=r.cartesianToCartographic(s);return[Nl.toDegrees(o.longitude),Nl.toDegrees(o.latitude)]},e.prototype.getViewRect=function(){let t=this._api;return new n.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},e.prototype.getRoamTransform=function(){return n.matrix.create()},e.create=function(t,r){let s;t.eachComponent("GLMap",function(o){s=new e(r),s.setMapOffset(o.__mapOffset||[0,0]),o.coordinateSystem=s}),t.eachSeries(function(o){o.get("coordinateSystem")==="GLMap"&&(o.coordinateSystem=s)})},e.dimensions=["lng","lat"],e}function Gl(n){let{registerAction:e,registerCoordinateSystem:t,extendComponentModel:r,extendComponentView:s}=n;r({type:"GLMap",getViewer(){return Object(this.getZr()).viewer},defaultOption:{roam:!1}}),s({type:"GLMap",init:function(o,a){this.api=a,a.getZr().viewer.clock.onTick.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.getZr().dom.style.visibility!=="hidden"&&this.api.dispatchAction({type:"GLMapRoam"})},render:function(o,a,l){},dispose:function(){this.api.getZr().viewer.clock.onTick.removeEventListener(this.moveHandler,this)}}),t("GLMap",Wl(n)),e({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(o,a){})}var gp={LEFT_MIDDLE:0,LEFT_RIGHT:1},we=gp;var Js=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,o;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=(o=this._options.enableFxaa)!=null?o:!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.Cesium.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,o,a,l,h,c,d,f,T,y,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,t=this._options.globe;if(v.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:(o=t==null?void 0:t.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(a=t==null?void 0:t.depthTestAgainstTerrain)!=null?a:!1,tileCacheSize:+(t==null?void 0:t.tileCacheSize)||100,preloadSiblings:(l=t==null?void 0:t.preloadSiblings)!=null?l:!1,showSkirts:(h=t==null?void 0:t.showSkirts)!=null?h:!0,baseColor:(t==null?void 0:t.baseColor)||new i.Cesium.Color(0,0,.5,1),terrainExaggeration:(t==null?void 0:t.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(t==null?void 0:t.terrainExaggerationRelativeHeight)||0}),v.merge(e.translucency,{enabled:(d=(c=t==null?void 0:t.translucency)==null?void 0:c.enabled)!=null?d:!1,backFaceAlpha:+((f=t==null?void 0:t.translucency)==null?void 0:f.backFaceAlpha)||1,backFaceAlphaByDistance:(T=t==null?void 0:t.translucency)==null?void 0:T.backFaceAlphaByDistance,frontFaceAlpha:+((y=t==null?void 0:t.translucency)==null?void 0:y.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=t==null?void 0:t.translucency)==null?void 0:m.frontFaceAlphaByDistance}),t!=null&&t.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,x=E.sources.pop();E.sources.push(x.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${t.filterColor.toString()};`))}return this}_setCameraController(){var r,s,o,a,l,h,c;if(!((r=this._options)!=null&&r.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,t=this._options.cameraController;return v.merge(e,{enableInputs:(s=t==null?void 0:t.enableInputs)!=null?s:!0,enableRotate:(o=t==null?void 0:t.enableRotate)!=null?o:!0,enableTilt:(a=t==null?void 0:t.enableTilt)!=null?a:!0,enableTranslate:(l=t==null?void 0:t.enableTranslate)!=null?l:!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)}},Ks=Js;var Qs=class{constructor(e){this._viewer=e,this._mouseMode=0}setPitchRange(e,t){let r=new i.Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&(r.setInputAction(s=>{r.setInputAction(o=>{let a=!0,l=o.endPosition.y<o.startPosition.y;l&&this._viewer.camera.pitch>i.Cesium.Math.toRadians(t)||!l&&this._viewer.camera.pitch<i.Cesium.Math.toRadians(e)?a=!1:a=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=a},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?i.Cesium.ScreenSpaceEventType.MIDDLE_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN),r.setInputAction(s=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,r.removeInputAction(i.Cesium.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?i.Cesium.ScreenSpaceEventType.MIDDLE_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||we.LEFT_MIDDLE,e===we.LEFT_MIDDLE?(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.Cesium.CameraEventType.MIDDLE_DRAG,i.Cesium.CameraEventType.PINCH,{eventType:i.Cesium.CameraEventType.LEFT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL},{eventType:i.Cesium.CameraEventType.RIGHT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.Cesium.CameraEventType.RIGHT_DRAG,i.Cesium.CameraEventType.WHEEL,i.Cesium.CameraEventType.PINCH]):e===we.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.Cesium.CameraEventType.RIGHT_DRAG,i.Cesium.CameraEventType.PINCH,{eventType:i.Cesium.CameraEventType.LEFT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL},{eventType:i.Cesium.CameraEventType.RIGHT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.Cesium.CameraEventType.WHEEL,i.Cesium.CameraEventType.PINCH])}},$s=Qs;var yp={},eo=yp;var to=class{constructor(){this._viewer=void 0,this._enable=!1,this._wrapper=void 0,this._ready=!1}set enable(e){this._enable!==e&&(this._enable=e,this._state=this._enable?p.ENABLED:p.DISABLED,this._enableHook&&this._enableHook())}get enable(){return this._enable}get state(){return this._state}_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=p.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=`
15827
+ `}})}))}_calcCenterPoint(e,t=0){let s=e.map(l=>`${l.lng},${l.lat},${l.alt}`).join(",").split(",").map(l=>parseFloat(l));e=i.Cesium.Cartesian3.fromDegreesArrayHeights(s);let o=new i.Cesium.Cartesian3;e.forEach(l=>{i.Cesium.Cartesian3.add(o,l,o)});let a=i.Cesium.Cartesian3.multiplyByScalar(o,1/e.length,o);if(t){let l=i.Cesium.Cartographic.fromCartesian(a),h=new i.Cesium.Cartographic(l.longitude,l.latitude,t);a=i.Cesium.Cartographic.toCartesian(h)}return a}_getMirrorCamera(e,t,r){let s=Cartesian3.subtract(r,e.position,new Cartesian3),o=-Cartesian3.dot(t,s),a=Cartesian3.multiplyByScalar(t,2*o,new Cartesian3),l=Cartesian3.subtract(e.position,a,new Cartesian3),h=Cartesian3.dot(t,e.directionWC),c=Cartesian3.multiplyByScalar(t,2*h,new Cartesian3),p=Cartesian3.subtract(e.directionWC,c,new Cartesian3);Cartesian3.normalize(p,p);let f=Cartesian3.dot(t,e.upWC),T=Cartesian3.multiplyByScalar(t,2*f,new Cartesian3),y=Cartesian3.subtract(e.upWC,T,new Cartesian3),m=i.Cesium.Camera.clone(e);return m.position=l,m.up=y,m.direction=p,m.right=Cartesian3.cross(y,p,new Cartesian3),m}_renderToFbo(e,t,r){let s=t._frameState;t.globe.show=!1;let o=t.context,a=o.uniformState,l=t._defaultView.camera;t._defaultView.camera=r;let h=t._defaultView;t._view=h,t.updateFrameState(),s.passes.render=!0,s.passes.postProcess=t.postProcessStages.hasSelected;let c=new i.Cesium.Cesium3DTilePassState({pass:i.Cesium.Cesium3DTilePass.RENDER});s.tilesetPassState=c;let p=i.Cesium.defaultValue(t.backgroundColor,i.Cesium.Color.BLACK);s.backgroundColor=p,s.atmosphere=t.atmosphere,t.fog.update(s),a.update(s),t._computeCommandList.length=0,t._overlayCommandList.length=0;let f=h.viewport;f.x=0,f.y=0,f.width=o.drawingBufferWidth,f.height=o.drawingBufferHeight;let T=h.passState;T.framebuffer=e,T.blendingEnabled=void 0,T.scissorTest=void 0,T.viewport=i.Cesium.BoundingRectangle.clone(f,T.viewport),t.updateEnvironment(),t.updateAndExecuteCommands(T,p),t.resolveFramebuffers(T),T.framebuffer=void 0,o.endFrame(),t.globe.show=!0,t._defaultView.camera=l}_clipAnyModel(e,t,r){let s=null,o=null;if(e instanceof Cesium3DTileset)o=e,s=Matrix4.multiply(o.modelMatrix,o.root.transform,new Matrix4),Matrix4.inverse(s,s);else if(e instanceof Model)o=e,s=Matrix4.inverse(o.modelMatrix,new Matrix4);else{if(!e.model)return;s=Transforms.eastNorthUpToFixedFrame(e.position.getValue(new i.Cesium.JulianDate)),Matrix4.inverse(s,s),o=e.model}let a=new ClippingPlaneCollection,l=Plane.fromPointNormal(t,r),h=Plane.transform(l,s);return a.add(h),o.clippingPlanes=a,a}_mountedHook(){this.positions=this._positions,!this._delegate.appearance&&this._setAppearance()}setStyle(e){var t;return Object.keys(e).length===0?this:(v.merge(this._style,e),(t=this._style)!=null&&t.classificationType&&(this._delegate.classificationType=this._style.classificationType),this._setAppearance(),this)}};g.registerType("water_primitive");var ts=es;var is=class n extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({billboard:{}}),this._position=_.parsePosition(e),this._icon=t,this._size=[32,32],this._state=d.INITIALIZED}get type(){return g.getOverlayType("billboard")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set icon(e){this._icon=e,this._delegate.billboard.image=this._icon}get icon(){return this._icon}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}get size(){return this._size}_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,v.merge(this._style,e),v.merge(this._delegate.billboard,e),this)}static fromEntity(e){var o;let t,r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return e.billboard&&(t=new n(s,e.billboard.image.getValue(r)),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)}),t}};g.registerType("billboard");var ge=is;var rs=class extends g{constructor(e,t,r,s){super(),this._position=_.parsePosition(e),this._length=t,this._width=r,this._height=s,this._delegate=new i.Cesium.Entity({box:{dimensions:{x:+this._length,y:+this._width,z:+this._height}}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("box")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}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 length(){return this._length}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 width(){return this._width}set height(e){let t=this._delegate.box.dimensions.getValue();this._height=e||0,t.z=+this._height,this._delegate.box.dimensions.setValue(t)}get height(){return this._height}_mountedHook(){this.position=this._position}setStyle(e){return Object.keys(e).length===0?this:(delete e.length&&delete e.width&&delete e.height,v.merge(this._style,e),v.merge(this._delegate.box,e),this)}};g.registerType("box");var ss=rs;var os=class extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({polygon:{}}),this._center=_.parsePosition(e),this._radius=+t||0,this._rotateAmount=0,this._stRotation=0,this._state=d.INITIALIZED}get type(){return g.getOverlayType("circle")}set center(e){this._center=_.parsePosition(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get center(){return this._center}set radius(e){this._radius=+e,this._delegate.polygon.hierarchy=this._computeHierarchy()}get radius(){return this._radius}set rotateAmount(e){this._rotateAmount=+e,this._delegate.polygon.stRotation=new i.Cesium.CallbackProperty(()=>(this._stRotation+=this._rotateAmount,(this._stRotation>=360||this._stRotation<=-360)&&(this._stRotation=0),i.Cesium.Math.toRadians(this._stRotation)),!1)}get rotateAmount(){return this._rotateAmount}_computeHierarchy(){let e=new i.Cesium.PolygonHierarchy,t=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:u.transformWGS84ToCartesian(this._center),semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),r=i.Cesium.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,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}};g.registerType("circle");var et=os;var as=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({corridor:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("corridor")}set positions(e){this._positions=_.parsePositions(e),this._delegate.corridor.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.corridor,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("corridor");var ns=as;var ls=class extends g{constructor(e,t,r,s){super(),this._position=_.parsePosition(e),this._length=+t||0,this._topRadius=+r||0,this._bottomRadius=+s||0,this._delegate=new i.Cesium.Entity({cylinder:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("cylinder")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set length(e){this._length=+e||0,this._delegate.cylinder.length=this._length}get length(){return this._length}set topRadius(e){this._topRadius=+e||0,this._delegate.cylinder.topRadius=this._topRadius}get topRadius(){return this._topRadius}set bottomRadius(e){this._bottomRadius=+e||0,this._delegate.cylinder.bottomRadius=this._bottomRadius}get bottomRadius(){return 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,v.merge(this._style,e),v.merge(this._delegate.cylinder,e),this)}};g.registerType("cylinder");var hs=ls;var cs=class extends g{constructor(e,t,r){super(),this._position=_.parsePosition(e),this._semiMajorAxis=+t||0,this._semiMinorAxis=+r||0,this._delegate=new i.Cesium.Entity({ellipse:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("ellipse")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set semiMajorAxis(e){this._semiMajorAxis=+e||0,this._delegate.ellipse.semiMajorAxis=this._semiMajorAxis}get semiMajorAxis(){return this._semiMajorAxis}set semiMinorAxis(e){this._semiMinorAxis=+e||0,this._delegate.ellipse.semiMinorAxis=this._semiMinorAxis}get semiMinorAxis(){return 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,v.merge(this._style,e),v.merge(this._delegate.ellipse,e),this)}};g.registerType("ellipse");var ps=cs;var ds=class extends g{constructor(e,t){super(),this._position=_.parsePosition(e),this._radius=t||{x:10,y:10,z:10},this._delegate=new i.Cesium.Entity({ellipsoid:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("sphere")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set radius(e){this._radius=e||{x:10,y:10,z:10},this._delegate.ellipsoid.radii=this._radius}get radius(){return this._radius}_mountedHook(){this.position=this._position,this.radius=this._radius}setStyle(e){return Object.keys(e).length===0?this:(delete e.radius,v.merge(this._style,e),v.merge(this._delegate.ellipsoid,e),this)}};g.registerType("ellipsoid");var ms=ds;var us=class n extends g{constructor(e,t){super(),this._delegate=new i.Cesium.Entity({label:{}}),this._position=_.parsePosition(e),this._text=t,this._state=d.INITIALIZED}get type(){return g.getOverlayType("label")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}set text(e){this._text=e,this._delegate.label.text=this._text}get text(){return 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.text,v.merge(this._style,e),v.merge(this._delegate.label,e),this)}static fromEntity(e){var o;let t=i.Cesium.JulianDate.now(),r=u.transformCartesianToWGS84(e.position.getValue(t)),s;return e.billboard&&(s=new n(r,e.name),s.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(t)}),s}};g.registerType("label");var tt=us;var _s=class extends g{constructor(e,t,r,s={}){if(super(),this._position=_.parsePosition(e),this._width=+t||100,this._height=+r||100,s.normal&&typeof s.normal=="string"){let o=String(s.normal).toLocaleUpperCase();s.normal=o==="X"?i.Cesium.Cartesian3.UNIT_X:o==="Y"?i.Cesium.Cartesian3.UNIT_Y:i.Cesium.Cartesian3.UNIT_Z}else s.normal=i.Cesium.Cartesian3.UNIT_Z;this._normal=s.normal,this._distance=s.distance||0,this._delegate=new i.Cesium.Entity({plane:{dimensions:{x:this._width,y:this._height},plane:new i.Cesium.Plane(this._normal,this._distance)}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("plane")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position),this._delegate.orientation=i.Cesium.Transforms.headingPitchRollQuaternion(u.transformWGS84ToCartesian(this._position),new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._position.heading),i.Cesium.Math.toRadians(this._position.pitch),i.Cesium.Math.toRadians(this._position.roll)))}get position(){return this._position}set width(e){let t=this._delegate.plane.dimensions.getValue();this._width=+e||0,t.x=this._width}get width(){return this._width}set height(e){let t=this._delegate.plane.dimensions.getValue();this._height=+e||0,t.y=this._height}get height(){return this._height}set distance(e){let t=this._delegate.plane.dimensions.getValue();this._distance=e,t.distance=e}get distance(){return this._distance}_mountedHook(){this.position=this._position,this.distance=this._distance}setStyle(e){return Object.keys(e).length===0?this:(delete e.dimensions&&delete["plane"],v.merge(this._style,e),v.merge(this._delegate.plane,e),this)}};g.registerType("plane");var fs=_s;var Hl={pixelSize:8,outlineColor:i.Cesium.Color.BLUE,outlineWidth:2},gs=class n extends g{constructor(e){super(),this._delegate=new i.Cesium.Entity({point:{}}),this._position=_.parsePosition(e),this._state=d.INITIALIZED}get type(){return g.getOverlayType("point")}set position(e){this._position=_.parsePosition(e),this._delegate.position=u.transformWGS84ToCartesian(this._position)}get position(){return this._position}_mountedHook(){this.position=this._position,v.merge(this._delegate.point,Hl,this._style)}setStyle(e){return!e||Object.keys(e).length===0?this:(delete e.position,v.merge(this._style,e),v.merge(this._delegate.point,Hl,this._style),this)}static fromEntity(e){var o;let t,r=i.Cesium.JulianDate.now(),s=u.transformCartesianToWGS84(e.position.getValue(r));return t=new n(s),t.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(r)},t}};g.registerType("point");var it=gs;var ys=class n extends g{constructor(e){super(),this._delegate=new i.Cesium.Entity({polygon:{}}),this._positions=_.parsePositions(e),this._holes=[],this._state=d.INITIALIZED}get type(){return g.getOverlayType("polygon")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polygon.hierarchy=this._computeHierarchy()}get positions(){return this._positions}set holes(e){e&&e.length&&(this._holes=e.map(t=>_.parsePositions(t)),this._delegate.polygon.hierarchy=this._computeHierarchy())}get holes(){return this._holes}get center(){return _e([...this._positions,this._positions[0]])}get area(){return ue(this._positions)}_computeHierarchy(){let e=new i.Cesium.PolygonHierarchy;return e.positions=u.transformWGS84ArrayToCartesianArray(this._positions),e.holes=this._holes.map(t=>new i.Cesium.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,v.merge(this._style,e),v.merge(this._delegate.polygon,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polygon){let o=u.transformCartesianArrayToWGS84Array(e.polygon.hierarchy.getValue(r).positions);t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polygon");var ye=ys;var vs=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({polyline:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("polyline")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polyline.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}get center(){return _e(this._positions)}get distance(){return Q(this._positions)}_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,v.merge(this._style,e),v.merge(this._delegate.polyline,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("polyline");var ve=vs;var ws=class n extends g{constructor(e,t){super(),this._positions=_.parsePositions(e),this._shape=t||[],this._delegate=new i.Cesium.Entity({polylineVolume:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("polyline_volume")}set positions(e){this._positions=_.parsePositions(e),this._delegate.polylineVolume.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}set shape(e){this._shape=e||[],this._delegate.polylineVolume.shape=this._shape}get shape(){return this._shape}_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&&delete e.shape,v.merge(this._style,e),v.merge(this._delegate.polylineVolume,e),this)}static fromEntity(e,t){var o;let r,s=i.Cesium.JulianDate.now();if(e.polyline){let a=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(s));r=new n(a,t),r.attr={...(o=e==null?void 0:e.properties)==null?void 0:o.getValue(s)}}return r}};g.registerType("polyline_volume");var Ts=ws;var Cs=class extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({rectangle:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("rect")}set positions(e){this._positions=_.parsePositions(e),this._delegate.rectangle.coordinates=i.Cesium.Rectangle.fromCartesianArray(u.transformWGS84ArrayToCartesianArray(this._positions))}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){let r=this._delegate.rectangle.coordinates.getValue();return this._delegate.position=i.Cesium.Cartographic.toCartesian(i.Cesium.Rectangle.center(r,new i.Cesium.Cartographic)),this._delegate.label={...t,text:e},this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.rectangle,e),this)}};g.registerType("rect");var rt=Cs;var xs=class n extends g{constructor(e){super(),this._positions=_.parsePositions(e),this._delegate=new i.Cesium.Entity({wall:{}}),this._state=d.INITIALIZED}get type(){return g.getOverlayType("wall")}set positions(e){this._positions=_.parsePositions(e),this._delegate.wall.positions=u.transformWGS84ArrayToCartesianArray(this._positions)}get positions(){return this._positions}_mountedHook(){this.positions=this._positions}setLabel(e,t){return this}setStyle(e){return Object.keys(e).length===0?this:(delete e.positions,v.merge(this._style,e),v.merge(this._delegate.wall,e),this)}static fromEntity(e){var s;let t,r=i.Cesium.JulianDate.now();if(e.polyline){let o=u.transformCartesianArrayToWGS84Array(e.polyline.positions.getValue(r));t=new n(o),t.attr={...(s=e==null?void 0:e.properties)==null?void 0:s.getValue(r)}}return t}};g.registerType("wall");var Es=xs;var Ps=class extends P{constructor(e,t,r={}){if(!t)throw new Error("GeoJsonLayer\uFF1Athe url invalid");super(e),this._delegate=i.Cesium.GeoJsonDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("geojson")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return ge.fromEntity(e)}_createPolyline(e){if(e.polyline)return ve.fromEntity(e)}_createPolygon(e){if(e.polygon)return ye.fromEntity(e)}_createModel(e,t){if(e)return De.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new ce(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 ce(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};P.registerType("geojson");var st=Ps;var bs=class extends P{constructor(e,t,r={}){if(!t)throw new Error("Shp2JsonLayer\uFF1Athe url invalid");if(!me("shpUtil"))throw new Error("miss the shpUtil lib");super(e);let o=this._init(t,r);this._delegate=i.Cesium.GeoJsonDataSource.load(o,r),this._state=d.INITIALIZED}async _init(e,t){var s;return await shpUtil.toGeoJSON(e,void 0,(s=t.encoding)!=null?s:"gbk",t.crs)}get type(){return P.getLayerType("shp")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}_createBillboard(e){if(e.position&&e.billboard)return ge.fromEntity(e)}_createPolyline(e){if(e.polyline)return ve.fromEntity(e)}_createPolygon(e){if(e.polygon)return ye.fromEntity(e)}_createModel(e,t){if(e)return De.fromEntity(e,t)}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}toVectorLayer(){let e=new ce(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 ce(this.id);return this.eachOverlay(r=>{t.addOverlay(this._createModel(r,e))},this),t}};P.registerType("shp");var Ss=bs;var Is=class extends P{constructor(e,t,r={}){if(!t)throw new Error("GpxLayer: the url is empty");super(e),this._delegate=i.Cesium.KmlDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("gpx")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("gpx");var Ms=Is;var _d={radialColor:i.Cesium.Color.WHITE,radialWidth:2,showRadial:!0,LabelColor:i.Cesium.Color.YELLOW,weftColor:i.Cesium.Color.WHITE,weftWidth:2},As=class extends P{constructor(e,t){super(e),this._options={..._d,...t},this._delegate=new i.Cesium.CustomDataSource(e),this._state=d.INITIALIZED}get type(){return P.getLayerType("graticule")}_addedHook(){for(let e=0;e<36;e++)this._delegate.entities.add({polyline:{positions:i.Cesium.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.Cesium.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.Cesium.Cartesian3.fromDegreesArray(t),material:this._options.weftColor,width:this._options.weftWidth}})}}};P.registerType("graticule");var Ds=As;var Ls=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._isGround=!0,this._state=d.INITIALIZED}get type(){return P.getLayerType("ground_primitive")}clear(){return this._delegate&&this._delegate.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("ground_primitive");var Rs=Ls;var Os=class extends P{constructor(e){super(e),this._delegate=S.create("div","html-layer",void 0),this._delegate.setAttribute("id",this._id),this._renderRemoveCallback=void 0,this._state=d.INITIALIZED}get type(){return P.getLayerType("html")}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})}get show(){return this._show}_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,o=this._viewer.getOffset();this.eachOverlay(a=>{if(a&&a.position){let l=u.transformWGS84ToCartesian(a.position),h=t.globe.ellipsoid.geodeticSurfaceNormal(l,new i.Cesium.Cartesian3),c=i.Cesium.SceneTransforms.worldToWindowCoordinates(t,l);c&&(c.x+=o.x,c.y+=o.y),a._updateStyle(c,i.Cesium.Cartesian3.distance(l,r),i.Cesium.Cartesian3.dot(s,h)<=0)}},this)},this),this._state=d.ADDED}_onRemove(){this._renderRemoveCallback&&this._renderRemoveCallback(),this._viewer.layerContainer.removeChild(this._delegate),this._state=d.REMOVED}clear(){for(;this._delegate.hasChildNodes();)this._delegate.removeChild(this._delegate.firstChild);return this._cache={},this._state=d.CLEARED,this}};P.registerType("html");var ks=Os;var Fs=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._state=d.INITIALIZED}get type(){return P.getLayerType("i3s")}clear(){return this._delegate.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("i3s");var zs=Fs;var Hs=class extends P{constructor(e,t,r={}){if(!t)throw new Error("KmlLayer: the url is empty");super(e),this._delegate=i.Cesium.KmlDataSource.load(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("kml")}set show(e){this._show=e,this._delegate&&this._delegate.then(t=>{t.show=this._show})}get show(){return this._show}eachOverlay(e,t){if(this._delegate)return this._delegate.then(r=>{r.entities.values.forEach(o=>{e.call(t,o)})}),this}};P.registerType("kml");var Ns=Hs;var Ws=class extends P{constructor(e,t=""){super(e),this._dataSource=i.Cesium.GeoJsonDataSource.load(t),this._delegate=new i.Cesium.CustomDataSource(e),this._initLabel(),this._state=d.INITIALIZED}get type(){return P.getLayerType("label")}_createLabel(e){if(e.position&&e.name)return tt.fromEntity(e)}_initLabel(){this._dataSource.then(e=>{e.entities.values.forEach(r=>{let s=this._createLabel(r);this.addOverlay(s)})})}};P.registerType("label");var Gs=Ws;var Us=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._points=this._delegate.add(new i.Cesium.PointPrimitiveCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._polylines=this._delegate.add(new i.Cesium.PolylineCollection),this._clouds=this._delegate.add(new i.Cesium.CloudCollection),this._state=d.INITIALIZED}get type(){return P.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.Cesium.PointPrimitiveCollection),this._labels=this._delegate.add(new i.Cesium.LabelCollection),this._billboards=this._delegate.add(new i.Cesium.BillboardCollection),this._polylines=this._delegate.add(new i.Cesium.PolylineCollection),this._clouds=this._delegate.add(new i.Cesium.CloudCollection),this._cache={},this._state=d.CLEARED,this}};P.registerType("primitive");var Bs=Us;var Vs=class extends P{constructor(e,t,r){super(e),this._delegate=i.Cesium.ImageryLayer.fromProviderAsync(t,r),this._state=d.INITIALIZED}get type(){return P.getLayerType("raster-tile")}};P.registerType("raster-tile");var js=Vs;var Ys=class extends P{constructor(e){super(e),this._delegate=new i.Cesium.PrimitiveCollection,this._state=d.INITIALIZED}get type(){return P.getLayerType("tileset")}clear(){return this._delegate.removeAll(),this._cache={},this._state=d.CLEARED,this}};P.registerType("tileset");var Zs=Ys;st.registerType("topojson");var qs=class extends P{constructor(e,t){if(!me("echarts"))throw new Error("miss the echarts lib");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=me("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=d.ADDED}_onRemove(){this._delegate&&this._viewer&&(this._chart.dispose(),this._viewer.layerContainer.removeChild(this._delegate),this._state=d.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}},Xs=qs;var{Cartesian3:vt,Ellipsoid:fd,Math:Nl}=i.Cesium;function Wl(n){function e(t){this._api=t,this._viewer=Object(t.getZr()).viewer,this._mapOffset=[0,0],this.dimensions=["lng","lat"]}return e.prototype.getViewer=function(){return this._viewer},e.prototype.setMapOffset=function(t){return this._mapOffset=t,this},e.prototype.dataToPoint=function(t){let r=[],s=vt.fromDegrees(t[0],t[1]);if(!s)return r;let o=fd.WGS84.geodeticSurfaceNormal(s,new vt),a=this._viewer.camera.direction;if(vt.dot(o,a)>=0)return r;let l=this._viewer.scene.cartesianToCanvasCoordinates(s);return l?[l.x-this._mapOffset[0],l.y-this._mapOffset[1]]:r},e.prototype.pointToData=function(t){let r=this._viewer.scene.globe.ellipsoid,s=new vt(t[0]+this._mapOffset[0],t[1]+this._mapOffset[1],0),o=r.cartesianToCartographic(s);return[Nl.toDegrees(o.longitude),Nl.toDegrees(o.latitude)]},e.prototype.getViewRect=function(){let t=this._api;return new n.graphic.BoundingRect(0,0,t.getWidth(),t.getHeight())},e.prototype.getRoamTransform=function(){return n.matrix.create()},e.create=function(t,r){let s;t.eachComponent("GLMap",function(o){s=new e(r),s.setMapOffset(o.__mapOffset||[0,0]),o.coordinateSystem=s}),t.eachSeries(function(o){o.get("coordinateSystem")==="GLMap"&&(o.coordinateSystem=s)})},e.dimensions=["lng","lat"],e}function Gl(n){let{registerAction:e,registerCoordinateSystem:t,extendComponentModel:r,extendComponentView:s}=n;r({type:"GLMap",getViewer(){return Object(this.getZr()).viewer},defaultOption:{roam:!1}}),s({type:"GLMap",init:function(o,a){this.api=a,a.getZr().viewer.clock.onTick.addEventListener(this.moveHandler,this)},moveHandler:function(){this.api.getZr().dom.style.visibility!=="hidden"&&this.api.dispatchAction({type:"GLMapRoam"})},render:function(o,a,l){},dispose:function(){this.api.getZr().viewer.clock.onTick.removeEventListener(this.moveHandler,this)}}),t("GLMap",Wl(n)),e({type:"GLMapRoam",event:"GLMapRoam",update:"updateLayout"},function(o,a){})}var gd={LEFT_MIDDLE:0,LEFT_RIGHT:1},we=gd;var Js=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,o;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=(o=this._options.enableFxaa)!=null?o:!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.Cesium.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,o,a,l,h,c,p,f,T,y,m;if(!this._options.globe)return this;let e=this._viewer.scene.globe,t=this._options.globe;if(v.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:(o=t==null?void 0:t.enableLighting)!=null?o:!1,depthTestAgainstTerrain:(a=t==null?void 0:t.depthTestAgainstTerrain)!=null?a:!1,tileCacheSize:+(t==null?void 0:t.tileCacheSize)||100,preloadSiblings:(l=t==null?void 0:t.preloadSiblings)!=null?l:!1,showSkirts:(h=t==null?void 0:t.showSkirts)!=null?h:!0,baseColor:(t==null?void 0:t.baseColor)||new i.Cesium.Color(0,0,.5,1),terrainExaggeration:(t==null?void 0:t.terrainExaggeration)||1,terrainExaggerationRelativeHeight:(t==null?void 0:t.terrainExaggerationRelativeHeight)||0}),v.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:(T=t==null?void 0:t.translucency)==null?void 0:T.backFaceAlphaByDistance,frontFaceAlpha:+((y=t==null?void 0:t.translucency)==null?void 0:y.frontFaceAlpha)||1,frontFaceAlphaByDistance:(m=t==null?void 0:t.translucency)==null?void 0:m.frontFaceAlphaByDistance}),t!=null&&t.filterColor){let E=this._viewer.scene.globe._surfaceShaderSet.baseFragmentShaderSource,x=E.sources.pop();E.sources.push(x.replace("out_FragColor = finalColor;",`out_FragColor = finalColor * vec4${t.filterColor.toString()};`))}return this}_setCameraController(){var r,s,o,a,l,h,c;if(!((r=this._options)!=null&&r.cameraController))return this;let e=this._viewer.scene.screenSpaceCameraController,t=this._options.cameraController;return v.merge(e,{enableInputs:(s=t==null?void 0:t.enableInputs)!=null?s:!0,enableRotate:(o=t==null?void 0:t.enableRotate)!=null?o:!0,enableTilt:(a=t==null?void 0:t.enableTilt)!=null?a:!0,enableTranslate:(l=t==null?void 0:t.enableTranslate)!=null?l:!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)}},Ks=Js;var Qs=class{constructor(e){this._viewer=e,this._mouseMode=0}setPitchRange(e,t){let r=new i.Cesium.ScreenSpaceEventHandler(this._viewer.scene.canvas);this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&(r.setInputAction(s=>{r.setInputAction(o=>{let a=!0,l=o.endPosition.y<o.startPosition.y;l&&this._viewer.camera.pitch>i.Cesium.Math.toRadians(t)||!l&&this._viewer.camera.pitch<i.Cesium.Math.toRadians(e)?a=!1:a=!0,this._viewer.scene.screenSpaceCameraController.enableTilt=a},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?i.Cesium.ScreenSpaceEventType.MIDDLE_DOWN:i.Cesium.ScreenSpaceEventType.RIGHT_DOWN),r.setInputAction(s=>{this._viewer.scene.screenSpaceCameraController.enableTilt=!0,r.removeInputAction(i.Cesium.ScreenSpaceEventType.MOUSE_MOVE)},this._mouseMode===we.LEFT_MIDDLE?i.Cesium.ScreenSpaceEventType.MIDDLE_UP:i.Cesium.ScreenSpaceEventType.RIGHT_UP))}changeMouseMode(e){this._mouseMode=e||we.LEFT_MIDDLE,e===we.LEFT_MIDDLE?(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.Cesium.CameraEventType.MIDDLE_DRAG,i.Cesium.CameraEventType.PINCH,{eventType:i.Cesium.CameraEventType.LEFT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL},{eventType:i.Cesium.CameraEventType.RIGHT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.Cesium.CameraEventType.RIGHT_DRAG,i.Cesium.CameraEventType.WHEEL,i.Cesium.CameraEventType.PINCH]):e===we.LEFT_RIGHT&&(this._viewer.scene.screenSpaceCameraController.tiltEventTypes=[i.Cesium.CameraEventType.RIGHT_DRAG,i.Cesium.CameraEventType.PINCH,{eventType:i.Cesium.CameraEventType.LEFT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL},{eventType:i.Cesium.CameraEventType.RIGHT_DRAG,modifier:i.Cesium.KeyboardEventModifier.CTRL}],this._viewer.scene.screenSpaceCameraController.zoomEventTypes=[i.Cesium.CameraEventType.WHEEL,i.Cesium.CameraEventType.PINCH])}},$s=Qs;var yd={},eo=yd;var to=class{constructor(){this._viewer=void 0,this._enable=!1,this._wrapper=void 0,this._ready=!1}set enable(e){this._enable!==e&&(this._enable=e,this._state=this._enable?d.ENABLED:d.DISABLED,this._enableHook&&this._enableHook())}get enable(){return this._enable}get state(){return this._state}_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=d.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=`
15828
15828
  visibility:hidden;
15829
- `)}static registerType(e){e&&(eo[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getWidgetType(e){return eo[e.toLocaleUpperCase()]||void 0}},M=to;var io=class extends M{constructor(){super(),this._wrapper=S.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=p.INITIALIZED}get type(){return M.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.Cesium.ScreenSpaceEventHandler(this._viewer.canvas)}_bindEvent(){this._handler.setInputAction(e=>{this._onRightClick(e)},i.Cesium.ScreenSpaceEventType.RIGHT_CLICK),this._handler.setInputAction(e=>{this._onClick(e)},i.Cesium.ScreenSpaceEventType.LEFT_CLICK)}_unbindEvent(){this._handler.removeInputAction(i.Cesium.ScreenSpaceEventType.RIGHT_CLICK),this._handler.removeInputAction(i.Cesium.ScreenSpaceEventType.LEFT_CLICK)}_mountContent(){this._ulEl=S.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 o=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(this._position);o&&(this._wgs84Position={lng:i.Cesium.Math.toDegrees(o.longitude),lat:i.Cesium.Math.toDegrees(o.latitude),alt:o.height})}if(t.mode===i.Cesium.SceneMode.SCENE3D){let o=t.camera.getPickRay(e.position);this._surfacePosition=t.globe.pick(o,t)}else this._surfacePosition=t.camera.pickEllipsoid(e.position,i.Cesium.Ellipsoid.WGS84);if(this._surfacePosition){let o=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(this._surfacePosition);o&&(this._wgs84SurfacePosition={lng:i.Cesium.Math.toDegrees(o.longitude),lat:i.Cesium.Math.toDegrees(o.latitude),alt:o.height})}if(this._instanceId=r==null?void 0:r.instanceId,(r==null?void 0:r.id)instanceof i.Cesium.Entity){let o=this._viewer.getLayers().filter(a=>a.layerId===r.id.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.id.overlayId))}else if(r instanceof i.Cesium.Cesium3DTileFeature){let o=this._viewer.getLayers().filter(a=>a.layerId===r.tileset.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.tileset.overlayId))}else if((r==null?void 0:r.primitive)instanceof i.Cesium.Cesium3DTileset){let o=this._viewer.getLayers().filter(a=>a.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}else if(r!=null&&r.primitive){let o=this._viewer.getLayers().filter(a=>a.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.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,o=this._getViewerOffset();r+=o.x,s+=o.y,this._wrapper.style.cssText=`
15829
+ `)}static registerType(e){e&&(eo[e.toLocaleUpperCase()]=e.toLocaleLowerCase())}static getWidgetType(e){return eo[e.toLocaleUpperCase()]||void 0}},M=to;var io=class extends M{constructor(){super(),this._wrapper=S.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=d.INITIALIZED}get type(){return M.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.Cesium.ScreenSpaceEventHandler(this._viewer.canvas)}_bindEvent(){this._handler.setInputAction(e=>{this._onRightClick(e)},i.Cesium.ScreenSpaceEventType.RIGHT_CLICK),this._handler.setInputAction(e=>{this._onClick(e)},i.Cesium.ScreenSpaceEventType.LEFT_CLICK)}_unbindEvent(){this._handler.removeInputAction(i.Cesium.ScreenSpaceEventType.RIGHT_CLICK),this._handler.removeInputAction(i.Cesium.ScreenSpaceEventType.LEFT_CLICK)}_mountContent(){this._ulEl=S.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 o=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(this._position);o&&(this._wgs84Position={lng:i.Cesium.Math.toDegrees(o.longitude),lat:i.Cesium.Math.toDegrees(o.latitude),alt:o.height})}if(t.mode===i.Cesium.SceneMode.SCENE3D){let o=t.camera.getPickRay(e.position);this._surfacePosition=t.globe.pick(o,t)}else this._surfacePosition=t.camera.pickEllipsoid(e.position,i.Cesium.Ellipsoid.WGS84);if(this._surfacePosition){let o=i.Cesium.Ellipsoid.WGS84.cartesianToCartographic(this._surfacePosition);o&&(this._wgs84SurfacePosition={lng:i.Cesium.Math.toDegrees(o.longitude),lat:i.Cesium.Math.toDegrees(o.latitude),alt:o.height})}if(this._instanceId=r==null?void 0:r.instanceId,(r==null?void 0:r.id)instanceof i.Cesium.Entity){let o=this._viewer.getLayers().filter(a=>a.layerId===r.id.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.id.overlayId))}else if(r instanceof i.Cesium.Cesium3DTileFeature){let o=this._viewer.getLayers().filter(a=>a.layerId===r.tileset.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.tileset.overlayId))}else if((r==null?void 0:r.primitive)instanceof i.Cesium.Cesium3DTileset){let o=this._viewer.getLayers().filter(a=>a.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.getOverlay(r.primitive.overlayId))}else if(r!=null&&r.primitive){let o=this._viewer.getLayers().filter(a=>a.layerId===r.primitive.layerId)[0];o&&o.getOverlay&&(this._overlay=o.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,o=this._getViewerOffset();r+=o.x,s+=o.y,this._wrapper.style.cssText=`
15830
15830
  visibility:${t};
15831
15831
  z-index:1;
15832
15832
  transform:translate3d(${Math.round(r)}px,${Math.round(s)}px, 0);
15833
- `}_setCustomClass(){S.setClass(this._wrapper,`dc-context-menu ${this._config.customClass}`)}_addMenuItem(e,t,r){if(!e||!t)return this;let s=S.create("li","menu-item",null),o=S.create("a","",s);o.innerHTML=e,o.href="javascript:void(0)";let a=this;return t&&(o.onclick=()=>{t.call(r,{windowPosition:a._windowPosition,position:a._position,wgs84Position:a._wgs84Position,surfacePosition:a._surfacePosition,wgs84SurfacePosition:a._wgs84SurfacePosition,overlay:a._overlay,instanceId:a._instanceId}),a.hide()}),this._ulEl.appendChild(s),this}};M.registerType("contextmenu");var Ul=io;var ro=class extends M{constructor(){super(),this._wrapper=S.create("div","widget location-bar"),this._mouseEl=void 0,this._cameraEl=void 0,this._fpsEl=void 0,this._msEl=void 0,this._lastMouseSampleTime=i.Cesium.getTimestamp(),this._lastCameraSampleTime=i.Cesium.getTimestamp(),this._lastFpsSampleTime=i.Cesium.getTimestamp(),this._lastMsSampleTime=i.Cesium.getTimestamp(),this._fpsFrameCount=0,this._msFrameCount=0,this._state=p.INITIALIZED}get type(){return M.getWidgetType("location_bar")}_installHook(){let e=this;Object.defineProperty(this._viewer,"locationBar",{get(){return e}})}_bindEvent(){this._viewer.on(L.MOUSE_MOVE,this._onMove,this),this._viewer.on(A.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.on(A.POST_UPDATE,this._onPostUpdate,this)}_unbindEvent(){this._viewer.off(L.MOUSE_MOVE,this._onMove,this),this._viewer.off(A.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.off(A.POST_UPDATE,this._onPostUpdate,this)}_mountContent(){this._mouseEl=S.create("div","mouse-bar",this._wrapper),this._cameraEl=S.create("div","camera-bar",this._wrapper),this._msEl=S.create("div","ms-bar",this._wrapper),this._fpsEl=S.create("div","fps-bar",this._wrapper),this._ready=!0}_onMove(e){let t=i.Cesium.getTimestamp();if(t<this._lastMouseSampleTime+300)return;let r=e.wgs84SurfacePosition;this._mouseEl.innerHTML=`
15833
+ `}_setCustomClass(){S.setClass(this._wrapper,`dc-context-menu ${this._config.customClass}`)}_addMenuItem(e,t,r){if(!e||!t)return this;let s=S.create("li","menu-item",null),o=S.create("a","",s);o.innerHTML=e,o.href="javascript:void(0)";let a=this;return t&&(o.onclick=()=>{t.call(r,{windowPosition:a._windowPosition,position:a._position,wgs84Position:a._wgs84Position,surfacePosition:a._surfacePosition,wgs84SurfacePosition:a._wgs84SurfacePosition,overlay:a._overlay,instanceId:a._instanceId}),a.hide()}),this._ulEl.appendChild(s),this}};M.registerType("contextmenu");var Ul=io;var ro=class extends M{constructor(){super(),this._wrapper=S.create("div","widget location-bar"),this._mouseEl=void 0,this._cameraEl=void 0,this._fpsEl=void 0,this._msEl=void 0,this._lastMouseSampleTime=i.Cesium.getTimestamp(),this._lastCameraSampleTime=i.Cesium.getTimestamp(),this._lastFpsSampleTime=i.Cesium.getTimestamp(),this._lastMsSampleTime=i.Cesium.getTimestamp(),this._fpsFrameCount=0,this._msFrameCount=0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("location_bar")}_installHook(){let e=this;Object.defineProperty(this._viewer,"locationBar",{get(){return e}})}_bindEvent(){this._viewer.on(L.MOUSE_MOVE,this._onMove,this),this._viewer.on(A.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.on(A.POST_UPDATE,this._onPostUpdate,this)}_unbindEvent(){this._viewer.off(L.MOUSE_MOVE,this._onMove,this),this._viewer.off(A.CAMERA_CHANGED,this._onCameraChanged,this),this._viewer.off(A.POST_UPDATE,this._onPostUpdate,this)}_mountContent(){this._mouseEl=S.create("div","mouse-bar",this._wrapper),this._cameraEl=S.create("div","camera-bar",this._wrapper),this._msEl=S.create("div","ms-bar",this._wrapper),this._fpsEl=S.create("div","fps-bar",this._wrapper),this._ready=!0}_onMove(e){let t=i.Cesium.getTimestamp();if(t<this._lastMouseSampleTime+300)return;let r=e.wgs84SurfacePosition;this._mouseEl.innerHTML=`
15834
15834
  <span>\u7ECF\u5EA6\uFF1A${(r==null?void 0:r.lng.toFixed(8))||Number.NaN}</span>
15835
15835
  <span>\u7EAC\u5EA6\uFF1A${(r==null?void 0:r.lat.toFixed(8))||Number.NaN}</span>
15836
15836
  <span>\u6D77\u62D4\uFF1A${(r==null?void 0:r.alt.toFixed(2))||Number.NaN} \u7C73</span>`,this._lastMouseSampleTime=t}_onCameraChanged(){let e=i.Cesium.getTimestamp();if(e<this._lastCameraSampleTime+300)return;let t=this._viewer.cameraPosition;this._cameraEl.innerHTML=`
15837
15837
  <span>\u89C6\u89D2\uFF1A${(+t.pitch).toFixed(2)}</span>
15838
15838
  <span>\u89C6\u9AD8\uFF1A${(+t.alt).toFixed(2)} \u7C73</span>
15839
- `,this._lastCameraSampleTime=e}_onPostUpdate(){let e=i.Cesium.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}}};M.registerType("location_bar");var Bl=ro;var vp=`
15839
+ `,this._lastCameraSampleTime=e}_onPostUpdate(){let e=i.Cesium.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}}};M.registerType("location_bar");var Bl=ro;var vd=`
15840
15840
  data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+2Yf2xVZxnHP89py9qliPe0BUTqBrunuDEBx8QfcxuwRYcxM3HO7Y8JZUNKTweKmWyaGDBZYtwSMmnvuXRKcEMzt0WmwdllE1nclkgsyUaIUM4ZNmKihfbcDjbCpPc85rT3QG1677ltb5UlPf+e932e7/f5vu/zPO8jfMA/+YDjZ4rA/1vBKQWmFBgWAXOnex0Bu4FPAf8Evu3b1vOFgnTZHKHa1LEVgZTtEoLv9NkLfpMjs03hfMa2VucjcdkQSKTdVkGq/ebk2ghswjmxSMh2+Lb10cufgOO9AHRk7OSTw8Gajqu+beUN9GWjgJnq2qZi3JqxrRURATPtbka5w7etL066AjXprmUaGDdhyCI0WAhyHeAjHFPoMgI9lDWyr/Y3X9udD4yZcg8j2qMiewVZhmpjoeiHdiakgJny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xqdAmJfLeQfY5dvWuslQYO72k1Xnqt5/CA2+CzId9ALIId+2wvwf+8W3Eo7bA1T4tmXGWhvDgrrUkeqAikbEuF/hk8CbKnJQVJtGa9fHp4Dj/gMYnMmI6tp879gx4A6r7Vwp18YAWTPYjsBJgXTV+dNPnKus2wuyZGDaFQvjeqDIZ14FEk7YWLFUIWwX7hKkPJALKwpNFQoRCXsoUdaANjLUInSKIXsGtGLPO/ZVmZqUt1pFnxKRx/qakw8XG5RRCSRS7mABi/Jv7sGyY+R7IM5JTXvXx4MBY6UIYdtxF1AO+iJq7PFbks9G+4e9B67FYEncK26433wETolQN7wfMR33JSAcMBV8hNc4b9+uol9G9VZgSc7ZKcIBQJZfhK+1kcSjFxno477dEE46iv5GJWA67pHQgoGs6bWThyJrpuN1g14VXbLa9u6PZIPsUgkGbhQxblDkNtArh9ZLN8JvA9U/XlE9fX/P6tnvjYYqehOHE44+27qzaOS5hXkUOL5FRIZaZeUVhDOonkWkH9gAVAJngekjHB5V0b2GUbGvr2newUJgctPnaCrxkm9bq8YKfjBM+TaZjnu3CMtVWQwsC1PppbVyLhfpEwodUPbsQFnl0bNNc+J7pJFzoZjxTByp2DowaGDrgfLaurmLVINz06undXevnXf+Yms95GEckzn+hgZPFzM+LESiOAJ5LAw9cIL1IPcAM3JHrgfhLdDDiswSdDHIoksm9C8Ce3RAnvI3WWfiIhz3f0IEIuOJ9rdnGEFwp6p+BeQaoA50JoRHjT6gV5VODXh+tCwUB3LSFJiI41LtLYkCpQIzHjtTBMYTtVLumVKglNEcj63/AIrz7E/FBbRAAAAAAElFTkSuQmCC
15841
- `,Vl=vp;var wp=`
15841
+ `,Vl=vd;var wd=`
15842
15842
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15843
15843
  <svg width="162px" height="162px" viewBox="0 0 162 162" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
15844
15844
  <!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
@@ -15859,7 +15859,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15859
15859
  </g>
15860
15860
  </g>
15861
15861
  </svg>
15862
- `,jl=wp;var Tp=`
15862
+ `,jl=wd;var Td=`
15863
15863
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15864
15864
  <svg width="17px" height="17px" viewBox="0 0 17 17" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
15865
15865
  <!-- Generator: Sketch 43.2 (39069) - http://www.bohemiancoding.com/sketch -->
@@ -15877,7 +15877,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15877
15877
  </g>
15878
15878
  </g>
15879
15879
  </svg>
15880
- `,Yl=Tp;var Cp=`
15880
+ `,Yl=Td;var Cd=`
15881
15881
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15882
15882
  <svg width="53px" height="53px" 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">
15883
15883
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
@@ -15891,45 +15891,45 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15891
15891
  </g>
15892
15892
  </g>
15893
15893
  </svg>
15894
- `,Zl=Cp;var xp=`
15894
+ `,Zl=Cd;var xd=`
15895
15895
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15896
15896
  <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">
15897
15897
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
15898
15898
  <title>decrease</title>
15899
15899
  <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>
15900
15900
  </svg>
15901
- `,ql=xp;var Ep=`
15901
+ `,ql=xd;var Ed=`
15902
15902
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15903
15903
  <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">
15904
15904
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
15905
15905
  <title>increase</title>
15906
15906
  <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>
15907
15907
  </svg>
15908
- `,Xl=Ep;var Pp=`
15908
+ `,Xl=Ed;var Pd=`
15909
15909
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15910
15910
  <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">
15911
15911
  <!-- Generator: Sketch 3.4.3 (16044) - http://www.bohemiancoding.com/sketch -->
15912
15912
  <title>refresh</title>
15913
15913
  <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>
15914
15914
  </svg>
15915
- `,Jl=Pp;var bp=`
15915
+ `,Jl=Pd;var bd=`
15916
15916
  <?xml version="1.0" encoding="UTF-8" standalone="no"?>
15917
15917
  <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">
15918
15918
  <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>
15919
15919
  </svg>
15920
- `,Kl=bp;var Sp={logo:Vl,compass_outer:jl,compass_inner:Yl,compass_rotation_marker:Zl,decrease:ql,increase:Xl,refresh:Jl,splitter:Kl},$=Sp;var so=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._baseLayer=void 0,this._moveActive=!1,this._state=p.INITIALIZED}get type(){return M.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=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.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)}};M.registerType("map_split");var Ql=so;var oo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget map-switch"),this._config=void 0,this._cache=[],this._state=p.INITIALIZED}get type(){return M.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=S.create("div","map-item",this._wrapper),r=this._cache.length?this._cache.length-1:0;r===0&&S.addClass(t,"active"),t.setAttribute("data-index",String(r)),t.onclick=o=>{let a=document.getElementsByClassName("map-item active");a&&a.length&&(a[0].className="map-item"),this._viewer&&(o.target.className="map-item active",this._viewer.changeBaseLayer(+o.target.getAttribute("data-index")||0))},e.iconUrl&&(t.style.cssText=`
15920
+ `,Kl=bd;var Sd={logo:Vl,compass_outer:jl,compass_inner:Yl,compass_rotation_marker:Zl,decrease:ql,increase:Xl,refresh:Jl,splitter:Kl},$=Sd;var so=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._baseLayer=void 0,this._moveActive=!1,this._state=d.INITIALIZED}get type(){return M.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=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.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)}};M.registerType("map_split");var Ql=so;var oo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget map-switch"),this._config=void 0,this._cache=[],this._state=d.INITIALIZED}get type(){return M.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=S.create("div","map-item",this._wrapper),r=this._cache.length?this._cache.length-1:0;r===0&&S.addClass(t,"active"),t.setAttribute("data-index",String(r)),t.onclick=o=>{let a=document.getElementsByClassName("map-item active");a&&a.length&&(a[0].className="map-item"),this._viewer&&(o.target.className="map-item active",this._viewer.changeBaseLayer(+o.target.getAttribute("data-index")||0))},e.iconUrl&&(t.style.cssText=`
15921
15921
  background:url(${e.iconUrl});
15922
- `);let s=S.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"))}};M.registerType("map_switch");var $l=oo;var ao=class extends M{constructor(){super(),this._wrapper=S.create("div","widget popup"),this._config={customClass:""},this._position=void 0,this._state=p.INITIALIZED,this._offsetX=0,this._offsetY=0}get type(){return M.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.Cesium.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),t=t+this._offsetX,r=r+this._offsetY,this._wrapper.style.cssText=`
15922
+ `);let s=S.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"))}};M.registerType("map_switch");var $l=oo;var ao=class extends M{constructor(){super(),this._wrapper=S.create("div","widget popup"),this._config={customClass:""},this._position=void 0,this._state=d.INITIALIZED,this._offsetX=0,this._offsetY=0}get type(){return M.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.Cesium.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),t=t+this._offsetX,r=r+this._offsetY,this._wrapper.style.cssText=`
15923
15923
  visibility:visible;
15924
15924
  z-index:1;
15925
15925
  transform:translate3d(${Math.round(t)}px,${Math.round(r)}px, 0);
15926
15926
  `}_setCustomClass(){S.setClass(this._wrapper,`widget popup ${this._config.customClass}`)}setWrapper(e){return e&&e instanceof Element&&(this._wrapper=e,S.addClass(this._wrapper,"widget popup")),this}setPosition(e,t={x:0,y:0}){return this._position=e,this._offsetX=t.x||0,this._offsetY=t.y||0,this._wrapper&&(this._wrapper.style.cssText=`
15927
15927
  visibility:visible;
15928
- `),this}showAt(e,t,r={x:0,y:0}){return this.setPosition(e,r).setContent(t),this}};M.registerType("popup");var eh=ao;var no=class extends M{constructor(){super(),this._wrapper=S.create("div","widget tool-tip"),this._ready=!0,this._state=p.INITIALIZED}get type(){return M.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,s=this._getViewerOffset();t+=s.x,r+=s.y,this._wrapper.style.cssText=`
15928
+ `),this}showAt(e,t,r={x:0,y:0}){return this.setPosition(e,r).setContent(t),this}};M.registerType("popup");var eh=ao;var no=class extends M{constructor(){super(),this._wrapper=S.create("div","widget tool-tip"),this._ready=!0,this._state=d.INITIALIZED}get type(){return M.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,s=this._getViewerOffset();t+=s.x,r+=s.y,this._wrapper.style.cssText=`
15929
15929
  visibility:visible;
15930
15930
  z-index:1;
15931
15931
  transform:translate3d(${Math.round(t)}px,${Math.round(r)}px, 0);
15932
- `}showAt(e,t){return this._enable?(e&&this._updateWindowCoord(e),this.setContent(t),this):this}};M.registerType("tooltip");var th=no;var{ImageryLayer:Ip}=i.Cesium,lo=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}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=Ip.fromProviderAsync(r,e.options);r&&this._globe.imageryLayers.add(s,0),e.cache.push(s)}this._selectedImageryLayer=e}}get selectedImageryLayer(){return this._selectedImageryLayer}addImageryLayer(e,t={}){let r=[];return Array.isArray(e)?r=e.slice(0):r=[e],this._count++,this._imageryLayers.push({id:`${t.id}-${this._count}`,layers:r,cache:[]}),this}getImageryLayer(e){return this._imageryLayers.filter(r=>r.id.includes(e))}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},ho=lo;var{BoxGeometry:ih,Cartesian3:Mp,defined:Te,DeveloperError:rh,GeometryPipeline:Ap,Matrix3:sh,Matrix4:co,Transforms:Dp,VertexFormat:Lp,BufferUsage:Rp,CubeMap:Op,loadCubeMap:kp,RenderState:Fp,VertexArray:zp,BlendingState:Hp,SceneMode:oh,ShaderProgram:Np,ShaderSource:Wp,SkyBox:Gp}=i.Cesium,Up=`
15932
+ `}showAt(e,t){return this._enable?(e&&this._updateWindowCoord(e),this.setContent(t),this):this}};M.registerType("tooltip");var th=no;var{ImageryLayer:Id}=i.Cesium,lo=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}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=Id.fromProviderAsync(r,e.options);r&&this._globe.imageryLayers.add(s,0),e.cache.push(s)}this._selectedImageryLayer=e}}get selectedImageryLayer(){return this._selectedImageryLayer}addImageryLayer(e,t={}){let r=[];return Array.isArray(e)?r=e.slice(0):r=[e],this._count++,this._imageryLayers.push({id:`${t.id}-${this._count}`,layers:r,cache:[]}),this}getImageryLayer(e){return this._imageryLayers.filter(r=>r.id.includes(e))}changeImageryLayer(e){if(e>this._imageryLayers.length-1)throw new Error("index error");return this.selectedImageryLayer=this._imageryLayers[e],this}},ho=lo;var{BoxGeometry:ih,Cartesian3:Md,defined:Te,DeveloperError:rh,GeometryPipeline:Ad,Matrix3:sh,Matrix4:co,Transforms:Dd,VertexFormat:Ld,BufferUsage:Rd,CubeMap:Od,loadCubeMap:kd,RenderState:Fd,VertexArray:zd,BlendingState:Hd,SceneMode:oh,ShaderProgram:Nd,ShaderSource:Wd,SkyBox:Gd}=i.Cesium,Ud=`
15933
15933
  uniform samplerCube u_cubeMap;
15934
15934
  in vec3 v_texCoord;
15935
15935
  void main()
@@ -15937,7 +15937,7 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15937
15937
  vec4 color = czm_textureCube(u_cubeMap, normalize(v_texCoord));
15938
15938
  out_FragColor = vec4(czm_gammaCorrect(color).rgb, czm_morphTime);
15939
15939
  }
15940
- `,Bp=`
15940
+ `,Bd=`
15941
15941
  in vec3 position;
15942
15942
  out vec3 v_texCoord;
15943
15943
  uniform mat3 u_rotateMatrix;
@@ -15947,18 +15947,18 @@ data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAYAAABXAvmHAAAG5ElEQVRoQ+
15947
15947
  gl_Position = czm_projection * vec4(p, 1.0);
15948
15948
  v_texCoord = position.xyz;
15949
15949
  }
15950
- `,po=class extends Gp{constructor(e={}){super(e),this.offsetAngle=(e==null?void 0:e.offsetAngle)||0}update(e,t){let r=this;if(!this.show||e.mode!==oh.SCENE3D&&e.mode!==oh.MORPHING||!e.passes.render)return;let s=e.context;if(this._sources!==this.sources){this._sources=this.sources;let a=this.sources;if(!Te(a.positiveX)||!Te(a.negativeX)||!Te(a.positiveY)||!Te(a.negativeY)||!Te(a.positiveZ)||!Te(a.negativeZ))throw new rh("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof a.positiveX!=typeof a.negativeX||typeof a.positiveX!=typeof a.positiveY||typeof a.positiveX!=typeof a.negativeY||typeof a.positiveX!=typeof a.positiveZ||typeof a.positiveX!=typeof a.negativeZ)throw new rh("this.sources properties must all be the same type.");typeof a.positiveX=="string"?kp(s,this._sources).then(function(l){r._cubeMap=r._cubeMap&&r._cubeMap.destroy(),r._cubeMap=l}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Op({context:s,source:a}))}let o=this._command;if(o.modelMatrix=Dp.eastNorthUpToFixedFrame(e.camera.positionWC),this.offsetAngle!==0&&co.multiply(o.modelMatrix,co.fromRotationTranslation(sh.fromRotationZ(this.offsetAngle/180*Math.PI)),o.modelMatrix),!Te(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return r._cubeMap},u_rotateMatrix:function(){return co.getMatrix3(o.modelMatrix,new sh)}};let a=ih.createGeometry(ih.fromDimensions({dimensions:new Mp(2,2,2),vertexFormat:Lp.POSITION_ONLY})),l=this._attributeLocations=Ap.createAttributeLocations(a);o.vertexArray=zp.fromGeometry({context:s,geometry:a,attributeLocations:l,bufferUsage:Rp._DRAW}),o.renderState=Fp.fromCache({blending:Hp.ALPHA_BLEND})}if(!Te(o.shaderProgram)||this._useHdr!==t){let a=new Wp({defines:[t?"HDR":""],sources:[Up]});o.shaderProgram=Np.fromCache({context:s,vertexShaderSource:Bp,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),this._useHdr=t}if(Te(this._cubeMap))return o}},mo=po;var{BoundingSphere:uo,BoundingSphereState:He,Cartographic:Vp,CesiumWidget:jp,Cesium3DTileset:lh,Clock:Yp,computeFlyToLocationForRectangle:Zp,DataSourceCollection:qp,DataSourceDisplay:Xp,defaultValue:ze,defined:z,destroyObject:Jp,DeveloperError:fo,Entity:v2,EntityView:Kp,Event:ah,EventHelper:Qp,getElement:$p,HeadingPitchRange:em,ImageryLayer:tm,Matrix4:_o,Property:im,SceneMode:Ce,ScreenSpaceEventType:nh,TimeDynamicPointCloud:hh,VoxelPrimitive:ch,Color:rm}=i.Cesium,Me=new uo;function dh(n,e,t){if(z(t)){let r=t.clock;z(r)&&r.getValue(e)}}function O(n,e){if(!z(n))throw new fo("container is required.");n=$p(n),e=ze(e,ze.EMPTY_OBJECT);let t=ze(e.scene3DOnly,!1),r=new Yp;z(e.shouldAnimate)&&(r.shouldAnimate=e.shouldAnimate);let s=new jp(n,{baseLayer:!1,clock:r,skyBox:e.skyBox,skyAtmosphere:e.skyAtmosphere,sceneMode:e.sceneMode,mapProjection:e.mapProjection,globe:e.globe,orderIndependentTranslucency:e.orderIndependentTranslucency,contextOptions:e.contextOptions,useDefaultRenderLoop:e.useDefaultRenderLoop,targetFrameRate:e.targetFrameRate,showRenderLoopErrors:e.showRenderLoopErrors,useBrowserRecommendedResolution:e.useBrowserRecommendedResolution,creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),scene3DOnly:t,shadows:e.shadows,terrainShadows:e.terrainShadows,mapMode2D:e.mapMode2D,blurActiveElementOnCanvasFocus:e.blurActiveElementOnCanvasFocus,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,depthPlaneEllipsoidOffset:e.depthPlaneEllipsoidOffset,msaaSamples:e.msaaSamples});s.scene.backgroundColor=rm.TRANSPARENT,s.canvas.parentNode.className="viewer-canvas";let o=e.dataSources,a=!1;z(o)||(o=new qp,a=!0);let l=s.scene;l.screenSpaceCameraController.maximumZoomDistance=40489014;let h=new Xp({scene:l,dataSourceCollection:o}),c=new Qp;c.add(r.onTick,O.prototype._onTick,this),c.add(l.morphStart,O.prototype._clearTrackedObject,this);let d=document.createElement("div");this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=ze(e.automaticallyTrackDataSourceClocks,!0),this._clock=r,this._container=n,this._bottomContainer=document.createElement("div"),this._element=document.createElement("div"),this._cesiumWidget=s,this._dataSourceCollection=o,this._destroyDataSourceCollection=a,this._dataSourceDisplay=h,this._toolbar=d,this._eventHelper=c,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=!1,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new ah,this._trackedEntityChanged=new ah,c.add(o.dataSourceAdded,O.prototype._onDataSourceAdded,this),c.add(o.dataSourceRemoved,O.prototype._onDataSourceRemoved,this),c.add(l.postUpdate,O.prototype.resize,this),c.add(l.postRender,O.prototype._postRender,this);let f=o.length;for(let T=0;T<f;T++)this._dataSourceAdded(o,o.get(T));this._dataSourceAdded(void 0,h.defaultDataSource),c.add(o.dataSourceAdded,O.prototype._dataSourceAdded,this),c.add(o.dataSourceRemoved,O.prototype._dataSourceRemoved,this)}Object.defineProperties(O.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(n){this.scene.shadowMap.enabled=n}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(n){this.scene.globe.shadows=n}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(n){this.scene.terrainProvider=n}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(n){this._cesiumWidget.targetFrameRate=n}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(n){this._cesiumWidget.useDefaultRenderLoop=n}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(n){this._cesiumWidget.resolutionScale=n}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(n){this._cesiumWidget.useBrowserRecommendedResolution=n}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(n){this._allowDataSourcesToSuspendAnimation=n}},trackedEntity:{get:function(){return this._trackedEntity},set:function(n){if(this._trackedEntity!==n){this._trackedEntity=n,go(this);let e=this.scene,t=e.mode;!z(n)||!z(n.position)?(this._needTrackedEntityUpdate=!1,(t===Ce.COLUMBUS_VIEW||t===Ce.SCENE2D)&&(e.screenSpaceCameraController.enableTranslate=!0),(t===Ce.COLUMBUS_VIEW||t===Ce.SCENE3D)&&(e.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(_o.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(n),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(n){this._selectedEntity!==n&&(this._selectedEntity=n,this._selectedEntityChanged.raiseEvent(n))}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(n){this._clockTrackedDataSource!==n&&(this._clockTrackedDataSource=n,dh(void 0,this.clock,n))}}});O.prototype.extend=function(n,e){if(!z(n))throw new fo("mixin is required.");n(this,e)};O.prototype.resize=function(){let n=this._cesiumWidget,e=this._container,t=e.clientWidth,r=e.clientHeight;n.resize(),!(t===this._lastWidth&&r===this._lastHeight)&&(this._lastWidth=t,this._lastHeight=r)};O.prototype.forceResize=function(){this._lastWidth=0,this.resize()};O.prototype.render=function(){this._cesiumWidget.render()};O.prototype.isDestroyed=function(){return!1};O.prototype.destroy=function(){if(this.isDestroyed())return;let n;z(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(nh.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(nh.LEFT_DOUBLE_CLICK));let e=this.dataSources,t=e.length;for(n=0;n<t;n++)this._dataSourceRemoved(e,e.get(n));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._eventHelper.removeAll(),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),Jp(this)};O.prototype._dataSourceAdded=function(n,e){e.entities.collectionChanged.addEventListener(O.prototype._onEntityCollectionChanged,this)};O.prototype._dataSourceRemoved=function(n,e){let t=e.entities;t.collectionChanged.removeEventListener(O.prototype._onEntityCollectionChanged,this),z(this.trackedEntity)&&t.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),z(this.selectedEntity)&&t.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};O.prototype._onTick=function(n){let e=n.currentTime,t=this._dataSourceDisplay.update(e);this._allowDataSourcesToSuspendAnimation&&(this._clock.canAnimate=t);let r=this._entityView;if(z(r)){let h=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(h,!1,Me)===He.DONE&&r.update(e,Me)}let s,o=!1,a=this.selectedEntity;z(a)&&this._enableInfoOrSelection&&a.isShowing&&a.isAvailable(e)&&(this._dataSourceDisplay.getBoundingSphere(a,!0,Me)!==He.FAILED?s=Me.center:z(a.position)&&(s=a.position.getValue(e,s)),o=z(s))};O.prototype._onEntityCollectionChanged=function(n,e,t){let r=t.length;for(let s=0;s<r;s++){let o=t[s];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}};O.prototype._onInfoBoxCameraClicked=function(n){if(n.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let t=this.selectedEntity.position;z(t)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};O.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};O.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};O.prototype._onDataSourceChanged=function(n){this.clockTrackedDataSource===n&&dh(void 0,this.clock,n)};O.prototype._onDataSourceAdded=function(n,e){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=e);let t=e.entities.id,r=this._eventHelper.add(e.changedEvent,O.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[t]=r};O.prototype._onDataSourceRemoved=function(n,e){let t=this.clockTrackedDataSource===e,r=e.entities.id;if(this._dataSourceChangedListeners[r](),this._dataSourceChangedListeners[r]=void 0,t){let s=n.length;this._automaticallyTrackDataSourceClocks&&s>0?this.clockTrackedDataSource=n.get(s-1):this.clockTrackedDataSource=void 0}};O.prototype.zoomTo=function(n,e){return ph(this,n,{offset:e},!1)};O.prototype.flyTo=function(n,e){return ph(this,n,e,!0)};function ph(n,e,t,r){if(!z(e))throw new fo("zoomTarget is required.");go(n);let s=new Promise(o=>{n._completeZoom=function(a){o(a)}});return n._zoomPromise=s,n._zoomIsFlight=r,n._zoomOptions=t,Promise.resolve(e).then(function(o){if(n._zoomPromise===s){if(o instanceof tm){let a;z(o.imageryProvider)?a=Promise.resolve(o.getImageryRectangle()):a=new Promise(l=>{let h=o.readyEvent.addEventListener(()=>{h(),l(o.getImageryRectangle())})}),a.then(function(l){return Zp(l,n.scene)}).then(function(l){n._zoomPromise===s&&(n._zoomTarget=l)});return}if(o instanceof lh||o instanceof hh||o instanceof ch){n._zoomTarget=o;return}if(o.isLoading&&z(o.loadingEvent)){let a=o.loadingEvent.addEventListener(function(){a(),n._zoomPromise===s&&(n._zoomTarget=o.entities.values.slice(0))});return}if(Array.isArray(o)){n._zoomTarget=o.slice(0);return}o=ze(o.values,o),z(o.entities)&&(o=o.entities.values),Array.isArray(o)?n._zoomTarget=o.slice(0):n._zoomTarget=[o]}}),n.scene.requestRender(),s}function ot(n){n._zoomPromise=void 0,n._zoomTarget=void 0,n._zoomOptions=void 0}function go(n){let e=n._zoomPromise;z(e)&&(ot(n),n._completeZoom(!1))}O.prototype._postRender=function(){sm(this),om(this)};function sm(n){let e=n._zoomTarget;if(!z(e)||n.scene.mode===Ce.MORPHING)return;let t=n.scene,r=t.camera,s=ze(n._zoomOptions,{}),o;function a(d){z(s.offset)||(s.offset=new em(0,-.5,d.radius)),o={offset:s.offset,duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)}},n._zoomIsFlight?r.flyToBoundingSphere(e.boundingSphere,o):(r.viewBoundingSphere(d,s.offset),r.lookAtTransform(_o.IDENTITY),n._completeZoom(!0)),ot(n)}if(e instanceof hh){if(z(e.boundingSphere)){a(e.boundingSphere);return}let d=e.frameChanged.addEventListener(function(f){a(f.boundingSphere),d()});return}if(e instanceof lh||e instanceof ch){a(e.boundingSphere);return}if(e instanceof Vp){o={destination:t.mapProjection.ellipsoid.cartographicToCartesian(e),duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)}},n._zoomIsFlight?r.flyTo(o):(r.setView(o),n._completeZoom(!0)),ot(n);return}let l=e,h=[];for(let d=0,f=l.length;d<f;d++){let T=n._dataSourceDisplay.getBoundingSphere(l[d],!1,Me);if(T===He.PENDING)return;T!==He.FAILED&&h.push(uo.clone(Me))}if(h.length===0){go(n);return}n.trackedEntity=void 0;let c=uo.fromBoundingSpheres(h);n._zoomIsFlight?(ot(n),r.flyToBoundingSphere(c,{duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)},offset:s.offset})):(r.viewBoundingSphere(c,s.offset),r.lookAtTransform(_o.IDENTITY),ot(n),n._completeZoom(!0))}function om(n){if(!n._needTrackedEntityUpdate)return;let e=n._trackedEntity,t=n.clock.currentTime,r=im.getValueOrUndefined(e.position,t);if(!z(r))return;let s=n.scene,o=n._dataSourceDisplay.getBoundingSphere(e,!1,Me);if(o===He.PENDING)return;let a=s.mode;(a===Ce.COLUMBUS_VIEW||a===Ce.SCENE2D)&&(s.screenSpaceCameraController.enableTranslate=!1),(a===Ce.COLUMBUS_VIEW||a===Ce.SCENE3D)&&(s.screenSpaceCameraController.enableTilt=!1);let l=o!==He.FAILED?Me:void 0;n._entityView=new Kp(e,s,s.mapProjection.ellipsoid),n._entityView.update(t,l),n._needTrackedEntityUpdate=!1}var at=O;var yo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget hawkeye-map",null),this._wrapper.setAttribute("id",v.uuid()),this._map=void 0,this._state=p.INITIALIZED}get type(){return M.getWidgetType("hawkeye_map")}_mountContent(){let e=new at(this._wrapper,{sceneMode:i.Cesium.SceneMode.SCENE2D});e.imageryLayers.removeAll(),v.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(A.CAMERA_CHANGED,this._syncMap,this)}_unbindEvent(){this._viewer.off(A.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.Cesium.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.Cesium.Cartesian3.distance(t,this._viewer.scene.camera.positionWC);this._map.scene.camera.lookAt(t,new i.Cesium.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.Cesium.ImageryLayer.fromProviderAsync(t,{}))})),this)}};M.registerType("hawkeye_map");var mh=yo;var vo=class extends M{constructor(){super(),this._wrapper=S.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=p.INITIALIZED}get type(){return M.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(A.POST_RENDER,this._postRenderHandler,this)}_unbindEvent(){this._viewer.off(A.POST_RENDER,this._postRenderHandler,this)}_postRenderHandler(){let e=this._viewer.camera.heading;this._outRing&&(this._outRing.style.cssText=`
15950
+ `,po=class extends Gd{constructor(e={}){super(e),this.offsetAngle=(e==null?void 0:e.offsetAngle)||0}update(e,t){let r=this;if(!this.show||e.mode!==oh.SCENE3D&&e.mode!==oh.MORPHING||!e.passes.render)return;let s=e.context;if(this._sources!==this.sources){this._sources=this.sources;let a=this.sources;if(!Te(a.positiveX)||!Te(a.negativeX)||!Te(a.positiveY)||!Te(a.negativeY)||!Te(a.positiveZ)||!Te(a.negativeZ))throw new rh("this.sources is required and must have positiveX, negativeX, positiveY, negativeY, positiveZ, and negativeZ properties.");if(typeof a.positiveX!=typeof a.negativeX||typeof a.positiveX!=typeof a.positiveY||typeof a.positiveX!=typeof a.negativeY||typeof a.positiveX!=typeof a.positiveZ||typeof a.positiveX!=typeof a.negativeZ)throw new rh("this.sources properties must all be the same type.");typeof a.positiveX=="string"?kd(s,this._sources).then(function(l){r._cubeMap=r._cubeMap&&r._cubeMap.destroy(),r._cubeMap=l}):(this._cubeMap=this._cubeMap&&this._cubeMap.destroy(),this._cubeMap=new Od({context:s,source:a}))}let o=this._command;if(o.modelMatrix=Dd.eastNorthUpToFixedFrame(e.camera.positionWC),this.offsetAngle!==0&&co.multiply(o.modelMatrix,co.fromRotationTranslation(sh.fromRotationZ(this.offsetAngle/180*Math.PI)),o.modelMatrix),!Te(o.vertexArray)){o.uniformMap={u_cubeMap:function(){return r._cubeMap},u_rotateMatrix:function(){return co.getMatrix3(o.modelMatrix,new sh)}};let a=ih.createGeometry(ih.fromDimensions({dimensions:new Md(2,2,2),vertexFormat:Ld.POSITION_ONLY})),l=this._attributeLocations=Ad.createAttributeLocations(a);o.vertexArray=zd.fromGeometry({context:s,geometry:a,attributeLocations:l,bufferUsage:Rd._DRAW}),o.renderState=Fd.fromCache({blending:Hd.ALPHA_BLEND})}if(!Te(o.shaderProgram)||this._useHdr!==t){let a=new Wd({defines:[t?"HDR":""],sources:[Ud]});o.shaderProgram=Nd.fromCache({context:s,vertexShaderSource:Bd,fragmentShaderSource:a,attributeLocations:this._attributeLocations}),this._useHdr=t}if(Te(this._cubeMap))return o}},mo=po;var{BoundingSphere:uo,BoundingSphereState:He,Cartographic:Vd,CesiumWidget:jd,Cesium3DTileset:lh,Clock:Yd,computeFlyToLocationForRectangle:Zd,DataSourceCollection:qd,DataSourceDisplay:Xd,defaultValue:ze,defined:z,destroyObject:Jd,DeveloperError:fo,Entity:v2,EntityView:Kd,Event:ah,EventHelper:Qd,getElement:$d,HeadingPitchRange:em,ImageryLayer:tm,Matrix4:_o,Property:im,SceneMode:Ce,ScreenSpaceEventType:nh,TimeDynamicPointCloud:hh,VoxelPrimitive:ch,Color:rm}=i.Cesium,Me=new uo;function ph(n,e,t){if(z(t)){let r=t.clock;z(r)&&r.getValue(e)}}function O(n,e){if(!z(n))throw new fo("container is required.");n=$d(n),e=ze(e,ze.EMPTY_OBJECT);let t=ze(e.scene3DOnly,!1),r=new Yd;z(e.shouldAnimate)&&(r.shouldAnimate=e.shouldAnimate);let s=new jd(n,{baseLayer:!1,clock:r,skyBox:e.skyBox,skyAtmosphere:e.skyAtmosphere,sceneMode:e.sceneMode,mapProjection:e.mapProjection,globe:e.globe,orderIndependentTranslucency:e.orderIndependentTranslucency,contextOptions:e.contextOptions,useDefaultRenderLoop:e.useDefaultRenderLoop,targetFrameRate:e.targetFrameRate,showRenderLoopErrors:e.showRenderLoopErrors,useBrowserRecommendedResolution:e.useBrowserRecommendedResolution,creditContainer:document.createElement("div"),creditViewport:document.createElement("div"),scene3DOnly:t,shadows:e.shadows,terrainShadows:e.terrainShadows,mapMode2D:e.mapMode2D,blurActiveElementOnCanvasFocus:e.blurActiveElementOnCanvasFocus,requestRenderMode:e.requestRenderMode,maximumRenderTimeChange:e.maximumRenderTimeChange,depthPlaneEllipsoidOffset:e.depthPlaneEllipsoidOffset,msaaSamples:e.msaaSamples});s.scene.backgroundColor=rm.TRANSPARENT,s.canvas.parentNode.className="viewer-canvas";let o=e.dataSources,a=!1;z(o)||(o=new qd,a=!0);let l=s.scene;l.screenSpaceCameraController.maximumZoomDistance=40489014;let h=new Xd({scene:l,dataSourceCollection:o}),c=new Qd;c.add(r.onTick,O.prototype._onTick,this),c.add(l.morphStart,O.prototype._clearTrackedObject,this);let p=document.createElement("div");this._dataSourceChangedListeners={},this._automaticallyTrackDataSourceClocks=ze(e.automaticallyTrackDataSourceClocks,!0),this._clock=r,this._container=n,this._bottomContainer=document.createElement("div"),this._element=document.createElement("div"),this._cesiumWidget=s,this._dataSourceCollection=o,this._destroyDataSourceCollection=a,this._dataSourceDisplay=h,this._toolbar=p,this._eventHelper=c,this._lastWidth=0,this._lastHeight=0,this._allowDataSourcesToSuspendAnimation=!0,this._entityView=void 0,this._enableInfoOrSelection=!1,this._clockTrackedDataSource=void 0,this._trackedEntity=void 0,this._needTrackedEntityUpdate=!1,this._selectedEntity=void 0,this._zoomIsFlight=!1,this._zoomTarget=void 0,this._zoomPromise=void 0,this._zoomOptions=void 0,this._selectedEntityChanged=new ah,this._trackedEntityChanged=new ah,c.add(o.dataSourceAdded,O.prototype._onDataSourceAdded,this),c.add(o.dataSourceRemoved,O.prototype._onDataSourceRemoved,this),c.add(l.postUpdate,O.prototype.resize,this),c.add(l.postRender,O.prototype._postRender,this);let f=o.length;for(let T=0;T<f;T++)this._dataSourceAdded(o,o.get(T));this._dataSourceAdded(void 0,h.defaultDataSource),c.add(o.dataSourceAdded,O.prototype._dataSourceAdded,this),c.add(o.dataSourceRemoved,O.prototype._dataSourceRemoved,this)}Object.defineProperties(O.prototype,{container:{get:function(){return this._container}},bottomContainer:{get:function(){return this._bottomContainer}},cesiumWidget:{get:function(){return this._cesiumWidget}},dataSourceDisplay:{get:function(){return this._dataSourceDisplay}},entities:{get:function(){return this._dataSourceDisplay.defaultDataSource.entities}},dataSources:{get:function(){return this._dataSourceCollection}},canvas:{get:function(){return this._cesiumWidget.canvas}},scene:{get:function(){return this._cesiumWidget.scene}},shadows:{get:function(){return this.scene.shadowMap.enabled},set:function(n){this.scene.shadowMap.enabled=n}},terrainShadows:{get:function(){return this.scene.globe.shadows},set:function(n){this.scene.globe.shadows=n}},shadowMap:{get:function(){return this.scene.shadowMap}},imageryLayers:{get:function(){return this.scene.imageryLayers}},terrainProvider:{get:function(){return this.scene.terrainProvider},set:function(n){this.scene.terrainProvider=n}},camera:{get:function(){return this.scene.camera}},postProcessStages:{get:function(){return this.scene.postProcessStages}},clock:{get:function(){return this._clock}},screenSpaceEventHandler:{get:function(){return this._cesiumWidget.screenSpaceEventHandler}},targetFrameRate:{get:function(){return this._cesiumWidget.targetFrameRate},set:function(n){this._cesiumWidget.targetFrameRate=n}},useDefaultRenderLoop:{get:function(){return this._cesiumWidget.useDefaultRenderLoop},set:function(n){this._cesiumWidget.useDefaultRenderLoop=n}},resolutionScale:{get:function(){return this._cesiumWidget.resolutionScale},set:function(n){this._cesiumWidget.resolutionScale=n}},useBrowserRecommendedResolution:{get:function(){return this._cesiumWidget.useBrowserRecommendedResolution},set:function(n){this._cesiumWidget.useBrowserRecommendedResolution=n}},allowDataSourcesToSuspendAnimation:{get:function(){return this._allowDataSourcesToSuspendAnimation},set:function(n){this._allowDataSourcesToSuspendAnimation=n}},trackedEntity:{get:function(){return this._trackedEntity},set:function(n){if(this._trackedEntity!==n){this._trackedEntity=n,go(this);let e=this.scene,t=e.mode;!z(n)||!z(n.position)?(this._needTrackedEntityUpdate=!1,(t===Ce.COLUMBUS_VIEW||t===Ce.SCENE2D)&&(e.screenSpaceCameraController.enableTranslate=!0),(t===Ce.COLUMBUS_VIEW||t===Ce.SCENE3D)&&(e.screenSpaceCameraController.enableTilt=!0),this._entityView=void 0,this.camera.lookAtTransform(_o.IDENTITY)):this._needTrackedEntityUpdate=!0,this._trackedEntityChanged.raiseEvent(n),this.scene.requestRender()}}},selectedEntity:{get:function(){return this._selectedEntity},set:function(n){this._selectedEntity!==n&&(this._selectedEntity=n,this._selectedEntityChanged.raiseEvent(n))}},selectedEntityChanged:{get:function(){return this._selectedEntityChanged}},trackedEntityChanged:{get:function(){return this._trackedEntityChanged}},clockTrackedDataSource:{get:function(){return this._clockTrackedDataSource},set:function(n){this._clockTrackedDataSource!==n&&(this._clockTrackedDataSource=n,ph(void 0,this.clock,n))}}});O.prototype.extend=function(n,e){if(!z(n))throw new fo("mixin is required.");n(this,e)};O.prototype.resize=function(){let n=this._cesiumWidget,e=this._container,t=e.clientWidth,r=e.clientHeight;n.resize(),!(t===this._lastWidth&&r===this._lastHeight)&&(this._lastWidth=t,this._lastHeight=r)};O.prototype.forceResize=function(){this._lastWidth=0,this.resize()};O.prototype.render=function(){this._cesiumWidget.render()};O.prototype.isDestroyed=function(){return!1};O.prototype.destroy=function(){if(this.isDestroyed())return;let n;z(this.screenSpaceEventHandler)&&!this.screenSpaceEventHandler.isDestroyed()&&(this.screenSpaceEventHandler.removeInputAction(nh.LEFT_CLICK),this.screenSpaceEventHandler.removeInputAction(nh.LEFT_DOUBLE_CLICK));let e=this.dataSources,t=e.length;for(n=0;n<t;n++)this._dataSourceRemoved(e,e.get(n));return this._dataSourceRemoved(void 0,this._dataSourceDisplay.defaultDataSource),this._eventHelper.removeAll(),this._dataSourceDisplay=this._dataSourceDisplay.destroy(),this._cesiumWidget=this._cesiumWidget.destroy(),this._destroyDataSourceCollection&&(this._dataSourceCollection=this._dataSourceCollection.destroy()),Jd(this)};O.prototype._dataSourceAdded=function(n,e){e.entities.collectionChanged.addEventListener(O.prototype._onEntityCollectionChanged,this)};O.prototype._dataSourceRemoved=function(n,e){let t=e.entities;t.collectionChanged.removeEventListener(O.prototype._onEntityCollectionChanged,this),z(this.trackedEntity)&&t.getById(this.trackedEntity.id)===this.trackedEntity&&(this.trackedEntity=void 0),z(this.selectedEntity)&&t.getById(this.selectedEntity.id)===this.selectedEntity&&(this.selectedEntity=void 0)};O.prototype._onTick=function(n){let e=n.currentTime,t=this._dataSourceDisplay.update(e);this._allowDataSourcesToSuspendAnimation&&(this._clock.canAnimate=t);let r=this._entityView;if(z(r)){let h=this._trackedEntity;this._dataSourceDisplay.getBoundingSphere(h,!1,Me)===He.DONE&&r.update(e,Me)}let s,o=!1,a=this.selectedEntity;z(a)&&this._enableInfoOrSelection&&a.isShowing&&a.isAvailable(e)&&(this._dataSourceDisplay.getBoundingSphere(a,!0,Me)!==He.FAILED?s=Me.center:z(a.position)&&(s=a.position.getValue(e,s)),o=z(s))};O.prototype._onEntityCollectionChanged=function(n,e,t){let r=t.length;for(let s=0;s<r;s++){let o=t[s];this.trackedEntity===o&&(this.trackedEntity=void 0),this.selectedEntity===o&&(this.selectedEntity=void 0)}};O.prototype._onInfoBoxCameraClicked=function(n){if(n.isCameraTracking&&this.trackedEntity===this.selectedEntity)this.trackedEntity=void 0;else{let t=this.selectedEntity.position;z(t)?this.trackedEntity=this.selectedEntity:this.zoomTo(this.selectedEntity)}};O.prototype._clearTrackedObject=function(){this.trackedEntity=void 0};O.prototype._clearObjects=function(){this.trackedEntity=void 0,this.selectedEntity=void 0};O.prototype._onDataSourceChanged=function(n){this.clockTrackedDataSource===n&&ph(void 0,this.clock,n)};O.prototype._onDataSourceAdded=function(n,e){this._automaticallyTrackDataSourceClocks&&(this.clockTrackedDataSource=e);let t=e.entities.id,r=this._eventHelper.add(e.changedEvent,O.prototype._onDataSourceChanged,this);this._dataSourceChangedListeners[t]=r};O.prototype._onDataSourceRemoved=function(n,e){let t=this.clockTrackedDataSource===e,r=e.entities.id;if(this._dataSourceChangedListeners[r](),this._dataSourceChangedListeners[r]=void 0,t){let s=n.length;this._automaticallyTrackDataSourceClocks&&s>0?this.clockTrackedDataSource=n.get(s-1):this.clockTrackedDataSource=void 0}};O.prototype.zoomTo=function(n,e){return dh(this,n,{offset:e},!1)};O.prototype.flyTo=function(n,e){return dh(this,n,e,!0)};function dh(n,e,t,r){if(!z(e))throw new fo("zoomTarget is required.");go(n);let s=new Promise(o=>{n._completeZoom=function(a){o(a)}});return n._zoomPromise=s,n._zoomIsFlight=r,n._zoomOptions=t,Promise.resolve(e).then(function(o){if(n._zoomPromise===s){if(o instanceof tm){let a;z(o.imageryProvider)?a=Promise.resolve(o.getImageryRectangle()):a=new Promise(l=>{let h=o.readyEvent.addEventListener(()=>{h(),l(o.getImageryRectangle())})}),a.then(function(l){return Zd(l,n.scene)}).then(function(l){n._zoomPromise===s&&(n._zoomTarget=l)});return}if(o instanceof lh||o instanceof hh||o instanceof ch){n._zoomTarget=o;return}if(o.isLoading&&z(o.loadingEvent)){let a=o.loadingEvent.addEventListener(function(){a(),n._zoomPromise===s&&(n._zoomTarget=o.entities.values.slice(0))});return}if(Array.isArray(o)){n._zoomTarget=o.slice(0);return}o=ze(o.values,o),z(o.entities)&&(o=o.entities.values),Array.isArray(o)?n._zoomTarget=o.slice(0):n._zoomTarget=[o]}}),n.scene.requestRender(),s}function ot(n){n._zoomPromise=void 0,n._zoomTarget=void 0,n._zoomOptions=void 0}function go(n){let e=n._zoomPromise;z(e)&&(ot(n),n._completeZoom(!1))}O.prototype._postRender=function(){sm(this),om(this)};function sm(n){let e=n._zoomTarget;if(!z(e)||n.scene.mode===Ce.MORPHING)return;let t=n.scene,r=t.camera,s=ze(n._zoomOptions,{}),o;function a(p){z(s.offset)||(s.offset=new em(0,-.5,p.radius)),o={offset:s.offset,duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)}},n._zoomIsFlight?r.flyToBoundingSphere(e.boundingSphere,o):(r.viewBoundingSphere(p,s.offset),r.lookAtTransform(_o.IDENTITY),n._completeZoom(!0)),ot(n)}if(e instanceof hh){if(z(e.boundingSphere)){a(e.boundingSphere);return}let p=e.frameChanged.addEventListener(function(f){a(f.boundingSphere),p()});return}if(e instanceof lh||e instanceof ch){a(e.boundingSphere);return}if(e instanceof Vd){o={destination:t.mapProjection.ellipsoid.cartographicToCartesian(e),duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)}},n._zoomIsFlight?r.flyTo(o):(r.setView(o),n._completeZoom(!0)),ot(n);return}let l=e,h=[];for(let p=0,f=l.length;p<f;p++){let T=n._dataSourceDisplay.getBoundingSphere(l[p],!1,Me);if(T===He.PENDING)return;T!==He.FAILED&&h.push(uo.clone(Me))}if(h.length===0){go(n);return}n.trackedEntity=void 0;let c=uo.fromBoundingSpheres(h);n._zoomIsFlight?(ot(n),r.flyToBoundingSphere(c,{duration:s.duration,maximumHeight:s.maximumHeight,complete:function(){n._completeZoom(!0)},cancel:function(){n._completeZoom(!1)},offset:s.offset})):(r.viewBoundingSphere(c,s.offset),r.lookAtTransform(_o.IDENTITY),ot(n),n._completeZoom(!0))}function om(n){if(!n._needTrackedEntityUpdate)return;let e=n._trackedEntity,t=n.clock.currentTime,r=im.getValueOrUndefined(e.position,t);if(!z(r))return;let s=n.scene,o=n._dataSourceDisplay.getBoundingSphere(e,!1,Me);if(o===He.PENDING)return;let a=s.mode;(a===Ce.COLUMBUS_VIEW||a===Ce.SCENE2D)&&(s.screenSpaceCameraController.enableTranslate=!1),(a===Ce.COLUMBUS_VIEW||a===Ce.SCENE3D)&&(s.screenSpaceCameraController.enableTilt=!1);let l=o!==He.FAILED?Me:void 0;n._entityView=new Kd(e,s,s.mapProjection.ellipsoid),n._entityView.update(t,l),n._needTrackedEntityUpdate=!1}var at=O;var yo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget hawkeye-map",null),this._wrapper.setAttribute("id",v.uuid()),this._map=void 0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("hawkeye_map")}_mountContent(){let e=new at(this._wrapper,{sceneMode:i.Cesium.SceneMode.SCENE2D});e.imageryLayers.removeAll(),v.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(A.CAMERA_CHANGED,this._syncMap,this)}_unbindEvent(){this._viewer.off(A.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.Cesium.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.Cesium.Cartesian3.distance(t,this._viewer.scene.camera.positionWC);this._map.scene.camera.lookAt(t,new i.Cesium.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.Cesium.ImageryLayer.fromProviderAsync(t,{}))})),this)}};M.registerType("hawkeye_map");var mh=yo;var vo=class extends M{constructor(){super(),this._wrapper=S.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=d.INITIALIZED}get type(){return M.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(A.POST_RENDER,this._postRenderHandler,this)}_unbindEvent(){this._viewer.off(A.POST_RENDER,this._postRenderHandler,this)}_postRenderHandler(){let e=this._viewer.camera.heading;this._outRing&&(this._outRing.style.cssText=`
15951
15951
  transform : rotate(-${e}rad);
15952
15952
  -webkit-transform : rotate(-${e}rad);
15953
- `)}_mountContent(){S.create("div","out-ring-bg",this._wrapper),this._outRing=S.parseDom($.compass_outer,!0,"out-ring"),this._wrapper.appendChild(this._outRing),this._gyro=S.parseDom($.compass_inner,!0,"gyro"),this._wrapper.appendChild(this._gyro),this._rotation_marker=S.parseDom($.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.Cesium.SceneMode.MORPHING)return!0;this._compassRectangle=e.currentTarget.getBoundingClientRect();let r=this._compassRectangle.width/2,s=this._getVector(e),o=i.Cesium.Cartesian2.magnitude(s)/r;if(o<50/145)this._orbit(s);else if(o<1)this._rotate(s);else return!0}_handleDoubleClick(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs)return!0;if(e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW&&!r.enableTranslate||(e.mode===i.Cesium.SceneMode.SCENE3D||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)&&(!r.enableLook||e.mode===i.Cesium.SceneMode.SCENE3D&&!r.enableRotate))return;let s=this._getCameraFocus(!0);if(!s)return;let o=e.globe.ellipsoid.cartographicToCartesian(t.positionCartographic),a=e.globe.ellipsoid.geodeticSurfaceNormal(s),l=new i.Cesium.BoundingSphere(s,0);t.flyToBoundingSphere(l,{offset:new i.Cesium.HeadingPitchRange(0,i.Cesium.Math.PI_OVER_TWO-i.Cesium.Cartesian3.angleBetween(a,t.directionWC),i.Cesium.Cartesian3.distance(o,s)),duration:1.5})}_getCameraFocus(e){let t=new i.Cesium.Cartesian3,r=this._viewer.scene,s=r.camera;if(r.mode!==i.Cesium.SceneMode.MORPHING){if(this._viewer.delegate.trackedEntity)t=this._viewer.delegate.trackedEntity.position.getValue(this._viewer.clock.currentTime);else{let o=new i.Cesium.Ray;o.origin=s.positionWC,o.direction=s.directionWC,t=r.globe.pick(o,r)}if(t){if(r.mode===i.Cesium.SceneMode.SCENE2D||r.mode===i.Cesium.SceneMode.COLUMBUS_VIEW){t=s.worldToCameraCoordinatesPoint(t);let o=new i.Cesium.Cartographic;e&&(t=r.globe.ellipsoid.cartographicToCartesian(r.mapProjection.unproject(t,o)))}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.Cesium.SceneMode.MORPHING||!r.enableInputs)){switch(t.mode){case i.Cesium.SceneMode.COLUMBUS_VIEW:if(r.enableLook)break;if(!r.enableTranslate||!r.enableTilt)return;break;case i.Cesium.SceneMode.SCENE3D:if(r.enableLook)break;if(!r.enableTilt||!r.enableRotate)return;break;case i.Cesium.SceneMode.SCENE2D:if(!r.enableTranslate)return;break}if(this._mouseMoveHandle=o=>{this._orbitMouseMoveFunction(o)},this._mouseUpHandle=()=>{this._orbitMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._orbitLastTimestamp=i.Cesium.getTimestamp(),this._viewer.delegate.trackedEntity)this._orbitFrame=void 0,this._orbitIsLook=!1;else{let o=this._getCameraFocus(!0);o?(this._orbitFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(o,t.globe.ellipsoid),this._orbitIsLook=!1):(this._orbitFrame=i.Cesium.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.Cesium.getTimestamp(),s=r-this._orbitLastTimestamp,o=(this._orbitCursorOpacity-.5)*2.5/1e3,a=s*o,l=this._orbitCursorAngle+i.Cesium.Math.PI_OVER_TWO,h=Math.cos(l)*a,c=Math.sin(l)*a,d;this._orbitFrame&&(d=i.Cesium.Matrix4.clone(t.transform),t.lookAtTransform(this._orbitFrame)),e.mode===i.Cesium.SceneMode.SCENE2D?t.move(new i.Cesium.Cartesian3(h,c,0),Math.max(e.canvas.clientWidth,e.canvas.clientHeight)/100*t.positionCartographic.height*a):this._orbitIsLook?(t.look(i.Cesium.Cartesian3.UNIT_Z,-h),t.look(t.right,-c)):(t.rotateLeft(h),t.rotateUp(c)),this._orbitFrame&&d&&t.lookAtTransform(d),this._orbitLastTimestamp=r}_updateAngleAndOpacity(e,t){let r=Math.atan2(-e.y,e.x);this._orbitCursorAngle=i.Cesium.Math.zeroToTwoPi(r-i.Cesium.Math.PI_OVER_TWO);let s=i.Cesium.Cartesian2.magnitude(e),o=t/2,a=Math.min(s/o,1);this._orbitCursorOpacity=.5*a*a+.5,this._rotation_marker.style.cssText=`
15953
+ `)}_mountContent(){S.create("div","out-ring-bg",this._wrapper),this._outRing=S.parseDom($.compass_outer,!0,"out-ring"),this._wrapper.appendChild(this._outRing),this._gyro=S.parseDom($.compass_inner,!0,"gyro"),this._wrapper.appendChild(this._gyro),this._rotation_marker=S.parseDom($.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.Cesium.SceneMode.MORPHING)return!0;this._compassRectangle=e.currentTarget.getBoundingClientRect();let r=this._compassRectangle.width/2,s=this._getVector(e),o=i.Cesium.Cartesian2.magnitude(s)/r;if(o<50/145)this._orbit(s);else if(o<1)this._rotate(s);else return!0}_handleDoubleClick(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs)return!0;if(e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW&&!r.enableTranslate||(e.mode===i.Cesium.SceneMode.SCENE3D||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)&&(!r.enableLook||e.mode===i.Cesium.SceneMode.SCENE3D&&!r.enableRotate))return;let s=this._getCameraFocus(!0);if(!s)return;let o=e.globe.ellipsoid.cartographicToCartesian(t.positionCartographic),a=e.globe.ellipsoid.geodeticSurfaceNormal(s),l=new i.Cesium.BoundingSphere(s,0);t.flyToBoundingSphere(l,{offset:new i.Cesium.HeadingPitchRange(0,i.Cesium.Math.PI_OVER_TWO-i.Cesium.Cartesian3.angleBetween(a,t.directionWC),i.Cesium.Cartesian3.distance(o,s)),duration:1.5})}_getCameraFocus(e){let t=new i.Cesium.Cartesian3,r=this._viewer.scene,s=r.camera;if(r.mode!==i.Cesium.SceneMode.MORPHING){if(this._viewer.delegate.trackedEntity)t=this._viewer.delegate.trackedEntity.position.getValue(this._viewer.clock.currentTime);else{let o=new i.Cesium.Ray;o.origin=s.positionWC,o.direction=s.directionWC,t=r.globe.pick(o,r)}if(t){if(r.mode===i.Cesium.SceneMode.SCENE2D||r.mode===i.Cesium.SceneMode.COLUMBUS_VIEW){t=s.worldToCameraCoordinatesPoint(t);let o=new i.Cesium.Cartographic;e&&(t=r.globe.ellipsoid.cartographicToCartesian(r.mapProjection.unproject(t,o)))}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.Cesium.SceneMode.MORPHING||!r.enableInputs)){switch(t.mode){case i.Cesium.SceneMode.COLUMBUS_VIEW:if(r.enableLook)break;if(!r.enableTranslate||!r.enableTilt)return;break;case i.Cesium.SceneMode.SCENE3D:if(r.enableLook)break;if(!r.enableTilt||!r.enableRotate)return;break;case i.Cesium.SceneMode.SCENE2D:if(!r.enableTranslate)return;break}if(this._mouseMoveHandle=o=>{this._orbitMouseMoveFunction(o)},this._mouseUpHandle=()=>{this._orbitMouseUpFunction()},document.removeEventListener("mousemove",this._mouseMoveHandle,!1),document.removeEventListener("mouseup",this._mouseUpHandle,!1),this._orbitLastTimestamp=i.Cesium.getTimestamp(),this._viewer.delegate.trackedEntity)this._orbitFrame=void 0,this._orbitIsLook=!1;else{let o=this._getCameraFocus(!0);o?(this._orbitFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(o,t.globe.ellipsoid),this._orbitIsLook=!1):(this._orbitFrame=i.Cesium.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.Cesium.getTimestamp(),s=r-this._orbitLastTimestamp,o=(this._orbitCursorOpacity-.5)*2.5/1e3,a=s*o,l=this._orbitCursorAngle+i.Cesium.Math.PI_OVER_TWO,h=Math.cos(l)*a,c=Math.sin(l)*a,p;this._orbitFrame&&(p=i.Cesium.Matrix4.clone(t.transform),t.lookAtTransform(this._orbitFrame)),e.mode===i.Cesium.SceneMode.SCENE2D?t.move(new i.Cesium.Cartesian3(h,c,0),Math.max(e.canvas.clientWidth,e.canvas.clientHeight)/100*t.positionCartographic.height*a):this._orbitIsLook?(t.look(i.Cesium.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.Cesium.Math.zeroToTwoPi(r-i.Cesium.Math.PI_OVER_TWO);let s=i.Cesium.Cartesian2.magnitude(e),o=t/2,a=Math.min(s/o,1);this._orbitCursorOpacity=.5*a*a+.5,this._rotation_marker.style.cssText=`
15954
15954
  transform: rotate(-${this._orbitCursorAngle}rad);
15955
- 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.Cesium.SceneMode.MORPHING||t.mode===i.Cesium.SceneMode.SCENE2D||!s.enableInputs||!s.enableLook&&(t.mode===i.Cesium.SceneMode.COLUMBUS_VIEW||t.mode===i.Cesium.SceneMode.SCENE3D&&!s.enableRotate))return;if(this._mouseMoveHandle=a=>{this._rotateMouseMoveFunction(a)},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 a=this._getCameraFocus(!0);!a||t.mode===i.Cesium.SceneMode.COLUMBUS_VIEW&&!s.enableLook&&!s.enableTranslate?this._rotateFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(r.positionWC,t.globe.ellipsoid):this._rotateFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(a,t.globe.ellipsoid)}let o;this._rotateFrame&&(o=i.Cesium.Matrix4.clone(r.transform),r.lookAtTransform(this._rotateFrame)),this._rotateInitialCameraAngle=-r.heading,this._rotateFrame&&o&&r.lookAtTransform(o),document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1)}_rotateMouseMoveFunction(e){let t=this._viewer.camera,r=this._getVector(e),o=Math.atan2(-r.y,r.x)-this._rotateInitialCursorAngle,a=i.Cesium.Math.zeroToTwoPi(this._rotateInitialCameraAngle-o),l;this._rotateFrame&&(l=i.Cesium.Matrix4.clone(t.transform),t.lookAtTransform(this._rotateFrame));let h=-t.heading;t.rotateRight(a-h),this._rotateFrame&&l&&t.lookAtTransform(l)}_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.Cesium.Cartesian2((t.right-t.left)/2,(t.bottom-t.top)/2),s=new i.Cesium.Cartesian2(e.clientX-t.left,e.clientY-t.top),o=new i.Cesium.Cartesian2;return i.Cesium.Cartesian2.subtract(s,r,o),o}};M.registerType("compass");var uh=vo;var _h=new i.Cesium.EllipsoidGeodesic,Re=[1,2,3,5],wo=[...Re,...Re.map(n=>n*10),...Re.map(n=>n*100),...Re.map(n=>n*1e3),...Re.map(n=>n*1e4),...Re.map(n=>n*1e5),...Re.map(n=>n*1e6)],To=class extends M{constructor(){super(),this._wrapper=S.create("div","widget distance-legend"),this._labelEl=void 0,this._scaleBarEl=void 0,this._lastUpdate=i.Cesium.getTimestamp(),this._state=p.INITIALIZED}get type(){return M.getWidgetType("distance_legend")}_installHook(){let e=this;Object.defineProperty(this._viewer,"distanceLegend",{get(){return e}})}_bindEvent(){this._viewer.on(A.POST_RENDER,this._updateContent,this)}_unbindEvent(){this._viewer.off(A.POST_RENDER,this._updateContent,this)}_updateContent(e,t){let r=i.Cesium.getTimestamp();if(r<this._lastUpdate+250||!this._labelEl||!this._scaleBarEl)return;this._lastUpdate=r;let s=e.canvas.width,o=e.canvas.height,a=e.camera.getPickRay(new i.Cesium.Cartesian2(s/2|0,o-1)),l=e.camera.getPickRay(new i.Cesium.Cartesian2(1+s/2|0,o-1)),h=e.globe.pick(a,e),c=e.globe.pick(l,e);if(!h||!c)return;_h.setEndPoints(e.globe.ellipsoid.cartesianToCartographic(h),e.globe.ellipsoid.cartesianToCartographic(c));let d=_h.surfaceDistance,f=100,T=0;for(let y=wo.length-1;y>=0;--y)if(wo[y]/d<f){T=wo[y];break}if(T){this._wrapper.style.visibility="visible",this._labelEl.innerHTML=T>=1e3?`${T/1e3} km`:`${T} m`;let y=T/d|0;this._scaleBarEl.style.cssText=`width: ${y}px; left: ${(125-y)/2}px;`}}_mountContent(){this._labelEl=S.create("div","label",this._wrapper),this._scaleBarEl=S.create("div","scale-bar",this._wrapper),this._wrapper.style.visibility="hidden",this._ready=!0}};M.registerType("distance_legend");var fh=To;var Co=class extends M{constructor(){super(),this._wrapper=S.create("div","widget zoom-controller"),this._zoomInEl=void 0,this._zoomOutEl=void 0,this._refreshEl=void 0,this._state=p.INITIALIZED}get type(){return M.getWidgetType("zoom_controller")}_getCameraFocus(e){let t=new i.Cesium.Ray(e.camera.positionWC,e.camera.directionWC),r=i.Cesium.IntersectionTests.rayEllipsoid(t,i.Cesium.Ellipsoid.WGS84);return r?i.Cesium.Ray.getPoint(t,r.start):i.Cesium.IntersectionTests.grazingAltitudeLocation(t,i.Cesium.Ellipsoid.WGS84)}_getCameraPosition(e,t,r){let s=new i.Cesium.Cartesian3,o=i.Cesium.Cartesian3.subtract(t,e.position,s),a=i.Cesium.Cartesian3.multiplyByScalar(o,r,s);return i.Cesium.Cartesian3.add(e.position,a,s)}_zoomIn(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.Cesium.SceneMode.SCENE2D)t.zoomIn(t.positionCartographic.height*.5);else if(e.mode===i.Cesium.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,1/2);t.flyTo({destination:o,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.Cesium.SceneMode.MORPHING||!r.enableInputs||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.Cesium.SceneMode.SCENE2D)t.zoomOut(t.positionCartographic.height);else if(e.mode===i.Cesium.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,-1);t.flyTo({destination:o,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=S.parseDom($.increase,!0,"zoom-in"),this._refreshEl=S.parseDom($.refresh,!0,"refresh"),this._zoomOutEl=S.parseDom($.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}};M.registerType("zoom_controller");var gh=Co;var xo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget loading-mask"),this._state=p.INITIALIZED}get type(){return M.getWidgetType("loading_mask")}_installHook(){let e=this;Object.defineProperty(this._viewer,"loadingMask",{get(){return e}})}_mountContent(){let e=S.parseDom(`
15955
+ 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.Cesium.SceneMode.MORPHING||t.mode===i.Cesium.SceneMode.SCENE2D||!s.enableInputs||!s.enableLook&&(t.mode===i.Cesium.SceneMode.COLUMBUS_VIEW||t.mode===i.Cesium.SceneMode.SCENE3D&&!s.enableRotate))return;if(this._mouseMoveHandle=a=>{this._rotateMouseMoveFunction(a)},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 a=this._getCameraFocus(!0);!a||t.mode===i.Cesium.SceneMode.COLUMBUS_VIEW&&!s.enableLook&&!s.enableTranslate?this._rotateFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(r.positionWC,t.globe.ellipsoid):this._rotateFrame=i.Cesium.Transforms.eastNorthUpToFixedFrame(a,t.globe.ellipsoid)}let o;this._rotateFrame&&(o=i.Cesium.Matrix4.clone(r.transform),r.lookAtTransform(this._rotateFrame)),this._rotateInitialCameraAngle=-r.heading,this._rotateFrame&&o&&r.lookAtTransform(o),document.addEventListener("mousemove",this._mouseMoveHandle,!1),document.addEventListener("mouseup",this._mouseUpHandle,!1)}_rotateMouseMoveFunction(e){let t=this._viewer.camera,r=this._getVector(e),o=Math.atan2(-r.y,r.x)-this._rotateInitialCursorAngle,a=i.Cesium.Math.zeroToTwoPi(this._rotateInitialCameraAngle-o),l;this._rotateFrame&&(l=i.Cesium.Matrix4.clone(t.transform),t.lookAtTransform(this._rotateFrame));let h=-t.heading;t.rotateRight(a-h),this._rotateFrame&&l&&t.lookAtTransform(l)}_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.Cesium.Cartesian2((t.right-t.left)/2,(t.bottom-t.top)/2),s=new i.Cesium.Cartesian2(e.clientX-t.left,e.clientY-t.top),o=new i.Cesium.Cartesian2;return i.Cesium.Cartesian2.subtract(s,r,o),o}};M.registerType("compass");var uh=vo;var _h=new i.Cesium.EllipsoidGeodesic,Re=[1,2,3,5],wo=[...Re,...Re.map(n=>n*10),...Re.map(n=>n*100),...Re.map(n=>n*1e3),...Re.map(n=>n*1e4),...Re.map(n=>n*1e5),...Re.map(n=>n*1e6)],To=class extends M{constructor(){super(),this._wrapper=S.create("div","widget distance-legend"),this._labelEl=void 0,this._scaleBarEl=void 0,this._lastUpdate=i.Cesium.getTimestamp(),this._state=d.INITIALIZED}get type(){return M.getWidgetType("distance_legend")}_installHook(){let e=this;Object.defineProperty(this._viewer,"distanceLegend",{get(){return e}})}_bindEvent(){this._viewer.on(A.POST_RENDER,this._updateContent,this)}_unbindEvent(){this._viewer.off(A.POST_RENDER,this._updateContent,this)}_updateContent(e,t){let r=i.Cesium.getTimestamp();if(r<this._lastUpdate+250||!this._labelEl||!this._scaleBarEl)return;this._lastUpdate=r;let s=e.canvas.width,o=e.canvas.height,a=e.camera.getPickRay(new i.Cesium.Cartesian2(s/2|0,o-1)),l=e.camera.getPickRay(new i.Cesium.Cartesian2(1+s/2|0,o-1)),h=e.globe.pick(a,e),c=e.globe.pick(l,e);if(!h||!c)return;_h.setEndPoints(e.globe.ellipsoid.cartesianToCartographic(h),e.globe.ellipsoid.cartesianToCartographic(c));let p=_h.surfaceDistance,f=100,T=0;for(let y=wo.length-1;y>=0;--y)if(wo[y]/p<f){T=wo[y];break}if(T){this._wrapper.style.visibility="visible",this._labelEl.innerHTML=T>=1e3?`${T/1e3} km`:`${T} m`;let y=T/p|0;this._scaleBarEl.style.cssText=`width: ${y}px; left: ${(125-y)/2}px;`}}_mountContent(){this._labelEl=S.create("div","label",this._wrapper),this._scaleBarEl=S.create("div","scale-bar",this._wrapper),this._wrapper.style.visibility="hidden",this._ready=!0}};M.registerType("distance_legend");var fh=To;var Co=class extends M{constructor(){super(),this._wrapper=S.create("div","widget zoom-controller"),this._zoomInEl=void 0,this._zoomOutEl=void 0,this._refreshEl=void 0,this._state=d.INITIALIZED}get type(){return M.getWidgetType("zoom_controller")}_getCameraFocus(e){let t=new i.Cesium.Ray(e.camera.positionWC,e.camera.directionWC),r=i.Cesium.IntersectionTests.rayEllipsoid(t,i.Cesium.Ellipsoid.WGS84);return r?i.Cesium.Ray.getPoint(t,r.start):i.Cesium.IntersectionTests.grazingAltitudeLocation(t,i.Cesium.Ellipsoid.WGS84)}_getCameraPosition(e,t,r){let s=new i.Cesium.Cartesian3,o=i.Cesium.Cartesian3.subtract(t,e.position,s),a=i.Cesium.Cartesian3.multiplyByScalar(o,r,s);return i.Cesium.Cartesian3.add(e.position,a,s)}_zoomIn(){let e=this._viewer.scene,t=e.camera,r=e.screenSpaceCameraController;if(e.mode===i.Cesium.SceneMode.MORPHING||!r.enableInputs||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.Cesium.SceneMode.SCENE2D)t.zoomIn(t.positionCartographic.height*.5);else if(e.mode===i.Cesium.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,1/2);t.flyTo({destination:o,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.Cesium.SceneMode.MORPHING||!r.enableInputs||e.mode===i.Cesium.SceneMode.COLUMBUS_VIEW)return!0;if(e.mode===i.Cesium.SceneMode.SCENE2D)t.zoomOut(t.positionCartographic.height);else if(e.mode===i.Cesium.SceneMode.SCENE3D){let s=this._getCameraFocus(e),o=this._getCameraPosition(t,s,-1);t.flyTo({destination:o,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=S.parseDom($.increase,!0,"zoom-in"),this._refreshEl=S.parseDom($.refresh,!0,"refresh"),this._zoomOutEl=S.parseDom($.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}};M.registerType("zoom_controller");var gh=Co;var xo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget loading-mask"),this._state=d.INITIALIZED}get type(){return M.getWidgetType("loading_mask")}_installHook(){let e=this;Object.defineProperty(this._viewer,"loadingMask",{get(){return e}})}_mountContent(){let e=S.parseDom(`
15956
15956
  <span></span>
15957
15957
  <span></span>
15958
15958
  <span></span>
15959
15959
  <span></span>
15960
15960
  <span></span>
15961
- `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};M.registerType("loading_mask");var yh=xo;var Eo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=p.INITIALIZED}get type(){return M.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=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.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)}};M.registerType("tileset_split");var vh=Eo;var Po=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=p.INITIALIZED}get type(){return M.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=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.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)}};M.registerType("scene_split");var wh=Po;function bo(){return{popup:new eh,contextMenu:new Ul,tooltip:new th,mapSwitch:new $l,mapSplit:new Ql,locationBar:new Bl,hawkeyeMap:new mh,compass:new uh,distanceLegend:new fh,zoomController:new gh,loadingMask:new yh,tilesetSplit:new vh,sceneSplit:new wh}}var Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/jl75/evEte//vnz//e/Dl3d/nrye8P//fwF0fSicv28/Vv7/////t8W7/79Wi///gt0DBb9zLfv/89Cl/3/fff7w//9/A2S9cK/9//i1g4GZqeSdcwnzn4v38HmXgSs3gIGnKfEXIyebOQMDwwWQGMwgh/9fvu8hxhAY4Ix1ZeCdnPOTkYNNgoGB4QMT2DWfv6/50riIaENA4Pvi3Qy/T99k//v0TQOIDzLI4P/nb/zfJm8g2hAY+Nq8hIFJmC8DbNDfp28Sfqw7zEKyKQwMDL8OXQKFLShsDJgYmRhN/j58SY45YPDn1hMOUFpjYmBj5aHEIBhg+vvw5QVWPWWyDWBkY/kBoplYjVQPsOgrkWeIADcDq7kmyGsXQLG2gd3XkoFZXpxkg7hzAhn+3nl6HpaOPvx79X4+35xikgwBWcxVEPSXWUW6iAGajhiYxASLWLTkHxNrGMhLAmsb/v57+2klAwPDAbAYUjEi8O/tp0t/rj2U/ZTSy4ArJtns9Bj4F5T9YWBk2M4kKewHNxytPBL49+p9H5OYYOLPzcfBCQ6WbUAGsAdY/2VWkfrz/+PXIiZxwWkorsRRsCn8e/cp8v+nb/aMvFygTMnw/8v3q8zy4rsZGBgWYKhmYGAAAN6EGE9igaT+AAAAAElFTkSuQmCC";var wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAAB+klEQVQ4jZ2UT2gTQRTGv5nd7G7TsNnW1QimWC+CghBEqJ7sSTx50oM3iwhejSJ486J4qdWLt6JXsQdPVdRDj0WQBqEehKJotLbEbrLNJvtnZlYmZEub1rLJB8Mw8+b9Zt7Me0PiOMY+KgGwuubv3ba3JKinjUfBj7dC+D6L1tt+82Pke5/agnsRZ+4GC38/iePY6vXbcSLBnXtUGXnYdObQWJ8BC6s7NjeGzyJfuAXNONGgSn4SQCWxbYEE33xECL3zZ+WyEvpf9gsXpn0dVuFuSKgxkcAS0GQsvA9pIIlyI1cweuRBQIh+GECddk4jvLn62nRqiFTTeYWgtaTzaPW+HEtQKeabebc2mxqSqLE2A6qO3uyAeLR6rdWYV/umAPC9RQjuyrspUYCeYVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=";var lm={icon_center:wt,icon_anchor:Ne,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},So=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.Cesium.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new Ye,this._tooltipMess=void 0}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){let{overlay:t,layer:r,position:s,surfacePosition:o}=e;return!this._options.clampToModel||!t&&!r?o:s}_onClick(e){let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:t})),this._plotEvent.fire(C.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(C.ANCHOR_MOVING,t)}_onRightClick(e){this._plotEvent.fire(C.DRAW_STOP,this._getEventPosition(e))}_onCreateAnchor({position:e,isCenter:t=!1}){var r;return 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.Cesium.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cesium.Cartesian3(0,0,-100),disableDepthTestDistance:(r=this._options.disableDepthTestDistance)!=null?r:0,heightReference:this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&!this._options.clampToModel?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE}})}_onClearAnchor(){this._anchorLayer.entities.removeAll()}_bindEvent(){this._viewer.on(L.CLICK,this._onClick,this),this._viewer.on(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(C.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(L.CLICK,this._onClick,this),this._viewer.off(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(C.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={...lm,...e},this._unbindEvent(),this._bindEvent(),this.fire(C.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},Th=So;var Ch="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 cm={icon_center:wt,icon_anchor:Ne,icon_midAnchor:Ch,icon_size:[12,12],clampToModel:!0},Io=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.Cesium.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new Ye,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(C.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(C.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:t})):this._anchors.length===0&&this._plotEvent.fire(C.ANCHOR_MOVING,{position:t})}_onRightClick(e){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(C.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:t})}_onCreateAnchor({position:e,index:t,isCenter:r=!1,isMid:s=!1}){var l;let o=s?this._options.icon_midAnchor:r?this._options.icon_center:this._options.icon_anchor,a=this._anchorLayer.entities.add({position:e,billboard:{image:o,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cesium.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cesium.Cartesian3(0,0,-100),disableDepthTestDistance:(l=this._options.disableDepthTestDistance)!=null?l:0,heightReference:this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&!this._options.clampToModel?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},properties:{isMid:s,index:t}});this._anchors.push(a)}_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(L.CLICK,this._onClick,this),this._viewer.on(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(C.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(C.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(L.CLICK,this._onClick,this),this._viewer.off(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(C.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(C.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={...cm,...e},this._unbindEvent(),this._bindEvent(),this.fire(C.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})}},xh=Io;function Mo(){return{drawTool:new Th,editTool:new xh}}var dm={creditContainer:void 0,shouldAnimate:!0},Ao=class{constructor(e,t={}){if(!ut("isInitialized"))throw new Error("please do the ready function");if(!e||typeof e=="string"&&!document.getElementById(e))throw new Error("Viewer: the container is empty");if(e instanceof HTMLElement)throw new Error("Viewer: not support the type container");if(typeof e=="string"){let o=ut("baseUrl");o&&i.Cesium.buildModuleUrl.setBaseUrl(o)}this._delegate=typeof e!="string"?e:new at(e,{...dm,...t}),new _i(this,t),this._viewerEvent=new gi,this._sceneEvent=new vi(this),this._viewerOption=new Ks(this),this._cameraOption=new $s(this),this._widgetContainer=S.create("div","viewer-widgets",typeof e=="string"?document.getElementById(e):this._delegate.container),this._layerContainer=S.create("div","viewer-layers",typeof e=="string"?document.getElementById(e):this._delegate.container),this._baseLayerPicker=new ho({globe:this._delegate.scene.globe}),this._layerGroupCache={},this._layerCache={};let r=bo();Object.keys(r).forEach(o=>{this._use(r[o])});let s=Mo();Object.keys(s).forEach(o=>{this._use(s[o])})}get delegate(){return this._delegate}get container(){return this._delegate.container}get widgetContainer(){return this._widgetContainer}get layerContainer(){return this._layerContainer}get scene(){return this._delegate.scene}get camera(){return this._delegate.camera}get canvas(){return this._delegate.scene.canvas}get dataSources(){return this._delegate.dataSources}get imageryLayers(){return this._delegate.imageryLayers}get terrainProvider(){return this._delegate.terrainProvider}get entities(){return this._delegate.entities}get postProcessStages(){return this._delegate.scene.postProcessStages}get clock(){return this._delegate.clock}get viewerEvent(){return this._viewerEvent}get cameraPosition(){var t,r,s,o,a,l,h;let e=u.transformCartographicToWGS84((t=this.camera)==null?void 0:t.positionCartographic);return e&&(e.heading=i.Cesium.Math.toDegrees((s=(r=this.camera)==null?void 0:r.heading)!=null?s:0),e.pitch=i.Cesium.Math.toDegrees((a=(o=this.camera)==null?void 0:o.pitch)!=null?a:0),e.roll=i.Cesium.Math.toDegrees((h=(l=this.camera)==null?void 0:l.roll)!=null?h:0)),e}get resolution(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cesium.Cartesian2(e/2|0,t-1),this),s=u.transformWindowToWGS84(new i.Cesium.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.Cesium.Cartesian2(0,t),this),s=u.transformWindowToWGS84(new i.Cesium.Cartesian2(e,0),this);return!r||!s?i.Cesium.Rectangle.MAX_VALUE:i.Cesium.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,o=-40467.74;return Math.round(o+(t-o)/(1+Math.pow(e/s,r)))}_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(Se.ADD,this),this._layerGroupCache[e.id]=e)}_removeLayerGroup(e){e!=null&&e.layerGroupEvent&&Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(Se.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(Ie.ADD,this),this._layerCache[e.type][e.id]=e)}_removeLayer(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.fire(Ie.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.Cesium.Terrain(e||Promise.resolve(new i.Cesium.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(o=>{e.call(t,s[o])})}),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=_.parsePosition(e),this.camera.flyTo({destination:u.transformWGS84ToCartesian(e),orientation:{heading:i.Cesium.Math.toRadians(e.heading),pitch:i.Cesium.Math.toRadians(e.pitch),roll:i.Cesium.Math.toRadians(e.roll)},complete:t,duration:r}),this}zoomToPosition(e,t){return this.flyToPosition(e,t,0),this}flyToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o,a){return e?(Array.isArray(e)||(e=e.split(",")),this.camera.flyTo({destination:i.Cesium.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]),orientation:{heading:i.Cesium.Math.toRadians(t),pitch:i.Cesium.Math.toRadians(r),roll:i.Cesium.Math.toRadians(s)},complete:o,duration:a}),this):this}zoomToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o){return this.flyToBounds(e,{heading:t,pitch:r,roll:s},o),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"),o=v.dataURLtoBlob(r),a=URL.createObjectURL(o);return s.download=`${e||"scene"}.png`,s.href=a,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}},Eh=Ao;var pm={ARCGIS:"arcgis",BING:"bing",OSM:"osm",SINGLE_TILE:"single_tile",WMS:"wms",WMTS:"wmts",XYZ:"xyz",COORD:"coord",GRID:"grid",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",TMS:"tms"},R=pm;var Do=class extends i.Cesium.WebMercatorTilingScheme{constructor(e){super(e);let t=new i.Cesium.WebMercatorProjection;this._projection.project=function(r,s){return s=he.WGS84ToGCJ02(i.Cesium.Math.toDegrees(r.longitude),i.Cesium.Math.toDegrees(r.latitude)),s=t.project(new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))),new i.Cesium.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){let o=t.unproject(r);return s=he.GCJ02ToWGS84(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude)),new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))}}},Tt=Do;var Ph={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}"},Lo=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Ph[e.style]||Ph.elec].join(""),e.subdomains=e.subdomains||["01","02","03","04"],e.crs==="WGS84"&&(e.tilingScheme=new Tt),super(e)}};R.AMAP="amap";var bh=Lo;var mm=637099681e-2,Sh=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],Ct=[75,60,45,30,15,0],um=[[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]],Ih=[[-.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]],Ro=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 o=this.toRadians(t.lng),a=this.toRadians(t.lat);return this.getDistance(r,o,s,a)}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),o=this.toRadians(t.lng),a=this.toRadians(t.lat);return this.getDistance(r,o,s,a)}convertMC2LL(e){if(!e)return{lng:0,lat:0};let t={};if(this.isWgs84){t.lng=e.lng/2003750834e-2*180;let o=e.lat/2003750834e-2*180;return t.lat=180/Math.PI*(2*Math.atan(Math.exp(o*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 o=0;o<Sh.length;o++)if(r.lat>=Sh[o]){s=um[o];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 o={},a=6378137;o.lng=e.lng*Math.PI/180*a;let l=e.lat*Math.PI/180;return o.lat=a/2*Math.log((1+Math.sin(l))/(1-Math.sin(l))),{lng:parseFloat(o.lng.toFixed(2)),lat:parseFloat(o.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);let t={lng:e.lng,lat:e.lat},r;for(let o=0;o<Ct.length;o++)if(t.lat>=Ct[o]){r=Ih[o];break}if(!r){for(let o=0;o<Ct.length;o++)if(t.lat<=-Ct[o]){r=Ih[o];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],o=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,o*=e.lat<0?-1:1,{lng:r,lat:o}}getDistance(e,t,r,s){return mm*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 o=this.getZoomUnits(t),a=Math.round((e.lng-r.lng)/o+s.width/2),l=Math.round((r.lat-e.lat)/o+s.height/2);return{x:a,y:l}}pixelToPoint(e,t,r,s){if(!e)return{lng:0,lat:0};let o=this.getZoomUnits(t),a=r.lng+o*(e.x-s.width/2),l=r.lat-o*(e.y-s.height/2),h={lng:a,lat:l};return this.mercatorToLngLat(h)}getZoomUnits(e){return Math.pow(2,18-e)}},Mh=Ro;var Oo=class extends i.Cesium.WebMercatorTilingScheme{constructor(e){super(e);let t=new Mh;this._projection.project=function(r,s){return s=s||{},s=he.WGS84ToGCJ02(i.Cesium.Math.toDegrees(r.longitude),i.Cesium.Math.toDegrees(r.latitude)),s=he.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.Cesium.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){return s=s||{},s=t.mercatorToLngLat({lng:r.x,lat:r.y}),s=he.BD09ToGCJ02(s.lng,s.lat),s=he.GCJ02ToWGS84(s[0],s[1]),new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))},this.resolutions=e.resolutions||[]}tileXYToNativeRectangle(e,t,r,s){let o=this.resolutions[r],a=e*o,l=(e+1)*o,h=((t=-t)+1)*o,c=t*o;return i.Cesium.defined(s)?(s.west=a,s.south=c,s.east=l,s.north=h,s):new i.Cesium.Rectangle(a,c,l,h)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Cesium.Rectangle.contains(s,e))return;let a=this._projection.project(e);if(!i.Cesium.defined(a))return;let l=this.resolutions[t],h=Math.floor(a.x/l),c=-Math.floor(a.y/l);return i.Cesium.defined(r)?(r.x=h,r.y=c,r):new i.Cesium.Cartesian2(h,c)}},Ah=Oo;var Dh={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"},ko=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){if(e.url=e.url||[e.protocol||"",Dh[e.style]||Dh.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 Ah({resolutions:t,rectangleSouthwestInMeters:new i.Cesium.Cartesian2(-2003772637e-2,-1247410417e-2),rectangleNortheastInMeters:new i.Cesium.Cartesian2(2003772637e-2,1247410417e-2)})}else e.tilingScheme=new i.Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new i.Cesium.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new i.Cesium.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),o=this._tilingScheme.getNumberOfYTilesAtLevel(r),a=this._url.replace("{z}",r).replace("{s}",String(1)).replace("{style}",this._style);return this._crs==="WGS84"?a=a.replace("{x}",String(e)).replace("{y}",String(-t)):a=a.replace("{x}",String(e-s/2)).replace("{y}",String(o/2-t-1)),i.Cesium.ImageryProvider.loadImage(this,a)}};R.BAIDU="baidu";var Lh=ko;var _m="//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}",Fo=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",_m.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)}};R.GEO_VIS="geoVis";var Rh=Fo;var Oh={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}"},zo=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Oh[e.style]||Oh.elec].join(""),e.crs==="WGS84"&&(e.tilingScheme=new Tt),super(e)}};R.GOOGLE="google";var kh=zo;var fm="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",Ho=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){super({url:[e.protocol||"",fm.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18})}};R.TDT="tdt";var Fh=Ho;var zh={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"},No=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){let t=e.url||[e.protocol||"",zh[e.style]||zh.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,o,a)=>s>>4,sy:(r,s,o,a)=>(1<<a)-o>>4}),super(e)}};R.TENCENT="tencent";var Hh=No;var Wo=class{static createAMapImageryLayer(e){return Promise.resolve(new bh(e))}static createBaiduImageryLayer(e){return Promise.resolve(new Lh(e))}static createGeoVisImageryLayer(e){return Promise.resolve(new Rh(e))}static createGoogleImageryLayer(e){return Promise.resolve(new kh(e))}static createTdtImageryLayer(e){return Promise.resolve(new Fh(e))}static createTencentImageryLayer(e){return Promise.resolve(new Hh(e))}static createArcGisImageryLayer(e){return i.Cesium.ArcGisMapServerImageryProvider.fromUrl(e.url,e)}static createBingImageryLayer(e){return i.Cesium.BingMapsImageryProvider.fromUrl(e.url,e)}static createOSMImageryLayer(e){return Promise.resolve(new i.Cesium.OpenStreetMapImageryProvider(e))}static createSingleTileImageryLayer(e){return i.Cesium.SingleTileImageryProvider.fromUrl(e.url,e)}static createWMSImageryLayer(e){return Promise.resolve(new i.Cesium.WebMapServiceImageryProvider(e))}static createWMTSImageryLayer(e){return Promise.resolve(new i.Cesium.WebMapTileServiceImageryProvider(e))}static createXYZImageryLayer(e){return Promise.resolve(new i.Cesium.UrlTemplateImageryProvider(e))}static createCoordImageryLayer(e){return Promise.resolve(new i.Cesium.TileCoordinatesImageryProvider(e))}static createGridImageryLayer(e){return Promise.resolve(new i.Cesium.GridImageryProvider(e))}static createMapboxImageryLayer(e){return Promise.resolve(new i.Cesium.MapboxImageryProvider(e))}static createMapboxStyleImageryLayer(e){return Promise.resolve(new i.Cesium.MapboxStyleImageryProvider(e))}static createTMSImageryLayer(e){return i.Cesium.TileMapServiceImageryProvider.fromUrl(e.url,e)}static createImageryLayer(e,t){let r;switch(e){case R.AMAP:r=this.createAMapImageryLayer(t);break;case R.BAIDU:r=this.createBaiduImageryLayer(t);break;case R.GEO_VIS:r=this.createGeoVisImageryLayer(t);break;case R.GOOGLE:r=this.createGoogleImageryLayer(t);break;case R.TDT:r=this.createTdtImageryLayer(t);break;case R.TENCENT:r=this.createTencentImageryLayer(t);break;case R.ARCGIS:r=this.createArcGisImageryLayer(t);break;case R.BING:r=this.createBingImageryLayer(t);break;case R.OSM:r=this.createOSMImageryLayer(t);break;case R.SINGLE_TILE:r=this.createSingleTileImageryLayer(t);break;case R.WMS:r=this.createWMSImageryLayer(t);break;case R.WMTS:r=this.createWMTSImageryLayer(t);break;case R.XYZ:r=this.createXYZImageryLayer(t);break;case R.COORD:r=this.createCoordImageryLayer(t);break;case R.GRID:r=this.createGridImageryLayer(t);break;case R.MAPBOX:r=this.createMapboxImageryLayer(t);break;case R.MAPBOX_STYLE:r=this.createMapboxStyleImageryLayer(t);break;case R.TMS:r=this.createTMSImageryLayer(t);break;default:break}return r}},Go=Wo;var Uo=class extends i.Cesium.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.Cesium.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,a=i.Cesium.Math.toRadians(this._origin[0]+e*o),l=i.Cesium.Math.toRadians(this._origin[1]-(t+1)*o),h=i.Cesium.Math.toRadians(this._origin[0]+(e+1)*o),c=i.Cesium.Math.toRadians(this._origin[1]-t*o);return s?(s.west=a,s.south=l,s.east=h,s.north=c,s):new i.Cesium.Rectangle(a,l,h,c)}positionToTileXY(e,t,r){if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cesium.Cartesian2;let s=this._resolutions[t+this._zoomOffset]*this._tileSize,o=i.Cesium.Math.toDegrees(e.longitude),a=i.Cesium.Math.toDegrees(e.latitude),l=Math.floor((o-this._origin[0])/s),h=Math.floor((this._origin[1]-a)/s);return r?(r.x=l,r.y=h,r):new i.Cesium.Cartesian2(Math.max(0,l),Math.max(0,h))}},Bo=Uo;var Vo=class extends i.Cesium.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.Cesium.Rectangle.MAX_VALUE;if(e<0||t<0)return i.Cesium.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,a=this._origin[0]+e*o,l=this._origin[1]-(t+1)*o,h=this._origin[0]+(e+1)*o,c=this._origin[1]-t*o;return s?(s.west=a,s.south=l,s.east=h,s.north=c,s):new i.Cesium.Rectangle(a,l,h,c)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Cesium.Rectangle.contains(s,e))return;if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cesium.Cartesian2;let o=this._resolutions[t+this._zoomOffset]*this._tileSize,l=this._projection.project(e),h=Math.floor((l.x-this._origin[0])/o),c=Math.floor((this._origin[1]-l.y)/o);return r?(r.x=h,r.y=c,r):new i.Cesium.Cartesian2(Math.max(0,h),Math.max(0,c))}},jo=Vo;var gm={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"},xe=gm;var Yo=class{static createEllipsoidTerrain(e){return Promise.resolve(new i.Cesium.EllipsoidTerrainProvider(e))}static createUrlTerrain(e){return i.Cesium.CesiumTerrainProvider.fromUrl(e.url,e)}static createGoogleTerrain(e){return i.Cesium.GoogleEarthEnterpriseTerrainProvider.fromUrl(e.url,e)}static createArcgisTerrain(e){return i.Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}static createVRTerrain(e){return i.Cesium.VRTheWorldTerrainProvider.fromUrl(e.url,e)}static createTerrain(e,t){let r;switch(e){case xe.NONE:r=this.createEllipsoidTerrain(t);break;case xe.XYZ:r=this.createUrlTerrain(t);break;case xe.GOOGLE:r=this.createGoogleTerrain(t);break;case xe.ARCGIS:r=this.createArcgisTerrain(t);break;case xe.VR:r=this.createVRTerrain(t);break;default:break}return r}},Zo=Yo;var Wh=[].indexOf||function(n){for(let e=0,t=this.length;e<t;e++)if(e in this&&this[e]===n)return e;return-1},xt=`attribute vec4 position;
15961
+ `,!0,"loading");this._wrapper.appendChild(e),this._ready=!0}};M.registerType("loading_mask");var yh=xo;var Eo=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._tileset=void 0,this._moveActive=!1,this._state=d.INITIALIZED}get type(){return M.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=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.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)}};M.registerType("tileset_split");var vh=Eo;var Po=class extends M{constructor(){super(),this._wrapper=S.create("div","widget slider"),this._tileset=void 0,this._baseLayer=void 0,this._moveActive=!1,this._state=d.INITIALIZED}get type(){return M.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=S.parseDom($.splitter,!0,"splitter");this._wrapper.appendChild(e);let t=new i.Cesium.ScreenSpaceEventHandler(e),r=this;t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.LEFT_DOWN),t.setInputAction(()=>{r._moveActive=!0},i.Cesium.ScreenSpaceEventType.PINCH_START),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.MOUSE_MOVE),t.setInputAction(s=>{r._moveHandler(s)},i.Cesium.ScreenSpaceEventType.PINCH_MOVE),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.ScreenSpaceEventType.LEFT_UP),t.setInputAction(()=>{r._moveActive=!1},i.Cesium.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)}};M.registerType("scene_split");var wh=Po;function bo(){return{popup:new eh,contextMenu:new Ul,tooltip:new th,mapSwitch:new $l,mapSplit:new Ql,locationBar:new Bl,hawkeyeMap:new mh,compass:new uh,distanceLegend:new fh,zoomController:new gh,loadingMask:new yh,tilesetSplit:new vh,sceneSplit:new wh}}var Ne="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsSAAALEgHS3X78AAACCklEQVQ4jWP8//8/Ax5gwMDAIACVfgDF2AHIIDSs8Of+8x3/vv/88ffFu++/j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iFTTeYWgtaTzaPW+HEtQKeabebc2mxqSqLE2A6qO3uyAeLR6rdWYV/umAPC9RQjuyrspUYCeYVE1hdveioIVQ+YaJSST633mQURZ9KuiDZ0cGECI5sueakOnFjLGYCCqmNCzp2VoFflqr7PmBahasW+QTEwWfFtK8qjOWe35geJ0XxC5sWnf4Kp+rIxuHkFR7bKmH/+ZFiZDOnR0lnPmvASwIOe2F60l2MbnMPg69rd6e1fBJpKFa489ZQB5o2QKl5L53v/I4qz2WFHtqZb7DoG3iLC93DEYuXPImhdlKExwt6yoB59td/zfxzYuuHNV8OZ5SodlUUKI1rKqFd8DeLFrNYB/A6b1Qz9EzRMAAAAASUVORK5CYII=";var lm={icon_center:wt,icon_anchor:Ne,icon_size:[12,12],clampToModel:!1,maxAnchorSize:999},So=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.Cesium.CustomDataSource("draw-anchor-layer"),this._floatingAnchor=void 0,this._options={},this._plotEvent=new Ye,this._tooltipMess=void 0}set tooltipMess(e){this._tooltipMess=e}_getEventPosition(e){let{overlay:t,layer:r,position:s,surfacePosition:o}=e;return!this._options.clampToModel||!t&&!r?o:s}_onClick(e){let t=this._getEventPosition(e);if(!t)return!1;this._floatingAnchor||(this._floatingAnchor=this._onCreateAnchor({position:t})),this._plotEvent.fire(C.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(C.ANCHOR_MOVING,t)}_onRightClick(e){this._plotEvent.fire(C.DRAW_STOP,this._getEventPosition(e))}_onCreateAnchor({position:e,isCenter:t=!1}){var r;return 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.Cesium.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cesium.Cartesian3(0,0,-100),disableDepthTestDistance:(r=this._options.disableDepthTestDistance)!=null?r:0,heightReference:this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&!this._options.clampToModel?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE}})}_onClearAnchor(){this._anchorLayer.entities.removeAll()}_bindEvent(){this._viewer.on(L.CLICK,this._onClick,this),this._viewer.on(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(C.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(L.CLICK,this._onClick,this),this._viewer.off(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(C.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={...lm,...e},this._unbindEvent(),this._bindEvent(),this.fire(C.DRAW_START,this._options),this}deactivate(){return this._unbindEvent(),this._viewer.tooltip.enable=!1,this._anchorLayer.entities.removeAll(),this._floatingAnchor=void 0,this}install(e){this._viewer=e,this._viewer.dataSources.add(this._anchorLayer),Object.defineProperty(this._viewer,"drawTool",{value:this,writable:!1})}},Th=So;var Ch="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 cm={icon_center:wt,icon_anchor:Ne,icon_midAnchor:Ch,icon_size:[12,12],clampToModel:!0},Io=class{constructor(){this._viewer=void 0,this._anchorLayer=new i.Cesium.CustomDataSource("edit-anchor-layer"),this._options={},this._plotEvent=new Ye,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(C.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(C.ANCHOR_MOVING,{pickedAnchor:this._pickedAnchor,position:t})):this._anchors.length===0&&this._plotEvent.fire(C.ANCHOR_MOVING,{position:t})}_onRightClick(e){let t=this._options.clampToModel&&e.position?e.position:e.surfacePosition;this._plotEvent.fire(C.EDIT_STOP,{pickedAnchor:this._pickedAnchor,position:t})}_onCreateAnchor({position:e,index:t,isCenter:r=!1,isMid:s=!1}){var l;let o=s?this._options.icon_midAnchor:r?this._options.icon_center:this._options.icon_anchor,a=this._anchorLayer.entities.add({position:e,billboard:{image:o,width:this._options.icon_size[0],height:this._options.icon_size[1],pixelOffset:this._options.pixelOffset||new i.Cesium.Cartesian2(0,0),eyeOffset:this._options.eyeOffset||new i.Cesium.Cartesian3(0,0,-100),disableDepthTestDistance:(l=this._options.disableDepthTestDistance)!=null?l:0,heightReference:this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&!this._options.clampToModel?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},properties:{isMid:s,index:t}});this._anchors.push(a)}_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(L.CLICK,this._onClick,this),this._viewer.on(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.on(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.on(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.on(C.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.on(C.CLEAR_ANCHOR,this._onClearAnchor,this)}_unbindEvent(){this._viewer.off(L.CLICK,this._onClick,this),this._viewer.off(L.MOUSE_MOVE,this._onMouseMove,this),this._viewer.off(L.RIGHT_CLICK,this._onRightClick,this),this._plotEvent.off(C.CREATE_ANCHOR,this._onCreateAnchor,this),this._plotEvent.off(C.UPDATE_ANCHOR,this._onUpdateAnchor,this),this._plotEvent.off(C.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={...cm,...e},this._unbindEvent(),this._bindEvent(),this.fire(C.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})}},xh=Io;function Mo(){return{drawTool:new Th,editTool:new xh}}var pm={creditContainer:void 0,shouldAnimate:!0},Ao=class{constructor(e,t={}){if(!ut("isInitialized"))throw new Error("please do the ready function");if(!e||typeof e=="string"&&!document.getElementById(e))throw new Error("Viewer: the container is empty");if(e instanceof HTMLElement)throw new Error("Viewer: not support the type container");if(typeof e=="string"){let o=ut("baseUrl");o&&i.Cesium.buildModuleUrl.setBaseUrl(o)}this._delegate=typeof e!="string"?e:new at(e,{...pm,...t}),new _i(this,t),this._viewerEvent=new gi,this._sceneEvent=new vi(this),this._viewerOption=new Ks(this),this._cameraOption=new $s(this),this._widgetContainer=S.create("div","viewer-widgets",typeof e=="string"?document.getElementById(e):this._delegate.container),this._layerContainer=S.create("div","viewer-layers",typeof e=="string"?document.getElementById(e):this._delegate.container),this._baseLayerPicker=new ho({globe:this._delegate.scene.globe}),this._layerGroupCache={},this._layerCache={};let r=bo();Object.keys(r).forEach(o=>{this._use(r[o])});let s=Mo();Object.keys(s).forEach(o=>{this._use(s[o])})}get delegate(){return this._delegate}get container(){return this._delegate.container}get widgetContainer(){return this._widgetContainer}get layerContainer(){return this._layerContainer}get scene(){return this._delegate.scene}get camera(){return this._delegate.camera}get canvas(){return this._delegate.scene.canvas}get dataSources(){return this._delegate.dataSources}get imageryLayers(){return this._delegate.imageryLayers}get terrainProvider(){return this._delegate.terrainProvider}get entities(){return this._delegate.entities}get postProcessStages(){return this._delegate.scene.postProcessStages}get clock(){return this._delegate.clock}get viewerEvent(){return this._viewerEvent}get cameraPosition(){var t,r,s,o,a,l,h;let e=u.transformCartographicToWGS84((t=this.camera)==null?void 0:t.positionCartographic);return e&&(e.heading=i.Cesium.Math.toDegrees((s=(r=this.camera)==null?void 0:r.heading)!=null?s:0),e.pitch=i.Cesium.Math.toDegrees((a=(o=this.camera)==null?void 0:o.pitch)!=null?a:0),e.roll=i.Cesium.Math.toDegrees((h=(l=this.camera)==null?void 0:l.roll)!=null?h:0)),e}get resolution(){let e=this.scene.canvas.width,t=this.scene.canvas.height,r=u.transformWindowToWGS84(new i.Cesium.Cartesian2(e/2|0,t-1),this),s=u.transformWindowToWGS84(new i.Cesium.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.Cesium.Cartesian2(0,t),this),s=u.transformWindowToWGS84(new i.Cesium.Cartesian2(e,0),this);return!r||!s?i.Cesium.Rectangle.MAX_VALUE:i.Cesium.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,o=-40467.74;return Math.round(o+(t-o)/(1+Math.pow(e/s,r)))}_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(Se.ADD,this),this._layerGroupCache[e.id]=e)}_removeLayerGroup(e){e!=null&&e.layerGroupEvent&&Object(this._layerGroupCache).hasOwnProperty(e.id)&&(e.layerGroupEvent.fire(Se.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(Ie.ADD,this),this._layerCache[e.type][e.id]=e)}_removeLayer(e){Object(this._layerCache[e.type]).hasOwnProperty(e.id)&&(e.fire(Ie.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.Cesium.Terrain(e||Promise.resolve(new i.Cesium.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}getBaseLayer(e){return this._baseLayerPicker.getImageryLayer(e)}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(o=>{e.call(t,s[o])})}),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=_.parsePosition(e),this.camera.flyTo({destination:u.transformWGS84ToCartesian(e),orientation:{heading:i.Cesium.Math.toRadians(e.heading),pitch:i.Cesium.Math.toRadians(e.pitch),roll:i.Cesium.Math.toRadians(e.roll)},complete:t,duration:r}),this}zoomToPosition(e,t){return this.flyToPosition(e,t,0),this}flyToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o,a){return e?(Array.isArray(e)||(e=e.split(",")),this.camera.flyTo({destination:i.Cesium.Rectangle.fromDegrees(e[0],e[1],e[2],e[3]),orientation:{heading:i.Cesium.Math.toRadians(t),pitch:i.Cesium.Math.toRadians(r),roll:i.Cesium.Math.toRadians(s)},complete:o,duration:a}),this):this}zoomToBounds(e,{heading:t=0,pitch:r=0,roll:s=0},o){return this.flyToBounds(e,{heading:t,pitch:r,roll:s},o),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"),o=v.dataURLtoBlob(r),a=URL.createObjectURL(o);return s.download=`${e||"scene"}.png`,s.href=a,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}},Eh=Ao;var dm={ARCGIS:"arcgis",BING:"bing",OSM:"osm",SINGLE_TILE:"single_tile",WMS:"wms",WMTS:"wmts",XYZ:"xyz",COORD:"coord",GRID:"grid",MAPBOX:"mapbox",MAPBOX_STYLE:"mapbox_style",TMS:"tms"},R=dm;var Do=class extends i.Cesium.WebMercatorTilingScheme{constructor(e){super(e);let t=new i.Cesium.WebMercatorProjection;this._projection.project=function(r,s){return s=he.WGS84ToGCJ02(i.Cesium.Math.toDegrees(r.longitude),i.Cesium.Math.toDegrees(r.latitude)),s=t.project(new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))),new i.Cesium.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){let o=t.unproject(r);return s=he.GCJ02ToWGS84(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude)),new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))}}},Tt=Do;var Ph={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}"},Lo=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Ph[e.style]||Ph.elec].join(""),e.subdomains=e.subdomains||["01","02","03","04"],e.crs==="WGS84"&&(e.tilingScheme=new Tt),super(e)}};R.AMAP="amap";var bh=Lo;var mm=637099681e-2,Sh=[1289059486e-2,836237787e-2,5591021,348198983e-2,167804312e-2,0],Ct=[75,60,45,30,15,0],um=[[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]],Ih=[[-.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]],Ro=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 o=this.toRadians(t.lng),a=this.toRadians(t.lat);return this.getDistance(r,o,s,a)}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),o=this.toRadians(t.lng),a=this.toRadians(t.lat);return this.getDistance(r,o,s,a)}convertMC2LL(e){if(!e)return{lng:0,lat:0};let t={};if(this.isWgs84){t.lng=e.lng/2003750834e-2*180;let o=e.lat/2003750834e-2*180;return t.lat=180/Math.PI*(2*Math.atan(Math.exp(o*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 o=0;o<Sh.length;o++)if(r.lat>=Sh[o]){s=um[o];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 o={},a=6378137;o.lng=e.lng*Math.PI/180*a;let l=e.lat*Math.PI/180;return o.lat=a/2*Math.log((1+Math.sin(l))/(1-Math.sin(l))),{lng:parseFloat(o.lng.toFixed(2)),lat:parseFloat(o.lat.toFixed(2))}}e.lng=this.getLoop(e.lng,-180,180),e.lat=this.getRange(e.lat,-74,74);let t={lng:e.lng,lat:e.lat},r;for(let o=0;o<Ct.length;o++)if(t.lat>=Ct[o]){r=Ih[o];break}if(!r){for(let o=0;o<Ct.length;o++)if(t.lat<=-Ct[o]){r=Ih[o];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],o=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,o*=e.lat<0?-1:1,{lng:r,lat:o}}getDistance(e,t,r,s){return mm*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 o=this.getZoomUnits(t),a=Math.round((e.lng-r.lng)/o+s.width/2),l=Math.round((r.lat-e.lat)/o+s.height/2);return{x:a,y:l}}pixelToPoint(e,t,r,s){if(!e)return{lng:0,lat:0};let o=this.getZoomUnits(t),a=r.lng+o*(e.x-s.width/2),l=r.lat-o*(e.y-s.height/2),h={lng:a,lat:l};return this.mercatorToLngLat(h)}getZoomUnits(e){return Math.pow(2,18-e)}},Mh=Ro;var Oo=class extends i.Cesium.WebMercatorTilingScheme{constructor(e){super(e);let t=new Mh;this._projection.project=function(r,s){return s=s||{},s=he.WGS84ToGCJ02(i.Cesium.Math.toDegrees(r.longitude),i.Cesium.Math.toDegrees(r.latitude)),s=he.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.Cesium.Cartesian2(s.x,s.y)},this._projection.unproject=function(r,s){return s=s||{},s=t.mercatorToLngLat({lng:r.x,lat:r.y}),s=he.BD09ToGCJ02(s.lng,s.lat),s=he.GCJ02ToWGS84(s[0],s[1]),new i.Cesium.Cartographic(i.Cesium.Math.toRadians(s[0]),i.Cesium.Math.toRadians(s[1]))},this.resolutions=e.resolutions||[]}tileXYToNativeRectangle(e,t,r,s){let o=this.resolutions[r],a=e*o,l=(e+1)*o,h=((t=-t)+1)*o,c=t*o;return i.Cesium.defined(s)?(s.west=a,s.south=c,s.east=l,s.north=h,s):new i.Cesium.Rectangle(a,c,l,h)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Cesium.Rectangle.contains(s,e))return;let a=this._projection.project(e);if(!i.Cesium.defined(a))return;let l=this.resolutions[t],h=Math.floor(a.x/l),c=-Math.floor(a.y/l);return i.Cesium.defined(r)?(r.x=h,r.y=c,r):new i.Cesium.Cartesian2(h,c)}},Ah=Oo;var Dh={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"},ko=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){if(e.url=e.url||[e.protocol||"",Dh[e.style]||Dh.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 Ah({resolutions:t,rectangleSouthwestInMeters:new i.Cesium.Cartesian2(-2003772637e-2,-1247410417e-2),rectangleNortheastInMeters:new i.Cesium.Cartesian2(2003772637e-2,1247410417e-2)})}else e.tilingScheme=new i.Cesium.WebMercatorTilingScheme({rectangleSouthwestInMeters:new i.Cesium.Cartesian2(-33554054,-33746824),rectangleNortheastInMeters:new i.Cesium.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),o=this._tilingScheme.getNumberOfYTilesAtLevel(r),a=this._url.replace("{z}",r).replace("{s}",String(1)).replace("{style}",this._style);return this._crs==="WGS84"?a=a.replace("{x}",String(e)).replace("{y}",String(-t)):a=a.replace("{x}",String(e-s/2)).replace("{y}",String(o/2-t-1)),i.Cesium.ImageryProvider.loadImage(this,a)}};R.BAIDU="baidu";var Lh=ko;var _m="//tiles{s}.geovisearth.com/base/v1/{style}/{z}/{x}/{y}?format={format}&tmsIds=w&token={key}",Fo=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",_m.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)}};R.GEO_VIS="geoVis";var Rh=Fo;var Oh={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}"},zo=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){e.url=e.url||[e.protocol||"",Oh[e.style]||Oh.elec].join(""),e.crs==="WGS84"&&(e.tilingScheme=new Tt),super(e)}};R.GOOGLE="google";var kh=zo;var fm="//t{s}.tianditu.gov.cn/DataServer?T={style}_w&x={x}&y={y}&l={z}&tk={key}",Ho=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){super({url:[e.protocol||"",fm.replace(/\{style\}/g,e.style||"vec").replace(/\{key\}/g,e.key||"")].join(""),subdomains:["0","1","2","3","4","5","6","7"],maximumLevel:18})}};R.TDT="tdt";var Fh=Ho;var zh={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"},No=class extends i.Cesium.UrlTemplateImageryProvider{constructor(e={}){let t=e.url||[e.protocol||"",zh[e.style]||zh.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,o,a)=>s>>4,sy:(r,s,o,a)=>(1<<a)-o>>4}),super(e)}};R.TENCENT="tencent";var Hh=No;var Wo=class{static createAMapImageryLayer(e){return Promise.resolve(new bh(e))}static createBaiduImageryLayer(e){return Promise.resolve(new Lh(e))}static createGeoVisImageryLayer(e){return Promise.resolve(new Rh(e))}static createGoogleImageryLayer(e){return Promise.resolve(new kh(e))}static createTdtImageryLayer(e){return Promise.resolve(new Fh(e))}static createTencentImageryLayer(e){return Promise.resolve(new Hh(e))}static createArcGisImageryLayer(e){return i.Cesium.ArcGisMapServerImageryProvider.fromUrl(e.url,e)}static createBingImageryLayer(e){return i.Cesium.BingMapsImageryProvider.fromUrl(e.url,e)}static createOSMImageryLayer(e){return Promise.resolve(new i.Cesium.OpenStreetMapImageryProvider(e))}static createSingleTileImageryLayer(e){return i.Cesium.SingleTileImageryProvider.fromUrl(e.url,e)}static createWMSImageryLayer(e){return Promise.resolve(new i.Cesium.WebMapServiceImageryProvider(e))}static createWMTSImageryLayer(e){return Promise.resolve(new i.Cesium.WebMapTileServiceImageryProvider(e))}static createXYZImageryLayer(e){return Promise.resolve(new i.Cesium.UrlTemplateImageryProvider(e))}static createCoordImageryLayer(e){return Promise.resolve(new i.Cesium.TileCoordinatesImageryProvider(e))}static createGridImageryLayer(e){return Promise.resolve(new i.Cesium.GridImageryProvider(e))}static createMapboxImageryLayer(e){return Promise.resolve(new i.Cesium.MapboxImageryProvider(e))}static createMapboxStyleImageryLayer(e){return Promise.resolve(new i.Cesium.MapboxStyleImageryProvider(e))}static createTMSImageryLayer(e){return i.Cesium.TileMapServiceImageryProvider.fromUrl(e.url,e)}static createImageryLayer(e,t){let r;switch(e){case R.AMAP:r=this.createAMapImageryLayer(t);break;case R.BAIDU:r=this.createBaiduImageryLayer(t);break;case R.GEO_VIS:r=this.createGeoVisImageryLayer(t);break;case R.GOOGLE:r=this.createGoogleImageryLayer(t);break;case R.TDT:r=this.createTdtImageryLayer(t);break;case R.TENCENT:r=this.createTencentImageryLayer(t);break;case R.ARCGIS:r=this.createArcGisImageryLayer(t);break;case R.BING:r=this.createBingImageryLayer(t);break;case R.OSM:r=this.createOSMImageryLayer(t);break;case R.SINGLE_TILE:r=this.createSingleTileImageryLayer(t);break;case R.WMS:r=this.createWMSImageryLayer(t);break;case R.WMTS:r=this.createWMTSImageryLayer(t);break;case R.XYZ:r=this.createXYZImageryLayer(t);break;case R.COORD:r=this.createCoordImageryLayer(t);break;case R.GRID:r=this.createGridImageryLayer(t);break;case R.MAPBOX:r=this.createMapboxImageryLayer(t);break;case R.MAPBOX_STYLE:r=this.createMapboxStyleImageryLayer(t);break;case R.TMS:r=this.createTMSImageryLayer(t);break;default:break}return r}},Go=Wo;var Uo=class extends i.Cesium.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.Cesium.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,a=i.Cesium.Math.toRadians(this._origin[0]+e*o),l=i.Cesium.Math.toRadians(this._origin[1]-(t+1)*o),h=i.Cesium.Math.toRadians(this._origin[0]+(e+1)*o),c=i.Cesium.Math.toRadians(this._origin[1]-t*o);return s?(s.west=a,s.south=l,s.east=h,s.north=c,s):new i.Cesium.Rectangle(a,l,h,c)}positionToTileXY(e,t,r){if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cesium.Cartesian2;let s=this._resolutions[t+this._zoomOffset]*this._tileSize,o=i.Cesium.Math.toDegrees(e.longitude),a=i.Cesium.Math.toDegrees(e.latitude),l=Math.floor((o-this._origin[0])/s),h=Math.floor((this._origin[1]-a)/s);return r?(r.x=l,r.y=h,r):new i.Cesium.Cartesian2(Math.max(0,l),Math.max(0,h))}},Bo=Uo;var Vo=class extends i.Cesium.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.Cesium.Rectangle.MAX_VALUE;if(e<0||t<0)return i.Cesium.Rectangle.MAX_VALUE;let o=this._resolutions[r+this._zoomOffset]*this._tileSize,a=this._origin[0]+e*o,l=this._origin[1]-(t+1)*o,h=this._origin[0]+(e+1)*o,c=this._origin[1]-t*o;return s?(s.west=a,s.south=l,s.east=h,s.north=c,s):new i.Cesium.Rectangle(a,l,h,c)}positionToTileXY(e,t,r){let s=this._rectangle;if(!i.Cesium.Rectangle.contains(s,e))return;if(!this._resolutions||!this._resolutions[t+this._zoomOffset])return new i.Cesium.Cartesian2;let o=this._resolutions[t+this._zoomOffset]*this._tileSize,l=this._projection.project(e),h=Math.floor((l.x-this._origin[0])/o),c=Math.floor((this._origin[1]-l.y)/o);return r?(r.x=h,r.y=c,r):new i.Cesium.Cartesian2(Math.max(0,h),Math.max(0,c))}},jo=Vo;var gm={NONE:"none",XYZ:"xyz",ARCGIS:"arcgis",GOOGLE:"google",VR:"vr"},xe=gm;var Yo=class{static createEllipsoidTerrain(e){return Promise.resolve(new i.Cesium.EllipsoidTerrainProvider(e))}static createUrlTerrain(e){return i.Cesium.CesiumTerrainProvider.fromUrl(e.url,e)}static createGoogleTerrain(e){return i.Cesium.GoogleEarthEnterpriseTerrainProvider.fromUrl(e.url,e)}static createArcgisTerrain(e){return i.Cesium.ArcGISTiledElevationTerrainProvider.fromUrl(e.url,e)}static createVRTerrain(e){return i.Cesium.VRTheWorldTerrainProvider.fromUrl(e.url,e)}static createTerrain(e,t){let r;switch(e){case xe.NONE:r=this.createEllipsoidTerrain(t);break;case xe.XYZ:r=this.createUrlTerrain(t);break;case xe.GOOGLE:r=this.createGoogleTerrain(t);break;case xe.ARCGIS:r=this.createArcgisTerrain(t);break;case xe.VR:r=this.createVRTerrain(t);break;default:break}return r}},Zo=Yo;var Wh=[].indexOf||function(n){for(let e=0,t=this.length;e<t;e++)if(e in this&&this[e]===n)return e;return-1},xt=`attribute vec4 position;
15962
15962
  varying vec2 texcoord;
15963
15963
  void main(){
15964
15964
  texcoord = position.xy*0.5+0.5;
@@ -15971,13 +15971,13 @@ void main(){
15971
15971
  precision mediump float;
15972
15972
  #endif
15973
15973
  uniform sampler2D source;
15974
- varying vec2 texcoord;`,ym=function(){let n,e,t,r;if(window.WebGLRenderingContext!=null)return r=["WEBKIT","MOZ","MS","O"],t=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,n=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(s){let o,a,l,h,c;if(a=s.match(t),a!==null&&(s=a[1]),o=n.call(this,s),o===null){for(h=0,c=r.length;h<c;h++)if(l=r[h],o=n.call(this,l+"_"+s),o!==null)return o;return null}else return o},e=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let s,o,a,l,h,c;for(l=e.call(this),a=[],h=0,c=l.length;h<c;h++)s=l[h],o=s.match(t),o!==null&&(s=o[1]),Wh.call(a,s)<0&&a.push(s);return a}},vm=function(){let n,e,t,r,s,o,a,l,h,c,d,f,T,y;if(s=function(){let m,E,x;return m=document.createElement("canvas"),m.width=2,m.height=2,E=m.getContext("2d"),x=E.getImageData(0,0,2,2),x.data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),E.putImageData(x,0,0),m},s(),e=function(m,E){let x,b,I,N,H,W,ee,le,Y,Oe,Be,Ae,de,ke;if(W=m.createProgram(),de=m.createShader(m.VERTEX_SHADER),m.attachShader(W,de),m.shaderSource(de,`attribute vec2 position;
15974
+ varying vec2 texcoord;`,ym=function(){let n,e,t,r;if(window.WebGLRenderingContext!=null)return r=["WEBKIT","MOZ","MS","O"],t=/^WEBKIT_(.*)|MOZ_(.*)|MS_(.*)|O_(.*)/,n=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(s){let o,a,l,h,c;if(a=s.match(t),a!==null&&(s=a[1]),o=n.call(this,s),o===null){for(h=0,c=r.length;h<c;h++)if(l=r[h],o=n.call(this,l+"_"+s),o!==null)return o;return null}else return o},e=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let s,o,a,l,h,c;for(l=e.call(this),a=[],h=0,c=l.length;h<c;h++)s=l[h],o=s.match(t),o!==null&&(s=o[1]),Wh.call(a,s)<0&&a.push(s);return a}},vm=function(){let n,e,t,r,s,o,a,l,h,c,p,f,T,y;if(s=function(){let m,E,x;return m=document.createElement("canvas"),m.width=2,m.height=2,E=m.getContext("2d"),x=E.getImageData(0,0,2,2),x.data.set(new Uint8ClampedArray([0,0,0,0,255,255,255,255,0,0,0,0,255,255,255,255])),E.putImageData(x,0,0),m},s(),e=function(m,E){let x,b,I,N,H,W,ee,le,Y,Oe,Be,Ae,pe,ke;if(W=m.createProgram(),pe=m.createShader(m.VERTEX_SHADER),m.attachShader(W,pe),m.shaderSource(pe,`attribute vec2 position;
15975
15975
  void main(){
15976
15976
  gl_Position = vec4(position, 0.0, 1.0);
15977
- }`),m.compileShader(de),!m.getShaderParameter(de,m.COMPILE_STATUS))throw m.getShaderInfoLog(de);if(I=m.createShader(m.FRAGMENT_SHADER),m.attachShader(W,I),m.shaderSource(I,`uniform sampler2D source;
15977
+ }`),m.compileShader(pe),!m.getShaderParameter(pe,m.COMPILE_STATUS))throw m.getShaderInfoLog(pe);if(I=m.createShader(m.FRAGMENT_SHADER),m.attachShader(W,I),m.shaderSource(I,`uniform sampler2D source;
15978
15978
  void main(){
15979
15979
  gl_FragColor = texture2D(source, vec2(1.0, 1.0));
15980
- }`),m.compileShader(I),!m.getShaderParameter(I,m.COMPILE_STATUS))throw m.getShaderInfoLog(I);if(m.linkProgram(W),!m.getProgramParameter(W,m.LINK_STATUS))throw m.getProgramInfoLog(W);return m.useProgram(W),b=function(){return m.deleteShader(I),m.deleteShader(de),m.deleteProgram(W),m.deleteBuffer(x),m.deleteTexture(Y),m.deleteTexture(Ae),m.deleteFramebuffer(N),m.bindBuffer(m.ARRAY_BUFFER,null),m.useProgram(null),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null)},Ae=m.createTexture(),m.bindTexture(m.TEXTURE_2D,Ae),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,m.UNSIGNED_BYTE,null),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),N=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,N),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,Ae,0),Oe=s(),Y=m.createTexture(),m.bindTexture(m.TEXTURE_2D,Y),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,E,Oe),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),ke=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),x=m.createBuffer(),m.bindBuffer(m.ARRAY_BUFFER,x),m.bufferData(m.ARRAY_BUFFER,ke,m.STATIC_DRAW),H=m.getAttribLocation(W,"position"),Be=m.getUniformLocation(W,"source"),m.enableVertexAttribArray(H),m.vertexAttribPointer(H,2,m.FLOAT,!1,0,0),m.uniform1i(Be,0),m.drawArrays(m.TRIANGLES,0,6),ee=new Uint8Array(4*4),m.readPixels(0,0,2,2,m.RGBA,m.UNSIGNED_BYTE,ee),le=Math.abs(ee[0]-127)<10,b(),le},r=function(m,E){let x;return x=m.createTexture(),m.bindTexture(m.TEXTURE_2D,x),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),m.getError()===0?(m.deleteTexture(x),!0):(m.deleteTexture(x),!1)},n=function(m,E){let x,b,I;return I=m.createTexture(),m.bindTexture(m.TEXTURE_2D,I),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),b=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,b),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,I,0),x=m.checkFramebufferStatus(m.FRAMEBUFFER),m.deleteTexture(I),m.deleteFramebuffer(b),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null),x===m.FRAMEBUFFER_COMPLETE},h=[],c={},d=[],t=function(){let m,E,x,b,I,N,H;m=document.createElement("canvas"),x=null;try{x=m.getContext("experimental-webgl"),x===null&&(x=m.getContext("webgl"))}catch{}if(x!=null&&(N=x.getExtension("OES_texture_float"),N===null?r(x,x.FLOAT)?(H=!0,h.push("OES_texture_float"),c.OES_texture_float={shim:!0}):(H=!1,d.push("OES_texture_float")):r(x,x.FLOAT)?(H=!0,h.push("OES_texture_float")):(H=!1,d.push("OES_texture_float")),H&&(E=x.getExtension("WEBGL_color_buffer_float"),E===null?n(x,x.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}):d.push("WEBGL_color_buffer_float"):n(x,x.FLOAT)?h.push("WEBGL_color_buffer_float"):d.push("WEBGL_color_buffer_float"),E=x.getExtension("OES_texture_float_linear"),E===null?e(x,x.FLOAT)?(h.push("OES_texture_float_linear"),c.OES_texture_float_linear={shim:!0}):d.push("OES_texture_float_linear"):e(x,x.FLOAT)?h.push("OES_texture_float_linear"):d.push("OES_texture_float_linear")),b=x.getExtension("OES_texture_half_float"),b===null?r(x,36193)?(I=!0,h.push("OES_texture_half_float"),b=c.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(I=!1,d.push("OES_texture_half_float")):r(x,b.HALF_FLOAT_OES)?(I=!0,h.push("OES_texture_half_float")):(I=!1,d.push("OES_texture_half_float")),I))return E=x.getExtension("EXT_color_buffer_half_float"),E===null?n(x,b.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}):d.push("EXT_color_buffer_half_float"):n(x,b.HALF_FLOAT_OES)?h.push("EXT_color_buffer_half_float"):d.push("EXT_color_buffer_half_float"),E=x.getExtension("OES_texture_half_float_linear"),E===null?e(x,b.HALF_FLOAT_OES)?(h.push("OES_texture_half_float_linear"),c.OES_texture_half_float_linear={shim:!0}):d.push("OES_texture_half_float_linear"):e(x,b.HALF_FLOAT_OES)?h.push("OES_texture_half_float_linear"):d.push("OES_texture_half_float_linear")},window.WebGLRenderingContext!=null){for(t(),f={},T=0,y=d.length;T<y;T++)l=d[T],f[l]=!0;return o=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(m){let E;return E=c[m],E===void 0?f[m]?null:o.call(this,m):E},a=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let m,E,x,b,I,N,H;for(x=a.call(this),E=[],b=0,N=x.length;b<N;b++)m=x[b],f[m]===void 0&&E.push(m);for(I=0,H=h.length;I<H;I++)m=h[I],Wh.call(E,m)<0&&E.push(m);return E},WebGLRenderingContext.prototype.getFloatExtension=function(m){let E,x,b,I,N,H,W,ee,le,Y,Oe,Be,Ae,de,ke,ct,dt,pt,yl,vl,wl,Tl,ii,Cl,ri,si;for(m.prefer==null&&(m.prefer=["half"]),m.require==null&&(m.require=[]),m.throws==null&&(m.throws=!0),de=this.getExtension("OES_texture_float"),H=this.getExtension("OES_texture_half_float"),Be=this.getExtension("WEBGL_color_buffer_float"),I=this.getExtension("EXT_color_buffer_half_float"),Ae=this.getExtension("OES_texture_float_linear"),N=this.getExtension("OES_texture_half_float_linear"),Oe={texture:de!==null,filterable:Ae!==null,renderable:Be!==null,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},b={texture:H!==null,filterable:N!==null,renderable:I!==null,score:0,precision:"half",half:!0,single:!1,type:(Cl=H!=null?H.HALF_FLOAT_OES:void 0)!=null?Cl:null},x=[],Oe.texture&&x.push(Oe),b.texture&&x.push(b),Y=[],ct=0,yl=x.length;ct<yl;ct++){for(E=x[ct],ke=!0,ri=m.require,dt=0,vl=ri.length;dt<vl;dt++)l=ri[dt],E[l]===!1&&(ke=!1);ke&&Y.push(E)}for(pt=0,wl=Y.length;pt<wl;pt++)for(E=Y[pt],si=m.prefer,W=ii=0,Tl=si.length;ii<Tl;W=++ii)le=si[W],ee=Math.pow(2,m.prefer.length-W-1),E[le]&&(E.score+=ee);if(Y.sort(function(oi,ai){if(oi.score===ai.score)return 0;if(oi.score<ai.score)return 1;if(oi.score>ai.score)return-1}),Y.length===0){if(m.throws)throw"No floating point texture support that is "+m.require.join(", ");return null}else return Y=Y[0],{filterable:Y.filterable,renderable:Y.renderable,type:Y.type,precision:Y.precision}}}};ym();vm();var nt=function(){function n(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 n.prototype.attribLocation=function(e){let t=this.attribCache[e];return t===void 0&&(t=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),t},n.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)},n.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)},n.prototype.use=function(){return this.gl.useProgram(this.program),this},n.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},n.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},n.prototype.vec2=function(e,t,r){let s;return s=this.uniformLoc(e),s&&this.gl.uniform2f(s,t,r),this},n.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},n}(),wm=function(){function n(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return n.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},n.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},n.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},n.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},n.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},n.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},n.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},n}(),Gh=function(){function n(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 n.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},n.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},n.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},n.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},n.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},n.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},n.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},n.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},n}(),Nh=function(){function n(e,t,r){let s;this.gl=e,this.width=t,this.height=r,s=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new Gh(this.gl,{type:s.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new wm(this.gl).bind().color(this.texture).unbind()}return n.prototype.use=function(){return this.fbo.bind()},n.prototype.bind=function(e){return this.texture.bind(e)},n.prototype.end=function(){return this.fbo.unbind()},n.prototype.resize=function(e,t){return this.width=e,this.height=t,this.texture.bind(0).setSize(this.width,this.height)},n}(),Tm=function(){function n(e,t,r,s){let o,a,l;for(this.heatmap=e,this.gl=t,this.width=r,this.height=s,this.shader=new nt(this.gl,{vertex:`attribute vec4 position, intensity;
15980
+ }`),m.compileShader(I),!m.getShaderParameter(I,m.COMPILE_STATUS))throw m.getShaderInfoLog(I);if(m.linkProgram(W),!m.getProgramParameter(W,m.LINK_STATUS))throw m.getProgramInfoLog(W);return m.useProgram(W),b=function(){return m.deleteShader(I),m.deleteShader(pe),m.deleteProgram(W),m.deleteBuffer(x),m.deleteTexture(Y),m.deleteTexture(Ae),m.deleteFramebuffer(N),m.bindBuffer(m.ARRAY_BUFFER,null),m.useProgram(null),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null)},Ae=m.createTexture(),m.bindTexture(m.TEXTURE_2D,Ae),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,m.UNSIGNED_BYTE,null),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),N=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,N),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,Ae,0),Oe=s(),Y=m.createTexture(),m.bindTexture(m.TEXTURE_2D,Y),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,E,Oe),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,m.LINEAR),ke=new Float32Array([1,1,-1,1,-1,-1,1,1,-1,-1,1,-1]),x=m.createBuffer(),m.bindBuffer(m.ARRAY_BUFFER,x),m.bufferData(m.ARRAY_BUFFER,ke,m.STATIC_DRAW),H=m.getAttribLocation(W,"position"),Be=m.getUniformLocation(W,"source"),m.enableVertexAttribArray(H),m.vertexAttribPointer(H,2,m.FLOAT,!1,0,0),m.uniform1i(Be,0),m.drawArrays(m.TRIANGLES,0,6),ee=new Uint8Array(4*4),m.readPixels(0,0,2,2,m.RGBA,m.UNSIGNED_BYTE,ee),le=Math.abs(ee[0]-127)<10,b(),le},r=function(m,E){let x;return x=m.createTexture(),m.bindTexture(m.TEXTURE_2D,x),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),m.getError()===0?(m.deleteTexture(x),!0):(m.deleteTexture(x),!1)},n=function(m,E){let x,b,I;return I=m.createTexture(),m.bindTexture(m.TEXTURE_2D,I),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,2,2,0,m.RGBA,E,null),b=m.createFramebuffer(),m.bindFramebuffer(m.FRAMEBUFFER,b),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,I,0),x=m.checkFramebufferStatus(m.FRAMEBUFFER),m.deleteTexture(I),m.deleteFramebuffer(b),m.bindTexture(m.TEXTURE_2D,null),m.bindFramebuffer(m.FRAMEBUFFER,null),x===m.FRAMEBUFFER_COMPLETE},h=[],c={},p=[],t=function(){let m,E,x,b,I,N,H;m=document.createElement("canvas"),x=null;try{x=m.getContext("experimental-webgl"),x===null&&(x=m.getContext("webgl"))}catch{}if(x!=null&&(N=x.getExtension("OES_texture_float"),N===null?r(x,x.FLOAT)?(H=!0,h.push("OES_texture_float"),c.OES_texture_float={shim:!0}):(H=!1,p.push("OES_texture_float")):r(x,x.FLOAT)?(H=!0,h.push("OES_texture_float")):(H=!1,p.push("OES_texture_float")),H&&(E=x.getExtension("WEBGL_color_buffer_float"),E===null?n(x,x.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"):n(x,x.FLOAT)?h.push("WEBGL_color_buffer_float"):p.push("WEBGL_color_buffer_float"),E=x.getExtension("OES_texture_float_linear"),E===null?e(x,x.FLOAT)?(h.push("OES_texture_float_linear"),c.OES_texture_float_linear={shim:!0}):p.push("OES_texture_float_linear"):e(x,x.FLOAT)?h.push("OES_texture_float_linear"):p.push("OES_texture_float_linear")),b=x.getExtension("OES_texture_half_float"),b===null?r(x,36193)?(I=!0,h.push("OES_texture_half_float"),b=c.OES_texture_half_float={HALF_FLOAT_OES:36193,shim:!0}):(I=!1,p.push("OES_texture_half_float")):r(x,b.HALF_FLOAT_OES)?(I=!0,h.push("OES_texture_half_float")):(I=!1,p.push("OES_texture_half_float")),I))return E=x.getExtension("EXT_color_buffer_half_float"),E===null?n(x,b.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"):n(x,b.HALF_FLOAT_OES)?h.push("EXT_color_buffer_half_float"):p.push("EXT_color_buffer_half_float"),E=x.getExtension("OES_texture_half_float_linear"),E===null?e(x,b.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(x,b.HALF_FLOAT_OES)?h.push("OES_texture_half_float_linear"):p.push("OES_texture_half_float_linear")},window.WebGLRenderingContext!=null){for(t(),f={},T=0,y=p.length;T<y;T++)l=p[T],f[l]=!0;return o=WebGLRenderingContext.prototype.getExtension,WebGLRenderingContext.prototype.getExtension=function(m){let E;return E=c[m],E===void 0?f[m]?null:o.call(this,m):E},a=WebGLRenderingContext.prototype.getSupportedExtensions,WebGLRenderingContext.prototype.getSupportedExtensions=function(){let m,E,x,b,I,N,H;for(x=a.call(this),E=[],b=0,N=x.length;b<N;b++)m=x[b],f[m]===void 0&&E.push(m);for(I=0,H=h.length;I<H;I++)m=h[I],Wh.call(E,m)<0&&E.push(m);return E},WebGLRenderingContext.prototype.getFloatExtension=function(m){let E,x,b,I,N,H,W,ee,le,Y,Oe,Be,Ae,pe,ke,ct,pt,dt,yl,vl,wl,Tl,ii,Cl,ri,si;for(m.prefer==null&&(m.prefer=["half"]),m.require==null&&(m.require=[]),m.throws==null&&(m.throws=!0),pe=this.getExtension("OES_texture_float"),H=this.getExtension("OES_texture_half_float"),Be=this.getExtension("WEBGL_color_buffer_float"),I=this.getExtension("EXT_color_buffer_half_float"),Ae=this.getExtension("OES_texture_float_linear"),N=this.getExtension("OES_texture_half_float_linear"),Oe={texture:pe!==null,filterable:Ae!==null,renderable:Be!==null,score:0,precision:"single",half:!1,single:!0,type:this.FLOAT},b={texture:H!==null,filterable:N!==null,renderable:I!==null,score:0,precision:"half",half:!0,single:!1,type:(Cl=H!=null?H.HALF_FLOAT_OES:void 0)!=null?Cl:null},x=[],Oe.texture&&x.push(Oe),b.texture&&x.push(b),Y=[],ct=0,yl=x.length;ct<yl;ct++){for(E=x[ct],ke=!0,ri=m.require,pt=0,vl=ri.length;pt<vl;pt++)l=ri[pt],E[l]===!1&&(ke=!1);ke&&Y.push(E)}for(dt=0,wl=Y.length;dt<wl;dt++)for(E=Y[dt],si=m.prefer,W=ii=0,Tl=si.length;ii<Tl;W=++ii)le=si[W],ee=Math.pow(2,m.prefer.length-W-1),E[le]&&(E.score+=ee);if(Y.sort(function(oi,ai){if(oi.score===ai.score)return 0;if(oi.score<ai.score)return 1;if(oi.score>ai.score)return-1}),Y.length===0){if(m.throws)throw"No floating point texture support that is "+m.require.join(", ");return null}else return Y=Y[0],{filterable:Y.filterable,renderable:Y.renderable,type:Y.type,precision:Y.precision}}}};ym();vm();var nt=function(){function n(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 n.prototype.attribLocation=function(e){let t=this.attribCache[e];return t===void 0&&(t=this.attribCache[e]=this.gl.getAttribLocation(this.program,e)),t},n.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)},n.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)},n.prototype.use=function(){return this.gl.useProgram(this.program),this},n.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},n.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},n.prototype.vec2=function(e,t,r){let s;return s=this.uniformLoc(e),s&&this.gl.uniform2f(s,t,r),this},n.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},n}(),wm=function(){function n(e){this.gl=e,this.buffer=this.gl.createFramebuffer()}return n.prototype.destroy=function(){return this.gl.deleteFRamebuffer(this.buffer)},n.prototype.bind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,this.buffer),this},n.prototype.unbind=function(){return this.gl.bindFramebuffer(this.gl.FRAMEBUFFER,null),this},n.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},n.prototype.color=function(e){return this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER,this.gl.COLOR_ATTACHMENT0,e.target,e.handle,0),this.check(),this},n.prototype.depth=function(e){return this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER,this.gl.DEPTH_ATTACHMENT,this.gl.RENDERBUFFER,e.id),this.check(),this},n.prototype.destroy=function(){return this.gl.deleteFramebuffer(this.buffer)},n}(),Gh=function(){function n(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 n.prototype.destroy=function(){return this.gl.deleteTexture(this.handle)},n.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},n.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},n.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},n.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},n.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},n.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},n.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},n}(),Nh=function(){function n(e,t,r){let s;this.gl=e,this.width=t,this.height=r,s=this.gl.getFloatExtension({require:["renderable"]}),this.texture=new Gh(this.gl,{type:s.type}).bind(0).setSize(this.width,this.height).nearest().clampToEdge(),this.fbo=new wm(this.gl).bind().color(this.texture).unbind()}return n.prototype.use=function(){return this.fbo.bind()},n.prototype.bind=function(e){return this.texture.bind(e)},n.prototype.end=function(){return this.fbo.unbind()},n.prototype.resize=function(e,t){return this.width=e,this.height=t,this.texture.bind(0).setSize(this.width,this.height)},n}(),Tm=function(){function n(e,t,r,s){let o,a,l;for(this.heatmap=e,this.gl=t,this.width=r,this.height=s,this.shader=new nt(this.gl,{vertex:`attribute vec4 position, intensity;
15981
15981
  varying vec2 off, dim;
15982
15982
  varying float vIntensity;
15983
15983
  uniform vec2 viewport;
@@ -16019,7 +16019,7 @@ void main(){
16019
16019
  }
16020
16020
  }
16021
16021
  gl_FragColor = vec4(result.rgb/result.w, 1.0);
16022
- }`}),this.nodeBack=new Nh(this.gl,this.width,this.height),this.nodeFront=new Nh(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=[],o=a=0,l=this.maxPointCount;0<=l?a<l:a>l;o=0<=l?++a:--a)this.vertexBufferViews.push(new Float32Array(this.vertexBufferData.buffer,0,o*this.vertexSize*6));this.bufferIndex=0,this.pointCount=0}return n.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)},n.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)},n.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()},n.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()},n.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()},n.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()},n.prototype.swap=function(){let e=this.nodeFront;return this.nodeFront=this.nodeBack,this.nodeBack=e},n.prototype.addVertex=function(e,t,r,s,o){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++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o},n.prototype.addPoint=function(e,t,r,s){let o;return r==null&&(r=50),s==null&&(s=.2),this.pointCount>=this.maxPointCount-1&&this.update(),t=this.height-t,o=r/2,this.addVertex(e,t,-o,-o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,+o,+o,s),this.pointCount+=1},n}(),Cm=function(){function n(e){let t,r,s,o,a,l,h,c,d,f,T,y,m;y=e!=null?e:{},this.canvas=y.canvas,this.width=y.width,this.height=y.height,c=y.intensityToAlpha,l=y.gradientTexture,r=y.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(E){throw o=E,"WebGL not supported"}window.WebGLDebugUtils!=null&&(this.gl=window.WebGLDebugUtils.makeDebugContext(this.gl,function(E,x,b){throw window.WebGLDebugUtils.glEnumToString(E)+" was caused by call to: "+x})),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),l?(T=this.gradientTexture=new Gh(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),typeof l=="string"?(h=new Image,h.onload=function(){return T.bind().upload(h)},h.src=l):l.width>0&&l.height>0?T.upload(l):l.onload=function(){return T.upload(l)},a=`uniform sampler2D gradientTexture;
16022
+ }`}),this.nodeBack=new Nh(this.gl,this.width,this.height),this.nodeFront=new Nh(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=[],o=a=0,l=this.maxPointCount;0<=l?a<l:a>l;o=0<=l?++a:--a)this.vertexBufferViews.push(new Float32Array(this.vertexBufferData.buffer,0,o*this.vertexSize*6));this.bufferIndex=0,this.pointCount=0}return n.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)},n.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)},n.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()},n.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()},n.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()},n.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()},n.prototype.swap=function(){let e=this.nodeFront;return this.nodeFront=this.nodeBack,this.nodeBack=e},n.prototype.addVertex=function(e,t,r,s,o){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++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o,this.vertexBufferData[this.bufferIndex++]=o},n.prototype.addPoint=function(e,t,r,s){let o;return r==null&&(r=50),s==null&&(s=.2),this.pointCount>=this.maxPointCount-1&&this.update(),t=this.height-t,o=r/2,this.addVertex(e,t,-o,-o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,-o,+o,s),this.addVertex(e,t,+o,-o,s),this.addVertex(e,t,+o,+o,s),this.pointCount+=1},n}(),Cm=function(){function n(e){let t,r,s,o,a,l,h,c,p,f,T,y,m;y=e!=null?e:{},this.canvas=y.canvas,this.width=y.width,this.height=y.height,c=y.intensityToAlpha,l=y.gradientTexture,r=y.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(E){throw o=E,"WebGL not supported"}window.WebGLDebugUtils!=null&&(this.gl=window.WebGLDebugUtils.makeDebugContext(this.gl,function(E,x,b){throw window.WebGLDebugUtils.glEnumToString(E)+" was caused by call to: "+x})),this.gl.enableVertexAttribArray(0),this.gl.blendFunc(this.gl.ONE,this.gl.ONE),l?(T=this.gradientTexture=new Gh(this.gl,{channels:"rgba"}).bind(0).setSize(2,2).nearest().clampToEdge(),typeof l=="string"?(h=new Image,h.onload=function(){return T.bind().upload(h)},h.src=l):l.width>0&&l.height>0?T.upload(l):l.onload=function(){return T.upload(l)},a=`uniform sampler2D gradientTexture;
16023
16023
  vec3 getColor(float intensity){
16024
16024
  return texture2D(gradientTexture, vec2(intensity, 0.0)).rgb;
16025
16025
  }`):(T=null,a=`vec3 getColor(float intensity){
@@ -16037,10 +16037,10 @@ vec3 getColor(float intensity){
16037
16037
  smoothstep(0.75, 1.0, intensity)*red
16038
16038
  );
16039
16039
  return color;
16040
- }`),c==null&&(c=!0),c?(m=r!=null?r:[0,1],s=m[0],t=m[1],d=`vec4 alphaFun(vec3 color, float intensity){
16040
+ }`),c==null&&(c=!0),c?(m=r!=null?r:[0,1],s=m[0],t=m[1],p=`vec4 alphaFun(vec3 color, float intensity){
16041
16041
  float alpha = smoothstep(`+s.toFixed(8)+", "+t.toFixed(8)+`, intensity);
16042
16042
  return vec4(color*alpha, alpha);
16043
- }`):d=`vec4 alphaFun(vec3 color, float intensity){
16043
+ }`):p=`vec4 alphaFun(vec3 color, float intensity){
16044
16044
  return vec4(color, 1.0);
16045
16045
  }`,this.shader=new nt(this.gl,{vertex:xt,fragment:Et+(`float linstep(float low, float high, float value){
16046
16046
  return clamp((value-low)/(high-low), 0.0, 1.0);
@@ -16054,13 +16054,13 @@ float fade(float low, float high, float value){
16054
16054
  }
16055
16055
 
16056
16056
  `+a+`
16057
- `+d+`
16057
+ `+p+`
16058
16058
 
16059
16059
  void main(){
16060
16060
  float intensity = smoothstep(0.0, 1.0, texture2D(source, texcoord).r);
16061
16061
  vec3 color = getColor(intensity);
16062
16062
  gl_FragColor = alphaFun(color, intensity);
16063
- }`)}),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 Tm(this,this.gl,this.width,this.height)}return n.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)},n.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)},n.prototype.update=function(){return this.heights.update()},n.prototype.clear=function(){return this.heights.clear()},n.prototype.clamp=function(e,t){return e==null&&(e=0),t==null&&(t=1),this.heights.clamp(e,t)},n.prototype.multiply=function(e){return e==null&&(e=.95),this.heights.multiply(e)},n.prototype.blur=function(){return this.heights.blur()},n.prototype.addPoint=function(e,t,r,s){return this.heights.addPoint(e,t,r,s)},n.prototype.addPoints=function(e){let t,r,s,o;for(o=[],r=0,s=e.length;r<s;r++)t=e[r],o.push(this.addPoint(t.x,t.y,t.size,t.intensity));return o},n}();function qo(n){return new Cm(n)}var Xo=new i.Cesium.WebMercatorProjection,xm={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},Jo=class extends P{constructor(e,t={}){super(e),this._options={...xm,...t},this._delegate=new i.Cesium.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.Cesium.Rectangle,this._boundsInMeter=void 0,this._primitive=this._delegate.add(this._isGround?new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),classificationType:this._options.classificationType}):new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})})),this._state=p.INITIALIZED}get type(){return P.getLayerType("heat-map")}_addedHook(){this._canvas.style.cssText=`
16063
+ }`)}),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 Tm(this,this.gl,this.width,this.height)}return n.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)},n.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)},n.prototype.update=function(){return this.heights.update()},n.prototype.clear=function(){return this.heights.clear()},n.prototype.clamp=function(e,t){return e==null&&(e=0),t==null&&(t=1),this.heights.clamp(e,t)},n.prototype.multiply=function(e){return e==null&&(e=.95),this.heights.multiply(e)},n.prototype.blur=function(){return this.heights.blur()},n.prototype.addPoint=function(e,t,r,s){return this.heights.addPoint(e,t,r,s)},n.prototype.addPoints=function(e){let t,r,s,o;for(o=[],r=0,s=e.length;r<s;r++)t=e[r],o.push(this.addPoint(t.x,t.y,t.size,t.intensity));return o},n}();function qo(n){return new Cm(n)}var Xo=new i.Cesium.WebMercatorProjection,xm={radius:30,height:0,gradient:void 0,useGround:!1,classificationType:2},Jo=class extends P{constructor(e,t={}){super(e),this._options={...xm,...t},this._delegate=new i.Cesium.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.Cesium.Rectangle,this._boundsInMeter=void 0,this._primitive=this._delegate.add(this._isGround?new i.Cesium.GroundPrimitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}}),classificationType:this._options.classificationType}):new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:{}})})),this._state=d.INITIALIZED}get type(){return P.getLayerType("heat-map")}_addedHook(){this._canvas.style.cssText=`
16064
16064
  visibility:hidden;
16065
16065
  width:${this._viewer.canvas.width}px;
16066
16066
  height:${this._viewer.canvas.height}px;
@@ -16077,7 +16077,7 @@ void main(){
16077
16077
  material.alpha = colorImage.a;
16078
16078
  return material;
16079
16079
  }
16080
- `},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=qo({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=p.CLEARED,this}};P.registerType("heat-map");var Uh=Jo;var Ko=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}},Qo=Ko;var $o=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,o=r.cols,a=r.us,l=r.vs;for(let h=0;h<s;h++){let c=[];for(let d=0;d<o;d++,t++){let f=a[t],T=l[t],y=this.isValid(f)&&this.isValid(T);c[d]=y?new Qo(f,T):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,o,a){let l=1-e,h=1-t,c=l*h,d=e*h,f=l*t,T=e*t,y=r.u*c+s.u*d+o.u*f+a.u*T,m=r.v*c+s.v*d+o.v*f+a.v*T;return new Qo(y,m)}calculateRange(){if(!this.grid||!this.grid[0])return;let e=this.grid.length,t=this.grid[0].length,r,s;for(let o=0;o<e;o++)for(let a=0;a<t;a++){let l=this.grid[o][a];if(l!==null){let h=l.m||l.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],o=r[1],a=e>=s&&e<=o,l;return this.deltaY>=0?l=t>=this.ymin&&t<=this.ymax:l=t>=this.ymax&&t<=this.ymin,a&&l}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]),o=Math.floor(r[1]),a=this.clampColumnIndex(s),l=this.clampRowIndex(o);return this.valueAtIndexes(a,l)}interpolatedValueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=r[0],o=r[1];return this.interpolatePoint(s,o)}hasValueAt(e,t){return this.valueAt(e,t)!==null}interpolatePoint(e,t){let r=this.getFourSurroundingIndexes(e,t),s=r[0],o=r[1],a=r[2],l=r[3],h=this.getFourSurroundingValues(s,o,a,l);if(h){let c=h[0],d=h[1],f=h[2],T=h[3];return this.bilinearInterpolateVector(e-s,t-a,c,d,f,T)}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 o=this.clampRowIndex(Math.floor(t)),a=this.clampRowIndex(o+1);return[r,s,o,a]}getFourSurroundingValues(e,t,r,s){let o;if(o=this.grid[r]){let a=o[e],l=o[t];if(this.isValid(a)&&this.isValid(l)&&(o=this.grid[s])){let h=o[e],c=o[t];if(this.isValid(h)&&this.isValid(c))return[a,l,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 o=Math.random()*(t||this.cols)|0,a=Math.random()*(r||this.rows)|0,l=s([o,a]);return l!==null?(e.x=l[0],e.y=l[1]):(e.x=this.longitudeAtX(o),e.y=this.latitudeAtY(a)),e}checkFields(){return this.isFields}},Bh=$o;var ea=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,o=typeof this.options.velocityScale=="function"?this.options.velocityScale():this.options.velocityScale;for(let a=0;a<r.length;a++){let l=r[a];l.age>s&&(l.age=0,this.field.randomize(l,e,t,this.unProject));let h=l.x,c=l.y,d=this.field.interpolatedValueAt(h,c);if(d===null)l.age=s;else{let f=h+d.u*o,T=c+d.v*o;this.field.hasValueAt(f,T)?(l.xt=f,l.yt=T,l.m=d.m):(l.x=f,l.y=T,l.age=s)}l.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 o,a;if(this.options.minVelocity&&this.options.maxVelocity)o=this.options.minVelocity,a=this.options.maxVelocity;else{let l=this.field.range;o=l[0],a=l[1]}for(;r<s;r++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[r],o,a)}}_drawPixelParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt],a=e.xt-e.x,l=e.yt-e.y;a*a+l*l>20*20||o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&e.age<=this.options.maxAge&&this._drawStroke(s,o,e,t,r)}_drawCoordsParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt];if(o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&this.intersectsCoordinate(o)&&e.age<=this.options.maxAge){let a=this.project(s),l=this.project(o);this._drawStroke(a,l,e,t,r)}}_drawStroke(e,t,r,s,o){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 a=this._indexFor(r.m,s,o,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[a]}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 o=0;o<r;o++)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,o;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)&&((o=this.options)!=null&&o.particleMultiplier)&&(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}},Vh=ea;var Em={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:1/25,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},ta=class extends P{constructor(e,t={}){super(e),this._options={...Em,...t},this._data=void 0,this._canvas=document.createElement("canvas"),this._state=p.INITIALIZED}get type(){return P.getLayerType("wind")}set show(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}get show(){return this._show}_formatData(e){let t,r;if(e.forEach(function(o){switch(o.header.parameterCategory+","+o.header.parameterNumber){case"1,2":case"2,2":t=o;break;case"1,3":case"2,3":r=o;break}}),!r||!t)return;let s=t.header;return new Bh({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="dc-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.Cesium.Ellipsoid.WGS84;this._delegate.intersectsCoordinate=s=>{if(e.mode===i.Cesium.SceneMode.SCENE3D){let o=new i.Cesium.EllipsoidalOccluder(r,t.position),a=i.Cesium.Cartesian3.fromDegrees(s[0],s[1]);return o.isPointVisible(a)}else if(e.mode===i.Cesium.SceneMode.SCENE2D)return!(s[0]===-180||s[0]===180);return!0},this._delegate.project=s=>{let o=i.Cesium.Cartesian3.fromDegrees(s[0],s[1]),a=i.Cesium.SceneTransforms.worldToWindowCoordinates(e,o);return[a.x,a.y]},this._delegate.unProject=s=>{let o=new i.Cesium.Cartesian2(s[0],s[1]),a;if(e.mode===i.Cesium.SceneMode.SCENE3D?a=e.globe.pick(t.getPickRay(o),e):a=e.camera.pickEllipsoid(o,r),!a)return null;let l=r.cartesianToCartographic(a),h=i.Cesium.Math.toDegrees(l.latitude);return[i.Cesium.Math.toDegrees(l.longitude),h]}}_onAdd(e){this._viewer=e,this._mountCanvas();let t=this._canvas.getContext("2d");this._delegate||(this._delegate=new Vh(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}};P.registerType("wind");var jh=ta;var Yh=`/**
16080
+ `},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=qo({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=d.CLEARED,this}};P.registerType("heat-map");var Uh=Jo;var Ko=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}},Qo=Ko;var $o=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,o=r.cols,a=r.us,l=r.vs;for(let h=0;h<s;h++){let c=[];for(let p=0;p<o;p++,t++){let f=a[t],T=l[t],y=this.isValid(f)&&this.isValid(T);c[p]=y?new Qo(f,T):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,o,a){let l=1-e,h=1-t,c=l*h,p=e*h,f=l*t,T=e*t,y=r.u*c+s.u*p+o.u*f+a.u*T,m=r.v*c+s.v*p+o.v*f+a.v*T;return new Qo(y,m)}calculateRange(){if(!this.grid||!this.grid[0])return;let e=this.grid.length,t=this.grid[0].length,r,s;for(let o=0;o<e;o++)for(let a=0;a<t;a++){let l=this.grid[o][a];if(l!==null){let h=l.m||l.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],o=r[1],a=e>=s&&e<=o,l;return this.deltaY>=0?l=t>=this.ymin&&t<=this.ymax:l=t>=this.ymax&&t<=this.ymin,a&&l}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]),o=Math.floor(r[1]),a=this.clampColumnIndex(s),l=this.clampRowIndex(o);return this.valueAtIndexes(a,l)}interpolatedValueAt(e,t){if(!this.contains(e,t))return null;let r=this.getDecimalIndexes(e,t),s=r[0],o=r[1];return this.interpolatePoint(s,o)}hasValueAt(e,t){return this.valueAt(e,t)!==null}interpolatePoint(e,t){let r=this.getFourSurroundingIndexes(e,t),s=r[0],o=r[1],a=r[2],l=r[3],h=this.getFourSurroundingValues(s,o,a,l);if(h){let c=h[0],p=h[1],f=h[2],T=h[3];return this.bilinearInterpolateVector(e-s,t-a,c,p,f,T)}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 o=this.clampRowIndex(Math.floor(t)),a=this.clampRowIndex(o+1);return[r,s,o,a]}getFourSurroundingValues(e,t,r,s){let o;if(o=this.grid[r]){let a=o[e],l=o[t];if(this.isValid(a)&&this.isValid(l)&&(o=this.grid[s])){let h=o[e],c=o[t];if(this.isValid(h)&&this.isValid(c))return[a,l,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 o=Math.random()*(t||this.cols)|0,a=Math.random()*(r||this.rows)|0,l=s([o,a]);return l!==null?(e.x=l[0],e.y=l[1]):(e.x=this.longitudeAtX(o),e.y=this.latitudeAtY(a)),e}checkFields(){return this.isFields}},Bh=$o;var ea=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,o=typeof this.options.velocityScale=="function"?this.options.velocityScale():this.options.velocityScale;for(let a=0;a<r.length;a++){let l=r[a];l.age>s&&(l.age=0,this.field.randomize(l,e,t,this.unProject));let h=l.x,c=l.y,p=this.field.interpolatedValueAt(h,c);if(p===null)l.age=s;else{let f=h+p.u*o,T=c+p.v*o;this.field.hasValueAt(f,T)?(l.xt=f,l.yt=T,l.m=p.m):(l.x=f,l.y=T,l.age=s)}l.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 o,a;if(this.options.minVelocity&&this.options.maxVelocity)o=this.options.minVelocity,a=this.options.maxVelocity;else{let l=this.field.range;o=l[0],a=l[1]}for(;r<s;r++)this[this.options.useCoordsDraw?"_drawCoordsParticle":"_drawPixelParticle"](e[r],o,a)}}_drawPixelParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt],a=e.xt-e.x,l=e.yt-e.y;a*a+l*l>20*20||o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&e.age<=this.options.maxAge&&this._drawStroke(s,o,e,t,r)}_drawCoordsParticle(e,t,r){let s=[e.x,e.y],o=[e.xt,e.yt];if(o&&s&&o[0]&&o[1]&&s[0]&&s[1]&&this.intersectsCoordinate(o)&&e.age<=this.options.maxAge){let a=this.project(s),l=this.project(o);this._drawStroke(a,l,e,t,r)}}_drawStroke(e,t,r,s,o){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 a=this._indexFor(r.m,s,o,this.options.colorScale);this.ctx.strokeStyle=this.options.colorScale[a]}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 o=0;o<r;o++)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,o;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)&&((o=this.options)!=null&&o.particleMultiplier)&&(this.options.paths=Math.round(this.options.width*this.options.height*Number(this.options.particleMultiplier))),this}},Vh=ea;var Em={globalAlpha:.9,lineWidth:1,colorScale:"#fff",velocityScale:1/25,maxAge:90,paths:800,frameRate:20,useCoordsDraw:!0,gpet:!0},ta=class extends P{constructor(e,t={}){super(e),this._options={...Em,...t},this._data=void 0,this._canvas=document.createElement("canvas"),this._state=d.INITIALIZED}get type(){return P.getLayerType("wind")}set show(e){this._show=e,this._canvas.style.visibility=e?"visible":"hidden"}get show(){return this._show}_formatData(e){let t,r;if(e.forEach(function(o){switch(o.header.parameterCategory+","+o.header.parameterNumber){case"1,2":case"2,2":t=o;break;case"1,3":case"2,3":r=o;break}}),!r||!t)return;let s=t.header;return new Bh({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="dc-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.Cesium.Ellipsoid.WGS84;this._delegate.intersectsCoordinate=s=>{if(e.mode===i.Cesium.SceneMode.SCENE3D){let o=new i.Cesium.EllipsoidalOccluder(r,t.position),a=i.Cesium.Cartesian3.fromDegrees(s[0],s[1]);return o.isPointVisible(a)}else if(e.mode===i.Cesium.SceneMode.SCENE2D)return!(s[0]===-180||s[0]===180);return!0},this._delegate.project=s=>{let o=i.Cesium.Cartesian3.fromDegrees(s[0],s[1]),a=i.Cesium.SceneTransforms.worldToWindowCoordinates(e,o);return[a.x,a.y]},this._delegate.unProject=s=>{let o=new i.Cesium.Cartesian2(s[0],s[1]),a;if(e.mode===i.Cesium.SceneMode.SCENE3D?a=e.globe.pick(t.getPickRay(o),e):a=e.camera.pickEllipsoid(o,r),!a)return null;let l=r.cartesianToCartographic(a),h=i.Cesium.Math.toDegrees(l.latitude);return[i.Cesium.Math.toDegrees(l.longitude),h]}}_onAdd(e){this._viewer=e,this._mountCanvas();let t=this._canvas.getContext("2d");this._delegate||(this._delegate=new Vh(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}};P.registerType("wind");var jh=ta;var Yh=`/**
16081
16081
  * @license
16082
16082
  * Cellular noise ("Worley noise") in 2D in GLSL.
16083
16083
  * Copyright (c) Stefan Gustavson 2011-04-19. All rights reserved.
@@ -16778,7 +16778,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16778
16778
  material.alpha = pow(alpha, 4.0);
16779
16779
  return material;
16780
16780
  }
16781
- `;var dc=`uniform vec4 color;
16781
+ `;var pc=`uniform vec4 color;
16782
16782
  uniform sampler2D image;
16783
16783
  czm_material czm_getMaterial(czm_materialInput materialInput){
16784
16784
  czm_material material = czm_getDefaultMaterial(materialInput);
@@ -16796,7 +16796,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
16796
16796
  material.alpha = colorImage.a * pow(length, 0.5);
16797
16797
  return material;
16798
16798
  }
16799
- `;var pc=`uniform vec4 color;
16799
+ `;var dc=`uniform vec4 color;
16800
16800
  uniform float speed;
16801
16801
 
16802
16802
  float circle(vec2 uv, float r, float blur) {
@@ -16912,7 +16912,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput)
16912
16912
  return material;
16913
16913
  }
16914
16914
 
16915
- `;i.Cesium.Material.CircleBlurType="CircleBlur";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleBlurType,{fabric:{type:i.Cesium.Material.CircleBlurType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:ac},translucent:function(n){return!0}});i.Cesium.Material.CircleDiffuseType="CircleDiffuse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleDiffuseType,{fabric:{type:i.Cesium.Material.CircleDiffuseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:nc},translucent:function(n){return!0}});i.Cesium.Material.CircleFadeType="CircleFade";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleFadeType,{fabric:{type:i.Cesium.Material.CircleFadeType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:lc},translucent:function(n){return!0}});i.Cesium.Material.CirclePulseType="CirclePulse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CirclePulseType,{fabric:{type:i.Cesium.Material.CirclePulseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:12},source:hc},translucent:function(n){return!0}});i.Cesium.Material.CircleRingType="CircleRing";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleRingType,{fabric:{type:i.Cesium.Material.CircleRingType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:cc},translucent:function(n){return!0}});i.Cesium.Material.CircleRotateType="CircleRotate";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleRotateType,{fabric:{type:i.Cesium.Material.CircleRotateType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId},source:dc},translucent:function(n){return!0}});i.Cesium.Material.CircleScanType="CircleScan";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleScanType,{fabric:{type:i.Cesium.Material.CircleScanType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1},source:pc},translucent:function(n){return!0}});i.Cesium.Material.CircleSpiralType="CircleSpiral";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleSpiralType,{fabric:{type:i.Cesium.Material.CircleSpiralType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:mc},translucent:function(n){return!0}});i.Cesium.Material.CircleVaryType="CircleVary";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleVaryType,{fabric:{type:i.Cesium.Material.CircleVaryType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:uc},translucent:function(n){return!0}});i.Cesium.Material.CircleWaveType="CircleWave";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleWaveType,{fabric:{type:i.Cesium.Material.CircleWaveType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3,count:1,gradient:.1},source:_c},translucent:function(n){return!0}});var fc=`uniform vec4 color;
16915
+ `;i.Cesium.Material.CircleBlurType="CircleBlur";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleBlurType,{fabric:{type:i.Cesium.Material.CircleBlurType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:ac},translucent:function(n){return!0}});i.Cesium.Material.CircleDiffuseType="CircleDiffuse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleDiffuseType,{fabric:{type:i.Cesium.Material.CircleDiffuseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:nc},translucent:function(n){return!0}});i.Cesium.Material.CircleFadeType="CircleFade";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleFadeType,{fabric:{type:i.Cesium.Material.CircleFadeType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:lc},translucent:function(n){return!0}});i.Cesium.Material.CirclePulseType="CirclePulse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CirclePulseType,{fabric:{type:i.Cesium.Material.CirclePulseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:12},source:hc},translucent:function(n){return!0}});i.Cesium.Material.CircleRingType="CircleRing";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleRingType,{fabric:{type:i.Cesium.Material.CircleRingType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:cc},translucent:function(n){return!0}});i.Cesium.Material.CircleRotateType="CircleRotate";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleRotateType,{fabric:{type:i.Cesium.Material.CircleRotateType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId},source:pc},translucent:function(n){return!0}});i.Cesium.Material.CircleScanType="CircleScan";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleScanType,{fabric:{type:i.Cesium.Material.CircleScanType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:1},source:dc},translucent:function(n){return!0}});i.Cesium.Material.CircleSpiralType="CircleSpiral";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleSpiralType,{fabric:{type:i.Cesium.Material.CircleSpiralType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:mc},translucent:function(n){return!0}});i.Cesium.Material.CircleVaryType="CircleVary";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleVaryType,{fabric:{type:i.Cesium.Material.CircleVaryType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3},source:uc},translucent:function(n){return!0}});i.Cesium.Material.CircleWaveType="CircleWave";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.CircleWaveType,{fabric:{type:i.Cesium.Material.CircleWaveType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),speed:3,count:1,gradient:.1},source:_c},translucent:function(n){return!0}});var fc=`uniform vec4 color;
16916
16916
  czm_material czm_getMaterial(czm_materialInput materialInput){
16917
16917
  czm_material material = czm_getDefaultMaterial(materialInput);
16918
16918
  vec2 st = materialInput.st;
@@ -17259,7 +17259,7 @@ czm_material czm_getMaterial(czm_materialInput materialInput){
17259
17259
  }
17260
17260
  return material;
17261
17261
  }
17262
- `;i.Cesium.Material.WallDiffuseType="WallDiffuse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallDiffuseType,{fabric:{type:i.Cesium.Material.WallDiffuseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:Mc},translucent:function(n){return!0}});i.Cesium.Material.WallImageTrailType="WallImageTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallImageTrailType,{fabric:{type:i.Cesium.Material.WallImageTrailType,uniforms:{image:i.Cesium.Material.DefaultImageId,color:new i.Cesium.Color(1,0,0,.7),speed:3,repeat:new i.Cesium.Cartesian2(1,1)},source:Ac},translucent:function(n){return!0}});i.Cesium.Material.WallLineTrailType="WallLineTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallLineTrailType,{fabric:{type:i.Cesium.Material.WallLineTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,repeat:new i.Cesium.Cartesian2(1,1),speed:3},source:Dc},translucent:function(n){return!0}});i.Cesium.Material.WallTrailType="WallTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallTrailType,{fabric:{type:i.Cesium.Material.WallTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:1},source:Lc},translucent:function(n){return!0}});var ia=class{constructor(e={}){this._definitionChanged=new i.Cesium.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=e.color||i.Cesium.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.Cesium.defaultValue(t,{}),t}equals(e){return this===e}},D=ia;var Pt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleBlurType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Pt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ra=Pt;var bt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleDiffuseType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(bt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var sa=bt;var St=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleFadeType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(St.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var oa=St;var It=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CirclePulseType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(It.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var aa=It;var Mt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleScanType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Mt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var na=Mt;var At=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleSpiralType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(At.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var la=At;var Dt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleVaryType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Dt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ha=Dt;var Lt=class n extends D{constructor(e={}){super(e),this.count=Math.max(e.count||3,1),this.gradient=i.Cesium.Math.clamp(e.gradient||.1,0,1)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Cesium.Material.CircleWaveType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t.count=i.Cesium.Property.getValueOrUndefined(this._count,e),t.gradient=i.Cesium.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Lt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ca=Lt;var Rt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.EllipsoidElectricType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Rt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var da=Rt;var Ot=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.EllipsoidTrailType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ot.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var pa=Ot;var kt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.PolylineFlickerType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(kt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ma=kt;var Ft=class n extends D{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.Cesium.Material.PolylineFlowType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t.percent=i.Cesium.Property.getValueOrUndefined(this._percent,e),t.gradient=i.Cesium.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)&&i.Cesium.Property.equals(this._percent,e._percent)&&i.Cesium.Property.equals(this._gradient,e._gradient)}};Object.defineProperties(Ft.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),percent:i.Cesium.createPropertyDescriptor("percent"),gradient:i.Cesium.createPropertyDescriptor("gradient")});var ua=Ft;var zt=class n extends D{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.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.PolylineImageTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)&&i.Cesium.Property.equals(this._repeat,e._repeat)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(zt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image"),repeat:i.Cesium.createPropertyDescriptor("repeat")});var _a=zt;var Ht="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACYCAYAAACS0lH9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ0GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6Tl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gAAQCELAAAUsgAAQCEFAAAKOQIAgEIWAAAo5LcAAKCQAgAAhRwBAEAhCwAAFLIAAEAhCwAAFLIAAEAhBQAACvkSIAAUsgAAQCEFAAAKKQAAUMhrgABQyAIAAIUUAAAo5AgAAApZAACgkAIAAIUUAAAo5A4AABT6A6gaPQ6/wRIfAAAAAElFTkSuQmCC";var Nt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ht}getType(e){return i.Cesium.Material.PolylineLightingType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)}};Object.defineProperties(Nt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),image:i.Cesium.createPropertyDescriptor("image")});var fa=Nt;var Wt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ht}getType(e){return i.Cesium.Material.PolylineLightingTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Wt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image")});var ga=Wt;var Gt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.PolylineTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Gt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ya=Gt;var Ut=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarLineType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ut.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var va=Ut;var Bt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarSweepType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Bt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var wa=Bt;var Vt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarWaveType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Vt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var Ta=Vt;var jt=class n extends D{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.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.WallImageTrailType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)&&i.Cesium.Property.equals(this._repeat,e._repeat)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(jt.prototype,{image:i.Cesium.createPropertyDescriptor("image"),color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),repeat:i.Cesium.createPropertyDescriptor("repeat")});var Ca=jt;var Rc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAABACAYAAABWdc94AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGx2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9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EBBcgIrgAEcEFiAguQERwASKCCxARXICI4AJEBBcgIrgAEcEFiAguQERwASIfRmAGiWTgoMYAAAAASUVORK5CYII=";var Yt=class n extends D{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=Rc,this.repeat=new i.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.WallLineTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)&&i.Cesium.Property.equals(this._repeat,e._repeat)}};Object.defineProperties(Yt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),image:i.Cesium.createPropertyDescriptor("image"),repeat:i.Cesium.createPropertyDescriptor("repeat"),speed:i.Cesium.createPropertyDescriptor("speed")});var xa=Yt;var Oc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZgEyAAIAAAAUAAAAiodpAAQAAAABAAAAngAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKE1hY2ludG9zaCkAMjAxODoxMDoyNiAxNTozMDozNAAABJAEAAIAAAAUAAAA1KABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAAAyMDE4OjEwOjI2IDE1OjI0OjI1ALUCxicAAAAJcEhZcwAACxMAAAsTAQCanBgAAAdgaVRYdFhNTD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GGisFqhuDTAoenAV0V2xMG6LNWBNPP0nfXO5w/UPnDnALuGo+b2TfU3wnlzvpI3pkWBmuHPTJKhuDadU2XhBjDy6KNVdEa9FeY8fFGQ9d8tTGIY15/jDCyB0QoIVLBoTkgtdg7gM1n/oTF/DdySCQBaY4eMYDi+wJ6oRrNMWKU0HyxugOiFqTeu3KA43Nm92QdovX93YT9KmIwr+OanD7I6b+cHQJ5OlbNLhvQWJb86+gA8Z1F22SqqMbriyd+gBGmYKJm90jP/wizzj3gcNmve/5HYDgDsgHkJkoxdsIx6Mz2P8kfIAn2a9iBUDaw0+fi2FF2KppXpz0sdgxbgzCjjvxt01/dXCLj957oO/A2QEYvf7tpFsgLCgG/w9NjGZycTU0MdXlJD/H5hbjUQg+G2PssYuLXvvowwdfn8AH23cBbfrnH43yc5ixj0Fv1TpIiJ+SXZbvOBu/xRBX2WzzhDHBFmKolcu6dtdw9WB8srVP3IlXngN28cvgLl6uf4Gl/F2AidwB6pzMuWC7EUm89gOTiU+cjicN1i+vW80tp3ITbJw0RR/IE+J6KkyzMlZuLsUMHrZ8yo9YMeBrjMQezPoW4CWgYYpJ5a7aSfp1cvitOyfo27JTbIRFdHAaBhObskmLG0zYyOoO04IY1zy13TcKnR3Q5lMA2MuHfxp75VN4LgOi4ZNtf74MOUnIwCWDV/5e7uSlkbfCcRMuH2yrvBRlLgcO9xXqjIP/9lUeTLjFI3z8F+ualIvlptDJAAAAAElFTkSuQmCC";var Zt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Oc}getType(e){return i.Cesium.Material.WallTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Zt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image")});var Ea=Zt;var qt=class n{constructor(e){e=e||{},this._definitionChanged=new i.Cesium.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=e.baseWaterColor||new i.Cesium.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=e.blendColor||new i.Cesium.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=e.specularMap||i.Cesium.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=e.normalMap||i.Cesium.Material.DefaultImageId,this.frequency=i.Cesium.defaultValue(e.frequency,1e3),this.animationSpeed=i.Cesium.defaultValue(e.animationSpeed,.01),this.amplitude=i.Cesium.defaultValue(e.amplitude,10),this.specularIntensity=i.Cesium.defaultValue(e.specularIntensity,.5)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Cesium.Material.WaterType}getValue(e,t){return t||(t={}),t.baseWaterColor=i.Cesium.Property.getValueOrUndefined(this._baseWaterColor,e),t.blendColor=i.Cesium.Property.getValueOrUndefined(this._blendColor,e),t.specularMap=i.Cesium.Property.getValueOrUndefined(this._specularMap,e),t.normalMap=i.Cesium.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 n&&i.Cesium.Property.equals(this._baseWaterColor,e._baseWaterColor)}};Object.defineProperties(qt.prototype,{baseWaterColor:i.Cesium.createPropertyDescriptor("baseWaterColor"),blendColor:i.Cesium.createPropertyDescriptor("blendColor"),specularMap:i.Cesium.createPropertyDescriptor("specularMap"),normalMap:i.Cesium.createPropertyDescriptor("normalMap")});var Pa=qt;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)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._delegate&&this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.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._mountedHook(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.drawTool.fire(C.DRAW_STOP),this}},U=ba;var _u={pixelSize:10,outlineColor:i.Cesium.Color.BLUE,outlineWidth:5},Sa=class extends U{constructor(e){super(),this._position=i.Cesium.Cartesian3.ZERO,this._style={..._u,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({position:new i.Cesium.CallbackProperty(()=>this._position,!1),point:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new it(u.transformCartesianToWGS84(this._position)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(C.DRAW_STOP,e)}_onAnchorMoving(e){this._position=e}},kc=Sa;var fu={width:3,material:i.Cesium.Color.YELLOW.withAlpha(.6)},Ia=class extends U{constructor(e){super(),this._style={...fu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.CallbackProperty(()=>this._positions,!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){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Fc=Ia;var gu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Ma=class extends U{constructor(e){super(),this._style={...gu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ye(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e})}},zc=Ma;var yu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Aa=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._radius=0,this._style={...yu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>{if(this._positions.length>1){if(this._radius=i.Cesium.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let e=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:this._positions[0],semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),t=i.Cesium.Cartesian3.unpackArray(e.outerPositions);return t.push(t[0]),new i.Cesium.PolygonHierarchy(t)}else return null},!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new et(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(C.CREATE_ANCHOR,{position:e,isCenter:t===1}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Hc=Aa;var vu={material:i.Cesium.Color.YELLOW.withAlpha(.6)},Da=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._style={...vu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({rectangle:{...this._style,coordinates:new i.Cesium.CallbackProperty(e=>this._positions.length>1?i.Cesium.Rectangle.fromCartesianArray(this._positions):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new rt(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(C.CREATE_ANCHOR,{position:e}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Nc=Da;var La=class extends U{constructor(e){super(),this._position=i.Cesium.Cartesian3.ZERO,this._style={image:Ne,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({position:new i.Cesium.CallbackProperty(()=>this._position,!1),billboard:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new ge(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(C.DRAW_STOP)}_onAnchorMoving(e){this._position=e}},Wc=La;var Xt=Math.PI/2,Ra=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}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowHeadPoints(e,t,r){let s=w.getBaseLength(e),o=s*this.headHeightFactor,a=e[e.length-1];s=w.distance(a,e[e.length-2]);let l=w.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let d=o*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],a,0,o,!0),T=w.getThirdPoint(e[e.length-2],a,0,d,!0),y=w.getThirdPoint(a,f,Xt,h,!1),m=w.getThirdPoint(a,f,Xt,h,!0),E=w.getThirdPoint(a,T,Xt,c,!1),x=w.getThirdPoint(a,T,Xt,c,!0);return[E,y,a,m,x]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,d=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;d+=w.distance(e[y-1],e[y]);let E=(l/2-d/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_createHierarchy(){let e=_.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 o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r)/w.getBaseLength(o),d=this._getArrowBodyPoints(o,l,h,c),f=d.length,T=[t].concat(d.slice(0,f/2));T.push(l);let y=[r].concat(d.slice(f/2,f));return y.push(h),T=w.getQBSplinePoints(T),y=w.getQBSplinePoints(y),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(T.concat(a,y.reverse()))))}},We=Ra;var wu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Oa=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...wu,...e},this._graphics=new We}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 Le(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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Gc=Oa;var J=Math.PI/2,ka=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowPoints(e,t,r,s){let o=w.mid(e,t),a=w.distance(o,r),l=w.getThirdPoint(r,o,0,a*.3,!0),h=w.getThirdPoint(r,o,0,a*.5,!0);l=w.getThirdPoint(o,l,J,a/5,s),h=w.getThirdPoint(o,h,J,a/4,s);let c=[o,l,h,r],d=this._getArrowHeadPoints(c),f=d[0],T=d[4],y=w.distance(e,t)/w.getBaseLength(c)/2,m=this._getArrowBodyPoints(c,f,T,y),E=m.length,x=m.slice(0,E/2),b=m.slice(E/2,E);return x.push(f),b.push(T),x=x.reverse(),x.push(t),b=b.reverse(),b.push(e),x.reverse().concat(d,b)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,a=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,l,!0),d=w.getThirdPoint(s,h,J,o,!1),f=w.getThirdPoint(s,h,J,o,!0),T=w.getThirdPoint(s,c,J,a,!1),y=w.getThirdPoint(s,c,J,a,!0);return[T,d,s,f,y]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,d=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;d+=w.distance(e[y-1],e[y]);let E=(l/2-d/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getTempPoint4(e,t,r){let s=w.mid(e,t),o=w.distance(s,r),a=w.getAngleOfThreePoints(e,s,r),l,h,c,d;return a<J?(h=o*Math.sin(a),c=o*Math.cos(a),d=w.getThirdPoint(e,s,J,h,!1),l=w.getThirdPoint(s,d,J,c,!0)):a>=J&&a<Math.PI?(h=o*Math.sin(Math.PI-a),c=o*Math.cos(Math.PI-a),d=w.getThirdPoint(e,s,J,h,!1),l=w.getThirdPoint(s,d,J,c,!1)):a>=Math.PI&&a<Math.PI*1.5?(h=o*Math.sin(a-Math.PI),c=o*Math.cos(a-Math.PI),d=w.getThirdPoint(e,s,J,h,!0),l=w.getThirdPoint(s,d,J,c,!0)):(h=o*Math.sin(Math.PI*2-a),c=o*Math.cos(Math.PI*2-a),d=w.getThirdPoint(e,s,J,h,!0),l=w.getThirdPoint(s,d,J,c,!1)),l}_createHierarchy(){let e=this._positions.length,t,r,s=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],o=s[0],a=s[1],l=s[2];e===3?t=this._getTempPoint4(o,a,l):t=s[3],e===3||e===4?r=w.mid(o,a):r=s[4];let h,c;w.isClockWise(o,a,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,a,l,!0)):(h=this._getArrowPoints(a,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let d=h.length,f=(d-5)/2,T=h.slice(0,f),y=h.slice(f,f+5),m=h.slice(f+5,d),E=c.slice(0,f),x=c.slice(f,f+5),b=c.slice(f+5,d);E=w.getBezierPoints(E);let I=w.getBezierPoints(b.concat(T.slice(1)));return m=w.getBezierPoints(m),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(E.concat(x,I,y,m))))}},Jt=ka;var Tu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Fa=class extends U{constructor(e){super(),this._maxAnchorSize=4,this._style={...Tu,...e},this._graphics=new Jt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 qe(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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Uc=Fa;var Bc=Math.PI/2,za=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}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1],s=w.getBaseLength(e),o=s*this.tailWidthFactor,a=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=w.getThirdPoint(r,t,Bc,o,!0),c=w.getThirdPoint(r,t,Bc,o,!1),d=w.getThirdPoint(t,r,this.headAngle,l,!1),f=w.getThirdPoint(t,r,this.headAngle,l,!0),T=w.getThirdPoint(t,r,this.neckAngle,a,!1),y=w.getThirdPoint(t,r,this.neckAngle,a,!0);return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions([h,T,d,r,f,y,c])))}},Kt=za;var Cu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Ha=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._style={...Cu,...e},this._graphics=new Kt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 Xe(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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Vc=Ha;var xu=Math.PI/2,jc=100,Na=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.t=.4}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0];if(this._positions.length===2){let a=w.mid(e[0],e[1]),l=w.distance(e[0],a)/.9,h=w.getThirdPoint(e[0],a,xu,l,!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 a=0;a<e.length-2;a++){let l=e[a],h=e[a+1],c=e[a+2],d=w.getBisectorNormals(this.t,l,h,c);r=r.concat(d)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1];o.push(l);for(let c=0;c<=jc;c++){let d=w.getCubicValue(c/jc,l,r[a*2],r[a*2+1],h);o.push(d)}o.push(h)}return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(o)))}},Qt=Na;var Eu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Wa=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...Eu,...e},this._graphics=new Qt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Yc=Wa;var Ga=class extends We{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=_.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 o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r),d=w.getBaseLength(o),f=d*this.tailWidthFactor*this.swallowTailFactor,T=w.getThirdPoint(o[1],o[0],0,f,!0),y=c/d,m=this._getArrowBodyPoints(o,l,h,y),E=m.length,x=[t].concat(m.slice(0,E/2));x.push(l);let b=[r].concat(m.slice(E/2,E));return b.push(h),x=w.getQBSplinePoints(x),b=w.getQBSplinePoints(b),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(x.concat(a,b.reverse(),[T,x[0]]))))}},$t=Ga;var Pu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Ua=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...Pu,...e},this._graphics=new $t}_mountEntity(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 Ke(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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Zc=Ua;var Ba=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._overlay.show=!1,this._delegate=new i.Cesium.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(C.CREATE_ANCHOR,{position:e,index:t})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now());this._positions[r.index]=t}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.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(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(C.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(C.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(C.EDIT_STOP,{pickedAnchor:null,position:null}),this}},B=Ba;var Va=class extends B{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.Cesium.JulianDate.now()),this._delegate.position=new i.Cesium.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}},qc=Va;var ja=class extends B{constructor(e){super(e)}_mountedHook(){this._delegate.polyline.positions=new i.Cesium.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.Cesium.JulianDate.now());for(let t=0;t<e.length-1;t++){let r=k(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(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,a=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,a=s-1):(o=s-2,a=s-1,l=s+2,h=s+1),o>0){let d=k(this._positions[o],this._positions[s]);this._positions[a]=d,this.editTool.fire(C.UPDATE_ANCHOR,{index:a,position:d})}if(l>0){let d=k(this._positions[l],this._positions[s]);this._positions[h]=d,this.editTool.fire(C.UPDATE_ANCHOR,{index:h,position:d})}}}},Xc=ja;var Ya=class extends B{constructor(e){super(e)}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(e=>this._positions.length>2?new i.Cesium.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.Cesium.JulianDate.now()).positions;e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o,a,l=this._positions.length;s===l-1?(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[0])):(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let a=-1,l=-1,h=-1,c=-1;s===0?(a=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(a=s-2,l=s-1,h=0,c=o-1):(a=s-2,l=s-1,h=s+2,c=s+1);let d=k(this._positions[a],this._positions[s]),f=k(this._positions[h],this._positions[s]);this._positions[l]=d,this._positions[c]=f,this.editTool.fire(C.UPDATE_ANCHOR,{index:l,position:d}),this.editTool.fire(C.UPDATE_ANCHOR,{index:c,position:f})}}},Jc=Ya;var Za=class extends B{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.Cesium.CallbackProperty(e=>{if(this._positions.length>1){if(this._radius=i.Cesium.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.Cesium.PolygonHierarchy(t)}else return null},!1),this._layer.entities.add(this._delegate)}_computeCirclePoints(e,t){let r=[],s=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0);return s&&s.outerPositions&&(r=i.Cesium.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(C.CREATE_ANCHOR,{position:e,index:t,isCenter:t%2===0})})}},Kc=Za;var qa=class extends B{constructor(e){super(e),this._overlay=e}_mountedHook(){this._delegate.rectangle.coordinates=new i.Cesium.CallbackProperty(e=>this._positions.length>1?i.Cesium.Rectangle.fromCartesianArray(this._positions):null,!1),this._layer.entities.add(this._delegate)}},Qc=qa;var Xa=class extends B{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.Cesium.JulianDate.now()),this._delegate.position=new i.Cesium.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}},$c=Xa;var Ja=class extends B{constructor(e){super(e),this._graphics=new We}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},ed=Ja;var Ka=class extends B{constructor(e){super(e),this._graphics=new Jt}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},td=Ka;var Qa=class extends B{constructor(e){super(e),this._graphics=new Kt}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},id=Qa;var $a=class extends B{constructor(e){super(e),this._graphics=new Qt}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},rd=$a;var en=class extends B{constructor(e){super(e),this._graphics=new $t}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},sd=en;var tn=class{constructor(e,t={}){this._viewer=e,this._options=t,this._layer=new i.Cesium.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 F.POINT:r=new kc(t);break;case F.POLYLINE:r=new Fc(t);break;case F.POLYGON:r=new zc(t);break;case F.CIRCLE:r=new Hc(t);break;case F.RECT:r=new Nc(t);break;case F.BILLBOARD:r=new Wc(t);break;case F.ATTACK_ARROW:r=new Gc(t);break;case F.DOUBLE_ARROW:r=new Uc(t);break;case F.FINE_ARROW:r=new Vc(t);break;case F.TAILED_ATTACK_ARROW:r=new Zc(t);break;case F.GATHERING_PLACE:r=new Yc(t);break;default:break}return r}_createEditWorker(e){let t;switch(e.type){case F.POINT:t=new qc(e);break;case F.POLYLINE:t=new Xc(e);break;case F.POLYGON:t=new Jc(e);break;case F.CIRCLE:t=new Kc(e);break;case F.RECT:t=new Qc(e);break;case F.BILLBOARD:t=new $c(e);break;case F.ATTACK_ARROW:t=new ed(e);break;case F.DOUBLE_ARROW:t=new td(e);break;case F.FINE_ARROW:t=new id(e);break;case F.TAILED_ATTACK_ARROW:t=new sd(e);break;case F.GATHERING_PLACE:t=new rd(e);break;default:break}return t}draw(e,t,r={},s=!1){var a;this._state="draw",this._currentWorker&&this._currentWorker.stop();let o=(r==null?void 0:r.maxAnchorSize)||999;return r&&delete r.maxAnchorSize,this._currentWorker=(a=this._createDrawWorker(e,r))==null?void 0:a.start(this,{...this._options,maxAnchorSize:o,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}stop(){this._currentWorker&&this._currentWorker.stop(),this._currentWorker=null}destroy(){return this._viewer.dataSources.remove(this._layer),this._viewer=void 0,this}},od=tn;var rn=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}},te=rn;var bu={},V=bu;var sn=class extends te{constructor(e,t={}){super(e),this._options=t,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return V.AROUND_VIEW}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Cesium.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.Cesium.Math.toRadians(this._options.pitch):this._viewer.camera.pitch,roll:this._options.roll?i.Cesium.Math.toRadians(this._options.roll):this._viewer.camera.roll}})}};V.AROUND_VIEW="around_view";var on=sn;var an=class extends te{constructor(e,t,r={}){super(e),this._position=_.parsePosition(t),this._options=r,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return V.AROUND_POINT}set position(e){this._position=_.parsePosition(e)}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Cesium.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.Cesium.HeadingPitchRange(this._heading,i.Cesium.Math.toRadians(this._options.pitch||0),this._options.range||1e3))}};V.AROUND_POINT="around_point";var nn=an;var ad=`in vec2 v_textureCoordinates;
17262
+ `;i.Cesium.Material.WallDiffuseType="WallDiffuse";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallDiffuseType,{fabric:{type:i.Cesium.Material.WallDiffuseType,uniforms:{color:new i.Cesium.Color(1,0,0,.7)},source:Mc},translucent:function(n){return!0}});i.Cesium.Material.WallImageTrailType="WallImageTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallImageTrailType,{fabric:{type:i.Cesium.Material.WallImageTrailType,uniforms:{image:i.Cesium.Material.DefaultImageId,color:new i.Cesium.Color(1,0,0,.7),speed:3,repeat:new i.Cesium.Cartesian2(1,1)},source:Ac},translucent:function(n){return!0}});i.Cesium.Material.WallLineTrailType="WallLineTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallLineTrailType,{fabric:{type:i.Cesium.Material.WallLineTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,repeat:new i.Cesium.Cartesian2(1,1),speed:3},source:Dc},translucent:function(n){return!0}});i.Cesium.Material.WallTrailType="WallTrail";i.Cesium.Material._materialCache.addMaterial(i.Cesium.Material.WallTrailType,{fabric:{type:i.Cesium.Material.WallTrailType,uniforms:{color:new i.Cesium.Color(1,0,0,.7),image:i.Cesium.Material.DefaultImageId,speed:1},source:Lc},translucent:function(n){return!0}});var ia=class{constructor(e={}){this._definitionChanged=new i.Cesium.Event,this._color=void 0,this._colorSubscription=void 0,this._speed=void 0,this._speedSubscription=void 0,this.color=e.color||i.Cesium.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.Cesium.defaultValue(t,{}),t}equals(e){return this===e}},D=ia;var Pt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleBlurType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Pt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ra=Pt;var bt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleDiffuseType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(bt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var sa=bt;var St=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleFadeType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(St.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var oa=St;var It=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CirclePulseType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(It.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var aa=It;var Mt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleScanType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Mt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var na=Mt;var At=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleSpiralType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(At.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var la=At;var Dt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.CircleVaryType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Dt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ha=Dt;var Lt=class n extends D{constructor(e={}){super(e),this.count=Math.max(e.count||3,1),this.gradient=i.Cesium.Math.clamp(e.gradient||.1,0,1)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Cesium.Material.CircleWaveType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t.count=i.Cesium.Property.getValueOrUndefined(this._count,e),t.gradient=i.Cesium.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Lt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ca=Lt;var Rt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.EllipsoidElectricType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Rt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var pa=Rt;var Ot=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.EllipsoidTrailType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ot.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var da=Ot;var kt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.PolylineFlickerType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(kt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ma=kt;var Ft=class n extends D{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.Cesium.Material.PolylineFlowType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t.percent=i.Cesium.Property.getValueOrUndefined(this._percent,e),t.gradient=i.Cesium.Property.getValueOrUndefined(this._gradient,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)&&i.Cesium.Property.equals(this._percent,e._percent)&&i.Cesium.Property.equals(this._gradient,e._gradient)}};Object.defineProperties(Ft.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),percent:i.Cesium.createPropertyDescriptor("percent"),gradient:i.Cesium.createPropertyDescriptor("gradient")});var ua=Ft;var zt=class n extends D{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.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.PolylineImageTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)&&i.Cesium.Property.equals(this._repeat,e._repeat)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(zt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image"),repeat:i.Cesium.createPropertyDescriptor("repeat")});var _a=zt;var Ht="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAACYCAYAAACS0lH9AAAACXBIWXMAAAsTAAALEwEAmpwYAAAJ0GlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZT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hRwBAEAhCwAAFLIAAEAhCwAAFLIAAEAhBQAACvkSIAAUsgAAQCEFAAAKKQAAUMhrgABQyAIAAIUUAAAo5AgAAApZAACgkAIAAIUUAAAo5A4AABT6A6gaPQ6/wRIfAAAAAElFTkSuQmCC";var Nt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ht}getType(e){return i.Cesium.Material.PolylineLightingType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)}};Object.defineProperties(Nt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),image:i.Cesium.createPropertyDescriptor("image")});var fa=Nt;var Wt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Ht}getType(e){return i.Cesium.Material.PolylineLightingTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Wt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image")});var ga=Wt;var Gt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.PolylineTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=this._speed,t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Gt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var ya=Gt;var Ut=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarLineType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Ut.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var va=Ut;var Bt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarSweepType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Bt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var wa=Bt;var Vt=class n extends D{constructor(e={}){super(e)}getType(e){return i.Cesium.Material.RadarWaveType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Vt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed")});var Ta=Vt;var jt=class n extends D{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.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.WallImageTrailType}getValue(e,t){return t=i.Cesium.defaultValue(t,{}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._image,e._image)&&i.Cesium.Property.equals(this._repeat,e._repeat)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(jt.prototype,{image:i.Cesium.createPropertyDescriptor("image"),color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),repeat:i.Cesium.createPropertyDescriptor("repeat")});var Ca=jt;var Rc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAVwAAABACAYAAABWdc94AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGx2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDIgMTE2LjE2NDY1NSwgMjAyMS8wMS8yNi0xNTo0MToyMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RFdnQ9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZUV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guQERwASIfRmAGiWTgoMYAAAAASUVORK5CYII=";var Yt=class n extends D{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=Rc,this.repeat=new i.Cesium.Cartesian2(((t=e.repeat)==null?void 0:t.x)||1,((r=e.repeat)==null?void 0:r.y)||1)}getType(e){return i.Cesium.Material.WallLineTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.repeat=i.Cesium.Property.getValueOrUndefined(this._repeat,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)&&i.Cesium.Property.equals(this._repeat,e._repeat)}};Object.defineProperties(Yt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),image:i.Cesium.createPropertyDescriptor("image"),repeat:i.Cesium.createPropertyDescriptor("repeat"),speed:i.Cesium.createPropertyDescriptor("speed")});var xa=Yt;var Oc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAOhlWElmTU0AKgAAAAgABgESAAMAAAABAAEAAAEaAAUAAAABAAAAVgEbAAUAAAABAAAAXgExAAIAAAAkAAAAZgEyAAIAAAAUAAAAiodpAAQAAAABAAAAngAAAAAAAABIAAAAAQAAAEgAAAABQWRvYmUgUGhvdG9zaG9wIENDIDIwMTggKE1hY2ludG9zaCkAMjAxODoxMDoyNiAxNTozMDozNAAABJAEAAIAAAAUAAAA1KABAAMAAAABAAEAAKACAAQAAAABAAAAQKADAAQAAAABAAAAQAAAAAAyMDE4OjEwOjI2IDE1OjI0OjI1ALUCxicAAAAJcEhZcwAACxMAAAsTAQCanBgAAAdgaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng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b2TfU3wnlzvpI3pkWBmuHPTJKhuDadU2XhBjDy6KNVdEa9FeY8fFGQ9d8tTGIY15/jDCyB0QoIVLBoTkgtdg7gM1n/oTF/DdySCQBaY4eMYDi+wJ6oRrNMWKU0HyxugOiFqTeu3KA43Nm92QdovX93YT9KmIwr+OanD7I6b+cHQJ5OlbNLhvQWJb86+gA8Z1F22SqqMbriyd+gBGmYKJm90jP/wizzj3gcNmve/5HYDgDsgHkJkoxdsIx6Mz2P8kfIAn2a9iBUDaw0+fi2FF2KppXpz0sdgxbgzCjjvxt01/dXCLj957oO/A2QEYvf7tpFsgLCgG/w9NjGZycTU0MdXlJD/H5hbjUQg+G2PssYuLXvvowwdfn8AH23cBbfrnH43yc5ixj0Fv1TpIiJ+SXZbvOBu/xRBX2WzzhDHBFmKolcu6dtdw9WB8srVP3IlXngN28cvgLl6uf4Gl/F2AidwB6pzMuWC7EUm89gOTiU+cjicN1i+vW80tp3ITbJw0RR/IE+J6KkyzMlZuLsUMHrZ8yo9YMeBrjMQezPoW4CWgYYpJ5a7aSfp1cvitOyfo27JTbIRFdHAaBhObskmLG0zYyOoO04IY1zy13TcKnR3Q5lMA2MuHfxp75VN4LgOi4ZNtf74MOUnIwCWDV/5e7uSlkbfCcRMuH2yrvBRlLgcO9xXqjIP/9lUeTLjFI3z8F+ualIvlptDJAAAAAElFTkSuQmCC";var Zt=class n extends D{constructor(e={}){super(e),this._image=void 0,this._imageSubscription=void 0,this.image=Oc}getType(e){return i.Cesium.Material.WallTrailType}getValue(e,t){return t||(t={}),t.color=i.Cesium.Property.getValueOrUndefined(this._color,e),t.image=i.Cesium.Property.getValueOrUndefined(this._image,e),t.speed=i.Cesium.Property.getValueOrUndefined(this._speed,e),t}equals(e){return this===e||e instanceof n&&i.Cesium.Property.equals(this._color,e._color)&&i.Cesium.Property.equals(this._speed,e._speed)}};Object.defineProperties(Zt.prototype,{color:i.Cesium.createPropertyDescriptor("color"),speed:i.Cesium.createPropertyDescriptor("speed"),image:i.Cesium.createPropertyDescriptor("image")});var Ea=Zt;var qt=class n{constructor(e){e=e||{},this._definitionChanged=new i.Cesium.Event,this._baseWaterColor=void 0,this._baseWaterColorSubscription=void 0,this.baseWaterColor=e.baseWaterColor||new i.Cesium.Color(.2,.3,.6,1),this._blendColor=void 0,this._blendColorSubscription=void 0,this.blendColor=e.blendColor||new i.Cesium.Color(0,1,.699,1),this._specularMap=void 0,this._specularMapSubscription=void 0,this.specularMap=e.specularMap||i.Cesium.Material.DefaultImageId,this._normalMap=void 0,this._normalMapSubscription=void 0,this.normalMap=e.normalMap||i.Cesium.Material.DefaultImageId,this.frequency=i.Cesium.defaultValue(e.frequency,1e3),this.animationSpeed=i.Cesium.defaultValue(e.animationSpeed,.01),this.amplitude=i.Cesium.defaultValue(e.amplitude,10),this.specularIntensity=i.Cesium.defaultValue(e.specularIntensity,.5)}get isConstant(){return!1}get definitionChanged(){return this._definitionChanged}getType(e){return i.Cesium.Material.WaterType}getValue(e,t){return t||(t={}),t.baseWaterColor=i.Cesium.Property.getValueOrUndefined(this._baseWaterColor,e),t.blendColor=i.Cesium.Property.getValueOrUndefined(this._blendColor,e),t.specularMap=i.Cesium.Property.getValueOrUndefined(this._specularMap,e),t.normalMap=i.Cesium.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 n&&i.Cesium.Property.equals(this._baseWaterColor,e._baseWaterColor)}};Object.defineProperties(qt.prototype,{baseWaterColor:i.Cesium.createPropertyDescriptor("baseWaterColor"),blendColor:i.Cesium.createPropertyDescriptor("blendColor"),specularMap:i.Cesium.createPropertyDescriptor("specularMap"),normalMap:i.Cesium.createPropertyDescriptor("normalMap")});var Pa=qt;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)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._delegate&&this._layer.entities.remove(this._delegate),this._stoppedHook()}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.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._mountedHook(),this._unbindEvent(),this._bindEvent(),this}stop(){return this.drawTool.fire(C.DRAW_STOP),this}},U=ba;var _u={pixelSize:10,outlineColor:i.Cesium.Color.BLUE,outlineWidth:5},Sa=class extends U{constructor(e){super(),this._position=i.Cesium.Cartesian3.ZERO,this._style={..._u,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({position:new i.Cesium.CallbackProperty(()=>this._position,!1),point:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new it(u.transformCartesianToWGS84(this._position)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._position=e,this.drawTool.fire(C.DRAW_STOP,e)}_onAnchorMoving(e){this._position=e}},kc=Sa;var fu={width:3,material:i.Cesium.Color.YELLOW.withAlpha(.6)},Ia=class extends U{constructor(e){super(),this._style={...fu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.CallbackProperty(()=>this._positions,!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){let t=this._positions.length;this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Fc=Ia;var gu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Ma=class extends U{constructor(e){super(),this._style={...gu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new ye(u.transformCartesianArrayToWGS84Array(this._positions)).setStyle(this._style)),this._options.onDrawStop&&this._options.onDrawStop(e)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e})}},zc=Ma;var yu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Aa=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._radius=0,this._style={...yu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>{if(this._positions.length>1){if(this._radius=i.Cesium.Cartesian3.distance(this._positions[0],this._positions[1]),this._radius<=0)return null;let e=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:this._positions[0],semiMajorAxis:this._radius,semiMinorAxis:this._radius,rotation:0,granularity:.005},!1,!0),t=i.Cesium.Cartesian3.unpackArray(e.outerPositions);return t.push(t[0]),new i.Cesium.PolygonHierarchy(t)}else return null},!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new et(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(C.CREATE_ANCHOR,{position:e,isCenter:t===1}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Hc=Aa;var vu={material:i.Cesium.Color.YELLOW.withAlpha(.6)},Da=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._style={...vu,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({rectangle:{...this._style,coordinates:new i.Cesium.CallbackProperty(e=>this._positions.length>1?i.Cesium.Rectangle.fromCartesianArray(this._positions):null,!1)}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._positions.length&&(e=new rt(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(C.CREATE_ANCHOR,{position:e}),t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Nc=Da;var La=class extends U{constructor(e){super(),this._position=i.Cesium.Cartesian3.ZERO,this._style={image:Ne,...e}}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({position:new i.Cesium.CallbackProperty(()=>this._position,!1),billboard:{...this._style}}),this._layer.entities.add(this._delegate)}_stoppedHook(){let e=null;this._position&&(e=new ge(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(C.DRAW_STOP)}_onAnchorMoving(e){this._position=e}},Wc=La;var Xt=Math.PI/2,Ra=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}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowHeadPoints(e,t,r){let s=w.getBaseLength(e),o=s*this.headHeightFactor,a=e[e.length-1];s=w.distance(a,e[e.length-2]);let l=w.distance(t,r);o>l*this.headTailFactor&&(o=l*this.headTailFactor);let h=o*this.headWidthFactor,c=o*this.neckWidthFactor;o=o>s?s:o;let p=o*this.neckHeightFactor,f=w.getThirdPoint(e[e.length-2],a,0,o,!0),T=w.getThirdPoint(e[e.length-2],a,0,p,!0),y=w.getThirdPoint(a,f,Xt,h,!1),m=w.getThirdPoint(a,f,Xt,h,!0),E=w.getThirdPoint(a,T,Xt,c,!1),x=w.getThirdPoint(a,T,Xt,c,!0);return[E,y,a,m,x]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_createHierarchy(){let e=_.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 o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r)/w.getBaseLength(o),p=this._getArrowBodyPoints(o,l,h,c),f=p.length,T=[t].concat(p.slice(0,f/2));T.push(l);let y=[r].concat(p.slice(f/2,f));return y.push(h),T=w.getQBSplinePoints(T),y=w.getQBSplinePoints(y),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(T.concat(a,y.reverse()))))}},We=Ra;var wu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Oa=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...wu,...e},this._graphics=new We}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 Le(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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Gc=Oa;var J=Math.PI/2,ka=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.headHeightFactor=.25,this.headWidthFactor=.3,this.neckHeightFactor=.85,this.neckWidthFactor=.15}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_getArrowPoints(e,t,r,s){let o=w.mid(e,t),a=w.distance(o,r),l=w.getThirdPoint(r,o,0,a*.3,!0),h=w.getThirdPoint(r,o,0,a*.5,!0);l=w.getThirdPoint(o,l,J,a/5,s),h=w.getThirdPoint(o,h,J,a/4,s);let c=[o,l,h,r],p=this._getArrowHeadPoints(c),f=p[0],T=p[4],y=w.distance(e,t)/w.getBaseLength(c)/2,m=this._getArrowBodyPoints(c,f,T,y),E=m.length,x=m.slice(0,E/2),b=m.slice(E/2,E);return x.push(f),b.push(T),x=x.reverse(),x.push(t),b=b.reverse(),b.push(e),x.reverse().concat(p,b)}_getArrowHeadPoints(e){let r=w.getBaseLength(e)*this.headHeightFactor,s=e[e.length-1],o=r*this.headWidthFactor,a=r*this.neckWidthFactor,l=r*this.neckHeightFactor,h=w.getThirdPoint(e[e.length-2],s,0,r,!0),c=w.getThirdPoint(e[e.length-2],s,0,l,!0),p=w.getThirdPoint(s,h,J,o,!1),f=w.getThirdPoint(s,h,J,o,!0),T=w.getThirdPoint(s,c,J,a,!1),y=w.getThirdPoint(s,c,J,a,!0);return[T,p,s,f,y]}_getArrowBodyPoints(e,t,r,s){let o=w.wholeDistance(e),l=w.getBaseLength(e)*s,h=w.distance(t,r),c=(l-h)/2,p=0,f=[],T=[];for(let y=1;y<e.length-1;y++){let m=w.getAngleOfThreePoints(e[y-1],e[y],e[y+1])/2;p+=w.distance(e[y-1],e[y]);let E=(l/2-p/o*c)/Math.sin(m),x=w.getThirdPoint(e[y-1],e[y],Math.PI-m,E,!0),b=w.getThirdPoint(e[y-1],e[y],m,E,!1);f.push(x),T.push(b)}return f.concat(T)}_getTempPoint4(e,t,r){let s=w.mid(e,t),o=w.distance(s,r),a=w.getAngleOfThreePoints(e,s,r),l,h,c,p;return a<J?(h=o*Math.sin(a),c=o*Math.cos(a),p=w.getThirdPoint(e,s,J,h,!1),l=w.getThirdPoint(s,p,J,c,!0)):a>=J&&a<Math.PI?(h=o*Math.sin(Math.PI-a),c=o*Math.cos(Math.PI-a),p=w.getThirdPoint(e,s,J,h,!1),l=w.getThirdPoint(s,p,J,c,!1)):a>=Math.PI&&a<Math.PI*1.5?(h=o*Math.sin(a-Math.PI),c=o*Math.cos(a-Math.PI),p=w.getThirdPoint(e,s,J,h,!0),l=w.getThirdPoint(s,p,J,c,!0)):(h=o*Math.sin(Math.PI*2-a),c=o*Math.cos(Math.PI*2-a),p=w.getThirdPoint(e,s,J,h,!0),l=w.getThirdPoint(s,p,J,c,!1)),l}_createHierarchy(){let e=this._positions.length,t,r,s=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],o=s[0],a=s[1],l=s[2];e===3?t=this._getTempPoint4(o,a,l):t=s[3],e===3||e===4?r=w.mid(o,a):r=s[4];let h,c;w.isClockWise(o,a,l)?(h=this._getArrowPoints(o,r,t,!1),c=this._getArrowPoints(r,a,l,!0)):(h=this._getArrowPoints(a,r,l,!1),c=this._getArrowPoints(r,o,t,!0));let p=h.length,f=(p-5)/2,T=h.slice(0,f),y=h.slice(f,f+5),m=h.slice(f+5,p),E=c.slice(0,f),x=c.slice(f,f+5),b=c.slice(f+5,p);E=w.getBezierPoints(E);let I=w.getBezierPoints(b.concat(T.slice(1)));return m=w.getBezierPoints(m),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(E.concat(x,I,y,m))))}},Jt=ka;var Tu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Fa=class extends U{constructor(e){super(),this._maxAnchorSize=4,this._style={...Tu,...e},this._graphics=new Jt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 qe(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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Uc=Fa;var Bc=Math.PI/2,za=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}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0],t=e[0],r=e[1],s=w.getBaseLength(e),o=s*this.tailWidthFactor,a=s*this.neckWidthFactor,l=s*this.headWidthFactor,h=w.getThirdPoint(r,t,Bc,o,!0),c=w.getThirdPoint(r,t,Bc,o,!1),p=w.getThirdPoint(t,r,this.headAngle,l,!1),f=w.getThirdPoint(t,r,this.headAngle,l,!0),T=w.getThirdPoint(t,r,this.neckAngle,a,!1),y=w.getThirdPoint(t,r,this.neckAngle,a,!0);return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions([h,T,p,r,f,y,c])))}},Kt=za;var Cu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Ha=class extends U{constructor(e){super(),this._maxAnchorSize=2,this._style={...Cu,...e},this._graphics=new Kt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 Xe(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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Vc=Ha;var xu=Math.PI/2,jc=100,Na=class{constructor(e){this._positions=(e==null?void 0:e.positions)||[],this.t=.4}set positions(e){this._positions=e}get positions(){return this._positions}get hierarchy(){return this._createHierarchy()}_createHierarchy(){let e=_.parsePolygonCoordToArray(u.transformCartesianArrayToWGS84Array(this._positions))[0];if(this._positions.length===2){let a=w.mid(e[0],e[1]),l=w.distance(e[0],a)/.9,h=w.getThirdPoint(e[0],a,xu,l,!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 a=0;a<e.length-2;a++){let l=e[a],h=e[a+1],c=e[a+2],p=w.getBisectorNormals(this.t,l,h,c);r=r.concat(p)}let s=r.length;r=[r[s-1]].concat(r.slice(0,s-1));let o=[];for(let a=0;a<e.length-2;a++){let l=e[a],h=e[a+1];o.push(l);for(let c=0;c<=jc;c++){let p=w.getCubicValue(c/jc,l,r[a*2],r[a*2+1],h);o.push(p)}o.push(h)}return new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(o)))}},Qt=Na;var Eu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Wa=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...Eu,...e},this._graphics=new Qt}_mountedHook(){this.drawTool.tooltipMess="\u5355\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Yc=Wa;var Ga=class extends We{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=_.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 o=[w.mid(t,r)].concat(e.slice(2)),a=this._getArrowHeadPoints(o,t,r),l=a[0],h=a[4],c=w.distance(t,r),p=w.getBaseLength(o),f=p*this.tailWidthFactor*this.swallowTailFactor,T=w.getThirdPoint(o[1],o[0],0,f,!0),y=c/p,m=this._getArrowBodyPoints(o,l,h,y),E=m.length,x=[t].concat(m.slice(0,E/2));x.push(l);let b=[r].concat(m.slice(E/2,E));return b.push(h),x=w.getQBSplinePoints(x),b=w.getQBSplinePoints(b),new i.Cesium.PolygonHierarchy(u.transformWGS84ArrayToCartesianArray(_.parsePositions(x.concat(a,b.reverse(),[T,x[0]]))))}},$t=Ga;var Pu={material:i.Cesium.Color.YELLOW.withAlpha(.6),fill:!0},Ua=class extends U{constructor(e){super(),this._maxAnchorSize=3,this._style={...Pu,...e},this._graphics=new $t}_mountEntity(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.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 Ke(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(C.CREATE_ANCHOR,{position:e}),this._graphics.positions=this._positions,t>=this._maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP))}},Zc=Ua;var Ba=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._overlay.show=!1,this._delegate=new i.Cesium.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(C.CREATE_ANCHOR,{position:e,index:t})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now());this._positions[r.index]=t}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.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(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(C.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(C.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(C.EDIT_STOP,{pickedAnchor:null,position:null}),this}},B=Ba;var Va=class extends B{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.Cesium.JulianDate.now()),this._delegate.position=new i.Cesium.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}},qc=Va;var ja=class extends B{constructor(e){super(e)}_mountedHook(){this._delegate.polyline.positions=new i.Cesium.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.Cesium.JulianDate.now());for(let t=0;t<e.length-1;t++){let r=k(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(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,a=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,a=s-1):(o=s-2,a=s-1,l=s+2,h=s+1),o>0){let p=k(this._positions[o],this._positions[s]);this._positions[a]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:a,position:p})}if(l>0){let p=k(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:h,position:p})}}}},Xc=ja;var Ya=class extends B{constructor(e){super(e)}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(e=>this._positions.length>2?new i.Cesium.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.Cesium.JulianDate.now()).positions;e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o,a,l=this._positions.length;s===l-1?(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[0])):(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let a=-1,l=-1,h=-1,c=-1;s===0?(a=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(a=s-2,l=s-1,h=0,c=o-1):(a=s-2,l=s-1,h=s+2,c=s+1);let p=k(this._positions[a],this._positions[s]),f=k(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=f,this.editTool.fire(C.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(C.UPDATE_ANCHOR,{index:c,position:f})}}},Jc=Ya;var Za=class extends B{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.Cesium.CallbackProperty(e=>{if(this._positions.length>1){if(this._radius=i.Cesium.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.Cesium.PolygonHierarchy(t)}else return null},!1),this._layer.entities.add(this._delegate)}_computeCirclePoints(e,t){let r=[],s=i.Cesium.EllipseGeometryLibrary.computeEllipsePositions({center:e,semiMajorAxis:t,semiMinorAxis:t,rotation:0,granularity:.005},!1,!0);return s&&s.outerPositions&&(r=i.Cesium.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(C.CREATE_ANCHOR,{position:e,index:t,isCenter:t%2===0})})}},Kc=Za;var qa=class extends B{constructor(e){super(e),this._overlay=e}_mountedHook(){this._delegate.rectangle.coordinates=new i.Cesium.CallbackProperty(e=>this._positions.length>1?i.Cesium.Rectangle.fromCartesianArray(this._positions):null,!1),this._layer.entities.add(this._delegate)}},Qc=qa;var Xa=class extends B{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.Cesium.JulianDate.now()),this._delegate.position=new i.Cesium.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}},$c=Xa;var Ja=class extends B{constructor(e){super(e),this._graphics=new We}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},ep=Ja;var Ka=class extends B{constructor(e){super(e),this._graphics=new Jt}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},tp=Ka;var Qa=class extends B{constructor(e){super(e),this._graphics=new Kt}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},ip=Qa;var $a=class extends B{constructor(e){super(e),this._graphics=new Qt}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>1?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},rp=$a;var en=class extends B{constructor(e){super(e),this._graphics=new $t}_mountedHook(){this._delegate.polygon.hierarchy=new i.Cesium.CallbackProperty(()=>this._positions.length>2?(this._graphics.positions=this._positions,this._graphics.hierarchy):null,!1),this._layer.entities.add(this._delegate)}},sp=en;var tn=class{constructor(e,t={}){this._viewer=e,this._options=t,this._layer=new i.Cesium.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 F.POINT:r=new kc(t);break;case F.POLYLINE:r=new Fc(t);break;case F.POLYGON:r=new zc(t);break;case F.CIRCLE:r=new Hc(t);break;case F.RECT:r=new Nc(t);break;case F.BILLBOARD:r=new Wc(t);break;case F.ATTACK_ARROW:r=new Gc(t);break;case F.DOUBLE_ARROW:r=new Uc(t);break;case F.FINE_ARROW:r=new Vc(t);break;case F.TAILED_ATTACK_ARROW:r=new Zc(t);break;case F.GATHERING_PLACE:r=new Yc(t);break;default:break}return r}_createEditWorker(e){let t;switch(e.type){case F.POINT:t=new qc(e);break;case F.POLYLINE:t=new Xc(e);break;case F.POLYGON:t=new Jc(e);break;case F.CIRCLE:t=new Kc(e);break;case F.RECT:t=new Qc(e);break;case F.BILLBOARD:t=new $c(e);break;case F.ATTACK_ARROW:t=new ep(e);break;case F.DOUBLE_ARROW:t=new tp(e);break;case F.FINE_ARROW:t=new ip(e);break;case F.TAILED_ATTACK_ARROW:t=new sp(e);break;case F.GATHERING_PLACE:t=new rp(e);break;default:break}return t}draw(e,t,r={},s=!1){var a;this._state="draw",this._currentWorker&&this._currentWorker.stop();let o=(r==null?void 0:r.maxAnchorSize)||999;return r&&delete r.maxAnchorSize,this._currentWorker=(a=this._createDrawWorker(e,r))==null?void 0:a.start(this,{...this._options,maxAnchorSize:o,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}stop(){this._currentWorker&&this._currentWorker.stop(),this._currentWorker=null}destroy(){return this._viewer.dataSources.remove(this._layer),this._viewer=void 0,this}},op=tn;var rn=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}},te=rn;var bu={},V=bu;var sn=class extends te{constructor(e,t={}){super(e),this._options=t,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return V.AROUND_VIEW}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Cesium.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.Cesium.Math.toRadians(this._options.pitch):this._viewer.camera.pitch,roll:this._options.roll?i.Cesium.Math.toRadians(this._options.roll):this._viewer.camera.roll}})}};V.AROUND_VIEW="around_view";var on=sn;var an=class extends te{constructor(e,t,r={}){super(e),this._position=_.parsePosition(t),this._options=r,this._heading=e.camera.heading,this._aroundAmount=.2}get type(){return V.AROUND_POINT}set position(e){this._position=_.parsePosition(e)}set aroundAmount(e){this._aroundAmount=e}_bindEvent(){this._viewer.clock.onTick.addEventListener(this._onAround,this)}_unbindEvent(){this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.clock.onTick.removeEventListener(this._onAround,this)}_onAround(e,t){this._heading+=i.Cesium.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.Cesium.HeadingPitchRange(this._heading,i.Cesium.Math.toRadians(this._options.pitch||0),this._options.range||1e3))}};V.AROUND_POINT="around_point";var nn=an;var ap=`in vec2 v_textureCoordinates;
17263
17263
  uniform sampler2D colorTexture;
17264
17264
  uniform sampler2D depthTexture;
17265
17265
  uniform vec3 centerWC;
@@ -17305,7 +17305,7 @@ void main() {
17305
17305
  out_FragColor = mix(out_FragColor, color, f);
17306
17306
  }
17307
17307
  }
17308
- `;var ln=class extends te{constructor(e,t,r,s={}){super(e),this._delegate=void 0,this._position=_.parsePosition(t),this._radius=r||100,this._color=s.color||i.Cesium.Color.RED,this._speed=s.speed||2}get type(){return V.CIRCLE_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cesium.Cartesian3),r=this;this._delegate=new i.Cesium.PostProcessStage({name:v.uuid(),fragmentShader:ad,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}};V.CIRCLE_SCAN="circle_scan";var hn=ln;var cn=class extends te{constructor(e,t={}){super(e),this._options=t,this._positions=[],this._durations=[3],this._currentIndex=0,this._timer=void 0}get type(){return V.FLYING}set positions(e){this._positions=_.parsePositions(e)}get positions(){return this._positions}set durations(e){this._durations=e}get durations(){return this._durations}_cameraFly(){let e=this,t=this._viewer.camera,r=this._positions[this._currentIndex],s=()=>{let o=e._positions[e._currentIndex+1];o?(e._currentIndex++,e._currentIndex<=e._positions.length-1&&(e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3))):!o&&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.Cesium.Math.toRadians(r.heading),pitch:i.Cesium.Math.toRadians(r.pitch),roll:i.Cesium.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}};V.FLYING="flying";var dn=cn;var pn=class extends te{constructor(e,t={}){super(e),this._options=t}get type(){return V.GLOBE_ROTATE}_icrf(e,t){if(e.mode!==i.Cesium.SceneMode.SCENE3D)return!0;let r=i.Cesium.Transforms.computeIcrfToFixedMatrix(t);if(r){let s=this._viewer.camera,o=i.Cesium.Cartesian3.clone(s.position),a=i.Cesium.Matrix4.fromRotationTranslation(r);s.lookAtTransform(a,o)}}_bindEvent(){this._viewer.clock.multiplier=this._options.speed||12*1e3,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}_unbindEvent(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}};V.GLOBE_ROTATE="globe_rotate";var mn=pn;var nd=`in vec2 v_textureCoordinates;
17308
+ `;var ln=class extends te{constructor(e,t,r,s={}){super(e),this._delegate=void 0,this._position=_.parsePosition(t),this._radius=r||100,this._color=s.color||i.Cesium.Color.RED,this._speed=s.speed||2}get type(){return V.CIRCLE_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cesium.Cartesian3),r=this;this._delegate=new i.Cesium.PostProcessStage({name:v.uuid(),fragmentShader:ap,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}};V.CIRCLE_SCAN="circle_scan";var hn=ln;var cn=class extends te{constructor(e,t={}){super(e),this._options=t,this._positions=[],this._durations=[3],this._currentIndex=0,this._timer=void 0}get type(){return V.FLYING}set positions(e){this._positions=_.parsePositions(e)}get positions(){return this._positions}set durations(e){this._durations=e}get durations(){return this._durations}_cameraFly(){let e=this,t=this._viewer.camera,r=this._positions[this._currentIndex],s=()=>{let o=e._positions[e._currentIndex+1];o?(e._currentIndex++,e._currentIndex<=e._positions.length-1&&(e._timer=setTimeout(()=>{e._cameraFly()},(e._options.dwellTime||1)*1e3))):!o&&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.Cesium.Math.toRadians(r.heading),pitch:i.Cesium.Math.toRadians(r.pitch),roll:i.Cesium.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}};V.FLYING="flying";var pn=cn;var dn=class extends te{constructor(e,t={}){super(e),this._options=t}get type(){return V.GLOBE_ROTATE}_icrf(e,t){if(e.mode!==i.Cesium.SceneMode.SCENE3D)return!0;let r=i.Cesium.Transforms.computeIcrfToFixedMatrix(t);if(r){let s=this._viewer.camera,o=i.Cesium.Cartesian3.clone(s.position),a=i.Cesium.Matrix4.fromRotationTranslation(r);s.lookAtTransform(a,o)}}_bindEvent(){this._viewer.clock.multiplier=this._options.speed||12*1e3,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.addEventListener(this._icrf,this)}_unbindEvent(){this._viewer.clock.multiplier=1,this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.scene.postUpdate.removeEventListener(this._icrf,this)}};V.GLOBE_ROTATE="globe_rotate";var mn=dn;var np=`in vec2 v_textureCoordinates;
17309
17309
  uniform sampler2D colorTexture;
17310
17310
  uniform sampler2D depthTexture;
17311
17311
  uniform vec3 centerWC;
@@ -17375,7 +17375,7 @@ void main() {
17375
17375
  out_FragColor = mix(out_FragColor, color, f + f0);
17376
17376
  }
17377
17377
  }
17378
- `;var un=class extends te{constructor(e,t,r,s={}){super(e),this._position=_.parsePosition(t),this._radius=r||100,this._color=s.color||i.Cesium.Color.BLUE,this._speed=s.speed||3,this._delegate=void 0}get type(){return V.RADAR_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cesium.Cartesian3),r=new Date().getTime(),s=this;this._delegate=new i.Cesium.PostProcessStage({name:v.uuid(),fragmentShader:nd,uniforms:{centerWC:function(){return e},planeNormalWC:function(){return t},lineNormalWC:function(){let o=new i.Cesium.Quaternion,a=new i.Cesium.Matrix3,l=i.Cesium.Cartesian3.cross(i.Cesium.Cartesian3.UNIT_Z,t,new i.Cesium.Cartesian3),h=new Date().getTime(),c=i.Cesium.Math.PI*2*((h-r)/1e4)*s._speed;return i.Cesium.Quaternion.fromAxisAngle(t,c,o),i.Cesium.Matrix3.fromQuaternion(o,a),i.Cesium.Matrix3.multiplyByVector(a,l,l),i.Cesium.Cartesian3.normalize(l,l),l},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}};V.RADAR_SCAN="radar_scan";var _n=un;var fn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=p.INITIALIZED}get type(){return"black_and_white"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?p.ENABLED:p.DISABLED}get enable(){return this._enable}set gradations(e){this._gradations=e,this._delegate&&(this._delegate.uniforms.gradations=e)}get gradations(){return this._gradations}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createBlackAndWhiteStage(),this._delegate&&(this._delegate.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this._delegate))}},ld=fn;var gn=class{constructor(e){this._viewer=e,this._enable=!1,this._contrast=128,this._brightness=-.3,this._glowOnly=!1,this._delta=1,this._sigma=3.8,this._stepSize=5,this._selected=[],this._state=p.INITIALIZED}get type(){return"bloom"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?p.ENABLED:p.DISABLED}get enable(){return this._enable}set contrast(e){this._contrast=e,this._delegate&&(this._delegate.uniforms.contrast=e)}get contrast(){return this._contrast}set brightness(e){this._brightness=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get brightness(){return this._brightness}set glowOnly(e){this._glowOnly=e,this._delegate&&(this._delegate.uniforms.glowOnly=e)}get glowOnly(){return this._glowOnly}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_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}},hd=gn;var yn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=p.INITIALIZED}get type(){return"brightness"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?p.ENABLED:p.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get intensity(){return this._intensity}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createBrightnessStage(),this._delegate&&(this._delegate.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this._delegate))}},cd=yn;var vn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._focalDistance=87,this._delta=1,this._sigma=3.8,this._stepSize=2.5,this._selected=[],this._state=p.INITIALIZED}get type(){return"depth_of_field"}set enable(e){this._enable=e,i.Cesium.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?p.ENABLED:p.DISABLED}get enable(){return this._enable}set focalDistance(e){this._focalDistance=e,this._delegate&&(this._delegate.uniforms.focalDistance=e)}get focalDistance(){return this._focalDistance}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.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))}},dd=vn;var wn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=6,this._distortion=61,this._dirtAmount=.4,this._haloWidth=.4,this._selected=[],this._state=p.INITIALIZED}get type(){return"lens_flare"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?p.ENABLED:p.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.intensity=e)}get intensity(){return this._intensity}set distortion(e){this._distortion=e,this._delegate&&(this._delegate.uniforms.distortion=e)}get distortion(){return this._distortion}set dirtAmount(e){this._dirtAmount=e,this._delegate&&(this._delegate.uniforms.dirtAmount=e)}get dirtAmount(){return this._dirtAmount}set haloWidth(e){this._haloWidth=e,this._delegate&&(this._delegate.uniforms.haloWidth=e)}get haloWidth(){return this._haloWidth}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.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))}},pd=wn;var Tn=class{constructor(e){this._viewer=e,this._enable=!1,this._selected=[],this._state=p.INITIALIZED}get type(){return"night"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?p.ENABLED:p.DISABLED}get enable(){return this._enable}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createNightVisionStage(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate)}},md=Tn;var Cn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Cesium.Color.GREEN,this._length=.5,this._selected=[],this._state=p.INITIALIZED}get type(){return"silhouette"}set enable(e){this._enable=e,i.Cesium.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?p.ENABLED:p.DISABLED}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set length(e){this._length=e,this._delegate&&(this._delegate.uniforms.length=e)}get length(){return this._length}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createSilhouetteStage(),this._delegate&&(this._delegate.uniforms.color=this._color,this._delegate.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this._delegate))}},ud=Cn;var xn=class{constructor(e){if(!e)throw Error("missing viewer param");this._blackAndWhite=new ld(e),this._bloom=new hd(e),this._brightness=new cd(e),this._depthOfField=new dd(e),this._lensFlare=new pd(e),this._night=new md(e),this._silhouette=new ud(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}},_d=xn;var fd=`in vec2 v_textureCoordinates;
17378
+ `;var un=class extends te{constructor(e,t,r,s={}){super(e),this._position=_.parsePosition(t),this._radius=r||100,this._color=s.color||i.Cesium.Color.BLUE,this._speed=s.speed||3,this._delegate=void 0}get type(){return V.RADAR_SCAN}_mountContent(){let e=u.transformWGS84ToCartesian(this._position),t=i.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e,new i.Cesium.Cartesian3),r=new Date().getTime(),s=this;this._delegate=new i.Cesium.PostProcessStage({name:v.uuid(),fragmentShader:np,uniforms:{centerWC:function(){return e},planeNormalWC:function(){return t},lineNormalWC:function(){let o=new i.Cesium.Quaternion,a=new i.Cesium.Matrix3,l=i.Cesium.Cartesian3.cross(i.Cesium.Cartesian3.UNIT_Z,t,new i.Cesium.Cartesian3),h=new Date().getTime(),c=i.Cesium.Math.PI*2*((h-r)/1e4)*s._speed;return i.Cesium.Quaternion.fromAxisAngle(t,c,o),i.Cesium.Matrix3.fromQuaternion(o,a),i.Cesium.Matrix3.multiplyByVector(a,l,l),i.Cesium.Cartesian3.normalize(l,l),l},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}};V.RADAR_SCAN="radar_scan";var _n=un;var fn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._gradations=1,this._selected=[],this._state=d.INITIALIZED}get type(){return"black_and_white"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set gradations(e){this._gradations=e,this._delegate&&(this._delegate.uniforms.gradations=e)}get gradations(){return this._gradations}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createBlackAndWhiteStage(),this._delegate&&(this._delegate.uniforms.gradations=this._gradations,this._viewer.scene.postProcessStages.add(this._delegate))}},lp=fn;var gn=class{constructor(e){this._viewer=e,this._enable=!1,this._contrast=128,this._brightness=-.3,this._glowOnly=!1,this._delta=1,this._sigma=3.8,this._stepSize=5,this._selected=[],this._state=d.INITIALIZED}get type(){return"bloom"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set contrast(e){this._contrast=e,this._delegate&&(this._delegate.uniforms.contrast=e)}get contrast(){return this._contrast}set brightness(e){this._brightness=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get brightness(){return this._brightness}set glowOnly(e){this._glowOnly=e,this._delegate&&(this._delegate.uniforms.glowOnly=e)}get glowOnly(){return this._glowOnly}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_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}},hp=gn;var yn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=1,this._selected=[],this._state=d.INITIALIZED}get type(){return"brightness"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.brightness=e)}get intensity(){return this._intensity}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createBrightnessStage(),this._delegate&&(this._delegate.uniforms.brightness=this._intensity,this._viewer.scene.postProcessStages.add(this._delegate))}},cp=yn;var vn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._focalDistance=87,this._delta=1,this._sigma=3.8,this._stepSize=2.5,this._selected=[],this._state=d.INITIALIZED}get type(){return"depth_of_field"}set enable(e){this._enable=e,i.Cesium.PostProcessStageLibrary.isDepthOfFieldSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set focalDistance(e){this._focalDistance=e,this._delegate&&(this._delegate.uniforms.focalDistance=e)}get focalDistance(){return this._focalDistance}set delta(e){this._delta=e,this._delegate&&(this._delegate.uniforms.delta=e)}get delta(){return this._delta}set sigma(e){this._sigma=e,this._delegate&&(this._delegate.uniforms.sigma=e)}get sigma(){return this._sigma}set stepSize(e){this._stepSize=e,this._delegate&&(this._delegate.uniforms.stepSize=e)}get stepSize(){return this._stepSize}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.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))}},pp=vn;var wn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._intensity=6,this._distortion=61,this._dirtAmount=.4,this._haloWidth=.4,this._selected=[],this._state=d.INITIALIZED}get type(){return"lens_flare"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set intensity(e){this._intensity=e,this._delegate&&(this._delegate.uniforms.intensity=e)}get intensity(){return this._intensity}set distortion(e){this._distortion=e,this._delegate&&(this._delegate.uniforms.distortion=e)}get distortion(){return this._distortion}set dirtAmount(e){this._dirtAmount=e,this._delegate&&(this._delegate.uniforms.dirtAmount=e)}get dirtAmount(){return this._dirtAmount}set haloWidth(e){this._haloWidth=e,this._delegate&&(this._delegate.uniforms.haloWidth=e)}get haloWidth(){return this._haloWidth}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.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))}},dp=wn;var Tn=class{constructor(e){this._viewer=e,this._enable=!1,this._selected=[],this._state=d.INITIALIZED}get type(){return"night"}set enable(e){this._enable=e,this._delegate||this._createPostProcessStage(),this._delegate.enabled=e,this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createNightVisionStage(),this._delegate&&this._viewer.scene.postProcessStages.add(this._delegate)}},mp=Tn;var Cn=class{constructor(e){this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Cesium.Color.GREEN,this._length=.5,this._selected=[],this._state=d.INITIALIZED}get type(){return"silhouette"}set enable(e){this._enable=e,i.Cesium.PostProcessStageLibrary.isSilhouetteSupported(this._viewer.scene)&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e),this._state=e?d.ENABLED:d.DISABLED}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set length(e){this._length=e,this._delegate&&(this._delegate.uniforms.length=e)}get length(){return this._length}set selected(e){this._selected=e,this._delegate&&(this._delegate.selected=e)}get selected(){return this._selected}_createPostProcessStage(){this._delegate=i.Cesium.PostProcessStageLibrary.createSilhouetteStage(),this._delegate&&(this._delegate.uniforms.color=this._color,this._delegate.uniforms.length=this._length,this._viewer.scene.postProcessStages.add(this._delegate))}},up=Cn;var xn=class{constructor(e){if(!e)throw Error("missing viewer param");this._blackAndWhite=new lp(e),this._bloom=new hp(e),this._brightness=new cp(e),this._depthOfField=new pp(e),this._lensFlare=new dp(e),this._night=new mp(e),this._silhouette=new up(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}},_p=xn;var fp=`in vec2 v_textureCoordinates;
17379
17379
  uniform sampler2D colorTexture;
17380
17380
  uniform sampler2D depthTexture;
17381
17381
  uniform vec4 fogByDistance;
@@ -17412,7 +17412,7 @@ void main(void){
17412
17412
  vec4 finalFogColor = vec4(fogColor.rgb, fogColor.a * blendAmount);
17413
17413
  out_FragColor = alphaBlend(finalFogColor, sceneColor);
17414
17414
  }
17415
- `;var En=class{constructor(e){this._id=v.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.Cesium.Color(0,0,0,1),this._state=p.INITIALIZED}get type(){return"fog"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set fogByDistance(e){var t,r,s,o;this._fogByDistance=e,this._delegate&&(this._delegate.uniforms.fogByDistance=new i.Cesium.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,((o=this._fogByDistance)==null?void 0:o.farValue)||1))}get fogByDistance(){return this._fogByDistance}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.fogColor=e)}get color(){return this._color}_createPostProcessStage(){var e,t,r,s;this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:fd,uniforms:{fogByDistance:new i.Cesium.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)}},gd=En;var yd=`in vec2 v_textureCoordinates;
17415
+ `;var En=class{constructor(e){this._id=v.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.Cesium.Color(0,0,0,1),this._state=d.INITIALIZED}get type(){return"fog"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set fogByDistance(e){var t,r,s,o;this._fogByDistance=e,this._delegate&&(this._delegate.uniforms.fogByDistance=new i.Cesium.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,((o=this._fogByDistance)==null?void 0:o.farValue)||1))}get fogByDistance(){return this._fogByDistance}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.fogColor=e)}get color(){return this._color}_createPostProcessStage(){var e,t,r,s;this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:fp,uniforms:{fogByDistance:new i.Cesium.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)}},gp=En;var yp=`in vec2 v_textureCoordinates;
17416
17416
  uniform sampler2D colorTexture;
17417
17417
  uniform float speed;
17418
17418
  uniform float mixNum;
@@ -17435,7 +17435,7 @@ void main(){
17435
17435
  c*=v*b;
17436
17436
  out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(c,1), mixNum);
17437
17437
  }
17438
- `;var Pn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=p.INITIALIZED}get type(){return"rain"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}set mixNum(e){this._mixNum=e,this._delegate&&(this._delegate.uniforms.mixNum=e)}get mixNum(){return this._mixNum}_createPostProcessStage(){this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:yd,uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._delegate)}},vd=Pn;var wd=`in vec2 v_textureCoordinates;
17438
+ `;var Pn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._mixNum=.5,this._state=d.INITIALIZED}get type(){return"rain"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}set mixNum(e){this._mixNum=e,this._delegate&&(this._delegate.uniforms.mixNum=e)}get mixNum(){return this._mixNum}_createPostProcessStage(){this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:yp,uniforms:{speed:this._speed,mixNum:this._mixNum}}),this._viewer.scene.postProcessStages.add(this._delegate)}},vp=Pn;var wp=`in vec2 v_textureCoordinates;
17439
17439
  uniform sampler2D colorTexture;
17440
17440
  uniform float speed;
17441
17441
 
@@ -17468,7 +17468,7 @@ void main(){
17468
17468
  finalColor=(vec3(c));
17469
17469
  out_FragColor = mix(texture(colorTexture, v_textureCoordinates), vec4(finalColor,1), 0.3);
17470
17470
  }
17471
- `;var bn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._state=p.INITIALIZED}get type(){return"snow"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}_createPostProcessStage(){this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:wd,uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Td=bn;var Cd="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlA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FaIkU8GMfmKYyxP95ce4NAGMqHPIqyq7hgqPqOtafkWzdWYfhSeRbgZEpA/wB00AVEhI5Awac8W4Zk/MetXQ9sOBKP1pp8k9JlP40AZ5tm5GM+9VfJ2vjp9K05LhVGFdWqizNI2cUAV3jy3tTtgqUg96TaRQBFtq5AhxnOPbPNRbaRjgdjQBpxlyME0NEe1ZIlIPHFBmfruOaALksTHpzVNllzgUhuZf7xpFunHXBoAnVmXhwDTXEZ6AihLtByy/1pHuEY5HH1FAFchW6GjYAM7hSOd3QiqsoYUANuHX1rOYgnippM1XPWgD//1uPHWrEZqADmrMa0AWY2NTKxqOND/kVYERoAbuPtQWPpUnlGjyjQAxXx2FSfaWHYU3y2o8tqAFM5b7wz+FJ5uew/AUeW1L5TUAJ5p7Unmt707yjR5RoAYWJ5NL5jDpTvKNKIjQBFuY0pYnrUvkn1H60eV7/zoAh60lWPJH+QaBAPX9DQBBS1Y8hfX9DQIU9T+RoArEU3bV3yU9/ypwjjHUfoaAKGwilCn0rRAiHr+RqZZ414CfpQBlCJj2pPKb0rVMynsfyppkUjAB/KgDKIxTa0mVeyj8qZ5Q9KAKIAowK0BGPQUmwe35UAUgAOhqZX7frUvlD2o8laAEV/cGnbUblhz7Uxov7tM2yelAErRRt0OPwpi25z8rUgEnp+tJ+8/u0ATKzL3qQSt6/pVbL/AN39acN/ofzoAmNwR1H6Go2nbtj9aT5vQ0ZagBvnSe1J5jt1xT8Me36UbT6UAQnd6/rSYcd/1qx5Z9KNh9qAIlLDvSncepP0qTyzQIz7UAQFOOv60qqB3NTeWfajyj/kUARYFPDFehp3lH1FHlH1oATcT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q==";var Sn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._rotateAmount=0,this._enable=!1,this._heading=0,this._state=p.INITIALIZED}get type(){return"cloud"}set enable(e){!this._viewer.scene.mode!==i.Cesium.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 enable(){return this._enable}set rotateAmount(e){this._rotateAmount=e}get rotateAmount(){return this._rotateAmount}_onRotate(e,t){this._rotateAmount!==0&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._delegate.modelMatrix=i.Cesium.Transforms.headingPitchRollToFixedFrame(new i.Cesium.Cartesian3,new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._heading),0,0)))}_createPrimitive(){this._delegate=new i.Cesium.Primitive({appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:new i.Cesium.Material({fabric:{type:"Image",uniforms:{color:new i.Cesium.Color(1,1,1,1),image:Cd},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})}),this._delegate.geometryInstances=new i.Cesium.GeometryInstance({geometry:new i.Cesium.EllipsoidGeometry({vertexFormat:i.Cesium.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)}},xd=Sn;var In=class{constructor(e){if(!e)throw Error("missing viewer param");this._fog=new gd(e),this._rain=new vd(e),this._snow=new Td(e),this._cloud=new xd(e)}get fog(){return this._fog}get rain(){return this._rain}get snow(){return this._snow}get cloud(){return this._cloud}},Ed=In;var Mn=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}}set enable(e){this._enable!==e&&this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}get enable(){return this._enable}set moveRate(e){this._moveRate=e}get moveRate(){return this._moveRate}set rotateRate(e){this._rotateRate=e}get rotateRate(){return this._rotateRate}_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.Cesium.Cartesian3.clone(e.position,new i.Cesium.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)}},An=Mn;var Dn=class{constructor(e){this._viewer=e,this._viewOption={},this._cache={},this._activedPath=void 0}_onPostRender(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(se.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}addPath(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.fire(se.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(se.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(se.RESET_TIME_LINE),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this)}deactivate(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this}clear(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this}},Ln=Dn;var Rn=class{constructor(e,t,r){this._id=v.uuid(),this._bid=void 0,this._positions=_.parsePositions(e),this._duration=t||20,this._pathMode=r||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=i.Cesium.JulianDate.now(),this._pathEvent=new Ri,this._pathEvent.on(se.ADD,this._onAdd,this),this._pathEvent.on(se.REMOVE,this._onRemove,this),this._pathEvent.on(se.POST_RENDER,this._onPostRender,this),this._pathEvent.on(se.RESET_TIME_LINE,this._resetTimeLine,this),this._state=p.INITIALIZED}get pathId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=_.parsePositions(e)}get positions(){return this._positions}set duration(e){this._duration=e}get duration(){return this._duration}set pathMode(e){this._pathMode=e}get pathMode(){return this._pathMode}get pathEvent(){return this._pathEvent}set actived(e){this._actived=e}get actived(){return this._actived}get state(){return this._state}_onAdd(){this._state=p.ADDED}_onRemove(){this._state=p.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this.actived)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.lessThan(r,this._endTime)&&this._sampledPosition){let s=this._sampledPosition.getValue(r),o=this._sampledPosition.getValue(i.Cesium.JulianDate.addSeconds(r,.001,new i.Cesium.JulianDate));s&&o&&e.camera.lookAt(s,new i.Cesium.HeadingPitchRange(fe(s,o),i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||-20),(t==null?void 0:t.range)||2e3))}else e.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._actived=!1}_resetTimeLine(){if(!this._positions||!this._positions.length)return!1;let e=i.Cesium.JulianDate.now(),t=0,r=[];if(this._pathMode==="speed"){let s=Q(this._positions)/this._duration;r=this._positions.map((o,a,l)=>(a!==0&&(t+=Q([l[a-1],o])/s),i.Cesium.JulianDate.addSeconds(e,t,new i.Cesium.JulianDate)))}else{let s=this._positions.length,o=(this._duration-this._duration%s)/s;r=this._positions.map((a,l)=>i.Cesium.JulianDate.addSeconds(e,l*o,new i.Cesium.JulianDate))}this._sampledPosition=new i.Cesium.SampledPositionProperty,this._sampledPosition.addSamples(r,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:i.Cesium.HermitePolynomialApproximation}),this._endTime=r[r.length-1],this._actived=!0}},On=Rn;var Ru={FP:"1",TP:"2",TRACKED:"tracked",FREE:"free"},Ee=Ru;var kn=class{constructor(e){this._viewer=e,this._cache={},this._delegete=new i.Cesium.CustomDataSource("history-track-layer"),this._viewer.dataSources.add(this._delegete),this._activedTrack=void 0,this._viewOption={},this._stopTime=void 0,this._state=p.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(re.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(re.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(re.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.Cesium.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(A.POST_RENDER,this._onPostRender,this),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this._state=p.PLAY,this}pause(){return this._stopTime=i.Cesium.JulianDate.now(),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._state=p.PAUSE,this}restore(){if(this._state!==p.PAUSE)return this;if(this._stopTime){let e=i.Cesium.JulianDate.now();Object.keys(this._cache).forEach(t=>{this._cache[t].trackEvent.fire(re.RESET_TIME_LINE,{stopTime:this._stopTime,duration:i.Cesium.JulianDate.secondsDifference(e,this._stopTime)})})}return this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this._state=p.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===Ee.FREE&&(this._viewer.camera.lookAtTransform(i.Cesium.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.Cesium.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(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}},Fn=kn;var Ou={clampToGround:!1,clampToTileset:!1,interpolationType:"Linear",interpolationDegree:2,endDelayTime:.5,headingOffset:0},ku={width:2,material:i.Cesium.Color.ORANGE,clampToGround:!0,depthFailMaterial:i.Cesium.Color.ORANGE.withAlpha(.8)},zn=class{constructor(e,t,r,s){this._id=v.uuid(),this._bid=void 0,this._positions=_.parsePositions(e),this._duration=t||20,this._callback=r,this._options={...Ou,...s},this._controller=void 0,this._sampledPosition=void 0,this._velocityOrientation=void 0,this._viewed=!1,this._delegate=new i.Cesium.Entity,this._pathPositions=[],this._path=new i.Cesium.Entity({show:!1,polyline:{positions:new i.Cesium.CallbackProperty(()=>this._pathPositions,!1)}}),this._positionIndex=0,this._timeLine=[],this._startTime=void 0,this._endTime=void 0,this._trackEvent=new Di,this._trackEvent.on(re.POST_RENDER,this._onPostRender,this),this._trackEvent.on(re.ADD,this._onAdd,this),this._trackEvent.on(re.REMOVE,this._onRemove,this),this._trackEvent.on(re.RESET_TIME_LINE,this._resetTimeLine,this),this._state=p.INITIALIZED}get currentDistance(){return Q(_.parsePositions(this._pathPositions))}get currentPosition(){let[e]=this._pathPositions.slice(-1);return _.parsePosition(e)}get allDistance(){return Q(this._positions)}get trackId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=_.parsePositions(e),this._resetTimeLine({})}get positions(){return this._positions}set duration(e){this._duration=e,this._resetTimeLine({})}get duration(){return this._duration}set startTime(e){e instanceof Date?this._startTime=i.Cesium.JulianDate.fromDate(e):this._startTime=e,this._resetTimeLine({})}get startTime(){return this._startTime}set viewed(e){this._viewed=e}get viewed(){return this._viewed}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.Cesium.JulianDate.now()),this._state=p.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=p.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this._startTime||!this._endTime)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.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 o=this._velocityOrientation.getValue(r);if(o){let l=i.Cesium.Quaternion.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._options.headingOffset||0),0,0),new i.Cesium.Quaternion);this._delegate.orientation=i.Cesium.Quaternion.multiply(o,l,new i.Cesium.Quaternion)}let a=this._timeLine[this._positionIndex];if(a){let l=i.Cesium.JulianDate.secondsDifference(r,a);if(l>=0&&l<=1){let h=this._positions[this._positionIndex]||void 0;if(h&&o){let c=i.Cesium.Matrix3.fromQuaternion(o),d=i.Cesium.Matrix4.fromRotationTranslation(c,s),f=i.Cesium.Transforms.fixedFrameToHeadingPitchRoll(d);h.heading=i.Cesium.Math.toDegrees(f.heading),h.pitch=i.Cesium.Math.toDegrees(f.pitch),h.roll=i.Cesium.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.Cesium.JulianDate.now(),this._resetTimeLine({})}_setCameraView(e,t){var s,o,a;if(!this._viewed)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.greaterThan(r,this._endTime))e.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),e.delegate.trackedEntity&&(e.delegate.trackedEntity=void 0),this._viewed=!1;else{let l=this._sampledPosition.getValue(r),h=this._sampledPosition.getValue(i.Cesium.JulianDate.addSeconds(r,1/60,new i.Cesium.JulianDate));l&&h&&((t==null?void 0:t.mode)===Ee.TRACKED&&((o=(s=e.delegate)==null?void 0:s.trackedEntity)==null?void 0:o.id)!==((a=this._delegate)==null?void 0:a.id)?e.delegate.trackedEntity=this._delegate:(t==null?void 0:t.mode)===Ee.FP?e.camera.lookAt(l,new i.Cesium.HeadingPitchRange(fe(l,h),i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||0),(t==null?void 0:t.range)||10)):(t==null?void 0:t.mode)===Ee.TP&&e.camera.lookAt(l,new i.Cesium.HeadingPitchRange(0,i.Cesium.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=Q(this._positions)/this._duration;this._timeLine=this._positions.map((o,a,l)=>(a!==0&&(t+=Q([l[a-1],o])/s),i.Cesium.JulianDate.addSeconds(this._startTime,t,new i.Cesium.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.Cesium.JulianDate.greaterThan(s,e.stopTime)&&(s=i.Cesium.JulianDate.addSeconds(s,e.duration,new i.Cesium.JulianDate)),s)));this._sampledPosition=new i.Cesium.SampledPositionProperty,this._sampledPosition.addSamples(this._timeLine,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._options.interpolationType==="Hermite"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||2,interpolationAlgorithm:i.Cesium.HermitePolynomialApproximation}):this._options.interpolationType==="Linear"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||1,interpolationAlgorithm:i.Cesium.LinearApproximation}):this._options.interpolationType==="Lagrange"&&this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||5,interpolationAlgorithm:i.Cesium.LagrangePolynomialApproximation}),this._velocityOrientation=new i.Cesium.VelocityOrientationProperty(this._sampledPosition),this._endTime=i.Cesium.JulianDate.addSeconds(this._timeLine[this._timeLine.length-1],this._options.endDelayTime,new i.Cesium.JulianDate)}addPosition(e,t){return this._positions.push(_.parsePosition(e)),this._duration+=t,this._resetTimeLine({}),this}setModel(e,t){return this._delegate.model={...t,uri:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setBillboard(e,t){return this._delegate.billboard={...t,image:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setLabel(e,t){return this._delegate.label={...t,text:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setPath(e,t={}){return this._path.show=!!e,v.merge(this._path.polyline,ku,t),this}},Hn=zn;var Fu={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"},ie=Fu;var Nn=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)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.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._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},ei=Nn;var Wn=class extends ei{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.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(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP,e))}},oe=Wn;var Gn=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._delegate=new i.Cesium.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(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(C.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(C.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}},ti=Gn;var Un=class extends ti{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.Cesium.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.Cesium.JulianDate.now()));if(this._options.maxAnchorSize>2){for(let t=0;t<e.length-1;t++){let r=k(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(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}else this._positions=e,this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r})});this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,a=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,a=s-1):(o=s-2,a=s-1,l=s+2,h=s+1),o>0){let d=k(this._positions[o],this._positions[s]);this._positions[a]=d,this.editTool.fire(C.UPDATE_ANCHOR,{index:a,position:d})}if(l>0){let d=k(this._positions[l],this._positions[s]);this._positions[h]=d,this.editTool.fire(C.UPDATE_ANCHOR,{index:h,position:d})}}this._options.onCalc&&this._options.onCalc(this._positions)}},ae=Un;var Bn=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Cesium.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Cesium.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.Cesium.EllipsoidTerrainProvider)?i.Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cesium.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cesium.Cartographic.fromCartesian(o))),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}},q=Bn;var Vn=class extends q{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ae(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.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3),e[1]];let s=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u89D2\u5EA6\uFF1A${i.Cesium.Math.toDegrees(Math.asin(s/i.Cesium.Cartesian3.distance(e[0],e[1]))).toFixed(2)} \u5EA6`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Pd=Vn;var jn=class extends ei{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e})}},Ge=jn;var Yn=class extends ti{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.Cesium.CallbackProperty(e=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions):null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polygon.hierarchy.getValue(i.Cesium.JulianDate.now()).positions);e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(C.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.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o,a,l=this._positions.length;s===l-1?(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[0])):(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let a=-1,l=-1,h=-1,c=-1;s===0?(a=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(a=s-2,l=s-1,h=0,c=o-1):(a=s-2,l=s-1,h=s+2,c=s+1);let d=k(this._positions[a],this._positions[s]),f=k(this._positions[h],this._positions[s]);this._positions[l]=d,this._positions[c]=f,this.editTool.fire(C.UPDATE_ANCHOR,{index:l,position:d}),this.editTool.fire(C.UPDATE_ANCHOR,{index:c,position:f})}this._options.onCalc&&this._options.onCalc(this._positions)}},Ue=Yn;var Zn=class extends q{constructor(){super()}_onDrawStop(e){new Ue(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;e.length>2&&(this._resultLabel.position=(t=i.Cesium.BoundingSphere.fromPoints(e))==null?void 0:t.center,this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ue(e).toFixed(2)} \u5E73\u65B9\u7C73`)}start(e,t){return this._startHook(e,t),new Ge({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),perPositionHeight:!0}).start(e,this._options),this}},bd=Zn;var qn=class extends q{constructor(){super()}_onDrawStop(e){new Ue(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 o=0;o<t;++o){let a=i.Cesium.Math.lerp(e.west,e.east,o/(t-1)),l=i.Cesium.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cesium.Cartesian3.fromRadians(a,l))}return r}_onCalc(e){if(e.length>2){let t=this._lerp(i.Cesium.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(t,!0).then(([r,s])=>r.map((o,a)=>({lng:o.longitude,lat:o.latitude,alt:Math.max(o.height||0,s[a]?i.Cesium.Cartographic.fromCartesian(s[a]).height:0)}))).then(r=>{let s=0,o;r.forEach(a=>{a.alt>s&&(s=a.alt,o=a)}),o&&(this._resultLabel.position=i.Cesium.Cartesian3.fromRadians(o.lng,o.lat,o.alt),this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`)})}}start(e,t){return this._startHook(e,t),new Ge({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},Sd=qn;var Xn=class extends q{constructor(){super()}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let a=i.Cesium.Math.lerp(e.west,e.east,o/(t-1)),l=i.Cesium.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cesium.Cartesian3.fromRadians(a,l))}return r}_onDrawStop(e){new Ue(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;if(e.length>2){this._resultLabel.position=(t=i.Cesium.BoundingSphere.fromPoints(e))==null?void 0:t.center;let r=this._lerp(i.Cesium.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(r.concat(e),!1).then(([s])=>s.map(o=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),o.height))).then(s=>{this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ue(s).toFixed(2)} \u5E73\u65B9\u7C73`})}}start(e,t){return this._startHook(e,t),new Ge({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},Id=Xn;var Jn=class extends q{constructor(){super(),this._maxAnchorSize=9999}_onDrawStop(e){new ae(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.Cesium.Cartesian3.distance(e[r],e[r+1]);t+=s}this._resultLabel.label.text=t>1e3?`\u8DDD\u79BB\uFF1A${(t/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${t.toFixed(2)} \u7C73`}}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Md=Jn;var Kn=class extends q{constructor(){super(),this._maxAnchorSize=9999}_lerp(e,t,r=5){let s=[],o=i.Cesium.Cartographic.fromCartesian(e),a=i.Cesium.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),d=o.height-(o.height-a.height)*(l/r);s.push(i.Cesium.Cartesian3.fromRadians(h,c,d))}return s}_onDrawStop(e){new ae(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((o,a)=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),Math.max(o.height||0,s[a]?i.Cesium.Cartographic.fromCartesian(s[a]).height:0)))).then(r=>{let s=0;for(let o=0;o<r.length-1;o++){let a=i.Cesium.Cartesian3.distance(r[o],r[o+1]);s+=a}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Ad=Kn;var Qn=class extends q{constructor(){super(),this._maxAnchorSize=2}_onDrawStop(e){new ae(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.Cesium.Math.toDegrees(fe(e[0],e[1])).toFixed(1)} \u5EA6`)}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Dd=Qn;var $n=class extends q{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ae(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.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3),e[1]];let s=Math.abs(i.Cesium.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.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Ld=$n;var el=class extends q{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}}),this._lengthLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._heightLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._distanceLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}})}_onDrawStop(e){new ae(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.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t),s=i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3);this._helpLinePositions=[e[0],s,e[1]];let o=i.Cesium.Cartesian3.distance(e[0],s),a=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1])),l=i.Cesium.Cartesian3.distance(e[0],e[1]);this._lengthLabel.position=i.Cesium.Cartesian3.midpoint(e[0],s,new i.Cesium.Cartesian3),this._lengthLabel.label.text=o>1e3?`${(o/1e3).toFixed(2)} \u516C\u91CC`:`${o.toFixed(2)} \u7C73`,this._distanceLabel.position=i.Cesium.Cartesian3.midpoint(e[0],e[1],new i.Cesium.Cartesian3),this._distanceLabel.label.text=l>1e3?`${(l/1e3).toFixed(2)} \u516C\u91CC`:`${l.toFixed(2)} \u7C73`,this._heightLabel.position=i.Cesium.Cartesian3.midpoint(s,e[1],new i.Cesium.Cartesian3),this._heightLabel.label.text=a>1e3?`${(a/1e3).toFixed(2)} \u516C\u91CC`:`${a.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.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 oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Rd=el;var tl=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.Cesium.CustomDataSource("measure-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}angle(e={}){return new Pd().start(this,e),this}area(e={}){return new bd().start(this,e),this}areaHeight(e={}){return new Sd().start(this,e),this}areaSurface(e={}){return new Id().start(this,e),this}distance(e={}){return new Md().start(this,e),this}distanceSurface(e={}){return new Ad().start(this,e),this}heading(e={}){return new Dd().start(this,e),this}height(e={}){return new Ld().start(this,e),this}triangleHeight(e={}){return new Rd().start(this,e),this}activate(e,t){switch(e){case ie.ANGLE:this.angle(t);break;case ie.AREA:this.area(t);break;case ie.AREA_HEIGHT:this.areaHeight(t);break;case ie.AREA_SURFACE:this.areaSurface(t);break;case ie.DISTANCE:this.distance(t);break;case ie.DISTANCE_SURFACE:this.distanceSurface(t);break;case ie.HEADING:this.heading(t);break;case ie.HEIGHT:this.height(t);break;case ie.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}},il=tl;var zu={SIGHT_LINE:"sightLine"},lt=zu;var Hu={PROFILE:"profile"},ht=Hu;var rl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Cesium.Color.YELLOW,this._width=1,this._spacing=100,this._state=p.INITIALIZED}get type(){return"contourLine"}set enable(e){this._enable=e,e&&this._viewer?this._createAnalysis():(this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null))}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set width(e){this._width=e,this._delegate&&(this._delegate.uniforms.width=e)}get width(){return this._width}set spacing(e){this._spacing=e,this._delegate&&(this._delegate.uniforms.spacing=e)}get spacing(){return this._spacing}_init(e,t,r){this._enable=!0,this._color=e||i.Cesium.Color.YELLOW,this._width=t||1,this._spacing=r||100,this._enable&&this._viewer&&this._createAnalysis()}deactivate(){this._enable=!1,this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null)}_createAnalysis(){let e=this._viewer.scene.globe,t=i.Cesium.Material.fromType("ElevationContour"),r=t.uniforms;r.width=this._width,r.spacing=this._spacing,r.color=this._color,e.material=t,this._delegate=t}},Od=rl;var sl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._enable=!1,this._positions=[],this._maxDistance=5,this._speed=1e3,this._maxHeight=20,this._inRangeColor=i.Cesium.Color.YELLOW,this._outRangeColor=i.Cesium.Color.WHITE,this._state=p.INITIALIZED}get type(){return"tilesetShake"}set enable(e){this._enable=e,this.tileset_arr.forEach(t=>{let r=null;this._enable?r=this._getShader(t.tileset2):r=new window.GM.CustomShader,t.tileset.setCustomShader(r)})}get enable(){return this._enable}set maxDistance(e){this._maxDistance=e,this._enable&&this._changeSettings()}get maxDistance(){return this._maxDistance}set speed(e){this._speed=e,this._enable&&this._changeSettings()}get speed(){return this._speed}set maxHeight(e){this._maxHeight=e,this._enable&&this._changeSettings()}get maxHeight(){return this._maxHeight}_getShader(e){let t=e.boundingSphere.center.clone(),r=i.Cesium.Transforms.eastNorthUpToFixedFrame(t),s=i.Cesium.Matrix4.inverse(r,new i.Cesium.Matrix4);return new i.Cesium.CustomShader({uniforms:{M_LocaltoWorld:{type:i.Cesium.UniformType.MAT4,value:r},M_WorldtoLocal:{type:i.Cesium.UniformType.MAT4,value:s},center:{type:i.Cesium.UniformType.VEC3,value:t},MAX_Distance:{type:i.Cesium.UniformType.FLOAT,value:this._maxDistance},Speed:{type:i.Cesium.UniformType.FLOAT,value:this._speed},height:{type:i.Cesium.UniformType.FLOAT,value:this._maxHeight}},vertexShaderText:this._getVs(),fragmentShaderText:this._getFs()})}_changeSettings(){this.tileset_arr.forEach(e=>{let t=this._getShader(e.tileset2);e.tileset.setCustomShader(t)})}_getVs(){return`
17471
+ `;var bn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._speed=10,this._state=d.INITIALIZED}get type(){return"snow"}set enable(e){this._enable=e,e&&this._viewer&&!this._delegate&&this._createPostProcessStage(),this._delegate&&(this._delegate.enabled=e)}get enable(){return this._enable}set speed(e){this._speed=e,this._delegate&&(this._delegate.uniforms.speed=e)}get speed(){return this._speed}_createPostProcessStage(){this._delegate=new i.Cesium.PostProcessStage({name:this._id,fragmentShader:wp,uniforms:{speed:this._speed}}),this._viewer.scene.postProcessStages.add(this._delegate)}},Tp=bn;var Cp="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAASABIAAD/4QCMRXhpZgAATU0AKgAAAAgABQESAAMAAAABAAEAAAEaAAUAAAABAAAASgEbAAUAAAABAAAAUgEoAAMAAAABAAIAAIdpAAQAAAABAAAAWgAAAAAAAABIAAAAAQAAAEgAAAABAAOgAQADAAAAAQABAACgAgAEAAAAAQAAAgCgAwAEAAAAAQAAAQAAAAAA/+0AOFBob3Rvc2hvcCAzLjAAOEJJTQQEAAAAAAAAOEJJTQQlAAAAAAAQ1B2M2Y8AsgTpgAmY7PhCfv/AABEIAQACAAMBIgACEQEDEQH/xAAfAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCg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P40AZ5tm5GM+9VfJ2vjp9K05LhVGFdWqizNI2cUAV3jy3tTtgqUg96TaRQBFtq5AhxnOPbPNRbaRjgdjQBpxlyME0NEe1ZIlIPHFBmfruOaALksTHpzVNllzgUhuZf7xpFunHXBoAnVmXhwDTXEZ6AihLtByy/1pHuEY5HH1FAFchW6GjYAM7hSOd3QiqsoYUANuHX1rOYgnippM1XPWgD//1uPHWrEZqADmrMa0AWY2NTKxqOND/kVYERoAbuPtQWPpUnlGjyjQAxXx2FSfaWHYU3y2o8tqAFM5b7wz+FJ5uew/AUeW1L5TUAJ5p7Unmt707yjR5RoAYWJ5NL5jDpTvKNKIjQBFuY0pYnrUvkn1H60eV7/zoAh60lWPJH+QaBAPX9DQBBS1Y8hfX9DQIU9T+RoArEU3bV3yU9/ypwjjHUfoaAKGwilCn0rRAiHr+RqZZ414CfpQBlCJj2pPKb0rVMynsfyppkUjAB/KgDKIxTa0mVeyj8qZ5Q9KAKIAowK0BGPQUmwe35UAUgAOhqZX7frUvlD2o8laAEV/cGnbUblhz7Uxov7tM2yelAErRRt0OPwpi25z8rUgEnp+tJ+8/u0ATKzL3qQSt6/pVbL/AN39acN/ofzoAmNwR1H6Go2nbtj9aT5vQ0ZagBvnSe1J5jt1xT8Me36UbT6UAQnd6/rSYcd/1qx5Z9KNh9qAIlLDvSncepP0qTyzQIz7UAQFOOv60qqB3NTeWfajyj/kUARYFPDFehp3lH1FHlH1oATcT1Jpufen+V70eSPWgBm7FJnNS+WtLsHpQBHz6UeWW9Kl2CjFAELRkdaZg1ZIzTNpFAEJWkK1Pg0YYdqAKrCq8lXmBPUVVlX2oAoSVXPWrUq+1ViOaAP/2Q==";var Sn=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._rotateAmount=0,this._enable=!1,this._heading=0,this._state=d.INITIALIZED}get type(){return"cloud"}set enable(e){!this._viewer.scene.mode!==i.Cesium.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 enable(){return this._enable}set rotateAmount(e){this._rotateAmount=e}get rotateAmount(){return this._rotateAmount}_onRotate(e,t){this._rotateAmount!==0&&(this._heading+=this._rotateAmount,(this._heading>=360||this._heading<=-360)&&(this._heading=0),this._delegate.modelMatrix=i.Cesium.Transforms.headingPitchRollToFixedFrame(new i.Cesium.Cartesian3,new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._heading),0,0)))}_createPrimitive(){this._delegate=new i.Cesium.Primitive({appearance:new i.Cesium.EllipsoidSurfaceAppearance({material:new i.Cesium.Material({fabric:{type:"Image",uniforms:{color:new i.Cesium.Color(1,1,1,1),image:Cp},components:{alpha:"texture(image, fract(repeat * materialInput.st)).r * color.a",diffuse:"vec3(1.0)"}}}),translucent:!0,aboveGround:!0})}),this._delegate.geometryInstances=new i.Cesium.GeometryInstance({geometry:new i.Cesium.EllipsoidGeometry({vertexFormat:i.Cesium.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)}},xp=Sn;var In=class{constructor(e){if(!e)throw Error("missing viewer param");this._fog=new gp(e),this._rain=new vp(e),this._snow=new Tp(e),this._cloud=new xp(e)}get fog(){return this._fog}get rain(){return this._rain}get snow(){return this._snow}get cloud(){return this._cloud}},Ep=In;var Mn=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}}set enable(e){this._enable!==e&&this._viewer.scene.mode===i.Cesium.SceneMode.SCENE3D&&(this._enable=e,this._enable?this._bindEvent():this._unbindEvent())}get enable(){return this._enable}set moveRate(e){this._moveRate=e}get moveRate(){return this._moveRate}set rotateRate(e){this._rotateRate=e}get rotateRate(){return this._rotateRate}_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.Cesium.Cartesian3.clone(e.position,new i.Cesium.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)}},An=Mn;var Dn=class{constructor(e){this._viewer=e,this._viewOption={},this._cache={},this._activedPath=void 0}_onPostRender(){if(!this._activedPath)return!1;this._activedPath.pathEvent&&this._activedPath.pathEvent.fire(se.POST_RENDER,{viewer:this._viewer,viewOption:this._viewOption})}addPath(e){return e&&!this._cache.hasOwnProperty(e.pathId)&&(e.pathEvent.fire(se.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(se.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(se.RESET_TIME_LINE),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this)}deactivate(){return this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this}clear(){return this._cache={},this._activedPath&&(this._activedPath.actived=!1),this._activedPath=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this}},Ln=Dn;var Rn=class{constructor(e,t,r){this._id=v.uuid(),this._bid=void 0,this._positions=_.parsePositions(e),this._duration=t||20,this._pathMode=r||"speed",this._timeLine=[],this._sampledPosition=void 0,this._actived=!1,this._endTime=i.Cesium.JulianDate.now(),this._pathEvent=new Ri,this._pathEvent.on(se.ADD,this._onAdd,this),this._pathEvent.on(se.REMOVE,this._onRemove,this),this._pathEvent.on(se.POST_RENDER,this._onPostRender,this),this._pathEvent.on(se.RESET_TIME_LINE,this._resetTimeLine,this),this._state=d.INITIALIZED}get pathId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=_.parsePositions(e)}get positions(){return this._positions}set duration(e){this._duration=e}get duration(){return this._duration}set pathMode(e){this._pathMode=e}get pathMode(){return this._pathMode}get pathEvent(){return this._pathEvent}set actived(e){this._actived=e}get actived(){return this._actived}get state(){return this._state}_onAdd(){this._state=d.ADDED}_onRemove(){this._state=d.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this.actived)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.lessThan(r,this._endTime)&&this._sampledPosition){let s=this._sampledPosition.getValue(r),o=this._sampledPosition.getValue(i.Cesium.JulianDate.addSeconds(r,.001,new i.Cesium.JulianDate));s&&o&&e.camera.lookAt(s,new i.Cesium.HeadingPitchRange(fe(s,o),i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||-20),(t==null?void 0:t.range)||2e3))}else e.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._actived=!1}_resetTimeLine(){if(!this._positions||!this._positions.length)return!1;let e=i.Cesium.JulianDate.now(),t=0,r=[];if(this._pathMode==="speed"){let s=Q(this._positions)/this._duration;r=this._positions.map((o,a,l)=>(a!==0&&(t+=Q([l[a-1],o])/s),i.Cesium.JulianDate.addSeconds(e,t,new i.Cesium.JulianDate)))}else{let s=this._positions.length,o=(this._duration-this._duration%s)/s;r=this._positions.map((a,l)=>i.Cesium.JulianDate.addSeconds(e,l*o,new i.Cesium.JulianDate))}this._sampledPosition=new i.Cesium.SampledPositionProperty,this._sampledPosition.addSamples(r,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._sampledPosition.setInterpolationOptions({interpolationDegree:2,interpolationAlgorithm:i.Cesium.HermitePolynomialApproximation}),this._endTime=r[r.length-1],this._actived=!0}},On=Rn;var Ru={FP:"1",TP:"2",TRACKED:"tracked",FREE:"free"},Ee=Ru;var kn=class{constructor(e){this._viewer=e,this._cache={},this._delegete=new i.Cesium.CustomDataSource("history-track-layer"),this._viewer.dataSources.add(this._delegete),this._activedTrack=void 0,this._viewOption={},this._stopTime=void 0,this._state=d.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(re.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(re.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(re.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.Cesium.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(A.POST_RENDER,this._onPostRender,this),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this._state=d.PLAY,this}pause(){return this._stopTime=i.Cesium.JulianDate.now(),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._state=d.PAUSE,this}restore(){if(this._state!==d.PAUSE)return this;if(this._stopTime){let e=i.Cesium.JulianDate.now();Object.keys(this._cache).forEach(t=>{this._cache[t].trackEvent.fire(re.RESET_TIME_LINE,{stopTime:this._stopTime,duration:i.Cesium.JulianDate.secondsDifference(e,this._stopTime)})})}return this._viewer.off(A.POST_RENDER,this._onPostRender,this),this._viewer.on(A.POST_RENDER,this._onPostRender,this),this._state=d.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===Ee.FREE&&(this._viewer.camera.lookAtTransform(i.Cesium.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.Cesium.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(A.POST_RENDER,this._onPostRender,this),this._viewer.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),this._viewer.delegate.trackedEntity=void 0,this}},Fn=kn;var Ou={clampToGround:!1,clampToTileset:!1,interpolationType:"Linear",interpolationDegree:2,endDelayTime:.5,headingOffset:0},ku={width:2,material:i.Cesium.Color.ORANGE,clampToGround:!0,depthFailMaterial:i.Cesium.Color.ORANGE.withAlpha(.8)},zn=class{constructor(e,t,r,s){this._id=v.uuid(),this._bid=void 0,this._positions=_.parsePositions(e),this._duration=t||20,this._callback=r,this._options={...Ou,...s},this._controller=void 0,this._sampledPosition=void 0,this._velocityOrientation=void 0,this._viewed=!1,this._delegate=new i.Cesium.Entity,this._pathPositions=[],this._path=new i.Cesium.Entity({show:!1,polyline:{positions:new i.Cesium.CallbackProperty(()=>this._pathPositions,!1)}}),this._positionIndex=0,this._timeLine=[],this._startTime=void 0,this._endTime=void 0,this._trackEvent=new Di,this._trackEvent.on(re.POST_RENDER,this._onPostRender,this),this._trackEvent.on(re.ADD,this._onAdd,this),this._trackEvent.on(re.REMOVE,this._onRemove,this),this._trackEvent.on(re.RESET_TIME_LINE,this._resetTimeLine,this),this._state=d.INITIALIZED}get currentDistance(){return Q(_.parsePositions(this._pathPositions))}get currentPosition(){let[e]=this._pathPositions.slice(-1);return _.parsePosition(e)}get allDistance(){return Q(this._positions)}get trackId(){return this._id}set id(e){this._bid=e}get id(){return this._bid}set positions(e){this._positions=_.parsePositions(e),this._resetTimeLine({})}get positions(){return this._positions}set duration(e){this._duration=e,this._resetTimeLine({})}get duration(){return this._duration}set startTime(e){e instanceof Date?this._startTime=i.Cesium.JulianDate.fromDate(e):this._startTime=e,this._resetTimeLine({})}get startTime(){return this._startTime}set viewed(e){this._viewed=e}get viewed(){return this._viewed}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.Cesium.JulianDate.now()),this._state=d.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=d.REMOVED}_onPostRender({viewer:e,viewOption:t}){if(!this._startTime||!this._endTime)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.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 o=this._velocityOrientation.getValue(r);if(o){let l=i.Cesium.Quaternion.fromHeadingPitchRoll(new i.Cesium.HeadingPitchRoll(i.Cesium.Math.toRadians(this._options.headingOffset||0),0,0),new i.Cesium.Quaternion);this._delegate.orientation=i.Cesium.Quaternion.multiply(o,l,new i.Cesium.Quaternion)}let a=this._timeLine[this._positionIndex];if(a){let l=i.Cesium.JulianDate.secondsDifference(r,a);if(l>=0&&l<=1){let h=this._positions[this._positionIndex]||void 0;if(h&&o){let c=i.Cesium.Matrix3.fromQuaternion(o),p=i.Cesium.Matrix4.fromRotationTranslation(c,s),f=i.Cesium.Transforms.fixedFrameToHeadingPitchRoll(p);h.heading=i.Cesium.Math.toDegrees(f.heading),h.pitch=i.Cesium.Math.toDegrees(f.pitch),h.roll=i.Cesium.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.Cesium.JulianDate.now(),this._resetTimeLine({})}_setCameraView(e,t){var s,o,a;if(!this._viewed)return!1;let r=i.Cesium.JulianDate.now();if(i.Cesium.JulianDate.greaterThan(r,this._endTime))e.camera.lookAtTransform(i.Cesium.Matrix4.IDENTITY),e.delegate.trackedEntity&&(e.delegate.trackedEntity=void 0),this._viewed=!1;else{let l=this._sampledPosition.getValue(r),h=this._sampledPosition.getValue(i.Cesium.JulianDate.addSeconds(r,1/60,new i.Cesium.JulianDate));l&&h&&((t==null?void 0:t.mode)===Ee.TRACKED&&((o=(s=e.delegate)==null?void 0:s.trackedEntity)==null?void 0:o.id)!==((a=this._delegate)==null?void 0:a.id)?e.delegate.trackedEntity=this._delegate:(t==null?void 0:t.mode)===Ee.FP?e.camera.lookAt(l,new i.Cesium.HeadingPitchRange(fe(l,h),i.Cesium.Math.toRadians((t==null?void 0:t.pitch)||0),(t==null?void 0:t.range)||10)):(t==null?void 0:t.mode)===Ee.TP&&e.camera.lookAt(l,new i.Cesium.HeadingPitchRange(0,i.Cesium.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=Q(this._positions)/this._duration;this._timeLine=this._positions.map((o,a,l)=>(a!==0&&(t+=Q([l[a-1],o])/s),i.Cesium.JulianDate.addSeconds(this._startTime,t,new i.Cesium.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.Cesium.JulianDate.greaterThan(s,e.stopTime)&&(s=i.Cesium.JulianDate.addSeconds(s,e.duration,new i.Cesium.JulianDate)),s)));this._sampledPosition=new i.Cesium.SampledPositionProperty,this._sampledPosition.addSamples(this._timeLine,u.transformWGS84ArrayToCartesianArray(this._positions)),this._sampledPosition.forwardExtrapolationType=i.Cesium.ExtrapolationType.HOLD,this._options.interpolationType==="Hermite"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||2,interpolationAlgorithm:i.Cesium.HermitePolynomialApproximation}):this._options.interpolationType==="Linear"?this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||1,interpolationAlgorithm:i.Cesium.LinearApproximation}):this._options.interpolationType==="Lagrange"&&this._sampledPosition.setInterpolationOptions({interpolationDegree:this._options.interpolationDegree||5,interpolationAlgorithm:i.Cesium.LagrangePolynomialApproximation}),this._velocityOrientation=new i.Cesium.VelocityOrientationProperty(this._sampledPosition),this._endTime=i.Cesium.JulianDate.addSeconds(this._timeLine[this._timeLine.length-1],this._options.endDelayTime,new i.Cesium.JulianDate)}addPosition(e,t){return this._positions.push(_.parsePosition(e)),this._duration+=t,this._resetTimeLine({}),this}setModel(e,t){return this._delegate.model={...t,uri:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setBillboard(e,t){return this._delegate.billboard={...t,image:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setLabel(e,t){return this._delegate.label={...t,text:e,heightReference:this._options.clampToGround?i.Cesium.HeightReference.CLAMP_TO_GROUND:i.Cesium.HeightReference.NONE},this}setPath(e,t={}){return this._path.show=!!e,v.merge(this._path.polyline,ku,t),this}},Hn=zn;var Fu={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"},ie=Fu;var Nn=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)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.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._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},ei=Nn;var Wn=class extends ei{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.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(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP,e))}},oe=Wn;var Gn=class{constructor(e){this._viewer=void 0,this._layer=void 0,this._overlay=e,this._delegate=new i.Cesium.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(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.on(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.on(C.EDIT_STOP,this._onEditStop,this),this}_unbindEvent(){this.editTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.editTool.off(C.EDIT_ANCHOR_STOP,this._onEditAnchorStop,this),this.editTool.off(C.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}},ti=Gn;var Un=class extends ti{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.Cesium.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.Cesium.JulianDate.now()));if(this._options.maxAnchorSize>2){for(let t=0;t<e.length-1;t++){let r=k(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(C.CREATE_ANCHOR,{position:t,index:r,isMid:r%2!==0})})}else this._positions=e,this._positions.forEach((t,r)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:t,index:r})});this._layer.entities.remove(this._overlay)}_onEditAnchorStop({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1]);this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((l,h)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:l,index:h,isMid:h%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;if(this._positions[s]=t,!r.isMid&&this._options.maxAnchorSize>2){let o=-1,a=-1,l=-1,h=-1,c=this._positions.length;if(s===0?(l=s+2,h=s+1):r.index===c-1?(o=s-2,a=s-1):(o=s-2,a=s-1,l=s+2,h=s+1),o>0){let p=k(this._positions[o],this._positions[s]);this._positions[a]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:a,position:p})}if(l>0){let p=k(this._positions[l],this._positions[s]);this._positions[h]=p,this.editTool.fire(C.UPDATE_ANCHOR,{index:h,position:p})}}this._options.onCalc&&this._options.onCalc(this._positions)}},ae=Un;var Bn=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Cesium.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Cesium.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.Cesium.EllipsoidTerrainProvider)?i.Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cesium.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cesium.Cartographic.fromCartesian(o))),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}},q=Bn;var Vn=class extends q{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ae(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.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3),e[1]];let s=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1]));this._resultLabel.label.text=`\u89D2\u5EA6\uFF1A${i.Cesium.Math.toDegrees(Math.asin(s/i.Cesium.Cartesian3.distance(e[0],e[1]))).toFixed(2)} \u5EA6`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Pp=Vn;var jn=class extends ei{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polygon:{...this._style,hierarchy:new i.Cesium.CallbackProperty(()=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions.map(e=>e.clone())):null,!1)}}),this._layer.entities.add(this._delegate)}_onDrawAnchor(e){this._positions.push(e),this.drawTool.fire(C.CREATE_ANCHOR,{position:e})}},Ge=jn;var Yn=class extends ti{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.Cesium.CallbackProperty(e=>this._positions.length>2?new i.Cesium.PolygonHierarchy(this._positions):null,!1),this._layer.entities.add(this._delegate)}_mountAnchor(){let e=[].concat(this._overlay.polygon.hierarchy.getValue(i.Cesium.JulianDate.now()).positions);e.push(e[0]);for(let t=0;t<e.length-1;t++){let r=k(e[t],e[t+1]);this._positions.push(e[t]),this._positions.push(r)}this._positions.forEach((t,r)=>{this.editTool.fire(C.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.Cesium.JulianDate.now()),s=r.index;if(r.isMid){let o,a,l=this._positions.length;s===l-1?(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[0])):(o=k(this._positions[s],this._positions[s-1]),a=k(this._positions[s],this._positions[s+1])),this._positions.splice(s,1,o,t,a),this.editTool.fire(C.CLEAR_ANCHOR),this._positions.forEach((h,c)=>{this.editTool.fire(C.CREATE_ANCHOR,{position:h,index:c,isMid:c%2!==0})})}}_onAnchorMoving({pickedAnchor:e,position:t}){let r=e.properties.getValue(i.Cesium.JulianDate.now()),s=r.index;this._positions[s]=t;let o=this._positions.length;if(!r.isMid){let a=-1,l=-1,h=-1,c=-1;s===0?(a=o-2,l=o-1,h=s+2,c=s+1):s===o-2?(a=s-2,l=s-1,h=0,c=o-1):(a=s-2,l=s-1,h=s+2,c=s+1);let p=k(this._positions[a],this._positions[s]),f=k(this._positions[h],this._positions[s]);this._positions[l]=p,this._positions[c]=f,this.editTool.fire(C.UPDATE_ANCHOR,{index:l,position:p}),this.editTool.fire(C.UPDATE_ANCHOR,{index:c,position:f})}this._options.onCalc&&this._options.onCalc(this._positions)}},Ue=Yn;var Zn=class extends q{constructor(){super()}_onDrawStop(e){new Ue(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;e.length>2&&(this._resultLabel.position=(t=i.Cesium.BoundingSphere.fromPoints(e))==null?void 0:t.center,this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ue(e).toFixed(2)} \u5E73\u65B9\u7C73`)}start(e,t){return this._startHook(e,t),new Ge({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),perPositionHeight:!0}).start(e,this._options),this}},bp=Zn;var qn=class extends q{constructor(){super()}_onDrawStop(e){new Ue(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 o=0;o<t;++o){let a=i.Cesium.Math.lerp(e.west,e.east,o/(t-1)),l=i.Cesium.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cesium.Cartesian3.fromRadians(a,l))}return r}_onCalc(e){if(e.length>2){let t=this._lerp(i.Cesium.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(t,!0).then(([r,s])=>r.map((o,a)=>({lng:o.longitude,lat:o.latitude,alt:Math.max(o.height||0,s[a]?i.Cesium.Cartographic.fromCartesian(s[a]).height:0)}))).then(r=>{let s=0,o;r.forEach(a=>{a.alt>s&&(s=a.alt,o=a)}),o&&(this._resultLabel.position=i.Cesium.Cartesian3.fromRadians(o.lng,o.lat,o.alt),this._resultLabel.label.text=`\u9AD8\u5EA6\uFF1A${s.toFixed(2)} \u7C73`)})}}start(e,t){return this._startHook(e,t),new Ge({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},Sp=qn;var Xn=class extends q{constructor(){super()}_lerp(e,t=4){let r=[];for(let s=0;s<t;++s)for(let o=0;o<t;++o){let a=i.Cesium.Math.lerp(e.west,e.east,o/(t-1)),l=i.Cesium.Math.lerp(e.south,e.north,s/(t-1));r.push(i.Cesium.Cartesian3.fromRadians(a,l))}return r}_onDrawStop(e){new Ue(e).start({viewer:this._viewer,layer:this._layer},this._options)}_onCalc(e){var t;if(e.length>2){this._resultLabel.position=(t=i.Cesium.BoundingSphere.fromPoints(e))==null?void 0:t.center;let r=this._lerp(i.Cesium.Rectangle.fromCartesianArray(e),this._options.lerpNum);this._getSampledHeight(r.concat(e),!1).then(([s])=>s.map(o=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),o.height))).then(s=>{this._resultLabel.label.text=`\u9762\u79EF\uFF1A${ue(s).toFixed(2)} \u5E73\u65B9\u7C73`})}}start(e,t){return this._startHook(e,t),new Ge({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6)}).start(e,this._options),this}},Ip=Xn;var Jn=class extends q{constructor(){super(),this._maxAnchorSize=9999}_onDrawStop(e){new ae(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.Cesium.Cartesian3.distance(e[r],e[r+1]);t+=s}this._resultLabel.label.text=t>1e3?`\u8DDD\u79BB\uFF1A${(t/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${t.toFixed(2)} \u7C73`}}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Mp=Jn;var Kn=class extends q{constructor(){super(),this._maxAnchorSize=9999}_lerp(e,t,r=5){let s=[],o=i.Cesium.Cartographic.fromCartesian(e),a=i.Cesium.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push(i.Cesium.Cartesian3.fromRadians(h,c,p))}return s}_onDrawStop(e){new ae(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((o,a)=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),Math.max(o.height||0,s[a]?i.Cesium.Cartographic.fromCartesian(s[a]).height:0)))).then(r=>{let s=0;for(let o=0;o<r.length-1;o++){let a=i.Cesium.Cartesian3.distance(r[o],r[o+1]);s+=a}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Ap=Kn;var Qn=class extends q{constructor(){super(),this._maxAnchorSize=2}_onDrawStop(e){new ae(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.Cesium.Math.toDegrees(fe(e[0],e[1])).toFixed(1)} \u5EA6`)}start(e,t){return this._startHook(e,t),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Dp=Qn;var $n=class extends q{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}})}_onDrawStop(e){new ae(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.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t);this._helpLinePositions=[e[0],i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3),e[1]];let s=Math.abs(i.Cesium.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.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.GREENYELLOW});return this._helpLine.polyline.material=r,this._helpLine.polyline.depthFailMaterial=r,this._layer.entities.add(this._helpLine),new oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this}},Lp=$n;var el=class extends q{constructor(){super(),this._maxAnchorSize=2,this._helpLinePositions=[],this._helpLine=new i.Cesium.Entity({polyline:{positions:new i.Cesium.CallbackProperty(()=>this._helpLinePositions.length>1?this._helpLinePositions:null,!1)}}),this._lengthLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._heightLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._distanceLabel=new i.Cesium.Entity({label:{font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}})}_onDrawStop(e){new ae(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.Cesium.Ellipsoid.WGS84.geodeticSurfaceNormal(e[0],new i.Cesium.Cartesian3),r=i.Cesium.Plane.fromPointNormal(e[0],t),s=i.Cesium.Plane.projectPointOntoPlane(r,e[1],new i.Cesium.Cartesian3);this._helpLinePositions=[e[0],s,e[1]];let o=i.Cesium.Cartesian3.distance(e[0],s),a=Math.abs(i.Cesium.Plane.getPointDistance(r,e[1])),l=i.Cesium.Cartesian3.distance(e[0],e[1]);this._lengthLabel.position=i.Cesium.Cartesian3.midpoint(e[0],s,new i.Cesium.Cartesian3),this._lengthLabel.label.text=o>1e3?`${(o/1e3).toFixed(2)} \u516C\u91CC`:`${o.toFixed(2)} \u7C73`,this._distanceLabel.position=i.Cesium.Cartesian3.midpoint(e[0],e[1],new i.Cesium.Cartesian3),this._distanceLabel.label.text=l>1e3?`${(l/1e3).toFixed(2)} \u516C\u91CC`:`${l.toFixed(2)} \u7C73`,this._heightLabel.position=i.Cesium.Cartesian3.midpoint(s,e[1],new i.Cesium.Cartesian3),this._heightLabel.label.text=a>1e3?`${(a/1e3).toFixed(2)} \u516C\u91CC`:`${a.toFixed(2)} \u7C73`}}start(e,t){this._startHook(e,t);let r=new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.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 oe({material:t.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:t.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:t.width||2,clampToGround:!1}).start(e,{...t,maxAnchorSize:this._maxAnchorSize}),this}},Rp=el;var tl=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.Cesium.CustomDataSource("measure-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}angle(e={}){return new Pp().start(this,e),this}area(e={}){return new bp().start(this,e),this}areaHeight(e={}){return new Sp().start(this,e),this}areaSurface(e={}){return new Ip().start(this,e),this}distance(e={}){return new Mp().start(this,e),this}distanceSurface(e={}){return new Ap().start(this,e),this}heading(e={}){return new Dp().start(this,e),this}height(e={}){return new Lp().start(this,e),this}triangleHeight(e={}){return new Rp().start(this,e),this}activate(e,t){switch(e){case ie.ANGLE:this.angle(t);break;case ie.AREA:this.area(t);break;case ie.AREA_HEIGHT:this.areaHeight(t);break;case ie.AREA_SURFACE:this.areaSurface(t);break;case ie.DISTANCE:this.distance(t);break;case ie.DISTANCE_SURFACE:this.distanceSurface(t);break;case ie.HEADING:this.heading(t);break;case ie.HEIGHT:this.height(t);break;case ie.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}},il=tl;var zu={SIGHT_LINE:"sightLine"},lt=zu;var Hu={PROFILE:"profile"},ht=Hu;var rl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._enable=!1,this._color=i.Cesium.Color.YELLOW,this._width=1,this._spacing=100,this._state=d.INITIALIZED}get type(){return"contourLine"}set enable(e){this._enable=e,e&&this._viewer?this._createAnalysis():(this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null))}get enable(){return this._enable}set color(e){this._color=e,this._delegate&&(this._delegate.uniforms.color=e)}get color(){return this._color}set width(e){this._width=e,this._delegate&&(this._delegate.uniforms.width=e)}get width(){return this._width}set spacing(e){this._spacing=e,this._delegate&&(this._delegate.uniforms.spacing=e)}get spacing(){return this._spacing}_init(e,t,r){this._enable=!0,this._color=e||i.Cesium.Color.YELLOW,this._width=t||1,this._spacing=r||100,this._enable&&this._viewer&&this._createAnalysis()}deactivate(){this._enable=!1,this._delegate&&(this._delegate=null),this._viewer&&(this._viewer.scene.globe.material=null)}_createAnalysis(){let e=this._viewer.scene.globe,t=i.Cesium.Material.fromType("ElevationContour"),r=t.uniforms;r.width=this._width,r.spacing=this._spacing,r.color=this._color,e.material=t,this._delegate=t}},Op=rl;var sl=class{constructor(e){this._id=v.uuid(),this._viewer=e,this._enable=!1,this._positions=[],this._maxDistance=5,this._speed=1e3,this._maxHeight=20,this._inRangeColor=i.Cesium.Color.YELLOW,this._outRangeColor=i.Cesium.Color.WHITE,this._state=d.INITIALIZED}get type(){return"tilesetShake"}set enable(e){this._enable=e,this.tileset_arr.forEach(t=>{let r=null;this._enable?r=this._getShader(t.tileset2):r=new window.GM.CustomShader,t.tileset.setCustomShader(r)})}get enable(){return this._enable}set maxDistance(e){this._maxDistance=e,this._enable&&this._changeSettings()}get maxDistance(){return this._maxDistance}set speed(e){this._speed=e,this._enable&&this._changeSettings()}get speed(){return this._speed}set maxHeight(e){this._maxHeight=e,this._enable&&this._changeSettings()}get maxHeight(){return this._maxHeight}_getShader(e){let t=e.boundingSphere.center.clone(),r=i.Cesium.Transforms.eastNorthUpToFixedFrame(t),s=i.Cesium.Matrix4.inverse(r,new i.Cesium.Matrix4);return new i.Cesium.CustomShader({uniforms:{M_LocaltoWorld:{type:i.Cesium.UniformType.MAT4,value:r},M_WorldtoLocal:{type:i.Cesium.UniformType.MAT4,value:s},center:{type:i.Cesium.UniformType.VEC3,value:t},MAX_Distance:{type:i.Cesium.UniformType.FLOAT,value:this._maxDistance},Speed:{type:i.Cesium.UniformType.FLOAT,value:this._speed},height:{type:i.Cesium.UniformType.FLOAT,value:this._maxHeight}},vertexShaderText:this._getVs(),fragmentShaderText:this._getFs()})}_changeSettings(){this.tileset_arr.forEach(e=>{let t=this._getShader(e.tileset2);e.tileset.setCustomShader(t)})}_getVs(){return`
17472
17472
  void vertexMain(VertexInput vsInput, inout czm_modelVertexOutput vsOutput) {
17473
17473
  vec3 positionMC = vsInput.attributes.positionMC;
17474
17474
  //\u4E16\u754C\u5750\u6807\u8F6C\u5C40\u90E8 \u8981\u5C06\u6A21\u578B\u5750\u6807\u8F6C\u4E3A\u4E16\u754C\u5750\u6807
@@ -17513,8 +17513,8 @@ void main(){
17513
17513
  void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
17514
17514
  material.diffuse = vec3(0.2, 0.5, 1.0); // \u5C06\u6750\u8D28\u989C\u8272\u8BBE\u7F6E\u4E3A\u7EA2\u8272 vec3(1.0, 0.0, 0.0) vec3(0.945, 0.459, 0.620)
17515
17515
  }
17516
- `}_init(e,t={}){this._enable=!0,this._maxDistance=t.maxDistance||5,this._speed=t.speed||1e3,this._maxHeight=t.maxHeight||20,e&&(this._layer=e,this.tileset_arr=this._layer.delegate._primitives.map(r=>({overlayId:r.overlayId,tileset2:r,tileset:this._layer._cache[r.overlayId]||null})),this.tileset_arr.forEach(r=>{let s=this._getShader(r.tileset2);r.tileset.setCustomShader(s)}))}deactivate(){this._enable=!1,!(!this.tileset_arr||this.tileset_arr.length===0)&&this.tileset_arr.forEach(e=>{let t=new window.GM.CustomShader;e.tileset.setCustomShader(t)})}},kd=sl;var ol=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.Cesium.CustomDataSource("terrainClip"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.Cesium.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=p.INITIALIZED,this._callback=null}get type(){return"terrainClip"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.Cesium.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let a=o.map(l=>i.Cesium.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.Cesium.sampleTerrainMostDetailed(s,a).then(l=>{let h=l.map(c=>{let d=i.Cesium.Math.toDegrees(c.longitude),f=i.Cesium.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:d,lat:f,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),a={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,show:!0};this._area.push({id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0}),typeof this._callback=="function"&&this._callback(a)}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:new i.Cesium.ImageMaterialProperty({image:this._image,repeat:new i.Cesium.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.Cesium.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cesium.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),d=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:d})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},Fd=ol;function ne(n,e){this.viewer=n,this.options=e||{},this._positions=[new i.Cesium.Cartesian3(-1.1825928630924462e6,5.5155809806405855e6,2966674365247578e-9),new i.Cesium.Cartesian3(-1183337777477057e-9,5515825617716778e-9,2.9659274345367434e6),new i.Cesium.Cartesian3(-1.1845084932830015e6,5515571328839522e-9,2965932974956288e-9),new i.Cesium.Cartesian3(-1.1855870332886775e6,5514889448799464e-9,2.9667642948399023e6),new i.Cesium.Cartesian3(-1.1850990292063756e6,5514576687407264e-9,2967535347584739e-9),new i.Cesium.Cartesian3(-1.1828409384216308e6,551522464431188e-8,2.9672341119776894e6)],this._height=this.options.height||0,this.bottomImg=e.bottomImg,this.wallImg=e.wallImg,this.splitNum=i.Cesium.defaultValue(e.splitNum,50),this._positions&&this._positions.length>0&&this.updateData(this._positions)}Object.defineProperties(ne.prototype,{show:{get:function(){return this._show},set:function(n){this._show=n,this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=n),this._switchExcavate(n)}},height:{get:function(){return this._height},set:function(n){this._height=n,this._updateExcavateDepth(n)}}});ne.prototype.updateData=function(n){this.clear();var e=[],t=n.length,r=new i.Cesium.Cartesian3,s=i.Cesium.Cartesian3.subtract(n[0],n[1],r);s=s.x>0,this.excavateMinHeight=9999;for(var o=0;o<t;++o){var a=(o+1)%t,l=i.Cesium.Cartographic.fromCartesian(n[o]),h=viewer.scene.globe.getHeight(l)||l.height;h<this.excavateMinHeight&&(this.excavateMinHeight=h);var c=i.Cesium.Cartesian3.add(n[o],n[a],new i.Cesium.Cartesian3);c=i.Cesium.Cartesian3.multiplyByScalar(c,.5,c);var d=i.Cesium.Cartesian3.normalize(c,new i.Cesium.Cartesian3),f=i.Cesium.Cartesian3.subtract(n[a],c,new i.Cesium.Cartesian3);f=i.Cesium.Cartesian3.normalize(f,f);var T=i.Cesium.Cartesian3.cross(f,d,new i.Cesium.Cartesian3);T=i.Cesium.Cartesian3.normalize(T,T);var y=new i.Cesium.Plane(T,0),m=i.Cesium.Plane.getPointDistance(y,c);e.push(new i.Cesium.ClippingPlane(T,m))}this.viewer.scene.globe.clippingPlanes=new i.Cesium.ClippingPlaneCollection({planes:e,edgeWidth:1,edgeColor:i.Cesium.Color.WHITE,enabled:!0}),this._prepareWell(n),this._createWell(this.wellData)};ne.prototype.clear=function(){this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=!1,this.viewer.scene.globe.clippingPlanes.removeAll(),this.viewer.scene.globe.clippingPlanes.isDestroyed()||this.viewer.scene.globe.clippingPlanes.destroy()),this.viewer.scene.globe.clippingPlanes=void 0,this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall),delete this.bottomSurface,delete this.wellWall,this.viewer.scene.render()};ne.prototype._prepareWell=function(n){var e=this.splitNum,t=n.length;if(t!=0){for(var r=this.excavateMinHeight-this.height,s=[],o=[],a=[],l=0;l<t;l++){var h=l==t-1?0:l+1,c=i.Cesium.Cartographic.fromCartesian(n[l]),d=i.Cesium.Cartographic.fromCartesian(n[h]),f=[c.longitude,c.latitude],T=[d.longitude,d.latitude];l==0&&(a.push(new i.Cesium.Cartographic(f[0],f[1])),o.push(i.Cesium.Cartesian3.fromRadians(f[0],f[1],r)),s.push(i.Cesium.Cartesian3.fromRadians(f[0],f[1],0)));for(var y=1;y<=e;y++){var m=i.Cesium.Math.lerp(f[0],T[0],y/e),E=i.Cesium.Math.lerp(f[1],T[1],y/e);l==t-1&&y==e||(a.push(new i.Cesium.Cartographic(m,E)),o.push(i.Cesium.Cartesian3.fromRadians(m,E,r)),s.push(i.Cesium.Cartesian3.fromRadians(m,E,0)))}}this.wellData={lerp_pos:a,bottom_pos:o,no_height_top:s}}};ne.prototype._createWell=function(n){if(this.viewer.terrainProvider._layers){var e=this;this._createBottomSurface(n.bottom_pos);var t=i.Cesium.sampleTerrainMostDetailed(this.viewer.terrainProvider,n.lerp_pos);i.Cesium.when(t,function(r){for(var s=r.length,o=[],a=0;a<s;a++){var l=i.Cesium.Cartesian3.fromRadians(r[a].longitude,r[a].latitude,r[a].height);o.push(l)}e._createWellWall(n.bottom_pos,o)})}else this._createBottomSurface(n.bottom_pos),this._createWellWall(n.bottom_pos,n.no_height_top)};ne.prototype._getMinHeight=function(n){let e=5e6,t=null;for(let r=0;r<n.length;r++){let s=n[r].z;s<e&&(e=s,t=this._ellipsoidToLonLat(n[r]))}return t.altitude};ne.prototype._ellipsoidToLonLat=function(n){let e=this.viewer.scene.globe.ellipsoid,t=new i.Cesium.Cartesian3(n.x,n.y,n.z),r=e.cartesianToCartographic(t),s=i.Cesium.Math.toDegrees(r.latitude),o=i.Cesium.Math.toDegrees(r.longitude),a=r.height;return{longitude:o,latitude:s,altitude:a}};ne.prototype._createBottomSurface=function(n){if(n.length){let r=this._getMinHeight(n),s=[];for(let l=0;l<n.length;l++){let h=this._ellipsoidToLonLat(n[l]);s.push(h.longitude),s.push(h.latitude),s.push(r)}let o=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(s)),perPositionHeight:!0,closeBottom:!1}),a=i.Cesium.PolygonGeometry.createGeometry(o);var e=new i.Cesium.Material({fabric:{type:"Image",uniforms:{image:this.bottomImg}}}),t=new i.Cesium.MaterialAppearance({translucent:!1,flat:!0,material:e});this.bottomSurface=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:a}),appearance:t,asynchronous:!1}),this.viewer.scene.primitives.add(this.bottomSurface)}};ne.prototype._createWellWall=function(n,e){let t=this._getMinHeight(n),r=[],s=[];for(let c=0;c<e.length;c++)r.push(this._ellipsoidToLonLat(e[c]).altitude),s.push(t);let o=new i.Cesium.WallGeometry({positions:e,maximumHeights:r,minimumHeights:s}),a=i.Cesium.WallGeometry.createGeometry(o);var l=new i.Cesium.Material({fabric:{type:"Image",uniforms:{image:this.wallImg}}}),h=new i.Cesium.MaterialAppearance({translucent:!1,flat:!0,material:l});this.wellWall=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:a,attributes:{color:i.Cesium.ColorGeometryInstanceAttribute.fromColor(i.Cesium.Color.GREY)},id:"PitWall"}),appearance:h,asynchronous:!1}),this.viewer.scene.primitives.add(this.wellWall)};ne.prototype._switchExcavate=function(n){n?(this.viewer.scene.globe.material=i.Cesium.Material.fromType("WaJue"),this.wellWall.show=!0,this.bottomSurface.show=!0):(this.viewer.scene.globe.material=null,this.wellWall.show=!1,this.bottomSurface.show=!1)};ne.prototype._updateExcavateDepth=function(n){this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall);for(var e=this.wellData.lerp_pos,t=[],r=e.length,s=0;s<r;s++)t.push(i.Cesium.Cartesian3.fromRadians(e[s].longitude,e[s].latitude,this.excavateMinHeight-n));this.wellData.bottom_pos=t,this._createWell(this.wellData),this.viewer.scene.primitives.add(this.bottomSurface),this.viewer.scene.primitives.add(this.wellWall)};var zd=ne;var al=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.Cesium.CustomDataSource("TerrainUplift"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._upHeight=t.upHeight||0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.Cesium.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=p.INITIALIZED,this._callback=null}get type(){return"TerrainUplift"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.Cesium.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let a=o.map(l=>i.Cesium.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.Cesium.sampleTerrainMostDetailed(s,a).then(l=>{let h=l.map(c=>{let d=i.Cesium.Math.toDegrees(c.longitude),f=i.Cesium.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:d,lat:f,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),a=this._adjustTerrainHeight(e),l={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0};this._area.push(l),typeof this._callback=="function"&&this._callback(l)}_adjustTerrainHeight(e,t=1e3){console.log(111111111111);let r=new i.Cesium.EllipsoidSurfaceAppearance({}),s=[];e.forEach(l=>{s.push(parseFloat(l.lng)),s.push(parseFloat(l.lat)),s.push(this._minHeight+t)});let o=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(s));return this._layer.entities.add({polygon:{hierarchy:o,material:r.material,perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:new i.Cesium.ImageMaterialProperty({image:this._image,repeat:new i.Cesium.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.Cesium.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cesium.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),d=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:d})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},Hd=al;var nl=class{constructor(e){ni(this,"_analysisTerrainVisible",e=>{let t=this._viewer.terrainProvider,r=e.map(s=>i.Cesium.Cartographic.fromDegrees(s.lng,s.lat,s.alt));i.Cesium.sampleTerrainMostDetailed(t,r).then(s=>{let o=0,a=null;for(let l=0;l<s.length-1;l++){if(l<s.length-2){let h=e[l],c=e[l+1],d=i.Cesium.Cartesian3.fromDegrees(h.lng,h.lat,h.alt),f=i.Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt);if(a=this._analysisModelVisible([d,f]),i.Cesium.defined(a)&&i.Cesium.defined(a.object)){console.log("\u5728\u6A21\u578B\u4E0A.");let T=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),y=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(a.position,T,i.Cesium.Color.GREEN),this._drawLine(a.position,y,i.Cesium.Color.RED);break}}if(s[l].height>=e[l].alt){console.log("\u5728\u5730\u5F62\u4E0A."),o=l;let h=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),c=i.Cesium.Cartesian3.fromDegrees(e[l].lng,e[l].lat,e[l].alt),d=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(h,c,i.Cesium.Color.GREEN),this._drawLine(c,d,i.Cesium.Color.RED);break}}if(o===0&&a===null){console.log("\u5168\u90E8\u53EF\u89C6.");let l=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),h=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(l,h,i.Cesium.Color.GREEN)}})});ni(this,"_analysisModelVisible",e=>{let t=i.Cesium.Cartesian3.normalize(i.Cesium.Cartesian3.subtract(e[1],e[0],new i.Cesium.Cartesian3),new i.Cesium.Cartesian3),r=new i.Cesium.Ray(e[0],t);return this._viewer.scene.pickFromRay(r)});this._id=v.uuid(),this._viewer=e,this._layer=new i.Cesium.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)}get type(){return"sightLine"}get layer(){return this._layer}_init(e,t,r=10){this._layer&&this._layer.entities.removeAll();let s=i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),o=i.Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),a=this._viewer.terrainProvider;if(a&&!(a instanceof i.Cesium.EllipsoidTerrainProvider)){let l=this._lerp(e,t,r).concat([t]);this._analysisTerrainVisible(l)}else this._analysisVisible([s,o])}_analysisVisible(e){let t=this._analysisModelVisible(e);if(i.Cesium.defined(t)&&i.Cesium.defined(t.object)){let r=this._drawLine(t.position,e[0],i.Cesium.Color.GREEN),s=this._drawLine(t.position,e[1],i.Cesium.Color.RED);console.log("\u5728\u6A21\u578B\u4E0A.",r,s)}else{let r=this._drawLine(e[0],e[1],i.Cesium.Color.GREEN);console.log("\u4E0D\u5728\u6A21\u578B\u4E0A",r)}}_drawLine(e,t,r){return this._layer||(this._layer=new i.Cesium.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)),this._layer&&this._layer.entities.add({polyline:{positions:[e,t],width:2,material:r,depthFailMaterial:r}}),this}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),d=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:d})}return s}deactivate(){this._layer&&this._layer.entities.removeAll(),this._layer&&this._viewer.dataSources.remove(this._layer),this._layer=null}},Nd=nl;var ll=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._contourLine=new Od(e),this._tilesetShake=new kd(e),this._sightLine=new Nd(e)}get ContourLine(){return this._contourLine}get TilesetShake(){return this._tilesetShake}get SightLine(){return this._sightLine}contourLine(e,t,r){this._contourLine._init(e,t,r)}tilesetShake(e,t){this._tilesetShake._init(e,t)}terrainClip(e={}){return new Fd(this._viewer,e)}terrainClipPlan(e={}){return new zd(this._viewer,e)}terrainUplift(e={}){return new Hd(this._viewer,e)}sightLine(e,t,r){return this._sightLine._init(e,t,r)}deactivate(e=null){switch(e){case lt.SIGHT_LINE:this._sightLine.deactivate();break;default:this._contourLine.deactivate(),this._tilesetShake.deactivate();break}return this}},hl=ll;var cl=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)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.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._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},Wd=cl;var dl=class extends Wd{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.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(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP,e))}},Gd=dl;var pl=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Cesium.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Cesium.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.Cesium.EllipsoidTerrainProvider)?i.Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cesium.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cesium.Cartographic.fromCartesian(o))),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){}_onComputedStop(e,t=!1){let r=[];return t?r=e.map((s,o)=>{let l=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(s),h=0;for(let c=1;c<=o;c++){let d=i.Cesium.Cartesian3.distance(e[c-1],e[c]);h+=d}return{longitude:i.Cesium.Math.toDegrees(l.longitude),latitude:i.Cesium.Math.toDegrees(l.latitude),height:l.height,distance:h,cartesian3Position:s}}):r=e.map((s,o)=>{let a=0;for(let l=1;l<=o;l++){let h=i.Cesium.Cartesian3.fromRadians(e[l-1].longitude,e[l-1].latitude,e[l-1].height),c=i.Cesium.Cartesian3.fromRadians(e[l].longitude,e[l].latitude,e[l].height),d=i.Cesium.Cartesian3.distance(h,c);a+=d}return{longitude:i.Cesium.Math.toDegrees(s.longitude),latitude:i.Cesium.Math.toDegrees(s.latitude),height:s.height,distance:a,cartesian3Position:i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,s.height)}}),r}_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}},Ud=pl;var ml=class extends Ud{constructor(){super(),this._maxAnchorSize=9999,this._positions=[],this._includeModel=!0,this._callback=null}_lerp(e,t,r=5){let s=[],o=i.Cesium.Cartographic.fromCartesian(e),a=i.Cesium.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),d=o.height-(o.height-a.height)*(l/r);s.push(i.Cesium.Cartesian3.fromRadians(h,c,d))}return s}async _onDrawStop(e){let t=this._positions.filter((s,o)=>o!==1),r=await this._onComputedStop(t,this._includeModel);typeof this._callback=="function"&&await this._callback(r)}_stoppedHook(){this._options.onDrawStop&&this._options.onDrawStop(entity)}_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,this._includeModel).then(([r,s])=>(this._includeModel||(this._positions=r),r.map((o,a)=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),Math.max(o.height||0,s[a]?i.Cesium.Cartographic.fromCartesian(s[a]).height:0))))).then(r=>{this._includeModel&&(this._positions=r);let s=0;for(let o=0;o<r.length-1;o++){let a=i.Cesium.Cartesian3.distance(r[o],r[o+1]);s+=a}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t,r={}){return this._startHook(e,r),new Gd({material:r.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:r.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:r.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this._includeModel=r==null?void 0:r.includeModel,this._callback=t,this}},Bd=ml;var ul=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.Cesium.CustomDataSource("plotAnalysis-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}profile(e,t={}){var r;return(r=new Bd)==null||r.start(this,e,t),this}activate(e,t){switch(e){case ht.PROFILE:this.profile(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}},_l=ul;var fl=class{static init(){let e=me("turf");if(!e)throw new Error("miss the turf lib");return e}static pointBuffer(e,t=50,r=8){let s=this.init(),o=_.parsePosition(e),a=s.point([o.lng,o.lat,o.alt]),l=s.buffer(a,t,{units:"meters",steps:r}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static polylineBuffer(e,t=50,r=8){let s=this.init(),a=_.parsePositions(e).map(d=>[d.lng,d.lat,d.alt]),l=s.lineString(a),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonBuffer(e,t=50,r=8){let s=this.init(),o=_.parsePositions(e),a=o.concat(o[0]).map(d=>[d.lng,d.lat,d.alt]),l=s.polygon([a]),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static transformPolylineScale(e,t=1){let r=this.init(),o=_.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),a=r.lineString(o),l=r.transformScale(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonScale(e,t){let r=this.init(),s=_.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),a=r.polygon([o]),l=r.transformScale(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static transformPolylineRotate(e,t=0){let r=this.init(),o=_.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),a=r.lineString(o),l=r.transformRotate(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonRotate(e,t=0){let r=this.init(),s=_.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),a=r.polygon([o]),l=r.transformRotate(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static sector(e,t,r,s){let o=this.init(),a=_.parsePosition(e),l=o.point([a.lng,a.lat,a.alt]),h=o.sector(l,t,r,s,{units:"meters"}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonEquivalent(e,t,r,s=null){let o=this.init(),a=[];for(let d=0,f=e.length;d<f;d++){let T=e[d];a.push({type:"Feature",properties:T,geometry:{type:"Point",coordinates:[T.x,T.y]}})}let l={type:"FeatureCollection",features:a};s&&s!==null&&(l=o.interpolate(l,s.cellSize||10,{gridType:"point",property:r,units:(s==null?void 0:s.units)||"kilometers",weight:(s==null?void 0:s.weight)||1}),l.features.map(d=>d.properties[r]=Number(d.properties[r].toFixed(2))));let h=o.isobands(l,t,{zProperty:r}),c=o.isolines(l,t,{zProperty:r});return{geojsonPoly:h,geojsonLine:c}}},gl=fl;var Nu=i.Cesium.Cartesian2,Wu=i.Cesium.Cartesian3,Gu=i.Cesium.Matrix3,Uu=i.Cesium.Matrix4,Bu=i.Cesium.Material,Vu=i.Cesium.SceneMode,ju=i.Cesium.SkyBox,Yu=i.Cesium.Color,Zu=i.Cesium.Rectangle,qu=i.Cesium.ShadowMode,Xu=i.Cesium.JulianDate,Ju=i.Cesium.HeightReference,Ku=i.Cesium.HorizontalOrigin,Qu=i.Cesium.VerticalOrigin,$u=i.Cesium.CallbackProperty,e_=i.Cesium.ClassificationType,t_=i.Cesium.Cesium3DTileStyle,i_=i.Cesium.GeographicTilingScheme,r_=i.Cesium.WebMercatorTilingScheme,s_=i.Cesium.ColorMaterialProperty,o_=i.Cesium.ImageMaterialProperty,a_=i.Cesium.PolylineDashMaterialProperty,n_=i.Cesium.PolylineGlowMaterialProperty,l_=i.Cesium.PolylineOutlineMaterialProperty,h_=i.Cesium.PolylineArrowMaterialProperty,c_=i.Cesium.writeTextToCanvas,d_=i.Cesium.CustomShaderMode,p_=i.Cesium.CustomShaderTranslucencyMode,m_=i.Cesium.CustomShader,u_=i.Cesium.UniformType,__=i.Cesium.Ellipsoid,f_=i.Cesium.Resource,g_=i.Cesium.createGooglePhotorealistic3DTileset,y_=i.Cesium.createElevationBandMaterial,v_=i.Cesium.ModelAnimationLoop,w_=i.Cesium.ClippingPlane,T_=i.Cesium.ClippingPlaneCollection,C_=i.Cesium.ClippingPolygon,x_=i.Cesium.ClippingPolygonCollection;var E_="./libs/gm-sdk/resources/",Vd=E_,jd=!1,P_={set baseUrl(n){Vd=n},get baseUrl(){return Vd}};function b_(n={}){return jd?Promise.resolve():(Yd&&Yd(),new Promise((e,t)=>{n.baseUrl&&(this.config.baseUrl=n.baseUrl),n.echarts&&(Gl(n.echarts),pe("echarts",n.echarts)),n.turf&&pe("turf",n.turf),n.shpUtil&&pe("shpUtil",n.shpUtil),jd=!0,mt("isInitialized",!0),mt("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)}))}function Yd(){console.clear(),console.log(`%c
17516
+ `}_init(e,t={}){this._enable=!0,this._maxDistance=t.maxDistance||5,this._speed=t.speed||1e3,this._maxHeight=t.maxHeight||20,e&&(this._layer=e,this.tileset_arr=this._layer.delegate._primitives.map(r=>({overlayId:r.overlayId,tileset2:r,tileset:this._layer._cache[r.overlayId]||null})),this.tileset_arr.forEach(r=>{let s=this._getShader(r.tileset2);r.tileset.setCustomShader(s)}))}deactivate(){this._enable=!1,!(!this.tileset_arr||this.tileset_arr.length===0)&&this.tileset_arr.forEach(e=>{let t=new window.GM.CustomShader;e.tileset.setCustomShader(t)})}},kp=sl;var ol=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.Cesium.CustomDataSource("terrainClip"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.Cesium.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=d.INITIALIZED,this._callback=null}get type(){return"terrainClip"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.Cesium.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let a=o.map(l=>i.Cesium.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.Cesium.sampleTerrainMostDetailed(s,a).then(l=>{let h=l.map(c=>{let p=i.Cesium.Math.toDegrees(c.longitude),f=i.Cesium.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:f,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),a={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,show:!0};this._area.push({id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0}),typeof this._callback=="function"&&this._callback(a)}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:new i.Cesium.ImageMaterialProperty({image:this._image,repeat:new i.Cesium.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.Cesium.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cesium.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},Fp=ol;function ne(n,e){this.viewer=n,this.options=e||{},this._positions=[new i.Cesium.Cartesian3(-1.1825928630924462e6,5.5155809806405855e6,2966674365247578e-9),new i.Cesium.Cartesian3(-1183337777477057e-9,5515825617716778e-9,2.9659274345367434e6),new i.Cesium.Cartesian3(-1.1845084932830015e6,5515571328839522e-9,2965932974956288e-9),new i.Cesium.Cartesian3(-1.1855870332886775e6,5514889448799464e-9,2.9667642948399023e6),new i.Cesium.Cartesian3(-1.1850990292063756e6,5514576687407264e-9,2967535347584739e-9),new i.Cesium.Cartesian3(-1.1828409384216308e6,551522464431188e-8,2.9672341119776894e6)],this._height=this.options.height||0,this.bottomImg=e.bottomImg,this.wallImg=e.wallImg,this.splitNum=i.Cesium.defaultValue(e.splitNum,50),this._positions&&this._positions.length>0&&this.updateData(this._positions)}Object.defineProperties(ne.prototype,{show:{get:function(){return this._show},set:function(n){this._show=n,this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=n),this._switchExcavate(n)}},height:{get:function(){return this._height},set:function(n){this._height=n,this._updateExcavateDepth(n)}}});ne.prototype.updateData=function(n){this.clear();var e=[],t=n.length,r=new i.Cesium.Cartesian3,s=i.Cesium.Cartesian3.subtract(n[0],n[1],r);s=s.x>0,this.excavateMinHeight=9999;for(var o=0;o<t;++o){var a=(o+1)%t,l=i.Cesium.Cartographic.fromCartesian(n[o]),h=viewer.scene.globe.getHeight(l)||l.height;h<this.excavateMinHeight&&(this.excavateMinHeight=h);var c=i.Cesium.Cartesian3.add(n[o],n[a],new i.Cesium.Cartesian3);c=i.Cesium.Cartesian3.multiplyByScalar(c,.5,c);var p=i.Cesium.Cartesian3.normalize(c,new i.Cesium.Cartesian3),f=i.Cesium.Cartesian3.subtract(n[a],c,new i.Cesium.Cartesian3);f=i.Cesium.Cartesian3.normalize(f,f);var T=i.Cesium.Cartesian3.cross(f,p,new i.Cesium.Cartesian3);T=i.Cesium.Cartesian3.normalize(T,T);var y=new i.Cesium.Plane(T,0),m=i.Cesium.Plane.getPointDistance(y,c);e.push(new i.Cesium.ClippingPlane(T,m))}this.viewer.scene.globe.clippingPlanes=new i.Cesium.ClippingPlaneCollection({planes:e,edgeWidth:1,edgeColor:i.Cesium.Color.WHITE,enabled:!0}),this._prepareWell(n),this._createWell(this.wellData)};ne.prototype.clear=function(){this.viewer.scene.globe.clippingPlanes&&(this.viewer.scene.globe.clippingPlanes.enabled=!1,this.viewer.scene.globe.clippingPlanes.removeAll(),this.viewer.scene.globe.clippingPlanes.isDestroyed()||this.viewer.scene.globe.clippingPlanes.destroy()),this.viewer.scene.globe.clippingPlanes=void 0,this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall),delete this.bottomSurface,delete this.wellWall,this.viewer.scene.render()};ne.prototype._prepareWell=function(n){var e=this.splitNum,t=n.length;if(t!=0){for(var r=this.excavateMinHeight-this.height,s=[],o=[],a=[],l=0;l<t;l++){var h=l==t-1?0:l+1,c=i.Cesium.Cartographic.fromCartesian(n[l]),p=i.Cesium.Cartographic.fromCartesian(n[h]),f=[c.longitude,c.latitude],T=[p.longitude,p.latitude];l==0&&(a.push(new i.Cesium.Cartographic(f[0],f[1])),o.push(i.Cesium.Cartesian3.fromRadians(f[0],f[1],r)),s.push(i.Cesium.Cartesian3.fromRadians(f[0],f[1],0)));for(var y=1;y<=e;y++){var m=i.Cesium.Math.lerp(f[0],T[0],y/e),E=i.Cesium.Math.lerp(f[1],T[1],y/e);l==t-1&&y==e||(a.push(new i.Cesium.Cartographic(m,E)),o.push(i.Cesium.Cartesian3.fromRadians(m,E,r)),s.push(i.Cesium.Cartesian3.fromRadians(m,E,0)))}}this.wellData={lerp_pos:a,bottom_pos:o,no_height_top:s}}};ne.prototype._createWell=function(n){if(this.viewer.terrainProvider._layers){var e=this;this._createBottomSurface(n.bottom_pos);var t=i.Cesium.sampleTerrainMostDetailed(this.viewer.terrainProvider,n.lerp_pos);i.Cesium.when(t,function(r){for(var s=r.length,o=[],a=0;a<s;a++){var l=i.Cesium.Cartesian3.fromRadians(r[a].longitude,r[a].latitude,r[a].height);o.push(l)}e._createWellWall(n.bottom_pos,o)})}else this._createBottomSurface(n.bottom_pos),this._createWellWall(n.bottom_pos,n.no_height_top)};ne.prototype._getMinHeight=function(n){let e=5e6,t=null;for(let r=0;r<n.length;r++){let s=n[r].z;s<e&&(e=s,t=this._ellipsoidToLonLat(n[r]))}return t.altitude};ne.prototype._ellipsoidToLonLat=function(n){let e=this.viewer.scene.globe.ellipsoid,t=new i.Cesium.Cartesian3(n.x,n.y,n.z),r=e.cartesianToCartographic(t),s=i.Cesium.Math.toDegrees(r.latitude),o=i.Cesium.Math.toDegrees(r.longitude),a=r.height;return{longitude:o,latitude:s,altitude:a}};ne.prototype._createBottomSurface=function(n){if(n.length){let r=this._getMinHeight(n),s=[];for(let l=0;l<n.length;l++){let h=this._ellipsoidToLonLat(n[l]);s.push(h.longitude),s.push(h.latitude),s.push(r)}let o=new i.Cesium.PolygonGeometry({polygonHierarchy:new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(s)),perPositionHeight:!0,closeBottom:!1}),a=i.Cesium.PolygonGeometry.createGeometry(o);var e=new i.Cesium.Material({fabric:{type:"Image",uniforms:{image:this.bottomImg}}}),t=new i.Cesium.MaterialAppearance({translucent:!1,flat:!0,material:e});this.bottomSurface=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:a}),appearance:t,asynchronous:!1}),this.viewer.scene.primitives.add(this.bottomSurface)}};ne.prototype._createWellWall=function(n,e){let t=this._getMinHeight(n),r=[],s=[];for(let c=0;c<e.length;c++)r.push(this._ellipsoidToLonLat(e[c]).altitude),s.push(t);let o=new i.Cesium.WallGeometry({positions:e,maximumHeights:r,minimumHeights:s}),a=i.Cesium.WallGeometry.createGeometry(o);var l=new i.Cesium.Material({fabric:{type:"Image",uniforms:{image:this.wallImg}}}),h=new i.Cesium.MaterialAppearance({translucent:!1,flat:!0,material:l});this.wellWall=new i.Cesium.Primitive({geometryInstances:new i.Cesium.GeometryInstance({geometry:a,attributes:{color:i.Cesium.ColorGeometryInstanceAttribute.fromColor(i.Cesium.Color.GREY)},id:"PitWall"}),appearance:h,asynchronous:!1}),this.viewer.scene.primitives.add(this.wellWall)};ne.prototype._switchExcavate=function(n){n?(this.viewer.scene.globe.material=i.Cesium.Material.fromType("WaJue"),this.wellWall.show=!0,this.bottomSurface.show=!0):(this.viewer.scene.globe.material=null,this.wellWall.show=!1,this.bottomSurface.show=!1)};ne.prototype._updateExcavateDepth=function(n){this.bottomSurface&&this.viewer.scene.primitives.remove(this.bottomSurface),this.wellWall&&this.viewer.scene.primitives.remove(this.wellWall);for(var e=this.wellData.lerp_pos,t=[],r=e.length,s=0;s<r;s++)t.push(i.Cesium.Cartesian3.fromRadians(e[s].longitude,e[s].latitude,this.excavateMinHeight-n));this.wellData.bottom_pos=t,this._createWell(this.wellData),this.viewer.scene.primitives.add(this.bottomSurface),this.viewer.scene.primitives.add(this.wellWall)};var zp=ne;var al=class{constructor(e,t={}){if(!e)throw Error("missing viewer param");this._id=v.uuid(),this._viewer=e,this._delegate=void 0,this._layer=new i.Cesium.CustomDataSource("TerrainUplift"),e.dataSources.add(this._layer),this._minHeight=null,this._currentHeight=[],this._area=[],this._enable=t.enable||!0,this._upHeight=t.upHeight||0,this._clipOutSide=t.clipOutSide||!1,this._diffHeight=t.diffHeight||0,this._image=t.image||"//data.mars3d.cn/img/textures/poly-land.png",this._imageBottom=t.imageBottom||"//data.mars3d.cn/img/textures/poly-soil.jpg",this._splitNum=t.splitNum||30,this._clippingPolygons=new i.Cesium.ClippingPolygonCollection({enabled:this._enable,polygons:[],inverse:this._clipOutSide}),this._viewer.scene.globe.backFaceCulling=!0,this._viewer.scene.globe.showSkirts=!0,this._state=d.INITIALIZED,this._callback=null}get type(){return"TerrainUplift"}get layer(){return this._layer}set enable(e){this._enable=e,this._viewer.scene.globe.clippingPolygons.enabled=e}get enable(){return this._enable}set clipOutSide(e){this._clipOutSide=e,this._viewer.scene.globe.clippingPolygons.inverse=e}get clipOutSide(){return this._clipOutSide}set splitNum(e){this._splitNum=e}get splitNum(){return this._splitNum}set diffHeight(e){this._diffHeight=e}get diffHeight(){return this._diffHeight}addArea(e=[],t={},r){t!=null&&t.diffHeight&&(this._diffHeight=t.diffHeight);let s=e.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});this._id=v.uuid(),o.id=this._id,this._clippingPolygons.add(o),this._viewer.scene.globe.clippingPolygons=this._clippingPolygons,this._prepareWall(e,t),this._callback=r}_prepareWall(e,t={}){let r=e.concat([e[0]]);this._minHeight=null,this._currentHeight=[];let s=this._viewer.terrainProvider;if(s&&!(s instanceof i.Cesium.EllipsoidTerrainProvider)){let o=[];for(let l=0;l<r.length-1;l++){let h=this._lerp(r[l],r[l+1],this._splitNum);o=o.concat(h)}o.push(r[0]);let a=o.map(l=>i.Cesium.Cartographic.fromDegrees(l.lng,l.lat,l.alt));i.Cesium.sampleTerrainMostDetailed(s,a).then(l=>{let h=l.map(c=>{let p=i.Cesium.Math.toDegrees(c.longitude),f=i.Cesium.Math.toDegrees(c.latitude);return this._currentHeight.push(parseFloat(c.height)),(!this._minHeight||c.height<this._minHeight)&&(this._minHeight=c.height),{lng:p,lat:f,alt:c.height}});this._perCreateEntity(e,h,t)})}else r.forEach(o=>{this._currentHeight.push(parseFloat(o.alt)),(!this._minHeight||o.alt<this._minHeight)&&(this._minHeight=o.alt)}),this._perCreateEntity(r,r,t)}_perCreateEntity(e,t,r){let s=this._createWallSurface(t),o=this._createBottomSurface(e),a=this._adjustTerrainHeight(e),l={id:this._id,diffHeight:this._diffHeight,original:r,positions:e,entityIds:[s,o],show:!0};this._area.push(l),typeof this._callback=="function"&&this._callback(l)}_adjustTerrainHeight(e,t=1e3){console.log(111111111111);let r=new i.Cesium.EllipsoidSurfaceAppearance({}),s=[];e.forEach(l=>{s.push(parseFloat(l.lng)),s.push(parseFloat(l.lat)),s.push(this._minHeight+t)});let o=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(s));return this._layer.entities.add({polygon:{hierarchy:o,material:r.material,perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_createWallSurface(e){let t=[];return e.forEach(s=>{t.push(parseFloat(s.lng)),t.push(parseFloat(s.lat))}),this._layer.entities.add({wall:{positions:i.Cesium.Cartesian3.fromDegreesArray(t),material:new i.Cesium.ImageMaterialProperty({image:this._image,repeat:new i.Cesium.Cartesian2(8,1)}),minimumHeights:this._getHeights(e.length,this._minHeight-this._diffHeight),maximumHeights:this._currentHeight}}).id}_createBottomSurface(e){let t=[];e.forEach(o=>{t.push(parseFloat(o.lng)),t.push(parseFloat(o.lat)),t.push(this._minHeight-this._diffHeight)});let r=new i.Cesium.PolygonHierarchy(i.Cesium.Cartesian3.fromDegreesArrayHeights(t));return this._layer.entities.add({polygon:{hierarchy:r,material:new i.Cesium.ImageMaterialProperty({image:this._imageBottom,repeat:new i.Cesium.Cartesian2(1,2)}),perPositionHeight:!0,outline:!1,outlineColor:i.Cesium.Color.BLUE}}).id}_getHeights(e,t){let r=[];for(let s=0;s<e;s++)r.push(t);return r}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:p})}return s}getAreaById(e){let t=this._area.filter(r=>r.id===e);return t&&t.length>0?t[0]:null}removeArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];this._layer.entities.removeById(r.entityIds[0]),this._layer.entities.removeById(r.entityIds[1]);let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return this._area.splice(t,1),o&&this._clippingPolygons.remove(o),this}showArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(r.show)return;r.show=!0,this._layer.entities.getById(r.entityIds[0]).show=!0,this._layer.entities.getById(r.entityIds[1]).show=!0;let s=r.positions.map(a=>i.Cesium.Cartesian3.fromDegrees(a.lng,a.lat,a.alt)),o=new i.Cesium.ClippingPolygon({positions:s});return o.id=e,this._clippingPolygons.add(o),this}hideArea(e){let t=this._area.findIndex(a=>a.id===e);if(t==null)throw Error("missing index result");let r=this._area[t];if(!r.show)return;r.show=!1,this._layer.entities.getById(r.entityIds[0]).show=!1,this._layer.entities.getById(r.entityIds[1]).show=!1;let s=this._clippingPolygons._polygons.findIndex(a=>a.id===e),o=this._clippingPolygons.get(s);return o&&this._clippingPolygons.remove(o),this}flyToArea(e){let t=this._area.findIndex(o=>o.id===e);if(t==null)throw Error("missing index result");let r=this._area[t],s=this._layer.entities.getById(r.entityIds[0]);return this._viewer.flyTo(s),this}toJSON(){return this._area}clear(){this._layer.entities.removeAll(),this._clippingPolygons.removeAll()}},Hp=al;var nl=class{constructor(e){ni(this,"_analysisTerrainVisible",e=>{let t=this._viewer.terrainProvider,r=e.map(s=>i.Cesium.Cartographic.fromDegrees(s.lng,s.lat,s.alt));i.Cesium.sampleTerrainMostDetailed(t,r).then(s=>{let o=0,a=null;for(let l=0;l<s.length-1;l++){if(l<s.length-2){let h=e[l],c=e[l+1],p=i.Cesium.Cartesian3.fromDegrees(h.lng,h.lat,h.alt),f=i.Cesium.Cartesian3.fromDegrees(c.lng,c.lat,c.alt);if(a=this._analysisModelVisible([p,f]),i.Cesium.defined(a)&&i.Cesium.defined(a.object)){console.log("\u5728\u6A21\u578B\u4E0A.");let T=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),y=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(a.position,T,i.Cesium.Color.GREEN),this._drawLine(a.position,y,i.Cesium.Color.RED);break}}if(s[l].height>=e[l].alt){console.log("\u5728\u5730\u5F62\u4E0A."),o=l;let h=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),c=i.Cesium.Cartesian3.fromDegrees(e[l].lng,e[l].lat,e[l].alt),p=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(h,c,i.Cesium.Color.GREEN),this._drawLine(c,p,i.Cesium.Color.RED);break}}if(o===0&&a===null){console.log("\u5168\u90E8\u53EF\u89C6.");let l=i.Cesium.Cartesian3.fromDegrees(e[0].lng,e[0].lat,e[0].alt),h=i.Cesium.Cartesian3.fromDegrees(e[e.length-1].lng,e[e.length-1].lat,e[e.length-1].alt);this._drawLine(l,h,i.Cesium.Color.GREEN)}})});ni(this,"_analysisModelVisible",e=>{let t=i.Cesium.Cartesian3.normalize(i.Cesium.Cartesian3.subtract(e[1],e[0],new i.Cesium.Cartesian3),new i.Cesium.Cartesian3),r=new i.Cesium.Ray(e[0],t);return this._viewer.scene.pickFromRay(r)});this._id=v.uuid(),this._viewer=e,this._layer=new i.Cesium.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)}get type(){return"sightLine"}get layer(){return this._layer}_init(e,t,r=10){this._layer&&this._layer.entities.removeAll();let s=i.Cesium.Cartesian3.fromDegrees(e.lng,e.lat,e.alt),o=i.Cesium.Cartesian3.fromDegrees(t.lng,t.lat,t.alt),a=this._viewer.terrainProvider;if(a&&!(a instanceof i.Cesium.EllipsoidTerrainProvider)){let l=this._lerp(e,t,r).concat([t]);this._analysisTerrainVisible(l)}else this._analysisVisible([s,o])}_analysisVisible(e){let t=this._analysisModelVisible(e);if(i.Cesium.defined(t)&&i.Cesium.defined(t.object)){let r=this._drawLine(t.position,e[0],i.Cesium.Color.GREEN),s=this._drawLine(t.position,e[1],i.Cesium.Color.RED);console.log("\u5728\u6A21\u578B\u4E0A.",r,s)}else{let r=this._drawLine(e[0],e[1],i.Cesium.Color.GREEN);console.log("\u4E0D\u5728\u6A21\u578B\u4E0A",r)}}_drawLine(e,t,r){return this._layer||(this._layer=new i.Cesium.CustomDataSource("sightLine"),this._viewer.dataSources.add(this._layer)),this._layer&&this._layer.entities.add({polyline:{positions:[e,t],width:2,material:r,depthFailMaterial:r}}),this}_lerp(e,t,r=10){let s=[],o=i.Cesium.Cartographic.fromDegrees(e.lng,e.lat,e.alt),a=i.Cesium.Cartographic.fromDegrees(t.lng,t.lat,t.alt);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push({lng:i.Cesium.Math.toDegrees(h),lat:i.Cesium.Math.toDegrees(c),alt:p})}return s}deactivate(){this._layer&&this._layer.entities.removeAll(),this._layer&&this._viewer.dataSources.remove(this._layer),this._layer=null}},Np=nl;var ll=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._contourLine=new Op(e),this._tilesetShake=new kp(e),this._sightLine=new Np(e)}get ContourLine(){return this._contourLine}get TilesetShake(){return this._tilesetShake}get SightLine(){return this._sightLine}contourLine(e,t,r){this._contourLine._init(e,t,r)}tilesetShake(e,t){this._tilesetShake._init(e,t)}terrainClip(e={}){return new Fp(this._viewer,e)}terrainClipPlan(e={}){return new zp(this._viewer,e)}terrainUplift(e={}){return new Hp(this._viewer,e)}sightLine(e,t,r){return this._sightLine._init(e,t,r)}deactivate(e=null){switch(e){case lt.SIGHT_LINE:this._sightLine.deactivate();break;default:this._contourLine.deactivate(),this._tilesetShake.deactivate();break}return this}},hl=ll;var cl=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)}_onDrawStop(){this._unbindEvent(),this._viewer.drawTool.deactivate(),this._options.onDrawStop&&this._options.onDrawStop(this._delegate)}_bindEvent(){this.drawTool.on(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.on(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.on(C.DRAW_STOP,this._onDrawStop,this)}_unbindEvent(){this.drawTool.off(C.DRAW_ANCHOR,this._onDrawAnchor,this),this.drawTool.off(C.ANCHOR_MOVING,this._onAnchorMoving,this),this.drawTool.off(C.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._mountedHook(),this._unbindEvent(),this._bindEvent(),this}},Wp=cl;var pl=class extends Wp{constructor(e){super(e)}_mountedHook(){this.drawTool.tooltipMess="\u5DE6\u51FB\u9009\u62E9\u70B9\u4F4D,\u53F3\u51FB\u7ED3\u675F",this._delegate=new i.Cesium.Entity({polyline:{...this._style,positions:new i.Cesium.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(C.CREATE_ANCHOR,{position:e}),t>=this._options.maxAnchorSize&&(this._positions.pop(),this.drawTool.fire(C.DRAW_STOP,e))}},Gp=pl;var dl=class{constructor(){this._viewer=void 0,this._layer=void 0,this._startLabel=new i.Cesium.Entity({label:{text:"\u5F00\u59CB",font:"12px",pixelOffset:{x:0,y:-15},disableDepthTestDistance:Number.POSITIVE_INFINITY,showBackground:!0}}),this._resultLabel=new i.Cesium.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.Cesium.EllipsoidTerrainProvider)?i.Cesium.sampleTerrainMostDetailed(this._viewer.terrainProvider,e.map(o=>i.Cesium.Cartographic.fromCartesian(o))):Promise.resolve(e.map(o=>i.Cesium.Cartographic.fromCartesian(o))),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){}_onComputedStop(e,t=!1){let r=[];return t?r=e.map((s,o)=>{let l=this._viewer.scene.globe.ellipsoid.cartesianToCartographic(s),h=0;for(let c=1;c<=o;c++){let p=i.Cesium.Cartesian3.distance(e[c-1],e[c]);h+=p}return{longitude:i.Cesium.Math.toDegrees(l.longitude),latitude:i.Cesium.Math.toDegrees(l.latitude),height:l.height,distance:h,cartesian3Position:s}}):r=e.map((s,o)=>{let a=0;for(let l=1;l<=o;l++){let h=i.Cesium.Cartesian3.fromRadians(e[l-1].longitude,e[l-1].latitude,e[l-1].height),c=i.Cesium.Cartesian3.fromRadians(e[l].longitude,e[l].latitude,e[l].height),p=i.Cesium.Cartesian3.distance(h,c);a+=p}return{longitude:i.Cesium.Math.toDegrees(s.longitude),latitude:i.Cesium.Math.toDegrees(s.latitude),height:s.height,distance:a,cartesian3Position:i.Cesium.Cartesian3.fromRadians(s.longitude,s.latitude,s.height)}}),r}_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}},Up=dl;var ml=class extends Up{constructor(){super(),this._maxAnchorSize=9999,this._positions=[],this._includeModel=!0,this._callback=null}_lerp(e,t,r=5){let s=[],o=i.Cesium.Cartographic.fromCartesian(e),a=i.Cesium.Cartographic.fromCartesian(t);for(let l=0;l<r;l++){let h=i.Cesium.Math.lerp(o.longitude,a.longitude,l/r),c=i.Cesium.Math.lerp(o.latitude,a.latitude,l/r),p=o.height-(o.height-a.height)*(l/r);s.push(i.Cesium.Cartesian3.fromRadians(h,c,p))}return s}async _onDrawStop(e){let t=this._positions.filter((s,o)=>o!==1),r=await this._onComputedStop(t,this._includeModel);typeof this._callback=="function"&&await this._callback(r)}_stoppedHook(){this._options.onDrawStop&&this._options.onDrawStop(entity)}_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,this._includeModel).then(([r,s])=>(this._includeModel||(this._positions=r),r.map((o,a)=>i.Cesium.Cartesian3.fromDegrees(i.Cesium.Math.toDegrees(o.longitude),i.Cesium.Math.toDegrees(o.latitude),Math.max(o.height||0,s[a]?i.Cesium.Cartographic.fromCartesian(s[a]).height:0))))).then(r=>{this._includeModel&&(this._positions=r);let s=0;for(let o=0;o<r.length-1;o++){let a=i.Cesium.Cartesian3.distance(r[o],r[o+1]);s+=a}this._resultLabel.label.text=s>1e3?`\u8DDD\u79BB\uFF1A${(s/1e3).toFixed(2)} \u516C\u91CC`:`\u8DDD\u79BB\uFF1A${s.toFixed(2)} \u7C73`})}}start(e,t,r={}){return this._startHook(e,r),new Gp({material:r.material||i.Cesium.Color.YELLOW.withAlpha(.6),depthFailMaterial:r.depthFailMaterial||new i.Cesium.PolylineDashMaterialProperty({color:i.Cesium.Color.YELLOW.withAlpha(.6)}),width:r.width||2,clampToGround:!0}).start(e,{...this._options,maxAnchorSize:this._maxAnchorSize}),this._includeModel=r==null?void 0:r.includeModel,this._callback=t,this}},Bp=ml;var ul=class{constructor(e){if(!e)throw Error("missing viewer param");this._viewer=e,this._layer=new i.Cesium.CustomDataSource("plotAnalysis-layer"),this._viewer.dataSources.add(this._layer)}get viewer(){return this._viewer}get layer(){return this._layer}profile(e,t={}){var r;return(r=new Bp)==null||r.start(this,e,t),this}activate(e,t){switch(e){case ht.PROFILE:this.profile(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}},_l=ul;var fl=class{static init(){let e=me("turf");if(!e)throw new Error("miss the turf lib");return e}static pointBuffer(e,t=50,r=8){let s=this.init(),o=_.parsePosition(e),a=s.point([o.lng,o.lat,o.alt]),l=s.buffer(a,t,{units:"meters",steps:r}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static polylineBuffer(e,t=50,r=8){let s=this.init(),a=_.parsePositions(e).map(p=>[p.lng,p.lat,p.alt]),l=s.lineString(a),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonBuffer(e,t=50,r=8){let s=this.init(),o=_.parsePositions(e),a=o.concat(o[0]).map(p=>[p.lng,p.lat,p.alt]),l=s.polygon([a]),h=s.buffer(l,t,{units:"meters",steps:r}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static transformPolylineScale(e,t=1){let r=this.init(),o=_.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),a=r.lineString(o),l=r.transformScale(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonScale(e,t){let r=this.init(),s=_.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),a=r.polygon([o]),l=r.transformScale(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static transformPolylineRotate(e,t=0){let r=this.init(),o=_.parsePositions(e).map(c=>[c.lng,c.lat,c.alt]),a=r.lineString(o),l=r.transformRotate(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h}static transformPolygonRotate(e,t=0){let r=this.init(),s=_.parsePositions(e),o=s.concat(s[0]).map(c=>[c.lng,c.lat,c.alt]),a=r.polygon([o]),l=r.transformRotate(a,t,{units:"meters"}),{coordinates:h}=l.geometry;return h&&h.length>0?h[0]:[]}static sector(e,t,r,s){let o=this.init(),a=_.parsePosition(e),l=o.point([a.lng,a.lat,a.alt]),h=o.sector(l,t,r,s,{units:"meters"}),{coordinates:c}=h.geometry;return c&&c.length>0?c[0]:[]}static polygonEquivalent(e,t,r,s=null){let o=this.init(),a=[];for(let p=0,f=e.length;p<f;p++){let T=e[p];a.push({type:"Feature",properties:T,geometry:{type:"Point",coordinates:[T.x,T.y]}})}let l={type:"FeatureCollection",features:a};s&&s!==null&&(l=o.interpolate(l,s.cellSize||10,{gridType:"point",property:r,units:(s==null?void 0:s.units)||"kilometers",weight:(s==null?void 0:s.weight)||1}),l.features.map(p=>p.properties[r]=Number(p.properties[r].toFixed(2))));let h=o.isobands(l,t,{zProperty:r}),c=o.isolines(l,t,{zProperty:r});return{geojsonPoly:h,geojsonLine:c}}},gl=fl;var Nu=i.Cesium.Cartesian2,Wu=i.Cesium.Cartesian3,Gu=i.Cesium.Matrix3,Uu=i.Cesium.Matrix4,Bu=i.Cesium.Material,Vu=i.Cesium.SceneMode,ju=i.Cesium.SkyBox,Yu=i.Cesium.Color,Zu=i.Cesium.Rectangle,qu=i.Cesium.ShadowMode,Xu=i.Cesium.JulianDate,Ju=i.Cesium.HeightReference,Ku=i.Cesium.HorizontalOrigin,Qu=i.Cesium.VerticalOrigin,$u=i.Cesium.CallbackProperty,e_=i.Cesium.ClassificationType,t_=i.Cesium.Cesium3DTileStyle,i_=i.Cesium.GeographicTilingScheme,r_=i.Cesium.WebMercatorTilingScheme,s_=i.Cesium.ColorMaterialProperty,o_=i.Cesium.ImageMaterialProperty,a_=i.Cesium.PolylineDashMaterialProperty,n_=i.Cesium.PolylineGlowMaterialProperty,l_=i.Cesium.PolylineOutlineMaterialProperty,h_=i.Cesium.PolylineArrowMaterialProperty,c_=i.Cesium.writeTextToCanvas,p_=i.Cesium.CustomShaderMode,d_=i.Cesium.CustomShaderTranslucencyMode,m_=i.Cesium.CustomShader,u_=i.Cesium.UniformType,__=i.Cesium.Ellipsoid,f_=i.Cesium.Resource,g_=i.Cesium.createGooglePhotorealistic3DTileset,y_=i.Cesium.createElevationBandMaterial,v_=i.Cesium.ModelAnimationLoop,w_=i.Cesium.ClippingPlane,T_=i.Cesium.ClippingPlaneCollection,C_=i.Cesium.ClippingPolygon,x_=i.Cesium.ClippingPolygonCollection;var E_="./libs/gm-sdk/resources/",Vp=E_,jp=!1,P_={set baseUrl(n){Vp=n},get baseUrl(){return Vp}};function b_(n={}){return jp?Promise.resolve():(Yp&&Yp(),new Promise((e,t)=>{n.baseUrl&&(this.config.baseUrl=n.baseUrl),n.echarts&&(Gl(n.echarts),de("echarts",n.echarts)),n.turf&&de("turf",n.turf),n.shpUtil&&de("shpUtil",n.shpUtil),jp=!0,mt("isInitialized",!0),mt("baseUrl",this.config.baseUrl),e()}).catch(e=>{throw new Error(e.message)}))}function Yp(){console.clear(),console.log(`%c
17517
17517
  GM-SDK %c %c
17518
17518
 
17519
- \u7248\u672C: 1.12.3 - 2025-02-08
17520
- \u7F51\u7AD9\u4E3B\u9875: http://127.0.0.1:8081/greatmap/gm-docs/zh/index.html`,"font-size:20px;padding-left:70px;color:#EEB422","font-size:14px;padding-left:50px;color:#EEB422;font-style:oblique","font-size:12px;color:#0865ba")}var S_="1.12.3";return ip(I_);})();
17519
+ \u7248\u672C: 1.12.4 - 2025-03-14
17520
+ \u7F51\u7AD9\u4E3B\u9875: http://127.0.0.1:8081/greatmap/gm-docs/zh/index.html`,"font-size:20px;padding-left:70px;color:#EEB422","font-size:14px;padding-left:50px;color:#EEB422;font-style:oblique","font-size:12px;color:#0865ba")}var S_="1.12.4";return id(I_);})();