"use strict";exports.id=7362,exports.ids=[7362],exports.modules={47362:(a,b,c)=>{c.d(b,{diagram:()=>y});var d=c(39636),e=c(93273),f=c(98908),g=c(70400),h=c(65246),i=c(21143),j=c(92325),k=new f.m(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),l=(0,i.K2)(()=>{k.reset(),(0,h.IU)()},"clear"),m=(0,i.K2)(()=>k.records.stack[0],"getRoot"),n=(0,i.K2)(()=>k.records.cnt,"getCount"),o=h.UI.treeView,p=(0,i.K2)(()=>(0,g.$t)(o,(0,h.zj)().treeView),"getConfig"),q={clear:l,addNode:(0,i.K2)((a,b)=>{for(;a<=k.records.stack[k.records.stack.length-1].level;)k.records.stack.pop();let c={id:k.records.cnt++,level:a,name:b,children:[]};k.records.stack[k.records.stack.length-1].children.push(c),k.records.stack.push(c)},"addNode"),getRoot:m,getCount:n,getConfig:p,getAccTitle:h.iN,getAccDescription:h.m7,getDiagramTitle:h.ab,setAccDescription:h.EI,setAccTitle:h.SV,setDiagramTitle:h.ke},r=(0,i.K2)(a=>{(0,e.S)(a,q),a.nodes.map(a=>q.addNode(a.indent?parseInt(a.indent):0,a.name))},"populate"),s={parse:(0,i.K2)(async a=>{let b=await (0,j.qg)("treeView",a);i.Rm.debug(b),r(b)},"parse")},t=(0,i.K2)((a,b,c,d,e)=>{let f=d.append("text").text(c.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:g,width:h}=f.node().getBBox(),i=g+2*e.paddingY,j=h+2*e.paddingX;f.attr("x",a+e.paddingX),f.attr("y",b+i/2),c.BBox={x:a,y:b,width:j,height:i}},"positionLabel"),u=(0,i.K2)((a,b,c,d,e,f)=>a.append("line").attr("x1",b).attr("y1",c).attr("x2",d).attr("y2",e).attr("stroke-width",f).attr("class","treeView-node-line"),"positionLine"),v=(0,i.K2)((a,b,c)=>{let d=0,e=0,f=(0,i.K2)((a,b,c,f)=>{let g=f*(c.rowIndent+c.paddingX);t(g,d,b,a,c);let{height:h,width:i}=b.BBox;u(a,g-c.rowIndent,d+h/2,g,d+h/2,c.lineThickness),e=Math.max(e,g+i),d+=h},"drawNode"),g=(0,i.K2)((b,d=0)=>{f(a,b,c,d),b.children.forEach(a=>{g(a,d+1)});let{x:e,y:h,height:i}=b.BBox;if(b.children.length){let{y:d,height:f}=b.children[b.children.length-1].BBox;u(a,e+c.paddingX,h+i,e+c.paddingX,d+f/2+c.lineThickness/2,c.lineThickness)}},"processNode");return g(b),{totalHeight:d,totalWidth:e}},"drawTree"),w=(0,i.K2)((a,b,c,e)=>{i.Rm.debug("Rendering treeView diagram\n"+a);let f=e.db,g=f.getRoot(),j=f.getConfig(),k=(0,d.D)(b),l=k.append("g");l.attr("class","tree-view");let{totalHeight:m,totalWidth:n}=v(l,g,j);k.attr("viewBox",`-${j.lineThickness/2} 0 ${n} ${m}`),(0,h.a$)(k,m,n,j.useMaxWidth)},"draw"),x={labelFontSize:"16px",labelColor:"black",lineColor:"black"},y={db:q,renderer:{draw:w},parser:s,styles:(0,i.K2)(({treeView:a})=>{let{labelFontSize:b,labelColor:c,lineColor:d}=(0,g.$t)(x,a);return`
    .treeView-node-label {
        font-size: ${b};
        fill: ${c};
    }
    .treeView-node-line {
        stroke: ${d};
    }
    `},"styles")}},93273:(a,b,c)=>{function d(a,b){a.accDescr&&b.setAccDescription?.(a.accDescr),a.accTitle&&b.setAccTitle?.(a.accTitle),a.title&&b.setDiagramTitle?.(a.title)}c.d(b,{S:()=>d}),(0,c(21143).K2)(d,"populateCommonDb")},98908:(a,b,c)=>{c.d(b,{m:()=>e});var d=c(21143),e=class{constructor(a){this.init=a,this.records=this.init()}static{(0,d.K2)(this,"ImperativeState")}reset(){this.records=this.init()}}}};