@donartcha/openlag 0.1.4 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{arc-5hssXHF1.js → arc-Cg8uAUBB.js} +1 -1
- package/dist/assets/{architectureDiagram-3BPJPVTR-CoCQ7I8T.js → architectureDiagram-3BPJPVTR-BS-jlSix.js} +1 -1
- package/dist/assets/{blockDiagram-GPEHLZMM-Ce3SBFaK.js → blockDiagram-GPEHLZMM-piJhj2Kl.js} +1 -1
- package/dist/assets/{c4Diagram-AAUBKEIU-Cxiak8OI.js → c4Diagram-AAUBKEIU-CUkupHTt.js} +1 -1
- package/dist/assets/channel-Dg6EjY0N.js +1 -0
- package/dist/assets/{chunk-2J33WTMH-CI2-2ImK.js → chunk-2J33WTMH-DK1RvYbJ.js} +1 -1
- package/dist/assets/{chunk-4BX2VUAB-CK7HADOu.js → chunk-4BX2VUAB-DkbrtaN7.js} +1 -1
- package/dist/assets/{chunk-55IACEB6-DhMUe2Z8.js → chunk-55IACEB6-DeeqmVSw.js} +1 -1
- package/dist/assets/{chunk-727SXJPM-Ceirad8r.js → chunk-727SXJPM-BuaIQz3A.js} +1 -1
- package/dist/assets/{chunk-AQP2D5EJ-5f7TUd6D.js → chunk-AQP2D5EJ-BXTLYgxd.js} +1 -1
- package/dist/assets/{chunk-FMBD7UC4-DGLw7-i0.js → chunk-FMBD7UC4-hrXWkcdb.js} +1 -1
- package/dist/assets/{chunk-ND2GUHAM-bdCVW2vW.js → chunk-ND2GUHAM-D6pYSJIp.js} +1 -1
- package/dist/assets/{chunk-QZHKN3VN-Cvl6Nxaw.js → chunk-QZHKN3VN-DC-A3Aq8.js} +1 -1
- package/dist/assets/classDiagram-4FO5ZUOK-C_u0dh5t.js +1 -0
- package/dist/assets/classDiagram-v2-Q7XG4LA2-C_u0dh5t.js +1 -0
- package/dist/assets/{cose-bilkent-S5V4N54A-D5hPTlJh.js → cose-bilkent-S5V4N54A-DsxxO59f.js} +1 -1
- package/dist/assets/{dagre-BM42HDAG-EaLHJBg9.js → dagre-BM42HDAG-BfiDIYHL.js} +1 -1
- package/dist/assets/{diagram-2AECGRRQ-B03rLzzC.js → diagram-2AECGRRQ-DtT3XImB.js} +1 -1
- package/dist/assets/{diagram-5GNKFQAL-BMGFDeYz.js → diagram-5GNKFQAL-DJFNnWg9.js} +1 -1
- package/dist/assets/{diagram-KO2AKTUF-C67gpPIs.js → diagram-KO2AKTUF-nhyTgQNk.js} +1 -1
- package/dist/assets/{diagram-LMA3HP47-BsR8n_gX.js → diagram-LMA3HP47-Dlx64Gbc.js} +1 -1
- package/dist/assets/{diagram-OG6HWLK6-B1zv47yy.js → diagram-OG6HWLK6-BtZhjKp4.js} +1 -1
- package/dist/assets/{erDiagram-TEJ5UH35-xXOEdzQg.js → erDiagram-TEJ5UH35-DCjMay5k.js} +1 -1
- package/dist/assets/{flowDiagram-I6XJVG4X-DcjP3-zz.js → flowDiagram-I6XJVG4X-VUmu-Ulq.js} +1 -1
- package/dist/assets/{ganttDiagram-6RSMTGT7-D9QN8XP5.js → ganttDiagram-6RSMTGT7-DubywubS.js} +1 -1
- package/dist/assets/{gitGraphDiagram-PVQCEYII-Cb8pk6QE.js → gitGraphDiagram-PVQCEYII-PcO-oJqF.js} +1 -1
- package/dist/assets/index-BhnK9sdD.css +1 -0
- package/dist/assets/{index-wflyqKCW.js → index-BxBZmqgf.js} +132 -135
- package/dist/assets/{infoDiagram-5YYISTIA-CudTuB2i.js → infoDiagram-5YYISTIA-BZuhNKak.js} +1 -1
- package/dist/assets/{ishikawaDiagram-YF4QCWOH-CYrMjwuu.js → ishikawaDiagram-YF4QCWOH-BXwOxb-L.js} +1 -1
- package/dist/assets/{journeyDiagram-JHISSGLW-DOODfUXV.js → journeyDiagram-JHISSGLW-C9YvQpLx.js} +1 -1
- package/dist/assets/{kanban-definition-UN3LZRKU-CQz0IKkV.js → kanban-definition-UN3LZRKU-BL-bN75y.js} +1 -1
- package/dist/assets/{linear-0fFjcdIi.js → linear-ro7DcLah.js} +1 -1
- package/dist/assets/{mindmap-definition-RKZ34NQL-BnFimeAu.js → mindmap-definition-RKZ34NQL-TyafSJyD.js} +1 -1
- package/dist/assets/{pieDiagram-4H26LBE5-CMoHxt1c.js → pieDiagram-4H26LBE5-CGF8I-Jg.js} +1 -1
- package/dist/assets/{quadrantDiagram-W4KKPZXB-C5mSbaI8.js → quadrantDiagram-W4KKPZXB-gPuTV6yC.js} +1 -1
- package/dist/assets/{requirementDiagram-4Y6WPE33-CeADpKMZ.js → requirementDiagram-4Y6WPE33-DMNEMII6.js} +1 -1
- package/dist/assets/{sankeyDiagram-5OEKKPKP-ELntQlI8.js → sankeyDiagram-5OEKKPKP-CcLp1J1q.js} +1 -1
- package/dist/assets/{sequenceDiagram-3UESZ5HK-5mkiPlow.js → sequenceDiagram-3UESZ5HK-CRQIa-m4.js} +1 -1
- package/dist/assets/{stateDiagram-AJRCARHV-DbNfJB9W.js → stateDiagram-AJRCARHV-BCDHz4Yx.js} +1 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-Cyj4KCTb.js +1 -0
- package/dist/assets/{timeline-definition-PNZ67QCA-C8k4W5sA.js → timeline-definition-PNZ67QCA-BZBzVnMe.js} +1 -1
- package/dist/assets/{vennDiagram-CIIHVFJN-eO-TQun1.js → vennDiagram-CIIHVFJN-BLb-Z_mb.js} +1 -1
- package/dist/assets/{wardley-L42UT6IY-BuAaO8uL.js → wardley-L42UT6IY-DqVhxf9g.js} +1 -1
- package/dist/assets/{wardleyDiagram-YWT4CUSO-CTutletf.js → wardleyDiagram-YWT4CUSO-cmFDR9p-.js} +1 -1
- package/dist/assets/{xychartDiagram-2RQKCTM6-wrRC0RBX.js → xychartDiagram-2RQKCTM6-DmAwTFQ_.js} +1 -1
- package/dist/cli/openlag.js +16 -17
- package/dist/index.html +2 -2
- package/package.json +1 -1
- package/scripts/cli/init.ts +15 -15
- package/scripts/lint/lint-rules.ts +1 -1
- package/src/components/DocumentationView.tsx +83 -82
- package/src/components/GraphView.tsx +23 -11
- package/src/components/GuideView.tsx +5 -3
- package/src/components/ImpactView.tsx +10 -6
- package/src/components/OrphansView.tsx +8 -5
- package/src/core/semantic/artifact-layers.ts +1 -2
- package/src/utils/artifactUtils.ts +93 -0
- package/dist/assets/channel-BGwATj28.js +0 -1
- package/dist/assets/classDiagram-4FO5ZUOK-xQe3lOVv.js +0 -1
- package/dist/assets/classDiagram-v2-Q7XG4LA2-xQe3lOVv.js +0 -1
- package/dist/assets/index-D02phRy3.css +0 -1
- package/dist/assets/stateDiagram-v2-BHNVJYJU-hHz3nsFQ.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{s as A,a as W,S as N}from"./chunk-AQP2D5EJ-5f7TUd6D.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,R as _,S as U,O as C,u as F}from"./index-wflyqKCW.js";import{G as O}from"./graph-CAnANduQ.js";import{l as J}from"./layout-DGIYPm2g.js";import"./chunk-55IACEB6-DhMUe2Z8.js";import"./chunk-2J33WTMH-CI2-2ImK.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");R(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=R(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},gt={parser:W,get db(){return new N(1)},renderer:it,styles:A,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{gt as diagram};
|
|
1
|
+
import{s as A,a as W,S as N}from"./chunk-AQP2D5EJ-BXTLYgxd.js";import{_ as f,c as t,d as H,l as S,e as P,k as z,R as _,S as U,O as C,u as F}from"./index-BxBZmqgf.js";import{G as O}from"./graph-CAnANduQ.js";import{l as J}from"./layout-DGIYPm2g.js";import"./chunk-55IACEB6-DeeqmVSw.js";import"./chunk-2J33WTMH-DK1RvYbJ.js";var X=f(e=>e.append("circle").attr("class","start-state").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit).attr("cy",t().state.padding+t().state.sizeUnit),"drawStartState"),D=f(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t().state.textHeight).attr("class","divider").attr("x2",t().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),Y=f((e,i)=>{const d=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+2*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),c=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",c.width+2*t().state.padding).attr("height",c.height+2*t().state.padding).attr("rx",t().state.radius),d},"drawSimpleState"),I=f((e,i)=>{const d=f(function(o,B,y){const v=o.append("tspan").attr("x",2*t().state.padding).text(B);y||v.attr("dy",t().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*t().state.padding).attr("y",t().state.textHeight+1.3*t().state.padding).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.descriptions[0]).node().getBBox(),l=n.height,p=e.append("text").attr("x",t().state.padding).attr("y",l+t().state.padding*.4+t().state.dividerMargin+t().state.textHeight).attr("class","state-description");let a=!0,s=!0;i.descriptions.forEach(function(o){a||(d(p,o,s),s=!1),a=!1});const m=e.append("line").attr("x1",t().state.padding).attr("y1",t().state.padding+l+t().state.dividerMargin/2).attr("y2",t().state.padding+l+t().state.dividerMargin/2).attr("class","descr-divider"),x=p.node().getBBox(),g=Math.max(x.width,n.width);return m.attr("x2",g+3*t().state.padding),e.insert("rect",":first-child").attr("x",t().state.padding).attr("y",t().state.padding).attr("width",g+2*t().state.padding).attr("height",x.height+l+2*t().state.padding).attr("rx",t().state.radius),e},"drawDescrState"),$=f((e,i,d)=>{const c=t().state.padding,n=2*t().state.padding,l=e.node().getBBox(),p=l.width,a=l.x,s=e.append("text").attr("x",0).attr("y",t().state.titleShift).attr("font-size",t().state.fontSize).attr("class","state-title").text(i.id),x=s.node().getBBox().width+n;let g=Math.max(x,p);g===p&&(g=g+n);let o;const B=e.node().getBBox();i.doc,o=a-c,x>p&&(o=(p-g)/2+c),Math.abs(a-B.x)<c&&x>p&&(o=a-(x-p)/2);const y=1-t().state.textHeight;return e.insert("rect",":first-child").attr("x",o).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",g).attr("height",B.height+t().state.textHeight+t().state.titleShift+1).attr("rx","0"),s.attr("x",o+c),x<=p&&s.attr("x",a+(g-n)/2-x/2+c),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",t().state.textHeight*3).attr("rx",t().state.radius),e.insert("rect",":first-child").attr("x",o).attr("y",t().state.titleShift-t().state.textHeight-t().state.padding).attr("width",g).attr("height",B.height+3+2*t().state.textHeight).attr("rx",t().state.radius),e},"addTitleAndBox"),q=f(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t().state.sizeUnit+t().state.miniPadding).attr("cx",t().state.padding+t().state.sizeUnit+t().state.miniPadding).attr("cy",t().state.padding+t().state.sizeUnit+t().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t().state.sizeUnit).attr("cx",t().state.padding+t().state.sizeUnit+2).attr("cy",t().state.padding+t().state.sizeUnit+2)),"drawEndState"),Z=f((e,i)=>{let d=t().state.forkWidth,c=t().state.forkHeight;if(i.parentId){let n=d;d=c,c=n}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",c).attr("x",t().state.padding).attr("y",t().state.padding)},"drawForkJoinState"),j=f((e,i,d,c)=>{let n=0;const l=c.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const a=p.split(z.lineBreakRegex);let s=1.25*t().state.noteMargin;for(const m of a){const x=m.trim();if(x.length>0){const g=l.append("tspan");if(g.text(x),s===0){const o=g.node().getBBox();s+=o.height}n+=s,g.attr("x",i+t().state.noteMargin),g.attr("y",d+n+1.25*t().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:n}},"_drawLongText"),K=f((e,i)=>{i.attr("class","state-note");const d=i.append("rect").attr("x",0).attr("y",t().state.padding),c=i.append("g"),{textWidth:n,textHeight:l}=j(e,0,0,c);return d.attr("height",l+2*t().state.noteMargin),d.attr("width",n+t().state.noteMargin*2),d},"drawNote"),L=f(function(e,i){const d=i.id,c={id:d,label:i.id,width:0,height:0},n=e.append("g").attr("id",d).attr("class","stateGroup");i.type==="start"&&X(n),i.type==="end"&&q(n),(i.type==="fork"||i.type==="join")&&Z(n,i),i.type==="note"&&K(i.note.text,n),i.type==="divider"&&D(n),i.type==="default"&&i.descriptions.length===0&&Y(n,i),i.type==="default"&&i.descriptions.length>0&&I(n,i);const l=n.node().getBBox();return c.width=l.width+2*t().state.padding,c.height=l.height+2*t().state.padding,c},"drawState"),G=0,Q=f(function(e,i,d){const c=f(function(s){switch(s){case N.relationType.AGGREGATION:return"aggregation";case N.relationType.EXTENSION:return"extension";case N.relationType.COMPOSITION:return"composition";case N.relationType.DEPENDENCY:return"dependency"}},"getRelationType");i.points=i.points.filter(s=>!Number.isNaN(s.y));const n=i.points,l=_().x(function(s){return s.x}).y(function(s){return s.y}).curve(U),p=e.append("path").attr("d",l(n)).attr("id","edge"+G).attr("class","transition");let a="";if(t().state.arrowMarkerAbsolute&&(a=C(!0)),p.attr("marker-end","url("+a+"#"+c(N.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const s=e.append("g").attr("class","stateLabel"),{x:m,y:x}=F.calcLabelPosition(i.points),g=z.getRows(d.title);let o=0;const B=[];let y=0,v=0;for(let u=0;u<=g.length;u++){const h=s.append("text").attr("text-anchor","middle").text(g[u]).attr("x",m).attr("y",x+o),w=h.node().getBBox();y=Math.max(y,w.width),v=Math.min(v,w.x),S.info(w.x,m,x+o),o===0&&(o=h.node().getBBox().height,S.info("Title height",o,x)),B.push(h)}let k=o*g.length;if(g.length>1){const u=(g.length-1)*o*.5;B.forEach((h,w)=>h.attr("y",x+w*o-u)),k=o*g.length}const r=s.node().getBBox();s.insert("rect",":first-child").attr("class","box").attr("x",m-y/2-t().state.padding/2).attr("y",x-k/2-t().state.padding/2-3.5).attr("width",y+t().state.padding).attr("height",k+t().state.padding),S.info(r)}G++},"drawEdge"),b,T={},V=f(function(){},"setConf"),tt=f(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),et=f(function(e,i,d,c){b=t().state;const n=t().securityLevel;let l;n==="sandbox"&&(l=H("#i"+i));const p=n==="sandbox"?H(l.nodes()[0].contentDocument.body):H("body"),a=n==="sandbox"?l.nodes()[0].contentDocument:document;S.debug("Rendering diagram "+e);const s=p.select(`[id='${i}']`);tt(s);const m=c.db.getRootDoc(),x=s.append("g").attr("id",i+"-root");R(m,x,void 0,!1,p,a,c);const g=b.padding,o=s.node().getBBox(),B=o.width+g*2,y=o.height+g*2,v=B*1.75;P(s,y,v,b.useMaxWidth),s.attr("viewBox",`${o.x-b.padding} ${o.y-b.padding} `+B+" "+y)},"draw"),at=f(e=>e?e.length*b.fontSizeFactor:1,"getLabelWidth"),R=f((e,i,d,c,n,l,p)=>{const a=new O({compound:!0,multigraph:!0});let s,m=!0;for(s=0;s<e.length;s++)if(e[s].stmt==="relation"){m=!1;break}d?a.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,isMultiGraph:!0}):a.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:m?1:b.edgeLengthFactor,nodeSep:m?1:50,ranker:"tight-tree",isMultiGraph:!0}),a.setDefaultEdgeLabel(function(){return{}});const x=p.db.getStates(),g=p.db.getRelations(),o=Object.keys(x);for(const r of o){const u=x[r];d&&(u.parentId=d);let h;if(u.doc){let w=i.append("g").attr("id",u.id).attr("class","stateGroup");h=R(u.doc,w,u.id,!c,n,l,p);{w=$(w,u,c);let E=w.node().getBBox();h.width=E.width,h.height=E.height+b.padding/2,T[u.id]={y:b.compositTitleSize}}}else h=L(i,u,a);if(u.note){const w={descriptions:[],id:u.id+"-note",note:u.note,type:"note"},E=L(i,w,a);u.note.position==="left of"?(a.setNode(h.id+"-note",E),a.setNode(h.id,h)):(a.setNode(h.id,h),a.setNode(h.id+"-note",E)),a.setParent(h.id,h.id+"-group"),a.setParent(h.id+"-note",h.id+"-group")}else a.setNode(h.id,h)}S.debug("Count=",a.nodeCount(),a);let B=0;g.forEach(function(r){B++,S.debug("Setting edge",r),a.setEdge(r.id1,r.id2,{relation:r,width:at(r.title),height:b.labelHeight*z.getRows(r.title).length,labelpos:"c"},"id"+B)}),J(a),S.debug("Graph after layout",a.nodes());const y=i.node();a.nodes().forEach(function(r){r!==void 0&&a.node(r)!==void 0?(S.warn("Node "+r+": "+JSON.stringify(a.node(r))),n.select("#"+y.id+" #"+r).attr("transform","translate("+(a.node(r).x-a.node(r).width/2)+","+(a.node(r).y+(T[r]?T[r].y:0)-a.node(r).height/2)+" )"),n.select("#"+y.id+" #"+r).attr("data-x-shift",a.node(r).x-a.node(r).width/2),l.querySelectorAll("#"+y.id+" #"+r+" .divider").forEach(h=>{const w=h.parentElement;let E=0,M=0;w&&(w.parentElement&&(E=w.parentElement.getBBox().width),M=parseInt(w.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),h.setAttribute("x1",0-M+8),h.setAttribute("x2",E-M-8)})):S.debug("No Node "+r+": "+JSON.stringify(a.node(r)))});let v=y.getBBox();a.edges().forEach(function(r){r!==void 0&&a.edge(r)!==void 0&&(S.debug("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(a.edge(r))),Q(i,a.edge(r),a.edge(r).relation))}),v=y.getBBox();const k={id:d||"root",label:d||"root",width:0,height:0};return k.width=v.width+2*b.padding,k.height=v.height+2*b.padding,S.debug("Doc rendered",k,a),k},"renderDoc"),it={setConf:V,draw:et},gt={parser:W,get db(){return new N(1)},renderer:it,styles:A,init:f(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{gt as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{s as t,b as r,a,S as s}from"./chunk-AQP2D5EJ-BXTLYgxd.js";import{_ as i}from"./index-BxBZmqgf.js";import"./chunk-55IACEB6-DeeqmVSw.js";import"./chunk-2J33WTMH-DK1RvYbJ.js";var l={parser:a,get db(){return new s(2)},renderer:r,styles:t,init:i(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};export{l as diagram};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{_ as l,D as pt,V as Wt,W as Pt,X as Bt,c as gt,l as S,I as Vt,N as Ft,Y as ft,d as J,C as zt,$ as Gt,z as Ot}from"./index-
|
|
1
|
+
import{_ as l,D as pt,V as Wt,W as Pt,X as Bt,c as gt,l as S,I as Vt,N as Ft,Y as ft,d as J,C as zt,$ as Gt,z as Ot}from"./index-BxBZmqgf.js";import{d as ot}from"./arc-Cg8uAUBB.js";var tt=(function(){var e=l(function(k,s,d,h){for(d=d||{},h=k.length;h--;d[k[h]]=s);return d},"o"),t=[6,11,13,14,15,17,19,20,23,24],n=[1,12],i=[1,13],r=[1,14],o=[1,15],c=[1,16],a=[1,19],p=[1,20],y={trace:l(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline_header:4,document:5,EOF:6,timeline:7,timeline_lr:8,timeline_td:9,line:10,SPACE:11,statement:12,NEWLINE:13,title:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,period_statement:21,event_statement:22,period:23,event:24,$accept:0,$end:1},terminals_:{2:"error",6:"EOF",7:"timeline",8:"timeline_lr",9:"timeline_td",11:"SPACE",13:"NEWLINE",14:"title",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",23:"period",24:"event"},productions_:[0,[3,3],[4,1],[4,1],[4,1],[5,0],[5,2],[10,2],[10,1],[10,1],[10,1],[12,1],[12,2],[12,2],[12,1],[12,1],[12,1],[12,1],[21,1],[22,1]],performAction:l(function(s,d,h,g,m,u,w){var v=u.length-1;switch(m){case 1:return u[v-1];case 3:g.setDirection("LR");break;case 4:g.setDirection("TD");break;case 5:this.$=[];break;case 6:u[v-1].push(u[v]),this.$=u[v-1];break;case 7:case 8:this.$=u[v];break;case 9:case 10:this.$=[];break;case 11:g.getCommonDb().setDiagramTitle(u[v].substr(6)),this.$=u[v].substr(6);break;case 12:this.$=u[v].trim(),g.getCommonDb().setAccTitle(this.$);break;case 13:case 14:this.$=u[v].trim(),g.getCommonDb().setAccDescription(this.$);break;case 15:g.addSection(u[v].substr(8)),this.$=u[v].substr(8);break;case 18:g.addTask(u[v],0,""),this.$=u[v];break;case 19:g.addEvent(u[v].substr(2)),this.$=u[v];break}},"anonymous"),table:[{3:1,4:2,7:[1,3],8:[1,4],9:[1,5]},{1:[3]},e(t,[2,5],{5:6}),e(t,[2,2]),e(t,[2,3]),e(t,[2,4]),{6:[1,7],10:8,11:[1,9],12:10,13:[1,11],14:n,15:i,17:r,19:o,20:c,21:17,22:18,23:a,24:p},e(t,[2,10],{1:[2,1]}),e(t,[2,6]),{12:21,14:n,15:i,17:r,19:o,20:c,21:17,22:18,23:a,24:p},e(t,[2,8]),e(t,[2,9]),e(t,[2,11]),{16:[1,22]},{18:[1,23]},e(t,[2,14]),e(t,[2,15]),e(t,[2,16]),e(t,[2,17]),e(t,[2,18]),e(t,[2,19]),e(t,[2,7]),e(t,[2,12]),e(t,[2,13])],defaultActions:{},parseError:l(function(s,d){if(d.recoverable)this.trace(s);else{var h=new Error(s);throw h.hash=d,h}},"parseError"),parse:l(function(s){var d=this,h=[0],g=[],m=[null],u=[],w=this.table,v="",M=0,R=0,P=2,V=1,L=u.slice.call(arguments,1),_=Object.create(this.lexer),C={yy:{}};for(var F in this.yy)Object.prototype.hasOwnProperty.call(this.yy,F)&&(C.yy[F]=this.yy[F]);_.setInput(s,C.yy),C.yy.lexer=_,C.yy.parser=this,typeof _.yylloc>"u"&&(_.yylloc={});var z=_.yylloc;u.push(z);var q=_.options&&_.options.ranges;typeof C.yy.parseError=="function"?this.parseError=C.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function X(A){h.length=h.length-2*A,m.length=m.length-A,u.length=u.length-A}l(X,"popStack");function O(){var A;return A=g.pop()||_.lex()||V,typeof A!="number"&&(A instanceof Array&&(g=A,A=g.pop()),A=d.symbols_[A]||A),A}l(O,"lex");for(var $,N,b,T,E={},H,I,B,D;;){if(N=h[h.length-1],this.defaultActions[N]?b=this.defaultActions[N]:(($===null||typeof $>"u")&&($=O()),b=w[N]&&w[N][$]),typeof b>"u"||!b.length||!b[0]){var K="";D=[];for(H in w[N])this.terminals_[H]&&H>P&&D.push("'"+this.terminals_[H]+"'");_.showPosition?K="Parse error on line "+(M+1)+`:
|
|
2
2
|
`+_.showPosition()+`
|
|
3
3
|
Expecting `+D.join(", ")+", got '"+(this.terminals_[$]||$)+"'":K="Parse error on line "+(M+1)+": Unexpected "+($==V?"end of input":"'"+(this.terminals_[$]||$)+"'"),this.parseError(K,{text:_.match,token:this.terminals_[$]||$,line:_.yylineno,loc:z,expected:D})}if(b[0]instanceof Array&&b.length>1)throw new Error("Parse Error: multiple actions possible at state: "+N+", token: "+$);switch(b[0]){case 1:h.push($),m.push(_.yytext),u.push(_.yylloc),h.push(b[1]),$=null,R=_.yyleng,v=_.yytext,M=_.yylineno,z=_.yylloc;break;case 2:if(I=this.productions_[b[1]][1],E.$=m[m.length-I],E._$={first_line:u[u.length-(I||1)].first_line,last_line:u[u.length-1].last_line,first_column:u[u.length-(I||1)].first_column,last_column:u[u.length-1].last_column},q&&(E._$.range=[u[u.length-(I||1)].range[0],u[u.length-1].range[1]]),T=this.performAction.apply(E,[v,R,M,C.yy,b[1],m,u].concat(L)),typeof T<"u")return T;I&&(h=h.slice(0,-1*I*2),m=m.slice(0,-1*I),u=u.slice(0,-1*I)),h.push(this.productions_[b[1]][0]),m.push(E.$),u.push(E._$),B=w[h[h.length-2]][h[h.length-1]],h.push(B);break;case 3:return!0}}return!0},"parse")},x=(function(){var k={EOF:1,parseError:l(function(d,h){if(this.yy.parser)this.yy.parser.parseError(d,h);else throw new Error(d)},"parseError"),setInput:l(function(s,d){return this.yy=d||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:l(function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var d=s.match(/(?:\r\n?|\n).*/g);return d?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},"input"),unput:l(function(s){var d=s.length,h=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-d),this.offset-=d;var g=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),h.length-1&&(this.yylineno-=h.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:h?(h.length===g.length?this.yylloc.first_column:0)+g[g.length-h.length].length-h[0].length:this.yylloc.first_column-d},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-d]),this.yyleng=this.yytext.length,this},"unput"),more:l(function(){return this._more=!0,this},"more"),reject:l(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:l(function(s){this.unput(this.match.slice(s))},"less"),pastInput:l(function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:l(function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:l(function(){var s=this.pastInput(),d=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{aU as Gt,s as Wt,g as Kt,q as Ht,p as Xt,a as Yt,b as Zt,_ as S,D as St,I as Jt,d as rt,al as Qt,V as $t,W as te,X as ee,e as ne,z as se,F as ie,G as re}from"./index-wflyqKCW.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),E=Math.atan2(f.x-x.x,f.y-x.y);let _=E-M;_<0&&(_+=2*Math.PI);const w=E-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const E=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(E),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(E),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,E){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=E)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,E=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let E=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in E)return E[p];var h=E[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Ct(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const X={};h.forEach(I=>{I.label&&(X[I.sets]=I.label)});function B(I){if(I.sets in X)return X[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const D=U.selectAll(".venn-area").data(h,I=>I.sets),O=D.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let T=p;z&&typeof T.transition=="function"?(T=R(p),T.selectAll("path").attrTween("d",A)):T.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=T.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const C=R(D.exit()).remove();typeof D.transition=="function"&&C.selectAll("path").attrTween("d",A);const Y=C.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),Y.style("font-size","0px")),{circles:k,textCentres:N,nodes:D,enter:O,update:T,exit:C}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Dt:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const E=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
1
|
+
import{aU as Gt,s as Wt,g as Kt,q as Ht,p as Xt,a as Yt,b as Zt,_ as S,D as St,I as Jt,d as rt,al as Qt,V as $t,W as te,X as ee,e as ne,z as se,F as ie,G as re}from"./index-BxBZmqgf.js";const kt=(t,n)=>Gt(t,"a",-n),_t=1e-10;function st(t,n){const s=ae(t),e=s.filter(c=>oe(c,t));let i=0,r=0;const o=[];if(e.length>1){const c=Et(e);for(let u=0;u<e.length;++u){const a=e[u];a.angle=Math.atan2(a.x-c.x,a.y-c.y)}e.sort((u,a)=>a.angle-u.angle);let f=e[e.length-1];for(let u=0;u<e.length;++u){const a=e[u];r+=(f.x+a.x)*(a.y-f.y);const y={x:(a.x+f.x)/2,y:(a.y+f.y)/2};let d=null;for(let m=0;m<a.parentIndex.length;++m)if(f.parentIndex.includes(a.parentIndex[m])){const x=t[a.parentIndex[m]],M=Math.atan2(a.x-x.x,a.y-x.y),E=Math.atan2(f.x-x.x,f.y-x.y);let _=E-M;_<0&&(_+=2*Math.PI);const w=E-_/2;let g=W(y,{x:x.x+x.radius*Math.sin(w),y:x.y+x.radius*Math.cos(w)});g>x.radius*2&&(g=x.radius*2),(d==null||d.width>g)&&(d={circle:x,width:g,p1:a,p2:f,large:g>x.radius,sweep:!0})}d!=null&&(o.push(d),i+=lt(d.circle.radius,d.width),f=a)}}else{let c=t[0];for(let u=1;u<t.length;++u)t[u].radius<c.radius&&(c=t[u]);let f=!1;for(let u=0;u<t.length;++u)if(W(t[u],c)>Math.abs(c.radius-t[u].radius)){f=!0;break}f?i=r=0:(i=c.radius*c.radius*Math.PI,o.push({circle:c,p1:{x:c.x,y:c.y+c.radius},p2:{x:c.x-_t,y:c.y+c.radius},width:c.radius*2,large:!0,sweep:!0}))}return r/=2,n&&(n.area=i+r,n.arcArea=i,n.polygonArea=r,n.arcs=o,n.innerPoints=e,n.intersectionPoints=s),i+r}function oe(t,n){return n.every(s=>W(t,s)<s.radius+_t)}function ae(t){const n=[];for(let s=0;s<t.length;++s)for(let e=s+1;e<t.length;++e){const i=Tt(t[s],t[e]);for(const r of i)r.parentIndex=[s,e],n.push(r)}return n}function lt(t,n){return t*t*Math.acos(1-n/t)-(t-n)*Math.sqrt(n*(2*t-n))}function W(t,n){return Math.sqrt((t.x-n.x)*(t.x-n.x)+(t.y-n.y)*(t.y-n.y))}function xt(t,n,s){if(s>=t+n)return 0;if(s<=Math.abs(t-n))return Math.PI*Math.min(t,n)*Math.min(t,n);const e=t-(s*s-n*n+t*t)/(2*s),i=n-(s*s-t*t+n*n)/(2*s);return lt(t,e)+lt(n,i)}function Tt(t,n){const s=W(t,n),e=t.radius,i=n.radius;if(s>=e+i||s<=Math.abs(e-i))return[];const r=(e*e-i*i+s*s)/(2*s),o=Math.sqrt(e*e-r*r),c=t.x+r*(n.x-t.x)/s,f=t.y+r*(n.y-t.y)/s,u=-(n.y-t.y)*(o/s),a=-(n.x-t.x)*(o/s);return[{x:c+u,y:f-a},{x:c-u,y:f+a}]}function Et(t){const n={x:0,y:0};for(const s of t)n.x+=s.x,n.y+=s.y;return n.x/=t.length,n.y/=t.length,n}function le(t,n,s,e){e=e||{};const i=e.maxIterations||100,r=e.tolerance||1e-10,o=t(n),c=t(s);let f=s-n;if(o*c>0)throw"Initial bisect points must have opposite signs";if(o===0)return n;if(c===0)return s;for(let u=0;u<i;++u){f/=2;const a=n+f,y=t(a);if(y*o>=0&&(n=a),Math.abs(f)<r||y===0)return a}return n+f}function ct(t){const n=new Array(t);for(let s=0;s<t;++s)n[s]=0;return n}function Mt(t,n){return ct(t).map(()=>ct(n))}function tt(t,n){let s=0;for(let e=0;e<t.length;++e)s+=t[e]*n[e];return s}function ut(t){return Math.sqrt(tt(t,t))}function ht(t,n,s){for(let e=0;e<n.length;++e)t[e]=n[e]*s}function Q(t,n,s,e,i){for(let r=0;r<t.length;++r)t[r]=n*s[r]+e*i[r]}function zt(t,n,s){s=s||{};const e=s.maxIterations||n.length*200,i=s.nonZeroDelta||1.05,r=s.zeroDelta||.001,o=s.minErrorDelta||1e-6,c=s.minErrorDelta||1e-5,f=s.rho!==void 0?s.rho:1,u=s.chi!==void 0?s.chi:2,a=s.psi!==void 0?s.psi:-.5,y=s.sigma!==void 0?s.sigma:.5;let d;const m=n.length,x=new Array(m+1);x[0]=n,x[0].fx=t(n),x[0].id=0;for(let v=0;v<m;++v){const l=n.slice();l[v]=l[v]?l[v]*i:r,x[v+1]=l,x[v+1].fx=t(l),x[v+1].id=v+1}function M(v){for(let l=0;l<v.length;l++)x[m][l]=v[l];x[m].fx=v.fx}const E=(v,l)=>v.fx-l.fx,_=n.slice(),w=n.slice(),g=n.slice(),b=n.slice();for(let v=0;v<e;++v){if(x.sort(E),s.history){const p=x.map(h=>{const j=h.slice();return j.fx=h.fx,j.id=h.id,j});p.sort((h,j)=>h.id-j.id),s.history.push({x:x[0].slice(),fx:x[0].fx,simplex:p})}d=0;for(let p=0;p<m;++p)d=Math.max(d,Math.abs(x[0][p]-x[1][p]));if(Math.abs(x[0].fx-x[m].fx)<o&&d<c)break;for(let p=0;p<m;++p){_[p]=0;for(let h=0;h<m;++h)_[p]+=x[h][p];_[p]/=m}const l=x[m];if(Q(w,1+f,_,-f,l),w.fx=t(w),w.fx<x[0].fx)Q(b,1+u,_,-u,l),b.fx=t(b),b.fx<w.fx?M(b):M(w);else if(w.fx>=x[m-1].fx){let p=!1;if(w.fx>l.fx?(Q(g,1+a,_,-a,l),g.fx=t(g),g.fx<l.fx?M(g):p=!0):(Q(g,1-a*f,_,a*f,l),g.fx=t(g),g.fx<w.fx?M(g):p=!0),p){if(y>=1)break;for(let h=1;h<x.length;++h)Q(x[h],1-y,x[0],y,x[h]),x[h].fx=t(x[h])}}else M(w)}return x.sort(E),{fx:x[0].fx,x:x[0]}}function ce(t,n,s,e,i,r,o){const c=s.fx,f=tt(s.fxprime,n);let u=c,a=c,y=f,d=0;i=i||1,r=r||1e-6,o=o||.1;function m(x,M,E){for(let _=0;_<16;++_)if(i=(x+M)/2,Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||u>=E)M=i;else{if(Math.abs(y)<=-o*f)return i;y*(M-x)>=0&&(M=x),x=i,E=u}return 0}for(let x=0;x<10;++x){if(Q(e.x,1,s.x,i,n),u=e.fx=t(e.x,e.fxprime),y=tt(e.fxprime,n),u>c+r*i*f||x&&u>=a)return m(d,i,a);if(Math.abs(y)<=-o*f)return i;if(y>=0)return m(i,d,u);a=u,d=i,i*=2}return i}function ue(t,n,s){let e={x:n.slice(),fx:0,fxprime:n.slice()},i={x:n.slice(),fx:0,fxprime:n.slice()};const r=n.slice();let o,c,f=1,u;s=s||{},u=s.maxIterations||n.length*20,e.fx=t(e.x,e.fxprime),o=e.fxprime.slice(),ht(o,e.fxprime,-1);for(let a=0;a<u;++a){if(f=ce(t,o,e,i,f),s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),!f)ht(o,e.fxprime,-1);else{Q(r,1,i.fxprime,-1,e.fxprime);const y=tt(e.fxprime,e.fxprime),d=Math.max(0,tt(r,i.fxprime)/y);Q(o,d,o,-1,i.fxprime),c=e,e=i,i=c}if(ut(e.fxprime)<=1e-5)break}return s.history&&s.history.push({x:e.x.slice(),fx:e.fx,fxprime:e.fxprime.slice(),alpha:f}),e}function At(t,n={}){n.maxIterations=n.maxIterations||500;const s=n.initialLayout||ge,e=n.lossFunction||et,i=he(t,n),r=s(i,n),o=Object.keys(r),c=[];for(const a of o)c.push(r[a].x),c.push(r[a].y);const u=zt(a=>{const y={};for(let d=0;d<o.length;++d){const m=o[d];y[m]={x:a[2*d],y:a[2*d+1],radius:r[m].radius}}return e(y,i)},c,n).x;for(let a=0;a<o.length;++a){const y=o[a];r[y].x=u[2*a],r[y].y=u[2*a+1]}return r}const Rt=1e-10;function ft(t,n,s){return Math.min(t,n)*Math.min(t,n)*Math.PI<=s+Rt?Math.abs(t-n):le(e=>xt(t,n,e)-s,0,t+n)}function he(t,n={}){const s=n.distinct,e=t.map(c=>Object.assign({},c));function i(c){return c.join(";")}if(s){const c=new Map;for(const f of e)for(let u=0;u<f.sets.length;u++){const a=String(f.sets[u]);c.set(a,f.size+(c.get(a)||0));for(let y=u+1;y<f.sets.length;y++){const d=String(f.sets[y]),m=`${a};${d}`,x=`${d};${a}`;c.set(m,f.size+(c.get(m)||0)),c.set(x,f.size+(c.get(x)||0))}}for(const f of e)f.sets.length<3&&(f.size=c.get(i(f.sets)))}const r=[],o=new Set;for(const c of e)if(c.sets.length===1)r.push(c.sets[0]);else if(c.sets.length===2){const f=c.sets[0],u=c.sets[1];o.add(i(c.sets)),o.add(i([u,f]))}r.sort((c,f)=>c===f?0:c<f?-1:1);for(let c=0;c<r.length;++c){const f=r[c];for(let u=c+1;u<r.length;++u){const a=r[u];o.has(i([f,a]))||e.push({sets:[f,a],size:0})}}return e}function fe(t,n,s){const e=Mt(n.length,n.length),i=Mt(n.length,n.length);return t.filter(r=>r.sets.length===2).forEach(r=>{const o=s[r.sets[0]],c=s[r.sets[1]],f=Math.sqrt(n[o].size/Math.PI),u=Math.sqrt(n[c].size/Math.PI),a=ft(f,u,r.size);e[o][c]=e[c][o]=a;let y=0;r.size+1e-10>=Math.min(n[o].size,n[c].size)?y=1:r.size<=1e-10&&(y=-1),i[o][c]=i[c][o]=y}),{distances:e,constraints:i}}function de(t,n,s,e){for(let r=0;r<n.length;++r)n[r]=0;let i=0;for(let r=0;r<s.length;++r){const o=t[2*r],c=t[2*r+1];for(let f=r+1;f<s.length;++f){const u=t[2*f],a=t[2*f+1],y=s[r][f],d=e[r][f],m=(u-o)*(u-o)+(a-c)*(a-c),x=Math.sqrt(m),M=m-y*y;d>0&&x<=y||d<0&&x>=y||(i+=2*M*M,n[2*r]+=4*M*(o-u),n[2*r+1]+=4*M*(c-a),n[2*f]+=4*M*(u-o),n[2*f+1]+=4*M*(a-c))}}return i}function ge(t,n={}){let s=ye(t,n);const e=n.lossFunction||et;if(t.length>=8){const i=xe(t,n),r=e(i,t),o=e(s,t);r+1e-8<o&&(s=i)}return s}function xe(t,n={}){const s=n.restarts||10,e=[],i={};for(const d of t)d.sets.length===1&&(i[d.sets[0]]=e.length,e.push(d));let{distances:r,constraints:o}=fe(t,e,i);const c=ut(r.map(ut))/r.length;r=r.map(d=>d.map(m=>m/c));const f=(d,m)=>de(d,m,r,o);let u=null;for(let d=0;d<s;++d){const m=ct(r.length*2).map(Math.random),x=ue(f,m,n);(!u||x.fx<u.fx)&&(u=x)}const a=u.x,y={};for(let d=0;d<e.length;++d){const m=e[d];y[m.sets[0]]={x:a[2*d]*c,y:a[2*d+1]*c,radius:Math.sqrt(m.size/Math.PI)}}if(n.history)for(const d of n.history)ht(d.x,c);return y}function ye(t,n){const s=n&&n.lossFunction?n.lossFunction:et,e={},i={};for(const y of t)if(y.sets.length===1){const d=y.sets[0];e[d]={x:1e10,y:1e10,rowid:e.length,size:y.size,radius:Math.sqrt(y.size/Math.PI)},i[d]=[]}t=t.filter(y=>y.sets.length===2);for(const y of t){let d=y.weight!=null?y.weight:1;const m=y.sets[0],x=y.sets[1];y.size+Rt>=Math.min(e[m].size,e[x].size)&&(d=0),i[m].push({set:x,size:y.size,weight:d}),i[x].push({set:m,size:y.size,weight:d})}const r=[];Object.keys(i).forEach(y=>{let d=0;for(let m=0;m<i[y].length;++m)d+=i[y][m].size*i[y][m].weight;r.push({set:y,size:d})});function o(y,d){return d.size-y.size}r.sort(o);const c={};function f(y){return y.set in c}function u(y,d){e[d].x=y.x,e[d].y=y.y,c[d]=!0}u({x:0,y:0},r[0].set);for(let y=1;y<r.length;++y){const d=r[y].set,m=i[d].filter(f),x=e[d];if(m.sort(o),m.length===0)throw"ERROR: missing pairwise overlap information";const M=[];for(var a=0;a<m.length;++a){const w=e[m[a].set],g=ft(x.radius,w.radius,m[a].size);M.push({x:w.x+g,y:w.y}),M.push({x:w.x-g,y:w.y}),M.push({y:w.y+g,x:w.x}),M.push({y:w.y-g,x:w.x});for(let b=a+1;b<m.length;++b){const v=e[m[b].set],l=ft(x.radius,v.radius,m[b].size),p=Tt({x:w.x,y:w.y,radius:g},{x:v.x,y:v.y,radius:l});M.push(...p)}}let E=1e50,_=M[0];for(const w of M){e[d].x=w.x,e[d].y=w.y;const g=s(e,t);g<E&&(E=g,_=w)}u(_,d)}return e}function et(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const o=t[e.sets[0]],c=t[e.sets[1]];i=xt(o.radius,c.radius,W(o,c))}else i=st(e.sets.map(o=>t[o]));const r=e.weight!=null?e.weight:1;s+=r*(i-e.size)*(i-e.size)}return s}function Dt(t,n){let s=0;for(const e of n){if(e.sets.length===1)continue;let i;if(e.sets.length===2){const c=t[e.sets[0]],f=t[e.sets[1]];i=xt(c.radius,f.radius,W(c,f))}else i=st(e.sets.map(c=>t[c]));const r=e.weight!=null?e.weight:1,o=Math.log((i+1)/(e.size+1));s+=r*o*o}return s}function pe(t,n,s){if(s==null?t.sort((i,r)=>r.radius-i.radius):t.sort(s),t.length>0){const i=t[0].x,r=t[0].y;for(const o of t)o.x-=i,o.y-=r}if(t.length===2&&W(t[0],t[1])<Math.abs(t[1].radius-t[0].radius)&&(t[1].x=t[0].x+t[0].radius-t[1].radius-1e-10,t[1].y=t[0].y),t.length>1){const i=Math.atan2(t[1].x,t[1].y)-n,r=Math.cos(i),o=Math.sin(i);for(const c of t){const f=c.x,u=c.y;c.x=r*f-o*u,c.y=o*f+r*u}}if(t.length>2){let i=Math.atan2(t[2].x,t[2].y)-n;for(;i<0;)i+=2*Math.PI;for(;i>2*Math.PI;)i-=2*Math.PI;if(i>Math.PI){const r=t[1].y/(1e-10+t[1].x);for(const o of t){var e=(o.x+r*o.y)/(1+r*r);o.x=2*e-o.x,o.y=2*e*r-o.y}}}}function me(t){t.forEach(i=>{i.parent=i});function n(i){return i.parent!==i&&(i.parent=n(i.parent)),i.parent}function s(i,r){const o=n(i),c=n(r);o.parent=c}for(let i=0;i<t.length;++i)for(let r=i+1;r<t.length;++r){const o=t[i].radius+t[r].radius;W(t[i],t[r])+1e-10<o&&s(t[r],t[i])}const e=new Map;for(let i=0;i<t.length;++i){const r=n(t[i]).parent.setid;e.has(r)||e.set(r,[]),e.get(r).push(t[i])}return t.forEach(i=>{delete i.parent}),Array.from(e.values())}function dt(t){const n=s=>{const e=t.reduce((r,o)=>Math.max(r,o[s]+o.radius),Number.NEGATIVE_INFINITY),i=t.reduce((r,o)=>Math.min(r,o[s]-o.radius),Number.POSITIVE_INFINITY);return{max:e,min:i}};return{xRange:n("x"),yRange:n("y")}}function Ct(t,n,s){n==null&&(n=Math.PI/2);let e=Ft(t).map(u=>Object.assign({},u));const i=me(e);for(const u of i){pe(u,n,s);const a=dt(u);u.size=(a.xRange.max-a.xRange.min)*(a.yRange.max-a.yRange.min),u.bounds=a}i.sort((u,a)=>a.size-u.size),e=i[0];let r=e.bounds;const o=(r.xRange.max-r.xRange.min)/50;function c(u,a,y){if(!u)return;const d=u.bounds;let m,x;if(a)m=r.xRange.max-d.xRange.min+o;else{m=r.xRange.max-d.xRange.max;const M=(d.xRange.max-d.xRange.min)/2-(r.xRange.max-r.xRange.min)/2;M<0&&(m+=M)}if(y)x=r.yRange.max-d.yRange.min+o;else{x=r.yRange.max-d.yRange.max;const M=(d.yRange.max-d.yRange.min)/2-(r.yRange.max-r.yRange.min)/2;M<0&&(x+=M)}for(const M of u)M.x+=m,M.y+=x,e.push(M)}let f=1;for(;f<i.length;)c(i[f],!0,!1),c(i[f+1],!1,!0),c(i[f+2],!0,!0),f+=3,r=dt(e);return Ot(e)}function Nt(t,n,s,e,i){const r=Ft(t);n-=2*e,s-=2*e;const{xRange:o,yRange:c}=dt(r);if(o.max===o.min||c.max===c.min)return console.log("not scaling solution: zero size detected"),t;let f,u;if(i){const m=Math.sqrt(i/Math.PI)*2;f=n/m,u=s/m}else f=n/(o.max-o.min),u=s/(c.max-c.min);const a=Math.min(u,f),y=(n-(o.max-o.min)*a)/2,d=(s-(c.max-c.min)*a)/2;return Ot(r.map(m=>({radius:a*m.radius,x:e+y+(m.x-o.min)*a,y:e+d+(m.y-c.min)*a,setid:m.setid})))}function Ot(t){const n={};for(const s of t)n[s.setid]=s;return n}function Ft(t){return Object.keys(t).map(s=>Object.assign(t[s],{setid:s}))}function be(t={}){let n=!1,s=600,e=350,i=15,r=1e3,o=Math.PI/2,c=!0,f=null,u=!0,a=!0,y=null,d=null,m=!1,x=null,M=t&&t.symmetricalTextCentre?t.symmetricalTextCentre:!1,E={},_=t&&t.colourScheme?t.colourScheme:t&&t.colorScheme?t.colorScheme:["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],w=0,g=function(p){if(p in E)return E[p];var h=E[p]=_[w];return w+=1,w>=_.length&&(w=0),h},b=At,v=et;function l(p){let h=p.datum();const j=new Set;h.forEach(I=>{I.size==0&&I.sets.length==1&&j.add(I.sets[0])}),h=h.filter(I=>!I.sets.some(L=>j.has(L)));let k={},N={};if(h.length>0){let I=b(h,{lossFunction:v,distinct:m});c&&(I=Ct(I,o,d)),k=Nt(I,s,e,i,f),N=jt(k,h,M)}const X={};h.forEach(I=>{I.label&&(X[I.sets]=I.label)});function B(I){if(I.sets in X)return X[I.sets];if(I.sets.length==1)return""+I.sets[0]}p.selectAll("svg").data([k]).enter().append("svg");const U=p.select("svg");n?U.attr("viewBox",`0 0 ${s} ${e}`):U.attr("width",s).attr("height",e);const q={};let z=!1;U.selectAll(".venn-area path").each(function(I){const L=this.getAttribute("d");I.sets.length==1&&L&&!m&&(z=!0,q[I.sets[0]]=ke(L))});function A(I){return L=>{const G=I.sets.map(Z=>{let H=q[Z],J=k[Z];return H||(H={x:s/2,y:e/2,radius:1}),J||(J={x:s/2,y:e/2,radius:1}),{x:H.x*(1-L)+J.x*L,y:H.y*(1-L)+J.y*L,radius:H.radius*(1-L)+J.radius*L}});return wt(G,x)}}const D=U.selectAll(".venn-area").data(h,I=>I.sets),O=D.enter().append("g").attr("class",I=>`venn-area venn-${I.sets.length==1?"circle":"intersection"}${I.colour||I.color?" venn-coloured":""}`).attr("data-venn-sets",I=>I.sets.join("_")),P=O.append("path"),V=O.append("text").attr("class","label").text(I=>B(I)).attr("text-anchor","middle").attr("dy",".35em").attr("x",s/2).attr("y",e/2);a&&(P.style("fill-opacity","0").filter(I=>I.sets.length==1).style("fill",I=>I.colour?I.colour:I.color?I.color:g(I.sets)).style("fill-opacity",".25"),V.style("fill",I=>I.colour||I.color?"#FFF":t.textFill?t.textFill:I.sets.length==1?g(I.sets):"#444"));function R(I){return typeof I.transition=="function"?I.transition("venn").duration(r):I}let T=p;z&&typeof T.transition=="function"?(T=R(p),T.selectAll("path").attrTween("d",A)):T.selectAll("path").attr("d",I=>wt(I.sets.map(L=>k[L])),x);const F=T.selectAll("text").filter(I=>I.sets in N).text(I=>B(I)).attr("x",I=>Math.floor(N[I.sets].x)).attr("y",I=>Math.floor(N[I.sets].y));u&&(z?"on"in F?F.on("end",ot(k,B)):F.each("end",ot(k,B)):F.each(ot(k,B)));const C=R(D.exit()).remove();typeof D.transition=="function"&&C.selectAll("path").attrTween("d",A);const Y=C.selectAll("text").attr("x",s/2).attr("y",e/2);return y!==null&&(V.style("font-size","0px"),F.style("font-size",y),Y.style("font-size","0px")),{circles:k,textCentres:N,nodes:D,enter:O,update:T,exit:C}}return l.wrap=function(p){return arguments.length?(u=p,l):u},l.useViewBox=function(){return n=!0,l},l.width=function(p){return arguments.length?(s=p,l):s},l.height=function(p){return arguments.length?(e=p,l):e},l.padding=function(p){return arguments.length?(i=p,l):i},l.distinct=function(p){return arguments.length?(m=p,l):m},l.colours=function(p){return arguments.length?(g=p,l):g},l.colors=function(p){return arguments.length?(g=p,l):g},l.fontSize=function(p){return arguments.length?(y=p,l):y},l.round=function(p){return arguments.length?(x=p,l):x},l.duration=function(p){return arguments.length?(r=p,l):r},l.layoutFunction=function(p){return arguments.length?(b=p,l):b},l.normalize=function(p){return arguments.length?(c=p,l):c},l.scaleToFit=function(p){return arguments.length?(f=p,l):f},l.styled=function(p){return arguments.length?(a=p,l):a},l.orientation=function(p){return arguments.length?(o=p,l):o},l.orientationOrder=function(p){return arguments.length?(d=p,l):d},l.lossFunction=function(p){return arguments.length?(v=p==="default"?et:p==="logRatio"?Dt:p,l):v},l}function ot(t,n){return function(s){const e=this,i=t[s.sets[0]].radius||50,r=n(s)||"",o=r.split(/\s+/).reverse(),f=(r.length+o.length)/3;let u=o.pop(),a=[u],y=0;const d=1.1;e.textContent=null;const m=[];function x(g){const b=e.ownerDocument.createElementNS(e.namespaceURI,"tspan");return b.textContent=g,m.push(b),e.append(b),b}let M=x(u);for(;u=o.pop(),!!u;){a.push(u);const g=a.join(" ");M.textContent=g,g.length>f&&M.getComputedTextLength()>i&&(a.pop(),M.textContent=a.join(" "),a=[u],M=x(u),y++)}const E=.35-y*d/2,_=e.getAttribute("x"),w=e.getAttribute("y");m.forEach((g,b)=>{g.setAttribute("x",_),g.setAttribute("y",w),g.setAttribute("dy",`${E+b*d}em`)})}}function at(t,n,s){let e=n[0].radius-W(n[0],t);for(let i=1;i<n.length;++i){const r=n[i].radius-W(n[i],t);r<=e&&(e=r)}for(let i=0;i<s.length;++i){const r=W(s[i],t)-s[i].radius;r<=e&&(e=r)}return e}function Lt(t,n,s){const e=[];for(const a of t)e.push({x:a.x,y:a.y}),e.push({x:a.x+a.radius/2,y:a.y}),e.push({x:a.x-a.radius/2,y:a.y}),e.push({x:a.x,y:a.y+a.radius/2}),e.push({x:a.x,y:a.y-a.radius/2});let i=e[0],r=at(e[0],t,n);for(let a=1;a<e.length;++a){const y=at(e[a],t,n);y>=r&&(i=e[a],r=y)}const o=zt(a=>-1*at({x:a[0],y:a[1]},t,n),[i.x,i.y],{maxIterations:500,minErrorDelta:1e-10}).x,c={x:s?0:o[0],y:o[1]};let f=!0;for(const a of t)if(W(c,a)>a.radius){f=!1;break}for(const a of n)if(W(c,a)<a.radius){f=!1;break}if(f)return c;if(t.length==1)return{x:t[0].x,y:t[0].y};const u={};return st(t,u),u.arcs.length===0?{x:0,y:-1e3,disjoint:!0}:u.arcs.length==1?{x:u.arcs[0].circle.x,y:u.arcs[0].circle.y}:n.length?Lt(t,[]):Et(u.arcs.map(a=>a.p1))}function ve(t){const n={},s=Object.keys(t);for(const e of s)n[e]=[];for(let e=0;e<s.length;e++){const i=s[e],r=t[i];for(let o=e+1;o<s.length;++o){const c=s[o],f=t[c],u=W(r,f);u+f.radius<=r.radius+1e-10?n[c].push(i):u+r.radius<=f.radius+1e-10&&n[i].push(c)}}return n}function jt(t,n,s){const e={},i=ve(t);for(let r=0;r<n.length;++r){const o=n[r].sets,c={},f={};for(let d=0;d<o.length;++d){c[o[d]]=!0;const m=i[o[d]];for(let x=0;x<m.length;++x)f[m[x]]=!0}const u=[],a=[];for(let d in t)d in c?u.push(t[d]):d in f||a.push(t[d]);const y=Lt(u,a,s);e[o]=y,y.disjoint&&n[r].size>0&&console.log("WARNING: area "+o+" not represented on screen")}return e}function Ie(t,n,s){const e=[];return e.push(`
|
|
2
2
|
M`,t,n),e.push(`
|
|
3
3
|
m`,-s,0),e.push(`
|
|
4
4
|
a`,s,s,0,1,0,s*2,0),e.push(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var DN=Object.defineProperty;var MN=(t,e,r)=>e in t?DN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var jr=(t,e,r)=>MN(t,typeof e!="symbol"?e+"":e,r);import{bk as er}from"./index-wflyqKCW.js";var xN=Object.create,hc=Object.defineProperty,FN=Object.getOwnPropertyDescriptor,Fh=Object.getOwnPropertyNames,GN=Object.getPrototypeOf,jN=Object.prototype.hasOwnProperty,s=(t,e)=>hc(t,"name",{value:e,configurable:!0}),UN=(t,e)=>function(){return t&&(e=(0,t[Fh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[Fh(t)[0]])((e={exports:{}}).exports,e),e.exports},Qr=(t,e)=>{for(var r in e)hc(t,r,{get:e[r],enumerable:!0})},Gh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Fh(e))!jN.call(t,a)&&a!==r&&hc(t,a,{get:()=>e[a],enumerable:!(n=FN(e,a))||n.enumerable});return t},ff=(t,e,r)=>(Gh(t,e,"default"),r),jh=(t,e,r)=>(r=t!=null?xN(GN(t)):{},Gh(hc(r,"default",{value:t,enumerable:!0}),t)),Uh=t=>Gh(hc({},"__esModule",{value:!0}),t),df={};Qr(df,{AnnotatedTextEdit:()=>Tr,ChangeAnnotation:()=>fn,ChangeAnnotationIdentifier:()=>Xe,CodeAction:()=>Ep,CodeActionContext:()=>Ap,CodeActionKind:()=>$p,CodeActionTriggerKind:()=>Nl,CodeDescription:()=>Qd,CodeLens:()=>_p,Color:()=>ru,ColorInformation:()=>Vd,ColorPresentation:()=>Hd,Command:()=>un,CompletionItem:()=>cp,CompletionItemKind:()=>np,CompletionItemLabelDetails:()=>lp,CompletionItemTag:()=>ip,CompletionList:()=>up,CreateFile:()=>Ra,DeleteFile:()=>Aa,Diagnostic:()=>Sl,DiagnosticRelatedInformation:()=>nu,DiagnosticSeverity:()=>Jd,DiagnosticTag:()=>Zd,DocumentHighlight:()=>mp,DocumentHighlightKind:()=>hp,DocumentLink:()=>Sp,DocumentSymbol:()=>Rp,DocumentUri:()=>Kd,EOL:()=>mT,FoldingRange:()=>Xd,FoldingRangeKind:()=>Yd,FormattingOptions:()=>Cp,Hover:()=>fp,InlayHint:()=>Dp,InlayHintKind:()=>su,InlayHintLabelPart:()=>ou,InlineCompletionContext:()=>Up,InlineCompletionItem:()=>xp,InlineCompletionList:()=>Fp,InlineCompletionTriggerKind:()=>Gp,InlineValueContext:()=>Lp,InlineValueEvaluatableExpression:()=>Op,InlineValueText:()=>kp,InlineValueVariableLookup:()=>Pp,InsertReplaceEdit:()=>sp,InsertTextFormat:()=>ap,InsertTextMode:()=>op,Location:()=>Cl,LocationLink:()=>Wd,MarkedString:()=>Il,MarkupContent:()=>Ea,MarkupKind:()=>iu,OptionalVersionedTextDocumentIdentifier:()=>wl,ParameterInformation:()=>dp,Position:()=>ie,Range:()=>ee,RenameFile:()=>$a,SelectedCompletionInfo:()=>jp,SelectionRange:()=>bp,SemanticTokenModifiers:()=>Ip,SemanticTokenTypes:()=>wp,SemanticTokens:()=>Np,SignatureInformation:()=>pp,StringValue:()=>Mp,SymbolInformation:()=>vp,SymbolKind:()=>gp,SymbolTag:()=>yp,TextDocument:()=>Bp,TextDocumentEdit:()=>bl,TextDocumentIdentifier:()=>ep,TextDocumentItem:()=>rp,TextEdit:()=>rr,URI:()=>tu,VersionedTextDocumentIdentifier:()=>tp,WorkspaceChange:()=>hT,WorkspaceEdit:()=>au,WorkspaceFolder:()=>zp,WorkspaceSymbol:()=>Tp,integer:()=>qd,uinteger:()=>_l});var Kd,tu,qd,_l,ie,ee,Cl,Wd,ru,Vd,Hd,Yd,Xd,nu,Jd,Zd,Qd,Sl,un,rr,fn,Xe,Tr,bl,Ra,$a,Aa,au,hl,$d,hT,ep,tp,wl,rp,iu,Ea,np,ap,ip,sp,op,lp,cp,up,Il,fp,dp,pp,hp,mp,gp,yp,vp,Tp,Rp,$p,Nl,Ap,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Pp,Op,Lp,su,ou,Dp,Mp,xp,Fp,Gp,jp,Up,zp,mT,Bp,_y,_,mc=UN({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(Kd||(Kd={})),(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(tu||(tu={})),(function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(qd||(qd={})),(function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(_l||(_l={})),(function(a){function i(c,l){return c===Number.MAX_VALUE&&(c=_l.MAX_VALUE),l===Number.MAX_VALUE&&(l=_l.MAX_VALUE),{line:c,character:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&_.uinteger(l.line)&&_.uinteger(l.character)}s(o,"is"),a.is=o})(ie||(ie={})),(function(a){function i(c,l,u,f){if(_.uinteger(c)&&_.uinteger(l)&&_.uinteger(u)&&_.uinteger(f))return{start:ie.create(c,l),end:ie.create(u,f)};if(ie.is(c)&&ie.is(l))return{start:c,end:l};throw new Error(`Range#create called with invalid arguments[${c}, ${l}, ${u}, ${f}]`)}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ie.is(l.start)&&ie.is(l.end)}s(o,"is"),a.is=o})(ee||(ee={})),(function(a){function i(c,l){return{uri:c,range:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(_.string(l.uri)||_.undefined(l.uri))}s(o,"is"),a.is=o})(Cl||(Cl={})),(function(a){function i(c,l,u,f){return{targetUri:c,targetRange:l,targetSelectionRange:u,originSelectionRange:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.targetRange)&&_.string(l.targetUri)&&ee.is(l.targetSelectionRange)&&(ee.is(l.originSelectionRange)||_.undefined(l.originSelectionRange))}s(o,"is"),a.is=o})(Wd||(Wd={})),(function(a){function i(c,l,u,f){return{red:c,green:l,blue:u,alpha:f}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.numberRange(l.red,0,1)&&_.numberRange(l.green,0,1)&&_.numberRange(l.blue,0,1)&&_.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o})(ru||(ru={})),(function(a){function i(c,l){return{range:c,color:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ee.is(l.range)&&ru.is(l.color)}s(o,"is"),a.is=o})(Vd||(Vd={})),(function(a){function i(c,l,u){return{label:c,textEdit:l,additionalTextEdits:u}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.undefined(l.textEdit)||rr.is(l))&&(_.undefined(l.additionalTextEdits)||_.typedArray(l.additionalTextEdits,rr.is))}s(o,"is"),a.is=o})(Hd||(Hd={})),(function(a){a.Comment="comment",a.Imports="imports",a.Region="region"})(Yd||(Yd={})),(function(a){function i(c,l,u,f,d,p){const m={startLine:c,endLine:l};return _.defined(u)&&(m.startCharacter=u),_.defined(f)&&(m.endCharacter=f),_.defined(d)&&(m.kind=d),_.defined(p)&&(m.collapsedText=p),m}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.uinteger(l.startLine)&&_.uinteger(l.startLine)&&(_.undefined(l.startCharacter)||_.uinteger(l.startCharacter))&&(_.undefined(l.endCharacter)||_.uinteger(l.endCharacter))&&(_.undefined(l.kind)||_.string(l.kind))}s(o,"is"),a.is=o})(Xd||(Xd={})),(function(a){function i(c,l){return{location:c,message:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&Cl.is(l.location)&&_.string(l.message)}s(o,"is"),a.is=o})(nu||(nu={})),(function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4})(Jd||(Jd={})),(function(a){a.Unnecessary=1,a.Deprecated=2})(Zd||(Zd={})),(function(a){function i(o){const c=o;return _.objectLiteral(c)&&_.string(c.href)}s(i,"is"),a.is=i})(Qd||(Qd={})),(function(a){function i(c,l,u,f,d,p){let m={range:c,message:l};return _.defined(u)&&(m.severity=u),_.defined(f)&&(m.code=f),_.defined(d)&&(m.source=d),_.defined(p)&&(m.relatedInformation=p),m}s(i,"create"),a.create=i;function o(c){var l;let u=c;return _.defined(u)&&ee.is(u.range)&&_.string(u.message)&&(_.number(u.severity)||_.undefined(u.severity))&&(_.integer(u.code)||_.string(u.code)||_.undefined(u.code))&&(_.undefined(u.codeDescription)||_.string((l=u.codeDescription)===null||l===void 0?void 0:l.href))&&(_.string(u.source)||_.undefined(u.source))&&(_.undefined(u.relatedInformation)||_.typedArray(u.relatedInformation,nu.is))}s(o,"is"),a.is=o})(Sl||(Sl={})),(function(a){function i(c,l,...u){let f={title:c,command:l};return _.defined(u)&&u.length>0&&(f.arguments=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.title)&&_.string(l.command)}s(o,"is"),a.is=o})(un||(un={})),(function(a){function i(u,f){return{range:u,newText:f}}s(i,"replace"),a.replace=i;function o(u,f){return{range:{start:u,end:u},newText:f}}s(o,"insert"),a.insert=o;function c(u){return{range:u,newText:""}}s(c,"del"),a.del=c;function l(u){const f=u;return _.objectLiteral(f)&&_.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l})(rr||(rr={})),(function(a){function i(c,l,u){const f={label:c};return l!==void 0&&(f.needsConfirmation=l),u!==void 0&&(f.description=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(_.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o})(fn||(fn={})),(function(a){function i(o){const c=o;return _.string(c)}s(i,"is"),a.is=i})(Xe||(Xe={})),(function(a){function i(u,f,d){return{range:u,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(u,f,d){return{range:{start:u,end:u},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function c(u,f){return{range:u,newText:"",annotationId:f}}s(c,"del"),a.del=c;function l(u){const f=u;return rr.is(f)&&(fn.is(f.annotationId)||Xe.is(f.annotationId))}s(l,"is"),a.is=l})(Tr||(Tr={})),(function(a){function i(c,l){return{textDocument:c,edits:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&wl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o})(bl||(bl={})),(function(a){function i(c,l,u){let f={kind:"create",uri:c};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="create"&&_.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})(Ra||(Ra={})),(function(a){function i(c,l,u,f){let d={kind:"rename",oldUri:c,newUri:l};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(d.options=u),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="rename"&&_.string(l.oldUri)&&_.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})($a||($a={})),(function(a){function i(c,l,u){let f={kind:"delete",uri:c};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="delete"&&_.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||_.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||_.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})(Aa||(Aa={})),(function(a){function i(o){let c=o;return c&&(c.changes!==void 0||c.documentChanges!==void 0)&&(c.documentChanges===void 0||c.documentChanges.every(l=>_.string(l.kind)?Ra.is(l)||$a.is(l)||Aa.is(l):bl.is(l)))}s(i,"is"),a.is=i})(au||(au={})),hl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,c){let l,u;if(c===void 0?l=rr.insert(i,o):Xe.is(c)?(u=c,l=Tr.insert(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.insert(i,o,u)),this.edits.push(l),u!==void 0)return u}replace(i,o,c){let l,u;if(c===void 0?l=rr.replace(i,o):Xe.is(c)?(u=c,l=Tr.replace(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.replace(i,o,u)),this.edits.push(l),u!==void 0)return u}delete(i,o){let c,l;if(o===void 0?c=rr.del(i):Xe.is(o)?(l=o,c=Tr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),c=Tr.del(i,l)),this.edits.push(c),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),$d=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let c;if(Xe.is(i)?c=i:(c=this.nextId(),o=i),this._annotations[c]!==void 0)throw new Error(`Id ${c} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${c}`);return this._annotations[c]=o,this._size++,c}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),hT=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new $d(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(bl.is(o)){const c=new hl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=c}})):i.changes&&Object.keys(i.changes).forEach(o=>{const c=new hl(i.changes[o]);this._textEditChanges[o]=c})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(wl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let c=this._textEditChanges[o.uri];if(!c){const l=[],u={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(u),c=new hl(l,this._changeAnnotations),this._textEditChanges[o.uri]=c}return c}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let c=[];this._workspaceEdit.changes[i]=c,o=new hl(c),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new $d,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Ra.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Ra.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}renameFile(i,o,c,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;fn.is(c)||Xe.is(c)?u=c:l=c;let f,d;if(u===void 0?f=$a.create(i,o,l):(d=Xe.is(u)?u:this._changeAnnotations.manage(u),f=$a.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Aa.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Aa.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}},s(r,"WorkspaceChange"),r),(function(a){function i(c){return{uri:c}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)}s(o,"is"),a.is=o})(ep||(ep={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.integer(l.version)}s(o,"is"),a.is=o})(tp||(tp={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&(l.version===null||_.integer(l.version))}s(o,"is"),a.is=o})(wl||(wl={})),(function(a){function i(c,l,u,f){return{uri:c,languageId:l,version:u,text:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.string(l.languageId)&&_.integer(l.version)&&_.string(l.text)}s(o,"is"),a.is=o})(rp||(rp={})),(function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const c=o;return c===a.PlainText||c===a.Markdown}s(i,"is"),a.is=i})(iu||(iu={})),(function(a){function i(o){const c=o;return _.objectLiteral(o)&&iu.is(c.kind)&&_.string(c.value)}s(i,"is"),a.is=i})(Ea||(Ea={})),(function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25})(np||(np={})),(function(a){a.PlainText=1,a.Snippet=2})(ap||(ap={})),(function(a){a.Deprecated=1})(ip||(ip={})),(function(a){function i(c,l,u){return{newText:c,insert:l,replace:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l&&_.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o})(sp||(sp={})),(function(a){a.asIs=1,a.adjustIndentation=2})(op||(op={})),(function(a){function i(o){const c=o;return c&&(_.string(c.detail)||c.detail===void 0)&&(_.string(c.description)||c.description===void 0)}s(i,"is"),a.is=i})(lp||(lp={})),(function(a){function i(o){return{label:o}}s(i,"create"),a.create=i})(cp||(cp={})),(function(a){function i(o,c){return{items:o||[],isIncomplete:!!c}}s(i,"create"),a.create=i})(up||(up={})),(function(a){function i(c){return c.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(c){const l=c;return _.string(l)||_.objectLiteral(l)&&_.string(l.language)&&_.string(l.value)}s(o,"is"),a.is=o})(Il||(Il={})),(function(a){function i(o){let c=o;return!!c&&_.objectLiteral(c)&&(Ea.is(c.contents)||Il.is(c.contents)||_.typedArray(c.contents,Il.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i})(fp||(fp={})),(function(a){function i(o,c){return c?{label:o,documentation:c}:{label:o}}s(i,"create"),a.create=i})(dp||(dp={})),(function(a){function i(o,c,...l){let u={label:o};return _.defined(c)&&(u.documentation=c),_.defined(l)?u.parameters=l:u.parameters=[],u}s(i,"create"),a.create=i})(pp||(pp={})),(function(a){a.Text=1,a.Read=2,a.Write=3})(hp||(hp={})),(function(a){function i(o,c){let l={range:o};return _.number(c)&&(l.kind=c),l}s(i,"create"),a.create=i})(mp||(mp={})),(function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26})(gp||(gp={})),(function(a){a.Deprecated=1})(yp||(yp={})),(function(a){function i(o,c,l,u,f){let d={name:o,kind:c,location:{uri:u,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i})(vp||(vp={})),(function(a){function i(o,c,l,u){return u!==void 0?{name:o,kind:c,location:{uri:l,range:u}}:{name:o,kind:c,location:{uri:l}}}s(i,"create"),a.create=i})(Tp||(Tp={})),(function(a){function i(c,l,u,f,d,p){let m={name:c,detail:l,kind:u,range:f,selectionRange:d};return p!==void 0&&(m.children=p),m}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.name)&&_.number(l.kind)&&ee.is(l.range)&&ee.is(l.selectionRange)&&(l.detail===void 0||_.string(l.detail))&&(l.deprecated===void 0||_.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o})(Rp||(Rp={})),(function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"})($p||($p={})),(function(a){a.Invoked=1,a.Automatic=2})(Nl||(Nl={})),(function(a){function i(c,l,u){let f={diagnostics:c};return l!=null&&(f.only=l),u!=null&&(f.triggerKind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.typedArray(l.diagnostics,Sl.is)&&(l.only===void 0||_.typedArray(l.only,_.string))&&(l.triggerKind===void 0||l.triggerKind===Nl.Invoked||l.triggerKind===Nl.Automatic)}s(o,"is"),a.is=o})(Ap||(Ap={})),(function(a){function i(c,l,u){let f={title:c},d=!0;return typeof l=="string"?(d=!1,f.kind=l):un.is(l)?f.command=l:f.edit=l,d&&u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.title)&&(l.diagnostics===void 0||_.typedArray(l.diagnostics,Sl.is))&&(l.kind===void 0||_.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||un.is(l.command))&&(l.isPreferred===void 0||_.boolean(l.isPreferred))&&(l.edit===void 0||au.is(l.edit))}s(o,"is"),a.is=o})(Ep||(Ep={})),(function(a){function i(c,l){let u={range:c};return _.defined(l)&&(u.data=l),u}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.command)||un.is(l.command))}s(o,"is"),a.is=o})(_p||(_p={})),(function(a){function i(c,l){return{tabSize:c,insertSpaces:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.uinteger(l.tabSize)&&_.boolean(l.insertSpaces)}s(o,"is"),a.is=o})(Cp||(Cp={})),(function(a){function i(c,l,u){return{range:c,target:l,data:u}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.target)||_.string(l.target))}s(o,"is"),a.is=o})(Sp||(Sp={})),(function(a){function i(c,l){return{range:c,parent:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o})(bp||(bp={})),(function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"})(wp||(wp={})),(function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"})(Ip||(Ip={})),(function(a){function i(o){const c=o;return _.objectLiteral(c)&&(c.resultId===void 0||typeof c.resultId=="string")&&Array.isArray(c.data)&&(c.data.length===0||typeof c.data[0]=="number")}s(i,"is"),a.is=i})(Np||(Np={})),(function(a){function i(c,l){return{range:c,text:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.string(l.text)}s(o,"is"),a.is=o})(kp||(kp={})),(function(a){function i(c,l,u){return{range:c,variableName:l,caseSensitiveLookup:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.boolean(l.caseSensitiveLookup)&&(_.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o})(Pp||(Pp={})),(function(a){function i(c,l){return{range:c,expression:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&(_.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o})(Op||(Op={})),(function(a){function i(c,l){return{frameId:c,stoppedLocation:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.defined(l)&&ee.is(c.stoppedLocation)}s(o,"is"),a.is=o})(Lp||(Lp={})),(function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i})(su||(su={})),(function(a){function i(c){return{value:c}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.location===void 0||Cl.is(l.location))&&(l.command===void 0||un.is(l.command))}s(o,"is"),a.is=o})(ou||(ou={})),(function(a){function i(c,l,u){const f={position:c,label:l};return u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ie.is(l.position)&&(_.string(l.label)||_.typedArray(l.label,ou.is))&&(l.kind===void 0||su.is(l.kind))&&l.textEdits===void 0||_.typedArray(l.textEdits,rr.is)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.paddingLeft===void 0||_.boolean(l.paddingLeft))&&(l.paddingRight===void 0||_.boolean(l.paddingRight))}s(o,"is"),a.is=o})(Dp||(Dp={})),(function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i})(Mp||(Mp={})),(function(a){function i(o,c,l,u){return{insertText:o,filterText:c,range:l,command:u}}s(i,"create"),a.create=i})(xp||(xp={})),(function(a){function i(o){return{items:o}}s(i,"create"),a.create=i})(Fp||(Fp={})),(function(a){a.Invoked=0,a.Automatic=1})(Gp||(Gp={})),(function(a){function i(o,c){return{range:o,text:c}}s(i,"create"),a.create=i})(jp||(jp={})),(function(a){function i(o,c){return{triggerKind:o,selectedCompletionInfo:c}}s(i,"create"),a.create=i})(Up||(Up={})),(function(a){function i(o){const c=o;return _.objectLiteral(c)&&tu.is(c.uri)&&_.string(c.name)}s(i,"is"),a.is=i})(zp||(zp={})),mT=[`
|
|
1
|
+
var DN=Object.defineProperty;var MN=(t,e,r)=>e in t?DN(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r;var jr=(t,e,r)=>MN(t,typeof e!="symbol"?e+"":e,r);import{bk as er}from"./index-BxBZmqgf.js";var xN=Object.create,hc=Object.defineProperty,FN=Object.getOwnPropertyDescriptor,Fh=Object.getOwnPropertyNames,GN=Object.getPrototypeOf,jN=Object.prototype.hasOwnProperty,s=(t,e)=>hc(t,"name",{value:e,configurable:!0}),UN=(t,e)=>function(){return t&&(e=(0,t[Fh(t)[0]])(t=0)),e},Y=(t,e)=>function(){return e||(0,t[Fh(t)[0]])((e={exports:{}}).exports,e),e.exports},Qr=(t,e)=>{for(var r in e)hc(t,r,{get:e[r],enumerable:!0})},Gh=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let a of Fh(e))!jN.call(t,a)&&a!==r&&hc(t,a,{get:()=>e[a],enumerable:!(n=FN(e,a))||n.enumerable});return t},ff=(t,e,r)=>(Gh(t,e,"default"),r),jh=(t,e,r)=>(r=t!=null?xN(GN(t)):{},Gh(hc(r,"default",{value:t,enumerable:!0}),t)),Uh=t=>Gh(hc({},"__esModule",{value:!0}),t),df={};Qr(df,{AnnotatedTextEdit:()=>Tr,ChangeAnnotation:()=>fn,ChangeAnnotationIdentifier:()=>Xe,CodeAction:()=>Ep,CodeActionContext:()=>Ap,CodeActionKind:()=>$p,CodeActionTriggerKind:()=>Nl,CodeDescription:()=>Qd,CodeLens:()=>_p,Color:()=>ru,ColorInformation:()=>Vd,ColorPresentation:()=>Hd,Command:()=>un,CompletionItem:()=>cp,CompletionItemKind:()=>np,CompletionItemLabelDetails:()=>lp,CompletionItemTag:()=>ip,CompletionList:()=>up,CreateFile:()=>Ra,DeleteFile:()=>Aa,Diagnostic:()=>Sl,DiagnosticRelatedInformation:()=>nu,DiagnosticSeverity:()=>Jd,DiagnosticTag:()=>Zd,DocumentHighlight:()=>mp,DocumentHighlightKind:()=>hp,DocumentLink:()=>Sp,DocumentSymbol:()=>Rp,DocumentUri:()=>Kd,EOL:()=>mT,FoldingRange:()=>Xd,FoldingRangeKind:()=>Yd,FormattingOptions:()=>Cp,Hover:()=>fp,InlayHint:()=>Dp,InlayHintKind:()=>su,InlayHintLabelPart:()=>ou,InlineCompletionContext:()=>Up,InlineCompletionItem:()=>xp,InlineCompletionList:()=>Fp,InlineCompletionTriggerKind:()=>Gp,InlineValueContext:()=>Lp,InlineValueEvaluatableExpression:()=>Op,InlineValueText:()=>kp,InlineValueVariableLookup:()=>Pp,InsertReplaceEdit:()=>sp,InsertTextFormat:()=>ap,InsertTextMode:()=>op,Location:()=>Cl,LocationLink:()=>Wd,MarkedString:()=>Il,MarkupContent:()=>Ea,MarkupKind:()=>iu,OptionalVersionedTextDocumentIdentifier:()=>wl,ParameterInformation:()=>dp,Position:()=>ie,Range:()=>ee,RenameFile:()=>$a,SelectedCompletionInfo:()=>jp,SelectionRange:()=>bp,SemanticTokenModifiers:()=>Ip,SemanticTokenTypes:()=>wp,SemanticTokens:()=>Np,SignatureInformation:()=>pp,StringValue:()=>Mp,SymbolInformation:()=>vp,SymbolKind:()=>gp,SymbolTag:()=>yp,TextDocument:()=>Bp,TextDocumentEdit:()=>bl,TextDocumentIdentifier:()=>ep,TextDocumentItem:()=>rp,TextEdit:()=>rr,URI:()=>tu,VersionedTextDocumentIdentifier:()=>tp,WorkspaceChange:()=>hT,WorkspaceEdit:()=>au,WorkspaceFolder:()=>zp,WorkspaceSymbol:()=>Tp,integer:()=>qd,uinteger:()=>_l});var Kd,tu,qd,_l,ie,ee,Cl,Wd,ru,Vd,Hd,Yd,Xd,nu,Jd,Zd,Qd,Sl,un,rr,fn,Xe,Tr,bl,Ra,$a,Aa,au,hl,$d,hT,ep,tp,wl,rp,iu,Ea,np,ap,ip,sp,op,lp,cp,up,Il,fp,dp,pp,hp,mp,gp,yp,vp,Tp,Rp,$p,Nl,Ap,Ep,_p,Cp,Sp,bp,wp,Ip,Np,kp,Pp,Op,Lp,su,ou,Dp,Mp,xp,Fp,Gp,jp,Up,zp,mT,Bp,_y,_,mc=UN({"../../node_modules/.pnpm/vscode-languageserver-types@3.17.5/node_modules/vscode-languageserver-types/lib/esm/main.js"(){var t,e,r,n;(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(Kd||(Kd={})),(function(a){function i(o){return typeof o=="string"}s(i,"is"),a.is=i})(tu||(tu={})),(function(a){a.MIN_VALUE=-2147483648,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(qd||(qd={})),(function(a){a.MIN_VALUE=0,a.MAX_VALUE=2147483647;function i(o){return typeof o=="number"&&a.MIN_VALUE<=o&&o<=a.MAX_VALUE}s(i,"is"),a.is=i})(_l||(_l={})),(function(a){function i(c,l){return c===Number.MAX_VALUE&&(c=_l.MAX_VALUE),l===Number.MAX_VALUE&&(l=_l.MAX_VALUE),{line:c,character:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&_.uinteger(l.line)&&_.uinteger(l.character)}s(o,"is"),a.is=o})(ie||(ie={})),(function(a){function i(c,l,u,f){if(_.uinteger(c)&&_.uinteger(l)&&_.uinteger(u)&&_.uinteger(f))return{start:ie.create(c,l),end:ie.create(u,f)};if(ie.is(c)&&ie.is(l))return{start:c,end:l};throw new Error(`Range#create called with invalid arguments[${c}, ${l}, ${u}, ${f}]`)}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ie.is(l.start)&&ie.is(l.end)}s(o,"is"),a.is=o})(ee||(ee={})),(function(a){function i(c,l){return{uri:c,range:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(_.string(l.uri)||_.undefined(l.uri))}s(o,"is"),a.is=o})(Cl||(Cl={})),(function(a){function i(c,l,u,f){return{targetUri:c,targetRange:l,targetSelectionRange:u,originSelectionRange:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.targetRange)&&_.string(l.targetUri)&&ee.is(l.targetSelectionRange)&&(ee.is(l.originSelectionRange)||_.undefined(l.originSelectionRange))}s(o,"is"),a.is=o})(Wd||(Wd={})),(function(a){function i(c,l,u,f){return{red:c,green:l,blue:u,alpha:f}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.numberRange(l.red,0,1)&&_.numberRange(l.green,0,1)&&_.numberRange(l.blue,0,1)&&_.numberRange(l.alpha,0,1)}s(o,"is"),a.is=o})(ru||(ru={})),(function(a){function i(c,l){return{range:c,color:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ee.is(l.range)&&ru.is(l.color)}s(o,"is"),a.is=o})(Vd||(Vd={})),(function(a){function i(c,l,u){return{label:c,textEdit:l,additionalTextEdits:u}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.undefined(l.textEdit)||rr.is(l))&&(_.undefined(l.additionalTextEdits)||_.typedArray(l.additionalTextEdits,rr.is))}s(o,"is"),a.is=o})(Hd||(Hd={})),(function(a){a.Comment="comment",a.Imports="imports",a.Region="region"})(Yd||(Yd={})),(function(a){function i(c,l,u,f,d,p){const m={startLine:c,endLine:l};return _.defined(u)&&(m.startCharacter=u),_.defined(f)&&(m.endCharacter=f),_.defined(d)&&(m.kind=d),_.defined(p)&&(m.collapsedText=p),m}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.uinteger(l.startLine)&&_.uinteger(l.startLine)&&(_.undefined(l.startCharacter)||_.uinteger(l.startCharacter))&&(_.undefined(l.endCharacter)||_.uinteger(l.endCharacter))&&(_.undefined(l.kind)||_.string(l.kind))}s(o,"is"),a.is=o})(Xd||(Xd={})),(function(a){function i(c,l){return{location:c,message:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&Cl.is(l.location)&&_.string(l.message)}s(o,"is"),a.is=o})(nu||(nu={})),(function(a){a.Error=1,a.Warning=2,a.Information=3,a.Hint=4})(Jd||(Jd={})),(function(a){a.Unnecessary=1,a.Deprecated=2})(Zd||(Zd={})),(function(a){function i(o){const c=o;return _.objectLiteral(c)&&_.string(c.href)}s(i,"is"),a.is=i})(Qd||(Qd={})),(function(a){function i(c,l,u,f,d,p){let m={range:c,message:l};return _.defined(u)&&(m.severity=u),_.defined(f)&&(m.code=f),_.defined(d)&&(m.source=d),_.defined(p)&&(m.relatedInformation=p),m}s(i,"create"),a.create=i;function o(c){var l;let u=c;return _.defined(u)&&ee.is(u.range)&&_.string(u.message)&&(_.number(u.severity)||_.undefined(u.severity))&&(_.integer(u.code)||_.string(u.code)||_.undefined(u.code))&&(_.undefined(u.codeDescription)||_.string((l=u.codeDescription)===null||l===void 0?void 0:l.href))&&(_.string(u.source)||_.undefined(u.source))&&(_.undefined(u.relatedInformation)||_.typedArray(u.relatedInformation,nu.is))}s(o,"is"),a.is=o})(Sl||(Sl={})),(function(a){function i(c,l,...u){let f={title:c,command:l};return _.defined(u)&&u.length>0&&(f.arguments=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.title)&&_.string(l.command)}s(o,"is"),a.is=o})(un||(un={})),(function(a){function i(u,f){return{range:u,newText:f}}s(i,"replace"),a.replace=i;function o(u,f){return{range:{start:u,end:u},newText:f}}s(o,"insert"),a.insert=o;function c(u){return{range:u,newText:""}}s(c,"del"),a.del=c;function l(u){const f=u;return _.objectLiteral(f)&&_.string(f.newText)&&ee.is(f.range)}s(l,"is"),a.is=l})(rr||(rr={})),(function(a){function i(c,l,u){const f={label:c};return l!==void 0&&(f.needsConfirmation=l),u!==void 0&&(f.description=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&_.string(l.label)&&(_.boolean(l.needsConfirmation)||l.needsConfirmation===void 0)&&(_.string(l.description)||l.description===void 0)}s(o,"is"),a.is=o})(fn||(fn={})),(function(a){function i(o){const c=o;return _.string(c)}s(i,"is"),a.is=i})(Xe||(Xe={})),(function(a){function i(u,f,d){return{range:u,newText:f,annotationId:d}}s(i,"replace"),a.replace=i;function o(u,f,d){return{range:{start:u,end:u},newText:f,annotationId:d}}s(o,"insert"),a.insert=o;function c(u,f){return{range:u,newText:"",annotationId:f}}s(c,"del"),a.del=c;function l(u){const f=u;return rr.is(f)&&(fn.is(f.annotationId)||Xe.is(f.annotationId))}s(l,"is"),a.is=l})(Tr||(Tr={})),(function(a){function i(c,l){return{textDocument:c,edits:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&wl.is(l.textDocument)&&Array.isArray(l.edits)}s(o,"is"),a.is=o})(bl||(bl={})),(function(a){function i(c,l,u){let f={kind:"create",uri:c};return l!==void 0&&(l.overwrite!==void 0||l.ignoreIfExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="create"&&_.string(l.uri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})(Ra||(Ra={})),(function(a){function i(c,l,u,f){let d={kind:"rename",oldUri:c,newUri:l};return u!==void 0&&(u.overwrite!==void 0||u.ignoreIfExists!==void 0)&&(d.options=u),f!==void 0&&(d.annotationId=f),d}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="rename"&&_.string(l.oldUri)&&_.string(l.newUri)&&(l.options===void 0||(l.options.overwrite===void 0||_.boolean(l.options.overwrite))&&(l.options.ignoreIfExists===void 0||_.boolean(l.options.ignoreIfExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})($a||($a={})),(function(a){function i(c,l,u){let f={kind:"delete",uri:c};return l!==void 0&&(l.recursive!==void 0||l.ignoreIfNotExists!==void 0)&&(f.options=l),u!==void 0&&(f.annotationId=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&l.kind==="delete"&&_.string(l.uri)&&(l.options===void 0||(l.options.recursive===void 0||_.boolean(l.options.recursive))&&(l.options.ignoreIfNotExists===void 0||_.boolean(l.options.ignoreIfNotExists)))&&(l.annotationId===void 0||Xe.is(l.annotationId))}s(o,"is"),a.is=o})(Aa||(Aa={})),(function(a){function i(o){let c=o;return c&&(c.changes!==void 0||c.documentChanges!==void 0)&&(c.documentChanges===void 0||c.documentChanges.every(l=>_.string(l.kind)?Ra.is(l)||$a.is(l)||Aa.is(l):bl.is(l)))}s(i,"is"),a.is=i})(au||(au={})),hl=(t=class{constructor(i,o){this.edits=i,this.changeAnnotations=o}insert(i,o,c){let l,u;if(c===void 0?l=rr.insert(i,o):Xe.is(c)?(u=c,l=Tr.insert(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.insert(i,o,u)),this.edits.push(l),u!==void 0)return u}replace(i,o,c){let l,u;if(c===void 0?l=rr.replace(i,o):Xe.is(c)?(u=c,l=Tr.replace(i,o,c)):(this.assertChangeAnnotations(this.changeAnnotations),u=this.changeAnnotations.manage(c),l=Tr.replace(i,o,u)),this.edits.push(l),u!==void 0)return u}delete(i,o){let c,l;if(o===void 0?c=rr.del(i):Xe.is(o)?(l=o,c=Tr.del(i,o)):(this.assertChangeAnnotations(this.changeAnnotations),l=this.changeAnnotations.manage(o),c=Tr.del(i,l)),this.edits.push(c),l!==void 0)return l}add(i){this.edits.push(i)}all(){return this.edits}clear(){this.edits.splice(0,this.edits.length)}assertChangeAnnotations(i){if(i===void 0)throw new Error("Text edit change is not configured to manage change annotations.")}},s(t,"TextEditChangeImpl"),t),$d=(e=class{constructor(i){this._annotations=i===void 0?Object.create(null):i,this._counter=0,this._size=0}all(){return this._annotations}get size(){return this._size}manage(i,o){let c;if(Xe.is(i)?c=i:(c=this.nextId(),o=i),this._annotations[c]!==void 0)throw new Error(`Id ${c} is already in use.`);if(o===void 0)throw new Error(`No annotation provided for id ${c}`);return this._annotations[c]=o,this._size++,c}nextId(){return this._counter++,this._counter.toString()}},s(e,"ChangeAnnotations"),e),hT=(r=class{constructor(i){this._textEditChanges=Object.create(null),i!==void 0?(this._workspaceEdit=i,i.documentChanges?(this._changeAnnotations=new $d(i.changeAnnotations),i.changeAnnotations=this._changeAnnotations.all(),i.documentChanges.forEach(o=>{if(bl.is(o)){const c=new hl(o.edits,this._changeAnnotations);this._textEditChanges[o.textDocument.uri]=c}})):i.changes&&Object.keys(i.changes).forEach(o=>{const c=new hl(i.changes[o]);this._textEditChanges[o]=c})):this._workspaceEdit={}}get edit(){return this.initDocumentChanges(),this._changeAnnotations!==void 0&&(this._changeAnnotations.size===0?this._workspaceEdit.changeAnnotations=void 0:this._workspaceEdit.changeAnnotations=this._changeAnnotations.all()),this._workspaceEdit}getTextEditChange(i){if(wl.is(i)){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");const o={uri:i.uri,version:i.version};let c=this._textEditChanges[o.uri];if(!c){const l=[],u={textDocument:o,edits:l};this._workspaceEdit.documentChanges.push(u),c=new hl(l,this._changeAnnotations),this._textEditChanges[o.uri]=c}return c}else{if(this.initChanges(),this._workspaceEdit.changes===void 0)throw new Error("Workspace edit is not configured for normal text edit changes.");let o=this._textEditChanges[i];if(!o){let c=[];this._workspaceEdit.changes[i]=c,o=new hl(c),this._textEditChanges[i]=o}return o}}initDocumentChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._changeAnnotations=new $d,this._workspaceEdit.documentChanges=[],this._workspaceEdit.changeAnnotations=this._changeAnnotations.all())}initChanges(){this._workspaceEdit.documentChanges===void 0&&this._workspaceEdit.changes===void 0&&(this._workspaceEdit.changes=Object.create(null))}createFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Ra.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Ra.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}renameFile(i,o,c,l){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let u;fn.is(c)||Xe.is(c)?u=c:l=c;let f,d;if(u===void 0?f=$a.create(i,o,l):(d=Xe.is(u)?u:this._changeAnnotations.manage(u),f=$a.create(i,o,l,d)),this._workspaceEdit.documentChanges.push(f),d!==void 0)return d}deleteFile(i,o,c){if(this.initDocumentChanges(),this._workspaceEdit.documentChanges===void 0)throw new Error("Workspace edit is not configured for document changes.");let l;fn.is(o)||Xe.is(o)?l=o:c=o;let u,f;if(l===void 0?u=Aa.create(i,c):(f=Xe.is(l)?l:this._changeAnnotations.manage(l),u=Aa.create(i,c,f)),this._workspaceEdit.documentChanges.push(u),f!==void 0)return f}},s(r,"WorkspaceChange"),r),(function(a){function i(c){return{uri:c}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)}s(o,"is"),a.is=o})(ep||(ep={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.integer(l.version)}s(o,"is"),a.is=o})(tp||(tp={})),(function(a){function i(c,l){return{uri:c,version:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&(l.version===null||_.integer(l.version))}s(o,"is"),a.is=o})(wl||(wl={})),(function(a){function i(c,l,u,f){return{uri:c,languageId:l,version:u,text:f}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.string(l.uri)&&_.string(l.languageId)&&_.integer(l.version)&&_.string(l.text)}s(o,"is"),a.is=o})(rp||(rp={})),(function(a){a.PlainText="plaintext",a.Markdown="markdown";function i(o){const c=o;return c===a.PlainText||c===a.Markdown}s(i,"is"),a.is=i})(iu||(iu={})),(function(a){function i(o){const c=o;return _.objectLiteral(o)&&iu.is(c.kind)&&_.string(c.value)}s(i,"is"),a.is=i})(Ea||(Ea={})),(function(a){a.Text=1,a.Method=2,a.Function=3,a.Constructor=4,a.Field=5,a.Variable=6,a.Class=7,a.Interface=8,a.Module=9,a.Property=10,a.Unit=11,a.Value=12,a.Enum=13,a.Keyword=14,a.Snippet=15,a.Color=16,a.File=17,a.Reference=18,a.Folder=19,a.EnumMember=20,a.Constant=21,a.Struct=22,a.Event=23,a.Operator=24,a.TypeParameter=25})(np||(np={})),(function(a){a.PlainText=1,a.Snippet=2})(ap||(ap={})),(function(a){a.Deprecated=1})(ip||(ip={})),(function(a){function i(c,l,u){return{newText:c,insert:l,replace:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l&&_.string(l.newText)&&ee.is(l.insert)&&ee.is(l.replace)}s(o,"is"),a.is=o})(sp||(sp={})),(function(a){a.asIs=1,a.adjustIndentation=2})(op||(op={})),(function(a){function i(o){const c=o;return c&&(_.string(c.detail)||c.detail===void 0)&&(_.string(c.description)||c.description===void 0)}s(i,"is"),a.is=i})(lp||(lp={})),(function(a){function i(o){return{label:o}}s(i,"create"),a.create=i})(cp||(cp={})),(function(a){function i(o,c){return{items:o||[],isIncomplete:!!c}}s(i,"create"),a.create=i})(up||(up={})),(function(a){function i(c){return c.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}s(i,"fromPlainText"),a.fromPlainText=i;function o(c){const l=c;return _.string(l)||_.objectLiteral(l)&&_.string(l.language)&&_.string(l.value)}s(o,"is"),a.is=o})(Il||(Il={})),(function(a){function i(o){let c=o;return!!c&&_.objectLiteral(c)&&(Ea.is(c.contents)||Il.is(c.contents)||_.typedArray(c.contents,Il.is))&&(o.range===void 0||ee.is(o.range))}s(i,"is"),a.is=i})(fp||(fp={})),(function(a){function i(o,c){return c?{label:o,documentation:c}:{label:o}}s(i,"create"),a.create=i})(dp||(dp={})),(function(a){function i(o,c,...l){let u={label:o};return _.defined(c)&&(u.documentation=c),_.defined(l)?u.parameters=l:u.parameters=[],u}s(i,"create"),a.create=i})(pp||(pp={})),(function(a){a.Text=1,a.Read=2,a.Write=3})(hp||(hp={})),(function(a){function i(o,c){let l={range:o};return _.number(c)&&(l.kind=c),l}s(i,"create"),a.create=i})(mp||(mp={})),(function(a){a.File=1,a.Module=2,a.Namespace=3,a.Package=4,a.Class=5,a.Method=6,a.Property=7,a.Field=8,a.Constructor=9,a.Enum=10,a.Interface=11,a.Function=12,a.Variable=13,a.Constant=14,a.String=15,a.Number=16,a.Boolean=17,a.Array=18,a.Object=19,a.Key=20,a.Null=21,a.EnumMember=22,a.Struct=23,a.Event=24,a.Operator=25,a.TypeParameter=26})(gp||(gp={})),(function(a){a.Deprecated=1})(yp||(yp={})),(function(a){function i(o,c,l,u,f){let d={name:o,kind:c,location:{uri:u,range:l}};return f&&(d.containerName=f),d}s(i,"create"),a.create=i})(vp||(vp={})),(function(a){function i(o,c,l,u){return u!==void 0?{name:o,kind:c,location:{uri:l,range:u}}:{name:o,kind:c,location:{uri:l}}}s(i,"create"),a.create=i})(Tp||(Tp={})),(function(a){function i(c,l,u,f,d,p){let m={name:c,detail:l,kind:u,range:f,selectionRange:d};return p!==void 0&&(m.children=p),m}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.name)&&_.number(l.kind)&&ee.is(l.range)&&ee.is(l.selectionRange)&&(l.detail===void 0||_.string(l.detail))&&(l.deprecated===void 0||_.boolean(l.deprecated))&&(l.children===void 0||Array.isArray(l.children))&&(l.tags===void 0||Array.isArray(l.tags))}s(o,"is"),a.is=o})(Rp||(Rp={})),(function(a){a.Empty="",a.QuickFix="quickfix",a.Refactor="refactor",a.RefactorExtract="refactor.extract",a.RefactorInline="refactor.inline",a.RefactorRewrite="refactor.rewrite",a.Source="source",a.SourceOrganizeImports="source.organizeImports",a.SourceFixAll="source.fixAll"})($p||($p={})),(function(a){a.Invoked=1,a.Automatic=2})(Nl||(Nl={})),(function(a){function i(c,l,u){let f={diagnostics:c};return l!=null&&(f.only=l),u!=null&&(f.triggerKind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.typedArray(l.diagnostics,Sl.is)&&(l.only===void 0||_.typedArray(l.only,_.string))&&(l.triggerKind===void 0||l.triggerKind===Nl.Invoked||l.triggerKind===Nl.Automatic)}s(o,"is"),a.is=o})(Ap||(Ap={})),(function(a){function i(c,l,u){let f={title:c},d=!0;return typeof l=="string"?(d=!1,f.kind=l):un.is(l)?f.command=l:f.edit=l,d&&u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){let l=c;return l&&_.string(l.title)&&(l.diagnostics===void 0||_.typedArray(l.diagnostics,Sl.is))&&(l.kind===void 0||_.string(l.kind))&&(l.edit!==void 0||l.command!==void 0)&&(l.command===void 0||un.is(l.command))&&(l.isPreferred===void 0||_.boolean(l.isPreferred))&&(l.edit===void 0||au.is(l.edit))}s(o,"is"),a.is=o})(Ep||(Ep={})),(function(a){function i(c,l){let u={range:c};return _.defined(l)&&(u.data=l),u}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.command)||un.is(l.command))}s(o,"is"),a.is=o})(_p||(_p={})),(function(a){function i(c,l){return{tabSize:c,insertSpaces:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&_.uinteger(l.tabSize)&&_.boolean(l.insertSpaces)}s(o,"is"),a.is=o})(Cp||(Cp={})),(function(a){function i(c,l,u){return{range:c,target:l,data:u}}s(i,"create"),a.create=i;function o(c){let l=c;return _.defined(l)&&ee.is(l.range)&&(_.undefined(l.target)||_.string(l.target))}s(o,"is"),a.is=o})(Sp||(Sp={})),(function(a){function i(c,l){return{range:c,parent:l}}s(i,"create"),a.create=i;function o(c){let l=c;return _.objectLiteral(l)&&ee.is(l.range)&&(l.parent===void 0||a.is(l.parent))}s(o,"is"),a.is=o})(bp||(bp={})),(function(a){a.namespace="namespace",a.type="type",a.class="class",a.enum="enum",a.interface="interface",a.struct="struct",a.typeParameter="typeParameter",a.parameter="parameter",a.variable="variable",a.property="property",a.enumMember="enumMember",a.event="event",a.function="function",a.method="method",a.macro="macro",a.keyword="keyword",a.modifier="modifier",a.comment="comment",a.string="string",a.number="number",a.regexp="regexp",a.operator="operator",a.decorator="decorator"})(wp||(wp={})),(function(a){a.declaration="declaration",a.definition="definition",a.readonly="readonly",a.static="static",a.deprecated="deprecated",a.abstract="abstract",a.async="async",a.modification="modification",a.documentation="documentation",a.defaultLibrary="defaultLibrary"})(Ip||(Ip={})),(function(a){function i(o){const c=o;return _.objectLiteral(c)&&(c.resultId===void 0||typeof c.resultId=="string")&&Array.isArray(c.data)&&(c.data.length===0||typeof c.data[0]=="number")}s(i,"is"),a.is=i})(Np||(Np={})),(function(a){function i(c,l){return{range:c,text:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.string(l.text)}s(o,"is"),a.is=o})(kp||(kp={})),(function(a){function i(c,l,u){return{range:c,variableName:l,caseSensitiveLookup:u}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&_.boolean(l.caseSensitiveLookup)&&(_.string(l.variableName)||l.variableName===void 0)}s(o,"is"),a.is=o})(Pp||(Pp={})),(function(a){function i(c,l){return{range:c,expression:l}}s(i,"create"),a.create=i;function o(c){const l=c;return l!=null&&ee.is(l.range)&&(_.string(l.expression)||l.expression===void 0)}s(o,"is"),a.is=o})(Op||(Op={})),(function(a){function i(c,l){return{frameId:c,stoppedLocation:l}}s(i,"create"),a.create=i;function o(c){const l=c;return _.defined(l)&&ee.is(c.stoppedLocation)}s(o,"is"),a.is=o})(Lp||(Lp={})),(function(a){a.Type=1,a.Parameter=2;function i(o){return o===1||o===2}s(i,"is"),a.is=i})(su||(su={})),(function(a){function i(c){return{value:c}}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.location===void 0||Cl.is(l.location))&&(l.command===void 0||un.is(l.command))}s(o,"is"),a.is=o})(ou||(ou={})),(function(a){function i(c,l,u){const f={position:c,label:l};return u!==void 0&&(f.kind=u),f}s(i,"create"),a.create=i;function o(c){const l=c;return _.objectLiteral(l)&&ie.is(l.position)&&(_.string(l.label)||_.typedArray(l.label,ou.is))&&(l.kind===void 0||su.is(l.kind))&&l.textEdits===void 0||_.typedArray(l.textEdits,rr.is)&&(l.tooltip===void 0||_.string(l.tooltip)||Ea.is(l.tooltip))&&(l.paddingLeft===void 0||_.boolean(l.paddingLeft))&&(l.paddingRight===void 0||_.boolean(l.paddingRight))}s(o,"is"),a.is=o})(Dp||(Dp={})),(function(a){function i(o){return{kind:"snippet",value:o}}s(i,"createSnippet"),a.createSnippet=i})(Mp||(Mp={})),(function(a){function i(o,c,l,u){return{insertText:o,filterText:c,range:l,command:u}}s(i,"create"),a.create=i})(xp||(xp={})),(function(a){function i(o){return{items:o}}s(i,"create"),a.create=i})(Fp||(Fp={})),(function(a){a.Invoked=0,a.Automatic=1})(Gp||(Gp={})),(function(a){function i(o,c){return{range:o,text:c}}s(i,"create"),a.create=i})(jp||(jp={})),(function(a){function i(o,c){return{triggerKind:o,selectedCompletionInfo:c}}s(i,"create"),a.create=i})(Up||(Up={})),(function(a){function i(o){const c=o;return _.objectLiteral(c)&&tu.is(c.uri)&&_.string(c.name)}s(i,"is"),a.is=i})(zp||(zp={})),mT=[`
|
|
2
2
|
`,`\r
|
|
3
3
|
`,"\r"],(function(a){function i(u,f,d,p){return new _y(u,f,d,p)}s(i,"create"),a.create=i;function o(u){let f=u;return!!(_.defined(f)&&_.string(f.uri)&&(_.undefined(f.languageId)||_.string(f.languageId))&&_.uinteger(f.lineCount)&&_.func(f.getText)&&_.func(f.positionAt)&&_.func(f.offsetAt))}s(o,"is"),a.is=o;function c(u,f){let d=u.getText(),p=l(f,(g,v)=>{let E=g.range.start.line-v.range.start.line;return E===0?g.range.start.character-v.range.start.character:E}),m=d.length;for(let g=p.length-1;g>=0;g--){let v=p[g],E=u.offsetAt(v.range.start),T=u.offsetAt(v.range.end);if(T<=m)d=d.substring(0,E)+v.newText+d.substring(T,d.length);else throw new Error("Overlapping edit");m=E}return d}s(c,"applyEdits"),a.applyEdits=c;function l(u,f){if(u.length<=1)return u;const d=u.length/2|0,p=u.slice(0,d),m=u.slice(d);l(p,f),l(m,f);let g=0,v=0,E=0;for(;g<p.length&&v<m.length;)f(p[g],m[v])<=0?u[E++]=p[g++]:u[E++]=m[v++];for(;g<p.length;)u[E++]=p[g++];for(;v<m.length;)u[E++]=m[v++];return u}s(l,"mergeSort")})(Bp||(Bp={})),_y=(n=class{constructor(i,o,c,l){this._uri=i,this._languageId=o,this._version=c,this._content=l,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(i){if(i){let o=this.offsetAt(i.start),c=this.offsetAt(i.end);return this._content.substring(o,c)}return this._content}update(i,o){this._content=i.text,this._version=o,this._lineOffsets=void 0}getLineOffsets(){if(this._lineOffsets===void 0){let i=[],o=this._content,c=!0;for(let l=0;l<o.length;l++){c&&(i.push(l),c=!1);let u=o.charAt(l);c=u==="\r"||u===`
|
|
4
4
|
`,u==="\r"&&l+1<o.length&&o.charAt(l+1)===`
|
package/dist/assets/{wardleyDiagram-YWT4CUSO-CTutletf.js → wardleyDiagram-YWT4CUSO-cmFDR9p-.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as zt,g as Lt,q as Tt,p as At,a as Xt,b as Et,_ as y,K as Yt,D as It,F as Q,l as et,I as Ft,e as Bt,z as Rt,c as V}from"./index-
|
|
1
|
+
import{s as zt,g as Lt,q as Tt,p as At,a as Xt,b as Et,_ as y,K as Yt,D as It,F as Q,l as et,I as Ft,e as Bt,z as Rt,c as V}from"./index-BxBZmqgf.js";import{p as Ot}from"./chunk-4BX2VUAB-DkbrtaN7.js";import{p as Wt}from"./wardley-L42UT6IY-DqVhxf9g.js";var G=y((a,o)=>{const e=a<=1?a*100:a;if(e<0||e>100)throw new Error(`${o} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${a}`);return e},"toPercent"),E=y((a,o,e)=>({x:G(o,`${e} evolution`),y:G(a,`${e} visibility`)}),"toCoordinates"),tt=y(a=>{if(a){if(a==="+<>")return"bidirectional";if(a==="+<")return"backward";if(a==="+>")return"forward"}},"getFlowFromPort"),Dt=y(a=>{if(!(a!=null&&a.startsWith("+")))return{};const o=/^\+'([^']*)'/.exec(a),e=o==null?void 0:o[1];return a.includes("<>")?{flow:"bidirectional",label:e}:a.includes("<")?{flow:"backward",label:e}:a.includes(">")?{flow:"forward",label:e}:{label:e}},"extractFlowFromArrow"),Gt=y((a,o)=>{if(Ot(a,o),a.size&&o.setSize(a.size.width,a.size.height),a.evolution){const e=a.evolution.stages.map(r=>r.secondName?`${r.name.trim()} / ${r.secondName.trim()}`:r.name.trim()),p=a.evolution.stages.filter(r=>r.boundary!==void 0).map(r=>r.boundary);o.updateAxes({stages:e,stageBoundaries:p})}if(a.anchors.forEach(e=>{const p=E(e.visibility,e.evolution,`Anchor "${e.name}"`);o.addNode(e.name,e.name,p.x,p.y,"anchor")}),a.components.forEach(e=>{var v;const p=E(e.visibility,e.evolution,`Component "${e.name}"`),r=e.label?(e.label.negX?-1:1)*e.label.offsetX:void 0,d=e.label?(e.label.negY?-1:1)*e.label.offsetY:void 0,m=(v=e.decorator)==null?void 0:v.strategy;o.addNode(e.name,e.name,p.x,p.y,"component",r,d,e.inertia,m)}),a.notes.forEach(e=>{const p=E(e.visibility,e.evolution,`Note "${e.text}"`);o.addNote(e.text,p.x,p.y)}),a.pipelines.forEach(e=>{const p=o.getNode(e.parent);if(!p||typeof p.y!="number")throw new Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);const r=p.y;o.startPipeline(e.parent),e.components.forEach(d=>{const m=`${e.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,L=G(d.evolution,`Pipeline component "${d.name}" evolution`);o.addNode(m,d.name,L,r,"pipeline-component",v,g),o.addPipelineComponent(e.parent,m)})}),a.links.forEach(e=>{const p=!!e.arrow&&(e.arrow.includes("-.->")||e.arrow.includes(".-."));let r=tt(e.fromPort)??tt(e.toPort);const{flow:d,label:m}=Dt(e.arrow);!r&&d&&(r=d);const v=e.linkLabel,g=m??v;o.addLink(o.resolveNodeId(e.from),o.resolveNodeId(e.to),p,g,r)}),a.evolves.forEach(e=>{const p=o.getNode(e.component);if((p==null?void 0:p.y)!==void 0){const r=G(e.target,`Evolve target for "${e.component}"`);o.addTrend(e.component,r,p.y)}}),a.annotations.length>0){const e=a.annotations[0],p=E(e.x,e.y,"Annotations box");o.setAnnotationsBox(p.x,p.y)}a.annotation.forEach(e=>{const p=E(e.x,e.y,`Annotation ${e.number}`);o.addAnnotation(e.number,[{x:p.x,y:p.y}],e.text)}),a.accelerators.forEach(e=>{const p=E(e.x,e.y,`Accelerator "${e.name}"`);o.addAccelerator(e.name,p.x,p.y)}),a.deaccelerators.forEach(e=>{const p=E(e.x,e.y,`Deaccelerator "${e.name}"`);o.addDeaccelerator(e.name,p.x,p.y)})},"populateDb"),at={parser:{yy:void 0},parse:y(async a=>{var p;const o=await Wt("wardley",a);et.debug(o);const e=(p=at.parser)==null?void 0:p.yy;if(!e||typeof e.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.");Gt(o,e)},"parse")},I,qt=(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(o){const e=this.nodes.get(o.id)??{id:o.id,label:o.label},p={...e,...o,className:o.className??e.className,labelOffsetX:o.labelOffsetX??e.labelOffsetX,labelOffsetY:o.labelOffsetY??e.labelOffsetY};this.nodes.set(o.id,p)}addLink(o){this.links.push(o)}addTrend(o){this.trends.set(o.nodeId,o)}startPipeline(o){this.pipelines.set(o,{nodeId:o,componentIds:[]});const e=this.nodes.get(o);e&&(e.isPipelineParent=!0)}addPipelineComponent(o,e){const p=this.pipelines.get(o);p&&p.componentIds.push(e);const r=this.nodes.get(e);r&&(r.inPipeline=!0)}addAnnotation(o){this.annotations.push(o)}addNote(o){this.notes.push(o)}addAccelerator(o){this.accelerators.push(o)}addDeaccelerator(o){this.deaccelerators.push(o)}setAnnotationsBox(o,e){this.annotationsBox={x:o,y:e}}setAxes(o){this.axes={...this.axes,...o}}setSize(o,e){this.size={width:o,height:e}}getNode(o){return this.nodes.get(o)}resolveNodeId(o){if(this.nodes.has(o))return o;for(const[e,p]of this.nodes)if(p.label===o)return e;return o}build(){const o=[];for(const e of this.nodes.values()){if(typeof e.x!="number"||typeof e.y!="number")throw new Error(`Node "${e.label}" is missing coordinates`);o.push(e)}return{nodes:o,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),b=new qt;function rt(){return V()["wardley-beta"]}y(rt,"getConfig");function ot(a,o,e,p,r,d,m,v,g){b.addNode({id:a,label:o,x:e,y:p,className:r,labelOffsetX:d,labelOffsetY:m,inertia:v,sourceStrategy:g})}y(ot,"addNode");function st(a,o,e=!1,p,r){b.addLink({source:a,target:o,dashed:e,label:p,flow:r})}y(st,"addLink");function nt(a,o,e){b.addTrend({nodeId:a,targetX:o,targetY:e})}y(nt,"addTrend");function it(a,o,e){b.addAnnotation({number:a,coordinates:o,text:e})}y(it,"addAnnotation");function dt(a,o,e){b.addNote({text:a,x:o,y:e})}y(dt,"addNote");function lt(a,o,e){b.addAccelerator({name:a,x:o,y:e})}y(lt,"addAccelerator");function ct(a,o,e){b.addDeaccelerator({name:a,x:o,y:e})}y(ct,"addDeaccelerator");function pt(a,o){b.setAnnotationsBox(a,o)}y(pt,"setAnnotationsBox");function ht(a,o){b.setSize(a,o)}y(ht,"setSize");function xt(a){b.startPipeline(a)}y(xt,"startPipeline");function ft(a,o){b.addPipelineComponent(a,o)}y(ft,"addPipelineComponent");function gt(a){b.setAxes(a)}y(gt,"updateAxes");function ut(a){return b.getNode(a)}y(ut,"getNode");function yt(a){return b.resolveNodeId(a)}y(yt,"resolveNodeId");function mt(){return b.build()}y(mt,"getWardleyData");function wt(){b.clear(),Rt()}y(wt,"clear");var Ht={getConfig:rt,addNode:ot,addLink:st,addTrend:nt,addAnnotation:it,addNote:dt,addAccelerator:lt,addDeaccelerator:ct,setAnnotationsBox:pt,setSize:ht,startPipeline:xt,addPipelineComponent:ft,updateAxes:gt,getNode:ut,resolveNodeId:yt,getWardleyData:mt,clear:wt,setAccTitle:Et,getAccTitle:Xt,setDiagramTitle:At,getDiagramTitle:Tt,getAccDescription:Lt,setAccDescription:zt},jt=["Genesis","Custom Built","Product","Commodity"],Vt=y(()=>{var o,e,p,r,d,m,v,g,L,M,k,N;const{themeVariables:a}=V();return{backgroundColor:((o=a.wardley)==null?void 0:o.backgroundColor)??a.background??"#fff",axisColor:((e=a.wardley)==null?void 0:e.axisColor)??"#000",axisTextColor:((p=a.wardley)==null?void 0:p.axisTextColor)??a.primaryTextColor??"#222",gridColor:((r=a.wardley)==null?void 0:r.gridColor)??"rgba(100, 100, 100, 0.2)",componentFill:((d=a.wardley)==null?void 0:d.componentFill)??"#fff",componentStroke:((m=a.wardley)==null?void 0:m.componentStroke)??"#000",componentLabelColor:((v=a.wardley)==null?void 0:v.componentLabelColor)??a.primaryTextColor??"#222",linkStroke:((g=a.wardley)==null?void 0:g.linkStroke)??"#000",evolutionStroke:((L=a.wardley)==null?void 0:L.evolutionStroke)??"#dc3545",annotationStroke:((M=a.wardley)==null?void 0:M.annotationStroke)??"#000",annotationTextColor:((k=a.wardley)==null?void 0:k.annotationTextColor)??a.primaryTextColor??"#222",annotationFill:((N=a.wardley)==null?void 0:N.annotationFill)??a.background??"#fff"}},"getTheme"),_t=y(()=>{const a=V()["wardley-beta"];return{width:(a==null?void 0:a.width)??900,height:(a==null?void 0:a.height)??600,padding:(a==null?void 0:a.padding)??48,nodeRadius:(a==null?void 0:a.nodeRadius)??6,nodeLabelOffset:(a==null?void 0:a.nodeLabelOffset)??8,axisFontSize:(a==null?void 0:a.axisFontSize)??12,labelFontSize:(a==null?void 0:a.labelFontSize)??10,showGrid:(a==null?void 0:a.showGrid)??!1,useMaxWidth:(a==null?void 0:a.useMaxWidth)??!0}},"getConfigValues"),Zt=y((a,o,e,p)=>{var U,J;et.debug(`Rendering Wardley map
|
|
2
2
|
`+a);const r=_t(),d=Vt(),m=r.nodeRadius*1.6,v=p.db,g=v.getWardleyData(),L=v.getDiagramTitle(),M=((U=g.size)==null?void 0:U.width)??r.width,k=((J=g.size)==null?void 0:J.height)??r.height,N=Ft(o);N.selectAll("*").remove(),Bt(N,k,M,r.useMaxWidth),N.attr("viewBox",`0 0 ${M} ${k}`);const P=N.append("g").attr("class","wardley-map"),q=N.append("defs");q.append("marker").attr("id",`arrow-${o}`).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"),q.append("marker").attr("id",`link-arrow-end-${o}`).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"),q.append("marker").attr("id",`link-arrow-start-${o}`).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"),P.append("rect").attr("class","wardley-background").attr("width",M).attr("height",k).attr("fill",d.backgroundColor);const F=M-r.padding*2,B=k-r.padding*2;L&&P.append("text").attr("class","wardley-title").attr("x",M/2).attr("y",r.padding/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize*1.05).attr("font-weight","bold").attr("text-anchor","middle").attr("dominant-baseline","middle").text(L);const T=y(t=>r.padding+t/100*F,"projectX"),A=y(t=>k-r.padding-t/100*B,"projectY"),O=P.append("g").attr("class","wardley-axes");O.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1),O.append("line").attr("x1",r.padding).attr("x2",r.padding).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.axisColor).attr("stroke-width",1);const kt=g.axes.xLabel??"Evolution",bt=g.axes.yLabel??"Visibility";O.append("text").attr("class","wardley-axis-label wardley-axis-label-x").attr("x",r.padding+F/2).attr("y",k-r.padding/4).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").text(kt),O.append("text").attr("class","wardley-axis-label wardley-axis-label-y").attr("x",r.padding/3).attr("y",r.padding+B/2).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize).attr("font-weight","bold").attr("text-anchor","middle").attr("transform",`rotate(-90 ${r.padding/3} ${r.padding+B/2})`).text(bt);const R=g.axes.stages&&g.axes.stages.length>0?g.axes.stages:jt;if(R.length>0){const t=P.append("g").attr("class","wardley-stages"),n=g.axes.stageBoundaries,s=[];if(n&&n.length===R.length){let i=0;n.forEach(h=>{s.push({start:i,end:h}),i=h})}else{const i=1/R.length;R.forEach((h,l)=>{s.push({start:l*i,end:(l+1)*i})})}R.forEach((i,h)=>{const l=s[h],x=r.padding+l.start*F,f=r.padding+l.end*F,u=(x+f)/2;h>0&&t.append("line").attr("x1",x).attr("x2",x).attr("y1",r.padding).attr("y2",k-r.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",k-r.padding/1.5).attr("fill",d.axisTextColor).attr("font-size",r.axisFontSize-2).attr("text-anchor","middle").text(i)})}if(r.showGrid){const t=P.append("g").attr("class","wardley-grid");for(let n=1;n<4;n++){const s=n/4,i=r.padding+F*s;t.append("line").attr("x1",i).attr("x2",i).attr("y1",r.padding).attr("y2",k-r.padding).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6"),t.append("line").attr("x1",r.padding).attr("x2",M-r.padding).attr("y1",k-r.padding-B*s).attr("y2",k-r.padding-B*s).attr("stroke",d.gridColor).attr("stroke-dasharray","2 6")}}const c=new Map;if(g.nodes.forEach(t=>{c.set(t.id,{x:T(t.x),y:A(t.y),node:t})}),g.pipelines.length>0){const t=P.append("g").attr("class","wardley-pipelines"),n=P.append("g").attr("class","wardley-pipeline-links");g.pipelines.forEach(s=>{if(s.componentIds.length===0)return;const i=s.componentIds.map(f=>({id:f,pos:c.get(f),node:g.nodes.find(u=>u.id===f)})).filter(f=>f.pos&&f.node).sort((f,u)=>f.node.x-u.node.x);for(let f=0;f<i.length-1;f++){const u=i[f],w=i[f+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 h=1/0,l=-1/0,x=0;if(s.componentIds.forEach(f=>{const u=c.get(f);u&&(h=Math.min(h,u.x),l=Math.max(l,u.x),x=u.y)}),h!==1/0&&l!==-1/0){const u=r.nodeRadius*4,w=x-u/2,S=c.get(s.nodeId);if(S){const z=(h+l)/2;S.x=z,S.y=w-m/6}t.append("rect").attr("class","wardley-pipeline-box").attr("x",h-15).attr("y",w).attr("width",l-h+30).attr("height",u).attr("fill","none").attr("stroke",d.axisColor).attr("stroke-width",1.5).attr("rx",4).attr("ry",4)}})}const _=P.append("g").attr("class","wardley-links"),Z=new Map;g.pipelines.forEach(t=>{Z.set(t.nodeId,new Set(t.componentIds))});const K=g.links.filter(t=>{if(!c.has(t.source)||!c.has(t.target))return!1;const n=Z.get(t.target);return!(n!=null&&n.has(t.source))});_.selectAll("line").data(K).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),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.x+l/f*h}).attr("y1",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.source).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x);return n.y+x/f*h}).attr("x2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.x+l/f*h}).attr("y2",t=>{const n=c.get(t.source),s=c.get(t.target),h=g.nodes.find(u=>u.id===t.target).isPipelineParent?m/Math.sqrt(2):r.nodeRadius,l=n.x-s.x,x=n.y-s.y,f=Math.sqrt(l*l+x*x);return s.y+x/f*h}).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-${o})`:null).attr("marker-start",t=>t.flow==="backward"||t.flow==="bidirectional"?`url(#link-arrow-start-${o})`:null),_.selectAll("text").data(K.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,h=s.y-n.y,l=s.x-n.x,x=Math.sqrt(l*l+h*h),f=8,u=h/x;return i+u*f}).attr("y",t=>{const n=c.get(t.source),s=c.get(t.target),i=(n.y+s.y)/2,h=s.x-n.x,l=s.y-n.y,x=Math.sqrt(h*h+l*l),f=8,u=-h/x;return i+u*f}).attr("fill",d.axisTextColor).attr("font-size",r.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,h=(n.y+s.y)/2,l=s.x-n.x,x=s.y-n.y,f=Math.sqrt(l*l+x*x),u=8,w=x/f,S=-l/f,z=i+w*u,W=h+S*u;let Y=Math.atan2(x,l)*180/Math.PI;return(Y>90||Y<-90)&&(Y+=180),`rotate(${Y} ${z} ${W})`}).text(t=>t.label);const $t=P.append("g").attr("class","wardley-trends"),vt=g.trends.map(t=>{const n=c.get(t.nodeId);if(!n)return null;const s=T(t.targetX),i=A(t.targetY),h=s-n.x,l=i-n.y,x=Math.sqrt(h*h+l*l),f=r.nodeRadius+2,u=x>f?s-h/x*f:s,w=x>f?i-l/x*f:i;return{origin:n,targetX:s,targetY:i,adjustedX2:u,adjustedY2:w}}).filter(t=>t!==null);$t.selectAll("line").data(vt).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-${o})`);const C=P.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(" "));C.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",r.nodeRadius*2).attr("fill","#666").attr("stroke",d.componentStroke).attr("stroke-width",1),C.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",r.nodeRadius*2).attr("fill","#ccc").attr("stroke",d.componentStroke).attr("stroke-width",1),C.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",r.nodeRadius*2).attr("fill","#eee").attr("stroke","#000").attr("stroke-width",1);const X=C.filter(t=>t.sourceStrategy==="market");X.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",r.nodeRadius*2).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",1),C.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",r.nodeRadius).attr("fill",d.componentFill).attr("stroke",d.componentStroke).attr("stroke-width",1);const H=r.nodeRadius*.7,$=r.nodeRadius*1.2;if(X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x).attr("y1",t=>c.get(t.id).y-$).attr("x2",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y2",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("line").attr("class","wardley-market-line").attr("x1",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("y1",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("x2",t=>c.get(t.id).x).attr("y2",t=>c.get(t.id).y-$).attr("stroke",d.componentStroke).attr("stroke-width",1),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x).attr("cy",t=>c.get(t.id).y-$).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x-$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),X.append("circle").attr("class","wardley-market-dot").attr("cx",t=>c.get(t.id).x+$*Math.cos(Math.PI/6)).attr("cy",t=>c.get(t.id).y+$*Math.sin(Math.PI/6)).attr("r",H).attr("fill","white").attr("stroke",d.componentStroke).attr("stroke-width",2),C.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),C.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:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y1",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y-s/2}).attr("x2",t=>{const n=c.get(t.id);let s=t.isPipelineParent?m/2+15:r.nodeRadius+15;return t.sourceStrategy&&(s+=r.nodeRadius+10),n.x+s}).attr("y2",t=>{const n=c.get(t.id),s=t.isPipelineParent?m:r.nodeRadius*2;return n.y+s/2}).attr("stroke",d.componentStroke).attr("stroke-width",6),C.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=r.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=-r.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",r.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=P.append("g").attr("class","wardley-annotations");if(g.annotations.forEach(n=>{const s=n.coordinates.map(i=>({x:T(i.x),y:A(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 h=t.append("g").attr("class","wardley-annotation");h.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),h.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=T(g.annotationsBox.x),s=A(g.annotationsBox.y);const i=10,h=16,l=11,x=t.append("g").attr("class","wardley-annotations-box"),f=[...g.annotations].filter(w=>w.text).sort((w,S)=>w.number-S.number),u=[];if(f.forEach((w,S)=>{const z=x.append("text").attr("x",n+i).attr("y",s+i+(S+1)*h).attr("font-size",l).attr("fill",d.axisTextColor).attr("text-anchor","start").attr("dominant-baseline","middle").text(`${w.number}. ${w.text}`);u.push(z)}),u.length>0){let w=0,S=0;u.forEach(j=>{const D=j.node(),Nt=D.getComputedTextLength();w=Math.max(w,Nt);const Ct=D.getBBox();S=Math.max(S,Ct.height)});const z=w+i*2+105,W=f.length*h+i*2+S/2,Y=r.padding,Pt=M-r.padding-z,St=r.padding,Mt=k-r.padding-W;n=Math.max(Y,Math.min(n,Pt)),s=Math.max(St,Math.min(s,Mt)),u.forEach((j,D)=>{j.attr("x",n+i).attr("y",s+i+(D+1)*h)}),x.insert("rect","text").attr("x",n).attr("y",s).attr("width",z).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=P.append("g").attr("class","wardley-notes");g.notes.forEach(n=>{const s=T(n.x),i=A(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=P.append("g").attr("class","wardley-accelerators");g.accelerators.forEach(n=>{const s=T(n.x),i=A(n.y),h=60,l=30,x=20,f=`
|
|
3
3
|
M ${s} ${i-l/2}
|
|
4
4
|
L ${s+h-x} ${i-l/2}
|
package/dist/assets/{xychartDiagram-2RQKCTM6-wrRC0RBX.js → xychartDiagram-2RQKCTM6-DmAwTFQ_.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,am as Si,R as Wt}from"./index-
|
|
1
|
+
import{s as gi,g as xi,q as Xt,p as di,a as fi,b as pi,_ as a,l as Yt,I as mi,e as yi,z as bi,D as _t,i as Ai,F as Nt,G as wi,K as Ci,am as Si,R as Wt}from"./index-BxBZmqgf.js";import{i as _i}from"./init-Gi6I4Gst.js";import{o as ki}from"./ordinal-Cboi1Yqb.js";import{l as zt}from"./linear-ro7DcLah.js";import"./defaultLocale-DX6XiGOO.js";function Ri(e,t,i){e=+e,t=+t,i=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+i;for(var s=-1,n=Math.max(0,Math.ceil((t-e)/i))|0,o=new Array(n);++s<n;)o[s]=e+s*i;return o}function bt(){var e=ki().unknown(void 0),t=e.domain,i=e.range,s=0,n=1,o,u,p=!1,f=0,T=0,P=.5;delete e.unknown;function _(){var y=t().length,E=n<s,v=E?n:s,L=E?s:n;o=(L-v)/Math.max(1,y-f+T*2),p&&(o=Math.floor(o)),v+=(L-v-o*(y-f))*P,u=o*(1-f),p&&(v=Math.round(v),u=Math.round(u));var I=Ri(y).map(function(m){return v+o*m});return i(E?I.reverse():I)}return e.domain=function(y){return arguments.length?(t(y),_()):t()},e.range=function(y){return arguments.length?([s,n]=y,s=+s,n=+n,_()):[s,n]},e.rangeRound=function(y){return[s,n]=y,s=+s,n=+n,p=!0,_()},e.bandwidth=function(){return u},e.step=function(){return o},e.round=function(y){return arguments.length?(p=!!y,_()):p},e.padding=function(y){return arguments.length?(f=Math.min(1,T=+y),_()):f},e.paddingInner=function(y){return arguments.length?(f=Math.min(1,y),_()):f},e.paddingOuter=function(y){return arguments.length?(T=+y,_()):T},e.align=function(y){return arguments.length?(P=Math.max(0,Math.min(1,y)),_()):P},e.copy=function(){return bt(t(),[s,n]).round(p).paddingInner(f).paddingOuter(T).align(P)},_i.apply(_(),arguments)}var At=(function(){var e=a(function(F,h,c,g){for(c=c||{},g=F.length;g--;c[F[g]]=h);return c},"o"),t=[1,10,12,14,16,18,19,21,23],i=[2,6],s=[1,3],n=[1,5],o=[1,6],u=[1,7],p=[1,5,10,12,14,16,18,19,21,23,34,35,36],f=[1,25],T=[1,26],P=[1,28],_=[1,29],y=[1,30],E=[1,31],v=[1,32],L=[1,33],I=[1,34],m=[1,35],R=[1,36],l=[1,37],W=[1,43],O=[1,42],X=[1,47],Y=[1,50],S=[1,10,12,14,16,18,19,21,23,34,35,36],U=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],b=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36,41,42,43,44,45,46,47,48,49,50],w=[1,64],V={trace:a(function(){},"trace"),yy:{},symbols_:{error:2,start:3,eol:4,XYCHART:5,chartConfig:6,document:7,CHART_ORIENTATION:8,statement:9,title:10,text:11,X_AXIS:12,parseXAxis:13,Y_AXIS:14,parseYAxis:15,LINE:16,plotData:17,BAR:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,SQUARE_BRACES_START:24,commaSeparatedNumbers:25,SQUARE_BRACES_END:26,NUMBER_WITH_DECIMAL:27,COMMA:28,xAxisData:29,bandData:30,ARROW_DELIMITER:31,commaSeparatedTexts:32,yAxisData:33,NEWLINE:34,SEMI:35,EOF:36,alphaNum:37,STR:38,MD_STR:39,alphaNumToken:40,AMP:41,NUM:42,ALPHA:43,PLUS:44,EQUALS:45,MULT:46,DOT:47,BRKT:48,MINUS:49,UNDERSCORE:50,$accept:0,$end:1},terminals_:{2:"error",5:"XYCHART",8:"CHART_ORIENTATION",10:"title",12:"X_AXIS",14:"Y_AXIS",16:"LINE",18:"BAR",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"SQUARE_BRACES_START",26:"SQUARE_BRACES_END",27:"NUMBER_WITH_DECIMAL",28:"COMMA",31:"ARROW_DELIMITER",34:"NEWLINE",35:"SEMI",36:"EOF",38:"STR",39:"MD_STR",41:"AMP",42:"NUM",43:"ALPHA",44:"PLUS",45:"EQUALS",46:"MULT",47:"DOT",48:"BRKT",49:"MINUS",50:"UNDERSCORE"},productions_:[0,[3,2],[3,3],[3,2],[3,1],[6,1],[7,0],[7,2],[9,2],[9,2],[9,2],[9,2],[9,2],[9,3],[9,2],[9,3],[9,2],[9,2],[9,1],[17,3],[25,3],[25,1],[13,1],[13,2],[13,1],[29,1],[29,3],[30,3],[32,3],[32,1],[15,1],[15,2],[15,1],[33,3],[4,1],[4,1],[4,1],[11,1],[11,1],[11,1],[37,1],[37,2],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1],[40,1]],performAction:a(function(h,c,g,x,C,r,rt){var d=r.length-1;switch(C){case 5:x.setOrientation(r[d]);break;case 9:x.setDiagramTitle(r[d].text.trim());break;case 12:x.setLineData({text:"",type:"text"},r[d]);break;case 13:x.setLineData(r[d-1],r[d]);break;case 14:x.setBarData({text:"",type:"text"},r[d]);break;case 15:x.setBarData(r[d-1],r[d]);break;case 16:this.$=r[d].trim(),x.setAccTitle(this.$);break;case 17:case 18:this.$=r[d].trim(),x.setAccDescription(this.$);break;case 19:this.$=r[d-1];break;case 20:this.$=[Number(r[d-2]),...r[d]];break;case 21:this.$=[Number(r[d])];break;case 22:x.setXAxisTitle(r[d]);break;case 23:x.setXAxisTitle(r[d-1]);break;case 24:x.setXAxisTitle({type:"text",text:""});break;case 25:x.setXAxisBand(r[d]);break;case 26:x.setXAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 27:this.$=r[d-1];break;case 28:this.$=[r[d-2],...r[d]];break;case 29:this.$=[r[d]];break;case 30:x.setYAxisTitle(r[d]);break;case 31:x.setYAxisTitle(r[d-1]);break;case 32:x.setYAxisTitle({type:"text",text:""});break;case 33:x.setYAxisRangeData(Number(r[d-2]),Number(r[d]));break;case 37:this.$={text:r[d],type:"text"};break;case 38:this.$={text:r[d],type:"text"};break;case 39:this.$={text:r[d],type:"markdown"};break;case 40:this.$=r[d];break;case 41:this.$=r[d-1]+""+r[d];break}},"anonymous"),table:[e(t,i,{3:1,4:2,7:4,5:s,34:n,35:o,36:u}),{1:[3]},e(t,i,{4:2,7:4,3:8,5:s,34:n,35:o,36:u}),e(t,i,{4:2,7:4,6:9,3:10,5:s,8:[1,11],34:n,35:o,36:u}),{1:[2,4],9:12,10:[1,13],12:[1,14],14:[1,15],16:[1,16],18:[1,17],19:[1,18],21:[1,19],23:[1,20]},e(p,[2,34]),e(p,[2,35]),e(p,[2,36]),{1:[2,1]},e(t,i,{4:2,7:4,3:21,5:s,34:n,35:o,36:u}),{1:[2,3]},e(p,[2,5]),e(t,[2,7],{4:22,34:n,35:o,36:u}),{11:23,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:39,13:38,24:W,27:O,29:40,30:41,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:45,15:44,27:X,33:46,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:49,17:48,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{11:52,17:51,24:Y,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},{20:[1,53]},{22:[1,54]},e(S,[2,18]),{1:[2,2]},e(S,[2,8]),e(S,[2,9]),e(U,[2,37],{40:55,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l}),e(U,[2,38]),e(U,[2,39]),e(b,[2,40]),e(b,[2,42]),e(b,[2,43]),e(b,[2,44]),e(b,[2,45]),e(b,[2,46]),e(b,[2,47]),e(b,[2,48]),e(b,[2,49]),e(b,[2,50]),e(b,[2,51]),e(S,[2,10]),e(S,[2,22],{30:41,29:56,24:W,27:O}),e(S,[2,24]),e(S,[2,25]),{31:[1,57]},{11:59,32:58,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,11]),e(S,[2,30],{33:60,27:X}),e(S,[2,32]),{31:[1,61]},e(S,[2,12]),{17:62,24:Y},{25:63,27:w},e(S,[2,14]),{17:65,24:Y},e(S,[2,16]),e(S,[2,17]),e(b,[2,41]),e(S,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(S,[2,31]),{27:[1,69]},e(S,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(S,[2,15]),e(S,[2,26]),e(S,[2,27]),{11:59,32:72,37:24,38:f,39:T,40:27,41:P,42:_,43:y,44:E,45:v,46:L,47:I,48:m,49:R,50:l},e(S,[2,33]),e(S,[2,19]),{25:73,27:w},{26:[2,28]},{26:[2,20]}],defaultActions:{8:[2,1],10:[2,3],21:[2,2],72:[2,28],73:[2,20]},parseError:a(function(h,c){if(c.recoverable)this.trace(h);else{var g=new Error(h);throw g.hash=c,g}},"parseError"),parse:a(function(h){var c=this,g=[0],x=[],C=[null],r=[],rt=this.table,d="",ct=0,It=0,hi=2,Mt=1,li=r.slice.call(arguments,1),D=Object.create(this.lexer),$={yy:{}};for(var ft in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ft)&&($.yy[ft]=this.yy[ft]);D.setInput(h,$.yy),$.yy.lexer=D,$.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var pt=D.yylloc;r.push(pt);var ci=D.options&&D.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ui(B){g.length=g.length-2*B,C.length=C.length-B,r.length=r.length-B}a(ui,"popStack");function Vt(){var B;return B=x.pop()||D.lex()||Mt,typeof B!="number"&&(B instanceof Array&&(x=B,B=x.pop()),B=c.symbols_[B]||B),B}a(Vt,"lex");for(var M,q,z,mt,G={},ut,N,Bt,gt;;){if(q=g[g.length-1],this.defaultActions[q]?z=this.defaultActions[q]:((M===null||typeof M>"u")&&(M=Vt()),z=rt[q]&&rt[q][M]),typeof z>"u"||!z.length||!z[0]){var yt="";gt=[];for(ut in rt[q])this.terminals_[ut]&&ut>hi&>.push("'"+this.terminals_[ut]+"'");D.showPosition?yt="Parse error on line "+(ct+1)+`:
|
|
2
2
|
`+D.showPosition()+`
|
|
3
3
|
Expecting `+gt.join(", ")+", got '"+(this.terminals_[M]||M)+"'":yt="Parse error on line "+(ct+1)+": Unexpected "+(M==Mt?"end of input":"'"+(this.terminals_[M]||M)+"'"),this.parseError(yt,{text:D.match,token:this.terminals_[M]||M,line:D.yylineno,loc:pt,expected:gt})}if(z[0]instanceof Array&&z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+q+", token: "+M);switch(z[0]){case 1:g.push(M),C.push(D.yytext),r.push(D.yylloc),g.push(z[1]),M=null,It=D.yyleng,d=D.yytext,ct=D.yylineno,pt=D.yylloc;break;case 2:if(N=this.productions_[z[1]][1],G.$=C[C.length-N],G._$={first_line:r[r.length-(N||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(N||1)].first_column,last_column:r[r.length-1].last_column},ci&&(G._$.range=[r[r.length-(N||1)].range[0],r[r.length-1].range[1]]),mt=this.performAction.apply(G,[d,It,ct,$.yy,z[1],C,r].concat(li)),typeof mt<"u")return mt;N&&(g=g.slice(0,-1*N*2),C=C.slice(0,-1*N),r=r.slice(0,-1*N)),g.push(this.productions_[z[1]][0]),C.push(G.$),r.push(G._$),Bt=rt[g[g.length-2]][g[g.length-1]],g.push(Bt);break;case 3:return!0}}return!0},"parse")},k=(function(){var F={EOF:1,parseError:a(function(c,g){if(this.yy.parser)this.yy.parser.parseError(c,g);else throw new Error(c)},"parseError"),setInput:a(function(h,c){return this.yy=c||this.yy||{},this._input=h,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:a(function(){var h=this._input[0];this.yytext+=h,this.yyleng++,this.offset++,this.match+=h,this.matched+=h;var c=h.match(/(?:\r\n?|\n).*/g);return c?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),h},"input"),unput:a(function(h){var c=h.length,g=h.split(/(?:\r\n?|\n)/g);this._input=h+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-c),this.offset-=c;var x=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),g.length-1&&(this.yylineno-=g.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:g?(g.length===x.length?this.yylloc.first_column:0)+x[x.length-g.length].length-g[0].length:this.yylloc.first_column-c},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-c]),this.yyleng=this.yytext.length,this},"unput"),more:a(function(){return this._more=!0,this},"more"),reject:a(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
4
4
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:a(function(h){this.unput(this.match.slice(h))},"less"),pastInput:a(function(){var h=this.matched.substr(0,this.matched.length-this.match.length);return(h.length>20?"...":"")+h.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:a(function(){var h=this.match;return h.length<20&&(h+=this._input.substr(0,20-h.length)),(h.substr(0,20)+(h.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:a(function(){var h=this.pastInput(),c=new Array(h.length+1).join("-");return h+this.upcomingInput()+`
|
package/dist/cli/openlag.js
CHANGED
|
@@ -83,7 +83,6 @@ var LayerInferenceRules = {
|
|
|
83
83
|
CODE_ENTITY: "IMPLEMENTATION",
|
|
84
84
|
DATABASE_ENTITY: "IMPLEMENTATION",
|
|
85
85
|
TEST_CASE: "IMPLEMENTATION",
|
|
86
|
-
TEST: "IMPLEMENTATION",
|
|
87
86
|
CHANGE: "IMPLEMENTATION",
|
|
88
87
|
BUG: "IMPLEMENTATION",
|
|
89
88
|
RISK: "IMPLEMENTATION",
|
|
@@ -1091,8 +1090,8 @@ async function initProject(projectName, projectDesc, includeAllRelations) {
|
|
|
1091
1090
|
content: `relation: IMPLEMENTS
|
|
1092
1091
|
description: "Conecta implementaci\xF3n con necesidad funcional/t\xE9cnica."
|
|
1093
1092
|
category: TRACEABILITY
|
|
1094
|
-
allowedFrom: [CODE_ENTITY
|
|
1095
|
-
allowedTo: [REQUIREMENT, FEATURE,
|
|
1093
|
+
allowedFrom: [CODE_ENTITY]
|
|
1094
|
+
allowedTo: [REQUIREMENT, FEATURE, BUG, API]
|
|
1096
1095
|
multiplicity:
|
|
1097
1096
|
from: many
|
|
1098
1097
|
to: many
|
|
@@ -1104,8 +1103,8 @@ validation:
|
|
|
1104
1103
|
content: `relation: TESTS
|
|
1105
1104
|
description: "Conecta tests con comportamiento validado."
|
|
1106
1105
|
category: TRACEABILITY
|
|
1107
|
-
allowedFrom: [TEST_CASE
|
|
1108
|
-
allowedTo: [
|
|
1106
|
+
allowedFrom: [TEST_CASE]
|
|
1107
|
+
allowedTo: [CODE_ENTITY, REQUIREMENT, FEATURE, BUG, USE_CASE]
|
|
1109
1108
|
multiplicity:
|
|
1110
1109
|
from: many
|
|
1111
1110
|
to: many
|
|
@@ -1117,8 +1116,8 @@ validation:
|
|
|
1117
1116
|
content: `relation: REFINES
|
|
1118
1117
|
description: "Descompone artefactos en otros m\xE1s concretos."
|
|
1119
1118
|
category: TRACEABILITY
|
|
1120
|
-
allowedFrom: [FEATURE, REQUIREMENT
|
|
1121
|
-
allowedTo: [EPIC, FEATURE,
|
|
1119
|
+
allowedFrom: [EPIC, FEATURE, REQUIREMENT]
|
|
1120
|
+
allowedTo: [EPIC, FEATURE, REQUIREMENT]
|
|
1122
1121
|
multiplicity:
|
|
1123
1122
|
from: many
|
|
1124
1123
|
to: many
|
|
@@ -1130,8 +1129,8 @@ validation:
|
|
|
1130
1129
|
content: `relation: FIXES
|
|
1131
1130
|
description: "Conecta correcciones con bugs o incidentes."
|
|
1132
1131
|
category: TRACEABILITY
|
|
1133
|
-
allowedFrom: [
|
|
1134
|
-
allowedTo: [BUG, INCIDENT
|
|
1132
|
+
allowedFrom: [CODE_ENTITY, CHANGE, DECISION]
|
|
1133
|
+
allowedTo: [BUG, INCIDENT]
|
|
1135
1134
|
multiplicity:
|
|
1136
1135
|
from: many
|
|
1137
1136
|
to: many
|
|
@@ -1143,8 +1142,8 @@ validation:
|
|
|
1143
1142
|
content: `relation: DOCUMENTS
|
|
1144
1143
|
description: "Conecta documentaci\xF3n con el artefacto descrito."
|
|
1145
1144
|
category: SEMANTIC
|
|
1146
|
-
allowedFrom: [DOCUMENTATION
|
|
1147
|
-
allowedTo: [PROJECT, EPIC, FEATURE, REQUIREMENT, BUSINESS_RULE, USE_CASE, DESIGN, DECISION, CODE_ENTITY, TEST_CASE, CHANGE, BUG, RISK, GLOSSARY_TERM, COMPONENT, API, DATABASE_ENTITY,
|
|
1145
|
+
allowedFrom: [DOCUMENTATION]
|
|
1146
|
+
allowedTo: [PROJECT, EPIC, FEATURE, REQUIREMENT, BUSINESS_RULE, USE_CASE, DESIGN, DECISION, CODE_ENTITY, TEST_CASE, CHANGE, BUG, RISK, GLOSSARY_TERM, COMPONENT, API, DATABASE_ENTITY, DOCUMENTATION, INCIDENT, INFRASTRUCTURE, DEPLOYMENT, MONITORING, MAINTENANCE, SYSTEM_VERSION, VERSION, LIBRARY, ENVIRONMENT, CHECK, PROCESS, PIPELINE]
|
|
1148
1147
|
multiplicity:
|
|
1149
1148
|
from: many
|
|
1150
1149
|
to: many
|
|
@@ -1156,8 +1155,8 @@ validation:
|
|
|
1156
1155
|
content: `relation: JUSTIFIES
|
|
1157
1156
|
description: "Conecta decisiones con aquello que justifican."
|
|
1158
1157
|
category: SEMANTIC
|
|
1159
|
-
allowedFrom: [DECISION
|
|
1160
|
-
allowedTo: [DESIGN, REQUIREMENT, FEATURE,
|
|
1158
|
+
allowedFrom: [DECISION]
|
|
1159
|
+
allowedTo: [DESIGN, REQUIREMENT, FEATURE, CODE_ENTITY, COMPONENT]
|
|
1161
1160
|
multiplicity:
|
|
1162
1161
|
from: many
|
|
1163
1162
|
to: many
|
|
@@ -1255,7 +1254,7 @@ validation:
|
|
|
1255
1254
|
description: "Aver\xEDas o rupturas confirmadas."
|
|
1256
1255
|
category: OPERATIONAL
|
|
1257
1256
|
allowedFrom: [CHANGE, CODE_ENTITY, COMPONENT, SYSTEM_VERSION]
|
|
1258
|
-
allowedTo: [TEST_CASE,
|
|
1257
|
+
allowedTo: [TEST_CASE, API, COMPONENT, REQUIREMENT, FEATURE]
|
|
1259
1258
|
multiplicity:
|
|
1260
1259
|
from: many
|
|
1261
1260
|
to: many
|
|
@@ -1352,8 +1351,8 @@ description: |
|
|
|
1352
1351
|
type: RELATES_TO
|
|
1353
1352
|
rationale: "No encaja con USES o DEPENDS_ON debido al contexto X."
|
|
1354
1353
|
category: SEMANTIC
|
|
1355
|
-
allowedFrom: [PROJECT, EPIC, FEATURE, REQUIREMENT, BUSINESS_RULE, USE_CASE, DESIGN, DECISION, CODE_ENTITY, TEST_CASE, CHANGE, BUG, RISK, GLOSSARY_TERM, COMPONENT, API, DATABASE_ENTITY,
|
|
1356
|
-
allowedTo: [PROJECT, EPIC, FEATURE, REQUIREMENT, BUSINESS_RULE, USE_CASE, DESIGN, DECISION, CODE_ENTITY, TEST_CASE, CHANGE, BUG, RISK, GLOSSARY_TERM, COMPONENT, API, DATABASE_ENTITY,
|
|
1354
|
+
allowedFrom: [PROJECT, EPIC, FEATURE, REQUIREMENT, BUSINESS_RULE, USE_CASE, DESIGN, DECISION, CODE_ENTITY, TEST_CASE, CHANGE, BUG, RISK, GLOSSARY_TERM, COMPONENT, API, DATABASE_ENTITY, DOCUMENTATION, INCIDENT, INFRASTRUCTURE, DEPLOYMENT, MONITORING, MAINTENANCE, SYSTEM_VERSION, VERSION, LIBRARY, ENVIRONMENT, CHECK, PROCESS, PIPELINE]
|
|
1355
|
+
allowedTo: [PROJECT, EPIC, FEATURE, REQUIREMENT, BUSINESS_RULE, USE_CASE, DESIGN, DECISION, CODE_ENTITY, TEST_CASE, CHANGE, BUG, RISK, GLOSSARY_TERM, COMPONENT, API, DATABASE_ENTITY, DOCUMENTATION, INCIDENT, INFRASTRUCTURE, DEPLOYMENT, MONITORING, MAINTENANCE, SYSTEM_VERSION, VERSION, LIBRARY, ENVIRONMENT, CHECK, PROCESS, PIPELINE]
|
|
1357
1356
|
multiplicity:
|
|
1358
1357
|
from: many
|
|
1359
1358
|
to: many
|
|
@@ -1590,7 +1589,7 @@ function runLintRules(data, profile) {
|
|
|
1590
1589
|
addIssue("codeWithoutRequirement", `${artifact.id} has no requirement associated`, artifact.file, artifact.id, artifact.status);
|
|
1591
1590
|
}
|
|
1592
1591
|
}
|
|
1593
|
-
if (artifact.type === "
|
|
1592
|
+
if (artifact.type === "TEST_CASE") {
|
|
1594
1593
|
const hasReq = reqsByTest.has(artifact.id);
|
|
1595
1594
|
if (!hasReq) {
|
|
1596
1595
|
addIssue("orphanArtifact", `${artifact.id} is a test without associated requirement`, artifact.file, artifact.id, artifact.status);
|