All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webapp.flowDiagram-b222e15a.22308258.js Maven / Gradle / Ivy

function t(t,e,a,r){Object.defineProperty(t,e,{get:a,set:r,enumerable:!0,configurable:!0})}var e=globalThis.parcelRequire3bab;(0,e.register)("hl1Sc",function(a,r){t(a.exports,"a",()=>d),t(a.exports,"c",()=>h),t(a.exports,"l",()=>o),t(a.exports,"u",()=>c),t(a.exports,"i",()=>p),t(a.exports,"e",()=>M),t(a.exports,"s",()=>T),t(a.exports,"b",()=>B),t(a.exports,"p",()=>_),t(a.exports,"g",()=>C),t(a.exports,"k",()=>R),t(a.exports,"m",()=>Y),t(a.exports,"d",()=>H),t(a.exports,"f",()=>I),t(a.exports,"j",()=>N),t(a.exports,"h",()=>q);var i=e("4jcZX"),l=e("2YFJl"),s=e("fmBVZ");let n={extension:(t,e,a)=>{(0,i.l).trace("Making markers for ",a),t.append("defs").append("marker").attr("id",a+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",a+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",a+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},point:(t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(t,e,a)=>{t.append("marker").attr("id",a+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",a+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(t,e,a)=>{t.append("defs").append("marker").attr("id",a+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},d=(t,e,a,r)=>{e.forEach(e=>{n[e](t,a,r)})},h=(t,e,a,r)=>{let s=t||"";if("object"==typeof s&&(s=s[0]),(0,i.m)((0,i.c)().flowchart.htmlLabels))return s=s.replace(/\\n|\n/g,"
"),(0,i.l).debug("vertexText"+s),function(t){var e;let a=(0,l.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=a.append("xhtml:div"),i=t.label,s=t.isNode?"nodeLabel":"edgeLabel";return r.html('"+i+""),(e=t.labelStyle)&&r.attr("style",e),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),a.node()}({isNode:r,label:(0,i.M)(s).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e.replace("fill:","color:")});{let t=document.createElementNS("http://www.w3.org/2000/svg","text");t.setAttribute("style",e.replace("color:","fill:"));for(let e of"string"==typeof s?s.split(/\\n|\n|/gi):Array.isArray(s)?s:[]){let r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),a?r.setAttribute("class","title-row"):r.setAttribute("class","row"),r.textContent=e.trim(),t.appendChild(r)}return t}},o=async(t,e,a,r)=>{let n,d,o;let c=e.useHtmlLabels||(0,i.m)((0,i.c)().flowchart.htmlLabels);n=a||"node default";let y=t.insert("g").attr("class",n).attr("id",e.domId||e.id),p=y.insert("g").attr("class","label").attr("style",e.labelStyle);d=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];let g=p.node(),x=(o="markdown"===e.labelType?(0,s.a)(p,(0,i.d)((0,i.M)(d),(0,i.c)()),{useHtmlLabels:c,width:e.width||(0,i.c)().flowchart.wrappingWidth,classes:"markdown-node-label"}):g.appendChild(h((0,i.d)((0,i.M)(d),(0,i.c)()),e.labelStyle,!1,r))).getBBox(),f=e.padding/2;if((0,i.m)((0,i.c)().flowchart.htmlLabels)){let t=o.children[0],e=(0,l.select)(o),a=t.getElementsByTagName("img");if(a){let t=""===d.replace(/]*>/g,"").trim();await Promise.all([...a].map(e=>new Promise(a=>{function r(){if(e.style.display="flex",e.style.flexDirection="column",t){let t=5*parseInt((0,i.c)().fontSize?(0,i.c)().fontSize:window.getComputedStyle(document.body).fontSize,10)+"px";e.style.minWidth=t,e.style.maxWidth=t}else e.style.width="100%";a(e)}setTimeout(()=>{e.complete&&r()}),e.addEventListener("error",r),e.addEventListener("load",r)})))}x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}return c?p.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"):p.attr("transform","translate(0, "+-x.height/2+")"),e.centerLabel&&p.attr("transform","translate("+-x.width/2+", "+-x.height/2+")"),p.insert("rect",":first-child"),{shapeSvg:y,bbox:x,halfPadding:f,label:p}},c=(t,e)=>{let a=e.node().getBBox();t.width=a.width,t.height=a.height};function y(t,e,a,r){return t.insert("polygon",":first-child").attr("points",r.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+a/2+")")}let p=(t,e)=>{var a,r,i=t.x,l=t.y,s=e.x-i,n=e.y-l,d=t.width/2,h=t.height/2;return Math.abs(n)*d>Math.abs(s)*h?(n<0&&(h=-h),a=0===n?0:h*s/n,r=h):(s<0&&(d=-d),a=d,r=0===s?0:d*n/s),{x:i+a,y:l+r}},g=function(t,e,a){var r,i,l,s,n,d,h;return r=t.x,i=t.y,l=r-a.x,n=Math.sqrt(e*e*(s=i-a.y)*s+e*e*l*l),d=Math.abs(e*e*l/n),a.x0))&&(l=r.y-a.y,n=a.x-r.x,h=r.x*a.y-a.x*r.y,o=l*t.x+n*t.y+h,c=l*e.x+n*e.y+h,!(0!==o&&0!==c&&o*c>0)&&0!=(g=i*n-l*s)))return x=Math.abs(g/2),{x:(f=s*h-n*d)<0?(f-x)/g:(f+x)/g,y:(f=l*d-i*h)<0?(f-x)/g:(f+x)/g}}(t,a,{x:d+c.x,y:h+c.y},{x:d+y.x,y:h+y.y});p&&l.push(p)}return l.length?(l.length>1&&l.sort(function(t,e){var r=t.x-a.x,i=t.y-a.y,l=Math.sqrt(r*r+i*i),s=e.x-a.x,n=e.y-a.y,d=Math.sqrt(s*s+n*n);return l{let e=new Set;for(let a of t)switch(a){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(a)}return e},u=(t,e,a)=>{let r=f(t),i=e.height+2*a.padding,l=i/2,s=e.width+2*l+a.padding,n=a.padding/2;return r.has("right")&&r.has("left")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:l,y:0},{x:s/2,y:2*n},{x:s-l,y:0},{x:s,y:0},{x:s,y:-i/3},{x:s+2*n,y:-i/2},{x:s,y:-2*i/3},{x:s,y:-i},{x:s-l,y:-i},{x:s/2,y:-i-2*n},{x:l,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*n,y:-i/2},{x:0,y:-i/3}]:r.has("right")&&r.has("left")&&r.has("up")?[{x:l,y:0},{x:s-l,y:0},{x:s,y:-i/2},{x:s-l,y:-i},{x:l,y:-i},{x:0,y:-i/2}]:r.has("right")&&r.has("left")&&r.has("down")?[{x:0,y:0},{x:l,y:-i},{x:s-l,y:-i},{x:s,y:0}]:r.has("right")&&r.has("up")&&r.has("down")?[{x:0,y:0},{x:s,y:-l},{x:s,y:-i+l},{x:0,y:-i}]:r.has("left")&&r.has("up")&&r.has("down")?[{x:s,y:0},{x:0,y:-l},{x:0,y:-i+l},{x:s,y:-i}]:r.has("right")&&r.has("left")?[{x:l,y:0},{x:l,y:-n},{x:s-l,y:-n},{x:s-l,y:0},{x:s,y:-i/2},{x:s-l,y:-i},{x:s-l,y:-i+n},{x:l,y:-i+n},{x:l,y:-i},{x:0,y:-i/2}]:r.has("up")&&r.has("down")?[{x:s/2,y:0},{x:0,y:-n},{x:l,y:-n},{x:l,y:-i+n},{x:0,y:-i+n},{x:s/2,y:-i},{x:s,y:-i+n},{x:s-l,y:-i+n},{x:s-l,y:-n},{x:s,y:-n}]:r.has("right")&&r.has("up")?[{x:0,y:0},{x:s,y:-l},{x:0,y:-i}]:r.has("right")&&r.has("down")?[{x:0,y:0},{x:s,y:0},{x:0,y:-i}]:r.has("left")&&r.has("up")?[{x:s,y:0},{x:0,y:-l},{x:s,y:-i}]:r.has("left")&&r.has("down")?[{x:s,y:0},{x:0,y:0},{x:s,y:-i}]:r.has("right")?[{x:l,y:-n},{x:l,y:-n},{x:s-l,y:-n},{x:s-l,y:0},{x:s,y:-i/2},{x:s-l,y:-i},{x:s-l,y:-i+n},{x:l,y:-i+n},{x:l,y:-i+n}]:r.has("left")?[{x:l,y:0},{x:l,y:-n},{x:s-l,y:-n},{x:s-l,y:-i+n},{x:l,y:-i+n},{x:l,y:-i},{x:0,y:-i/2}]:r.has("up")?[{x:l,y:-n},{x:l,y:-i+n},{x:0,y:-i+n},{x:s/2,y:-i},{x:s,y:-i+n},{x:s-l,y:-i+n},{x:s-l,y:-n}]:r.has("down")?[{x:s/2,y:0},{x:0,y:-n},{x:l,y:-n},{x:l,y:-i+n},{x:s-l,y:-i+n},{x:s-l,y:-n},{x:s,y:-n}]:[{x:0,y:0}]},w=t=>t?" "+t:"",b=(t,e)=>`${e||"node default"}${w(t.classes)} ${w(t.class)}`,m=async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),l=r.width+e.padding+(r.height+e.padding),s=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];(0,i.l).info("Question main (Circle)");let n=y(a,l,l,s);return n.attr("style",e.style),c(e,n),e.intersect=function(t){return(0,i.l).warn("Intersect called"),x(e,s,t)},a};function k(t,e,a,r){let l=[],s=t=>{l.push(t,0)},n=t=>{l.push(0,t)};e.includes("t")?((0,i.l).debug("add top border"),s(a)):n(a),e.includes("r")?((0,i.l).debug("add right border"),s(r)):n(r),e.includes("b")?((0,i.l).debug("add bottom border"),s(a)):n(a),e.includes("l")?((0,i.l).debug("add left border"),s(r)):n(r),t.attr("stroke-dasharray",l.join(" "))}let v=(t,e,a)=>{let r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,l=10;return"LR"===a&&(i=10,l=70),c(e,r.append("rect").attr("x",-1*i/2).attr("y",-1*l/2).attr("width",i).attr("height",l).attr("class","fork-join")),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return p(e,t)},r},L={rhombus:m,composite:async(t,e)=>{let{shapeSvg:a,bbox:r,halfPadding:l}=await o(t,e,"node "+e.classes,!0),s=a.insert("rect",":first-child"),n=e.positioned?e.width:r.width+e.padding,d=e.positioned?e.height:r.height+e.padding,h=e.positioned?-n/2:-r.width/2-l,y=e.positioned?-d/2:-r.height/2-l;if(s.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",h).attr("y",y).attr("width",n).attr("height",d),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(k(s,e.props.borders,n,d),t.delete("borders")),t.forEach(t=>{(0,i.l).warn(`Unknown node property ${t}`)})}return c(e,s),e.intersect=function(t){return p(e,t)},a},question:m,rect:async(t,e)=>{let{shapeSvg:a,bbox:r,halfPadding:l}=await o(t,e,"node "+e.classes+" "+e.class,!0),s=a.insert("rect",":first-child"),n=e.positioned?e.width:r.width+e.padding,d=e.positioned?e.height:r.height+e.padding,h=e.positioned?-n/2:-r.width/2-l,y=e.positioned?-d/2:-r.height/2-l;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",h).attr("y",y).attr("width",n).attr("height",d),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(k(s,e.props.borders,n,d),t.delete("borders")),t.forEach(t=>{(0,i.l).warn(`Unknown node property ${t}`)})}return c(e,s),e.intersect=function(t){return p(e,t)},a},labelRect:async(t,e)=>{let{shapeSvg:a}=await o(t,e,"label",!0);(0,i.l).trace("Classes = ",e.class);let r=a.insert("rect",":first-child");if(r.attr("width",0).attr("height",0),a.attr("class","label edgeLabel"),e.props){let t=new Set(Object.keys(e.props));e.props.borders&&(k(r,e.props.borders,0,0),t.delete("borders")),t.forEach(t=>{(0,i.l).warn(`Unknown node property ${t}`)})}return c(e,r),e.intersect=function(t){return p(e,t)},a},rectWithTitle:(t,e)=>{let a;a=e.classes?"node "+e.classes:"node default";let r=t.insert("g").attr("class",a).attr("id",e.domId||e.id),s=r.insert("rect",":first-child"),n=r.insert("line"),d=r.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,y="";y="object"==typeof o?o[0]:o,(0,i.l).info("Label text abc79",y,o,"object"==typeof o);let g=d.node().appendChild(h(y,e.labelStyle,!0,!0)),x={width:0,height:0};if((0,i.m)((0,i.c)().flowchart.htmlLabels)){let t=g.children[0],e=(0,l.select)(g);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}(0,i.l).info("Text 2",o);let f=o.slice(1,o.length),u=g.getBBox(),w=d.node().appendChild(h(f.join?f.join("
"):f,e.labelStyle,!0,!0));if((0,i.m)((0,i.c)().flowchart.htmlLabels)){let t=w.children[0],e=(0,l.select)(w);x=t.getBoundingClientRect(),e.attr("width",x.width),e.attr("height",x.height)}let b=e.padding/2;return(0,l.select)(w).attr("transform","translate( "+(x.width>u.width?0:(u.width-x.width)/2)+", "+(u.height+b+5)+")"),(0,l.select)(g).attr("transform","translate( "+(x.width{let a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);return a.insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return g(e,14,t)},a},circle:async(t,e)=>{let{shapeSvg:a,bbox:r,halfPadding:l}=await o(t,e,b(e,void 0),!0),s=a.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+l).attr("width",r.width+e.padding).attr("height",r.height+e.padding),(0,i.l).info("Circle main"),c(e,s),e.intersect=function(t){return(0,i.l).info("Circle intersect",e,r.width/2+l,t),g(e,r.width/2+l,t)},a},doublecircle:async(t,e)=>{let{shapeSvg:a,bbox:r,halfPadding:l}=await o(t,e,b(e,void 0),!0),s=a.insert("g",":first-child"),n=s.insert("circle"),d=s.insert("circle");return s.attr("class",e.class),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+l+5).attr("width",r.width+e.padding+10).attr("height",r.height+e.padding+10),d.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",r.width/2+l).attr("width",r.width+e.padding).attr("height",r.height+e.padding),(0,i.l).info("DoubleCircle main"),c(e,n),e.intersect=function(t){return(0,i.l).info("DoubleCircle intersect",e,r.width/2+l+5,t),g(e,r.width/2+l+5,t)},a},stadium:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),i=r.height+e.padding,l=r.width+i/4+e.padding,s=a.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-l/2).attr("y",-i/2).attr("width",l).attr("height",i);return c(e,s),e.intersect=function(t){return p(e,t)},a},hexagon:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),i=r.height+e.padding,l=i/4,s=r.width+2*l+e.padding,n=[{x:l,y:0},{x:s-l,y:0},{x:s,y:-i/2},{x:s-l,y:-i},{x:l,y:-i},{x:0,y:-i/2}],d=y(a,s,i,n);return d.attr("style",e.style),c(e,d),e.intersect=function(t){return x(e,n,t)},a},block_arrow:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,void 0,!0),i=r.height+2*e.padding,l=i/2,s=r.width+2*l+e.padding,n=u(e.directions,r,e),d=y(a,s,i,n);return d.attr("style",e.style),c(e,d),e.intersect=function(t){return x(e,n,t)},a},rect_left_inv_arrow:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),i=r.width+e.padding,l=r.height+e.padding,s=[{x:-l/2,y:0},{x:i,y:0},{x:i,y:-l},{x:-l/2,y:-l},{x:0,y:-l/2}];return y(a,i,l,s).attr("style",e.style),e.width=i+l,e.height=l,e.intersect=function(t){return x(e,s,t)},a},lean_right:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e),!0),i=r.width+e.padding,l=r.height+e.padding,s=[{x:-2*l/6,y:0},{x:i-l/6,y:0},{x:i+2*l/6,y:-l},{x:l/6,y:-l}],n=y(a,i,l,s);return n.attr("style",e.style),c(e,n),e.intersect=function(t){return x(e,s,t)},a},lean_left:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),i=r.width+e.padding,l=r.height+e.padding,s=[{x:2*l/6,y:0},{x:i+l/6,y:0},{x:i-2*l/6,y:-l},{x:-l/6,y:-l}],n=y(a,i,l,s);return n.attr("style",e.style),c(e,n),e.intersect=function(t){return x(e,s,t)},a},trapezoid:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),i=r.width+e.padding,l=r.height+e.padding,s=[{x:-2*l/6,y:0},{x:i+2*l/6,y:0},{x:i-l/6,y:-l},{x:l/6,y:-l}],n=y(a,i,l,s);return n.attr("style",e.style),c(e,n),e.intersect=function(t){return x(e,s,t)},a},inv_trapezoid:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),i=r.width+e.padding,l=r.height+e.padding,s=[{x:l/6,y:0},{x:i-l/6,y:0},{x:i+2*l/6,y:-l},{x:-2*l/6,y:-l}],n=y(a,i,l,s);return n.attr("style",e.style),c(e,n),e.intersect=function(t){return x(e,s,t)},a},rect_right_inv_arrow:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),i=r.width+e.padding,l=r.height+e.padding,s=[{x:0,y:0},{x:i+l/2,y:0},{x:i,y:-l/2},{x:i+l/2,y:-l},{x:0,y:-l}],n=y(a,i,l,s);return n.attr("style",e.style),c(e,n),e.intersect=function(t){return x(e,s,t)},a},cylinder:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),i=r.width+e.padding,l=i/2,s=l/(2.5+i/50),n=r.height+s+e.padding,d=a.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d","M 0,"+s+" a "+l+","+s+" 0,0,0 "+i+" 0 a "+l+","+s+" 0,0,0 "+-i+" 0 l 0,"+n+" a "+l+","+s+" 0,0,0 "+i+" 0 l 0,"+-n).attr("transform","translate("+-i/2+","+-(n/2+s)+")");return c(e,d),e.intersect=function(t){let a=p(e,t),r=a.x-e.x;if(0!=l&&(Math.abs(r)e.height/2-s)){let i=s*s*(1-r*r/(l*l));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),a.y+=i}return a},a},start:(t,e)=>{let a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),c(e,r),e.intersect=function(t){return g(e,7,t)},a},end:(t,e)=>{let a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),r=a.insert("circle",":first-child"),i=a.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),c(e,i),e.intersect=function(t){return g(e,7,t)},a},note:async(t,e)=>{e.useHtmlLabels||(0,i.c)().flowchart.htmlLabels||(e.centerLabel=!0);let{shapeSvg:a,bbox:r,halfPadding:l}=await o(t,e,"node "+e.classes,!0);(0,i.l).info("Classes = ",e.classes);let s=a.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-l).attr("y",-r.height/2-l).attr("width",r.width+e.padding).attr("height",r.height+e.padding),c(e,s),e.intersect=function(t){return p(e,t)},a},subroutine:async(t,e)=>{let{shapeSvg:a,bbox:r}=await o(t,e,b(e,void 0),!0),i=r.width+e.padding,l=r.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-l},{x:0,y:-l},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-l},{x:-8,y:-l},{x:-8,y:0}],n=y(a,i,l,s);return n.attr("style",e.style),c(e,n),e.intersect=function(t){return x(e,s,t)},a},fork:v,join:v,class_box:(t,e)=>{let a;let r=e.padding/2;a=e.classes?"node "+e.classes:"node default";let s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),n=s.insert("rect",":first-child"),d=s.insert("line"),o=s.insert("line"),y=0,g=4,x=s.insert("g").attr("class","label"),f=0,u=e.classData.annotations&&e.classData.annotations[0],w=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",b=x.node().appendChild(h(w,e.labelStyle,!0,!0)),m=b.getBBox();if((0,i.m)((0,i.c)().flowchart.htmlLabels)){let t=b.children[0],e=(0,l.select)(b);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}e.classData.annotations[0]&&(g+=m.height+4,y+=m.width);let k=e.classData.label;void 0!==e.classData.type&&""!==e.classData.type&&((0,i.c)().flowchart.htmlLabels?k+="<"+e.classData.type+">":k+="<"+e.classData.type+">");let v=x.node().appendChild(h(k,e.labelStyle,!0,!0));(0,l.select)(v).attr("class","classTitle");let L=v.getBBox();if((0,i.m)((0,i.c)().flowchart.htmlLabels)){let t=v.children[0],e=(0,l.select)(v);L=t.getBoundingClientRect(),e.attr("width",L.width),e.attr("height",L.height)}g+=L.height+4,L.width>y&&(y=L.width);let S=[];e.classData.members.forEach(t=>{let a=t.getDisplayDetails(),r=a.displayText;(0,i.c)().flowchart.htmlLabels&&(r=r.replace(//g,">"));let s=x.node().appendChild(h(r,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0)),n=s.getBBox();if((0,i.m)((0,i.c)().flowchart.htmlLabels)){let t=s.children[0],e=(0,l.select)(s);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}n.width>y&&(y=n.width),g+=n.height+4,S.push(s)}),g+=8;let M=[];if(e.classData.methods.forEach(t=>{let a=t.getDisplayDetails(),r=a.displayText;(0,i.c)().flowchart.htmlLabels&&(r=r.replace(//g,">"));let s=x.node().appendChild(h(r,a.cssStyle?a.cssStyle:e.labelStyle,!0,!0)),n=s.getBBox();if((0,i.m)((0,i.c)().flowchart.htmlLabels)){let t=s.children[0],e=(0,l.select)(s);n=t.getBoundingClientRect(),e.attr("width",n.width),e.attr("height",n.height)}n.width>y&&(y=n.width),g+=n.height+4,M.push(s)}),g+=8,u){let t=(y-m.width)/2;(0,l.select)(b).attr("transform","translate( "+(-1*y/2+t)+", "+-1*g/2+")"),f=m.height+4}let T=(y-L.width)/2;return(0,l.select)(v).attr("transform","translate( "+(-1*y/2+T)+", "+(-1*g/2+f)+")"),f+=L.height+4,d.attr("class","divider").attr("x1",-y/2-r).attr("x2",y/2+r).attr("y1",-g/2-r+8+f).attr("y2",-g/2-r+8+f),f+=8,S.forEach(t=>{(0,l.select)(t).attr("transform","translate( "+-y/2+", "+(-1*g/2+f+4)+")");let e=null==t?void 0:t.getBBox();f+=((null==e?void 0:e.height)??0)+4}),f+=8,o.attr("class","divider").attr("x1",-y/2-r).attr("x2",y/2+r).attr("y1",-g/2-r+8+f).attr("y2",-g/2-r+8+f),f+=8,M.forEach(t=>{(0,l.select)(t).attr("transform","translate( "+-y/2+", "+(-1*g/2+f)+")");let e=null==t?void 0:t.getBBox();f+=((null==e?void 0:e.height)??0)+4}),n.attr("style",e.style).attr("class","outer title-state").attr("x",-y/2-r).attr("y",-(g/2)-r).attr("width",y+e.padding).attr("height",g+e.padding),c(e,n),e.intersect=function(t){return p(e,t)},s}},S={},M=async(t,e,a)=>{let r,l;if(e.link){let s;"sandbox"===(0,i.c)().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),r=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),l=await L[e.shape](r,e,a)}else r=l=await L[e.shape](t,e,a);return e.tooltip&&l.attr("title",e.tooltip),e.class&&l.attr("class","node default "+e.class),r.attr("data-node","true"),r.attr("data-id",e.id),S[e.id]=r,e.haveCallback&&S[e.id].attr("class",S[e.id].attr("class")+" clickable"),r},T=(t,e)=>{S[e.id]=t},B=()=>{S={}},_=t=>{let e=S[t.id];(0,i.l).trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");let a=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+a-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),a},C=({flowchart:t})=>{var e,a;let r=(null==(e=null==t?void 0:t.subGraphTitleMargin)?void 0:e.top)??0,i=(null==(a=null==t?void 0:t.subGraphTitleMargin)?void 0:a.bottom)??0;return{subGraphTitleTopMargin:r,subGraphTitleBottomMargin:i,subGraphTitleTotalMargin:r+i}},E={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:5.3};function $(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=P(t),e=P(e);let[a,r]=[t.x,t.y],[i,l]=[e.x,e.y],s=i-a,n=l-r;return{angle:Math.atan(n/s),deltaX:s,deltaY:n}}let P=t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,R=t=>({x:function(e,a,r){let i=0;if(0===a&&Object.hasOwn(E,t.arrowTypeStart)){let{angle:e,deltaX:a}=$(r[0],r[1]);i=E[t.arrowTypeStart]*Math.cos(e)*(a>=0?1:-1)}else if(a===r.length-1&&Object.hasOwn(E,t.arrowTypeEnd)){let{angle:e,deltaX:a}=$(r[r.length-1],r[r.length-2]);i=E[t.arrowTypeEnd]*Math.cos(e)*(a>=0?1:-1)}return P(e).x+i},y:function(e,a,r){let i=0;if(0===a&&Object.hasOwn(E,t.arrowTypeStart)){let{angle:e,deltaY:a}=$(r[0],r[1]);i=E[t.arrowTypeStart]*Math.abs(Math.sin(e))*(a>=0?1:-1)}else if(a===r.length-1&&Object.hasOwn(E,t.arrowTypeEnd)){let{angle:e,deltaY:a}=$(r[r.length-1],r[r.length-2]);i=E[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(a>=0?1:-1)}return P(e).y+i}}),Y=(t,e,a,r,i)=>{e.arrowTypeStart&&X(t,"start",e.arrowTypeStart,a,r,i),e.arrowTypeEnd&&X(t,"end",e.arrowTypeEnd,a,r,i)},O={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},X=(t,e,a,r,l,s)=>{let n=O[a];if(!n){(0,i.l).warn(`Unknown arrow type: ${a}`);return}t.attr(`marker-${e}`,`url(${r}#${l}_${s}-${n}${"start"===e?"Start":"End"})`)},W={},j={},H=()=>{W={},j={}},I=(t,e)=>{let a;let r=(0,i.m)((0,i.c)().flowchart.htmlLabels),n="markdown"===e.labelType?(0,s.a)(t,e.label,{style:e.labelStyle,useHtmlLabels:r,addSvgBackground:!0}):h(e.label,e.labelStyle),d=t.insert("g").attr("class","edgeLabel"),o=d.insert("g").attr("class","label");o.node().appendChild(n);let c=n.getBBox();if(r){let t=n.children[0],e=(0,l.select)(n);c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}if(o.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),W[e.id]=d,e.width=c.width,e.height=c.height,e.startLabelLeft){let r=h(e.startLabelLeft,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),l=i.insert("g").attr("class","inner");a=l.node().appendChild(r);let s=r.getBBox();l.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),j[e.id]||(j[e.id]={}),j[e.id].startLeft=i,D(a,e.startLabelLeft)}if(e.startLabelRight){let r=h(e.startLabelRight,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),l=i.insert("g").attr("class","inner");a=i.node().appendChild(r),l.node().appendChild(r);let s=r.getBBox();l.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),j[e.id]||(j[e.id]={}),j[e.id].startRight=i,D(a,e.startLabelRight)}if(e.endLabelLeft){let r=h(e.endLabelLeft,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),l=i.insert("g").attr("class","inner");a=l.node().appendChild(r);let s=r.getBBox();l.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.node().appendChild(r),j[e.id]||(j[e.id]={}),j[e.id].endLeft=i,D(a,e.endLabelLeft)}if(e.endLabelRight){let r=h(e.endLabelRight,e.labelStyle),i=t.insert("g").attr("class","edgeTerminals"),l=i.insert("g").attr("class","inner");a=l.node().appendChild(r);let s=r.getBBox();l.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.node().appendChild(r),j[e.id]||(j[e.id]={}),j[e.id].endRight=i,D(a,e.endLabelRight)}return n};function D(t,e){(0,i.c)().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}let N=(t,e)=>{(0,i.l).debug("Moving label abc88 ",t.id,t.label,W[t.id],e);let a=e.updatedPath?e.updatedPath:e.originalPath,{subGraphTitleTotalMargin:r}=C((0,i.c)());if(t.label){let l=W[t.id],s=t.x,n=t.y;if(a){let r=(0,i.u).calcLabelPosition(a);(0,i.l).debug("Moving label "+t.label+" from (",s,",",n,") to (",r.x,",",r.y,") abc88"),e.updatedPath&&(s=r.x,n=r.y)}l.attr("transform",`translate(${s}, ${n+r/2})`)}if(t.startLabelLeft){let e=j[t.id].startLeft,r=t.x,l=t.y;if(a){let e=(0,i.u).calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",a);r=e.x,l=e.y}e.attr("transform",`translate(${r}, ${l})`)}if(t.startLabelRight){let e=j[t.id].startRight,r=t.x,l=t.y;if(a){let e=(0,i.u).calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",a);r=e.x,l=e.y}e.attr("transform",`translate(${r}, ${l})`)}if(t.endLabelLeft){let e=j[t.id].endLeft,r=t.x,l=t.y;if(a){let e=(0,i.u).calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",a);r=e.x,l=e.y}e.attr("transform",`translate(${r}, ${l})`)}if(t.endLabelRight){let e=j[t.id].endRight,r=t.x,l=t.y;if(a){let e=(0,i.u).calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",a);r=e.x,l=e.y}e.attr("transform",`translate(${r}, ${l})`)}},U=(t,e)=>{let a=t.x,r=t.y,i=Math.abs(e.x-a),l=Math.abs(e.y-r),s=t.width/2,n=t.height/2;return i>=s||l>=n},A=(t,e,a)=>{(0,i.l).debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(e)} insidePoint : ${JSON.stringify(a)} node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let r=t.x,l=t.y,s=Math.abs(r-a.x),n=t.width/2,d=a.xMath.abs(r-e.x)*h){let t=a.y{(0,i.l).debug("abc88 cutPathAtIntersect",t,e);let a=[],r=t[0],l=!1;return t.forEach(t=>{if(U(e,t)||l)r=t,l||a.push(t);else{let i=A(e,r,t),s=!1;a.forEach(t=>{s=s||t.x===i.x&&t.y===i.y}),a.some(t=>t.x===i.x&&t.y===i.y)||a.push(i),l=!0}}),a},q=function(t,e,a,r,s,n,d){let h,o=a.points;(0,i.l).debug("abc88 InsertEdge: edge=",a,"e=",e);let c=!1,y=n.node(e.v);var p=n.node(e.w);(null==p?void 0:p.intersect)&&(null==y?void 0:y.intersect)&&((o=o.slice(1,a.points.length-1)).unshift(y.intersect(o[0])),o.push(p.intersect(o[o.length-1]))),a.toCluster&&((0,i.l).debug("to cluster abc88",r[a.toCluster]),o=Z(a.points,r[a.toCluster].node),c=!0),a.fromCluster&&((0,i.l).debug("from cluster abc88",r[a.fromCluster]),o=Z(o.reverse(),r[a.fromCluster].node).reverse(),c=!0);let g=o.filter(t=>!Number.isNaN(t.y)),x=l.curveBasis;a.curve&&("graph"===s||"flowchart"===s)&&(x=a.curve);let{x:f,y:u}=R(a),w=(0,l.line)().x(f).y(u).curve(x);switch(a.thickness){case"normal":h="edge-thickness-normal";break;case"thick":case"invisible":h="edge-thickness-thick";break;default:h=""}switch(a.pattern){case"solid":h+=" edge-pattern-solid";break;case"dotted":h+=" edge-pattern-dotted";break;case"dashed":h+=" edge-pattern-dashed"}let b=t.append("path").attr("d",w(g)).attr("id",a.id).attr("class"," "+h+(a.classes?" "+a.classes:"")).attr("style",a.style),m="";((0,i.c)().flowchart.arrowMarkerAbsolute||(0,i.c)().state.arrowMarkerAbsolute)&&(m=(m=(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),Y(b,a,m,d,s);let k={};return c&&(k.updatedPath=o),k.originalPath=a.points,k}}); //# sourceMappingURL=flowDiagram-b222e15a.22308258.js.map




© 2015 - 2024 Weber Informatics LLC | Privacy Policy