PageSourceSearch

https://v2.dende.ai/assets/wardleyDiagram-NUSXRM2D-D7gDzTdG.js

js dende.ai collected 2026-10-03 21:03:48 UTC 25,535 bytes, 20 lines download raw bytes

1import{_ as y,s as Nt,g as zt,t as Et,q as At,a as Xt,b as Ct,l as et,L as Tt,e as Yt,A as Bt,c as _,i as It}from"./index-DFgFmvQO.js";import{p as Rt}from"./chunk-4BX2VUAB-QZXCIs_P.js";import{p as Ft}from"./wardley-RL74JXVD-0yNHoidu.js";import"./index-CX9Yt7tV.js";import"./useEasyreadPolling-DOmedWR_.js";import"./easy-read-theme-Di0d8DeP.js";import"./floating-ui.react-ioVC-sCG.js";import"./use-is-breakpoint-CYBT9LUD.js";import"./arrow-left-63lnrQdZ.js";import"./arrow-right-DWH54nzF.js";import"./useFireOnce-CEK_GkOt.js";import"./min-CYkMUU-t.js";import"./_baseUniq-BRLE0WYm.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};e.SENTRY_RELEASE={id:"d08f5907ff4ed0f3fc55f7aec34166a744102d67"};var r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="9a8c0ce4-5255-4685-8ca5-6352c6785d25",e._sentryDebugIdIdentifier="sentry-dbid-9a8c0ce4-5255-4685-8ca5-6352c6785d25")}catch{}})();var q=y((e,r)=>{const a=e<=1?e*100:e;if(a<0||a>100)throw new Error(`${r} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);return a},"toPercent"),Y=y((e,r,a)=>({x:q(r,`${a} evolution`),y:q(e,`${a} visibility`)}),"toCoordinates"),tt=y(e=>{if(e){if(e==="+<>")return"bidirectional";if(e==="+<")return"backward";if(e==="+>")return"forward"}},"getFlowFromPort"),Ot=y(e=>{if(!(e!=null&&e.startsWith("+")))return{};const r=/^\+'([^']*)'/.exec(e),a=r==null?void 0:r[1];return e.includes("<>")?{flow:"bidirectional",label:a}:e.includes("<")?{flow:"backward",label:a}:e.includes(">")?{flow:"forward",label:a}:{label:a}},"extractFlowFromArrow"),Dt=y((e,r)=>{if(Rt(e,r),e.size&&r.setSize(e.size.width,e.size.height),e.evolution){const a=e.evolution.stages.map(o=>o.secondName?`${o.name.trim()} / ${o.secondName.trim()}`:o.name.trim()),h=e.evolution.stages.filter(o=>o.boundary!==void 0).map(o=>o.boundary);r.updateAxes({stages:a,stageBoundaries:h})}if(e.anchors.forEach(a=>{const h=Y(a.visibility,a.evolution,`Anchor "${a.name}"`);r.addNode(a.name,a.name,h.x,h.y,"anchor")}),e.components.forEach(a=>{var v;const h=Y(a.visibility,a.evolution,`Component "${a.name}"`),o=a.label?(a.label.negX?-1:1)*a.label.offsetX:void 0,d=a.label?(a.label.negY?-1:1)*a.label.offsetY:void 0,m=(v=a.decorator)==null?void 0:v.strategy;r.addNode(a.name,a.name,h.x,h.y,"component",o,d,a.inertia,m)}),e.notes.forEach(a=>{const h=Y(a.visibility,a.evolution,`Note "${a.text}"`);r.addNote(a.text,h.x,h.y)}),e.pipelines.forEach(a=>{const h=r.getNode(a.parent);if(!h||typeof h.y!="number")throw new Error(`Pipeline "${a.parent}" must reference an existing component with coordinates.`);const o=h.y;r.startPipeline(a.parent),a.components.forEach(d=>{const m=`${a.parent}_${d.name}`,v=d.label?(d.label.negX?-1:1)*d.label.offsetX:void 0,g=d.label?(d.label.negY?-1:1)*d.label.offsetY:void 0,A=q(d.evolution,`Pipeline component "${d.name}" evolution`);r.addNode(m,d.name,A,o,"pipeline-component",v,g),r.addPipelineComponent(a.parent,m)})}),e.links.forEach(a=>{const h=!!a.arrow&&(a.arrow.includes("-.->")||a.arrow.includes(".-."));let o=tt(a.fromPort)??tt(a.toPort);const{flow:d,label:m}=Ot(a.arrow);!o&&d&&(o=d);const v=a.linkLabel,g=m??v;r.addLink(a.from,a.to,h,g,o)}),e.evolves.forEach(a=>{const h=r.getNode(a.component);if((h==null?void 0:h.y)!==void 0){const o=q(a.target,`Evolve target for "${a.component}"`);r.addTrend(a.component,o,h.y)}}),e.annotations.length>0){const a=e.annotations[0],h=Y(a.x,a.y,"Annotations box");r.setAnnotationsBox(h.x,h.y)}e.annotation.forEach(a=>{const h=Y(a.x,a.y,`Annotation ${a.number}`);r.addAnnotation(a.number,[{x:h.x,y:h.y}],a.text)}),e.accelerators.forEach(a=>{const h=Y(a.x,a.y,`Accelerator "${a.name}"`);r.addAccelerator(a.name,h.x,h.y)}),e.deaccelerators.forEach(a=>{const h=Y(a.x,a.y,`Deaccelerator "${a.name}"`);r.addDeaccelerator(a.name,h.x,h.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async e=>{var h;const r=await Ft("wardley",e);et.debug(r);const a=(h=at.parser)==null?void 0:h.yy;if(!a||typeof a.addNode!="function")throw new Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");Dt(r,a)},"parse")},I,Wt=(I=class{constructor(){this.nodes=new Map,this.links=[],this.trends=new Map,this.pipelines=new Map,this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.axes={}}addNode(r){const a=this.nodes.get(r.id)??{id:r.id,label:r.label},h={...a,...r,className:r.className??a.className,labelOffsetX:r.labelOffsetX??a.labelOffsetX,labelOffsetY:r.labelOffsetY??a.labelOffsetY};this.nodes.set(r.id,h)}addLink(r){this.links.push(r)}addTrend(r){this.trends.set(r.nodeId,r)}startPipeline(r){this.pipelines.set(r,{nodeId:r,componentIds:[]});const a=this.nodes.get(r);a&&(a.isPipelineParent=!0)}addPipelineComponent(r,a){const h=this.pipelines.get(r);h&&h.componentIds.push(a);const o=this.nodes.get(a);o&&(o.inPipeline=!0)}
1addAnnotation(r){this.annotations.push(r)}addNote(r){this.notes.push(r)}addAccelerator(r){this.accelerators.push(r)}addDeaccelerator(r){this.deaccelerators.push(r)}setAnnotationsBox(r,a){this.annotationsBox={x:r,y:a}}setAxes(r){this.axes={...this.axes,...r}}setSize(r,a){this.size={width:r,height:a}}getNode(r){return this.nodes.get(r)}build(){const r=[];for(const a of this.nodes.values()){if(typeof a.x!="number"||typeof a.y!="number")throw new Error(`Node "${a.label}" is missing coordinates`);r.push(a)}return{nodes:r,links:[...this.links],trends:[...this.trends.values()],pipelines:[...this.pipelines.values()],annotations:[...this.annotations],notes:[...this.notes],accelerators:[...this.accelerators],deaccelerators:[...this.deaccelerators],annotationsBox:this.annotationsBox,axes:{...this.axes},size:this.size}}clear(){this.nodes.clear(),this.links=[],this.trends.clear(),this.pipelines.clear(),this.annotations=[],this.notes=[],this.accelerators=[],this.deaccelerators=[],this.annotationsBox=void 0,this.axes={},this.size=void 0}},y(I,"WardleyBuilder"),I),P=new Wt;function L(e){const r=_();return It(e.trim(),r)}y(L,"textSanitizer");function rt(){return _()["wardley-beta"]}y(rt,"getConfig");function ot(e,r,a,h,o,d,m,v,g){P.addNode({id:e,label:L(r),x:a,y:h,className:o,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(e,r,a=!1,h,o){P.addLink({source:e,target:r,dashed:a,label:h,flow:o})}y(st,"addLink");function nt(e,r,a){P.addTrend({nodeId:e,targetX:r,targetY:a})}y(nt,"addTrend");function it(e,r,a){P.addAnnotation({number:e,coordinates:r,text:a?L(a):void 0})}y(it,"addAnnotation");function dt(e,r,a){P.addNote({text:L(e),x:r,y:a})}y(dt,"addNote");function lt(e,r,a){P.addAccelerator({name:L(e),x:r,y:a})}y(lt,"addAccelerator");function ct(e,r,a){P.addDeaccelerator({name:L(e),x:r,y:a})}y(ct,"addDeaccelerator");function pt(e,r){P.setAnnotationsBox(e,r)}y(pt,"setAnnotationsBox");function ht(e,r){P.setSize(e,r)}y(ht,"setSize");function ft(e){P.startPipeline(e)}y(ft,"startPipeline");function xt(e,r){P.addPipelineComponent(e,r)}y(xt,"addPipelineComponent");function gt(e){const r={};e.xLabel&&(r.xLabel=L(e.xLabel)),e.yLabel&&(r.yLabel=L(e.yLabel)),e.stages&&(r.stages=e.stages.map(a=>L(a))),e.stageBoundaries&&(r.stageBoundaries=e.stageBoundaries),P.setAxes(r)}y(gt,"updateAxes");function ut(e){return P.getNode(e)}y(ut,"getNode");function yt(){return P.build()}y(yt,"getWardleyData");function mt(){P.clear(),Bt()}y(mt,"clear");var Gt={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:ft,addPipelineComponent:xt,updateAxes:gt,getNode:ut,getWardleyData:yt,clear:mt,setAccTitle:Ct,getAccTitle:Xt,setDiagramTitle:At,getDiagramTitle:Et,getAccDescription:zt,setAccDescription:Nt},qt=["Genesis","Custom Built","Product","Commodity"],_t=y(()=>{var r,a,h,o,d,m,v,g,A,M,b,N;const{themeVariables:e}=_();return{backgroundColor:((r=e.wardley)==null?void 0:r.backgroundColor)??e.background??"#fff",axisColor:((a=e.wardley)==null?void 0:a.axisColor)??"#000",axisTextColor:((h=e.wardley)==null?void 0:h.axisTextColor)??e.primaryTextColor??"#222",gridColor:((o=e.wardley)==null?void 0:o.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=e.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=e.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=e.wardley)==null?void 0:v.componentLabelColor)??e.primaryTextColor??"#222",linkStroke:((g=e.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((A=e.wardley)==null?void 0:A.evolutionStroke)??"#dc3545",annotationStroke:((M=e.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((b=e.wardley)==null?void 0:b.annotationTextColor)??e.primaryTextColor??"#222",annotationFill:((N=e.wardley)==null?void 0:N.annotationFill)??e.background??"#fff"}},"getTheme"),Ht=y(()=>{const e=_()["wardley-beta"];return{width:(e==null?void 0:e.width)??900,height:(e==null?void 0:e.height)??600,padding:(e==null?void 0:e.padding)??48,nodeRadius:(e==null?void 0:e.nodeRadius)??6,nodeLabelOffset:(e==null?void 0:e.nodeLabelOffset)??8,axisFontSize:(e==null?void 0:e.axisFontSize)??12,labelFontSize:(e==null?void 0:e.labelFontSize)??10,showGrid:(e==null?void 0:e.showGrid)??!1,useMaxWidth:(e==null?void 0:e.useMaxWidth)??!0}},"getConfigValues"),jt=y((e,r,a,h)=>{var K,Q;et.debug(`Rendering Wardley map
2`+e);const o=Ht(),d=_t(),m=o.nodeRadius*1.6,v=h.db,g=v.getWardleyData(),A=v.getDiagramTitle(),M=((K=g.size)==null?void 0:K.width)??o.width,b=((Q=g.size)==null?void 0:Q.height)??o.height,N=Tt(r);N.selectAll("*").remove(),Yt(N,b,M,o.useMaxWidth),N.attr("viewBox",`0 0 ${M}
2 ${b}`);const S=N.append("g").attr("class","wardley-map"),H=N.append("defs");H.append("marker").attr("id",`arrow-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",6).attr("markerHeight",6).attr("orient","auto-start-reverse").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.evolutionStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-end-${r}`).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("fill",d.linkStroke).attr("stroke","none"),H.append("marker").attr("id",`link-arrow-start-${r}`).attr("viewBox","0 0 10 10").attr("refX",1).attr("refY",5).attr("markerWidth",5).attr("markerHeight",5).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z").attr("fill",d.linkStroke).attr("stroke","none"),S.append("rect").attr("class","wardley-background").attr("width",M).attr("height",b).attr("fill",d.backgroundColor);const R=M-o.padding*2,F=b-o.padding*2;A&&S.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",o.padding/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(A);const X=y(t=>o.padding+t/100*R,"projectX"),C=y(t=>b-o.padding-t/100*F,"projectY"),D=S.append("g").attr("class","wardley-axes");D.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1),D.append("line").attr("x1",o.padding).attr("x2",o.padding).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const wt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";D.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",o.padding+R/2).attr("y",b-o.padding/4).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(wt),D.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",o.padding/3).attr("y",o.padding+F/2).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${o.padding/3} ${o.padding+F/2})`).text(bt);const O=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:qt;if(O.length>0){const t=S.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===O.length){let i=0;n.forEach(p=>{s.push({start:i,end:p}),i=p})}else{const i=1/O.length;O.forEach((p,l)=>{s.push({start:l*i,end:(l+1)*i})})}O.forEach((i,p)=>{const l=s[p],f=o.padding+l.start*R,x=o.padding+l.end*R,u=(f+x)/2;p>0&&t.append("line").attr("x1",f).attr("x2",f).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke","#000").attr("stroke-width",1).attr("stroke-dasharray","5 5").attr("opacity",.8),t.append("text").attr("class","wardley-stage-label").attr("x",u).attr("y",b-o.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",o.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(o.showGrid){const t=S.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=o.padding+R*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",o.padding).attr("y2",b-o.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",o.padding).attr("x2",M-o.padding).attr("y1",b-o.padding-F*s).attr("y2",b-o.padding-F*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:X(t.x),y:C(t.y),node:t})}),g.pipelines.length>0){const t=S.append("g").attr("class","wardley-pipelines"),n=S.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(x=>({id:x,pos:c.get(x),node:g.nodes.find(u=>u.id===x)})).filter(x=>x.pos&&x.node).sort((x,u)=>x.node.x-u.node.x);for(let x=0;x<i.length-1;x++){const u=i[x],w=i[x+1];n.append("line").attr("class","wardley-pipeline-evolution-link").attr("x1",u.pos.x).attr("y1",u.pos.y).attr("x2",w.pos.x).attr("y2",w.pos.y).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4")}let p=1/0,l=-1/0,f=0;if(s.componentIds.forEach(x=>{const u=c.get(x);u&&(p=Math.min(p,u.x),l=Math.max(l,u.x),f=u.y)}),p!==1/0&&l!==-1/0){const u=o.nodeRadius*4,w=f-u/2,$=c.get(s.nodeId);if($){const E=(p+l)/2;$.x=E,$.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",p-15).attr("y",w).attr("width",l-p+15*2).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const Z=S.append("g").attr("class","wardley-links"),U=new Map;
2g.pipelines.forEach(t=>{U.set(t.nodeId,new Set(t.componentIds))});const J=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=U.get(t.target);return!(n!=null&&n.has(t.source))});Z.selectAll("line").data(J).enter().append("line").attr("class",t=>`wardley-link${t.dashed?" wardley-link--dashed":""}`).attr("x1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.x+l/x*p}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f);return n.y+f/x*p}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.x+l/x*p}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),p=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):o.nodeRadius,l=n.x-s.x,f=n.y-s.y,x=Math.sqrt(l*l+f*f);return s.y+f/x*p}).attr("stroke",d.linkStroke).attr("stroke-width",1).attr("stroke-dasharray",t=>t.dashed?"6 6":null).attr("marker-end",t=>t.flow==="forward"||t.flow==="bidirectional"?`url(#link-arrow-end-${r})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${r})`:null),Z.selectAll("text").data(J.filter(t=>t.label)).enter().append("text").attr("class","wardley-link-label").attr("x",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=s.y-n.y,l=s.x-n.x,f=Math.sqrt(l*l+p*p),x=8,u=p/f;return i+u*x}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,p=s.x-n.x,l=s.y-n.y,f=Math.sqrt(p*p+l*l),x=8,u=-p/f;return i+u*x}).attr("fill",d.axisTextColor).attr("font-size",o.labelFontSize).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("transform",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.x+s.x)/2,p=(n.y+s.y)/2,l=s.x-n.x,f=s.y-n.y,x=Math.sqrt(l*l+f*f),u=8,w=f/x,$=-l/x,E=i+w*u,W=p+$*u;let B=Math.atan2(f,l)*180/Math.PI;return(B>90||B<-90)&&(B+=180),`rotate(${B} ${E} ${W})`}).text(t=>t.label);const kt=S.append("g").attr("class","wardley-trends"),Pt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=X(t.targetX),i=C(t.targetY),p=s-n.x,l=i-n.y,f=Math.sqrt(p*p+l*l),x=o.nodeRadius+2,u=f>x?s-p/f*x:s,w=f>x?i-l/f*x:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);kt.selectAll("line").data(Pt).enter().append("line").attr("class","wardley-trend").attr("x1",t=>t.origin.x).attr("y1",t=>t.origin.y).attr("x2",t=>t.adjustedX2).attr("y2",t=>t.adjustedY2).attr("stroke",d.evolutionStroke).attr("stroke-width",1).attr("stroke-dasharray","4 4").attr("marker-end",`url(#arrow-${r})`);const z=S.append("g").attr("class","wardley-nodes").selectAll("g").data(g.nodes).enter().append("g").attr("class",t=>["wardley-node",t.className?`wardley-node--${t.className}`:""].filter(Boolean).join(" "));z.filter(t=>t.sourceStrategy==="outsource").append("circle").attr("class","wardley-outsource-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="buy").append("circle").attr("class","wardley-buy-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.sourceStrategy==="build").append("circle").attr("class","wardley-build-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const T=z.filter(t=>t.sourceStrategy==="market");T.append("circle").attr("class","wardley-market-overlay").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>!t.isPipelineParent&&t.sourceStrategy!=="market"&&t.className!=="anchor").append("circle").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y).attr("r",o.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const j=o.nodeRadius*.7,k=o.nodeRadius*1.2;if(T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-k).attr("x2",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-k).attr("stroke",d.componentStroke).attr("stroke-width",1),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-k).attr("r",j).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",j).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),T.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+k*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+k*Math.sin(Math.PI/6)).attr("r",j).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),z.filter(t=>t.isPipelineParent===!0).append("rect").attr("x",t=>c.get(t.id).x-m/2).attr("y",t=>c.get(t.id).y-m/2).attr("width",m).attr("height",m).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1),z.filter(t=>t.inertia===!0).append("line").attr("class","wardley-inertia").attr("x1",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:o.nodeRadius+15;return t.sourceStrategy&&(s+=o.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:o.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),z.append("text").attr("x",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetX!==void 0?n.x+t.labelOffsetX:n.x;let s=o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetX===void 0&&(s+=10);const i=t.labelOffsetX??s;return n.x+i}).attr("y",t=>{const n=c.get(t.id);if(t.className==="anchor")return t.labelOffsetY!==void 0?n.y+t.labelOffsetY:n.y-3;let s=-o.nodeLabelOffset;t.sourceStrategy&&t.labelOffsetY===void 0&&(s-=10);const i=t.labelOffsetY??s;return n.y+i}).attr("class","wardley-node-label").attr("fill",t=>t.className==="evolved"?d.evolutionStroke:t.className==="anchor"?"#000":d.componentLabelColor).attr("font-size",o.labelFontSize).attr("font-weight",t=>t.className==="anchor"?"bold":"normal").attr("text-anchor",t=>t.className==="anchor"?"middle":"start").attr("dominant-baseline",t=>t.className==="anchor"?"middle":"auto").text(t=>t.label),g.annotations.length>0){const t=S.append("g").attr("class","wardley-annotations");
2if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:X(i.x),y:C(i.y)}));if(s.length>1)for(let i=0;i<s.length-1;i++)t.append("line").attr("class","wardley-annotation-line").attr("x1",s[i].x).attr("y1",s[i].y).attr("x2",s[i+1].x).attr("y2",s[i+1].y).attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("stroke-dasharray","4 4");s.forEach(i=>{const p=t.append("g").attr("class","wardley-annotation");p.append("circle").attr("cx",i.x).attr("cy",i.y).attr("r",10).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5),p.append("text").attr("x",i.x).attr("y",i.y).attr("text-anchor","middle").attr("dominant-baseline","central").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.number)})}),g.annotationsBox){let n=X(g.annotationsBox.x),s=C(g.annotationsBox.y);const i=10,p=16,l=11,f=t.append("g").attr("class","wardley-annotations-box"),x=[...g.annotations].filter(w=>w.text).sort((w,$)=>w.number-$.number),u=[];if(x.forEach((w,$)=>{const E=f.append("text").attr("x",n+i).attr("y",s+i+($+1)*p).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(E)}),u.length>0){let w=0,$=0;u.forEach(V=>{const G=V.node(),Mt=G.getComputedTextLength();w=Math.max(w,Mt);const Lt=G.getBBox();$=Math.max($,Lt.height)});const E=w+i*2+105,W=x.length*p+i*2+$/2,B=o.padding,vt=M-o.padding-E,St=o.padding,$t=b-o.padding-W;n=Math.max(B,Math.min(n,vt)),s=Math.max(St,Math.min(s,$t)),u.forEach((V,G)=>{V.attr("x",n+i).attr("y",s+i+(G+1)*p)}),f.insert("rect","text").attr("x",n).attr("y",s).attr("width",E).attr("height",W).attr("fill","white").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}}}if(g.notes.length>0){const t=S.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=X(n.x),i=C(n.y);t.append("text").attr("x",s).attr("y",i).attr("text-anchor","start").attr("font-size",11).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.text)})}if(g.accelerators.length>0){const t=S.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=X(n.x),i=C(n.y),p=60,l=30,f=20,x=`
3        M ${s} ${i-l/2}
4        L ${s+p-f} ${i-l/2}
5        L ${s+p-f} ${i-l/2-8}
6        L ${s+p} ${i}
7        L ${s+p-f} ${i+l/2+8}
8        L ${s+p-f} ${i+l/2}
9        L ${s} ${i+l/2}
10        Z
11      `;t.append("path").attr("d",x).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}if(g.deaccelerators.length>0){const t=S.append("g").attr("class","wardley-deaccelerators");g.deaccelerators.forEach(n=>{const s=X(n.x),i=C(n.y),p=60,l=30,f=20,x=`
12        M ${s+p} ${i-l/2}
13        L ${s+f} ${i-l/2}
14        L ${s+f} ${i-l/2-8}
15        L ${s} ${i}
16        L ${s+f} ${i+l/2+8}
17        L ${s+f} ${i+l/2}
18        L ${s+p} ${i+l/2}
19        Z
20      `;t.append("path").attr("d",x).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),t.append("text").attr("x",s+p/2).attr("y",i+l/2+15).attr("text-anchor","middle").attr("font-size",10).attr("fill",d.axisTextColor).attr("font-weight","bold").text(n.name)})}},"draw"),Vt={draw:jt},le={parser:at,db:Gt,renderer:Vt,styles:y(()=>"","styles")};export{le as diagram};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.