leiting-bim 2.1.69 → 2.1.71
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.
Potentially problematic release.
This version of leiting-bim might be problematic. Click here for more details.
- package/leiting-bim.es.js +1 -1
- package/leiting-bim.umd.js +1 -1
- package/package.json +1 -1
- package/plugins/cesium-core/dist/cesium-core.mjs +20 -20
- package/plugins/cesium-core/dist/cesium-core.mjs.map +1 -1
- package/plugins/cesium-core/dist/cesium-core.umd.js +2 -2
- package/plugins/cesium-core/dist/cesium-core.umd.js.map +1 -1
- package/plugins/cesium-core/package.json +1 -1
- package/plugins/cesium-vue/dist/cesium-vue/src/components/basic-audio/index.d.ts +13 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/basic-video/index.d.ts +98 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/card-carousel/index.d.ts +147 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/card-content/index.d.ts +16 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/card-page/index.d.ts +64 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/carousel-img/index.d.ts +34 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/echarts-pro/index.d.ts +63 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/marker-bubble/index.d.ts +73 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/marker-default/index.d.ts +43 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/marker-html/index.d.ts +43 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/marker-manage/index.d.ts +159 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/marker-text/index.d.ts +25 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/measurement/index.d.ts +73 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/components/position-picker/index.d.ts +58 -0
- package/plugins/cesium-vue/dist/cesium-vue/src/index.d.ts +46 -0
- package/plugins/cesium-vue/dist/components/basic-audio.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/basic-audio.js.map +1 -1
- package/plugins/cesium-vue/dist/components/basic-video.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/basic-video.js.map +1 -1
- package/plugins/cesium-vue/dist/components/card-carousel.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/card-carousel.js.map +1 -1
- package/plugins/cesium-vue/dist/components/card-content.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/card-content.js.map +1 -1
- package/plugins/cesium-vue/dist/components/card-page.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/card-page.js.map +1 -1
- package/plugins/cesium-vue/dist/components/carousel-img.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/carousel-img.js.map +1 -1
- package/plugins/cesium-vue/dist/components/echarts-pro.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/marker-bubble.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/marker-bubble.js.map +1 -1
- package/plugins/cesium-vue/dist/components/marker-default.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/marker-default.js.map +1 -1
- package/plugins/cesium-vue/dist/components/marker-html.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/marker-html.js.map +1 -1
- package/plugins/cesium-vue/dist/components/marker-manage.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/marker-manage.js +211 -194
- package/plugins/cesium-vue/dist/components/marker-manage.js.map +1 -1
- package/plugins/cesium-vue/dist/components/marker-text.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/marker-text.js.map +1 -1
- package/plugins/cesium-vue/dist/components/measurement.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/measurement.js.map +1 -1
- package/plugins/cesium-vue/dist/components/position-picker.d.ts +3 -3
- package/plugins/cesium-vue/dist/components/position-picker.js.map +1 -1
- package/plugins/cesium-vue/dist/index-CUs_hd1V.js.map +1 -1
- package/plugins/cesium-vue/dist/index-Kdqw0FJN.js.map +1 -1
- package/plugins/cesium-vue/dist/index.d.ts +6 -46
- package/plugins/cesium-vue/dist/index.js.map +1 -1
- package/plugins/cesium-vue/package.json +4 -4
- package/plugins/theme-chalk/package.json +1 -1
- package/plugins/utils/package.json +1 -1
package/leiting-bim.umd.js
CHANGED
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
// 通常不需要 clamp,除非开启 HDR 后期望超亮,但负值需要避免
|
|
116
116
|
material.diffuse = max(material.diffuse, vec3(0.0));
|
|
117
117
|
}
|
|
118
|
-
`});p.isModelAdjustment=!0,f.customShader=p}else e.brightness!==void 0&&e.brightness!==1&&!f.style&&(f.style=new i.Cesium3DTileStyle({color:`color('white') * ${e.brightness}`}))}}setModelBrightness(e){this.setModelColorAdjustment({brightness:e})}_defaultSkyBox=null;_updateLightDirection=e=>{e.light instanceof this.cesium.DirectionalLight&&(e.light.direction=e.camera.directionWC)};setEnvironmentMapEnable(e){this.is2d||(e?(this.viewer.scene.light=new this.cesium.DirectionalLight({direction:this.viewer.scene.camera.directionWC}),this.viewer.scene.preRender.addEventListener(this._updateLightDirection)):(this._defaultSkyBox&&(this.viewer.scene.skyBox=this._defaultSkyBox),this.viewer.scene.preRender.removeEventListener(this._updateLightDirection),this.viewer.scene.light=new this.cesium.SunLight),this.viewer.scene.imageBasedLighting&&(this.viewer.scene.imageBasedLighting.imageBasedLightingFactor=e?new this.cesium.Cartesian2(2,2):new this.cesium.Cartesian2(1,1)))}setAmbientOcclusion(e){if(this.is2d)return;const t=this.viewer.scene;if(!t||!t.postProcessStages||!t.postProcessStages.ambientOcclusion)return;const i=t.postProcessStages.ambientOcclusion;i.enabled=e,e&&(i.uniforms.ambientOcclusionOnly=!1,i.uniforms.intensity=3,i.uniforms.bias=.1,i.uniforms.lengthCap=.03,i.uniforms.stepSize=1,i.uniforms.blurStepSize=.86)}setCollisionDetection(e){if(this.is2d){this.viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1;return}const t=this.viewer.scene.screenSpaceCameraController;t.enableCollisionDetection=e,e||t.minimumZoomDistance<1&&(t.minimumZoomDistance=1)}setMouseHabit(e){if(this.is2d)return;const t=this.viewer.scene.screenSpaceCameraController;t.enableTranslate=!0,t.enableRotate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!1,t.lookEventTypes=[],e===1?(t.rotateEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.MIDDLE_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.LEFT_DRAG]):(t.rotateEventTypes=[this.cesium.CameraEventType.LEFT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.MIDDLE_DRAG])}}class L0{cesium;viewer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer}getCameraView(){const e=this.viewer.camera;return{position:{x:e.position.x,y:e.position.y,z:e.position.z},destination:{x:e.position.x,y:e.position.y,z:e.position.z},orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},duration:1}}flyToCameraView(e){const{position:t,orientation:i,duration:s}=e,o=new this.cesium.Cartesian3(t.x,t.y,t.z),r=new this.cesium.HeadingPitchRoll(i.heading,i.pitch,i.roll);!s||s<=0?this.viewer.camera.setView({destination:o,orientation:r}):this.viewer.camera.flyTo({destination:o,orientation:r,duration:s})}getCurrentCameraPositionAndTarget(){const e=this.getCameraView();return{position:e.position,target:{heading:e.orientation.heading,pitch:e.orientation.pitch,roll:e.orientation.roll},duration:e.duration}}setCameraView(e){const t=e.target||e.orientation||{};this.flyToCameraView({position:{x:Number(e.position.x),y:Number(e.position.y),z:Number(e.position.z)},destination:{x:Number(e.position.x),y:Number(e.position.y),z:Number(e.position.z)},orientation:{heading:Number(t.heading||0),pitch:Number(t.pitch||0),roll:Number(t.roll||0)},duration:e.duration})}}function N0(n){const{container:e,appContext:t,methods:i,viewerOptions:s,options:o,callbacks:r}=n,l=new gi,a=window.Cesium;if(!a)throw new Error("Cesium is not loaded");e.id=`cesium-container-${Pg()}`;const c={animation:!1,timeline:!1,infoBox:!1,homeButton:!1,fullscreenButton:!1,sceneModePicker:!1,navigationHelpButton:!1,geocoder:!1,baseLayerPicker:!1,selectionIndicator:!1,creditContainer:document.createElement("div"),contextOptions:{webgl:{alpha:!0}}},u=t?.config?.globalProperties?.$leitingBimOptions,f={...c,...u?.viewerOptions??{},...s??{}},p=new a.Viewer(e,f);p.camera.setView({destination:a.Cartesian3.fromDegrees(108,32,1e7),orientation:{heading:a.Math.toRadians(0),pitch:a.Math.toRadians(-90),roll:0}});let h=i;if(!h&&u&&(u.methods||(u.methods={}),h=u.methods),h){const A=new Wg({cesium:a,viewer:p,options:o,callbacks:r}),C=new ka({cesium:a,viewer:p}),m=new O0({cesium:a,viewer:p}),y=new zg({cesium:a,viewer:p}),E=new L0({cesium:a,viewer:p});let I;const S=new nc({cesium:a,viewer:p});o&&(o.globe!==void 0&&m.setGlobeEnvironmentVisible(o.globe),o.terrain!==void 0&&m.setTerrainEnable(o.terrain),o.depthTest!==void 0&&m.setDepthTestEnable(o.depthTest),o.mapProvider&&o.mode!=="2d"&&m.changeBaseMap(o.mapProvider,{token:o.tiandituToken,layerType:o.tiandituLayerType,showAnnotation:o.tiandituShowLabel,url:o.arcgisUrl}),o.shadows!==void 0&&m.setShadowsEnable(o.shadows),o.environmentMap!==void 0&&m.setEnvironmentMapEnable(o.environmentMap),o.ambientOcclusion!==void 0&&m.setAmbientOcclusion(o.ambientOcclusion),o.time!==void 0&&m.setTime(o.time),o.brightness!==void 0&&m.setModelBrightness(o.brightness),o.backgroundColor!==void 0&&m.setBackgroundColor(o.backgroundColor),o.collision!==void 0&&m.setCollisionDetection(o.collision),o.mouseHabit!==void 0&&m.setMouseHabit(o.mouseHabit)),o&&o.mode==="2d"&&(console.log("InitMap: Setting CAD Mode 2D"),m.setCadMode("2d"),I=new tc({cesium:a,viewer:p})),C.events.on("tilesetLoaded",g=>{A.baseCompt.attachTileset(g,A.baseCompt.selectedColor),A.baseSection.attachTileset(g,g.leiting?.model?.modelId),h&&h.tilesLoad3dTiles&&h.tilesLoad3dTiles(g),o?.tilesLoad3dTiles&&o.tilesLoad3dTiles(g.leiting)}),C.events.on("loadingStatus",g=>{h&&h.onLoadingStatus&&h.onLoadingStatus(g)}),C.events.on("mountAll3Dtiles",({modelList:g,mapTileset:R})=>{o?.mountAll3Dtiles&&o.mountAll3Dtiles(g),h?.mountAll3Dtiles&&h.mountAll3Dtiles(R)}),y.events.on("mountAllCad",g=>{o?.mountAllCad&&o.mountAllCad(g),h?.mountAllCad&&h.mountAllCad(g)}),A.baseCompt.loadNodeDetailsForModel=g=>C.loadNodeDetailsForModel(g),A.baseCompt.selectionChange(g=>{g.length!==0&&(o?.selectionChange&&o.selectionChange(g),h?.selectionChange&&h.selectionChange(g))}),h.onSearchComponent=g=>{o?.searchComponent&&o.searchComponent(g),h?.searchComponent&&h.searchComponent(g)};const k=h.saveRegion;h.saveRegion=g=>{o?.saveRegion&&o.saveRegion(g),k&&k!==o?.saveRegion&&k(g)};const B=h.saveCadCalibration;h.saveCadCalibration=g=>{o?.saveCadCalibration&&o.saveCadCalibration(g),B&&B!==o?.saveCadCalibration&&B(g)};const x=h.saveCadRegion;h.saveCadRegion=g=>{o?.saveCadRegion&&o.saveCadRegion(g),x&&x!==o?.saveCadRegion&&x(g)},h.getCesium=()=>a,h.getViewer=()=>p,h.getAnnotationInstance=()=>I,h.getMeasureInstance=()=>S,h.flyToCamera=g=>{E.setCameraView(g)},h.flyTo=h.flyToCamera,h.addDebugPoint=(g,R,M=0)=>{p.entities.add({position:a.Cartesian3.fromDegrees(g,R,M),point:{pixelSize:10,color:a.Color.RED}})},h.addPoint=h.addDebugPoint,h.toggleDebugLabels=()=>A.enableTestLabel(),h.enableTestLabel=h.toggleDebugLabels,h.setCanvasBackground=g=>m.setBackgroundColor(g),h.setBackgroundColor=h.setCanvasBackground,h.setAntiAliasing=g=>A.enableCesiumFXAA(g),h.enableCesiumFXAA=h.setAntiAliasing,h.setSceneVisibility=g=>A.setSceneOptions(g),h.setSceneOptions=h.setSceneVisibility,h.getCameraState=()=>E.getCameraView(),h.getCameraInfo=h.getCameraState,h.restoreCameraState=g=>E.flyToCameraView(g),h.flyToCameraView=h.restoreCameraState,h.getCameraPositionTarget=()=>E.getCurrentCameraPositionAndTarget(),h.getCurrentCameraPositionAndTarget=h.getCameraPositionTarget,h.setCameraLookAt=g=>E.setCameraView(g),h.setCameraView=h.setCameraLookAt,h.captureScreenshot=()=>{const g=p.scene.canvas;return p.render(),g.toDataURL("image/png")},h.getImageBase64=h.captureScreenshot,h.captureDomScreenshot=(g,R)=>A.getSnapDomSImageBase64(g,R),h.getSnapDomSImageBase64=h.captureDomScreenshot,h.addModels=g=>C.addModels(g),h.add3DtilesModel=h.addModels,h.addObliquePhotography=g=>C.addOSGB(g),h.addOSGB=h.addObliquePhotography,h.adjustOSGBModelMatrix=g=>C.updateOSGBMatrix(g),h.updateOSGBMatrix=h.adjustOSGBModelMatrix,h.setModelVisibility=g=>C.showModels(g),h.showModels=h.setModelVisibility,h.showTileset=h.setModelVisibility,h.removeModels=g=>C.deleteModels(g),h.deleteModels=h.removeModels,h.clearAllModels=()=>{C.deleteAllModels(),l.emit("deleteAllModels")},h.deleteAllModelList=h.clearAllModels,h.deleteAllModels=h.clearAllModels,h.flyToModel=g=>C.flyToTileset(g),h.flyToTileset=h.flyToModel,h.flyToByModelId=h.flyToModel,h.setModelBrightness=g=>A.updateModelEffect(g),h.updateModelEffect=h.setModelBrightness,h.getAllTilesets=()=>C.getMapTileset(),h.getMapTileset=h.getAllTilesets,h.getCurrentModelId=()=>C.getBIMmodelId(),h.getBIMmodelId=h.getCurrentModelId,h.getLoadedModels=()=>C.getModelList(),h.getModelList=h.getLoadedModels,h.loadModelStructure=async g=>{const R=typeof g=="string"?g:g?.modelId;if(!R){console.warn("loadModelStructure: modelId is required");return}return await C.loadTreeForModel(R)},h.loadTreeForModel=h.loadModelStructure,h.loadModelDetails=async g=>{const R=typeof g=="string"?g:g?.modelId;if(!R){console.warn("loadModelDetails: modelId is required");return}return await C.loadNodeDetailsForModel(R)},h.loadNodeDetailsForModel=h.loadModelDetails,h.setMapTileset=g=>C.setMapTileset(g),h.setCurrentModelId=g=>C.setBIMmodelId(g),h.setBIMmodelId=h.setCurrentModelId,h.setModelList=g=>C.setModelList(g),h.highlightComponents=(g,R={})=>A.baseCompt.setSelectColorUserModelCpt(g,R),h.setSelectColorUserModelCpt=h.highlightComponents,A.baseCompt.setLoadNodeDetailsCallback(g=>C.loadNodeDetailsForModel(g)),h.highlightAllComponents=g=>A.baseCompt.setAllSelectColorUserModelCpt(g),h.setAllSelectColorUserModelCpt=h.highlightAllComponents,h.setSelectColorUserModelCptByClear=()=>A.baseCompt.clearAllHaveSelected(),h.clearSelectColorUserModelCpt=()=>A.baseCompt.clearAllHaveSelected(),h.selectComponents=(g,R)=>A.baseCompt.setSelectColorUserModelCpt(g,R??{rank:0}),h.setSelecteds=h.selectComponents,h.setSelectionColor=(g,R,M,F)=>A.baseCompt.setSelectedColorRgba(g,R,M,F),h.setSelectedColor=h.setSelectionColor,h.clearSelection=()=>A.baseCompt.clearAllHaveSelected(),h.clearAllHaveSelected=h.clearSelection,h.getSelectedComponents=g=>A.baseCompt.getSelected(g),h.getSelected=h.getSelectedComponents,h.onSelectionChange=g=>{A.baseCompt.selectionChange(g)},h.selectionChange=h.onSelectionChange,h.flyToComponents=g=>A.baseCompt.flyToObjects(g),h.flyToObjects=h.flyToComponents,h.setConstructionData=async g=>{if(g&&Array.isArray(g)){const R=new Set;g.forEach(M=>{M.mergeCpts&&Array.isArray(M.mergeCpts)&&M.mergeCpts.forEach(F=>{F.modelId&&R.add(F.modelId)})}),R.size>0&&await Promise.all(Array.from(R).map(M=>h.loadNodeDetailsForModel(M)))}A.baseCompt.setAllConstructionProgressTracking(g)},h.setAllConstructionProgressTracking=h.setConstructionData,h.startConstructionSimulation=()=>A.baseCompt.enableConstructionProgressTracking(),h.enableAllConstructionProgressTracking=h.startConstructionSimulation,h.stopConstructionSimulation=()=>A.baseCompt.disableConstructionProgressTracking(),h.disableConstructionProgressTracking=h.stopConstructionSimulation,h.disableAllConstructionProgressTracking=h.stopConstructionSimulation,h.resetConstructionSimulation=()=>A.baseCompt.freshConstructionProgressTracking(),h.freshConstructionProgressTracking=h.resetConstructionSimulation,h.restartConstructionSimulation=()=>A.baseCompt.reStartAnimation(),h.reStartAnimation=h.restartConstructionSimulation,h.resumeFlyTo=()=>A.baseCompt.resumeFlyTo(),h.pauseConstructionSimulation=()=>A.baseCompt.pauseFlyTo(),h.pauseFlyTo=h.pauseConstructionSimulation,h.pauseAnimation=h.pauseConstructionSimulation,h.resumeConstructionSimulation=()=>A.baseCompt.resumeFlyTo(),h.resumeAnimation=h.resumeConstructionSimulation,h.setComponentsVisibility=g=>A.baseCompt.setComponentVisibility(g),h.setElementsListVisible=h.setComponentsVisibility,h.setAllComponentsVisibility=g=>A.baseCompt.setAllComponentsVisibility(g),h.setAllElementsVisible=h.setAllComponentsVisibility,h.getComponentsByVisibility=g=>A.baseCompt.getComponentsByVisibility(g),h.getShowCpts=g=>A.baseCompt.getComponentsByVisibility(g),h.getElementsVisible=h.getComponentsByVisibility,h.setComponentVisibility=h.setComponentsVisibility,h.enableSectioning=(g,R)=>A.baseSection.open(g,R),h.openSection=h.enableSectioning,h.disableSectioning=g=>A.baseSection.close(g),h.closeSection=h.disableSectioning,h.updateSectionBox=g=>A.baseSection.updateRange(g),h.updateSectionRange=h.updateSectionBox,h.getSectionBox=()=>A.baseSection.getRange(),h.getSectionRange=h.getSectionBox,h.fitSectionToModel=()=>A.baseSection.fitToModels(),h.fitToModels=h.fitSectionToModel,h.setSectionBoxVisibility=g=>A.baseSection.setBoxVisibility(g),h.startFirstPersonMode=()=>{A.baseCompt.disableSelection(),A.basePlayer.openPlayer()},h.openPlayer=h.startFirstPersonMode,h.stopFirstPersonMode=()=>{A.basePlayer.closePlayer(),A.baseCompt.enableSelection()},h.closePlayer=h.stopFirstPersonMode,h.setPlayerPosition=g=>A.basePlayer.setPersonPosition(g),h.setPersonPosition=h.setPlayerPosition,h.setWalkSpeed=g=>A.basePlayer.setSpeed({speed:g}),h.setPlayerSpeed=h.setWalkSpeed,h.setPlayerConfig=g=>A.basePlayer.setParams(g),h.setPlayerParams=h.setPlayerConfig,h.setPlayerAction=(g,R)=>A.basePlayer.setMoveState(g,R),h.setPlayerMoveState=h.setPlayerAction,h.bindPlayerControls=g=>A.basePlayer.bindUiKeys(g),h.bindPlayerUiKeys=h.bindPlayerControls,h.setGlobeVisibility=g=>m.setGlobeEnvironmentVisible(g),h.setGlobeEnvironmentVisible=h.setGlobeVisibility,h.setTerrainVisibility=g=>m.setTerrainEnable(g),h.setTerrainEnable=h.setTerrainVisibility,h.setDepthTest=g=>m.setDepthTestEnable(g),h.setDepthTestEnable=h.setDepthTest,h.setBaseMap=(g,R)=>m.changeBaseMap(g,R),h.changeBaseMap=h.setBaseMap,h.setShadowVisibility=g=>m.setShadowsEnable(g),h.setShadowsEnable=h.setShadowVisibility,h.setEnvironmentMapVisibility=g=>m.setEnvironmentMapEnable(g),h.setEnvironmentMapEnable=h.setEnvironmentMapVisibility,h.setAOVisibility=g=>m.setAmbientOcclusion(g),h.setAmbientOcclusion=h.setAOVisibility,h.setBackgroundColor=g=>m.setGlobeColor(g),h.setGlobeColor=h.setBackgroundColor,h.setWorldTime=g=>m.setTime(g),h.setTime=h.setWorldTime,h.setModelBrightness=g=>m.setModelBrightness(g),h.adjustModelColor=g=>m.setModelColorAdjustment(g),h.setModelColorAdjustment=h.adjustModelColor,h.setShadowIntensity=g=>{m.setShadowDarkness?m.setShadowDarkness(g):console.warn("baseSetting.setShadowDarkness is not available. Please reload the page.")},h.setShadowDarkness=h.setShadowIntensity,h.switchSceneMode=async g=>{const R=g?"2d":"3d";await m.setCadMode(R),g&&!I&&(I=new tc({cesium:a,viewer:p})),l.emit("setMode",R)},h.setSceneMode=h.switchSceneMode,h.set2d=g=>h.switchSceneMode(g),h.is2dMode=()=>m.is2d,h.setMouseControlMode=g=>m.setMouseHabit(g),h.setMouseHabit=h.setMouseControlMode,h.setCollisionEnabled=g=>m.setCollisionDetection(g),h.setCollisionDetection=h.setCollisionEnabled,h.searchAndLocate=(g,R)=>m.searchLocation(g,R),h.searchLocation=h.searchAndLocate,h.setGisOptions=g=>{g.globe!==void 0&&m.setGlobeEnvironmentVisible(g.globe),g.elevation!==void 0&&m.setTerrainEnable(g.elevation),g.depthTestAgainstTerrain!==void 0&&m.setDepthTestEnable(g.depthTestAgainstTerrain),g.rendering!==void 0&&m.setAmbientOcclusion(g.rendering)},h.getConfigure=()=>(console.warn("getConfigure is not initialized. Please ensure LeitingSetting component is mounted."),{}),h.setConfigure=g=>{console.warn("setConfigure is not initialized. Please ensure LeitingSetting component is mounted.",g)},h.addCadModel=g=>{const R={...g};return R.files&&!R.fileNames&&(R.fileNames=R.files),R.fileNames||(R.fileNames=[]),y.addDxfModel(R)},h.addDxfModel=h.addCadModel,h.deleteCad=g=>y.deleteCad(g),h.deleteAllCad=()=>y.deleteAllCad(),h.showCadModel=g=>y.showJson(g),h.showDxfModel=h.showCadModel,h.showCadLayer=g=>y.showJsonByLayer(g),h.showDxfLayer=h.showCadLayer,h.flyToCadModel=(g={})=>y.flyToCadModel(g),h.getCadModels=g=>y.getDxfModels(g),h.getDxfModels=h.getCadModels,h.getCadLayers=g=>y.getMapLayers(g),h.getDxfLayers=h.getCadLayers,h.getCadModelId=()=>y.getModelId(),h.setCadOpen=g=>y.setDxfOpen(g),h.setDxfOpen=h.setCadOpen,h.getCadOpen=()=>y.getDxfOpen(),h.getDxfOpen=h.getCadOpen,h.adjustCadModel=g=>y.adjustingModelByCad(g),h.adjustingModelByCad=h.adjustCadModel,h.saveAnnotations=()=>{let g=null;return I&&(g=I.saveAnnotations()),o?.saveAnnotations&&o.saveAnnotations(g),g},h.loadAnnotations=g=>I?I.loadAnnotations(g):!1,h.flyToTopView=()=>{y.flyToCadModel()},h.menuEvents=l,h.addMenuItems=g=>{l.emit("insertMenu",g)},h.insertMenu=h.addMenuItems,h.filterMenuItems=g=>{l.emit("setMenuListFilter",g)},h.setMenuListFilter=h.filterMenuItems,h.setMenuVisibility=g=>{l.emit("showMenu",g)},h.showMenu=h.setMenuVisibility,h.setPanelVisibility=(g,R)=>{l.emit("setMenuActive",g,R)},h.setMenuActive=h.setPanelVisibility,h.addContextMenuItems=g=>{console.warn("addContextMenuItems is not initialized yet. Please wait for LeitingBIM component to mount.",g)},h.insertContextMenu=h.addContextMenuItems,h.removeContextMenuItems=g=>{console.warn("removeContextMenuItems is not initialized yet.",g)},h.deleteContextMenu=h.removeContextMenuItems,h.closeContextMenu=()=>{console.warn("closeContextMenu is not initialized yet.")},h.hideContextMenu=h.closeContextMenu,h.getModelTree=()=>{const g=[],R=C.getMapTileset();return Object.keys(R).forEach(M=>{const F=R[M];if(F&&F.leiting&&F.leiting.tree){const L=F.leiting.tree;Array.isArray(L)?g.push(...L):g.push(L)}}),g},h.getTree=h.getModelTree,h.getAllComponentDetails=()=>{const g=C.getMapTileset(),R={},M=[];try{Object.keys(g).forEach(F=>{const L=g[F];if(!L||!L.leiting)return;const G=L.leiting,N=G.node,v=G.model.formData,w=G.box;if(!N||!N.nodeExtras)return;const b=G.model.modelId;R[b]=N.nodeExtras;const T=N.nodeExtras.element;if(!T)return;const P=w?w.center:{x:0,y:0,z:0};Object.values(T).forEach(_=>{if(_.box3)try{const O=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(v.totalRotation||0)),D=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(O),new a.Cartesian3(0,0,0)),U=a.Cartesian3.fromDegrees(v.longitude,v.latitude,v.height),V=a.Transforms.eastNorthUpToFixedFrame(U);a.Matrix4.multiply(V,D,V);const $=new a.Cartesian3(P.x,P.y,0),X=new a.Cartesian3;a.Matrix4.multiplyByPoint(V,$,X);const ne=a.Cartographic.fromCartesian(X),se=_.box3?.Center?.x||0,oe=_.box3?.Center?.y||0,Y=_.box3?.Center?.z||0,z=new a.Cartesian3(-P.x+se,-P.y+oe,0+Y),J=a.Matrix4.fromTranslation(z),re=a.Matrix4.clone(J);a.Matrix4.multiply(D,re,re);const ae=a.Cartesian3.fromDegrees(ne.longitude/Math.PI*180,ne.latitude/Math.PI*180,v.height),le=a.Transforms.eastNorthUpToFixedFrame(ae);a.Matrix4.multiply(le,re,le);const he=a.Cartographic.fromCartesian(new a.Cartesian3(le[12],le[13],le[14]));_.box3.cartographic={longitude:he.longitude/Math.PI*180,latitude:he.latitude/Math.PI*180,height:he.height};const Me={id:_.uniqueId,billboard:[{theme:"Tag9999",position:[_.box3.cartographic.longitude,_.box3.cartographic.latitude,_.box3.cartographic.height],options:{text:_.name}}]};M.push(Me)}catch(O){console.warn("Error calculating component position:",O)}})})}catch(F){console.error("getAllComponents error:",F)}return R},h.getAllComponents=h.getAllComponentDetails,h.getComponentInfoList=g=>{if(!Array.isArray(g))return[];const R=C.getMapTileset(),M=[],F={};g.forEach(L=>{!L.modelId||!L.elementId||(F[L.modelId]||(F[L.modelId]=[]),F[L.modelId]?.push(L.elementId))});try{Object.keys(F).forEach(L=>{const G=R[L];if(!G||!G.leiting)return;const N=G.leiting,v=N.node,w=N.model.formData,b=N.box;if(!v||!v.nodeExtras)return;const T=v.nodeExtras.element;if(!T)return;const P=b?b.center:{x:0,y:0,z:0};F[L]?.forEach(_=>{const O=T[_];if(O&&O.box3)try{const D=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(w.totalRotation||0)),U=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(D),new a.Cartesian3(0,0,0)),V=a.Cartesian3.fromDegrees(w.longitude,w.latitude,w.height),$=a.Transforms.eastNorthUpToFixedFrame(V);a.Matrix4.multiply($,U,$);const X=new a.Cartesian3(P.x,P.y,0),ne=new a.Cartesian3;a.Matrix4.multiplyByPoint($,X,ne);const se=a.Cartographic.fromCartesian(ne),oe=O.box3?.Center?.x||0,Y=O.box3?.Center?.y||0,z=O.box3?.Center?.z||0,J=new a.Cartesian3(-P.x+oe,-P.y+Y,0+z),re=a.Matrix4.fromTranslation(J),ae=a.Matrix4.clone(re);a.Matrix4.multiply(U,ae,ae);const le=a.Cartesian3.fromDegrees(se.longitude/Math.PI*180,se.latitude/Math.PI*180,w.height),he=a.Transforms.eastNorthUpToFixedFrame(le);a.Matrix4.multiply(he,ae,he);const Me=a.Cartographic.fromCartesian(new a.Cartesian3(he[12],he[13],he[14]));O.box3.cartographic={longitude:Me.longitude/Math.PI*180,latitude:Me.latitude/Math.PI*180,height:Me.height},O.elementId=_,O.modelId=L,M.push(O)}catch(D){console.warn("Error calculating component position:",D)}})})}catch(L){console.error("getCptInfos error:",L)}return M},h.getCptInfos=h.getComponentInfoList,h.baseCompt=A.baseCompt,window.Methods=h}return console.log("methods",h),{Cesium:a,viewer:p,methods:h,menuEvents:l}}function co(n){return d.getCurrentScope()?(d.onScopeDispose(n),!0):!1}function uo(n){return typeof n=="function"?n():d.unref(n)}const U0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _0=Object.prototype.toString,Q0=n=>_0.call(n)==="[object Object]",H0=()=>{};function G0(n){return d.getCurrentInstance()}function ic(n,e=!0,t){G0()?d.onMounted(n,t):e?n():d.nextTick(n)}function Nt(n){var e;const t=uo(n);return(e=t?.$el)!=null?e:t}const Ln=U0?window:void 0;function Y0(...n){let e,t,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,s]=n,e=Ln):[e,t,i,s]=n,!e)return H0;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},l=(u,f,p,h)=>(u.addEventListener(f,p,h),()=>u.removeEventListener(f,p,h)),a=d.watch(()=>[Nt(e),uo(s)],([u,f])=>{if(r(),!u)return;const p=Q0(f)?{...f}:f;o.push(...t.flatMap(h=>i.map(A=>l(u,h,A,p))))},{immediate:!0,flush:"post"}),c=()=>{a(),r()};return co(c),c}function V0(){const n=d.ref(!1),e=d.getCurrentInstance();return e&&d.onMounted(()=>{n.value=!0},e),n}function sc(n){const e=V0();return d.computed(()=>(e.value,!!n()))}function W0(n,e={}){const{window:t=Ln}=e,i=sc(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let s;const o=d.ref(!1),r=c=>{o.value=c.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},a=d.watchEffect(()=>{i.value&&(l(),s=t.matchMedia(uo(n)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return co(()=>{a(),l(),s=void 0}),o}function z0(n,e,t={}){const{window:i=Ln,...s}=t;let o;const r=sc(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},a=d.computed(()=>Array.isArray(n)?n.map(f=>Nt(f)):[Nt(n)]),c=d.watch(a,f=>{if(l(),r.value&&i){o=new ResizeObserver(e);for(const p of f)p&&o.observe(p,s)}},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return co(u),{isSupported:r,stop:u}}function j0(n,e={width:0,height:0},t={}){const{window:i=Ln,box:s="content-box"}=t,o=d.computed(()=>{var f,p;return(p=(f=Nt(n))==null?void 0:f.namespaceURI)==null?void 0:p.includes("svg")}),r=d.ref(e.width),l=d.ref(e.height),{stop:a}=z0(n,([f])=>{const p=s==="border-box"?f.borderBoxSize:s==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&o.value){const h=Nt(n);if(h){const A=h.getBoundingClientRect();r.value=A.width,l.value=A.height}}else if(p){const h=Array.isArray(p)?p:[p];r.value=h.reduce((A,{inlineSize:C})=>A+C,0),l.value=h.reduce((A,{blockSize:C})=>A+C,0)}else r.value=f.contentRect.width,l.value=f.contentRect.height},t);ic(()=>{const f=Nt(n);f&&(r.value="offsetWidth"in f?f.offsetWidth:e.width,l.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=d.watch(()=>Nt(n),f=>{r.value=f?e.width:0,l.value=f?e.height:0});function u(){a(),c()}return{width:r,height:l,stop:u}}function $0(n={}){const{window:e=Ln,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0}=n,r=d.ref(t),l=d.ref(i),a=()=>{e&&(o?(r.value=e.innerWidth,l.value=e.innerHeight):(r.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight))};if(a(),ic(a),Y0("resize",a,{passive:!0}),s){const c=W0("(orientation: portrait)");d.watch(c,()=>a())}return{width:r,height:l}}const K0={class:"title"},q0={class:"actions"},X0={class:"card-body"},J0=d.defineComponent({__name:"LeitingDraggableCard",props:{visible:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},title:{type:String,default:"Title"},initialPosition:{type:Object,default:()=>({x:0,y:0})},width:{type:[Number,String],default:300},minWidth:{type:Number,default:200},fullHeight:{type:Boolean,default:!1},align:{type:String,default:""}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=e,o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:S=>{s("update:visible",S),s("update:open",S)}}),r=d.ref(null),l=d.ref(t.initialPosition?.x||0),a=d.ref(t.initialPosition?.y||0),c=d.ref(t.width),u=d.ref(t.fullHeight?"100%":"600px");d.watch(()=>t.fullHeight,S=>{S?u.value="100%":u.value==="100%"&&(u.value="600px")});const{height:f}=$0();d.watch(f,()=>{t.fullHeight&&(u.value="100%")});const p=d.ref(!1),h=S=>{p.value=!0,S.preventDefault(),S.stopPropagation();const k=S.clientX,B=S.clientY,x=typeof c.value=="number"?c.value:r.value?.offsetWidth||0,g=typeof u.value=="number"?u.value:r.value?.offsetHeight||0,R=F=>{if(!p.value)return;F.preventDefault();const L=F.clientX-k,G=F.clientY-B,N=x+L,v=g+G;N>100&&(c.value=N),v>100&&(u.value=v)},M=()=>{p.value=!1,document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",M)};document.addEventListener("mousemove",R),document.addEventListener("mouseup",M)},A=d.computed(()=>({left:`${l.value}px`,top:`${a.value}px`,width:typeof c.value=="number"?`${c.value}px`:c.value,height:typeof u.value=="number"?`${u.value}px`:u.value,position:"absolute",zIndex:2e3})),C=()=>{d.nextTick(()=>{if(r.value){const S=r.value.offsetParent||document.body,k=S.clientWidth,B=S.clientHeight,x=typeof c.value=="number"?c.value:r.value.offsetWidth||350,g=typeof u.value=="number"?u.value:r.value.offsetHeight||600;l.value+x>k&&(l.value=Math.max(0,k-x-20)),a.value+g>B&&(a.value=Math.max(0,B-g-20)),l.value<0&&(l.value=0),a.value<0&&(a.value=0)}})},m=d.ref(!1),y=S=>{if(S.target.closest(".close-btn")||S.target.closest(".actions"))return;m.value=!0,S.preventDefault(),S.stopPropagation();const k=S.clientX,B=S.clientY,x=l.value,g=a.value,R=F=>{if(!m.value)return;F.preventDefault();const L=F.clientX-k,G=F.clientY-B;l.value=x+L,a.value=g+G},M=()=>{m.value=!1,document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",M),C()};document.addEventListener("mousemove",R),document.addEventListener("mouseup",M)},E=()=>{d.nextTick(()=>{if(t.align&&r.value){const S=r.value.offsetParent||document.body,k=typeof c.value=="number"?c.value:r.value.offsetWidth||350;t.align==="right"?l.value=Math.max(0,S.clientWidth-k-20):t.align==="center"&&(l.value=Math.max(0,(S.clientWidth-k)/2))}C()})};d.onMounted(()=>{t.align?E():C()}),d.watch(o,S=>{S&&(t.align?E():C())});const I=()=>{o.value=!1,s("close")};return(S,k)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref_key:"cardRef",ref:r,class:d.normalizeClass(["draggable-card leiting-scroll",["leiting-theme-"+d.unref(i)]]),style:d.normalizeStyle(A.value)},[d.createElementVNode("div",{ref:"headerRef",class:"card-header",onMousedown:y},[d.createElementVNode("span",K0,d.toDisplayString(n.title),1),d.createElementVNode("div",q0,[d.renderSlot(S.$slots,"header-extra",{},void 0,!0),d.createElementVNode("span",{class:"close-btn",onClick:I},"×")])],544),d.createElementVNode("div",X0,[d.renderSlot(S.$slots,"default",{},void 0,!0)]),d.createElementVNode("div",{class:"resize-handle",onMousedown:h},[...k[0]||(k[0]=[d.createElementVNode("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"currentColor"},[d.createElementVNode("path",{d:"M10 10 L10 2 L2 10 Z"})],-1)])],32)],6)),[[d.vShow,o.value]])}}),Ne=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},Fe=Ne(J0,[["__scopeId","data-v-50bf6126"]]);function Z0(n){const e=d.ref([]),t=d.ref([]),i=d.ref([]),s=d.ref(""),o=d.ref(!0);d.watch(()=>d.unref(n),f=>{if(!f||f.length===0)return;const p=[],h=(m,y)=>{m.forEach(E=>{const I=E.id||E.key||E.$id,S=E.modelId||y;S&&(E.modelId=S),I&&p.push(I),E.children&&E.children.length>0&&h(E.children,S)})};h(f);const A=new Set(i.value);let C=!1;p.forEach(m=>{A.has(m)||(A.add(m),C=!0)}),C&&(i.value=Array.from(A))},{immediate:!0,deep:!0});const r=d.computed(()=>{const f=d.unref(n);if(!f)return[];const p=[],h=(A,C)=>{A.forEach(m=>{const y=m.id||m.key||m.$id,E=m.name||m.title;p.push({key:y,title:E,parentKey:C}),m.children&&m.children.length>0&&h(m.children,y)})};return h(f),p}),l=f=>{e.value=f,o.value=!1},a=f=>{i.value=f},c=f=>{t.value=f},u=f=>r.value.find(h=>h.key===f)?.parentKey;return d.watch(s,f=>{if(!f)return;const h=r.value.filter(C=>C.title&&C.title.toLowerCase().includes(f.toLowerCase())).map(C=>C.parentKey),A=new Set;h.forEach(C=>{let m=C;for(;m;)A.add(m),m=u(m)}),e.value=[...A],o.value=!0}),{expandedKeys:e,selectedKeys:t,checkedKeys:i,searchValue:s,autoExpandParent:o,onExpand:l,onCheck:a,onSelect:c}}const eC={class:"search-box"},tC={key:0},nC={style:{color:"#f50"}},iC={key:1},sC={key:1,class:"empty-tip"},Pi=Ne(d.defineComponent({__name:"LeitingTree",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"构件树"},width:{type:[Number,String],default:320},treeData:{type:Array,default:()=>[]},initialPosition:{type:Object,default:()=>({x:0,y:0})},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close","select","check"],setup(n,{emit:e}){const t=ye.Input.Search,i=ye.Tree,s=n,o=e,r=d.inject("leiting-theme",d.ref("dark")),l=d.inject("leitingMethods"),a=g=>{l?.value?.onSearchComponent&&l.value.onSearchComponent(g)},c=d.computed({get:()=>s.open!==void 0?s.open:s.visible,set:g=>{o("update:visible",g),o("update:open",g)}}),u=d.ref(null),{height:f}=j0(u),p=d.computed(()=>f.value||300),h=d.ref({children:"children",title:"name",key:"id"}),{expandedKeys:A,selectedKeys:C,checkedKeys:m,searchValue:y,autoExpandParent:E}=Z0(d.toRef(s,"treeData")),I=g=>{A.value=g,E.value=!1},S=g=>{const R=[],M=F=>{if(!F.children||F.children.length===0){const G=F.element_Id;F.modelId&&G&&R.push({modelId:F.modelId,elementId:G})}else F.children.forEach(M)};return M(g),R},k=(g,R)=>{m.value=g,o("check",g,R);const M=S(R.node).map(F=>({...F,show:R.checked}));l?.value?.setComponentVisibility&&l.value.setComponentVisibility(M),l?.value?.onTreeCheck&&l.value.onTreeCheck(g,R)},B=(g,R)=>{if(C.value=g,o("select",g,R),R.selected){const M=S(R.node);M.length>0&&l?.value?.flyToObjects&&l.value.flyToObjects({selectCpts:M})}l?.value?.onTreeSelect&&l.value.onTreeSelect(g,R)},x=()=>{o("update:visible",!1),o("close")};return(g,R)=>(d.openBlock(),d.createBlock(Fe,{visible:c.value,"onUpdate:visible":R[1]||(R[1]=M=>c.value=M),title:n.title,"initial-position":n.initialPosition,"full-height":n.fullHeight,onClose:x},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["leiting-tree-container",[`theme-${d.unref(r)}`]])},[d.createElementVNode("div",eC,[d.createVNode(d.unref(t),{value:d.unref(y),"onUpdate:value":R[0]||(R[0]=M=>d.isRef(y)?y.value=M:null),placeholder:"搜索构件","allow-clear":"","enter-button":"",onSearch:a},null,8,["value"])]),d.createElementVNode("div",{class:"tree-wrapper",ref_key:"treeWrapperRef",ref:u},[n.treeData&&n.treeData.length?(d.openBlock(),d.createBlock(d.unref(i),{key:0,"tree-data":n.treeData,"field-names":h.value,height:p.value,"expanded-keys":d.unref(A),"auto-expand-parent":d.unref(E),"selected-keys":d.unref(C),"checked-keys":d.unref(m),checkable:"","block-node":"",onExpand:I,onSelect:B,onCheck:k},{title:d.withCtx(({name:M,title:F})=>[(M||F)&&d.unref(y)&&(M||F).toLowerCase().indexOf(d.unref(y).toLowerCase())>-1?(d.openBlock(),d.createElementBlock("span",tC,[d.createTextVNode(d.toDisplayString((M||F).substr(0,(M||F).toLowerCase().indexOf(d.unref(y).toLowerCase())))+" ",1),d.createElementVNode("span",nC,d.toDisplayString(d.unref(y)),1),d.createTextVNode(" "+d.toDisplayString((M||F).substr((M||F).toLowerCase().indexOf(d.unref(y).toLowerCase())+d.unref(y).length)),1)])):(d.openBlock(),d.createElementBlock("span",iC,d.toDisplayString(M||F),1))]),_:1},8,["tree-data","field-names","height","expanded-keys","auto-expand-parent","selected-keys","checked-keys"])):(d.openBlock(),d.createElementBlock("div",sC,"暂无数据"))],512)],2)]),_:1},8,["visible","title","initial-position","full-height"]))}}),[["__scopeId","data-v-749af6eb"]]),oC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEhSURBVDhP1ZRhkcIwEIWJAsDBOTgkgAJAAYcCQAFFAUgoDjgFh4Q7B+cAUFC+19kyS0hL+Ulm3nS6+/ZLNkkbOk9GURRDWUIIxyZraEoCWZLfmmcOLK/z14KAqGiGvq14zDMHNk/BHkAAehh/0ABtKMxUSFzPNfpFI+JnD7wDYVaxIIov41bIfxHfoROakhe0HDeQmbQfFzTxJj+zTXYg1kWrarISRFKzLNAfGsbL9iDzq/0j+kQZ/k1wm7onoKW3Hq42F0jLVK//Tcebott2fJAbVK1lvKwBNd6rRIsFsfJka0G2qdpQPy7+EPC0AumexKAzoH5FbgvSbHuUW6EOYubbfwX0cLPfFJS4K6mPNrbdHb+uvP498dhVn4v9FWo9V3RZzFxAv8L9AAAAAElFTkSuQmCC",oc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAERSURBVDhPvZTrEYIwEISTCrQD6EA7gA60AylBK1Aq0A7ECrQDoQPsADrACuLuTMJkIiHxjzezgyR7H3d5KJVSqRAigcaQUjYYX2JgZY/P/O4lEgYYFo7pgPcc2kSCBoIUzDeo0klPPEsNYlX7AKzA/M6ASrRzYoIGG5DAOCvzBvzMOxqQazSgLLI1QdAW5jWpUAPV0AVKIc7FRCuNy7RkWozJtj1BED7ANbpDXHhffFXUwUnZwRYp7qw7Rx8/lLkV9R4QD2w1A8pjW3sA4h5au+pXEBS76P8D6Ut9/nXXaiRQdnBXqBfEC+4GdzSxW5v6F7CTeHnbCVCBsWIE+RYVrdF4DSz6OwgiADDexbmT3X0A4fSDfDjUugcAAAAASUVORK5CYII=",rC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAFESURBVDhPlZMNEcIwDIVXBQwFgAJAAcMBDgAFIGE4wAHgABSwOdgcIAEUjPd6aS/rfhi7y12bJl9f0sxEf3xVVV0RPoetjTFvnWqGcgSylfgihA0CKcgJgBfsAqMiKiM0+gkKlCyZCN8uhPWCFOSBxARWORU4W2CdeV9XjxSEJcwkjokTqBpzjxjCn7CyVRECzjg8wHLYCmabK7CplBcLhMr2DZCqP0dCovYZ9hYGXx1izLUGUkkfxI/sTQiCf4N1zLWAWCKV2nP6PEhB2Ngd7B4GC4SJnCcP8SAFoc/Ph/TqjVvTPogFKUiJ/VGU+GdmUAA5ObA7cyC+iPt/MjUfKRL4emyuK+cGH8tufFRUHywZ+RYlnRDdIwfzLzVUibtQv1oNhoAExtfpVdIAiQIOWiY9o2sQxJemOydTS1jR1di2Zn8B8f27apou9kMAAAAASUVORK5CYII=",aC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHDSURBVDhPlZOxL0NRFIe9ECubhehoIIjJ1HYwCkIiJpUQEkN1YZBobU0kFKNI3iTGYrDRv0BIhLXCYpCwiO35fs25zWva98JNvpz37j33d8+551yvLWIEQXDG0izMe55XjvJz816MUJG1LVuvYJcQrEb5xwkV2JSHGfAhgBJiu63E4oSUzpRtusa+wBooKkWnKOujQYh7SbCShQx0m9cpds4iOseOw7BFmUPwU341IQT2MaOQgi9QND+wiqNnBxT4X7SIbrAqhNI9wiUvJ+W8A99wDEWdwrw25iVkkenAEb5LkIQPuIMJWJGQoriFd+iBCkhc8zUhfJSm7mva5l3aadubDgtpMgGKpB/eoBfuQZFoPNhBj9gTaC3kKkEEGXPswF7Y5rLro1AW8UI6GmelmAzfkUWlNaWt6/iT0DOOA5bqoSuzHfIvofATqSJQb8KoiJbtPi6x2dA9FPjXE1F/uZKrv3IwCFcNqVmoPlal7QJ9q/wZCbk7Ioo9/tehE9q1r0nIxNQbG4YEXdkVjQ5J2OZXbB88gVrgQIJNj9aaT4LboPK7J6O0Ktb1KYtc/aYxGff6h3AYY6Nvzk2GQ1WQTVj4BST70jYaqceXAAAAAElFTkSuQmCC",lC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADhSURBVHgBvVOBEYIwDEw9B2ADO4IjuIEjwAa6Aa7ABMAEuIIjOIFsUDao37vgxVZbBI+/+0tI0+fJBaIIrLUFaMAHmNNcsMAIE+vdJLQykQ+0wFHBrsyiT/sL2I1DDTac/+4Klzobov7WHxt29qGmaYaQnlhLCmUTa2l4C2ljvamFlEvY0xpCW/kA924GblfGWciZaJyXQvSmlOoDITSdXQBbcA8eKfy/nHDFeY470FIX8tzUIu84FmLWuTzz7yhRLPm54dKJ4+A5uoJ3HgHBUfUmxGIa4QDuKA4n3kLk9ZInw0qu5b1R1aYAAAAASUVORK5CYII=",cC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAADFSURBVDhPxVPBDYMwDIwnKJu0G9ANYJMyQrsBbNIRGAE2gEnSO6mpIMJxkBC1lEds52zfOeK9b51zV5wte4lIr8RWbgGQh2fGmaIHJe4EetKPtDpRcA5AvwcB7FtgCcTOH0p3YzaQNd75QBiVXJG3LRtCRyQ6Jvsekd3gTsJVoDcihZLQQjXGTRMzIzPhOCCQyNYvSuEue7Qdm02yK0u1nM2m/FQyKb8JZHH+l81Ofdpdm82tvikjThyNlbSEBvIPFj+MfwA76qSYUG3g9QAAAABJRU5ErkJggg==",dC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEcSURBVDhPrZSNDYIwEIXpBOIGjMAIOIE4AbgBGwAbOIJu4Aa4gW4gI+gE9b3mjjSmibSR5ALX3H33W4y1Ns+yrIe0EH7HPC8YnyGjAegkEB5cYyiwrdWXIEc1xnSREGcuiTQEWeg7gG4+CMcl9ALnLkvogwScv+wq6FMQJJCJDgBtBcSAI3QClwe2YZAHcY2Ho4kGAVLA6U5/CEvdp4KYhesFhBPpCZIAz6jStHhproJcHyAHbb5nF+6RZ8CsGslIQaHp/gSxRzlApU4GugPxNuDN/eNarAJxapUPgm8rQ9C1SAI9AOGiHhGApSdnRN8FshbEiLwiLI1rMUM6zSQ0tX9c2lp/Iw0iMIPU38iFIN1mTmOjKa98vyWB4QM5XQnvsbFsyAAAAABJRU5ErkJggg==",uC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGPSURBVDhPrZT9UQIxEMUvFSgViBUoFQgVABV4VqBW4FmBUIFQgZRwVqBU4HUAVHC+X2aXycQw/sPOvLncZvdlv5JQFaTv+1upp8IyhLDHRLpLfe6FrXRt7hZShYyH+n8RauGAv/AkQNYIHICshFcRdu6fE/kGRN/mQGTIpzAzMoh6EV2fIsJ5IwNOj2IpVZ6i6difSecRVnlELZHIgHROisgXRCa78Z+IrMBf2pjLYJNENGSd1kO2pPghjKQniyqY8lFr2NfaqC18wn7nZCMlWg7xLq70TxfRLyHqtABN2lbp40mSSCzBcSebif1TPyKjDBcQ0eJJRkIUpHkMPUlnkBU+pnlWItL6ERgw8o1iqRHtgzAUGNRD2qmkvgMvNnneUQcZ4ggR6VGXG+OOA1koNvrFcY7+af++VJe0hucfyKQu+RWJc+SDZ3aNvlPpRl7T0qXdafNZYPDehLEZt/rOBR9U8QSaEKX0jHAaE4tshVrgLeJ+Xdl6rS8D3BWJXKnCEwWXEuco9grQ3bb0sP0Cn8/nPm/SMRQAAAAASUVORK5CYII=",hC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACDSURBVHgB1ZFhDYAgEIWfzgBGIIINpIEViGAkG2gEbWADjWADfMw/iDgUfji/7e3gxt3uHsDXZFrrlrFBHJNpsPAgEEmORArn3lFroEZQCjcTbAhzepPsgbuCgn8FBWvsUAMfFR5OIPGS5G80JkrG2sopHKbO1BCoHy8ZNhRUT5X4BTu6qyNSwwCiMAAAAABJRU5ErkJggg==",fC={class:"menu-container"},pC=["onClick","title"],gC={class:"menu-icon"},mC=["src","alt"],AC={key:3,style:{"font-size":"12px"}},yC={key:0,class:"sub-menu"},CC=["onClick"],Nn=d.defineComponent({__name:"LeitingMenu",props:{visible:{type:Boolean,default:!0},activeIds:{type:Array,default:()=>[]},is2d:{type:Boolean,default:!1},customItems:{type:Array,default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=d.inject("leiting-menu-size",d.ref("medium")),o=d.inject("leitingMethods",d.ref({})),r=d.computed(()=>i.value||i),l=d.computed(()=>s.value||s),a=d.ref([{ID:"home",title:"主视角",src:oC,key:"homeView"},{ID:"tree",title:"目录树",src:oc,key:"componentTree"},{ID:"cadLayer",title:"图层",src:oc,key:"cadLayer"},{ID:"measure",title:"量算",src:rC,key:"measurement"},{ID:"section",title:"剖切",src:aC,key:"section"},{ID:"roam",title:"人物漫游",src:lC,key:"roam"},{ID:"info",title:"构件信息",src:cC,key:"componentInfo"},{ID:"cadPosition",title:"调整位置",src:dC,key:"cadPosition"},{ID:"annotation",title:"标注",src:hC,key:"annotation"},{ID:"setting",title:"设置",src:uC,key:"setting"}]),c=d.ref([]),u=d.ref([...t.activeIds]);d.watch(()=>t.activeIds,k=>{u.value=[...k]},{deep:!0});const f=d.computed(()=>t.visible);o.value&&o.value.menuEvents&&(o.value.menuEvents.on("setMenuListFilter",k=>{c.value=k}),o.value.menuEvents.on("setMenuActive",(k,B)=>{B?u.value.includes(k)||u.value.push(k):u.value=u.value.filter(x=>x!==k)}));const p=d.computed(()=>{let k=a.value;if(t.is2d){const B=["homeView","measurement","cadLayer","annotation"];k=k.filter(x=>x.key&&B.includes(x.key))}else{const B=["cadLayer","cadPosition","annotation"];k=k.filter(x=>!x.key||!B.includes(x.key))}if(c.value.length>0&&(k=k.filter(B=>!B.key||!c.value.includes(B.key))),t.customItems&&t.customItems.length>0){const B=t.customItems.map(x=>({...x,key:x.ID,src:x.src||x.icon}));return[...k,...B]}return k}),h=e,A=k=>{const B=["homeView"];if(k.key&&B.includes(k.key))u.value.includes(k.ID)||(u.value.push(k.ID),setTimeout(()=>{const g=u.value.indexOf(k.ID);g>-1&&u.value.splice(g,1)},1e3));else{const g=u.value.indexOf(k.ID);g>-1?u.value.splice(g,1):u.value.push(k.ID)}const x=u.value.includes(k.ID);k.func&&k.func(k),k.key&&h("action",k.key,x)},C=k=>{a.value=[...a.value,...k]},m=k=>{c.value=k},y=k=>{console.log("LeitingMenu received showMenu event:",k)},E=(k,B)=>{const x=a.value.find(g=>g.ID===k||g.key===k);if(x){const g=u.value.indexOf(x.ID);B&&g===-1?u.value.push(x.ID):!B&&g>-1&&u.value.splice(g,1)}};let I=null;const S=()=>{o.value?.menuEvents&&(I&&(I.off("insertMenu",C),I.off("setMenuListFilter",m),I.off("showMenu",y),I.off("setMenuActive",E)),I=o.value.menuEvents,I.on("insertMenu",C),I.on("setMenuListFilter",m),I.on("showMenu",y),I.on("setMenuActive",E))};return d.onMounted(()=>{S()}),d.onUnmounted(()=>{I&&(I.off("insertMenu",C),I.off("setMenuListFilter",m),I.off("showMenu",y),I.off("setMenuActive",E))}),d.watch(o,()=>{S()},{deep:!0}),(k,B)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-menu-wrapper",["leiting-theme-"+r.value,"size-"+l.value]])},[d.createElementVNode("div",fC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(p.value,x=>(d.openBlock(),d.createElementBlock("div",{key:x.ID,class:d.normalizeClass(["menu-item",{active:u.value.includes(x.ID)}]),onClick:g=>A(x),title:x.title},[d.createElementVNode("div",gC,[x.src?(d.openBlock(),d.createElementBlock("img",{key:0,src:x.src,alt:x.title},null,8,mC)):typeof x.icon=="object"?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.icon),{key:1})):typeof x.icon=="string"?(d.openBlock(),d.createElementBlock("i",{key:2,class:d.normalizeClass(["iconfont",`icon-${x.icon}`])},null,2)):(d.openBlock(),d.createElementBlock("span",AC,d.toDisplayString(x.title.substring(0,2)),1))]),x.children&&x.children.length>0?(d.openBlock(),d.createElementBlock("div",yC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.children,g=>(d.openBlock(),d.createElementBlock("div",{key:g.ID,class:d.normalizeClass(["sub-menu-item",{active:u.value.includes(g.ID)}]),onClick:d.withModifiers(R=>A(g),["stop"])},d.toDisplayString(g.title),11,CC))),128))])):d.createCommentVNode("",!0)],10,pC))),128))])],2)),[[d.vShow,f.value]])}}),EC={class:"leiting-section-content"},wC={class:"section-form-item"},bC={class:"radio-group"},vC={class:"section-form-item"},IC={class:"switch-container"},xC={class:"switch"},BC={class:"status-text"},SC={class:"section-form-item slider-item"},MC={class:"slider-wrapper"},TC={class:"section-form-item slider-item"},DC={class:"slider-wrapper"},kC={class:"section-form-item slider-item"},PC={class:"slider-wrapper"},FC={class:"section-form-item table-item"},RC={class:"model-table-container"},OC={class:"model-table"},LC={width:"40"},NC=["checked"],UC=["onClick"],_C=["value"],QC={class:"model-name"},Un=Ne(d.defineComponent({__name:"LeitingSection",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"剖切控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:N=>{i("update:visible",N),i("update:open",N)}}),r=d.ref("Box"),l=d.ref(!1),a=d.ref([]),c=d.ref([]),u=d.computed(()=>c.value.length===0?!1:c.value.every(N=>a.value.includes(N.modelId))),f=N=>{N.target.checked?a.value=c.value.map(w=>w.modelId):a.value=[],R()},p=d.ref([-10,10]),h=d.ref([-10,10]),A=d.ref([-10,10]),C=d.ref([-100,100]),m=d.ref([-100,100]),y=d.ref([-100,100]);let E=!1;const I=N=>{E=!0;const{targetZPlus:v,targetZMinus:w,targetXPlus:b,targetXMinus:T,targetYPlus:P,targetYMinus:_}=N;A.value=[-w,v],p.value=[-T,b],h.value=[-_,P],setTimeout(()=>{E=!1},100)},S=()=>{E||a.value.length===0||!s?.value?.updateSectionRange||s.value.updateSectionRange({targetZPlus:A.value[1],targetZMinus:-A.value[0],targetXPlus:p.value[1],targetXMinus:-p.value[0],targetYPlus:h.value[1],targetYMinus:-h.value[0]})},k=()=>{s?.value?.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)},B=N=>{if(!s?.value?.getMapTileset||!s?.value?.openSection)return;const w=s.value.getMapTileset()[N];if(w&&w.leiting?.box){const{min:b,max:T}=w.leiting.box,P=(T.x-b.x)/2,_=(T.y-b.y)/2,O=(T.z-b.z)/2;a.value.length<=1&&(C.value=[-P*2,P*2],m.value=[-_*2,_*2],y.value=[-O*2,O*2],p.value=[-P,P],h.value=[-_,_],A.value=[-O,O],s.value.updateSectionRange&&s.value.updateSectionRange({targetZPlus:O,targetZMinus:O,targetXPlus:P,targetXMinus:P,targetYPlus:_,targetYMinus:_})),s.value.openSection(N,{moveCallBack:I}),s.value.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)}},x=N=>{const v=a.value.indexOf(N);v>-1?a.value.splice(v,1):a.value.push(N),R()};let g=[];const R=()=>{const N=a.value.filter(w=>!g.includes(w)),v=g.filter(w=>!a.value.includes(w));N.forEach(w=>B(w)),v.forEach(w=>{s?.value?.closeSection&&s.value.closeSection(w)}),g=[...a.value]},M=()=>{},F=()=>{o.value=!1,i("close")},L=()=>{l.value=!1,a.value=[],g=[],p.value=[-10,10],h.value=[-10,10],A.value=[-10,10],C.value=[-100,100],m.value=[-100,100],y.value=[-100,100]};d.watch(()=>t.visible,N=>{N?G():(s?.value?.closeSection&&s.value.closeSection(),L())});const G=()=>{s?.value&&typeof s.value.getModelList=="function"&&(c.value=s.value.getModelList()||[],c.value.length>0&&a.value.length===0&&(a.value=[c.value[0].modelId],g=[...a.value]),t.visible&&a.value.length>0&&(l.value=!0,a.value.forEach(N=>B(N))))};return d.watch(()=>s?.value,()=>{G()},{immediate:!0,deep:!0}),d.onMounted(()=>{G()}),(N,v)=>(d.openBlock(),d.createBlock(Fe,{visible:o.value,title:"剖切分析","full-height":n.fullHeight,"onUpdate:visible":F},{default:d.withCtx(()=>[d.createElementVNode("div",EC,[d.createElementVNode("div",wC,[v[8]||(v[8]=d.createElementVNode("span",{class:"label"},"模式",-1)),d.createElementVNode("div",bC,[d.createElementVNode("label",{class:d.normalizeClass(["radio-item",{active:r.value==="Box"}])},[d.withDirectives(d.createElementVNode("input",{type:"radio",value:"Box","onUpdate:modelValue":v[0]||(v[0]=w=>r.value=w),onChange:M},null,544),[[d.vModelRadio,r.value]]),v[7]||(v[7]=d.createTextVNode(" 剖切盒 ",-1))],2)])]),d.createElementVNode("div",vC,[v[10]||(v[10]=d.createElementVNode("span",{class:"label"},"显示",-1)),d.createElementVNode("div",IC,[d.createElementVNode("label",xC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":v[1]||(v[1]=w=>l.value=w),onChange:k},null,544),[[d.vModelCheckbox,l.value]]),v[9]||(v[9]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",BC,d.toDisplayString(l.value?"显示":"隐藏"),1)])]),d.createElementVNode("div",SC,[v[11]||(v[11]=d.createElementVNode("span",{class:"label"},"X 轴",-1)),d.createElementVNode("div",MC,[d.createVNode(d.unref(ye.Slider),{value:p.value,"onUpdate:value":v[2]||(v[2]=w=>p.value=w),range:"",min:C.value[0],max:C.value[1],step:.1,onChange:S},null,8,["value","min","max"])])]),d.createElementVNode("div",TC,[v[12]||(v[12]=d.createElementVNode("span",{class:"label"},"Y 轴",-1)),d.createElementVNode("div",DC,[d.createVNode(d.unref(ye.Slider),{value:h.value,"onUpdate:value":v[3]||(v[3]=w=>h.value=w),range:"",min:m.value[0],max:m.value[1],step:.1,onChange:S},null,8,["value","min","max"])])]),d.createElementVNode("div",kC,[v[13]||(v[13]=d.createElementVNode("span",{class:"label"},"Z 轴",-1)),d.createElementVNode("div",PC,[d.createVNode(d.unref(ye.Slider),{value:A.value,"onUpdate:value":v[4]||(v[4]=w=>A.value=w),range:"",min:y.value[0],max:y.value[1],step:.1,onChange:S},null,8,["value","min","max"])])]),d.createElementVNode("div",FC,[v[15]||(v[15]=d.createElementVNode("span",{class:"label"},"模型",-1)),d.createElementVNode("div",RC,[d.createElementVNode("table",OC,[d.createElementVNode("thead",null,[d.createElementVNode("tr",null,[d.createElementVNode("th",LC,[d.createElementVNode("input",{type:"checkbox",checked:u.value,onChange:f},null,40,NC)]),v[14]||(v[14]=d.createElementVNode("th",null,"名称",-1))])]),d.createElementVNode("tbody",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,w=>(d.openBlock(),d.createElementBlock("tr",{key:w.modelId,class:d.normalizeClass({selected:a.value.includes(w.modelId)}),onClick:b=>x(w.modelId)},[d.createElementVNode("td",null,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",value:w.modelId,"onUpdate:modelValue":v[5]||(v[5]=b=>a.value=b),onClick:v[6]||(v[6]=d.withModifiers(()=>{},["stop"])),onChange:R},null,40,_C),[[d.vModelCheckbox,a.value]])]),d.createElementVNode("td",QC,d.toDisplayString(w.modelName),1)],10,UC))),128))])])])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-ee4d9a12"]]),HC={class:"leiting-player-content"},GC={class:"player-form-item"},YC={class:"switch-container"},VC={class:"switch"},WC={class:"status-text"},zC={class:"player-form-item"},jC={class:"switch-container"},$C={class:"switch"},KC={class:"status-text"},qC={class:"player-form-item"},XC={class:"switch-container"},JC={class:"switch"},ZC={class:"status-text"},eE={class:"player-form-item slider-item"},tE={class:"slider-wrapper"},nE={class:"value-text"},iE={class:"instructions"},sE={class:"key-map"},oE={class:"key-row"},rE={class:"key-row"},aE={class:"key-row"},lE={class:"key-row"},cE={class:"key-row"},dE={class:"key-row"},_n=Ne(d.defineComponent({__name:"LeitingPlayer",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"漫游控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(!1),r=d.ref(!1),l=d.ref(!0),a=d.ref(5),c=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:B=>{i("update:visible",B),i("update:open",B)}}),u=d.ref(null),f=d.ref(null),p=d.ref(null),h=d.ref(null),A=d.ref(null),C=d.ref(null),m=()=>{o.value?E():I()},y=()=>{s?.value?.setPlayerParams&&s.value.setPlayerParams({gravityTest:r.value,collisionTest:l.value})},E=async()=>{s?.value?.openPlayer&&(await s.value.openPlayer(),s.value.setPlayerSpeed&&s.value.setPlayerSpeed(a.value),y(),s.value.bindPlayerUiKeys&&(await d.nextTick(),s.value.bindPlayerUiKeys({moveFront:u.value,moveBack:f.value,moveLeft:p.value,moveRight:h.value,moveUp:A.value,moveDown:C.value})))},I=()=>{s?.value?.closePlayer&&s.value.closePlayer()},S=()=>{s?.value?.setPlayerSpeed&&s.value.setPlayerSpeed(a.value)},k=()=>{c.value=!1,i("close")};return d.watch(()=>t.visible,B=>{B?(o.value=!0,s?.value?E():setTimeout(()=>{s?.value&&E()},100)):o.value&&(o.value=!1,I())},{immediate:!0}),(B,x)=>(d.openBlock(),d.createBlock(Fe,{title:n.title,visible:c.value,"full-height":n.fullHeight,"onUpdate:visible":k},{default:d.withCtx(()=>[d.createElementVNode("div",HC,[d.createElementVNode("div",GC,[x[5]||(x[5]=d.createElementVNode("span",{class:"label"},"启用",-1)),d.createElementVNode("div",YC,[d.createElementVNode("label",VC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[0]||(x[0]=g=>o.value=g),onChange:m},null,544),[[d.vModelCheckbox,o.value]]),x[4]||(x[4]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",WC,d.toDisplayString(o.value?"开启":"关闭"),1)])]),d.createElementVNode("div",zC,[x[7]||(x[7]=d.createElementVNode("span",{class:"label"},"重力",-1)),d.createElementVNode("div",jC,[d.createElementVNode("label",$C,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[1]||(x[1]=g=>r.value=g),onChange:y},null,544),[[d.vModelCheckbox,r.value]]),x[6]||(x[6]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",KC,d.toDisplayString(r.value?"开启":"关闭"),1)])]),d.createElementVNode("div",qC,[x[9]||(x[9]=d.createElementVNode("span",{class:"label"},"碰撞",-1)),d.createElementVNode("div",XC,[d.createElementVNode("label",JC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[2]||(x[2]=g=>l.value=g),onChange:y},null,544),[[d.vModelCheckbox,l.value]]),x[8]||(x[8]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",ZC,d.toDisplayString(l.value?"开启":"关闭"),1)])]),d.createElementVNode("div",eE,[x[10]||(x[10]=d.createElementVNode("span",{class:"label"},"速度",-1)),d.createElementVNode("div",tE,[d.createVNode(d.unref(ye.Slider),{value:a.value,"onUpdate:value":x[3]||(x[3]=g=>a.value=g),min:1,max:10,step:1,onChange:S},null,8,["value"])]),d.createElementVNode("span",nE,d.toDisplayString(a.value),1)]),x[19]||(x[19]=d.createElementVNode("div",{class:"divider"},null,-1)),d.createElementVNode("div",iE,[x[18]||(x[18]=d.createElementVNode("div",{class:"instruction-title"},"操作说明",-1)),d.createElementVNode("div",sE,[d.createElementVNode("div",oE,[d.createElementVNode("span",{class:"key",ref_key:"btnFront",ref:u},"W",512),x[11]||(x[11]=d.createTextVNode(" 前进 ",-1))]),d.createElementVNode("div",rE,[d.createElementVNode("span",{class:"key",ref_key:"btnBack",ref:f},"S",512),x[12]||(x[12]=d.createTextVNode(" 后退 ",-1))]),d.createElementVNode("div",aE,[d.createElementVNode("span",{class:"key",ref_key:"btnLeft",ref:p},"A",512),x[13]||(x[13]=d.createTextVNode(" 左移 ",-1))]),d.createElementVNode("div",lE,[d.createElementVNode("span",{class:"key",ref_key:"btnRight",ref:h},"D",512),x[14]||(x[14]=d.createTextVNode(" 右移 ",-1))]),d.createElementVNode("div",cE,[d.createElementVNode("span",{class:"key",ref_key:"btnUp",ref:A},"Q",512),x[15]||(x[15]=d.createTextVNode(" 上升 ",-1))]),d.createElementVNode("div",dE,[d.createElementVNode("span",{class:"key",ref_key:"btnDown",ref:C},"E",512),x[16]||(x[16]=d.createTextVNode(" 下降 ",-1))]),x[17]||(x[17]=d.createElementVNode("div",{class:"key-row"},[d.createElementVNode("span",{class:"mouse-icon"},"🖱️"),d.createTextVNode(" 按住左键拖拽旋转视角 ")],-1))])])])]),_:1},8,["title","visible","full-height"]))}}),[["__scopeId","data-v-ff3f266e"]]),uE={class:"info-content"},hE={key:0,class:"component-title"},Qn=Ne(d.defineComponent({__name:"LeitingInfo",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref([]),r=d.ref(!1),l=d.ref([]),a=d.ref([]),c=d.ref(0),u=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:y=>{i("update:visible",y),i("update:open",y)}}),f=()=>{u.value=!1},p=y=>({elementID:"构件ID",elementName:"构件名",categoryName:"类别",familySymbolName:"族类型",levelName:"标高",modelName:"文件名",length:"长",width:"宽",height:"高"})[y]||y,h=["elementName","elementID","modelName","length","width","height","levelName","categoryName","familySymbolName"],A=async y=>{const E=++c.value;if(a.value=y,!y||y.length===0){o.value=[];return}if(!u.value)return;let I=y;y.length>10&&(de.warning(`选中构件数量过多(${y.length}个),仅显示前10个`),I=y.slice(0,10));const S=s?.value;let k=S?.getMapTileset?S.getMapTileset():{};r.value=!0;const B=[],x={};if(I.forEach(M=>{const L=k[M.modelId]?.leiting?.model?.dbName;L&&M.elementId&&B.push({dbName:L,elementId:M.elementId,modelId:M.modelId})}),B.length>0){try{const M=B.map(L=>({dbName:L.dbName,elementId:L.elementId})),F=await kg(M);F&&Array.isArray(F)&&F.forEach(L=>{const G=B.find(N=>N.dbName===L.dbName&&N.elementId===L.elementId);if(G){const N=`${G.modelId}_${L.elementId}`;x[N]=L}})}catch(M){console.warn("API fetch component details failed, falling back to local data",M)}console.log("123")}const g=new Set;if(I.forEach(M=>{const F=k[M.modelId],L=`${M.modelId}_${M.elementId}`;x[L]||F&&F.leiting&&!F.leiting?.node?.nodeExtras&&F.leiting.model?.nodeUrl&&g.add(M.modelId)}),g.size>0&&S?.loadNodeDetailsForModel)try{const M=Array.from(g).map(F=>S.loadNodeDetailsForModel(F));await Promise.all(M)}catch(M){console.error("Failed to load node details",M)}if(E!==c.value)return;k=S?.getMapTileset?S.getMapTileset():{};const R=[];I.forEach((M,F)=>{const G=k[M.modelId]?.leiting||{},N=x[`${M.modelId}_${M.elementId}`];let v={modelName:G.model?.modelId||M.modelId};v.elementID||(v.elementID=M.elementId);let w=null;if(N)w=N;else{const P=G.node?.nodeExtras?.element||G.node?.nodeExtras;if(P){const _=v.elementID;P[_]&&(w=P[_])}}w&&w.box3&&(v.length=`${w.box3.length?.toFixed(2)||0}米`,v.width=`${w.box3.width?.toFixed(2)||0}米`,v.height=`${w.box3.height?.toFixed(2)||0}米`);const b=[];w&&(w.name&&(v.elementName=w.name),w.categoryName&&(v.categoryName=w.categoryName),w.familySymbolName&&(v.familySymbolName=w.familySymbolName),w.levelName&&(v.levelName=w.levelName));const T={};if(h.forEach(P=>{v[P]!==void 0&&(T[P]=v[P])}),b.push({name:"基础信息",params:T}),w){const P=Array.isArray(w)?w:Array.isArray(w?.parameters)?w.parameters:null;if(P){if(P.flat().forEach(O=>{if(O&&O.GroupName&&Array.isArray(O.Parameters)){const D={};O.Parameters.forEach(U=>{U.name&&(D[U.name]=U.value??"")}),Object.keys(D).length>0&&b.push({name:O.GroupName,params:D})}}),!Array.isArray(w)){const{parameters:O,...D}=w,U={};Object.keys(D).forEach(V=>{!h.includes(V)&&V!=="uniqueId"&&typeof D[V]!="object"&&(U[V]=D[V])}),Object.keys(U).length>0&&b.push({name:"其他属性",params:U})}}else{let _=!1;if(Object.keys(w).forEach(O=>{w[O]&&typeof w[O]=="object"&&!Array.isArray(w[O])&&(_=!0,b.push({name:O,params:w[O]}))}),!_){const O={};Object.keys(w).forEach(D=>{if(!h.includes(D)&&D!=="batchId"){const U=w[D];typeof U=="string"&&U.length>500?O[D]=U.substring(0,500)+"...":O[D]=U}}),Object.keys(O).length>0&&b.push({name:"属性",params:O})}}}R.push({id:F,title:`${v.modelName}${v.elementName?` - ${v.elementName}`:""}`,groups:b})}),o.value=R,E===c.value&&(r.value=!1),R.length>0?l.value=[`${R[0].id}-基础信息`]:l.value=[]};let C=!1;const m=()=>{if(C)return;const y=s?.value;y&&y.selectionChange&&(y.selectionChange(A),C=!0)};return d.watch(()=>s?.value,()=>{m()},{deep:!0,immediate:!0}),d.watch(u,y=>{y&&a.value.length>0&&A(a.value)}),d.onMounted(()=>{m()}),(y,E)=>(d.openBlock(),d.createBlock(Fe,{visible:u.value,title:"构件详情",width:350,align:"right","initial-position":{x:0,y:0},"full-height":n.fullHeight,onClose:f,"onUpdate:visible":E[1]||(E[1]=I=>u.value=I),class:"base-info-card"},{default:d.withCtx(()=>[d.createElementVNode("div",uE,[d.createVNode(d.unref(ye.Spin),{spinning:r.value},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,I=>(d.openBlock(),d.createElementBlock("div",{key:I.id,class:"component-block"},[o.value.length>1?(d.openBlock(),d.createElementBlock("div",hE,d.toDisplayString(I.title),1)):d.createCommentVNode("",!0),d.createVNode(d.unref(ye.Collapse),{activeKey:l.value,"onUpdate:activeKey":E[0]||(E[0]=S=>l.value=S),ghost:"","expand-icon-position":"end"},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(I.groups,S=>(d.openBlock(),d.createBlock(d.unref(ye.CollapsePanel),{key:`${I.id}-${S.name}`,header:S.name},{default:d.withCtx(()=>[d.createVNode(d.unref(ye.Descriptions),{size:"small",bordered:"",column:1,labelStyle:{width:"100px",background:"rgba(255,255,255,0.05)",color:"#aaa"},contentStyle:{color:"#fff"}},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(S.params,(k,B)=>(d.openBlock(),d.createBlock(d.unref(ye.DescriptionsItem),{key:B,label:p(String(B))},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(k),1)]),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["header"]))),128))]),_:2},1032,["activeKey"])]))),128))]),_:1},8,["spinning"])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-cd881bde"]]);class rc{viewer;Cesium;pickHandler=null;bimEntityId="";mapEntityId="";constructor(e,t){this.viewer=e,this.Cesium=t}removeMarker(e){if(!this.viewer)return;const t=e==="BIM"?this.bimEntityId:this.mapEntityId;t&&(this.viewer.entities.removeById(t),e==="BIM"?this.bimEntityId="":this.mapEntityId="")}clearMarkers(){this.removeMarker("BIM"),this.removeMarker("MAP")}addMarker(e,t){if(!this.viewer||!this.Cesium)return;this.removeMarker(e);const i=`adjust-marker-${e}-${Date.now()}`;e==="BIM"?this.bimEntityId=i:this.mapEntityId=i,this.viewer.entities.add({id:i,position:this.Cesium.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),point:{pixelSize:10,color:e==="BIM"?this.Cesium.Color.RED:this.Cesium.Color.ORANGE,outlineColor:this.Cesium.Color.WHITE,outlineWidth:2,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:`${e==="BIM"?"BIM":"地图"}标记点`,font:"14pt sans-serif",style:this.Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:this.Cesium.VerticalOrigin.BOTTOM,pixelOffset:new this.Cesium.Cartesian2(0,-10),fillColor:this.Cesium.Color.WHITE,outlineColor:this.Cesium.Color.BLACK,backgroundColor:new this.Cesium.Color(.1,.1,.1,.8),showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}})}registerPickHandler(e){this.destroyPickHandler(),!(!this.Cesium||!this.viewer)&&(this.pickHandler=new this.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.pickHandler.setInputAction(t=>{let i;try{i=this.viewer.scene.pickPosition(t.position)}catch(s){console.warn("pickPosition failed:",s)}if(!i){const s=this.viewer.camera.getPickRay(t.position);i=this.viewer.scene.globe.pick(s,this.viewer.scene)}if(i||(i=this.viewer.camera.pickEllipsoid(t.position,this.viewer.scene.globe.ellipsoid)),i){const s=this.Cesium.Cartographic.fromCartesian(i),o=this.Cesium.Math.toDegrees(s.longitude),r=this.Cesium.Math.toDegrees(s.latitude),l=s.height;e({longitude:o,latitude:r,height:l})}},this.Cesium.ScreenSpaceEventType.LEFT_CLICK,this.Cesium.KeyboardEventModifier.SHIFT))}destroyPickHandler(){this.pickHandler&&(this.pickHandler.destroy(),this.pickHandler=null)}calculateOffset(e,t){return{dLon:t.longitude-e.longitude,dLat:t.latitude-e.latitude,dHeight:t.height-e.height}}}const fE={class:"adjust-panel"},pE={class:"control-panel"},gE={class:"form-item"},mE={class:"radio-group"},AE={class:"form-item"},yE={class:"radio-group"},CE={class:"form-item"},EE={class:"value"},wE={class:"param-row"},bE={class:"param-row"},vE={class:"param-row"},IE={class:"param-row"},xE={class:"param-row"},BE={class:"param-row"},SE={class:"param-row"},ME={class:"button-grid"},TE={key:1,class:"pick-mode-ui"},DE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},kE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},PE=["checked"],FE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},RE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},OE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},LE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},NE=["checked"],UE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},_E={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},QE={class:"list-panel"},HE={class:"list-header"},GE={class:"col-check"},YE=["checked"],VE={class:"list-body"},WE={class:"col-check"},zE=["onUpdate:modelValue"],jE={class:"col-index"},$E=["title"],KE={class:"col-main"},qE=["checked","onChange"],Hn=Ne(d.defineComponent({__name:"LeitingPosition",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.computed({get:()=>i.open!==void 0?i.open:i.visible,set:O=>{s("update:visible",O),s("update:open",O)}}),r=d.inject("leitingMethods"),l=d.ref("BIM"),a=d.ref("param"),c=d.ref(""),u=d.ref([]),f=d.ref("BIM"),p=d.ref(null),h=d.ref(null),A=d.ref(null),C=()=>(!A.value&&r?.value?.getViewer&&r?.value?.getCesium&&(A.value=new rc(r.value.getViewer(),r.value.getCesium())),A.value),m=()=>{C()?.clearMarkers(),p.value=null,h.value=null},y=(O,D)=>{O==="BIM"?p.value=D:h.value=D,C()?.addMarker(O,D),de.success(`${O==="BIM"?"BIM":"地图"}标记点已添加`)},E=()=>{C()?.registerPickHandler(O=>{y(f.value,O)})},I=()=>{C()?.destroyPickHandler()},S=()=>{if(!p.value||!h.value){de.warning("请先选择BIM标记点和地图标记点");return}if(!c.value){de.warning("请先选择主模型");return}const O=C();let D=0,U=0,V=0;if(O){const{dLon:$,dLat:X,dHeight:ne}=O.calculateOffset(p.value,h.value);D=$,U=X,V=ne}else D=h.value.longitude-p.value.longitude,U=h.value.latitude-p.value.latitude,V=h.value.height-p.value.height;B.value.longitude+=D,B.value.latitude+=U,B.value.height+=V,w(c.value,{longitude:B.value.longitude,latitude:B.value.latitude,height:B.value.height}),de.success("位置已调整")};d.watch(()=>a.value,O=>{O==="pick"?E():I()}),e({addMarker:y,setModelType:O=>{(O==="BIM"||O==="OSGB")&&(l.value=O)}});const B=d.ref({longitude:0,latitude:0,lonlat:1e-6,heightDistance:1,rotation:30,totalRotation:0,height:0,X:0,Y:0,Z:0}),x=d.computed(()=>{const O=u.value.find(D=>D.modelId===c.value);return O?O.modelName:""}),g=d.computed(()=>M.value.length>0&&M.value.every(O=>O.selected)),R=()=>{o.value=!1,s("close")},M=d.computed(()=>u.value.filter(O=>O.type===l.value)),F=O=>{const D=O.target.checked;M.value.forEach(U=>U.selected=D)},L=()=>{if(!r?.value)return;const O=r.value,D=O.getMapTileset?O.getMapTileset():{},U=[];if(Object.keys(D).forEach(V=>{const X=D[V].leiting||{};X.model&&U.push({modelId:X.model.modelId,modelName:X.model.modelName,selected:!1,formData:X.model.formData||{},dbName:X.model.dbName,url:X.model.url,type:X.model.type||"BIM"})}),u.value=U,U.length>0){const V=O.getBIMmodelId?O.getBIMmodelId():"";V&&U.find($=>$.modelId===V)?N(V):N(U[0].modelId),U.forEach($=>$.selected=!0)}},G=()=>{de.info("拖动右下角标,可显示模型列表",void 0,2)},N=O=>{c.value=O;const D=u.value.find(U=>U.modelId===O);D&&D.formData&&Object.keys(B.value).forEach(U=>{D.formData[U]!==void 0&&(B.value[U]=D.formData[U])})},v=O=>r?.value?.getMapTileset?r.value.getMapTileset()[O]:null,w=(O,D)=>{const U=v(O),V=r.value.getCesium();if(U&&V){if(U.leiting?.model){U.leiting.model.formData={...U.leiting.model.formData,...D};const $=u.value.find(X=>X.modelId===O);$&&($.formData=U.leiting.model.formData)}dr({Cesium:V,tileset:U})}},b=O=>{if(!c.value)return;const D=B.value[O];w(c.value,{[O]:D})},T=O=>{const D=M.value.filter(X=>X.selected);if(D.length===0){de.warning("请先选择要调整的模型");return}const{lonlat:U,heightDistance:V,rotation:$}=B.value;D.forEach(X=>{const ne={...X.formData};switch(O){case"north":ne.latitude+=U;break;case"south":ne.latitude-=U;break;case"east":ne.longitude+=U;break;case"west":ne.longitude-=U;break;case"up":ne.height+=V;break;case"down":ne.height-=V;break;case"rotateLeft":ne.totalRotation=(ne.totalRotation||0)+$;break;case"rotateRight":ne.totalRotation=(ne.totalRotation||0)-$;break}X.modelId===c.value&&(ne.lonlat=U,ne.heightDistance=V,ne.rotation=$,Object.assign(B.value,ne)),w(X.modelId,ne)})},P=()=>{if(!c.value){de.warning("请先选择主模型");return}const O=v(c.value);if(!O||!r?.value?.getViewer)return;const D=r.value.getViewer(),U=r.value.getCesium(),V=O.boundingSphere;D.camera.flyToBoundingSphere(V,{offset:new U.HeadingPitchRange(0,U.Math.toRadians(-90),V.radius*2),duration:1.5})},_=()=>{r?.value?.saveRegion?(r.value.saveRegion(u.value),s("save",d.unref(u))):(console.log("Save models:",u.value),de.warning("未找到保存接口,数据已打印控制台"))};return d.watch(()=>i.visible,O=>{O?(L(),G(),a.value==="pick"&&E()):(I(),m())}),d.onMounted(()=>{i.visible&&(L(),G(),a.value==="pick"&&E())}),(O,D)=>(d.openBlock(),d.createBlock(Fe,{visible:o.value,title:"调整位置(调整前可选择正北俯视)","full-height":n.fullHeight,"onUpdate:visible":D[25]||(D[25]=U=>o.value=U),onClose:R,onSave:_},{default:d.withCtx(()=>[d.createElementVNode("div",fE,[d.createElementVNode("div",pE,[d.createElementVNode("div",gE,[D[26]||(D[26]=d.createElementVNode("label",null,"模型类型:",-1)),d.createElementVNode("div",mE,[d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="BIM"}),onClick:D[0]||(D[0]=U=>l.value="BIM")},"BIM模型",2),d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="OSGB"}),onClick:D[1]||(D[1]=U=>l.value="OSGB")},"倾斜摄影",2)])]),d.createElementVNode("div",AE,[D[27]||(D[27]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",yE,[d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="param"}),onClick:D[2]||(D[2]=U=>a.value="param")},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="pick"}),onClick:D[3]||(D[3]=U=>a.value="pick")},"地图点选",2)])]),d.createElementVNode("div",CE,[D[28]||(D[28]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",EE,d.toDisplayString(x.value||"未选择"),1)]),D[42]||(D[42]=d.createElementVNode("div",{class:"separator"},null,-1)),a.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[D[36]||(D[36]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",wE,[D[29]||(D[29]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[4]||(D[4]=U=>B.value.longitude=U),onChange:D[5]||(D[5]=U=>b("longitude")),step:"0.000001"},null,544),[[d.vModelText,B.value.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",bE,[D[30]||(D[30]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[6]||(D[6]=U=>B.value.latitude=U),onChange:D[7]||(D[7]=U=>b("latitude")),step:"0.000001"},null,544),[[d.vModelText,B.value.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",vE,[D[31]||(D[31]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[8]||(D[8]=U=>B.value.height=U),onChange:D[9]||(D[9]=U=>b("height")),step:"0.1"},null,544),[[d.vModelText,B.value.height,void 0,{number:!0}]])]),d.createElementVNode("div",IE,[D[32]||(D[32]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[10]||(D[10]=U=>B.value.totalRotation=U),onChange:D[11]||(D[11]=U=>b("totalRotation")),step:"1"},null,544),[[d.vModelText,B.value.totalRotation,void 0,{number:!0}]])]),D[37]||(D[37]=d.createElementVNode("div",{class:"separator"},null,-1)),D[38]||(D[38]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",xE,[D[33]||(D[33]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[12]||(D[12]=U=>B.value.lonlat=U),step:"0.000001"},null,512),[[d.vModelText,B.value.lonlat,void 0,{number:!0}]])]),d.createElementVNode("div",BE,[D[34]||(D[34]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[13]||(D[13]=U=>B.value.heightDistance=U),step:"0.1"},null,512),[[d.vModelText,B.value.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",SE,[D[35]||(D[35]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[14]||(D[14]=U=>B.value.rotation=U),step:"1"},null,512),[[d.vModelText,B.value.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",ME,[d.createElementVNode("button",{onClick:D[15]||(D[15]=U=>T("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:D[16]||(D[16]=U=>T("north"))},"北移"),d.createElementVNode("button",{onClick:D[17]||(D[17]=U=>T("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:D[18]||(D[18]=U=>T("west"))},"西移"),d.createElementVNode("button",{onClick:D[19]||(D[19]=U=>T("south"))},"南移"),d.createElementVNode("button",{onClick:D[20]||(D[20]=U=>T("east"))},"东移"),d.createElementVNode("button",{onClick:D[21]||(D[21]=U=>T("up"))},"上移"),d.createElementVNode("button",{onClick:D[22]||(D[22]=U=>T("down"))},"下移"),d.createElementVNode("button",{onClick:P,class:"primary-btn"},"正北俯视"),d.createElementVNode("button",{onClick:_,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):a.value==="pick"?(d.openBlock(),d.createElementBlock("div",TE,[d.createElementVNode("div",DE,[d.createElementVNode("div",kE,[d.createElementVNode("div",{onClick:D[23]||(D[23]=U=>f.value="BIM"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:f.value==="BIM",style:{"margin-right":"5px"}},null,8,PE),D[39]||(D[39]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"BIM标记点:",-1))]),p.value?(d.openBlock(),d.createElementBlock("div",FE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(p.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(p.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",RE,"未选择"))])]),d.createElementVNode("div",OE,[d.createElementVNode("div",LE,[d.createElementVNode("div",{onClick:D[24]||(D[24]=U=>f.value="MAP"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:f.value==="MAP",style:{"margin-right":"5px"}},null,8,NE),D[40]||(D[40]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"地图标记点:",-1))]),h.value?(d.openBlock(),d.createElementBlock("div",UE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(h.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(h.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",_E,"未选择"))])]),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:S},"调整位置"),d.createElementVNode("button",{onClick:_},"保存")]),D[41]||(D[41]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 BIM 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“调整位置”进行校准。")],-1))])):d.createCommentVNode("",!0)]),d.createElementVNode("div",QE,[d.createElementVNode("div",HE,[d.createElementVNode("div",GE,[d.createElementVNode("input",{type:"checkbox",checked:g.value,onChange:F},null,40,YE)]),D[43]||(D[43]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),D[44]||(D[44]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),D[45]||(D[45]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",VE,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(M.value,(U,V)=>(d.openBlock(),d.createElementBlock("div",{key:U.modelId,class:d.normalizeClass(["list-item",{active:U.modelId===c.value}])},[d.createElementVNode("div",WE,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":$=>U.selected=$},null,8,zE),[[d.vModelCheckbox,U.selected]])]),d.createElementVNode("div",jE,d.toDisplayString(V+1),1),d.createElementVNode("div",{class:"col-name",title:U.modelName},d.toDisplayString(U.modelName),9,$E),d.createElementVNode("div",KE,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:U.modelId===c.value,onChange:$=>N(U.modelId)},null,40,qE)])],2))),128))])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-3bfda484"]]);function Fi(){return Fi=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Fi.apply(null,arguments)}const XE={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},JE={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},ac={lang:Fi({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},XE),timePickerLocale:Fi({},JE)};ac.lang.ok="确定";var Ri={exports:{}},ZE=Ri.exports,lc;function cc(){return lc||(lc=1,(function(n,e){(function(t,i){n.exports=i()})(ZE,(function(){var t=1e3,i=6e4,s=36e5,o="millisecond",r="second",l="minute",a="hour",c="day",u="week",f="month",p="quarter",h="year",A="date",C="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var v=["th","st","nd","rd"],w=N%100;return"["+N+(v[(w-20)%10]||v[w]||v[0])+"]"}},I=function(N,v,w){var b=String(N);return!b||b.length>=v?N:""+Array(v+1-b.length).join(w)+N},S={s:I,z:function(N){var v=-N.utcOffset(),w=Math.abs(v),b=Math.floor(w/60),T=w%60;return(v<=0?"+":"-")+I(b,2,"0")+":"+I(T,2,"0")},m:function N(v,w){if(v.date()<w.date())return-N(w,v);var b=12*(w.year()-v.year())+(w.month()-v.month()),T=v.clone().add(b,f),P=w-T<0,_=v.clone().add(b+(P?-1:1),f);return+(-(b+(w-T)/(P?T-_:_-T))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:f,y:h,w:u,d:c,D:A,h:a,m:l,s:r,ms:o,Q:p}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},k="en",B={};B[k]=E;var x="$isDayjsObject",g=function(N){return N instanceof L||!(!N||!N[x])},R=function N(v,w,b){var T;if(!v)return k;if(typeof v=="string"){var P=v.toLowerCase();B[P]&&(T=P),w&&(B[P]=w,T=P);var _=v.split("-");if(!T&&_.length>1)return N(_[0])}else{var O=v.name;B[O]=v,T=O}return!b&&T&&(k=T),T||!b&&k},M=function(N,v){if(g(N))return N.clone();var w=typeof v=="object"?v:{};return w.date=N,w.args=arguments,new L(w)},F=S;F.l=R,F.i=g,F.w=function(N,v){return M(N,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var L=(function(){function N(w){this.$L=R(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[x]=!0}var v=N.prototype;return v.parse=function(w){this.$d=(function(b){var T=b.date,P=b.utc;if(T===null)return new Date(NaN);if(F.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var _=T.match(m);if(_){var O=_[2]-1||0,D=(_[7]||"0").substring(0,3);return P?new Date(Date.UTC(_[1],O,_[3]||1,_[4]||0,_[5]||0,_[6]||0,D)):new Date(_[1],O,_[3]||1,_[4]||0,_[5]||0,_[6]||0,D)}}return new Date(T)})(w),this.init()},v.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},v.$utils=function(){return F},v.isValid=function(){return this.$d.toString()!==C},v.isSame=function(w,b){var T=M(w);return this.startOf(b)<=T&&T<=this.endOf(b)},v.isAfter=function(w,b){return M(w)<this.startOf(b)},v.isBefore=function(w,b){return this.endOf(b)<M(w)},v.$g=function(w,b,T){return F.u(w)?this[b]:this.set(T,w)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(w,b){var T=this,P=!!F.u(b)||b,_=F.p(w),O=function(oe,Y){var z=F.w(T.$u?Date.UTC(T.$y,Y,oe):new Date(T.$y,Y,oe),T);return P?z:z.endOf(c)},D=function(oe,Y){return F.w(T.toDate()[oe].apply(T.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Y)),T)},U=this.$W,V=this.$M,$=this.$D,X="set"+(this.$u?"UTC":"");switch(_){case h:return P?O(1,0):O(31,11);case f:return P?O(1,V):O(0,V+1);case u:var ne=this.$locale().weekStart||0,se=(U<ne?U+7:U)-ne;return O(P?$-se:$+(6-se),V);case c:case A:return D(X+"Hours",0);case a:return D(X+"Minutes",1);case l:return D(X+"Seconds",2);case r:return D(X+"Milliseconds",3);default:return this.clone()}},v.endOf=function(w){return this.startOf(w,!1)},v.$set=function(w,b){var T,P=F.p(w),_="set"+(this.$u?"UTC":""),O=(T={},T[c]=_+"Date",T[A]=_+"Date",T[f]=_+"Month",T[h]=_+"FullYear",T[a]=_+"Hours",T[l]=_+"Minutes",T[r]=_+"Seconds",T[o]=_+"Milliseconds",T)[P],D=P===c?this.$D+(b-this.$W):b;if(P===f||P===h){var U=this.clone().set(A,1);U.$d[O](D),U.init(),this.$d=U.set(A,Math.min(this.$D,U.daysInMonth())).$d}else O&&this.$d[O](D);return this.init(),this},v.set=function(w,b){return this.clone().$set(w,b)},v.get=function(w){return this[F.p(w)]()},v.add=function(w,b){var T,P=this;w=Number(w);var _=F.p(b),O=function(V){var $=M(P);return F.w($.date($.date()+Math.round(V*w)),P)};if(_===f)return this.set(f,this.$M+w);if(_===h)return this.set(h,this.$y+w);if(_===c)return O(1);if(_===u)return O(7);var D=(T={},T[l]=i,T[a]=s,T[r]=t,T)[_]||1,U=this.$d.getTime()+w*D;return F.w(U,this)},v.subtract=function(w,b){return this.add(-1*w,b)},v.format=function(w){var b=this,T=this.$locale();if(!this.isValid())return T.invalidDate||C;var P=w||"YYYY-MM-DDTHH:mm:ssZ",_=F.z(this),O=this.$H,D=this.$m,U=this.$M,V=T.weekdays,$=T.months,X=T.meridiem,ne=function(Y,z,J,re){return Y&&(Y[z]||Y(b,P))||J[z].slice(0,re)},se=function(Y){return F.s(O%12||12,Y,"0")},oe=X||function(Y,z,J){var re=Y<12?"AM":"PM";return J?re.toLowerCase():re};return P.replace(y,(function(Y,z){return z||(function(J){switch(J){case"YY":return String(b.$y).slice(-2);case"YYYY":return F.s(b.$y,4,"0");case"M":return U+1;case"MM":return F.s(U+1,2,"0");case"MMM":return ne(T.monthsShort,U,$,3);case"MMMM":return ne($,U);case"D":return b.$D;case"DD":return F.s(b.$D,2,"0");case"d":return String(b.$W);case"dd":return ne(T.weekdaysMin,b.$W,V,2);case"ddd":return ne(T.weekdaysShort,b.$W,V,3);case"dddd":return V[b.$W];case"H":return String(O);case"HH":return F.s(O,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return oe(O,D,!0);case"A":return oe(O,D,!1);case"m":return String(D);case"mm":return F.s(D,2,"0");case"s":return String(b.$s);case"ss":return F.s(b.$s,2,"0");case"SSS":return F.s(b.$ms,3,"0");case"Z":return _}return null})(Y)||_.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(w,b,T){var P,_=this,O=F.p(b),D=M(w),U=(D.utcOffset()-this.utcOffset())*i,V=this-D,$=function(){return F.m(_,D)};switch(O){case h:P=$()/12;break;case f:P=$();break;case p:P=$()/3;break;case u:P=(V-U)/6048e5;break;case c:P=(V-U)/864e5;break;case a:P=V/s;break;case l:P=V/i;break;case r:P=V/t;break;default:P=V}return T?P:F.a(P)},v.daysInMonth=function(){return this.endOf(f).$D},v.$locale=function(){return B[this.$L]},v.locale=function(w,b){if(!w)return this.$L;var T=this.clone(),P=R(w,b,!0);return P&&(T.$L=P),T},v.clone=function(){return F.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},N})(),G=L.prototype;return M.prototype=G,[["$ms",o],["$s",r],["$m",l],["$H",a],["$W",c],["$M",f],["$y",h],["$D",A]].forEach((function(N){G[N[1]]=function(v){return this.$g(v,N[0],N[1])}})),M.extend=function(N,v){return N.$i||(N(v,L,M),N.$i=!0),M},M.locale=R,M.isDayjs=g,M.unix=function(N){return M(1e3*N)},M.en=B[k],M.Ls=B,M.p={},M}))})(Ri)),Ri.exports}var ew=cc();const ze=nn(ew);var Oi={exports:{}},tw=Oi.exports,dc;function nw(){return dc||(dc=1,(function(n,e){(function(t,i){n.exports=i(cc())})(tw,(function(t){function i(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=i(t),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(r,l){return l==="W"?r+"周":r+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(r,l){var a=100*r+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return s.default.locale(o,null,!0),o}))})(Oi)),Oi.exports}nw();var Li={exports:{}},iw=Li.exports,uc;function sw(){return uc||(uc=1,(function(n,e){(function(t,i){n.exports=i()})(iw,(function(){return function(t,i,s){var o=i.prototype,r=function(f){return f&&(f.indexOf?f:f.s)},l=function(f,p,h,A,C){var m=f.name?f:f.$locale(),y=r(m[p]),E=r(m[h]),I=y||E.map((function(k){return k.slice(0,A)}));if(!C)return I;var S=m.weekStart;return I.map((function(k,B){return I[(B+(S||0))%7]}))},a=function(){return s.Ls[s.locale()]},c=function(f,p){return f.formats[p]||(function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(A,C,m){return C||m.slice(1)}))})(f.formats[p.toUpperCase()])},u=function(){var f=this;return{months:function(p){return p?p.format("MMMM"):l(f,"months")},monthsShort:function(p){return p?p.format("MMM"):l(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):l(f,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):l(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):l(f,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return c(f.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},s.localeData=function(){var f=a();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(p){return c(f,p)},meridiem:f.meridiem,ordinal:f.ordinal}},s.months=function(){return l(a(),"months")},s.monthsShort=function(){return l(a(),"monthsShort","months",3)},s.weekdays=function(f){return l(a(),"weekdays",null,null,f)},s.weekdaysShort=function(f){return l(a(),"weekdaysShort","weekdays",3,f)},s.weekdaysMin=function(f){return l(a(),"weekdaysMin","weekdays",2,f)}}}))})(Li)),Li.exports}var ow=sw();const rw=nn(ow);var Ni={exports:{}},aw=Ni.exports,hc;function lw(){return hc||(hc=1,(function(n,e){(function(t,i){n.exports=i()})(aw,(function(){return function(t,i){i.prototype.weekday=function(s){var o=this.$locale().weekStart||0,r=this.$W,l=(r<o?r+7:r)-o;return this.$utils().u(s)?l:this.subtract(l,"day").add(s,"day")}}}))})(Ni)),Ni.exports}var cw=lw();const dw=nn(cw);var Ui={exports:{}},uw=Ui.exports,fc;function hw(){return fc||(fc=1,(function(n,e){(function(t,i){n.exports=i()})(uw,(function(){var t="week",i="year";return function(s,o,r){var l=o.prototype;l.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=r(this).startOf(i).add(1,i).date(c),f=r(this).endOf(t);if(u.isBefore(f))return 1}var p=r(this).startOf(i).date(c).startOf(t).subtract(1,"millisecond"),h=this.diff(p,t,!0);return h<0?r(this).startOf("week").week():Math.ceil(h)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(Ui)),Ui.exports}var fw=hw();const pw=nn(fw);var _i={exports:{}},gw=_i.exports,pc;function mw(){return pc||(pc=1,(function(n,e){(function(t,i){n.exports=i()})(gw,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,a={},c=function(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(y){this[m]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var E=y.match(/([+-]|\d\d)/g),I=60*E[1]+(+E[2]||0);return I===0?0:E[0]==="+"?-I:I})(m)}],p=function(m){var y=a[m];return y&&(y.indexOf?y:y.s.concat(y.f))},h=function(m,y){var E,I=a.meridiem;if(I){for(var S=1;S<=24;S+=1)if(m.indexOf(I(S,0,y))>-1){E=S>12;break}}else E=m===(y?"pm":"PM");return E},A={A:[l,function(m){this.afternoon=h(m,!1)}],a:[l,function(m){this.afternoon=h(m,!0)}],Q:[s,function(m){this.month=3*(m-1)+1}],S:[s,function(m){this.milliseconds=100*+m}],SS:[o,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[l,function(m){var y=a.ordinal,E=m.match(/\d+/);if(this.day=E[0],y)for(var I=1;I<=31;I+=1)y(I).replace(/\[|\]/g,"")===m&&(this.day=I)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[l,function(m){var y=p("months"),E=(p("monthsShort")||y.map((function(I){return I.slice(0,3)}))).indexOf(m)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[l,function(m){var y=p("months").indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(m){this.year=c(m)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function C(m){var y,E;y=m,E=a&&a.formats;for(var I=(m=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(M,F,L){var G=L&&L.toUpperCase();return F||E[L]||t[L]||E[G].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,v,w){return v||w.slice(1)}))}))).match(i),S=I.length,k=0;k<S;k+=1){var B=I[k],x=A[B],g=x&&x[0],R=x&&x[1];I[k]=R?{regex:g,parser:R}:B.replace(/^\[|\]$/g,"")}return function(M){for(var F={},L=0,G=0;L<S;L+=1){var N=I[L];if(typeof N=="string")G+=N.length;else{var v=N.regex,w=N.parser,b=M.slice(G),T=v.exec(b)[0];w.call(F,T),M=M.replace(T,"")}}return(function(P){var _=P.afternoon;if(_!==void 0){var O=P.hours;_?O<12&&(P.hours+=12):O===12&&(P.hours=0),delete P.afternoon}})(F),F}}return function(m,y,E){E.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(c=m.parseTwoDigitYear);var I=y.prototype,S=I.parse;I.parse=function(k){var B=k.date,x=k.utc,g=k.args;this.$u=x;var R=g[1];if(typeof R=="string"){var M=g[2]===!0,F=g[3]===!0,L=M||F,G=g[2];F&&(G=g[2]),a=this.$locale(),!M&&G&&(a=E.Ls[G]),this.$d=(function(b,T,P,_){try{if(["x","X"].indexOf(T)>-1)return new Date((T==="X"?1e3:1)*b);var O=C(T)(b),D=O.year,U=O.month,V=O.day,$=O.hours,X=O.minutes,ne=O.seconds,se=O.milliseconds,oe=O.zone,Y=O.week,z=new Date,J=V||(D||U?1:z.getDate()),re=D||z.getFullYear(),ae=0;D&&!U||(ae=U>0?U-1:z.getMonth());var le,he=$||0,Me=X||0,$e=ne||0,Ke=se||0;return oe?new Date(Date.UTC(re,ae,J,he,Me,$e,Ke+60*oe.offset*1e3)):P?new Date(Date.UTC(re,ae,J,he,Me,$e,Ke)):(le=new Date(re,ae,J,he,Me,$e,Ke),Y&&(le=_(le).week(Y).toDate()),le)}catch{return new Date("")}})(B,R,x,E),this.init(),G&&G!==!0&&(this.$L=this.locale(G).$L),L&&B!=this.format(R)&&(this.$d=new Date("")),a={}}else if(R instanceof Array)for(var N=R.length,v=1;v<=N;v+=1){g[1]=R[v-1];var w=E.apply(this,g);if(w.isValid()){this.$d=w.$d,this.$L=w.$L,this.init();break}v===N&&(this.$d=new Date(""))}else S.call(this,k)}}}))})(_i)),_i.exports}var Aw=mw();const yw=nn(Aw),Cw={class:"setting-panel"},Ew={class:"tabs-header"},ww={class:"tab-content"},bw={key:0,class:"section"},vw={class:"setting-item"},Iw={class:"setting-item"},xw={class:"setting-item"},Bw={key:1,class:"section"},Sw={class:"tabs-header",style:{"margin-bottom":"8px"}},Mw={key:0},Tw={class:"setting-item column"},Dw={class:"setting-item column"},kw={class:"setting-item"},Pw={key:1},Fw={class:"setting-item column"},Rw={class:"setting-item column",style:{"margin-top":"12px","border-top":"1px solid rgba(255,255,255,0.1)","padding-top":"8px"}},Ow={class:"search-box"},Lw={key:2,class:"section"},Nw={class:"setting-item"},Uw={key:0,class:"setting-item column"},_w={class:"sub-label"},Qw={class:"setting-item"},Hw={class:"setting-item"},Gw={class:"setting-item column"},Yw={class:"setting-item column"},Vw={class:"sub-label"},Ww={class:"setting-item column"},zw={class:"sub-label"},jw={class:"setting-item column"},$w={class:"sub-label"},Kw={class:"setting-item column"},qw={style:{display:"flex",gap:"8px","margin-bottom":"8px"}},Xw=["onClick","title"],Jw={style:{display:"flex",gap:"8px","align-items":"center"}},Zw={key:3,class:"section"},eb={class:"setting-item"},tb={class:"setting-item column"},Gn=Ne(d.defineComponent({__name:"LeitingSetting",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean,default:!1},tiandituToken:{type:String,default:""},initialConfig:{type:Object,default:()=>({})}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){ze.locale("zh-cn"),ze.extend(rw),ze.extend(dw),ze.extend(pw),ze.extend(yw);const t=ye.Switch,i=ye.Radio.Group,s=ye.Radio,o=ye.Input,r=ye.Slider,l=ye.Select,a=ye.Select.Option,c=ye.DatePicker,u=n,f=e,p=d.inject("leitingMethods"),h=d.computed({get:()=>u.open!==void 0?u.open:u.visible,set:v=>{f("update:visible",v),f("update:open",v)}}),A=d.ref("GIS"),C=d.reactive({globe:!1,terrain:!1,depthTest:!1}),m=d.reactive({provider:"tianditu",tianditu:{token:"c25f14fb6bd4397cf8fe45144ff768d6",layerType:"img_w",showLabel:!1},arcgis:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},baseMap:"tianditu"}),y=d.reactive({shadows:!1,shadowDarkness:.7,environmentMap:!1,ambientOcclusion:!1,time:ze("2025-06-22 10:00"),brightness:1.5,contrast:1,saturation:1,backgroundColor:"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)"}),E=d.reactive({collision:!1,habit:0}),I=v=>{v&&(v.globe!==void 0&&(C.globe=v.globe),v.terrain!==void 0&&(C.terrain=v.terrain),v.depthTest!==void 0&&(C.depthTest=v.depthTest),v.mapProvider!==void 0&&(m.provider=v.mapProvider),v.tiandituLayerType!==void 0&&(m.tianditu.layerType=v.tiandituLayerType),v.tiandituShowLabel!==void 0&&(m.tianditu.showLabel=v.tiandituShowLabel),v.arcgisUrl!==void 0&&(m.arcgis.url=v.arcgisUrl),v.shadows!==void 0&&(y.shadows=v.shadows),v.shadowDarkness!==void 0&&(y.shadowDarkness=v.shadowDarkness),v.environmentMap!==void 0&&(y.environmentMap=v.environmentMap),v.ambientOcclusion!==void 0&&(y.ambientOcclusion=v.ambientOcclusion),v.time!==void 0&&(typeof v.time=="number"?y.time=ze().startOf("day").add(v.time,"hour"):y.time=ze(v.time)),v.brightness!==void 0&&(y.brightness=v.brightness),v.contrast!==void 0&&(y.contrast=v.contrast),v.saturation!==void 0&&(y.saturation=v.saturation),v.backgroundColor!==void 0&&(y.backgroundColor=v.backgroundColor),v.collision!==void 0&&(E.collision=v.collision),v.mouseHabit!==void 0&&(E.habit=v.mouseHabit))};d.watch(()=>u.initialConfig,v=>{I(v)},{deep:!0,immediate:!0});const S=["linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)","linear-gradient(0deg, #0f2027 0%, #203a43 50%, #2c5364 100%)","linear-gradient(0deg, #cfd9df 0%, #e2ebf0 100%)"],k=[{label:"全球影像地图服务(墨卡托)",value:"img_w"},{label:"全球影像地图服务(经纬度)",value:"img_c"},{label:"全球矢量地图服务(墨卡托)",value:"vec_w"},{label:"全球矢量地图服务(经纬度)",value:"vec_c"},{label:"全球地形晕渲服务(墨卡托)",value:"ter_w"},{label:"全球地形晕渲服务(经纬度)",value:"ter_c"}],B=()=>{const v=m.provider,w={};v==="tianditu"?(w.token=m.tianditu.token,w.layerType=m.tianditu.layerType,w.showAnnotation=m.tianditu.showLabel):v==="arcgis"&&(w.url=m.arcgis.url),p.value?.changeBaseMap?.(v,w)};d.watch(()=>m.provider,B),d.watch(()=>m.tianditu.layerType,B),d.watch(()=>m.tianditu.showLabel,B),d.watch(()=>m.tianditu.token,hs(B,1e3)),d.watch(()=>m.arcgis.url,hs(B,1e3)),d.onMounted(()=>{u.tiandituToken&&(m.tianditu.token=u.tiandituToken)}),d.watch(()=>C.globe,v=>p.value?.setGlobeEnvironmentVisible?.(v)),d.watch(()=>C.terrain,v=>p.value?.setTerrainEnable?.(v)),d.watch(()=>C.depthTest,v=>p.value?.setDepthTestEnable?.(v)),d.watch(()=>p?.value,v=>{if(v){if(v.getConfigure=()=>({globe:C.globe,terrain:C.terrain,depthTest:C.depthTest,mapProvider:m.provider,tiandituLayerType:m.tianditu.layerType,tiandituShowLabel:m.tianditu.showLabel,arcgisUrl:m.arcgis.url,shadows:y.shadows,shadowDarkness:y.shadowDarkness,environmentMap:y.environmentMap,ambientOcclusion:y.ambientOcclusion,time:ze.isDayjs(y.time)?y.time.format("YYYY-MM-DD HH:mm"):y.time,brightness:y.brightness,contrast:y.contrast,saturation:y.saturation,backgroundColor:y.backgroundColor,collision:E.collision,mouseHabit:E.habit}),v.setConfigure=w=>{I(w)},v.setBackgroundColor&&y.backgroundColor&&v.setBackgroundColor(y.backgroundColor),v.setGlobeEnvironmentVisible&&v.setGlobeEnvironmentVisible(C.globe),v.setShadowsEnable&&v.setShadowsEnable(y.shadows),v.setShadowDarkness&&v.setShadowDarkness(y.shadowDarkness),v.setEnvironmentMapEnable&&v.setEnvironmentMapEnable(y.environmentMap),v.setAmbientOcclusion&&v.setAmbientOcclusion(y.ambientOcclusion),v.setTime){const w=ze.isDayjs(y.time)?y.time.toDate():new Date;v.setTime(w)}v.setModelBrightness&&v.setModelBrightness(y.brightness),v.setCollisionDetection&&v.setCollisionDetection(E.collision),v.setMouseHabit&&v.setMouseHabit(E.habit),v.changeBaseMap&&m.baseMap&&v.changeBaseMap(m.baseMap,{token:m.tianditu.token,layerType:m.tianditu.layerType,showAnnotation:m.tianditu.showLabel,url:m.arcgis.url})}},{immediate:!0});const x=d.computed({get:()=>{const v=y.backgroundColor;return/^#[0-9A-Fa-f]{6}$/.test(v)?v:"#ffffff"},set:v=>{y.backgroundColor=v}}),g=d.ref(""),R=d.ref(!1),M=d.ref([]);d.watch(()=>C.globe,v=>p.value?.setGlobeEnvironmentVisible?.(v)),d.watch(()=>C.terrain,v=>p.value?.setTerrainEnable?.(v)),d.watch(()=>m.baseMap,v=>{p.value?.changeBaseMap?.(v,{token:u.tiandituToken})}),d.watch(()=>y.shadows,v=>p.value?.setShadowsEnable?.(v)),d.watch(()=>y.shadowDarkness,v=>p.value?.setShadowDarkness?.(v)),d.watch(()=>y.environmentMap,v=>p.value?.setEnvironmentMapEnable?.(v)),d.watch(()=>y.ambientOcclusion,v=>p.value?.setAmbientOcclusion?.(v)),d.watch(()=>y.time,v=>{const w=ze.isDayjs(v)?v.toDate():new Date;p.value?.setTime?.(w)}),d.watch(()=>[y.brightness,y.contrast,y.saturation],([v,w,b])=>{const T=p.value;T?.setModelColorAdjustment?T.setModelColorAdjustment({brightness:v,contrast:w,saturation:b}):T?.setModelBrightness?.(v)}),d.watch(()=>y.backgroundColor,v=>{if(p.value?.setBackgroundColor)p.value.setBackgroundColor(v);else{const w=document.querySelector(".cesium-viewer");w&&(w.style.background=v)}}),d.watch(()=>E.collision,v=>p.value?.setCollisionDetection?.(v)),d.watch(()=>E.habit,v=>p.value?.setMouseHabit?.(v));const F=v=>{if(v?.pois&&Array.isArray(v.pois)&&v.pois.length>0){const w=v.pois[0],b=w.lonlat.split(/[, ]/).map(Number);if(b.length>=2&&!isNaN(b[0])&&!isNaN(b[1]))return{name:w.name,lon:b[0],lat:b[1],raw:w}}if(v?.area&&v.area.lonlat){const w=v.area,b=w.lonlat.split(/[, ]/).map(Number);if(b.length>=2&&!isNaN(b[0])&&!isNaN(b[1]))return{name:w.name,lon:b[0],lat:b[1],raw:w}}return null},G=hs(async()=>{const v=(g.value||"").trim();if(!v)return;const w=u.tiandituToken||"c25f14fb6bd4397cf8fe45144ff768d6";R.value=!0,M.value=[];try{if(p.value?.searchLocation){const b=await p.value.searchLocation(v,w),T=F(b);T&&(M.value=[T],de.success(`找到:${T.name||""}`),p.value.flyTo(T.lon,T.lat,5e3))}else{const T=`https://api.tianditu.gov.cn/v2/search?postStr=${encodeURIComponent(JSON.stringify({keyWord:v,level:12,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10}))}&type=query&tk=${encodeURIComponent(w)}`,P=await fetch(T);if(!P.ok)throw new Error(`HTTP ${P.status}`);const _=await P.json(),O=F(_);O&&(M.value=[O],de.success(`找到:${O.name||""}`),p.value?.flyTo?.(O.lon,O.lat,5e3))}}catch(b){console.error("tianditu search error",b)}finally{R.value=!1}},800);d.watch(g,()=>{G()});const N=()=>{h.value=!1,f("close")};return d.onMounted(()=>{}),(v,w)=>(d.openBlock(),d.createBlock(Fe,{visible:h.value,title:"设置","full-height":n.fullHeight,onClose:N,"onUpdate:visible":w[26]||(w[26]=b=>h.value=b)},{default:d.withCtx(()=>[d.createElementVNode("div",Cw,[d.createElementVNode("div",Ew,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="GIS"}]),onClick:w[0]||(w[0]=b=>A.value="GIS")},"GIS",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="MAP"}]),onClick:w[1]||(w[1]=b=>A.value="MAP")},"地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="RENDER"}]),onClick:w[2]||(w[2]=b=>A.value="RENDER")},"渲染",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="MOUSE"}]),onClick:w[3]||(w[3]=b=>A.value="MOUSE")},"鼠标",2)]),d.createElementVNode("div",ww,[A.value==="GIS"?(d.openBlock(),d.createElementBlock("div",bw,[d.createElementVNode("div",vw,[w[27]||(w[27]=d.createElementVNode("span",null,"地球 (含大气/日月/星空)",-1)),d.createVNode(d.unref(t),{checked:C.globe,"onUpdate:checked":w[4]||(w[4]=b=>C.globe=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Iw,[w[28]||(w[28]=d.createElementVNode("span",null,"地形 (高程)",-1)),d.createVNode(d.unref(t),{checked:C.terrain,"onUpdate:checked":w[5]||(w[5]=b=>C.terrain=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",xw,[w[29]||(w[29]=d.createElementVNode("span",null,"地形遮挡",-1)),d.createVNode(d.unref(t),{checked:C.depthTest,"onUpdate:checked":w[6]||(w[6]=b=>C.depthTest=b),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),A.value==="MAP"?(d.openBlock(),d.createElementBlock("div",Bw,[d.createElementVNode("div",Sw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.provider==="tianditu"}]),onClick:w[7]||(w[7]=b=>m.provider="tianditu")},"天地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.provider==="arcgis"}]),onClick:w[8]||(w[8]=b=>m.provider="arcgis")},"ArcGIS",2)]),m.provider==="tianditu"?(d.openBlock(),d.createElementBlock("div",Mw,[d.createElementVNode("div",Tw,[w[30]||(w[30]=d.createElementVNode("div",{class:"sub-label"},"Token",-1)),d.createVNode(d.unref(o),{value:m.tianditu.token,"onUpdate:value":w[9]||(w[9]=b=>m.tianditu.token=b),size:"small",placeholder:"输入天地图Token"},null,8,["value"])]),d.createElementVNode("div",Dw,[w[31]||(w[31]=d.createElementVNode("div",{class:"sub-label"},"地图风格",-1)),d.createVNode(d.unref(l),{value:m.tianditu.layerType,"onUpdate:value":w[10]||(w[10]=b=>m.tianditu.layerType=b),size:"small",style:{width:"100%"}},{default:d.withCtx(()=>[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(k,b=>d.createVNode(d.unref(a),{key:b.value,value:b.value},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(b.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),d.createElementVNode("div",kw,[w[32]||(w[32]=d.createElementVNode("span",null,"叠加注记",-1)),d.createVNode(d.unref(t),{checked:m.tianditu.showLabel,"onUpdate:checked":w[11]||(w[11]=b=>m.tianditu.showLabel=b),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),m.provider==="arcgis"?(d.openBlock(),d.createElementBlock("div",Pw,[d.createElementVNode("div",Fw,[w[33]||(w[33]=d.createElementVNode("div",{class:"sub-label"},"服务地址",-1)),d.createVNode(d.unref(o),{value:m.arcgis.url,"onUpdate:value":w[12]||(w[12]=b=>m.arcgis.url=b),size:"small",placeholder:"输入ArcGIS MapServer地址"},null,8,["value"])])])):d.createCommentVNode("",!0),d.createElementVNode("div",Rw,[w[34]||(w[34]=d.createElementVNode("div",{class:"sub-label"},"位置搜索 (天地图)",-1)),d.createElementVNode("div",Ow,[d.createVNode(d.unref(o),{value:g.value,"onUpdate:value":w[13]||(w[13]=b=>g.value=b),placeholder:"输入地名搜索",size:"small","allow-clear":""},null,8,["value"])])])])):d.createCommentVNode("",!0),A.value==="RENDER"?(d.openBlock(),d.createElementBlock("div",Lw,[d.createElementVNode("div",Nw,[w[35]||(w[35]=d.createElementVNode("span",null,"阴影",-1)),d.createVNode(d.unref(t),{checked:y.shadows,"onUpdate:checked":w[14]||(w[14]=b=>y.shadows=b),size:"small"},null,8,["checked"])]),y.shadows?(d.openBlock(),d.createElementBlock("div",Uw,[d.createElementVNode("div",_w,"阴影暗度 ("+d.toDisplayString(y.shadowDarkness.toFixed(2))+")",1),d.createVNode(d.unref(r),{value:y.shadowDarkness,"onUpdate:value":w[15]||(w[15]=b=>y.shadowDarkness=b),min:0,max:1,step:.05,size:"small"},null,8,["value"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Qw,[w[36]||(w[36]=d.createElementVNode("span",null,"环境贴图 (HDR)",-1)),d.createVNode(d.unref(t),{checked:y.environmentMap,"onUpdate:checked":w[16]||(w[16]=b=>y.environmentMap=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Hw,[w[37]||(w[37]=d.createElementVNode("span",null,"环境光遮蔽 (AO)",-1)),d.createVNode(d.unref(t),{checked:y.ambientOcclusion,"onUpdate:checked":w[17]||(w[17]=b=>y.ambientOcclusion=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Gw,[w[38]||(w[38]=d.createElementVNode("div",{class:"sub-label"},"日期时间",-1)),d.createVNode(d.unref(c),{value:y.time,"onUpdate:value":w[18]||(w[18]=b=>y.time=b),"show-time":"",locale:d.unref(ac),format:"YYYY-MM-DD HH:mm",size:"small",style:{width:"100%"}},null,8,["value","locale"])]),d.createElementVNode("div",Yw,[d.createElementVNode("div",Vw,"模型亮度 ("+d.toDisplayString(y.brightness.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.brightness,"onUpdate:value":w[19]||(w[19]=b=>y.brightness=b),min:0,max:5,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Ww,[d.createElementVNode("div",zw,"模型对比度 ("+d.toDisplayString(y.contrast.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.contrast,"onUpdate:value":w[20]||(w[20]=b=>y.contrast=b),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",jw,[d.createElementVNode("div",$w,"模型饱和度 ("+d.toDisplayString(y.saturation.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.saturation,"onUpdate:value":w[21]||(w[21]=b=>y.saturation=b),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Kw,[w[39]||(w[39]=d.createElementVNode("div",{class:"sub-label"},"背景颜色",-1)),d.createElementVNode("div",qw,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(S,(b,T)=>d.createElementVNode("div",{key:T,style:d.normalizeStyle({background:b,width:"32px",height:"24px",borderRadius:"2px",cursor:"pointer",border:"1px solid #d9d9d9",flexShrink:0}),onClick:P=>y.backgroundColor=b,title:"预设 "+(T+1)},null,12,Xw)),64))]),d.createElementVNode("div",Jw,[d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":w[22]||(w[22]=b=>x.value=b),style:{width:"40px",height:"24px",padding:"0",border:"1px solid #d9d9d9"}},null,512),[[d.vModelText,x.value]]),d.createVNode(d.unref(o),{value:y.backgroundColor,"onUpdate:value":w[23]||(w[23]=b=>y.backgroundColor=b),size:"small",style:{flex:"1"},placeholder:"CSS 颜色值"},null,8,["value"])])])])):d.createCommentVNode("",!0),A.value==="MOUSE"?(d.openBlock(),d.createElementBlock("div",Zw,[d.createElementVNode("div",eb,[w[40]||(w[40]=d.createElementVNode("span",null,"碰撞检测",-1)),d.createVNode(d.unref(t),{checked:E.collision,"onUpdate:checked":w[24]||(w[24]=b=>E.collision=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",tb,[w[43]||(w[43]=d.createElementVNode("div",{class:"sub-label"},"操作习惯",-1)),d.createVNode(d.unref(i),{value:E.habit,"onUpdate:value":w[25]||(w[25]=b=>E.habit=b),size:"small"},{default:d.withCtx(()=>[d.createVNode(d.unref(s),{value:0},{default:d.withCtx(()=>[...w[41]||(w[41]=[d.createTextVNode("默认 (中键旋转)",-1)])]),_:1}),d.createVNode(d.unref(s),{value:1},{default:d.withCtx(()=>[...w[42]||(w[42]=[d.createTextVNode("习惯1 (左键旋转)",-1)])]),_:1})]),_:1},8,["value"])])])):d.createCommentVNode("",!0)])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-1ed17be9"]]),nb={class:"cad-layer-panel"},ib={class:"layer-list-container"},sb={class:"list-header"},ob={class:"col-check"},rb=["checked"],ab={class:"list-body"},lb={class:"col-check"},cb=["checked","onChange"],db={class:"col-index"},ub=["title"],hb={class:"col-color"},fb=["value"],pb={key:0,class:"empty-text"},gb=Ne(d.defineComponent({__name:"LeitingCadLayer",props:{visible:{type:Boolean,default:!1},currentModelId:{type:String,default:""}},emits:["update:visible","handleCloseCardByCadCard"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(""),r=d.ref([]),l=()=>{s.value&&s.value.getDxfModels&&(r.value=s.value.getDxfModels().map(E=>({modelId:E.modelId,modelName:E.modelName}))||[])},a=d.computed(()=>r.value.map(E=>({value:E.modelId,label:E.modelName}))),c=d.ref([]),u=d.ref([]),f=d.computed(()=>c.value.length>0&&u.value.length===c.value.length),p=({modelId:E})=>{if(c.value=[],u.value=[],s.value&&s.value.getDxfLayers){const I=s.value.getDxfLayers({modelId:E});I&&Object.keys(I).forEach((S,k)=>{I[S].length&&(c.value.push({index:k+1,layerName:S,layerColor:I[S][0].color||"#ffffff",key:S}),u.value.push(S))})}},h=E=>{o.value=E,p({modelId:E})},A=E=>{E.target.checked?u.value=c.value.map(S=>S.key):u.value=[],m()},C=(E,I)=>{I.target.checked?u.value.includes(E)||u.value.push(E):u.value=u.value.filter(k=>k!==E),m()},m=()=>{if(s.value&&s.value.showDxfLayer&&(s.value.showDxfLayer({modelId:o.value,show:!0,layers:u.value}),s.value.getDxfLayers)){const E=s.value.getDxfLayers({modelId:o.value});if(E){const I=Object.keys(E).filter(S=>!u.value.includes(S));s.value.showDxfLayer({modelId:o.value,show:!1,layers:I})}}},y=()=>{i("update:visible",!1),i("handleCloseCardByCadCard")};return d.watch(()=>t.visible,E=>{E&&(l(),t.currentModelId?(o.value=t.currentModelId,p({modelId:t.currentModelId})):a.value.length>0&&(o.value=a.value[0]?.value,p({modelId:o.value})))}),d.watch(()=>t.currentModelId,E=>{E&&t.visible&&(o.value=E,p({modelId:E}))}),(E,I)=>(d.openBlock(),d.createBlock(Fe,{visible:n.visible,title:"CAD图层","onUpdate:visible":I[3]||(I[3]=S=>E.$emit("update:visible",S)),onClose:y,width:360,align:"right","initial-position":{x:0,y:60}},{"header-extra":d.withCtx(()=>[d.createElementVNode("div",{class:"header-select-container",onMousedown:I[2]||(I[2]=d.withModifiers(()=>{},["stop"]))},[I[4]||(I[4]=d.createElementVNode("span",{class:"header-label"},"图纸:",-1)),d.createVNode(d.unref(ye.Select),{value:o.value,"onUpdate:value":I[0]||(I[0]=S=>o.value=S),options:a.value,onChange:I[1]||(I[1]=S=>h(S)),placeholder:"选择模型",style:{width:"140px"},bordered:!1,class:"custom-header-select",popupClassName:"leiting-select-dropdown",size:"small"},null,8,["value","options"])],32)]),default:d.withCtx(()=>[d.createElementVNode("div",nb,[d.createElementVNode("div",ib,[d.createElementVNode("div",sb,[d.createElementVNode("div",ob,[d.createElementVNode("input",{type:"checkbox",checked:f.value,onChange:A},null,40,rb)]),I[5]||(I[5]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),I[6]||(I[6]=d.createElementVNode("div",{class:"col-name"},"图层名称",-1)),I[7]||(I[7]=d.createElementVNode("div",{class:"col-color"},"颜色",-1))]),d.createElementVNode("div",ab,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,S=>(d.openBlock(),d.createElementBlock("div",{key:S.key,class:"list-item"},[d.createElementVNode("div",lb,[d.createElementVNode("input",{type:"checkbox",checked:u.value.includes(S.key),onChange:k=>C(S.key,k)},null,40,cb)]),d.createElementVNode("div",db,d.toDisplayString(S.index),1),d.createElementVNode("div",{class:"col-name",title:S.layerName},d.toDisplayString(S.layerName),9,ub),d.createElementVNode("div",hb,[d.createElementVNode("input",{type:"color",value:S.layerColor,disabled:""},null,8,fb)])]))),128)),c.value.length===0?(d.openBlock(),d.createElementBlock("div",pb,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-a4db4977"]]),mb={class:"adjust-panel"},Ab={class:"control-panel"},yb={class:"form-item"},Cb={class:"radio-group"},Eb={class:"form-item"},wb=["title"],bb={class:"param-row"},vb=["step"],Ib={class:"param-row"},xb=["step"],Bb={class:"param-row"},Sb=["step"],Mb={class:"param-row"},Tb=["step"],Db={class:"param-row"},kb=["step"],Pb={class:"param-row"},Fb=["step"],Rb={class:"param-row"},Ob=["step"],Lb={class:"button-grid"},Nb={key:1,class:"pick-mode-ui"},Ub=["onClick"],_b=["checked"],Qb={style:{"font-size":"12px",color:"#aaa","padding-left":"10px"}},Hb={class:"param-row"},Gb={style:{width:"40px"}},Yb=["onUpdate:modelValue"],Vb={class:"param-row"},Wb={style:{width:"40px"}},zb=["onUpdate:modelValue"],jb={class:"param-row"},$b={style:{width:"40px"}},Kb=["onUpdate:modelValue"],qb={class:"list-panel"},Xb={class:"list-header"},Jb={class:"col-check"},Zb=["checked"],ev={class:"list-body"},tv={class:"col-check"},nv=["onUpdate:modelValue"],iv={class:"col-index"},sv=["title"],ov={class:"col-main"},rv=["checked","onChange"],av={key:0,style:{padding:"10px","text-align":"center",color:"#999"}},lv=Ne(d.defineComponent({__name:"LeitingCadPosition",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","handleSavingByCadCard","clearBimPointList","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.inject("leitingMethods"),r=d.ref([]),l=d.ref(""),a=d.computed(()=>r.value.length>0&&r.value.every(w=>w.selected)),c=d.ref("param"),u=d.ref("bimPoint1"),f=d.ref(null),p=d.ref("bimPoint1"),h=d.reactive({bimPoint1:{longitude:void 0,latitude:void 0,type:"CAD标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0},bimPoint2:{longitude:void 0,latitude:void 0,type:"地图标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0}}),A=d.ref(1e-6),C=d.reactive({modelId:"",longitude:0,latitude:0,distance:1e-6,rotation:1,totalRotation:0,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0}),m=d.computed(()=>{const w=r.value.find(b=>b.modelId===l.value);return w?w.modelName:""}),y=()=>{s("update:visible",!1)},E=()=>(!f.value&&o?.value?.getViewer&&o?.value?.getCesium&&(f.value=new rc(o.value.getViewer(),o.value.getCesium())),f.value),I=()=>{E()?.clearMarkers(),h.bimPoint1.longitude=void 0,h.bimPoint1.latitude=void 0,h.bimPoint1.height=void 0,h.bimPoint2.longitude=void 0,h.bimPoint2.latitude=void 0,h.bimPoint2.height=void 0},S=w=>{const b=u.value,T=h[b];if(T){T.longitude=w.longitude,T.latitude=w.latitude,T.height=w.height;const P=b==="bimPoint1"?"BIM":"MAP";E()?.addMarker(P,w),de.success(`${T.type}已添加`)}},k=()=>{E()?.registerPickHandler(w=>{S(w)})},B=()=>{E()?.destroyPickHandler()},x=w=>{c.value=w,w!=="pick"&&s("clearBimPointList")};d.watch(()=>c.value,w=>{w==="pick"?k():B()}),d.onUnmounted(()=>{B()});const g=()=>{if(!o?.value?.getDxfModels)return;const w=o.value.getDxfModels();if(Array.isArray(w)?r.value=w.map(b=>({modelId:b.modelId,modelName:b.modelName,formData:b.formData||{},selected:!1,tileset:b})):r.value=[],r.value.length>0){const b=o.value.getCadModelId?o.value.getCadModelId():"";b&&r.value.find(T=>T.modelId===b)?R(b):R(r.value[0].modelId),r.value.forEach(T=>T.selected=!0)}},R=w=>{l.value=w;const b=r.value.find(T=>T.modelId===w);b&&b.formData&&Object.keys(C).forEach(T=>{b.formData[T]!==void 0&&(C[T]=b.formData[T])})},M=(w,b)=>{if(!o?.value?.adjustingModelByCad)return;const T=r.value.find(P=>P.modelId===w);T&&T.tileset&&(T.formData={...T.formData,...b},T.tileset.formData=T.formData,o.value.adjustingModelByCad({...T.formData,tileset:T.tileset}))},F=w=>{if(!l.value)return;const b=C[w];M(l.value,{[w]:b})},L=w=>{const b=r.value.filter(O=>O.selected);if(b.length===0){de.warning("请先选择要调整的模型");return}const{distance:T,heightDistance:P,rotation:_}=C;b.forEach(O=>{const D={...O.formData};switch(w){case"north":D.latitude+=T;break;case"south":D.latitude-=T;break;case"east":D.longitude+=T;break;case"west":D.longitude-=T;break;case"up":D.height+=P;break;case"down":D.height-=P;break;case"rotateLeft":D.totalRotation=(D.totalRotation||0)-_;break;case"rotateRight":D.totalRotation=(D.totalRotation||0)+_;break}O.modelId===l.value&&Object.assign(C,D),M(O.modelId,D)})},G=w=>{const b=w.target.checked;r.value.forEach(T=>T.selected=b)},N=()=>{s("handleSavingByCadCard",r.value),s("save",r.value)},v=()=>{const w=h.bimPoint1,b=h.bimPoint2;if(w.longitude===void 0||b.longitude===void 0){de.warning("请先完成点选操作");return}const T=r.value.filter(U=>U.selected);if(T.length===0){de.warning("请先选择要调整的模型");return}let P=0,_=0,O=0;const D=E();if(D){const{dLon:U,dLat:V,dHeight:$}=D.calculateOffset(w,b);P=U,_=V,O=$}else P=b.longitude-w.longitude,_=b.latitude-w.latitude,O=b.height-w.height;T.forEach(U=>{const V={...U.formData};V.longitude+=P,V.latitude+=_,V.height+=O,U.modelId===l.value&&Object.assign(C,V),M(U.modelId,V)}),de.success("位置已调整")};return d.watch(()=>i.visible,w=>{w?g():(B(),I())}),d.onMounted(()=>{i.visible&&g()}),e({setBIMPointsList:({longitude:w,latitude:b,height:T})=>{h[p.value].longitude=w,h[p.value].latitude=b,h[p.value].height=T},addGltfOr3dTilesModelList:w=>{console.warn("addGltfOr3dTilesModelList is deprecated, use internal loading")}}),(w,b)=>(d.openBlock(),d.createBlock(Fe,{visible:i.visible,title:"Cad校准",width:282,height:600,"onUpdate:visible":b[21]||(b[21]=T=>s("update:visible",T)),onClose:y},{default:d.withCtx(()=>[d.createElementVNode("div",mb,[d.createElementVNode("div",Ab,[d.createElementVNode("div",yb,[b[22]||(b[22]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",Cb,[d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="param"}),onClick:b[0]||(b[0]=T=>x("param"))},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="pick"}),onClick:b[1]||(b[1]=T=>x("pick"))},"地图点选",2)])]),d.createElementVNode("div",Eb,[b[23]||(b[23]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",{class:"value",title:m.value},d.toDisplayString(m.value||"未选择"),9,wb)]),b[35]||(b[35]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[b[31]||(b[31]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",bb,[b[24]||(b[24]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[2]||(b[2]=T=>C.longitude=T),onChange:b[3]||(b[3]=T=>F("longitude")),step:A.value},null,40,vb),[[d.vModelText,C.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",Ib,[b[25]||(b[25]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[4]||(b[4]=T=>C.latitude=T),onChange:b[5]||(b[5]=T=>F("latitude")),step:A.value},null,40,xb),[[d.vModelText,C.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",Bb,[b[26]||(b[26]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[6]||(b[6]=T=>C.height=T),onChange:b[7]||(b[7]=T=>F("height")),step:A.value},null,40,Sb),[[d.vModelText,C.height,void 0,{number:!0}]])]),d.createElementVNode("div",Mb,[b[27]||(b[27]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[8]||(b[8]=T=>C.totalRotation=T),onChange:b[9]||(b[9]=T=>F("totalRotation")),step:A.value},null,40,Tb),[[d.vModelText,C.totalRotation,void 0,{number:!0}]])]),b[32]||(b[32]=d.createElementVNode("div",{class:"separator"},null,-1)),b[33]||(b[33]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",Db,[b[28]||(b[28]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[10]||(b[10]=T=>C.distance=T),step:A.value},null,8,kb),[[d.vModelText,C.distance,void 0,{number:!0}]])]),d.createElementVNode("div",Pb,[b[29]||(b[29]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[11]||(b[11]=T=>C.heightDistance=T),step:A.value},null,8,Fb),[[d.vModelText,C.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",Rb,[b[30]||(b[30]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[12]||(b[12]=T=>C.rotation=T),step:A.value},null,8,Ob),[[d.vModelText,C.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",Lb,[d.createElementVNode("button",{onClick:b[13]||(b[13]=T=>L("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:b[14]||(b[14]=T=>L("north"))},"北移"),d.createElementVNode("button",{onClick:b[15]||(b[15]=T=>L("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:b[16]||(b[16]=T=>L("west"))},"西移"),d.createElementVNode("button",{onClick:b[17]||(b[17]=T=>L("south"))},"南移"),d.createElementVNode("button",{onClick:b[18]||(b[18]=T=>L("east"))},"东移"),d.createElementVNode("button",{onClick:b[19]||(b[19]=T=>L("up"))},"上移"),d.createElementVNode("button",{onClick:b[20]||(b[20]=T=>L("down"))},"下移"),d.createElementVNode("button",{onClick:N,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):(d.openBlock(),d.createElementBlock("div",Nb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(h,(T,P)=>(d.openBlock(),d.createElementBlock("div",{key:P,class:"form-item",style:{display:"block","margin-bottom":"15px"}},[d.createElementVNode("div",{style:{"font-weight":"bold","margin-bottom":"5px",cursor:"pointer",display:"flex","align-items":"center"},onClick:_=>u.value=P},[d.createElementVNode("input",{type:"radio",checked:u.value===P,style:{"margin-right":"5px"}},null,8,_b),d.createTextVNode(" "+d.toDisplayString(T.type)+": ",1)],8,Ub),d.createElementVNode("div",Qb,[d.createElementVNode("div",Hb,[d.createElementVNode("label",Gb,d.toDisplayString(T.longitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>T.longitude=_,readonly:"",style:{width:"100px"}},null,8,Yb),[[d.vModelText,T.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",Vb,[d.createElementVNode("label",Wb,d.toDisplayString(T.latitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>T.latitude=_,readonly:"",style:{width:"100px"}},null,8,zb),[[d.vModelText,T.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",jb,[d.createElementVNode("label",$b,d.toDisplayString(T.heightText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>T.height=_,readonly:"",style:{width:"100px"}},null,8,Kb),[[d.vModelText,T.height,void 0,{number:!0}]])])])]))),128)),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:v,class:"primary-btn"},"应用校准"),d.createElementVNode("button",{onClick:N},"保存")]),b[34]||(b[34]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 CAD 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“应用校准”进行校准。")],-1))]))]),d.createElementVNode("div",qb,[d.createElementVNode("div",Xb,[d.createElementVNode("div",Jb,[d.createElementVNode("input",{type:"checkbox",checked:a.value,onChange:G},null,40,Zb)]),b[36]||(b[36]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),b[37]||(b[37]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),b[38]||(b[38]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",ev,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(T,P)=>(d.openBlock(),d.createElementBlock("div",{key:T.modelId,class:d.normalizeClass(["list-item",{active:T.modelId===l.value}])},[d.createElementVNode("div",tv,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":_=>T.selected=_},null,8,nv),[[d.vModelCheckbox,T.selected]])]),d.createElementVNode("div",iv,d.toDisplayString(P+1),1),d.createElementVNode("div",{class:"col-name",title:T.modelName},d.toDisplayString(T.modelName),9,sv),d.createElementVNode("div",ov,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:T.modelId===l.value,onChange:_=>R(T.modelId)},null,40,rv)])],2))),128)),r.value.length===0?(d.openBlock(),d.createElementBlock("div",av,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-e8abd49d"]]),cv={class:"annotation-content"},dv={class:"annotation-tools"},uv={class:"annotation-controls"},hv={class:"control-group",title:"颜色"},fv={class:"tool-item color-tool"},pv={class:"control-group line-width-container",title:"线宽"},gv=["onClick"],mv={class:"option-label"},Av=Ne(d.defineComponent({__name:"LeitingAnnotationCard",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(""),r=d.ref("#ff0000"),l=d.ref(1),a=d.ref(!1),c=d.ref(null),u=d.ref(null),f=d.ref({top:"0px",left:"0px"}),p=[{value:6,label:"粗"},{value:3,label:"中"},{value:1,label:"细"}],h=()=>s?.value?.getAnnotationInstance?s.value.getAnnotationInstance():null,A=()=>{i("update:visible",!1)},C=x=>{o.value=x;const g=h();if(g)switch(x){case"freehandLine":g.startFreehandLine();break;case"arrow":g.startArrow();break;case"straightLine":g.startStraightLine();break;case"rectangle":g.startRectangle();break;case"ellipse":g.startEllipse();break}},m=()=>{const x=h();x&&(x.setCurrentColor(r.value),x.changeColor(r.value))},y=()=>{if(!a.value&&c.value){const x=c.value.getBoundingClientRect();f.value={top:`${x.top}px`,left:`${x.right+8}px`}}a.value=!a.value},E=x=>{l.value=x,a.value=!1;const g=h();g&&(g.setCurrentWidth(x),g.changeWidth(x))},I=()=>{const x=h();x&&x.deleteSelectedEntity()},S=()=>{const x=h();x&&x.clearAll()},k=()=>{if(s?.value?.saveAnnotations){s.value.saveAnnotations();return}const x=h();x&&x.saveAnnotations()},B=x=>{const g=x.target,R=c.value&&c.value.contains(g),M=u.value&&u.value.contains(g);!R&&!M&&(a.value=!1)};return d.onMounted(()=>{document.addEventListener("click",B)}),d.onUnmounted(()=>{document.removeEventListener("click",B)}),(x,g)=>(d.openBlock(),d.createBlock(Fe,{visible:t.visible,title:"标注",width:70,"min-width":70,height:480,"onUpdate:visible":g[6]||(g[6]=R=>i("update:visible",R)),onClose:A},{default:d.withCtx(()=>[d.createElementVNode("div",cv,[d.createElementVNode("div",dv,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="freehandLine"}]),onClick:g[0]||(g[0]=R=>C("freehandLine")),title:"手绘线"},[...g[7]||(g[7]=[d.createElementVNode("div",{class:"tool-icon"},"✏️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="arrow"}]),onClick:g[1]||(g[1]=R=>C("arrow")),title:"箭头"},[...g[8]||(g[8]=[d.createElementVNode("div",{class:"tool-icon"},"↗️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="straightLine"}]),onClick:g[2]||(g[2]=R=>C("straightLine")),title:"直线"},[...g[9]||(g[9]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="rectangle"}]),onClick:g[3]||(g[3]=R=>C("rectangle")),title:"矩形"},[...g[10]||(g[10]=[d.createElementVNode("div",{class:"tool-icon"},"▭",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="ellipse"}]),onClick:g[4]||(g[4]=R=>C("ellipse")),title:"椭圆"},[...g[11]||(g[11]=[d.createElementVNode("div",{class:"tool-icon"},"⭕",-1)])],2)]),g[13]||(g[13]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",uv,[d.createElementVNode("div",hv,[d.createElementVNode("div",fv,[d.createElementVNode("div",{class:"color-swatch",style:d.normalizeStyle({backgroundColor:r.value})},null,4),d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":g[5]||(g[5]=R=>r.value=R),onChange:m,class:"color-input-overlay"},null,544),[[d.vModelText,r.value]])])]),d.createElementVNode("div",pv,[d.createElementVNode("div",{ref_key:"lineWidthBtnRef",ref:c,class:"tool-item",onClick:d.withModifiers(y,["stop"])},[d.createElementVNode("div",{class:"current-width-preview",style:d.normalizeStyle({height:l.value+"px",backgroundColor:"#fff"})},null,4)],512),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[a.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:u,class:"line-width-dropdown",style:d.normalizeStyle(f.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(p,R=>d.createElementVNode("div",{key:R.value,class:d.normalizeClass(["line-width-option",{selected:l.value===R.value}]),onClick:d.withModifiers(M=>E(R.value),["stop"])},[d.createElementVNode("span",mv,d.toDisplayString(R.label),1),d.createElementVNode("div",{class:"line-preview",style:d.normalizeStyle({height:R.value+"px",backgroundColor:l.value===R.value?"#1890ff":"#ddd"})},null,4)],10,gv)),64))],4)):d.createCommentVNode("",!0)]))]),g[12]||(g[12]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("button",{class:"control-btn",onClick:I,title:"删除选中"}," 🗑️ "),d.createElementVNode("button",{class:"control-btn",onClick:S,title:"清空"}," ❌ "),d.createElementVNode("button",{class:"control-btn",onClick:k,title:"保存"}," 💾 ")])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-3cfc8415"]]),yv={class:"measure-content"},Cv={class:"measure-tools"},Ev={key:0,class:"measure-results"},wv={class:"result-row"},bv={class:"result-value"},vv={class:"result-row"},Iv={class:"result-value"},xv={class:"result-row"},Bv={class:"result-value"},Sv={class:"result-row"},Mv={class:"result-value"},Tv={key:1,class:"result-row"},Dv={class:"result-value"},kv={key:2,class:"result-row"},Pv={class:"result-value"},Fv={class:"measure-controls"},Rv={class:"control-group",title:"单位"},Ov={class:"unit-display"},Lv=["onClick"],Nv=Ne(d.defineComponent({__name:"LeitingMeasurement",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(null),r=d.ref(null),l=d.ref("m"),a=d.ref(!1),c=d.ref(null),u=d.ref(!1),f=d.ref({}),p=d.ref(null),h=[{label:"米 (m)",value:"m"},{label:"厘米 (cm)",value:"cm"},{label:"毫米 (mm)",value:"mm"}],A=x=>{const g=l.value;return g==="mm"?`${(x*1e3).toFixed(0)}mm`:g==="cm"?`${(x*100).toFixed(1)}cm`:`${x.toFixed(2)}m`},C=x=>x>1e6?`${(x/1e6).toFixed(2)} km²`:`${x.toFixed(2)} m²`,m=()=>{if(!o.value&&s.value?.getViewer){const x=s.value.getViewer(),g=s.value.getCesium();x&&g&&(o.value=new nc({viewer:x,cesium:g}),o.value.setUnit(l.value),o.value.setSnapping(a.value),o.value.onMeasure=R=>{c.value=R})}},y=x=>{o.value||m(),r.value===x?(r.value=null,o.value?.stop()):(r.value=x,o.value?.start(x))},E=x=>{l.value=x,u.value=!1},I=()=>{o.value&&(o.value.clearAll(),r.value=null,o.value.stop())},S=()=>{i("update:visible",!1)},k=x=>{if(u.value){u.value=!1;return}const R=x.currentTarget.getBoundingClientRect();f.value={position:"fixed",top:`${R.top}px`,left:`${R.right+5}px`,zIndex:3e3},u.value=!0},B=x=>{u.value&&p.value&&!p.value.contains(x.target)&&(u.value=!1)};return d.onMounted(()=>{document.addEventListener("click",B),t.visible&&d.nextTick(()=>m())}),d.onUnmounted(()=>{document.removeEventListener("click",B),o.value&&o.value.destroy()}),d.watch(()=>t.visible,x=>{x?d.nextTick(()=>m()):o.value&&(o.value.stop(),r.value=null)}),d.watch(s,x=>{x&&x.getViewer&&!o.value&&t.visible&&m()}),d.watch(l,x=>{o.value&&o.value.setUnit(x)}),(x,g)=>(d.openBlock(),d.createBlock(Fe,{visible:t.visible,title:"量算",width:70,"min-width":70,height:480,"onUpdate:visible":g[3]||(g[3]=R=>i("update:visible",R)),onClose:S},{default:d.withCtx(()=>[d.createElementVNode("div",yv,[d.createElementVNode("div",Cv,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="distance"}]),onClick:g[0]||(g[0]=R=>y("distance")),title:"距离测量"},[...g[4]||(g[4]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="angle"}]),onClick:g[1]||(g[1]=R=>y("angle")),title:"角度测量"},[...g[5]||(g[5]=[d.createElementVNode("div",{class:"tool-icon"},"📐",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="area"}]),onClick:g[2]||(g[2]=R=>y("area")),title:"面积测量"},[...g[6]||(g[6]=[d.createElementVNode("div",{class:"tool-icon"},"🔳",-1)])],2)]),g[15]||(g[15]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value?(d.openBlock(),d.createElementBlock("div",Ev,[c.value.type==="distance"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("div",wv,[g[7]||(g[7]=d.createElementVNode("span",{class:"result-label"},"总长:",-1)),d.createElementVNode("span",bv,d.toDisplayString(A(c.value.dist)),1)]),d.createElementVNode("div",vv,[g[8]||(g[8]=d.createElementVNode("span",{class:"result-label",style:{color:"#ff4d4f"}},"ΔX:",-1)),d.createElementVNode("span",Iv,d.toDisplayString(A(c.value.dx)),1)]),d.createElementVNode("div",xv,[g[9]||(g[9]=d.createElementVNode("span",{class:"result-label",style:{color:"#52c41a"}},"ΔY:",-1)),d.createElementVNode("span",Bv,d.toDisplayString(A(c.value.dy)),1)]),d.createElementVNode("div",Sv,[g[10]||(g[10]=d.createElementVNode("span",{class:"result-label",style:{color:"#1890ff"}},"ΔZ:",-1)),d.createElementVNode("span",Mv,d.toDisplayString(A(c.value.dz)),1)])],64)):d.createCommentVNode("",!0),c.value.type==="angle"?(d.openBlock(),d.createElementBlock("div",Tv,[g[11]||(g[11]=d.createElementVNode("span",{class:"result-label"},"角度:",-1)),d.createElementVNode("span",Dv,d.toDisplayString(c.value.angle.toFixed(1))+"°",1)])):d.createCommentVNode("",!0),c.value.type==="area"?(d.openBlock(),d.createElementBlock("div",kv,[g[12]||(g[12]=d.createElementVNode("span",{class:"result-label"},"面积:",-1)),d.createElementVNode("span",Pv,d.toDisplayString(C(c.value.area)),1)])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.createElementVNode("div",Fv,[d.createElementVNode("div",Rv,[d.createElementVNode("div",{class:"tool-item",onClick:d.withModifiers(k,["stop"])},[d.createElementVNode("div",Ov,d.toDisplayString(l.value),1)]),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[u.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"unitDropdownRef",ref:p,class:"unit-dropdown",style:d.normalizeStyle(f.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(h,R=>d.createElementVNode("div",{key:R.value,class:d.normalizeClass(["unit-option",{selected:l.value===R.value}]),onClick:d.withModifiers(M=>E(R.value),["stop"])},d.toDisplayString(R.label),11,Lv)),64))],4)):d.createCommentVNode("",!0)]))]),g[14]||(g[14]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("div",{class:"tool-item control-btn",onClick:I,title:"清空"},[...g[13]||(g[13]=[d.createElementVNode("div",{class:"tool-icon"},"🗑️",-1)])])])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-b766acb4"]]);function Uv(){const n=d.ref(!1),e=d.reactive({x:0,y:0}),t=d.ref([]),i=d.ref(null);return{visible:n,position:e,items:t,contextData:i,show:(a,c,u)=>{a instanceof MouseEvent?(a.preventDefault(),e.x=a.clientX,e.y=a.clientY):(e.x=a.x,e.y=a.y),t.value=c,i.value=u,n.value=!0},hide:()=>{n.value=!1},addItem:a=>{t.value.push(a)},removeItem:a=>{t.value=t.value.filter(c=>c.id!==a)}}}const _v=["onClick"],Qv={class:"menu-label"},Hv={key:0,class:"menu-arrow"},Gv=Ne(d.defineComponent({__name:"LeitingContextMenu",props:{visible:{type:Boolean},position:{},items:{}},emits:["update:visible","action"],setup(n,{emit:e}){const t=n,i=e,s=r=>{r.disabled||(r.action&&r.action(),i("action",r),i("update:visible",!1))},o=()=>{t.visible&&i("update:visible",!1)};return d.onMounted(()=>{document.addEventListener("click",o),document.addEventListener("contextmenu",r=>{r.target.closest(".leiting-context-menu")||o()})}),d.onUnmounted(()=>{document.removeEventListener("click",o)}),(r,l)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:"leiting-context-menu",style:d.normalizeStyle({left:n.position.x+"px",top:n.position.y+"px"}),onContextmenu:l[0]||(l[0]=d.withModifiers(()=>{},["prevent"]))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.items,a=>(d.openBlock(),d.createElementBlock("div",{key:a.id,class:d.normalizeClass(["menu-item",{"menu-divided":a.divided,"menu-disabled":a.disabled}]),onClick:c=>s(a)},[d.createElementVNode("span",Qv,d.toDisplayString(a.label),1),a.children?(d.openBlock(),d.createElementBlock("span",Hv,"▶")):d.createCommentVNode("",!0)],10,_v))),128))],36)),[[d.vShow,n.visible]])}}),[["__scopeId","data-v-f288753b"]]),Qi=Ne(d.defineComponent({__name:"LeitingBIM",props:{accessToken:{},cesiumUrl:{},cesiumCssUrl:{},methods:{},viewerOptions:{},treeProps:{},showTree:{type:Boolean,default:!0},showMenu:{type:Boolean,default:!1},playerUrl:{default:"https://leiting.chenxisoft.com/resource/person/person.glb"},playerModelName:{default:"Person"},playerModelId:{default:"player_111"},playerScale:{default:.0032},tiandituToken:{default:"c25f14fb6bd4397cf8fe45144ff768d6"},globe:{type:Boolean,default:void 0},terrain:{type:Boolean,default:void 0},depthTest:{type:Boolean,default:void 0},mapProvider:{},tiandituLayerType:{},tiandituShowLabel:{type:Boolean,default:void 0},arcgisUrl:{},shadows:{type:Boolean,default:void 0},environmentMap:{type:Boolean,default:void 0},ambientOcclusion:{type:Boolean,default:void 0},time:{},brightness:{},backgroundColor:{},collision:{type:Boolean,default:void 0},mouseHabit:{},mode:{default:"3d"},mountAll3Dtiles:{},mountAllCad:{},saveRegion:{},saveCadRegion:{},saveCadCalibration:{},selectionChange:{},searchComponent:{}},emits:["register","init","ready"],setup(n,{emit:e}){const t=d.ref(),i=d.ref(),s=d.getCurrentInstance(),o=d.ref(!1),r=d.ref(""),l=d.ref({}),a=d.ref("3d"),c=n,u={title:"构件树",treeData:[]},f=d.ref(!1),p=d.ref(!1),h=d.ref(!1),A=d.ref(!1),C=d.ref(!1),m=d.ref(!1),y=d.ref(!1),E=d.ref(!1),I=d.ref(!1),S=d.ref(!1),{visible:k,position:B,items:x,show:g,hide:R}=Uv(),M=d.ref([]),F=Y=>{M.value.push(Y)},L=Y=>{M.value=M.value.filter(z=>z.id!==Y)},G=d.ref([]),N=d.ref(""),v=d.ref(null),w=d.ref([]),b=d.reactive({tree:!1,section:!1,roam:!1,info:!1,adjustModel:!1,setting:!1,cadLayer:!1,cadPosition:!1,annotation:!1}),T=(Y,z)=>{Y==="componentTree"&&(Y="tree"),Y==="componentInfo"&&(Y="info"),Y in b&&(b[Y]=z)},P=d.shallowRef({});d.provide("leitingMethods",P);const _=d.ref(c.showMenu),O=d.ref([]);d.watch(()=>c.showMenu,Y=>{_.value=Y},{immediate:!0}),d.watch(()=>c.mode,Y=>{Y&&P.value?.set2d&&P.value.set2d(Y==="2d")});const D=d.ref("dark");d.provide("leiting-theme",D);const U=d.ref([]),V=d.computed(()=>{const Y=[];return f.value&&(Y.push("tree"),Y.push("componentTree")),p.value&&Y.push("section"),h.value&&Y.push("roam"),A.value&&(Y.push("info"),Y.push("componentInfo")),C.value&&Y.push("adjust"),m.value&&Y.push("setting"),y.value&&Y.push("cadLayer"),E.value&&Y.push("cadPosition"),I.value&&Y.push("annotation"),S.value&&(Y.push("measure"),Y.push("measurement")),Y.push(...U.value),Y}),$=d.ref(null),X=(Y,z)=>{Y==="componentTree"||Y==="tree"?f.value=z:Y==="section"?p.value=z:Y==="roam"?h.value=z:Y==="componentInfo"||Y==="info"?A.value=z:Y==="homeView"?P.value?.is2dMode?.()?P.value?.flyToTopView?.({}):P.value?.flyToTileset?.({}):Y==="adjustModel"?(C.value=z,z&&$.value&&$.value.setModelType("BIM")):Y==="osgbAdjust"?(C.value=z,z&&$.value&&$.value.setModelType("OSGB")):Y==="setting"?m.value=z:Y==="cadLayer"?y.value=z:Y==="cadPosition"?E.value=z:Y==="annotation"?I.value=z:Y==="measurement"?S.value=z:z?U.value.includes(Y)||U.value.push(Y):U.value=U.value.filter(J=>J!==Y)};d.watch(f,async Y=>{if(Y&&P.value?.loadTreeForModel&&P.value?.getMapTileset){const z=P.value.getMapTileset(),J=Object.values(z).map(async re=>{if(re.leiting&&!re.leiting.tree&&re.leiting.model?.treeUrl){const ae=re.leiting.model.modelId;try{re.leiting?.node?.batchIdEIDInfos||await P.value.loadNodeDetailsForModel(ae);const le=await P.value.loadTreeForModel(ae);le&&(Array.isArray(le)?le:[le]).forEach(Me=>{Me&&!w.value.find($e=>$e.id===Me.id)&&(Me.modelId=ae,w.value=[...w.value,Me])})}catch(le){console.warn(`Failed to lazy load tree for ${ae}`,le)}}});await Promise.all(J)}});const ne=()=>{P.value&&(P.value.getDxfModels&&(G.value=P.value.getDxfModels()||[]),P.value.getCadModelId&&(N.value=P.value.getCadModelId()||""))};d.watch(y,Y=>{Y&&ne()}),d.watch(E,Y=>{Y&&(ne(),v.value&&G.value.length&&v.value.addGltfOr3dTilesModelList(G.value))});const se=e,oe=Y=>{P.value&&P.value.saveCadCalibration&&P.value.saveCadCalibration(Y),P.value&&P.value.saveCadRegion&&P.value.saveCadRegion(Y)};return d.onMounted(async()=>{if(i.value&&de.setContainer(i.value),!!t.value)try{const Y={...xt,cesiumUrl:c.cesiumUrl||xt.cesiumUrl,cesiumCssUrl:c.cesiumCssUrl||xt.cesiumCssUrl,accessToken:c.accessToken||ns()||xt.accessToken};await ts(Y);const z=c.accessToken||ns()||xt.accessToken;z&&(Cesium.Ion.defaultAccessToken=z),o.value=!0;const J=(ae={},le)=>{if(t.value){const{showMenu:he,showTree:Me,globe:$e,terrain:Ke,depthTest:It,mapProvider:st,tiandituLayerType:un,tiandituShowLabel:Ut,arcgisUrl:_t,shadows:qi,environmentMap:qe,ambientOcclusion:Re,time:ot,brightness:ut,backgroundColor:Qt,collision:Ht,mouseHabit:Gt,mode:rt,...He}=ae||{},Do=c.showMenu!==void 0?c.showMenu:he!==void 0?he:!0;_.value=Do;const xe=(ee,Be,Vt)=>ee!==void 0?ee:Be!==void 0?Be:Vt,hn=xe(c.globe,$e,!1),$n=xe(c.terrain,Ke,!1),Kn=xe(c.depthTest,It,!1),qn=xe(c.mapProvider,st,"tianditu"),Xi=xe(c.tiandituLayerType,un,"img_w"),Jc=xe(c.tiandituShowLabel,Ut,!1),Zc=xe(c.arcgisUrl,_t,"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),ed=xe(c.shadows,qi,!1),td=xe(c.environmentMap,qe,!1),nd=xe(c.ambientOcclusion,Re,!1),id=xe(c.time,ot,void 0),sd=xe(c.brightness,ut,1),Ji=c.mode||rt||"3d";console.log("LeitingBIM Mode:",Ji,"Props:",c.mode,"Options:",rt),a.value=Ji;const Yx=Ji==="2d"?"#000000":"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)",od=xe(c.backgroundColor,Qt,Yx),rd=xe(c.collision,Ht,!1),ad=xe(c.mouseHabit,Gt,0);l.value={globe:hn,terrain:$n,depthTest:Kn,mapProvider:qn,tiandituLayerType:Xi,tiandituShowLabel:Jc,arcgisUrl:Zc,shadows:ed,environmentMap:td,ambientOcclusion:nd,time:id,brightness:sd,backgroundColor:od,collision:rd,mouseHabit:ad};const Xn=N0({container:t.value,appContext:s?.appContext,methods:{...P.value,handleMenuAction:X,setCardFullHeight:T,onLoadingStatus:ee=>{ee?de.loading(ee,"",i.value):de.close()},...He,tilesLoad3dTiles:async ee=>{let Be=ee.leiting?.tree;const Vt=ee.leiting?.model?.modelId;if(!Be&&f.value&&P.value?.loadTreeForModel)try{Be=await P.value.loadTreeForModel(Vt)}catch(Zn){console.warn("Failed to lazy load tree",Zn)}Be&&(Array.isArray(Be)?Be:[Be]).forEach(Wt=>{Wt&&!w.value.find(cd=>cd.id===Wt.id)&&(Wt.modelId=Vt,w.value=[...w.value,Wt])});const{brightness:ko,contrast:Po,saturation:ht}=Xn.methods.getConfigure();Xn.methods.setModelColorAdjustment({brightness:ko,contrast:Po,saturation:ht}),He.tilesLoad3dTiles?.(ee)},mountAll3Dtiles:ee=>{c.mountAll3Dtiles&&c.mountAll3Dtiles(ee),He.mountAll3Dtiles?.(ee)},mountAllCad:ee=>{if(Xn.methods.setModelBrightness){const Be=c.brightness!==void 0?c.brightness:l.value.brightness;Be!==void 0&&Xn.methods.setModelBrightness(Be)}c.mountAllCad&&c.mountAllCad(ee),He.mountAllCad?.(ee)},saveRegion:ee=>{c.saveRegion&&c.saveRegion(ee),He.saveRegion?.(ee)},saveCadRegion:ee=>{c.saveCadRegion&&c.saveCadRegion(ee),He.saveCadRegion?.(ee)},saveCadCalibration:ee=>{c.saveCadCalibration&&c.saveCadCalibration(ee),He.saveCadCalibration?.(ee)},selectionChange:ee=>{c.selectionChange&&c.selectionChange(ee),He.selectionChange?.(ee)},onSearchComponent:ee=>{c.searchComponent&&c.searchComponent(ee),He.searchComponent?.(ee)}},viewerOptions:c.viewerOptions,options:{...He,mode:Ji,playerUrl:c.playerUrl,playerModelName:c.playerModelName,playerModelId:c.playerModelId,playerScale:c.playerScale,globe:hn,terrain:$n,depthTest:Kn,mapProvider:qn,tiandituLayerType:Xi,tiandituShowLabel:Jc,tiandituToken:c.tiandituToken,arcgisUrl:Zc,shadows:ed,environmentMap:td,ambientOcclusion:nd,time:id,brightness:sd,backgroundColor:od,collision:rd,mouseHabit:ad},callbacks:{onLoading:ee=>ee?de.loading(ee,"",i.value):de.close(),onSuccess:ee=>de.success(ee,"",void 0,i.value),onError:ee=>de.error(ee,"",void 0,i.value)}}),{Cesium:Yt,viewer:fn,methods:Zi,menuEvents:Jn}=Xn,Ae=Zi;Jn.on("showMenu",ee=>{_.value=ee}),Jn.on("insertMenu",ee=>{O.value=ee}),Jn.on("setMenuActive",(ee,Be)=>{X(ee,Be)}),P.value=Ae,le&&(le.value=Ae),Jn.on("setMode",ee=>{a.value=ee}),Jn.on("deleteAllModels",()=>{w.value=[]}),new Yt.ScreenSpaceEventHandler(fn.scene.canvas).setInputAction(async ee=>{if(R(),a.value==="2d")return;const Be=fn.scene.pick(ee.position),Vt=fn.container.getBoundingClientRect(),ko=Vt.left+ee.position.x,Po=Vt.top+ee.position.y,ht=[];if(Yt.defined(Be)&&Be instanceof Yt.Cesium3DTileFeature){const Zn=Ae.baseCompt.getFeatureId(Be),Wt=Sn(Be.tileset);Ae.baseCompt.hasSelectedFeaturesMap[Wt]?.some(ei=>ei.batchId===Zn&&ei.rank===0)||(await Ae.baseCompt.clearSelection(),await Ae.baseCompt.toggleMultiSelect(Wt,Zn,Ae.baseCompt.selectedColor)),ht.push({id:"details",label:"构件详情",action:()=>{A.value=!0}}),ht.push({id:"hide",label:"隐藏选中构件",action:()=>{const ti=Ae.baseCompt.getSelected().map(ft=>({elementId:ft.elementId,modelId:ft.modelId,show:!1}));Ae.baseCompt.setComponentVisibility(ti)}}),ht.push({id:"translucent",label:"半透明选中构件",action:async()=>{const ti=Ae.baseCompt.getSelected().map(ft=>({elementId:ft.elementId,modelId:ft.modelId,rgba:{...ft.rgba,a:.3}}));await Ae.baseCompt.setSelectColorUserModelCpt(ti,{rank:0})}}),ht.push({id:"isolate",label:"隔离选中构件",divided:!0,action:()=>{Ae.baseCompt.setAllComponentsVisibility(!1);const ti=Ae.baseCompt.getSelected().map(ft=>({elementId:ft.elementId,modelId:ft.modelId,show:!0}));Ae.baseCompt.setComponentVisibility(ti)}})}ht.push({id:"showAll",label:"显示所有",action:async()=>{Ae.baseCompt.setAllComponentsVisibility(!0),await Ae.baseCompt.clearSelection()}}),ht.push(...M.value),g({x:ko,y:Po},ht)},Yt.ScreenSpaceEventType.RIGHT_CLICK),Ae.addContextMenuItems=F,Ae.insertContextMenu=Ae.addContextMenuItems,Ae.removeContextMenuItems=L,Ae.deleteContextMenu=Ae.removeContextMenuItems,Ae.closeContextMenu=R,Ae.hideContextMenu=Ae.closeContextMenu;const ld=ae?.onLoaded||ae?.onloaded;ld&&ld({Cesium:Yt,viewer:fn,methods:Zi}),se("init",{Cesium:Yt,viewer:fn,methods:Zi}),se("ready",{Cesium:Yt,viewer:fn,methods:Zi})}};let re=!1;se("register",(ae,le)=>{re=!0,J(ae,le)}),re||setTimeout(()=>{P.value.getViewer||J()},0)}catch(Y){r.value="Failed to load Cesium: "+(Y.message||Y),console.error(Y)}}),d.onUnmounted(()=>{de.setContainer(null)}),(Y,z)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-bim-container",[`theme-${D.value}`]]),onContextmenu:z[11]||(z[11]=d.withModifiers(()=>{},["prevent","stop"]))},[!o.value&&!r.value?(d.openBlock(),d.createBlock(d.unref(ye.Spin),{key:0,class:"loading",size:"large",tip:"加载基础组件中..."})):d.createCommentVNode("",!0),r.value?(d.openBlock(),d.createBlock(d.unref(ye.Alert),{key:1,class:"error",type:"error",message:r.value,"show-icon":""},null,8,["message"])):d.createCommentVNode("",!0),d.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"cesium-viewer"},[d.createElementVNode("div",{ref_key:"uiOverlayRef",ref:i,class:"leiting-ui-overlay"},[d.createVNode(Qn,{visible:A.value,"full-height":b.info,"onUpdate:visible":z[0]||(z[0]=J=>A.value=J)},null,8,["visible","full-height"]),d.createVNode(Hn,{ref_key:"LeitingPositionRef",ref:$,visible:C.value,"full-height":b.adjustModel,"onUpdate:visible":z[1]||(z[1]=J=>C.value=J)},null,8,["visible","full-height"]),d.createVNode(Gn,{visible:m.value,"full-height":b.setting,"tianditu-token":c.tiandituToken,"initial-config":l.value,"onUpdate:visible":z[2]||(z[2]=J=>m.value=J)},null,8,["visible","full-height","tianditu-token","initial-config"]),n.showTree!==!1?(d.openBlock(),d.createBlock(Pi,d.mergeProps({key:0},{...u,...n.treeProps},{visible:f.value,"full-height":b.tree,"tree-data":w.value.length>0?w.value:n.treeProps?.treeData||[],"onUpdate:visible":z[3]||(z[3]=J=>{f.value=J})}),null,16,["visible","full-height","tree-data"])):d.createCommentVNode("",!0),d.createVNode(Av,{visible:I.value,"onUpdate:visible":z[4]||(z[4]=J=>I.value=J)},null,8,["visible"]),d.createVNode(Nv,{visible:S.value,"onUpdate:visible":z[5]||(z[5]=J=>S.value=J)},null,8,["visible"]),d.createVNode(Un,{visible:p.value,"full-height":b.section,"onUpdate:visible":z[6]||(z[6]=J=>p.value=J)},null,8,["visible","full-height"]),d.createVNode(_n,{visible:h.value,"full-height":b.roam,"onUpdate:visible":z[7]||(z[7]=J=>h.value=J)},null,8,["visible","full-height"]),d.createVNode(Nn,{visible:_.value,"active-ids":V.value,"custom-items":O.value,onAction:X,"is-2d":a.value==="2d"},null,8,["visible","active-ids","custom-items","is-2d"]),d.createVNode(gb,{visible:y.value,"current-model-id":N.value,"onUpdate:visible":z[8]||(z[8]=J=>y.value=J)},null,8,["visible","current-model-id"]),d.createVNode(lv,{ref_key:"cadPositionRef",ref:v,visible:E.value,"onUpdate:visible":z[9]||(z[9]=J=>E.value=J),onSave:oe},null,8,["visible"]),d.createVNode(Gv,{visible:d.unref(k),position:d.unref(B),items:d.unref(x),"onUpdate:visible":z[10]||(z[10]=J=>k.value=J)},null,8,["visible","position","items"]),d.renderSlot(Y.$slots,"default",d.normalizeProps(d.guardReactiveProps({methods:P.value,isReady:o.value})),void 0,!0)],512)],512)],34))}}),[["__scopeId","data-v-34761f82"]]);function gc(n){const e=d.ref(),t=d.ref(n.theme||"dark"),i=d.ref(n.menuSize||"medium");d.provide("leiting-theme",t),d.provide("leiting-menu-size",i);function s(l){d.onUnmounted(()=>{e.value=null}),l(n,e)}function o(){const l=d.unref(e);return l||console.error("未获取到leiting实例!"),l}const r=new Proxy({},{get(l,a){const c=o();if(!c)return;const u=c[a];return typeof u=="function"?u.bind(c):u},set(l,a,c){const u=o();return u?(u[a]=c,!0):!1}});return[s,r]}const Yv=xt,Vv={install:(n,e)=>{if(n.component("LeitingBIM",Qi),n.component("LeitingTree",Pi),n.component("LeitingDraggableCard",Fe),n.component("leiting-draggable-card",Fe),n.component("LeitingMenu",Nn),n.component("leiting-menu",Nn),n.component("LeitingSection",Un),n.component("leiting-section",Un),n.component("LeitingPlayer",_n),n.component("leiting-player",_n),n.component("LeitingInfo",Qn),n.component("leiting-info",Qn),n.component("LeitingPosition",Hn),n.component("leiting-position",Hn),n.component("LeitingSetting",Gn),n.component("leiting-setting",Gn),!e)return;const t={...Yv,...e};t.cesiumUrl&&ts(t).catch(i=>{console.error("[LeitingBim] Failed to load Cesium resources:",i)}),n.config.globalProperties.$leitingBimOptions=t}};var W={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}};function mc(n="soft"){switch(n){case"auto":{W.session.styleMap=new Map,W.session.nodeMap=new Map;return}case"soft":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap,W.computedStyle=new WeakMap,W.baseStyle=new Map,W.defaultStyle=new Map,W.image=new Map,W.background=new Map,W.resource=new Map,W.font=new Set;return}default:{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}}}function ho(n){const e=n.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;const t=e[2].trim();return t.startsWith("#")?null:t}function Wv(n){if(!n||n==="none")return"";let e=n.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==6?`matrix(${i})`:(s[4]="0",s[5]="0",`matrix(${s.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==16?`matrix3d(${i})`:(s[12]="0",s[13]="0",`matrix3d(${s.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Hi(n){if(/%[0-9A-Fa-f]{2}/.test(n))return n;try{return encodeURI(n)}catch{return n}}function zv(n="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:t=12}={}){const i=new Map;let s=0;function o(r,l,a){if(s>=t)return;const c=Date.now();(i.get(l)||0)>c||(i.set(l,c+e),s++,r==="warn"&&console&&console.warn?console.warn(`${n} ${a}`):console&&console.error&&console.error(`${n} ${a}`))}return{warnOnce(r,l){o("warn",r,l)},errorOnce(r,l){o("error",r,l)},reset(){i.clear(),s=0}}}var Ac=zv("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),fo=new Map,Gi=new Map;function jv(n){return/^data:|^blob:|^about:blank$/i.test(n)}function $v(n,e){try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=e.includes("{url}")?e.split("{url}")[0]:e,s=new URL(i||".",t),o=new URL(n,t);if(o.origin===s.origin)return!0;const r=o.searchParams;if(r&&(r.has("url")||r.has("target")))return!0}catch{}return!1}function Kv(n,e){if(!e||jv(n)||$v(n,e))return!1;try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=new URL(n,t);return typeof location<"u"?i.origin!==location.origin:!0}catch{return!!e}}function qv(n,e){if(!e)return n;if(e.includes("{url}"))return e.replace("{urlRaw}",Hi(n)).replace("{url}",encodeURIComponent(n));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(n)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(n)}`;if(e.endsWith("/"))return`${e}${Hi(n)}`;const t=e.includes("?")?"&":"?";return`${e}${t}url=${encodeURIComponent(n)}`}function yc(n){return new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(String(i.result||"")),i.onerror=()=>t(new Error("read_failed")),i.readAsDataURL(n)})}function Xv(n,e){return[e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,n].join("|")}async function je(n,e={}){const t=e.as??"blob",i=e.timeout??3e3,s=e.useProxy||"",o=e.errorTTL??8e3,r=e.headers||{},l=!!e.silent;if(/^data:/i.test(n))try{if(t==="text")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1};if(t==="dataURL")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1,mime:String(n).slice(5).split(";")[0]||""};const[,m="",y=""]=String(n).match(/^data:([^,]*),(.*)$/)||[],I=/;base64/i.test(m)?atob(y):decodeURIComponent(y),S=new Uint8Array([...I].map(B=>B.charCodeAt(0))),k=new Blob([S],{type:(m||"").split(";")[0]||""});return{ok:!0,data:k,status:200,url:n,fromCache:!1,mime:k.type||""}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(n))try{const m=await fetch(n);if(!m.ok)return{ok:!1,data:null,status:m.status,url:n,fromCache:!1,reason:"http_error"};const y=await m.blob(),E=y.type||m.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await yc(y),status:m.status,url:n,fromCache:!1,mime:E}:t==="text"?{ok:!0,data:await y.text(),status:m.status,url:n,fromCache:!1,mime:E}:{ok:!0,data:y,status:m.status,url:n,fromCache:!1,mime:E}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(n))return t==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:n,fromCache:!1,mime:"image/png"}:{ok:!0,data:t==="text"?"":new Blob([]),status:200,url:n,fromCache:!1};const a=Xv(n,{as:t,timeout:i,useProxy:s,errorTTL:o}),c=Gi.get(a);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Gi.delete(a);const u=fo.get(a);if(u)return u;const f=Kv(n,s)?qv(n,s):n;let p=e.credentials;if(!p)try{const m=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(n,m);p=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{p="omit"}const h=new AbortController,A=setTimeout(()=>h.abort("timeout"),i),C=(async()=>{try{const m=await fetch(f,{signal:h.signal,credentials:p,headers:r});if(!m.ok){const I={ok:!1,data:null,status:m.status,url:f,fromCache:!1,reason:"http_error"};if(o>0&&Gi.set(a,{until:Date.now()+o,result:I}),!l){const S=`${m.status} ${m.statusText||""}`.trim();Ac.warnOnce(`http:${m.status}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,`HTTP error ${S} while fetching ${t} ${n}`)}return e.onError&&e.onError(I),I}if(t==="text")return{ok:!0,data:await m.text(),status:m.status,url:f,fromCache:!1};const y=await m.blob(),E=y.type||m.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await yc(y),status:m.status,url:f,fromCache:!1,mime:E}:{ok:!0,data:y,status:m.status,url:f,fromCache:!1,mime:E}}catch(m){const y=m&&typeof m=="object"&&"name"in m&&m.name==="AbortError"?String(m.message||"").includes("timeout")?"timeout":"abort":"network",E={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:y};if(!/^blob:/i.test(n)&&o>0&&Gi.set(a,{until:Date.now()+o,result:E}),!l){const I=`${y}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,S=y==="timeout"?`Timeout after ${i}ms. Consider increasing timeout or using a proxy for ${n}`:y==="abort"?`Request aborted while fetching ${t} ${n}`:`Network/CORS issue while fetching ${t} ${n}. A proxy may be required`;Ac.errorOnce(I,S)}return e.onError&&e.onError(E),E}finally{clearTimeout(A),fo.delete(a)}})();return fo.set(a,C),C}function po(n,e){if(!e||!n.width||!n.height)return n;const t=document.createElement("canvas");t.width=n.width,t.height=n.height;const i=t.getContext("2d");return i.fillStyle=e,i.fillRect(0,0,t.width,t.height),i.drawImage(n,0,0),t}async function go(n,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(n)||n.trim()==="none")return n;const i=ho(n);if(!i)return n;const s=Hi(i);if(W.background.has(s)){const o=W.background.get(s);return o?`url("${o}")`:"none"}try{const o=await je(s,{as:"dataURL",useProxy:e.useProxy});return o.ok?(W.background.set(s,o.data),`url("${o.data}")`):(W.background.set(s,null),"none")}catch{return W.background.set(s,null),"none"}}var Cc=new Set(["meta","script","noscript","title","link","template"]),Yi=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),Jv=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];function Zv(){for(let n of Jv){const e=String(n).toLowerCase();Cc.has(e)||Yi.has(e)||Ec(e)}}function Ec(n){if(n=String(n).toLowerCase(),Yi.has(n)){const o={};return W.defaultStyle.set(n,o),o}if(W.defaultStyle.has(n))return W.defaultStyle.get(n);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));const t=document.createElement(n);t.style.all="initial",e.appendChild(t);const i=getComputedStyle(t),s={};for(let o of i){if(wc(o))continue;const r=i.getPropertyValue(o);s[o]=r}return e.removeChild(t),W.defaultStyle.set(n,s),s}var eI=/(?:^|-)(animation|transition)(?:-|$)/i,tI=/^(--|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,nI=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope"]);function wc(n){const e=String(n).toLowerCase();return!!(nI.has(e)||tI.test(e)||eI.test(e))}function mo(n,e){if(e=String(e||"").toLowerCase(),Yi.has(e))return"";const t=[],i=Ec(e);for(let[s,o]of Object.entries(n)){if(wc(s))continue;const r=i[s];o&&o!==r&&t.push(`${s}:${o}`)}return t.sort(),t.join(";")}function iI(n){const e=new Set;return n.nodeType!==Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(n.tagName&&e.add(n.tagName.toLowerCase()),typeof n.querySelectorAll=="function"&&n.querySelectorAll("*").forEach(t=>e.add(t.tagName.toLowerCase())),Array.from(e))}function sI(n){const e=new Map;for(let i of n){const s=W.defaultStyle.get(i);if(!s)continue;const o=Object.entries(s).map(([r,l])=>`${r}:${l};`).sort().join("");o&&(e.has(o)||e.set(o,[]),e.get(o).push(i))}let t="";for(let[i,s]of e.entries())t+=`${s.join(",")} { ${i} }
|
|
118
|
+
`});p.isModelAdjustment=!0,f.customShader=p}else e.brightness!==void 0&&e.brightness!==1&&!f.style&&(f.style=new i.Cesium3DTileStyle({color:`color('white') * ${e.brightness}`}))}}setModelBrightness(e){this.setModelColorAdjustment({brightness:e})}_defaultSkyBox=null;_updateLightDirection=e=>{e.light instanceof this.cesium.DirectionalLight&&(e.light.direction=e.camera.directionWC)};setEnvironmentMapEnable(e){this.is2d||(e?(this.viewer.scene.light=new this.cesium.DirectionalLight({direction:this.viewer.scene.camera.directionWC}),this.viewer.scene.preRender.addEventListener(this._updateLightDirection)):(this._defaultSkyBox&&(this.viewer.scene.skyBox=this._defaultSkyBox),this.viewer.scene.preRender.removeEventListener(this._updateLightDirection),this.viewer.scene.light=new this.cesium.SunLight),this.viewer.scene.imageBasedLighting&&(this.viewer.scene.imageBasedLighting.imageBasedLightingFactor=e?new this.cesium.Cartesian2(2,2):new this.cesium.Cartesian2(1,1)))}setAmbientOcclusion(e){if(this.is2d)return;const t=this.viewer.scene;if(!t||!t.postProcessStages||!t.postProcessStages.ambientOcclusion)return;const i=t.postProcessStages.ambientOcclusion;i.enabled=e,e&&(i.uniforms.ambientOcclusionOnly=!1,i.uniforms.intensity=3,i.uniforms.bias=.1,i.uniforms.lengthCap=.03,i.uniforms.stepSize=1,i.uniforms.blurStepSize=.86)}setCollisionDetection(e){if(this.is2d){this.viewer.scene.screenSpaceCameraController.enableCollisionDetection=!1;return}const t=this.viewer.scene.screenSpaceCameraController;t.enableCollisionDetection=e,e||t.minimumZoomDistance<1&&(t.minimumZoomDistance=1)}setMouseHabit(e){if(this.is2d)return;const t=this.viewer.scene.screenSpaceCameraController;t.enableTranslate=!0,t.enableRotate=!0,t.enableZoom=!0,t.enableTilt=!0,t.enableLook=!1,t.lookEventTypes=[],e===1?(t.rotateEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.MIDDLE_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.LEFT_DRAG]):(t.rotateEventTypes=[this.cesium.CameraEventType.LEFT_DRAG],t.zoomEventTypes=[this.cesium.CameraEventType.RIGHT_DRAG,this.cesium.CameraEventType.WHEEL,this.cesium.CameraEventType.PINCH],t.tiltEventTypes=[this.cesium.CameraEventType.PINCH,this.cesium.CameraEventType.MIDDLE_DRAG])}}class L0{cesium;viewer;constructor(e){this.cesium=e.cesium,this.viewer=e.viewer}getCameraView(){const e=this.viewer.camera;return{position:{x:e.position.x,y:e.position.y,z:e.position.z},destination:{x:e.position.x,y:e.position.y,z:e.position.z},orientation:{heading:e.heading,pitch:e.pitch,roll:e.roll},duration:1}}flyToCameraView(e){const{position:t,orientation:i,duration:s}=e,o=new this.cesium.Cartesian3(t.x,t.y,t.z),r=new this.cesium.HeadingPitchRoll(i.heading,i.pitch,i.roll);!s||s<=0?this.viewer.camera.setView({destination:o,orientation:r}):this.viewer.camera.flyTo({destination:o,orientation:r,duration:s})}getCurrentCameraPositionAndTarget(){const e=this.getCameraView();return{position:e.position,target:{heading:e.orientation.heading,pitch:e.orientation.pitch,roll:e.orientation.roll},duration:e.duration}}setCameraView(e){const t=e.target||e.orientation||{},i=e.destination||e.position||{};this.flyToCameraView({position:{x:Number(e.position.x),y:Number(e.position.y),z:Number(e.position.z)},destination:{x:Number(i.x),y:Number(i.y),z:Number(i.z)},orientation:{heading:Number(t.heading||0),pitch:Number(t.pitch||0),roll:Number(t.roll||0)},duration:e.duration})}}function N0(n){const{container:e,appContext:t,methods:i,viewerOptions:s,options:o,callbacks:r}=n,l=new gi,a=window.Cesium;if(!a)throw new Error("Cesium is not loaded");e.id=`cesium-container-${Pg()}`;const c={animation:!1,timeline:!1,infoBox:!1,homeButton:!1,fullscreenButton:!1,sceneModePicker:!1,navigationHelpButton:!1,geocoder:!1,baseLayerPicker:!1,selectionIndicator:!1,creditContainer:document.createElement("div"),contextOptions:{webgl:{alpha:!0}}},u=t?.config?.globalProperties?.$leitingBimOptions,f={...c,...u?.viewerOptions??{},...s??{}},p=new a.Viewer(e,f);p.camera.setView({destination:a.Cartesian3.fromDegrees(108,32,1e7),orientation:{heading:a.Math.toRadians(0),pitch:a.Math.toRadians(-90),roll:0}});let h=i;if(!h&&u&&(u.methods||(u.methods={}),h=u.methods),h){const A=new Wg({cesium:a,viewer:p,options:o,callbacks:r}),C=new ka({cesium:a,viewer:p}),m=new O0({cesium:a,viewer:p}),y=new zg({cesium:a,viewer:p}),E=new L0({cesium:a,viewer:p});let I;const S=new nc({cesium:a,viewer:p});o&&(o.globe!==void 0&&m.setGlobeEnvironmentVisible(o.globe),o.terrain!==void 0&&m.setTerrainEnable(o.terrain),o.depthTest!==void 0&&m.setDepthTestEnable(o.depthTest),o.mapProvider&&o.mode!=="2d"&&m.changeBaseMap(o.mapProvider,{token:o.tiandituToken,layerType:o.tiandituLayerType,showAnnotation:o.tiandituShowLabel,url:o.arcgisUrl}),o.shadows!==void 0&&m.setShadowsEnable(o.shadows),o.environmentMap!==void 0&&m.setEnvironmentMapEnable(o.environmentMap),o.ambientOcclusion!==void 0&&m.setAmbientOcclusion(o.ambientOcclusion),o.time!==void 0&&m.setTime(o.time),o.brightness!==void 0&&m.setModelBrightness(o.brightness),o.backgroundColor!==void 0&&m.setBackgroundColor(o.backgroundColor),o.collision!==void 0&&m.setCollisionDetection(o.collision),o.mouseHabit!==void 0&&m.setMouseHabit(o.mouseHabit)),o&&o.mode==="2d"&&(console.log("InitMap: Setting CAD Mode 2D"),m.setCadMode("2d"),I=new tc({cesium:a,viewer:p})),C.events.on("tilesetLoaded",g=>{A.baseCompt.attachTileset(g,A.baseCompt.selectedColor),A.baseSection.attachTileset(g,g.leiting?.model?.modelId),h&&h.tilesLoad3dTiles&&h.tilesLoad3dTiles(g),o?.tilesLoad3dTiles&&o.tilesLoad3dTiles(g.leiting)}),C.events.on("loadingStatus",g=>{h&&h.onLoadingStatus&&h.onLoadingStatus(g)}),C.events.on("mountAll3Dtiles",({modelList:g,mapTileset:R})=>{o?.mountAll3Dtiles&&o.mountAll3Dtiles(g),h?.mountAll3Dtiles&&h.mountAll3Dtiles(R)}),y.events.on("mountAllCad",g=>{o?.mountAllCad&&o.mountAllCad(g),h?.mountAllCad&&h.mountAllCad(g)}),A.baseCompt.loadNodeDetailsForModel=g=>C.loadNodeDetailsForModel(g),A.baseCompt.selectionChange(g=>{g.length!==0&&(o?.selectionChange&&o.selectionChange(g),h?.selectionChange&&h.selectionChange(g))}),h.onSearchComponent=g=>{o?.searchComponent&&o.searchComponent(g),h?.searchComponent&&h.searchComponent(g)};const k=h.saveRegion;h.saveRegion=g=>{o?.saveRegion&&o.saveRegion(g),k&&k!==o?.saveRegion&&k(g)};const B=h.saveCadCalibration;h.saveCadCalibration=g=>{o?.saveCadCalibration&&o.saveCadCalibration(g),B&&B!==o?.saveCadCalibration&&B(g)};const x=h.saveCadRegion;h.saveCadRegion=g=>{o?.saveCadRegion&&o.saveCadRegion(g),x&&x!==o?.saveCadRegion&&x(g)},h.getCesium=()=>a,h.getViewer=()=>p,h.getAnnotationInstance=()=>I,h.getMeasureInstance=()=>S,h.flyToCamera=g=>{E.setCameraView(g)},h.flyTo=h.flyToCamera,h.addDebugPoint=(g,R,M=0)=>{p.entities.add({position:a.Cartesian3.fromDegrees(g,R,M),point:{pixelSize:10,color:a.Color.RED}})},h.addPoint=h.addDebugPoint,h.toggleDebugLabels=()=>A.enableTestLabel(),h.enableTestLabel=h.toggleDebugLabels,h.setCanvasBackground=g=>m.setBackgroundColor(g),h.setBackgroundColor=h.setCanvasBackground,h.setAntiAliasing=g=>A.enableCesiumFXAA(g),h.enableCesiumFXAA=h.setAntiAliasing,h.setSceneVisibility=g=>A.setSceneOptions(g),h.setSceneOptions=h.setSceneVisibility,h.getCameraState=()=>E.getCameraView(),h.getCameraInfo=h.getCameraState,h.restoreCameraState=g=>E.flyToCameraView(g),h.flyToCameraView=h.restoreCameraState,h.getCameraPositionTarget=()=>E.getCurrentCameraPositionAndTarget(),h.getCurrentCameraPositionAndTarget=h.getCameraPositionTarget,h.setCameraLookAt=g=>E.setCameraView(g),h.setCameraView=h.setCameraLookAt,h.captureScreenshot=()=>{const g=p.scene.canvas;return p.render(),g.toDataURL("image/png")},h.getImageBase64=h.captureScreenshot,h.captureDomScreenshot=(g,R)=>A.getSnapDomSImageBase64(g,R),h.getSnapDomSImageBase64=h.captureDomScreenshot,h.addModels=g=>C.addModels(g),h.add3DtilesModel=h.addModels,h.addObliquePhotography=g=>C.addOSGB(g),h.addOSGB=h.addObliquePhotography,h.adjustOSGBModelMatrix=g=>C.updateOSGBMatrix(g),h.updateOSGBMatrix=h.adjustOSGBModelMatrix,h.setModelVisibility=g=>C.showModels(g),h.showModels=h.setModelVisibility,h.showTileset=h.setModelVisibility,h.removeModels=g=>C.deleteModels(g),h.deleteModels=h.removeModels,h.clearAllModels=()=>{C.deleteAllModels(),l.emit("deleteAllModels")},h.deleteAllModelList=h.clearAllModels,h.deleteAllModels=h.clearAllModels,h.flyToModel=g=>C.flyToTileset(g),h.flyToTileset=h.flyToModel,h.flyToByModelId=h.flyToModel,h.setModelBrightness=g=>A.updateModelEffect(g),h.updateModelEffect=h.setModelBrightness,h.getAllTilesets=()=>C.getMapTileset(),h.getMapTileset=h.getAllTilesets,h.getCurrentModelId=()=>C.getBIMmodelId(),h.getBIMmodelId=h.getCurrentModelId,h.getLoadedModels=()=>C.getModelList(),h.getModelList=h.getLoadedModels,h.loadModelStructure=async g=>{const R=typeof g=="string"?g:g?.modelId;if(!R){console.warn("loadModelStructure: modelId is required");return}return await C.loadTreeForModel(R)},h.loadTreeForModel=h.loadModelStructure,h.loadModelDetails=async g=>{const R=typeof g=="string"?g:g?.modelId;if(!R){console.warn("loadModelDetails: modelId is required");return}return await C.loadNodeDetailsForModel(R)},h.loadNodeDetailsForModel=h.loadModelDetails,h.setMapTileset=g=>C.setMapTileset(g),h.setCurrentModelId=g=>C.setBIMmodelId(g),h.setBIMmodelId=h.setCurrentModelId,h.setModelList=g=>C.setModelList(g),h.highlightComponents=(g,R={})=>A.baseCompt.setSelectColorUserModelCpt(g,R),h.setSelectColorUserModelCpt=h.highlightComponents,A.baseCompt.setLoadNodeDetailsCallback(g=>C.loadNodeDetailsForModel(g)),h.highlightAllComponents=g=>A.baseCompt.setAllSelectColorUserModelCpt(g),h.setAllSelectColorUserModelCpt=h.highlightAllComponents,h.setSelectColorUserModelCptByClear=()=>A.baseCompt.clearAllHaveSelected(),h.clearSelectColorUserModelCpt=()=>A.baseCompt.clearAllHaveSelected(),h.selectComponents=(g,R)=>A.baseCompt.setSelectColorUserModelCpt(g,R??{rank:0}),h.setSelecteds=h.selectComponents,h.setSelectionColor=(g,R,M,F)=>A.baseCompt.setSelectedColorRgba(g,R,M,F),h.setSelectedColor=h.setSelectionColor,h.clearSelection=()=>A.baseCompt.clearAllHaveSelected(),h.clearAllHaveSelected=h.clearSelection,h.getSelectedComponents=g=>A.baseCompt.getSelected(g),h.getSelected=h.getSelectedComponents,h.onSelectionChange=g=>{A.baseCompt.selectionChange(g)},h.selectionChange=h.onSelectionChange,h.flyToComponents=g=>A.baseCompt.flyToObjects(g),h.flyToObjects=h.flyToComponents,h.setConstructionData=async g=>{if(g&&Array.isArray(g)){const R=new Set;g.forEach(M=>{M.mergeCpts&&Array.isArray(M.mergeCpts)&&M.mergeCpts.forEach(F=>{F.modelId&&R.add(F.modelId)})}),R.size>0&&await Promise.all(Array.from(R).map(M=>h.loadNodeDetailsForModel(M)))}A.baseCompt.setAllConstructionProgressTracking(g)},h.setAllConstructionProgressTracking=h.setConstructionData,h.startConstructionSimulation=()=>A.baseCompt.enableConstructionProgressTracking(),h.enableAllConstructionProgressTracking=h.startConstructionSimulation,h.stopConstructionSimulation=()=>A.baseCompt.disableConstructionProgressTracking(),h.disableConstructionProgressTracking=h.stopConstructionSimulation,h.disableAllConstructionProgressTracking=h.stopConstructionSimulation,h.resetConstructionSimulation=()=>A.baseCompt.freshConstructionProgressTracking(),h.freshConstructionProgressTracking=h.resetConstructionSimulation,h.restartConstructionSimulation=()=>A.baseCompt.reStartAnimation(),h.reStartAnimation=h.restartConstructionSimulation,h.resumeFlyTo=()=>A.baseCompt.resumeFlyTo(),h.pauseConstructionSimulation=()=>A.baseCompt.pauseFlyTo(),h.pauseFlyTo=h.pauseConstructionSimulation,h.pauseAnimation=h.pauseConstructionSimulation,h.resumeConstructionSimulation=()=>A.baseCompt.resumeFlyTo(),h.resumeAnimation=h.resumeConstructionSimulation,h.setComponentsVisibility=g=>A.baseCompt.setComponentVisibility(g),h.setElementsListVisible=h.setComponentsVisibility,h.setAllComponentsVisibility=g=>A.baseCompt.setAllComponentsVisibility(g),h.setAllElementsVisible=h.setAllComponentsVisibility,h.getComponentsByVisibility=g=>A.baseCompt.getComponentsByVisibility(g),h.getShowCpts=g=>A.baseCompt.getComponentsByVisibility(g),h.getElementsVisible=h.getComponentsByVisibility,h.setComponentVisibility=h.setComponentsVisibility,h.enableSectioning=(g,R)=>A.baseSection.open(g,R),h.openSection=h.enableSectioning,h.disableSectioning=g=>A.baseSection.close(g),h.closeSection=h.disableSectioning,h.updateSectionBox=g=>A.baseSection.updateRange(g),h.updateSectionRange=h.updateSectionBox,h.getSectionBox=()=>A.baseSection.getRange(),h.getSectionRange=h.getSectionBox,h.fitSectionToModel=()=>A.baseSection.fitToModels(),h.fitToModels=h.fitSectionToModel,h.setSectionBoxVisibility=g=>A.baseSection.setBoxVisibility(g),h.startFirstPersonMode=()=>{A.baseCompt.disableSelection(),A.basePlayer.openPlayer()},h.openPlayer=h.startFirstPersonMode,h.stopFirstPersonMode=()=>{A.basePlayer.closePlayer(),A.baseCompt.enableSelection()},h.closePlayer=h.stopFirstPersonMode,h.setPlayerPosition=g=>A.basePlayer.setPersonPosition(g),h.setPersonPosition=h.setPlayerPosition,h.setWalkSpeed=g=>A.basePlayer.setSpeed({speed:g}),h.setPlayerSpeed=h.setWalkSpeed,h.setPlayerConfig=g=>A.basePlayer.setParams(g),h.setPlayerParams=h.setPlayerConfig,h.setPlayerAction=(g,R)=>A.basePlayer.setMoveState(g,R),h.setPlayerMoveState=h.setPlayerAction,h.bindPlayerControls=g=>A.basePlayer.bindUiKeys(g),h.bindPlayerUiKeys=h.bindPlayerControls,h.setGlobeVisibility=g=>m.setGlobeEnvironmentVisible(g),h.setGlobeEnvironmentVisible=h.setGlobeVisibility,h.setTerrainVisibility=g=>m.setTerrainEnable(g),h.setTerrainEnable=h.setTerrainVisibility,h.setDepthTest=g=>m.setDepthTestEnable(g),h.setDepthTestEnable=h.setDepthTest,h.setBaseMap=(g,R)=>m.changeBaseMap(g,R),h.changeBaseMap=h.setBaseMap,h.setShadowVisibility=g=>m.setShadowsEnable(g),h.setShadowsEnable=h.setShadowVisibility,h.setEnvironmentMapVisibility=g=>m.setEnvironmentMapEnable(g),h.setEnvironmentMapEnable=h.setEnvironmentMapVisibility,h.setAOVisibility=g=>m.setAmbientOcclusion(g),h.setAmbientOcclusion=h.setAOVisibility,h.setBackgroundColor=g=>m.setGlobeColor(g),h.setGlobeColor=h.setBackgroundColor,h.setWorldTime=g=>m.setTime(g),h.setTime=h.setWorldTime,h.setModelBrightness=g=>m.setModelBrightness(g),h.adjustModelColor=g=>m.setModelColorAdjustment(g),h.setModelColorAdjustment=h.adjustModelColor,h.setShadowIntensity=g=>{m.setShadowDarkness?m.setShadowDarkness(g):console.warn("baseSetting.setShadowDarkness is not available. Please reload the page.")},h.setShadowDarkness=h.setShadowIntensity,h.switchSceneMode=async g=>{const R=g?"2d":"3d";await m.setCadMode(R),g&&!I&&(I=new tc({cesium:a,viewer:p})),l.emit("setMode",R)},h.setSceneMode=h.switchSceneMode,h.set2d=g=>h.switchSceneMode(g),h.is2dMode=()=>m.is2d,h.setMouseControlMode=g=>m.setMouseHabit(g),h.setMouseHabit=h.setMouseControlMode,h.setCollisionEnabled=g=>m.setCollisionDetection(g),h.setCollisionDetection=h.setCollisionEnabled,h.searchAndLocate=(g,R)=>m.searchLocation(g,R),h.searchLocation=h.searchAndLocate,h.setGisOptions=g=>{g.globe!==void 0&&m.setGlobeEnvironmentVisible(g.globe),g.elevation!==void 0&&m.setTerrainEnable(g.elevation),g.depthTestAgainstTerrain!==void 0&&m.setDepthTestEnable(g.depthTestAgainstTerrain),g.rendering!==void 0&&m.setAmbientOcclusion(g.rendering)},h.getConfigure=()=>(console.warn("getConfigure is not initialized. Please ensure LeitingSetting component is mounted."),{}),h.setConfigure=g=>{console.warn("setConfigure is not initialized. Please ensure LeitingSetting component is mounted.",g)},h.addCadModel=g=>{const R={...g};return R.files&&!R.fileNames&&(R.fileNames=R.files),R.fileNames||(R.fileNames=[]),y.addDxfModel(R)},h.addDxfModel=h.addCadModel,h.deleteCad=g=>y.deleteCad(g),h.deleteAllCad=()=>y.deleteAllCad(),h.showCadModel=g=>y.showJson(g),h.showDxfModel=h.showCadModel,h.showCadLayer=g=>y.showJsonByLayer(g),h.showDxfLayer=h.showCadLayer,h.flyToCadModel=(g={})=>y.flyToCadModel(g),h.getCadModels=g=>y.getDxfModels(g),h.getDxfModels=h.getCadModels,h.getCadLayers=g=>y.getMapLayers(g),h.getDxfLayers=h.getCadLayers,h.getCadModelId=()=>y.getModelId(),h.setCadOpen=g=>y.setDxfOpen(g),h.setDxfOpen=h.setCadOpen,h.getCadOpen=()=>y.getDxfOpen(),h.getDxfOpen=h.getCadOpen,h.adjustCadModel=g=>y.adjustingModelByCad(g),h.adjustingModelByCad=h.adjustCadModel,h.saveAnnotations=()=>{let g=null;return I&&(g=I.saveAnnotations()),o?.saveAnnotations&&o.saveAnnotations(g),g},h.loadAnnotations=g=>I?I.loadAnnotations(g):!1,h.flyToTopView=()=>{y.flyToCadModel()},h.menuEvents=l,h.addMenuItems=g=>{l.emit("insertMenu",g)},h.insertMenu=h.addMenuItems,h.filterMenuItems=g=>{l.emit("setMenuListFilter",g)},h.setMenuListFilter=h.filterMenuItems,h.setMenuVisibility=g=>{l.emit("showMenu",g)},h.showMenu=h.setMenuVisibility,h.setPanelVisibility=(g,R)=>{l.emit("setMenuActive",g,R)},h.setMenuActive=h.setPanelVisibility,h.addContextMenuItems=g=>{console.warn("addContextMenuItems is not initialized yet. Please wait for LeitingBIM component to mount.",g)},h.insertContextMenu=h.addContextMenuItems,h.removeContextMenuItems=g=>{console.warn("removeContextMenuItems is not initialized yet.",g)},h.deleteContextMenu=h.removeContextMenuItems,h.closeContextMenu=()=>{console.warn("closeContextMenu is not initialized yet.")},h.hideContextMenu=h.closeContextMenu,h.getModelTree=()=>{const g=[],R=C.getMapTileset();return Object.keys(R).forEach(M=>{const F=R[M];if(F&&F.leiting&&F.leiting.tree){const L=F.leiting.tree;Array.isArray(L)?g.push(...L):g.push(L)}}),g},h.getTree=h.getModelTree,h.getAllComponentDetails=()=>{const g=C.getMapTileset(),R={},M=[];try{Object.keys(g).forEach(F=>{const L=g[F];if(!L||!L.leiting)return;const G=L.leiting,N=G.node,v=G.model.formData,w=G.box;if(!N||!N.nodeExtras)return;const b=G.model.modelId;R[b]=N.nodeExtras;const T=N.nodeExtras.element;if(!T)return;const P=w?w.center:{x:0,y:0,z:0};Object.values(T).forEach(_=>{if(_.box3)try{const O=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(v.totalRotation||0)),D=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(O),new a.Cartesian3(0,0,0)),U=a.Cartesian3.fromDegrees(v.longitude,v.latitude,v.height),V=a.Transforms.eastNorthUpToFixedFrame(U);a.Matrix4.multiply(V,D,V);const $=new a.Cartesian3(P.x,P.y,0),X=new a.Cartesian3;a.Matrix4.multiplyByPoint(V,$,X);const ne=a.Cartographic.fromCartesian(X),se=_.box3?.Center?.x||0,oe=_.box3?.Center?.y||0,Y=_.box3?.Center?.z||0,z=new a.Cartesian3(-P.x+se,-P.y+oe,0+Y),J=a.Matrix4.fromTranslation(z),re=a.Matrix4.clone(J);a.Matrix4.multiply(D,re,re);const ae=a.Cartesian3.fromDegrees(ne.longitude/Math.PI*180,ne.latitude/Math.PI*180,v.height),le=a.Transforms.eastNorthUpToFixedFrame(ae);a.Matrix4.multiply(le,re,le);const he=a.Cartographic.fromCartesian(new a.Cartesian3(le[12],le[13],le[14]));_.box3.cartographic={longitude:he.longitude/Math.PI*180,latitude:he.latitude/Math.PI*180,height:he.height};const Me={id:_.uniqueId,billboard:[{theme:"Tag9999",position:[_.box3.cartographic.longitude,_.box3.cartographic.latitude,_.box3.cartographic.height],options:{text:_.name}}]};M.push(Me)}catch(O){console.warn("Error calculating component position:",O)}})})}catch(F){console.error("getAllComponents error:",F)}return R},h.getAllComponents=h.getAllComponentDetails,h.getComponentInfoList=g=>{if(!Array.isArray(g))return[];const R=C.getMapTileset(),M=[],F={};g.forEach(L=>{!L.modelId||!L.elementId||(F[L.modelId]||(F[L.modelId]=[]),F[L.modelId]?.push(L.elementId))});try{Object.keys(F).forEach(L=>{const G=R[L];if(!G||!G.leiting)return;const N=G.leiting,v=N.node,w=N.model.formData,b=N.box;if(!v||!v.nodeExtras)return;const T=v.nodeExtras.element;if(!T)return;const P=b?b.center:{x:0,y:0,z:0};F[L]?.forEach(_=>{const O=T[_];if(O&&O.box3)try{const D=a.Quaternion.fromAxisAngle(a.Cartesian3.UNIT_Z,a.Math.toRadians(w.totalRotation||0)),U=a.Matrix4.fromRotationTranslation(a.Matrix3.fromQuaternion(D),new a.Cartesian3(0,0,0)),V=a.Cartesian3.fromDegrees(w.longitude,w.latitude,w.height),$=a.Transforms.eastNorthUpToFixedFrame(V);a.Matrix4.multiply($,U,$);const X=new a.Cartesian3(P.x,P.y,0),ne=new a.Cartesian3;a.Matrix4.multiplyByPoint($,X,ne);const se=a.Cartographic.fromCartesian(ne),oe=O.box3?.Center?.x||0,Y=O.box3?.Center?.y||0,z=O.box3?.Center?.z||0,J=new a.Cartesian3(-P.x+oe,-P.y+Y,0+z),re=a.Matrix4.fromTranslation(J),ae=a.Matrix4.clone(re);a.Matrix4.multiply(U,ae,ae);const le=a.Cartesian3.fromDegrees(se.longitude/Math.PI*180,se.latitude/Math.PI*180,w.height),he=a.Transforms.eastNorthUpToFixedFrame(le);a.Matrix4.multiply(he,ae,he);const Me=a.Cartographic.fromCartesian(new a.Cartesian3(he[12],he[13],he[14]));O.box3.cartographic={longitude:Me.longitude/Math.PI*180,latitude:Me.latitude/Math.PI*180,height:Me.height},O.elementId=_,O.modelId=L,M.push(O)}catch(D){console.warn("Error calculating component position:",D)}})})}catch(L){console.error("getCptInfos error:",L)}return M},h.getCptInfos=h.getComponentInfoList,h.baseCompt=A.baseCompt,window.Methods=h}return console.log("methods",h),{Cesium:a,viewer:p,methods:h,menuEvents:l}}function co(n){return d.getCurrentScope()?(d.onScopeDispose(n),!0):!1}function uo(n){return typeof n=="function"?n():d.unref(n)}const U0=typeof window<"u"&&typeof document<"u";typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;const _0=Object.prototype.toString,Q0=n=>_0.call(n)==="[object Object]",H0=()=>{};function G0(n){return d.getCurrentInstance()}function ic(n,e=!0,t){G0()?d.onMounted(n,t):e?n():d.nextTick(n)}function Nt(n){var e;const t=uo(n);return(e=t?.$el)!=null?e:t}const Ln=U0?window:void 0;function Y0(...n){let e,t,i,s;if(typeof n[0]=="string"||Array.isArray(n[0])?([t,i,s]=n,e=Ln):[e,t,i,s]=n,!e)return H0;Array.isArray(t)||(t=[t]),Array.isArray(i)||(i=[i]);const o=[],r=()=>{o.forEach(u=>u()),o.length=0},l=(u,f,p,h)=>(u.addEventListener(f,p,h),()=>u.removeEventListener(f,p,h)),a=d.watch(()=>[Nt(e),uo(s)],([u,f])=>{if(r(),!u)return;const p=Q0(f)?{...f}:f;o.push(...t.flatMap(h=>i.map(A=>l(u,h,A,p))))},{immediate:!0,flush:"post"}),c=()=>{a(),r()};return co(c),c}function V0(){const n=d.ref(!1),e=d.getCurrentInstance();return e&&d.onMounted(()=>{n.value=!0},e),n}function sc(n){const e=V0();return d.computed(()=>(e.value,!!n()))}function W0(n,e={}){const{window:t=Ln}=e,i=sc(()=>t&&"matchMedia"in t&&typeof t.matchMedia=="function");let s;const o=d.ref(!1),r=c=>{o.value=c.matches},l=()=>{s&&("removeEventListener"in s?s.removeEventListener("change",r):s.removeListener(r))},a=d.watchEffect(()=>{i.value&&(l(),s=t.matchMedia(uo(n)),"addEventListener"in s?s.addEventListener("change",r):s.addListener(r),o.value=s.matches)});return co(()=>{a(),l(),s=void 0}),o}function z0(n,e,t={}){const{window:i=Ln,...s}=t;let o;const r=sc(()=>i&&"ResizeObserver"in i),l=()=>{o&&(o.disconnect(),o=void 0)},a=d.computed(()=>Array.isArray(n)?n.map(f=>Nt(f)):[Nt(n)]),c=d.watch(a,f=>{if(l(),r.value&&i){o=new ResizeObserver(e);for(const p of f)p&&o.observe(p,s)}},{immediate:!0,flush:"post"}),u=()=>{l(),c()};return co(u),{isSupported:r,stop:u}}function j0(n,e={width:0,height:0},t={}){const{window:i=Ln,box:s="content-box"}=t,o=d.computed(()=>{var f,p;return(p=(f=Nt(n))==null?void 0:f.namespaceURI)==null?void 0:p.includes("svg")}),r=d.ref(e.width),l=d.ref(e.height),{stop:a}=z0(n,([f])=>{const p=s==="border-box"?f.borderBoxSize:s==="content-box"?f.contentBoxSize:f.devicePixelContentBoxSize;if(i&&o.value){const h=Nt(n);if(h){const A=h.getBoundingClientRect();r.value=A.width,l.value=A.height}}else if(p){const h=Array.isArray(p)?p:[p];r.value=h.reduce((A,{inlineSize:C})=>A+C,0),l.value=h.reduce((A,{blockSize:C})=>A+C,0)}else r.value=f.contentRect.width,l.value=f.contentRect.height},t);ic(()=>{const f=Nt(n);f&&(r.value="offsetWidth"in f?f.offsetWidth:e.width,l.value="offsetHeight"in f?f.offsetHeight:e.height)});const c=d.watch(()=>Nt(n),f=>{r.value=f?e.width:0,l.value=f?e.height:0});function u(){a(),c()}return{width:r,height:l,stop:u}}function $0(n={}){const{window:e=Ln,initialWidth:t=Number.POSITIVE_INFINITY,initialHeight:i=Number.POSITIVE_INFINITY,listenOrientation:s=!0,includeScrollbar:o=!0}=n,r=d.ref(t),l=d.ref(i),a=()=>{e&&(o?(r.value=e.innerWidth,l.value=e.innerHeight):(r.value=e.document.documentElement.clientWidth,l.value=e.document.documentElement.clientHeight))};if(a(),ic(a),Y0("resize",a,{passive:!0}),s){const c=W0("(orientation: portrait)");d.watch(c,()=>a())}return{width:r,height:l}}const K0={class:"title"},q0={class:"actions"},X0={class:"card-body"},J0=d.defineComponent({__name:"LeitingDraggableCard",props:{visible:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},title:{type:String,default:"Title"},initialPosition:{type:Object,default:()=>({x:0,y:0})},width:{type:[Number,String],default:300},minWidth:{type:Number,default:200},fullHeight:{type:Boolean,default:!1},align:{type:String,default:""}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=e,o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:S=>{s("update:visible",S),s("update:open",S)}}),r=d.ref(null),l=d.ref(t.initialPosition?.x||0),a=d.ref(t.initialPosition?.y||0),c=d.ref(t.width),u=d.ref(t.fullHeight?"100%":"600px");d.watch(()=>t.fullHeight,S=>{S?u.value="100%":u.value==="100%"&&(u.value="600px")});const{height:f}=$0();d.watch(f,()=>{t.fullHeight&&(u.value="100%")});const p=d.ref(!1),h=S=>{p.value=!0,S.preventDefault(),S.stopPropagation();const k=S.clientX,B=S.clientY,x=typeof c.value=="number"?c.value:r.value?.offsetWidth||0,g=typeof u.value=="number"?u.value:r.value?.offsetHeight||0,R=F=>{if(!p.value)return;F.preventDefault();const L=F.clientX-k,G=F.clientY-B,N=x+L,v=g+G;N>100&&(c.value=N),v>100&&(u.value=v)},M=()=>{p.value=!1,document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",M)};document.addEventListener("mousemove",R),document.addEventListener("mouseup",M)},A=d.computed(()=>({left:`${l.value}px`,top:`${a.value}px`,width:typeof c.value=="number"?`${c.value}px`:c.value,height:typeof u.value=="number"?`${u.value}px`:u.value,position:"absolute",zIndex:2e3})),C=()=>{d.nextTick(()=>{if(r.value){const S=r.value.offsetParent||document.body,k=S.clientWidth,B=S.clientHeight,x=typeof c.value=="number"?c.value:r.value.offsetWidth||350,g=typeof u.value=="number"?u.value:r.value.offsetHeight||600;l.value+x>k&&(l.value=Math.max(0,k-x-20)),a.value+g>B&&(a.value=Math.max(0,B-g-20)),l.value<0&&(l.value=0),a.value<0&&(a.value=0)}})},m=d.ref(!1),y=S=>{if(S.target.closest(".close-btn")||S.target.closest(".actions"))return;m.value=!0,S.preventDefault(),S.stopPropagation();const k=S.clientX,B=S.clientY,x=l.value,g=a.value,R=F=>{if(!m.value)return;F.preventDefault();const L=F.clientX-k,G=F.clientY-B;l.value=x+L,a.value=g+G},M=()=>{m.value=!1,document.removeEventListener("mousemove",R),document.removeEventListener("mouseup",M),C()};document.addEventListener("mousemove",R),document.addEventListener("mouseup",M)},E=()=>{d.nextTick(()=>{if(t.align&&r.value){const S=r.value.offsetParent||document.body,k=typeof c.value=="number"?c.value:r.value.offsetWidth||350;t.align==="right"?l.value=Math.max(0,S.clientWidth-k-20):t.align==="center"&&(l.value=Math.max(0,(S.clientWidth-k)/2))}C()})};d.onMounted(()=>{t.align?E():C()}),d.watch(o,S=>{S&&(t.align?E():C())});const I=()=>{o.value=!1,s("close")};return(S,k)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{ref_key:"cardRef",ref:r,class:d.normalizeClass(["draggable-card leiting-scroll",["leiting-theme-"+d.unref(i)]]),style:d.normalizeStyle(A.value)},[d.createElementVNode("div",{ref:"headerRef",class:"card-header",onMousedown:y},[d.createElementVNode("span",K0,d.toDisplayString(n.title),1),d.createElementVNode("div",q0,[d.renderSlot(S.$slots,"header-extra",{},void 0,!0),d.createElementVNode("span",{class:"close-btn",onClick:I},"×")])],544),d.createElementVNode("div",X0,[d.renderSlot(S.$slots,"default",{},void 0,!0)]),d.createElementVNode("div",{class:"resize-handle",onMousedown:h},[...k[0]||(k[0]=[d.createElementVNode("svg",{viewBox:"0 0 10 10",width:"10",height:"10",fill:"currentColor"},[d.createElementVNode("path",{d:"M10 10 L10 2 L2 10 Z"})],-1)])],32)],6)),[[d.vShow,o.value]])}}),Ne=(n,e)=>{const t=n.__vccOpts||n;for(const[i,s]of e)t[i]=s;return t},Fe=Ne(J0,[["__scopeId","data-v-50bf6126"]]);function Z0(n){const e=d.ref([]),t=d.ref([]),i=d.ref([]),s=d.ref(""),o=d.ref(!0);d.watch(()=>d.unref(n),f=>{if(!f||f.length===0)return;const p=[],h=(m,y)=>{m.forEach(E=>{const I=E.id||E.key||E.$id,S=E.modelId||y;S&&(E.modelId=S),I&&p.push(I),E.children&&E.children.length>0&&h(E.children,S)})};h(f);const A=new Set(i.value);let C=!1;p.forEach(m=>{A.has(m)||(A.add(m),C=!0)}),C&&(i.value=Array.from(A))},{immediate:!0,deep:!0});const r=d.computed(()=>{const f=d.unref(n);if(!f)return[];const p=[],h=(A,C)=>{A.forEach(m=>{const y=m.id||m.key||m.$id,E=m.name||m.title;p.push({key:y,title:E,parentKey:C}),m.children&&m.children.length>0&&h(m.children,y)})};return h(f),p}),l=f=>{e.value=f,o.value=!1},a=f=>{i.value=f},c=f=>{t.value=f},u=f=>r.value.find(h=>h.key===f)?.parentKey;return d.watch(s,f=>{if(!f)return;const h=r.value.filter(C=>C.title&&C.title.toLowerCase().includes(f.toLowerCase())).map(C=>C.parentKey),A=new Set;h.forEach(C=>{let m=C;for(;m;)A.add(m),m=u(m)}),e.value=[...A],o.value=!0}),{expandedKeys:e,selectedKeys:t,checkedKeys:i,searchValue:s,autoExpandParent:o,onExpand:l,onCheck:a,onSelect:c}}const eC={class:"search-box"},tC={key:0},nC={style:{color:"#f50"}},iC={key:1},sC={key:1,class:"empty-tip"},Pi=Ne(d.defineComponent({__name:"LeitingTree",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"构件树"},width:{type:[Number,String],default:320},treeData:{type:Array,default:()=>[]},initialPosition:{type:Object,default:()=>({x:0,y:0})},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close","select","check"],setup(n,{emit:e}){const t=ye.Input.Search,i=ye.Tree,s=n,o=e,r=d.inject("leiting-theme",d.ref("dark")),l=d.inject("leitingMethods"),a=g=>{l?.value?.onSearchComponent&&l.value.onSearchComponent(g)},c=d.computed({get:()=>s.open!==void 0?s.open:s.visible,set:g=>{o("update:visible",g),o("update:open",g)}}),u=d.ref(null),{height:f}=j0(u),p=d.computed(()=>f.value||300),h=d.ref({children:"children",title:"name",key:"id"}),{expandedKeys:A,selectedKeys:C,checkedKeys:m,searchValue:y,autoExpandParent:E}=Z0(d.toRef(s,"treeData")),I=g=>{A.value=g,E.value=!1},S=g=>{const R=[],M=F=>{if(!F.children||F.children.length===0){const G=F.element_Id;F.modelId&&G&&R.push({modelId:F.modelId,elementId:G})}else F.children.forEach(M)};return M(g),R},k=(g,R)=>{m.value=g,o("check",g,R);const M=S(R.node).map(F=>({...F,show:R.checked}));l?.value?.setComponentVisibility&&l.value.setComponentVisibility(M),l?.value?.onTreeCheck&&l.value.onTreeCheck(g,R)},B=(g,R)=>{if(C.value=g,o("select",g,R),R.selected){const M=S(R.node);M.length>0&&l?.value?.flyToObjects&&l.value.flyToObjects({selectCpts:M})}l?.value?.onTreeSelect&&l.value.onTreeSelect(g,R)},x=()=>{o("update:visible",!1),o("close")};return(g,R)=>(d.openBlock(),d.createBlock(Fe,{visible:c.value,"onUpdate:visible":R[1]||(R[1]=M=>c.value=M),title:n.title,"initial-position":n.initialPosition,"full-height":n.fullHeight,onClose:x},{default:d.withCtx(()=>[d.createElementVNode("div",{class:d.normalizeClass(["leiting-tree-container",[`theme-${d.unref(r)}`]])},[d.createElementVNode("div",eC,[d.createVNode(d.unref(t),{value:d.unref(y),"onUpdate:value":R[0]||(R[0]=M=>d.isRef(y)?y.value=M:null),placeholder:"搜索构件","allow-clear":"","enter-button":"",onSearch:a},null,8,["value"])]),d.createElementVNode("div",{class:"tree-wrapper",ref_key:"treeWrapperRef",ref:u},[n.treeData&&n.treeData.length?(d.openBlock(),d.createBlock(d.unref(i),{key:0,"tree-data":n.treeData,"field-names":h.value,height:p.value,"expanded-keys":d.unref(A),"auto-expand-parent":d.unref(E),"selected-keys":d.unref(C),"checked-keys":d.unref(m),checkable:"","block-node":"",onExpand:I,onSelect:B,onCheck:k},{title:d.withCtx(({name:M,title:F})=>[(M||F)&&d.unref(y)&&(M||F).toLowerCase().indexOf(d.unref(y).toLowerCase())>-1?(d.openBlock(),d.createElementBlock("span",tC,[d.createTextVNode(d.toDisplayString((M||F).substr(0,(M||F).toLowerCase().indexOf(d.unref(y).toLowerCase())))+" ",1),d.createElementVNode("span",nC,d.toDisplayString(d.unref(y)),1),d.createTextVNode(" "+d.toDisplayString((M||F).substr((M||F).toLowerCase().indexOf(d.unref(y).toLowerCase())+d.unref(y).length)),1)])):(d.openBlock(),d.createElementBlock("span",iC,d.toDisplayString(M||F),1))]),_:1},8,["tree-data","field-names","height","expanded-keys","auto-expand-parent","selected-keys","checked-keys"])):(d.openBlock(),d.createElementBlock("div",sC,"暂无数据"))],512)],2)]),_:1},8,["visible","title","initial-position","full-height"]))}}),[["__scopeId","data-v-749af6eb"]]),oC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEhSURBVDhP1ZRhkcIwEIWJAsDBOTgkgAJAAYcCQAFFAUgoDjgFh4Q7B+cAUFC+19kyS0hL+Ulm3nS6+/ZLNkkbOk9GURRDWUIIxyZraEoCWZLfmmcOLK/z14KAqGiGvq14zDMHNk/BHkAAehh/0ABtKMxUSFzPNfpFI+JnD7wDYVaxIIov41bIfxHfoROakhe0HDeQmbQfFzTxJj+zTXYg1kWrarISRFKzLNAfGsbL9iDzq/0j+kQZ/k1wm7onoKW3Hq42F0jLVK//Tcebott2fJAbVK1lvKwBNd6rRIsFsfJka0G2qdpQPy7+EPC0AumexKAzoH5FbgvSbHuUW6EOYubbfwX0cLPfFJS4K6mPNrbdHb+uvP498dhVn4v9FWo9V3RZzFxAv8L9AAAAAElFTkSuQmCC",oc="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAERSURBVDhPvZTrEYIwEISTCrQD6EA7gA60AylBK1Aq0A7ECrQDoQPsADrACuLuTMJkIiHxjzezgyR7H3d5KJVSqRAigcaQUjYYX2JgZY/P/O4lEgYYFo7pgPcc2kSCBoIUzDeo0klPPEsNYlX7AKzA/M6ASrRzYoIGG5DAOCvzBvzMOxqQazSgLLI1QdAW5jWpUAPV0AVKIc7FRCuNy7RkWozJtj1BED7ANbpDXHhffFXUwUnZwRYp7qw7Rx8/lLkV9R4QD2w1A8pjW3sA4h5au+pXEBS76P8D6Ut9/nXXaiRQdnBXqBfEC+4GdzSxW5v6F7CTeHnbCVCBsWIE+RYVrdF4DSz6OwgiADDexbmT3X0A4fSDfDjUugcAAAAASUVORK5CYII=",rC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAFESURBVDhPlZMNEcIwDIVXBQwFgAJAAcMBDgAFIGE4wAHgABSwOdgcIAEUjPd6aS/rfhi7y12bJl9f0sxEf3xVVV0RPoetjTFvnWqGcgSylfgihA0CKcgJgBfsAqMiKiM0+gkKlCyZCN8uhPWCFOSBxARWORU4W2CdeV9XjxSEJcwkjokTqBpzjxjCn7CyVRECzjg8wHLYCmabK7CplBcLhMr2DZCqP0dCovYZ9hYGXx1izLUGUkkfxI/sTQiCf4N1zLWAWCKV2nP6PEhB2Ngd7B4GC4SJnCcP8SAFoc/Ph/TqjVvTPogFKUiJ/VGU+GdmUAA5ObA7cyC+iPt/MjUfKRL4emyuK+cGH8tufFRUHywZ+RYlnRDdIwfzLzVUibtQv1oNhoAExtfpVdIAiQIOWiY9o2sQxJemOydTS1jR1di2Zn8B8f27apou9kMAAAAASUVORK5CYII=",aC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAHDSURBVDhPlZOxL0NRFIe9ECubhehoIIjJ1HYwCkIiJpUQEkN1YZBobU0kFKNI3iTGYrDRv0BIhLXCYpCwiO35fs25zWva98JNvpz37j33d8+551yvLWIEQXDG0izMe55XjvJz816MUJG1LVuvYJcQrEb5xwkV2JSHGfAhgBJiu63E4oSUzpRtusa+wBooKkWnKOujQYh7SbCShQx0m9cpds4iOseOw7BFmUPwU341IQT2MaOQgi9QND+wiqNnBxT4X7SIbrAqhNI9wiUvJ+W8A99wDEWdwrw25iVkkenAEb5LkIQPuIMJWJGQoriFd+iBCkhc8zUhfJSm7mva5l3aadubDgtpMgGKpB/eoBfuQZFoPNhBj9gTaC3kKkEEGXPswF7Y5rLro1AW8UI6GmelmAzfkUWlNaWt6/iT0DOOA5bqoSuzHfIvofATqSJQb8KoiJbtPi6x2dA9FPjXE1F/uZKrv3IwCFcNqVmoPlal7QJ9q/wZCbk7Ioo9/tehE9q1r0nIxNQbG4YEXdkVjQ5J2OZXbB88gVrgQIJNj9aaT4LboPK7J6O0Ktb1KYtc/aYxGff6h3AYY6Nvzk2GQ1WQTVj4BST70jYaqceXAAAAAElFTkSuQmCC",lC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAADhSURBVHgBvVOBEYIwDEw9B2ADO4IjuIEjwAa6Aa7ABMAEuIIjOIFsUDao37vgxVZbBI+/+0tI0+fJBaIIrLUFaMAHmNNcsMAIE+vdJLQykQ+0wFHBrsyiT/sL2I1DDTac/+4Klzobov7WHxt29qGmaYaQnlhLCmUTa2l4C2ljvamFlEvY0xpCW/kA924GblfGWciZaJyXQvSmlOoDITSdXQBbcA8eKfy/nHDFeY470FIX8tzUIu84FmLWuTzz7yhRLPm54dKJ4+A5uoJ3HgHBUfUmxGIa4QDuKA4n3kLk9ZInw0qu5b1R1aYAAAAASUVORK5CYII=",cC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAADFSURBVDhPxVPBDYMwDIwnKJu0G9ANYJMyQrsBbNIRGAE2gEnSO6mpIMJxkBC1lEds52zfOeK9b51zV5wte4lIr8RWbgGQh2fGmaIHJe4EetKPtDpRcA5AvwcB7FtgCcTOH0p3YzaQNd75QBiVXJG3LRtCRyQ6Jvsekd3gTsJVoDcihZLQQjXGTRMzIzPhOCCQyNYvSuEue7Qdm02yK0u1nM2m/FQyKb8JZHH+l81Ofdpdm82tvikjThyNlbSEBvIPFj+MfwA76qSYUG3g9QAAAABJRU5ErkJggg==",dC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAEcSURBVDhPrZSNDYIwEIXpBOIGjMAIOIE4AbgBGwAbOIJu4Aa4gW4gI+gE9b3mjjSmibSR5ALX3H33W4y1Ns+yrIe0EH7HPC8YnyGjAegkEB5cYyiwrdWXIEc1xnSREGcuiTQEWeg7gG4+CMcl9ALnLkvogwScv+wq6FMQJJCJDgBtBcSAI3QClwe2YZAHcY2Ho4kGAVLA6U5/CEvdp4KYhesFhBPpCZIAz6jStHhproJcHyAHbb5nF+6RZ8CsGslIQaHp/gSxRzlApU4GugPxNuDN/eNarAJxapUPgm8rQ9C1SAI9AOGiHhGApSdnRN8FshbEiLwiLI1rMUM6zSQ0tX9c2lp/Iw0iMIPU38iFIN1mTmOjKa98vyWB4QM5XQnvsbFsyAAAAABJRU5ErkJggg==",uC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARzQklUCAgICHwIZIgAAAGPSURBVDhPrZT9UQIxEMUvFSgViBUoFQgVABV4VqBW4FmBUIFQgZRwVqBU4HUAVHC+X2aXycQw/sPOvLncZvdlv5JQFaTv+1upp8IyhLDHRLpLfe6FrXRt7hZShYyH+n8RauGAv/AkQNYIHICshFcRdu6fE/kGRN/mQGTIpzAzMoh6EV2fIsJ5IwNOj2IpVZ6i6difSecRVnlELZHIgHROisgXRCa78Z+IrMBf2pjLYJNENGSd1kO2pPghjKQniyqY8lFr2NfaqC18wn7nZCMlWg7xLq70TxfRLyHqtABN2lbp40mSSCzBcSebif1TPyKjDBcQ0eJJRkIUpHkMPUlnkBU+pnlWItL6ERgw8o1iqRHtgzAUGNRD2qmkvgMvNnneUQcZ4ggR6VGXG+OOA1koNvrFcY7+af++VJe0hucfyKQu+RWJc+SDZ3aNvlPpRl7T0qXdafNZYPDehLEZt/rOBR9U8QSaEKX0jHAaE4tshVrgLeJ+Xdl6rS8D3BWJXKnCEwWXEuco9grQ3bb0sP0Cn8/nPm/SMRQAAAAASUVORK5CYII=",hC="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAACDSURBVHgB1ZFhDYAgEIWfzgBGIIINpIEViGAkG2gEbWADjWADfMw/iDgUfji/7e3gxt3uHsDXZFrrlrFBHJNpsPAgEEmORArn3lFroEZQCjcTbAhzepPsgbuCgn8FBWvsUAMfFR5OIPGS5G80JkrG2sopHKbO1BCoHy8ZNhRUT5X4BTu6qyNSwwCiMAAAAABJRU5ErkJggg==",fC={class:"menu-container"},pC=["onClick","title"],gC={class:"menu-icon"},mC=["src","alt"],AC={key:3,style:{"font-size":"12px"}},yC={key:0,class:"sub-menu"},CC=["onClick"],Nn=d.defineComponent({__name:"LeitingMenu",props:{visible:{type:Boolean,default:!0},activeIds:{type:Array,default:()=>[]},is2d:{type:Boolean,default:!1},customItems:{type:Array,default:()=>[]}},emits:["action"],setup(n,{emit:e}){const t=n,i=d.inject("leiting-theme",d.ref("dark")),s=d.inject("leiting-menu-size",d.ref("medium")),o=d.inject("leitingMethods",d.ref({})),r=d.computed(()=>i.value||i),l=d.computed(()=>s.value||s),a=d.ref([{ID:"home",title:"主视角",src:oC,key:"homeView"},{ID:"tree",title:"目录树",src:oc,key:"componentTree"},{ID:"cadLayer",title:"图层",src:oc,key:"cadLayer"},{ID:"measure",title:"量算",src:rC,key:"measurement"},{ID:"section",title:"剖切",src:aC,key:"section"},{ID:"roam",title:"人物漫游",src:lC,key:"roam"},{ID:"info",title:"构件信息",src:cC,key:"componentInfo"},{ID:"cadPosition",title:"调整位置",src:dC,key:"cadPosition"},{ID:"annotation",title:"标注",src:hC,key:"annotation"},{ID:"setting",title:"设置",src:uC,key:"setting"}]),c=d.ref([]),u=d.ref([...t.activeIds]);d.watch(()=>t.activeIds,k=>{u.value=[...k]},{deep:!0});const f=d.computed(()=>t.visible);o.value&&o.value.menuEvents&&(o.value.menuEvents.on("setMenuListFilter",k=>{c.value=k}),o.value.menuEvents.on("setMenuActive",(k,B)=>{B?u.value.includes(k)||u.value.push(k):u.value=u.value.filter(x=>x!==k)}));const p=d.computed(()=>{let k=a.value;if(t.is2d){const B=["homeView","measurement","cadLayer","annotation"];k=k.filter(x=>x.key&&B.includes(x.key))}else{const B=["cadLayer","cadPosition","annotation"];k=k.filter(x=>!x.key||!B.includes(x.key))}if(c.value.length>0&&(k=k.filter(B=>!B.key||!c.value.includes(B.key))),t.customItems&&t.customItems.length>0){const B=t.customItems.map(x=>({...x,key:x.ID,src:x.src||x.icon}));return[...k,...B]}return k}),h=e,A=k=>{const B=["homeView"];if(k.key&&B.includes(k.key))u.value.includes(k.ID)||(u.value.push(k.ID),setTimeout(()=>{const g=u.value.indexOf(k.ID);g>-1&&u.value.splice(g,1)},1e3));else{const g=u.value.indexOf(k.ID);g>-1?u.value.splice(g,1):u.value.push(k.ID)}const x=u.value.includes(k.ID);k.func&&k.func(k),k.key&&h("action",k.key,x)},C=k=>{a.value=[...a.value,...k]},m=k=>{c.value=k},y=k=>{console.log("LeitingMenu received showMenu event:",k)},E=(k,B)=>{const x=a.value.find(g=>g.ID===k||g.key===k);if(x){const g=u.value.indexOf(x.ID);B&&g===-1?u.value.push(x.ID):!B&&g>-1&&u.value.splice(g,1)}};let I=null;const S=()=>{o.value?.menuEvents&&(I&&(I.off("insertMenu",C),I.off("setMenuListFilter",m),I.off("showMenu",y),I.off("setMenuActive",E)),I=o.value.menuEvents,I.on("insertMenu",C),I.on("setMenuListFilter",m),I.on("showMenu",y),I.on("setMenuActive",E))};return d.onMounted(()=>{S()}),d.onUnmounted(()=>{I&&(I.off("insertMenu",C),I.off("setMenuListFilter",m),I.off("showMenu",y),I.off("setMenuActive",E))}),d.watch(o,()=>{S()},{deep:!0}),(k,B)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-menu-wrapper",["leiting-theme-"+r.value,"size-"+l.value]])},[d.createElementVNode("div",fC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(p.value,x=>(d.openBlock(),d.createElementBlock("div",{key:x.ID,class:d.normalizeClass(["menu-item",{active:u.value.includes(x.ID)}]),onClick:g=>A(x),title:x.title},[d.createElementVNode("div",gC,[x.src?(d.openBlock(),d.createElementBlock("img",{key:0,src:x.src,alt:x.title},null,8,mC)):typeof x.icon=="object"?(d.openBlock(),d.createBlock(d.resolveDynamicComponent(x.icon),{key:1})):typeof x.icon=="string"?(d.openBlock(),d.createElementBlock("i",{key:2,class:d.normalizeClass(["iconfont",`icon-${x.icon}`])},null,2)):(d.openBlock(),d.createElementBlock("span",AC,d.toDisplayString(x.title.substring(0,2)),1))]),x.children&&x.children.length>0?(d.openBlock(),d.createElementBlock("div",yC,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(x.children,g=>(d.openBlock(),d.createElementBlock("div",{key:g.ID,class:d.normalizeClass(["sub-menu-item",{active:u.value.includes(g.ID)}]),onClick:d.withModifiers(R=>A(g),["stop"])},d.toDisplayString(g.title),11,CC))),128))])):d.createCommentVNode("",!0)],10,pC))),128))])],2)),[[d.vShow,f.value]])}}),EC={class:"leiting-section-content"},wC={class:"section-form-item"},bC={class:"radio-group"},vC={class:"section-form-item"},IC={class:"switch-container"},xC={class:"switch"},BC={class:"status-text"},SC={class:"section-form-item slider-item"},MC={class:"slider-wrapper"},TC={class:"section-form-item slider-item"},DC={class:"slider-wrapper"},kC={class:"section-form-item slider-item"},PC={class:"slider-wrapper"},FC={class:"section-form-item table-item"},RC={class:"model-table-container"},OC={class:"model-table"},LC={width:"40"},NC=["checked"],UC=["onClick"],_C=["value"],QC={class:"model-name"},Un=Ne(d.defineComponent({__name:"LeitingSection",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"剖切控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:N=>{i("update:visible",N),i("update:open",N)}}),r=d.ref("Box"),l=d.ref(!1),a=d.ref([]),c=d.ref([]),u=d.computed(()=>c.value.length===0?!1:c.value.every(N=>a.value.includes(N.modelId))),f=N=>{N.target.checked?a.value=c.value.map(w=>w.modelId):a.value=[],R()},p=d.ref([-10,10]),h=d.ref([-10,10]),A=d.ref([-10,10]),C=d.ref([-100,100]),m=d.ref([-100,100]),y=d.ref([-100,100]);let E=!1;const I=N=>{E=!0;const{targetZPlus:v,targetZMinus:w,targetXPlus:b,targetXMinus:T,targetYPlus:P,targetYMinus:_}=N;A.value=[-w,v],p.value=[-T,b],h.value=[-_,P],setTimeout(()=>{E=!1},100)},S=()=>{E||a.value.length===0||!s?.value?.updateSectionRange||s.value.updateSectionRange({targetZPlus:A.value[1],targetZMinus:-A.value[0],targetXPlus:p.value[1],targetXMinus:-p.value[0],targetYPlus:h.value[1],targetYMinus:-h.value[0]})},k=()=>{s?.value?.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)},B=N=>{if(!s?.value?.getMapTileset||!s?.value?.openSection)return;const w=s.value.getMapTileset()[N];if(w&&w.leiting?.box){const{min:b,max:T}=w.leiting.box,P=(T.x-b.x)/2,_=(T.y-b.y)/2,O=(T.z-b.z)/2;a.value.length<=1&&(C.value=[-P*2,P*2],m.value=[-_*2,_*2],y.value=[-O*2,O*2],p.value=[-P,P],h.value=[-_,_],A.value=[-O,O],s.value.updateSectionRange&&s.value.updateSectionRange({targetZPlus:O,targetZMinus:O,targetXPlus:P,targetXMinus:P,targetYPlus:_,targetYMinus:_})),s.value.openSection(N,{moveCallBack:I}),s.value.setSectionBoxVisibility&&s.value.setSectionBoxVisibility(l.value)}},x=N=>{const v=a.value.indexOf(N);v>-1?a.value.splice(v,1):a.value.push(N),R()};let g=[];const R=()=>{const N=a.value.filter(w=>!g.includes(w)),v=g.filter(w=>!a.value.includes(w));N.forEach(w=>B(w)),v.forEach(w=>{s?.value?.closeSection&&s.value.closeSection(w)}),g=[...a.value]},M=()=>{},F=()=>{o.value=!1,i("close")},L=()=>{l.value=!1,a.value=[],g=[],p.value=[-10,10],h.value=[-10,10],A.value=[-10,10],C.value=[-100,100],m.value=[-100,100],y.value=[-100,100]};d.watch(()=>t.visible,N=>{N?G():(s?.value?.closeSection&&s.value.closeSection(),L())});const G=()=>{s?.value&&typeof s.value.getModelList=="function"&&(c.value=s.value.getModelList()||[],c.value.length>0&&a.value.length===0&&(a.value=[c.value[0].modelId],g=[...a.value]),t.visible&&a.value.length>0&&(l.value=!0,a.value.forEach(N=>B(N))))};return d.watch(()=>s?.value,()=>{G()},{immediate:!0,deep:!0}),d.onMounted(()=>{G()}),(N,v)=>(d.openBlock(),d.createBlock(Fe,{visible:o.value,title:"剖切分析","full-height":n.fullHeight,"onUpdate:visible":F},{default:d.withCtx(()=>[d.createElementVNode("div",EC,[d.createElementVNode("div",wC,[v[8]||(v[8]=d.createElementVNode("span",{class:"label"},"模式",-1)),d.createElementVNode("div",bC,[d.createElementVNode("label",{class:d.normalizeClass(["radio-item",{active:r.value==="Box"}])},[d.withDirectives(d.createElementVNode("input",{type:"radio",value:"Box","onUpdate:modelValue":v[0]||(v[0]=w=>r.value=w),onChange:M},null,544),[[d.vModelRadio,r.value]]),v[7]||(v[7]=d.createTextVNode(" 剖切盒 ",-1))],2)])]),d.createElementVNode("div",vC,[v[10]||(v[10]=d.createElementVNode("span",{class:"label"},"显示",-1)),d.createElementVNode("div",IC,[d.createElementVNode("label",xC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":v[1]||(v[1]=w=>l.value=w),onChange:k},null,544),[[d.vModelCheckbox,l.value]]),v[9]||(v[9]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",BC,d.toDisplayString(l.value?"显示":"隐藏"),1)])]),d.createElementVNode("div",SC,[v[11]||(v[11]=d.createElementVNode("span",{class:"label"},"X 轴",-1)),d.createElementVNode("div",MC,[d.createVNode(d.unref(ye.Slider),{value:p.value,"onUpdate:value":v[2]||(v[2]=w=>p.value=w),range:"",min:C.value[0],max:C.value[1],step:.1,onChange:S},null,8,["value","min","max"])])]),d.createElementVNode("div",TC,[v[12]||(v[12]=d.createElementVNode("span",{class:"label"},"Y 轴",-1)),d.createElementVNode("div",DC,[d.createVNode(d.unref(ye.Slider),{value:h.value,"onUpdate:value":v[3]||(v[3]=w=>h.value=w),range:"",min:m.value[0],max:m.value[1],step:.1,onChange:S},null,8,["value","min","max"])])]),d.createElementVNode("div",kC,[v[13]||(v[13]=d.createElementVNode("span",{class:"label"},"Z 轴",-1)),d.createElementVNode("div",PC,[d.createVNode(d.unref(ye.Slider),{value:A.value,"onUpdate:value":v[4]||(v[4]=w=>A.value=w),range:"",min:y.value[0],max:y.value[1],step:.1,onChange:S},null,8,["value","min","max"])])]),d.createElementVNode("div",FC,[v[15]||(v[15]=d.createElementVNode("span",{class:"label"},"模型",-1)),d.createElementVNode("div",RC,[d.createElementVNode("table",OC,[d.createElementVNode("thead",null,[d.createElementVNode("tr",null,[d.createElementVNode("th",LC,[d.createElementVNode("input",{type:"checkbox",checked:u.value,onChange:f},null,40,NC)]),v[14]||(v[14]=d.createElementVNode("th",null,"名称",-1))])]),d.createElementVNode("tbody",null,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,w=>(d.openBlock(),d.createElementBlock("tr",{key:w.modelId,class:d.normalizeClass({selected:a.value.includes(w.modelId)}),onClick:b=>x(w.modelId)},[d.createElementVNode("td",null,[d.withDirectives(d.createElementVNode("input",{type:"checkbox",value:w.modelId,"onUpdate:modelValue":v[5]||(v[5]=b=>a.value=b),onClick:v[6]||(v[6]=d.withModifiers(()=>{},["stop"])),onChange:R},null,40,_C),[[d.vModelCheckbox,a.value]])]),d.createElementVNode("td",QC,d.toDisplayString(w.modelName),1)],10,UC))),128))])])])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-ee4d9a12"]]),HC={class:"leiting-player-content"},GC={class:"player-form-item"},YC={class:"switch-container"},VC={class:"switch"},WC={class:"status-text"},zC={class:"player-form-item"},jC={class:"switch-container"},$C={class:"switch"},KC={class:"status-text"},qC={class:"player-form-item"},XC={class:"switch-container"},JC={class:"switch"},ZC={class:"status-text"},eE={class:"player-form-item slider-item"},tE={class:"slider-wrapper"},nE={class:"value-text"},iE={class:"instructions"},sE={class:"key-map"},oE={class:"key-row"},rE={class:"key-row"},aE={class:"key-row"},lE={class:"key-row"},cE={class:"key-row"},dE={class:"key-row"},_n=Ne(d.defineComponent({__name:"LeitingPlayer",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},title:{type:String,default:"漫游控制"},fullHeight:{type:Boolean,default:!1}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(!1),r=d.ref(!1),l=d.ref(!0),a=d.ref(5),c=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:B=>{i("update:visible",B),i("update:open",B)}}),u=d.ref(null),f=d.ref(null),p=d.ref(null),h=d.ref(null),A=d.ref(null),C=d.ref(null),m=()=>{o.value?E():I()},y=()=>{s?.value?.setPlayerParams&&s.value.setPlayerParams({gravityTest:r.value,collisionTest:l.value})},E=async()=>{s?.value?.openPlayer&&(await s.value.openPlayer(),s.value.setPlayerSpeed&&s.value.setPlayerSpeed(a.value),y(),s.value.bindPlayerUiKeys&&(await d.nextTick(),s.value.bindPlayerUiKeys({moveFront:u.value,moveBack:f.value,moveLeft:p.value,moveRight:h.value,moveUp:A.value,moveDown:C.value})))},I=()=>{s?.value?.closePlayer&&s.value.closePlayer()},S=()=>{s?.value?.setPlayerSpeed&&s.value.setPlayerSpeed(a.value)},k=()=>{c.value=!1,i("close")};return d.watch(()=>t.visible,B=>{B?(o.value=!0,s?.value?E():setTimeout(()=>{s?.value&&E()},100)):o.value&&(o.value=!1,I())},{immediate:!0}),(B,x)=>(d.openBlock(),d.createBlock(Fe,{title:n.title,visible:c.value,"full-height":n.fullHeight,"onUpdate:visible":k},{default:d.withCtx(()=>[d.createElementVNode("div",HC,[d.createElementVNode("div",GC,[x[5]||(x[5]=d.createElementVNode("span",{class:"label"},"启用",-1)),d.createElementVNode("div",YC,[d.createElementVNode("label",VC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[0]||(x[0]=g=>o.value=g),onChange:m},null,544),[[d.vModelCheckbox,o.value]]),x[4]||(x[4]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",WC,d.toDisplayString(o.value?"开启":"关闭"),1)])]),d.createElementVNode("div",zC,[x[7]||(x[7]=d.createElementVNode("span",{class:"label"},"重力",-1)),d.createElementVNode("div",jC,[d.createElementVNode("label",$C,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[1]||(x[1]=g=>r.value=g),onChange:y},null,544),[[d.vModelCheckbox,r.value]]),x[6]||(x[6]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",KC,d.toDisplayString(r.value?"开启":"关闭"),1)])]),d.createElementVNode("div",qC,[x[9]||(x[9]=d.createElementVNode("span",{class:"label"},"碰撞",-1)),d.createElementVNode("div",XC,[d.createElementVNode("label",JC,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":x[2]||(x[2]=g=>l.value=g),onChange:y},null,544),[[d.vModelCheckbox,l.value]]),x[8]||(x[8]=d.createElementVNode("span",{class:"slider round"},null,-1))]),d.createElementVNode("span",ZC,d.toDisplayString(l.value?"开启":"关闭"),1)])]),d.createElementVNode("div",eE,[x[10]||(x[10]=d.createElementVNode("span",{class:"label"},"速度",-1)),d.createElementVNode("div",tE,[d.createVNode(d.unref(ye.Slider),{value:a.value,"onUpdate:value":x[3]||(x[3]=g=>a.value=g),min:1,max:10,step:1,onChange:S},null,8,["value"])]),d.createElementVNode("span",nE,d.toDisplayString(a.value),1)]),x[19]||(x[19]=d.createElementVNode("div",{class:"divider"},null,-1)),d.createElementVNode("div",iE,[x[18]||(x[18]=d.createElementVNode("div",{class:"instruction-title"},"操作说明",-1)),d.createElementVNode("div",sE,[d.createElementVNode("div",oE,[d.createElementVNode("span",{class:"key",ref_key:"btnFront",ref:u},"W",512),x[11]||(x[11]=d.createTextVNode(" 前进 ",-1))]),d.createElementVNode("div",rE,[d.createElementVNode("span",{class:"key",ref_key:"btnBack",ref:f},"S",512),x[12]||(x[12]=d.createTextVNode(" 后退 ",-1))]),d.createElementVNode("div",aE,[d.createElementVNode("span",{class:"key",ref_key:"btnLeft",ref:p},"A",512),x[13]||(x[13]=d.createTextVNode(" 左移 ",-1))]),d.createElementVNode("div",lE,[d.createElementVNode("span",{class:"key",ref_key:"btnRight",ref:h},"D",512),x[14]||(x[14]=d.createTextVNode(" 右移 ",-1))]),d.createElementVNode("div",cE,[d.createElementVNode("span",{class:"key",ref_key:"btnUp",ref:A},"Q",512),x[15]||(x[15]=d.createTextVNode(" 上升 ",-1))]),d.createElementVNode("div",dE,[d.createElementVNode("span",{class:"key",ref_key:"btnDown",ref:C},"E",512),x[16]||(x[16]=d.createTextVNode(" 下降 ",-1))]),x[17]||(x[17]=d.createElementVNode("div",{class:"key-row"},[d.createElementVNode("span",{class:"mouse-icon"},"🖱️"),d.createTextVNode(" 按住左键拖拽旋转视角 ")],-1))])])])]),_:1},8,["title","visible","full-height"]))}}),[["__scopeId","data-v-ff3f266e"]]),uE={class:"info-content"},hE={key:0,class:"component-title"},Qn=Ne(d.defineComponent({__name:"LeitingInfo",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref([]),r=d.ref(!1),l=d.ref([]),a=d.ref([]),c=d.ref(0),u=d.computed({get:()=>t.open!==void 0?t.open:t.visible,set:y=>{i("update:visible",y),i("update:open",y)}}),f=()=>{u.value=!1},p=y=>({elementID:"构件ID",elementName:"构件名",categoryName:"类别",familySymbolName:"族类型",levelName:"标高",modelName:"文件名",length:"长",width:"宽",height:"高"})[y]||y,h=["elementName","elementID","modelName","length","width","height","levelName","categoryName","familySymbolName"],A=async y=>{const E=++c.value;if(a.value=y,!y||y.length===0){o.value=[];return}if(!u.value)return;let I=y;y.length>10&&(de.warning(`选中构件数量过多(${y.length}个),仅显示前10个`),I=y.slice(0,10));const S=s?.value;let k=S?.getMapTileset?S.getMapTileset():{};r.value=!0;const B=[],x={};if(I.forEach(M=>{const L=k[M.modelId]?.leiting?.model?.dbName;L&&M.elementId&&B.push({dbName:L,elementId:M.elementId,modelId:M.modelId})}),B.length>0){try{const M=B.map(L=>({dbName:L.dbName,elementId:L.elementId})),F=await kg(M);F&&Array.isArray(F)&&F.forEach(L=>{const G=B.find(N=>N.dbName===L.dbName&&N.elementId===L.elementId);if(G){const N=`${G.modelId}_${L.elementId}`;x[N]=L}})}catch(M){console.warn("API fetch component details failed, falling back to local data",M)}console.log("123")}const g=new Set;if(I.forEach(M=>{const F=k[M.modelId],L=`${M.modelId}_${M.elementId}`;x[L]||F&&F.leiting&&!F.leiting?.node?.nodeExtras&&F.leiting.model?.nodeUrl&&g.add(M.modelId)}),g.size>0&&S?.loadNodeDetailsForModel)try{const M=Array.from(g).map(F=>S.loadNodeDetailsForModel(F));await Promise.all(M)}catch(M){console.error("Failed to load node details",M)}if(E!==c.value)return;k=S?.getMapTileset?S.getMapTileset():{};const R=[];I.forEach((M,F)=>{const G=k[M.modelId]?.leiting||{},N=x[`${M.modelId}_${M.elementId}`];let v={modelName:G.model?.modelId||M.modelId};v.elementID||(v.elementID=M.elementId);let w=null;if(N)w=N;else{const P=G.node?.nodeExtras?.element||G.node?.nodeExtras;if(P){const _=v.elementID;P[_]&&(w=P[_])}}w&&w.box3&&(v.length=`${w.box3.length?.toFixed(2)||0}米`,v.width=`${w.box3.width?.toFixed(2)||0}米`,v.height=`${w.box3.height?.toFixed(2)||0}米`);const b=[];w&&(w.name&&(v.elementName=w.name),w.categoryName&&(v.categoryName=w.categoryName),w.familySymbolName&&(v.familySymbolName=w.familySymbolName),w.levelName&&(v.levelName=w.levelName));const T={};if(h.forEach(P=>{v[P]!==void 0&&(T[P]=v[P])}),b.push({name:"基础信息",params:T}),w){const P=Array.isArray(w)?w:Array.isArray(w?.parameters)?w.parameters:null;if(P){if(P.flat().forEach(O=>{if(O&&O.GroupName&&Array.isArray(O.Parameters)){const D={};O.Parameters.forEach(U=>{U.name&&(D[U.name]=U.value??"")}),Object.keys(D).length>0&&b.push({name:O.GroupName,params:D})}}),!Array.isArray(w)){const{parameters:O,...D}=w,U={};Object.keys(D).forEach(V=>{!h.includes(V)&&V!=="uniqueId"&&typeof D[V]!="object"&&(U[V]=D[V])}),Object.keys(U).length>0&&b.push({name:"其他属性",params:U})}}else{let _=!1;if(Object.keys(w).forEach(O=>{w[O]&&typeof w[O]=="object"&&!Array.isArray(w[O])&&(_=!0,b.push({name:O,params:w[O]}))}),!_){const O={};Object.keys(w).forEach(D=>{if(!h.includes(D)&&D!=="batchId"){const U=w[D];typeof U=="string"&&U.length>500?O[D]=U.substring(0,500)+"...":O[D]=U}}),Object.keys(O).length>0&&b.push({name:"属性",params:O})}}}R.push({id:F,title:`${v.modelName}${v.elementName?` - ${v.elementName}`:""}`,groups:b})}),o.value=R,E===c.value&&(r.value=!1),R.length>0?l.value=[`${R[0].id}-基础信息`]:l.value=[]};let C=!1;const m=()=>{if(C)return;const y=s?.value;y&&y.selectionChange&&(y.selectionChange(A),C=!0)};return d.watch(()=>s?.value,()=>{m()},{deep:!0,immediate:!0}),d.watch(u,y=>{y&&a.value.length>0&&A(a.value)}),d.onMounted(()=>{m()}),(y,E)=>(d.openBlock(),d.createBlock(Fe,{visible:u.value,title:"构件详情",width:350,align:"right","initial-position":{x:0,y:0},"full-height":n.fullHeight,onClose:f,"onUpdate:visible":E[1]||(E[1]=I=>u.value=I),class:"base-info-card"},{default:d.withCtx(()=>[d.createElementVNode("div",uE,[d.createVNode(d.unref(ye.Spin),{spinning:r.value},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(o.value,I=>(d.openBlock(),d.createElementBlock("div",{key:I.id,class:"component-block"},[o.value.length>1?(d.openBlock(),d.createElementBlock("div",hE,d.toDisplayString(I.title),1)):d.createCommentVNode("",!0),d.createVNode(d.unref(ye.Collapse),{activeKey:l.value,"onUpdate:activeKey":E[0]||(E[0]=S=>l.value=S),ghost:"","expand-icon-position":"end"},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(I.groups,S=>(d.openBlock(),d.createBlock(d.unref(ye.CollapsePanel),{key:`${I.id}-${S.name}`,header:S.name},{default:d.withCtx(()=>[d.createVNode(d.unref(ye.Descriptions),{size:"small",bordered:"",column:1,labelStyle:{width:"100px",background:"rgba(255,255,255,0.05)",color:"#aaa"},contentStyle:{color:"#fff"}},{default:d.withCtx(()=>[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(S.params,(k,B)=>(d.openBlock(),d.createBlock(d.unref(ye.DescriptionsItem),{key:B,label:p(String(B))},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(k),1)]),_:2},1032,["label"]))),128))]),_:2},1024)]),_:2},1032,["header"]))),128))]),_:2},1032,["activeKey"])]))),128))]),_:1},8,["spinning"])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-cd881bde"]]);class rc{viewer;Cesium;pickHandler=null;bimEntityId="";mapEntityId="";constructor(e,t){this.viewer=e,this.Cesium=t}removeMarker(e){if(!this.viewer)return;const t=e==="BIM"?this.bimEntityId:this.mapEntityId;t&&(this.viewer.entities.removeById(t),e==="BIM"?this.bimEntityId="":this.mapEntityId="")}clearMarkers(){this.removeMarker("BIM"),this.removeMarker("MAP")}addMarker(e,t){if(!this.viewer||!this.Cesium)return;this.removeMarker(e);const i=`adjust-marker-${e}-${Date.now()}`;e==="BIM"?this.bimEntityId=i:this.mapEntityId=i,this.viewer.entities.add({id:i,position:this.Cesium.Cartesian3.fromDegrees(t.longitude,t.latitude,t.height),point:{pixelSize:10,color:e==="BIM"?this.Cesium.Color.RED:this.Cesium.Color.ORANGE,outlineColor:this.Cesium.Color.WHITE,outlineWidth:2,disableDepthTestDistance:Number.POSITIVE_INFINITY},label:{text:`${e==="BIM"?"BIM":"地图"}标记点`,font:"14pt sans-serif",style:this.Cesium.LabelStyle.FILL_AND_OUTLINE,outlineWidth:2,verticalOrigin:this.Cesium.VerticalOrigin.BOTTOM,pixelOffset:new this.Cesium.Cartesian2(0,-10),fillColor:this.Cesium.Color.WHITE,outlineColor:this.Cesium.Color.BLACK,backgroundColor:new this.Cesium.Color(.1,.1,.1,.8),showBackground:!0,disableDepthTestDistance:Number.POSITIVE_INFINITY}})}registerPickHandler(e){this.destroyPickHandler(),!(!this.Cesium||!this.viewer)&&(this.pickHandler=new this.Cesium.ScreenSpaceEventHandler(this.viewer.scene.canvas),this.pickHandler.setInputAction(t=>{let i;try{i=this.viewer.scene.pickPosition(t.position)}catch(s){console.warn("pickPosition failed:",s)}if(!i){const s=this.viewer.camera.getPickRay(t.position);i=this.viewer.scene.globe.pick(s,this.viewer.scene)}if(i||(i=this.viewer.camera.pickEllipsoid(t.position,this.viewer.scene.globe.ellipsoid)),i){const s=this.Cesium.Cartographic.fromCartesian(i),o=this.Cesium.Math.toDegrees(s.longitude),r=this.Cesium.Math.toDegrees(s.latitude),l=s.height;e({longitude:o,latitude:r,height:l})}},this.Cesium.ScreenSpaceEventType.LEFT_CLICK,this.Cesium.KeyboardEventModifier.SHIFT))}destroyPickHandler(){this.pickHandler&&(this.pickHandler.destroy(),this.pickHandler=null)}calculateOffset(e,t){return{dLon:t.longitude-e.longitude,dLat:t.latitude-e.latitude,dHeight:t.height-e.height}}}const fE={class:"adjust-panel"},pE={class:"control-panel"},gE={class:"form-item"},mE={class:"radio-group"},AE={class:"form-item"},yE={class:"radio-group"},CE={class:"form-item"},EE={class:"value"},wE={class:"param-row"},bE={class:"param-row"},vE={class:"param-row"},IE={class:"param-row"},xE={class:"param-row"},BE={class:"param-row"},SE={class:"param-row"},ME={class:"button-grid"},TE={key:1,class:"pick-mode-ui"},DE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},kE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},PE=["checked"],FE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},RE={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},OE={class:"form-item",style:{display:"block","margin-bottom":"15px"}},LE={class:"radio-group",style:{width:"100%",display:"flex","align-items":"flex-start","flex-direction":"column"}},NE=["checked"],UE={key:0,style:{"font-size":"12px",color:"#aaa","margin-left":"20px"}},_E={key:1,style:{"font-size":"12px",color:"#666","margin-left":"20px"}},QE={class:"list-panel"},HE={class:"list-header"},GE={class:"col-check"},YE=["checked"],VE={class:"list-body"},WE={class:"col-check"},zE=["onUpdate:modelValue"],jE={class:"col-index"},$E=["title"],KE={class:"col-main"},qE=["checked","onChange"],Hn=Ne(d.defineComponent({__name:"LeitingPosition",props:{visible:{type:Boolean},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean}},emits:["update:visible","update:open","close","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.computed({get:()=>i.open!==void 0?i.open:i.visible,set:O=>{s("update:visible",O),s("update:open",O)}}),r=d.inject("leitingMethods"),l=d.ref("BIM"),a=d.ref("param"),c=d.ref(""),u=d.ref([]),f=d.ref("BIM"),p=d.ref(null),h=d.ref(null),A=d.ref(null),C=()=>(!A.value&&r?.value?.getViewer&&r?.value?.getCesium&&(A.value=new rc(r.value.getViewer(),r.value.getCesium())),A.value),m=()=>{C()?.clearMarkers(),p.value=null,h.value=null},y=(O,D)=>{O==="BIM"?p.value=D:h.value=D,C()?.addMarker(O,D),de.success(`${O==="BIM"?"BIM":"地图"}标记点已添加`)},E=()=>{C()?.registerPickHandler(O=>{y(f.value,O)})},I=()=>{C()?.destroyPickHandler()},S=()=>{if(!p.value||!h.value){de.warning("请先选择BIM标记点和地图标记点");return}if(!c.value){de.warning("请先选择主模型");return}const O=C();let D=0,U=0,V=0;if(O){const{dLon:$,dLat:X,dHeight:ne}=O.calculateOffset(p.value,h.value);D=$,U=X,V=ne}else D=h.value.longitude-p.value.longitude,U=h.value.latitude-p.value.latitude,V=h.value.height-p.value.height;B.value.longitude+=D,B.value.latitude+=U,B.value.height+=V,w(c.value,{longitude:B.value.longitude,latitude:B.value.latitude,height:B.value.height}),de.success("位置已调整")};d.watch(()=>a.value,O=>{O==="pick"?E():I()}),e({addMarker:y,setModelType:O=>{(O==="BIM"||O==="OSGB")&&(l.value=O)}});const B=d.ref({longitude:0,latitude:0,lonlat:1e-6,heightDistance:1,rotation:30,totalRotation:0,height:0,X:0,Y:0,Z:0}),x=d.computed(()=>{const O=u.value.find(D=>D.modelId===c.value);return O?O.modelName:""}),g=d.computed(()=>M.value.length>0&&M.value.every(O=>O.selected)),R=()=>{o.value=!1,s("close")},M=d.computed(()=>u.value.filter(O=>O.type===l.value)),F=O=>{const D=O.target.checked;M.value.forEach(U=>U.selected=D)},L=()=>{if(!r?.value)return;const O=r.value,D=O.getMapTileset?O.getMapTileset():{},U=[];if(Object.keys(D).forEach(V=>{const X=D[V].leiting||{};X.model&&U.push({modelId:X.model.modelId,modelName:X.model.modelName,selected:!1,formData:X.model.formData||{},dbName:X.model.dbName,url:X.model.url,type:X.model.type||"BIM"})}),u.value=U,U.length>0){const V=O.getBIMmodelId?O.getBIMmodelId():"";V&&U.find($=>$.modelId===V)?N(V):N(U[0].modelId),U.forEach($=>$.selected=!0)}},G=()=>{de.info("拖动右下角标,可显示模型列表",void 0,2)},N=O=>{c.value=O;const D=u.value.find(U=>U.modelId===O);D&&D.formData&&Object.keys(B.value).forEach(U=>{D.formData[U]!==void 0&&(B.value[U]=D.formData[U])})},v=O=>r?.value?.getMapTileset?r.value.getMapTileset()[O]:null,w=(O,D)=>{const U=v(O),V=r.value.getCesium();if(U&&V){if(U.leiting?.model){U.leiting.model.formData={...U.leiting.model.formData,...D};const $=u.value.find(X=>X.modelId===O);$&&($.formData=U.leiting.model.formData)}dr({Cesium:V,tileset:U})}},b=O=>{if(!c.value)return;const D=B.value[O];w(c.value,{[O]:D})},T=O=>{const D=M.value.filter(X=>X.selected);if(D.length===0){de.warning("请先选择要调整的模型");return}const{lonlat:U,heightDistance:V,rotation:$}=B.value;D.forEach(X=>{const ne={...X.formData};switch(O){case"north":ne.latitude+=U;break;case"south":ne.latitude-=U;break;case"east":ne.longitude+=U;break;case"west":ne.longitude-=U;break;case"up":ne.height+=V;break;case"down":ne.height-=V;break;case"rotateLeft":ne.totalRotation=(ne.totalRotation||0)+$;break;case"rotateRight":ne.totalRotation=(ne.totalRotation||0)-$;break}X.modelId===c.value&&(ne.lonlat=U,ne.heightDistance=V,ne.rotation=$,Object.assign(B.value,ne)),w(X.modelId,ne)})},P=()=>{if(!c.value){de.warning("请先选择主模型");return}const O=v(c.value);if(!O||!r?.value?.getViewer)return;const D=r.value.getViewer(),U=r.value.getCesium(),V=O.boundingSphere;D.camera.flyToBoundingSphere(V,{offset:new U.HeadingPitchRange(0,U.Math.toRadians(-90),V.radius*2),duration:1.5})},_=()=>{r?.value?.saveRegion?(r.value.saveRegion(u.value),s("save",d.unref(u))):(console.log("Save models:",u.value),de.warning("未找到保存接口,数据已打印控制台"))};return d.watch(()=>i.visible,O=>{O?(L(),G(),a.value==="pick"&&E()):(I(),m())}),d.onMounted(()=>{i.visible&&(L(),G(),a.value==="pick"&&E())}),(O,D)=>(d.openBlock(),d.createBlock(Fe,{visible:o.value,title:"调整位置(调整前可选择正北俯视)","full-height":n.fullHeight,"onUpdate:visible":D[25]||(D[25]=U=>o.value=U),onClose:R,onSave:_},{default:d.withCtx(()=>[d.createElementVNode("div",fE,[d.createElementVNode("div",pE,[d.createElementVNode("div",gE,[D[26]||(D[26]=d.createElementVNode("label",null,"模型类型:",-1)),d.createElementVNode("div",mE,[d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="BIM"}),onClick:D[0]||(D[0]=U=>l.value="BIM")},"BIM模型",2),d.createElementVNode("span",{class:d.normalizeClass({active:l.value==="OSGB"}),onClick:D[1]||(D[1]=U=>l.value="OSGB")},"倾斜摄影",2)])]),d.createElementVNode("div",AE,[D[27]||(D[27]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",yE,[d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="param"}),onClick:D[2]||(D[2]=U=>a.value="param")},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:a.value==="pick"}),onClick:D[3]||(D[3]=U=>a.value="pick")},"地图点选",2)])]),d.createElementVNode("div",CE,[D[28]||(D[28]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",EE,d.toDisplayString(x.value||"未选择"),1)]),D[42]||(D[42]=d.createElementVNode("div",{class:"separator"},null,-1)),a.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[D[36]||(D[36]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",wE,[D[29]||(D[29]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[4]||(D[4]=U=>B.value.longitude=U),onChange:D[5]||(D[5]=U=>b("longitude")),step:"0.000001"},null,544),[[d.vModelText,B.value.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",bE,[D[30]||(D[30]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[6]||(D[6]=U=>B.value.latitude=U),onChange:D[7]||(D[7]=U=>b("latitude")),step:"0.000001"},null,544),[[d.vModelText,B.value.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",vE,[D[31]||(D[31]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[8]||(D[8]=U=>B.value.height=U),onChange:D[9]||(D[9]=U=>b("height")),step:"0.1"},null,544),[[d.vModelText,B.value.height,void 0,{number:!0}]])]),d.createElementVNode("div",IE,[D[32]||(D[32]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[10]||(D[10]=U=>B.value.totalRotation=U),onChange:D[11]||(D[11]=U=>b("totalRotation")),step:"1"},null,544),[[d.vModelText,B.value.totalRotation,void 0,{number:!0}]])]),D[37]||(D[37]=d.createElementVNode("div",{class:"separator"},null,-1)),D[38]||(D[38]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",xE,[D[33]||(D[33]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[12]||(D[12]=U=>B.value.lonlat=U),step:"0.000001"},null,512),[[d.vModelText,B.value.lonlat,void 0,{number:!0}]])]),d.createElementVNode("div",BE,[D[34]||(D[34]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[13]||(D[13]=U=>B.value.heightDistance=U),step:"0.1"},null,512),[[d.vModelText,B.value.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",SE,[D[35]||(D[35]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":D[14]||(D[14]=U=>B.value.rotation=U),step:"1"},null,512),[[d.vModelText,B.value.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",ME,[d.createElementVNode("button",{onClick:D[15]||(D[15]=U=>T("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:D[16]||(D[16]=U=>T("north"))},"北移"),d.createElementVNode("button",{onClick:D[17]||(D[17]=U=>T("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:D[18]||(D[18]=U=>T("west"))},"西移"),d.createElementVNode("button",{onClick:D[19]||(D[19]=U=>T("south"))},"南移"),d.createElementVNode("button",{onClick:D[20]||(D[20]=U=>T("east"))},"东移"),d.createElementVNode("button",{onClick:D[21]||(D[21]=U=>T("up"))},"上移"),d.createElementVNode("button",{onClick:D[22]||(D[22]=U=>T("down"))},"下移"),d.createElementVNode("button",{onClick:P,class:"primary-btn"},"正北俯视"),d.createElementVNode("button",{onClick:_,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):a.value==="pick"?(d.openBlock(),d.createElementBlock("div",TE,[d.createElementVNode("div",DE,[d.createElementVNode("div",kE,[d.createElementVNode("div",{onClick:D[23]||(D[23]=U=>f.value="BIM"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:f.value==="BIM",style:{"margin-right":"5px"}},null,8,PE),D[39]||(D[39]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"BIM标记点:",-1))]),p.value?(d.openBlock(),d.createElementBlock("div",FE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(p.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(p.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",RE,"未选择"))])]),d.createElementVNode("div",OE,[d.createElementVNode("div",LE,[d.createElementVNode("div",{onClick:D[24]||(D[24]=U=>f.value="MAP"),style:{cursor:"pointer",display:"flex","align-items":"center","margin-bottom":"5px"}},[d.createElementVNode("input",{type:"radio",checked:f.value==="MAP",style:{"margin-right":"5px"}},null,8,NE),D[40]||(D[40]=d.createElementVNode("span",{style:{"font-weight":"bold"}},"地图标记点:",-1))]),h.value?(d.openBlock(),d.createElementBlock("div",UE,[d.createElementVNode("div",null,"经度:"+d.toDisplayString(h.value.longitude.toFixed(10)),1),d.createElementVNode("div",null,"纬度:"+d.toDisplayString(h.value.latitude.toFixed(10)),1)])):(d.openBlock(),d.createElementBlock("div",_E,"未选择"))])]),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:S},"调整位置"),d.createElementVNode("button",{onClick:_},"保存")]),D[41]||(D[41]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 BIM 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“调整位置”进行校准。")],-1))])):d.createCommentVNode("",!0)]),d.createElementVNode("div",QE,[d.createElementVNode("div",HE,[d.createElementVNode("div",GE,[d.createElementVNode("input",{type:"checkbox",checked:g.value,onChange:F},null,40,YE)]),D[43]||(D[43]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),D[44]||(D[44]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),D[45]||(D[45]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",VE,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(M.value,(U,V)=>(d.openBlock(),d.createElementBlock("div",{key:U.modelId,class:d.normalizeClass(["list-item",{active:U.modelId===c.value}])},[d.createElementVNode("div",WE,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":$=>U.selected=$},null,8,zE),[[d.vModelCheckbox,U.selected]])]),d.createElementVNode("div",jE,d.toDisplayString(V+1),1),d.createElementVNode("div",{class:"col-name",title:U.modelName},d.toDisplayString(U.modelName),9,$E),d.createElementVNode("div",KE,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:U.modelId===c.value,onChange:$=>N(U.modelId)},null,40,qE)])],2))),128))])])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-3bfda484"]]);function Fi(){return Fi=Object.assign?Object.assign.bind():function(n){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var i in t)({}).hasOwnProperty.call(t,i)&&(n[i]=t[i])}return n},Fi.apply(null,arguments)}const XE={locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"},JE={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},ac={lang:Fi({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeQuarterPlaceholder:["开始季度","结束季度"],rangeWeekPlaceholder:["开始周","结束周"]},XE),timePickerLocale:Fi({},JE)};ac.lang.ok="确定";var Ri={exports:{}},ZE=Ri.exports,lc;function cc(){return lc||(lc=1,(function(n,e){(function(t,i){n.exports=i()})(ZE,(function(){var t=1e3,i=6e4,s=36e5,o="millisecond",r="second",l="minute",a="hour",c="day",u="week",f="month",p="quarter",h="year",A="date",C="Invalid Date",m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,E={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(N){var v=["th","st","nd","rd"],w=N%100;return"["+N+(v[(w-20)%10]||v[w]||v[0])+"]"}},I=function(N,v,w){var b=String(N);return!b||b.length>=v?N:""+Array(v+1-b.length).join(w)+N},S={s:I,z:function(N){var v=-N.utcOffset(),w=Math.abs(v),b=Math.floor(w/60),T=w%60;return(v<=0?"+":"-")+I(b,2,"0")+":"+I(T,2,"0")},m:function N(v,w){if(v.date()<w.date())return-N(w,v);var b=12*(w.year()-v.year())+(w.month()-v.month()),T=v.clone().add(b,f),P=w-T<0,_=v.clone().add(b+(P?-1:1),f);return+(-(b+(w-T)/(P?T-_:_-T))||0)},a:function(N){return N<0?Math.ceil(N)||0:Math.floor(N)},p:function(N){return{M:f,y:h,w:u,d:c,D:A,h:a,m:l,s:r,ms:o,Q:p}[N]||String(N||"").toLowerCase().replace(/s$/,"")},u:function(N){return N===void 0}},k="en",B={};B[k]=E;var x="$isDayjsObject",g=function(N){return N instanceof L||!(!N||!N[x])},R=function N(v,w,b){var T;if(!v)return k;if(typeof v=="string"){var P=v.toLowerCase();B[P]&&(T=P),w&&(B[P]=w,T=P);var _=v.split("-");if(!T&&_.length>1)return N(_[0])}else{var O=v.name;B[O]=v,T=O}return!b&&T&&(k=T),T||!b&&k},M=function(N,v){if(g(N))return N.clone();var w=typeof v=="object"?v:{};return w.date=N,w.args=arguments,new L(w)},F=S;F.l=R,F.i=g,F.w=function(N,v){return M(N,{locale:v.$L,utc:v.$u,x:v.$x,$offset:v.$offset})};var L=(function(){function N(w){this.$L=R(w.locale,null,!0),this.parse(w),this.$x=this.$x||w.x||{},this[x]=!0}var v=N.prototype;return v.parse=function(w){this.$d=(function(b){var T=b.date,P=b.utc;if(T===null)return new Date(NaN);if(F.u(T))return new Date;if(T instanceof Date)return new Date(T);if(typeof T=="string"&&!/Z$/i.test(T)){var _=T.match(m);if(_){var O=_[2]-1||0,D=(_[7]||"0").substring(0,3);return P?new Date(Date.UTC(_[1],O,_[3]||1,_[4]||0,_[5]||0,_[6]||0,D)):new Date(_[1],O,_[3]||1,_[4]||0,_[5]||0,_[6]||0,D)}}return new Date(T)})(w),this.init()},v.init=function(){var w=this.$d;this.$y=w.getFullYear(),this.$M=w.getMonth(),this.$D=w.getDate(),this.$W=w.getDay(),this.$H=w.getHours(),this.$m=w.getMinutes(),this.$s=w.getSeconds(),this.$ms=w.getMilliseconds()},v.$utils=function(){return F},v.isValid=function(){return this.$d.toString()!==C},v.isSame=function(w,b){var T=M(w);return this.startOf(b)<=T&&T<=this.endOf(b)},v.isAfter=function(w,b){return M(w)<this.startOf(b)},v.isBefore=function(w,b){return this.endOf(b)<M(w)},v.$g=function(w,b,T){return F.u(w)?this[b]:this.set(T,w)},v.unix=function(){return Math.floor(this.valueOf()/1e3)},v.valueOf=function(){return this.$d.getTime()},v.startOf=function(w,b){var T=this,P=!!F.u(b)||b,_=F.p(w),O=function(oe,Y){var z=F.w(T.$u?Date.UTC(T.$y,Y,oe):new Date(T.$y,Y,oe),T);return P?z:z.endOf(c)},D=function(oe,Y){return F.w(T.toDate()[oe].apply(T.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Y)),T)},U=this.$W,V=this.$M,$=this.$D,X="set"+(this.$u?"UTC":"");switch(_){case h:return P?O(1,0):O(31,11);case f:return P?O(1,V):O(0,V+1);case u:var ne=this.$locale().weekStart||0,se=(U<ne?U+7:U)-ne;return O(P?$-se:$+(6-se),V);case c:case A:return D(X+"Hours",0);case a:return D(X+"Minutes",1);case l:return D(X+"Seconds",2);case r:return D(X+"Milliseconds",3);default:return this.clone()}},v.endOf=function(w){return this.startOf(w,!1)},v.$set=function(w,b){var T,P=F.p(w),_="set"+(this.$u?"UTC":""),O=(T={},T[c]=_+"Date",T[A]=_+"Date",T[f]=_+"Month",T[h]=_+"FullYear",T[a]=_+"Hours",T[l]=_+"Minutes",T[r]=_+"Seconds",T[o]=_+"Milliseconds",T)[P],D=P===c?this.$D+(b-this.$W):b;if(P===f||P===h){var U=this.clone().set(A,1);U.$d[O](D),U.init(),this.$d=U.set(A,Math.min(this.$D,U.daysInMonth())).$d}else O&&this.$d[O](D);return this.init(),this},v.set=function(w,b){return this.clone().$set(w,b)},v.get=function(w){return this[F.p(w)]()},v.add=function(w,b){var T,P=this;w=Number(w);var _=F.p(b),O=function(V){var $=M(P);return F.w($.date($.date()+Math.round(V*w)),P)};if(_===f)return this.set(f,this.$M+w);if(_===h)return this.set(h,this.$y+w);if(_===c)return O(1);if(_===u)return O(7);var D=(T={},T[l]=i,T[a]=s,T[r]=t,T)[_]||1,U=this.$d.getTime()+w*D;return F.w(U,this)},v.subtract=function(w,b){return this.add(-1*w,b)},v.format=function(w){var b=this,T=this.$locale();if(!this.isValid())return T.invalidDate||C;var P=w||"YYYY-MM-DDTHH:mm:ssZ",_=F.z(this),O=this.$H,D=this.$m,U=this.$M,V=T.weekdays,$=T.months,X=T.meridiem,ne=function(Y,z,J,re){return Y&&(Y[z]||Y(b,P))||J[z].slice(0,re)},se=function(Y){return F.s(O%12||12,Y,"0")},oe=X||function(Y,z,J){var re=Y<12?"AM":"PM";return J?re.toLowerCase():re};return P.replace(y,(function(Y,z){return z||(function(J){switch(J){case"YY":return String(b.$y).slice(-2);case"YYYY":return F.s(b.$y,4,"0");case"M":return U+1;case"MM":return F.s(U+1,2,"0");case"MMM":return ne(T.monthsShort,U,$,3);case"MMMM":return ne($,U);case"D":return b.$D;case"DD":return F.s(b.$D,2,"0");case"d":return String(b.$W);case"dd":return ne(T.weekdaysMin,b.$W,V,2);case"ddd":return ne(T.weekdaysShort,b.$W,V,3);case"dddd":return V[b.$W];case"H":return String(O);case"HH":return F.s(O,2,"0");case"h":return se(1);case"hh":return se(2);case"a":return oe(O,D,!0);case"A":return oe(O,D,!1);case"m":return String(D);case"mm":return F.s(D,2,"0");case"s":return String(b.$s);case"ss":return F.s(b.$s,2,"0");case"SSS":return F.s(b.$ms,3,"0");case"Z":return _}return null})(Y)||_.replace(":","")}))},v.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},v.diff=function(w,b,T){var P,_=this,O=F.p(b),D=M(w),U=(D.utcOffset()-this.utcOffset())*i,V=this-D,$=function(){return F.m(_,D)};switch(O){case h:P=$()/12;break;case f:P=$();break;case p:P=$()/3;break;case u:P=(V-U)/6048e5;break;case c:P=(V-U)/864e5;break;case a:P=V/s;break;case l:P=V/i;break;case r:P=V/t;break;default:P=V}return T?P:F.a(P)},v.daysInMonth=function(){return this.endOf(f).$D},v.$locale=function(){return B[this.$L]},v.locale=function(w,b){if(!w)return this.$L;var T=this.clone(),P=R(w,b,!0);return P&&(T.$L=P),T},v.clone=function(){return F.w(this.$d,this)},v.toDate=function(){return new Date(this.valueOf())},v.toJSON=function(){return this.isValid()?this.toISOString():null},v.toISOString=function(){return this.$d.toISOString()},v.toString=function(){return this.$d.toUTCString()},N})(),G=L.prototype;return M.prototype=G,[["$ms",o],["$s",r],["$m",l],["$H",a],["$W",c],["$M",f],["$y",h],["$D",A]].forEach((function(N){G[N[1]]=function(v){return this.$g(v,N[0],N[1])}})),M.extend=function(N,v){return N.$i||(N(v,L,M),N.$i=!0),M},M.locale=R,M.isDayjs=g,M.unix=function(N){return M(1e3*N)},M.en=B[k],M.Ls=B,M.p={},M}))})(Ri)),Ri.exports}var ew=cc();const ze=nn(ew);var Oi={exports:{}},tw=Oi.exports,dc;function nw(){return dc||(dc=1,(function(n,e){(function(t,i){n.exports=i(cc())})(tw,(function(t){function i(r){return r&&typeof r=="object"&&"default"in r?r:{default:r}}var s=i(t),o={name:"zh-cn",weekdays:"星期日_星期一_星期二_星期三_星期四_星期五_星期六".split("_"),weekdaysShort:"周日_周一_周二_周三_周四_周五_周六".split("_"),weekdaysMin:"日_一_二_三_四_五_六".split("_"),months:"一月_二月_三月_四月_五月_六月_七月_八月_九月_十月_十一月_十二月".split("_"),monthsShort:"1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月".split("_"),ordinal:function(r,l){return l==="W"?r+"周":r+"日"},weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"YYYY/MM/DD",LL:"YYYY年M月D日",LLL:"YYYY年M月D日Ah点mm分",LLLL:"YYYY年M月D日ddddAh点mm分",l:"YYYY/M/D",ll:"YYYY年M月D日",lll:"YYYY年M月D日 HH:mm",llll:"YYYY年M月D日dddd HH:mm"},relativeTime:{future:"%s内",past:"%s前",s:"几秒",m:"1 分钟",mm:"%d 分钟",h:"1 小时",hh:"%d 小时",d:"1 天",dd:"%d 天",M:"1 个月",MM:"%d 个月",y:"1 年",yy:"%d 年"},meridiem:function(r,l){var a=100*r+l;return a<600?"凌晨":a<900?"早上":a<1100?"上午":a<1300?"中午":a<1800?"下午":"晚上"}};return s.default.locale(o,null,!0),o}))})(Oi)),Oi.exports}nw();var Li={exports:{}},iw=Li.exports,uc;function sw(){return uc||(uc=1,(function(n,e){(function(t,i){n.exports=i()})(iw,(function(){return function(t,i,s){var o=i.prototype,r=function(f){return f&&(f.indexOf?f:f.s)},l=function(f,p,h,A,C){var m=f.name?f:f.$locale(),y=r(m[p]),E=r(m[h]),I=y||E.map((function(k){return k.slice(0,A)}));if(!C)return I;var S=m.weekStart;return I.map((function(k,B){return I[(B+(S||0))%7]}))},a=function(){return s.Ls[s.locale()]},c=function(f,p){return f.formats[p]||(function(h){return h.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(A,C,m){return C||m.slice(1)}))})(f.formats[p.toUpperCase()])},u=function(){var f=this;return{months:function(p){return p?p.format("MMMM"):l(f,"months")},monthsShort:function(p){return p?p.format("MMM"):l(f,"monthsShort","months",3)},firstDayOfWeek:function(){return f.$locale().weekStart||0},weekdays:function(p){return p?p.format("dddd"):l(f,"weekdays")},weekdaysMin:function(p){return p?p.format("dd"):l(f,"weekdaysMin","weekdays",2)},weekdaysShort:function(p){return p?p.format("ddd"):l(f,"weekdaysShort","weekdays",3)},longDateFormat:function(p){return c(f.$locale(),p)},meridiem:this.$locale().meridiem,ordinal:this.$locale().ordinal}};o.localeData=function(){return u.bind(this)()},s.localeData=function(){var f=a();return{firstDayOfWeek:function(){return f.weekStart||0},weekdays:function(){return s.weekdays()},weekdaysShort:function(){return s.weekdaysShort()},weekdaysMin:function(){return s.weekdaysMin()},months:function(){return s.months()},monthsShort:function(){return s.monthsShort()},longDateFormat:function(p){return c(f,p)},meridiem:f.meridiem,ordinal:f.ordinal}},s.months=function(){return l(a(),"months")},s.monthsShort=function(){return l(a(),"monthsShort","months",3)},s.weekdays=function(f){return l(a(),"weekdays",null,null,f)},s.weekdaysShort=function(f){return l(a(),"weekdaysShort","weekdays",3,f)},s.weekdaysMin=function(f){return l(a(),"weekdaysMin","weekdays",2,f)}}}))})(Li)),Li.exports}var ow=sw();const rw=nn(ow);var Ni={exports:{}},aw=Ni.exports,hc;function lw(){return hc||(hc=1,(function(n,e){(function(t,i){n.exports=i()})(aw,(function(){return function(t,i){i.prototype.weekday=function(s){var o=this.$locale().weekStart||0,r=this.$W,l=(r<o?r+7:r)-o;return this.$utils().u(s)?l:this.subtract(l,"day").add(s,"day")}}}))})(Ni)),Ni.exports}var cw=lw();const dw=nn(cw);var Ui={exports:{}},uw=Ui.exports,fc;function hw(){return fc||(fc=1,(function(n,e){(function(t,i){n.exports=i()})(uw,(function(){var t="week",i="year";return function(s,o,r){var l=o.prototype;l.week=function(a){if(a===void 0&&(a=null),a!==null)return this.add(7*(a-this.week()),"day");var c=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var u=r(this).startOf(i).add(1,i).date(c),f=r(this).endOf(t);if(u.isBefore(f))return 1}var p=r(this).startOf(i).date(c).startOf(t).subtract(1,"millisecond"),h=this.diff(p,t,!0);return h<0?r(this).startOf("week").week():Math.ceil(h)},l.weeks=function(a){return a===void 0&&(a=null),this.week(a)}}}))})(Ui)),Ui.exports}var fw=hw();const pw=nn(fw);var _i={exports:{}},gw=_i.exports,pc;function mw(){return pc||(pc=1,(function(n,e){(function(t,i){n.exports=i()})(gw,(function(){var t={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},i=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,s=/\d/,o=/\d\d/,r=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,a={},c=function(m){return(m=+m)+(m>68?1900:2e3)},u=function(m){return function(y){this[m]=+y}},f=[/[+-]\d\d:?(\d\d)?|Z/,function(m){(this.zone||(this.zone={})).offset=(function(y){if(!y||y==="Z")return 0;var E=y.match(/([+-]|\d\d)/g),I=60*E[1]+(+E[2]||0);return I===0?0:E[0]==="+"?-I:I})(m)}],p=function(m){var y=a[m];return y&&(y.indexOf?y:y.s.concat(y.f))},h=function(m,y){var E,I=a.meridiem;if(I){for(var S=1;S<=24;S+=1)if(m.indexOf(I(S,0,y))>-1){E=S>12;break}}else E=m===(y?"pm":"PM");return E},A={A:[l,function(m){this.afternoon=h(m,!1)}],a:[l,function(m){this.afternoon=h(m,!0)}],Q:[s,function(m){this.month=3*(m-1)+1}],S:[s,function(m){this.milliseconds=100*+m}],SS:[o,function(m){this.milliseconds=10*+m}],SSS:[/\d{3}/,function(m){this.milliseconds=+m}],s:[r,u("seconds")],ss:[r,u("seconds")],m:[r,u("minutes")],mm:[r,u("minutes")],H:[r,u("hours")],h:[r,u("hours")],HH:[r,u("hours")],hh:[r,u("hours")],D:[r,u("day")],DD:[o,u("day")],Do:[l,function(m){var y=a.ordinal,E=m.match(/\d+/);if(this.day=E[0],y)for(var I=1;I<=31;I+=1)y(I).replace(/\[|\]/g,"")===m&&(this.day=I)}],w:[r,u("week")],ww:[o,u("week")],M:[r,u("month")],MM:[o,u("month")],MMM:[l,function(m){var y=p("months"),E=(p("monthsShort")||y.map((function(I){return I.slice(0,3)}))).indexOf(m)+1;if(E<1)throw new Error;this.month=E%12||E}],MMMM:[l,function(m){var y=p("months").indexOf(m)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,u("year")],YY:[o,function(m){this.year=c(m)}],YYYY:[/\d{4}/,u("year")],Z:f,ZZ:f};function C(m){var y,E;y=m,E=a&&a.formats;for(var I=(m=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(M,F,L){var G=L&&L.toUpperCase();return F||E[L]||t[L]||E[G].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(N,v,w){return v||w.slice(1)}))}))).match(i),S=I.length,k=0;k<S;k+=1){var B=I[k],x=A[B],g=x&&x[0],R=x&&x[1];I[k]=R?{regex:g,parser:R}:B.replace(/^\[|\]$/g,"")}return function(M){for(var F={},L=0,G=0;L<S;L+=1){var N=I[L];if(typeof N=="string")G+=N.length;else{var v=N.regex,w=N.parser,b=M.slice(G),T=v.exec(b)[0];w.call(F,T),M=M.replace(T,"")}}return(function(P){var _=P.afternoon;if(_!==void 0){var O=P.hours;_?O<12&&(P.hours+=12):O===12&&(P.hours=0),delete P.afternoon}})(F),F}}return function(m,y,E){E.p.customParseFormat=!0,m&&m.parseTwoDigitYear&&(c=m.parseTwoDigitYear);var I=y.prototype,S=I.parse;I.parse=function(k){var B=k.date,x=k.utc,g=k.args;this.$u=x;var R=g[1];if(typeof R=="string"){var M=g[2]===!0,F=g[3]===!0,L=M||F,G=g[2];F&&(G=g[2]),a=this.$locale(),!M&&G&&(a=E.Ls[G]),this.$d=(function(b,T,P,_){try{if(["x","X"].indexOf(T)>-1)return new Date((T==="X"?1e3:1)*b);var O=C(T)(b),D=O.year,U=O.month,V=O.day,$=O.hours,X=O.minutes,ne=O.seconds,se=O.milliseconds,oe=O.zone,Y=O.week,z=new Date,J=V||(D||U?1:z.getDate()),re=D||z.getFullYear(),ae=0;D&&!U||(ae=U>0?U-1:z.getMonth());var le,he=$||0,Me=X||0,$e=ne||0,Ke=se||0;return oe?new Date(Date.UTC(re,ae,J,he,Me,$e,Ke+60*oe.offset*1e3)):P?new Date(Date.UTC(re,ae,J,he,Me,$e,Ke)):(le=new Date(re,ae,J,he,Me,$e,Ke),Y&&(le=_(le).week(Y).toDate()),le)}catch{return new Date("")}})(B,R,x,E),this.init(),G&&G!==!0&&(this.$L=this.locale(G).$L),L&&B!=this.format(R)&&(this.$d=new Date("")),a={}}else if(R instanceof Array)for(var N=R.length,v=1;v<=N;v+=1){g[1]=R[v-1];var w=E.apply(this,g);if(w.isValid()){this.$d=w.$d,this.$L=w.$L,this.init();break}v===N&&(this.$d=new Date(""))}else S.call(this,k)}}}))})(_i)),_i.exports}var Aw=mw();const yw=nn(Aw),Cw={class:"setting-panel"},Ew={class:"tabs-header"},ww={class:"tab-content"},bw={key:0,class:"section"},vw={class:"setting-item"},Iw={class:"setting-item"},xw={class:"setting-item"},Bw={key:1,class:"section"},Sw={class:"tabs-header",style:{"margin-bottom":"8px"}},Mw={key:0},Tw={class:"setting-item column"},Dw={class:"setting-item column"},kw={class:"setting-item"},Pw={key:1},Fw={class:"setting-item column"},Rw={class:"setting-item column",style:{"margin-top":"12px","border-top":"1px solid rgba(255,255,255,0.1)","padding-top":"8px"}},Ow={class:"search-box"},Lw={key:2,class:"section"},Nw={class:"setting-item"},Uw={key:0,class:"setting-item column"},_w={class:"sub-label"},Qw={class:"setting-item"},Hw={class:"setting-item"},Gw={class:"setting-item column"},Yw={class:"setting-item column"},Vw={class:"sub-label"},Ww={class:"setting-item column"},zw={class:"sub-label"},jw={class:"setting-item column"},$w={class:"sub-label"},Kw={class:"setting-item column"},qw={style:{display:"flex",gap:"8px","margin-bottom":"8px"}},Xw=["onClick","title"],Jw={style:{display:"flex",gap:"8px","align-items":"center"}},Zw={key:3,class:"section"},eb={class:"setting-item"},tb={class:"setting-item column"},Gn=Ne(d.defineComponent({__name:"LeitingSetting",props:{visible:{type:Boolean,default:!1},open:{type:Boolean,default:void 0},fullHeight:{type:Boolean,default:!1},tiandituToken:{type:String,default:""},initialConfig:{type:Object,default:()=>({})}},emits:["update:visible","update:open","close"],setup(n,{emit:e}){ze.locale("zh-cn"),ze.extend(rw),ze.extend(dw),ze.extend(pw),ze.extend(yw);const t=ye.Switch,i=ye.Radio.Group,s=ye.Radio,o=ye.Input,r=ye.Slider,l=ye.Select,a=ye.Select.Option,c=ye.DatePicker,u=n,f=e,p=d.inject("leitingMethods"),h=d.computed({get:()=>u.open!==void 0?u.open:u.visible,set:v=>{f("update:visible",v),f("update:open",v)}}),A=d.ref("GIS"),C=d.reactive({globe:!1,terrain:!1,depthTest:!1}),m=d.reactive({provider:"tianditu",tianditu:{token:"c25f14fb6bd4397cf8fe45144ff768d6",layerType:"img_w",showLabel:!1},arcgis:{url:"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"},baseMap:"tianditu"}),y=d.reactive({shadows:!1,shadowDarkness:.7,environmentMap:!1,ambientOcclusion:!1,time:ze("2025-06-22 10:00"),brightness:1.5,contrast:1,saturation:1,backgroundColor:"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)"}),E=d.reactive({collision:!1,habit:0}),I=v=>{v&&(v.globe!==void 0&&(C.globe=v.globe),v.terrain!==void 0&&(C.terrain=v.terrain),v.depthTest!==void 0&&(C.depthTest=v.depthTest),v.mapProvider!==void 0&&(m.provider=v.mapProvider),v.tiandituLayerType!==void 0&&(m.tianditu.layerType=v.tiandituLayerType),v.tiandituShowLabel!==void 0&&(m.tianditu.showLabel=v.tiandituShowLabel),v.arcgisUrl!==void 0&&(m.arcgis.url=v.arcgisUrl),v.shadows!==void 0&&(y.shadows=v.shadows),v.shadowDarkness!==void 0&&(y.shadowDarkness=v.shadowDarkness),v.environmentMap!==void 0&&(y.environmentMap=v.environmentMap),v.ambientOcclusion!==void 0&&(y.ambientOcclusion=v.ambientOcclusion),v.time!==void 0&&(typeof v.time=="number"?y.time=ze().startOf("day").add(v.time,"hour"):y.time=ze(v.time)),v.brightness!==void 0&&(y.brightness=v.brightness),v.contrast!==void 0&&(y.contrast=v.contrast),v.saturation!==void 0&&(y.saturation=v.saturation),v.backgroundColor!==void 0&&(y.backgroundColor=v.backgroundColor),v.collision!==void 0&&(E.collision=v.collision),v.mouseHabit!==void 0&&(E.habit=v.mouseHabit))};d.watch(()=>u.initialConfig,v=>{I(v)},{deep:!0,immediate:!0});const S=["linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)","linear-gradient(0deg, #0f2027 0%, #203a43 50%, #2c5364 100%)","linear-gradient(0deg, #cfd9df 0%, #e2ebf0 100%)"],k=[{label:"全球影像地图服务(墨卡托)",value:"img_w"},{label:"全球影像地图服务(经纬度)",value:"img_c"},{label:"全球矢量地图服务(墨卡托)",value:"vec_w"},{label:"全球矢量地图服务(经纬度)",value:"vec_c"},{label:"全球地形晕渲服务(墨卡托)",value:"ter_w"},{label:"全球地形晕渲服务(经纬度)",value:"ter_c"}],B=()=>{const v=m.provider,w={};v==="tianditu"?(w.token=m.tianditu.token,w.layerType=m.tianditu.layerType,w.showAnnotation=m.tianditu.showLabel):v==="arcgis"&&(w.url=m.arcgis.url),p.value?.changeBaseMap?.(v,w)};d.watch(()=>m.provider,B),d.watch(()=>m.tianditu.layerType,B),d.watch(()=>m.tianditu.showLabel,B),d.watch(()=>m.tianditu.token,hs(B,1e3)),d.watch(()=>m.arcgis.url,hs(B,1e3)),d.onMounted(()=>{u.tiandituToken&&(m.tianditu.token=u.tiandituToken)}),d.watch(()=>C.globe,v=>p.value?.setGlobeEnvironmentVisible?.(v)),d.watch(()=>C.terrain,v=>p.value?.setTerrainEnable?.(v)),d.watch(()=>C.depthTest,v=>p.value?.setDepthTestEnable?.(v)),d.watch(()=>p?.value,v=>{if(v){if(v.getConfigure=()=>({globe:C.globe,terrain:C.terrain,depthTest:C.depthTest,mapProvider:m.provider,tiandituLayerType:m.tianditu.layerType,tiandituShowLabel:m.tianditu.showLabel,arcgisUrl:m.arcgis.url,shadows:y.shadows,shadowDarkness:y.shadowDarkness,environmentMap:y.environmentMap,ambientOcclusion:y.ambientOcclusion,time:ze.isDayjs(y.time)?y.time.format("YYYY-MM-DD HH:mm"):y.time,brightness:y.brightness,contrast:y.contrast,saturation:y.saturation,backgroundColor:y.backgroundColor,collision:E.collision,mouseHabit:E.habit}),v.setConfigure=w=>{I(w)},v.setBackgroundColor&&y.backgroundColor&&v.setBackgroundColor(y.backgroundColor),v.setGlobeEnvironmentVisible&&v.setGlobeEnvironmentVisible(C.globe),v.setShadowsEnable&&v.setShadowsEnable(y.shadows),v.setShadowDarkness&&v.setShadowDarkness(y.shadowDarkness),v.setEnvironmentMapEnable&&v.setEnvironmentMapEnable(y.environmentMap),v.setAmbientOcclusion&&v.setAmbientOcclusion(y.ambientOcclusion),v.setTime){const w=ze.isDayjs(y.time)?y.time.toDate():new Date;v.setTime(w)}v.setModelBrightness&&v.setModelBrightness(y.brightness),v.setCollisionDetection&&v.setCollisionDetection(E.collision),v.setMouseHabit&&v.setMouseHabit(E.habit),v.changeBaseMap&&m.baseMap&&v.changeBaseMap(m.baseMap,{token:m.tianditu.token,layerType:m.tianditu.layerType,showAnnotation:m.tianditu.showLabel,url:m.arcgis.url})}},{immediate:!0});const x=d.computed({get:()=>{const v=y.backgroundColor;return/^#[0-9A-Fa-f]{6}$/.test(v)?v:"#ffffff"},set:v=>{y.backgroundColor=v}}),g=d.ref(""),R=d.ref(!1),M=d.ref([]);d.watch(()=>C.globe,v=>p.value?.setGlobeEnvironmentVisible?.(v)),d.watch(()=>C.terrain,v=>p.value?.setTerrainEnable?.(v)),d.watch(()=>m.baseMap,v=>{p.value?.changeBaseMap?.(v,{token:u.tiandituToken})}),d.watch(()=>y.shadows,v=>p.value?.setShadowsEnable?.(v)),d.watch(()=>y.shadowDarkness,v=>p.value?.setShadowDarkness?.(v)),d.watch(()=>y.environmentMap,v=>p.value?.setEnvironmentMapEnable?.(v)),d.watch(()=>y.ambientOcclusion,v=>p.value?.setAmbientOcclusion?.(v)),d.watch(()=>y.time,v=>{const w=ze.isDayjs(v)?v.toDate():new Date;p.value?.setTime?.(w)}),d.watch(()=>[y.brightness,y.contrast,y.saturation],([v,w,b])=>{const T=p.value;T?.setModelColorAdjustment?T.setModelColorAdjustment({brightness:v,contrast:w,saturation:b}):T?.setModelBrightness?.(v)}),d.watch(()=>y.backgroundColor,v=>{if(p.value?.setBackgroundColor)p.value.setBackgroundColor(v);else{const w=document.querySelector(".cesium-viewer");w&&(w.style.background=v)}}),d.watch(()=>E.collision,v=>p.value?.setCollisionDetection?.(v)),d.watch(()=>E.habit,v=>p.value?.setMouseHabit?.(v));const F=v=>{if(v?.pois&&Array.isArray(v.pois)&&v.pois.length>0){const w=v.pois[0],b=w.lonlat.split(/[, ]/).map(Number);if(b.length>=2&&!isNaN(b[0])&&!isNaN(b[1]))return{name:w.name,lon:b[0],lat:b[1],raw:w}}if(v?.area&&v.area.lonlat){const w=v.area,b=w.lonlat.split(/[, ]/).map(Number);if(b.length>=2&&!isNaN(b[0])&&!isNaN(b[1]))return{name:w.name,lon:b[0],lat:b[1],raw:w}}return null},G=hs(async()=>{const v=(g.value||"").trim();if(!v)return;const w=u.tiandituToken||"c25f14fb6bd4397cf8fe45144ff768d6";R.value=!0,M.value=[];try{if(p.value?.searchLocation){const b=await p.value.searchLocation(v,w),T=F(b);T&&(M.value=[T],de.success(`找到:${T.name||""}`),p.value.flyTo(T.lon,T.lat,5e3))}else{const T=`https://api.tianditu.gov.cn/v2/search?postStr=${encodeURIComponent(JSON.stringify({keyWord:v,level:12,mapBound:"-180,-90,180,90",queryType:1,start:0,count:10}))}&type=query&tk=${encodeURIComponent(w)}`,P=await fetch(T);if(!P.ok)throw new Error(`HTTP ${P.status}`);const _=await P.json(),O=F(_);O&&(M.value=[O],de.success(`找到:${O.name||""}`),p.value?.flyTo?.(O.lon,O.lat,5e3))}}catch(b){console.error("tianditu search error",b)}finally{R.value=!1}},800);d.watch(g,()=>{G()});const N=()=>{h.value=!1,f("close")};return d.onMounted(()=>{}),(v,w)=>(d.openBlock(),d.createBlock(Fe,{visible:h.value,title:"设置","full-height":n.fullHeight,onClose:N,"onUpdate:visible":w[26]||(w[26]=b=>h.value=b)},{default:d.withCtx(()=>[d.createElementVNode("div",Cw,[d.createElementVNode("div",Ew,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="GIS"}]),onClick:w[0]||(w[0]=b=>A.value="GIS")},"GIS",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="MAP"}]),onClick:w[1]||(w[1]=b=>A.value="MAP")},"地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="RENDER"}]),onClick:w[2]||(w[2]=b=>A.value="RENDER")},"渲染",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:A.value==="MOUSE"}]),onClick:w[3]||(w[3]=b=>A.value="MOUSE")},"鼠标",2)]),d.createElementVNode("div",ww,[A.value==="GIS"?(d.openBlock(),d.createElementBlock("div",bw,[d.createElementVNode("div",vw,[w[27]||(w[27]=d.createElementVNode("span",null,"地球 (含大气/日月/星空)",-1)),d.createVNode(d.unref(t),{checked:C.globe,"onUpdate:checked":w[4]||(w[4]=b=>C.globe=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Iw,[w[28]||(w[28]=d.createElementVNode("span",null,"地形 (高程)",-1)),d.createVNode(d.unref(t),{checked:C.terrain,"onUpdate:checked":w[5]||(w[5]=b=>C.terrain=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",xw,[w[29]||(w[29]=d.createElementVNode("span",null,"地形遮挡",-1)),d.createVNode(d.unref(t),{checked:C.depthTest,"onUpdate:checked":w[6]||(w[6]=b=>C.depthTest=b),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),A.value==="MAP"?(d.openBlock(),d.createElementBlock("div",Bw,[d.createElementVNode("div",Sw,[d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.provider==="tianditu"}]),onClick:w[7]||(w[7]=b=>m.provider="tianditu")},"天地图",2),d.createElementVNode("div",{class:d.normalizeClass(["tab-item",{active:m.provider==="arcgis"}]),onClick:w[8]||(w[8]=b=>m.provider="arcgis")},"ArcGIS",2)]),m.provider==="tianditu"?(d.openBlock(),d.createElementBlock("div",Mw,[d.createElementVNode("div",Tw,[w[30]||(w[30]=d.createElementVNode("div",{class:"sub-label"},"Token",-1)),d.createVNode(d.unref(o),{value:m.tianditu.token,"onUpdate:value":w[9]||(w[9]=b=>m.tianditu.token=b),size:"small",placeholder:"输入天地图Token"},null,8,["value"])]),d.createElementVNode("div",Dw,[w[31]||(w[31]=d.createElementVNode("div",{class:"sub-label"},"地图风格",-1)),d.createVNode(d.unref(l),{value:m.tianditu.layerType,"onUpdate:value":w[10]||(w[10]=b=>m.tianditu.layerType=b),size:"small",style:{width:"100%"}},{default:d.withCtx(()=>[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(k,b=>d.createVNode(d.unref(a),{key:b.value,value:b.value},{default:d.withCtx(()=>[d.createTextVNode(d.toDisplayString(b.label),1)]),_:2},1032,["value"])),64))]),_:1},8,["value"])]),d.createElementVNode("div",kw,[w[32]||(w[32]=d.createElementVNode("span",null,"叠加注记",-1)),d.createVNode(d.unref(t),{checked:m.tianditu.showLabel,"onUpdate:checked":w[11]||(w[11]=b=>m.tianditu.showLabel=b),size:"small"},null,8,["checked"])])])):d.createCommentVNode("",!0),m.provider==="arcgis"?(d.openBlock(),d.createElementBlock("div",Pw,[d.createElementVNode("div",Fw,[w[33]||(w[33]=d.createElementVNode("div",{class:"sub-label"},"服务地址",-1)),d.createVNode(d.unref(o),{value:m.arcgis.url,"onUpdate:value":w[12]||(w[12]=b=>m.arcgis.url=b),size:"small",placeholder:"输入ArcGIS MapServer地址"},null,8,["value"])])])):d.createCommentVNode("",!0),d.createElementVNode("div",Rw,[w[34]||(w[34]=d.createElementVNode("div",{class:"sub-label"},"位置搜索 (天地图)",-1)),d.createElementVNode("div",Ow,[d.createVNode(d.unref(o),{value:g.value,"onUpdate:value":w[13]||(w[13]=b=>g.value=b),placeholder:"输入地名搜索",size:"small","allow-clear":""},null,8,["value"])])])])):d.createCommentVNode("",!0),A.value==="RENDER"?(d.openBlock(),d.createElementBlock("div",Lw,[d.createElementVNode("div",Nw,[w[35]||(w[35]=d.createElementVNode("span",null,"阴影",-1)),d.createVNode(d.unref(t),{checked:y.shadows,"onUpdate:checked":w[14]||(w[14]=b=>y.shadows=b),size:"small"},null,8,["checked"])]),y.shadows?(d.openBlock(),d.createElementBlock("div",Uw,[d.createElementVNode("div",_w,"阴影暗度 ("+d.toDisplayString(y.shadowDarkness.toFixed(2))+")",1),d.createVNode(d.unref(r),{value:y.shadowDarkness,"onUpdate:value":w[15]||(w[15]=b=>y.shadowDarkness=b),min:0,max:1,step:.05,size:"small"},null,8,["value"])])):d.createCommentVNode("",!0),d.createElementVNode("div",Qw,[w[36]||(w[36]=d.createElementVNode("span",null,"环境贴图 (HDR)",-1)),d.createVNode(d.unref(t),{checked:y.environmentMap,"onUpdate:checked":w[16]||(w[16]=b=>y.environmentMap=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Hw,[w[37]||(w[37]=d.createElementVNode("span",null,"环境光遮蔽 (AO)",-1)),d.createVNode(d.unref(t),{checked:y.ambientOcclusion,"onUpdate:checked":w[17]||(w[17]=b=>y.ambientOcclusion=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",Gw,[w[38]||(w[38]=d.createElementVNode("div",{class:"sub-label"},"日期时间",-1)),d.createVNode(d.unref(c),{value:y.time,"onUpdate:value":w[18]||(w[18]=b=>y.time=b),"show-time":"",locale:d.unref(ac),format:"YYYY-MM-DD HH:mm",size:"small",style:{width:"100%"}},null,8,["value","locale"])]),d.createElementVNode("div",Yw,[d.createElementVNode("div",Vw,"模型亮度 ("+d.toDisplayString(y.brightness.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.brightness,"onUpdate:value":w[19]||(w[19]=b=>y.brightness=b),min:0,max:5,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Ww,[d.createElementVNode("div",zw,"模型对比度 ("+d.toDisplayString(y.contrast.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.contrast,"onUpdate:value":w[20]||(w[20]=b=>y.contrast=b),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",jw,[d.createElementVNode("div",$w,"模型饱和度 ("+d.toDisplayString(y.saturation.toFixed(1))+")",1),d.createVNode(d.unref(r),{value:y.saturation,"onUpdate:value":w[21]||(w[21]=b=>y.saturation=b),min:0,max:3,step:.1,size:"small"},null,8,["value"])]),d.createElementVNode("div",Kw,[w[39]||(w[39]=d.createElementVNode("div",{class:"sub-label"},"背景颜色",-1)),d.createElementVNode("div",qw,[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(S,(b,T)=>d.createElementVNode("div",{key:T,style:d.normalizeStyle({background:b,width:"32px",height:"24px",borderRadius:"2px",cursor:"pointer",border:"1px solid #d9d9d9",flexShrink:0}),onClick:P=>y.backgroundColor=b,title:"预设 "+(T+1)},null,12,Xw)),64))]),d.createElementVNode("div",Jw,[d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":w[22]||(w[22]=b=>x.value=b),style:{width:"40px",height:"24px",padding:"0",border:"1px solid #d9d9d9"}},null,512),[[d.vModelText,x.value]]),d.createVNode(d.unref(o),{value:y.backgroundColor,"onUpdate:value":w[23]||(w[23]=b=>y.backgroundColor=b),size:"small",style:{flex:"1"},placeholder:"CSS 颜色值"},null,8,["value"])])])])):d.createCommentVNode("",!0),A.value==="MOUSE"?(d.openBlock(),d.createElementBlock("div",Zw,[d.createElementVNode("div",eb,[w[40]||(w[40]=d.createElementVNode("span",null,"碰撞检测",-1)),d.createVNode(d.unref(t),{checked:E.collision,"onUpdate:checked":w[24]||(w[24]=b=>E.collision=b),size:"small"},null,8,["checked"])]),d.createElementVNode("div",tb,[w[43]||(w[43]=d.createElementVNode("div",{class:"sub-label"},"操作习惯",-1)),d.createVNode(d.unref(i),{value:E.habit,"onUpdate:value":w[25]||(w[25]=b=>E.habit=b),size:"small"},{default:d.withCtx(()=>[d.createVNode(d.unref(s),{value:0},{default:d.withCtx(()=>[...w[41]||(w[41]=[d.createTextVNode("默认 (中键旋转)",-1)])]),_:1}),d.createVNode(d.unref(s),{value:1},{default:d.withCtx(()=>[...w[42]||(w[42]=[d.createTextVNode("习惯1 (左键旋转)",-1)])]),_:1})]),_:1},8,["value"])])])):d.createCommentVNode("",!0)])])]),_:1},8,["visible","full-height"]))}}),[["__scopeId","data-v-1ed17be9"]]),nb={class:"cad-layer-panel"},ib={class:"layer-list-container"},sb={class:"list-header"},ob={class:"col-check"},rb=["checked"],ab={class:"list-body"},lb={class:"col-check"},cb=["checked","onChange"],db={class:"col-index"},ub=["title"],hb={class:"col-color"},fb=["value"],pb={key:0,class:"empty-text"},gb=Ne(d.defineComponent({__name:"LeitingCadLayer",props:{visible:{type:Boolean,default:!1},currentModelId:{type:String,default:""}},emits:["update:visible","handleCloseCardByCadCard"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(""),r=d.ref([]),l=()=>{s.value&&s.value.getDxfModels&&(r.value=s.value.getDxfModels().map(E=>({modelId:E.modelId,modelName:E.modelName}))||[])},a=d.computed(()=>r.value.map(E=>({value:E.modelId,label:E.modelName}))),c=d.ref([]),u=d.ref([]),f=d.computed(()=>c.value.length>0&&u.value.length===c.value.length),p=({modelId:E})=>{if(c.value=[],u.value=[],s.value&&s.value.getDxfLayers){const I=s.value.getDxfLayers({modelId:E});I&&Object.keys(I).forEach((S,k)=>{I[S].length&&(c.value.push({index:k+1,layerName:S,layerColor:I[S][0].color||"#ffffff",key:S}),u.value.push(S))})}},h=E=>{o.value=E,p({modelId:E})},A=E=>{E.target.checked?u.value=c.value.map(S=>S.key):u.value=[],m()},C=(E,I)=>{I.target.checked?u.value.includes(E)||u.value.push(E):u.value=u.value.filter(k=>k!==E),m()},m=()=>{if(s.value&&s.value.showDxfLayer&&(s.value.showDxfLayer({modelId:o.value,show:!0,layers:u.value}),s.value.getDxfLayers)){const E=s.value.getDxfLayers({modelId:o.value});if(E){const I=Object.keys(E).filter(S=>!u.value.includes(S));s.value.showDxfLayer({modelId:o.value,show:!1,layers:I})}}},y=()=>{i("update:visible",!1),i("handleCloseCardByCadCard")};return d.watch(()=>t.visible,E=>{E&&(l(),t.currentModelId?(o.value=t.currentModelId,p({modelId:t.currentModelId})):a.value.length>0&&(o.value=a.value[0]?.value,p({modelId:o.value})))}),d.watch(()=>t.currentModelId,E=>{E&&t.visible&&(o.value=E,p({modelId:E}))}),(E,I)=>(d.openBlock(),d.createBlock(Fe,{visible:n.visible,title:"CAD图层","onUpdate:visible":I[3]||(I[3]=S=>E.$emit("update:visible",S)),onClose:y,width:360,align:"right","initial-position":{x:0,y:60}},{"header-extra":d.withCtx(()=>[d.createElementVNode("div",{class:"header-select-container",onMousedown:I[2]||(I[2]=d.withModifiers(()=>{},["stop"]))},[I[4]||(I[4]=d.createElementVNode("span",{class:"header-label"},"图纸:",-1)),d.createVNode(d.unref(ye.Select),{value:o.value,"onUpdate:value":I[0]||(I[0]=S=>o.value=S),options:a.value,onChange:I[1]||(I[1]=S=>h(S)),placeholder:"选择模型",style:{width:"140px"},bordered:!1,class:"custom-header-select",popupClassName:"leiting-select-dropdown",size:"small"},null,8,["value","options"])],32)]),default:d.withCtx(()=>[d.createElementVNode("div",nb,[d.createElementVNode("div",ib,[d.createElementVNode("div",sb,[d.createElementVNode("div",ob,[d.createElementVNode("input",{type:"checkbox",checked:f.value,onChange:A},null,40,rb)]),I[5]||(I[5]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),I[6]||(I[6]=d.createElementVNode("div",{class:"col-name"},"图层名称",-1)),I[7]||(I[7]=d.createElementVNode("div",{class:"col-color"},"颜色",-1))]),d.createElementVNode("div",ab,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(c.value,S=>(d.openBlock(),d.createElementBlock("div",{key:S.key,class:"list-item"},[d.createElementVNode("div",lb,[d.createElementVNode("input",{type:"checkbox",checked:u.value.includes(S.key),onChange:k=>C(S.key,k)},null,40,cb)]),d.createElementVNode("div",db,d.toDisplayString(S.index),1),d.createElementVNode("div",{class:"col-name",title:S.layerName},d.toDisplayString(S.layerName),9,ub),d.createElementVNode("div",hb,[d.createElementVNode("input",{type:"color",value:S.layerColor,disabled:""},null,8,fb)])]))),128)),c.value.length===0?(d.openBlock(),d.createElementBlock("div",pb,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-a4db4977"]]),mb={class:"adjust-panel"},Ab={class:"control-panel"},yb={class:"form-item"},Cb={class:"radio-group"},Eb={class:"form-item"},wb=["title"],bb={class:"param-row"},vb=["step"],Ib={class:"param-row"},xb=["step"],Bb={class:"param-row"},Sb=["step"],Mb={class:"param-row"},Tb=["step"],Db={class:"param-row"},kb=["step"],Pb={class:"param-row"},Fb=["step"],Rb={class:"param-row"},Ob=["step"],Lb={class:"button-grid"},Nb={key:1,class:"pick-mode-ui"},Ub=["onClick"],_b=["checked"],Qb={style:{"font-size":"12px",color:"#aaa","padding-left":"10px"}},Hb={class:"param-row"},Gb={style:{width:"40px"}},Yb=["onUpdate:modelValue"],Vb={class:"param-row"},Wb={style:{width:"40px"}},zb=["onUpdate:modelValue"],jb={class:"param-row"},$b={style:{width:"40px"}},Kb=["onUpdate:modelValue"],qb={class:"list-panel"},Xb={class:"list-header"},Jb={class:"col-check"},Zb=["checked"],ev={class:"list-body"},tv={class:"col-check"},nv=["onUpdate:modelValue"],iv={class:"col-index"},sv=["title"],ov={class:"col-main"},rv=["checked","onChange"],av={key:0,style:{padding:"10px","text-align":"center",color:"#999"}},lv=Ne(d.defineComponent({__name:"LeitingCadPosition",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","handleSavingByCadCard","clearBimPointList","save"],setup(n,{expose:e,emit:t}){const i=n,s=t,o=d.inject("leitingMethods"),r=d.ref([]),l=d.ref(""),a=d.computed(()=>r.value.length>0&&r.value.every(w=>w.selected)),c=d.ref("param"),u=d.ref("bimPoint1"),f=d.ref(null),p=d.ref("bimPoint1"),h=d.reactive({bimPoint1:{longitude:void 0,latitude:void 0,type:"CAD标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0},bimPoint2:{longitude:void 0,latitude:void 0,type:"地图标记点",longitudeText:"经度",latitudeText:"纬度",heightText:"高程",height:void 0}}),A=d.ref(1e-6),C=d.reactive({modelId:"",longitude:0,latitude:0,distance:1e-6,rotation:1,totalRotation:0,heightDistance:1,height:0,lonlat:1e-6,modelOptions:[],selectPoint:{longitude:0,latitude:0,height:0},selectedMode:!1,X:0,Y:0,Z:0}),m=d.computed(()=>{const w=r.value.find(b=>b.modelId===l.value);return w?w.modelName:""}),y=()=>{s("update:visible",!1)},E=()=>(!f.value&&o?.value?.getViewer&&o?.value?.getCesium&&(f.value=new rc(o.value.getViewer(),o.value.getCesium())),f.value),I=()=>{E()?.clearMarkers(),h.bimPoint1.longitude=void 0,h.bimPoint1.latitude=void 0,h.bimPoint1.height=void 0,h.bimPoint2.longitude=void 0,h.bimPoint2.latitude=void 0,h.bimPoint2.height=void 0},S=w=>{const b=u.value,T=h[b];if(T){T.longitude=w.longitude,T.latitude=w.latitude,T.height=w.height;const P=b==="bimPoint1"?"BIM":"MAP";E()?.addMarker(P,w),de.success(`${T.type}已添加`)}},k=()=>{E()?.registerPickHandler(w=>{S(w)})},B=()=>{E()?.destroyPickHandler()},x=w=>{c.value=w,w!=="pick"&&s("clearBimPointList")};d.watch(()=>c.value,w=>{w==="pick"?k():B()}),d.onUnmounted(()=>{B()});const g=()=>{if(!o?.value?.getDxfModels)return;const w=o.value.getDxfModels();if(Array.isArray(w)?r.value=w.map(b=>({modelId:b.modelId,modelName:b.modelName,formData:b.formData||{},selected:!1,tileset:b})):r.value=[],r.value.length>0){const b=o.value.getCadModelId?o.value.getCadModelId():"";b&&r.value.find(T=>T.modelId===b)?R(b):R(r.value[0].modelId),r.value.forEach(T=>T.selected=!0)}},R=w=>{l.value=w;const b=r.value.find(T=>T.modelId===w);b&&b.formData&&Object.keys(C).forEach(T=>{b.formData[T]!==void 0&&(C[T]=b.formData[T])})},M=(w,b)=>{if(!o?.value?.adjustingModelByCad)return;const T=r.value.find(P=>P.modelId===w);T&&T.tileset&&(T.formData={...T.formData,...b},T.tileset.formData=T.formData,o.value.adjustingModelByCad({...T.formData,tileset:T.tileset}))},F=w=>{if(!l.value)return;const b=C[w];M(l.value,{[w]:b})},L=w=>{const b=r.value.filter(O=>O.selected);if(b.length===0){de.warning("请先选择要调整的模型");return}const{distance:T,heightDistance:P,rotation:_}=C;b.forEach(O=>{const D={...O.formData};switch(w){case"north":D.latitude+=T;break;case"south":D.latitude-=T;break;case"east":D.longitude+=T;break;case"west":D.longitude-=T;break;case"up":D.height+=P;break;case"down":D.height-=P;break;case"rotateLeft":D.totalRotation=(D.totalRotation||0)-_;break;case"rotateRight":D.totalRotation=(D.totalRotation||0)+_;break}O.modelId===l.value&&Object.assign(C,D),M(O.modelId,D)})},G=w=>{const b=w.target.checked;r.value.forEach(T=>T.selected=b)},N=()=>{s("handleSavingByCadCard",r.value),s("save",r.value)},v=()=>{const w=h.bimPoint1,b=h.bimPoint2;if(w.longitude===void 0||b.longitude===void 0){de.warning("请先完成点选操作");return}const T=r.value.filter(U=>U.selected);if(T.length===0){de.warning("请先选择要调整的模型");return}let P=0,_=0,O=0;const D=E();if(D){const{dLon:U,dLat:V,dHeight:$}=D.calculateOffset(w,b);P=U,_=V,O=$}else P=b.longitude-w.longitude,_=b.latitude-w.latitude,O=b.height-w.height;T.forEach(U=>{const V={...U.formData};V.longitude+=P,V.latitude+=_,V.height+=O,U.modelId===l.value&&Object.assign(C,V),M(U.modelId,V)}),de.success("位置已调整")};return d.watch(()=>i.visible,w=>{w?g():(B(),I())}),d.onMounted(()=>{i.visible&&g()}),e({setBIMPointsList:({longitude:w,latitude:b,height:T})=>{h[p.value].longitude=w,h[p.value].latitude=b,h[p.value].height=T},addGltfOr3dTilesModelList:w=>{console.warn("addGltfOr3dTilesModelList is deprecated, use internal loading")}}),(w,b)=>(d.openBlock(),d.createBlock(Fe,{visible:i.visible,title:"Cad校准",width:282,height:600,"onUpdate:visible":b[21]||(b[21]=T=>s("update:visible",T)),onClose:y},{default:d.withCtx(()=>[d.createElementVNode("div",mb,[d.createElementVNode("div",Ab,[d.createElementVNode("div",yb,[b[22]||(b[22]=d.createElementVNode("label",null,"调整操作:",-1)),d.createElementVNode("div",Cb,[d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="param"}),onClick:b[0]||(b[0]=T=>x("param"))},"参数模式",2),d.createElementVNode("span",{class:d.normalizeClass({active:c.value==="pick"}),onClick:b[1]||(b[1]=T=>x("pick"))},"地图点选",2)])]),d.createElementVNode("div",Eb,[b[23]||(b[23]=d.createElementVNode("label",null,"当前主模型:",-1)),d.createElementVNode("span",{class:"value",title:m.value},d.toDisplayString(m.value||"未选择"),9,wb)]),b[35]||(b[35]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value==="param"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[b[31]||(b[31]=d.createElementVNode("div",{class:"group-header"},"当前状态",-1)),d.createElementVNode("div",bb,[b[24]||(b[24]=d.createElementVNode("label",null,"经度(东西):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[2]||(b[2]=T=>C.longitude=T),onChange:b[3]||(b[3]=T=>F("longitude")),step:A.value},null,40,vb),[[d.vModelText,C.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",Ib,[b[25]||(b[25]=d.createElementVNode("label",null,"纬度(南北):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[4]||(b[4]=T=>C.latitude=T),onChange:b[5]||(b[5]=T=>F("latitude")),step:A.value},null,40,xb),[[d.vModelText,C.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",Bb,[b[26]||(b[26]=d.createElementVNode("label",null,"高度(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[6]||(b[6]=T=>C.height=T),onChange:b[7]||(b[7]=T=>F("height")),step:A.value},null,40,Sb),[[d.vModelText,C.height,void 0,{number:!0}]])]),d.createElementVNode("div",Mb,[b[27]||(b[27]=d.createElementVNode("label",null,"累计旋转(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[8]||(b[8]=T=>C.totalRotation=T),onChange:b[9]||(b[9]=T=>F("totalRotation")),step:A.value},null,40,Tb),[[d.vModelText,C.totalRotation,void 0,{number:!0}]])]),b[32]||(b[32]=d.createElementVNode("div",{class:"separator"},null,-1)),b[33]||(b[33]=d.createElementVNode("div",{class:"group-header"},"调整步长",-1)),d.createElementVNode("div",Db,[b[28]||(b[28]=d.createElementVNode("label",null,"经纬步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[10]||(b[10]=T=>C.distance=T),step:A.value},null,8,kb),[[d.vModelText,C.distance,void 0,{number:!0}]])]),d.createElementVNode("div",Pb,[b[29]||(b[29]=d.createElementVNode("label",null,"高度步长(m):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[11]||(b[11]=T=>C.heightDistance=T),step:A.value},null,8,Fb),[[d.vModelText,C.heightDistance,void 0,{number:!0}]])]),d.createElementVNode("div",Rb,[b[30]||(b[30]=d.createElementVNode("label",null,"旋转步长(°):",-1)),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":b[12]||(b[12]=T=>C.rotation=T),step:A.value},null,8,Ob),[[d.vModelText,C.rotation,void 0,{number:!0}]])]),d.createElementVNode("div",Lb,[d.createElementVNode("button",{onClick:b[13]||(b[13]=T=>L("rotateLeft"))},"左转"),d.createElementVNode("button",{onClick:b[14]||(b[14]=T=>L("north"))},"北移"),d.createElementVNode("button",{onClick:b[15]||(b[15]=T=>L("rotateRight"))},"右转"),d.createElementVNode("button",{onClick:b[16]||(b[16]=T=>L("west"))},"西移"),d.createElementVNode("button",{onClick:b[17]||(b[17]=T=>L("south"))},"南移"),d.createElementVNode("button",{onClick:b[18]||(b[18]=T=>L("east"))},"东移"),d.createElementVNode("button",{onClick:b[19]||(b[19]=T=>L("up"))},"上移"),d.createElementVNode("button",{onClick:b[20]||(b[20]=T=>L("down"))},"下移"),d.createElementVNode("button",{onClick:N,class:"primary-btn",style:{"grid-column":"span 3","margin-top":"5px"}},"保存当前位置")])],64)):(d.openBlock(),d.createElementBlock("div",Nb,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(h,(T,P)=>(d.openBlock(),d.createElementBlock("div",{key:P,class:"form-item",style:{display:"block","margin-bottom":"15px"}},[d.createElementVNode("div",{style:{"font-weight":"bold","margin-bottom":"5px",cursor:"pointer",display:"flex","align-items":"center"},onClick:_=>u.value=P},[d.createElementVNode("input",{type:"radio",checked:u.value===P,style:{"margin-right":"5px"}},null,8,_b),d.createTextVNode(" "+d.toDisplayString(T.type)+": ",1)],8,Ub),d.createElementVNode("div",Qb,[d.createElementVNode("div",Hb,[d.createElementVNode("label",Gb,d.toDisplayString(T.longitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>T.longitude=_,readonly:"",style:{width:"100px"}},null,8,Yb),[[d.vModelText,T.longitude,void 0,{number:!0}]])]),d.createElementVNode("div",Vb,[d.createElementVNode("label",Wb,d.toDisplayString(T.latitudeText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>T.latitude=_,readonly:"",style:{width:"100px"}},null,8,zb),[[d.vModelText,T.latitude,void 0,{number:!0}]])]),d.createElementVNode("div",jb,[d.createElementVNode("label",$b,d.toDisplayString(T.heightText),1),d.withDirectives(d.createElementVNode("input",{type:"number","onUpdate:modelValue":_=>T.height=_,readonly:"",style:{width:"100px"}},null,8,Kb),[[d.vModelText,T.height,void 0,{number:!0}]])])])]))),128)),d.createElementVNode("div",{class:"button-grid",style:{"grid-template-columns":"1fr"}},[d.createElementVNode("button",{onClick:v,class:"primary-btn"},"应用校准"),d.createElementVNode("button",{onClick:N},"保存")]),b[34]||(b[34]=d.createElementVNode("div",{class:"instructions",style:{"margin-top":"15px",color:"#999","font-size":"12px","line-height":"1.5"}},[d.createElementVNode("div",null,"操作指南:"),d.createElementVNode("div",null,"1. 勾选上方 CAD 或 地图 标记点选项。"),d.createElementVNode("div",null,"2. Shift + 左键 点击场景拾取对应坐标。"),d.createElementVNode("div",null,"3. 采集两点后,点击“应用校准”进行校准。")],-1))]))]),d.createElementVNode("div",qb,[d.createElementVNode("div",Xb,[d.createElementVNode("div",Jb,[d.createElementVNode("input",{type:"checkbox",checked:a.value,onChange:G},null,40,Zb)]),b[36]||(b[36]=d.createElementVNode("div",{class:"col-index"},"序号",-1)),b[37]||(b[37]=d.createElementVNode("div",{class:"col-name"},"名称",-1)),b[38]||(b[38]=d.createElementVNode("div",{class:"col-main"},"主模型",-1))]),d.createElementVNode("div",ev,[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(r.value,(T,P)=>(d.openBlock(),d.createElementBlock("div",{key:T.modelId,class:d.normalizeClass(["list-item",{active:T.modelId===l.value}])},[d.createElementVNode("div",tv,[d.withDirectives(d.createElementVNode("input",{type:"checkbox","onUpdate:modelValue":_=>T.selected=_},null,8,nv),[[d.vModelCheckbox,T.selected]])]),d.createElementVNode("div",iv,d.toDisplayString(P+1),1),d.createElementVNode("div",{class:"col-name",title:T.modelName},d.toDisplayString(T.modelName),9,sv),d.createElementVNode("div",ov,[d.createElementVNode("input",{type:"radio",name:"mainModel",checked:T.modelId===l.value,onChange:_=>R(T.modelId)},null,40,rv)])],2))),128)),r.value.length===0?(d.openBlock(),d.createElementBlock("div",av,"暂无数据")):d.createCommentVNode("",!0)])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-e8abd49d"]]),cv={class:"annotation-content"},dv={class:"annotation-tools"},uv={class:"annotation-controls"},hv={class:"control-group",title:"颜色"},fv={class:"tool-item color-tool"},pv={class:"control-group line-width-container",title:"线宽"},gv=["onClick"],mv={class:"option-label"},Av=Ne(d.defineComponent({__name:"LeitingAnnotationCard",props:{visible:{type:Boolean,default:!1}},emits:["update:visible"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods"),o=d.ref(""),r=d.ref("#ff0000"),l=d.ref(1),a=d.ref(!1),c=d.ref(null),u=d.ref(null),f=d.ref({top:"0px",left:"0px"}),p=[{value:6,label:"粗"},{value:3,label:"中"},{value:1,label:"细"}],h=()=>s?.value?.getAnnotationInstance?s.value.getAnnotationInstance():null,A=()=>{i("update:visible",!1)},C=x=>{o.value=x;const g=h();if(g)switch(x){case"freehandLine":g.startFreehandLine();break;case"arrow":g.startArrow();break;case"straightLine":g.startStraightLine();break;case"rectangle":g.startRectangle();break;case"ellipse":g.startEllipse();break}},m=()=>{const x=h();x&&(x.setCurrentColor(r.value),x.changeColor(r.value))},y=()=>{if(!a.value&&c.value){const x=c.value.getBoundingClientRect();f.value={top:`${x.top}px`,left:`${x.right+8}px`}}a.value=!a.value},E=x=>{l.value=x,a.value=!1;const g=h();g&&(g.setCurrentWidth(x),g.changeWidth(x))},I=()=>{const x=h();x&&x.deleteSelectedEntity()},S=()=>{const x=h();x&&x.clearAll()},k=()=>{if(s?.value?.saveAnnotations){s.value.saveAnnotations();return}const x=h();x&&x.saveAnnotations()},B=x=>{const g=x.target,R=c.value&&c.value.contains(g),M=u.value&&u.value.contains(g);!R&&!M&&(a.value=!1)};return d.onMounted(()=>{document.addEventListener("click",B)}),d.onUnmounted(()=>{document.removeEventListener("click",B)}),(x,g)=>(d.openBlock(),d.createBlock(Fe,{visible:t.visible,title:"标注",width:70,"min-width":70,height:480,"onUpdate:visible":g[6]||(g[6]=R=>i("update:visible",R)),onClose:A},{default:d.withCtx(()=>[d.createElementVNode("div",cv,[d.createElementVNode("div",dv,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="freehandLine"}]),onClick:g[0]||(g[0]=R=>C("freehandLine")),title:"手绘线"},[...g[7]||(g[7]=[d.createElementVNode("div",{class:"tool-icon"},"✏️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="arrow"}]),onClick:g[1]||(g[1]=R=>C("arrow")),title:"箭头"},[...g[8]||(g[8]=[d.createElementVNode("div",{class:"tool-icon"},"↗️",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="straightLine"}]),onClick:g[2]||(g[2]=R=>C("straightLine")),title:"直线"},[...g[9]||(g[9]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="rectangle"}]),onClick:g[3]||(g[3]=R=>C("rectangle")),title:"矩形"},[...g[10]||(g[10]=[d.createElementVNode("div",{class:"tool-icon"},"▭",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:o.value==="ellipse"}]),onClick:g[4]||(g[4]=R=>C("ellipse")),title:"椭圆"},[...g[11]||(g[11]=[d.createElementVNode("div",{class:"tool-icon"},"⭕",-1)])],2)]),g[13]||(g[13]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",uv,[d.createElementVNode("div",hv,[d.createElementVNode("div",fv,[d.createElementVNode("div",{class:"color-swatch",style:d.normalizeStyle({backgroundColor:r.value})},null,4),d.withDirectives(d.createElementVNode("input",{type:"color","onUpdate:modelValue":g[5]||(g[5]=R=>r.value=R),onChange:m,class:"color-input-overlay"},null,544),[[d.vModelText,r.value]])])]),d.createElementVNode("div",pv,[d.createElementVNode("div",{ref_key:"lineWidthBtnRef",ref:c,class:"tool-item",onClick:d.withModifiers(y,["stop"])},[d.createElementVNode("div",{class:"current-width-preview",style:d.normalizeStyle({height:l.value+"px",backgroundColor:"#fff"})},null,4)],512),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[a.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"dropdownRef",ref:u,class:"line-width-dropdown",style:d.normalizeStyle(f.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(p,R=>d.createElementVNode("div",{key:R.value,class:d.normalizeClass(["line-width-option",{selected:l.value===R.value}]),onClick:d.withModifiers(M=>E(R.value),["stop"])},[d.createElementVNode("span",mv,d.toDisplayString(R.label),1),d.createElementVNode("div",{class:"line-preview",style:d.normalizeStyle({height:R.value+"px",backgroundColor:l.value===R.value?"#1890ff":"#ddd"})},null,4)],10,gv)),64))],4)):d.createCommentVNode("",!0)]))]),g[12]||(g[12]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("button",{class:"control-btn",onClick:I,title:"删除选中"}," 🗑️ "),d.createElementVNode("button",{class:"control-btn",onClick:S,title:"清空"}," ❌ "),d.createElementVNode("button",{class:"control-btn",onClick:k,title:"保存"}," 💾 ")])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-3cfc8415"]]),yv={class:"measure-content"},Cv={class:"measure-tools"},Ev={key:0,class:"measure-results"},wv={class:"result-row"},bv={class:"result-value"},vv={class:"result-row"},Iv={class:"result-value"},xv={class:"result-row"},Bv={class:"result-value"},Sv={class:"result-row"},Mv={class:"result-value"},Tv={key:1,class:"result-row"},Dv={class:"result-value"},kv={key:2,class:"result-row"},Pv={class:"result-value"},Fv={class:"measure-controls"},Rv={class:"control-group",title:"单位"},Ov={class:"unit-display"},Lv=["onClick"],Nv=Ne(d.defineComponent({__name:"LeitingMeasurement",props:{visible:{type:Boolean,default:!1}},emits:["update:visible","close"],setup(n,{emit:e}){const t=n,i=e,s=d.inject("leitingMethods",d.ref({})),o=d.ref(null),r=d.ref(null),l=d.ref("m"),a=d.ref(!1),c=d.ref(null),u=d.ref(!1),f=d.ref({}),p=d.ref(null),h=[{label:"米 (m)",value:"m"},{label:"厘米 (cm)",value:"cm"},{label:"毫米 (mm)",value:"mm"}],A=x=>{const g=l.value;return g==="mm"?`${(x*1e3).toFixed(0)}mm`:g==="cm"?`${(x*100).toFixed(1)}cm`:`${x.toFixed(2)}m`},C=x=>x>1e6?`${(x/1e6).toFixed(2)} km²`:`${x.toFixed(2)} m²`,m=()=>{if(!o.value&&s.value?.getViewer){const x=s.value.getViewer(),g=s.value.getCesium();x&&g&&(o.value=new nc({viewer:x,cesium:g}),o.value.setUnit(l.value),o.value.setSnapping(a.value),o.value.onMeasure=R=>{c.value=R})}},y=x=>{o.value||m(),r.value===x?(r.value=null,o.value?.stop()):(r.value=x,o.value?.start(x))},E=x=>{l.value=x,u.value=!1},I=()=>{o.value&&(o.value.clearAll(),r.value=null,o.value.stop())},S=()=>{i("update:visible",!1)},k=x=>{if(u.value){u.value=!1;return}const R=x.currentTarget.getBoundingClientRect();f.value={position:"fixed",top:`${R.top}px`,left:`${R.right+5}px`,zIndex:3e3},u.value=!0},B=x=>{u.value&&p.value&&!p.value.contains(x.target)&&(u.value=!1)};return d.onMounted(()=>{document.addEventListener("click",B),t.visible&&d.nextTick(()=>m())}),d.onUnmounted(()=>{document.removeEventListener("click",B),o.value&&o.value.destroy()}),d.watch(()=>t.visible,x=>{x?d.nextTick(()=>m()):o.value&&(o.value.stop(),r.value=null)}),d.watch(s,x=>{x&&x.getViewer&&!o.value&&t.visible&&m()}),d.watch(l,x=>{o.value&&o.value.setUnit(x)}),(x,g)=>(d.openBlock(),d.createBlock(Fe,{visible:t.visible,title:"量算",width:70,"min-width":70,height:480,"onUpdate:visible":g[3]||(g[3]=R=>i("update:visible",R)),onClose:S},{default:d.withCtx(()=>[d.createElementVNode("div",yv,[d.createElementVNode("div",Cv,[d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="distance"}]),onClick:g[0]||(g[0]=R=>y("distance")),title:"距离测量"},[...g[4]||(g[4]=[d.createElementVNode("div",{class:"tool-icon"},"📏",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="angle"}]),onClick:g[1]||(g[1]=R=>y("angle")),title:"角度测量"},[...g[5]||(g[5]=[d.createElementVNode("div",{class:"tool-icon"},"📐",-1)])],2),d.createElementVNode("div",{class:d.normalizeClass(["tool-item",{active:r.value==="area"}]),onClick:g[2]||(g[2]=R=>y("area")),title:"面积测量"},[...g[6]||(g[6]=[d.createElementVNode("div",{class:"tool-icon"},"🔳",-1)])],2)]),g[15]||(g[15]=d.createElementVNode("div",{class:"separator"},null,-1)),c.value?(d.openBlock(),d.createElementBlock("div",Ev,[c.value.type==="distance"?(d.openBlock(),d.createElementBlock(d.Fragment,{key:0},[d.createElementVNode("div",wv,[g[7]||(g[7]=d.createElementVNode("span",{class:"result-label"},"总长:",-1)),d.createElementVNode("span",bv,d.toDisplayString(A(c.value.dist)),1)]),d.createElementVNode("div",vv,[g[8]||(g[8]=d.createElementVNode("span",{class:"result-label",style:{color:"#ff4d4f"}},"ΔX:",-1)),d.createElementVNode("span",Iv,d.toDisplayString(A(c.value.dx)),1)]),d.createElementVNode("div",xv,[g[9]||(g[9]=d.createElementVNode("span",{class:"result-label",style:{color:"#52c41a"}},"ΔY:",-1)),d.createElementVNode("span",Bv,d.toDisplayString(A(c.value.dy)),1)]),d.createElementVNode("div",Sv,[g[10]||(g[10]=d.createElementVNode("span",{class:"result-label",style:{color:"#1890ff"}},"ΔZ:",-1)),d.createElementVNode("span",Mv,d.toDisplayString(A(c.value.dz)),1)])],64)):d.createCommentVNode("",!0),c.value.type==="angle"?(d.openBlock(),d.createElementBlock("div",Tv,[g[11]||(g[11]=d.createElementVNode("span",{class:"result-label"},"角度:",-1)),d.createElementVNode("span",Dv,d.toDisplayString(c.value.angle.toFixed(1))+"°",1)])):d.createCommentVNode("",!0),c.value.type==="area"?(d.openBlock(),d.createElementBlock("div",kv,[g[12]||(g[12]=d.createElementVNode("span",{class:"result-label"},"面积:",-1)),d.createElementVNode("span",Pv,d.toDisplayString(C(c.value.area)),1)])):d.createCommentVNode("",!0)])):d.createCommentVNode("",!0),d.createElementVNode("div",Fv,[d.createElementVNode("div",Rv,[d.createElementVNode("div",{class:"tool-item",onClick:d.withModifiers(k,["stop"])},[d.createElementVNode("div",Ov,d.toDisplayString(l.value),1)]),(d.openBlock(),d.createBlock(d.Teleport,{to:"body"},[u.value?(d.openBlock(),d.createElementBlock("div",{key:0,ref_key:"unitDropdownRef",ref:p,class:"unit-dropdown",style:d.normalizeStyle(f.value)},[(d.openBlock(),d.createElementBlock(d.Fragment,null,d.renderList(h,R=>d.createElementVNode("div",{key:R.value,class:d.normalizeClass(["unit-option",{selected:l.value===R.value}]),onClick:d.withModifiers(M=>E(R.value),["stop"])},d.toDisplayString(R.label),11,Lv)),64))],4)):d.createCommentVNode("",!0)]))]),g[14]||(g[14]=d.createElementVNode("div",{class:"separator"},null,-1)),d.createElementVNode("div",{class:"action-buttons"},[d.createElementVNode("div",{class:"tool-item control-btn",onClick:I,title:"清空"},[...g[13]||(g[13]=[d.createElementVNode("div",{class:"tool-icon"},"🗑️",-1)])])])])])]),_:1},8,["visible"]))}}),[["__scopeId","data-v-b766acb4"]]);function Uv(){const n=d.ref(!1),e=d.reactive({x:0,y:0}),t=d.ref([]),i=d.ref(null);return{visible:n,position:e,items:t,contextData:i,show:(a,c,u)=>{a instanceof MouseEvent?(a.preventDefault(),e.x=a.clientX,e.y=a.clientY):(e.x=a.x,e.y=a.y),t.value=c,i.value=u,n.value=!0},hide:()=>{n.value=!1},addItem:a=>{t.value.push(a)},removeItem:a=>{t.value=t.value.filter(c=>c.id!==a)}}}const _v=["onClick"],Qv={class:"menu-label"},Hv={key:0,class:"menu-arrow"},Gv=Ne(d.defineComponent({__name:"LeitingContextMenu",props:{visible:{type:Boolean},position:{},items:{}},emits:["update:visible","action"],setup(n,{emit:e}){const t=n,i=e,s=r=>{r.disabled||(r.action&&r.action(),i("action",r),i("update:visible",!1))},o=()=>{t.visible&&i("update:visible",!1)};return d.onMounted(()=>{document.addEventListener("click",o),document.addEventListener("contextmenu",r=>{r.target.closest(".leiting-context-menu")||o()})}),d.onUnmounted(()=>{document.removeEventListener("click",o)}),(r,l)=>d.withDirectives((d.openBlock(),d.createElementBlock("div",{class:"leiting-context-menu",style:d.normalizeStyle({left:n.position.x+"px",top:n.position.y+"px"}),onContextmenu:l[0]||(l[0]=d.withModifiers(()=>{},["prevent"]))},[(d.openBlock(!0),d.createElementBlock(d.Fragment,null,d.renderList(n.items,a=>(d.openBlock(),d.createElementBlock("div",{key:a.id,class:d.normalizeClass(["menu-item",{"menu-divided":a.divided,"menu-disabled":a.disabled}]),onClick:c=>s(a)},[d.createElementVNode("span",Qv,d.toDisplayString(a.label),1),a.children?(d.openBlock(),d.createElementBlock("span",Hv,"▶")):d.createCommentVNode("",!0)],10,_v))),128))],36)),[[d.vShow,n.visible]])}}),[["__scopeId","data-v-f288753b"]]),Qi=Ne(d.defineComponent({__name:"LeitingBIM",props:{accessToken:{},cesiumUrl:{},cesiumCssUrl:{},methods:{},viewerOptions:{},treeProps:{},showTree:{type:Boolean,default:!0},showMenu:{type:Boolean,default:!1},playerUrl:{default:"https://leiting.chenxisoft.com/resource/person/person.glb"},playerModelName:{default:"Person"},playerModelId:{default:"player_111"},playerScale:{default:.0032},tiandituToken:{default:"c25f14fb6bd4397cf8fe45144ff768d6"},globe:{type:Boolean,default:void 0},terrain:{type:Boolean,default:void 0},depthTest:{type:Boolean,default:void 0},mapProvider:{},tiandituLayerType:{},tiandituShowLabel:{type:Boolean,default:void 0},arcgisUrl:{},shadows:{type:Boolean,default:void 0},environmentMap:{type:Boolean,default:void 0},ambientOcclusion:{type:Boolean,default:void 0},time:{},brightness:{},backgroundColor:{},collision:{type:Boolean,default:void 0},mouseHabit:{},mode:{default:"3d"},mountAll3Dtiles:{},mountAllCad:{},saveRegion:{},saveCadRegion:{},saveCadCalibration:{},selectionChange:{},searchComponent:{}},emits:["register","init","ready"],setup(n,{emit:e}){const t=d.ref(),i=d.ref(),s=d.getCurrentInstance(),o=d.ref(!1),r=d.ref(""),l=d.ref({}),a=d.ref("3d"),c=n,u={title:"构件树",treeData:[]},f=d.ref(!1),p=d.ref(!1),h=d.ref(!1),A=d.ref(!1),C=d.ref(!1),m=d.ref(!1),y=d.ref(!1),E=d.ref(!1),I=d.ref(!1),S=d.ref(!1),{visible:k,position:B,items:x,show:g,hide:R}=Uv(),M=d.ref([]),F=Y=>{M.value.push(Y)},L=Y=>{M.value=M.value.filter(z=>z.id!==Y)},G=d.ref([]),N=d.ref(""),v=d.ref(null),w=d.ref([]),b=d.reactive({tree:!1,section:!1,roam:!1,info:!1,adjustModel:!1,setting:!1,cadLayer:!1,cadPosition:!1,annotation:!1}),T=(Y,z)=>{Y==="componentTree"&&(Y="tree"),Y==="componentInfo"&&(Y="info"),Y in b&&(b[Y]=z)},P=d.shallowRef({});d.provide("leitingMethods",P);const _=d.ref(c.showMenu),O=d.ref([]);d.watch(()=>c.showMenu,Y=>{_.value=Y},{immediate:!0}),d.watch(()=>c.mode,Y=>{Y&&P.value?.set2d&&P.value.set2d(Y==="2d")});const D=d.ref("dark");d.provide("leiting-theme",D);const U=d.ref([]),V=d.computed(()=>{const Y=[];return f.value&&(Y.push("tree"),Y.push("componentTree")),p.value&&Y.push("section"),h.value&&Y.push("roam"),A.value&&(Y.push("info"),Y.push("componentInfo")),C.value&&Y.push("adjust"),m.value&&Y.push("setting"),y.value&&Y.push("cadLayer"),E.value&&Y.push("cadPosition"),I.value&&Y.push("annotation"),S.value&&(Y.push("measure"),Y.push("measurement")),Y.push(...U.value),Y}),$=d.ref(null),X=(Y,z)=>{Y==="componentTree"||Y==="tree"?f.value=z:Y==="section"?p.value=z:Y==="roam"?h.value=z:Y==="componentInfo"||Y==="info"?A.value=z:Y==="homeView"?P.value?.is2dMode?.()?P.value?.flyToTopView?.({}):P.value?.flyToTileset?.({}):Y==="adjustModel"?(C.value=z,z&&$.value&&$.value.setModelType("BIM")):Y==="osgbAdjust"?(C.value=z,z&&$.value&&$.value.setModelType("OSGB")):Y==="setting"?m.value=z:Y==="cadLayer"?y.value=z:Y==="cadPosition"?E.value=z:Y==="annotation"?I.value=z:Y==="measurement"?S.value=z:z?U.value.includes(Y)||U.value.push(Y):U.value=U.value.filter(J=>J!==Y)};d.watch(f,async Y=>{if(Y&&P.value?.loadTreeForModel&&P.value?.getMapTileset){const z=P.value.getMapTileset(),J=Object.values(z).map(async re=>{if(re.leiting&&!re.leiting.tree&&re.leiting.model?.treeUrl){const ae=re.leiting.model.modelId;try{re.leiting?.node?.batchIdEIDInfos||await P.value.loadNodeDetailsForModel(ae);const le=await P.value.loadTreeForModel(ae);le&&(Array.isArray(le)?le:[le]).forEach(Me=>{Me&&!w.value.find($e=>$e.id===Me.id)&&(Me.modelId=ae,w.value=[...w.value,Me])})}catch(le){console.warn(`Failed to lazy load tree for ${ae}`,le)}}});await Promise.all(J)}});const ne=()=>{P.value&&(P.value.getDxfModels&&(G.value=P.value.getDxfModels()||[]),P.value.getCadModelId&&(N.value=P.value.getCadModelId()||""))};d.watch(y,Y=>{Y&&ne()}),d.watch(E,Y=>{Y&&(ne(),v.value&&G.value.length&&v.value.addGltfOr3dTilesModelList(G.value))});const se=e,oe=Y=>{P.value&&P.value.saveCadCalibration&&P.value.saveCadCalibration(Y),P.value&&P.value.saveCadRegion&&P.value.saveCadRegion(Y)};return d.onMounted(async()=>{if(i.value&&de.setContainer(i.value),!!t.value)try{const Y={...xt,cesiumUrl:c.cesiumUrl||xt.cesiumUrl,cesiumCssUrl:c.cesiumCssUrl||xt.cesiumCssUrl,accessToken:c.accessToken||ns()||xt.accessToken};await ts(Y);const z=c.accessToken||ns()||xt.accessToken;z&&(Cesium.Ion.defaultAccessToken=z),o.value=!0;const J=(ae={},le)=>{if(t.value){const{showMenu:he,showTree:Me,globe:$e,terrain:Ke,depthTest:It,mapProvider:st,tiandituLayerType:un,tiandituShowLabel:Ut,arcgisUrl:_t,shadows:qi,environmentMap:qe,ambientOcclusion:Re,time:ot,brightness:ut,backgroundColor:Qt,collision:Ht,mouseHabit:Gt,mode:rt,...He}=ae||{},Do=c.showMenu!==void 0?c.showMenu:he!==void 0?he:!0;_.value=Do;const xe=(ee,Be,Vt)=>ee!==void 0?ee:Be!==void 0?Be:Vt,hn=xe(c.globe,$e,!1),$n=xe(c.terrain,Ke,!1),Kn=xe(c.depthTest,It,!1),qn=xe(c.mapProvider,st,"tianditu"),Xi=xe(c.tiandituLayerType,un,"img_w"),Jc=xe(c.tiandituShowLabel,Ut,!1),Zc=xe(c.arcgisUrl,_t,"https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer"),ed=xe(c.shadows,qi,!1),td=xe(c.environmentMap,qe,!1),nd=xe(c.ambientOcclusion,Re,!1),id=xe(c.time,ot,void 0),sd=xe(c.brightness,ut,1),Ji=c.mode||rt||"3d";console.log("LeitingBIM Mode:",Ji,"Props:",c.mode,"Options:",rt),a.value=Ji;const Yx=Ji==="2d"?"#000000":"linear-gradient(0deg, rgb(238, 247, 255) 0%, rgb(178, 218, 244) 70%, rgb(141, 190, 221) 100%)",od=xe(c.backgroundColor,Qt,Yx),rd=xe(c.collision,Ht,!1),ad=xe(c.mouseHabit,Gt,0);l.value={globe:hn,terrain:$n,depthTest:Kn,mapProvider:qn,tiandituLayerType:Xi,tiandituShowLabel:Jc,arcgisUrl:Zc,shadows:ed,environmentMap:td,ambientOcclusion:nd,time:id,brightness:sd,backgroundColor:od,collision:rd,mouseHabit:ad};const Xn=N0({container:t.value,appContext:s?.appContext,methods:{...P.value,handleMenuAction:X,setCardFullHeight:T,onLoadingStatus:ee=>{ee?de.loading(ee,"",i.value):de.close()},...He,tilesLoad3dTiles:async ee=>{let Be=ee.leiting?.tree;const Vt=ee.leiting?.model?.modelId;if(!Be&&f.value&&P.value?.loadTreeForModel)try{Be=await P.value.loadTreeForModel(Vt)}catch(Zn){console.warn("Failed to lazy load tree",Zn)}Be&&(Array.isArray(Be)?Be:[Be]).forEach(Wt=>{Wt&&!w.value.find(cd=>cd.id===Wt.id)&&(Wt.modelId=Vt,w.value=[...w.value,Wt])});const{brightness:ko,contrast:Po,saturation:ht}=Xn.methods.getConfigure();Xn.methods.setModelColorAdjustment({brightness:ko,contrast:Po,saturation:ht}),He.tilesLoad3dTiles?.(ee)},mountAll3Dtiles:ee=>{c.mountAll3Dtiles&&c.mountAll3Dtiles(ee),He.mountAll3Dtiles?.(ee)},mountAllCad:ee=>{if(Xn.methods.setModelBrightness){const Be=c.brightness!==void 0?c.brightness:l.value.brightness;Be!==void 0&&Xn.methods.setModelBrightness(Be)}c.mountAllCad&&c.mountAllCad(ee),He.mountAllCad?.(ee)},saveRegion:ee=>{c.saveRegion&&c.saveRegion(ee),He.saveRegion?.(ee)},saveCadRegion:ee=>{c.saveCadRegion&&c.saveCadRegion(ee),He.saveCadRegion?.(ee)},saveCadCalibration:ee=>{c.saveCadCalibration&&c.saveCadCalibration(ee),He.saveCadCalibration?.(ee)},selectionChange:ee=>{c.selectionChange&&c.selectionChange(ee),He.selectionChange?.(ee)},onSearchComponent:ee=>{c.searchComponent&&c.searchComponent(ee),He.searchComponent?.(ee)}},viewerOptions:c.viewerOptions,options:{...He,mode:Ji,playerUrl:c.playerUrl,playerModelName:c.playerModelName,playerModelId:c.playerModelId,playerScale:c.playerScale,globe:hn,terrain:$n,depthTest:Kn,mapProvider:qn,tiandituLayerType:Xi,tiandituShowLabel:Jc,tiandituToken:c.tiandituToken,arcgisUrl:Zc,shadows:ed,environmentMap:td,ambientOcclusion:nd,time:id,brightness:sd,backgroundColor:od,collision:rd,mouseHabit:ad},callbacks:{onLoading:ee=>ee?de.loading(ee,"",i.value):de.close(),onSuccess:ee=>de.success(ee,"",void 0,i.value),onError:ee=>de.error(ee,"",void 0,i.value)}}),{Cesium:Yt,viewer:fn,methods:Zi,menuEvents:Jn}=Xn,Ae=Zi;Jn.on("showMenu",ee=>{_.value=ee}),Jn.on("insertMenu",ee=>{O.value=ee}),Jn.on("setMenuActive",(ee,Be)=>{X(ee,Be)}),P.value=Ae,le&&(le.value=Ae),Jn.on("setMode",ee=>{a.value=ee}),Jn.on("deleteAllModels",()=>{w.value=[]}),new Yt.ScreenSpaceEventHandler(fn.scene.canvas).setInputAction(async ee=>{if(R(),a.value==="2d")return;const Be=fn.scene.pick(ee.position),Vt=fn.container.getBoundingClientRect(),ko=Vt.left+ee.position.x,Po=Vt.top+ee.position.y,ht=[];if(Yt.defined(Be)&&Be instanceof Yt.Cesium3DTileFeature){const Zn=Ae.baseCompt.getFeatureId(Be),Wt=Sn(Be.tileset);Ae.baseCompt.hasSelectedFeaturesMap[Wt]?.some(ei=>ei.batchId===Zn&&ei.rank===0)||(await Ae.baseCompt.clearSelection(),await Ae.baseCompt.toggleMultiSelect(Wt,Zn,Ae.baseCompt.selectedColor)),ht.push({id:"details",label:"构件详情",action:()=>{A.value=!0}}),ht.push({id:"hide",label:"隐藏选中构件",action:()=>{const ti=Ae.baseCompt.getSelected().map(ft=>({elementId:ft.elementId,modelId:ft.modelId,show:!1}));Ae.baseCompt.setComponentVisibility(ti)}}),ht.push({id:"translucent",label:"半透明选中构件",action:async()=>{const ti=Ae.baseCompt.getSelected().map(ft=>({elementId:ft.elementId,modelId:ft.modelId,rgba:{...ft.rgba,a:.3}}));await Ae.baseCompt.setSelectColorUserModelCpt(ti,{rank:0})}}),ht.push({id:"isolate",label:"隔离选中构件",divided:!0,action:()=>{Ae.baseCompt.setAllComponentsVisibility(!1);const ti=Ae.baseCompt.getSelected().map(ft=>({elementId:ft.elementId,modelId:ft.modelId,show:!0}));Ae.baseCompt.setComponentVisibility(ti)}})}ht.push({id:"showAll",label:"显示所有",action:async()=>{Ae.baseCompt.setAllComponentsVisibility(!0),await Ae.baseCompt.clearSelection()}}),ht.push(...M.value),g({x:ko,y:Po},ht)},Yt.ScreenSpaceEventType.RIGHT_CLICK),Ae.addContextMenuItems=F,Ae.insertContextMenu=Ae.addContextMenuItems,Ae.removeContextMenuItems=L,Ae.deleteContextMenu=Ae.removeContextMenuItems,Ae.closeContextMenu=R,Ae.hideContextMenu=Ae.closeContextMenu;const ld=ae?.onLoaded||ae?.onloaded;ld&&ld({Cesium:Yt,viewer:fn,methods:Zi}),se("init",{Cesium:Yt,viewer:fn,methods:Zi}),se("ready",{Cesium:Yt,viewer:fn,methods:Zi})}};let re=!1;se("register",(ae,le)=>{re=!0,J(ae,le)}),re||setTimeout(()=>{P.value.getViewer||J()},0)}catch(Y){r.value="Failed to load Cesium: "+(Y.message||Y),console.error(Y)}}),d.onUnmounted(()=>{de.setContainer(null)}),(Y,z)=>(d.openBlock(),d.createElementBlock("div",{class:d.normalizeClass(["leiting-bim-container",[`theme-${D.value}`]]),onContextmenu:z[11]||(z[11]=d.withModifiers(()=>{},["prevent","stop"]))},[!o.value&&!r.value?(d.openBlock(),d.createBlock(d.unref(ye.Spin),{key:0,class:"loading",size:"large",tip:"加载基础组件中..."})):d.createCommentVNode("",!0),r.value?(d.openBlock(),d.createBlock(d.unref(ye.Alert),{key:1,class:"error",type:"error",message:r.value,"show-icon":""},null,8,["message"])):d.createCommentVNode("",!0),d.createElementVNode("div",{ref_key:"containerRef",ref:t,class:"cesium-viewer"},[d.createElementVNode("div",{ref_key:"uiOverlayRef",ref:i,class:"leiting-ui-overlay"},[d.createVNode(Qn,{visible:A.value,"full-height":b.info,"onUpdate:visible":z[0]||(z[0]=J=>A.value=J)},null,8,["visible","full-height"]),d.createVNode(Hn,{ref_key:"LeitingPositionRef",ref:$,visible:C.value,"full-height":b.adjustModel,"onUpdate:visible":z[1]||(z[1]=J=>C.value=J)},null,8,["visible","full-height"]),d.createVNode(Gn,{visible:m.value,"full-height":b.setting,"tianditu-token":c.tiandituToken,"initial-config":l.value,"onUpdate:visible":z[2]||(z[2]=J=>m.value=J)},null,8,["visible","full-height","tianditu-token","initial-config"]),n.showTree!==!1?(d.openBlock(),d.createBlock(Pi,d.mergeProps({key:0},{...u,...n.treeProps},{visible:f.value,"full-height":b.tree,"tree-data":w.value.length>0?w.value:n.treeProps?.treeData||[],"onUpdate:visible":z[3]||(z[3]=J=>{f.value=J})}),null,16,["visible","full-height","tree-data"])):d.createCommentVNode("",!0),d.createVNode(Av,{visible:I.value,"onUpdate:visible":z[4]||(z[4]=J=>I.value=J)},null,8,["visible"]),d.createVNode(Nv,{visible:S.value,"onUpdate:visible":z[5]||(z[5]=J=>S.value=J)},null,8,["visible"]),d.createVNode(Un,{visible:p.value,"full-height":b.section,"onUpdate:visible":z[6]||(z[6]=J=>p.value=J)},null,8,["visible","full-height"]),d.createVNode(_n,{visible:h.value,"full-height":b.roam,"onUpdate:visible":z[7]||(z[7]=J=>h.value=J)},null,8,["visible","full-height"]),d.createVNode(Nn,{visible:_.value,"active-ids":V.value,"custom-items":O.value,onAction:X,"is-2d":a.value==="2d"},null,8,["visible","active-ids","custom-items","is-2d"]),d.createVNode(gb,{visible:y.value,"current-model-id":N.value,"onUpdate:visible":z[8]||(z[8]=J=>y.value=J)},null,8,["visible","current-model-id"]),d.createVNode(lv,{ref_key:"cadPositionRef",ref:v,visible:E.value,"onUpdate:visible":z[9]||(z[9]=J=>E.value=J),onSave:oe},null,8,["visible"]),d.createVNode(Gv,{visible:d.unref(k),position:d.unref(B),items:d.unref(x),"onUpdate:visible":z[10]||(z[10]=J=>k.value=J)},null,8,["visible","position","items"]),d.renderSlot(Y.$slots,"default",d.normalizeProps(d.guardReactiveProps({methods:P.value,isReady:o.value})),void 0,!0)],512)],512)],34))}}),[["__scopeId","data-v-34761f82"]]);function gc(n){const e=d.ref(),t=d.ref(n.theme||"dark"),i=d.ref(n.menuSize||"medium");d.provide("leiting-theme",t),d.provide("leiting-menu-size",i);function s(l){d.onUnmounted(()=>{e.value=null}),l(n,e)}function o(){const l=d.unref(e);return l||console.error("未获取到leiting实例!"),l}const r=new Proxy({},{get(l,a){const c=o();if(!c)return;const u=c[a];return typeof u=="function"?u.bind(c):u},set(l,a,c){const u=o();return u?(u[a]=c,!0):!1}});return[s,r]}const Yv=xt,Vv={install:(n,e)=>{if(n.component("LeitingBIM",Qi),n.component("LeitingTree",Pi),n.component("LeitingDraggableCard",Fe),n.component("leiting-draggable-card",Fe),n.component("LeitingMenu",Nn),n.component("leiting-menu",Nn),n.component("LeitingSection",Un),n.component("leiting-section",Un),n.component("LeitingPlayer",_n),n.component("leiting-player",_n),n.component("LeitingInfo",Qn),n.component("leiting-info",Qn),n.component("LeitingPosition",Hn),n.component("leiting-position",Hn),n.component("LeitingSetting",Gn),n.component("leiting-setting",Gn),!e)return;const t={...Yv,...e};t.cesiumUrl&&ts(t).catch(i=>{console.error("[LeitingBim] Failed to load Cesium resources:",i)}),n.config.globalProperties.$leitingBimOptions=t}};var W={image:new Map,background:new Map,resource:new Map,defaultStyle:new Map,baseStyle:new Map,computedStyle:new WeakMap,font:new Set,session:{styleMap:new Map,styleCache:new WeakMap,nodeMap:new Map}};function mc(n="soft"){switch(n){case"auto":{W.session.styleMap=new Map,W.session.nodeMap=new Map;return}case"soft":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}case"full":return;case"disabled":{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap,W.computedStyle=new WeakMap,W.baseStyle=new Map,W.defaultStyle=new Map,W.image=new Map,W.background=new Map,W.resource=new Map,W.font=new Set;return}default:{W.session.styleMap=new Map,W.session.nodeMap=new Map,W.session.styleCache=new WeakMap;return}}}function ho(n){const e=n.match(/url\((['"]?)(.*?)(\1)\)/);if(!e)return null;const t=e[2].trim();return t.startsWith("#")?null:t}function Wv(n){if(!n||n==="none")return"";let e=n.replace(/translate[XY]?\([^)]*\)/g,"");return e=e.replace(/matrix\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==6?`matrix(${i})`:(s[4]="0",s[5]="0",`matrix(${s.join(", ")})`)}),e=e.replace(/matrix3d\(([^)]+)\)/g,(t,i)=>{const s=i.split(",").map(o=>o.trim());return s.length!==16?`matrix3d(${i})`:(s[12]="0",s[13]="0",`matrix3d(${s.join(", ")})`)}),e.trim().replace(/\s{2,}/g," ")}function Hi(n){if(/%[0-9A-Fa-f]{2}/.test(n))return n;try{return encodeURI(n)}catch{return n}}function zv(n="[snapDOM]",{ttlMs:e=5*6e4,maxEntries:t=12}={}){const i=new Map;let s=0;function o(r,l,a){if(s>=t)return;const c=Date.now();(i.get(l)||0)>c||(i.set(l,c+e),s++,r==="warn"&&console&&console.warn?console.warn(`${n} ${a}`):console&&console.error&&console.error(`${n} ${a}`))}return{warnOnce(r,l){o("warn",r,l)},errorOnce(r,l){o("error",r,l)},reset(){i.clear(),s=0}}}var Ac=zv("[snapDOM]",{ttlMs:3*6e4,maxEntries:10}),fo=new Map,Gi=new Map;function jv(n){return/^data:|^blob:|^about:blank$/i.test(n)}function $v(n,e){try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=e.includes("{url}")?e.split("{url}")[0]:e,s=new URL(i||".",t),o=new URL(n,t);if(o.origin===s.origin)return!0;const r=o.searchParams;if(r&&(r.has("url")||r.has("target")))return!0}catch{}return!1}function Kv(n,e){if(!e||jv(n)||$v(n,e))return!1;try{const t=typeof location<"u"&&location.href?location.href:"http://localhost/",i=new URL(n,t);return typeof location<"u"?i.origin!==location.origin:!0}catch{return!!e}}function qv(n,e){if(!e)return n;if(e.includes("{url}"))return e.replace("{urlRaw}",Hi(n)).replace("{url}",encodeURIComponent(n));if(/[?&]url=?$/.test(e))return`${e}${encodeURIComponent(n)}`;if(e.endsWith("?"))return`${e}url=${encodeURIComponent(n)}`;if(e.endsWith("/"))return`${e}${Hi(n)}`;const t=e.includes("?")?"&":"?";return`${e}${t}url=${encodeURIComponent(n)}`}function yc(n){return new Promise((e,t)=>{const i=new FileReader;i.onload=()=>e(String(i.result||"")),i.onerror=()=>t(new Error("read_failed")),i.readAsDataURL(n)})}function Xv(n,e){return[e.as||"blob",e.timeout??3e3,e.useProxy||"",e.errorTTL??8e3,n].join("|")}async function je(n,e={}){const t=e.as??"blob",i=e.timeout??3e3,s=e.useProxy||"",o=e.errorTTL??8e3,r=e.headers||{},l=!!e.silent;if(/^data:/i.test(n))try{if(t==="text")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1};if(t==="dataURL")return{ok:!0,data:String(n),status:200,url:n,fromCache:!1,mime:String(n).slice(5).split(";")[0]||""};const[,m="",y=""]=String(n).match(/^data:([^,]*),(.*)$/)||[],I=/;base64/i.test(m)?atob(y):decodeURIComponent(y),S=new Uint8Array([...I].map(B=>B.charCodeAt(0))),k=new Blob([S],{type:(m||"").split(";")[0]||""});return{ok:!0,data:k,status:200,url:n,fromCache:!1,mime:k.type||""}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"special_url_error"}}if(/^blob:/i.test(n))try{const m=await fetch(n);if(!m.ok)return{ok:!1,data:null,status:m.status,url:n,fromCache:!1,reason:"http_error"};const y=await m.blob(),E=y.type||m.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await yc(y),status:m.status,url:n,fromCache:!1,mime:E}:t==="text"?{ok:!0,data:await y.text(),status:m.status,url:n,fromCache:!1,mime:E}:{ok:!0,data:y,status:m.status,url:n,fromCache:!1,mime:E}}catch{return{ok:!1,data:null,status:0,url:n,fromCache:!1,reason:"network"}}if(/^about:blank$/i.test(n))return t==="dataURL"?{ok:!0,data:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR4nGMAAQAABQABDQottAAAAABJRU5ErkJggg==",status:200,url:n,fromCache:!1,mime:"image/png"}:{ok:!0,data:t==="text"?"":new Blob([]),status:200,url:n,fromCache:!1};const a=Xv(n,{as:t,timeout:i,useProxy:s,errorTTL:o}),c=Gi.get(a);if(c&&c.until>Date.now())return{...c.result,fromCache:!0};c&&Gi.delete(a);const u=fo.get(a);if(u)return u;const f=Kv(n,s)?qv(n,s):n;let p=e.credentials;if(!p)try{const m=typeof location<"u"&&location.href?location.href:"http://localhost/",y=new URL(n,m);p=typeof location<"u"&&y.origin===location.origin?"include":"omit"}catch{p="omit"}const h=new AbortController,A=setTimeout(()=>h.abort("timeout"),i),C=(async()=>{try{const m=await fetch(f,{signal:h.signal,credentials:p,headers:r});if(!m.ok){const I={ok:!1,data:null,status:m.status,url:f,fromCache:!1,reason:"http_error"};if(o>0&&Gi.set(a,{until:Date.now()+o,result:I}),!l){const S=`${m.status} ${m.statusText||""}`.trim();Ac.warnOnce(`http:${m.status}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,`HTTP error ${S} while fetching ${t} ${n}`)}return e.onError&&e.onError(I),I}if(t==="text")return{ok:!0,data:await m.text(),status:m.status,url:f,fromCache:!1};const y=await m.blob(),E=y.type||m.headers.get("content-type")||"";return t==="dataURL"?{ok:!0,data:await yc(y),status:m.status,url:f,fromCache:!1,mime:E}:{ok:!0,data:y,status:m.status,url:f,fromCache:!1,mime:E}}catch(m){const y=m&&typeof m=="object"&&"name"in m&&m.name==="AbortError"?String(m.message||"").includes("timeout")?"timeout":"abort":"network",E={ok:!1,data:null,status:0,url:f,fromCache:!1,reason:y};if(!/^blob:/i.test(n)&&o>0&&Gi.set(a,{until:Date.now()+o,result:E}),!l){const I=`${y}:${t}:${new URL(n,location?.href??"http://localhost/").origin}`,S=y==="timeout"?`Timeout after ${i}ms. Consider increasing timeout or using a proxy for ${n}`:y==="abort"?`Request aborted while fetching ${t} ${n}`:`Network/CORS issue while fetching ${t} ${n}. A proxy may be required`;Ac.errorOnce(I,S)}return e.onError&&e.onError(E),E}finally{clearTimeout(A),fo.delete(a)}})();return fo.set(a,C),C}function po(n,e){if(!e||!n.width||!n.height)return n;const t=document.createElement("canvas");t.width=n.width,t.height=n.height;const i=t.getContext("2d");return i.fillStyle=e,i.fillRect(0,0,t.width,t.height),i.drawImage(n,0,0),t}async function go(n,e={}){if(/^((repeating-)?(linear|radial|conic)-gradient)\(/i.test(n)||n.trim()==="none")return n;const i=ho(n);if(!i)return n;const s=Hi(i);if(W.background.has(s)){const o=W.background.get(s);return o?`url("${o}")`:"none"}try{const o=await je(s,{as:"dataURL",useProxy:e.useProxy});return o.ok?(W.background.set(s,o.data),`url("${o.data}")`):(W.background.set(s,null),"none")}catch{return W.background.set(s,null),"none"}}var Cc=new Set(["meta","script","noscript","title","link","template"]),Yi=new Set(["meta","link","style","title","noscript","script","template","g","defs","use","marker","mask","clipPath","pattern","path","polygon","polyline","line","circle","ellipse","rect","filter","lineargradient","radialgradient","stop"]),Jv=["div","span","p","a","img","ul","li","button","input","select","textarea","label","section","article","header","footer","nav","main","aside","h1","h2","h3","h4","h5","h6","table","thead","tbody","tr","td","th"];function Zv(){for(let n of Jv){const e=String(n).toLowerCase();Cc.has(e)||Yi.has(e)||Ec(e)}}function Ec(n){if(n=String(n).toLowerCase(),Yi.has(n)){const o={};return W.defaultStyle.set(n,o),o}if(W.defaultStyle.has(n))return W.defaultStyle.get(n);let e=document.getElementById("snapdom-sandbox");e||(e=document.createElement("div"),e.id="snapdom-sandbox",e.setAttribute("data-snapdom-sandbox","true"),e.setAttribute("aria-hidden","true"),e.style.position="absolute",e.style.left="-9999px",e.style.top="-9999px",e.style.width="0px",e.style.height="0px",e.style.overflow="hidden",document.body.appendChild(e));const t=document.createElement(n);t.style.all="initial",e.appendChild(t);const i=getComputedStyle(t),s={};for(let o of i){if(wc(o))continue;const r=i.getPropertyValue(o);s[o]=r}return e.removeChild(t),W.defaultStyle.set(n,s),s}var eI=/(?:^|-)(animation|transition)(?:-|$)/i,tI=/^(--|view-timeline|scroll-timeline|animation-trigger|offset-|position-try|app-region|interactivity|overlay|view-transition|-webkit-locale|-webkit-user-(?:drag|modify)|-webkit-tap-highlight-color|-webkit-text-security)$/i,nI=new Set(["cursor","pointer-events","touch-action","user-select","print-color-adjust","speak","reading-flow","reading-order","anchor-name","anchor-scope","container-name","container-type","timeline-scope"]);function wc(n){const e=String(n).toLowerCase();return!!(nI.has(e)||tI.test(e)||eI.test(e))}function mo(n,e){if(e=String(e||"").toLowerCase(),Yi.has(e))return"";const t=[],i=Ec(e);for(let[s,o]of Object.entries(n)){if(wc(s))continue;const r=i[s];o&&o!==r&&t.push(`${s}:${o}`)}return t.sort(),t.join(";")}function iI(n){const e=new Set;return n.nodeType!==Node.ELEMENT_NODE&&n.nodeType!==Node.DOCUMENT_FRAGMENT_NODE?[]:(n.tagName&&e.add(n.tagName.toLowerCase()),typeof n.querySelectorAll=="function"&&n.querySelectorAll("*").forEach(t=>e.add(t.tagName.toLowerCase())),Array.from(e))}function sI(n){const e=new Map;for(let i of n){const s=W.defaultStyle.get(i);if(!s)continue;const o=Object.entries(s).map(([r,l])=>`${r}:${l};`).sort().join("");o&&(e.has(o)||e.set(o,[]),e.get(o).push(i))}let t="";for(let[i,s]of e.entries())t+=`${s.join(",")} { ${i} }
|
|
119
119
|
`;return t}function oI(n){const e=Array.from(new Set(n.values())).filter(Boolean).sort(),t=new Map;let i=1;for(const s of e)t.set(s,`c${i++}`);return t}function Ao(n,e=null){if(!(n instanceof Element))return window.getComputedStyle(n,e);let t=W.computedStyle.get(n);if(t||(t=new Map,W.computedStyle.set(n,t)),!t.has(e)){const i=window.getComputedStyle(n,e);t.set(e,i)}return t.get(e)}function bc(n){const e={};for(let t of n)e[t]=n.getPropertyValue(t);return e}function yo(n){const e=[];let t=0,i=0;for(let s=0;s<n.length;s++){const o=n[s];o==="("&&t++,o===")"&&t--,o===","&&t===0&&(e.push(n.slice(i,s).trim()),i=s+1)}return e.push(n.slice(i).trim()),e}function cn(n,{fast:e=!1}={}){if(e)return n();"requestIdleCallback"in window?requestIdleCallback(n,{timeout:50}):setTimeout(n,1)}function it(){const n=typeof navigator<"u"&&navigator.userAgent?navigator.userAgent:"",e=/^((?!chrome|android).)*safari/i.test(n),t=/AppleWebKit/i.test(n)&&/Mobile/i.test(n)&&!/Safari/i.test(n),i=/(MicroMessenger|wxwork|WeCom|WindowsWechat|MacWechat)/i.test(n);return e||t||i}var vc=new WeakMap,Co=new Map,Eo=0;function Yn(){Eo++}var Ic=!1;function rI(n=document.documentElement){if(!Ic){Ic=!0;try{new MutationObserver(()=>Yn()).observe(n,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{new MutationObserver(()=>Yn()).observe(document.head,{subtree:!0,childList:!0,characterData:!0,attributes:!0})}catch{}try{const e=document.fonts;e&&(e.addEventListener?.("loadingdone",Yn),e.ready?.then(()=>Yn()).catch(()=>{}))}catch{}}}function aI(n,e={}){const t={},i=n.getPropertyValue("visibility");for(let s=0;s<n.length;s++){const o=n[s];let r=n.getPropertyValue(o);(o==="background-image"||o==="content")&&r.includes("url(")&&!r.includes("data:")&&(r="none"),t[o]=r}if(e.embedFonts){const s=["font-feature-settings","font-variation-settings","font-kerning","font-variant","font-variant-ligatures","font-optical-sizing"];for(const o of s)if(!t[o])try{const r=n.getPropertyValue(o);r&&(t[o]=r)}catch{}}return i==="hidden"&&(t.opacity="0"),t}var xc=new WeakMap;function lI(n){let e=xc.get(n);return e||(e=Object.entries(n).sort((i,s)=>i[0]<s[0]?-1:i[0]>s[0]?1:0).map(([i,s])=>`${i}:${s}`).join(";"),xc.set(n,e),e)}function cI(n,e=null,t={}){const i=vc.get(n);if(i&&i.epoch===Eo)return i.snapshot;const s=e||getComputedStyle(n),o=aI(s,t);return gI(n,s,o),vc.set(n,{epoch:Eo,snapshot:o}),o}function dI(n,e){return n&&n.session&&n.persist?n:n&&(n.styleMap||n.styleCache||n.nodeMap)?{session:n,persist:{snapshotKeyCache:Co,defaultStyle:W.defaultStyle,baseStyle:W.baseStyle,image:W.image,resource:W.resource,background:W.background,font:W.font},options:e||{}}:{session:W.session,persist:{snapshotKeyCache:Co,defaultStyle:W.defaultStyle,baseStyle:W.baseStyle,image:W.image,resource:W.resource,background:W.background,font:W.font},options:n||e||{}}}async function dn(n,e,t,i){if(n.tagName==="STYLE")return;const s=dI(t,i),o=s.options&&s.options.cache||"auto";if(o!=="disabled"&&rI(document.documentElement),o==="disabled"&&!s.session.__bumpedForDisabled&&(Yn(),Co.clear(),s.session.__bumpedForDisabled=!0),Yi.has(n.tagName?.toLowerCase())){const p=n.getAttribute?.("style");p&&e.setAttribute("style",p)}const{session:r,persist:l}=s;r.styleCache.has(n)||r.styleCache.set(n,getComputedStyle(n));const a=r.styleCache.get(n),c=cI(n,a,s.options),u=lI(c);let f=l.snapshotKeyCache.get(u);if(!f){const p=n.tagName?.toLowerCase()||"div";f=mo(c,p),l.snapshotKeyCache.set(u,f)}r.styleMap.set(e,f)}function uI(n){return n instanceof HTMLImageElement||n instanceof HTMLCanvasElement||n instanceof HTMLVideoElement||n instanceof HTMLIFrameElement||n instanceof SVGElement||n instanceof HTMLObjectElement||n instanceof HTMLEmbedElement}function hI(n){return n.backgroundImage&&n.backgroundImage!=="none"||n.backgroundColor&&n.backgroundColor!=="rgba(0, 0, 0, 0)"&&n.backgroundColor!=="transparent"||(parseFloat(n.borderTopWidth)||0)>0||(parseFloat(n.borderBottomWidth)||0)>0||(parseFloat(n.paddingTop)||0)>0||(parseFloat(n.paddingBottom)||0)>0?!0:(n.overflowBlock||n.overflowY||"visible")!=="visible"}function fI(n){const e=n.parentElement;if(!e)return!1;const t=getComputedStyle(e).display||"";return t.includes("flex")||t.includes("grid")}function pI(n,e){if(n.textContent&&/\S/.test(n.textContent))return!0;const t=n.firstElementChild,i=n.lastElementChild;if(t&&t.tagName==="BR"||i&&i.tagName==="BR")return!0;const s=n.scrollHeight;if(s===0)return!1;const o=parseFloat(e.paddingTop)||0,r=parseFloat(e.paddingBottom)||0;return s>o+r}function gI(n,e,t){if(n instanceof HTMLElement&&n.style&&n.style.height)return;const i=e.display||"";if(i.includes("flex")||i.includes("grid")||uI(n))return;const s=e.position;s==="absolute"||s==="fixed"||s==="sticky"||e.transform==="none"&&(hI(e)||fI(n)||pI(n,e)&&(delete t.height,delete t["block-size"]))}function mI(n,e){if(!(n instanceof Element)||!(e instanceof Element))return;const t=n.getAttribute?.("style");let i=!!(t&&t.includes("var("));if(!i&&n.attributes?.length){const r=n.attributes;for(let l=0;l<r.length;l++){const a=r[l];if(a&&typeof a.value=="string"&&a.value.includes("var(")){i=!0;break}}}if(!i)return;let s;try{s=getComputedStyle(n)}catch{return}const o=n.style;if(o&&o.length)for(let r=0;r<o.length;r++){const l=o[r],a=o.getPropertyValue(l);if(!a||!a.includes("var("))continue;const c=s.getPropertyValue(l);if(c)try{e.style.setProperty(l,c.trim(),o.getPropertyPriority(l))}catch{}}if(n.attributes?.length){const r=n.attributes;for(let l=0;l<r.length;l++){const a=r[l];if(!a||typeof a.value!="string"||!a.value.includes("var("))continue;const c=a.name;let u="";try{u=s.getPropertyValue(c)}catch{}if(u)try{e.style.setProperty(c,u.trim())}catch{}}}}function wo(n,e,t){return Promise.all(n.map(i=>new Promise(s=>{function o(){cn(r=>{(r&&typeof r.timeRemaining=="function"?r.timeRemaining()>0:!0)?e(i,s):o()},{fast:t})}o()})))}function AI(n){return n=n.trim(),!n||/:not\(\s*\[data-sd-slotted\]\s*\)\s*$/.test(n)?n:`${n}:not([data-sd-slotted])`}function yI(n,e,t=!0){return n.split(",").map(i=>i.trim()).filter(Boolean).map(i=>{if(i.startsWith(":where(")||i.startsWith("@"))return i;const s=t?AI(i):i;return`:where(${e} ${s})`}).join(", ")}function CI(n,e){return n?(n=n.replace(/:host\(([^)]+)\)/g,(t,i)=>`:where(${e}:is(${i.trim()}))`),n=n.replace(/:host\b/g,`:where(${e})`),n=n.replace(/:host-context\(([^)]+)\)/g,(t,i)=>`:where(:where(${i.trim()}) ${e})`),n=n.replace(/::slotted\(([^)]+)\)/g,(t,i)=>`:where(${e} ${i.trim()})`),n=n.replace(/(^|})(\s*)([^@}{]+){/g,(t,i,s,o)=>{const r=yI(o,e,!0);return`${i}${s}${r}{`}),n):""}function EI(n){return n.shadowScopeSeq=(n.shadowScopeSeq||0)+1,`s${n.shadowScopeSeq}`}function wI(n){let e="";try{n.querySelectorAll("style").forEach(i=>{e+=(i.textContent||"")+`
|
|
120
120
|
`});const t=n.adoptedStyleSheets||[];for(const i of t)try{if(i&&i.cssRules)for(const s of i.cssRules)e+=s.cssText+`
|
|
121
121
|
`}catch{}}catch{}return e}function bI(n,e,t){if(!e)return;const i=document.createElement("style");i.setAttribute("data-sd",t),i.textContent=e,n.insertBefore(i,n.firstChild||null)}function vI(n,e){try{const t=n.currentSrc||n.src||"";if(!t)return;e.setAttribute("src",t),e.removeAttribute("srcset"),e.removeAttribute("sizes"),e.loading="eager",e.decoding="sync"}catch{}}function II(n){const e=new Set;if(!n)return e;const t=/var\(\s*(--[A-Za-z0-9_-]+)\b/g;let i;for(;i=t.exec(n);)e.add(i[1]);return e}function xI(n,e){try{let i=getComputedStyle(n).getPropertyValue(e).trim();if(i)return i}catch{}try{let i=getComputedStyle(document.documentElement).getPropertyValue(e).trim();if(i)return i}catch{}return""}function BI(n,e,t){const i=[];for(const s of e){const o=xI(n,s);o&&i.push(`${s}: ${o};`)}return i.length?`${t}{${i.join("")}}
|