earthsdk3-cesium 3.4.1 → 3.4.2

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.
@@ -3101,7 +3101,7 @@ export type IndexJsonType = {
3101
3101
  \`\`\`
3102
3102
  ${eC}
3103
3103
  \`\`\`
3104
- `,_t=class _t extends d.Destroyable{constructor(e,i){super();L(this,"_flyToEvent",this.disposeVar(new d.Event));L(this,"_loadFuncReact",this.disposeVar(d.react(void 0)));L(this,"_dataSource",this.disposeVar(d.react(void 0)));L(this,"_data");L(this,"_defaultHeight",{});L(this,"_defaultBoundingSphere",new C.BoundingSphere);const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}let r=()=>{this.dataSource&&o.dataSources.remove(this.dataSource,!0),this.dataSource=void 0,this._data=void 0};this.dispose(()=>{r()});{const s=this.dv(d.createProcessingFromAsyncFunc(async u=>{this.dataSource&&r(),this.url&&(typeof this.url=="object"?this._data=this.url:V.isJSON(this.url)?this._data=JSON.parse(this.url):await fetch(V.ESSceneObject.context.getStrFromEnv(this.url)).then(h=>h.json()).then(h=>{this._data=h}).catch(h=>{console.warn("ESGeoJson数据加载失败",h)}),this.dataSource=await C.GeoJsonDataSource.load(this._data),o.dataSources.add(this.dataSource).then(h=>{var A,p;const c=[];for(const f of h.entities.values)if(C.Entity.prototype&&(f.ESSceneObjectID=i),this._isEntityShow(f,e),f.polygon&&c.push(...(A=f.polygon.hierarchy)==null?void 0:A.getValue(C.JulianDate.now()).positions),f.polyline&&c.push(...(p=f.polyline.positions)==null?void 0:p.getValue(C.JulianDate.now())),f.position){const g=f.position.getValue(C.JulianDate.now());g&&c.push(g)}this._defaultBoundingSphere=C.BoundingSphere.fromPoints(c)}))})),a=()=>{s.isRunning&&s.cancel(),s.restart()};a();const l=this.dv(d.createNextAnimateFrameEvent(this.loadFunChanged,this.urlChanged));this.dispose(l.don(a))}{const s=()=>{var l,u;if(this.dataSource)if(this.dataSource.show=this.show,this.loadFun)try{this.loadFun(this.dataSource)}catch(h){console.error(h)}else{const h=this.dataSource.entities.values;for(let c=0;c<h.length;c++){const A=h[c];if(A.polygon){this._defaultHeight[A.id]||(this._defaultHeight[A.id]=(l=A.polygon.height)==null?void 0:l.getValue(C.JulianDate.now())),A.polygon.height=this.fillGround?void 0:new C.ConstantProperty(this._defaultHeight[A.id]),A.polygon.perPositionHeight=new C.ConstantProperty(!this.fillGround),A.polygon.heightReference=new C.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?C.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?C.HeightReference.CLAMP_TO_GROUND:C.HeightReference.RELATIVE_TO_GROUND),A.polygon.show=new C.ConstantProperty(this.filled??_t.defaults.filled),A.polygon.material=new C.ColorMaterialProperty(new C.Color(...this.fillColor??_t.defaults.fillColor)),A.polygon.outline=new C.ConstantProperty(!1),A.polyline=new C.PolylineGraphics;const p=JSON.parse(JSON.stringify((u=A.polygon.hierarchy)==null?void 0:u.getValue(C.JulianDate.now()).positions));C.Cartesian3.equals(p[0],p[p.length-1])||p.push(p[0]),A.polyline.positions=p}if(A.polyline&&(A.polyline.show=new C.ConstantProperty(this.stroked??_t.defaults.stroked),A.polyline.width=new C.ConstantProperty(this.strokeWidth??_t.defaults.strokeWidth),A.polyline.material=new C.ColorMaterialProperty(new C.Color(...this.strokeColor??_t.defaults.strokeColor)),A.polyline.clampToGround=new C.ConstantProperty(this.strokeGround)),A.billboard){A.billboard.show=new C.ConstantProperty(this.imageShow??_t.defaults.imageShow),A.billboard.width=new C.ConstantProperty(this.imageSize?this.imageSize[0]:_t.defaults.imageSize[0]),A.billboard.height=new C.ConstantProperty(this.imageSize?this.imageSize[1]:_t.defaults.imageSize[1]);const p=this.imageUrl?typeof this.imageUrl=="string"?this.imageUrl:this.imageUrl.url:_t.defaults.imageUrl;A.billboard.image=new C.ConstantProperty(V.ESSceneObject.context.getStrFromEnv(p)),A.billboard.horizontalOrigin=new C.ConstantProperty(C.HorizontalOrigin.LEFT),A.billboard.verticalOrigin=new C.ConstantProperty(C.VerticalOrigin.TOP),A.billboard.heightReference=new C.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?C.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?C.HeightReference.CLAMP_TO_GROUND:C.HeightReference.RELATIVE_TO_GROUND);const f=this.imageAnchor??_t.defaults.imageAnchor,g=this.imageOffset??_t.defaults.imageOffset;if(A.billboard.pixelOffset=new C.ConstantProperty(C.Cartesian2.fromArray([-f[0]*A.billboard.width.getValue(C.JulianDate.now())+g[0],-f[1]*A.billboard.height.getValue(C.JulianDate.now())+g[1]])),A.label=new C.LabelGraphics,!A.label)return;A.label.show=new C.ConstantProperty(this.textShow??_t.defaults.textShow),A.label.heightReference=new C.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?C.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?C.HeightReference.CLAMP_TO_GROUND:C.HeightReference.RELATIVE_TO_GROUND),A.label.text=new C.ConstantProperty(this.textProperty&&this.textProperty!==""&&A.properties&&A.properties[this.textProperty]?A.properties[this.textProperty].getValue():this.textDefaultText??_t.defaults.textDefaultText),A.label.fillColor=new C.ConstantProperty(new C.Color(...this.textColor??_t.defaults.textColor)),A.label.showBackground=new C.ConstantProperty(this.textBackgroundColor!=null);const v=this.textFontSize&&this.textFontSize!=0?this.textFontSize:_t.defaults.textFontSize,y=this.textOffset??_t.defaults.textOffset;A.label.backgroundColor=new C.ConstantProperty(new C.Color(...this.textBackgroundColor??_t.defaults.textBackgroundColor)),A.label.font=new C.ConstantProperty(`${this.textFontStyle} ${this.textFontWeight} ${v}px ${this.textFontFamily??_t.defaults.textFontFamily}`),A.label.horizontalOrigin=new C.ConstantProperty(C.HorizontalOrigin.LEFT),A.label.verticalOrigin=new C.ConstantProperty(C.VerticalOrigin.TOP),A.label.eyeOffset=new C.ConstantProperty(C.Cartesian3.fromArray([0,0,-1]));const m=this.textAnchor??_t.defaults.textAnchor;A.label.pixelOffset=new C.ConstantProperty(C.Cartesian2.fromArray([-m[0]*((this.textBackgroundColor?-14:0)+this._getTextPixelWidth(A.label.text.getValue(C.JulianDate.now()),A.label.font.getValue(C.JulianDate.now())))+y[0],-m[1]*((this.textBackgroundColor?10:0)+v)+y[1]]))}}}};s();const a=this.dv(d.createNextAnimateFrameEvent(this._dataSource.changed,this.showChanged,this.strokedChanged,this.strokeWidthChanged,this.strokeWidthTypeChanged,this.strokeColorChanged,this.strokeMaterialChanged,this.strokeMaterialParamsChanged,this.strokeGroundChanged,this.filledChanged,this.fillColorChanged,this.fillMaterialChanged,this.fillMaterialParamsChanged,this.fillGroundChanged,this.imageShowChanged,this.imageUrlChanged,this.imageSizeChanged,this.imageAnchorChanged,this.imageOffsetChanged,this.textShowChanged,this.textPropertyChanged,this.textDefaultTextChanged,this.textColorChanged,this.textBackgroundColorChanged,this.textFontFamilyChanged,this.textFontSizeChanged,this.textFontStyleChanged,this.textFontWeightChanged,this.textAnchorChanged,this.textOffsetChanged,this.heightReferenceChanged));this.dispose(a.don(s))}{const s=()=>{if(!this.dataSource)return;const l=this.dataSource.entities.values;for(let u=0;u<l.length;u++){const h=l[u];this._isEntityShow(h,e)}};s();const a=this.ad(d.createNextAnimateFrameEvent(this.minFeatureVisibleDistanceChanged,this.maxFeatureVisibleDistanceChanged,e.cameraChanged,this.showChanged));this.ad(a.don(s))}{const s=()=>{if(this.loadFuncStr)try{const a=Function(`"use strict";return (${this.loadFuncStr})`)();this.loadFun=a}catch(a){console.error(a),this.loadFun=void 0}else this.loadFun=void 0};s(),this.dispose(this.loadFuncStrChanged.disposableOn(s))}this.dispose(this.flyToEvent.disposableOn(s=>{e.actived&&this.dataSource&&(s!==void 0?o.flyTo(this.dataSource,{duration:s/1e3}).then(a=>{a||o.camera.flyToBoundingSphere(this._defaultBoundingSphere,{duration:s/1e3})}):o.flyTo(this.dataSource).then(a=>{a||o.camera.flyToBoundingSphere(this._defaultBoundingSphere)}))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get loadFun(){return this._loadFuncReact.value}set loadFun(e){this._loadFuncReact.value=e}get loadFunChanged(){return this._loadFuncReact.changed}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}_getTextPixelWidth(e,i="16px sans-serif"){const r=document.createElement("canvas").getContext("2d");return r.font=i,r.measureText(e).width}_isEntityShow(e,i){var o;if(this.minFeatureVisibleDistance==0&&this.maxFeatureVisibleDistance==0){e.show=this.show;return}if((o=i.viewer)!=null&&o.camera&&this.show){let r;if(e.polygon&&e.polygon.hierarchy)r=V.getMinMaxCorner(e.polygon.hierarchy.getValue(C.JulianDate.now()).positions.map(l=>Ue(l))).center;else if(e.polyline&&e.polyline.positions)r=V.getMinMaxCorner(e.polyline.positions.getValue(C.JulianDate.now()).map(l=>Ue(l))).center;else if(e.position){const l=e.position.getValue(C.JulianDate.now());l&&(r=Ue(l))}if(!r||isNaN(r[0]))return;const s=V.getDistancesFromPositions([r,Sn(i.viewer.camera)],"NONE")[0];let a=!1;this.minFeatureVisibleDistance<this.maxFeatureVisibleDistance?a=this.minFeatureVisibleDistance<s&&s<this.maxFeatureVisibleDistance:this.maxFeatureVisibleDistance==0?a=s>this.minFeatureVisibleDistance:this.minFeatureVisibleDistance==0&&(a=s<this.maxFeatureVisibleDistance),e.show=this.show&&a}}};L(_t,"defaults",{show:!0,allowPicking:!0,url:tC,defaultLoadFuncStr:eC,defaultLoadFuncDocStr:L5,data:U5,dataMd:O5,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/misc/location.png",imageSize:[64,64],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:[.79,.91,.06,1],textFontFamily:"Arial",textFontSize:16,textFontWeight:"normal",textFontStyle:"normal",textAnchor:[.5,1],textOffset:[0,0],strokeWidthTypes:[["screen","screen"],["world","world"]],minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let zo=_t;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:void 0,loadFuncStr:void 0,url:void 0,stroked:void 0,strokeWidth:void 0,strokeWidthType:"world",strokeColor:d.reactArrayWithUndefined(void 0),strokeMaterial:void 0,strokeMaterialParams:d.reactJsonWithUndefined(void 0),strokeGround:void 0,filled:void 0,fillColor:d.reactArrayWithUndefined(void 0),fillMaterial:void 0,fillMaterialParams:d.reactJsonWithUndefined(void 0),fillGround:void 0,imageShow:void 0,imageUrl:void 0,imageSize:d.reactArrayWithUndefined(void 0),imageAnchor:d.reactArrayWithUndefined(void 0),imageOffset:d.reactArrayWithUndefined(void 0),textShow:void 0,textProperty:void 0,textDefaultText:void 0,textColor:d.reactArrayWithUndefined(void 0),textBackgroundColor:d.reactArrayWithUndefined(void 0),textFontFamily:void 0,textFontSize:void 0,textFontStyle:void 0,textFontWeight:void 0,textAnchor:d.reactArrayWithUndefined(void 0),textOffset:d.reactArrayWithUndefined(void 0),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})})(zo||(zo={})),d.extendClassProps(zo.prototype,zo.createDefaultProps);const Pu=class Pu extends Un{constructor(n,e){if(super(n,e),!e.viewer){console.warn("viewer is undefined!");return}const o=this.disposeVar(new zo(e,n.id));this.dispose(d.track([o,"show"],[n,"show"])),this.dispose(d.track([o,"allowPicking"],[n,"allowPicking"])),this.dispose(d.track([o,"loadFuncStr"],[n,"loadFuncStr"])),this.dispose(d.track([o,"url"],[n,"features"])),this.dispose(d.track([o,"stroked"],[n,"stroked"])),this.dispose(d.track([o,"strokeWidth"],[n,"strokeWidth"])),this.dispose(d.track([o,"strokeWidthType"],[n,"strokeWidthType"])),this.dispose(d.track([o,"strokeColor"],[n,"strokeColor"])),this.dispose(d.track([o,"strokeMaterial"],[n,"strokeMaterial"])),this.dispose(d.track([o,"strokeMaterialParams"],[n,"strokeMaterialParams"])),this.dispose(d.track([o,"strokeGround"],[n,"strokeGround"])),this.dispose(d.track([o,"filled"],[n,"filled"])),this.dispose(d.track([o,"fillColor"],[n,"fillColor"])),this.dispose(d.track([o,"fillMaterial"],[n,"fillMaterial"])),this.dispose(d.track([o,"fillMaterialParams"],[n,"fillMaterialParams"])),this.dispose(d.track([o,"fillGround"],[n,"fillGround"])),this.dispose(d.track([o,"imageShow"],[n,"imageShow"])),this.dispose(d.track([o,"imageUrl"],[n,"imageUrl"])),this.dispose(d.track([o,"imageSize"],[n,"imageSize"])),this.dispose(d.track([o,"imageAnchor"],[n,"imageAnchor"])),this.dispose(d.track([o,"imageOffset"],[n,"imageOffset"])),this.dispose(d.track([o,"textShow"],[n,"textShow"])),this.dispose(d.track([o,"textProperty"],[n,"textProperty"])),this.dispose(d.track([o,"textDefaultText"],[n,"textDefaultText"])),this.dispose(d.track([o,"textColor"],[n,"textColor"])),this.dispose(d.track([o,"textBackgroundColor"],[n,"textBackgroundColor"])),this.dispose(d.track([o,"textFontFamily"],[n,"textFontFamily"])),this.dispose(d.track([o,"textFontSize"],[n,"textFontSize"])),this.dispose(d.track([o,"textFontStyle"],[n,"textFontStyle"])),this.dispose(d.track([o,"textFontWeight"],[n,"textFontWeight"])),this.dispose(d.track([o,"textAnchor"],[n,"textAnchor"])),this.dispose(d.track([o,"textOffset"],[n,"textOffset"])),this.dispose(d.track([o,"minFeatureVisibleDistance"],[n,"minFeatureVisibleDistance"])),this.dispose(d.track([o,"maxFeatureVisibleDistance"],[n,"maxFeatureVisibleDistance"])),this.dispose(d.track([o,"heightReference"],[n,"heightReference"])),this.dispose(n.flyToEvent.disposableOn(r=>{if(e.actived){if(n.flyInParam){const{position:s,rotation:a,flyDuration:l}=n.flyInParam;return Be(e.viewer,s,void 0,a,l),!0}o.flyTo(r&&r*1e3)}}));{const r=async(s,a,l)=>{if(!e.actived)return;const u=JSON.parse(JSON.stringify(this._getFeatureByIndexOrProperties(s,a)));if(!(!u||!(u!=null&&u.positions)))if(u.type=="Point"||u.type=="MultiPoint")Ln(e,n,this.id,await this._calculateFeatureHeight(u.type=="MultiPoint"?u.positions.flat():u.positions,n.heightReference,e),1e3,l);else{const h=u.type=="Polygon"||u.type=="MultiPolygon"||u.type=="MultiLineString";let c=[];h?c=u.positions.flat(u.type=="MultiPolygon"?2:1).map(g=>this._calculateFeatureHeight(g,n.fillGround?"CLAMP_TO_GROUND":"NONE",e)):c=u.positions.map(g=>this._calculateFeatureHeight(g,n.strokeGround?"CLAMP_TO_GROUND":"NONE",e));const{minPos:A,maxPos:p,center:f}=V.getMinMaxCorner(c);Ln(e,n,this.id,f,V.getDistancesFromPositions([A,p],"NONE")[0],l)}};this.d(n.flyToFeatureEvent.don((s,a,l)=>r(s,a,l))),this.d(n.flyToFeatureIndexEvent.don((s,a)=>r(s,void 0,a)))}}_getFeatureByIndexOrProperties(n,e){var s,a,l,u,h,c,A,p;const{sceneObject:i}=this,o=i.features;if(!o)return;const r=Reflect.get(o,"features")||Reflect.get(o,"geometries");if(r){if(e){let f=r.find(g=>(g==null?void 0:g.properties[n])==e);return{type:f!=null&&f.coordinates?f.type:(s=f==null?void 0:f.geometry)==null?void 0:s.type,positions:(f==null?void 0:f.coordinates)||((a=f==null?void 0:f.geometry)==null?void 0:a.coordinates)}}else if(typeof n=="number")return{type:(l=r[n])!=null&&l.coordinates?r[n].type:(h=(u=r[n])==null?void 0:u.geometry)==null?void 0:h.type,positions:((c=r[n])==null?void 0:c.coordinates)||((p=(A=r[n])==null?void 0:A.geometry)==null?void 0:p.coordinates)}}}async _calculateFeatureHeight(n,e,i){const o=[...n];return e=="NONE"?o[2]=o[2]??0:e=="CLAMP_TO_GROUND"||!o[2]?o[2]=await i.getTerrainHeight(o)??0:o[2]+=await i.getTerrainHeight(o)??0,o}};L(Pu,"type",Pu.register("ESCesiumViewer",V.ESGeoJson.type,Pu));let Um=Pu;const Tu=class Tu extends en{constructor(e,i){super(e,i);L(this,"_czmGeoESRectangle");L(this,"_geoPolyline");if(this._geoPolyline=this.disposeVar(new Ye(i,e.id)),this._czmGeoESRectangle=this.disposeVar(new gi(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._czmGeoESRectangle,s=this._geoPolyline;s.arcType="RHUMB",this.dispose(d.track([s,"color"],[e,"strokeColor"])),this.dispose(d.track([s,"width"],[e,"strokeWidth"])),this.dispose(d.track([s,"ground"],[e,"strokeGround"])),this.dispose(d.track([r,"ground"],[e,"fillGround"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"]));{const a=()=>{s.show=e.show&&e.stroked,r.show=e.show&&e.filled};a();const l=this.disposeVar(d.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged,e.filledChanged));this.dispose(l.disposableOn(a))}{const a=()=>{e.filled?r.material={type:"Color",color:e.fillColor}:r.material=void 0};a();const l=this.disposeVar(d.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(l.disposableOn(a))}{const a=()=>{const l=e.points;if(l&&l.length>=2){const{minPos:u,maxPos:h}=V.getMinMaxCorner(l);r.rectangle=[u[0],u[1],h[0],h[1]],r.height=l[0][2],r.extrudedHeight=l[0][2];const c=l.map(g=>(l&&(g[2]=l[0][2]),g)),A=c[0],p=c[1],f=[A,[A[0],p[1],A[2]],p,[p[0],A[1],p[2]]];s.positions=[...f,A]}else r.rectangle=void 0,s.positions=void 0,r.height=0,r.extrudedHeight=0};a(),this.dispose(e.pointsChanged.disposableOn(()=>a()))}}get czmGeoESRectangle(){return this._czmGeoESRectangle}flyTo(e,i){const{sceneObject:o,czmViewer:r}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):o.points?(Me(r,o,i,o.points,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmGeoESRectangle:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):o.points?(Me(r,o,i,o.points,e),!0):!1:!1}};L(Tu,"type",Tu.register("ESCesiumViewer",V.ESGeoRectangle.type,Tu));let Om=Tu;class Ml extends d.Destroyable{constructor(e,i){super();L(this,"_flyToEvent",this.disposeVar(new d.Event));L(this,"_geoPolygon");this._geoPolygon=this.disposeVar(new Fr(e,i));const{geoPolygon:o}=this;this.dispose(d.bind([o,"allowPicking"],[this,"allowPicking"])),this.dispose(this.flyToEvent.disposableOn(s=>{o.flyTo(s)})),this.dispose(d.bind([o,"show"],[this,"show"])),this.dispose(d.bind([o,"fill"],[this,"filled"])),this.dispose(d.bind([o,"strokeGround"],[this,"strokeGround"])),this.dispose(d.bind([o,"ground"],[this,"ground"])),this.dispose(d.bind([o,"outline"],[this,"outline"])),this.dispose(d.bind([o,"outlineColor"],[this,"outlineColor"])),this.dispose(d.bind([o,"outlineWidth"],[this,"outlineWidth"])),this.dispose(d.bind([o,"color"],[this,"color"])),this.dispose(d.bind([o,"depth"],[this,"depth"]));const r=()=>{if(this.positions&&this.positions.length>=2){const s=od([...this.positions,this.positions[0]]);o.positions=s}else o.positions=void 0};r(),this.dispose(this.positionsChanged.disposableOn(r))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygon(){return this._geoPolygon}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,strokeGround:!1,ground:!1,outline:!1,filled:!0,outlineColor:d.reactArray([1,1,1,1]),outlineWidth:1,color:d.reactArrayWithUndefined([1,1,1,.5]),positions:d.reactPositions(void 0),depth:0})})(Ml||(Ml={})),d.extendClassProps(Ml.prototype,Ml.createDefaultProps);const Iu=class Iu extends en{constructor(e,i){super(e,i);L(this,"_geoSmoothPolygon");if(this._geoSmoothPolygon=this.disposeVar(new Ml(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._geoSmoothPolygon;this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.bind([r,"positions"],[e,"points"])),this.dispose(d.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(d.track([r,"outline"],[e,"stroked"])),this.dispose(d.track([r,"outlineColor"],[e,"strokeColor"])),this.dispose(d.track([r,"outlineWidth"],[e,"strokeWidth"])),this.dispose(d.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(d.track([r,"filled"],[e,"filled"])),this.dispose(d.track([r,"color"],[e,"fillColor"])),this.dispose(d.track([r,"ground"],[e,"ground"]));{const s=()=>{r.ground=e.ground||e.fillGround};s();const a=this.dv(d.createNextAnimateFrameEvent(e.groundChanged,e.fillGroundChanged));this.d(a.don(s))}{const s=()=>{r.color=e.filled?e.fillColor:Bl.defaults.fillStyle.color};s();const a=this.disposeVar(d.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(a.disposableOn(s))}this.dispose(d.track([r,"depth"],[e,"depth"]))}get geoSmoothPolygon(){return this._geoSmoothPolygon}flyTo(e,i){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):s.positions?(Me(r,o,i,s.positions,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):s.positions?(Me(r,o,i,s.positions,e),!0):!1:!1}};L(Iu,"type",Iu.register("ESCesiumViewer",Bl.type,Iu));let Lm=Iu;const ku=class ku extends Ge{constructor(e,i){super(e,i);L(this,"_czmModel");const o=i.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModel=this.dv(new Qt(i,e.id));const r=this._czmModel;this.d(r.readyEvent.don(a=>{r.gltf.animations&&(r.activeAnimationsJson=r.gltf.animations.map((l,u)=>({index:u,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}))),e.czmModelReadyEvent.emit(a)})),this.ad(new nh(o,this._czmModel)),this.d(d.track([r,"show"],[e,"show"])),this.d(d.track([r,"color"],[e,"czmColor"])),this.d(d.track([r,"nativeMaximumScale"],[e,"czmMaximumScale"])),this.d(d.track([r,"nativeMinimumPixelSize"],[e,"czmMinimumPixelSize"])),this.d(d.bind([r,"position"],[e,"position"])),this.d(d.track([r,"nativeScale"],[e,"czmNativeScale"])),this.d(d.track([r,"scale"],[e,"scale"])),this.ad(d.track([r,"imageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(d.track([r,"environmentMapManager"],[e,"czmEnvironmentMapManager"]));{const a=l=>{e.czmEnvironmentMapManager=e.czmEnvironmentMapManager?{...e.czmEnvironmentMapManager,atmosphereScatteringIntensity:l}:{atmosphereScatteringIntensity:l}};a(e.czmAtmosphereScatteringIntensity),this.ad(e.czmAtmosphereScatteringIntensityChanged.don(l=>a(l)))}{const a=()=>{var l,u;(l=e.czmEnvironmentMapManager)!=null&&l.atmosphereScatteringIntensity&&(e.czmAtmosphereScatteringIntensity=(u=e.czmEnvironmentMapManager)==null?void 0:u.atmosphereScatteringIntensity)};a(),this.ad(e.czmEnvironmentMapManagerChanged.don(a))}{const a=()=>{const l=[...e.rotation??[0,0,0]];l[0]+=e.instances&&e.instances.length!=0?0:90,r.rotation=l};a(),this.d(e.rotationChanged.don(a));{const l=()=>{if(a(),!e.instances){r.instances=e.instances;return}r.instances=e.instances.map(u=>{const h=JSON.parse(JSON.stringify(u));return!h.rotation&&(h.rotation=[0,0,0]),h.rotation[0]+=90,h})};l(),this.ad(e.instancesChanged.don(l))}}this.ad(e.setMaterialEvent.don(a=>{r.setMaterial(a)}));{const a=()=>{const l=[...r.rotation];l[0]-=e.instances?0:90,e.rotation=l};a(),this.d(r.rotationChanged.don(a))}{const a=this.dv(d.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),l=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};l(),this.d(a.don(l))}const s=()=>{r.url=V.ESSceneObject.context.getStrFromEnv(ih(typeof e.url=="string"?e.url:e.url.url))};s(),this.d(e.urlChanged.don(s)),this.d(e.setNodePositionEvent.don((a,l)=>{r.setNodeTranslation(a,l)})),this.d(e.setNodeRotationEvent.don((a,l)=>{r.setNodeRotation(a,l)})),this.d(e.setNodeScaleEvent.don((a,l)=>{r.setNodeScale(a,l)})),this.d(e.printDebugInfoEvent.don(()=>{r.printDebugInfo()}))}get model(){return this._czmModel}flyTo(e,i){const{sceneObject:o,czmViewer:r,model:s}=this;return r.actived?o.flyToParam||o.flyInParam?(super.flyTo(e,i),!0):(s&&dn(r,o,i,e,s,!0),!!s):!1}};L(ku,"type",ku.register("ESCesiumViewer",V.ESGltfModel.type,ku));let zm=ku;function nC(t,n){const e=t[0]-n[0],i=t[1]-n[1],o=t[2]-n[2];return Math.sqrt(e*e+i*i+o*o)}class Dl extends d.Destroyable{constructor(e,i){super();L(this,"_pickedEvent",this.disposeVar(new d.Event));L(this,"_flyToEvent",this.disposeVar(new d.Event));L(this,"_distance",this.disposeVar(d.react(0)));L(this,"_surfaceDistance",this.disposeVar(d.react(0)));L(this,"_height",this.disposeVar(d.react(0)));L(this,"_middlePosition",this.disposeVar(d.reactArrayWithUndefined(void 0)));L(this,"_heightPosition",this.disposeVar(d.reactArrayWithUndefined(void 0)));const o=()=>{if(this.positions)if(this.positions.length>=2)if(this._middlePosition.value=[this.positions[0][0],this.positions[0][1],this.positions[1][2]],this._heightPosition.value=[this.positions[0][0],this.positions[0][1],.5*(this.positions[1][2]+this.positions[0][2])],this.arcType===void 0||this.arcType==="GEODESIC"){const s=this._surfaceDistance.value=V.geoDistance(this.positions[0],this.positions[1]),a=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(s*s+a*a)}else if(this.arcType==="RHUMB"){const s=this._surfaceDistance.value=V.geoRhumbDistance(this.positions[0],this.positions[1]),a=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(s*s+a*a)}else if(this.arcType==="NONE"){const s=V.lbhToXyz(this.positions[0]),a=V.lbhToXyz(this.positions[1]);this._distance.value=nC(s,a),this._surfaceDistance.value=nC(V.lbhToXyz(this._middlePosition.value),a),this._height.value=this.positions[1][2]-this.positions[0][2]}else console.warn(`未知的arcType: ${this.arcType},导致距离无法计算!`);else this._heightPosition.value=void 0,this._distance.value=0,this._surfaceDistance.value=0,this._height.value=0};o();const r=this.disposeVar(d.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged));this.dispose(r.disposableOn(o));{const s=this.disposeVar(new Ye(e,i));s.ground=!1,s.loop=!1,this.dispose(d.track([s,"allowPicking"],[this,"allowPicking"])),this.dispose(d.bind([s,"arcType"],[this,"arcType"])),this.dispose(d.bind([s,"color"],[this,"color"])),this.dispose(d.bind([s,"dashLength"],[this,"dashLength"])),this.dispose(d.bind([s,"dashPattern"],[this,"dashPattern"])),this.dispose(d.bind([s,"gapColor"],[this,"gapColor"])),this.dispose(d.bind([s,"hasArrow"],[this,"hasArrow"])),this.dispose(d.bind([s,"hasDash"],[this,"hasDash"])),this.dispose(d.bind([s,"show"],[this,"show"])),this.dispose(d.bind([s,"width"],[this,"width"])),this.dispose(d.bind([s,"depthTest"],[this,"depthTest"]));{s.loop=!0;const l=()=>{if(this.positions&&this.positions.length===2){const[u,h]=this.positions;s.positions=[u,h,[u[0],u[1],h[2]]]}else s.positions=void 0};l(),this.dispose(this.positionsChanged.disposableOn(l))}this.dispose(this.flyToEvent.disposableOn(l=>{e.actived&&s.flyTo(l)}));const a=this.disposeVar(new vt(e,i));this.dispose(d.track([a,"shadowDom"],[this,"shadowDom"])),this.dispose(d.track([a,"cssAllInitial"],[this,"cssAllInitial"])),this.dispose(d.track([a,"show"],[this,"show"]));{const l=()=>{a.position=this.heightPosition};l(),this.dispose(this.heightPositionChanged.disposableOn(l))}{const l=()=>{a.innerHTML=po(`高度: ${rh(this.height)}`,0)};l(),this.dispose(this.heightChanged.disposableOn(l))}this.ad(a.pickedEvent.don(l=>{zi(l)===0&&this.pickedEvent.emit(l)}))}}get pickedEvent(){return this._pickedEvent}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}get surfaceDistance(){return this._surfaceDistance.value}get surfaceDistanceChanged(){return this._surfaceDistance.changed}get height(){return this._height.value}get heightChanged(){return this._height.changed}get middlePosition(){return this._middlePosition.value}get middlePositionChanged(){return this._middlePosition.changed}get heightPosition(){return this._heightPosition.value}get heightPositionChanged(){return this._heightPosition.changed}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,positions:d.reactPositions(void 0),width:1,color:d.reactArray([1,1,1,1]),hasDash:!1,gapColor:d.reactArrayWithUndefined([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",depthTest:!1,shadowDom:!1,cssAllInitial:!1})})(Dl||(Dl={})),d.extendClassProps(Dl.prototype,Dl.createDefaultProps);const Fu=class Fu extends en{constructor(e,i){super(e,i);L(this,"_geoHeightMeasurement");if(this._geoHeightMeasurement=this.disposeVar(new Dl(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const{czmHeightMeasurement:r}=this;this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(d.bind([r,"positions"],[e,"points"]));{const s=()=>{if(e.stroked)r.width=e.strokeWidth;else{r.width=0;return}r.width=e.strokeWidth,r.color=e.strokeColor;const u=e.strokeMaterial??"normal";u==="hasDash"?(r.hasDash=!0,r.hasArrow=!1):u==="hasArrow"?(r.hasDash=!1,r.hasArrow=!0):(r.hasDash=!1,r.hasArrow=!1);const h=e.strokeStyle;if(h.material==="hasDash"&&h.materialParams)try{const c=h.materialParams;Reflect.has(c,"gapColor")&&(r.gapColor=c.gapColor??[0,0,0,0]),Reflect.has(c,"dashLength")&&(r.dashLength=c.dashLength),Reflect.has(c,"dashPattern")&&(r.dashPattern=c.dashPattern)}catch(c){console.error(c)}else r.gapColor=[0,0,0,0],r.dashLength=0,r.dashPattern=0};s();const a=this.disposeVar(d.createNextAnimateFrameEvent(e.strokeStyleChanged,e.strokedChanged));this.dispose(a.disposableOn(s))}this.dispose(r.pickedEvent.disposableOn(s=>{zi(s)===0&&(e.allowPicking??!1)&&e.pickedEvent.emit(s)}))}get czmHeightMeasurement(){return this._geoHeightMeasurement}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):s.positions?(Me(r,o,i,s.positions,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):s.positions?(Me(r,o,i,s.positions,e),!0):!1:!1}};L(Fu,"type",Fu.register("ESCesiumViewer",V.ESHeightMeasurement.type,Fu));let Qm=Fu;const Vm={czmAnimationsStand:[{index:0,name:"Stand",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsWalk:[{index:2,name:"Walk",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsRun:[{index:1,name:"Run",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}]},Bu=class Bu extends Ge{constructor(e,i){super(e,i);L(this,"_czmModelPrimitive");const o=i.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModelPrimitive=this.disposeVar(new Qt(i,this.sceneObject.id));const r=this._czmModelPrimitive;this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.bind([r,"position"],[e,"position"])),this.dispose(Bt([r,"rotation"],[e,"rotation"])),this.dispose(d.bind([r,"scale"],[e,"scale"]));{const g=this.dv(d.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),v=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};v(),this.d(g.don(v))}const s=V.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/worker.glb"),a=V.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/police.glb"),l=V.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/pedestrian.glb"),u=V.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/Stranger.glb"),h=V.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsMan.glb"),c=V.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsWoman.glb"),A=()=>{switch(e.mode){case"worker":r.url=s;break;case"police":r.url=a;break;case"pedestrian":r.url=l;break;case"stranger":r.url=u;break;case"suitMan":r.url=h;break;case"suitWoman":r.url=c;break;default:r.url=s;break}};this.dispose(e.modeChanged.disposableOn(()=>{A()})),A();const p=()=>{const g=e.animation??V.ESHuman.defaults.animation;if(!e.show){r.activeAnimationsJson=void 0;return}g==="walking"?r.activeAnimationsJson=Vm.czmAnimationsWalk:g==="standing"?r.activeAnimationsJson=Vm.czmAnimationsStand:g==="running"&&(r.activeAnimationsJson=Vm.czmAnimationsRun)};p();const f=this.ad(d.createNextAnimateFrameEvent(e.showChanged,e.animationChanged));this.dispose(f.disposableOn(()=>p())),this.ad(new nh(o,r))}get czmModelPrimitive(){return this._czmModelPrimitive}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmModelPrimitive:s}=this;return!r.actived||!r.viewer?!1:o.flyToParam||o.flyInParam?(super.flyTo(e,i),!0):(s&&dn(r,o,i,e,s,!0),!!s)}};L(Bu,"type",Bu.register("ESCesiumViewer",V.ESHuman.type,Bu));let Nm=Bu;class iC extends V.Destroyable{constructor(e,i){super();L(this,"_czmGeoCanvasImagePoi");L(this,"flyTo",(e,i)=>{if(this.czmGeoCanvasImagePoi.position){Be(this.czmViewer.viewer,this.czmGeoCanvasImagePoi.position,1e3,On,e);return}this.czmGeoCanvasImagePoi.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=i,this._czmGeoCanvasImagePoi=this.disposeVar(new hi(i));const o=this._czmGeoCanvasImagePoi;o.pickOnClick=!0,this.d(o.pickedEvent.don(r=>{(e.allowPicking??!1)&&e.pickedEvent.emit(r)}));{const r=h=>{let c=h;return h.includes("inner://")&&(c="${earthsdk3-assets-script-dir}/assets/img/points/"+h.split("inner://")[1]),V.ESSceneObject.context.getStrFromEnv(ih(c))},s=()=>{const h=r(typeof e.url=="string"?e.url:e.url.url);if(o.imageUri=h,e.sizeByContent){const A=new Image;A.src=h,A.onload=()=>{o.size=[A.width,A.height]}}else{const A=e.size;o.size=[...A]}},a=this.disposeVar(d.createNextAnimateFrameEvent(e.urlChanged,e.sizeByContentChanged,e.sizeChanged));this.dispose(a.disposableOn(()=>s())),s(),this.d(d.track([o,"zOrder"],[e,"zOrder"])),this.dispose(d.track([o,"show"],[e,"show"])),this.dispose(d.bind([o,"position"],[e,"position"])),this.ad(d.bind([o,"isHoverZoom"],[e,"isHoverZoom"]));{const h=()=>{o.scale=[e.scale[1],e.scale[2]]};h(),this.dispose(e.scaleChanged.don(h))}const l=()=>{const h=e.anchor,c=e.offset;h?o.originRatioAndOffset=[...h,-c[0],-c[1]]:o.originRatioAndOffset=[0,0,0,0]},u=this.ad(d.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(u.disposableOn(()=>l())),l(),this.dispose(o.clickEvent.disposableOn(h=>{const{offsetX:c,offsetY:A}=h,f={type:h.button===0?"leftClick":h.button===2?"rightClick":void 0,add:{mousePos:[c,A]}};e.widgetEvent.emit(f)})),this.dispose(o.hoveredChanged.disposableOn(h=>{if(h===void 0)return;const c={type:h?"mouseEnter":"mouseLeave"};e.widgetEvent.emit(c)}))}}get czmGeoCanvasImagePoi(){return this._czmGeoCanvasImagePoi}}class rC extends V.Destroyable{constructor(e,i,o){super();L(this,"_czmGeoImageModel");L(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});L(this,"_isPointEvent",!1);L(this,"flyTo",(e,i)=>{if(this.czmGeoImageModel.position)return Ln(this.czmViewer,this.sceneObject,i,this.sceneObject.position,Math.max(...this.czmGeoImageModel.size),e,!0);this.czmGeoImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=i,this._czmGeoImageModel=this.disposeVar(new Wi(i,e.id));const r=this._czmGeoImageModel;this.ad(i.clickEvent.don(A=>{const p=A==null?void 0:A.pointerEvent;p&&(this._isPointEvent=!0,this._eventInfo={type:p.button==0?"leftClick":p.button==2?"rightClick":"leftClick",add:{mousePos:[p.offsetX,p.offsetY]}})})),this.d(e.pickedEvent.don(A=>{var p,f,g;A.screenPosition&&this._isPointEvent&&A.attachedInfo!="innerHoverEvent"&&((p=this._eventInfo.add)!=null&&p.mousePos)&&Math.abs(A.screenPosition[0]-((f=this._eventInfo.add)==null?void 0:f.mousePos[0]))<1&&Math.abs(A.screenPosition[1]-((g=this._eventInfo.add)==null?void 0:g.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),V.registerCreatedEventUpdate(this,e,()=>{const A=i.getEngineObject(e);this.ad(A.lastHoverResultChanged.don((p,f)=>{(p==null?void 0:p.sceneObject)==(f==null?void 0:f.sceneObject)||(p==null?void 0:p.sceneObject)!=e&&(f==null?void 0:f.sceneObject)!=e||(p!=null&&p.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:p==null?void 0:p.screenPosition}},p.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&p.sceneObject.id==e.id&&(r.scale=[r.scale[0]*1.5,r.scale[1]*1.5])),f!=null&&f.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:p==null?void 0:p.screenPosition}},f.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&f.sceneObject.id==e.id&&(r.scale=[r.scale[0]/1.5,r.scale[1]/1.5])))}))});const s=e.sizeByContent,l=(A=>{let p=A;return A.includes("inner://")&&(p="${earthsdk3-assets-script-dir}/assets/img/points/"+A.split("inner://")[1]),V.ESSceneObject.context.getStrFromEnv(ih(p))})(typeof o.sceneObject.url=="string"?o.sceneObject.url:o.sceneObject.url.url),u=new Image;u.src=l,u.onload=()=>{if(s)r.size=[u.width/100,u.height/100];else{const A=e.size;r.size=[A[0]/100,A[1]/100]}},r.uri=l,this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.bind([r,"position"],[e,"position"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"])),r.pixelSize=void 0,r.useAxis="XZ";{const A=()=>{r.scale=[e.scale[1],e.scale[2]]};A(),this.d(e.scaleChanged.don(A))}{const A=()=>{e.rotationType===0&&(r.rotationMode="WithProp",this.d(Bt([r,"rotation"],[e,"rotation"]))),e.rotationType===1&&(r.rotationMode="WithCamera"),e.rotationType===2&&(r.rotationMode="WithCameraOnlyZ")};A(),this.dispose(e.rotationTypeChanged.disposableOn(A))}const h=()=>{const A=e.anchor,p=e.offset;A?r.originRatioAndOffset=[...A,-p[0]/100,-p[1]/100]:r.originRatioAndOffset=[0,0,0,0]},c=this.ad(d.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(c.disposableOn(()=>h())),h()}get czmGeoImageModel(){return this._czmGeoImageModel}}const Mu=class Mu extends Tl{constructor(e,i){super(e,i);L(this,"_resetting");if(!i.viewer){console.warn("viewer is undefined!");return}const r=this.disposeVar(d.createNextAnimateFrameEvent(this.sceneObject.urlChanged,this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged));this._resetting=this.disposeVar(new d.ObjResettingWithEvent(r,()=>this.sceneObject.screenRender?new iC(this.sceneObject,this.czmViewer):new rC(this.sceneObject,this.czmViewer,this)))}get resetting(){return this._resetting}flyTo(e,i){const{sceneObject:o,czmViewer:r,resetting:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(s&&s.obj&&s.obj.flyTo(e,i),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(Mu,"type",Mu.register("ESCesiumViewer",V.ESImageLabel.type,Mu));let Hm=Mu;function z5(t){switch(t){case"wms":return"WebMapServiceImageryProvider";case"tms":return"TileMapServiceImageryProvider";case"wmts":return"WebMapTileServiceImageryProvider";case"xyz":return"UrlTemplateImageryProvider";case"ion":return"IonImageryProvider"}}const Du=class Du extends Un{constructor(e,i){super(e,i);L(this,"_czmImagery");if(this._czmImagery=this.dv(new Nr(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._czmImagery;{const s=this.ad(d.reactJson(""));{const u=()=>{if(typeof e.url=="string")s.value=V.ESSceneObject.context.getStrFromEnv(e.url);else{const h=e.url;h.url=V.ESSceneObject.context.getStrFromEnv(h.url),s.value=h}};u(),this.ad(e.urlChanged.don(u))}const a=()=>{var f;if(!s.value)return;const u=(((f=e.options)==null?void 0:f.type)??"auto").toLowerCase(),h=e.options??{};let c={type:"UrlTemplateImageryProvider",url:s.value,rectangle:e.rectangle,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,...h},A=s.value,p=typeof A=="string"?A:A.url;if(u==="auto"){const g=p.toLowerCase();if(g.startsWith("ion://")){const y=+g.substring(6);c={...h,assetId:y,type:"IonImageryProvider"}}else if(g.includes("{x}")||g.includes("{y}")||g.includes("{z}"))c.type="UrlTemplateImageryProvider";else if(g.includes("wmts"))c.type="WebMapTileServiceImageryProvider";else if(g.includes("wms"))c.type="WebMapServiceImageryProvider";else{if(p.includes("/tilemapresource.xml")){const v=p.split("/tilemapresource.xml").join("");typeof A=="string"?A=v:A.url=v,c.url=A}c.type="TileMapServiceImageryProvider"}}else{if(u==="tms"&&p.includes("/tilemapresource.xml")){const g=p.split("/tilemapresource.xml").join("");typeof A=="string"?A=g:A.url=g,c.url=A}else if(u==="ion"&&p.startsWith("ion://")){const v=+p.substring(6);c={...h,assetId:v,type:"IonImageryProvider"}}c.type=z5(u)}console.log("imageryProvider",c),r.imageryProvider=c};a();const l=this.dv(d.createNextAnimateFrameEvent(s.changed,e.maximumLevelChanged,e.minimumLevelChanged,e.optionsChanged,e.rectangleChanged));this.d(l.don(a))}this.d(d.track([r,"show"],[e,"show"])),this.d(d.bind([r,"alpha"],[e,"opacity"])),this.d(d.bind([r,"alpha"],[e,"czmAlpha"])),this.d(d.track([r,"splitDirection"],[e,"splitDirection"])),this.d(d.track([r,"brightness"],[e,"czmBrightness"])),this.d(d.track([r,"contrast"],[e,"czmContrast"])),this.d(d.track([r,"hue"],[e,"czmHue"])),this.d(d.track([r,"saturation"],[e,"czmSaturation"])),this.d(d.track([r,"gamma"],[e,"czmGamma"])),this.d(d.track([r,"rectangle"],[e,"rectangle"])),this.d(d.track([r,"zIndex"],[e,"zIndex"])),this.ad(d.track([r,"targetID"],[e,"targetID"]))}get czmImagery(){return this._czmImagery}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmImagery:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(s.flyTo(e&&e),o.flyOverEvent.emit(i,"over",r),!0):!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmImagery:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):(s.flyTo(e&&e),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(Du,"type",Du.register("ESCesiumViewer",V.ESImageryLayer.type,Du));let Gm=Du;class Q5 extends d.Destroyable{constructor(e,i,o,r){super();L(this,"_show");L(this,"_czmESCustomPrimitive");L(this,"_czmTexture");this._sceneObject=e,this._show=this.disposeVar(d.react(this._sceneObject.show)),this._czmESCustomPrimitive=this.dv(new st(i,this._sceneObject.id)),this._czmTexture=this.dv(new ht(i));const s=e,a=this._czmESCustomPrimitive,l=this._czmTexture;this.dispose(d.track([a,"show"],[this,"show"])),this.dispose(d.track([a,"show"],[s,"show"])),this.dispose(d.track([a,"allowPicking"],[s,"allowPicking"])),this.dispose(d.track([a,"rotation"],[s,"rotation"])),this.dispose(d.track([a,"position"],[s,"position"])),this.dispose(d.track([a,"scale"],[s,"scale"])),this.ad(s.allowPickingChanged.don(()=>{a.allowPicking=s.allowPicking,a.pass=s.allowPicking?"TRANSLUCENT":"OVERLAY"}));{const u=()=>{const c=s.size/2,A=r[0].map(S=>S*c),p=r[1].map(S=>S*c),f=r[2].map(S=>S*c),g=r[3].map(S=>S*c),v=[...A,...p,...f,...g];let y=[0,3,2,0,2,1];(o=="north"||o=="west"||o=="bottom")&&(y=y.reverse());const m=[0,0],_=[1,0],b=[1,1],E=[0,1];let T=[];o=="east"||o=="south"?T=[..._,...m,...E,...b]:o=="west"?T=[..._,...b,...E,...m]:o=="top"?T=[...E,...b,..._,...m]:T=[...m,..._,...b,...E],a.indexTypedArray=new Uint16Array(y),a.attributes={position:{typedArray:new Float32Array(v),componentsPerAttribute:3},st:{typedArray:new Float32Array(T),componentsPerAttribute:2}},l.uri=V.ESSceneObject.context.getStrFromEnv(`\${earthsdk3-assets-script-dir}/assets/img/skybox/${s.mode}/${o}.${s.mode!="blueSky"?"png":"jpg"}`);const P=i.getCameraInfo();if(P!=null){const I=V.getDistancesFromPositions([s.position,P.position],"NONE")[0]/(s.size/2*s.autoOpacityFactor);this.changeOpacity(s.autoFollow?1:I)}const k=a.computeLocalAxisedBoundingBoxFromAttribute("position");if(!k)return;const{min:U,max:B}=k;a.setLocalAxisedBoundingBox(U,B)};u();const h=this.disposeVar(d.createNextAnimateFrameEvent(s.sizeChanged,s.modeChanged));this.dispose(h.disposableOn(u))}}get show(){return this._show.value}set show(e){this._show.value=e}get showChanged(){return this._show.changed}get czmESCustomPrimitive(){return this._czmESCustomPrimitive}get czmTexture(){return this._czmTexture}changeOpacity(e){this._czmESCustomPrimitive.uniformMap={u_image:{type:"texture",id:this._czmTexture.id},u_color:[1,1,1,1-e>=0?1-e:0]}}}class V5 extends d.Destroyable{constructor(n,e,i){if(super(),!e.viewer)return;let o=!0,r;this.dispose(e.viewer.scene.preUpdate.addEventListener(()=>{s()}));function s(){var l;if(!((l=e.viewer)!=null&&l.camera))return;const a=e.getCameraInfo();if(a!=null&&(r==null||r.position[0]!=a.position[0]||r.position[1]!=a.position[1]||r.position[2]!=a.position[2]||r.rotation[0]!=a.rotation[0]||r.rotation[1]!=a.rotation[1]||r.rotation[2]!=a.rotation[2])){r=a;const h=V.getDistancesFromPositions([n.position,r.position],"NONE")[0]/(n.size/2*n.autoOpacityFactor);n.autoFollow?(n.position=r.position,o&&(o=!1,i.forEach(c=>{c.changeOpacity(1)}))):i.forEach(c=>{c.changeOpacity(h)})}}s()}}const Et=class Et extends Ge{constructor(e,i){super(e,i);L(this,"_czmSkyBoxComponents",[]);if(!i.viewer){console.warn("viewer is undefined!");return}!Et._defaultLocalBox&&Et._firstLoad&&(Et._firstLoad=!1,Et._defaultLocalBox=i.xbsjLocalBoxSources),Et._eSLocalSkyBoxArr.push(e),this.d(()=>{Et._eSLocalSkyBoxArr.includes(e)&&Et._eSLocalSkyBoxArr.splice(Et._eSLocalSkyBoxArr.indexOf(e),1),this.ChangeAutoFollow()});const r={bottom:[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1]],top:[[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],south:[[-1,-1,-1],[1,-1,-1],[1,-1,1],[-1,-1,1]],north:[[-1,1,-1],[1,1,-1],[1,1,1],[-1,1,1]],east:[[1,-1,-1],[1,1,-1],[1,1,1],[1,-1,1]],west:[[-1,1,-1],[-1,1,1],[-1,-1,1],[-1,-1,-1]]};for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)){const a=r[s];this._czmSkyBoxComponents.push(this.dv(new Q5(e,i,s,a)))}{const s=this.disposeVar(d.createNextAnimateFrameEvent(e.autoFollowChanged,e.autoOpacityFactorChanged));this.disposeVar(new d.ObjResettingWithEvent(s,()=>(this.ChangeAutoFollow(),new V5(e,i,this._czmSkyBoxComponents))))}{const s=()=>{this.ChangeAutoFollow()},a=this.disposeVar(d.createNextAnimateFrameEvent(e.sizeChanged,e.modeChanged,e.showChanged));this.dispose(a.disposableOn(s))}}ChangeAutoFollow(){const{czmViewer:e}=this;for(let i=Et._eSLocalSkyBoxArr.length-1;i>=0;i--){const o=Et._eSLocalSkyBoxArr[i];if(o.autoFollow&&o.show){e.xbsjLocalBoxSources={positiveX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/east.${o.mode!="blueSky"?"png":"jpg"}`,negativeX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/west.${o.mode!="blueSky"?"png":"jpg"}`,positiveY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/bottom.${o.mode!="blueSky"?"png":"jpg"}`,negativeY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/top.${o.mode!="blueSky"?"png":"jpg"}`,positiveZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/north.${o.mode!="blueSky"?"png":"jpg"}`,negativeZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/south.${o.mode!="blueSky"?"png":"jpg"}`};break}i==0&&(e.xbsjLocalBoxSources=Et._defaultLocalBox)}Et._eSLocalSkyBoxArr.length==0&&(e.xbsjLocalBoxSources=Et._defaultLocalBox)}flyTo(e,i){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,i);{const s=o.size??V.ESLocalSkyBox.defaults.size;return o.position?(Ln(r,o,i,o.position,s,e,!0),!0):!1}}};L(Et,"type",Et.register("ESCesiumViewer",V.ESLocalSkyBox.type,Et)),L(Et,"_defaultLocalBox"),L(Et,"_firstLoad",!0),L(Et,"_eSLocalSkyBoxArr",[]);let Wm=Et;const Xn=class Xn extends Ge{constructor(e,i){super(e,i);L(this,"_geoCustomDivPoi");L(this,"_textFunc",this.disposeVar(d.react(void 0)));if(this._geoCustomDivPoi=this.disposeVar(new vt(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this.geoCustomDivPoi;this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.bind([r,"position"],[e,"position"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"]));{this.dispose(r.pickedEvent.disposableOn(s=>{(e.allowPicking??V.ESLocationMeasurement.defaults.allowPicking)&&e.pickedEvent.emit(s)})),this.dispose(r.innerHtmlMounted.disposableOn(s=>{const a=s.firstElementChild;a&&(a.style.pointerEvents="auto",a.style.cursor="default",a.onclick=l=>r.pickFromDiv(a,{type:"viewerPicking",pointerEvent:l}))}));{const s=()=>{if(!e.position)return;const l=(this.textFunc??Xn.defaultTextFunc_度格式)(e.position);r.innerHTML=po(l)};s();const a=this.disposeVar(d.createNextAnimateFrameEvent(e.positionChanged,this.textFuncChanged));this.dispose(a.disposableOn(s))}{const s=()=>{i.lonLatFormat??(i.lonLatFormat="DECIMAL_DEGREE"),this.textFunc=i.lonLatFormat=="DECIMAL_DEGREE"?Xn.defaultTextFunc_度格式:i.lonLatFormat=="DEGREES_DECIMAL_MINUTES"?Xn.defaultTextFunc_度分格式:Xn.defaultTextFunc_度分秒格式};s(),this.d(i.lonLatFormatChanged.don(()=>{s()}))}}}get geoCustomDivPoi(){return this._geoCustomDivPoi}get textFunc(){return this._textFunc.value}set textFunc(e){this._textFunc.value=e}get textFuncChanged(){return this._textFunc.changed}flyTo(e,i){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(s.flyTo(e),o.flyOverEvent.emit(i,"over",r),!0):!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):(s.flyTo(e),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(Xn,"type",Xn.register("ESCesiumViewer",V.ESLocationMeasurement.type,Xn)),L(Xn,"defaultTextFunc_度格式",e=>{if(!e)return"";const[i=0,o=0,r=0]=e;return`经度: ${i.toFixed(5)}°
3104
+ `,_t=class _t extends d.Destroyable{constructor(e,i){super();L(this,"_flyToEvent",this.disposeVar(new d.Event));L(this,"_loadFuncReact",this.disposeVar(d.react(void 0)));L(this,"_dataSource",this.disposeVar(d.react(void 0)));L(this,"_data");L(this,"_defaultHeight",{});L(this,"_defaultBoundingSphere",new C.BoundingSphere);const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}let r=()=>{this.dataSource&&o.dataSources.remove(this.dataSource,!0),this.dataSource=void 0,this._data=void 0};this.dispose(()=>{r()});{const s=this.dv(d.createProcessingFromAsyncFunc(async u=>{this.dataSource&&r(),this.url&&(typeof this.url=="object"?this._data=this.url:V.isJSON(this.url)?this._data=JSON.parse(this.url):await fetch(V.ESSceneObject.context.getStrFromEnv(this.url)).then(h=>h.json()).then(h=>{this._data=h}).catch(h=>{console.warn("ESGeoJson数据加载失败",h)}),this.dataSource=await C.GeoJsonDataSource.load(this._data),o.dataSources.add(this.dataSource).then(h=>{var A,p;const c=[];for(const f of h.entities.values)if(C.Entity.prototype&&(f.ESSceneObjectID=i),this._isEntityShow(f,e),f.polygon&&c.push(...(A=f.polygon.hierarchy)==null?void 0:A.getValue(C.JulianDate.now()).positions),f.polyline&&c.push(...(p=f.polyline.positions)==null?void 0:p.getValue(C.JulianDate.now())),f.position){const g=f.position.getValue(C.JulianDate.now());g&&c.push(g)}this._defaultBoundingSphere=C.BoundingSphere.fromPoints(c)}))})),a=()=>{s.isRunning&&s.cancel(),s.restart()};a();const l=this.dv(d.createNextAnimateFrameEvent(this.loadFunChanged,this.urlChanged));this.dispose(l.don(a))}{const s=()=>{var l,u;if(this.dataSource)if(this.dataSource.show=this.show,this.loadFun)try{this.loadFun(this.dataSource)}catch(h){console.error(h)}else{const h=this.dataSource.entities.values;for(let c=0;c<h.length;c++){const A=h[c];if(A.polygon){this._defaultHeight[A.id]||(this._defaultHeight[A.id]=(l=A.polygon.height)==null?void 0:l.getValue(C.JulianDate.now())),A.polygon.height=this.fillGround?void 0:new C.ConstantProperty(this._defaultHeight[A.id]),A.polygon.perPositionHeight=new C.ConstantProperty(!this.fillGround),A.polygon.heightReference=new C.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?C.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?C.HeightReference.CLAMP_TO_GROUND:C.HeightReference.RELATIVE_TO_GROUND),A.polygon.show=new C.ConstantProperty(this.filled??_t.defaults.filled),A.polygon.material=new C.ColorMaterialProperty(new C.Color(...this.fillColor??_t.defaults.fillColor)),A.polygon.outline=new C.ConstantProperty(!1),A.polyline=new C.PolylineGraphics;const p=JSON.parse(JSON.stringify((u=A.polygon.hierarchy)==null?void 0:u.getValue(C.JulianDate.now()).positions));C.Cartesian3.equals(p[0],p[p.length-1])||p.push(p[0]),A.polyline.positions=p}if(A.polyline&&(A.polyline.show=new C.ConstantProperty(this.stroked??_t.defaults.stroked),A.polyline.width=new C.ConstantProperty(this.strokeWidth??_t.defaults.strokeWidth),A.polyline.material=new C.ColorMaterialProperty(new C.Color(...this.strokeColor??_t.defaults.strokeColor)),A.polyline.clampToGround=new C.ConstantProperty(this.strokeGround)),A.billboard){A.billboard.show=new C.ConstantProperty(this.imageShow??_t.defaults.imageShow),A.billboard.width=new C.ConstantProperty(this.imageSize?this.imageSize[0]:_t.defaults.imageSize[0]),A.billboard.height=new C.ConstantProperty(this.imageSize?this.imageSize[1]:_t.defaults.imageSize[1]);const p=this.imageUrl?typeof this.imageUrl=="string"?this.imageUrl:this.imageUrl.url:_t.defaults.imageUrl;A.billboard.image=new C.ConstantProperty(V.ESSceneObject.context.getStrFromEnv(p)),A.billboard.horizontalOrigin=new C.ConstantProperty(C.HorizontalOrigin.LEFT),A.billboard.verticalOrigin=new C.ConstantProperty(C.VerticalOrigin.TOP),A.billboard.heightReference=new C.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?C.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?C.HeightReference.CLAMP_TO_GROUND:C.HeightReference.RELATIVE_TO_GROUND);const f=this.imageAnchor??_t.defaults.imageAnchor,g=this.imageOffset??_t.defaults.imageOffset;if(A.billboard.pixelOffset=new C.ConstantProperty(C.Cartesian2.fromArray([-f[0]*A.billboard.width.getValue(C.JulianDate.now())+g[0],-f[1]*A.billboard.height.getValue(C.JulianDate.now())+g[1]])),A.label=new C.LabelGraphics,!A.label)return;A.label.show=new C.ConstantProperty(this.textShow??_t.defaults.textShow),A.label.heightReference=new C.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?C.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?C.HeightReference.CLAMP_TO_GROUND:C.HeightReference.RELATIVE_TO_GROUND),A.label.text=new C.ConstantProperty(this.textProperty&&this.textProperty!==""&&A.properties&&A.properties[this.textProperty]?A.properties[this.textProperty].getValue():this.textDefaultText??_t.defaults.textDefaultText),A.label.fillColor=new C.ConstantProperty(new C.Color(...this.textColor??_t.defaults.textColor)),A.label.showBackground=new C.ConstantProperty(this.textBackgroundColor!=null);const v=this.textFontSize&&this.textFontSize!=0?this.textFontSize:_t.defaults.textFontSize,y=this.textOffset??_t.defaults.textOffset;A.label.backgroundColor=new C.ConstantProperty(new C.Color(...this.textBackgroundColor??_t.defaults.textBackgroundColor)),A.label.font=new C.ConstantProperty(`${this.textFontStyle} ${this.textFontWeight} ${v}px ${this.textFontFamily??_t.defaults.textFontFamily}`),A.label.horizontalOrigin=new C.ConstantProperty(C.HorizontalOrigin.LEFT),A.label.verticalOrigin=new C.ConstantProperty(C.VerticalOrigin.TOP),A.label.eyeOffset=new C.ConstantProperty(C.Cartesian3.fromArray([0,0,-1]));const m=this.textAnchor??_t.defaults.textAnchor;A.label.pixelOffset=new C.ConstantProperty(C.Cartesian2.fromArray([-m[0]*((this.textBackgroundColor?-14:0)+this._getTextPixelWidth(A.label.text.getValue(C.JulianDate.now()),A.label.font.getValue(C.JulianDate.now())))+y[0],-m[1]*((this.textBackgroundColor?10:0)+v)+y[1]]))}}}};s();const a=this.dv(d.createNextAnimateFrameEvent(this._dataSource.changed,this.showChanged,this.strokedChanged,this.strokeWidthChanged,this.strokeWidthTypeChanged,this.strokeColorChanged,this.strokeMaterialChanged,this.strokeMaterialParamsChanged,this.strokeGroundChanged,this.filledChanged,this.fillColorChanged,this.fillMaterialChanged,this.fillMaterialParamsChanged,this.fillGroundChanged,this.imageShowChanged,this.imageUrlChanged,this.imageSizeChanged,this.imageAnchorChanged,this.imageOffsetChanged,this.textShowChanged,this.textPropertyChanged,this.textDefaultTextChanged,this.textColorChanged,this.textBackgroundColorChanged,this.textFontFamilyChanged,this.textFontSizeChanged,this.textFontStyleChanged,this.textFontWeightChanged,this.textAnchorChanged,this.textOffsetChanged,this.heightReferenceChanged));this.dispose(a.don(s))}{const s=()=>{if(!this.dataSource)return;const l=this.dataSource.entities.values;for(let u=0;u<l.length;u++){const h=l[u];this._isEntityShow(h,e)}};s();const a=this.ad(d.createNextAnimateFrameEvent(this.minFeatureVisibleDistanceChanged,this.maxFeatureVisibleDistanceChanged,e.cameraChanged,this.showChanged));this.ad(a.don(s))}{const s=()=>{if(this.loadFuncStr)try{const a=Function(`"use strict";return (${this.loadFuncStr})`)();this.loadFun=a}catch(a){console.error(a),this.loadFun=void 0}else this.loadFun=void 0};s(),this.dispose(this.loadFuncStrChanged.disposableOn(s))}this.dispose(this.flyToEvent.disposableOn(s=>{e.actived&&this.dataSource&&(s!==void 0?o.flyTo(this.dataSource,{duration:s/1e3}).then(a=>{a||o.camera.flyToBoundingSphere(this._defaultBoundingSphere,{duration:s/1e3})}):o.flyTo(this.dataSource).then(a=>{a||o.camera.flyToBoundingSphere(this._defaultBoundingSphere)}))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get loadFun(){return this._loadFuncReact.value}set loadFun(e){this._loadFuncReact.value=e}get loadFunChanged(){return this._loadFuncReact.changed}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}_getTextPixelWidth(e,i="16px sans-serif"){const r=document.createElement("canvas").getContext("2d");return r.font=i,r.measureText(e).width}_isEntityShow(e,i){var o;if(this.minFeatureVisibleDistance==0&&this.maxFeatureVisibleDistance==0){e.show=this.show;return}if((o=i.viewer)!=null&&o.camera&&this.show){let r;if(e.polygon&&e.polygon.hierarchy)r=V.getMinMaxCorner(e.polygon.hierarchy.getValue(C.JulianDate.now()).positions.map(l=>Ue(l))).center;else if(e.polyline&&e.polyline.positions)r=V.getMinMaxCorner(e.polyline.positions.getValue(C.JulianDate.now()).map(l=>Ue(l))).center;else if(e.position){const l=e.position.getValue(C.JulianDate.now());l&&(r=Ue(l))}if(!r||isNaN(r[0]))return;const s=V.getDistancesFromPositions([r,Sn(i.viewer.camera)],"NONE")[0];let a=!1;this.minFeatureVisibleDistance<this.maxFeatureVisibleDistance?a=this.minFeatureVisibleDistance<s&&s<this.maxFeatureVisibleDistance:this.maxFeatureVisibleDistance==0?a=s>this.minFeatureVisibleDistance:this.minFeatureVisibleDistance==0&&(a=s<this.maxFeatureVisibleDistance),e.show=this.show&&a}}};L(_t,"defaults",{show:!0,allowPicking:!0,url:tC,defaultLoadFuncStr:eC,defaultLoadFuncDocStr:L5,data:U5,dataMd:O5,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/misc/location.png",imageSize:[64,64],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:[.79,.91,.06,1],textFontFamily:"Arial",textFontSize:16,textFontWeight:"normal",textFontStyle:"normal",textAnchor:[.5,1],textOffset:[0,0],strokeWidthTypes:[["screen","screen"],["world","world"]],minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let zo=_t;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:void 0,loadFuncStr:void 0,url:void 0,stroked:void 0,strokeWidth:void 0,strokeWidthType:"world",strokeColor:d.reactArrayWithUndefined(void 0),strokeMaterial:void 0,strokeMaterialParams:d.reactJsonWithUndefined(void 0),strokeGround:void 0,filled:void 0,fillColor:d.reactArrayWithUndefined(void 0),fillMaterial:void 0,fillMaterialParams:d.reactJsonWithUndefined(void 0),fillGround:void 0,imageShow:void 0,imageUrl:void 0,imageSize:d.reactArrayWithUndefined(void 0),imageAnchor:d.reactArrayWithUndefined(void 0),imageOffset:d.reactArrayWithUndefined(void 0),textShow:void 0,textProperty:void 0,textDefaultText:void 0,textColor:d.reactArrayWithUndefined(void 0),textBackgroundColor:d.reactArrayWithUndefined(void 0),textFontFamily:void 0,textFontSize:void 0,textFontStyle:void 0,textFontWeight:void 0,textAnchor:d.reactArrayWithUndefined(void 0),textOffset:d.reactArrayWithUndefined(void 0),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})})(zo||(zo={})),d.extendClassProps(zo.prototype,zo.createDefaultProps);const Pu=class Pu extends Un{constructor(n,e){if(super(n,e),!e.viewer){console.warn("viewer is undefined!");return}const o=this.disposeVar(new zo(e,n.id));this.dispose(d.track([o,"show"],[n,"show"])),this.dispose(d.track([o,"allowPicking"],[n,"allowPicking"])),this.dispose(d.track([o,"loadFuncStr"],[n,"loadFuncStr"])),this.dispose(d.track([o,"url"],[n,"features"])),this.dispose(d.track([o,"stroked"],[n,"stroked"])),this.dispose(d.track([o,"strokeWidth"],[n,"strokeWidth"])),this.dispose(d.track([o,"strokeWidthType"],[n,"strokeWidthType"])),this.dispose(d.track([o,"strokeColor"],[n,"strokeColor"])),this.dispose(d.track([o,"strokeMaterial"],[n,"strokeMaterial"])),this.dispose(d.track([o,"strokeMaterialParams"],[n,"strokeMaterialParams"])),this.dispose(d.track([o,"strokeGround"],[n,"strokeGround"])),this.dispose(d.track([o,"filled"],[n,"filled"])),this.dispose(d.track([o,"fillColor"],[n,"fillColor"])),this.dispose(d.track([o,"fillMaterial"],[n,"fillMaterial"])),this.dispose(d.track([o,"fillMaterialParams"],[n,"fillMaterialParams"])),this.dispose(d.track([o,"fillGround"],[n,"fillGround"])),this.dispose(d.track([o,"imageShow"],[n,"imageShow"])),this.dispose(d.track([o,"imageUrl"],[n,"imageUrl"])),this.dispose(d.track([o,"imageSize"],[n,"imageSize"])),this.dispose(d.track([o,"imageAnchor"],[n,"imageAnchor"])),this.dispose(d.track([o,"imageOffset"],[n,"imageOffset"])),this.dispose(d.track([o,"textShow"],[n,"textShow"])),this.dispose(d.track([o,"textProperty"],[n,"textProperty"])),this.dispose(d.track([o,"textDefaultText"],[n,"textDefaultText"])),this.dispose(d.track([o,"textColor"],[n,"textColor"])),this.dispose(d.track([o,"textBackgroundColor"],[n,"textBackgroundColor"])),this.dispose(d.track([o,"textFontFamily"],[n,"textFontFamily"])),this.dispose(d.track([o,"textFontSize"],[n,"textFontSize"])),this.dispose(d.track([o,"textFontStyle"],[n,"textFontStyle"])),this.dispose(d.track([o,"textFontWeight"],[n,"textFontWeight"])),this.dispose(d.track([o,"textAnchor"],[n,"textAnchor"])),this.dispose(d.track([o,"textOffset"],[n,"textOffset"])),this.dispose(d.track([o,"minFeatureVisibleDistance"],[n,"minFeatureVisibleDistance"])),this.dispose(d.track([o,"maxFeatureVisibleDistance"],[n,"maxFeatureVisibleDistance"])),this.dispose(d.track([o,"heightReference"],[n,"heightReference"])),this.dispose(n.flyToEvent.disposableOn(r=>{if(e.actived){if(n.flyInParam){const{position:s,rotation:a,flyDuration:l}=n.flyInParam;return Be(e.viewer,s,void 0,a,l),!0}o.flyTo(r&&r*1e3)}}));{const r=async(s,a,l)=>{if(!e.actived)return;const u=JSON.parse(JSON.stringify(this._getFeatureByIndexOrProperties(s,a)));if(!(!u||!(u!=null&&u.positions)))if(u.type=="Point"||u.type=="MultiPoint")Ln(e,n,this.id,await this._calculateFeatureHeight(u.type=="MultiPoint"?u.positions.flat():u.positions,n.heightReference,e),1e3,l);else{const h=u.type=="Polygon"||u.type=="MultiPolygon"||u.type=="MultiLineString";let c=[];h?c=u.positions.flat(u.type=="MultiPolygon"?2:1).map(g=>this._calculateFeatureHeight(g,n.fillGround?"CLAMP_TO_GROUND":"NONE",e)):c=u.positions.map(g=>this._calculateFeatureHeight(g,n.strokeGround?"CLAMP_TO_GROUND":"NONE",e));const{minPos:A,maxPos:p,center:f}=V.getMinMaxCorner(c);Ln(e,n,this.id,f,V.getDistancesFromPositions([A,p],"NONE")[0],l)}};this.d(n.flyToFeatureEvent.don((s,a,l)=>r(s,a,l))),this.d(n.flyToFeatureIndexEvent.don((s,a)=>r(s,void 0,a)))}}_getFeatureByIndexOrProperties(n,e){var s,a,l,u,h,c,A,p;const{sceneObject:i}=this,o=i.features;if(!o)return;const r=Reflect.get(o,"features")||Reflect.get(o,"geometries");if(r){if(e){let f=r.find(g=>(g==null?void 0:g.properties[n])==e);return{type:f!=null&&f.coordinates?f.type:(s=f==null?void 0:f.geometry)==null?void 0:s.type,positions:(f==null?void 0:f.coordinates)||((a=f==null?void 0:f.geometry)==null?void 0:a.coordinates)}}else if(typeof n=="number")return{type:(l=r[n])!=null&&l.coordinates?r[n].type:(h=(u=r[n])==null?void 0:u.geometry)==null?void 0:h.type,positions:((c=r[n])==null?void 0:c.coordinates)||((p=(A=r[n])==null?void 0:A.geometry)==null?void 0:p.coordinates)}}}async _calculateFeatureHeight(n,e,i){const o=[...n];return e=="NONE"?o[2]=o[2]??0:e=="CLAMP_TO_GROUND"||!o[2]?o[2]=await i.getTerrainHeight(o)??0:o[2]+=await i.getTerrainHeight(o)??0,o}};L(Pu,"type",Pu.register("ESCesiumViewer",V.ESGeoJson.type,Pu));let Um=Pu;const Tu=class Tu extends en{constructor(e,i){super(e,i);L(this,"_czmGeoESRectangle");L(this,"_geoPolyline");if(this._geoPolyline=this.disposeVar(new Ye(i,e.id)),this._czmGeoESRectangle=this.disposeVar(new gi(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._czmGeoESRectangle,s=this._geoPolyline;s.arcType="RHUMB",this.dispose(d.track([s,"color"],[e,"strokeColor"])),this.dispose(d.track([s,"width"],[e,"strokeWidth"])),this.dispose(d.track([s,"ground"],[e,"strokeGround"])),this.dispose(d.track([r,"ground"],[e,"fillGround"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"]));{const a=()=>{s.show=e.show&&e.stroked,r.show=e.show&&e.filled};a();const l=this.disposeVar(d.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged,e.filledChanged));this.dispose(l.disposableOn(a))}{const a=()=>{e.filled?r.material={type:"Color",color:e.fillColor}:r.material=void 0};a();const l=this.disposeVar(d.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(l.disposableOn(a))}{const a=()=>{const l=e.points;if(l&&l.length>=2){const{minPos:u,maxPos:h}=V.getMinMaxCorner(l);r.rectangle=[u[0],u[1],h[0],h[1]],r.height=l[0][2],r.extrudedHeight=l[0][2];const c=l.map(g=>(l&&(g[2]=l[0][2]),g)),A=c[0],p=c[1],f=[A,[A[0],p[1],A[2]],p,[p[0],A[1],p[2]]];s.positions=[...f,A]}else r.rectangle=void 0,s.positions=void 0,r.height=0,r.extrudedHeight=0};a(),this.dispose(e.pointsChanged.disposableOn(()=>a()))}}get czmGeoESRectangle(){return this._czmGeoESRectangle}flyTo(e,i){const{sceneObject:o,czmViewer:r}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):o.points?(Me(r,o,i,o.points,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmGeoESRectangle:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):o.points?(Me(r,o,i,o.points,e),!0):!1:!1}};L(Tu,"type",Tu.register("ESCesiumViewer",V.ESGeoRectangle.type,Tu));let Om=Tu;class Ml extends d.Destroyable{constructor(e,i){super();L(this,"_flyToEvent",this.disposeVar(new d.Event));L(this,"_geoPolygon");this._geoPolygon=this.disposeVar(new Fr(e,i));const{geoPolygon:o}=this;this.dispose(d.bind([o,"allowPicking"],[this,"allowPicking"])),this.dispose(this.flyToEvent.disposableOn(s=>{o.flyTo(s)})),this.dispose(d.bind([o,"show"],[this,"show"])),this.dispose(d.bind([o,"fill"],[this,"filled"])),this.dispose(d.bind([o,"strokeGround"],[this,"strokeGround"])),this.dispose(d.bind([o,"ground"],[this,"ground"])),this.dispose(d.bind([o,"outline"],[this,"outline"])),this.dispose(d.bind([o,"outlineColor"],[this,"outlineColor"])),this.dispose(d.bind([o,"outlineWidth"],[this,"outlineWidth"])),this.dispose(d.bind([o,"color"],[this,"color"])),this.dispose(d.bind([o,"depth"],[this,"depth"]));const r=()=>{if(this.positions&&this.positions.length>=2){const s=od([...this.positions,this.positions[0]]);o.positions=s}else o.positions=void 0};r(),this.dispose(this.positionsChanged.disposableOn(r))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygon(){return this._geoPolygon}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,strokeGround:!1,ground:!1,outline:!1,filled:!0,outlineColor:d.reactArray([1,1,1,1]),outlineWidth:1,color:d.reactArrayWithUndefined([1,1,1,.5]),positions:d.reactPositions(void 0),depth:0})})(Ml||(Ml={})),d.extendClassProps(Ml.prototype,Ml.createDefaultProps);const Iu=class Iu extends en{constructor(e,i){super(e,i);L(this,"_geoSmoothPolygon");if(this._geoSmoothPolygon=this.disposeVar(new Ml(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._geoSmoothPolygon;this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.bind([r,"positions"],[e,"points"])),this.dispose(d.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(d.track([r,"outline"],[e,"stroked"])),this.dispose(d.track([r,"outlineColor"],[e,"strokeColor"])),this.dispose(d.track([r,"outlineWidth"],[e,"strokeWidth"])),this.dispose(d.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(d.track([r,"filled"],[e,"filled"])),this.dispose(d.track([r,"color"],[e,"fillColor"])),this.dispose(d.track([r,"ground"],[e,"ground"]));{const s=()=>{r.ground=e.ground||e.fillGround};s();const a=this.dv(d.createNextAnimateFrameEvent(e.groundChanged,e.fillGroundChanged));this.d(a.don(s))}{const s=()=>{r.color=e.filled?e.fillColor:Bl.defaults.fillStyle.color};s();const a=this.disposeVar(d.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(a.disposableOn(s))}this.dispose(d.track([r,"depth"],[e,"depth"]))}get geoSmoothPolygon(){return this._geoSmoothPolygon}flyTo(e,i){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):s.positions?(Me(r,o,i,s.positions,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):s.positions?(Me(r,o,i,s.positions,e),!0):!1:!1}};L(Iu,"type",Iu.register("ESCesiumViewer",Bl.type,Iu));let Lm=Iu;const ku=class ku extends Ge{constructor(e,i){super(e,i);L(this,"_czmModel");const o=i.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModel=this.dv(new Qt(i,e.id));const r=this._czmModel;this.d(r.readyEvent.don(a=>{r.gltf.animations&&(r.activeAnimationsJson=r.gltf.animations.map((l,u)=>({index:u,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}))),e.czmModelReadyEvent.emit(a)})),this.ad(new nh(o,this._czmModel)),this.d(d.track([r,"show"],[e,"show"])),this.d(d.track([r,"color"],[e,"czmColor"])),this.d(d.track([r,"nativeMaximumScale"],[e,"czmMaximumScale"])),this.d(d.track([r,"nativeMinimumPixelSize"],[e,"czmMinimumPixelSize"])),this.d(d.bind([r,"position"],[e,"position"])),this.d(d.track([r,"nativeScale"],[e,"czmNativeScale"])),this.d(d.track([r,"scale"],[e,"scale"])),this.ad(d.track([r,"imageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(d.track([r,"environmentMapManager"],[e,"czmEnvironmentMapManager"]));{const a=l=>{e.czmEnvironmentMapManager=e.czmEnvironmentMapManager?{...e.czmEnvironmentMapManager,atmosphereScatteringIntensity:l}:{atmosphereScatteringIntensity:l}};a(e.czmAtmosphereScatteringIntensity),this.ad(e.czmAtmosphereScatteringIntensityChanged.don(l=>a(l)))}{const a=()=>{var l,u;(l=e.czmEnvironmentMapManager)!=null&&l.atmosphereScatteringIntensity&&(e.czmAtmosphereScatteringIntensity=(u=e.czmEnvironmentMapManager)==null?void 0:u.atmosphereScatteringIntensity)};a(),this.ad(e.czmEnvironmentMapManagerChanged.don(a))}{const a=()=>{const l=[...e.rotation??[0,0,0]];l[0]+=e.instances&&e.instances.length!=0?0:90,r.rotation=l};a(),this.d(e.rotationChanged.don(a));{const l=()=>{if(a(),!e.instances){r.instances=e.instances;return}r.instances=e.instances.map(u=>{const h=JSON.parse(JSON.stringify(u));return!h.rotation&&(h.rotation=[0,0,0]),h.rotation[0]+=90,h})};l(),this.ad(e.instancesChanged.don(l))}}this.ad(e.setMaterialEvent.don(a=>{r.setMaterial(a)}));{const a=()=>{const l=[...r.rotation];l[0]-=e.instances&&e.instances.length!=0?0:90,e.rotation=l};a(),this.d(r.rotationChanged.don(a))}{const a=this.dv(d.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),l=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};l(),this.d(a.don(l))}const s=()=>{r.url=V.ESSceneObject.context.getStrFromEnv(ih(typeof e.url=="string"?e.url:e.url.url))};s(),this.d(e.urlChanged.don(s)),this.d(e.setNodePositionEvent.don((a,l)=>{r.setNodeTranslation(a,l)})),this.d(e.setNodeRotationEvent.don((a,l)=>{r.setNodeRotation(a,l)})),this.d(e.setNodeScaleEvent.don((a,l)=>{r.setNodeScale(a,l)})),this.d(e.printDebugInfoEvent.don(()=>{r.printDebugInfo()}))}get model(){return this._czmModel}flyTo(e,i){const{sceneObject:o,czmViewer:r,model:s}=this;return r.actived?o.flyToParam||o.flyInParam?(super.flyTo(e,i),!0):(s&&dn(r,o,i,e,s,!0),!!s):!1}};L(ku,"type",ku.register("ESCesiumViewer",V.ESGltfModel.type,ku));let zm=ku;function nC(t,n){const e=t[0]-n[0],i=t[1]-n[1],o=t[2]-n[2];return Math.sqrt(e*e+i*i+o*o)}class Dl extends d.Destroyable{constructor(e,i){super();L(this,"_pickedEvent",this.disposeVar(new d.Event));L(this,"_flyToEvent",this.disposeVar(new d.Event));L(this,"_distance",this.disposeVar(d.react(0)));L(this,"_surfaceDistance",this.disposeVar(d.react(0)));L(this,"_height",this.disposeVar(d.react(0)));L(this,"_middlePosition",this.disposeVar(d.reactArrayWithUndefined(void 0)));L(this,"_heightPosition",this.disposeVar(d.reactArrayWithUndefined(void 0)));const o=()=>{if(this.positions)if(this.positions.length>=2)if(this._middlePosition.value=[this.positions[0][0],this.positions[0][1],this.positions[1][2]],this._heightPosition.value=[this.positions[0][0],this.positions[0][1],.5*(this.positions[1][2]+this.positions[0][2])],this.arcType===void 0||this.arcType==="GEODESIC"){const s=this._surfaceDistance.value=V.geoDistance(this.positions[0],this.positions[1]),a=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(s*s+a*a)}else if(this.arcType==="RHUMB"){const s=this._surfaceDistance.value=V.geoRhumbDistance(this.positions[0],this.positions[1]),a=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(s*s+a*a)}else if(this.arcType==="NONE"){const s=V.lbhToXyz(this.positions[0]),a=V.lbhToXyz(this.positions[1]);this._distance.value=nC(s,a),this._surfaceDistance.value=nC(V.lbhToXyz(this._middlePosition.value),a),this._height.value=this.positions[1][2]-this.positions[0][2]}else console.warn(`未知的arcType: ${this.arcType},导致距离无法计算!`);else this._heightPosition.value=void 0,this._distance.value=0,this._surfaceDistance.value=0,this._height.value=0};o();const r=this.disposeVar(d.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged));this.dispose(r.disposableOn(o));{const s=this.disposeVar(new Ye(e,i));s.ground=!1,s.loop=!1,this.dispose(d.track([s,"allowPicking"],[this,"allowPicking"])),this.dispose(d.bind([s,"arcType"],[this,"arcType"])),this.dispose(d.bind([s,"color"],[this,"color"])),this.dispose(d.bind([s,"dashLength"],[this,"dashLength"])),this.dispose(d.bind([s,"dashPattern"],[this,"dashPattern"])),this.dispose(d.bind([s,"gapColor"],[this,"gapColor"])),this.dispose(d.bind([s,"hasArrow"],[this,"hasArrow"])),this.dispose(d.bind([s,"hasDash"],[this,"hasDash"])),this.dispose(d.bind([s,"show"],[this,"show"])),this.dispose(d.bind([s,"width"],[this,"width"])),this.dispose(d.bind([s,"depthTest"],[this,"depthTest"]));{s.loop=!0;const l=()=>{if(this.positions&&this.positions.length===2){const[u,h]=this.positions;s.positions=[u,h,[u[0],u[1],h[2]]]}else s.positions=void 0};l(),this.dispose(this.positionsChanged.disposableOn(l))}this.dispose(this.flyToEvent.disposableOn(l=>{e.actived&&s.flyTo(l)}));const a=this.disposeVar(new vt(e,i));this.dispose(d.track([a,"shadowDom"],[this,"shadowDom"])),this.dispose(d.track([a,"cssAllInitial"],[this,"cssAllInitial"])),this.dispose(d.track([a,"show"],[this,"show"]));{const l=()=>{a.position=this.heightPosition};l(),this.dispose(this.heightPositionChanged.disposableOn(l))}{const l=()=>{a.innerHTML=po(`高度: ${rh(this.height)}`,0)};l(),this.dispose(this.heightChanged.disposableOn(l))}this.ad(a.pickedEvent.don(l=>{zi(l)===0&&this.pickedEvent.emit(l)}))}}get pickedEvent(){return this._pickedEvent}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}get surfaceDistance(){return this._surfaceDistance.value}get surfaceDistanceChanged(){return this._surfaceDistance.changed}get height(){return this._height.value}get heightChanged(){return this._height.changed}get middlePosition(){return this._middlePosition.value}get middlePositionChanged(){return this._middlePosition.changed}get heightPosition(){return this._heightPosition.value}get heightPositionChanged(){return this._heightPosition.changed}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,positions:d.reactPositions(void 0),width:1,color:d.reactArray([1,1,1,1]),hasDash:!1,gapColor:d.reactArrayWithUndefined([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",depthTest:!1,shadowDom:!1,cssAllInitial:!1})})(Dl||(Dl={})),d.extendClassProps(Dl.prototype,Dl.createDefaultProps);const Fu=class Fu extends en{constructor(e,i){super(e,i);L(this,"_geoHeightMeasurement");if(this._geoHeightMeasurement=this.disposeVar(new Dl(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const{czmHeightMeasurement:r}=this;this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(d.bind([r,"positions"],[e,"points"]));{const s=()=>{if(e.stroked)r.width=e.strokeWidth;else{r.width=0;return}r.width=e.strokeWidth,r.color=e.strokeColor;const u=e.strokeMaterial??"normal";u==="hasDash"?(r.hasDash=!0,r.hasArrow=!1):u==="hasArrow"?(r.hasDash=!1,r.hasArrow=!0):(r.hasDash=!1,r.hasArrow=!1);const h=e.strokeStyle;if(h.material==="hasDash"&&h.materialParams)try{const c=h.materialParams;Reflect.has(c,"gapColor")&&(r.gapColor=c.gapColor??[0,0,0,0]),Reflect.has(c,"dashLength")&&(r.dashLength=c.dashLength),Reflect.has(c,"dashPattern")&&(r.dashPattern=c.dashPattern)}catch(c){console.error(c)}else r.gapColor=[0,0,0,0],r.dashLength=0,r.dashPattern=0};s();const a=this.disposeVar(d.createNextAnimateFrameEvent(e.strokeStyleChanged,e.strokedChanged));this.dispose(a.disposableOn(s))}this.dispose(r.pickedEvent.disposableOn(s=>{zi(s)===0&&(e.allowPicking??!1)&&e.pickedEvent.emit(s)}))}get czmHeightMeasurement(){return this._geoHeightMeasurement}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):s.positions?(Me(r,o,i,s.positions,e),!0):!1:!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):s.positions?(Me(r,o,i,s.positions,e),!0):!1:!1}};L(Fu,"type",Fu.register("ESCesiumViewer",V.ESHeightMeasurement.type,Fu));let Qm=Fu;const Vm={czmAnimationsStand:[{index:0,name:"Stand",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsWalk:[{index:2,name:"Walk",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsRun:[{index:1,name:"Run",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}]},Bu=class Bu extends Ge{constructor(e,i){super(e,i);L(this,"_czmModelPrimitive");const o=i.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModelPrimitive=this.disposeVar(new Qt(i,this.sceneObject.id));const r=this._czmModelPrimitive;this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.bind([r,"position"],[e,"position"])),this.dispose(Bt([r,"rotation"],[e,"rotation"])),this.dispose(d.bind([r,"scale"],[e,"scale"]));{const g=this.dv(d.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),v=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};v(),this.d(g.don(v))}const s=V.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/worker.glb"),a=V.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/police.glb"),l=V.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/pedestrian.glb"),u=V.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/Stranger.glb"),h=V.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsMan.glb"),c=V.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsWoman.glb"),A=()=>{switch(e.mode){case"worker":r.url=s;break;case"police":r.url=a;break;case"pedestrian":r.url=l;break;case"stranger":r.url=u;break;case"suitMan":r.url=h;break;case"suitWoman":r.url=c;break;default:r.url=s;break}};this.dispose(e.modeChanged.disposableOn(()=>{A()})),A();const p=()=>{const g=e.animation??V.ESHuman.defaults.animation;if(!e.show){r.activeAnimationsJson=void 0;return}g==="walking"?r.activeAnimationsJson=Vm.czmAnimationsWalk:g==="standing"?r.activeAnimationsJson=Vm.czmAnimationsStand:g==="running"&&(r.activeAnimationsJson=Vm.czmAnimationsRun)};p();const f=this.ad(d.createNextAnimateFrameEvent(e.showChanged,e.animationChanged));this.dispose(f.disposableOn(()=>p())),this.ad(new nh(o,r))}get czmModelPrimitive(){return this._czmModelPrimitive}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmModelPrimitive:s}=this;return!r.actived||!r.viewer?!1:o.flyToParam||o.flyInParam?(super.flyTo(e,i),!0):(s&&dn(r,o,i,e,s,!0),!!s)}};L(Bu,"type",Bu.register("ESCesiumViewer",V.ESHuman.type,Bu));let Nm=Bu;class iC extends V.Destroyable{constructor(e,i){super();L(this,"_czmGeoCanvasImagePoi");L(this,"flyTo",(e,i)=>{if(this.czmGeoCanvasImagePoi.position){Be(this.czmViewer.viewer,this.czmGeoCanvasImagePoi.position,1e3,On,e);return}this.czmGeoCanvasImagePoi.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=i,this._czmGeoCanvasImagePoi=this.disposeVar(new hi(i));const o=this._czmGeoCanvasImagePoi;o.pickOnClick=!0,this.d(o.pickedEvent.don(r=>{(e.allowPicking??!1)&&e.pickedEvent.emit(r)}));{const r=h=>{let c=h;return h.includes("inner://")&&(c="${earthsdk3-assets-script-dir}/assets/img/points/"+h.split("inner://")[1]),V.ESSceneObject.context.getStrFromEnv(ih(c))},s=()=>{const h=r(typeof e.url=="string"?e.url:e.url.url);if(o.imageUri=h,e.sizeByContent){const A=new Image;A.src=h,A.onload=()=>{o.size=[A.width,A.height]}}else{const A=e.size;o.size=[...A]}},a=this.disposeVar(d.createNextAnimateFrameEvent(e.urlChanged,e.sizeByContentChanged,e.sizeChanged));this.dispose(a.disposableOn(()=>s())),s(),this.d(d.track([o,"zOrder"],[e,"zOrder"])),this.dispose(d.track([o,"show"],[e,"show"])),this.dispose(d.bind([o,"position"],[e,"position"])),this.ad(d.bind([o,"isHoverZoom"],[e,"isHoverZoom"]));{const h=()=>{o.scale=[e.scale[1],e.scale[2]]};h(),this.dispose(e.scaleChanged.don(h))}const l=()=>{const h=e.anchor,c=e.offset;h?o.originRatioAndOffset=[...h,-c[0],-c[1]]:o.originRatioAndOffset=[0,0,0,0]},u=this.ad(d.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(u.disposableOn(()=>l())),l(),this.dispose(o.clickEvent.disposableOn(h=>{const{offsetX:c,offsetY:A}=h,f={type:h.button===0?"leftClick":h.button===2?"rightClick":void 0,add:{mousePos:[c,A]}};e.widgetEvent.emit(f)})),this.dispose(o.hoveredChanged.disposableOn(h=>{if(h===void 0)return;const c={type:h?"mouseEnter":"mouseLeave"};e.widgetEvent.emit(c)}))}}get czmGeoCanvasImagePoi(){return this._czmGeoCanvasImagePoi}}class rC extends V.Destroyable{constructor(e,i,o){super();L(this,"_czmGeoImageModel");L(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});L(this,"_isPointEvent",!1);L(this,"flyTo",(e,i)=>{if(this.czmGeoImageModel.position)return Ln(this.czmViewer,this.sceneObject,i,this.sceneObject.position,Math.max(...this.czmGeoImageModel.size),e,!0);this.czmGeoImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=i,this._czmGeoImageModel=this.disposeVar(new Wi(i,e.id));const r=this._czmGeoImageModel;this.ad(i.clickEvent.don(A=>{const p=A==null?void 0:A.pointerEvent;p&&(this._isPointEvent=!0,this._eventInfo={type:p.button==0?"leftClick":p.button==2?"rightClick":"leftClick",add:{mousePos:[p.offsetX,p.offsetY]}})})),this.d(e.pickedEvent.don(A=>{var p,f,g;A.screenPosition&&this._isPointEvent&&A.attachedInfo!="innerHoverEvent"&&((p=this._eventInfo.add)!=null&&p.mousePos)&&Math.abs(A.screenPosition[0]-((f=this._eventInfo.add)==null?void 0:f.mousePos[0]))<1&&Math.abs(A.screenPosition[1]-((g=this._eventInfo.add)==null?void 0:g.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),V.registerCreatedEventUpdate(this,e,()=>{const A=i.getEngineObject(e);this.ad(A.lastHoverResultChanged.don((p,f)=>{(p==null?void 0:p.sceneObject)==(f==null?void 0:f.sceneObject)||(p==null?void 0:p.sceneObject)!=e&&(f==null?void 0:f.sceneObject)!=e||(p!=null&&p.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:p==null?void 0:p.screenPosition}},p.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&p.sceneObject.id==e.id&&(r.scale=[r.scale[0]*1.5,r.scale[1]*1.5])),f!=null&&f.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:p==null?void 0:p.screenPosition}},f.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&f.sceneObject.id==e.id&&(r.scale=[r.scale[0]/1.5,r.scale[1]/1.5])))}))});const s=e.sizeByContent,l=(A=>{let p=A;return A.includes("inner://")&&(p="${earthsdk3-assets-script-dir}/assets/img/points/"+A.split("inner://")[1]),V.ESSceneObject.context.getStrFromEnv(ih(p))})(typeof o.sceneObject.url=="string"?o.sceneObject.url:o.sceneObject.url.url),u=new Image;u.src=l,u.onload=()=>{if(s)r.size=[u.width/100,u.height/100];else{const A=e.size;r.size=[A[0]/100,A[1]/100]}},r.uri=l,this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.bind([r,"position"],[e,"position"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"])),r.pixelSize=void 0,r.useAxis="XZ";{const A=()=>{r.scale=[e.scale[1],e.scale[2]]};A(),this.d(e.scaleChanged.don(A))}{const A=()=>{e.rotationType===0&&(r.rotationMode="WithProp",this.d(Bt([r,"rotation"],[e,"rotation"]))),e.rotationType===1&&(r.rotationMode="WithCamera"),e.rotationType===2&&(r.rotationMode="WithCameraOnlyZ")};A(),this.dispose(e.rotationTypeChanged.disposableOn(A))}const h=()=>{const A=e.anchor,p=e.offset;A?r.originRatioAndOffset=[...A,-p[0]/100,-p[1]/100]:r.originRatioAndOffset=[0,0,0,0]},c=this.ad(d.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(c.disposableOn(()=>h())),h()}get czmGeoImageModel(){return this._czmGeoImageModel}}const Mu=class Mu extends Tl{constructor(e,i){super(e,i);L(this,"_resetting");if(!i.viewer){console.warn("viewer is undefined!");return}const r=this.disposeVar(d.createNextAnimateFrameEvent(this.sceneObject.urlChanged,this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged));this._resetting=this.disposeVar(new d.ObjResettingWithEvent(r,()=>this.sceneObject.screenRender?new iC(this.sceneObject,this.czmViewer):new rC(this.sceneObject,this.czmViewer,this)))}get resetting(){return this._resetting}flyTo(e,i){const{sceneObject:o,czmViewer:r,resetting:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(s&&s.obj&&s.obj.flyTo(e,i),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(Mu,"type",Mu.register("ESCesiumViewer",V.ESImageLabel.type,Mu));let Hm=Mu;function z5(t){switch(t){case"wms":return"WebMapServiceImageryProvider";case"tms":return"TileMapServiceImageryProvider";case"wmts":return"WebMapTileServiceImageryProvider";case"xyz":return"UrlTemplateImageryProvider";case"ion":return"IonImageryProvider"}}const Du=class Du extends Un{constructor(e,i){super(e,i);L(this,"_czmImagery");if(this._czmImagery=this.dv(new Nr(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this._czmImagery;{const s=this.ad(d.reactJson(""));{const u=()=>{if(typeof e.url=="string")s.value=V.ESSceneObject.context.getStrFromEnv(e.url);else{const h=e.url;h.url=V.ESSceneObject.context.getStrFromEnv(h.url),s.value=h}};u(),this.ad(e.urlChanged.don(u))}const a=()=>{var f;if(!s.value)return;const u=(((f=e.options)==null?void 0:f.type)??"auto").toLowerCase(),h=e.options??{};let c={type:"UrlTemplateImageryProvider",url:s.value,rectangle:e.rectangle,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,...h},A=s.value,p=typeof A=="string"?A:A.url;if(u==="auto"){const g=p.toLowerCase();if(g.startsWith("ion://")){const y=+g.substring(6);c={...h,assetId:y,type:"IonImageryProvider"}}else if(g.includes("{x}")||g.includes("{y}")||g.includes("{z}"))c.type="UrlTemplateImageryProvider";else if(g.includes("wmts"))c.type="WebMapTileServiceImageryProvider";else if(g.includes("wms"))c.type="WebMapServiceImageryProvider";else{if(p.includes("/tilemapresource.xml")){const v=p.split("/tilemapresource.xml").join("");typeof A=="string"?A=v:A.url=v,c.url=A}c.type="TileMapServiceImageryProvider"}}else{if(u==="tms"&&p.includes("/tilemapresource.xml")){const g=p.split("/tilemapresource.xml").join("");typeof A=="string"?A=g:A.url=g,c.url=A}else if(u==="ion"&&p.startsWith("ion://")){const v=+p.substring(6);c={...h,assetId:v,type:"IonImageryProvider"}}c.type=z5(u)}console.log("imageryProvider",c),r.imageryProvider=c};a();const l=this.dv(d.createNextAnimateFrameEvent(s.changed,e.maximumLevelChanged,e.minimumLevelChanged,e.optionsChanged,e.rectangleChanged));this.d(l.don(a))}this.d(d.track([r,"show"],[e,"show"])),this.d(d.bind([r,"alpha"],[e,"opacity"])),this.d(d.bind([r,"alpha"],[e,"czmAlpha"])),this.d(d.track([r,"splitDirection"],[e,"splitDirection"])),this.d(d.track([r,"brightness"],[e,"czmBrightness"])),this.d(d.track([r,"contrast"],[e,"czmContrast"])),this.d(d.track([r,"hue"],[e,"czmHue"])),this.d(d.track([r,"saturation"],[e,"czmSaturation"])),this.d(d.track([r,"gamma"],[e,"czmGamma"])),this.d(d.track([r,"rectangle"],[e,"rectangle"])),this.d(d.track([r,"zIndex"],[e,"zIndex"])),this.ad(d.track([r,"targetID"],[e,"targetID"]))}get czmImagery(){return this._czmImagery}flyTo(e,i){const{sceneObject:o,czmViewer:r,czmImagery:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(s.flyTo(e&&e),o.flyOverEvent.emit(i,"over",r),!0):!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,czmImagery:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):(s.flyTo(e&&e),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(Du,"type",Du.register("ESCesiumViewer",V.ESImageryLayer.type,Du));let Gm=Du;class Q5 extends d.Destroyable{constructor(e,i,o,r){super();L(this,"_show");L(this,"_czmESCustomPrimitive");L(this,"_czmTexture");this._sceneObject=e,this._show=this.disposeVar(d.react(this._sceneObject.show)),this._czmESCustomPrimitive=this.dv(new st(i,this._sceneObject.id)),this._czmTexture=this.dv(new ht(i));const s=e,a=this._czmESCustomPrimitive,l=this._czmTexture;this.dispose(d.track([a,"show"],[this,"show"])),this.dispose(d.track([a,"show"],[s,"show"])),this.dispose(d.track([a,"allowPicking"],[s,"allowPicking"])),this.dispose(d.track([a,"rotation"],[s,"rotation"])),this.dispose(d.track([a,"position"],[s,"position"])),this.dispose(d.track([a,"scale"],[s,"scale"])),this.ad(s.allowPickingChanged.don(()=>{a.allowPicking=s.allowPicking,a.pass=s.allowPicking?"TRANSLUCENT":"OVERLAY"}));{const u=()=>{const c=s.size/2,A=r[0].map(S=>S*c),p=r[1].map(S=>S*c),f=r[2].map(S=>S*c),g=r[3].map(S=>S*c),v=[...A,...p,...f,...g];let y=[0,3,2,0,2,1];(o=="north"||o=="west"||o=="bottom")&&(y=y.reverse());const m=[0,0],_=[1,0],b=[1,1],E=[0,1];let T=[];o=="east"||o=="south"?T=[..._,...m,...E,...b]:o=="west"?T=[..._,...b,...E,...m]:o=="top"?T=[...E,...b,..._,...m]:T=[...m,..._,...b,...E],a.indexTypedArray=new Uint16Array(y),a.attributes={position:{typedArray:new Float32Array(v),componentsPerAttribute:3},st:{typedArray:new Float32Array(T),componentsPerAttribute:2}},l.uri=V.ESSceneObject.context.getStrFromEnv(`\${earthsdk3-assets-script-dir}/assets/img/skybox/${s.mode}/${o}.${s.mode!="blueSky"?"png":"jpg"}`);const P=i.getCameraInfo();if(P!=null){const I=V.getDistancesFromPositions([s.position,P.position],"NONE")[0]/(s.size/2*s.autoOpacityFactor);this.changeOpacity(s.autoFollow?1:I)}const k=a.computeLocalAxisedBoundingBoxFromAttribute("position");if(!k)return;const{min:U,max:B}=k;a.setLocalAxisedBoundingBox(U,B)};u();const h=this.disposeVar(d.createNextAnimateFrameEvent(s.sizeChanged,s.modeChanged));this.dispose(h.disposableOn(u))}}get show(){return this._show.value}set show(e){this._show.value=e}get showChanged(){return this._show.changed}get czmESCustomPrimitive(){return this._czmESCustomPrimitive}get czmTexture(){return this._czmTexture}changeOpacity(e){this._czmESCustomPrimitive.uniformMap={u_image:{type:"texture",id:this._czmTexture.id},u_color:[1,1,1,1-e>=0?1-e:0]}}}class V5 extends d.Destroyable{constructor(n,e,i){if(super(),!e.viewer)return;let o=!0,r;this.dispose(e.viewer.scene.preUpdate.addEventListener(()=>{s()}));function s(){var l;if(!((l=e.viewer)!=null&&l.camera))return;const a=e.getCameraInfo();if(a!=null&&(r==null||r.position[0]!=a.position[0]||r.position[1]!=a.position[1]||r.position[2]!=a.position[2]||r.rotation[0]!=a.rotation[0]||r.rotation[1]!=a.rotation[1]||r.rotation[2]!=a.rotation[2])){r=a;const h=V.getDistancesFromPositions([n.position,r.position],"NONE")[0]/(n.size/2*n.autoOpacityFactor);n.autoFollow?(n.position=r.position,o&&(o=!1,i.forEach(c=>{c.changeOpacity(1)}))):i.forEach(c=>{c.changeOpacity(h)})}}s()}}const Et=class Et extends Ge{constructor(e,i){super(e,i);L(this,"_czmSkyBoxComponents",[]);if(!i.viewer){console.warn("viewer is undefined!");return}!Et._defaultLocalBox&&Et._firstLoad&&(Et._firstLoad=!1,Et._defaultLocalBox=i.xbsjLocalBoxSources),Et._eSLocalSkyBoxArr.push(e),this.d(()=>{Et._eSLocalSkyBoxArr.includes(e)&&Et._eSLocalSkyBoxArr.splice(Et._eSLocalSkyBoxArr.indexOf(e),1),this.ChangeAutoFollow()});const r={bottom:[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1]],top:[[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],south:[[-1,-1,-1],[1,-1,-1],[1,-1,1],[-1,-1,1]],north:[[-1,1,-1],[1,1,-1],[1,1,1],[-1,1,1]],east:[[1,-1,-1],[1,1,-1],[1,1,1],[1,-1,1]],west:[[-1,1,-1],[-1,1,1],[-1,-1,1],[-1,-1,-1]]};for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)){const a=r[s];this._czmSkyBoxComponents.push(this.dv(new Q5(e,i,s,a)))}{const s=this.disposeVar(d.createNextAnimateFrameEvent(e.autoFollowChanged,e.autoOpacityFactorChanged));this.disposeVar(new d.ObjResettingWithEvent(s,()=>(this.ChangeAutoFollow(),new V5(e,i,this._czmSkyBoxComponents))))}{const s=()=>{this.ChangeAutoFollow()},a=this.disposeVar(d.createNextAnimateFrameEvent(e.sizeChanged,e.modeChanged,e.showChanged));this.dispose(a.disposableOn(s))}}ChangeAutoFollow(){const{czmViewer:e}=this;for(let i=Et._eSLocalSkyBoxArr.length-1;i>=0;i--){const o=Et._eSLocalSkyBoxArr[i];if(o.autoFollow&&o.show){e.xbsjLocalBoxSources={positiveX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/east.${o.mode!="blueSky"?"png":"jpg"}`,negativeX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/west.${o.mode!="blueSky"?"png":"jpg"}`,positiveY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/bottom.${o.mode!="blueSky"?"png":"jpg"}`,negativeY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/top.${o.mode!="blueSky"?"png":"jpg"}`,positiveZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/north.${o.mode!="blueSky"?"png":"jpg"}`,negativeZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/south.${o.mode!="blueSky"?"png":"jpg"}`};break}i==0&&(e.xbsjLocalBoxSources=Et._defaultLocalBox)}Et._eSLocalSkyBoxArr.length==0&&(e.xbsjLocalBoxSources=Et._defaultLocalBox)}flyTo(e,i){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,i);{const s=o.size??V.ESLocalSkyBox.defaults.size;return o.position?(Ln(r,o,i,o.position,s,e,!0),!0):!1}}};L(Et,"type",Et.register("ESCesiumViewer",V.ESLocalSkyBox.type,Et)),L(Et,"_defaultLocalBox"),L(Et,"_firstLoad",!0),L(Et,"_eSLocalSkyBoxArr",[]);let Wm=Et;const Xn=class Xn extends Ge{constructor(e,i){super(e,i);L(this,"_geoCustomDivPoi");L(this,"_textFunc",this.disposeVar(d.react(void 0)));if(this._geoCustomDivPoi=this.disposeVar(new vt(i,e.id)),!i.viewer){console.warn("viewer is undefined!");return}const r=this.geoCustomDivPoi;this.dispose(d.track([r,"show"],[e,"show"])),this.dispose(d.bind([r,"position"],[e,"position"])),this.dispose(d.track([r,"allowPicking"],[e,"allowPicking"]));{this.dispose(r.pickedEvent.disposableOn(s=>{(e.allowPicking??V.ESLocationMeasurement.defaults.allowPicking)&&e.pickedEvent.emit(s)})),this.dispose(r.innerHtmlMounted.disposableOn(s=>{const a=s.firstElementChild;a&&(a.style.pointerEvents="auto",a.style.cursor="default",a.onclick=l=>r.pickFromDiv(a,{type:"viewerPicking",pointerEvent:l}))}));{const s=()=>{if(!e.position)return;const l=(this.textFunc??Xn.defaultTextFunc_度格式)(e.position);r.innerHTML=po(l)};s();const a=this.disposeVar(d.createNextAnimateFrameEvent(e.positionChanged,this.textFuncChanged));this.dispose(a.disposableOn(s))}{const s=()=>{i.lonLatFormat??(i.lonLatFormat="DECIMAL_DEGREE"),this.textFunc=i.lonLatFormat=="DECIMAL_DEGREE"?Xn.defaultTextFunc_度格式:i.lonLatFormat=="DEGREES_DECIMAL_MINUTES"?Xn.defaultTextFunc_度分格式:Xn.defaultTextFunc_度分秒格式};s(),this.d(i.lonLatFormatChanged.don(()=>{s()}))}}}get geoCustomDivPoi(){return this._geoCustomDivPoi}get textFunc(){return this._textFunc.value}set textFunc(e){this._textFunc.value=e}get textFuncChanged(){return this._textFunc.changed}flyTo(e,i){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,i):(s.flyTo(e),o.flyOverEvent.emit(i,"over",r),!0):!1}flyIn(e,i){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:s}=this;return r.actived?o.flyInParam?super.flyIn(e,i):(s.flyTo(e),o.flyOverEvent.emit(i,"over",r),!0):!1}};L(Xn,"type",Xn.register("ESCesiumViewer",V.ESLocationMeasurement.type,Xn)),L(Xn,"defaultTextFunc_度格式",e=>{if(!e)return"";const[i=0,o=0,r=0]=e;return`经度: ${i.toFixed(5)}°
3105
3105
  纬度: ${o.toFixed(5)}°
3106
3106
  高度: ${r.toFixed(2)}m`}),L(Xn,"defaultTextFunc_度分格式",e=>{if(!e)return"";const[i,o,r]=nd(e,!0);return`经度: ${i}
3107
3107
  纬度: ${o}
@@ -4106,10 +4106,10 @@ async function initCesiumViewer(container, czmViewer) {
4106
4106
  `;function mV(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
4107
4107
  github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
4108
4108
  gitee地址:${t}
4109
- `;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const zt=class zt extends V.ESViewer{constructor(e){super(e);L(this,"_disabledInputStack",this.disposeVar(d.react(0)));L(this,"_viewer",this.dv(d.react(void 0)));L(this,"_viewerInstance");L(this,"_viewerLegend");L(this,"pickCustomAttachedInfo");L(this,"_fps",this.dv(d.react(0)));L(this,"_notSupportEditingCount",this.disposeVar(d.react(0)));L(this,"_editingSystem",_f);L(this,"_moveObjectsProcess",this.ad(WS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new $z(this)),this.ad(new Yz(this)),this.dv(new d.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new t6(this)})),this._viewerLegend=this.dv(new cV(this)),this._viewerInstance=this.dv(new d.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Xv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Ie([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new d.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new jQ(this.subContainer,this,o=>this._viewer.value=o,i.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Dn(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,i,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,i)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:i}=this;if(!i)return;const o=C.Cartographic.fromDegrees(e[0],e[1],e[2],zt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Sn(e),rotation:aa(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const s=C.Cartesian3.fromDegrees(...e),a=C.Cartesian3.distance(o.positionWC,s),l=C.Cartesian3.subtract(s,r,new C.Cartesian3);C.Cartesian3.normalize(l,l);const u=C.Transforms.rotationMatrixFromPositionVelocity(r,l,C.Ellipsoid.WGS84),h=C.Matrix4.fromRotationTranslation(u,r);var c=C.Transforms.eastNorthUpToFixedFrame(C.Matrix4.getTranslation(h,new C.Cartesian3),C.Ellipsoid.WGS84,new C.Matrix4),A=C.Matrix4.multiply(C.Matrix4.inverse(c,new C.Matrix4),h,new C.Matrix4),p=C.Matrix4.getMatrix3(A,new C.Matrix3),f=C.Quaternion.fromRotationMatrix(p),g=C.HeadingPitchRoll.fromQuaternion(f);const v=aa(o);return{distance:a,heading:C.Math.toDegrees(g.heading)+90,pitch:C.Math.toDegrees(g.pitch),flyDuration:1,hDelta:-(v[0]-(C.Math.toDegrees(g.heading)+90)),pDelta:v[1]-C.Math.toDegrees(g.pitch)}}flyIn(e,i,o,r="default"){var l;if(!i)return;i[0]=-i[0];const s={position:e,rotation:i,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&Vs(a,s)}flyTo(e,i,o="default"){var p;const{distance:r,heading:s,pitch:a,flyDuration:l,hDelta:u,pDelta:h}=e,c={position:i,viewDistance:r,rotation:[s,a,0],duration:l*1e3,hdelta:u,pdelta:h},A=(p=this.viewer)==null?void 0:p.camera;return A&&Vs(A,c)}flyToBoundingSphere(e,i,o=1){var c;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=V.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:l}=s,u={position:a,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},h=(c=this.viewer)==null?void 0:c.camera;return h&&Vs(h,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Sn(e),rotation:aa(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToWalk(e,i,o),this._navigationMode.value="Walk"}changeToMap(){var e,i;(i=(e=this._viewerInstance)==null?void 0:e.obj)==null||i.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,i,o){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,s,a){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,s),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=C.VERSION,e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=C.Cartographic.fromDegrees(e,i,void 0,zt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await O0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(ft(e));if(i)return[i.x,i.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,i,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&i!=null&&(r.editingID=`${o.callSource}_${d.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=d.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&i.push(a)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=zt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!zt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=zt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return fn(e,i)}localPositionsToPositions(e,i){return mr(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=ft(e),o=new C.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(i))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(i);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},i=zt.defaults;return{...e,more:[...e.more,new V.GroupProperty([],"通用","通用"),new V.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",pV,dV,!0),new V.FunctionProperty([],()=>zt.getCesiumIonToken(),[],"获取官方token"),new V.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new V.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new V.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new V.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new V.GroupProperty([],"Viewer","Viewer"),new V.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new V.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new V.BooleanProperty([this,"shadows"]),new V.GroupProperty([],"比例尺","比例尺(Legend)"),new V.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new V.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new V.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new V.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new V.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new V.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new V.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new V.GroupProperty([],"场景","场景(Scene)"),new V.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new V.GroupProperty([],"Globe","Globe"),new V.BooleanProperty([this,"depthTestAgainstTerrain"],"depthTestAgainstTerrain",i.depthTestAgainstTerrain,!0),new V.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new V.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new V.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new V.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new V.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new V.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new V.BooleanProperty([this,"sceneGlobeShowSkirts"]),new V.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new V.ColorProperty([this,"sceneGlobeBaseColor"]),new V.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new V.JsonProperty([this,"sceneGlobeClippingPlanes"]),new V.StringProperty([this,"sceneGlobeClippingPlanesId"]),new V.JsonProperty([this,"sceneGlobeClippingPolygons"]),new V.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new V.GroupProperty([],"underground","underground"),new V.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new V.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new V.GroupProperty([],"Translucency","Translucency"),new V.BooleanProperty([this,"sceneGlobeTranslucencyEnabled"],"启用",i.sceneGlobeTranslucencyEnabled,!0),new V.NumberProperty([this,"sceneGlobeTranslucencyBackFaceAlpha"],"背面透明度",i.sceneGlobeTranslucencyBackFaceAlpha,!0),new V.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new V.NumberProperty([this,"sceneGlobeTranslucencyFrontFaceAlpha"],"正面透明度",i.sceneGlobeTranslucencyFrontFaceAlpha,!0),new V.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new V.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new V.GroupProperty([],"Sun","Sun"),new V.BooleanProperty([this,"sun"],"sun",i.sun,!0),new V.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new V.GroupProperty([],"Moon","Moon"),new V.BooleanProperty([this,"moon"],"moon",i.moon,!0),new V.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new V.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new V.GroupProperty([],"SkyBox","SkyBox"),new V.BooleanProperty([this,"sceneSkyBoxShow"]),new V.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new V.GroupProperty([],"Background","Background"),new V.BooleanProperty([this,"xbsjUseBackground"]),new V.StringProperty([this,"xbsjBackgroundImageUri"]),new V.ColorProperty([this,"xbsjBackgroundColor"]),new V.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new V.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new V.ColorProperty([this,"sceneBackgroundColor"]),new V.GroupProperty([],"Fog","Fog"),new V.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new V.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new V.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new V.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new V.GroupProperty([],"Sscc","Sscc"),new V.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new V.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new V.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new V.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new V.GroupProperty([],"后处理","后处理"),new V.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new V.GroupProperty([],"环境遮蔽","环境遮蔽"),new V.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new V.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new V.GroupProperty([],"Bloom","Bloom"),new V.BooleanProperty([this,"scenePpsBloomEnabled"]),new V.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new V.NumberProperty([this,"scenePpsBloomContrast"]),new V.NumberProperty([this,"scenePpsBloomBrightness"]),new V.NumberProperty([this,"scenePpsBloomDelta"]),new V.NumberProperty([this,"scenePpsBloomSigma"]),new V.NumberProperty([this,"scenePpsBloomStepSize"]),new V.GroupProperty([],"调试","调试"),new V.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new V.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new V.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new V.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new V.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new V.GroupProperty([],"Inspector","Inspector"),new V.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new V.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new V.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};L(zt,"type",zt.register("ESCesiumViewer",zt)),L(zt,"getCesiumIonToken",mV),L(zt,"currentDefaultAccessToken",C.Ion.defaultAccessToken),L(zt,"latestDefaultAccessToken"),L(zt,"ObjectsToExcludeWrapper",e6),L(zt,"defaults",{...V.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,depthTestAgainstTerrain:!1,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyEnabled:!1,sceneGlobeTranslucencyBackFaceAlpha:1,sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlpha:1,sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:C.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),L(zt,"getHeightsScartchCarto",new C.Cartographic);let tt=zt;(t=>{t.createDefaultProps=()=>({...V.ESViewer.createDefaultProps(),...fV()})})(tt||(tt={})),d.extendClassProps(tt.prototype,tt.createDefaultProps),ae.copyright=void 0;try{const t="earthsdk3-cesium",n="3.4.1",e="2025-09-16T08:13:00.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="edc6b1a5e35b2412fad91ee205c768829c64b897",a=((Date.now()-175801038e4)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${a}个小时)
4109
+ `;console.log(e);const i=window.prompt(e,t);i&&window.open(i,"_blank")}const zt=class zt extends V.ESViewer{constructor(e){super(e);L(this,"_disabledInputStack",this.disposeVar(d.react(0)));L(this,"_viewer",this.dv(d.react(void 0)));L(this,"_viewerInstance");L(this,"_viewerLegend");L(this,"pickCustomAttachedInfo");L(this,"_fps",this.dv(d.react(0)));L(this,"_notSupportEditingCount",this.disposeVar(d.react(0)));L(this,"_editingSystem",_f);L(this,"_moveObjectsProcess",this.ad(WS()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new $z(this)),this.ad(new Yz(this)),this.dv(new d.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new t6(this)})),this._viewerLegend=this.dv(new cV(this)),this._viewerInstance=this.dv(new d.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new Xv(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=Ie([1,1,1,1]))}));const i=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new d.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new jQ(this.subContainer,this,o=>this._viewer.value=o,i.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Dn(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,i,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,i)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:i}=this.extensions;return await i.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:i}=this;if(!i)return;const o=C.Cartographic.fromDegrees(e[0],e[1],e[2],zt.getHeightsScartchCarto);return i.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Sn(e),rotation:aa(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const s=C.Cartesian3.fromDegrees(...e),a=C.Cartesian3.distance(o.positionWC,s),l=C.Cartesian3.subtract(s,r,new C.Cartesian3);C.Cartesian3.normalize(l,l);const u=C.Transforms.rotationMatrixFromPositionVelocity(r,l,C.Ellipsoid.WGS84),h=C.Matrix4.fromRotationTranslation(u,r);var c=C.Transforms.eastNorthUpToFixedFrame(C.Matrix4.getTranslation(h,new C.Cartesian3),C.Ellipsoid.WGS84,new C.Matrix4),A=C.Matrix4.multiply(C.Matrix4.inverse(c,new C.Matrix4),h,new C.Matrix4),p=C.Matrix4.getMatrix3(A,new C.Matrix3),f=C.Quaternion.fromRotationMatrix(p),g=C.HeadingPitchRoll.fromQuaternion(f);const v=aa(o);return{distance:a,heading:C.Math.toDegrees(g.heading)+90,pitch:C.Math.toDegrees(g.pitch),flyDuration:1,hDelta:-(v[0]-(C.Math.toDegrees(g.heading)+90)),pDelta:v[1]-C.Math.toDegrees(g.pitch)}}flyIn(e,i,o,r="default"){var l;if(!i)return;i[0]=-i[0];const s={position:e,rotation:i,duration:(o??1)*1e3},a=(l=this.viewer)==null?void 0:l.camera;return a&&Vs(a,s)}flyTo(e,i,o="default"){var p;const{distance:r,heading:s,pitch:a,flyDuration:l,hDelta:u,pDelta:h}=e,c={position:i,viewDistance:r,rotation:[s,a,0],duration:l*1e3,hdelta:u,pdelta:h},A=(p=this.viewer)==null?void 0:p.camera;return A&&Vs(A,c)}flyToBoundingSphere(e,i,o=1){var c;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=V.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:l}=s,u={position:a,viewDistance:i??l,rotation:[0,-90,0],duration:o*1e3},h=(c=this.viewer)==null?void 0:c.camera;return h&&Vs(h,u)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Sn(e),rotation:aa(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,i=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToWalk(e,i,o),this._navigationMode.value="Walk"}changeToMap(){var e,i;(i=(e=this._viewerInstance)==null?void 0:e.obj)==null||i.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,i,o){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,i,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,i,o,r,s,a){var l,u;(u=(l=this._viewerInstance)==null?void 0:l.obj)==null||u.navigationManager.changeToLine(e,i,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToRotatePoint(e,i,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,i,o,r,s){var a,l;(l=(a=this._viewerInstance)==null?void 0:a.obj)==null||l.navigationManager.changeToFollow(e,i,o,r,s),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=C.VERSION,e}async getHeightByLonLat(e,i,o){if(!this.viewer)return null;const r=C.Cartographic.fromDegrees(e,i,void 0,zt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,i){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,i){if(this.viewer)return await O0(this.viewer.scene,e,i)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const i=this.viewer.scene.cartesianToCanvasCoordinates(ft(e));if(i)return[i.x,i.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,i,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&i!=null&&(r.editingID=`${o.callSource}_${d.createGuid()}`,this._editingSystem.create(this,r,i,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const i=[],o=d.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&i.push(a)}this._moveObjectsProcess.restart(void 0,this,i,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=zt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!zt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=zt.latestDefaultAccessToken}positionsToLocalPositions(e,i){return fn(e,i)}localPositionsToPositions(e,i){return mr(e,i)}isPointVisible(e){if(!this.viewer)return!1;const i=ft(e),o=new C.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(i))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(i);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},i=zt.defaults;return{...e,more:[...e.more,new V.GroupProperty([],"通用","通用"),new V.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",pV,dV,!0),new V.FunctionProperty([],()=>zt.getCesiumIonToken(),[],"获取官方token"),new V.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new V.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new V.BooleanProperty([this,"flashLighting"],"头顶灯",i.flashLighting,!0),new V.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",i.particleGlobalControl,!0),new V.GroupProperty([],"Viewer","Viewer"),new V.NumberProperty([this,"resolutionScale"],"分辨率比率",i.resolutionScale,!0),new V.NumberProperty([this,"msaaSamples"],"msaaSamples",i.msaaSamples,!0),new V.BooleanProperty([this,"shadows"]),new V.GroupProperty([],"比例尺","比例尺(Legend)"),new V.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new V.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new V.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new V.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new V.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new V.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new V.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new V.GroupProperty([],"场景","场景(Scene)"),new V.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",i.sceneSplitPosition,!0),new V.GroupProperty([],"Globe","Globe"),new V.BooleanProperty([this,"depthTestAgainstTerrain"],"depthTestAgainstTerrain",i.depthTestAgainstTerrain,!0),new V.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",i.sceneGlobeShadows,!0),new V.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new V.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new V.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new V.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new V.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new V.BooleanProperty([this,"sceneGlobeShowSkirts"]),new V.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new V.ColorProperty([this,"sceneGlobeBaseColor"]),new V.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new V.JsonProperty([this,"sceneGlobeClippingPlanes"]),new V.StringProperty([this,"sceneGlobeClippingPlanesId"]),new V.JsonProperty([this,"sceneGlobeClippingPolygons"]),new V.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new V.GroupProperty([],"underground","underground"),new V.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",i.sceneGlobeUndergroundColor,!0),new V.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",i.sceneGlobeUndergroundColorAlphaByDistance,!0),new V.GroupProperty([],"Translucency","Translucency"),new V.BooleanProperty([this,"sceneGlobeTranslucencyEnabled"],"启用",i.sceneGlobeTranslucencyEnabled,!0),new V.NumberProperty([this,"sceneGlobeTranslucencyBackFaceAlpha"],"背面透明度",i.sceneGlobeTranslucencyBackFaceAlpha,!0),new V.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",i.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new V.NumberProperty([this,"sceneGlobeTranslucencyFrontFaceAlpha"],"正面透明度",i.sceneGlobeTranslucencyFrontFaceAlpha,!0),new V.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",i.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new V.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",i.sceneGlobeTranslucencyRectangle,!0),new V.GroupProperty([],"Sun","Sun"),new V.BooleanProperty([this,"sun"],"sun",i.sun,!0),new V.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",i.sceneSunGlowFactor,!0),new V.GroupProperty([],"Moon","Moon"),new V.BooleanProperty([this,"moon"],"moon",i.moon,!0),new V.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",i.sceneMoonTextureUrl,!0),new V.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",i.sceneMoonOnlySunLighting,!0),new V.GroupProperty([],"SkyBox","SkyBox"),new V.BooleanProperty([this,"sceneSkyBoxShow"]),new V.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",i.sceneSkyBoxSources,void 0,!0),new V.GroupProperty([],"Background","Background"),new V.BooleanProperty([this,"xbsjUseBackground"]),new V.StringProperty([this,"xbsjBackgroundImageUri"]),new V.ColorProperty([this,"xbsjBackgroundColor"]),new V.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new V.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",i.xbsjLocalBoxSources,void 0,!0),new V.ColorProperty([this,"sceneBackgroundColor"]),new V.GroupProperty([],"Fog","Fog"),new V.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",i.sceneFogEnabled,!0),new V.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",i.sceneFogDensity,!0),new V.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",i.sceneFogScreenSpaceErrorFactor,!0),new V.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",i.sceneFogMinimumBrightness,!0),new V.GroupProperty([],"Sscc","Sscc"),new V.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",i.sceneSsccEnableInputs,!0),new V.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",i.sceneSsccEnableCollisionDetection,!0),new V.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",i.sceneSsccZoomFactor,!0),new V.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new V.GroupProperty([],"后处理","后处理"),new V.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",i.scenePpsfxaaEnabled,!0),new V.GroupProperty([],"环境遮蔽","环境遮蔽"),new V.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new V.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new V.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new V.GroupProperty([],"Bloom","Bloom"),new V.BooleanProperty([this,"scenePpsBloomEnabled"]),new V.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new V.NumberProperty([this,"scenePpsBloomContrast"]),new V.NumberProperty([this,"scenePpsBloomBrightness"]),new V.NumberProperty([this,"scenePpsBloomDelta"]),new V.NumberProperty([this,"scenePpsBloomSigma"]),new V.NumberProperty([this,"scenePpsBloomStepSize"]),new V.GroupProperty([],"调试","调试"),new V.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",i.sceneDebugShowFramesPerSecond,!0),new V.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",i.sceneDebugShowCommands,!0),new V.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",i.sceneDebugShowFrustums,!0),new V.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",i.sceneDebugShowFrustumPlanes,!0),new V.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",i.sceneDebugShowDepthFrustum,!0),new V.GroupProperty([],"Inspector","Inspector"),new V.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",i.showCesiumInspector,!0),new V.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",i.cesiumInspectorWireframe,!0),new V.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",i.showCesium3DTilesInspector,!0)]}}};L(zt,"type",zt.register("ESCesiumViewer",zt)),L(zt,"getCesiumIonToken",mV),L(zt,"currentDefaultAccessToken",C.Ion.defaultAccessToken),L(zt,"latestDefaultAccessToken"),L(zt,"ObjectsToExcludeWrapper",e6),L(zt,"defaults",{...V.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,depthTestAgainstTerrain:!1,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyEnabled:!1,sceneGlobeTranslucencyBackFaceAlpha:1,sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlpha:1,sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:C.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:C.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),L(zt,"getHeightsScartchCarto",new C.Cartographic);let tt=zt;(t=>{t.createDefaultProps=()=>({...V.ESViewer.createDefaultProps(),...fV()})})(tt||(tt={})),d.extendClassProps(tt.prototype,tt.createDefaultProps),ae.copyright=void 0;try{const t="earthsdk3-cesium",n="3.4.2",e="2025-09-18T02:13:26.000Z",i="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="3d737339ba5ffdc4be0b07ea49fd20497f22db07",a=((Date.now()-1758161606e3)/36e5).toFixed(1),l=`%c🌏 ${t}%c ${n}.${r.slice(0,8)}.${e} (距今${a}个小时)
4110
4110
  %c${o?o+`
4111
4111
  `:""}当前网站正在使用${t},此软件版权归${i}所有
4112
- `;ae.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","edc6b1a5e35b2412fad91ee205c768829c64b897")},get info(){return l},get date(){return"2025-09-16T08:13:00.000Z"},get author(){return"suplyang"},get version(){return"3.4.1"},get name(){return"earthsdk3-cesium"},get commitId(){return"edc6b1a5e35b2412fad91ee205c768829c64b897"},print(){console.info(this.info,`
4112
+ `;ae.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","3d737339ba5ffdc4be0b07ea49fd20497f22db07")},get info(){return l},get date(){return"2025-09-18T02:13:26.000Z"},get author(){return"suplyang"},get version(){return"3.4.2"},get name(){return"earthsdk3-cesium"},get commitId(){return"3d737339ba5ffdc4be0b07ea49fd20497f22db07"},print(){console.info(this.info,`
4113
4113
  font-size: 18px;
4114
4114
  font-weight: 1000;
4115
4115
  line-height: 1;
@@ -28056,7 +28056,7 @@ const Wa = class Wa extends Re {
28056
28056
  {
28057
28057
  const a = () => {
28058
28058
  const l = [...n.rotation];
28059
- l[0] -= e.instances ? 0 : 90, e.rotation = l;
28059
+ l[0] -= e.instances && e.instances.length != 0 ? 0 : 90, e.rotation = l;
28060
28060
  };
28061
28061
  a(), this.d(n.rotationChanged.don(a));
28062
28062
  }
@@ -49901,7 +49901,7 @@ let Ge = Pt;
49901
49901
  ae(Ge.prototype, Ge.createDefaultProps);
49902
49902
  let Qp;
49903
49903
  try {
49904
- const t = "earthsdk3-cesium", i = "3.4.1", e = "2025-09-16T08:13:00.000Z", s = "北京西部世界科技有限公司", o = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "edc6b1a5e35b2412fad91ee205c768829c64b897", a = ((Date.now() - 175801038e4) / 36e5).toFixed(1), l = `%c🌏 ${t}%c ${i}.${n.slice(0, 8)}.${e} (距今${a}个小时)
49904
+ const t = "earthsdk3-cesium", i = "3.4.2", e = "2025-09-18T02:13:26.000Z", s = "北京西部世界科技有限公司", o = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", n = "3d737339ba5ffdc4be0b07ea49fd20497f22db07", a = ((Date.now() - 1758161606e3) / 36e5).toFixed(1), l = `%c🌏 ${t}%c ${i}.${n.slice(0, 8)}.${e} (距今${a}个小时)
49905
49905
  %c${o ? o + `
49906
49906
  ` : ""}当前网站正在使用${t},此软件版权归${s}所有
49907
49907
  `;
@@ -49915,7 +49915,7 @@ try {
49915
49915
  },
49916
49916
  // @ts-ignore
49917
49917
  get gituri() {
49918
- return GITURI_ && GITURI_.replace("${commitId}", "edc6b1a5e35b2412fad91ee205c768829c64b897");
49918
+ return GITURI_ && GITURI_.replace("${commitId}", "3d737339ba5ffdc4be0b07ea49fd20497f22db07");
49919
49919
  },
49920
49920
  // @ts-ignore
49921
49921
  get info() {
@@ -49923,7 +49923,7 @@ try {
49923
49923
  },
49924
49924
  // @ts-ignore
49925
49925
  get date() {
49926
- return "2025-09-16T08:13:00.000Z";
49926
+ return "2025-09-18T02:13:26.000Z";
49927
49927
  },
49928
49928
  // @ts-ignore
49929
49929
  get author() {
@@ -49931,7 +49931,7 @@ try {
49931
49931
  },
49932
49932
  // @ts-ignore
49933
49933
  get version() {
49934
- return "3.4.1";
49934
+ return "3.4.2";
49935
49935
  },
49936
49936
  // @ts-ignore
49937
49937
  get name() {
@@ -49939,7 +49939,7 @@ try {
49939
49939
  },
49940
49940
  // @ts-ignore
49941
49941
  get commitId() {
49942
- return "edc6b1a5e35b2412fad91ee205c768829c64b897";
49942
+ return "3d737339ba5ffdc4be0b07ea49fd20497f22db07";
49943
49943
  },
49944
49944
  print() {
49945
49945
  console.info(
@@ -1250,7 +1250,7 @@ export type IndexJsonType = {
1250
1250
  \`\`\`
1251
1251
  ${p0}
1252
1252
  \`\`\`
1253
- `,Ye=class Ye extends l.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new l.Event));v(this,"_loadFuncReact",this.disposeVar(l.react(void 0)));v(this,"_dataSource",this.disposeVar(l.react(void 0)));v(this,"_data");v(this,"_defaultHeight",{});v(this,"_defaultBoundingSphere",new h.BoundingSphere);const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}let r=()=>{this.dataSource&&o.dataSources.remove(this.dataSource,!0),this.dataSource=void 0,this._data=void 0};this.dispose(()=>{r()});{const s=this.dv(l.createProcessingFromAsyncFunc(async d=>{this.dataSource&&r(),this.url&&(typeof this.url=="object"?this._data=this.url:w.isJSON(this.url)?this._data=JSON.parse(this.url):await fetch(w.ESSceneObject.context.getStrFromEnv(this.url)).then(u=>u.json()).then(u=>{this._data=u}).catch(u=>{console.warn("ESGeoJson数据加载失败",u)}),this.dataSource=await h.GeoJsonDataSource.load(this._data),o.dataSources.add(this.dataSource).then(u=>{var f,g;const p=[];for(const m of u.entities.values)if(h.Entity.prototype&&(m.ESSceneObjectID=n),this._isEntityShow(m,e),m.polygon&&p.push(...(f=m.polygon.hierarchy)==null?void 0:f.getValue(h.JulianDate.now()).positions),m.polyline&&p.push(...(g=m.polyline.positions)==null?void 0:g.getValue(h.JulianDate.now())),m.position){const y=m.position.getValue(h.JulianDate.now());y&&p.push(y)}this._defaultBoundingSphere=h.BoundingSphere.fromPoints(p)}))})),a=()=>{s.isRunning&&s.cancel(),s.restart()};a();const c=this.dv(l.createNextAnimateFrameEvent(this.loadFunChanged,this.urlChanged));this.dispose(c.don(a))}{const s=()=>{var c,d;if(this.dataSource)if(this.dataSource.show=this.show,this.loadFun)try{this.loadFun(this.dataSource)}catch(u){console.error(u)}else{const u=this.dataSource.entities.values;for(let p=0;p<u.length;p++){const f=u[p];if(f.polygon){this._defaultHeight[f.id]||(this._defaultHeight[f.id]=(c=f.polygon.height)==null?void 0:c.getValue(h.JulianDate.now())),f.polygon.height=this.fillGround?void 0:new h.ConstantProperty(this._defaultHeight[f.id]),f.polygon.perPositionHeight=new h.ConstantProperty(!this.fillGround),f.polygon.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND),f.polygon.show=new h.ConstantProperty(this.filled??Ye.defaults.filled),f.polygon.material=new h.ColorMaterialProperty(new h.Color(...this.fillColor??Ye.defaults.fillColor)),f.polygon.outline=new h.ConstantProperty(!1),f.polyline=new h.PolylineGraphics;const g=JSON.parse(JSON.stringify((d=f.polygon.hierarchy)==null?void 0:d.getValue(h.JulianDate.now()).positions));h.Cartesian3.equals(g[0],g[g.length-1])||g.push(g[0]),f.polyline.positions=g}if(f.polyline&&(f.polyline.show=new h.ConstantProperty(this.stroked??Ye.defaults.stroked),f.polyline.width=new h.ConstantProperty(this.strokeWidth??Ye.defaults.strokeWidth),f.polyline.material=new h.ColorMaterialProperty(new h.Color(...this.strokeColor??Ye.defaults.strokeColor)),f.polyline.clampToGround=new h.ConstantProperty(this.strokeGround)),f.billboard){f.billboard.show=new h.ConstantProperty(this.imageShow??Ye.defaults.imageShow),f.billboard.width=new h.ConstantProperty(this.imageSize?this.imageSize[0]:Ye.defaults.imageSize[0]),f.billboard.height=new h.ConstantProperty(this.imageSize?this.imageSize[1]:Ye.defaults.imageSize[1]);const g=this.imageUrl?typeof this.imageUrl=="string"?this.imageUrl:this.imageUrl.url:Ye.defaults.imageUrl;f.billboard.image=new h.ConstantProperty(w.ESSceneObject.context.getStrFromEnv(g)),f.billboard.horizontalOrigin=new h.ConstantProperty(h.HorizontalOrigin.LEFT),f.billboard.verticalOrigin=new h.ConstantProperty(h.VerticalOrigin.TOP),f.billboard.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND);const m=this.imageAnchor??Ye.defaults.imageAnchor,y=this.imageOffset??Ye.defaults.imageOffset;if(f.billboard.pixelOffset=new h.ConstantProperty(h.Cartesian2.fromArray([-m[0]*f.billboard.width.getValue(h.JulianDate.now())+y[0],-m[1]*f.billboard.height.getValue(h.JulianDate.now())+y[1]])),f.label=new h.LabelGraphics,!f.label)return;f.label.show=new h.ConstantProperty(this.textShow??Ye.defaults.textShow),f.label.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND),f.label.text=new h.ConstantProperty(this.textProperty&&this.textProperty!==""&&f.properties&&f.properties[this.textProperty]?f.properties[this.textProperty].getValue():this.textDefaultText??Ye.defaults.textDefaultText),f.label.fillColor=new h.ConstantProperty(new h.Color(...this.textColor??Ye.defaults.textColor)),f.label.showBackground=new h.ConstantProperty(this.textBackgroundColor!=null);const P=this.textFontSize&&this.textFontSize!=0?this.textFontSize:Ye.defaults.textFontSize,S=this.textOffset??Ye.defaults.textOffset;f.label.backgroundColor=new h.ConstantProperty(new h.Color(...this.textBackgroundColor??Ye.defaults.textBackgroundColor)),f.label.font=new h.ConstantProperty(`${this.textFontStyle} ${this.textFontWeight} ${P}px ${this.textFontFamily??Ye.defaults.textFontFamily}`),f.label.horizontalOrigin=new h.ConstantProperty(h.HorizontalOrigin.LEFT),f.label.verticalOrigin=new h.ConstantProperty(h.VerticalOrigin.TOP),f.label.eyeOffset=new h.ConstantProperty(h.Cartesian3.fromArray([0,0,-1]));const C=this.textAnchor??Ye.defaults.textAnchor;f.label.pixelOffset=new h.ConstantProperty(h.Cartesian2.fromArray([-C[0]*((this.textBackgroundColor?-14:0)+this._getTextPixelWidth(f.label.text.getValue(h.JulianDate.now()),f.label.font.getValue(h.JulianDate.now())))+S[0],-C[1]*((this.textBackgroundColor?10:0)+P)+S[1]]))}}}};s();const a=this.dv(l.createNextAnimateFrameEvent(this._dataSource.changed,this.showChanged,this.strokedChanged,this.strokeWidthChanged,this.strokeWidthTypeChanged,this.strokeColorChanged,this.strokeMaterialChanged,this.strokeMaterialParamsChanged,this.strokeGroundChanged,this.filledChanged,this.fillColorChanged,this.fillMaterialChanged,this.fillMaterialParamsChanged,this.fillGroundChanged,this.imageShowChanged,this.imageUrlChanged,this.imageSizeChanged,this.imageAnchorChanged,this.imageOffsetChanged,this.textShowChanged,this.textPropertyChanged,this.textDefaultTextChanged,this.textColorChanged,this.textBackgroundColorChanged,this.textFontFamilyChanged,this.textFontSizeChanged,this.textFontStyleChanged,this.textFontWeightChanged,this.textAnchorChanged,this.textOffsetChanged,this.heightReferenceChanged));this.dispose(a.don(s))}{const s=()=>{if(!this.dataSource)return;const c=this.dataSource.entities.values;for(let d=0;d<c.length;d++){const u=c[d];this._isEntityShow(u,e)}};s();const a=this.ad(l.createNextAnimateFrameEvent(this.minFeatureVisibleDistanceChanged,this.maxFeatureVisibleDistanceChanged,e.cameraChanged,this.showChanged));this.ad(a.don(s))}{const s=()=>{if(this.loadFuncStr)try{const a=Function(`"use strict";return (${this.loadFuncStr})`)();this.loadFun=a}catch(a){console.error(a),this.loadFun=void 0}else this.loadFun=void 0};s(),this.dispose(this.loadFuncStrChanged.disposableOn(s))}this.dispose(this.flyToEvent.disposableOn(s=>{e.actived&&this.dataSource&&(s!==void 0?o.flyTo(this.dataSource,{duration:s/1e3}).then(a=>{a||o.camera.flyToBoundingSphere(this._defaultBoundingSphere,{duration:s/1e3})}):o.flyTo(this.dataSource).then(a=>{a||o.camera.flyToBoundingSphere(this._defaultBoundingSphere)}))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get loadFun(){return this._loadFuncReact.value}set loadFun(e){this._loadFuncReact.value=e}get loadFunChanged(){return this._loadFuncReact.changed}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}_getTextPixelWidth(e,n="16px sans-serif"){const r=document.createElement("canvas").getContext("2d");return r.font=n,r.measureText(e).width}_isEntityShow(e,n){var o;if(this.minFeatureVisibleDistance==0&&this.maxFeatureVisibleDistance==0){e.show=this.show;return}if((o=n.viewer)!=null&&o.camera&&this.show){let r;if(e.polygon&&e.polygon.hierarchy)r=w.getMinMaxCorner(e.polygon.hierarchy.getValue(h.JulianDate.now()).positions.map(c=>ce(c))).center;else if(e.polyline&&e.polyline.positions)r=w.getMinMaxCorner(e.polyline.positions.getValue(h.JulianDate.now()).map(c=>ce(c))).center;else if(e.position){const c=e.position.getValue(h.JulianDate.now());c&&(r=ce(c))}if(!r||isNaN(r[0]))return;const s=w.getDistancesFromPositions([r,Vt(n.viewer.camera)],"NONE")[0];let a=!1;this.minFeatureVisibleDistance<this.maxFeatureVisibleDistance?a=this.minFeatureVisibleDistance<s&&s<this.maxFeatureVisibleDistance:this.maxFeatureVisibleDistance==0?a=s>this.minFeatureVisibleDistance:this.minFeatureVisibleDistance==0&&(a=s<this.maxFeatureVisibleDistance),e.show=this.show&&a}}};v(Ye,"defaults",{show:!0,allowPicking:!0,url:f0,defaultLoadFuncStr:p0,defaultLoadFuncDocStr:TI,data:EI,dataMd:AI,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/misc/location.png",imageSize:[64,64],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:[.79,.91,.06,1],textFontFamily:"Arial",textFontSize:16,textFontWeight:"normal",textFontStyle:"normal",textAnchor:[.5,1],textOffset:[0,0],strokeWidthTypes:[["screen","screen"],["world","world"]],minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let Eo=Ye;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:void 0,loadFuncStr:void 0,url:void 0,stroked:void 0,strokeWidth:void 0,strokeWidthType:"world",strokeColor:l.reactArrayWithUndefined(void 0),strokeMaterial:void 0,strokeMaterialParams:l.reactJsonWithUndefined(void 0),strokeGround:void 0,filled:void 0,fillColor:l.reactArrayWithUndefined(void 0),fillMaterial:void 0,fillMaterialParams:l.reactJsonWithUndefined(void 0),fillGround:void 0,imageShow:void 0,imageUrl:void 0,imageSize:l.reactArrayWithUndefined(void 0),imageAnchor:l.reactArrayWithUndefined(void 0),imageOffset:l.reactArrayWithUndefined(void 0),textShow:void 0,textProperty:void 0,textDefaultText:void 0,textColor:l.reactArrayWithUndefined(void 0),textBackgroundColor:l.reactArrayWithUndefined(void 0),textFontFamily:void 0,textFontSize:void 0,textFontStyle:void 0,textFontWeight:void 0,textAnchor:l.reactArrayWithUndefined(void 0),textOffset:l.reactArrayWithUndefined(void 0),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})})(Eo||(Eo={})),l.extendClassProps(Eo.prototype,Eo.createDefaultProps);const Da=class Da extends Qt{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}const o=this.disposeVar(new Eo(e,i.id));this.dispose(l.track([o,"show"],[i,"show"])),this.dispose(l.track([o,"allowPicking"],[i,"allowPicking"])),this.dispose(l.track([o,"loadFuncStr"],[i,"loadFuncStr"])),this.dispose(l.track([o,"url"],[i,"features"])),this.dispose(l.track([o,"stroked"],[i,"stroked"])),this.dispose(l.track([o,"strokeWidth"],[i,"strokeWidth"])),this.dispose(l.track([o,"strokeWidthType"],[i,"strokeWidthType"])),this.dispose(l.track([o,"strokeColor"],[i,"strokeColor"])),this.dispose(l.track([o,"strokeMaterial"],[i,"strokeMaterial"])),this.dispose(l.track([o,"strokeMaterialParams"],[i,"strokeMaterialParams"])),this.dispose(l.track([o,"strokeGround"],[i,"strokeGround"])),this.dispose(l.track([o,"filled"],[i,"filled"])),this.dispose(l.track([o,"fillColor"],[i,"fillColor"])),this.dispose(l.track([o,"fillMaterial"],[i,"fillMaterial"])),this.dispose(l.track([o,"fillMaterialParams"],[i,"fillMaterialParams"])),this.dispose(l.track([o,"fillGround"],[i,"fillGround"])),this.dispose(l.track([o,"imageShow"],[i,"imageShow"])),this.dispose(l.track([o,"imageUrl"],[i,"imageUrl"])),this.dispose(l.track([o,"imageSize"],[i,"imageSize"])),this.dispose(l.track([o,"imageAnchor"],[i,"imageAnchor"])),this.dispose(l.track([o,"imageOffset"],[i,"imageOffset"])),this.dispose(l.track([o,"textShow"],[i,"textShow"])),this.dispose(l.track([o,"textProperty"],[i,"textProperty"])),this.dispose(l.track([o,"textDefaultText"],[i,"textDefaultText"])),this.dispose(l.track([o,"textColor"],[i,"textColor"])),this.dispose(l.track([o,"textBackgroundColor"],[i,"textBackgroundColor"])),this.dispose(l.track([o,"textFontFamily"],[i,"textFontFamily"])),this.dispose(l.track([o,"textFontSize"],[i,"textFontSize"])),this.dispose(l.track([o,"textFontStyle"],[i,"textFontStyle"])),this.dispose(l.track([o,"textFontWeight"],[i,"textFontWeight"])),this.dispose(l.track([o,"textAnchor"],[i,"textAnchor"])),this.dispose(l.track([o,"textOffset"],[i,"textOffset"])),this.dispose(l.track([o,"minFeatureVisibleDistance"],[i,"minFeatureVisibleDistance"])),this.dispose(l.track([o,"maxFeatureVisibleDistance"],[i,"maxFeatureVisibleDistance"])),this.dispose(l.track([o,"heightReference"],[i,"heightReference"])),this.dispose(i.flyToEvent.disposableOn(r=>{if(e.actived){if(i.flyInParam){const{position:s,rotation:a,flyDuration:c}=i.flyInParam;return se(e.viewer,s,void 0,a,c),!0}o.flyTo(r&&r*1e3)}}));{const r=async(s,a,c)=>{if(!e.actived)return;const d=JSON.parse(JSON.stringify(this._getFeatureByIndexOrProperties(s,a)));if(!(!d||!(d!=null&&d.positions)))if(d.type=="Point"||d.type=="MultiPoint")Jt(e,i,this.id,await this._calculateFeatureHeight(d.type=="MultiPoint"?d.positions.flat():d.positions,i.heightReference,e),1e3,c);else{const u=d.type=="Polygon"||d.type=="MultiPolygon"||d.type=="MultiLineString";let p=[];u?p=d.positions.flat(d.type=="MultiPolygon"?2:1).map(y=>this._calculateFeatureHeight(y,i.fillGround?"CLAMP_TO_GROUND":"NONE",e)):p=d.positions.map(y=>this._calculateFeatureHeight(y,i.strokeGround?"CLAMP_TO_GROUND":"NONE",e));const{minPos:f,maxPos:g,center:m}=w.getMinMaxCorner(p);Jt(e,i,this.id,m,w.getDistancesFromPositions([f,g],"NONE")[0],c)}};this.d(i.flyToFeatureEvent.don((s,a,c)=>r(s,a,c))),this.d(i.flyToFeatureIndexEvent.don((s,a)=>r(s,void 0,a)))}}_getFeatureByIndexOrProperties(i,e){var s,a,c,d,u,p,f,g;const{sceneObject:n}=this,o=n.features;if(!o)return;const r=Reflect.get(o,"features")||Reflect.get(o,"geometries");if(r){if(e){let m=r.find(y=>(y==null?void 0:y.properties[i])==e);return{type:m!=null&&m.coordinates?m.type:(s=m==null?void 0:m.geometry)==null?void 0:s.type,positions:(m==null?void 0:m.coordinates)||((a=m==null?void 0:m.geometry)==null?void 0:a.coordinates)}}else if(typeof i=="number")return{type:(c=r[i])!=null&&c.coordinates?r[i].type:(u=(d=r[i])==null?void 0:d.geometry)==null?void 0:u.type,positions:((p=r[i])==null?void 0:p.coordinates)||((g=(f=r[i])==null?void 0:f.geometry)==null?void 0:g.coordinates)}}}async _calculateFeatureHeight(i,e,n){const o=[...i];return e=="NONE"?o[2]=o[2]??0:e=="CLAMP_TO_GROUND"||!o[2]?o[2]=await n.getTerrainHeight(o)??0:o[2]+=await n.getTerrainHeight(o)??0,o}};v(Da,"type",Da.register("ESCesiumViewer",w.ESGeoJson.type,Da));let Ju=Da;const ba=class ba extends vt{constructor(e,n){super(e,n);v(this,"_czmGeoESRectangle");v(this,"_geoPolyline");if(this._geoPolyline=this.disposeVar(new Ie(n,e.id)),this._czmGeoESRectangle=this.disposeVar(new Ci(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const r=this._czmGeoESRectangle,s=this._geoPolyline;s.arcType="RHUMB",this.dispose(l.track([s,"color"],[e,"strokeColor"])),this.dispose(l.track([s,"width"],[e,"strokeWidth"])),this.dispose(l.track([s,"ground"],[e,"strokeGround"])),this.dispose(l.track([r,"ground"],[e,"fillGround"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"]));{const a=()=>{s.show=e.show&&e.stroked,r.show=e.show&&e.filled};a();const c=this.disposeVar(l.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged,e.filledChanged));this.dispose(c.disposableOn(a))}{const a=()=>{e.filled?r.material={type:"Color",color:e.fillColor}:r.material=void 0};a();const c=this.disposeVar(l.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(c.disposableOn(a))}{const a=()=>{const c=e.points;if(c&&c.length>=2){const{minPos:d,maxPos:u}=w.getMinMaxCorner(c);r.rectangle=[d[0],d[1],u[0],u[1]],r.height=c[0][2],r.extrudedHeight=c[0][2];const p=c.map(y=>(c&&(y[2]=c[0][2]),y)),f=p[0],g=p[1],m=[f,[f[0],g[1],f[2]],g,[g[0],f[1],g[2]]];s.positions=[...m,f]}else r.rectangle=void 0,s.positions=void 0,r.height=0,r.extrudedHeight=0};a(),this.dispose(e.pointsChanged.disposableOn(()=>a()))}}get czmGeoESRectangle(){return this._czmGeoESRectangle}flyTo(e,n){const{sceneObject:o,czmViewer:r}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):o.points?(ae(r,o,n,o.points,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,czmGeoESRectangle:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):o.points?(ae(r,o,n,o.points,e),!0):!1:!1}};v(ba,"type",ba.register("ESCesiumViewer",w.ESGeoRectangle.type,ba));let Bu=ba;class Os extends l.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new l.Event));v(this,"_geoPolygon");this._geoPolygon=this.disposeVar(new _n(e,n));const{geoPolygon:o}=this;this.dispose(l.bind([o,"allowPicking"],[this,"allowPicking"])),this.dispose(this.flyToEvent.disposableOn(s=>{o.flyTo(s)})),this.dispose(l.bind([o,"show"],[this,"show"])),this.dispose(l.bind([o,"fill"],[this,"filled"])),this.dispose(l.bind([o,"strokeGround"],[this,"strokeGround"])),this.dispose(l.bind([o,"ground"],[this,"ground"])),this.dispose(l.bind([o,"outline"],[this,"outline"])),this.dispose(l.bind([o,"outlineColor"],[this,"outlineColor"])),this.dispose(l.bind([o,"outlineWidth"],[this,"outlineWidth"])),this.dispose(l.bind([o,"color"],[this,"color"])),this.dispose(l.bind([o,"depth"],[this,"depth"]));const r=()=>{if(this.positions&&this.positions.length>=2){const s=wd([...this.positions,this.positions[0]]);o.positions=s}else o.positions=void 0};r(),this.dispose(this.positionsChanged.disposableOn(r))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygon(){return this._geoPolygon}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,strokeGround:!1,ground:!1,outline:!1,filled:!0,outlineColor:l.reactArray([1,1,1,1]),outlineWidth:1,color:l.reactArrayWithUndefined([1,1,1,.5]),positions:l.reactPositions(void 0),depth:0})})(Os||(Os={})),l.extendClassProps(Os.prototype,Os.createDefaultProps);const Ra=class Ra extends vt{constructor(e,n){super(e,n);v(this,"_geoSmoothPolygon");if(this._geoSmoothPolygon=this.disposeVar(new Os(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const r=this._geoSmoothPolygon;this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.bind([r,"positions"],[e,"points"])),this.dispose(l.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(l.track([r,"outline"],[e,"stroked"])),this.dispose(l.track([r,"outlineColor"],[e,"strokeColor"])),this.dispose(l.track([r,"outlineWidth"],[e,"strokeWidth"])),this.dispose(l.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(l.track([r,"filled"],[e,"filled"])),this.dispose(l.track([r,"color"],[e,"fillColor"])),this.dispose(l.track([r,"ground"],[e,"ground"]));{const s=()=>{r.ground=e.ground||e.fillGround};s();const a=this.dv(l.createNextAnimateFrameEvent(e.groundChanged,e.fillGroundChanged));this.d(a.don(s))}{const s=()=>{r.color=e.filled?e.fillColor:Ls.defaults.fillStyle.color};s();const a=this.disposeVar(l.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(a.disposableOn(s))}this.dispose(l.track([r,"depth"],[e,"depth"]))}get geoSmoothPolygon(){return this._geoSmoothPolygon}flyTo(e,n){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):s.positions?(ae(r,o,n,s.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):s.positions?(ae(r,o,n,s.positions,e),!0):!1:!1}};v(Ra,"type",Ra.register("ESCesiumViewer",Ls.type,Ra));let ju=Ra;const xa=class xa extends Ce{constructor(e,n){super(e,n);v(this,"_czmModel");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModel=this.dv(new at(n,e.id));const r=this._czmModel;this.d(r.readyEvent.don(a=>{r.gltf.animations&&(r.activeAnimationsJson=r.gltf.animations.map((c,d)=>({index:d,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}))),e.czmModelReadyEvent.emit(a)})),this.ad(new rc(o,this._czmModel)),this.d(l.track([r,"show"],[e,"show"])),this.d(l.track([r,"color"],[e,"czmColor"])),this.d(l.track([r,"nativeMaximumScale"],[e,"czmMaximumScale"])),this.d(l.track([r,"nativeMinimumPixelSize"],[e,"czmMinimumPixelSize"])),this.d(l.bind([r,"position"],[e,"position"])),this.d(l.track([r,"nativeScale"],[e,"czmNativeScale"])),this.d(l.track([r,"scale"],[e,"scale"])),this.ad(l.track([r,"imageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(l.track([r,"environmentMapManager"],[e,"czmEnvironmentMapManager"]));{const a=c=>{e.czmEnvironmentMapManager=e.czmEnvironmentMapManager?{...e.czmEnvironmentMapManager,atmosphereScatteringIntensity:c}:{atmosphereScatteringIntensity:c}};a(e.czmAtmosphereScatteringIntensity),this.ad(e.czmAtmosphereScatteringIntensityChanged.don(c=>a(c)))}{const a=()=>{var c,d;(c=e.czmEnvironmentMapManager)!=null&&c.atmosphereScatteringIntensity&&(e.czmAtmosphereScatteringIntensity=(d=e.czmEnvironmentMapManager)==null?void 0:d.atmosphereScatteringIntensity)};a(),this.ad(e.czmEnvironmentMapManagerChanged.don(a))}{const a=()=>{const c=[...e.rotation??[0,0,0]];c[0]+=e.instances&&e.instances.length!=0?0:90,r.rotation=c};a(),this.d(e.rotationChanged.don(a));{const c=()=>{if(a(),!e.instances){r.instances=e.instances;return}r.instances=e.instances.map(d=>{const u=JSON.parse(JSON.stringify(d));return!u.rotation&&(u.rotation=[0,0,0]),u.rotation[0]+=90,u})};c(),this.ad(e.instancesChanged.don(c))}}this.ad(e.setMaterialEvent.don(a=>{r.setMaterial(a)}));{const a=()=>{const c=[...r.rotation];c[0]-=e.instances?0:90,e.rotation=c};a(),this.d(r.rotationChanged.don(a))}{const a=this.dv(l.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),c=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};c(),this.d(a.don(c))}const s=()=>{r.url=w.ESSceneObject.context.getStrFromEnv(sc(typeof e.url=="string"?e.url:e.url.url))};s(),this.d(e.urlChanged.don(s)),this.d(e.setNodePositionEvent.don((a,c)=>{r.setNodeTranslation(a,c)})),this.d(e.setNodeRotationEvent.don((a,c)=>{r.setNodeRotation(a,c)})),this.d(e.setNodeScaleEvent.don((a,c)=>{r.setNodeScale(a,c)})),this.d(e.printDebugInfoEvent.don(()=>{r.printDebugInfo()}))}get model(){return this._czmModel}flyTo(e,n){const{sceneObject:o,czmViewer:r,model:s}=this;return r.actived?o.flyToParam||o.flyInParam?(super.flyTo(e,n),!0):(s&&It(r,o,n,e,s,!0),!!s):!1}};v(xa,"type",xa.register("ESCesiumViewer",w.ESGltfModel.type,xa));let ep=xa;function g0(t,i){const e=t[0]-i[0],n=t[1]-i[1],o=t[2]-i[2];return Math.sqrt(e*e+n*n+o*o)}class Ns extends l.Destroyable{constructor(e,n){super();v(this,"_pickedEvent",this.disposeVar(new l.Event));v(this,"_flyToEvent",this.disposeVar(new l.Event));v(this,"_distance",this.disposeVar(l.react(0)));v(this,"_surfaceDistance",this.disposeVar(l.react(0)));v(this,"_height",this.disposeVar(l.react(0)));v(this,"_middlePosition",this.disposeVar(l.reactArrayWithUndefined(void 0)));v(this,"_heightPosition",this.disposeVar(l.reactArrayWithUndefined(void 0)));const o=()=>{if(this.positions)if(this.positions.length>=2)if(this._middlePosition.value=[this.positions[0][0],this.positions[0][1],this.positions[1][2]],this._heightPosition.value=[this.positions[0][0],this.positions[0][1],.5*(this.positions[1][2]+this.positions[0][2])],this.arcType===void 0||this.arcType==="GEODESIC"){const s=this._surfaceDistance.value=w.geoDistance(this.positions[0],this.positions[1]),a=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(s*s+a*a)}else if(this.arcType==="RHUMB"){const s=this._surfaceDistance.value=w.geoRhumbDistance(this.positions[0],this.positions[1]),a=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(s*s+a*a)}else if(this.arcType==="NONE"){const s=w.lbhToXyz(this.positions[0]),a=w.lbhToXyz(this.positions[1]);this._distance.value=g0(s,a),this._surfaceDistance.value=g0(w.lbhToXyz(this._middlePosition.value),a),this._height.value=this.positions[1][2]-this.positions[0][2]}else console.warn(`未知的arcType: ${this.arcType},导致距离无法计算!`);else this._heightPosition.value=void 0,this._distance.value=0,this._surfaceDistance.value=0,this._height.value=0};o();const r=this.disposeVar(l.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged));this.dispose(r.disposableOn(o));{const s=this.disposeVar(new Ie(e,n));s.ground=!1,s.loop=!1,this.dispose(l.track([s,"allowPicking"],[this,"allowPicking"])),this.dispose(l.bind([s,"arcType"],[this,"arcType"])),this.dispose(l.bind([s,"color"],[this,"color"])),this.dispose(l.bind([s,"dashLength"],[this,"dashLength"])),this.dispose(l.bind([s,"dashPattern"],[this,"dashPattern"])),this.dispose(l.bind([s,"gapColor"],[this,"gapColor"])),this.dispose(l.bind([s,"hasArrow"],[this,"hasArrow"])),this.dispose(l.bind([s,"hasDash"],[this,"hasDash"])),this.dispose(l.bind([s,"show"],[this,"show"])),this.dispose(l.bind([s,"width"],[this,"width"])),this.dispose(l.bind([s,"depthTest"],[this,"depthTest"]));{s.loop=!0;const c=()=>{if(this.positions&&this.positions.length===2){const[d,u]=this.positions;s.positions=[d,u,[d[0],d[1],u[2]]]}else s.positions=void 0};c(),this.dispose(this.positionsChanged.disposableOn(c))}this.dispose(this.flyToEvent.disposableOn(c=>{e.actived&&s.flyTo(c)}));const a=this.disposeVar(new $e(e,n));this.dispose(l.track([a,"shadowDom"],[this,"shadowDom"])),this.dispose(l.track([a,"cssAllInitial"],[this,"cssAllInitial"])),this.dispose(l.track([a,"show"],[this,"show"]));{const c=()=>{a.position=this.heightPosition};c(),this.dispose(this.heightPositionChanged.disposableOn(c))}{const c=()=>{a.innerHTML=oo(`高度: ${ac(this.height)}`,0)};c(),this.dispose(this.heightChanged.disposableOn(c))}this.ad(a.pickedEvent.don(c=>{Wi(c)===0&&this.pickedEvent.emit(c)}))}}get pickedEvent(){return this._pickedEvent}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}get surfaceDistance(){return this._surfaceDistance.value}get surfaceDistanceChanged(){return this._surfaceDistance.changed}get height(){return this._height.value}get heightChanged(){return this._height.changed}get middlePosition(){return this._middlePosition.value}get middlePositionChanged(){return this._middlePosition.changed}get heightPosition(){return this._heightPosition.value}get heightPositionChanged(){return this._heightPosition.changed}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,positions:l.reactPositions(void 0),width:1,color:l.reactArray([1,1,1,1]),hasDash:!1,gapColor:l.reactArrayWithUndefined([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",depthTest:!1,shadowDom:!1,cssAllInitial:!1})})(Ns||(Ns={})),l.extendClassProps(Ns.prototype,Ns.createDefaultProps);const Fa=class Fa extends vt{constructor(e,n){super(e,n);v(this,"_geoHeightMeasurement");if(this._geoHeightMeasurement=this.disposeVar(new Ns(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const{czmHeightMeasurement:r}=this;this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(l.bind([r,"positions"],[e,"points"]));{const s=()=>{if(e.stroked)r.width=e.strokeWidth;else{r.width=0;return}r.width=e.strokeWidth,r.color=e.strokeColor;const d=e.strokeMaterial??"normal";d==="hasDash"?(r.hasDash=!0,r.hasArrow=!1):d==="hasArrow"?(r.hasDash=!1,r.hasArrow=!0):(r.hasDash=!1,r.hasArrow=!1);const u=e.strokeStyle;if(u.material==="hasDash"&&u.materialParams)try{const p=u.materialParams;Reflect.has(p,"gapColor")&&(r.gapColor=p.gapColor??[0,0,0,0]),Reflect.has(p,"dashLength")&&(r.dashLength=p.dashLength),Reflect.has(p,"dashPattern")&&(r.dashPattern=p.dashPattern)}catch(p){console.error(p)}else r.gapColor=[0,0,0,0],r.dashLength=0,r.dashPattern=0};s();const a=this.disposeVar(l.createNextAnimateFrameEvent(e.strokeStyleChanged,e.strokedChanged));this.dispose(a.disposableOn(s))}this.dispose(r.pickedEvent.disposableOn(s=>{Wi(s)===0&&(e.allowPicking??!1)&&e.pickedEvent.emit(s)}))}get czmHeightMeasurement(){return this._geoHeightMeasurement}flyTo(e,n){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):s.positions?(ae(r,o,n,s.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):s.positions?(ae(r,o,n,s.positions,e),!0):!1:!1}};v(Fa,"type",Fa.register("ESCesiumViewer",w.ESHeightMeasurement.type,Fa));let tp=Fa;const ip={czmAnimationsStand:[{index:0,name:"Stand",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsWalk:[{index:2,name:"Walk",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsRun:[{index:1,name:"Run",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}]},ka=class ka extends Ce{constructor(e,n){super(e,n);v(this,"_czmModelPrimitive");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModelPrimitive=this.disposeVar(new at(n,this.sceneObject.id));const r=this._czmModelPrimitive;this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.bind([r,"position"],[e,"position"])),this.dispose(et([r,"rotation"],[e,"rotation"])),this.dispose(l.bind([r,"scale"],[e,"scale"]));{const y=this.dv(l.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),P=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};P(),this.d(y.don(P))}const s=w.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/worker.glb"),a=w.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/police.glb"),c=w.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/pedestrian.glb"),d=w.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/Stranger.glb"),u=w.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsMan.glb"),p=w.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsWoman.glb"),f=()=>{switch(e.mode){case"worker":r.url=s;break;case"police":r.url=a;break;case"pedestrian":r.url=c;break;case"stranger":r.url=d;break;case"suitMan":r.url=u;break;case"suitWoman":r.url=p;break;default:r.url=s;break}};this.dispose(e.modeChanged.disposableOn(()=>{f()})),f();const g=()=>{const y=e.animation??w.ESHuman.defaults.animation;if(!e.show){r.activeAnimationsJson=void 0;return}y==="walking"?r.activeAnimationsJson=ip.czmAnimationsWalk:y==="standing"?r.activeAnimationsJson=ip.czmAnimationsStand:y==="running"&&(r.activeAnimationsJson=ip.czmAnimationsRun)};g();const m=this.ad(l.createNextAnimateFrameEvent(e.showChanged,e.animationChanged));this.dispose(m.disposableOn(()=>g())),this.ad(new rc(o,r))}get czmModelPrimitive(){return this._czmModelPrimitive}flyTo(e,n){const{sceneObject:o,czmViewer:r,czmModelPrimitive:s}=this;return!r.actived||!r.viewer?!1:o.flyToParam||o.flyInParam?(super.flyTo(e,n),!0):(s&&It(r,o,n,e,s,!0),!!s)}};v(ka,"type",ka.register("ESCesiumViewer",w.ESHuman.type,ka));let np=ka;class m0 extends w.Destroyable{constructor(e,n){super();v(this,"_czmGeoCanvasImagePoi");v(this,"flyTo",(e,n)=>{if(this.czmGeoCanvasImagePoi.position){se(this.czmViewer.viewer,this.czmGeoCanvasImagePoi.position,1e3,Kt,e);return}this.czmGeoCanvasImagePoi.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=n,this._czmGeoCanvasImagePoi=this.disposeVar(new vi(n));const o=this._czmGeoCanvasImagePoi;o.pickOnClick=!0,this.d(o.pickedEvent.don(r=>{(e.allowPicking??!1)&&e.pickedEvent.emit(r)}));{const r=u=>{let p=u;return u.includes("inner://")&&(p="${earthsdk3-assets-script-dir}/assets/img/points/"+u.split("inner://")[1]),w.ESSceneObject.context.getStrFromEnv(sc(p))},s=()=>{const u=r(typeof e.url=="string"?e.url:e.url.url);if(o.imageUri=u,e.sizeByContent){const f=new Image;f.src=u,f.onload=()=>{o.size=[f.width,f.height]}}else{const f=e.size;o.size=[...f]}},a=this.disposeVar(l.createNextAnimateFrameEvent(e.urlChanged,e.sizeByContentChanged,e.sizeChanged));this.dispose(a.disposableOn(()=>s())),s(),this.d(l.track([o,"zOrder"],[e,"zOrder"])),this.dispose(l.track([o,"show"],[e,"show"])),this.dispose(l.bind([o,"position"],[e,"position"])),this.ad(l.bind([o,"isHoverZoom"],[e,"isHoverZoom"]));{const u=()=>{o.scale=[e.scale[1],e.scale[2]]};u(),this.dispose(e.scaleChanged.don(u))}const c=()=>{const u=e.anchor,p=e.offset;u?o.originRatioAndOffset=[...u,-p[0],-p[1]]:o.originRatioAndOffset=[0,0,0,0]},d=this.ad(l.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(d.disposableOn(()=>c())),c(),this.dispose(o.clickEvent.disposableOn(u=>{const{offsetX:p,offsetY:f}=u,m={type:u.button===0?"leftClick":u.button===2?"rightClick":void 0,add:{mousePos:[p,f]}};e.widgetEvent.emit(m)})),this.dispose(o.hoveredChanged.disposableOn(u=>{if(u===void 0)return;const p={type:u?"mouseEnter":"mouseLeave"};e.widgetEvent.emit(p)}))}}get czmGeoCanvasImagePoi(){return this._czmGeoCanvasImagePoi}}class v0 extends w.Destroyable{constructor(e,n,o){super();v(this,"_czmGeoImageModel");v(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});v(this,"_isPointEvent",!1);v(this,"flyTo",(e,n)=>{if(this.czmGeoImageModel.position)return Jt(this.czmViewer,this.sceneObject,n,this.sceneObject.position,Math.max(...this.czmGeoImageModel.size),e,!0);this.czmGeoImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=n,this._czmGeoImageModel=this.disposeVar(new Hi(n,e.id));const r=this._czmGeoImageModel;this.ad(n.clickEvent.don(f=>{const g=f==null?void 0:f.pointerEvent;g&&(this._isPointEvent=!0,this._eventInfo={type:g.button==0?"leftClick":g.button==2?"rightClick":"leftClick",add:{mousePos:[g.offsetX,g.offsetY]}})})),this.d(e.pickedEvent.don(f=>{var g,m,y;f.screenPosition&&this._isPointEvent&&f.attachedInfo!="innerHoverEvent"&&((g=this._eventInfo.add)!=null&&g.mousePos)&&Math.abs(f.screenPosition[0]-((m=this._eventInfo.add)==null?void 0:m.mousePos[0]))<1&&Math.abs(f.screenPosition[1]-((y=this._eventInfo.add)==null?void 0:y.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),w.registerCreatedEventUpdate(this,e,()=>{const f=n.getEngineObject(e);this.ad(f.lastHoverResultChanged.don((g,m)=>{(g==null?void 0:g.sceneObject)==(m==null?void 0:m.sceneObject)||(g==null?void 0:g.sceneObject)!=e&&(m==null?void 0:m.sceneObject)!=e||(g!=null&&g.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:g==null?void 0:g.screenPosition}},g.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&g.sceneObject.id==e.id&&(r.scale=[r.scale[0]*1.5,r.scale[1]*1.5])),m!=null&&m.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:g==null?void 0:g.screenPosition}},m.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&m.sceneObject.id==e.id&&(r.scale=[r.scale[0]/1.5,r.scale[1]/1.5])))}))});const s=e.sizeByContent,c=(f=>{let g=f;return f.includes("inner://")&&(g="${earthsdk3-assets-script-dir}/assets/img/points/"+f.split("inner://")[1]),w.ESSceneObject.context.getStrFromEnv(sc(g))})(typeof o.sceneObject.url=="string"?o.sceneObject.url:o.sceneObject.url.url),d=new Image;d.src=c,d.onload=()=>{if(s)r.size=[d.width/100,d.height/100];else{const f=e.size;r.size=[f[0]/100,f[1]/100]}},r.uri=c,this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.bind([r,"position"],[e,"position"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"])),r.pixelSize=void 0,r.useAxis="XZ";{const f=()=>{r.scale=[e.scale[1],e.scale[2]]};f(),this.d(e.scaleChanged.don(f))}{const f=()=>{e.rotationType===0&&(r.rotationMode="WithProp",this.d(et([r,"rotation"],[e,"rotation"]))),e.rotationType===1&&(r.rotationMode="WithCamera"),e.rotationType===2&&(r.rotationMode="WithCameraOnlyZ")};f(),this.dispose(e.rotationTypeChanged.disposableOn(f))}const u=()=>{const f=e.anchor,g=e.offset;f?r.originRatioAndOffset=[...f,-g[0]/100,-g[1]/100]:r.originRatioAndOffset=[0,0,0,0]},p=this.ad(l.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(p.disposableOn(()=>u())),u()}get czmGeoImageModel(){return this._czmGeoImageModel}}const za=class za extends xs{constructor(e,n){super(e,n);v(this,"_resetting");if(!n.viewer){console.warn("viewer is undefined!");return}const r=this.disposeVar(l.createNextAnimateFrameEvent(this.sceneObject.urlChanged,this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged));this._resetting=this.disposeVar(new l.ObjResettingWithEvent(r,()=>this.sceneObject.screenRender?new m0(this.sceneObject,this.czmViewer):new v0(this.sceneObject,this.czmViewer,this)))}get resetting(){return this._resetting}flyTo(e,n){const{sceneObject:o,czmViewer:r,resetting:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(s&&s.obj&&s.obj.flyTo(e,n),o.flyOverEvent.emit(n,"over",r),!0):!1}};v(za,"type",za.register("ESCesiumViewer",w.ESImageLabel.type,za));let op=za;function MI(t){switch(t){case"wms":return"WebMapServiceImageryProvider";case"tms":return"TileMapServiceImageryProvider";case"wmts":return"WebMapTileServiceImageryProvider";case"xyz":return"UrlTemplateImageryProvider";case"ion":return"IonImageryProvider"}}const La=class La extends Qt{constructor(e,n){super(e,n);v(this,"_czmImagery");if(this._czmImagery=this.dv(new xn(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const r=this._czmImagery;{const s=this.ad(l.reactJson(""));{const d=()=>{if(typeof e.url=="string")s.value=w.ESSceneObject.context.getStrFromEnv(e.url);else{const u=e.url;u.url=w.ESSceneObject.context.getStrFromEnv(u.url),s.value=u}};d(),this.ad(e.urlChanged.don(d))}const a=()=>{var m;if(!s.value)return;const d=(((m=e.options)==null?void 0:m.type)??"auto").toLowerCase(),u=e.options??{};let p={type:"UrlTemplateImageryProvider",url:s.value,rectangle:e.rectangle,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,...u},f=s.value,g=typeof f=="string"?f:f.url;if(d==="auto"){const y=g.toLowerCase();if(y.startsWith("ion://")){const S=+y.substring(6);p={...u,assetId:S,type:"IonImageryProvider"}}else if(y.includes("{x}")||y.includes("{y}")||y.includes("{z}"))p.type="UrlTemplateImageryProvider";else if(y.includes("wmts"))p.type="WebMapTileServiceImageryProvider";else if(y.includes("wms"))p.type="WebMapServiceImageryProvider";else{if(g.includes("/tilemapresource.xml")){const P=g.split("/tilemapresource.xml").join("");typeof f=="string"?f=P:f.url=P,p.url=f}p.type="TileMapServiceImageryProvider"}}else{if(d==="tms"&&g.includes("/tilemapresource.xml")){const y=g.split("/tilemapresource.xml").join("");typeof f=="string"?f=y:f.url=y,p.url=f}else if(d==="ion"&&g.startsWith("ion://")){const P=+g.substring(6);p={...u,assetId:P,type:"IonImageryProvider"}}p.type=MI(d)}console.log("imageryProvider",p),r.imageryProvider=p};a();const c=this.dv(l.createNextAnimateFrameEvent(s.changed,e.maximumLevelChanged,e.minimumLevelChanged,e.optionsChanged,e.rectangleChanged));this.d(c.don(a))}this.d(l.track([r,"show"],[e,"show"])),this.d(l.bind([r,"alpha"],[e,"opacity"])),this.d(l.bind([r,"alpha"],[e,"czmAlpha"])),this.d(l.track([r,"splitDirection"],[e,"splitDirection"])),this.d(l.track([r,"brightness"],[e,"czmBrightness"])),this.d(l.track([r,"contrast"],[e,"czmContrast"])),this.d(l.track([r,"hue"],[e,"czmHue"])),this.d(l.track([r,"saturation"],[e,"czmSaturation"])),this.d(l.track([r,"gamma"],[e,"czmGamma"])),this.d(l.track([r,"rectangle"],[e,"rectangle"])),this.d(l.track([r,"zIndex"],[e,"zIndex"])),this.ad(l.track([r,"targetID"],[e,"targetID"]))}get czmImagery(){return this._czmImagery}flyTo(e,n){const{sceneObject:o,czmViewer:r,czmImagery:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(s.flyTo(e&&e),o.flyOverEvent.emit(n,"over",r),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,czmImagery:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):(s.flyTo(e&&e),o.flyOverEvent.emit(n,"over",r),!0):!1}};v(La,"type",La.register("ESCesiumViewer",w.ESImageryLayer.type,La));let rp=La;class II extends l.Destroyable{constructor(e,n,o,r){super();v(this,"_show");v(this,"_czmESCustomPrimitive");v(this,"_czmTexture");this._sceneObject=e,this._show=this.disposeVar(l.react(this._sceneObject.show)),this._czmESCustomPrimitive=this.dv(new ke(n,this._sceneObject.id)),this._czmTexture=this.dv(new Le(n));const s=e,a=this._czmESCustomPrimitive,c=this._czmTexture;this.dispose(l.track([a,"show"],[this,"show"])),this.dispose(l.track([a,"show"],[s,"show"])),this.dispose(l.track([a,"allowPicking"],[s,"allowPicking"])),this.dispose(l.track([a,"rotation"],[s,"rotation"])),this.dispose(l.track([a,"position"],[s,"position"])),this.dispose(l.track([a,"scale"],[s,"scale"])),this.ad(s.allowPickingChanged.don(()=>{a.allowPicking=s.allowPicking,a.pass=s.allowPicking?"TRANSLUCENT":"OVERLAY"}));{const d=()=>{const p=s.size/2,f=r[0].map(L=>L*p),g=r[1].map(L=>L*p),m=r[2].map(L=>L*p),y=r[3].map(L=>L*p),P=[...f,...g,...m,...y];let S=[0,3,2,0,2,1];(o=="north"||o=="west"||o=="bottom")&&(S=S.reverse());const C=[0,0],E=[1,0],T=[1,1],I=[0,1];let b=[];o=="east"||o=="south"?b=[...E,...C,...I,...T]:o=="west"?b=[...E,...T,...I,...C]:o=="top"?b=[...I,...T,...E,...C]:b=[...C,...E,...T,...I],a.indexTypedArray=new Uint16Array(S),a.attributes={position:{typedArray:new Float32Array(P),componentsPerAttribute:3},st:{typedArray:new Float32Array(b),componentsPerAttribute:2}},c.uri=w.ESSceneObject.context.getStrFromEnv(`\${earthsdk3-assets-script-dir}/assets/img/skybox/${s.mode}/${o}.${s.mode!="blueSky"?"png":"jpg"}`);const x=n.getCameraInfo();if(x!=null){const U=w.getDistancesFromPositions([s.position,x.position],"NONE")[0]/(s.size/2*s.autoOpacityFactor);this.changeOpacity(s.autoFollow?1:U)}const z=a.computeLocalAxisedBoundingBoxFromAttribute("position");if(!z)return;const{min:W,max:N}=z;a.setLocalAxisedBoundingBox(W,N)};d();const u=this.disposeVar(l.createNextAnimateFrameEvent(s.sizeChanged,s.modeChanged));this.dispose(u.disposableOn(d))}}get show(){return this._show.value}set show(e){this._show.value=e}get showChanged(){return this._show.changed}get czmESCustomPrimitive(){return this._czmESCustomPrimitive}get czmTexture(){return this._czmTexture}changeOpacity(e){this._czmESCustomPrimitive.uniformMap={u_image:{type:"texture",id:this._czmTexture.id},u_color:[1,1,1,1-e>=0?1-e:0]}}}class DI extends l.Destroyable{constructor(i,e,n){if(super(),!e.viewer)return;let o=!0,r;this.dispose(e.viewer.scene.preUpdate.addEventListener(()=>{s()}));function s(){var c;if(!((c=e.viewer)!=null&&c.camera))return;const a=e.getCameraInfo();if(a!=null&&(r==null||r.position[0]!=a.position[0]||r.position[1]!=a.position[1]||r.position[2]!=a.position[2]||r.rotation[0]!=a.rotation[0]||r.rotation[1]!=a.rotation[1]||r.rotation[2]!=a.rotation[2])){r=a;const u=w.getDistancesFromPositions([i.position,r.position],"NONE")[0]/(i.size/2*i.autoOpacityFactor);i.autoFollow?(i.position=r.position,o&&(o=!1,n.forEach(p=>{p.changeOpacity(1)}))):n.forEach(p=>{p.changeOpacity(u)})}}s()}}const Ke=class Ke extends Ce{constructor(e,n){super(e,n);v(this,"_czmSkyBoxComponents",[]);if(!n.viewer){console.warn("viewer is undefined!");return}!Ke._defaultLocalBox&&Ke._firstLoad&&(Ke._firstLoad=!1,Ke._defaultLocalBox=n.xbsjLocalBoxSources),Ke._eSLocalSkyBoxArr.push(e),this.d(()=>{Ke._eSLocalSkyBoxArr.includes(e)&&Ke._eSLocalSkyBoxArr.splice(Ke._eSLocalSkyBoxArr.indexOf(e),1),this.ChangeAutoFollow()});const r={bottom:[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1]],top:[[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],south:[[-1,-1,-1],[1,-1,-1],[1,-1,1],[-1,-1,1]],north:[[-1,1,-1],[1,1,-1],[1,1,1],[-1,1,1]],east:[[1,-1,-1],[1,1,-1],[1,1,1],[1,-1,1]],west:[[-1,1,-1],[-1,1,1],[-1,-1,1],[-1,-1,-1]]};for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)){const a=r[s];this._czmSkyBoxComponents.push(this.dv(new II(e,n,s,a)))}{const s=this.disposeVar(l.createNextAnimateFrameEvent(e.autoFollowChanged,e.autoOpacityFactorChanged));this.disposeVar(new l.ObjResettingWithEvent(s,()=>(this.ChangeAutoFollow(),new DI(e,n,this._czmSkyBoxComponents))))}{const s=()=>{this.ChangeAutoFollow()},a=this.disposeVar(l.createNextAnimateFrameEvent(e.sizeChanged,e.modeChanged,e.showChanged));this.dispose(a.disposableOn(s))}}ChangeAutoFollow(){const{czmViewer:e}=this;for(let n=Ke._eSLocalSkyBoxArr.length-1;n>=0;n--){const o=Ke._eSLocalSkyBoxArr[n];if(o.autoFollow&&o.show){e.xbsjLocalBoxSources={positiveX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/east.${o.mode!="blueSky"?"png":"jpg"}`,negativeX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/west.${o.mode!="blueSky"?"png":"jpg"}`,positiveY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/bottom.${o.mode!="blueSky"?"png":"jpg"}`,negativeY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/top.${o.mode!="blueSky"?"png":"jpg"}`,positiveZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/north.${o.mode!="blueSky"?"png":"jpg"}`,negativeZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/south.${o.mode!="blueSky"?"png":"jpg"}`};break}n==0&&(e.xbsjLocalBoxSources=Ke._defaultLocalBox)}Ke._eSLocalSkyBoxArr.length==0&&(e.xbsjLocalBoxSources=Ke._defaultLocalBox)}flyTo(e,n){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,n);{const s=o.size??w.ESLocalSkyBox.defaults.size;return o.position?(Jt(r,o,n,o.position,s,e,!0),!0):!1}}};v(Ke,"type",Ke.register("ESCesiumViewer",w.ESLocalSkyBox.type,Ke)),v(Ke,"_defaultLocalBox"),v(Ke,"_firstLoad",!0),v(Ke,"_eSLocalSkyBoxArr",[]);let sp=Ke;const oi=class oi extends Ce{constructor(e,n){super(e,n);v(this,"_geoCustomDivPoi");v(this,"_textFunc",this.disposeVar(l.react(void 0)));if(this._geoCustomDivPoi=this.disposeVar(new $e(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const r=this.geoCustomDivPoi;this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.bind([r,"position"],[e,"position"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"]));{this.dispose(r.pickedEvent.disposableOn(s=>{(e.allowPicking??w.ESLocationMeasurement.defaults.allowPicking)&&e.pickedEvent.emit(s)})),this.dispose(r.innerHtmlMounted.disposableOn(s=>{const a=s.firstElementChild;a&&(a.style.pointerEvents="auto",a.style.cursor="default",a.onclick=c=>r.pickFromDiv(a,{type:"viewerPicking",pointerEvent:c}))}));{const s=()=>{if(!e.position)return;const c=(this.textFunc??oi.defaultTextFunc_度格式)(e.position);r.innerHTML=oo(c)};s();const a=this.disposeVar(l.createNextAnimateFrameEvent(e.positionChanged,this.textFuncChanged));this.dispose(a.disposableOn(s))}{const s=()=>{n.lonLatFormat??(n.lonLatFormat="DECIMAL_DEGREE"),this.textFunc=n.lonLatFormat=="DECIMAL_DEGREE"?oi.defaultTextFunc_度格式:n.lonLatFormat=="DEGREES_DECIMAL_MINUTES"?oi.defaultTextFunc_度分格式:oi.defaultTextFunc_度分秒格式};s(),this.d(n.lonLatFormatChanged.don(()=>{s()}))}}}get geoCustomDivPoi(){return this._geoCustomDivPoi}get textFunc(){return this._textFunc.value}set textFunc(e){this._textFunc.value=e}get textFuncChanged(){return this._textFunc.changed}flyTo(e,n){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(s.flyTo(e),o.flyOverEvent.emit(n,"over",r),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):(s.flyTo(e),o.flyOverEvent.emit(n,"over",r),!0):!1}};v(oi,"type",oi.register("ESCesiumViewer",w.ESLocationMeasurement.type,oi)),v(oi,"defaultTextFunc_度格式",e=>{if(!e)return"";const[n=0,o=0,r=0]=e;return`经度: ${n.toFixed(5)}°
1253
+ `,Ye=class Ye extends l.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new l.Event));v(this,"_loadFuncReact",this.disposeVar(l.react(void 0)));v(this,"_dataSource",this.disposeVar(l.react(void 0)));v(this,"_data");v(this,"_defaultHeight",{});v(this,"_defaultBoundingSphere",new h.BoundingSphere);const o=e.viewer;if(!o){console.warn("viewer is undefined!");return}let r=()=>{this.dataSource&&o.dataSources.remove(this.dataSource,!0),this.dataSource=void 0,this._data=void 0};this.dispose(()=>{r()});{const s=this.dv(l.createProcessingFromAsyncFunc(async d=>{this.dataSource&&r(),this.url&&(typeof this.url=="object"?this._data=this.url:w.isJSON(this.url)?this._data=JSON.parse(this.url):await fetch(w.ESSceneObject.context.getStrFromEnv(this.url)).then(u=>u.json()).then(u=>{this._data=u}).catch(u=>{console.warn("ESGeoJson数据加载失败",u)}),this.dataSource=await h.GeoJsonDataSource.load(this._data),o.dataSources.add(this.dataSource).then(u=>{var f,g;const p=[];for(const m of u.entities.values)if(h.Entity.prototype&&(m.ESSceneObjectID=n),this._isEntityShow(m,e),m.polygon&&p.push(...(f=m.polygon.hierarchy)==null?void 0:f.getValue(h.JulianDate.now()).positions),m.polyline&&p.push(...(g=m.polyline.positions)==null?void 0:g.getValue(h.JulianDate.now())),m.position){const y=m.position.getValue(h.JulianDate.now());y&&p.push(y)}this._defaultBoundingSphere=h.BoundingSphere.fromPoints(p)}))})),a=()=>{s.isRunning&&s.cancel(),s.restart()};a();const c=this.dv(l.createNextAnimateFrameEvent(this.loadFunChanged,this.urlChanged));this.dispose(c.don(a))}{const s=()=>{var c,d;if(this.dataSource)if(this.dataSource.show=this.show,this.loadFun)try{this.loadFun(this.dataSource)}catch(u){console.error(u)}else{const u=this.dataSource.entities.values;for(let p=0;p<u.length;p++){const f=u[p];if(f.polygon){this._defaultHeight[f.id]||(this._defaultHeight[f.id]=(c=f.polygon.height)==null?void 0:c.getValue(h.JulianDate.now())),f.polygon.height=this.fillGround?void 0:new h.ConstantProperty(this._defaultHeight[f.id]),f.polygon.perPositionHeight=new h.ConstantProperty(!this.fillGround),f.polygon.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND),f.polygon.show=new h.ConstantProperty(this.filled??Ye.defaults.filled),f.polygon.material=new h.ColorMaterialProperty(new h.Color(...this.fillColor??Ye.defaults.fillColor)),f.polygon.outline=new h.ConstantProperty(!1),f.polyline=new h.PolylineGraphics;const g=JSON.parse(JSON.stringify((d=f.polygon.hierarchy)==null?void 0:d.getValue(h.JulianDate.now()).positions));h.Cartesian3.equals(g[0],g[g.length-1])||g.push(g[0]),f.polyline.positions=g}if(f.polyline&&(f.polyline.show=new h.ConstantProperty(this.stroked??Ye.defaults.stroked),f.polyline.width=new h.ConstantProperty(this.strokeWidth??Ye.defaults.strokeWidth),f.polyline.material=new h.ColorMaterialProperty(new h.Color(...this.strokeColor??Ye.defaults.strokeColor)),f.polyline.clampToGround=new h.ConstantProperty(this.strokeGround)),f.billboard){f.billboard.show=new h.ConstantProperty(this.imageShow??Ye.defaults.imageShow),f.billboard.width=new h.ConstantProperty(this.imageSize?this.imageSize[0]:Ye.defaults.imageSize[0]),f.billboard.height=new h.ConstantProperty(this.imageSize?this.imageSize[1]:Ye.defaults.imageSize[1]);const g=this.imageUrl?typeof this.imageUrl=="string"?this.imageUrl:this.imageUrl.url:Ye.defaults.imageUrl;f.billboard.image=new h.ConstantProperty(w.ESSceneObject.context.getStrFromEnv(g)),f.billboard.horizontalOrigin=new h.ConstantProperty(h.HorizontalOrigin.LEFT),f.billboard.verticalOrigin=new h.ConstantProperty(h.VerticalOrigin.TOP),f.billboard.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND);const m=this.imageAnchor??Ye.defaults.imageAnchor,y=this.imageOffset??Ye.defaults.imageOffset;if(f.billboard.pixelOffset=new h.ConstantProperty(h.Cartesian2.fromArray([-m[0]*f.billboard.width.getValue(h.JulianDate.now())+y[0],-m[1]*f.billboard.height.getValue(h.JulianDate.now())+y[1]])),f.label=new h.LabelGraphics,!f.label)return;f.label.show=new h.ConstantProperty(this.textShow??Ye.defaults.textShow),f.label.heightReference=new h.ConstantProperty(this.heightReference.toUpperCase()=="NONE"?h.HeightReference.NONE:this.heightReference.toUpperCase()=="CLAMP_TO_GROUND"?h.HeightReference.CLAMP_TO_GROUND:h.HeightReference.RELATIVE_TO_GROUND),f.label.text=new h.ConstantProperty(this.textProperty&&this.textProperty!==""&&f.properties&&f.properties[this.textProperty]?f.properties[this.textProperty].getValue():this.textDefaultText??Ye.defaults.textDefaultText),f.label.fillColor=new h.ConstantProperty(new h.Color(...this.textColor??Ye.defaults.textColor)),f.label.showBackground=new h.ConstantProperty(this.textBackgroundColor!=null);const P=this.textFontSize&&this.textFontSize!=0?this.textFontSize:Ye.defaults.textFontSize,S=this.textOffset??Ye.defaults.textOffset;f.label.backgroundColor=new h.ConstantProperty(new h.Color(...this.textBackgroundColor??Ye.defaults.textBackgroundColor)),f.label.font=new h.ConstantProperty(`${this.textFontStyle} ${this.textFontWeight} ${P}px ${this.textFontFamily??Ye.defaults.textFontFamily}`),f.label.horizontalOrigin=new h.ConstantProperty(h.HorizontalOrigin.LEFT),f.label.verticalOrigin=new h.ConstantProperty(h.VerticalOrigin.TOP),f.label.eyeOffset=new h.ConstantProperty(h.Cartesian3.fromArray([0,0,-1]));const C=this.textAnchor??Ye.defaults.textAnchor;f.label.pixelOffset=new h.ConstantProperty(h.Cartesian2.fromArray([-C[0]*((this.textBackgroundColor?-14:0)+this._getTextPixelWidth(f.label.text.getValue(h.JulianDate.now()),f.label.font.getValue(h.JulianDate.now())))+S[0],-C[1]*((this.textBackgroundColor?10:0)+P)+S[1]]))}}}};s();const a=this.dv(l.createNextAnimateFrameEvent(this._dataSource.changed,this.showChanged,this.strokedChanged,this.strokeWidthChanged,this.strokeWidthTypeChanged,this.strokeColorChanged,this.strokeMaterialChanged,this.strokeMaterialParamsChanged,this.strokeGroundChanged,this.filledChanged,this.fillColorChanged,this.fillMaterialChanged,this.fillMaterialParamsChanged,this.fillGroundChanged,this.imageShowChanged,this.imageUrlChanged,this.imageSizeChanged,this.imageAnchorChanged,this.imageOffsetChanged,this.textShowChanged,this.textPropertyChanged,this.textDefaultTextChanged,this.textColorChanged,this.textBackgroundColorChanged,this.textFontFamilyChanged,this.textFontSizeChanged,this.textFontStyleChanged,this.textFontWeightChanged,this.textAnchorChanged,this.textOffsetChanged,this.heightReferenceChanged));this.dispose(a.don(s))}{const s=()=>{if(!this.dataSource)return;const c=this.dataSource.entities.values;for(let d=0;d<c.length;d++){const u=c[d];this._isEntityShow(u,e)}};s();const a=this.ad(l.createNextAnimateFrameEvent(this.minFeatureVisibleDistanceChanged,this.maxFeatureVisibleDistanceChanged,e.cameraChanged,this.showChanged));this.ad(a.don(s))}{const s=()=>{if(this.loadFuncStr)try{const a=Function(`"use strict";return (${this.loadFuncStr})`)();this.loadFun=a}catch(a){console.error(a),this.loadFun=void 0}else this.loadFun=void 0};s(),this.dispose(this.loadFuncStrChanged.disposableOn(s))}this.dispose(this.flyToEvent.disposableOn(s=>{e.actived&&this.dataSource&&(s!==void 0?o.flyTo(this.dataSource,{duration:s/1e3}).then(a=>{a||o.camera.flyToBoundingSphere(this._defaultBoundingSphere,{duration:s/1e3})}):o.flyTo(this.dataSource).then(a=>{a||o.camera.flyToBoundingSphere(this._defaultBoundingSphere)}))}))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get loadFun(){return this._loadFuncReact.value}set loadFun(e){this._loadFuncReact.value=e}get loadFunChanged(){return this._loadFuncReact.changed}get dataSource(){return this._dataSource.value}set dataSource(e){this._dataSource.value=e}_getTextPixelWidth(e,n="16px sans-serif"){const r=document.createElement("canvas").getContext("2d");return r.font=n,r.measureText(e).width}_isEntityShow(e,n){var o;if(this.minFeatureVisibleDistance==0&&this.maxFeatureVisibleDistance==0){e.show=this.show;return}if((o=n.viewer)!=null&&o.camera&&this.show){let r;if(e.polygon&&e.polygon.hierarchy)r=w.getMinMaxCorner(e.polygon.hierarchy.getValue(h.JulianDate.now()).positions.map(c=>ce(c))).center;else if(e.polyline&&e.polyline.positions)r=w.getMinMaxCorner(e.polyline.positions.getValue(h.JulianDate.now()).map(c=>ce(c))).center;else if(e.position){const c=e.position.getValue(h.JulianDate.now());c&&(r=ce(c))}if(!r||isNaN(r[0]))return;const s=w.getDistancesFromPositions([r,Vt(n.viewer.camera)],"NONE")[0];let a=!1;this.minFeatureVisibleDistance<this.maxFeatureVisibleDistance?a=this.minFeatureVisibleDistance<s&&s<this.maxFeatureVisibleDistance:this.maxFeatureVisibleDistance==0?a=s>this.minFeatureVisibleDistance:this.minFeatureVisibleDistance==0&&(a=s<this.maxFeatureVisibleDistance),e.show=this.show&&a}}};v(Ye,"defaults",{show:!0,allowPicking:!0,url:f0,defaultLoadFuncStr:p0,defaultLoadFuncDocStr:TI,data:EI,dataMd:AI,stroked:!0,strokeWidth:1,strokeWidthType:"world",strokeColor:[.79,.91,.06,1],strokeMaterial:"",strokeMaterialParams:{},strokeGround:!1,filled:!0,fillColor:[.79,.91,.06,.2],fillMaterial:"",fillMaterialParams:{},fillGround:!1,imageShow:!0,imageUrl:"${earthsdk3-assets-script-dir}/assets/misc/location.png",imageSize:[64,64],imageAnchor:[.5,1],imageOffset:[0,0],textShow:!0,textProperty:"",textDefaultText:"默认标注",textColor:[1,1,1,1],textBackgroundColor:[.79,.91,.06,1],textFontFamily:"Arial",textFontSize:16,textFontWeight:"normal",textFontStyle:"normal",textAnchor:[.5,1],textOffset:[0,0],strokeWidthTypes:[["screen","screen"],["world","world"]],minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReferences:[["NONE","NONE"],["CLAMP_TO_GROUND","CLAMP_TO_GROUND"],["RELATIVE_TO_GROUND","RELATIVE_TO_GROUND"]]});let Eo=Ye;(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:void 0,loadFuncStr:void 0,url:void 0,stroked:void 0,strokeWidth:void 0,strokeWidthType:"world",strokeColor:l.reactArrayWithUndefined(void 0),strokeMaterial:void 0,strokeMaterialParams:l.reactJsonWithUndefined(void 0),strokeGround:void 0,filled:void 0,fillColor:l.reactArrayWithUndefined(void 0),fillMaterial:void 0,fillMaterialParams:l.reactJsonWithUndefined(void 0),fillGround:void 0,imageShow:void 0,imageUrl:void 0,imageSize:l.reactArrayWithUndefined(void 0),imageAnchor:l.reactArrayWithUndefined(void 0),imageOffset:l.reactArrayWithUndefined(void 0),textShow:void 0,textProperty:void 0,textDefaultText:void 0,textColor:l.reactArrayWithUndefined(void 0),textBackgroundColor:l.reactArrayWithUndefined(void 0),textFontFamily:void 0,textFontSize:void 0,textFontStyle:void 0,textFontWeight:void 0,textAnchor:l.reactArrayWithUndefined(void 0),textOffset:l.reactArrayWithUndefined(void 0),minFeatureVisibleDistance:0,maxFeatureVisibleDistance:0,heightReference:"NONE"})})(Eo||(Eo={})),l.extendClassProps(Eo.prototype,Eo.createDefaultProps);const Da=class Da extends Qt{constructor(i,e){if(super(i,e),!e.viewer){console.warn("viewer is undefined!");return}const o=this.disposeVar(new Eo(e,i.id));this.dispose(l.track([o,"show"],[i,"show"])),this.dispose(l.track([o,"allowPicking"],[i,"allowPicking"])),this.dispose(l.track([o,"loadFuncStr"],[i,"loadFuncStr"])),this.dispose(l.track([o,"url"],[i,"features"])),this.dispose(l.track([o,"stroked"],[i,"stroked"])),this.dispose(l.track([o,"strokeWidth"],[i,"strokeWidth"])),this.dispose(l.track([o,"strokeWidthType"],[i,"strokeWidthType"])),this.dispose(l.track([o,"strokeColor"],[i,"strokeColor"])),this.dispose(l.track([o,"strokeMaterial"],[i,"strokeMaterial"])),this.dispose(l.track([o,"strokeMaterialParams"],[i,"strokeMaterialParams"])),this.dispose(l.track([o,"strokeGround"],[i,"strokeGround"])),this.dispose(l.track([o,"filled"],[i,"filled"])),this.dispose(l.track([o,"fillColor"],[i,"fillColor"])),this.dispose(l.track([o,"fillMaterial"],[i,"fillMaterial"])),this.dispose(l.track([o,"fillMaterialParams"],[i,"fillMaterialParams"])),this.dispose(l.track([o,"fillGround"],[i,"fillGround"])),this.dispose(l.track([o,"imageShow"],[i,"imageShow"])),this.dispose(l.track([o,"imageUrl"],[i,"imageUrl"])),this.dispose(l.track([o,"imageSize"],[i,"imageSize"])),this.dispose(l.track([o,"imageAnchor"],[i,"imageAnchor"])),this.dispose(l.track([o,"imageOffset"],[i,"imageOffset"])),this.dispose(l.track([o,"textShow"],[i,"textShow"])),this.dispose(l.track([o,"textProperty"],[i,"textProperty"])),this.dispose(l.track([o,"textDefaultText"],[i,"textDefaultText"])),this.dispose(l.track([o,"textColor"],[i,"textColor"])),this.dispose(l.track([o,"textBackgroundColor"],[i,"textBackgroundColor"])),this.dispose(l.track([o,"textFontFamily"],[i,"textFontFamily"])),this.dispose(l.track([o,"textFontSize"],[i,"textFontSize"])),this.dispose(l.track([o,"textFontStyle"],[i,"textFontStyle"])),this.dispose(l.track([o,"textFontWeight"],[i,"textFontWeight"])),this.dispose(l.track([o,"textAnchor"],[i,"textAnchor"])),this.dispose(l.track([o,"textOffset"],[i,"textOffset"])),this.dispose(l.track([o,"minFeatureVisibleDistance"],[i,"minFeatureVisibleDistance"])),this.dispose(l.track([o,"maxFeatureVisibleDistance"],[i,"maxFeatureVisibleDistance"])),this.dispose(l.track([o,"heightReference"],[i,"heightReference"])),this.dispose(i.flyToEvent.disposableOn(r=>{if(e.actived){if(i.flyInParam){const{position:s,rotation:a,flyDuration:c}=i.flyInParam;return se(e.viewer,s,void 0,a,c),!0}o.flyTo(r&&r*1e3)}}));{const r=async(s,a,c)=>{if(!e.actived)return;const d=JSON.parse(JSON.stringify(this._getFeatureByIndexOrProperties(s,a)));if(!(!d||!(d!=null&&d.positions)))if(d.type=="Point"||d.type=="MultiPoint")Jt(e,i,this.id,await this._calculateFeatureHeight(d.type=="MultiPoint"?d.positions.flat():d.positions,i.heightReference,e),1e3,c);else{const u=d.type=="Polygon"||d.type=="MultiPolygon"||d.type=="MultiLineString";let p=[];u?p=d.positions.flat(d.type=="MultiPolygon"?2:1).map(y=>this._calculateFeatureHeight(y,i.fillGround?"CLAMP_TO_GROUND":"NONE",e)):p=d.positions.map(y=>this._calculateFeatureHeight(y,i.strokeGround?"CLAMP_TO_GROUND":"NONE",e));const{minPos:f,maxPos:g,center:m}=w.getMinMaxCorner(p);Jt(e,i,this.id,m,w.getDistancesFromPositions([f,g],"NONE")[0],c)}};this.d(i.flyToFeatureEvent.don((s,a,c)=>r(s,a,c))),this.d(i.flyToFeatureIndexEvent.don((s,a)=>r(s,void 0,a)))}}_getFeatureByIndexOrProperties(i,e){var s,a,c,d,u,p,f,g;const{sceneObject:n}=this,o=n.features;if(!o)return;const r=Reflect.get(o,"features")||Reflect.get(o,"geometries");if(r){if(e){let m=r.find(y=>(y==null?void 0:y.properties[i])==e);return{type:m!=null&&m.coordinates?m.type:(s=m==null?void 0:m.geometry)==null?void 0:s.type,positions:(m==null?void 0:m.coordinates)||((a=m==null?void 0:m.geometry)==null?void 0:a.coordinates)}}else if(typeof i=="number")return{type:(c=r[i])!=null&&c.coordinates?r[i].type:(u=(d=r[i])==null?void 0:d.geometry)==null?void 0:u.type,positions:((p=r[i])==null?void 0:p.coordinates)||((g=(f=r[i])==null?void 0:f.geometry)==null?void 0:g.coordinates)}}}async _calculateFeatureHeight(i,e,n){const o=[...i];return e=="NONE"?o[2]=o[2]??0:e=="CLAMP_TO_GROUND"||!o[2]?o[2]=await n.getTerrainHeight(o)??0:o[2]+=await n.getTerrainHeight(o)??0,o}};v(Da,"type",Da.register("ESCesiumViewer",w.ESGeoJson.type,Da));let Ju=Da;const ba=class ba extends vt{constructor(e,n){super(e,n);v(this,"_czmGeoESRectangle");v(this,"_geoPolyline");if(this._geoPolyline=this.disposeVar(new Ie(n,e.id)),this._czmGeoESRectangle=this.disposeVar(new Ci(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const r=this._czmGeoESRectangle,s=this._geoPolyline;s.arcType="RHUMB",this.dispose(l.track([s,"color"],[e,"strokeColor"])),this.dispose(l.track([s,"width"],[e,"strokeWidth"])),this.dispose(l.track([s,"ground"],[e,"strokeGround"])),this.dispose(l.track([r,"ground"],[e,"fillGround"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"]));{const a=()=>{s.show=e.show&&e.stroked,r.show=e.show&&e.filled};a();const c=this.disposeVar(l.createNextAnimateFrameEvent(e.showChanged,e.strokedChanged,e.filledChanged));this.dispose(c.disposableOn(a))}{const a=()=>{e.filled?r.material={type:"Color",color:e.fillColor}:r.material=void 0};a();const c=this.disposeVar(l.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(c.disposableOn(a))}{const a=()=>{const c=e.points;if(c&&c.length>=2){const{minPos:d,maxPos:u}=w.getMinMaxCorner(c);r.rectangle=[d[0],d[1],u[0],u[1]],r.height=c[0][2],r.extrudedHeight=c[0][2];const p=c.map(y=>(c&&(y[2]=c[0][2]),y)),f=p[0],g=p[1],m=[f,[f[0],g[1],f[2]],g,[g[0],f[1],g[2]]];s.positions=[...m,f]}else r.rectangle=void 0,s.positions=void 0,r.height=0,r.extrudedHeight=0};a(),this.dispose(e.pointsChanged.disposableOn(()=>a()))}}get czmGeoESRectangle(){return this._czmGeoESRectangle}flyTo(e,n){const{sceneObject:o,czmViewer:r}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):o.points?(ae(r,o,n,o.points,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,czmGeoESRectangle:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):o.points?(ae(r,o,n,o.points,e),!0):!1:!1}};v(ba,"type",ba.register("ESCesiumViewer",w.ESGeoRectangle.type,ba));let Bu=ba;class Os extends l.Destroyable{constructor(e,n){super();v(this,"_flyToEvent",this.disposeVar(new l.Event));v(this,"_geoPolygon");this._geoPolygon=this.disposeVar(new _n(e,n));const{geoPolygon:o}=this;this.dispose(l.bind([o,"allowPicking"],[this,"allowPicking"])),this.dispose(this.flyToEvent.disposableOn(s=>{o.flyTo(s)})),this.dispose(l.bind([o,"show"],[this,"show"])),this.dispose(l.bind([o,"fill"],[this,"filled"])),this.dispose(l.bind([o,"strokeGround"],[this,"strokeGround"])),this.dispose(l.bind([o,"ground"],[this,"ground"])),this.dispose(l.bind([o,"outline"],[this,"outline"])),this.dispose(l.bind([o,"outlineColor"],[this,"outlineColor"])),this.dispose(l.bind([o,"outlineWidth"],[this,"outlineWidth"])),this.dispose(l.bind([o,"color"],[this,"color"])),this.dispose(l.bind([o,"depth"],[this,"depth"]));const r=()=>{if(this.positions&&this.positions.length>=2){const s=wd([...this.positions,this.positions[0]]);o.positions=s}else o.positions=void 0};r(),this.dispose(this.positionsChanged.disposableOn(r))}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get geoPolygon(){return this._geoPolygon}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,strokeGround:!1,ground:!1,outline:!1,filled:!0,outlineColor:l.reactArray([1,1,1,1]),outlineWidth:1,color:l.reactArrayWithUndefined([1,1,1,.5]),positions:l.reactPositions(void 0),depth:0})})(Os||(Os={})),l.extendClassProps(Os.prototype,Os.createDefaultProps);const Ra=class Ra extends vt{constructor(e,n){super(e,n);v(this,"_geoSmoothPolygon");if(this._geoSmoothPolygon=this.disposeVar(new Os(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const r=this._geoSmoothPolygon;this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.bind([r,"positions"],[e,"points"])),this.dispose(l.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(l.track([r,"outline"],[e,"stroked"])),this.dispose(l.track([r,"outlineColor"],[e,"strokeColor"])),this.dispose(l.track([r,"outlineWidth"],[e,"strokeWidth"])),this.dispose(l.track([r,"strokeGround"],[e,"strokeGround"])),this.dispose(l.track([r,"filled"],[e,"filled"])),this.dispose(l.track([r,"color"],[e,"fillColor"])),this.dispose(l.track([r,"ground"],[e,"ground"]));{const s=()=>{r.ground=e.ground||e.fillGround};s();const a=this.dv(l.createNextAnimateFrameEvent(e.groundChanged,e.fillGroundChanged));this.d(a.don(s))}{const s=()=>{r.color=e.filled?e.fillColor:Ls.defaults.fillStyle.color};s();const a=this.disposeVar(l.createNextAnimateFrameEvent(e.fillStyleChanged,e.filledChanged));this.dispose(a.disposableOn(s))}this.dispose(l.track([r,"depth"],[e,"depth"]))}get geoSmoothPolygon(){return this._geoSmoothPolygon}flyTo(e,n){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):s.positions?(ae(r,o,n,s.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,geoSmoothPolygon:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):s.positions?(ae(r,o,n,s.positions,e),!0):!1:!1}};v(Ra,"type",Ra.register("ESCesiumViewer",Ls.type,Ra));let ju=Ra;const xa=class xa extends Ce{constructor(e,n){super(e,n);v(this,"_czmModel");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModel=this.dv(new at(n,e.id));const r=this._czmModel;this.d(r.readyEvent.don(a=>{r.gltf.animations&&(r.activeAnimationsJson=r.gltf.animations.map((c,d)=>({index:d,loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration * 2"}))),e.czmModelReadyEvent.emit(a)})),this.ad(new rc(o,this._czmModel)),this.d(l.track([r,"show"],[e,"show"])),this.d(l.track([r,"color"],[e,"czmColor"])),this.d(l.track([r,"nativeMaximumScale"],[e,"czmMaximumScale"])),this.d(l.track([r,"nativeMinimumPixelSize"],[e,"czmMinimumPixelSize"])),this.d(l.bind([r,"position"],[e,"position"])),this.d(l.track([r,"nativeScale"],[e,"czmNativeScale"])),this.d(l.track([r,"scale"],[e,"scale"])),this.ad(l.track([r,"imageBasedLightingFactor"],[e,"czmImageBasedLightingFactor"])),this.d(l.track([r,"environmentMapManager"],[e,"czmEnvironmentMapManager"]));{const a=c=>{e.czmEnvironmentMapManager=e.czmEnvironmentMapManager?{...e.czmEnvironmentMapManager,atmosphereScatteringIntensity:c}:{atmosphereScatteringIntensity:c}};a(e.czmAtmosphereScatteringIntensity),this.ad(e.czmAtmosphereScatteringIntensityChanged.don(c=>a(c)))}{const a=()=>{var c,d;(c=e.czmEnvironmentMapManager)!=null&&c.atmosphereScatteringIntensity&&(e.czmAtmosphereScatteringIntensity=(d=e.czmEnvironmentMapManager)==null?void 0:d.atmosphereScatteringIntensity)};a(),this.ad(e.czmEnvironmentMapManagerChanged.don(a))}{const a=()=>{const c=[...e.rotation??[0,0,0]];c[0]+=e.instances&&e.instances.length!=0?0:90,r.rotation=c};a(),this.d(e.rotationChanged.don(a));{const c=()=>{if(a(),!e.instances){r.instances=e.instances;return}r.instances=e.instances.map(d=>{const u=JSON.parse(JSON.stringify(d));return!u.rotation&&(u.rotation=[0,0,0]),u.rotation[0]+=90,u})};c(),this.ad(e.instancesChanged.don(c))}}this.ad(e.setMaterialEvent.don(a=>{r.setMaterial(a)}));{const a=()=>{const c=[...r.rotation];c[0]-=e.instances&&e.instances.length!=0?0:90,e.rotation=c};a(),this.d(r.rotationChanged.don(a))}{const a=this.dv(l.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),c=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};c(),this.d(a.don(c))}const s=()=>{r.url=w.ESSceneObject.context.getStrFromEnv(sc(typeof e.url=="string"?e.url:e.url.url))};s(),this.d(e.urlChanged.don(s)),this.d(e.setNodePositionEvent.don((a,c)=>{r.setNodeTranslation(a,c)})),this.d(e.setNodeRotationEvent.don((a,c)=>{r.setNodeRotation(a,c)})),this.d(e.setNodeScaleEvent.don((a,c)=>{r.setNodeScale(a,c)})),this.d(e.printDebugInfoEvent.don(()=>{r.printDebugInfo()}))}get model(){return this._czmModel}flyTo(e,n){const{sceneObject:o,czmViewer:r,model:s}=this;return r.actived?o.flyToParam||o.flyInParam?(super.flyTo(e,n),!0):(s&&It(r,o,n,e,s,!0),!!s):!1}};v(xa,"type",xa.register("ESCesiumViewer",w.ESGltfModel.type,xa));let ep=xa;function g0(t,i){const e=t[0]-i[0],n=t[1]-i[1],o=t[2]-i[2];return Math.sqrt(e*e+n*n+o*o)}class Ns extends l.Destroyable{constructor(e,n){super();v(this,"_pickedEvent",this.disposeVar(new l.Event));v(this,"_flyToEvent",this.disposeVar(new l.Event));v(this,"_distance",this.disposeVar(l.react(0)));v(this,"_surfaceDistance",this.disposeVar(l.react(0)));v(this,"_height",this.disposeVar(l.react(0)));v(this,"_middlePosition",this.disposeVar(l.reactArrayWithUndefined(void 0)));v(this,"_heightPosition",this.disposeVar(l.reactArrayWithUndefined(void 0)));const o=()=>{if(this.positions)if(this.positions.length>=2)if(this._middlePosition.value=[this.positions[0][0],this.positions[0][1],this.positions[1][2]],this._heightPosition.value=[this.positions[0][0],this.positions[0][1],.5*(this.positions[1][2]+this.positions[0][2])],this.arcType===void 0||this.arcType==="GEODESIC"){const s=this._surfaceDistance.value=w.geoDistance(this.positions[0],this.positions[1]),a=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(s*s+a*a)}else if(this.arcType==="RHUMB"){const s=this._surfaceDistance.value=w.geoRhumbDistance(this.positions[0],this.positions[1]),a=this._height.value=this.positions[1][2]-this.positions[0][2];this._distance.value=Math.sqrt(s*s+a*a)}else if(this.arcType==="NONE"){const s=w.lbhToXyz(this.positions[0]),a=w.lbhToXyz(this.positions[1]);this._distance.value=g0(s,a),this._surfaceDistance.value=g0(w.lbhToXyz(this._middlePosition.value),a),this._height.value=this.positions[1][2]-this.positions[0][2]}else console.warn(`未知的arcType: ${this.arcType},导致距离无法计算!`);else this._heightPosition.value=void 0,this._distance.value=0,this._surfaceDistance.value=0,this._height.value=0};o();const r=this.disposeVar(l.createNextAnimateFrameEvent(this.positionsChanged,this.arcTypeChanged));this.dispose(r.disposableOn(o));{const s=this.disposeVar(new Ie(e,n));s.ground=!1,s.loop=!1,this.dispose(l.track([s,"allowPicking"],[this,"allowPicking"])),this.dispose(l.bind([s,"arcType"],[this,"arcType"])),this.dispose(l.bind([s,"color"],[this,"color"])),this.dispose(l.bind([s,"dashLength"],[this,"dashLength"])),this.dispose(l.bind([s,"dashPattern"],[this,"dashPattern"])),this.dispose(l.bind([s,"gapColor"],[this,"gapColor"])),this.dispose(l.bind([s,"hasArrow"],[this,"hasArrow"])),this.dispose(l.bind([s,"hasDash"],[this,"hasDash"])),this.dispose(l.bind([s,"show"],[this,"show"])),this.dispose(l.bind([s,"width"],[this,"width"])),this.dispose(l.bind([s,"depthTest"],[this,"depthTest"]));{s.loop=!0;const c=()=>{if(this.positions&&this.positions.length===2){const[d,u]=this.positions;s.positions=[d,u,[d[0],d[1],u[2]]]}else s.positions=void 0};c(),this.dispose(this.positionsChanged.disposableOn(c))}this.dispose(this.flyToEvent.disposableOn(c=>{e.actived&&s.flyTo(c)}));const a=this.disposeVar(new $e(e,n));this.dispose(l.track([a,"shadowDom"],[this,"shadowDom"])),this.dispose(l.track([a,"cssAllInitial"],[this,"cssAllInitial"])),this.dispose(l.track([a,"show"],[this,"show"]));{const c=()=>{a.position=this.heightPosition};c(),this.dispose(this.heightPositionChanged.disposableOn(c))}{const c=()=>{a.innerHTML=oo(`高度: ${ac(this.height)}`,0)};c(),this.dispose(this.heightChanged.disposableOn(c))}this.ad(a.pickedEvent.don(c=>{Wi(c)===0&&this.pickedEvent.emit(c)}))}}get pickedEvent(){return this._pickedEvent}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get distance(){return this._distance.value}get distanceChanged(){return this._distance.changed}get surfaceDistance(){return this._surfaceDistance.value}get surfaceDistanceChanged(){return this._surfaceDistance.changed}get height(){return this._height.value}get heightChanged(){return this._height.changed}get middlePosition(){return this._middlePosition.value}get middlePositionChanged(){return this._middlePosition.changed}get heightPosition(){return this._heightPosition.value}get heightPositionChanged(){return this._heightPosition.changed}}(t=>{t.createDefaultProps=()=>({show:!0,allowPicking:!1,positions:l.reactPositions(void 0),width:1,color:l.reactArray([1,1,1,1]),hasDash:!1,gapColor:l.reactArrayWithUndefined([0,0,0,0]),dashLength:16,dashPattern:255,hasArrow:!1,arcType:"GEODESIC",depthTest:!1,shadowDom:!1,cssAllInitial:!1})})(Ns||(Ns={})),l.extendClassProps(Ns.prototype,Ns.createDefaultProps);const Fa=class Fa extends vt{constructor(e,n){super(e,n);v(this,"_geoHeightMeasurement");if(this._geoHeightMeasurement=this.disposeVar(new Ns(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const{czmHeightMeasurement:r}=this;this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"])),this.dispose(l.bind([r,"positions"],[e,"points"]));{const s=()=>{if(e.stroked)r.width=e.strokeWidth;else{r.width=0;return}r.width=e.strokeWidth,r.color=e.strokeColor;const d=e.strokeMaterial??"normal";d==="hasDash"?(r.hasDash=!0,r.hasArrow=!1):d==="hasArrow"?(r.hasDash=!1,r.hasArrow=!0):(r.hasDash=!1,r.hasArrow=!1);const u=e.strokeStyle;if(u.material==="hasDash"&&u.materialParams)try{const p=u.materialParams;Reflect.has(p,"gapColor")&&(r.gapColor=p.gapColor??[0,0,0,0]),Reflect.has(p,"dashLength")&&(r.dashLength=p.dashLength),Reflect.has(p,"dashPattern")&&(r.dashPattern=p.dashPattern)}catch(p){console.error(p)}else r.gapColor=[0,0,0,0],r.dashLength=0,r.dashPattern=0};s();const a=this.disposeVar(l.createNextAnimateFrameEvent(e.strokeStyleChanged,e.strokedChanged));this.dispose(a.disposableOn(s))}this.dispose(r.pickedEvent.disposableOn(s=>{Wi(s)===0&&(e.allowPicking??!1)&&e.pickedEvent.emit(s)}))}get czmHeightMeasurement(){return this._geoHeightMeasurement}flyTo(e,n){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):s.positions?(ae(r,o,n,s.positions,e),!0):!1:!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,czmHeightMeasurement:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):s.positions?(ae(r,o,n,s.positions,e),!0):!1:!1}};v(Fa,"type",Fa.register("ESCesiumViewer",w.ESHeightMeasurement.type,Fa));let tp=Fa;const ip={czmAnimationsStand:[{index:0,name:"Stand",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsWalk:[{index:2,name:"Walk",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}],czmAnimationsRun:[{index:1,name:"Run",loop:"REPEAT",animationTime:"(duration) => Date.now() / 1000 / duration"}]},ka=class ka extends Ce{constructor(e,n){super(e,n);v(this,"_czmModelPrimitive");const o=n.viewer;if(!o){console.warn("viewer is undefined!");return}this._czmModelPrimitive=this.disposeVar(new at(n,this.sceneObject.id));const r=this._czmModelPrimitive;this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.bind([r,"position"],[e,"position"])),this.dispose(et([r,"rotation"],[e,"rotation"])),this.dispose(l.bind([r,"scale"],[e,"scale"]));{const y=this.dv(l.createNextAnimateFrameEvent(e.allowPickingChanged,e.editingChanged)),P=()=>{e.allowPicking&&!e.editing?r.allowPicking=!0:r.allowPicking=!1};P(),this.d(y.don(P))}const s=w.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/worker.glb"),a=w.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/police.glb"),c=w.ESSceneObject.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/pedestrian.glb"),d=w.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/Stranger.glb"),u=w.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsMan.glb"),p=w.ESSceneObject.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/glb/human/SuitsWoman.glb"),f=()=>{switch(e.mode){case"worker":r.url=s;break;case"police":r.url=a;break;case"pedestrian":r.url=c;break;case"stranger":r.url=d;break;case"suitMan":r.url=u;break;case"suitWoman":r.url=p;break;default:r.url=s;break}};this.dispose(e.modeChanged.disposableOn(()=>{f()})),f();const g=()=>{const y=e.animation??w.ESHuman.defaults.animation;if(!e.show){r.activeAnimationsJson=void 0;return}y==="walking"?r.activeAnimationsJson=ip.czmAnimationsWalk:y==="standing"?r.activeAnimationsJson=ip.czmAnimationsStand:y==="running"&&(r.activeAnimationsJson=ip.czmAnimationsRun)};g();const m=this.ad(l.createNextAnimateFrameEvent(e.showChanged,e.animationChanged));this.dispose(m.disposableOn(()=>g())),this.ad(new rc(o,r))}get czmModelPrimitive(){return this._czmModelPrimitive}flyTo(e,n){const{sceneObject:o,czmViewer:r,czmModelPrimitive:s}=this;return!r.actived||!r.viewer?!1:o.flyToParam||o.flyInParam?(super.flyTo(e,n),!0):(s&&It(r,o,n,e,s,!0),!!s)}};v(ka,"type",ka.register("ESCesiumViewer",w.ESHuman.type,ka));let np=ka;class m0 extends w.Destroyable{constructor(e,n){super();v(this,"_czmGeoCanvasImagePoi");v(this,"flyTo",(e,n)=>{if(this.czmGeoCanvasImagePoi.position){se(this.czmViewer.viewer,this.czmGeoCanvasImagePoi.position,1e3,Kt,e);return}this.czmGeoCanvasImagePoi.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=n,this._czmGeoCanvasImagePoi=this.disposeVar(new vi(n));const o=this._czmGeoCanvasImagePoi;o.pickOnClick=!0,this.d(o.pickedEvent.don(r=>{(e.allowPicking??!1)&&e.pickedEvent.emit(r)}));{const r=u=>{let p=u;return u.includes("inner://")&&(p="${earthsdk3-assets-script-dir}/assets/img/points/"+u.split("inner://")[1]),w.ESSceneObject.context.getStrFromEnv(sc(p))},s=()=>{const u=r(typeof e.url=="string"?e.url:e.url.url);if(o.imageUri=u,e.sizeByContent){const f=new Image;f.src=u,f.onload=()=>{o.size=[f.width,f.height]}}else{const f=e.size;o.size=[...f]}},a=this.disposeVar(l.createNextAnimateFrameEvent(e.urlChanged,e.sizeByContentChanged,e.sizeChanged));this.dispose(a.disposableOn(()=>s())),s(),this.d(l.track([o,"zOrder"],[e,"zOrder"])),this.dispose(l.track([o,"show"],[e,"show"])),this.dispose(l.bind([o,"position"],[e,"position"])),this.ad(l.bind([o,"isHoverZoom"],[e,"isHoverZoom"]));{const u=()=>{o.scale=[e.scale[1],e.scale[2]]};u(),this.dispose(e.scaleChanged.don(u))}const c=()=>{const u=e.anchor,p=e.offset;u?o.originRatioAndOffset=[...u,-p[0],-p[1]]:o.originRatioAndOffset=[0,0,0,0]},d=this.ad(l.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(d.disposableOn(()=>c())),c(),this.dispose(o.clickEvent.disposableOn(u=>{const{offsetX:p,offsetY:f}=u,m={type:u.button===0?"leftClick":u.button===2?"rightClick":void 0,add:{mousePos:[p,f]}};e.widgetEvent.emit(m)})),this.dispose(o.hoveredChanged.disposableOn(u=>{if(u===void 0)return;const p={type:u?"mouseEnter":"mouseLeave"};e.widgetEvent.emit(p)}))}}get czmGeoCanvasImagePoi(){return this._czmGeoCanvasImagePoi}}class v0 extends w.Destroyable{constructor(e,n,o){super();v(this,"_czmGeoImageModel");v(this,"_eventInfo",{type:"leftClick",add:{mousePos:[0,0]}});v(this,"_isPointEvent",!1);v(this,"flyTo",(e,n)=>{if(this.czmGeoImageModel.position)return Jt(this.czmViewer,this.sceneObject,n,this.sceneObject.position,Math.max(...this.czmGeoImageModel.size),e,!0);this.czmGeoImageModel.flyTo(e&&e*1e3)});this.sceneObject=e,this.czmViewer=n,this._czmGeoImageModel=this.disposeVar(new Hi(n,e.id));const r=this._czmGeoImageModel;this.ad(n.clickEvent.don(f=>{const g=f==null?void 0:f.pointerEvent;g&&(this._isPointEvent=!0,this._eventInfo={type:g.button==0?"leftClick":g.button==2?"rightClick":"leftClick",add:{mousePos:[g.offsetX,g.offsetY]}})})),this.d(e.pickedEvent.don(f=>{var g,m,y;f.screenPosition&&this._isPointEvent&&f.attachedInfo!="innerHoverEvent"&&((g=this._eventInfo.add)!=null&&g.mousePos)&&Math.abs(f.screenPosition[0]-((m=this._eventInfo.add)==null?void 0:m.mousePos[0]))<1&&Math.abs(f.screenPosition[1]-((y=this._eventInfo.add)==null?void 0:y.mousePos[1]))<1&&(e.widgetEvent.emit(this._eventInfo),this._isPointEvent=!1)})),w.registerCreatedEventUpdate(this,e,()=>{const f=n.getEngineObject(e);this.ad(f.lastHoverResultChanged.don((g,m)=>{(g==null?void 0:g.sceneObject)==(m==null?void 0:m.sceneObject)||(g==null?void 0:g.sceneObject)!=e&&(m==null?void 0:m.sceneObject)!=e||(g!=null&&g.sceneObject&&(this._eventInfo={type:"mouseEnter",add:{mousePos:g==null?void 0:g.screenPosition}},g.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&g.sceneObject.id==e.id&&(r.scale=[r.scale[0]*1.5,r.scale[1]*1.5])),m!=null&&m.sceneObject&&(this._eventInfo={type:"mouseLeave",add:{mousePos:g==null?void 0:g.screenPosition}},m.sceneObject.widgetEvent.emit(this._eventInfo),e.isHoverZoom&&m.sceneObject.id==e.id&&(r.scale=[r.scale[0]/1.5,r.scale[1]/1.5])))}))});const s=e.sizeByContent,c=(f=>{let g=f;return f.includes("inner://")&&(g="${earthsdk3-assets-script-dir}/assets/img/points/"+f.split("inner://")[1]),w.ESSceneObject.context.getStrFromEnv(sc(g))})(typeof o.sceneObject.url=="string"?o.sceneObject.url:o.sceneObject.url.url),d=new Image;d.src=c,d.onload=()=>{if(s)r.size=[d.width/100,d.height/100];else{const f=e.size;r.size=[f[0]/100,f[1]/100]}},r.uri=c,this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.bind([r,"position"],[e,"position"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"])),r.pixelSize=void 0,r.useAxis="XZ";{const f=()=>{r.scale=[e.scale[1],e.scale[2]]};f(),this.d(e.scaleChanged.don(f))}{const f=()=>{e.rotationType===0&&(r.rotationMode="WithProp",this.d(et([r,"rotation"],[e,"rotation"]))),e.rotationType===1&&(r.rotationMode="WithCamera"),e.rotationType===2&&(r.rotationMode="WithCameraOnlyZ")};f(),this.dispose(e.rotationTypeChanged.disposableOn(f))}const u=()=>{const f=e.anchor,g=e.offset;f?r.originRatioAndOffset=[...f,-g[0]/100,-g[1]/100]:r.originRatioAndOffset=[0,0,0,0]},p=this.ad(l.createNextAnimateFrameEvent(e.anchorChanged,e.offsetChanged));this.dispose(p.disposableOn(()=>u())),u()}get czmGeoImageModel(){return this._czmGeoImageModel}}const za=class za extends xs{constructor(e,n){super(e,n);v(this,"_resetting");if(!n.viewer){console.warn("viewer is undefined!");return}const r=this.disposeVar(l.createNextAnimateFrameEvent(this.sceneObject.urlChanged,this.sceneObject.screenRenderChanged,this.sceneObject.sizeByContentChanged,this.sceneObject.sizeChanged));this._resetting=this.disposeVar(new l.ObjResettingWithEvent(r,()=>this.sceneObject.screenRender?new m0(this.sceneObject,this.czmViewer):new v0(this.sceneObject,this.czmViewer,this)))}get resetting(){return this._resetting}flyTo(e,n){const{sceneObject:o,czmViewer:r,resetting:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(s&&s.obj&&s.obj.flyTo(e,n),o.flyOverEvent.emit(n,"over",r),!0):!1}};v(za,"type",za.register("ESCesiumViewer",w.ESImageLabel.type,za));let op=za;function MI(t){switch(t){case"wms":return"WebMapServiceImageryProvider";case"tms":return"TileMapServiceImageryProvider";case"wmts":return"WebMapTileServiceImageryProvider";case"xyz":return"UrlTemplateImageryProvider";case"ion":return"IonImageryProvider"}}const La=class La extends Qt{constructor(e,n){super(e,n);v(this,"_czmImagery");if(this._czmImagery=this.dv(new xn(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const r=this._czmImagery;{const s=this.ad(l.reactJson(""));{const d=()=>{if(typeof e.url=="string")s.value=w.ESSceneObject.context.getStrFromEnv(e.url);else{const u=e.url;u.url=w.ESSceneObject.context.getStrFromEnv(u.url),s.value=u}};d(),this.ad(e.urlChanged.don(d))}const a=()=>{var m;if(!s.value)return;const d=(((m=e.options)==null?void 0:m.type)??"auto").toLowerCase(),u=e.options??{};let p={type:"UrlTemplateImageryProvider",url:s.value,rectangle:e.rectangle,maximumLevel:e.maximumLevel,minimumLevel:e.minimumLevel,...u},f=s.value,g=typeof f=="string"?f:f.url;if(d==="auto"){const y=g.toLowerCase();if(y.startsWith("ion://")){const S=+y.substring(6);p={...u,assetId:S,type:"IonImageryProvider"}}else if(y.includes("{x}")||y.includes("{y}")||y.includes("{z}"))p.type="UrlTemplateImageryProvider";else if(y.includes("wmts"))p.type="WebMapTileServiceImageryProvider";else if(y.includes("wms"))p.type="WebMapServiceImageryProvider";else{if(g.includes("/tilemapresource.xml")){const P=g.split("/tilemapresource.xml").join("");typeof f=="string"?f=P:f.url=P,p.url=f}p.type="TileMapServiceImageryProvider"}}else{if(d==="tms"&&g.includes("/tilemapresource.xml")){const y=g.split("/tilemapresource.xml").join("");typeof f=="string"?f=y:f.url=y,p.url=f}else if(d==="ion"&&g.startsWith("ion://")){const P=+g.substring(6);p={...u,assetId:P,type:"IonImageryProvider"}}p.type=MI(d)}console.log("imageryProvider",p),r.imageryProvider=p};a();const c=this.dv(l.createNextAnimateFrameEvent(s.changed,e.maximumLevelChanged,e.minimumLevelChanged,e.optionsChanged,e.rectangleChanged));this.d(c.don(a))}this.d(l.track([r,"show"],[e,"show"])),this.d(l.bind([r,"alpha"],[e,"opacity"])),this.d(l.bind([r,"alpha"],[e,"czmAlpha"])),this.d(l.track([r,"splitDirection"],[e,"splitDirection"])),this.d(l.track([r,"brightness"],[e,"czmBrightness"])),this.d(l.track([r,"contrast"],[e,"czmContrast"])),this.d(l.track([r,"hue"],[e,"czmHue"])),this.d(l.track([r,"saturation"],[e,"czmSaturation"])),this.d(l.track([r,"gamma"],[e,"czmGamma"])),this.d(l.track([r,"rectangle"],[e,"rectangle"])),this.d(l.track([r,"zIndex"],[e,"zIndex"])),this.ad(l.track([r,"targetID"],[e,"targetID"]))}get czmImagery(){return this._czmImagery}flyTo(e,n){const{sceneObject:o,czmViewer:r,czmImagery:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(s.flyTo(e&&e),o.flyOverEvent.emit(n,"over",r),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,czmImagery:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):(s.flyTo(e&&e),o.flyOverEvent.emit(n,"over",r),!0):!1}};v(La,"type",La.register("ESCesiumViewer",w.ESImageryLayer.type,La));let rp=La;class II extends l.Destroyable{constructor(e,n,o,r){super();v(this,"_show");v(this,"_czmESCustomPrimitive");v(this,"_czmTexture");this._sceneObject=e,this._show=this.disposeVar(l.react(this._sceneObject.show)),this._czmESCustomPrimitive=this.dv(new ke(n,this._sceneObject.id)),this._czmTexture=this.dv(new Le(n));const s=e,a=this._czmESCustomPrimitive,c=this._czmTexture;this.dispose(l.track([a,"show"],[this,"show"])),this.dispose(l.track([a,"show"],[s,"show"])),this.dispose(l.track([a,"allowPicking"],[s,"allowPicking"])),this.dispose(l.track([a,"rotation"],[s,"rotation"])),this.dispose(l.track([a,"position"],[s,"position"])),this.dispose(l.track([a,"scale"],[s,"scale"])),this.ad(s.allowPickingChanged.don(()=>{a.allowPicking=s.allowPicking,a.pass=s.allowPicking?"TRANSLUCENT":"OVERLAY"}));{const d=()=>{const p=s.size/2,f=r[0].map(L=>L*p),g=r[1].map(L=>L*p),m=r[2].map(L=>L*p),y=r[3].map(L=>L*p),P=[...f,...g,...m,...y];let S=[0,3,2,0,2,1];(o=="north"||o=="west"||o=="bottom")&&(S=S.reverse());const C=[0,0],E=[1,0],T=[1,1],I=[0,1];let b=[];o=="east"||o=="south"?b=[...E,...C,...I,...T]:o=="west"?b=[...E,...T,...I,...C]:o=="top"?b=[...I,...T,...E,...C]:b=[...C,...E,...T,...I],a.indexTypedArray=new Uint16Array(S),a.attributes={position:{typedArray:new Float32Array(P),componentsPerAttribute:3},st:{typedArray:new Float32Array(b),componentsPerAttribute:2}},c.uri=w.ESSceneObject.context.getStrFromEnv(`\${earthsdk3-assets-script-dir}/assets/img/skybox/${s.mode}/${o}.${s.mode!="blueSky"?"png":"jpg"}`);const x=n.getCameraInfo();if(x!=null){const U=w.getDistancesFromPositions([s.position,x.position],"NONE")[0]/(s.size/2*s.autoOpacityFactor);this.changeOpacity(s.autoFollow?1:U)}const z=a.computeLocalAxisedBoundingBoxFromAttribute("position");if(!z)return;const{min:W,max:N}=z;a.setLocalAxisedBoundingBox(W,N)};d();const u=this.disposeVar(l.createNextAnimateFrameEvent(s.sizeChanged,s.modeChanged));this.dispose(u.disposableOn(d))}}get show(){return this._show.value}set show(e){this._show.value=e}get showChanged(){return this._show.changed}get czmESCustomPrimitive(){return this._czmESCustomPrimitive}get czmTexture(){return this._czmTexture}changeOpacity(e){this._czmESCustomPrimitive.uniformMap={u_image:{type:"texture",id:this._czmTexture.id},u_color:[1,1,1,1-e>=0?1-e:0]}}}class DI extends l.Destroyable{constructor(i,e,n){if(super(),!e.viewer)return;let o=!0,r;this.dispose(e.viewer.scene.preUpdate.addEventListener(()=>{s()}));function s(){var c;if(!((c=e.viewer)!=null&&c.camera))return;const a=e.getCameraInfo();if(a!=null&&(r==null||r.position[0]!=a.position[0]||r.position[1]!=a.position[1]||r.position[2]!=a.position[2]||r.rotation[0]!=a.rotation[0]||r.rotation[1]!=a.rotation[1]||r.rotation[2]!=a.rotation[2])){r=a;const u=w.getDistancesFromPositions([i.position,r.position],"NONE")[0]/(i.size/2*i.autoOpacityFactor);i.autoFollow?(i.position=r.position,o&&(o=!1,n.forEach(p=>{p.changeOpacity(1)}))):n.forEach(p=>{p.changeOpacity(u)})}}s()}}const Ke=class Ke extends Ce{constructor(e,n){super(e,n);v(this,"_czmSkyBoxComponents",[]);if(!n.viewer){console.warn("viewer is undefined!");return}!Ke._defaultLocalBox&&Ke._firstLoad&&(Ke._firstLoad=!1,Ke._defaultLocalBox=n.xbsjLocalBoxSources),Ke._eSLocalSkyBoxArr.push(e),this.d(()=>{Ke._eSLocalSkyBoxArr.includes(e)&&Ke._eSLocalSkyBoxArr.splice(Ke._eSLocalSkyBoxArr.indexOf(e),1),this.ChangeAutoFollow()});const r={bottom:[[-1,-1,-1],[1,-1,-1],[1,1,-1],[-1,1,-1]],top:[[-1,-1,1],[1,-1,1],[1,1,1],[-1,1,1]],south:[[-1,-1,-1],[1,-1,-1],[1,-1,1],[-1,-1,1]],north:[[-1,1,-1],[1,1,-1],[1,1,1],[-1,1,1]],east:[[1,-1,-1],[1,1,-1],[1,1,1],[1,-1,1]],west:[[-1,1,-1],[-1,1,1],[-1,-1,1],[-1,-1,-1]]};for(const s in r)if(Object.prototype.hasOwnProperty.call(r,s)){const a=r[s];this._czmSkyBoxComponents.push(this.dv(new II(e,n,s,a)))}{const s=this.disposeVar(l.createNextAnimateFrameEvent(e.autoFollowChanged,e.autoOpacityFactorChanged));this.disposeVar(new l.ObjResettingWithEvent(s,()=>(this.ChangeAutoFollow(),new DI(e,n,this._czmSkyBoxComponents))))}{const s=()=>{this.ChangeAutoFollow()},a=this.disposeVar(l.createNextAnimateFrameEvent(e.sizeChanged,e.modeChanged,e.showChanged));this.dispose(a.disposableOn(s))}}ChangeAutoFollow(){const{czmViewer:e}=this;for(let n=Ke._eSLocalSkyBoxArr.length-1;n>=0;n--){const o=Ke._eSLocalSkyBoxArr[n];if(o.autoFollow&&o.show){e.xbsjLocalBoxSources={positiveX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/east.${o.mode!="blueSky"?"png":"jpg"}`,negativeX:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/west.${o.mode!="blueSky"?"png":"jpg"}`,positiveY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/bottom.${o.mode!="blueSky"?"png":"jpg"}`,negativeY:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/top.${o.mode!="blueSky"?"png":"jpg"}`,positiveZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/north.${o.mode!="blueSky"?"png":"jpg"}`,negativeZ:`\${earthsdk3-assets-script-dir}/assets/img/skybox/${o.mode}/south.${o.mode!="blueSky"?"png":"jpg"}`};break}n==0&&(e.xbsjLocalBoxSources=Ke._defaultLocalBox)}Ke._eSLocalSkyBoxArr.length==0&&(e.xbsjLocalBoxSources=Ke._defaultLocalBox)}flyTo(e,n){const{sceneObject:o,czmViewer:r}=this;if(!r.actived)return!1;if(o.flyToParam||o.flyInParam)return super.flyTo(e,n);{const s=o.size??w.ESLocalSkyBox.defaults.size;return o.position?(Jt(r,o,n,o.position,s,e,!0),!0):!1}}};v(Ke,"type",Ke.register("ESCesiumViewer",w.ESLocalSkyBox.type,Ke)),v(Ke,"_defaultLocalBox"),v(Ke,"_firstLoad",!0),v(Ke,"_eSLocalSkyBoxArr",[]);let sp=Ke;const oi=class oi extends Ce{constructor(e,n){super(e,n);v(this,"_geoCustomDivPoi");v(this,"_textFunc",this.disposeVar(l.react(void 0)));if(this._geoCustomDivPoi=this.disposeVar(new $e(n,e.id)),!n.viewer){console.warn("viewer is undefined!");return}const r=this.geoCustomDivPoi;this.dispose(l.track([r,"show"],[e,"show"])),this.dispose(l.bind([r,"position"],[e,"position"])),this.dispose(l.track([r,"allowPicking"],[e,"allowPicking"]));{this.dispose(r.pickedEvent.disposableOn(s=>{(e.allowPicking??w.ESLocationMeasurement.defaults.allowPicking)&&e.pickedEvent.emit(s)})),this.dispose(r.innerHtmlMounted.disposableOn(s=>{const a=s.firstElementChild;a&&(a.style.pointerEvents="auto",a.style.cursor="default",a.onclick=c=>r.pickFromDiv(a,{type:"viewerPicking",pointerEvent:c}))}));{const s=()=>{if(!e.position)return;const c=(this.textFunc??oi.defaultTextFunc_度格式)(e.position);r.innerHTML=oo(c)};s();const a=this.disposeVar(l.createNextAnimateFrameEvent(e.positionChanged,this.textFuncChanged));this.dispose(a.disposableOn(s))}{const s=()=>{n.lonLatFormat??(n.lonLatFormat="DECIMAL_DEGREE"),this.textFunc=n.lonLatFormat=="DECIMAL_DEGREE"?oi.defaultTextFunc_度格式:n.lonLatFormat=="DEGREES_DECIMAL_MINUTES"?oi.defaultTextFunc_度分格式:oi.defaultTextFunc_度分秒格式};s(),this.d(n.lonLatFormatChanged.don(()=>{s()}))}}}get geoCustomDivPoi(){return this._geoCustomDivPoi}get textFunc(){return this._textFunc.value}set textFunc(e){this._textFunc.value=e}get textFuncChanged(){return this._textFunc.changed}flyTo(e,n){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:s}=this;return r.actived?o.flyToParam||o.flyInParam?super.flyTo(e,n):(s.flyTo(e),o.flyOverEvent.emit(n,"over",r),!0):!1}flyIn(e,n){const{sceneObject:o,czmViewer:r,geoCustomDivPoi:s}=this;return r.actived?o.flyInParam?super.flyIn(e,n):(s.flyTo(e),o.flyOverEvent.emit(n,"over",r),!0):!1}};v(oi,"type",oi.register("ESCesiumViewer",w.ESLocationMeasurement.type,oi)),v(oi,"defaultTextFunc_度格式",e=>{if(!e)return"";const[n=0,o=0,r=0]=e;return`经度: ${n.toFixed(5)}°
1254
1254
  纬度: ${o.toFixed(5)}°
1255
1255
  高度: ${r.toFixed(2)}m`}),v(oi,"defaultTextFunc_度分格式",e=>{if(!e)return"";const[n,o,r]=md(e,!0);return`经度: ${n}
1256
1256
  纬度: ${o}
@@ -2255,10 +2255,10 @@ async function initCesiumViewer(container, czmViewer) {
2255
2255
  `;function Kk(){const t="https://gitee.com/mirrors/CesiumJS/blob/main/packages/engine/Source/Core/Ion.js#L7",e=` 因浏览器同源策略限制,需要用户自行打开网址获取最新的token,点击确定自动打开网址,请不要拦截!
2256
2256
  github地址:https://github.com/CesiumGS/cesium/blob/main/packages/engine/Source/Core/Ion.js#L7
2257
2257
  gitee地址:${t}
2258
- `;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const rt=class rt extends w.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(l.react(0)));v(this,"_viewer",this.dv(l.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(l.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(l.react(0)));v(this,"_editingSystem",Dh);v(this,"_moveObjectsProcess",this.ad(i_()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new b2(this)),this.ad(new R2(this)),this.dv(new l.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new z2(this)})),this._viewerLegend=this.dv(new qk(this)),this._viewerInstance=this.dv(new l.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new cm(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=ie([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new l.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new FF(this.subContainer,this,o=>this._viewer.value=o,n.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Yt(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],rt.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Vt(e),rotation:$o(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const s=h.Cartesian3.fromDegrees(...e),a=h.Cartesian3.distance(o.positionWC,s),c=h.Cartesian3.subtract(s,r,new h.Cartesian3);h.Cartesian3.normalize(c,c);const d=h.Transforms.rotationMatrixFromPositionVelocity(r,c,h.Ellipsoid.WGS84),u=h.Matrix4.fromRotationTranslation(d,r);var p=h.Transforms.eastNorthUpToFixedFrame(h.Matrix4.getTranslation(u,new h.Cartesian3),h.Ellipsoid.WGS84,new h.Matrix4),f=h.Matrix4.multiply(h.Matrix4.inverse(p,new h.Matrix4),u,new h.Matrix4),g=h.Matrix4.getMatrix3(f,new h.Matrix3),m=h.Quaternion.fromRotationMatrix(g),y=h.HeadingPitchRoll.fromQuaternion(m);const P=$o(o);return{distance:a,heading:h.Math.toDegrees(y.heading)+90,pitch:h.Math.toDegrees(y.pitch),flyDuration:1,hDelta:-(P[0]-(h.Math.toDegrees(y.heading)+90)),pDelta:P[1]-h.Math.toDegrees(y.pitch)}}flyIn(e,n,o,r="default"){var c;if(!n)return;n[0]=-n[0];const s={position:e,rotation:n,duration:(o??1)*1e3},a=(c=this.viewer)==null?void 0:c.camera;return a&&ps(a,s)}flyTo(e,n,o="default"){var g;const{distance:r,heading:s,pitch:a,flyDuration:c,hDelta:d,pDelta:u}=e,p={position:n,viewDistance:r,rotation:[s,a,0],duration:c*1e3,hdelta:d,pdelta:u},f=(g=this.viewer)==null?void 0:g.camera;return f&&ps(f,p)}flyToBoundingSphere(e,n,o=1){var p;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=w.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:c}=s,d={position:a,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},u=(p=this.viewer)==null?void 0:p.camera;return u&&ps(u,d)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Vt(e),rotation:$o(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,r,s,a){var c,d;(d=(c=this._viewerInstance)==null?void 0:c.obj)==null||d.navigationManager.changeToLine(e,n,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,r,s){var a,c;(c=(a=this._viewerInstance)==null?void 0:a.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,r,s){var a,c;(c=(a=this._viewerInstance)==null?void 0:a.obj)==null||c.navigationManager.changeToFollow(e,n,o,r,s),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=h.VERSION,e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const r=h.Cartographic.fromDegrees(e,n,void 0,rt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,n){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await jm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Ve(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&n!=null&&(r.editingID=`${o.callSource}_${l.createGuid()}`,this._editingSystem.create(this,r,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=l.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&n.push(a)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=rt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!rt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=rt.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Mt(e,n)}localPositionsToPositions(e,n){return gn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=Ve(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},n=rt.defaults;return{...e,more:[...e.more,new w.GroupProperty([],"通用","通用"),new w.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",Qk,Zk,!0),new w.FunctionProperty([],()=>rt.getCesiumIonToken(),[],"获取官方token"),new w.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new w.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new w.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new w.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new w.GroupProperty([],"Viewer","Viewer"),new w.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new w.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new w.BooleanProperty([this,"shadows"]),new w.GroupProperty([],"比例尺","比例尺(Legend)"),new w.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new w.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new w.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new w.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new w.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new w.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new w.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new w.GroupProperty([],"场景","场景(Scene)"),new w.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new w.GroupProperty([],"Globe","Globe"),new w.BooleanProperty([this,"depthTestAgainstTerrain"],"depthTestAgainstTerrain",n.depthTestAgainstTerrain,!0),new w.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new w.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new w.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new w.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new w.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new w.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new w.BooleanProperty([this,"sceneGlobeShowSkirts"]),new w.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new w.ColorProperty([this,"sceneGlobeBaseColor"]),new w.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new w.JsonProperty([this,"sceneGlobeClippingPlanes"]),new w.StringProperty([this,"sceneGlobeClippingPlanesId"]),new w.JsonProperty([this,"sceneGlobeClippingPolygons"]),new w.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new w.GroupProperty([],"underground","underground"),new w.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new w.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new w.GroupProperty([],"Translucency","Translucency"),new w.BooleanProperty([this,"sceneGlobeTranslucencyEnabled"],"启用",n.sceneGlobeTranslucencyEnabled,!0),new w.NumberProperty([this,"sceneGlobeTranslucencyBackFaceAlpha"],"背面透明度",n.sceneGlobeTranslucencyBackFaceAlpha,!0),new w.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new w.NumberProperty([this,"sceneGlobeTranslucencyFrontFaceAlpha"],"正面透明度",n.sceneGlobeTranslucencyFrontFaceAlpha,!0),new w.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new w.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new w.GroupProperty([],"Sun","Sun"),new w.BooleanProperty([this,"sun"],"sun",n.sun,!0),new w.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new w.GroupProperty([],"Moon","Moon"),new w.BooleanProperty([this,"moon"],"moon",n.moon,!0),new w.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new w.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new w.GroupProperty([],"SkyBox","SkyBox"),new w.BooleanProperty([this,"sceneSkyBoxShow"]),new w.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new w.GroupProperty([],"Background","Background"),new w.BooleanProperty([this,"xbsjUseBackground"]),new w.StringProperty([this,"xbsjBackgroundImageUri"]),new w.ColorProperty([this,"xbsjBackgroundColor"]),new w.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new w.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new w.ColorProperty([this,"sceneBackgroundColor"]),new w.GroupProperty([],"Fog","Fog"),new w.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new w.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new w.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new w.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new w.GroupProperty([],"Sscc","Sscc"),new w.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new w.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new w.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new w.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new w.GroupProperty([],"后处理","后处理"),new w.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new w.GroupProperty([],"环境遮蔽","环境遮蔽"),new w.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new w.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new w.GroupProperty([],"Bloom","Bloom"),new w.BooleanProperty([this,"scenePpsBloomEnabled"]),new w.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new w.NumberProperty([this,"scenePpsBloomContrast"]),new w.NumberProperty([this,"scenePpsBloomBrightness"]),new w.NumberProperty([this,"scenePpsBloomDelta"]),new w.NumberProperty([this,"scenePpsBloomSigma"]),new w.NumberProperty([this,"scenePpsBloomStepSize"]),new w.GroupProperty([],"调试","调试"),new w.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new w.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new w.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new w.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new w.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new w.GroupProperty([],"Inspector","Inspector"),new w.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new w.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new w.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};v(rt,"type",rt.register("ESCesiumViewer",rt)),v(rt,"getCesiumIonToken",Kk),v(rt,"currentDefaultAccessToken",h.Ion.defaultAccessToken),v(rt,"latestDefaultAccessToken"),v(rt,"ObjectsToExcludeWrapper",k2),v(rt,"defaults",{...w.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,depthTestAgainstTerrain:!1,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyEnabled:!1,sceneGlobeTranslucencyBackFaceAlpha:1,sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlpha:1,sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),v(rt,"getHeightsScartchCarto",new h.Cartographic);let Re=rt;(t=>{t.createDefaultProps=()=>({...w.ESViewer.createDefaultProps(),...Yk()})})(Re||(Re={})),l.extendClassProps(Re.prototype,Re.createDefaultProps),R.copyright=void 0;try{const t="earthsdk3-cesium",i="3.4.1",e="2025-09-16T08:13:00.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="edc6b1a5e35b2412fad91ee205c768829c64b897",a=((Date.now()-175801038e4)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${r.slice(0,8)}.${e} (距今${a}个小时)
2258
+ `;console.log(e);const n=window.prompt(e,t);n&&window.open(n,"_blank")}const rt=class rt extends w.ESViewer{constructor(e){super(e);v(this,"_disabledInputStack",this.disposeVar(l.react(0)));v(this,"_viewer",this.dv(l.react(void 0)));v(this,"_viewerInstance");v(this,"_viewerLegend");v(this,"pickCustomAttachedInfo");v(this,"_fps",this.dv(l.react(0)));v(this,"_notSupportEditingCount",this.disposeVar(l.react(0)));v(this,"_editingSystem",Dh);v(this,"_moveObjectsProcess",this.ad(i_()));if(e.type!=="ESCesiumViewer")throw new Error("option.type must be ESCesiumViewer");this.ad(new b2(this)),this.ad(new R2(this)),this.dv(new l.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new z2(this)})),this._viewerLegend=this.dv(new qk(this)),this._viewerInstance=this.dv(new l.ObjResettingWithEvent(this.viewerChanged,()=>{if(this.viewer)return new cm(this,this.viewer)})),this.d(this.viewerChanged.don(o=>{this.viewer&&(this.viewer.scene.globe.baseColor=ie([1,1,1,1]))}));const n=e;this.d(this._viewer.changed.don(o=>{this.viewerChanged.emit(o)})),this.dv(new l.ObjResettingWithEvent(this.subContainerChanged,()=>{if(this.setStatus("Raw"),this.setStatusLog(""),!!this.subContainer)return new FF(this.subContainer,this,o=>this._viewer.value=o,n.options)}))}get disabledInputStack(){return this._disabledInputStack.value}get disabledInputStackChanged(){return this._disabledInputStack.changed}incrementDisabledInputStack(){++this._disabledInputStack.value}decrementDisabledInputStack(){--this._disabledInputStack.value}get viewer(){return this._viewer.value}get extensions(){return this.viewer&&Yt(this.viewer)}get viewerInstance(){return this._viewerInstance}get viewerLegend(){return this._viewerLegend}async pick(e,n,o){if(!this.extensions)return;const{pickingManager:r}=this.extensions;return await r.pick(e,void 0,n)}async pickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.pickPosition(e)}async quickPickPosition(e){if(!this.extensions)return;const{pickingManager:n}=this.extensions;return await n.quickPickPosition(e)}async getTerrainHeight(e){const{viewer:n}=this;if(!n)return;const o=h.Cartographic.fromDegrees(e[0],e[1],e[2],rt.getHeightsScartchCarto);return n.scene.globe.getHeight(o)}getCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Vt(e),rotation:$o(e)}}calcFlyToParam(e){if(!this.getCameraInfo()||!this.viewer)return;const{camera:o}=this.viewer;let r=o.positionWC;const s=h.Cartesian3.fromDegrees(...e),a=h.Cartesian3.distance(o.positionWC,s),c=h.Cartesian3.subtract(s,r,new h.Cartesian3);h.Cartesian3.normalize(c,c);const d=h.Transforms.rotationMatrixFromPositionVelocity(r,c,h.Ellipsoid.WGS84),u=h.Matrix4.fromRotationTranslation(d,r);var p=h.Transforms.eastNorthUpToFixedFrame(h.Matrix4.getTranslation(u,new h.Cartesian3),h.Ellipsoid.WGS84,new h.Matrix4),f=h.Matrix4.multiply(h.Matrix4.inverse(p,new h.Matrix4),u,new h.Matrix4),g=h.Matrix4.getMatrix3(f,new h.Matrix3),m=h.Quaternion.fromRotationMatrix(g),y=h.HeadingPitchRoll.fromQuaternion(m);const P=$o(o);return{distance:a,heading:h.Math.toDegrees(y.heading)+90,pitch:h.Math.toDegrees(y.pitch),flyDuration:1,hDelta:-(P[0]-(h.Math.toDegrees(y.heading)+90)),pDelta:P[1]-h.Math.toDegrees(y.pitch)}}flyIn(e,n,o,r="default"){var c;if(!n)return;n[0]=-n[0];const s={position:e,rotation:n,duration:(o??1)*1e3},a=(c=this.viewer)==null?void 0:c.camera;return a&&ps(a,s)}flyTo(e,n,o="default"){var g;const{distance:r,heading:s,pitch:a,flyDuration:c,hDelta:d,pDelta:u}=e,p={position:n,viewDistance:r,rotation:[s,a,0],duration:c*1e3,hdelta:d,pdelta:u},f=(g=this.viewer)==null?void 0:g.camera;return f&&ps(f,p)}flyToBoundingSphere(e,n,o=1){var p;const r=[[e[0],e[1],0],[e[0],e[3],0],[e[2],e[3],0],[e[2],e[1],0]],s=w.getGeoBoundingSphereFromPositions(r);if(!s)return;const{center:a,radius:c}=s,d={position:a,viewDistance:n??c,rotation:[0,-90,0],duration:o*1e3},u=(p=this.viewer)==null?void 0:p.camera;return u&&ps(u,d)}getCurrentCameraInfo(){if(!this.viewer)return;const{camera:e}=this.viewer;return{position:Vt(e),rotation:$o(e)}}getLengthInPixel(){return this._viewerLegend.length}changeToWalk(e,n=4.2,o=1.6){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToWalk(e,n,o),this._navigationMode.value="Walk"}changeToMap(){var e,n;(n=(e=this._viewerInstance)==null?void 0:e.obj)==null||n.navigationManager.changeToMap(),this._navigationMode.value="Map"}changeToRotateGlobe(e,n,o){var r,s;(s=(r=this._viewerInstance)==null?void 0:r.obj)==null||s.navigationManager.changeToRotateGlobe(e,n,o),this._navigationMode.value="RotateGlobe"}changeToLine(e,n,o,r,s,a){var c,d;(d=(c=this._viewerInstance)==null?void 0:c.obj)==null||d.navigationManager.changeToLine(e,n,o,r,s,a),this._navigationMode.value="Line"}changeToUserDefined(e){this.changeToMap(),console.warn("Cesium引擎暂不支持自定义漫游,已切换为Map模式")}changeToRotatePoint(e,n,o,r,s){var a,c;(c=(a=this._viewerInstance)==null?void 0:a.obj)==null||c.navigationManager.changeToRotatePoint(e,n,o,r,s),this._navigationMode.value="RotatePoint"}changeToFollow(e,n,o,r,s){var a,c;(c=(a=this._viewerInstance)==null?void 0:a.obj)==null||c.navigationManager.changeToFollow(e,n,o,r,s),this._navigationMode.value="Follow"}getFPS(){return this._fps.value}async getBoundSphere(e){return Promise.resolve(void 0)}async getVersion(){const e=window.g_XE3CopyRights??{};return e.cesium=h.VERSION,e}async getHeightByLonLat(e,n,o){if(!this.viewer)return null;const r=h.Cartographic.fromDegrees(e,n,void 0,rt.getHeightsScartchCarto);return this.viewer.scene.sampleHeight(r)??null}async getHeightsByLonLats(e,n){const o=e.map(s=>this.getHeightByLonLat(...s));return await Promise.all(o)}async capture(e,n){if(this.viewer)return await jm(this.viewer.scene,e,n)}async lonLatAltToScreenPosition(e){if(!this.viewer||!this.isPointVisible(e))return;const n=this.viewer.scene.cartesianToCanvasCoordinates(Ve(e));if(n)return[n.x,n.y]}get notSupportEditingCount(){return this._notSupportEditingCount.value}set notSupportEditingCount(e){this._notSupportEditingCount.value=e}get notSupportEditingCountChanged(){return this._notSupportEditingCount.changed}startEditing(e,n,o){o=Object.assign({useKeyToSwitch:!0,callSource:"outer"},o);const r=e.components.main??e;r&&n!=null&&(r.editingID=`${o.callSource}_${l.createGuid()}`,this._editingSystem.create(this,r,n,o.useKeyToSwitch))}stopEditing(){this._editingSystem.stop()}moveObjects(e){const n=[],o=l.createGuid();for(let r=0;r<e.length;r++){const s=e[r],a=s.components.main??s;a.editingID=o,a&&n.push(a)}this._moveObjectsProcess.restart(void 0,this,n,o)}getCzmObject(e){return this.sceneObjectsMap.get(e)}setCurrentDefaultAccessToken(){this.ionAccessToken=rt.currentDefaultAccessToken}setLatestDefaultAccessToken(){if(!rt.latestDefaultAccessToken){alert("Cesium最新的iontoken无法获取!"),console.error("Cesium最新的iontoken无法获取!");return}this.ionAccessToken=rt.latestDefaultAccessToken}positionsToLocalPositions(e,n){return Mt(e,n)}localPositionsToPositions(e,n){return gn(e,n)}isPointVisible(e){if(!this.viewer)return!1;const n=Ve(e),o=new h.EllipsoidalOccluder(this.viewer.scene.globe.ellipsoid,this.viewer.scene.camera.positionWC);if(o.cameraPosition=this.viewer.scene.camera.positionWC,!o.isPointVisible(n))return!1;const r=this.viewer.scene.cartesianToCanvasCoordinates(n);return!(!r||r.x<0||r.y<0)}getESProperties(){const e={...super.getESProperties()},n=rt.defaults;return{...e,more:[...e.more,new w.GroupProperty([],"通用","通用"),new w.EvalStringProperty([this,"createCesiumViewerFuncStr"],"CesiumViewer创建函数",Qk,Zk,!0),new w.FunctionProperty([],()=>rt.getCesiumIonToken(),[],"获取官方token"),new w.FunctionProperty([],()=>this.setCurrentDefaultAccessToken(),[],"重置为当前使用的Cesium版本的token"),new w.FunctionProperty([],()=>this.setLatestDefaultAccessToken(),[],"最新token","重置为当前Cesium官方的最新token"),new w.BooleanProperty([this,"flashLighting"],"头顶灯",n.flashLighting,!0),new w.BooleanProperty([this,"particleGlobalControl"],"粒子全局控制播放",n.particleGlobalControl,!0),new w.GroupProperty([],"Viewer","Viewer"),new w.NumberProperty([this,"resolutionScale"],"分辨率比率",n.resolutionScale,!0),new w.NumberProperty([this,"msaaSamples"],"msaaSamples",n.msaaSamples,!0),new w.BooleanProperty([this,"shadows"]),new w.GroupProperty([],"比例尺","比例尺(Legend)"),new w.NumberProperty([this.viewerLegend,"resolution"],"resolution",void 0,!0,!0),new w.NumberProperty([this.viewerLegend,"zoom"],"zoom",void 0,!0,!0),new w.Number3Property([this.viewerLegend,"center"],"center",void 0,!0,!0),new w.NumberProperty([this.viewerLegend.legend,"lengthInPixels"],"lengthInPixels",100,!0,!1),new w.NumberProperty([this.viewerLegend.legend,"computedLengthInPixels"],"computedLengthInPixels",void 0,!0,!0),new w.NumberProperty([this.viewerLegend.legend,"computedLengthInMeters"],"computedLengthInMeters",void 0,!0,!0),new w.StringProperty([this.viewerLegend.legend,"computedLengthInStr"],"computedLengthInStr",void 0,!0,!0),new w.GroupProperty([],"场景","场景(Scene)"),new w.NumberProperty([this,"sceneSplitPosition"],"内部视口分割比例",n.sceneSplitPosition,!0),new w.GroupProperty([],"Globe","Globe"),new w.BooleanProperty([this,"depthTestAgainstTerrain"],"depthTestAgainstTerrain",n.depthTestAgainstTerrain,!0),new w.EnumProperty([this,"sceneGlobeShadows"],[["禁用","DISABLED"],["启用","ENABLED"],["仅投射","CAST_ONLY"],["仅接收","RECEIVE_ONLY"]],"sceneGlobeShadows",n.sceneGlobeShadows,!0),new w.NumberProperty([this,"sceneGlobeTerrainExaggeration"]),new w.NumberProperty([this,"sceneGlobeTerrainExaggerationRelativeHeight"]),new w.NumberProperty([this,"sceneGlobeVerticalExaggeration"]),new w.NumberProperty([this,"sceneGlobeVerticalExaggerationRelativeHeight"]),new w.BooleanProperty([this,"sceneGlobeBackFaceCulling"]),new w.BooleanProperty([this,"sceneGlobeShowSkirts"]),new w.BooleanProperty([this,"sceneGlobeShowWaterEffect"]),new w.ColorProperty([this,"sceneGlobeBaseColor"]),new w.Number4Property([this,"sceneGlobeCartographicLimitRectangle"]),new w.JsonProperty([this,"sceneGlobeClippingPlanes"]),new w.StringProperty([this,"sceneGlobeClippingPlanesId"]),new w.JsonProperty([this,"sceneGlobeClippingPolygons"]),new w.StringsProperty([this,"sceneGlobeClippingPolygonsId"]),new w.GroupProperty([],"underground","underground"),new w.ColorProperty([this,"sceneGlobeUndergroundColor"],"sceneGlobeUndergroundColor",n.sceneGlobeUndergroundColor,!0),new w.Number4Property([this,"sceneGlobeUndergroundColorAlphaByDistance"],"sceneGlobeUndergroundColorAlphaByDistance",n.sceneGlobeUndergroundColorAlphaByDistance,!0),new w.GroupProperty([],"Translucency","Translucency"),new w.BooleanProperty([this,"sceneGlobeTranslucencyEnabled"],"启用",n.sceneGlobeTranslucencyEnabled,!0),new w.NumberProperty([this,"sceneGlobeTranslucencyBackFaceAlpha"],"背面透明度",n.sceneGlobeTranslucencyBackFaceAlpha,!0),new w.Number4Property([this,"sceneGlobeTranslucencyBackFaceAlphaByDistance"],"背面渐变透明度",n.sceneGlobeTranslucencyBackFaceAlphaByDistance,!0),new w.NumberProperty([this,"sceneGlobeTranslucencyFrontFaceAlpha"],"正面透明度",n.sceneGlobeTranslucencyFrontFaceAlpha,!0),new w.Number4Property([this,"sceneGlobeTranslucencyFrontFaceAlphaByDistance"],"正面渐变透明度",n.sceneGlobeTranslucencyFrontFaceAlphaByDistance,!0),new w.Number4Property([this,"sceneGlobeTranslucencyRectangle"],"矩形范围",n.sceneGlobeTranslucencyRectangle,!0),new w.GroupProperty([],"Sun","Sun"),new w.BooleanProperty([this,"sun"],"sun",n.sun,!0),new w.NumberProperty([this,"sceneSunGlowFactor"],"sceneSunGlowFactor",n.sceneSunGlowFactor,!0),new w.GroupProperty([],"Moon","Moon"),new w.BooleanProperty([this,"moon"],"moon",n.moon,!0),new w.StringProperty([this,"sceneMoonTextureUrl"],"sceneMoonTextureUrl",n.sceneMoonTextureUrl,!0),new w.BooleanProperty([this,"sceneMoonOnlySunLighting"],"sceneMoonOnlySunLighting",n.sceneMoonOnlySunLighting,!0),new w.GroupProperty([],"SkyBox","SkyBox"),new w.BooleanProperty([this,"sceneSkyBoxShow"]),new w.JsonProperty([this,"sceneSkyBoxSources"],"sceneSkyBoxSources",n.sceneSkyBoxSources,void 0,!0),new w.GroupProperty([],"Background","Background"),new w.BooleanProperty([this,"xbsjUseBackground"]),new w.StringProperty([this,"xbsjBackgroundImageUri"]),new w.ColorProperty([this,"xbsjBackgroundColor"]),new w.GroupProperty([],"SkyAtmosphere","SkyAtmosphere"),new w.JsonProperty([this,"xbsjLocalBoxSources"],"xbsjLocalBoxSources",n.xbsjLocalBoxSources,void 0,!0),new w.ColorProperty([this,"sceneBackgroundColor"]),new w.GroupProperty([],"Fog","Fog"),new w.BooleanProperty([this,"sceneFogEnabled"],"sceneFogEnabled",n.sceneFogEnabled,!0),new w.NumberProperty([this,"sceneFogDensity"],"sceneFogDensity",n.sceneFogDensity,!0),new w.NumberProperty([this,"sceneFogScreenSpaceErrorFactor"],"sceneFogScreenSpaceErrorFactor",n.sceneFogScreenSpaceErrorFactor,!0),new w.NumberProperty([this,"sceneFogMinimumBrightness"],"sceneFogMinimumBrightness",n.sceneFogMinimumBrightness,!0),new w.GroupProperty([],"Sscc","Sscc"),new w.BooleanProperty([this,"sceneSsccEnableInputs"],"sceneSsccEnableInputs",n.sceneSsccEnableInputs,!0),new w.BooleanProperty([this,"sceneSsccEnableCollisionDetection"],"sceneSsccEnableCollisionDetection",n.sceneSsccEnableCollisionDetection,!0),new w.NumberProperty([this,"sceneSsccZoomFactor"],"sceneSsccZoomFactor",n.sceneSsccZoomFactor,!0),new w.NumberProperty([this,"sceneCameraFrustumFov"],"相机广角"),new w.GroupProperty([],"后处理","后处理"),new w.BooleanProperty([this,"scenePpsfxaaEnabled"],"开启FXAA",n.scenePpsfxaaEnabled,!0),new w.GroupProperty([],"环境遮蔽","环境遮蔽"),new w.BooleanProperty([this,"scenePpsAmbientOcclusionEnabled"]),new w.BooleanProperty([this,"scenePpsAmbientOcclusionAmbientOcclusionOnly"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionIntensity"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionBias"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionLengthCap"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionStepSize"]),new w.NumberProperty([this,"scenePpsAmbientOcclusionBlurStepSize"]),new w.GroupProperty([],"Bloom","Bloom"),new w.BooleanProperty([this,"scenePpsBloomEnabled"]),new w.BooleanProperty([this,"scenePpsBloomGlowOnly"]),new w.NumberProperty([this,"scenePpsBloomContrast"]),new w.NumberProperty([this,"scenePpsBloomBrightness"]),new w.NumberProperty([this,"scenePpsBloomDelta"]),new w.NumberProperty([this,"scenePpsBloomSigma"]),new w.NumberProperty([this,"scenePpsBloomStepSize"]),new w.GroupProperty([],"调试","调试"),new w.BooleanProperty([this,"sceneDebugShowFramesPerSecond"],"sceneDebugShowFramesPerSecond",n.sceneDebugShowFramesPerSecond,!0),new w.BooleanProperty([this,"sceneDebugShowCommands"],"sceneDebugShowCommands",n.sceneDebugShowCommands,!0),new w.BooleanProperty([this,"sceneDebugShowFrustums"],"sceneDebugShowFrustums",n.sceneDebugShowFrustums,!0),new w.BooleanProperty([this,"sceneDebugShowFrustumPlanes"],"sceneDebugShowFrustumPlanes",n.sceneDebugShowFrustumPlanes,!0),new w.NumberProperty([this,"sceneDebugShowDepthFrustum"],"sceneDebugShowDepthFrustum",n.sceneDebugShowDepthFrustum,!0),new w.GroupProperty([],"Inspector","Inspector"),new w.BooleanProperty([this,"showCesiumInspector"],"showCesiumInspector",n.showCesiumInspector,!0),new w.BooleanProperty([this,"cesiumInspectorWireframe"],"cesiumInspectorWireframe",n.cesiumInspectorWireframe,!0),new w.BooleanProperty([this,"showCesium3DTilesInspector"],"showCesium3DTilesInspector",n.showCesium3DTilesInspector,!0)]}}};v(rt,"type",rt.register("ESCesiumViewer",rt)),v(rt,"getCesiumIonToken",Kk),v(rt,"currentDefaultAccessToken",h.Ion.defaultAccessToken),v(rt,"latestDefaultAccessToken"),v(rt,"ObjectsToExcludeWrapper",k2),v(rt,"defaults",{...w.ESViewer.defaults,flashLighting:!1,resolutionScale:1,msaaSamples:4,sceneSplitPosition:0,depthTestAgainstTerrain:!1,sceneGlobeShadows:"RECEIVE_ONLY",sceneGlobeUndergroundColor:[0,0,0,1],sceneGlobeUndergroundColorAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyEnabled:!1,sceneGlobeTranslucencyBackFaceAlpha:1,sceneGlobeTranslucencyBackFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyFrontFaceAlpha:1,sceneGlobeTranslucencyFrontFaceAlphaByDistance:[6378.137,0,12756274e-1,1],sceneGlobeTranslucencyRectangle:[-3.141592653589793,-1.5707963267948966,3.141592653589793,1.5707963267948966].map(e=>180*e/Math.PI),sun:!0,sceneSunGlowFactor:1,moon:!0,sceneMoonTextureUrl:h.buildModuleUrl("Assets/Textures/moonSmall.jpg"),sceneMoonOnlySunLighting:!0,sceneSkyBoxSources:{positiveX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_px.jpg"),negativeX:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mx.jpg"),positiveY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_py.jpg"),negativeY:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_my.jpg"),positiveZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_pz.jpg"),negativeZ:h.buildModuleUrl("Assets/Textures/SkyBox/tycho2t3_80_mz.jpg")},xbsjLocalBoxSources:{positiveX:"${earthsdk3-assets-script-dir}/assets/img/skybox/east.jpg",negativeX:"${earthsdk3-assets-script-dir}/assets/img/skybox/west.jpg",positiveY:"${earthsdk3-assets-script-dir}/assets/img/skybox/bottom.jpg",negativeY:"${earthsdk3-assets-script-dir}/assets/img/skybox/top.jpg",positiveZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/north.jpg",negativeZ:"${earthsdk3-assets-script-dir}/assets/img/skybox/south.jpg"},sceneFogEnabled:!0,sceneFogDensity:2e-4,sceneFogScreenSpaceErrorFactor:2,sceneFogMinimumBrightness:.03,sceneSsccEnableInputs:!0,sceneSsccEnableCollisionDetection:!0,sceneSsccZoomFactor:5,scenePpsfxaaEnabled:!0,sceneDebugShowFramesPerSecond:!1,sceneDebugShowCommands:!1,sceneDebugShowFrustums:!1,sceneDebugShowFrustumPlanes:!1,sceneDebugShowDepthFrustum:1,showCesiumInspector:!1,cesiumInspectorWireframe:!1,showCesium3DTilesInspector:!1,particleGlobalControl:!1}),v(rt,"getHeightsScartchCarto",new h.Cartographic);let Re=rt;(t=>{t.createDefaultProps=()=>({...w.ESViewer.createDefaultProps(),...Yk()})})(Re||(Re={})),l.extendClassProps(Re.prototype,Re.createDefaultProps),R.copyright=void 0;try{const t="earthsdk3-cesium",i="3.4.2",e="2025-09-18T02:13:26.000Z",n="北京西部世界科技有限公司",o="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",r="3d737339ba5ffdc4be0b07ea49fd20497f22db07",a=((Date.now()-1758161606e3)/36e5).toFixed(1),c=`%c🌏 ${t}%c ${i}.${r.slice(0,8)}.${e} (距今${a}个小时)
2259
2259
  %c${o?o+`
2260
2260
  `:""}当前网站正在使用${t},此软件版权归${n}所有
2261
- `;R.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","edc6b1a5e35b2412fad91ee205c768829c64b897")},get info(){return c},get date(){return"2025-09-16T08:13:00.000Z"},get author(){return"suplyang"},get version(){return"3.4.1"},get name(){return"earthsdk3-cesium"},get commitId(){return"edc6b1a5e35b2412fad91ee205c768829c64b897"},print(){console.info(this.info,`
2261
+ `;R.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","3d737339ba5ffdc4be0b07ea49fd20497f22db07")},get info(){return c},get date(){return"2025-09-18T02:13:26.000Z"},get author(){return"suplyang"},get version(){return"3.4.2"},get name(){return"earthsdk3-cesium"},get commitId(){return"3d737339ba5ffdc4be0b07ea49fd20497f22db07"},print(){console.info(this.info,`
2262
2262
  font-size: 18px;
2263
2263
  font-weight: 1000;
2264
2264
  line-height: 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "earthsdk3-cesium",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "description": "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",
5
5
  "type": "module",
6
6
  "main": "./dist/earthsdk3-cesium.umd.cjs",