
/**
 * 由 Fantastic-admin 提供技术支持
 * Powered by Fantastic-admin
 * https://fantastic-admin.hurui.me
 */
  
import{C as e}from"./reactivity.esm-bundler-D9OPVc9J.js";import{Ht as t,St as n,_ as r,b as i,bt as a,mt as o,o as s,v as c,y as l}from"./runtime-core.esm-bundler-D-xeQwTN.js";var u=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],d=[`x1`,`y1`,`x2`,`y2`,`stroke`,`stroke-width`],f={__name:`RecursiveLinks`,props:{dataset:{type:Array,default:()=>[]},color:{type:String,default:`#DDDDDD`},backgroundColor:{type:String,default:`#FFFFFF`},useChildColor:{type:Boolean,default:!1}},setup(f){let p=f,m=e([]);return t(()=>p.dataset,e=>{let t=e||[];t.forEach(e=>{e.nodes&&e.nodes.length>0&&e.nodes.forEach(t=>{t.ancestor!==e&&(t.ancestor=e)})}),m.value=t},{immediate:!0}),(e,t)=>{let p=n(`RecursiveLinks`,!0);return o(),i(s,null,[(o(!0),i(s,null,a(m.value,(e,t)=>(o(),i(s,{key:`level_${t}`},[e.polygonPath&&e.polygonPath.coordinates?(o(!0),i(s,{key:0},a(e.polygonPath.coordinates,(n,a)=>(o(),i(s,{key:`node_${t}_${a}`},[e.ancestor&&e.ancestor.polygonPath?(o(),i(s,{key:0},[r(`line`,{x1:n.x,y1:n.y,x2:e.ancestor.polygonPath.coordinates[0].x,y2:e.ancestor.polygonPath.coordinates[0].y,stroke:f.backgroundColor,"stroke-width":e.strokeWidth*1.5},null,8,u),r(`line`,{x1:n.x,y1:n.y,x2:e.ancestor.polygonPath.coordinates[0].x,y2:e.ancestor.polygonPath.coordinates[0].y,stroke:f.useChildColor?e.color:f.color,"stroke-width":e.strokeWidth},null,8,d)],64)):l(``,!0)],64))),128)):l(``,!0)],64))),128)),(o(!0),i(s,null,a(m.value,e=>(o(),i(s,{key:`children_${e.uid||e.name}`},[e.polygonPath&&e.polygonPath.coordinates?(o(),i(s,{key:0},[e.nodes&&e.nodes.length>0?(o(),c(p,{key:0,dataset:e.nodes,color:f.color,useChildColor:f.useChildColor,backgroundColor:f.backgroundColor},null,8,[`dataset`,`color`,`useChildColor`,`backgroundColor`])):l(``,!0)],64)):l(``,!0)],64))),128))],64)}}};export{f as default};