"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1799],{7271:function(e,t,i){function r(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}i.d(t,{A:function(){return r}}),(0,i(7632).eW)(r,"populateCommonDb")},751:function(e,t,i){i.d(t,{A:function(){return n}});var r=i(7632),n=class{constructor(e){this.init=e,this.records=this.init()}static{(0,r.eW)(this,"ImperativeState")}reset(){this.records=this.init()}}},1799:function(e,t,i){i.d(t,{diagram:function(){return A}});var r=i(8999),n=i(7271),a=i(751),c=i(778),s=i(9125),d=i(7632),l=i(2759),o=new a.A(()=>({cnt:1,stack:[{id:0,level:-1,name:"/",children:[]}]})),g=(0,d.eW)(()=>{o.reset(),(0,s.ZH)()},"clear"),h=(0,d.eW)(()=>o.records.stack[0],"getRoot"),p=(0,d.eW)(()=>o.records.cnt,"getCount"),u=s.vZ.treeView,w=(0,d.eW)(()=>(0,c.Rb)(u,(0,s.iE)().treeView),"getConfig"),k={clear:g,addNode:(0,d.eW)((e,t)=>{for(;e<=o.records.stack[o.records.stack.length-1].level;)o.records.stack.pop();let i={id:o.records.cnt++,level:e,name:t,children:[]};o.records.stack[o.records.stack.length-1].children.push(i),o.records.stack.push(i)},"addNode"),getRoot:h,getCount:p,getConfig:w,getAccTitle:s.eu,getAccDescription:s.Mx,getDiagramTitle:s.Kr,setAccDescription:s.U$,setAccTitle:s.GN,setDiagramTitle:s.g2},b=(0,d.eW)(e=>{(0,n.A)(e,k),e.nodes.map(e=>k.addNode(e.indent?parseInt(e.indent):0,e.name))},"populate"),f={parse:(0,d.eW)(async e=>{let t=await (0,l.Qc)("treeView",e);d.cM.debug(t),b(t)},"parse")},W=(0,d.eW)((e,t,i,r,n)=>{let a=r.append("text").text(i.name).attr("dominant-baseline","middle").attr("class","treeView-node-label"),{height:c,width:s}=a.node().getBBox(),d=c+2*n.paddingY,l=s+2*n.paddingX;a.attr("x",e+n.paddingX),a.attr("y",t+d/2),i.BBox={x:e,y:t,width:l,height:d}},"positionLabel"),m=(0,d.eW)((e,t,i,r,n,a)=>e.append("line").attr("x1",t).attr("y1",i).attr("x2",r).attr("y2",n).attr("stroke-width",a).attr("class","treeView-node-line"),"positionLine"),x=(0,d.eW)((e,t,i)=>{let r=0,n=0,a=(0,d.eW)((e,t,i,a)=>{let c=a*(i.rowIndent+i.paddingX);W(c,r,t,e,i);let{height:s,width:d}=t.BBox;m(e,c-i.rowIndent,r+s/2,c,r+s/2,i.lineThickness),n=Math.max(n,c+d),r+=s},"drawNode"),c=(0,d.eW)((t,r=0)=>{a(e,t,i,r),t.children.forEach(e=>{c(e,r+1)});let{x:n,y:s,height:d}=t.BBox;if(t.children.length){let{y:r,height:a}=t.children[t.children.length-1].BBox;m(e,n+i.paddingX,s+d,n+i.paddingX,r+a/2+i.lineThickness/2,i.lineThickness)}},"processNode");return c(t),{totalHeight:r,totalWidth:n}},"drawTree"),T=(0,d.eW)((e,t,i,n)=>{d.cM.debug("Rendering treeView diagram\n"+e);let a=n.db,c=a.getRoot(),l=a.getConfig(),o=(0,r.P)(t),g=o.append("g");g.attr("class","tree-view");let{totalHeight:h,totalWidth:p}=x(g,c,l);o.attr("viewBox",`-${l.lineThickness/2} 0 ${p} ${h}`),(0,s.v2)(o,h,p,l.useMaxWidth)},"draw"),B={labelFontSize:"16px",labelColor:"black",lineColor:"black"},A={db:k,renderer:{draw:T},parser:f,styles:(0,d.eW)(({treeView:e})=>{let{labelFontSize:t,labelColor:i,lineColor:r}=(0,c.Rb)(B,e);return`
    .treeView-node-label {
        font-size: ${t};
        fill: ${i};
    }
    .treeView-node-line {
        stroke: ${r};
    }
    `},"styles")}}}]);