ss-component-new 1.1.365 → 1.1.366

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.
Files changed (81) hide show
  1. package/dist/{array-BR1CuqH1.cjs → array-B4OYH6uL.cjs} +1 -1
  2. package/dist/{array-BMOcJLlQ.js → array-EGWOD_Yi.js} +2 -2
  3. package/dist/{cloneDeep-i93zuvZy.cjs → cloneDeep-BPCav0OY.cjs} +1 -1
  4. package/dist/{cloneDeep-BIVk1Avp.js → cloneDeep-D3jWUY57.js} +1 -1
  5. package/dist/{index-CosRm822.cjs → index-1LyKu48J.cjs} +1 -1
  6. package/dist/{index-B6cdf15e.js → index-1mb-R5LL.js} +8 -8
  7. package/dist/{index-D-UqqKSL.cjs → index-9Kq2L6hA.cjs} +1 -1
  8. package/dist/{index-BkVzKWBf.cjs → index-B1KIGMDS.cjs} +1 -1
  9. package/dist/{index-HbUM4Vgp.js → index-B6D0Zmro.js} +4 -4
  10. package/dist/{index-B5sWzFXy.js → index-B7rnt0a7.js} +3 -3
  11. package/dist/{index-D-6gB2O2.cjs → index-B8PQq8Z4.cjs} +1 -1
  12. package/dist/{index-D46GYCSK.cjs → index-BBvGttI3.cjs} +1 -1
  13. package/dist/{index-B5LL1Rbm.cjs → index-BK34ZIUl.cjs} +1 -1
  14. package/dist/{index-DVSMYX5e.js → index-BPLD6fuH.js} +8 -8
  15. package/dist/{index-CXr-J9N3.js → index-BQQE4RO9.js} +4 -4
  16. package/dist/{index-DVe1W-nQ.js → index-BSd6lCCf.js} +3 -3
  17. package/dist/{index-7ctK7qh8.js → index-BWoxDyyu.js} +1 -1
  18. package/dist/{index-DDyeBnmq.cjs → index-BXO1mk6t.cjs} +1 -1
  19. package/dist/{index-C8VFIq2w.js → index-Bo8sDOPU.js} +4 -4
  20. package/dist/{index-Bw-50_9N.cjs → index-BovJtyyV.cjs} +1 -1
  21. package/dist/{index-DpvXSrAU.js → index-Bxt_jC-e.js} +3 -3
  22. package/dist/{index-By9h_JX7.cjs → index-C67VR66n.cjs} +1 -1
  23. package/dist/{index-BR4RIzFI.cjs → index-CAfIBffc.cjs} +1 -1
  24. package/dist/{index-BuFwRc5V.cjs → index-CEVLI-tF.cjs} +1 -1
  25. package/dist/{index-BVt5BXIs.js → index-CMza6E0Y.js} +6 -6
  26. package/dist/{index-D_mKafea.cjs → index-CN73stto.cjs} +1 -1
  27. package/dist/{index-DvJSn5c_.js → index-CTASWvkf.js} +9 -9
  28. package/dist/{index-CXroj-hH.js → index-C_zK0qeZ.js} +3 -3
  29. package/dist/{index-D2WirvcT.js → index-Cal7dRFc.js} +1 -1
  30. package/dist/{index-CGav2orm.cjs → index-Cd0GOTJL.cjs} +1 -1
  31. package/dist/{index-Liysmasz.cjs → index-CdrtM6Jl.cjs} +1 -1
  32. package/dist/{index-Bxdkas6q.cjs → index-Cj9Wq_7v.cjs} +1 -1
  33. package/dist/{index-DCi5rJxX.js → index-CkgqQw5c.js} +4 -4
  34. package/dist/{index-Cf4LaEvb.js → index-Cks4xBFc.js} +7 -7
  35. package/dist/{index-D1xMSVGc.cjs → index-Cnigg-Vb.cjs} +1 -1
  36. package/dist/{index-7eQ2JKtq.cjs → index-CylVtJFa.cjs} +1 -1
  37. package/dist/{index-DeIxnrMK.js → index-D0Xtu3c5.js} +4 -4
  38. package/dist/{index-BNSImW55.js → index-DPoMcIHZ.js} +7 -7
  39. package/dist/{index-CFr2asVq.js → index-DQXp-tQk.js} +1 -1
  40. package/dist/{index-e6bojFY6.js → index-DQewAWSX.js} +5 -5
  41. package/dist/{index-DQS588Nv.js → index-DXu2C7E2.js} +1 -1
  42. package/dist/{index-d_t0t8ds.cjs → index-D_80-VnL.cjs} +1 -1
  43. package/dist/{index-CLaegHPh.js → index-DgdlwjkF.js} +5 -5
  44. package/dist/{index-DfEwhscQ.cjs → index-Dj7KpYhE.cjs} +1 -1
  45. package/dist/{index-DgZJe2BL.js → index-DjI83upr.js} +6 -6
  46. package/dist/index-Dp7ftR-s.cjs +1 -0
  47. package/dist/{index-C-zpQcU-.js → index-Dq0BnanX.js} +6 -6
  48. package/dist/{index-Do2_N1IZ.js → index-DsSqH7Ku.js} +5 -5
  49. package/dist/{index-DGrvsPOn.js → index-DxeIJqcl.js} +1 -1
  50. package/dist/{index-CIXaYro4.js → index-Dy0Bjmrr.js} +887 -886
  51. package/dist/{index-ZErXROGI.cjs → index-EgiRVqNe.cjs} +1 -1
  52. package/dist/{index-Drg-hTZ2.cjs → index-FipljzbJ.cjs} +1 -1
  53. package/dist/{index-DkG-ziRw.cjs → index-FnUvbwkl.cjs} +1 -1
  54. package/dist/{index-DgM9f4pH.js → index-KKYTpn-0.js} +4 -4
  55. package/dist/{index-CHqoZp_W.cjs → index-Xd0gl2O5.cjs} +1 -1
  56. package/dist/{index-DLy3AyLn.cjs → index-h3vgrWAC.cjs} +1 -1
  57. package/dist/{index-DeAeTFEl.cjs → index-qWPIXtmB.cjs} +1 -1
  58. package/dist/{index-5H8g05lu.cjs → index-r4-byc3l.cjs} +1 -1
  59. package/dist/{index.vue_vue_type_script_setup_true_lang-DS1GFsZZ.js → index.vue_vue_type_script_setup_true_lang-CE6ciJHv.js} +1 -1
  60. package/dist/{index.vue_vue_type_script_setup_true_lang-CurEafxj.cjs → index.vue_vue_type_script_setup_true_lang-CEx7p4se.cjs} +1 -1
  61. package/dist/{index.vue_vue_type_style_index_0_scoped_14b5611b_lang-CXxX24vv.js → index.vue_vue_type_style_index_0_scoped_23015cb0_lang-BfO2BZm9.js} +13 -13
  62. package/dist/{index.vue_vue_type_style_index_0_scoped_14b5611b_lang-D0J4hoHm.cjs → index.vue_vue_type_style_index_0_scoped_23015cb0_lang-_1kiYpwh.cjs} +1 -1
  63. package/dist/{index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-QAtWUHCn.cjs → index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-BX_0yNEO.cjs} +1 -1
  64. package/dist/{index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-B5SaBlFy.js → index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-CpZkvXyX.js} +8 -8
  65. package/dist/{login-Y1fP6Ekv.js → login-DKf6sQrA.js} +2 -2
  66. package/dist/{login-CHBoEXBJ.cjs → login-cDG_pssN.cjs} +1 -1
  67. package/dist/{main-C84t8-AX.cjs → main-BY1dJ_uK.cjs} +1 -1
  68. package/dist/{main-BMNN7nF3.js → main-DnQRFkkz.js} +7 -7
  69. package/dist/{menu-CVbEPCMJ.cjs → menu-Bi2msF1Z.cjs} +1 -1
  70. package/dist/{menu-CvfQY_jP.js → menu-eau-OVSc.js} +1 -1
  71. package/dist/obj/model.mtl +42 -0
  72. package/dist/obj/model.obj +26110 -0
  73. package/dist/ss-component.cjs +1 -1
  74. package/dist/ss-component.css +1 -1
  75. package/dist/ss-component.js +7 -7
  76. package/dist/ss-component3.cjs +1 -1
  77. package/dist/ss-component3.js +1 -1
  78. package/package.json +1 -1
  79. package/public/obj/model.mtl +42 -0
  80. package/public/obj/model.obj +26110 -0
  81. package/dist/index-C6kn9X1y.cjs +0 -1
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),Be=require("./index-D1xMSVGc.cjs"),We=require("./index-Drg-hTZ2.cjs"),A=require("./index.vue_vue_type_style_index_0_scoped_14b5611b_lang-D0J4hoHm.cjs"),Ne=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),B=require("./menu-CVbEPCMJ.cjs"),st=require("./login-CHBoEXBJ.cjs"),Ee=require("./index-BpPyaNFa.cjs"),a=require("./index-DfEwhscQ.cjs"),ke=require("./index-Bw-50_9N.cjs"),$e=require("./index-BR4RIzFI.cjs"),lt=require("./index-CHqoZp_W.cjs"),Ie=require("./cloneDeep-i93zuvZy.cjs"),ut=require("./index-Bxdkas6q.cjs"),ot=require("./index-5H8g05lu.cjs"),Fe=require("./array-BR1CuqH1.cjs"),nt=require("./index.vue_vue_type_style_index_0_scoped_3a02a8a3_lang-QAtWUHCn.cjs"),ht={class:"tree-container"},pt=e.defineComponent({__name:"index",props:{treeData:Array,expand:{type:Boolean,default:!1}},emits:["nodeClick"],setup(i,{emit:t}){const o=t,n=i,d={children:"children",label:"label"},s=r=>{o("nodeClick",r)};return(r,l)=>{const c=e.resolveComponent("el-tree");return e.openBlock(),e.createElementBlock("div",ht,[e.createVNode(c,{data:n==null?void 0:n.treeData,props:d,"default-expand-all":i.expand,onNodeClick:s},null,8,["data","default-expand-all"])])}}}),mt=Ne._export_sfc(pt,[["__scopeId","data-v-b4bd4658"]]),ft={class:"client-robot-side"},_t=e.defineComponent({__name:"robotMenu",props:{model:Object},setup(i){const t=i,o=e.ref(0),n=e.ref([]),d=r=>{let l=[];return Array.isArray(r)&&(r==null?void 0:r.length)>0&&(o.value++,r.forEach(c=>{!(c!=null&&c.isMesh)&&((c==null?void 0:c.type)==="URDFJoint"||(c==null?void 0:c.type)==="URDFLink")&&l.push({name:c==null?void 0:c.name,label:c==null?void 0:c.name,show:!0,level:o.value,isPenultimate:!1,type:c==null?void 0:c.type,id:c==null?void 0:c.id,limit:(c==null?void 0:c.limit)??"",children:d(c==null?void 0:c.children),path:c==null?void 0:c.name})})),l},s=r=>{let l=[];return o.value++,l.push({name:r==null?void 0:r.name,label:r==null?void 0:r.name,show:!0,level:o.value,isPenultimate:!1,type:r==null?void 0:r.type,id:r==null?void 0:r.id,limit:(r==null?void 0:r.limit)??"",children:d(r==null?void 0:r.children),path:r==null?void 0:r.name}),l};return e.watch(()=>t==null?void 0:t.model,()=>{t!=null&&t.model&&(n.value=s(t==null?void 0:t.model))},{deep:!0,immediate:!0}),(r,l)=>(e.openBlock(),e.createElementBlock("div",ft,[e.createVNode(mt,{treeData:n.value,expand:!0},null,8,["treeData"])]))}}),gt=Ne._export_sfc(_t,[["__scopeId","data-v-0411c59a"]]),at={type:"change"},tt={type:"start"},rt={type:"end"},Xe=new a.Ray,it=new a.Plane,yt=Math.cos(70*a.MathUtils.DEG2RAD),re=new a.Vector3,we=2*Math.PI,I={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6},et=1e-6;class wt extends a.Controls{constructor(t,o=null){super(t,o),this.state=I.NONE,this.target=new a.Vector3,this.cursor=new a.Vector3,this.minDistance=0,this.maxDistance=1/0,this.minZoom=0,this.maxZoom=1/0,this.minTargetRadius=0,this.maxTargetRadius=1/0,this.minPolarAngle=0,this.maxPolarAngle=Math.PI,this.minAzimuthAngle=-1/0,this.maxAzimuthAngle=1/0,this.enableDamping=!1,this.dampingFactor=.05,this.enableZoom=!0,this.zoomSpeed=1,this.enableRotate=!0,this.rotateSpeed=1,this.keyRotateSpeed=1,this.enablePan=!0,this.panSpeed=1,this.screenSpacePanning=!0,this.keyPanSpeed=7,this.zoomToCursor=!1,this.autoRotate=!1,this.autoRotateSpeed=2,this.keys={LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"},this.mouseButtons={LEFT:a.MOUSE.ROTATE,MIDDLE:a.MOUSE.DOLLY,RIGHT:a.MOUSE.PAN},this.touches={ONE:a.TOUCH.ROTATE,TWO:a.TOUCH.DOLLY_PAN},this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this._domElementKeyEvents=null,this._lastPosition=new a.Vector3,this._lastQuaternion=new a.Quaternion,this._lastTargetPosition=new a.Vector3,this._quat=new a.Quaternion().setFromUnitVectors(t.up,new a.Vector3(0,1,0)),this._quatInverse=this._quat.clone().invert(),this._spherical=new a.Spherical,this._sphericalDelta=new a.Spherical,this._scale=1,this._panOffset=new a.Vector3,this._rotateStart=new a.Vector2,this._rotateEnd=new a.Vector2,this._rotateDelta=new a.Vector2,this._panStart=new a.Vector2,this._panEnd=new a.Vector2,this._panDelta=new a.Vector2,this._dollyStart=new a.Vector2,this._dollyEnd=new a.Vector2,this._dollyDelta=new a.Vector2,this._dollyDirection=new a.Vector3,this._mouse=new a.Vector2,this._performCursorZoom=!1,this._pointers=[],this._pointerPositions={},this._controlActive=!1,this._onPointerMove=vt.bind(this),this._onPointerDown=Ct.bind(this),this._onPointerUp=bt.bind(this),this._onContextMenu=Nt.bind(this),this._onMouseWheel=Et.bind(this),this._onKeyDown=Tt.bind(this),this._onTouchStart=Vt.bind(this),this._onTouchMove=Bt.bind(this),this._onMouseDown=kt.bind(this),this._onMouseMove=xt.bind(this),this._interceptControlDown=Pt.bind(this),this._interceptControlUp=St.bind(this),this.domElement!==null&&this.connect(this.domElement),this.update()}connect(t){super.connect(t),this.domElement.addEventListener("pointerdown",this._onPointerDown),this.domElement.addEventListener("pointercancel",this._onPointerUp),this.domElement.addEventListener("contextmenu",this._onContextMenu),this.domElement.addEventListener("wheel",this._onMouseWheel,{passive:!1}),this.domElement.getRootNode().addEventListener("keydown",this._interceptControlDown,{passive:!0,capture:!0}),this.domElement.style.touchAction="none"}disconnect(){this.domElement.removeEventListener("pointerdown",this._onPointerDown),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.domElement.removeEventListener("pointercancel",this._onPointerUp),this.domElement.removeEventListener("wheel",this._onMouseWheel),this.domElement.removeEventListener("contextmenu",this._onContextMenu),this.stopListenToKeyEvents(),this.domElement.getRootNode().removeEventListener("keydown",this._interceptControlDown,{capture:!0}),this.domElement.style.touchAction="auto"}dispose(){this.disconnect()}getPolarAngle(){return this._spherical.phi}getAzimuthalAngle(){return this._spherical.theta}getDistance(){return this.object.position.distanceTo(this.target)}listenToKeyEvents(t){t.addEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=t}stopListenToKeyEvents(){this._domElementKeyEvents!==null&&(this._domElementKeyEvents.removeEventListener("keydown",this._onKeyDown),this._domElementKeyEvents=null)}saveState(){this.target0.copy(this.target),this.position0.copy(this.object.position),this.zoom0=this.object.zoom}reset(){this.target.copy(this.target0),this.object.position.copy(this.position0),this.object.zoom=this.zoom0,this.object.updateProjectionMatrix(),this.dispatchEvent(at),this.update(),this.state=I.NONE}update(t=null){const o=this.object.position;re.copy(o).sub(this.target),re.applyQuaternion(this._quat),this._spherical.setFromVector3(re),this.autoRotate&&this.state===I.NONE&&this._rotateLeft(this._getAutoRotationAngle(t)),this.enableDamping?(this._spherical.theta+=this._sphericalDelta.theta*this.dampingFactor,this._spherical.phi+=this._sphericalDelta.phi*this.dampingFactor):(this._spherical.theta+=this._sphericalDelta.theta,this._spherical.phi+=this._sphericalDelta.phi);let n=this.minAzimuthAngle,d=this.maxAzimuthAngle;isFinite(n)&&isFinite(d)&&(n<-Math.PI?n+=we:n>Math.PI&&(n-=we),d<-Math.PI?d+=we:d>Math.PI&&(d-=we),n<=d?this._spherical.theta=Math.max(n,Math.min(d,this._spherical.theta)):this._spherical.theta=this._spherical.theta>(n+d)/2?Math.max(n,this._spherical.theta):Math.min(d,this._spherical.theta)),this._spherical.phi=Math.max(this.minPolarAngle,Math.min(this.maxPolarAngle,this._spherical.phi)),this._spherical.makeSafe(),this.enableDamping===!0?this.target.addScaledVector(this._panOffset,this.dampingFactor):this.target.add(this._panOffset),this.target.sub(this.cursor),this.target.clampLength(this.minTargetRadius,this.maxTargetRadius),this.target.add(this.cursor);let s=!1;if(this.zoomToCursor&&this._performCursorZoom||this.object.isOrthographicCamera)this._spherical.radius=this._clampDistance(this._spherical.radius);else{const r=this._spherical.radius;this._spherical.radius=this._clampDistance(this._spherical.radius*this._scale),s=r!=this._spherical.radius}if(re.setFromSpherical(this._spherical),re.applyQuaternion(this._quatInverse),o.copy(this.target).add(re),this.object.lookAt(this.target),this.enableDamping===!0?(this._sphericalDelta.theta*=1-this.dampingFactor,this._sphericalDelta.phi*=1-this.dampingFactor,this._panOffset.multiplyScalar(1-this.dampingFactor)):(this._sphericalDelta.set(0,0,0),this._panOffset.set(0,0,0)),this.zoomToCursor&&this._performCursorZoom){let r=null;if(this.object.isPerspectiveCamera){const l=re.length();r=this._clampDistance(l*this._scale);const c=l-r;this.object.position.addScaledVector(this._dollyDirection,c),this.object.updateMatrixWorld(),s=!!c}else if(this.object.isOrthographicCamera){const l=new a.Vector3(this._mouse.x,this._mouse.y,0);l.unproject(this.object);const c=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),this.object.updateProjectionMatrix(),s=c!==this.object.zoom;const v=new a.Vector3(this._mouse.x,this._mouse.y,0);v.unproject(this.object),this.object.position.sub(v).add(l),this.object.updateMatrixWorld(),r=re.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),this.zoomToCursor=!1;r!==null&&(this.screenSpacePanning?this.target.set(0,0,-1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position):(Xe.origin.copy(this.object.position),Xe.direction.set(0,0,-1).transformDirection(this.object.matrix),Math.abs(this.object.up.dot(Xe.direction))<yt?this.object.lookAt(this.target):(it.setFromNormalAndCoplanarPoint(this.object.up,this.target),Xe.intersectPlane(it,this.target))))}else if(this.object.isOrthographicCamera){const r=this.object.zoom;this.object.zoom=Math.max(this.minZoom,Math.min(this.maxZoom,this.object.zoom/this._scale)),r!==this.object.zoom&&(this.object.updateProjectionMatrix(),s=!0)}return this._scale=1,this._performCursorZoom=!1,s||this._lastPosition.distanceToSquared(this.object.position)>et||8*(1-this._lastQuaternion.dot(this.object.quaternion))>et||this._lastTargetPosition.distanceToSquared(this.target)>et?(this.dispatchEvent(at),this._lastPosition.copy(this.object.position),this._lastQuaternion.copy(this.object.quaternion),this._lastTargetPosition.copy(this.target),!0):!1}_getAutoRotationAngle(t){return t!==null?we/60*this.autoRotateSpeed*t:we/60/60*this.autoRotateSpeed}_getZoomScale(t){const o=Math.abs(t*.01);return Math.pow(.95,this.zoomSpeed*o)}_rotateLeft(t){this._sphericalDelta.theta-=t}_rotateUp(t){this._sphericalDelta.phi-=t}_panLeft(t,o){re.setFromMatrixColumn(o,0),re.multiplyScalar(-t),this._panOffset.add(re)}_panUp(t,o){this.screenSpacePanning===!0?re.setFromMatrixColumn(o,1):(re.setFromMatrixColumn(o,0),re.crossVectors(this.object.up,re)),re.multiplyScalar(t),this._panOffset.add(re)}_pan(t,o){const n=this.domElement;if(this.object.isPerspectiveCamera){const d=this.object.position;re.copy(d).sub(this.target);let s=re.length();s*=Math.tan(this.object.fov/2*Math.PI/180),this._panLeft(2*t*s/n.clientHeight,this.object.matrix),this._panUp(2*o*s/n.clientHeight,this.object.matrix)}else this.object.isOrthographicCamera?(this._panLeft(t*(this.object.right-this.object.left)/this.object.zoom/n.clientWidth,this.object.matrix),this._panUp(o*(this.object.top-this.object.bottom)/this.object.zoom/n.clientHeight,this.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),this.enablePan=!1)}_dollyOut(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale/=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_dollyIn(t){this.object.isPerspectiveCamera||this.object.isOrthographicCamera?this._scale*=t:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),this.enableZoom=!1)}_updateZoomParameters(t,o){if(!this.zoomToCursor)return;this._performCursorZoom=!0;const n=this.domElement.getBoundingClientRect(),d=t-n.left,s=o-n.top,r=n.width,l=n.height;this._mouse.x=d/r*2-1,this._mouse.y=-(s/l)*2+1,this._dollyDirection.set(this._mouse.x,this._mouse.y,1).unproject(this.object).sub(this.object.position).normalize()}_clampDistance(t){return Math.max(this.minDistance,Math.min(this.maxDistance,t))}_handleMouseDownRotate(t){this._rotateStart.set(t.clientX,t.clientY)}_handleMouseDownDolly(t){this._updateZoomParameters(t.clientX,t.clientX),this._dollyStart.set(t.clientX,t.clientY)}_handleMouseDownPan(t){this._panStart.set(t.clientX,t.clientY)}_handleMouseMoveRotate(t){this._rotateEnd.set(t.clientX,t.clientY),this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(we*this._rotateDelta.x/o.clientHeight),this._rotateUp(we*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd),this.update()}_handleMouseMoveDolly(t){this._dollyEnd.set(t.clientX,t.clientY),this._dollyDelta.subVectors(this._dollyEnd,this._dollyStart),this._dollyDelta.y>0?this._dollyOut(this._getZoomScale(this._dollyDelta.y)):this._dollyDelta.y<0&&this._dollyIn(this._getZoomScale(this._dollyDelta.y)),this._dollyStart.copy(this._dollyEnd),this.update()}_handleMouseMovePan(t){this._panEnd.set(t.clientX,t.clientY),this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd),this.update()}_handleMouseWheel(t){this._updateZoomParameters(t.clientX,t.clientY),t.deltaY<0?this._dollyIn(this._getZoomScale(t.deltaY)):t.deltaY>0&&this._dollyOut(this._getZoomScale(t.deltaY)),this.update()}_handleKeyDown(t){let o=!1;switch(t.code){case this.keys.UP:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(we*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,this.keyPanSpeed),o=!0;break;case this.keys.BOTTOM:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateUp(-we*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(0,-this.keyPanSpeed),o=!0;break;case this.keys.LEFT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(we*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(this.keyPanSpeed,0),o=!0;break;case this.keys.RIGHT:t.ctrlKey||t.metaKey||t.shiftKey?this.enableRotate&&this._rotateLeft(-we*this.keyRotateSpeed/this.domElement.clientHeight):this.enablePan&&this._pan(-this.keyPanSpeed,0),o=!0;break}o&&(t.preventDefault(),this.update())}_handleTouchStartRotate(t){if(this._pointers.length===1)this._rotateStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),d=.5*(t.pageY+o.y);this._rotateStart.set(n,d)}}_handleTouchStartPan(t){if(this._pointers.length===1)this._panStart.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),d=.5*(t.pageY+o.y);this._panStart.set(n,d)}}_handleTouchStartDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,d=t.pageY-o.y,s=Math.sqrt(n*n+d*d);this._dollyStart.set(0,s)}_handleTouchStartDollyPan(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enablePan&&this._handleTouchStartPan(t)}_handleTouchStartDollyRotate(t){this.enableZoom&&this._handleTouchStartDolly(t),this.enableRotate&&this._handleTouchStartRotate(t)}_handleTouchMoveRotate(t){if(this._pointers.length==1)this._rotateEnd.set(t.pageX,t.pageY);else{const n=this._getSecondPointerPosition(t),d=.5*(t.pageX+n.x),s=.5*(t.pageY+n.y);this._rotateEnd.set(d,s)}this._rotateDelta.subVectors(this._rotateEnd,this._rotateStart).multiplyScalar(this.rotateSpeed);const o=this.domElement;this._rotateLeft(we*this._rotateDelta.x/o.clientHeight),this._rotateUp(we*this._rotateDelta.y/o.clientHeight),this._rotateStart.copy(this._rotateEnd)}_handleTouchMovePan(t){if(this._pointers.length===1)this._panEnd.set(t.pageX,t.pageY);else{const o=this._getSecondPointerPosition(t),n=.5*(t.pageX+o.x),d=.5*(t.pageY+o.y);this._panEnd.set(n,d)}this._panDelta.subVectors(this._panEnd,this._panStart).multiplyScalar(this.panSpeed),this._pan(this._panDelta.x,this._panDelta.y),this._panStart.copy(this._panEnd)}_handleTouchMoveDolly(t){const o=this._getSecondPointerPosition(t),n=t.pageX-o.x,d=t.pageY-o.y,s=Math.sqrt(n*n+d*d);this._dollyEnd.set(0,s),this._dollyDelta.set(0,Math.pow(this._dollyEnd.y/this._dollyStart.y,this.zoomSpeed)),this._dollyOut(this._dollyDelta.y),this._dollyStart.copy(this._dollyEnd);const r=(t.pageX+o.x)*.5,l=(t.pageY+o.y)*.5;this._updateZoomParameters(r,l)}_handleTouchMoveDollyPan(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enablePan&&this._handleTouchMovePan(t)}_handleTouchMoveDollyRotate(t){this.enableZoom&&this._handleTouchMoveDolly(t),this.enableRotate&&this._handleTouchMoveRotate(t)}_addPointer(t){this._pointers.push(t.pointerId)}_removePointer(t){delete this._pointerPositions[t.pointerId];for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId){this._pointers.splice(o,1);return}}_isTrackingPointer(t){for(let o=0;o<this._pointers.length;o++)if(this._pointers[o]==t.pointerId)return!0;return!1}_trackPointer(t){let o=this._pointerPositions[t.pointerId];o===void 0&&(o=new a.Vector2,this._pointerPositions[t.pointerId]=o),o.set(t.pageX,t.pageY)}_getSecondPointerPosition(t){const o=t.pointerId===this._pointers[0]?this._pointers[1]:this._pointers[0];return this._pointerPositions[o]}_customWheelEvent(t){const o=t.deltaMode,n={clientX:t.clientX,clientY:t.clientY,deltaY:t.deltaY};switch(o){case 1:n.deltaY*=16;break;case 2:n.deltaY*=100;break}return t.ctrlKey&&!this._controlActive&&(n.deltaY*=10),n}}function Ct(i){this.enabled!==!1&&(this._pointers.length===0&&(this.domElement.setPointerCapture(i.pointerId),this.domElement.addEventListener("pointermove",this._onPointerMove),this.domElement.addEventListener("pointerup",this._onPointerUp)),!this._isTrackingPointer(i)&&(this._addPointer(i),i.pointerType==="touch"?this._onTouchStart(i):this._onMouseDown(i)))}function vt(i){this.enabled!==!1&&(i.pointerType==="touch"?this._onTouchMove(i):this._onMouseMove(i))}function bt(i){switch(this._removePointer(i),this._pointers.length){case 0:this.domElement.releasePointerCapture(i.pointerId),this.domElement.removeEventListener("pointermove",this._onPointerMove),this.domElement.removeEventListener("pointerup",this._onPointerUp),this.dispatchEvent(rt),this.state=I.NONE;break;case 1:const t=this._pointers[0],o=this._pointerPositions[t];this._onTouchStart({pointerId:t,pageX:o.x,pageY:o.y});break}}function kt(i){let t;switch(i.button){case 0:t=this.mouseButtons.LEFT;break;case 1:t=this.mouseButtons.MIDDLE;break;case 2:t=this.mouseButtons.RIGHT;break;default:t=-1}switch(t){case a.MOUSE.DOLLY:if(this.enableZoom===!1)return;this._handleMouseDownDolly(i),this.state=I.DOLLY;break;case a.MOUSE.ROTATE:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=I.PAN}else{if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=I.ROTATE}break;case a.MOUSE.PAN:if(i.ctrlKey||i.metaKey||i.shiftKey){if(this.enableRotate===!1)return;this._handleMouseDownRotate(i),this.state=I.ROTATE}else{if(this.enablePan===!1)return;this._handleMouseDownPan(i),this.state=I.PAN}break;default:this.state=I.NONE}this.state!==I.NONE&&this.dispatchEvent(tt)}function xt(i){switch(this.state){case I.ROTATE:if(this.enableRotate===!1)return;this._handleMouseMoveRotate(i);break;case I.DOLLY:if(this.enableZoom===!1)return;this._handleMouseMoveDolly(i);break;case I.PAN:if(this.enablePan===!1)return;this._handleMouseMovePan(i);break}}function Et(i){this.enabled===!1||this.enableZoom===!1||this.state!==I.NONE||(i.preventDefault(),this.dispatchEvent(tt),this._handleMouseWheel(this._customWheelEvent(i)),this.dispatchEvent(rt))}function Tt(i){this.enabled!==!1&&this._handleKeyDown(i)}function Vt(i){switch(this._trackPointer(i),this._pointers.length){case 1:switch(this.touches.ONE){case a.TOUCH.ROTATE:if(this.enableRotate===!1)return;this._handleTouchStartRotate(i),this.state=I.TOUCH_ROTATE;break;case a.TOUCH.PAN:if(this.enablePan===!1)return;this._handleTouchStartPan(i),this.state=I.TOUCH_PAN;break;default:this.state=I.NONE}break;case 2:switch(this.touches.TWO){case a.TOUCH.DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchStartDollyPan(i),this.state=I.TOUCH_DOLLY_PAN;break;case a.TOUCH.DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchStartDollyRotate(i),this.state=I.TOUCH_DOLLY_ROTATE;break;default:this.state=I.NONE}break;default:this.state=I.NONE}this.state!==I.NONE&&this.dispatchEvent(tt)}function Bt(i){switch(this._trackPointer(i),this.state){case I.TOUCH_ROTATE:if(this.enableRotate===!1)return;this._handleTouchMoveRotate(i),this.update();break;case I.TOUCH_PAN:if(this.enablePan===!1)return;this._handleTouchMovePan(i),this.update();break;case I.TOUCH_DOLLY_PAN:if(this.enableZoom===!1&&this.enablePan===!1)return;this._handleTouchMoveDollyPan(i),this.update();break;case I.TOUCH_DOLLY_ROTATE:if(this.enableZoom===!1&&this.enableRotate===!1)return;this._handleTouchMoveDollyRotate(i),this.update();break;default:this.state=I.NONE}}function Nt(i){this.enabled!==!1&&i.preventDefault()}function Pt(i){i.key==="Control"&&(this._controlActive=!0,this.domElement.getRootNode().addEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function St(i){i.key==="Control"&&(this._controlActive=!1,this.domElement.getRootNode().removeEventListener("keyup",this._interceptControlUp,{passive:!0,capture:!0}))}function Mt(i){let t=null,o=null,n=null,d=null,s=null,r=null;const l=e.ref([]),c=e.ref(new a.Vector3),v=e.ref(new a.Vector3),L=()=>{if(!i.value)return;t=new a.Scene,t.background=new a.Color(15790320);const _=i.value;o=new a.PerspectiveCamera(75,_.clientWidth/_.clientHeight,.1,1e4),n=new a.WebGLRenderer({antialias:!0,alpha:!0}),n.setSize(_.clientWidth,_.clientHeight),n.localClippingEnabled=!0,n.shadowMap.enabled=!0,n.shadowMap.type=a.PCFSoftShadowMap,n.toneMapping=a.ACESFilmicToneMapping,n.toneMappingExposure=1,n.outputColorSpace=a.SRGBColorSpace,_.appendChild(n.domElement),d=new wt(o,n.domElement),d.enableDamping=!0,d.dampingFactor=.05,s=new a.Xe(o,n,{container:_,type:"cube",placement:"bottom-left",offset:{left:350,bottom:22},background:{color:"#D1D1D1"}}),s.attachControls(d),X(),Q()},X=()=>{const _=new a.AmbientLight(4210752,.6);t.add(_);const g=new a.DirectionalLight(16777215,2);g.position.set(10,10,8),g.castShadow=!0,g.shadow.mapSize.width=2048,g.shadow.mapSize.height=2048,g.shadow.camera.near=.5,g.shadow.camera.far=50,t.add(g);const p=new a.DirectionalLight(16777215,.8);p.position.set(-8,-8,6),t.add(p);const T=new a.DirectionalLight(16777215,.6);T.position.set(0,-15,2),t.add(T);const U=new a.HemisphereLight(16777215,4473924,.8);t.add(U);const M=new a.PointLight(16777215,1,50);M.position.set(15,15,15),t.add(M);const q=new a.PointLight(16777215,.5,50);q.position.set(-15,-15,15),t.add(q)},Q=()=>{r=requestAnimationFrame(Q),d&&d.update(),n&&t&&o&&n.render(t,o),s&&s.render()},W=_=>{["map","normalMap","bumpMap","roughnessMap","metalnessMap","emissiveMap","specularMap","envMap","lightMap","aoMap","displacementMap"].forEach(p=>{_[p]&&_[p].dispose&&_[p].dispose()}),_.dispose&&_.dispose()},j=_=>{_.traverse(g=>{g.geometry&&g.geometry.dispose(),g.material&&(Array.isArray(g.material)?g.material.forEach(p=>{W(p)}):W(g.material))})};return{currentModels:l,initialCameraPosition:c,initialTargetPosition:v,initThreeJS:L,handleResize:()=>{if(!i.value||!o||!n||!s)return;const _=i.value,g=_.clientWidth,p=_.clientHeight;o.aspect=g/p,o.updateProjectionMatrix(),n.setSize(g,p),s.update()},fitCameraToAllModels:()=>{if(!o||!d||l.value.length===0)return;const _=new a.Box3;l.value.forEach(ee=>{_.expandByObject(ee)});const g=_.getSize(new a.Vector3),p=_.getCenter(new a.Vector3),U=Math.max(g.x,g.y,g.z)*.8,M=new a.Vector3(p.x+U,p.y+U,p.z+U),q=p.clone();o.position.copy(M),o.lookAt(q),d.target.copy(q),d.update(),c.value.copy(M),v.value.copy(q)},getThreeJSObjects:()=>({scene:t,camera:o,renderer:n,controls:d,gizmo:s}),clearAllModels:()=>{if(!t)return;l.value.forEach(g=>{t.remove(g),j(g)});const _=[];t.children.forEach(g=>{!g.isLight&&!g.isCamera&&_.push(g)}),_.forEach(g=>{t.remove(g),j(g)}),l.value=[]},cleanup:()=>{r&&cancelAnimationFrame(r),n&&n.dispose(),d&&d.dispose(),s&&s.dispose()}}}function Dt(i,t){const o=e.ref(!1);let n=null,d=12700,s=new a.Vector3,r=new a.Vector3,l=new a.Vector3,c=0,v=null;const L=u=>u<.5?4*u*u*u:1-Math.pow(-2*u+2,3)/2,X=u=>{const C=new a.Vector3,h=c*1.2,x=new a.Vector3(l.x+h,l.y,l.z),_=new a.Vector3(l.x,l.y+h,l.z),g=new a.Vector3(l.x,l.y-h,l.z);if(u<=.567){const T=u/.567*Math.PI*2;C.x=l.x+Math.cos(T)*h,C.z=l.z+Math.sin(T)*h,C.y=l.y}else if(u<=.724){const p=(u-.567)/.157,T=L(p);C.lerpVectors(x,_,T)}else if(u<=.881){const p=(u-.724)/.157,U=L(p)*Math.PI;C.x=l.x+Math.sin(U)*h,C.y=l.y+Math.cos(U)*h,C.z=l.z}else{const p=(u-.881)/.119,T=L(p);C.lerpVectors(g,s,T)}return C},Q=()=>{const{camera:u,controls:C}=i();if(!u||!C)return;n||(n=Date.now());const h=Date.now()-n,x=Math.min(h/d,1);if(x>=1){j();return}const _=X(x);u.position.copy(_),u.lookAt(l),C.target.copy(l),v=requestAnimationFrame(Q)},W=()=>{if(t.value.length===0)return;const{camera:u,controls:C}=i();if(!u||!C)return;s.copy(u.position),r.copy(C.target);const h=new a.Box3;t.value.forEach(M=>{h.expandByObject(M)});const x=h.getSize(new a.Vector3);l=h.getCenter(new a.Vector3),c=Math.max(x.x,x.y,x.z)*1.2;const _=new a.Vector3(l.x+c*1.2,l.y,l.z);C.enabled=!1;const g=u.position.clone(),p=1e3,T=Date.now(),U=()=>{const M=Date.now()-T,q=Math.min(M/p,1),ee=L(q);u.position.lerpVectors(g,_,ee),u.lookAt(l),C.target.copy(l),q<1?requestAnimationFrame(U):(o.value=!0,n=null,Q())};U()},j=()=>{o.value=!1,n=null,v&&(cancelAnimationFrame(v),v=null);const{controls:u}=i();u&&(u.enabled=!0,u.target.copy(r))};return{isAnimating:o,toggleAnimation:()=>{if(o.value){o.value=!1,n=null,v&&(cancelAnimationFrame(v),v=null);const{camera:u,controls:C}=i();if(!u||!C)return;C.enabled=!0;const h=u.position.clone(),x=C.target.clone(),_=1500,g=Date.now(),p=()=>{const T=Date.now()-g,U=Math.min(T/_,1),M=L(U);u.position.lerpVectors(h,s,M),C.target.lerpVectors(x,r,M),U<1&&requestAnimationFrame(p)};p()}else W()},startAnimation:W,stopAnimation:j}}function Rt(i,t){const o=e.ref(!1),n=e.ref("none");let d=[],s=[],r=new a.Box3,l=new a.Vector3;const c=()=>{d=[new a.Plane(new a.Vector3(1,0,0),0),new a.Plane(new a.Vector3(0,1,0),0),new a.Plane(new a.Vector3(0,0,1),0)]},v=()=>{r.makeEmpty(),t.value.forEach($=>{r.expandByObject($)}),l=r.getCenter(new a.Vector3)},L=$=>{const u=r.getSize(new a.Vector3);let C,h,x;$==="x"?(C=new a.PlaneGeometry(u.z*1.2,u.y*1.2),h=new a.Vector3(l.x,l.y,l.z),x=new a.Euler(0,Math.PI/2,0)):$==="y"?(C=new a.PlaneGeometry(u.x*1.2,u.z*1.2),h=new a.Vector3(l.x,l.y,l.z),x=new a.Euler(Math.PI/2,0,0)):$==="z"&&(C=new a.PlaneGeometry(u.x*1.2,u.y*1.2),h=new a.Vector3(l.x,l.y,l.z),x=new a.Euler(0,0,0));const _=new a.MeshPhongMaterial({color:8900331,transparent:!0,opacity:.3,side:a.DoubleSide,depthWrite:!1}),g=new a.Mesh(C,_);return g.position.copy(h),g.rotation.copy(x),g},X=()=>{if(Q(),W(),n.value==="none")return;v();let $=null;if(n.value==="x"?(d[0].constant=-l.x,$=d[0]):n.value==="y"?(d[1].constant=-l.y,$=d[1]):n.value==="z"&&(d[2].constant=-l.z,$=d[2]),$){t.value.forEach(C=>{C.traverse(h=>{h.isMesh&&h.material&&(Array.isArray(h.material)?h.material.forEach(x=>{x.clippingPlanes=[$]}):h.material.clippingPlanes=[$])})});const{scene:u}=i();if(u){const C=L(n.value);u.add(C),s.push(C)}}},Q=()=>{t.value.forEach($=>{$.traverse(u=>{u.isMesh&&u.material&&(Array.isArray(u.material)?u.material.forEach(C=>{C.clippingPlanes=[]}):u.material.clippingPlanes=[])})})},W=()=>{const{scene:$}=i();$&&s.forEach(u=>{$.remove(u),u.geometry.dispose(),u.material.dispose()}),s=[]};return{isClipping:o,activeClippingAxis:n,toggleClipping:()=>{o.value=!o.value,o.value?(c(),t.value.length>0&&v()):(n.value="none",Q(),W())},updateClippingPlanes:X,clearClippingPlanes:Q,clearClippingMeshes:W}}const At={class:"obj-viewer-container"},Ft={class:"floating-controls"},Lt=["disabled"],Ot=["disabled","title"],jt={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ut={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},zt=["disabled"],It=["title"],$t={key:0,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Yt={key:1,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},Ht={key:1,class:"clipping-panel"},Kt={class:"panel-content"},Zt={class:"radio-group"},qt={class:"radio-label"},Xt={class:"radio-label"},Wt={class:"radio-label"},Gt={class:"radio-label"},Jt={key:2,class:"loading-overlay"},Qt={__name:"threeModel",setup(i,{expose:t}){const o=e.ref(null),n=e.ref(!1),d=e.ref(""),s=e.ref(!1),r=e.ref(!1),{currentModels:l,initialCameraPosition:c,initialTargetPosition:v,initThreeJS:L,handleResize:X,fitCameraToAllModels:Q,getThreeJSObjects:W,clearAllModels:j,cleanup:$}=Mt(o),{isAnimating:u,toggleAnimation:C,stopAnimation:h}=Dt(W,l),{isClipping:x,activeClippingAxis:_,toggleClipping:g,updateClippingPlanes:p}=Rt(W,l),{addModelsFromUrls:T,loadModelByDefaultPath:U,urdfModel:M}=a.useModelLoader(W,l,n,d,j),q=()=>{if(r.value||l.value.length===0)return;r.value=!0,u.value&&h();const{camera:Z,controls:w}=W();if(!Z||!w)return;w.enabled=!0;const z=b=>b<.5?4*b*b*b:1-Math.pow(-2*b+2,3)/2,Ge=Z.position.clone(),Ye=w.target.clone(),Je=1500,f=Date.now(),m=()=>{const b=Date.now()-f,O=Math.min(b/Je,1),V=z(O);Z.position.lerpVectors(Ge,c.value,V),w.target.lerpVectors(Ye,v.value,V),O<1?requestAnimationFrame(m):r.value=!1};m()},ee=()=>{document.fullscreenElement?document.exitFullscreen().then(()=>{s.value=!1,e.nextTick(()=>{X()})}).catch(Z=>{console.error("无法退出全屏:",Z)}):o.value.requestFullscreen().then(()=>{s.value=!0,e.nextTick(()=>{X()})}).catch(Z=>{console.error("无法进入全屏:",Z)})},Pe=()=>{s.value=!!document.fullscreenElement,s.value||e.nextTick(()=>{X()})},pe=async(Z,w)=>{try{u.value&&h(),x.value&&g();const z=await w(Z);return Q(),z}catch(z){throw console.error("加载模型失败:",z),z}},N=async Z=>pe(Z,T),Ce=async Z=>pe(Z,U);return e.onMounted(async()=>{await e.nextTick(),L(),window.addEventListener("resize",X),document.addEventListener("fullscreenchange",Pe)}),e.onBeforeUnmount(()=>{window.removeEventListener("resize",X),document.removeEventListener("fullscreenchange",Pe),u.value&&h(),$()}),t({addModelsFromUrls:N,loadModelByDefaultPath:Ce}),(Z,w)=>(e.openBlock(),e.createElementBlock("div",At,[e.unref(M)?(e.openBlock(),e.createBlock(gt,{key:0,class:"client-robot-side",model:e.unref(M)},null,8,["model"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"threejsContainer",ref:o,class:"threejs-container"},null,512),e.createElementVNode("div",Ft,[e.createElementVNode("button",{onClick:q,class:e.normalizeClass(["control-btn","reset-btn"]),disabled:n.value||e.unref(l).length===0||r.value,title:"重置"},w[10]||(w[10]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),e.createElementVNode("polyline",{points:"9,22 9,12 15,12 15,22"})],-1)]),8,Lt),e.createElementVNode("button",{onClick:w[0]||(w[0]=(...z)=>e.unref(C)&&e.unref(C)(...z)),class:e.normalizeClass(["control-btn","animation-btn",{active:e.unref(u)}]),disabled:n.value||e.unref(l).length===0,title:e.unref(u)?"停止动画":"动画视图"},[e.unref(u)?(e.openBlock(),e.createElementBlock("svg",Ut,w[12]||(w[12]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("rect",{x:"9.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1),e.createElementVNode("rect",{x:"12.5",y:"8",width:"2",height:"8",fill:"currentColor"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",jt,w[11]||(w[11]=[e.createElementVNode("circle",{cx:"12",cy:"12",r:"10"},null,-1),e.createElementVNode("polygon",{points:"10,8 16,12 10,16",fill:"currentColor"},null,-1)])))],10,Ot),e.createElementVNode("button",{onClick:w[1]||(w[1]=(...z)=>e.unref(g)&&e.unref(g)(...z)),class:e.normalizeClass(["control-btn","clipping-btn",{active:e.unref(x)}]),disabled:n.value||e.unref(l).length===0,title:"剖面视图"},w[13]||(w[13]=[e.createElementVNode("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},[e.createElementVNode("rect",{x:"3",y:"3",width:"18",height:"18"}),e.createElementVNode("line",{x1:"-14",y1:"12",x2:"30",y2:"12","stroke-dasharray":"4,2"})],-1)]),10,zt),e.createElementVNode("button",{onClick:ee,class:e.normalizeClass(["control-btn","fullscreen-btn"]),title:s.value?"退出全屏":"全屏"},[s.value?(e.openBlock(),e.createElementBlock("svg",Yt,w[15]||(w[15]=[e.createElementVNode("path",{d:"M8 3v3a2 2 0 0 1-2 2H3m18 0h-3a2 2 0 0 1-2-2V3m0 18v-3a2 2 0 0 1 2-2h3M3 16h3a2 2 0 0 1 2 2v3"},null,-1)]))):(e.openBlock(),e.createElementBlock("svg",$t,w[14]||(w[14]=[e.createElementVNode("path",{d:"M8 3H5a2 2 0 0 0-2 2v3m18 0V5a2 2 0 0 0-2-2h-3m0 18h3a2 2 0 0 0 2-2v-3M3 16v3a2 2 0 0 0 2 2h3"},null,-1)])))],8,It)]),e.unref(x)?(e.openBlock(),e.createElementBlock("div",Ht,[e.createElementVNode("div",Kt,[e.createElementVNode("div",Zt,[e.createElementVNode("label",qt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"none","onUpdate:modelValue":w[2]||(w[2]=z=>e.isRef(_)?_.value=z:null),onChange:w[3]||(w[3]=(...z)=>e.unref(p)&&e.unref(p)(...z))},null,544),[[e.vModelRadio,e.unref(_)]]),w[16]||(w[16]=e.createElementVNode("span",{class:"radio-text"},"无切割",-1))]),e.createElementVNode("label",Xt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"x","onUpdate:modelValue":w[4]||(w[4]=z=>e.isRef(_)?_.value=z:null),onChange:w[5]||(w[5]=(...z)=>e.unref(p)&&e.unref(p)(...z))},null,544),[[e.vModelRadio,e.unref(_)]]),w[17]||(w[17]=e.createElementVNode("span",{class:"radio-text"},"X轴切割",-1))]),e.createElementVNode("label",Wt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"y","onUpdate:modelValue":w[6]||(w[6]=z=>e.isRef(_)?_.value=z:null),onChange:w[7]||(w[7]=(...z)=>e.unref(p)&&e.unref(p)(...z))},null,544),[[e.vModelRadio,e.unref(_)]]),w[18]||(w[18]=e.createElementVNode("span",{class:"radio-text"},"Y轴切割",-1))]),e.createElementVNode("label",Gt,[e.withDirectives(e.createElementVNode("input",{type:"radio",name:"clipping-axis",value:"z","onUpdate:modelValue":w[8]||(w[8]=z=>e.isRef(_)?_.value=z:null),onChange:w[9]||(w[9]=(...z)=>e.unref(p)&&e.unref(p)(...z))},null,544),[[e.vModelRadio,e.unref(_)]]),w[19]||(w[19]=e.createElementVNode("span",{class:"radio-text"},"Z轴切割",-1))])])])])):e.createCommentVNode("",!0),n.value?(e.openBlock(),e.createElementBlock("div",Jt,[w[20]||(w[20]=e.createElementVNode("div",{class:"loading-spinner"},null,-1)),e.createElementVNode("p",null,e.toDisplayString(d.value),1)])):e.createCommentVNode("",!0)]))}},eo=Ne._export_sfc(Qt,[["__scopeId","data-v-0595ce23"]]);function to(i,t,o,n,d,s){const r=e.resolveComponent("svg-icon"),l=e.resolveComponent("ssMenu");return e.openBlock(),e.createBlock(l,{mode:i.mode,menuList:i.renderMenuList,onClickMenu:i.clickMenu,onOpenMenu:i.openMenu,onCloseMenu:i.closeMenu},{title:e.withCtx(({menu:c})=>[e.createVNode(r,{name:c.icon??"Fold",style:{width:"clamp(16px, 1.25rem, 20px)",height:"clamp(16px, 1.25rem, 20px)","margin-right":"8px"}},null,8,["name"]),e.createElementVNode("span",null,e.toDisplayString(c.title??""),1)]),_:1},8,["mode","menuList","onClickMenu","onOpenMenu","onCloseMenu"])}const ct=Ne._export_sfc(A._sfc_main,[["render",to],["__scopeId","data-v-5c2d7ed2"]]),oo={class:"bread-content"},no=["onClick"],ao={key:0,class:"split-title"},io={__name:"index",props:{breadArray:{type:Array,default:()=>[]}},emits:["click"],setup(i,{emit:t}){const o=i,n=e.ref([]),d=t;e.onMounted(()=>{n.value=o==null?void 0:o.breadArray}),e.watch(()=>o==null?void 0:o.breadArray,()=>{n.value=o==null?void 0:o.breadArray},{deep:!0,immediate:!0});const s=r=>{d("click",r)};return(r,l)=>(e.openBlock(),e.createElementBlock("div",oo,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(c,v)=>{var L;return e.openBlock(),e.createElementBlock("div",{key:v,class:"bread-item"},[e.createElementVNode("div",{class:"bread-title",onClick:X=>s(c),style:e.normalizeStyle({opacity:((L=n.value)==null?void 0:L.length)-1===v?"0.7":"1"})},e.toDisplayString(c.value),13,no),v!==n.value.length-1&&Array.isArray(n.value)?(e.openBlock(),e.createElementBlock("div",ao,e.toDisplayString("/"))):e.createCommentVNode("",!0)])}),128))]))}},dt=Ne._export_sfc(io,[["__scopeId","data-v-ded7e2bd"]]),so={class:"structure-buttons"},lo={class:"structure-paths"},ro={class:"client-header-user"},co={class:"model-select"},uo={class:"model-show"},ho={class:"model-fill"},po={class:"client-header-logo"},mo={class:"client-header-menu"},fo={class:"client-header-user"},_o={class:"client-main-operate"},go={key:0,class:"item-view-group"},yo={key:0,class:"calculator"},wo={key:1,class:"calculator"},Co={class:"client-main-operate"},vo=e.defineComponent({__name:"index2",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(i){const t=a.useUnit(ke.pinia),o=e.ref(!1),{selectTitle:n}=B.storeToRefs(t),d=e.ref(!1),s=e.ref(!1),r=e.ref(!1),l=e.ref(!1),c=st.useLoginState(),{loginUserInfo:v}=B.storeToRefs(c),L=a.useModelComp(ke.pinia),{isEdit:X}=B.storeToRefs(L),Q=B.useMenuState(ke.pinia),W=e.ref(!1),{importLoading:j,platName:$}=B.storeToRefs(Q),u=e.ref("");return(C,h)=>{const x=e.resolveComponent("el-button"),_=e.resolveComponent("el-avatar"),g=e.resolveComponent("el-header"),p=e.resolveComponent("el-container"),T=e.resolveComponent("el-icon"),U=e.resolveComponent("el-input"),M=e.resolveComponent("el-aside"),q=e.resolveComponent("el-main"),ee=e.resolveComponent("router-view"),Pe=e.resolveDirective("loading");return e.unref(X)==="edit"?(e.openBlock(),e.createBlock(p,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(g,{class:"client-structure-header"},{default:e.withCtx(()=>{var pe;return[e.createElementVNode("div",so,[e.createVNode(x,{id:"transparentBgButton",onClick:e.unref(A.onBack)},{default:e.withCtx(()=>h[3]||(h[3]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[3]},8,["onClick"]),e.createVNode(x,{id:"transparentBgButton",onClick:h[0]||(h[0]=N=>{var Ce,Z;return e.unref(A.clickSavePage)((Z=(Ce=e.unref(n))==null?void 0:Ce.map(w=>w.value))==null?void 0:Z.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Ee.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[h[4]||(h[4]=e.createTextVNode(" 保存页面 "))]),_:1,__:[4]})]),e.createElementVNode("div",lo,[(e.openBlock(),e.createBlock(dt,{key:e.unref(n),breadArray:e.unref(n),onClick:e.unref(A.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",ro,[e.renderSlot(C.$slots,"default",{},void 0,!0),e.createVNode(_,{size:35,src:(pe=e.unref(v))==null?void 0:pe.avatarUrl},{default:e.withCtx(()=>{var N;return[e.createTextVNode(e.toDisplayString(((N=e.unref(v))==null?void 0:N.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(X)==="edit"?(e.openBlock(),e.createBlock(p,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",co,[e.createVNode(Be.modelSelect)]),e.createElementVNode("div",uo,[e.createVNode(Be.modelShow)]),e.createElementVNode("div",ho,[e.createVNode(Be.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(p,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(g,{class:"client-header"},{default:e.withCtx(()=>{var pe;return[e.createElementVNode("div",po,[e.createVNode(Ee.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),h[5]||(h[5]=e.createTextVNode(" ISIP "))]),e.createElementVNode("div",mo,[e.createVNode(ct,{mode:"horizontal"})]),e.createElementVNode("div",fo,[e.createVNode(U,{modelValue:u.value,"onUpdate:modelValue":h[1]||(h[1]=N=>u.value=N),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(T,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt.search_default))]),_:1})]),_:1},8,["modelValue"]),i.showButton?(e.openBlock(),e.createBlock(x,{key:0,id:"transparentBgButton"},{icon:e.withCtx(()=>[e.createVNode(Ee.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[h[6]||(h[6]=e.createTextVNode(" 生成APP "))]),_:1,__:[6]})):e.createCommentVNode("",!0),i.showButton&&e.unref(X)==="view"?(e.openBlock(),e.createBlock(x,{key:1,id:"transparentBgButton",onClick:e.unref(A.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Ee.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[h[7]||(h[7]=e.createTextVNode(" 修改布局 "))]),_:1,__:[7]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(C.$slots,"default",{},void 0,!0),e.createVNode(_,{size:35,src:(pe=e.unref(v))==null?void 0:pe.avatarUrl},{default:e.withCtx(()=>{var N;return[e.createTextVNode(e.toDisplayString(((N=e.unref(v))==null?void 0:N.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(p,{class:"client-body"},{default:e.withCtx(()=>[C.$route.path==="/"?(e.openBlock(),e.createBlock(q,{key:0,class:"client-main"},{default:e.withCtx(()=>{var pe;return[e.createVNode(M,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",_o,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((pe=e.unref(Ie.cloneDeep)(e.unref(A.showItems)))==null?void 0:pe.filter(N=>N.comp!=="FormTop"),(N,Ce)=>{var Z;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:Ce},[((Z=N==null?void 0:N.comp)==null?void 0:Z.toUpperCase())!=="TABLE"?(e.openBlock(),e.createElementBlock("div",go,e.toDisplayString(N.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(A.getComponents)(N.comp)),{compName:N.name,itemData:N==null?void 0:N.compData,childItemData:N==null?void 0:N.itemChildData,key:(N==null?void 0:N.id)??Ce,onChange:e.unref(A.onChange),index:(N==null?void 0:N.id)??Ce,onContentChange:e.unref(A.onContentChange),onPageChange:e.unref(A.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),d.value?(e.openBlock(),e.createElementBlock("div",yo,[s.value?(e.openBlock(),e.createBlock($e._sfc_main,{key:0,class:"calculator-content",onClickTrigger:C.clickPreview,loading:r.value,modelValue:"预览"},null,8,["onClickTrigger","loading"])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{class:"calculator-content",onClickTrigger:h[2]||(h[2]=N=>C.showThreeContent()),loading:o.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0),l.value?(e.openBlock(),e.createElementBlock("div",wo,[e.createVNode($e._sfc_main,{class:"calculator-content",modelValue:"执行方法",onClickTrigger:C.clickExecute,loading:W.value},null,8,["onClickTrigger","loading"])])):e.createCommentVNode("",!0)])]}),_:1})):(e.openBlock(),e.createBlock(q,{key:1,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(M,{class:"client-aside"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1}),e.createElementVNode("div",Co,[e.createVNode(ee)])]),_:1}))]),_:1})]),_:3})),[[Pe,e.unref(j)]])}}}),bo=Ne._export_sfc(vo,[["__scopeId","data-v-1f0f879a"]]),D=[{key:"FitCurve_Eleven",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35326658522693",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35326658522693",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources"},{key:"MakeShape",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018179530309",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018179530309",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources"},{key:"FillEmpty",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35018289382469",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35018289382469",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources"},{key:"ToolPathFakeFast",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35484063607109",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35484063607109",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources"},{key:"FiveAxisCalculator",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35237389477957",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35237389477957",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources"},{key:"DetectionAlgorithm",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35459977498949",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35459977498949",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources"},{key:"FeatureSelectionAlgorithm_FFS",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35277984187973",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35277984187973",download:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources"},{key:"AIParameterOptimization",value:"http://139.196.154.85:20024/api/algorithmRun/verificationAlgorithm/35788169784389",resources:"http://139.196.154.85:20024/api/algorithmRun/allFilesByFolderName/35788169784389"}],ze=[{key:"型线生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35326658522693/outputResources/sampling_points_20.cpt"},{key:"曲面生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018179530309/outputResources/output.obj"},{key:"叶片生成",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35018289382469/outputResources/output_TwoSections_completed.obj"},{key:"轨迹规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35484063607109/outputResources/complete_data.txt"},{key:"加工规划",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35237389477957/outputResources/NC_BC.NC"},{key:"产品检测",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/source.pcd,http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35459977498949/outputResources/target.pcd"},{key:"参数筛选训练方法",value:"http://139.196.154.85:20024/api/algorithmRun/downloadFileByFileName/35277984187973/outputResources/fitness_iteration.png"}],ko={class:"structure-buttons"},xo={class:"structure-paths"},Eo={class:"client-header-user"},To={class:"model-select"},Vo={class:"model-show"},Bo={class:"model-fill"},No={class:"client-header-logo"},Po={class:"client-header-menu"},So={class:"client-header-user"},Mo={class:"client-main-content"},Do={key:0,class:"item-view-group"},Ro={key:0,class:"calculator"},Ao={key:1,class:"calculator"},Fo={class:"router-aside"},Lo={class:"router-main"},Oo=e.defineComponent({__name:"index",props:{windowConfig:{type:Object,default:()=>{}},showButton:{type:Boolean,default:!0}},setup(i){const t=a.useUnit(ke.pinia),o=e.ref(0),n=e.ref(!1),{selectTitle:d}=B.storeToRefs(t),s=e.ref(!1),r=e.ref(!1),l=e.ref(!1),c=a.useTableComp(ke.pinia),v=e.ref(!1),{tableShowThree:L}=B.storeToRefs(c),X=st.useLoginState(),{loginUserInfo:Q}=B.storeToRefs(X),W=a.useModelComp(ke.pinia),{isEdit:j}=B.storeToRefs(W),$=B.useMenuState(ke.pinia),u=ut.useFormComp(ke.pinia),{objUrl:C,blobUrls:h}=B.storeToRefs(u),x=e.ref(null),_=e.ref(!0),g=e.ref(!1),{importLoading:p,activeMenuPath:T,platName:U}=B.storeToRefs($),M=e.ref(!1);e.watch(()=>T.value,async f=>{f&&(M.value=!0),ze!=null&&ze.find(m=>{var b;return(m==null?void 0:m.key)===((b=f==null?void 0:f.split("/"))==null?void 0:b[(f==null?void 0:f.split("/").length)-1])})?v.value=!0:v.value=!1},{immediate:!0});const q=async()=>{var P,y,te,ne,k;g.value=!0;const f=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken");let m=((te=(y=(P=ze==null?void 0:ze.find(ae=>{var me,ce,ve;return(ae==null?void 0:ae.key)===((ve=(me=T.value)==null?void 0:me.split("/"))==null?void 0:ve[((ce=T.value)==null?void 0:ce.split("/").length)-1])}))==null?void 0:P.value)==null?void 0:y.split(","))==null?void 0:te[0])??"";const b=await B.axios.post(m,null,{responseType:"blob",headers:{Authorization:f,"Content-Type":"application/json"}}),O=new Blob([b.data],{type:"application/octet-stream;charset=UTF-8"});let V={suffix:"."+((k=m==null?void 0:m.split("."))==null?void 0:k[((ne=m==null?void 0:m.split("."))==null?void 0:ne.length)-1]),blob:O,mtlBlobs:[]};g.value=!1,x.value.loadModelByDefaultPath([V])},ee=async f=>{var O,V,P,y,te,ne,k;const m=(O=f==null?void 0:f.split("/"))==null?void 0:O[0],b=await B.getInsofDataApi({key:{type:"mainEquip",systemKey:sessionStorage.getItem("systemKey"),pageKey:m}});return((V=b==null?void 0:b.data)==null?void 0:V.type)==="success"?((k=(ne=(te=(y=(P=b==null?void 0:b.data)==null?void 0:P.result)==null?void 0:y[0])==null?void 0:te.value)==null?void 0:ne.tableData)==null?void 0:k.隐藏三维显示)!==!0:!0};e.watch(()=>A.showItems.value,()=>{var f,m,b,O,V;if(((f=A.showItems.value)==null?void 0:f.length)===2&&((m=A.showItems.value)!=null&&m.find(P=>(P==null?void 0:P.name)==="输入"))&&((b=A.showItems.value)!=null&&b.find(P=>(P==null?void 0:P.name)==="输出"))){const P=(O=A.showItems.value)==null?void 0:O.find(y=>(y==null?void 0:y.name)==="输出");r.value=((V=P==null?void 0:P.comp)==null?void 0:V.toUpperCase())==="FORM",s.value=!0}else s.value=!1,r.value=!1},{deep:!0,immediate:!0}),e.watch(()=>T.value,async()=>{T.value&&(_.value=await ee(T.value))},{deep:!0,immediate:!0}),e.watch(()=>[C.value,x.value],()=>{var f;((f=C.value)==null?void 0:f.length)>0&&x.value&&x.value.addModelsFromUrls(C.value)},{immediate:!0,deep:!0}),e.watch(()=>h==null?void 0:h.value,async()=>{var f,m,b,O;if(h!=null&&h.value&&((f=h==null?void 0:h.value)==null?void 0:f.length)>0&&!v.value&&!((m=A.showItems.value)!=null&&m.find(V=>(V==null?void 0:V.name)==="输入")&&((b=A.showItems.value)!=null&&b.find(V=>(V==null?void 0:V.name)==="输出")))){let V=[];const P=await((O=Ie.cloneDeep(h==null?void 0:h.value))==null?void 0:O.map(async y=>{var me,ce,ve,ie,E,_e,ye,Te,Se,Me;let te,ne;const k=(ce=(me=y==null?void 0:y.blob)==null?void 0:me.split("undefined,"))==null?void 0:ce[1];let ae=k==null?void 0:k.split(",");if((ae==null?void 0:ae.length)>1){let be=await(ae==null?void 0:ae.map(async G=>{var H,He,xe,de,R,ge;te=await B.axios.get(G,{responseType:"blob",headers:{"Content-Type":"application/json"}});let se=[];if(((H=y==null?void 0:y.mtlBlobs)==null?void 0:H.length)>0){let Le=await((He=y==null?void 0:y.mtlBlobs)==null?void 0:He.map(async J=>{let De=await B.axios.get(J,{responseType:"blob",headers:{"Content-Type":"application/json"}});return se.push(new Blob([De.data],{type:"application/octet-stream;charset=UTF-8"})),De}));await Promise.all(Le)}return((de=G==null?void 0:G.split("."))==null?void 0:de[((xe=G==null?void 0:G.split("."))==null?void 0:xe.length)-1])!=="undefined"&&V.push({suffix:"."+((ge=G==null?void 0:G.split("."))==null?void 0:ge[((R=G==null?void 0:G.split("."))==null?void 0:R.length)-1]),blob:new Blob([te.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:se}),te}));await Promise.all(be)}else if(!(k!=null&&k.includes("https://"))&&!(k!=null&&k.includes("http://"))){te=await ot.downloadAvatarApi({url:k});let be=[];if(((ve=y==null?void 0:y.mtlBlobs)==null?void 0:ve.length)>0){let G=await((ie=y==null?void 0:y.mtlBlobs)==null?void 0:ie.map(async se=>{let H=await ot.downloadAvatarApi({url:se});return be.push(new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"})),H}));await Promise.all(G)}ne={suffix:"."+((_e=k==null?void 0:k.split("."))==null?void 0:_e[((E=k==null?void 0:k.split("."))==null?void 0:E.length)-1]),blob:new Blob([te.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:be}}else{te=await B.axios.get(k,{responseType:"blob",headers:{"Content-Type":"application/json"}});let be=[];if(((ye=y==null?void 0:y.mtlBlobs)==null?void 0:ye.length)>0){let G=await((Te=y==null?void 0:y.mtlBlobs)==null?void 0:Te.map(async se=>{let H=await B.axios.get(se,{responseType:"blob",headers:{"Content-Type":"application/json"}});return be.push(new Blob([H.data],{type:"application/octet-stream;charset=UTF-8"})),H}));await Promise.all(G)}ne={suffix:"."+((Me=k==null?void 0:k.split("."))==null?void 0:Me[((Se=k==null?void 0:k.split("."))==null?void 0:Se.length)-1]),blob:new Blob([te.data],{type:"application/octet-stream;charset=UTF-8"}),mtlBlobs:be}}ne&&V.push(ne)}));await Promise.all(P),x.value.loadModelByDefaultPath(V)}},{immediate:!0,deep:!0}),e.watch(()=>L.value,async()=>{var m,b,O,V;if(L.value!==""&&L.value){let P=(m=T.value)==null?void 0:m.split("/"),y=P[(P==null?void 0:P.length)-2];const ne=(((b=D==null?void 0:D.find(ce=>(ce==null?void 0:ce.key)===y))==null?void 0:b.download)??"")+"/"+L.value,k=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),ae=await B.axios.post(ne,null,{responseType:"blob",headers:{Authorization:k,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var f=new Blob([ae.data],{type:"application/octet-stream;charset=UTF-8"});const me=[{suffix:"."+((V=(O=L.value)==null?void 0:O.split("."))==null?void 0:V[1]),blob:f,mtlBlobs:[]}];x.value.loadModelByDefaultPath(me)}},{deep:!0,immediate:!0});const Pe=async()=>{var te,ne,k,ae,me,ce,ve,ie,E,_e,ye,Te,Se,Me,be,G,se;n.value=!0;let f=(te=T.value)==null?void 0:te.split("/"),m=f[(f==null?void 0:f.length)-2];const b=((ne=D==null?void 0:D.find(H=>(H==null?void 0:H.key)===m))==null?void 0:ne.value)??"";let O="";const V=await B.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});((k=V==null?void 0:V.data)==null?void 0:k.code)===200&&(O=`Bearer ${(me=(ae=V.data)==null?void 0:ae.result)==null?void 0:me.accessToken}`,sessionStorage.setItem("magicToken",O));const P=O===""?"123456":O,y=await B.axios.post(b,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((ce=y==null?void 0:y.data)==null?void 0:ce.type)==="success"&&a.IsJson((ie=(ve=y==null?void 0:y.data)==null?void 0:ve.result)==null?void 0:ie.result)){const H=(Se=(Te=(ye=JSON.parse((_e=(E=y==null?void 0:y.data)==null?void 0:E.result)==null?void 0:_e.result))==null?void 0:ye.lines_file_paths)==null?void 0:Te[0])==null?void 0:Se.split("\\"),xe=(((Me=D==null?void 0:D.find(R=>(R==null?void 0:R.key)===m))==null?void 0:Me.resources)??"")+"/"+(((H==null?void 0:H[(H==null?void 0:H.length)-2])==="inputResources"?"outputResources":H==null?void 0:H[(H==null?void 0:H.length)-2])??"outputResources"),de=await B.axios.post(xe,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((be=de==null?void 0:de.data)==null?void 0:be.type)==="success"){const R=(G=de==null?void 0:de.data)==null?void 0:G.result,ge=A.showItems.value,Le=await((se=Ie.cloneDeep(ge))==null?void 0:se.map(async J=>{var De,Ke,Ze,ue,Y,Ve;if((J==null?void 0:J.name)==="输出"){if((J==null?void 0:J.comp)==="Table")J.compData=(De=J==null?void 0:J.compData)==null?void 0:De.map(S=>{var K,fe;return(S==null?void 0:S.key)==="tableContents"&&(S.contents=(fe=(K=S==null?void 0:S.contents)==null?void 0:K.map(oe=>(oe=oe==null?void 0:oe.map((F,he)=>{var le,Re,Oe;return typeof F=="string"&&he>1?((le=S==null?void 0:S.contents)==null?void 0:le.length)>1?F=((Re=R==null?void 0:R[he-1])!=null&&Re.includes("input")?F:R==null?void 0:R[he-1])??F:F=R==null?void 0:R[0]:F=((Oe=R==null?void 0:R[he-1])!=null&&Oe.includes("input")?F:R==null?void 0:R[he-1])??F,F}),oe)))==null?void 0:fe.filter((oe,F)=>F<=(R==null?void 0:R.length)-1)),S});else if((J==null?void 0:J.comp)==="Form"){let S="";if(R==null||R.forEach(K=>{S=S===""?S+K:S+","+K}),J.compData=(Ke=J==null?void 0:J.compData)==null?void 0:Ke.map(K=>{var fe;return(K==null?void 0:K.key)==="formContent"&&(K.contents=(fe=K.contents)==null?void 0:fe.map(oe=>(oe.value=S,oe))),K}),(Ze=S==null?void 0:S.split(","))!=null&&Ze.find(K=>K.includes(".obj"))){let K={};K.suffix=".obj";const fe=[];let oe=await((Y=(ue=S==null?void 0:S.split(","))==null?void 0:ue.filter(F=>F.includes(".obj")||F.includes(".mtl")))==null?void 0:Y.map(async F=>{var le,Re;if(F.includes(".obj")){const qe=(((le=D==null?void 0:D.find(Ae=>(Ae==null?void 0:Ae.key)===m))==null?void 0:le.download)??"")+"/"+F,je=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ue=await B.axios.post(qe,null,{responseType:"blob",headers:{Authorization:je,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var he=new Blob([Ue.data],{type:"application/octet-stream;charset=UTF-8"});K.blob=he}else if(F.includes(".mtl")){const qe=(((Re=D==null?void 0:D.find(Qe=>(Qe==null?void 0:Qe.key)===m))==null?void 0:Re.download)??"")+"/"+F,je=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Ue=await B.axios.post(qe,null,{responseType:"blob",headers:{Authorization:je,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var he=new Blob([Ue.data],{type:"application/octet-stream;charset=UTF-8"});fe.push(he)}}));await Promise.all(oe),K.mtlBlobs=fe,x.value.loadModelByDefaultPath([K])}else{const K=[];let fe=await((Ve=S==null?void 0:S.split(","))==null?void 0:Ve.map(async oe=>{var je,Ue;let F={};F.suffix="."+((je=oe==null?void 0:oe.split("."))==null?void 0:je[1]);const le=(((Ue=D==null?void 0:D.find(Ae=>(Ae==null?void 0:Ae.key)===m))==null?void 0:Ue.download)??"")+"/"+oe,Re=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),Oe=await B.axios.post(le,null,{responseType:"blob",headers:{Authorization:Re,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});var qe=new Blob([Oe.data],{type:"application/octet-stream;charset=UTF-8"});F.blob=qe,K.push(F)}));await Promise.all(fe),x.value.loadModelByDefaultPath(K)}}}return J}));A.showItems.value=await Promise.all(Le)}}o.value++,n.value=!1},pe=e.ref(""),N=e.ref("open"),Ce=e.ref("open"),Z=e.ref(!1),w=()=>{const f=document.getElementById("menuCollapse");N.value==="open"?(f.style.width="18.75rem",f.style.height="96%",f.style.overflow="auto"):(f.style.width="50px",f.style.height="50px",f.style.overflow="hidden")},z=()=>{const f=document.getElementById("operateCollapse");Ce.value==="open"?(f.style.width="25rem",f.style.height="96%",f.style.overflow="auto"):(f.style.width="50px",f.style.height="50px",f.style.overflow="hidden")},Ge=()=>{Z.value=!Z.value;const f=document.getElementById("operateCollapse"),m=document.getElementById("menuCollapse");Z.value?(m.style.width="18.75rem",f.style.width="calc(100% - 24rem)"):f.style.width="400px"},Ye=f=>{const m=URL.createObjectURL(f),b=document.createElement("a");b.href=m,b.download="file.txt",document.body.appendChild(b),b.click(),document.body.removeChild(b),URL.revokeObjectURL(m),l.value=!1},Je=async()=>{var te,ne,k,ae,me,ce,ve,ie,E,_e,ye,Te,Se,Me,be,G;l.value=!0;let f=(te=T.value)==null?void 0:te.split("/"),m=f[(f==null?void 0:f.length)-2];const b=((ne=D==null?void 0:D.find(se=>(se==null?void 0:se.key)===m))==null?void 0:ne.value)??"";let O="";const V=await B.axios.post("http://139.196.154.85:20024/api/sysAuth/login",{account:"superadmin",password:"9bf00809059adc7f57bd290bf73ddf4d16f4c83b5937e2d68144ab0bd60d045d22d70afeed8f2fa071cda536e1fac0daf12b8e63dd870c3ca8b308f23be6e693bb32ebd3d013116dc8338d6854b1332701a522a7c43706a6db4162fbe991c8c08aa842fbbc34",codeId:0,code:""});if(((k=V==null?void 0:V.data)==null?void 0:k.code)===200)O=`Bearer ${(me=(ae=V.data)==null?void 0:ae.result)==null?void 0:me.accessToken}`,sessionStorage.setItem("magicToken",O);else throw B.ElMessage.error("响应出错了"),new Error("响应出错了");const P=O===""?"123456":O,y=await B.axios.post(b,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((ce=y==null?void 0:y.data)==null?void 0:ce.code)===200){if(a.IsJson((ie=(ve=y==null?void 0:y.data)==null?void 0:ve.result)==null?void 0:ie.result)){const se=(Se=(Te=(ye=JSON.parse((_e=(E=y==null?void 0:y.data)==null?void 0:E.result)==null?void 0:_e.result))==null?void 0:ye.lines_file_paths)==null?void 0:Te[0])==null?void 0:Se.split("\\"),He=(((Me=D==null?void 0:D.find(de=>(de==null?void 0:de.key)===m))==null?void 0:Me.resources)??"")+"/"+((se==null?void 0:se[(se==null?void 0:se.length)-2])??"outputResources"),xe=await B.axios.post(He,null,{headers:{Authorization:P,baseURL:"http://139.196.154.85:20025","Content-Type":"multipart/form-data"}});if(((be=xe==null?void 0:xe.data)==null?void 0:be.code)===200){const de=(G=xe==null?void 0:xe.data)==null?void 0:G.result,R=Ie.cloneDeep(A.showItems.value);R==null||R.map(async ge=>{var Le,J,De,Ke,Ze;if((ge==null?void 0:ge.name)==="输出"&&(ge==null?void 0:ge.comp)==="Form"){let ue="";de==null||de.forEach(Y=>{ue=ue===""?ue+Y:ue+","+Y}),ge.compData=(Le=ge==null?void 0:ge.compData)==null?void 0:Le.map(Y=>{var Ve;return(Y==null?void 0:Y.key)==="formContent"&&(Y.contents=(Ve=Y.contents)==null?void 0:Ve.map(S=>(S.value=ue,S))),Y}),(J=ue==null?void 0:ue.split(","))!=null&&J.find(Y=>Y.includes(".obj"))?(Ke=(De=ue==null?void 0:ue.split(","))==null?void 0:De.filter(Y=>Y.includes(".obj")||Y.includes(".mtl")))==null||Ke.map(async Y=>{var Ve,S;if(Y.includes(".obj")){const fe=(((Ve=D==null?void 0:D.find(le=>(le==null?void 0:le.key)===m))==null?void 0:Ve.download)??"")+"/"+Y,oe=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),F=await B.axios.post(fe,null,{responseType:"blob",headers:{Authorization:oe,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let he=new Blob([F.data],{type:"application/octet-stream;charset=UTF-8"});Ye(he)}else if(Y.includes(".mtl")){const fe=(((S=D==null?void 0:D.find(le=>(le==null?void 0:le.key)===m))==null?void 0:S.download)??"")+"/"+Y,oe=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),F=await B.axios.post(fe,null,{responseType:"blob",headers:{Authorization:oe,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let he=new Blob([F.data],{type:"application/octet-stream;charset=UTF-8"});Ye(he)}}):(Ze=ue==null?void 0:ue.split(","))==null||Ze.map(async Y=>{var F,he;""+((F=Y==null?void 0:Y.split("."))==null?void 0:F[1]);const S=(((he=D==null?void 0:D.find(le=>(le==null?void 0:le.key)===m))==null?void 0:he.download)??"")+"/"+Y,K=sessionStorage.getItem("magicToken")===""?"123456":sessionStorage.getItem("magicToken"),fe=await B.axios.post(S,null,{responseType:"blob",headers:{Authorization:K,baseURL:"http://139.196.154.85:20025","Content-Type":"application/json"}});let oe=new Blob([fe.data],{type:"application/octet-stream;charset=UTF-8"});Ye(oe)})}})}else throw B.ElMessage.error("响应出错了"),new Error("响应出错了")}}else throw B.ElMessage.error("响应出错了"),new Error("响应出错了")};return(f,m)=>{const b=e.resolveComponent("el-button"),O=e.resolveComponent("el-avatar"),V=e.resolveComponent("el-header"),P=e.resolveComponent("el-container"),y=e.resolveComponent("el-icon"),te=e.resolveComponent("el-input"),ne=e.resolveComponent("el-aside"),k=e.resolveComponent("el-collapse-item"),ae=e.resolveComponent("el-collapse"),me=e.resolveComponent("el-main"),ce=e.resolveComponent("router-view"),ve=e.resolveDirective("loading");return e.unref(j)==="edit"?(e.openBlock(),e.createBlock(P,{key:0,class:"client-container"},{default:e.withCtx(()=>[e.createVNode(V,{class:"client-structure-header"},{default:e.withCtx(()=>{var ie;return[e.createElementVNode("div",ko,[e.createVNode(b,{id:"transparentBgButton",onClick:e.unref(A.onBack)},{default:e.withCtx(()=>m[5]||(m[5]=[e.createTextVNode(" 返回页面 ")])),_:1,__:[5]},8,["onClick"]),e.createVNode(b,{id:"transparentBgButton",onClick:m[0]||(m[0]=E=>{var _e,ye;return e.unref(A.clickSavePage)((ye=(_e=e.unref(d))==null?void 0:_e.map(Te=>Te.value))==null?void 0:ye.join("/"))})},{icon:e.withCtx(()=>[e.createVNode(Ee.SvgIcon,{name:"Store"})]),default:e.withCtx(()=>[m[6]||(m[6]=e.createTextVNode(" 保存页面 "))]),_:1,__:[6]})]),e.createElementVNode("div",xo,[(e.openBlock(),e.createBlock(dt,{key:e.unref(d),breadArray:e.unref(d),onClick:e.unref(A.onClick)},null,8,["breadArray","onClick"]))]),e.createElementVNode("div",Eo,[e.renderSlot(f.$slots,"default",{},void 0,!0),e.createVNode(O,{size:35,src:(ie=e.unref(Q))==null?void 0:ie.avatarUrl},{default:e.withCtx(()=>{var E;return[e.createTextVNode(e.toDisplayString(((E=e.unref(Q))==null?void 0:E.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.unref(j)==="edit"?(e.openBlock(),e.createBlock(P,{key:0,class:"model-operate",style:{"margin-top":"10px",height:"0px"}},{default:e.withCtx(()=>[e.createElementVNode("div",To,[e.createVNode(Be.modelSelect)]),e.createElementVNode("div",Vo,[e.createVNode(Be.modelShow)]),e.createElementVNode("div",Bo,[e.createVNode(Be.modelFill)])]),_:1})):e.createCommentVNode("",!0)]),_:3})):e.withDirectives((e.openBlock(),e.createBlock(P,{key:1,class:"client-container","element-loading-text":"正在加载页面数据..."},{default:e.withCtx(()=>[e.createVNode(V,{class:"client-header"},{default:e.withCtx(()=>{var ie;return[e.createElementVNode("div",No,[e.createVNode(Ee.SvgIcon,{name:"logo",style:{width:"clamp(18px, 1.5rem, 24px)",height:"clamp(18px, 1.5rem, 24px)","margin-right":"8px"}}),e.createTextVNode(" "+e.toDisplayString(e.unref(U)===""?"CPMPIP":e.unref(U)),1)]),e.createElementVNode("div",Po,[e.createVNode(ct,{mode:"horizontal"})]),e.createElementVNode("div",So,[e.createVNode(te,{modelValue:pe.value,"onUpdate:modelValue":m[1]||(m[1]=E=>pe.value=E),clearable:"",placeholder:"搜索",style:{width:"130px"}},{prefix:e.withCtx(()=>[e.createVNode(y,{class:"el-input__icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(lt.search_default))]),_:1})]),_:1},8,["modelValue"]),i.showButton?(e.openBlock(),e.createBlock(b,{key:0,id:"transparentBgButton"},{icon:e.withCtx(()=>[e.createVNode(Ee.SvgIcon,{name:"App"})]),default:e.withCtx(()=>[m[7]||(m[7]=e.createTextVNode(" 生成APP "))]),_:1,__:[7]})):e.createCommentVNode("",!0),i.showButton&&e.unref(j)==="view"?(e.openBlock(),e.createBlock(b,{key:1,id:"transparentBgButton",onClick:e.unref(A.onSelectFixContent)},{icon:e.withCtx(()=>[e.createVNode(Ee.SvgIcon,{name:"write"})]),default:e.withCtx(()=>[m[8]||(m[8]=e.createTextVNode(" 修改布局 "))]),_:1,__:[8]},8,["onClick"])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"default",{},void 0,!0),e.createVNode(O,{size:35,src:(ie=e.unref(Q))==null?void 0:ie.avatarUrl},{default:e.withCtx(()=>{var E;return[e.createTextVNode(e.toDisplayString(((E=e.unref(Q))==null?void 0:E.account)??"未知"),1)]}),_:1},8,["src"])])]}),_:3}),e.createVNode(P,{class:"client-body"},{default:e.withCtx(()=>[f.$route.path==="/"?(e.openBlock(),e.createBlock(me,{key:0,class:"client-main"},{default:e.withCtx(()=>[e.createVNode(ae,{modelValue:N.value,"onUpdate:modelValue":m[2]||(m[2]=ie=>N.value=ie),accordion:"",class:"client-aside",id:"menuCollapse",onChange:w},{default:e.withCtx(()=>[e.createVNode(k,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Ee.SvgIcon,{name:N.value===""?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>[e.createVNode(ne,{style:{width:"100%"}},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1})]),_:1})]),_:1},8,["modelValue"]),e.createElementVNode("div",Mo,[e.createVNode(eo,{isShow:M.value,windowConfig:i.windowConfig,ref_key:"threeModelRef",ref:x},null,8,["isShow","windowConfig"])]),e.createVNode(ae,{modelValue:Ce.value,"onUpdate:modelValue":m[4]||(m[4]=ie=>Ce.value=ie),accordion:"",class:"client-main-operate",id:"operateCollapse",onChange:z},{default:e.withCtx(()=>[e.createVNode(k,{name:"open"},{icon:e.withCtx(()=>[e.createVNode(Ee.SvgIcon,{name:Ce.value==="open"?"Right":"Left",style:{width:"20px",height:"20px"}},null,8,["name"])]),default:e.withCtx(()=>{var ie;return[e.createElementVNode("div",null,[e.createVNode(Ee.SvgIcon,{class:"fold-icon",name:Z.value?"Right":"Left",onClick:Ge},null,8,["name"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((ie=e.unref(Ie.cloneDeep)(e.unref(A.showItems)))==null?void 0:ie.filter(E=>E.comp!=="FormTop"),(E,_e)=>{var ye;return e.openBlock(),e.createElementBlock("div",{class:"item-view-content",key:_e},[((ye=E==null?void 0:E.comp)==null?void 0:ye.toUpperCase())!=="TABLE"?(e.openBlock(),e.createElementBlock("div",Do,e.toDisplayString(E.name),1)):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(A.getComponents)(E.comp)),{compName:E.name,itemData:E==null?void 0:E.compData,childItemData:E==null?void 0:E.itemChildData,key:(E==null?void 0:E.id)??_e,onChange:e.unref(A.onChange),index:(E==null?void 0:E.id)??_e,onContentChange:e.unref(A.onContentChange),onPageChange:e.unref(A.onPageChange)},null,40,["compName","itemData","childItemData","onChange","index","onContentChange","onPageChange"]))])}),128)),s.value?(e.openBlock(),e.createElementBlock("div",Ro,[r.value?(e.openBlock(),e.createBlock($e._sfc_main,{key:0,class:"calculator-content",onClickTrigger:Je,loading:l.value,modelValue:"预览"},null,8,["loading"])):e.createCommentVNode("",!0),e.createVNode($e._sfc_main,{class:"calculator-content",onClickTrigger:m[3]||(m[3]=E=>Pe()),loading:n.value,modelValue:"调用方法"},null,8,["loading"])])):e.createCommentVNode("",!0),v.value?(e.openBlock(),e.createElementBlock("div",Ao,[e.createVNode($e._sfc_main,{class:"calculator-content",modelValue:"执行方法",onClickTrigger:q,loading:g.value},null,8,["loading"])])):e.createCommentVNode("",!0)])]}),_:1})]),_:1},8,["modelValue"])]),_:1})):(e.openBlock(),e.createBlock(me,{key:1,class:"client-router"},{default:e.withCtx(()=>[e.createElementVNode("div",Fo,[e.createVNode(ne,{width:"300px"},{default:e.withCtx(()=>[e.createVNode(We.default,{mode:"vertical"})]),_:1})]),e.createElementVNode("div",Lo,[e.createVNode(ce)])]),_:1}))]),_:1})]),_:3})),[[ve,e.unref(p)]])}}}),jo=Ne._export_sfc(Oo,[["__scopeId","data-v-c30c56d4"]]),Uo={class:"system-wrap"},zo={__name:"index",props:{windowConfig:{type:Object,default:()=>{}},platform:{type:String,default:"browser"},showButton:{type:Boolean,default:!0},content:String,jsonContents:Array},setup(i){const t=a.useModelComp(ke.pinia),o=a.useUnit(ke.pinia),n=B.useMenuState();e.ref(!1);const d=e.ref(!0),s=i,r=e.computed(()=>{switch(s==null?void 0:s.platform){case"browser":return nt.browserThemeConfig;case"client":return nt.clientThemeConfig}}),l=c=>{const v=document.documentElement;c==null||c.forEach(L=>{v.style.setProperty(L.name,L.value)})};return e.watch(()=>s.platform,(c,v)=>{c&&l(r.value)},{immediate:!0}),e.watch(()=>[s==null?void 0:s.content,s==null?void 0:s.jsonContents],async()=>{var L,X,Q,W;if(((L=s==null?void 0:s.jsonContents)==null?void 0:L.length)>0){t.setOriginalData(s==null?void 0:s.jsonContents);return}if(!(s!=null&&s.content)||((X=s==null?void 0:s.content)==null?void 0:X.length)===0)return;d.value=!0,n.setImportLoading(!0);let c=[],v=[];o.setSelectTitle([]),o.setSelectIndex(""),o.setSelectMenu(""),(W=(Q=s==null?void 0:s.content)==null?void 0:Q.filter(j=>j!==""))==null||W.forEach(j=>{Fe.isExpandStringToJson(j)?v.push(Fe.expandStringToJson(j)):Fe.expandNewStringToJson(j)?v.push(Fe.expandNewStringToJson(j)):Fe.expandContentStringToJson(j)?v.push(Fe.expandContentStringToJson(j)):v.push(A.expandToNewContents(j))}),c=v==null?void 0:v[0],await A.savePageDataAsync(c),await a.loadingSystemType(),t.setOriginalData(c),n.setImportLoading(!1)},{deep:!0,immediate:!0}),(c,v)=>(e.openBlock(),e.createElementBlock("div",Uo,[i.platform==="browser"?(e.openBlock(),e.createBlock(bo,{key:0,showButton:i.showButton},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["showButton"])):(e.openBlock(),e.createBlock(jo,{key:1,windowConfig:i.windowConfig,showButton:i.showButton},{default:e.withCtx(()=>[e.renderSlot(c.$slots,"default",{},void 0,!0)]),_:3},8,["windowConfig","showButton"]))]))}},Io=Ne._export_sfc(zo,[["__scopeId","data-v-63e718b2"]]),$o={class:"add-model-content"},Yo={key:0,class:"model-operate"},Ho={class:"model-select"},Ko={class:"model-fill"},Zo={key:1,class:"model-view"},qo={__name:"index",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0},pathContent:{type:String,default:""}},emits:["change","contentChange"],setup(i,{emit:t}){const o=i,n=t,d=e.ref([]),s=e.ref([]),r=e.ref([]),l=e.ref(0),c=a.useModelComp(ke.pinia),v=B.useMenuState(ke.pinia),{itemData:L,originalData:X}=B.storeToRefs(c),{activeMenuPath:Q,platform:W}=B.storeToRefs(v),j=e.ref(null),$=e.ref(0),u=e.ref([]);e.ref("");const C=e.ref(0);e.watch(()=>o==null?void 0:o.pathContent,()=>{(o==null?void 0:o.pathContent)!==""&&c.setSystemPath(o==null?void 0:o.pathContent)},{deep:!0,immediate:!0});const h=p=>{n("contentChange",p)},x=p=>{var U;const T=(U=Ie.cloneDeep(p==null?void 0:p.wholeValue))==null?void 0:U.map(M=>{var q;return(M==null?void 0:M.comp)==="Form"&&(M.compData=(q=M.compData)==null?void 0:q.map(ee=>((ee==null?void 0:ee.key)==="formContent"&&(ee.contents=Fe.arrayToNumberArray(ee==null?void 0:ee.contents)),ee))),M});n("change",{originalContents:X.value,currentContents:p==null?void 0:p.wholeValue,editContent:p==null?void 0:p.editValue,arrayToContents:T})};e.watch(()=>s.value,()=>{C.value===s.value.length&&s.value.length!==0&&(d.value=s.value)},{deep:!0,immediate:!0});const _=()=>{j.value.click()},g=async p=>{const T=p.target.files;if(!T)return;new FileReader,d.value=[],s.value=[],C.value=T.length;const U=Array.from(T).map(async M=>await new Promise(q=>{const ee=new FileReader;ee.onload=Pe=>{try{s.value.push(Pe.target.result),$.value++}catch(pe){console.error("解析失败:",pe);return}},ee.onerror=()=>q(`读取 ${M.name} 失败`),ee.readAsText(M),p.target.value="",j.value=null}));await Promise.all(U)};return e.watch(()=>[o==null?void 0:o.content,o==null?void 0:o.jsonContents],async()=>{await a.loadingSystemType(),d.value=o.content,r.value=o==null?void 0:o.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>$.value,()=>{var p;((p=u.value)==null?void 0:p.length)!==0&&(c.setOriginalData(u.value),c.setItemData(u.value))},{deep:!0,immediate:!0}),(p,T)=>{const U=e.resolveComponent("svg-icon"),M=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$o,[(o==null?void 0:o.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",Yo,[e.createElementVNode("div",Ho,[e.createVNode(Be.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:l.value},[e.createVNode(Be.modelShow)])),e.createElementVNode("div",Ko,[e.createVNode(Be.modelFill)])])):e.createCommentVNode("",!0),(o==null?void 0:o.mode)==="view"?(e.openBlock(),e.createElementBlock("div",Zo,[(e.openBlock(),e.createBlock(Io,{showButton:i.showButton,platform:e.unref(W),content:d.value,onChange:x,jsonContents:r.value,onContentChange:h,key:l.value},{default:e.withCtx(()=>{var q;return[((q=o==null?void 0:o.jsonContents)==null?void 0:q.length)===0&&(o!=null&&o.showButton)?(e.openBlock(),e.createBlock(M,{key:0,id:"transparentBgButton",onClick:_},{icon:e.withCtx(()=>[e.createVNode(U,{name:"import"})]),default:e.withCtx(()=>[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:j,accept:".txt, .inm",onChange:g,style:{display:"none"},multiple:""},null,544),T[0]||(T[0]=e.createTextVNode(" 导入模型 "))]),_:1,__:[0]})):e.createCommentVNode("",!0)]}),_:1},8,["showButton","platform","content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},Xo=Ne._export_sfc(qo,[["__scopeId","data-v-14b5611b"]]);exports.default=Xo;