import{d as c}from"./debounce-Xd493GvO.js";import{u as y}from"./useOnEvent-Cta5e-FG.js";import{ar as v}from"./echarts-DB130vfq.js";import{s as g,r as u,c as o,w as p,j as O,n as _,S as b,B as j,z as k}from"./vue-BJk78QHK.js";import"./index-M_JNBppB.js";import"./element-3_pOinej.js";import"./utils-YI6ye1sf.js";import"./threejs-BafxXW5-.js";import"./vxe-Dx3zSILm.js";const E=Object.assign({name:"PathPoint"},{__name:"PathPoint",props:{propValue:{type:Object,default:()=>({})},request:{type:Object,default:()=>({})},element:{type:Object,default:()=>({})},linkage:{type:Object,default:()=>({})}},setup(f){const a=f,e=g(null),s=u(null),d=o(()=>a.propValue.option),h=o(()=>{const n=a.element.style.width,t=a.element.style.height;return{width:n,height:t}});function l(){if(e.value){e.value.clear();const n=JSON.parse(JSON.stringify(d.value)),t=n.series.find(r=>r.type==="lines");t&&t.data&&(t.data=t.data.filter(r=>r.coords&&Array.isArray(r.coords)&&r.coords.length>=2&&r.coords.every(i=>Array.isArray(i)&&i.length===2))),e.value.setOption(n,!0)}}function m(){e.value&&e.value.resize()}return p(h,c(()=>{m()},10),{deep:!0}),p(a.propValue,c(()=>{l()},10),{deep:!0}),y(o(()=>a.linkage),u(a.element)),O(()=>{e.value=v(s.value,"vintage"),_(()=>{l()})}),b(()=>{e.value&&(e.value.clear(),e.value=null)}),(n,t)=>(k(),j("div",{ref_key:"chartRef",ref:s,style:{width:"100%",height:"100%"}},null,512))}});export{E as default};
