earthsdk3 3.0.8-beta.7 → 3.0.8-beta.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/earthsdk3.iife.js
CHANGED
|
@@ -543,10 +543,10 @@ ${B0}
|
|
|
543
543
|
`,Q0=Date.now();new Date(Q0).toISOString(),new Date(Q0+864e5).toISOString();const Fe=class Fe extends ft{constructor(e){super(e);p(this,"_flyToEvent",this.disposeVar(new d.Event));p(this,"_resetClockEvent",this.disposeVar(new d.Event))}get typeName(){return"ESCzml"}get defaultProps(){return Fe.createDefaultProps()}get flyToEvent(){return this._flyToEvent}flyTo(e){this._flyToEvent.emit(e)}get resetClockEvent(){return this._resetClockEvent}resetClock(){this._resetClockEvent.emit()}getESProperties(){const e={...super.getESProperties()};return{...e,defaultMenu:"basic",basic:[...e.basic,new Y("数据","数据",!0,!1,[this,"data"],Fe.defaults.data,Fe.defaults.dataMd),new Y("路径","路径",!1,!1,[this,"uri"],""),new U("启用","启用",!1,!1,[this,"clockEnabled"],!1),new C("倍速","倍速.",!1,!1,[this,"multiplier"],Fe.defaults.multiplier),new U("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"],!0),new Ri("开始时间","开始时间",!0,!1,[this,"startTime"],Fe.defaults.startTime),new Ri("结束时间","结束时间",!0,!1,[this,"stopTime"],Fe.defaults.stopTime),new Ri("当前时间","当前时间",!0,!1,[this,"currentTime"],Fe.defaults.currentTime),new tt("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]],"SYSTEM_CLOCK_MULTIPLIER"),new tt("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]],"UNBOUNDED"),new U("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"],!1)],general:[...e.general,new nt("唯一标识","id",!1,!0,[this,"id"]),new nt("名称","name",!0,!1,[this,"name"]),new U("是否显示","show",!1,!1,[this,"show"],!0),new U("开启碰撞","collision",!1,!1,[this,"collision"],!1),new U("允许拾取","allowPicking",!1,!1,[this,"allowPicking"],!1)]}}getProperties(e){return[...super.getProperties(e),new X("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new U("允许拾取","是否允许拾取",!1,!1,[this,"allowPicking"]),new mt("飞入","飞入",["number"],n=>this.flyTo(n),[1e3]),new Y("数据","数据",!0,!1,[this,"data"],Fe.defaults.data,Fe.defaults.dataMd),new Y("路径","路径",!1,!1,[this,"uri"]),new U("自动设置时钟","自动设置时钟",!1,!1,[this,"autoResetClock"]),new mt("重设时钟","根据当前加载的数据重设始终",[],()=>this.resetClock(),[]),new Li("loadFnStr","loadFnStr",!0,!1,[this,"loadFuncStr"],Fe.defaults.defaultLoadFuncStr,Fe.defaults.defaultLoadFuncDocStr)]),new X("时钟","时钟",[new U("启用","启用",!1,!1,[this,"clockEnabled"]),new Ri("开始时间","开始时间",!0,!1,[this,"startTime"],Fe.defaults.startTime),new Ri("结束时间","结束时间",!0,!1,[this,"stopTime"],Fe.defaults.stopTime),new Ri("当前时间","当前时间",!0,!1,[this,"currentTime"],Fe.defaults.currentTime),new C("倍速","倍速.",!1,!1,[this,"multiplier"],Fe.defaults.multiplier),new tt("clockStep","clockStep",!1,!1,[this,"clockStep"],[["TICK_DEPENDENT","TICK_DEPENDENT"],["SYSTEM_CLOCK_MULTIPLIER","SYSTEM_CLOCK_MULTIPLIER"],["SYSTEM_CLOCK","SYSTEM_CLOCK"]]),new tt("clockRange","clockRange",!1,!1,[this,"clockRange"],[["UNBOUNDED","UNBOUNDED"],["CLAMPED","CLAMPED"],["LOOP_STOP","LOOP_STOP"]]),new U("是否启用动画","是否启用动画",!1,!1,[this,"shouldAnimate"])])]}};p(Fe,"type",Fe.register("ESCzml",Fe,{chsName:"ESCzml",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"Czml数据加载"})),p(Fe,"defaults",{...ft.defaults,show:!0,allowPicking:!0,data:dI,dataMd:pI,autoResetClock:!0,clockEnabled:!1,startTime:()=>Date.now(),stopTime:()=>Date.now()+864e5,currentTime:()=>Date.now(),multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,uri:"${earthsdk3-assets-script-dir}/assets/misc/simple.czml",defaultLoadFuncStr:B0,defaultLoadFuncDocStr:gI});let ul=Fe;(r=>{r.createDefaultProps=()=>({show:!0,uri:"",allowPicking:!1,data:d.reactJsonWithUndefined(void 0),autoResetClock:!0,clockEnabled:!1,startTime:void 0,stopTime:void 0,currentTime:void 0,multiplier:1,clockStep:"SYSTEM_CLOCK_MULTIPLIER",clockRange:"UNBOUNDED",shouldAnimate:!1,loadFuncStr:void 0,...ft.createDefaultProps()})})(ul||(ul={})),d.extendClassProps(ul.prototype,ul.createDefaultProps);const kl=class kl extends ft{get typeName(){return"ESNavigator"}get defaultProps(){return kl.createDefaultProps()}getProperties(t){return[...super.getProperties(t),new X("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"]),new C("尺寸","尺寸",!1,!1,[this,"cssSize"]),new se("位置","位置(top,right)",!1,!1,[this,"cssPosition"]),new zu("图片地址","图片地址",!1,!1,[this,"imgUrl"])])]}};p(kl,"type",kl.register("ESNavigator",kl,{chsName:"导航控件",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"导航控件"})),p(kl,"defaults",{...ft.defaults,show:!0,cssPosition:[170,30],cssSize:100,imgUrl:ft.context.getStrFromEnv("${earthsdk3-assets-script-dir}/assets/img/zhinanzhen.png")});let hl=kl;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,cssSize:100,cssPosition:[170,30],imgUrl:r.defaults.imgUrl})})(hl||(hl={})),d.extendClassProps(hl.prototype,hl.createDefaultProps);const Ai=class Ai extends ft{get typeName(){return"ESViewerStatusBar"}get defaultProps(){return Ai.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new X("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],Ai.defaults.show),new C("高度","height",!0,!1,[this,"height"],Ai.defaults.height),new C("文字大小","fontSize",!0,!1,[this,"fontSize"],Ai.defaults.fontSize),new it("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],Ai.defaults.bgColor)])]}};p(Ai,"type",Ai.register("ESViewerStatusBar",Ai,{chsName:"状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),p(Ai,"defaults",{...ft.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let cl=Ai;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:[.2784313725490196,.2784313725490196,.2784313725490196,.8]})})(cl||(cl={})),d.extendClassProps(cl.prototype,cl.createDefaultProps);const Oi=class Oi extends ft{get typeName(){return"ESViewerStatusBarScale"}get defaultProps(){return Oi.createDefaultProps()}constructor(t){super(t)}getProperties(t){return[...super.getProperties(t),new X("通用","通用",[new U("是否显示","A boolean Property specifying the visibility .",!1,!1,[this,"show"],Oi.defaults.show),new C("高度","height",!0,!1,[this,"height"],Oi.defaults.height),new C("文字大小","fontSize",!0,!1,[this,"fontSize"],Oi.defaults.fontSize),new it("背景颜色"," 背景颜色",!0,!1,[this,"bgColor"],Oi.defaults.bgColor)])]}};p(Oi,"type",Oi.register("ESViewerStatusBarScale",Oi,{chsName:"比例尺状态栏",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"状态栏"})),p(Oi,"defaults",{...ft.defaults,show:!0,height:30,fontSize:14,bgColor:[71,71,71,.8]});let fl=Oi;(r=>{r.createDefaultProps=()=>({...ft.createDefaultProps(),show:!0,height:30,fontSize:14,bgColor:[.2784313725490196,.2784313725490196,.2784313725490196,.8]})})(fl||(fl={})),d.extendClassProps(fl.prototype,fl.createDefaultProps);const zl=class zl extends Z{get typeName(){return"ESGaussianSplatting"}get defaultProps(){return zl.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()};return{...t,basic:[...t.basic,new nt("路径","url",!0,!1,[this,"url"]),new C("进度","progress",!1,!0,[this,"progress"],0)]}}getProperties(t){return[...super.getProperties(t),new X("通用","通用",[new nt("路径","url",!0,!1,[this,"url"]),new C("进度","progress",!1,!0,[this,"progress"],0)])]}};p(zl,"type",zl.register("ESGaussianSplatting",zl,{chsName:"高斯溅射模型",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于加载高斯溅射模型的 ES 对象"})),p(zl,"defaults",{...Z.defaults});let dl=zl;(r=>{r.createDefaultProps=()=>({...Z.createDefaultProps(),url:"",progress:0})})(dl||(dl={})),d.extendClassProps(dl.prototype,dl.createDefaultProps);const Xs=class Xs extends Z{get typeName(){return"ESStaticMesh"}get defaultProps(){return Xs.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t={...super.getESProperties()},e=[new nt("mesh地址","mesh地址",!1,!1,[this,"mesh"],Xs.defaults.mesh)];return t.basic.push(...e),t}getProperties(t){return[...super.getProperties(t),new X("ESStaticMesh","ESStaticMesh",[new nt("mesh地址","mesh地址",!1,!1,[this,"mesh"],Xs.defaults.mesh)])]}};p(Xs,"type",Xs.register("ESStaticMesh",Xs,{chsName:"静态网格",tags:["ESObjects","_ES_Impl_UE"],description:"Unreal的Mesh对象"})),p(Xs,"defaults",{...Z.defaults,mesh:"StaticMesh'/Engine/BasicShapes/Sphere.Sphere'"});let pl=Xs;(r=>{r.createDefaultProps=()=>({...Z.createDefaultProps(),mesh:""})})(pl||(pl={})),d.extendClassProps(pl.prototype,pl.createDefaultProps);const Vl=class Vl extends Et{constructor(e){super(e);p(this,"_startEvent",this.dv(new d.Event));p(this,"_clearEvent",this.dv(new d.Event));p(this,"_eSGeoExtrudedPolygon");this._eSGeoExtrudedPolygon=this.disposeVar(new xs(`${this.id}_ESGeoExtrudedPolygon`)),this.ad(this.components.disposableAdd(this._eSGeoExtrudedPolygon)),this.eSGeoExtrudedPolygon.perPositionHeight=!0,this.eSGeoExtrudedPolygon.extrudedHeight=0,this.stroked=!0,this.strokeWidth=2,this.strokeColor=[1,0,0,1],this.ad(d.track([this.eSGeoExtrudedPolygon,"show"],[this,"show"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"stroked"],[this,"stroked"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"strokeWidth"],[this,"strokeWidth"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"strokeColor"],[this,"strokeColor"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"filled"],[this,"filled"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"fillColor"],[this,"fillColor"])),this.ad(d.track([this.eSGeoExtrudedPolygon,"points"],[this,"points"])),this.ad(this.clearEvent.don(()=>{this.points=void 0,this.depths=void 0,this.windowPositions=void 0}))}get typeName(){return"ESSkylineAnalysis"}get defaultProps(){return Vl.createDefaultProps()}get startEvent(){return this._startEvent}start(){this._startEvent.emit()}get clearEvent(){return this._clearEvent}clear(){this._clearEvent.emit()}get eSGeoExtrudedPolygon(){return this._eSGeoExtrudedPolygon}getESProperties(){const e={...super.getESProperties()};return{...e,basic:[...e.basic,new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("清除分析","清除分析",[],()=>this.clear(),[]),new Y("屏幕坐标","windowPositions",!1,!0,[this,"windowPositions"]),new Y("深度值","depths",!1,!0,[this,"depths"]),new C("半径","半径",!0,!1,[this,"radius"],1e4)]}}getProperties(e){return[...super.getProperties(e),new X("通用","通用",[new mt("开始分析","开始分析",[],()=>this.start(),[]),new mt("清除分析","清除分析",[],()=>this.clear(),[]),new Y("屏幕坐标","windowPositions",!1,!0,[this,"windowPositions"]),new Y("深度值","depths",!1,!0,[this,"depths"]),new C("半径","半径",!0,!1,[this,"radius"],1e4)])]}};p(Vl,"type",Vl.register("ESSkylineAnalysis",Vl,{chsName:"天际线分析",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"分析类"})),p(Vl,"defaults",{...Et.defaults,windowPositions:[],depths:[],radius:1e4});let gl=Vl;(r=>{r.createDefaultProps=()=>({...Et.createDefaultProps(),windowPositions:gf(void 0),depths:d.reactArrayWithUndefined(void 0),radius:d.react(void 0)})})(gl||(gl={})),d.extendClassProps(gl.prototype,gl.createDefaultProps);const Fn=class Fn extends xt{get typeName(){return"ESHeatMap"}get defaultProps(){return Fn.createDefaultProps()}constructor(t){super(t)}getESProperties(){const t=super.getESProperties();return{...t,basic:[...t.basic,new Y("data","数据",!0,!1,[this,"data"]),new Y("gradient","渐变",!0,!1,[this,"gradient"],Fn.defaults.gradient),new C("radius","半径",!0,!1,[this,"radius"],Fn.defaults.radius),new C("blur","模糊",!0,!1,[this,"blur"],Fn.defaults.blur),new U("is3D","3D",!0,!1,[this,"is3D"])]}}getProperties(t){return[...super.getProperties(t),new X("通用","通用",[new Y("data","数据",!0,!1,[this,"data"]),new Y("gradient","渐变",!0,!1,[this,"gradient"],Fn.defaults.gradient),new C("radius","半径",!0,!1,[this,"radius"],Fn.defaults.radius),new C("blur","模糊",!0,!1,[this,"blur"],Fn.defaults.blur),new U("is3D","3D",!0,!1,[this,"is3D"])])]}};p(Fn,"type",Fn.register("ESHeatMap",Fn,{chsName:"热力图",tags:["ESObjects","_ES_Impl_Cesium","_ES_Impl_UE"],description:"用于热力图的显示"})),p(Fn,"defaults",{...xt.defaults,is3D:!1,data:[],radius:10,gradient:{".5":"green",".7":"yellow",".95":"red"},blur:.85});let ml=Fn;(r=>{r.createDefaultProps=()=>({...xt.createDefaultProps(),is3D:d.react(void 0),data:d.reactPositions(void 0),gradient:d.reactJsonWithUndefined(void 0),radius:d.react(void 0),blur:d.react(void 0)})})(ml||(ml={})),d.extendClassProps(ml.prototype,ml.createDefaultProps);function K0(r){return typeof r=="string"?document.getElementById(r):r}function Vd(r){if(!r)throw new Error("container is not defined");r.innerHTML="";const t=document.createElement("div");return t.style.cssText="width: 100%; height: 100%; margin: 0px; padding: 0px; border: none; overflow: hidden; position: relative; z-index: 0; background: rgba(0,0,0,0);",r.appendChild(t),t}class $0 extends d.Destroyable{constructor(e,n){super();p(this,"_listeningSceneObjects",new Map);this._sceneObjectsMananger=e,this._createSceneObjectListeningFunc=n;const i=this._listeningSceneObjects,s=(a,o)=>{if(a)for(let l of a){const u=i.get(l);u&&(u.destroy(),i.delete(l))}if(o)for(let l of o){if(i.get(l)){console.warn(`listeningSceneObjects已存在某对象:${l.name}`,l);debugger}const c=this.createSceneObjectListeningFunc(l);c&&i.set(l,c)}};s(void 0,this._sceneObjectsMananger.sceneObjects),this.dispose(this._sceneObjectsMananger.sceneObjectsToChange.disposableOn(s)),this.dispose(()=>{for(let a of this._listeningSceneObjects.values())a.destroy();this._listeningSceneObjects.clear()})}get listeningSceneObjects(){return this._listeningSceneObjects}get createSceneObjectListeningFunc(){return this._createSceneObjectListeningFunc}}class mI extends d.Destroyable{constructor(t){super(),this._esObjectsManager=t;{const e=this._esObjectsManager;class n extends d.Destroyable{constructor(s){super(),this._esPath=s,this.dv(new d.ObjResettingWithEvent(e.activeViewerChanged,()=>{const a=e.activeViewer;if(!a)return;class o extends d.Destroyable{constructor(u){if(super(),this._esPath=u,!a)throw new Error("!viewer");const c=()=>{const h=e.activeViewer;h&&(this._esPath.path.currentTime=h.simulationTime)};c(),this.d(a.simulationTimeChanged.don(c))}}return new o(this._esPath)}))}}this.dv(new $0(e.sceneObjectsManager,i=>{if(i instanceof Os)return new n(i)}))}{const e=this._esObjectsManager;class n extends d.Destroyable{constructor(s){super();const a=()=>{const o=e.activeViewer;o&&(o.simulationTime=s.currentTime??0)};a(),this.d(s.currentTimeChanged.don(a))}}this.dv(new $0(e.sceneObjectsManager,i=>{if(i instanceof As)return new n(i)}))}}}class vI extends d.Destroyable{constructor(t){super(),t.forEach(e=>{this.d(e.path.currentPositionChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"position")&&(i.position=[...n])})})),this.d(e.path.currentRotationChanged.don(n=>{n&&e.sceneObjects.forEach(i=>{Reflect.has(i,"rotation")&&(i.rotation=[...n])})}))})}}class yI extends d.Destroyable{constructor(e){super();p(this,"_player");p(this,"_channels",this.dv(d.reactArray([])));this._objectManager=e,this._player=this._objectManager.player,this.dv(new d.ObjResettingWithEvent(this.channelsChanged,()=>{if(this.channels.length===0)return;const n=[];for(let i=0;i<this.channels.length;i++){const s=this.channels[i],a=ft.getSceneObjById(s.pathId);if(!a||!(a instanceof Os))continue;const l=s.sceneObjectIds.map(u=>ft.getSceneObjById(u)).filter(u=>u!==void 0);l.length!==0&&n.push({path:a,sceneObjects:l})}if(n.length!==0)return new vI(n)}))}get player(){return this._player}get channels(){return this._channels.value}get channelsChanged(){return this._channels.changed}set channels(e){this._channels.value=e}}function Zc(r){if(r.data){const{type:t,value:e}=r.data;if(t==="UITreeA"&&e instanceof Ar){const{sceneObject:n}=e;if(n)return n.id}}}function _I(r,t){const{property:e,customEventName:n,otherParams:i}=t,{dragstartDataMananger:s}=r;if(!(e instanceof li)){if(!(e instanceof ip)){if(e instanceof nt){const[a,o]=d.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const l=i[0];if(l.preventDefault(),!l.dataTransfer)return;Zc(s)?l.dataTransfer.dropEffect="move":l.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");i[0].preventDefault();const u=Zc(s);u!==void 0&&o(u)}}else if(e instanceof jd){const[a,o]=d.getReactFuncs(e.reactVar);if(n==="ondragover"){if(console.log("ondragover"),!i)throw new Error("!otherParams");const l=i[0];if(l.preventDefault(),!l.dataTransfer)return;Zc(s)?l.dataTransfer.dropEffect="move":l.dataTransfer.dropEffect="none"}else if(n==="ondrop"){if(!i)throw new Error("!otherParams");const l=i[0].$event,u=i[0].strinsPropDom,c=i[0].index;l.preventDefault();const h=Zc(s);if(h!==void 0){u[c].firstChild.value=h;const f=new Event("input",{bubbles:!0,cancelable:!0});u[c].firstChild.dispatchEvent(f)}}}else if(e instanceof tp){const[a,o]=d.getReactFuncs(e.reactVar)}}}}function Z0(r,t,e,n){if(e)n.currentActiveEditing=[r,t];else if(n.currentActiveEditing){const[i,s]=n.currentActiveEditing;i===r&&s===t&&(e||(n.currentActiveEditing=void 0))}}const wI=["editing","positionEditing","locationEditing","pointEditing","rotationEditing"];class EI extends d.Destroyable{constructor(t,e){super(),this._sceneObject=t;const n=this._sceneObject;for(let i of wI){const s=i+"Changed",a=n[s];if(a){{const o=n[i];Z0(n,i,o,e)}this.dispose(a.disposableOn(o=>Z0(n,i,o,e)))}}}get sceneObject(){return this._sceneObject}}class SI extends d.Destroyable{constructor(){super();p(this,"_currentActiveEditing",this.disposeVar(d.reactArrayWithUndefined(void 0)));p(this,"_currentActiveEditingLastChangedTime",0);this.dispose(this._currentActiveEditing.changed.disposableOn((e,n)=>{if(this._currentActiveEditingLastChangedTime=Date.now(),n){const[i,s]=n;i[s]===!0&&(i[s]=!1)}if(e){const[i,s]=e;i[s]=!0}})),ft.context.sceneObjCreatedEvent.don(e=>{e.dv(new EI(e,this))})}get currentActiveEditing(){return this._currentActiveEditing.value}set currentActiveEditing(e){this._currentActiveEditing.value=e}get currentActiveEditingChanged(){return this._currentActiveEditing.changed}get currentActiveEditingLastChangedTime(){return this._currentActiveEditingLastChangedTime}}class PI extends d.Destroyable{constructor(){super();p(this,"_sceneObjects",new Set);p(this,"_sceneObjectsToChange",this.dv(new d.Event));this.d(()=>{const e=d.length(this._sceneObjects);e!==0&&console.warn(`场景对象管理器销毁时仍然管理着${e}个场景对象!`)})}get sceneObjects(){return this._sceneObjects}get sceneObjectsToChange(){return this._sceneObjectsToChange}addSceneObject(e){if(this._sceneObjects.has(e))return console.warn(`创建失败:对象${e.typeName+":"+e.id}已经存在于场景对象管理器中!}`),!1;do this._sceneObjectsToChange.emit([],[e]),this._sceneObjects.add(e);while(!1);return!0}deleteSceneObject(e){if(!this._sceneObjects.has(e))return console.warn(`删除失败:对象${e.typeName+":"+e.id}不存在于场景对象管理器中!}`),!1;do this._sceneObjectsToChange.emit([e],[]),this._sceneObjects.delete(e);while(!1);return!0}createSceneObject(e,n){const i=ft.context.createSceneObject(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromClass(e,n){const i=ft.context.createSceneObjectFromClass(e,n);return i&&this.addSceneObject(i),i}createSceneObjectFromJson(e){const n=ft.context.createSceneObjectFromJson(e);return n&&this.addSceneObject(n),n}}function j0(r,t){return r.length===t.length&&r.every((e,n)=>e===t[n])}class CI extends d.Destroyable{constructor(t){super(),this._viewer=t,this.d(d.track([this._viewer,"currentTime"],[this._viewer,"simulationTime"]))}}class II extends d.Destroyable{constructor(t,e){super(),this._viewer=t,this._activeViewer=e;const n=Di.createCommonProps(),i=[];Object.keys(n).forEach(l=>{const u=this._activeViewer[l+"Changed"];i.push(u)});const s=this.dv(d.createNextAnimateFrameEvent(...i)),a=()=>{this._viewer.status!=="Created"||this._activeViewer.status!=="Created"||Object.keys(n).forEach(l=>{this._viewer[l]=this._activeViewer[l]})};this.d(s.don(a));const o=this.dv(d.createAnimateFrame());o.restart(void 0,async()=>{if(this._viewer.status!=="Created"||this._activeViewer.status!=="Created")return;const l=this._activeViewer.getCurrentCameraInfo(),u=this._viewer.getCurrentCameraInfo();if(!l)return;const{position:c,rotation:h}=l;u&&j0(c,u.position)&&j0(h,u.rotation)||this._viewer.flyIn(c,h,0)}),this.d(()=>o.cancel())}}const MI=`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid" width="40" height="40" style="shape-rendering: auto; display: block; background: rgba(255, 255, 255, 0);" xmlns:xlink="http://www.w3.org/1999/xlink"><g><circle stroke-linecap="round" fill="none" stroke-dasharray="50.26548245743669 50.26548245743669" stroke="#ffffff" stroke-width="8" r="32" cy="50" cx="50">
|
|
544
544
|
<animateTransform values="0 50 50;360 50 50" keyTimes="0;1" dur="1s" repeatCount="indefinite" type="rotate" attributeName="transform"></animateTransform>
|
|
545
545
|
</circle><g></g></g></svg>
|
|
546
|
-
`,NI='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',bI='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',Ul=class Ul extends d.Destroyable{constructor(t){super();const e=()=>{const n=this.dv(new _a);this.d(d.track([n,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{n.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),n.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(n),this.d(()=>t.delete(n)),n.instanceClass=class extends d.Destroyable{constructor(a,o,l){super();p(this,"_div",document.createElement("div"));if(this._subContainer=a,!l)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const m=()=>{o.show?this._div.style.opacity="1":this._div.style.opacity="0"};m(),this.d(o.showChanged.don(m))}let u,c,h,f,g;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",u=document.createElement("div"),this._div.appendChild(u),u.style.width="auto",u.style.position="absolute",u.style.left="50%",u.style.top="50%",u.style.transform="translate(-50%,-50%)",u.style.background="rgba(120, 120, 0, 0.7)",u.style.color="white",u.style.fontSize="10px",u.style.background="none",u.style.display="flex",u.style.justifyContent="center",u.style.alignItems="center",c=document.createElement("div"),u.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=Ul.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),u.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",f=document.createElement("div"),h.appendChild(f),f.style.fontSize="14px",f.style.fontWeight="800",f.style.marginBottom="5px",f.style.textShadow="0 0 2px black",g=document.createElement("div"),h.appendChild(g),g.style.fontWeight="400",g.style.textShadow="0 0 2px black";{const m=()=>{let E="Raw";l.status==="Raw"?E="初始状态":l.status==="Creating"?E="正在创建":l.status==="Created"?E="创建完成":l.status==="Error"?E="创建失败":l.status==="Reconnecting"&&(E="重新连接"),f.innerText=`${E}(${l.status})`,g.innerText=`${l.statusLog}`,(l.status==="Creating"||l.status==="Reconnecting")&&(c.innerHTML=Ul.defaultsSvg.loadingSvg),l.status==="Created"&&(c.innerHTML=Ul.defaultsSvg.successSvg),l.status==="Error"&&(c.innerHTML=Ul.defaultsSvg.warnSvg)};m();const _=this.dv(d.createNextAnimateFrameEvent(l.statusLogChanged,l.statusChanged));this.d(_.don(m))}}update(){const a=255*Math.random()|0,o=255*Math.random()|0,l=255*Math.random()|0;this._div.style.background=`rgba(${a}, ${o}, ${l}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};p(Ul,"defaultsSvg",{loadingSvg:MI,successSvg:NI,warnSvg:bI});let Ud=Ul;class TI extends d.Destroyable{constructor(t,e,n){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=n;const i=this._subContainer,s=this._overlayContainer,a=this._viewer,o=()=>{const c=a.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};o(),this.d(a.zIndexChanged.don(o));const l=()=>{i.style.display=a.show??!0?"block":"none"};l(),this.d(a.showChanged.don(l));const u=()=>{i.style.opacity=`${a.opacity??1}`};u(),this.d(a.opacityChanged.don(u))}}function jc(r){let t=d.getExtProp(r,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",r.appendChild(t),d.setExtProp(r,"_relativeContainer",t)),t}class DI extends d.Destroyable{constructor(e,n){super();p(this,"_subContainer",document.createElement("div"));p(this,"_overlayContainer",document.createElement("div"));p(this,"_containerStyleController");this._container=e,this._viewer=n,this._containerStyleController=this.dv(new TI(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),jc(this._container).appendChild(i),this.d(()=>jc(this._container).removeChild(i)),jc(this._container).appendChild(s),this.d(()=>jc(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class xI extends d.Destroyable{constructor(){super(...arguments);p(this,"registerObjsMap",new Map)}register(e,n){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,n),e}getViewerConstructor(e){const n=this.registerObjsMap.get(e);if(!n){console.warn(`未找到${e}类!`);return}return n}createViewer(e){const n=e.type,i=this.getViewerConstructor(n);if(!i)throw new Error(`没有找到类型为${n}的Viewer构造器!`);return new i(e)}}class tv extends d.Destroyable{constructor(t,e,n=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(d.DomElementEvent.create(e,"pointerdown")),a=this.dv(d.DomElementEvent.create(e,"pointermove")),o=this.dv(d.DomElementEvent.create(e,"pointerup")),l=this.dv(d.DomElementEvent.create(e,"pointerout")),u=this.dv(d.DomElementEvent.create(e,"pointerover")),c=this.dv(new d.PointerClick),h=this.dv(new d.PointerHover),f=()=>{const v=this._viewer.hoverTime*1e3;h.delayTime=v};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(v=>c.pointerDown(v))),this.d(a.don(v=>c.pointerMove(v))),this.d(o.don(v=>c.pointerUp(v))),this.d(l.don(v=>c.pointerOut(v))),this.d(s.don(v=>h.pointerDown(v))),this.d(a.don(v=>h.pointerMove(v))),this.d(o.don(v=>h.pointerUp(v))),this.d(l.don(v=>h.pointerOut(v)));const{x:g,y:m}=e.getBoundingClientRect(),_=i?g:0,E=i?m:0;this.d(h.hoverEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.hoverEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(c.clickEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.clickEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(c.dbclickEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(s.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(o.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(a.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerMoveEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(u.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOverEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(l.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOutEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})}));const M=this.dv(d.DomElementEvent.create(e,"keydown"));this.d(M.don(v=>this._viewer.keyDownEvent.emit(v)));const y=this.dv(d.DomElementEvent.create(e,"keyup"));this.d(y.don(v=>this._viewer.keyUpEvent.emit(v)));const w=this.dv(d.DomElementEvent.create(e,"wheel"));this.d(w.don(v=>this._viewer.wheelEvent.emit(v)))}}class AI extends d.Destroyable{constructor(e){super();p(this,"viewer");const n=this.viewer=e;this.ad(new d.ObjResettingWithEvent(n.rollerShutterChanged,()=>{var o;const i=(o=n.container)==null?void 0:o.parentElement;if(!i||!n.rollerShutter)return;const s=new d.Destroyable;this.viewer.splitPosition=.5;let a=this.getRollerShutterDIV();return i.appendChild(a),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(a)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const n=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const a=i.x/e.parentElement.offsetWidth;e.style.left=`${100*a}%`,this.viewer.splitPosition=a};return e.addEventListener("mousedown",i=>{document.addEventListener("mousemove",n)}),document.addEventListener("mouseup",i=>{document.removeEventListener("mousemove",n)}),e}}class OI extends d.Destroyable{constructor(e){super();p(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new AI(e))}}const cs=class cs extends d.Destroyable{constructor(e){super();p(this,"_forceRecreateEvent",this.dv(new d.Event));p(this,"_container",this.dv(d.react(void 0)));p(this,"_containerSize",this.dv(d.react(void 0)));p(this,"_editingEvent",this.disposeVar(new d.Event));p(this,"_status",this.dv(d.react("Raw")));p(this,"_statusLog",this.dv(d.react("")));p(this,"_statusContainer",this.dv(new Ud(this)));p(this,"_useCustomInteraction",this.dv(d.react(!0)));p(this,"_resetInteractionEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));p(this,"_interactionResetting",this.dv(new d.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new tv(this,this.container)})));p(this,"_viewerChanged",this.dv(new d.Event));p(this,"_containerResetEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));p(this,"_containerResetting",this.dv(new d.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new DI(this.container,this)})));p(this,"_sceneObjectsMap",new Map);p(this,"_id");p(this,"_typeName");p(this,"_updateFuncReact",this.dv(d.react(void 0)));p(this,"_toDestroyFuncReact",this.dv(d.react(void 0)));p(this,"_statusInfo",cs.defaults.statusInfo);p(this,"_navigationMode",this.dv(d.react("Map")));p(this,"_syncViewer",this.dv(d.react(void 0)));p(this,"_syncEventDon",this.dv(new d.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new II(this,e)})));p(this,"_timeSyncdon",this.dv(new d.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new CI(this)})));p(this,"_hoverEvent",this.dv(new d.Event));p(this,"_pointerOverEvent",this.dv(new d.Event));p(this,"_pointerMoveEvent",this.dv(new d.Event));p(this,"_pointerDownEvent",this.dv(new d.Event));p(this,"_pointerUpEvent",this.dv(new d.Event));p(this,"_pointerOutEvent",this.dv(new d.Event));p(this,"_clickEvent",this.dv(new d.Event));p(this,"_dblclickEvent",this.dv(new d.Event));p(this,"_keyDownEvent",this.dv(new d.Event));p(this,"_keyUpEvent",this.dv(new d.Event));p(this,"_wheelEvent",this.dv(new d.Event));p(this,"_actived",this.dv(d.react(!1)));this._id=e.id??d.createGuid();const n=K0(e.container);if(n)this._container.value=Vd(n),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{n&&(this.show??!0?n.style.display="block":n.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[o,l]of i.entries())if(!l&&o){const u=xa.context.createEngineObject(o,this);u&&i.set(o,u)}},a=()=>{for(let[o,l]of i.entries())l&&!l.isDestroyed()&&l.destroy(),i.set(o,void 0)};this.d(a),this.d(this.viewerChanged.don(o=>{a(),o&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(a){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${a}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||d.createAnimateFrame(),s.restart(void 0,a=>{this.updateFunc&&this.updateFunc(this,a)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new OI(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const n=document.getElementById(e);n&&n instanceof HTMLDivElement?this._container.value=Vd(n):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=Vd(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let n of e)if(!this.has(n)){const i=xa.context.createEngineObject(n,this);i&&this._sceneObjectsMap.set(n,i),n.viewerAttached.emit(this)}}delete(...e){for(let n of e)if(this.has(n)){const i=this._sceneObjectsMap.get(n);i&&i.destroy(),this._sceneObjectsMap.delete(n),n.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return cs.createDefaultProps()}_getJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,a=this.defaultProps[i];a instanceof d.ReactiveVariable?s=a.equals(this[i]):s=a===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_setJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const a=Object.keys(this.defaultProps).filter(o=>!s.includes(o));for(let o of a)if(o in e)this[o]=e[o]===null?void 0:e[o];else if(!(i??!1)){let l=this.defaultProps[o];l instanceof d.ReactiveVariable&&(l=l.value),this[o]=l}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(n){console.warn(`时间格式不正确! value: ${e} error: ${n}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}getProperties(e){return[new X("ESViewer","ESViewer",[new mt("强制刷新","重载",[],()=>this.forceRecreate(),[]),new U("debug","debug",!0,!1,[this,"debug"],cs.defaults.debug),new U("是否可见","是否可见",!0,!1,[this,"show"]),new tt("位置点单位","lonLatFormat",!0,!1,[this,"lonLatFormat"],[["度","DECIMAL_DEGREE"],["度分","DEGREES_DECIMAL_MINUTES"],["度分秒","SEXAGESIMAL_DEGREE"]]),new U("是否开启文字避让","textAvoidance",!0,!1,[this,"textAvoidance"],!1),new nt("ionAccessToken","ionAccessToken",!1,!1,[this,"ionAccessToken"]),new C("时钟","时钟",!1,!1,[this,"currentTime"]),new U("globeShow","globeShow",!0,!1,[this,"globeShow"]),new U("atmosphere","atmosphere",!1,!1,[this,"atmosphere"])]),new C("飞行像素范围","默认飞行定位时对象包围球所占的屏幕像素大小",!1,!1,[this,"flyToBoundingSize"]),new C("编辑高度偏移","编辑时默认的高度偏移",!1,!1,[this,"editingHeightOffset"]),new X("Globe","Globe",[new Y("地形着色器","可以设置地形全局坡度,坡向,高程带,等高线等",!1,!1,[this,"terrainShader"])])]}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}};p(cs,"context",new xI),p(cs,"register",cs.context.register.bind(cs.context)),p(cs,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0});let Di=cs;(r=>{r.createBaseProps=()=>({name:"未命名场景对象",extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),r.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:d.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:d.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:d.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:r.defaults.terrainShader,splitPosition:d.react(void 0),rollerShutter:!1}),r.createDefaultProps=()=>({...(0,r.createBaseProps)(),...(0,r.createCommonProps)()})})(Di||(Di={})),d.extendClassProps(Di.prototype,Di.createDefaultProps);function ev(r,t){const e=r._lastCameraInfo;if(e){const n=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:a}=e;t.flyIn(s,a,0),r._lastCameraInfo=void 0,n()})}}const LI=r=>{const t=Di.createCommonProps(),e={};try{Object.keys(t).forEach(n=>{e[n]=r[n]})}catch(n){console.warn(n)}return e},rv=(r,t)=>{const e=Di.createCommonProps();try{Object.keys(e).forEach(n=>{r[n]=t[n]})}catch(n){console.warn(n)}};class RI extends d.Destroyable{constructor(e){super();p(this,"_viewersChanged",this.disposeVar(new d.Event));p(this,"_viewers",new Set);p(this,"_viewersToChange",this.dv(new d.Event));this._sceneObjectsManager=e,this.d(()=>{for(const n of this._viewers)this.destroyViewer(n);this._viewers.clear()}),this.viewers.forEach(n=>{const i=this._sceneObjectsManager.sceneObjects;n.add(...i)}),this.d(()=>{const n=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...n)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((n,i)=>{this.viewers.forEach(s=>{i.forEach(a=>{Ts(s.devTags,a.devTags)&&(s.has(a)?console.warn(`${s.typeName}中已存${a.typeName},检查逻辑是否有问题!`):s.add(a))}),n.forEach(a=>{Ts(s.devTags,a.devTags)&&(s.has(a)?s.delete(a):console.warn(`${s.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(a=>{a.has(s)&&a.delete(s),console.log("sceneObjectsToChange",a.devTags,s.devTags,Ts(a.devTags,s.devTags)),Ts(a.devTags,s.devTags)&&(a.has(s)?console.warn(`${a.typeName}中已存${s.typeName},检查逻辑是否有问题!`):a.add(s))})}))})})),this.d(this.viewersChanged.don((n,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(a=>{for(let o of s)Ts(a.devTags,o.devTags)&&(a.has(o)?console.warn(`${a.typeName}中已存${o.typeName},检查逻辑是否有问题!`):a.add(o))}),n.forEach(a=>{for(let o of s)Ts(a.devTags,o.devTags)&&(a.has(o)?a.delete(o):console.warn(`${a.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(a=>{a.d(a.devTagsChanged.don(()=>{a.clearAllSceneObjects();const o=this._sceneObjectsManager.sceneObjects;for(let l of o)console.log("viewersChanged",a.devTags,l.devTags,Ts(a.devTags,l.devTags)),Ts(a.devTags,l.devTags)&&(a.has(l)?console.warn(`${a.typeName}中已存${l.typeName},检查逻辑是否有问题!`):a.add(l))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const n=Di.context.createViewer(e);return this._viewers.add(n),this._viewersChanged.emit([],[n]),n}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class Ea extends d.Destroyable{constructor(...e){super();p(this,"_drgm",this.dv(new f0));p(this,"_sobjm",this.dv(new PI));p(this,"_vrm",this.dv(new RI(this._sobjm)));p(this,"_sceneObjectEditingManager",this.disposeVar(new SI));p(this,"_activeViewer",this.dv(d.react(void 0)));p(this,"_syncOtherViewersToActived",this.dv(d.react(!1)));p(this,"_cmrvm",this.createSceneObjectFromClass(va));p(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));p(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});p(this,"_sceneTree",this.dv(new Lh("default",this.dragstartDataMananger,24,this)));p(this,"_propUiTreeManager",this.dv(new xu(24)));p(this,"_sceneTreeMap",new Map);p(this,"_viewerCreatedEvent",this.dv(new d.Event));p(this,"_lastCameraInfo");p(this,"_lastActiveViewerJson");p(this,"syncEvent",this.dv(d.createNextAnimateFrameEvent(this.activeViewerChanged,this.syncOtherViewersToActivedChanged)));p(this,"_syncEventDon",this.d(this.syncEvent.don(()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(n=>{e?n.syncOtherViewer(this.activeViewer):n.syncOtherViewer(void 0)})})));p(this,"_player",this.createSceneObjectFromClass(As));p(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));p(this,"_esPlyarAndPathTime",this.dv(new mI(this)));p(this,"_pathAnimationManager",this.dv(new yI(this)))}static get envs(){return ft.context.environmentVariables}getSceneObjectById(e){return ft.getSceneObjectById(e)}getSceneObject(e){return ft.getSceneObject(e)}get $refs(){return ft.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var h;const e=this._asset.createdTime||new Date().toISOString(),n=new Date().toISOString(),i=this._asset.name||"未命名项目",a={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:n,name:i},o=this.sceneTree.json,l=this._cmrvm.views,u=[...this._vrm.viewers].map(f=>f.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:a,viewers:u,sceneTree:o,viewCollection:l,lastView:c}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(n=>{const i=e.viewers.find(s=>s.id===n.id);i&&(n.json=i)})}catch(n){console.error(`ESObjectsManager解析json数据时发生错误! error: ${n}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return _I(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,n=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new Lh(e,this.dragstartDataMananger,n,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const n=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=n);const i=this.d(n.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(n),i())}));return n}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,n=!0,i=!0,s=!0){var u;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&n&&(this._lastCameraInfo=(u=this.activeViewer)==null?void 0:u.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?LI(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const a=e.id,o=a?[...this.getViewers()].find(c=>c.id===a):[...this.getViewers()].find(c=>c.typeName===e.type);if(o)if(a&&o.typeName!==e.type)console.warn(`id为${a}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(o);else return console.log("ESViewer exists, will be used"),n&&ev(this,o),i&&this._lastActiveViewerJson&&(rv(o,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),o.container===K0(e.container)?(o.containerOrId=e.container,o.forceRecreate()):o.containerOrId=e.container,this.activeViewer=o,o;console.log("No ESViewer exists, will be created");const l=this.createViewer(e);return n&&ev(this,l),i&&this._lastActiveViewerJson&&(rv(l,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=l,l}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:n,viewSync:i,attributeSync:s,destroy:a,id:o}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:n,id:o},i??!0,s??!0,a??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const n={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:a,destroy:o,id:l}=n;return this.switchViewer({type:"ESCesiumViewer",container:i,id:l},s,a,o)}}switchToUEViewer(...e){let n,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:l,uri:u,app:c,token:h,viewSync:f,attributeSync:g,destroy:m,id:_}=e[0];n={type:"ESUeViewer",container:l,id:_,options:{uri:u,app:c,token:h}},i={viewSync:f??!0,attributeSync:g??!0,destroy:m??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:l,ws:u,esmsg:c,viewSync:h,attributeSync:f,id:g,destroy:m}=e[0];n={type:"ESUeViewer",container:l,id:g,options:{ws:u,esmsg:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:l,project:u,baseUrl:c,viewSync:h,attributeSync:f,id:g,destroy:m}=e[0];n={type:"ESUeViewer",container:l,id:g,options:{project:u,baseUrl:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(n={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(n={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(n={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!n)throw new Error("参数错误");const{viewSync:s,attributeSync:a,destroy:o}=i;return this.switchViewer(n,s,a,o)}createCesiumViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(n={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createUeViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?n={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!n)throw new Error("参数错误");return this.createViewer(n)}createSceneObject(e,n){return this._sobjm.createSceneObject(e,n)}createSceneObjectFromClass(e,n){return this._sobjm.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const n=this._sobjm.deleteSceneObject(e);return e.destroy(),n}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let n of e)n!=this._player&&n!=this._cmrvm&&this.destroySceneObject(n)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}p(Ea,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),p(Ea,"getEnv",ft.context.getEnv.bind(ft.context)),p(Ea,"setEnv",ft.context.setEnv.bind(ft.context)),(r=>{r.createDefaultProps=()=>({})})(Ea||(Ea={})),d.extendClassProps(Ea.prototype,Ea.createDefaultProps);function FI(){const r=navigator.userAgent;let t="Unknown";/Windows/.test(r)?t="Windows":/Macintosh/.test(r)?t="MacOS":/Linux/.test(r)?t="Linux":/Android/.test(r)?t="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?e="x64":/x86|i686|Win32/.test(r)?e="x86":/arm64|aarch64/.test(r)?e="arm64":/arm/.test(r)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const GI=Date.now();function nv(r){const{os:t,arch:e}=FI(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-GI)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},a=window.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${a}`,s).then(o=>o.text()).then(o=>console.log(o)).catch(o=>console.log("error",o))}N.copyright=void 0;try{const r="earthsdk3",t="3.0.8-beta.7",e="2025-06-19T00:47:05.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="468c6a33b6cf9a394b5cc013cf77153920efc031",o=((Date.now()-1750294025e3)/36e5).toFixed(1),l=`%c🌏 ${r}%c ${t}.${s.slice(0,8)}.${e} (距今${o}个小时)
|
|
546
|
+
`,NI='<svg t="1747028305766" class="icon" viewBox="0 0 1032 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3881" width="40" height="40"><path d="M0.1536 547.700736c-0.205824-0.187392-0.205824-0.49152 0.008192-0.68608l80.672768-73.590784a0.63488 0.63488 0 0 1 0.7936-0.029696l263.043072 203.0336c0.667648 0.515072 1.738752 0.498688 2.393088-0.038912l609.191936-500.133888a0.605184 0.605184 0 0 1 0.768 0.022528l74.84928 67.229696a0.454656 0.454656 0 0 1-0.002048 0.685056l-685.234176 618.19904a1.14688 1.14688 0 0 1-1.518592-0.012288L0.1536 547.700736z" fill="#ffffff" p-id="3882"></path></svg>',bI='<svg t="1747028398107" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1146" width="40" height="40"><path d="M415.744006 1.033277A0.992256 0.992256 0 0 1 416.747526 0.000061h189.5045c0.569344 0 1.017856 0.45056 1.001472 1.033216l-21.227518 754.803667a1.062912 1.062912 0 0 1-1.05984 1.032192h-146.933752c-0.569344 0-1.04448-0.45056-1.059839-1.032192L415.744006 1.033277zM511.510528 1024c-52.595709 0-95.231994-39.866366-95.231994-89.043963 0-49.176573 42.636285-89.042939 95.231994-89.042938 52.594685 0 95.231994 39.866366 95.231994 89.042938 0 49.177597-42.637309 89.043963-95.231994 89.043963z" fill="#ffffff" p-id="1147"></path></svg>',Ul=class Ul extends d.Destroyable{constructor(t){super();const e=()=>{const n=this.dv(new _a);this.d(d.track([n,"show"],[t,"useDefaultStatusDiv"]));{const i=()=>{n.show=(t.useDefaultStatusDiv??!0)&&t.status!=="Created"};i(),this.d(t.useDefaultStatusDivChanged.don(i)),this.d(t.statusChanged.don(i)),n.cssText="width:100%;height:100%;position:absolute;left:0px;top:0px;"}t.add(n),this.d(()=>t.delete(n)),n.instanceClass=class extends d.Destroyable{constructor(a,o,l){super();p(this,"_div",document.createElement("div"));if(this._subContainer=a,!l)return;this._subContainer.appendChild(this._div),this.d(()=>this._subContainer.removeChild(this._div));{const m=()=>{o.show?this._div.style.opacity="1":this._div.style.opacity="0"};m(),this.d(o.showChanged.don(m))}let u,c,h,f,g;this._div.style.pointerEvents="none",this._div.style.position="absolute",this._div.style.width="100%",this._div.style.height="100%",this._div.style.backgroundColor="rgba(0, 0, 0, 0.4)",this._div.style.zIndex="100",this._div.style.transition="opacity 2s",u=document.createElement("div"),this._div.appendChild(u),u.style.width="auto",u.style.position="absolute",u.style.left="50%",u.style.top="50%",u.style.transform="translate(-50%,-50%)",u.style.background="rgba(120, 120, 0, 0.7)",u.style.color="white",u.style.fontSize="10px",u.style.background="none",u.style.display="flex",u.style.justifyContent="center",u.style.alignItems="center",c=document.createElement("div"),u.appendChild(c),c.style.pointerEvents="none",c.style.display="block",c.style.width="40px",c.innerHTML=Ul.defaultsSvg.loadingSvg,c.style.filter="drop-shadow(0px 0px 1px black)",h=document.createElement("div"),u.appendChild(h),h.style.pointerEvents="none",h.style.marginLeft="10px",h.style.display="flex",h.style.flexFlow="column",h.style.maxWidth="300px",f=document.createElement("div"),h.appendChild(f),f.style.fontSize="14px",f.style.fontWeight="800",f.style.marginBottom="5px",f.style.textShadow="0 0 2px black",g=document.createElement("div"),h.appendChild(g),g.style.fontWeight="400",g.style.textShadow="0 0 2px black";{const m=()=>{let E="Raw";l.status==="Raw"?E="初始状态":l.status==="Creating"?E="正在创建":l.status==="Created"?E="创建完成":l.status==="Error"?E="创建失败":l.status==="Reconnecting"&&(E="重新连接"),f.innerText=`${E}(${l.status})`,g.innerText=`${l.statusLog}`,(l.status==="Creating"||l.status==="Reconnecting")&&(c.innerHTML=Ul.defaultsSvg.loadingSvg),l.status==="Created"&&(c.innerHTML=Ul.defaultsSvg.successSvg),l.status==="Error"&&(c.innerHTML=Ul.defaultsSvg.warnSvg)};m();const _=this.dv(d.createNextAnimateFrameEvent(l.statusLogChanged,l.statusChanged));this.d(_.don(m))}}update(){const a=255*Math.random()|0,o=255*Math.random()|0,l=255*Math.random()|0;this._div.style.background=`rgba(${a}, ${o}, ${l}, 0.8)`}}};this.d(t.containerChanged.don(()=>{e()}))}};p(Ul,"defaultsSvg",{loadingSvg:MI,successSvg:NI,warnSvg:bI});let Ud=Ul;class TI extends d.Destroyable{constructor(t,e,n){super(),this._subContainer=t,this._overlayContainer=e,this._viewer=n;const i=this._subContainer,s=this._overlayContainer,a=this._viewer,o=()=>{const c=a.zIndex??"";i.style.zIndex=c,s.style.zIndex=c};o(),this.d(a.zIndexChanged.don(o));const l=()=>{i.style.display=a.show??!0?"block":"none"};l(),this.d(a.showChanged.don(l));const u=()=>{i.style.opacity=`${a.opacity??1}`};u(),this.d(a.opacityChanged.don(u))}}function jc(r){let t=d.getExtProp(r,"_relativeContainer");return t||(t=document.createElement("div"),t.style.position="relative",t.style.width="100%",t.style.height="100%",t.style.padding="0",t.style.margin="0",r.appendChild(t),d.setExtProp(r,"_relativeContainer",t)),t}class DI extends d.Destroyable{constructor(e,n){super();p(this,"_subContainer",document.createElement("div"));p(this,"_overlayContainer",document.createElement("div"));p(this,"_containerStyleController");this._container=e,this._viewer=n,this._containerStyleController=this.dv(new TI(this._subContainer,this._overlayContainer,this._viewer));const{subContainer:i,overlayContainer:s}=this;i.tabIndex=-1,i.style.outline="none",i.style.width="100%",i.style.height="100%",i.onpointerdown=()=>i.focus(),s.style.position="relative",s.setAttribute("earthsdk3","earthsdk3-overlayContainer"),i.setAttribute("earthsdk3","earthsdk3-subContainer"),jc(this._container).appendChild(i),this.d(()=>jc(this._container).removeChild(i)),jc(this._container).appendChild(s),this.d(()=>jc(this._container).removeChild(s))}get subContainer(){return this._subContainer}get overlayContainer(){return this._overlayContainer}get containerStyleController(){return this._containerStyleController}get container(){return this._container}}class xI extends d.Destroyable{constructor(){super(...arguments);p(this,"registerObjsMap",new Map)}register(e,n){return this.registerObjsMap.has(e)&&console.warn(`register warn:${e}已经被注册,再次注册会覆盖。`),this.registerObjsMap.set(e,n),e}getViewerConstructor(e){const n=this.registerObjsMap.get(e);if(!n){console.warn(`未找到${e}类!`);return}return n}createViewer(e){const n=e.type,i=this.getViewerConstructor(n);if(!i)throw new Error(`没有找到类型为${n}的Viewer构造器!`);return new i(e)}}class tv extends d.Destroyable{constructor(t,e,n=!1,i=!1){if(super(),this._viewer=t,!e)throw new Error("ViewerCustomInteraction: container is null");const s=this.dv(d.DomElementEvent.create(e,"pointerdown")),a=this.dv(d.DomElementEvent.create(e,"pointermove")),o=this.dv(d.DomElementEvent.create(e,"pointerup")),l=this.dv(d.DomElementEvent.create(e,"pointerout")),u=this.dv(d.DomElementEvent.create(e,"pointerover")),c=this.dv(new d.PointerClick),h=this.dv(new d.PointerHover),f=()=>{const v=this._viewer.hoverTime*1e3;h.delayTime=v};this.d(this._viewer.hoverTimeChanged.don(()=>{f()})),this.d(s.don(v=>c.pointerDown(v))),this.d(a.don(v=>c.pointerMove(v))),this.d(o.don(v=>c.pointerUp(v))),this.d(l.don(v=>c.pointerOut(v))),this.d(s.don(v=>h.pointerDown(v))),this.d(a.don(v=>h.pointerMove(v))),this.d(o.don(v=>h.pointerUp(v))),this.d(l.don(v=>h.pointerOut(v)));const{x:g,y:m}=e.getBoundingClientRect(),_=i?g:0,E=i?m:0;this.d(h.hoverEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.hoverEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(c.clickEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.clickEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(c.dbclickEvent.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.dblclickEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(s.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerDownEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(o.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);v.button===0&&this._viewer.pointerUpEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(a.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerMoveEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(u.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOverEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})})),this.d(l.don(v=>{const[S,P]=d.getDomEventCurrentTargetPos(v,n);this._viewer.pointerOutEvent.emit({screenPosition:[S+_,P+E],pointerEvent:v})}));const M=this.dv(d.DomElementEvent.create(e,"keydown"));this.d(M.don(v=>this._viewer.keyDownEvent.emit(v)));const y=this.dv(d.DomElementEvent.create(e,"keyup"));this.d(y.don(v=>this._viewer.keyUpEvent.emit(v)));const w=this.dv(d.DomElementEvent.create(e,"wheel"));this.d(w.don(v=>this._viewer.wheelEvent.emit(v)))}}class AI extends d.Destroyable{constructor(e){super();p(this,"viewer");const n=this.viewer=e;this.ad(new d.ObjResettingWithEvent(n.rollerShutterChanged,()=>{var o;const i=(o=n.container)==null?void 0:o.parentElement;if(!i||!n.rollerShutter)return;const s=new d.Destroyable;this.viewer.splitPosition=.5;let a=this.getRollerShutterDIV();return i.appendChild(a),s.d(()=>{this.viewer.splitPosition=0,i.removeChild(a)}),s}))}getRollerShutterDIV(){let e=document.createElement("div");e.style.position="absolute",e.style.left="50%",e.style.top="0",e.style.backgroundColor="#d3d3d3",e.style.width="5px",e.style.height="100%",e.style.zIndex="9999";const n=i=>{if(!e.parentElement)return;i.preventDefault?i.preventDefault():i.returnValue=!1;const a=i.x/e.parentElement.offsetWidth;e.style.left=`${100*a}%`,this.viewer.splitPosition=a};return e.addEventListener("mousedown",i=>{document.addEventListener("mousemove",n)}),document.addEventListener("mouseup",i=>{document.removeEventListener("mousemove",n)}),e}}class OI extends d.Destroyable{constructor(e){super();p(this,"rollerShutterAnalysis");this.rollerShutterAnalysis=this.ad(new AI(e))}}const cs=class cs extends d.Destroyable{constructor(e){super();p(this,"_forceRecreateEvent",this.dv(new d.Event));p(this,"_container",this.dv(d.react(void 0)));p(this,"_containerSize",this.dv(d.react(void 0)));p(this,"_editingEvent",this.disposeVar(new d.Event));p(this,"_status",this.dv(d.react("Raw")));p(this,"_statusLog",this.dv(d.react("")));p(this,"_statusContainer",this.dv(new Ud(this)));p(this,"_useCustomInteraction",this.dv(d.react(!0)));p(this,"_resetInteractionEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._useCustomInteraction.changed,this._forceRecreateEvent)));p(this,"_interactionResetting",this.dv(new d.ObjResettingWithEvent(this._resetInteractionEvent,()=>{if(!(!this.container||!this._useCustomInteraction.value))return new tv(this,this.container)})));p(this,"_viewerChanged",this.dv(new d.Event));p(this,"_containerResetEvent",this.dv(d.createNextAnimateFrameEvent(this.containerChanged,this._forceRecreateEvent)));p(this,"_containerResetting",this.dv(new d.ObjResettingWithEvent(this._containerResetEvent,()=>{if(this.container)return new DI(this.container,this)})));p(this,"_sceneObjectsMap",new Map);p(this,"_id");p(this,"_typeName");p(this,"_updateFuncReact",this.dv(d.react(void 0)));p(this,"_toDestroyFuncReact",this.dv(d.react(void 0)));p(this,"_statusInfo",cs.defaults.statusInfo);p(this,"_navigationMode",this.dv(d.react("Map")));p(this,"_syncViewer",this.dv(d.react(void 0)));p(this,"_syncEventDon",this.dv(new d.ObjResettingWithEvent(this.syncViewerChanged,()=>{const e=this.syncViewer;if(e)return new II(this,e)})));p(this,"_timeSyncdon",this.dv(new d.ObjResettingWithEvent(this.timeSyncChanged,()=>{if(this.timeSync)return new CI(this)})));p(this,"_hoverEvent",this.dv(new d.Event));p(this,"_pointerOverEvent",this.dv(new d.Event));p(this,"_pointerMoveEvent",this.dv(new d.Event));p(this,"_pointerDownEvent",this.dv(new d.Event));p(this,"_pointerUpEvent",this.dv(new d.Event));p(this,"_pointerOutEvent",this.dv(new d.Event));p(this,"_clickEvent",this.dv(new d.Event));p(this,"_dblclickEvent",this.dv(new d.Event));p(this,"_keyDownEvent",this.dv(new d.Event));p(this,"_keyUpEvent",this.dv(new d.Event));p(this,"_wheelEvent",this.dv(new d.Event));p(this,"_actived",this.dv(d.react(!1)));this._id=e.id??d.createGuid();const n=K0(e.container);if(n)this._container.value=Vd(n),this._typeName=e.type,this._initName();else throw new Error("container is not defined");{const i=()=>{n&&(this.show??!0?n.style.display="block":n.style.display="none")};i(),this.d(this.showChanged.don(i))}{const i=this._sceneObjectsMap,s=()=>{for(let[o,l]of i.entries())if(!l&&o){const u=xa.context.createEngineObject(o,this);u&&i.set(o,u)}},a=()=>{for(let[o,l]of i.entries())l&&!l.isDestroyed()&&l.destroy(),i.set(o,void 0)};this.d(a),this.d(this.viewerChanged.don(o=>{a(),o&&s()}))}{const i=()=>{if(this.execOnceFuncStr)try{Function(`"use strict";return (${this.execOnceFuncStr})`)()(this)}catch(s){console.warn(`execOnceFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`)}};i(),this.d(this.execOnceFuncStrChanged.don(i))}{const i=()=>{if(this.updateFuncStr)try{this.updateFunc=Function(`"use strict";return (${this.updateFuncStr})`)()}catch(a){console.warn(`updateFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${a}`)}};i(),this.d(this.updateFuncStrChanged.don(i));let s;this.d(()=>s&&s.destroy()),this.d(this.updateFuncChanged.don(()=>{s&&s.cancel(),this.updateFunc&&(s=s||d.createAnimateFrame(),s.restart(void 0,a=>{this.updateFunc&&this.updateFunc(this,a)}))}))}{const i=()=>{try{this.toDestroyFunc=this.toDestroyFuncStr&&Function(`"use strict";return (${this.toDestroyFuncStr})`)()||void 0}catch(s){console.warn(`toDestroyFuncStr不能转成函数!或者函数执行时错误!id: ${this.id} ${this.typeName} error: ${s}`),this.toDestroyFunc=void 0}};i(),this.d(this.toDestroyFuncStrChanged.don(i)),this.d(this.toDestroyEvent.don(()=>{this.toDestroyFunc&&this.toDestroyFunc(this)}))}this.ad(new OI(this))}forceRecreate(){this._forceRecreateEvent.emit()}get container(){return this._container.value}set container(e){this._container.value=e}set containerOrId(e){if(typeof e=="string"){const n=document.getElementById(e);n&&n instanceof HTMLDivElement?this._container.value=Vd(n):console.warn("containerOrId warn: !(container instanceof HTMLDivElement)")}else e instanceof HTMLDivElement?this._container.value=Vd(e):console.warn("containerOrId warn: setting container failed!")}get containerChanged(){return this._container.changed}get containerSize(){return this._containerSize.value}set containerSize(e){this._containerSize.value=e}get containerSizeChanged(){return this._containerSize.changed}get editingEvent(){return this._editingEvent}get status(){return this._status.value}get statusChanged(){return this._status.changed}setStatus(e){this._status.value=e}get statusLog(){return this._statusLog.value}get statusLogChanged(){return this._statusLog.changed}setStatusLog(e){this._statusLog.value=e}get useCustomInteraction(){return this._useCustomInteraction.value}set useCustomInteraction(e){this._useCustomInteraction.value=e}get viewerChanged(){return this._viewerChanged}get containerResetEvent(){return this._containerResetEvent}get subContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.subContainer}get subContainerChanged(){return this._containerResetting.objChanged}get overlayContainer(){var e;return(e=this._containerResetting.obj)==null?void 0:e.overlayContainer}get overlayContainerChanged(){return this._containerResetting.objChanged}get sceneObjectsMap(){return this._sceneObjectsMap}get sceneObjects(){return this._sceneObjectsMap.keys()}getEngineObject(e){return this.sceneObjectsMap.get(e)}add(...e){for(let n of e)if(!this.has(n)){const i=xa.context.createEngineObject(n,this);i&&this._sceneObjectsMap.set(n,i),n.viewerAttached.emit(this)}}delete(...e){for(let n of e)if(this.has(n)){const i=this._sceneObjectsMap.get(n);i&&i.destroy(),this._sceneObjectsMap.delete(n),n.viewerDetached.emit(this)}}disposableAdd(...e){return this.add(...e),()=>this.delete(...e)}disAdd(...e){return this.disposableAdd(...e)}has(e){return this._sceneObjectsMap.has(e)}clearAllSceneObjects(){for(let e of this.sceneObjects)this.delete(e)}get id(){return this._id}set id(e){console.warn("ESViewer id is readonly")}get typeName(){return this._typeName}_initName(){this.name=`${this.typeName}_${(""+this.id).slice(-4)}`}get defaultProps(){return cs.createDefaultProps()}_getJson(e=!0){const n={id:this.id,type:this.typeName};for(let i of Object.keys(this.defaultProps))if(e){let s,a=this.defaultProps[i];a instanceof d.ReactiveVariable?s=a.equals(this[i]):s=a===this[i],s||(n[i]=this[i])}else n[i]=this[i];return n}_setJson(e,n,i){if(!(e instanceof Object)||e.type&&e.type!==this.typeName){console.error(`value.type && value.type${e.type} !== this.typeName${this.typeName}`);return}e.id&&e.id!==this.id&&console.warn(`value.id === undefined || value.id${e.id} !== this.id(${this.id})`);const s=n||[];s.push("id","type");const a=Object.keys(this.defaultProps).filter(o=>!s.includes(o));for(let o of a)if(o in e)this[o]=e[o]===null?void 0:e[o];else if(!(i??!1)){let l=this.defaultProps[o];l instanceof d.ReactiveVariable&&(l=l.value),this[o]=l}}get json(){return this._getJson()}set json(e){this._setJson(e,["devTags"])}get updateFunc(){return this._updateFuncReact.value}set updateFunc(e){this._updateFuncReact.value=e}get updateFuncChanged(){return this._updateFuncReact.changed}get toDestroyFunc(){return this._toDestroyFuncReact.value}set toDestroyFunc(e){this._toDestroyFuncReact.value=e}get toDestroyFuncChanged(){return this._toDestroyFuncReact.changed}get navigationMode(){return this._navigationMode.value}get navigationModeChanged(){return this._navigationMode.changed}getNavigationMode(){return this._navigationMode.value}getEngineType(){return this._typeName}get syncViewer(){return this._syncViewer.value}set syncViewer(e){this._syncViewer.value=e}get syncViewerChanged(){return this._syncViewer.changed}syncOtherViewer(e){e&&e.syncViewer&&(e.syncViewer=void 0),e===this?this._syncViewer.value=void 0:this._syncViewer.value=e}setCurrentTime(e){try{this.currentTime=typeof e=="string"?Date.parse(e):e}catch(n){console.warn(`时间格式不正确! value: ${e} error: ${n}`)}}async getVersion(){return window.g_XE3CopyRights??{}}get hoverEvent(){return this._hoverEvent}get pointerOverEvent(){return this._pointerOverEvent}get pointerMoveEvent(){return this._pointerMoveEvent}get pointerDownEvent(){return this._pointerDownEvent}get pointerUpEvent(){return this._pointerUpEvent}get pointerOutEvent(){return this._pointerOutEvent}get clickEvent(){return this._clickEvent}get dblclickEvent(){return this._dblclickEvent}get keyDownEvent(){return this._keyDownEvent}get keyUpEvent(){return this._keyUpEvent}get wheelEvent(){return this._wheelEvent}getProperties(e){return[new X("ESViewer","ESViewer",[new mt("强制刷新","重载",[],()=>this.forceRecreate(),[]),new U("debug","debug",!0,!1,[this,"debug"],cs.defaults.debug),new U("是否可见","是否可见",!0,!1,[this,"show"]),new tt("位置点单位","lonLatFormat",!0,!1,[this,"lonLatFormat"],[["度","DECIMAL_DEGREE"],["度分","DEGREES_DECIMAL_MINUTES"],["度分秒","SEXAGESIMAL_DEGREE"]]),new U("是否开启文字避让","textAvoidance",!0,!1,[this,"textAvoidance"],!1),new nt("ionAccessToken","ionAccessToken",!1,!1,[this,"ionAccessToken"]),new C("时钟","时钟",!1,!1,[this,"currentTime"]),new U("globeShow","globeShow",!0,!1,[this,"globeShow"]),new U("atmosphere","atmosphere",!1,!1,[this,"atmosphere"])]),new C("飞行像素范围","默认飞行定位时对象包围球所占的屏幕像素大小",!1,!1,[this,"flyToBoundingSize"]),new C("编辑高度偏移","编辑时默认的高度偏移",!1,!1,[this,"editingHeightOffset"]),new X("Globe","Globe",[new Y("地形着色器","可以设置地形全局坡度,坡向,高程带,等高线等",!1,!1,[this,"terrainShader"])])]}get actived(){return this._actived.value}set actived(e){this._actived.value=e}get activedChanged(){return this._actived.changed}};p(cs,"context",new xI),p(cs,"register",cs.context.register.bind(cs.context)),p(cs,"defaults",{show:!0,debug:!1,statusInfo:{fps:0,position:[0,0,0],rotation:[0,0,0],length:0},terrainShader:{slope:{show:!1},aspect:{show:!1},elevationRamp:{show:!1,minHeight:-414,maxHeight:8777,color:[]},elevationContour:{show:!1,color:[1,0,0,1],spacing:150,width:2}},globeShow:!0,splitPosition:0});let Di=cs;(r=>{r.createBaseProps=()=>({name:"未命名场景对象",extras:d.reactJson(void 0),devTags:d.reactArrayWithUndefined(void 0),debug:void 0,show:void 0,opacity:void 0,zIndex:void 0,useDefaultStatusDiv:!0,execOnceFuncStr:void 0,updateFuncStr:void 0,toDestroyFuncStr:void 0}),r.createCommonProps=()=>({globeShow:!0,ionAccessToken:"",lonLatFormat:"DECIMAL_DEGREE",fov:60,textAvoidance:!1,flyToBoundingSize:256,hoverTime:2,currentTime:Date.now(),simulationTime:Date.now(),timeSync:!1,rain:0,snow:0,cloud:0,fog:0,depthOfField:0,atmosphere:!0,editingPointSize:void 0,editingPointColor:d.reactArrayWithUndefined(void 0),editingAuxiliaryPointColor:d.reactArrayWithUndefined(void 0),editingLineWidth:void 0,editingLineColor:d.reactArrayWithUndefined(void 0),editingAxisSize:void 0,editingAuxiliaryPointSize:void 0,editingHeightOffset:0,editingLineShow:!0,editingEventListening:!0,terrainShader:r.defaults.terrainShader,splitPosition:d.react(void 0),rollerShutter:!1}),r.createDefaultProps=()=>({...(0,r.createBaseProps)(),...(0,r.createCommonProps)()})})(Di||(Di={})),d.extendClassProps(Di.prototype,Di.createDefaultProps);function ev(r,t){const e=r._lastCameraInfo;if(e){const n=t.viewerChanged.don(i=>{if(!i||!e)return;const{position:s,rotation:a}=e;t.flyIn(s,a,0),r._lastCameraInfo=void 0,n()})}}const LI=r=>{const t=Di.createCommonProps(),e={};try{Object.keys(t).forEach(n=>{e[n]=r[n]})}catch(n){console.warn(n)}return e},rv=(r,t)=>{const e=Di.createCommonProps();try{Object.keys(e).forEach(n=>{r[n]=t[n]})}catch(n){console.warn(n)}};class RI extends d.Destroyable{constructor(e){super();p(this,"_viewersChanged",this.disposeVar(new d.Event));p(this,"_viewers",new Set);p(this,"_viewersToChange",this.dv(new d.Event));this._sceneObjectsManager=e,this.d(()=>{for(const n of this._viewers)this.destroyViewer(n);this._viewers.clear()}),this.viewers.forEach(n=>{const i=this._sceneObjectsManager.sceneObjects;n.add(...i)}),this.d(()=>{const n=this._sceneObjectsManager.sceneObjects;this.viewers.forEach(i=>{i.delete(...n)})}),this.d(this._sceneObjectsManager.sceneObjectsToChange.don((n,i)=>{this.viewers.forEach(s=>{i.forEach(a=>{Ts(s.devTags,a.devTags)&&(s.has(a)?console.warn(`${s.typeName}中已存${a.typeName},检查逻辑是否有问题!`):s.add(a))}),n.forEach(a=>{Ts(s.devTags,a.devTags)&&(s.has(a)?s.delete(a):console.warn(`${s.typeName}中不存在${a.typeName},检查逻辑是否有问题!`))})}),i.length>0&&i.forEach(s=>{s.d(s.devTagsChanged.don(()=>{this.viewers.forEach(a=>{a.has(s)&&a.delete(s),console.log("sceneObjectsToChange",a.devTags,s.devTags,Ts(a.devTags,s.devTags)),Ts(a.devTags,s.devTags)&&(a.has(s)?console.warn(`${a.typeName}中已存${s.typeName},检查逻辑是否有问题!`):a.add(s))})}))})})),this.d(this.viewersChanged.don((n,i)=>{const s=this._sceneObjectsManager.sceneObjects;i.forEach(a=>{for(let o of s)Ts(a.devTags,o.devTags)&&(a.has(o)?console.warn(`${a.typeName}中已存${o.typeName},检查逻辑是否有问题!`):a.add(o))}),n.forEach(a=>{for(let o of s)Ts(a.devTags,o.devTags)&&(a.has(o)?a.delete(o):console.warn(`${a.typeName}中不存在${o.typeName},检查逻辑是否有问题!`))}),i.length>0&&i.forEach(a=>{a.d(a.devTagsChanged.don(()=>{a.clearAllSceneObjects();const o=this._sceneObjectsManager.sceneObjects;for(let l of o)console.log("viewersChanged",a.devTags,l.devTags,Ts(a.devTags,l.devTags)),Ts(a.devTags,l.devTags)&&(a.has(l)?console.warn(`${a.typeName}中已存${l.typeName},检查逻辑是否有问题!`):a.add(l))}))})}))}get viewersChanged(){return this._viewersChanged}get viewers(){return this._viewers}getViewers(){return[...this._viewers]}get viewersToChange(){return this._viewersToChange}createViewer(e){const n=Di.context.createViewer(e);return this._viewers.add(n),this._viewersChanged.emit([],[n]),n}destroyViewer(e){return e.isDestroyed()?!0:(this._viewers.delete(e),this._viewersChanged.emit([e],[]),e.destroy(),e.isDestroyed())}}class Ea extends d.Destroyable{constructor(...e){super();p(this,"_drgm",this.dv(new f0));p(this,"_sobjm",this.dv(new PI));p(this,"_vrm",this.dv(new RI(this._sobjm)));p(this,"_sceneObjectEditingManager",this.disposeVar(new SI));p(this,"_activeViewer",this.dv(d.react(void 0)));p(this,"_syncOtherViewersToActived",this.dv(d.react(!1)));p(this,"_cmrvm",this.createSceneObjectFromClass(va));p(this,"_cmrvmdon",this.d(()=>this._cmrvm&&this.destroySceneObject(this._cmrvm)));p(this,"_asset",{type:"ESObjectsManager",version:"0.1.0",createdTime:"",modifiedTime:"",name:"未命名项目"});p(this,"_sceneTree",this.dv(new Lh("default",this.dragstartDataMananger,24,this)));p(this,"_propUiTreeManager",this.dv(new xu(24)));p(this,"_sceneTreeMap",new Map);p(this,"_viewerCreatedEvent",this.dv(new d.Event));p(this,"_lastCameraInfo");p(this,"_lastActiveViewerJson");p(this,"syncEvent",this.dv(d.createNextAnimateFrameEvent(this.activeViewerChanged,this.syncOtherViewersToActivedChanged)));p(this,"_syncEventDon",this.d(this.syncEvent.don(()=>{const e=this.syncOtherViewersToActived;this.viewers.forEach(n=>{e?n.syncOtherViewer(this.activeViewer):n.syncOtherViewer(void 0)})})));p(this,"_player",this.createSceneObjectFromClass(As));p(this,"_playerdon",this.d(()=>this._player&&this.destroySceneObject(this._player)));p(this,"_esPlyarAndPathTime",this.dv(new mI(this)));p(this,"_pathAnimationManager",this.dv(new yI(this)))}static get envs(){return ft.context.environmentVariables}getSceneObjectById(e){return ft.getSceneObjectById(e)}getSceneObject(e){return ft.getSceneObject(e)}get $refs(){return ft.$refs}get dragstartDataMananger(){return this._drgm}get sceneObjectsManager(){return this._sobjm}get viewers(){return this._vrm.viewers}getViewers(){return this._vrm.getViewers()}get sceneObjectEditingManager(){return this._sceneObjectEditingManager}get activeViewer(){return this._activeViewer.value}set activeViewer(e){this._activeViewer.value=e}get activeViewerChanged(){return this._activeViewer.changed}get syncOtherViewersToActived(){return this._syncOtherViewersToActived.value}set syncOtherViewersToActived(e){this._syncOtherViewersToActived.value=e}get syncOtherViewersToActivedChanged(){return this._syncOtherViewersToActived.changed}get cameraViewsManager(){return this._cmrvm}get json(){var h;const e=this._asset.createdTime||new Date().toISOString(),n=new Date().toISOString(),i=this._asset.name||"未命名项目",a={type:"ESObjectsManager",version:this._asset.version||"0.1.0",createdTime:e,modifiedTime:n,name:i},o=this.sceneTree.json,l=this._cmrvm.views,u=[...this._vrm.viewers].map(f=>f.json),c=(h=this.activeViewer)==null?void 0:h.getCurrentCameraInfo();return{asset:a,viewers:u,sceneTree:o,viewCollection:l,lastView:c}}set json(e){try{if(!e.asset)return;if(!e.asset.type||e.asset.type!=="ESObjectsManager"){console.warn("json装配失败! asset.type 不存在或者不是'ESObjectsManager'");return}if(this._asset.createdTime=e.asset&&e.asset.createdTime||new Date().toISOString(),this._asset.modifiedTime=e.asset&&e.asset.modifiedTime||"",this._asset.name=e.asset&&e.asset.name||"未命名项目",this._asset.version=e.asset&&e.asset.version||"0.1.0",e.sceneTree&&(this.sceneTree.json=e.sceneTree),e.viewCollection&&(this._cmrvm.views=e.viewCollection),!e.viewers||!Array.isArray(e.viewers)){console.warn("viewers is not an array or does not exist !");return}if(this._vrm.viewers.size===0||e.viewers.length===0){console.warn("viewers is empty !");return}this._vrm.viewers.forEach(n=>{const i=e.viewers.find(s=>s.id===n.id);i&&(n.json=i)})}catch(n){console.error(`ESObjectsManager解析json数据时发生错误! error: ${n}`)}}get sceneTree(){return this._sceneTree}get jsonLoadingEvent(){return this._sceneTree.jsonLoadingEvent}get propUiTreeManager(){return this._propUiTreeManager}propTreeCallback(e){return _I(this,e)}getSceneTrees(){return[...this._sceneTreeMap.values()]}getSceneTree(e="default"){if(e==="default")return this._sceneTree;if(!this._sceneTreeMap.has(e)){console.warn(`id为${e}的SceneTree不存在!`);return}return this._sceneTreeMap.get(e)}createSceneTree(e,n=24){if(this._sceneTreeMap.has(e)||e==="default")console.warn(`id为${e}的SceneTree已存在!`);else{const i=this.dv(new Lh(e,this.dragstartDataMananger,n,this));this._sceneTreeMap.set(e,i)}return this.getSceneTree(e)}get viewerCreatedEvent(){return this._viewerCreatedEvent}createViewer(e){const n=this._vrm.createViewer(e);this.activeViewer||(this.activeViewer=n);const i=this.d(n.viewerChanged.don(s=>{s&&(this._viewerCreatedEvent.emit(n),i())}));return n}destroyViewer(e){return this._activeViewer.value===e&&(this._activeViewer.value=void 0),this._vrm.destroyViewer(e)}switchViewer(e,n=!0,i=!0,s=!0){var u;this.activeViewer&&this.activeViewer.getNavigationMode()!=="Map"&&this.activeViewer.changeToMap(),!this._lastCameraInfo&&n&&(this._lastCameraInfo=(u=this.activeViewer)==null?void 0:u.getCurrentCameraInfo()),!this._lastActiveViewerJson&&i&&(this._lastActiveViewerJson=this.activeViewer?LI(this.activeViewer):void 0),s&&this.activeViewer&&this.destroyViewer(this.activeViewer);const a=e.id,o=a?[...this.getViewers()].find(c=>c.id===a):[...this.getViewers()].find(c=>c.typeName===e.type);if(o)if(a&&o.typeName!==e.type)console.warn(`id为${a}的viewer的typeName和option.type${e.type}不相同!,虽然id一致但是typeName不同,所以会销毁并创建新的viewer`),this.destroyViewer(o);else return console.log("ESViewer exists, will be used"),n&&ev(this,o),i&&this._lastActiveViewerJson&&(rv(o,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),o.container===K0(e.container)?(o.containerOrId=e.container,o.forceRecreate()):o.containerOrId=e.container,this.activeViewer=o,o;console.log("No ESViewer exists, will be created");const l=this.createViewer(e);return n&&ev(this,l),i&&this._lastActiveViewerJson&&(rv(l,this._lastActiveViewerJson),this._lastActiveViewerJson=void 0),this.activeViewer=l,l}switchToCesiumViewer(...e){if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)){const{container:n,viewSync:i,attributeSync:s,destroy:a,id:o}=e[0];return this.switchViewer({type:"ESCesiumViewer",container:n,id:o},i??!0,s??!0,a??!0)}else if(typeof e[0]=="string"||e[0]instanceof HTMLDivElement){const n={container:e[0],viewSync:e[1]??!0,attributeSync:e[2]??!0,destroy:e[3]??!0,id:e[4]},{container:i,viewSync:s,attributeSync:a,destroy:o,id:l}=n;return this.switchViewer({type:"ESCesiumViewer",container:i,id:l},s,a,o)}}switchToUEViewer(...e){let n,i={viewSync:!0,attributeSync:!0,destroy:!0};if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("uri")){const{container:l,uri:u,app:c,token:h,viewSync:f,attributeSync:g,destroy:m,id:_}=e[0];n={type:"ESUeViewer",container:l,id:_,options:{uri:u,app:c,token:h}},i={viewSync:f??!0,attributeSync:g??!0,destroy:m??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("ws")){const{container:l,ws:u,esmsg:c,viewSync:h,attributeSync:f,id:g,destroy:m}=e[0];n={type:"ESUeViewer",container:l,id:g,options:{ws:u,esmsg:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!0}}else if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)&&e[0].hasOwnProperty("project")){const{container:l,project:u,baseUrl:c,viewSync:h,attributeSync:f,id:g,destroy:m}=e[0];n={type:"ESUeViewer",container:l,id:g,options:{project:u,baseUrl:c}},i={viewSync:h??!0,attributeSync:f??!0,destroy:m??!0}}else(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?(n={type:"ESUeViewer",container:e[0],id:e[6],options:{ws:e[1],esmsg:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}):typeof e[1]=="string"&&e[1].startsWith("http")?(n={type:"ESUeViewer",container:e[0],id:e[7],options:{uri:e[1],app:e[2],token:e[3]??void 0}},i={viewSync:e[4]??!0,attributeSync:e[5]??!0,destroy:e[6]??!0}):(n={type:"ESUeViewer",container:e[0],id:e[6],options:{project:e[1],baseUrl:e[2]??void 0}},i={viewSync:e[3]??!0,attributeSync:e[4]??!0,destroy:e[5]??!0}));if(!n)throw new Error("参数错误");const{viewSync:s,attributeSync:a,destroy:o}=i;return this.switchViewer(n,s,a,o)}createCesiumViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESCesiumViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(n={container:e[0],options:e[1]??void 0,id:e[2]??void 0,type:"ESCesiumViewer"}),!n)throw new Error("参数错误");return this.createViewer(n)}createUeViewer(...e){let n;if(typeof e[0]=="object"&&!(e[0]instanceof HTMLDivElement)?n={...e[0],type:"ESUeViewer"}:(typeof e[0]=="string"||e[0]instanceof HTMLDivElement)&&(typeof e[1]=="string"&&e[1].startsWith("ws")?n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{ws:e[1],esmsg:e[2]??void 0}}:typeof e[1]=="string"&&e[1].startsWith("http")?n={type:"ESUeViewer",container:e[0],id:e[4]??void 0,options:{uri:e[1],app:e[2],token:e[3]??void 0}}:n={type:"ESUeViewer",container:e[0],id:e[3]??void 0,options:{project:e[1],baseUrl:e[2]??void 0}}),!n)throw new Error("参数错误");return this.createViewer(n)}createSceneObject(e,n){return this._sobjm.createSceneObject(e,n)}createSceneObjectFromClass(e,n){return this._sobjm.createSceneObjectFromClass(e,n)}createSceneObjectFromJson(e){return this._sobjm.createSceneObjectFromJson(e)}destroySceneObject(e){const n=this._sobjm.deleteSceneObject(e);return e.destroy(),n}destroyAllSceneObjects(){const e=[...this._sobjm.sceneObjects];for(let n of e)n!=this._player&&n!=this._cmrvm&&this.destroySceneObject(n)}get player(){return this._player}get esPlyarAndPathTime(){return this._esPlyarAndPathTime}get pathAnimationManager(){return this._pathAnimationManager}}p(Ea,"getSceneObjById",ft.context.getSceneObjectById.bind(ft.context)),p(Ea,"getEnv",ft.context.getEnv.bind(ft.context)),p(Ea,"setEnv",ft.context.setEnv.bind(ft.context)),(r=>{r.createDefaultProps=()=>({})})(Ea||(Ea={})),d.extendClassProps(Ea.prototype,Ea.createDefaultProps);function FI(){const r=navigator.userAgent;let t="Unknown";/Windows/.test(r)?t="Windows":/Macintosh/.test(r)?t="MacOS":/Linux/.test(r)?t="Linux":/Android/.test(r)?t="Android":/iOS|iPhone|iPad|iPod/.test(r)&&(t="iOS");let e="Unknown";return/x64|x86_64|Win64|WOW64/.test(r)?e="x64":/x86|i686|Win32/.test(r)?e="x86":/arm64|aarch64/.test(r)?e="arm64":/arm/.test(r)&&(e="arm"),{os:t.toLocaleLowerCase(),arch:e.toLocaleLowerCase()}}const GI=Date.now();function nv(r){const{os:t,arch:e}=FI(),n={version:r.version,commitdate:r.date,commitId:r.commitId,runningTime:(Date.now()-GI)/1e3/60|0,date:new Date().toLocaleString(),href:window.location.href,os:t,arch:e},s={method:"GET",headers:new Headers,redirect:"follow"},a=window.encodeURIComponent(JSON.stringify(n));fetch(`https://account.bjxbsj.cn/api/product/record?product=EarthSDKJS&content=${a}`,s).then(o=>o.text()).then(o=>console.log(o)).catch(o=>console.log("error",o))}N.copyright=void 0;try{const r="earthsdk3",t="3.0.8-beta.8",e="2025-06-19T00:47:05.000Z",n="北京西部世界科技有限公司",i="地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn",s="468c6a33b6cf9a394b5cc013cf77153920efc031",o=((Date.now()-1750294025e3)/36e5).toFixed(1),l=`%c🌏 ${r}%c ${t}.${s.slice(0,8)}.${e} (距今${o}个小时)
|
|
547
547
|
%c${i?i+`
|
|
548
548
|
`:""}当前网站正在使用${r},此软件版权归${n}所有
|
|
549
|
-
`;N.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","468c6a33b6cf9a394b5cc013cf77153920efc031")},get info(){return l},get date(){return"2025-06-19T00:47:05.000Z"},get author(){return"suplyang"},get version(){return"3.0.8-beta.
|
|
549
|
+
`;N.copyright=Object.freeze({get owner(){return"北京西部世界科技有限公司"},get ownerlink(){return OWNERLINK_},get gituri(){return GITURI_&&GITURI_.replace("${commitId}","468c6a33b6cf9a394b5cc013cf77153920efc031")},get info(){return l},get date(){return"2025-06-19T00:47:05.000Z"},get author(){return"suplyang"},get version(){return"3.0.8-beta.8"},get name(){return"earthsdk3"},get commitId(){return"468c6a33b6cf9a394b5cc013cf77153920efc031"},print(){console.info(this.info,`
|
|
550
550
|
font-size: 18px;
|
|
551
551
|
font-weight: 1000;
|
|
552
552
|
line-height: 1;
|
|
@@ -563,4 +563,4 @@ ${B0}
|
|
|
563
563
|
color: rgb(0, 120, 215);
|
|
564
564
|
padding-bottom: 2px;
|
|
565
565
|
padding-left: 35px;
|
|
566
|
-
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[r]=N.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>nv(N.copyright),6e4),setInterval(()=>nv(N.copyright),864e5)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&N.copyright.print()}catch{console.warn("版本信息有误!")}return N.BasePropTreeItem=Ld,N.Boolean2Property=_v,N.Boolean2sProperty=Sv,N.Boolean3Property=wv,N.Boolean3sProperty=Pv,N.Boolean4Property=Ev,N.Boolean4sProperty=Cv,N.BooleanProperty=U,N.BooleansProperty=cv,N.ColorProperty=it,N.ColorRgbProperty=Nv,N.DashPatternProperty=bv,N.DateProperty=Ri,N.DatesProperty=pf,N.DragStartDataManager=f0,N.ES3DTileset=Ye,N.ESAlarm=to,N.ESApertureEffect=eo,N.ESAreaMeasurement=ro,N.ESBlastParticleSystem=no,N.ESBoxClipping=io,N.ESCameraView=ma,N.ESCameraViewCollection=va,N.ESCameraVisibleRange=so,N.ESCar=ao,N.ESCityBasePoint=ll,N.ESClassification=ya,N.ESClippingPlane=oo,N.ESCustomDiv=_a,N.ESCzml=ul,N.ESDataMesh=lo,N.ESDatasmithRuntimeModel=Ho,N.ESDirectionMeasurement=Oo,N.ESDistanceMeasurement=uo,N.ESDynamicWater=Yo,N.ESEntityCluster=al,N.ESExcavate=Ds,N.ESFireParticleSystem=ho,N.ESForestTileset=co,N.ESGaussianSplatting=dl,N.ESGeoDiv=fo,N.ESGeoDivTextPoi=ol,N.ESGeoExtrudedPolygon=xs,N.ESGeoJson=Lo,N.ESGeoLineString=hn,N.ESGeoPolygon=Ot,N.ESGeoRectangle=po,N.ESGeoVector=Et,N.ESGeoWater=Jo,N.ESGltfModel=go,N.ESHeatMap=ml,N.ESHeightLimitAnalysis=sl,N.ESHeightMeasurement=Ro,N.ESHole=jo,N.ESHuman=ts,N.ESHumanPoi=Zo,N.ESImageLabel=mo,N.ESImageryLayer=vo,N.ESJEditingMode=vt,N.ESJLonLatFormat=ap,N.ESJPickedResult=Fv,N.ESLabel=Re,N.ESLevelRuntimeModel=Bo,N.ESLocalCircle=Fo,N.ESLocalPolygon=rs,N.ESLocalPolygonZ=Go,N.ESLocalRectangle=ko,N.ESLocalSkyBox=yo,N.ESLocalVector=Ti,N.ESLocalVector2D=Yr,N.ESLocationMeasurement=_o,N.ESMsTileset=rl,N.ESNavigator=hl,N.ESObjectWithLocation=Z,N.ESObjectsManager=Ea,N.ESParticleSystemPrimitive=wo,N.ESPath=Os,N.ESPathImpl=wa,N.ESPipeFence=zo,N.ESPipeline=Qo,N.ESPipeserTileset=Vo,N.ESPit=ns,N.ESPlayer=As,N.ESPoi2D=es,N.ESPoi3D=Eo,N.ESPoiTileset=nl,N.ESPolygonFence=Uo,N.ESPolygonFlattenedPlane=So,N.ESPolygonWithHole=Wo,N.ESRectangle=qo,N.ESRtsFeatureEditing=el,N.ESRtsTileset=tl,N.ESScale=il,N.ESSceneObject=ft,N.ESSceneObjectWithId=VC,N.ESSeparateFoliage=Po,N.ESSkylineAnalysis=gl,N.ESStaticMesh=pl,N.ESSubmergingAnalysis=Co,N.ESSunshineAnalysis=Io,N.ESSurfaceAreaMeasurement=Xo,N.ESTerrainLayer=Mo,N.ESTextLabel=No,N.ESUEWidget=bo,N.ESUnrealActor=To,N.ESVideoFusion=Do,N.ESViewShed=xo,N.ESViewer=Di,N.ESViewerStatusBar=cl,N.ESViewerStatusBarScale=fl,N.ESVisibilityAnalysis=Ko,N.ESVisualObject=xt,N.ESVolumeMeasurement=$o,N.ESWidget=Ao,N.EngineObject=xa,N.EnumProperty=tt,N.EnumStringsProperty=Tv,N.EvalStringProperty=Li,N.FunctionProperty=mt,N.GroupPropTreeItem=Fd,N.GroupProperty=X,N.JsonProperty=Y,N.LeafPropTreeItem=Rd,N.LongStringProperty=Hh,N.MaximumScreenSpaceErrorProperty=uv,N.MinmaxProperty=Dv,N.NearFarScalerProperty=xv,N.NonreactiveJsonStringProperty=np,N.Number2Property=se,N.Number2sProperty=ep,N.Number3Property=Be,N.Number3sProperty=df,N.Number4Property=Lr,N.Number4WithUndefinedProperty=vv,N.Number4sProperty=yv,N.NumberProperty=C,N.NumberRangeProperty=Av,N.NumberSliderProperty=Bt,N.NumbersProperty=hv,N.ParamsProperty=rp,N.PickedInfo=Rv,N.Player=bi,N.PlayerProperty=Yh,N.PositionProperty=li,N.PositionsProperty=ip,N.PositionsSetPropety=Lv,N.PropTree=E0,N.PropUiTreeManager=xu,N.Property=Hs,N.ReactVarProperty=Rt,N.RotationProperty=Jh,N.SceneObjectFromId=Gd,N.SceneTree=Lh,N.SceneTreeContextMenu=w0,N.SceneTreeItem=Ar,N.SceneTreeItemDragDrop=_0,N.String2Property=fv,N.String2sProperty=tp,N.String3Property=dv,N.String3sProperty=gv,N.String4Property=pv,N.String4sProperty=mv,N.StringNumberProperty=Iv,N.StringNumbersProperty=Mv,N.StringProperty=nt,N.StringsProperty=jd,N.TreeItemDragDrop=d0,N.UriProperty=zu,N.ViewPlayerProperty=sp,N.ViewerCustomInteraction=tv,N.Watcher=Rh,N.WatcherTools=P0,N.WithUndefinedProperty=ff,N.addTreesCallFunc=x0,N.bindCustomEditing=m0,N.booleanPointInPolygon=l1,N.cartesianDistance=c0,N.clamp0_360=Du,N.clampN180_180=g0,N.createPropTreeFromSceneObject=S0,N.cutDownTreesCallFunc=L0,N.defaultInitSceneObjectOnCreatingFunc=wC,N.defaultLight122FromEnvironmentMapManager=Od,N.defaultUpdateSceneObjectOnPickingFunc=_C,N.equalsN3=mf,N.geoAlong=u1,N.geoArea=ld,N.geoBuffer=fm,N.geoCenterOfMass=h1,N.geoDestination=c1,N.geoDifference=dm,N.geoDistance=ud,N.geoHeading=Lc,N.geoIntersect=hm,N.geoLineIntersect=f1,N.geoNearestPointOnLine=p1,N.geoPointToLineDistance=g1,N.geoPolygonFromCircle=pm,N.geoPolygonOverlap=hd,N.geoRhumbDestination=m1,N.geoRhumbDistance=um,N.geoRhumbHeading=v1,N.geoUnion=cm,N.getDefaultValue=CC,N.getDistancesFromPositions=Oh,N.getGeoBoundingSphereFromPositions=y1,N.getMidpoint=d1,N.getMinMaxCorner=gm,N.getSceneObjectTreeItem=EC,N.getXyzFromPostion=Dd,N.growthSimulationCallFunc=R0,N.hasSameTags=p0,N.hasSameViewerTags=Ts,N.inOrderRunning=IC,N.isJSONString=PC,N.lbhToWebMerc=vC,N.lbhToXyz=ji,N.lerpAngle=Bc,N.lerpRotation=xd,N.map=lp,N.optionsStr=D0,N.reactPosition2Ds=gf,N.registerCreatedEventUpdate=XC,N.registerEventUpdate=FC,N.removeAllTreesCallFunc=A0,N.rpToap=SC,N.setSceneObjectTreeItem=Jc,N.updateTreeParamsCallFunc=O0,N.webMercToLbh=yC,N.xyzToLbh=u0,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),N}({},
|
|
566
|
+
`)}}),window.g_XE3CopyRights=window.g_XE3CopyRights||{},window.g_XE3CopyRights[r]=N.copyright,window.g_XE3SendProductUsageInfo=window.g_XE3SendProductUsageInfo||!0,window.g_XE3SendProductUsageInfo&&(setTimeout(()=>nv(N.copyright),6e4),setInterval(()=>nv(N.copyright),864e5)),window.g_earthsdk_copyright_print=window.g_earthsdk_copyright_print??!0,window.g_earthsdk_copyright_print&&N.copyright.print()}catch{console.warn("版本信息有误!")}return N.BasePropTreeItem=Ld,N.Boolean2Property=_v,N.Boolean2sProperty=Sv,N.Boolean3Property=wv,N.Boolean3sProperty=Pv,N.Boolean4Property=Ev,N.Boolean4sProperty=Cv,N.BooleanProperty=U,N.BooleansProperty=cv,N.ColorProperty=it,N.ColorRgbProperty=Nv,N.DashPatternProperty=bv,N.DateProperty=Ri,N.DatesProperty=pf,N.DragStartDataManager=f0,N.ES3DTileset=Ye,N.ESAlarm=to,N.ESApertureEffect=eo,N.ESAreaMeasurement=ro,N.ESBlastParticleSystem=no,N.ESBoxClipping=io,N.ESCameraView=ma,N.ESCameraViewCollection=va,N.ESCameraVisibleRange=so,N.ESCar=ao,N.ESCityBasePoint=ll,N.ESClassification=ya,N.ESClippingPlane=oo,N.ESCustomDiv=_a,N.ESCzml=ul,N.ESDataMesh=lo,N.ESDatasmithRuntimeModel=Ho,N.ESDirectionMeasurement=Oo,N.ESDistanceMeasurement=uo,N.ESDynamicWater=Yo,N.ESEntityCluster=al,N.ESExcavate=Ds,N.ESFireParticleSystem=ho,N.ESForestTileset=co,N.ESGaussianSplatting=dl,N.ESGeoDiv=fo,N.ESGeoDivTextPoi=ol,N.ESGeoExtrudedPolygon=xs,N.ESGeoJson=Lo,N.ESGeoLineString=hn,N.ESGeoPolygon=Ot,N.ESGeoRectangle=po,N.ESGeoVector=Et,N.ESGeoWater=Jo,N.ESGltfModel=go,N.ESHeatMap=ml,N.ESHeightLimitAnalysis=sl,N.ESHeightMeasurement=Ro,N.ESHole=jo,N.ESHuman=ts,N.ESHumanPoi=Zo,N.ESImageLabel=mo,N.ESImageryLayer=vo,N.ESJEditingMode=vt,N.ESJLonLatFormat=ap,N.ESJPickedResult=Fv,N.ESLabel=Re,N.ESLevelRuntimeModel=Bo,N.ESLocalCircle=Fo,N.ESLocalPolygon=rs,N.ESLocalPolygonZ=Go,N.ESLocalRectangle=ko,N.ESLocalSkyBox=yo,N.ESLocalVector=Ti,N.ESLocalVector2D=Yr,N.ESLocationMeasurement=_o,N.ESMsTileset=rl,N.ESNavigator=hl,N.ESObjectWithLocation=Z,N.ESObjectsManager=Ea,N.ESParticleSystemPrimitive=wo,N.ESPath=Os,N.ESPathImpl=wa,N.ESPipeFence=zo,N.ESPipeline=Qo,N.ESPipeserTileset=Vo,N.ESPit=ns,N.ESPlayer=As,N.ESPoi2D=es,N.ESPoi3D=Eo,N.ESPoiTileset=nl,N.ESPolygonFence=Uo,N.ESPolygonFlattenedPlane=So,N.ESPolygonWithHole=Wo,N.ESRectangle=qo,N.ESRtsFeatureEditing=el,N.ESRtsTileset=tl,N.ESScale=il,N.ESSceneObject=ft,N.ESSceneObjectWithId=VC,N.ESSeparateFoliage=Po,N.ESSkylineAnalysis=gl,N.ESStaticMesh=pl,N.ESSubmergingAnalysis=Co,N.ESSunshineAnalysis=Io,N.ESSurfaceAreaMeasurement=Xo,N.ESTerrainLayer=Mo,N.ESTextLabel=No,N.ESUEWidget=bo,N.ESUnrealActor=To,N.ESVideoFusion=Do,N.ESViewShed=xo,N.ESViewer=Di,N.ESViewerStatusBar=cl,N.ESViewerStatusBarScale=fl,N.ESVisibilityAnalysis=Ko,N.ESVisualObject=xt,N.ESVolumeMeasurement=$o,N.ESWidget=Ao,N.EngineObject=xa,N.EnumProperty=tt,N.EnumStringsProperty=Tv,N.EvalStringProperty=Li,N.FunctionProperty=mt,N.GroupPropTreeItem=Fd,N.GroupProperty=X,N.JsonProperty=Y,N.LeafPropTreeItem=Rd,N.LongStringProperty=Hh,N.MaximumScreenSpaceErrorProperty=uv,N.MinmaxProperty=Dv,N.NearFarScalerProperty=xv,N.NonreactiveJsonStringProperty=np,N.Number2Property=se,N.Number2sProperty=ep,N.Number3Property=Be,N.Number3sProperty=df,N.Number4Property=Lr,N.Number4WithUndefinedProperty=vv,N.Number4sProperty=yv,N.NumberProperty=C,N.NumberRangeProperty=Av,N.NumberSliderProperty=Bt,N.NumbersProperty=hv,N.ParamsProperty=rp,N.PickedInfo=Rv,N.Player=bi,N.PlayerProperty=Yh,N.PositionProperty=li,N.PositionsProperty=ip,N.PositionsSetPropety=Lv,N.PropTree=E0,N.PropUiTreeManager=xu,N.Property=Hs,N.ReactVarProperty=Rt,N.RotationProperty=Jh,N.SceneObjectFromId=Gd,N.SceneTree=Lh,N.SceneTreeContextMenu=w0,N.SceneTreeItem=Ar,N.SceneTreeItemDragDrop=_0,N.String2Property=fv,N.String2sProperty=tp,N.String3Property=dv,N.String3sProperty=gv,N.String4Property=pv,N.String4sProperty=mv,N.StringNumberProperty=Iv,N.StringNumbersProperty=Mv,N.StringProperty=nt,N.StringsProperty=jd,N.TreeItemDragDrop=d0,N.UriProperty=zu,N.ViewPlayerProperty=sp,N.ViewerCustomInteraction=tv,N.Watcher=Rh,N.WatcherTools=P0,N.WithUndefinedProperty=ff,N.addTreesCallFunc=x0,N.bindCustomEditing=m0,N.booleanPointInPolygon=l1,N.cartesianDistance=c0,N.clamp0_360=Du,N.clampN180_180=g0,N.createPropTreeFromSceneObject=S0,N.cutDownTreesCallFunc=L0,N.defaultInitSceneObjectOnCreatingFunc=wC,N.defaultLight122FromEnvironmentMapManager=Od,N.defaultUpdateSceneObjectOnPickingFunc=_C,N.equalsN3=mf,N.geoAlong=u1,N.geoArea=ld,N.geoBuffer=fm,N.geoCenterOfMass=h1,N.geoDestination=c1,N.geoDifference=dm,N.geoDistance=ud,N.geoHeading=Lc,N.geoIntersect=hm,N.geoLineIntersect=f1,N.geoNearestPointOnLine=p1,N.geoPointToLineDistance=g1,N.geoPolygonFromCircle=pm,N.geoPolygonOverlap=hd,N.geoRhumbDestination=m1,N.geoRhumbDistance=um,N.geoRhumbHeading=v1,N.geoUnion=cm,N.getDefaultValue=CC,N.getDistancesFromPositions=Oh,N.getGeoBoundingSphereFromPositions=y1,N.getMidpoint=d1,N.getMinMaxCorner=gm,N.getSceneObjectTreeItem=EC,N.getXyzFromPostion=Dd,N.growthSimulationCallFunc=R0,N.hasSameTags=p0,N.hasSameViewerTags=Ts,N.inOrderRunning=IC,N.isJSONString=PC,N.lbhToWebMerc=vC,N.lbhToXyz=ji,N.lerpAngle=Bc,N.lerpRotation=xd,N.map=lp,N.optionsStr=D0,N.reactPosition2Ds=gf,N.registerCreatedEventUpdate=XC,N.registerEventUpdate=FC,N.removeAllTreesCallFunc=A0,N.rpToap=SC,N.setSceneObjectTreeItem=Jc,N.updateTreeParamsCallFunc=O0,N.webMercToLbh=yC,N.xyzToLbh=u0,Object.defineProperty(N,Symbol.toStringTag,{value:"Module"}),N}({},xbsj_base);
|
package/dist/earthsdk3.js
CHANGED
|
@@ -37302,7 +37302,7 @@ function cp(n) {
|
|
|
37302
37302
|
}
|
|
37303
37303
|
let $l;
|
|
37304
37304
|
try {
|
|
37305
|
-
const n = "earthsdk3", e = "3.0.8-beta.
|
|
37305
|
+
const n = "earthsdk3", e = "3.0.8-beta.8", t = "2025-06-19T00:47:05.000Z", r = "北京西部世界科技有限公司", i = "地球可视化实验室 (EarthSDK&CesiumLab) https://www.bjxbsj.cn", s = "468c6a33b6cf9a394b5cc013cf77153920efc031", a = ((Date.now() - 1750294025e3) / 36e5).toFixed(1), l = `%c🌏 ${n}%c ${e}.${s.slice(0, 8)}.${t} (距今${a}个小时)
|
|
37306
37306
|
%c${i ? i + `
|
|
37307
37307
|
` : ""}当前网站正在使用${n},此软件版权归${r}所有
|
|
37308
37308
|
`;
|
|
@@ -37332,7 +37332,7 @@ try {
|
|
|
37332
37332
|
},
|
|
37333
37333
|
// @ts-ignore
|
|
37334
37334
|
get version() {
|
|
37335
|
-
return "3.0.8-beta.
|
|
37335
|
+
return "3.0.8-beta.8";
|
|
37336
37336
|
},
|
|
37337
37337
|
// @ts-ignore
|
|
37338
37338
|
get name() {
|