"use strict";(self.webpackChunk=self.webpackChunk||[]).push([["node_modules_mermaid_dist_classDiagram-v2-f2df5561_js"],{"./node_modules/mermaid/dist/classDiagram-v2-f2df5561.js":function(W,S,c){c.d(S,{diagram:function(){return N}});var g=c("./node_modules/mermaid/dist/styles-991ebdfc.js"),v=c("./node_modules/d3/src/index.js"),P=c("./node_modules/dagre-d3-es/src/graphlib/index.js"),t=c("./node_modules/mermaid/dist/mermaid-f47111a7.js"),C=c("./node_modules/mermaid/dist/index-fc10efb0.js"),K=c("./node_modules/dayjs/dayjs.min.js"),$=c("./node_modules/@braintree/sanitize-url/dist/index.js"),z=c("./node_modules/dompurify/dist/purify.js"),G=c("./node_modules/dagre-d3-es/src/dagre/index.js"),H=c("./node_modules/dagre-d3-es/src/graphlib/json.js");const x=o=>t.e.sanitizeText(o,(0,t.c)());let E={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const j=function(o,s,f,i){const e=Object.keys(o);t.l.info("keys:",e),t.l.info(o),e.forEach(function(d){var l,r;const n=o[d],_={shape:"rect",id:n.id,domId:n.domId,labelText:x(n.id),labelStyle:"",style:"fill: none; stroke: black",padding:((l=(0,t.c)().flowchart)==null?void 0:l.padding)??((r=(0,t.c)().class)==null?void 0:r.padding)};s.setNode(n.id,_),L(n.classes,s,f,i,n.id),t.l.info("setNode",_)})},L=function(o,s,f,i,e){const d=Object.keys(o);t.l.info("keys:",d),t.l.info(o),d.filter(l=>o[l].parent==e).forEach(function(l){var r,n;const a=o[l],_=a.cssClasses.join(" "),y=(0,t.k)(a.styles),p=a.label??a.id,b=0,u={labelStyle:y.labelStyle,shape:"class_box",labelText:x(p),classData:a,rx:b,ry:b,class:_,style:y.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id,e)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:((r=(0,t.c)().flowchart)==null?void 0:r.padding)??((n=(0,t.c)().class)==null?void 0:n.padding)};s.setNode(a.id,u),e&&s.setParent(a.id,e),t.l.info("setNode",u)})},A=function(o,s,f,i){t.l.info(o),o.forEach(function(e,d){var l,r;const n=e,a="",_={labelStyle:"",style:""},y=n.text,p=0,m={labelStyle:_.labelStyle,shape:"note",labelText:x(y),noteData:n,rx:p,ry:p,class:a,style:_.style,id:n.id,domId:n.id,tooltip:"",type:"note",padding:((l=(0,t.c)().flowchart)==null?void 0:l.padding)??((r=(0,t.c)().class)==null?void 0:r.padding)};if(s.setNode(n.id,m),t.l.info("setNode",m),!n.class||!(n.class in i))return;const u=f+d,T={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:(0,t.n)(E.curve,v.lUB)};s.setEdge(n.id,n.class,T,u)})},B=function(o,s){const f=(0,t.c)().flowchart;let i=0;o.forEach(function(e){var d;i++;const l={classes:"relation",pattern:e.relation.lineType==1?"dashed":"solid",id:`id_${e.id1}_${e.id2}_${i}`,arrowhead:e.type==="arrow_open"?"none":"normal",startLabelRight:e.relationTitle1==="none"?"":e.relationTitle1,endLabelLeft:e.relationTitle2==="none"?"":e.relationTitle2,arrowTypeStart:k(e.relation.type1),arrowTypeEnd:k(e.relation.type2),style:"fill:none",labelStyle:"",curve:(0,t.n)(f?.curve,v.lUB)};if(t.l.info(l,e),e.style!==void 0){const r=(0,t.k)(e.style);l.style=r.style,l.labelStyle=r.labelStyle}e.text=e.title,e.text===void 0?e.style!==void 0&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",((d=(0,t.c)().flowchart)==null?void 0:d.htmlLabels)??(0,t.c)().htmlLabels?(l.labelType="html",l.label='<span class="edgeLabel">'+e.text+"</span>"):(l.labelType="text",l.label=e.text.replace(t.e.lineBreakRegex,`
`),e.style===void 0&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),s.setEdge(e.id1,e.id2,l,i)})},I=function(o){E={...E,...o}},O=async function(o,s,f,i){t.l.info("Drawing class - ",s);const e=(0,t.c)().flowchart??(0,t.c)().class,d=(0,t.c)().securityLevel;t.l.info("config:",e);const l=e?.nodeSpacing??50,r=e?.rankSpacing??50,n=new P.T({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:l,ranksep:r,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),a=i.db.getNamespaces(),_=i.db.getClasses(),y=i.db.getRelations(),p=i.db.getNotes();t.l.info(y),j(a,n,s,i),L(_,n,s,i),B(y,n),A(p,n,y.length+1,_);let b;d==="sandbox"&&(b=(0,v.Ltv)("#i"+s));const m=d==="sandbox"?(0,v.Ltv)(b.nodes()[0].contentDocument.body):(0,v.Ltv)("body"),u=m.select(`[id="${s}"]`),T=m.select("#"+s+" g");if(await(0,C.r)(T,n,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",s),t.u.insertTitle(u,"classTitleText",e?.titleTopMargin??5,i.db.getDiagramTitle()),(0,t.o)(n,u,e?.diagramPadding,e?.useMaxWidth),!e?.htmlLabels){const M=d==="sandbox"?b.nodes()[0].contentDocument:document,U=M.querySelectorAll('[id="'+s+'"] .edgeLabel .label');for(const D of U){const w=D.getBBox(),h=M.createElementNS("http://www.w3.org/2000/svg","rect");h.setAttribute("rx",0),h.setAttribute("ry",0),h.setAttribute("width",w.width),h.setAttribute("height",w.height),D.insertBefore(h,D.firstChild)}}};function k(o){let s;switch(o){case 0:s="aggregation";break;case 1:s="extension";break;case 2:s="composition";break;case 3:s="dependency";break;case 4:s="lollipop";break;default:s="none"}return s}const R={setConf:I,draw:O},N={parser:g.p,db:g.d,renderer:R,styles:g.s,init:o=>{o.class||(o.class={}),o.class.arrowMarkerAbsolute=o.arrowMarkerAbsolute,g.d.clear()}}}}]);
