You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
5 lines
35 KiB
JavaScript
5 lines
35 KiB
JavaScript
|
9 months ago
|
"use strict";exports.id=601,exports.ids=[601],exports.modules={86247:(t,e,r)=>{r.d(e,{a:()=>o,c:()=>s});var a=r(15537),n=r(66136),i=r(55085);function l(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function s(t,e,r){var a;let n=t.append("text"),i=l(n,1,e);d(i,[{content:r,type:"normal"}]);let s=null==(a=i.node())?void 0:a.getBoundingClientRect();return s&&n.remove(),s}function d(t,e){t.text(""),e.forEach((e,r)=>{let a=t.append("tspan").attr("font-style","emphasis"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?a.text(e.content):a.text(" "+e.content)})}let o=(t,e="",{style:r="",isTitle:s=!1,classes:o="",useHtmlLabels:h=!0,isNode:c=!0,width:p=200,addSvgBackground:y=!1}={})=>{if(a.l.info("createText",e,r,s,o,h,c,y),!h)return function(t,e,r,a=!1){let n=e.append("g"),i=n.insert("rect").attr("class","background"),s=n.append("text").attr("y","-10.1"),o=0;for(let e of r){let r=e=>(function(t,e,r){let a=t.append("text"),n=l(a,1,1.1);d(n,r);let i=n.node().getComputedTextLength();return a.remove(),i})(n,0,e)<=t;for(let t of r(e)?[e]:function(t,e){if(t.some(({content:t})=>t.includes("\n")))throw Error("splitLineToFitWidth does not support newlines in the line");return function t(e,r,a=[],n=[]){if(0===e.length)return n.length>0&&a.push(n),a.length>0?a:[];let i="";" "===e[0].content&&(i=" ",e.shift());let l=e.shift()??{content:" ",type:"normal"},s=[...n];if(""!==i&&s.push({content:i,type:"normal"}),s.push(l),r(s))return t(e,r,a,s);if(n.length>0)a.push(n),e.unshift(l);else if(l.content){var d;let[t,n]=function t(e,r,a,n){if(0===a.length)return[{content:r.join(""),type:n},{content:"",type:n}];let[i,...l]=a,s=[...r,i];return e([{content:s.join(""),type:n}])?t(e,s,l,n):(0===r.length&&i&&(r.push(i),a.shift()),[{content:r.join(""),type:n},{content:a.join(""),type:n}])}(r,[],(d=l.content,Intl.Segmenter?[...new Intl.Segmenter().segment(d)].map(t=>t.segment):[...d]),l.type);a.push([t]),n.content&&e.unshift(n)}return t(e,r,a)}(t,e)}(e,r))d(l(s,o,1.1),t),o++}if(!a)return s.node();{let t=s.node().getBBox();return i.attr("x",-2).attr("y",-2).attr("width",t.width+4).attr("height",t.height+4),n.node()}}(p,t,function(t){let e=function(t){let e=t.replace(/\n{2,}/g,"\n");return(0,i.Z)(e)}(t),{children:r}=(0,n.V)(e),a=[[]],l=0;return r.forEach(t=>{"paragraph"===t.type&&t.children.forEach(t=>{!function t(e,r="normal"){"text"===e.type?e.value.split("\n").forEach((t,e)=>{0!==e&&(l++,a.push([])),t.split(" ").forEach(t=>{t&&a[l].push({content:t,type:r})})}):("strong"===e.type||"emphasis"===e.type)&&e.children.forEach(r=>{t(r,e.type)})}(t)})}),a}(e),y);{let i=function(t){let{children:e}=(0,n.V)(t);return e.map(function t(e){return"text"===e.type?e.value.replace(/\n/g,"<br/>"):"strong"===e.type?`<strong>${e.children.map(t).join("")}</strong>`:"emphasis"===e.type?`<em>${e.children.map(t).join("")}</em>`:"paragraph"===e.type?`<p>${e.children.map(t).join("")}</p>`:`Unsupported markdown: ${e.type}`}).join("")}(e);return function(t,e,r,a,n=!1){var i;let l=t.append("foreignObject"),s=l.append("xhtml:div"),d=e.label,o=e.isNode?"nodeLabel":"edgeLabel";s.html(`
|
||
|
|
<span class="${o} ${a}" `+(e.labelStyle?'style="'+e.labelStyle+'"':"")+">"+d+"</span>"),(i=e.labelStyle)&&s.attr("style",i),s.style("display","table-cell"),s.style("white-space","nowrap"),s.style("max-width",r+"px"),s.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&s.attr("class","labelBkg");let h=s.node().getBoundingClientRect();return h.width===r&&(s.style("display","table"),s.style("white-space","break-spaces"),s.style("width",r+"px"),h=s.node().getBoundingClientRect()),l.style("width",h.width),l.style("height",h.height),l.node()}(t,{isNode:c,label:(0,a.J)(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>`<i class='${t.replace(":"," ")}'></i>`),labelStyle:r.replace("fill:","color:")},p,o,y)}}},84601:(t,e,r)=>{r.d(e,{a:()=>s,b:()=>v,c:()=>d,d:()=>j,e:()=>L,f:()=>$,g:()=>D,h:()=>P,i:()=>y,j:()=>B,l:()=>o,p:()=>_,s:()=>S,u:()=>h});var a=r(15537),n=r(3896),i=r(86247);let l={extension:(t,e,r)=>{a.l.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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,r)=>{t.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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,r)=>{t.append("marker").attr("id",r+"_"+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-d
|
||
|
|
outsidePoint: ${JSON.stringify(e)}
|
||
|
|
insidePoint : ${JSON.stringify(r)}
|
||
|
|
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let n=t.x,i=t.y,l=Math.abs(n-r.x),s=t.width/2,d=r.x<e.x?s-l:s+l,o=t.height/2,h=Math.abs(e.y-r.y),c=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*o){let t=r.y<e.y?e.y-o-i:i-o-e.y;d=c*t/h;let n={x:r.x<e.x?r.x+d:r.x-c+d,y:r.y<e.y?r.y+h-t:r.y-h+t};return 0===d&&(n.x=e.x,n.y=e.y),0===c&&(n.x=e.x),0===h&&(n.y=e.y),a.l.warn(`abc89 topp/bott calc, Q ${h}, q ${t}, R ${c}, r ${d}`,n),n}{let t=h*(d=r.x<e.x?e.x-s-n:n-s-e.x)/c,i=r.x<e.x?r.x+c-d:r.x-c+d,l=r.y<e.y?r.y+t:r.y-t;return a.l.warn(`sides calc abc89, Q ${h}, q ${t}, R ${c}, r ${d}`,{_x:i,_y:l}),0===d&&(i=e.x,l=e.y),0===c&&(i=e.x),0===h&&(l=e.y),{x:i,y:l}}},W=(t,e)=>{a.l.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(t=>{if(a.l.info("abc88 checking point",t,e),I(e,t)||i)a.l.warn("abc88 outside",t,n),n=t,i||r.push(t);else{let l=O(e,n,t);a.l.warn("abc88 inside",t,n,l),a.l.warn("abc88 intersection",l);let s=!1;r.forEach(t=>{s=s||t.x===l.x&&t.y===l.y}),r.some(t=>t.x===l.x&&t.y===l.y)?a.l.warn("abc88 no intersect",l,r):r.push(l),i=!0}}),a.l.warn("abc88 returning points",r),r},D=function(t,e,r,i,l,s,d){let o,h=r.points,c=!1,p=s.node(e.v);var y=s.node(e.w);a.l.info("abc88 InsertEdge: ",r),y.intersect&&p.intersect&&((h=h.slice(1,r.points.length-1)).unshift(p.intersect(h[0])),a.l.info("Last point",h[h.length-1],y,y.intersect(h[h.length-1])),h.push(y.intersect(h[h.length-1]))),r.toCluster&&(a.l.info("to cluster abc88",i[r.toCluster]),h=W(r.points,i[r.toCluster].node),c=!0),r.fromCluster&&(a.l.info("from cluster abc88",i[r.fromCluster]),h=W(h.reverse(),i[r.fromCluster].node).reverse(),c=!0);let g=h.filter(t=>!Number.isNaN(t.y)),f=n.$0Z;r.curve&&("graph"===l||"flowchart"===l)&&(f=r.curve);let{x:u,y:w}=B(r),m=(0,n.jvg)().x(u).y(w).curve(f);switch(r.thickness){case"normal":o="edge-thickness-normal";break;case"thick":case"invisible":o="edge-thickness-thick";break;default:o=""}switch(r.pattern){case"solid":o+=" edge-pattern-solid";break;case"dotted":o+=" edge-pattern-dotted";break;case"dashed":o+=" edge-pattern-dashed"}let x=t.append("path").attr("d",m(g)).attr("id",r.id).attr("class"," "+o+(r.classes?" "+r.classes:"")).attr("style",r.style),b="";switch(((0,a.c)().flowchart.arrowMarkerAbsolute||(0,a.c)().state.arrowMarkerAbsolute)&&(b=(b=(b=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),a.l.info("arrowTypeStart",r.arrowTypeStart),a.l.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":x.attr("marker-start","url("+b+"#"+d+"_"+l+"-crossStart)");break;case"arrow_point":x.attr("marker-start","url("+b+"#"+d+"_"+l+"-pointStart)");break;case"arrow_barb":x.attr("marker-start","url("+b+"#"+d+"_"+l+"-barbStart)");break;case"arrow_circle":x.attr("marker-start","url("+b+"#"+d+"_"+l+"-circleStart)");break;case"aggregation":x.attr("marker-start","url("+b+"#"+d+"_"+l+"-aggregationStart)");break;case"extension":x.attr("marker-start","url("+b+"#"+d+"_"+l+"-extensionStart)");break;case"composition":x.attr("marker-start","url("+b+"#"+d+"_"+l+"-compositionStart)");break;case"dependency":x.attr("marker-start","url("+b+"#"+d+"_"+l+"-dependencyStart)");break;case"lollipop":x.attr("marker-start","url("+b+"#"+d+"_"+l+"-lollipopStart)")}switch(r.arrowTypeEnd){case"arrow_cross":x.attr("marker-end","url("+b+"#"+d+"_"+l+"-crossEnd)");break;case"arrow_point":x.attr("marker-end","url("+b+"#"+d+"_"+l+"-pointEnd)");break;case"arrow_barb":x.attr("marker-end","url("+b+"#"+d+"_"+l+"-barbEnd)");break;case"arrow_circle":x.attr("marker-end","url("+b+"#"+d+"_"+l+"-circleEnd)");break;case"aggregation":x.attr("marker-end","url("+b+"#"+d+"_"+l+"-aggregationEnd)");break;case"extension":x.attr("marker-end","url("+b+"#"+d+"_"+l+"-extensionEnd)");break;case"composition":x.attr("marker-end","url("+b+"#"+d+"_"+l+"-compositionEnd)");break;case"dependency":x.attr("marker-end","url("+b+"#"+d+"_"+l+"-dependencyEnd)");break;case"lollipop":x.attr("marker-end","url("+b+"#"+d+"_"+l+"-lollipopEnd)")}let k={};return c&&(k.updatedPath=h)
|