termbeam 1.24.5 → 1.24.7

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.
Files changed (81) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/package.json +5 -2
  3. package/public/assets/{arc-D5ZiVhrz.js → arc-CN_mAzCx.js} +1 -1
  4. package/public/assets/architectureDiagram-3BPJPVTR-DG5MAGnf.js +36 -0
  5. package/public/assets/blockDiagram-GPEHLZMM-C-jOi0wQ.js +132 -0
  6. package/public/assets/{c4Diagram-AHTNJAMY-BC5gTuwO.js → c4Diagram-AAUBKEIU-Lf-jQplF.js} +1 -1
  7. package/public/assets/channel-BCPoRD6y.js +1 -0
  8. package/public/assets/{chunk-EDXVE4YY-vfB8pnab.js → chunk-2J33WTMH-C9JymBSL.js} +1 -1
  9. package/public/assets/{chunk-4BX2VUAB-B4wsKDBx.js → chunk-4BX2VUAB-Csp2FrXm.js} +1 -1
  10. package/public/assets/{chunk-55IACEB6-C9LG30tc.js → chunk-55IACEB6-yz1xCvvM.js} +1 -1
  11. package/public/assets/chunk-727SXJPM-B3MVWfnV.js +206 -0
  12. package/public/assets/chunk-AQP2D5EJ-B-TNnfnz.js +231 -0
  13. package/public/assets/{chunk-FMBD7UC4-DcouYEOJ.js → chunk-FMBD7UC4-Dtw2KMej.js} +1 -1
  14. package/public/assets/{chunk-YZCP3GAM-B-QezDiB.js → chunk-ND2GUHAM-CHQn8fqy.js} +1 -1
  15. package/public/assets/{chunk-QZHKN3VN-C6zd-VwY.js → chunk-QZHKN3VN-DBFY1_WB.js} +1 -1
  16. package/public/assets/classDiagram-4FO5ZUOK-Cu1smEpb.js +1 -0
  17. package/public/assets/classDiagram-v2-Q7XG4LA2-Cu1smEpb.js +1 -0
  18. package/public/assets/{cose-bilkent-S5V4N54A-Dbpfm88V.js → cose-bilkent-S5V4N54A-CCEZDlDl.js} +1 -1
  19. package/public/assets/dagre-BM42HDAG-BRbrP_yo.js +4 -0
  20. package/public/assets/diagram-2AECGRRQ-CbD1yOYx.js +43 -0
  21. package/public/assets/diagram-5GNKFQAL-BP3jOKKR.js +10 -0
  22. package/public/assets/diagram-KO2AKTUF-BSDZWca7.js +3 -0
  23. package/public/assets/diagram-LMA3HP47-Cc6VwNQA.js +24 -0
  24. package/public/assets/diagram-OG6HWLK6-DKU0ICzr.js +24 -0
  25. package/public/assets/{erDiagram-SMLLAGMA-D__-ECU1.js → erDiagram-TEJ5UH35-BnoW0mTO.js} +1 -1
  26. package/public/assets/{flowDiagram-DWJPFMVM-CQ72uhcM.js → flowDiagram-I6XJVG4X-deD4XLcv.js} +1 -1
  27. package/public/assets/{ganttDiagram-T4ZO3ILL-PWZA9j0q.js → ganttDiagram-6RSMTGT7-BgYvdjYD.js} +4 -4
  28. package/public/assets/gitGraphDiagram-PVQCEYII-BtPMKzJD.js +106 -0
  29. package/public/assets/graph-CAnANduQ.js +1 -0
  30. package/public/assets/index-Cjlboool.css +32 -0
  31. package/public/assets/index-DYmxHUor.js +462 -0
  32. package/public/assets/infoDiagram-5YYISTIA-BNFXZeHF.js +2 -0
  33. package/public/assets/{ishikawaDiagram-UXIWVN3A-Btyh75c3.js → ishikawaDiagram-YF4QCWOH-DuehQ5YB.js} +1 -1
  34. package/public/assets/{journeyDiagram-VCZTEJTY-DNl0ruw0.js → journeyDiagram-JHISSGLW-Blto5i-o.js} +1 -1
  35. package/public/assets/{kanban-definition-6JOO6SKY-BvHAzQQ8.js → kanban-definition-UN3LZRKU-S2WBlPRG.js} +1 -1
  36. package/public/assets/layout-DGIYPm2g.js +1 -0
  37. package/public/assets/{linear-D4lrDv6t.js → linear-CMeCahwl.js} +1 -1
  38. package/public/assets/{mindmap-definition-QFDTVHPH-CBzwEYj6.js → mindmap-definition-RKZ34NQL-GBziQpLb.js} +5 -5
  39. package/public/assets/pieDiagram-4H26LBE5-Dlh-y7ih.js +30 -0
  40. package/public/assets/quadrantDiagram-W4KKPZXB-tr5QhZAJ.js +7 -0
  41. package/public/assets/{requirementDiagram-MS252O5E-DtsbWS5A.js → requirementDiagram-4Y6WPE33-_qV3HlS7.js} +1 -1
  42. package/public/assets/sankeyDiagram-5OEKKPKP-C7-d2ULi.js +40 -0
  43. package/public/assets/sequenceDiagram-3UESZ5HK-CYGsjwvO.js +162 -0
  44. package/public/assets/stateDiagram-AJRCARHV-D5wVSY__.js +1 -0
  45. package/public/assets/stateDiagram-v2-BHNVJYJU-DcLQpqf2.js +1 -0
  46. package/public/assets/{timeline-definition-GMOUNBTQ-D28Vi07o.js → timeline-definition-PNZ67QCA-B7tB0CoS.js} +1 -1
  47. package/public/assets/{vennDiagram-DHZGUBPP-BsEcPxi9.js → vennDiagram-CIIHVFJN-CX_n409t.js} +1 -1
  48. package/public/assets/wardley-L42UT6IY-eoSJq8mJ.js +173 -0
  49. package/public/assets/wardleyDiagram-YWT4CUSO-lQio0_RH.js +78 -0
  50. package/public/assets/{xychartDiagram-5P7HB3ND-Bu3BQZQs.js → xychartDiagram-2RQKCTM6-Bv9Hklj4.js} +1 -1
  51. package/public/index.html +2 -2
  52. package/public/sw.js +1 -1
  53. package/public/assets/_basePickBy-C9N_31fk.js +0 -1
  54. package/public/assets/_baseUniq-Dq5-YQLQ.js +0 -1
  55. package/public/assets/architectureDiagram-Q4EWVU46-D5nqN6LZ.js +0 -36
  56. package/public/assets/blockDiagram-DXYQGD6D-U7zasXqH.js +0 -132
  57. package/public/assets/channel-BU87Uwh0.js +0 -1
  58. package/public/assets/chunk-4TB4RGXK-6F9XCvsC.js +0 -206
  59. package/public/assets/chunk-OYMX7WX6-BDBeCJcs.js +0 -231
  60. package/public/assets/classDiagram-6PBFFD2Q-C4vEN9TQ.js +0 -1
  61. package/public/assets/classDiagram-v2-HSJHXN6E-C4vEN9TQ.js +0 -1
  62. package/public/assets/clone-BAxbmeq1.js +0 -1
  63. package/public/assets/dagre-KV5264BT-xOvLbi68.js +0 -4
  64. package/public/assets/diagram-5BDNPKRD-CSmuhxFO.js +0 -10
  65. package/public/assets/diagram-G4DWMVQ6-WMPMf73Q.js +0 -24
  66. package/public/assets/diagram-MMDJMWI5-q-yLBpzy.js +0 -43
  67. package/public/assets/diagram-TYMM5635-4-Tjo8b1.js +0 -24
  68. package/public/assets/gitGraphDiagram-UUTBAWPF-DNZZdIti.js +0 -106
  69. package/public/assets/graph-B8sUo8-T.js +0 -1
  70. package/public/assets/index-BwBOl41F.js +0 -463
  71. package/public/assets/index-DH3obPjl.css +0 -32
  72. package/public/assets/infoDiagram-42DDH7IO-C61AjPug.js +0 -2
  73. package/public/assets/layout-C_M4cELJ.js +0 -1
  74. package/public/assets/pieDiagram-DEJITSTG-C3-CuGHH.js +0 -30
  75. package/public/assets/quadrantDiagram-34T5L4WZ-BAhAwB39.js +0 -7
  76. package/public/assets/sankeyDiagram-XADWPNL6-BlmqrJCN.js +0 -10
  77. package/public/assets/sequenceDiagram-FGHM5R23-BFJJipPG.js +0 -157
  78. package/public/assets/stateDiagram-FHFEXIEX-CnBB4jGn.js +0 -1
  79. package/public/assets/stateDiagram-v2-QKLJ7IA2-CnLY8yhD.js +0 -1
  80. package/public/assets/wardley-RL74JXVD-Jx8wesmg.js +0 -162
  81. package/public/assets/wardleyDiagram-NUSXRM2D-X1-VJpHg.js +0 -20
@@ -1,106 +0,0 @@
1
- import{p as he}from"./chunk-4BX2VUAB-B4wsKDBx.js";import{I as $e}from"./chunk-QZHKN3VN-C6zd-VwY.js";import{q as fe,p as ge,s as ue,g as ye,a as xe,b as me,_ as $,D as Q,l as k,d as pe,c as z,u as be,E as we,z as ke,k as L,F as ve,G as Ee,H as Ce}from"./index-BwBOl41F.js";import{p as Be}from"./wardley-RL74JXVD-Jx8wesmg.js";import"./_baseUniq-Dq5-YQLQ.js";import"./_basePickBy-C9N_31fk.js";import"./clone-BAxbmeq1.js";var p={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Te=Ee.gitGraph,D=$(()=>ve({...Te,...Q().gitGraph}),"getConfig"),i=new $e(()=>{const e=D(),r=e.mainBranchName,t=e.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:t}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function K(){return Ce({length:7})}$(K,"getID");function ae(e,r){const t=Object.create(null);return e.reduce((o,s)=>{const d=r(s);return t[d]||(t[d]=!0,o.push(s)),o},[])}$(ae,"uniqBy");var Le=$(function(e){i.records.direction=e},"setDirection"),Me=$(function(e){k.debug("options str",e),e=e==null?void 0:e.trim(),e=e||"{}";try{i.records.options=JSON.parse(e)}catch(r){k.error("error while parsing gitGraph options",r.message)}},"setOptions"),Re=$(function(){return i.records.options},"getOptions"),Ie=$(function(e){let r=e.msg,t=e.id;const o=e.type;let s=e.tags;k.info("commit",r,t,o,s),k.debug("Entering commit:",r,t,o,s);const d=D();t=L.sanitizeText(t,d),r=L.sanitizeText(r,d),s=s==null?void 0:s.map(a=>L.sanitizeText(a,d));const n={id:t||i.records.seq+"-"+K(),message:r,seq:i.records.seq++,type:o??p.NORMAL,tags:s??[],parents:i.records.head==null?[]:[i.records.head.id],branch:i.records.currBranch};i.records.head=n,k.info("main branch",d.mainBranchName),i.records.commits.has(n.id)&&k.warn(`Commit ID ${n.id} already exists`),i.records.commits.set(n.id,n),i.records.branches.set(i.records.currBranch,n.id),k.debug("in pushCommit "+n.id)},"commit"),Oe=$(function(e){let r=e.name;const t=e.order;if(r=L.sanitizeText(r,D()),i.records.branches.has(r))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`);i.records.branches.set(r,i.records.head!=null?i.records.head.id:null),i.records.branchConfig.set(r,{name:r,order:t}),ne(r),k.debug("in createBranch")},"branch"),_e=$(e=>{let r=e.branch,t=e.id;const o=e.type,s=e.tags,d=D();r=L.sanitizeText(r,d),t&&(t=L.sanitizeText(t,d));const n=i.records.branches.get(i.records.currBranch),a=i.records.branches.get(r),l=n?i.records.commits.get(n):void 0,h=a?i.records.commits.get(a):void 0;if(l&&h&&l.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(i.records.currBranch===r){const c=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(l===void 0||!l){const c=new Error(`Incorrect usage of "merge". Current branch (${i.records.currBranch})has no commits`);throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},c}if(!i.records.branches.has(r)){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},c}if(h===void 0||!h){const c=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},c}if(l===h){const c=new Error('Incorrect usage of "merge". Both branches have same head');throw c.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},c}if(t&&i.records.commits.has(t)){const c=new Error('Incorrect usage of "merge". Commit with id:'+t+" already exists, use different custom id");throw c.hash={text:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,token:`merge ${r} ${t} ${o} ${s==null?void 0:s.join(" ")}`,expected:[`merge ${r} ${t}_UNIQUE ${o} ${s==null?void 0:s.join(" ")}`]},c}const g=a||"",f={id:t||`${i.records.seq}-${K()}`,message:`merged branch ${r} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,g],branch:i.records.currBranch,type:p.MERGE,customType:o,customId:!!t,tags:s??[]};i.records.head=f,i.records.commits.set(f.id,f),i.records.branches.set(i.records.currBranch,f.id),k.debug(i.records.branches),k.debug("in mergeBranch")},"merge"),Ge=$(function(e){let r=e.id,t=e.targetId,o=e.tags,s=e.parent;k.debug("Entering cherryPick:",r,t,o);const d=D();if(r=L.sanitizeText(r,d),t=L.sanitizeText(t,d),o=o==null?void 0:o.map(l=>L.sanitizeText(l,d)),s=L.sanitizeText(s,d),!r||!i.records.commits.has(r)){const l=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw l.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},l}const n=i.records.commits.get(r);if(n===void 0||!n)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(s&&!(Array.isArray(n.parents)&&n.parents.includes(s)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const a=n.branch;if(n.type===p.MERGE&&!s)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!t||!i.records.commits.has(t)){if(a===i.records.currBranch){const f=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const l=i.records.branches.get(i.records.currBranch);if(l===void 0||!l){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const h=i.records.commits.get(l);if(h===void 0||!h){const f=new Error(`Incorrect usage of "cherry-pick". Current branch (${i.records.currBranch})has no commits`);throw f.hash={text:`cherryPick ${r} ${t}`,token:`cherryPick ${r} ${t}`,expected:["cherry-pick abc"]},f}const g={id:i.records.seq+"-"+K(),message:`cherry-picked ${n==null?void 0:n.message} into ${i.records.currBranch}`,seq:i.records.seq++,parents:i.records.head==null?[]:[i.records.head.id,n.id],branch:i.records.currBranch,type:p.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${n.id}${n.type===p.MERGE?`|parent:${s}`:""}`]};i.records.head=g,i.records.commits.set(g.id,g),i.records.branches.set(i.records.currBranch,g.id),k.debug(i.records.branches),k.debug("in cherryPick")}},"cherryPick"),ne=$(function(e){if(e=L.sanitizeText(e,D()),i.records.branches.has(e)){i.records.currBranch=e;const r=i.records.branches.get(i.records.currBranch);r===void 0||!r?i.records.head=null:i.records.head=i.records.commits.get(r)??null}else{const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw r.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},r}},"checkout");function X(e,r,t){const o=e.indexOf(r);o===-1?e.push(t):e.splice(o,1,t)}$(X,"upsert");function Z(e){const r=e.reduce((s,d)=>s.seq>d.seq?s:d,e[0]);let t="";e.forEach(function(s){s===r?t+=" *":t+=" |"});const o=[t,r.id,r.seq];for(const s in i.records.branches)i.records.branches.get(s)===r.id&&o.push(s);if(k.debug(o.join(" ")),r.parents&&r.parents.length==2&&r.parents[0]&&r.parents[1]){const s=i.records.commits.get(r.parents[0]);X(e,r,s),r.parents[1]&&e.push(i.records.commits.get(r.parents[1]))}else{if(r.parents.length==0)return;if(r.parents[0]){const s=i.records.commits.get(r.parents[0]);X(e,r,s)}}e=ae(e,s=>s.id),Z(e)}$(Z,"prettyPrintCommitHistory");var He=$(function(){k.debug(i.records.commits);const e=se()[0];Z([e])},"prettyPrint"),Se=$(function(){i.reset(),ke()},"clear"),Ae=$(function(){return[...i.records.branchConfig.values()].map((r,t)=>r.order!==null&&r.order!==void 0?r:{...r,order:parseFloat(`0.${t}`)}).sort((r,t)=>(r.order??0)-(t.order??0)).map(({name:r})=>({name:r}))},"getBranchesAsObjArray"),De=$(function(){return i.records.branches},"getBranches"),qe=$(function(){return i.records.commits},"getCommits"),se=$(function(){const e=[...i.records.commits.values()];return e.forEach(function(r){k.debug(r.id)}),e.sort((r,t)=>r.seq-t.seq),e},"getCommitsArray"),Pe=$(function(){return i.records.currBranch},"getCurrentBranch"),We=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Re,commit:Ie,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:qe,getCommitsArray:se,getCurrentBranch:Pe,getDirection:We,getHead:Ne,setAccTitle:me,getAccTitle:xe,getAccDescription:ye,setAccDescription:ue,setDiagramTitle:ge,getDiagramTitle:fe},Fe=$((e,r)=>{he(e,r),e.dir&&r.setDirection(e.dir);for(const t of e.statements)ze(t,r)},"populate"),ze=$((e,r)=>{const o={Commit:$(s=>r.commit(Ye(s)),"Commit"),Branch:$(s=>r.branch(je(s)),"Branch"),Merge:$(s=>r.merge(Ue(s)),"Merge"),Checkout:$(s=>r.checkout(Ke(s)),"Checkout"),CherryPicking:$(s=>r.cherryPick(Ve(s)),"CherryPicking")}[e.$type];o?o(e):k.error(`Unknown statement type: ${e.$type}`)},"parseStatement"),Ye=$(e=>({id:e.id,msg:e.message??"",type:e.type!==void 0?p[e.type]:p.NORMAL,tags:e.tags??void 0}),"parseCommit"),je=$(e=>({name:e.name,order:e.order??0}),"parseBranch"),Ue=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ke=$(e=>e.branch,"parseCheckout"),Ve=$(e=>{var t;return{id:e.id,targetId:"",tags:((t=e.tags)==null?void 0:t.length)===0?void 0:e.tags,parent:e.parent}},"parseCherryPicking"),Xe={parse:$(async e=>{const r=await Be("gitGraph",e);k.debug(r),Fe(r,oe)},"parse")},G=10,H=40,M=4,I=2,S=8,V=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),J=12,ee=new Set(["redux-color","redux-dark-color"]),Je=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),A=$((e,r,t=!1)=>t&&e>0?(e-1)%(r-1)+1:e%r,"calcColorIndex"),B=new Map,T=new Map,j=30,N=new Map,U=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,U=[],y="LR"},"clear"),ce=$(e=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof e=="string"?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(o=>{const s=document.createElementNS("http://www.w3.org/2000/svg","tspan");s.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),s.setAttribute("dy","1em"),s.setAttribute("x","0"),s.setAttribute("class","row"),s.textContent=o.trim(),r.appendChild(s)}),r},"drawText"),ie=$(e=>{let r,t,o;return y==="BT"?(t=$((s,d)=>s<=d,"comparisonFunc"),o=1/0):(t=$((s,d)=>s>=d,"comparisonFunc"),o=0),e.forEach(s=>{var n,a;const d=y==="TB"||y=="BT"?(n=T.get(s))==null?void 0:n.y:(a=T.get(s))==null?void 0:a.x;d!==void 0&&t(d,o)&&(r=s,o=d)}),r},"findClosestParent"),Ze=$(e=>{let r="",t=1/0;return e.forEach(o=>{const s=T.get(o).y;s<=t&&(r=o,t=s)}),r||void 0},"findClosestParentBT"),er=$((e,r,t)=>{let o=t,s=t;const d=[];e.forEach(n=>{const a=r.get(n);if(!a)throw new Error(`Commit not found for key ${n}`);a.parents.length?(o=tr(a),s=Math.max(o,s)):d.push(a),ar(a,o)}),o=s,d.forEach(n=>{nr(n,o,t)}),e.forEach(n=>{const a=r.get(n);if(a!=null&&a.parents.length){const l=Ze(a.parents);o=T.get(l).y-H,o<=s&&(s=o);const h=B.get(a.branch).pos,g=o-G;T.set(a.id,{x:h,y:g})}})},"setParallelBTPos"),rr=$(e=>{var o;const r=ie(e.parents.filter(s=>s!==null));if(!r)throw new Error(`Closest parent not found for commit ${e.id}`);const t=(o=T.get(r))==null?void 0:o.y;if(t===void 0)throw new Error(`Closest parent position not found for commit ${e.id}`);return t},"findClosestParentPos"),tr=$(e=>rr(e)+H,"calculateCommitPosition"),ar=$((e,r)=>{const t=B.get(e.branch);if(!t)throw new Error(`Branch not found for commit ${e.id}`);const o=t.pos,s=r+G;return T.set(e.id,{x:o,y:s}),{x:o,y:s}},"setCommitPosition"),nr=$((e,r,t)=>{const o=B.get(e.branch);if(!o)throw new Error(`Branch not found for commit ${e.id}`);const s=r+t,d=o.pos;T.set(e.id,{x:d,y:s})},"setRootPosition"),sr=$((e,r,t,o,s,d)=>{const{theme:n}=z(),a=V.has(n??""),l=ee.has(n??""),h=Je.has(n??"");if(d===p.HIGHLIGHT)e.append("rect").attr("x",t.x-10+(a?3:0)).attr("y",t.y-10+(a?3:0)).attr("width",a?14:20).attr("height",a?14:20).attr("class",`commit ${r.id} commit-highlight${A(s,S,l)} ${o}-outer`),e.append("rect").attr("x",t.x-6+(a?2:0)).attr("y",t.y-6+(a?2:0)).attr("width",a?8:12).attr("height",a?8:12).attr("class",`commit ${r.id} commit${A(s,S,l)} ${o}-inner`);else if(d===p.CHERRY_PICK)e.append("circle").attr("cx",t.x).attr("cy",t.y).attr("r",a?7:10).attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x-3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("circle").attr("cx",t.x+3).attr("cy",t.y+2).attr("r",a?2.5:2.75).attr("fill",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x+3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),e.append("line").attr("x1",t.x-3).attr("y1",t.y+1).attr("x2",t.x).attr("y2",t.y-5).attr("stroke",h?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const g=e.append("circle");if(g.attr("cx",t.x),g.attr("cy",t.y),g.attr("r",a?7:10),g.attr("class",`commit ${r.id} commit${A(s,S,l)}`),d===p.MERGE){const f=e.append("circle");f.attr("cx",t.x),f.attr("cy",t.y),f.attr("r",a?5:6),f.attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}if(d===p.REVERSE){const f=e.append("path"),c=a?4:5;f.attr("d",`M ${t.x-c},${t.y-c}L${t.x+c},${t.y+c}M${t.x-c},${t.y+c}L${t.x+c},${t.y-c}`).attr("class",`commit ${o} ${r.id} commit${A(s,S,l)}`)}}},"drawCommitBullet"),or=$((e,r,t,o,s)=>{var d;if(r.type!==p.CHERRY_PICK&&(r.customId&&r.type===p.MERGE||r.type!==p.MERGE)&&s.showCommitLabel){const n=e.append("g"),a=n.insert("rect").attr("class","commit-label-bkg"),l=n.append("text").attr("x",o).attr("y",t.y+25).attr("class","commit-label").text(r.id),h=(d=l.node())==null?void 0:d.getBBox();if(h&&(a.attr("x",t.posWithOffset-h.width/2-I).attr("y",t.y+13.5).attr("width",h.width+2*I).attr("height",h.height+2*I),y==="TB"||y==="BT"?(a.attr("x",t.x-(h.width+4*M+5)).attr("y",t.y-12),l.attr("x",t.x-(h.width+4*M)).attr("y",t.y+h.height-12)):l.attr("x",t.posWithOffset-h.width/2),s.rotateCommitLabel))if(y==="TB"||y==="BT")l.attr("transform","rotate(-45, "+t.x+", "+t.y+")"),a.attr("transform","rotate(-45, "+t.x+", "+t.y+")");else{const g=-7.5-(h.width+10)/25*9.5,f=10+h.width/25*8.5;n.attr("transform","translate("+g+", "+f+") rotate(-45, "+o+", "+t.y+")")}}},"drawCommitLabel"),cr=$((e,r,t,o)=>{var s;if(r.tags.length>0){let d=0,n=0,a=0;const l=[];for(const h of r.tags.reverse()){const g=e.insert("polygon"),f=e.append("circle"),c=e.append("text").attr("y",t.y-16-d).attr("class","tag-label").text(h),x=(s=c.node())==null?void 0:s.getBBox();if(!x)throw new Error("Tag bbox not found");n=Math.max(n,x.width),a=Math.max(a,x.height),c.attr("x",t.posWithOffset-x.width/2),l.push({tag:c,hole:f,rect:g,yOffset:d}),d+=20}for(const{tag:h,hole:g,rect:f,yOffset:c}of l){const x=a/2,u=t.y-19.2-c;if(f.attr("class","tag-label-bkg").attr("points",`
2
- ${o-n/2-M/2},${u+I}
3
- ${o-n/2-M/2},${u-I}
4
- ${t.posWithOffset-n/2-M},${u-x-I}
5
- ${t.posWithOffset+n/2+M},${u-x-I}
6
- ${t.posWithOffset+n/2+M},${u+x+I}
7
- ${t.posWithOffset-n/2-M},${u+x+I}`),g.attr("cy",u).attr("cx",o-n/2+M/2).attr("r",1.5).attr("class","tag-hole"),y==="TB"||y==="BT"){const m=o+c;f.attr("class","tag-label-bkg").attr("points",`
8
- ${t.x},${m+2}
9
- ${t.x},${m-2}
10
- ${t.x+G},${m-x-2}
11
- ${t.x+G+n+4},${m-x-2}
12
- ${t.x+G+n+4},${m+x+2}
13
- ${t.x+G},${m+x+2}`).attr("transform","translate(12,12) rotate(45, "+t.x+","+o+")"),g.attr("cx",t.x+M/2).attr("cy",m).attr("transform","translate(12,12) rotate(45, "+t.x+","+o+")"),h.attr("x",t.x+5).attr("y",m+3).attr("transform","translate(14,14) rotate(45, "+t.x+","+o+")")}}}},"drawCommitTags"),ir=$(e=>{switch(e.customType??e.type){case p.NORMAL:return"commit-normal";case p.REVERSE:return"commit-reverse";case p.HIGHLIGHT:return"commit-highlight";case p.MERGE:return"commit-merge";case p.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),dr=$((e,r,t,o)=>{const s={x:0,y:0};if(e.parents.length>0){const d=ie(e.parents);if(d){const n=o.get(d)??s;return r==="TB"?n.y+H:r==="BT"?(o.get(e.id)??s).y-H:n.x+H}}else return r==="TB"?j:r==="BT"?(o.get(e.id)??s).y-H:0;return 0},"calculatePosition"),lr=$((e,r,t)=>{var l,h;const o=y==="BT"&&t?r:r+G,s=(l=B.get(e.branch))==null?void 0:l.pos,d=y==="TB"||y==="BT"?(h=B.get(e.branch))==null?void 0:h.pos:o;if(d===void 0||s===void 0)throw new Error(`Position were undefined for commit ${e.id}`);const n=V.has(z().theme??""),a=y==="TB"||y==="BT"?o:s+(n?J/2+1:-2);return{x:d,y:a,posWithOffset:o}},"getCommitPosition"),te=$((e,r,t,o)=>{const s=e.append("g").attr("class","commit-bullets"),d=e.append("g").attr("class","commit-labels");let n=y==="TB"||y==="BT"?j:0;const a=[...r.keys()],l=o.parallelCommits??!1,h=$((f,c)=>{var m,E;const x=(m=r.get(f))==null?void 0:m.seq,u=(E=r.get(c))==null?void 0:E.seq;return x!==void 0&&u!==void 0?x-u:0},"sortKeys");let g=a.sort(h);y==="BT"&&(l&&er(g,r,n),g=g.reverse()),g.forEach(f=>{var u;const c=r.get(f);if(!c)throw new Error(`Commit not found for key ${f}`);l&&(n=dr(c,y,n,T));const x=lr(c,n,l);if(t){const m=ir(c),E=c.customType??c.type,b=((u=B.get(c.branch))==null?void 0:u.index)??0;sr(s,c,x,m,b,E),or(d,c,x,n,o),cr(d,c,x,n)}y==="TB"||y==="BT"?T.set(c.id,{x:x.x,y:x.posWithOffset}):T.set(c.id,{x:x.posWithOffset,y:x.y}),n=y==="BT"&&l?n+H:n+H+G,n>O&&(O=n)})},"drawCommits"),hr=$((e,r,t,o,s)=>{const n=(y==="TB"||y==="BT"?t.x<o.x:t.y<o.y)?r.branch:e.branch,a=$(h=>h.branch===n,"isOnBranchToGetCurve"),l=$(h=>h.seq>e.seq&&h.seq<r.seq,"isBetweenCommits");return[...s.values()].some(h=>l(h)&&a(h))},"shouldRerouteArrow"),F=$((e,r,t=0)=>{const o=e+Math.abs(e-r)/2;if(t>5)return o;if(U.every(n=>Math.abs(n-o)>=10))return U.push(o),o;const d=Math.abs(e-r);return F(e,r-d/5,t+1)},"findLane"),$r=$((e,r,t,o)=>{var m,E,b,q,_;const{theme:s}=z(),d=ee.has(s??""),n=T.get(r.id),a=T.get(t.id);if(n===void 0||a===void 0)throw new Error(`Commit positions not found for commits ${r.id} and ${t.id}`);const l=hr(r,t,n,a,o);let h="",g="",f=0,c=0,x=(m=B.get(t.branch))==null?void 0:m.index;t.type===p.MERGE&&r.id!==t.parents[0]&&(x=(E=B.get(r.branch))==null?void 0:E.index);let u;if(l){h="A 10 10, 0, 0, 0,",g="A 10 10, 0, 0, 1,",f=10,c=10;const v=n.y<a.y?F(n.y,a.y):F(a.y,n.y),w=n.x<a.x?F(n.x,a.x):F(a.x,n.x);y==="TB"?n.x<a.x?u=`M ${n.x} ${n.y} L ${w-f} ${n.y} ${g} ${w} ${n.y+c} L ${w} ${a.y-f} ${h} ${w+c} ${a.y} L ${a.x} ${a.y}`:(x=(b=B.get(r.branch))==null?void 0:b.index,u=`M ${n.x} ${n.y} L ${w+f} ${n.y} ${h} ${w} ${n.y+c} L ${w} ${a.y-f} ${g} ${w-c} ${a.y} L ${a.x} ${a.y}`):y==="BT"?n.x<a.x?u=`M ${n.x} ${n.y} L ${w-f} ${n.y} ${h} ${w} ${n.y-c} L ${w} ${a.y+f} ${g} ${w+c} ${a.y} L ${a.x} ${a.y}`:(x=(q=B.get(r.branch))==null?void 0:q.index,u=`M ${n.x} ${n.y} L ${w+f} ${n.y} ${g} ${w} ${n.y-c} L ${w} ${a.y+f} ${h} ${w-c} ${a.y} L ${a.x} ${a.y}`):n.y<a.y?u=`M ${n.x} ${n.y} L ${n.x} ${v-f} ${h} ${n.x+c} ${v} L ${a.x-f} ${v} ${g} ${a.x} ${v+c} L ${a.x} ${a.y}`:(x=(_=B.get(r.branch))==null?void 0:_.index,u=`M ${n.x} ${n.y} L ${n.x} ${v+f} ${g} ${n.x+c} ${v} L ${a.x-f} ${v} ${h} ${a.x} ${v-c} L ${a.x} ${a.y}`)}else h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,y==="TB"?(n.x<a.x&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${h} ${n.x+c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${g} ${a.x} ${n.y+c} L ${a.x} ${a.y}`),n.x>a.x&&(h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${g} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+f} ${n.y} ${h} ${a.x} ${n.y+c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):y==="BT"?(n.x<a.x&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${g} ${n.x+c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${h} ${a.x} ${n.y-c} L ${a.x} ${a.y}`),n.x>a.x&&(h="A 20 20, 0, 0, 0,",g="A 20 20, 0, 0, 1,",f=20,c=20,t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${h} ${n.x-c} ${a.y} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${a.x+f} ${n.y} ${g} ${a.x} ${n.y-c} L ${a.x} ${a.y}`),n.x===a.x&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`)):(n.y<a.y&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${g} ${a.x} ${n.y+c} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${n.x} ${a.y-f} ${h} ${n.x+c} ${a.y} L ${a.x} ${a.y}`),n.y>a.y&&(t.type===p.MERGE&&r.id!==t.parents[0]?u=`M ${n.x} ${n.y} L ${a.x-f} ${n.y} ${h} ${a.x} ${n.y-c} L ${a.x} ${a.y}`:u=`M ${n.x} ${n.y} L ${n.x} ${a.y+f} ${g} ${n.x+c} ${a.y} L ${a.x} ${a.y}`),n.y===a.y&&(u=`M ${n.x} ${n.y} L ${a.x} ${a.y}`));if(u===void 0)throw new Error("Line definition not found");e.append("path").attr("d",u).attr("class","arrow arrow"+A(x,S,d))},"drawArrow"),fr=$((e,r)=>{const t=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(o=>{const s=r.get(o);s.parents&&s.parents.length>0&&s.parents.forEach(d=>{$r(t,r.get(d),s,r)})})},"drawArrows"),gr=$((e,r,t,o)=>{const{look:s,theme:d,themeVariables:n}=z(),{dropShadow:a,THEME_COLOR_LIMIT:l}=n,h=V.has(d??""),g=ee.has(d??""),f=e.append("g");r.forEach((c,x)=>{var re;const u=A(x,h?l:S,g),m=(re=B.get(c.name))==null?void 0:re.pos;if(m===void 0)throw new Error(`Position not found for branch ${c.name}`);const E=y==="TB"||y==="BT"?m:h?m+J/2+1:m-2,b=f.append("line");b.attr("x1",0),b.attr("y1",E),b.attr("x2",O),b.attr("y2",E),b.attr("class","branch branch"+u),y==="TB"?(b.attr("y1",j),b.attr("x1",m),b.attr("y2",O),b.attr("x2",m)):y==="BT"&&(b.attr("y1",O),b.attr("x1",m),b.attr("y2",j),b.attr("x2",m)),U.push(E);const q=c.name,_=ce(q),v=f.insert("rect"),R=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);R.node().appendChild(_);const C=_.getBBox(),W=h?0:4,Y=h?16:0,P=h?J:0;s==="neo"&&v.attr("data-look","neo"),v.attr("class","branchLabelBkg label"+u).attr("style",s==="neo"?`filter:${h?`url(#${o}-drop-shadow)`:a}`:"").attr("rx",W).attr("ry",W).attr("x",-C.width-4-(t.rotateCommitLabel===!0?30:0)).attr("y",-C.height/2+10).attr("width",C.width+18+Y).attr("height",C.height+4+P),R.attr("transform","translate("+(-C.width-14-(t.rotateCommitLabel===!0?30:0)+Y/2)+", "+(E-C.height/2-2)+")"),y==="TB"?(v.attr("x",m-C.width/2-10).attr("y",0),R.attr("transform","translate("+(m-C.width/2-5)+", 0)"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${-P-10})`),R.attr("transform","translate("+(m-C.width/2-5)+", "+(-P*2+7)+")"))):y==="BT"?(v.attr("x",m-C.width/2-10).attr("y",O),R.attr("transform","translate("+(m-C.width/2-5)+", "+O+")"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${P+10})`),R.attr("transform","translate("+(m-C.width/2-5)+", "+(O+P*2+4)+")"))):v.attr("transform","translate(-19, "+(E-12-P/2)+")")})},"drawBranches"),ur=$(function(e,r,t,o,s){return B.set(e,{pos:r,index:t}),r+=50+(s?40:0)+(y==="TB"||y==="BT"?o.width/2:0),r},"setBranchPosition"),yr=$(function(e,r,t,o){Qe(),k.debug("in gitgraph renderer",e+`
14
- `,"id:",r,t);const s=o.db;if(!s.getConfig){k.error("getConfig method is not available on db");return}const d=s.getConfig(),n=d.rotateCommitLabel??!1;N=s.getCommits();const a=s.getBranchesAsObjArray();y=s.getDirection();const l=pe(`[id="${r}"]`),{look:h,theme:g,themeVariables:f}=z(),{useGradient:c,gradientStart:x,gradientStop:u,filterColor:m}=f;if(c){const b=l.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");b.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),b.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}h==="neo"&&V.has(g??"")&&l.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",m);let E=0;a.forEach((b,q)=>{var W;const _=ce(b.name),v=l.append("g"),w=v.insert("g").attr("class","branchLabel"),R=w.insert("g").attr("class","label branch-label");(W=R.node())==null||W.appendChild(_);const C=_.getBBox();E=ur(b.name,E,q,C,n),R.remove(),w.remove(),v.remove()}),te(l,N,!1,d),d.showBranches&&gr(l,a,d,r),fr(l,N),te(l,N,!0,d),be.insertTitle(l,"gitTitleText",d.titleTopMargin??0,s.getDiagramTitle()),we(void 0,l,d.diagramPadding,d.useMaxWidth)},"draw"),xr={draw:yr},de=8,le=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),mr=new Set(["redux-color","redux-dark-color"]),pr=new Set(["neo","neo-dark"]),br=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),wr=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),kr=$(e=>{const{svgId:r}=e;let t="";if(e.useGradient&&r)for(let o=0;o<e.THEME_COLOR_LIMIT;o++)t+=`
15
- .label${o} { fill: ${e.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${e.strokeWidth};}
16
- `;return t},"genGitGraphGradient"),vr=$(e=>{const r=Q(),{theme:t,themeVariables:o}=r,{borderColorArray:s}=o,d=le.has(t);if(pr.has(t)){let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`
17
- .branch-label${a} { fill: ${e.nodeBorder};}
18
- .commit${a} { stroke: ${e.nodeBorder}; }
19
- .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
20
- .arrow${a} { stroke: ${e.nodeBorder}; }
21
- .commit-bullets { fill: ${e.nodeBorder}; }
22
- .commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
23
- ${kr(e)}`;else{const l=a%de;n+=`
24
- .branch-label${a} { fill: ${e["gitBranchLabel"+l]}; }
25
- .commit${a} { stroke: ${e["git"+l]}; fill: ${e["git"+l]}; }
26
- .commit-highlight${a} { stroke: ${e["gitInv"+l]}; fill: ${e["gitInv"+l]}; }
27
- .arrow${a} { stroke: ${e["git"+l]}; }
28
- `}return n}else if(mr.has(t)){let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)if(a===0)n+=`
29
- .branch-label${a} { fill: ${e.nodeBorder}; ${d?`font-weight:${e.noteFontWeight}`:""} }
30
- .commit${a} { stroke: ${e.nodeBorder}; }
31
- .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.mainBkg}; }
32
- .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${d?`font-weight:${e.noteFontWeight}`:""} }
33
- .arrow${a} { stroke: ${e.nodeBorder}; }
34
- .commit-bullets { fill: ${e.nodeBorder}; }
35
- `;else{const l=a%s.length;n+=`
36
- .branch-label${a} { fill: ${e.nodeBorder}; ${d?`font-weight:${e.noteFontWeight}`:""} }
37
- .commit${a} { stroke: ${s[l]}; fill: ${s[l]}; }
38
- .commit-highlight${a} { stroke: ${s[l]}; fill: ${s[l]}; }
39
- .label${a} { fill: ${br.has(t)?e.mainBkg:s[l]}; stroke: ${s[l]}; stroke-width: ${e.strokeWidth}; }
40
- .arrow${a} { stroke: ${s[l]}; }
41
- `}return n}else{let n="";for(let a=0;a<e.THEME_COLOR_LIMIT;a++)n+=`
42
- .branch-label${a} { fill: ${e.nodeBorder}; ${d?`font-weight:${e.noteFontWeight}`:""} }
43
- .commit${a} { stroke: ${e.nodeBorder}; }
44
- .commit-highlight${a} { stroke: ${e.nodeBorder}; fill: ${e.nodeBorder}; }
45
- .label${a} { fill: ${e.mainBkg}; stroke: ${e.nodeBorder}; stroke-width: ${e.strokeWidth}; ${d?`font-weight:${e.noteFontWeight}`:""}}
46
- .arrow${a} { stroke: ${e.nodeBorder}; }
47
- .commit-bullets { fill: ${e.nodeBorder}; }
48
- .commit-cherry-pick${a} { stroke: ${e.nodeBorder}; }
49
- `;return n}},"genColor"),Er=$(e=>`${Array.from({length:e.THEME_COLOR_LIMIT},(r,t)=>t).map(r=>{const t=r%de;return`
50
- .branch-label${r} { fill: ${e["gitBranchLabel"+t]}; }
51
- .commit${r} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; }
52
- .commit-highlight${r} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; }
53
- .label${r} { fill: ${e["git"+t]}; }
54
- .arrow${r} { stroke: ${e["git"+t]}; }
55
- `}).join(`
56
- `)}`,"normalTheme"),Cr=$(e=>{const r=Q(),{theme:t}=r,o=wr.has(t);return`
57
- .commit-id,
58
- .commit-msg,
59
- .branch-label {
60
- fill: lightgrey;
61
- color: lightgrey;
62
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
63
- font-family: var(--mermaid-font-family);
64
- }
65
-
66
- ${o?vr(e):Er(e)}
67
-
68
- .branch {
69
- stroke-width: ${e.strokeWidth};
70
- stroke: ${e.commitLineColor??e.lineColor};
71
- stroke-dasharray: ${o?"4 2":"2"};
72
- }
73
- .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${o?e.nodeBorder:e.commitLabelColor}; ${o?`font-weight:${e.noteFontWeight};`:""}}
74
- .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${o?"transparent":e.commitLabelBackground}; opacity: ${o?"":.5}; }
75
- .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
76
- .tag-label-bkg { fill: ${o?e.mainBkg:e.tagLabelBackground}; stroke: ${o?e.nodeBorder:e.tagLabelBorder}; ${o?`filter:${e.dropShadow}`:""} }
77
- .tag-hole { fill: ${e.textColor}; }
78
-
79
- .commit-merge {
80
- stroke: ${o?e.mainBkg:e.primaryColor};
81
- fill: ${o?e.mainBkg:e.primaryColor};
82
- }
83
- .commit-reverse {
84
- stroke: ${o?e.mainBkg:e.primaryColor};
85
- fill: ${o?e.mainBkg:e.primaryColor};
86
- stroke-width: ${o?e.strokeWidth:3};
87
- }
88
- .commit-highlight-outer {
89
- }
90
- .commit-highlight-inner {
91
- stroke: ${o?e.mainBkg:e.primaryColor};
92
- fill: ${o?e.mainBkg:e.primaryColor};
93
- }
94
-
95
- .arrow {
96
- /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */
97
- stroke-width: ${le.has(t)?e.strokeWidth:8};
98
- stroke-linecap: round;
99
- fill: none
100
- }
101
- .gitTitleText {
102
- text-anchor: middle;
103
- font-size: 18px;
104
- fill: ${e.textColor};
105
- }
106
- `},"getStyles"),Br=Cr,Gr={parser:Xe,db:oe,renderer:xr,styles:Br};export{Gr as diagram};
@@ -1 +0,0 @@
1
- import{at as N,au as v,av as f,aw as b,ax as E}from"./index-BwBOl41F.js";import{a as j,c as P,k as _,f as g,d,i as l,v as p,r as w}from"./_baseUniq-Dq5-YQLQ.js";var D=N(function(o){return j(P(o,1,v,!0))}),F="\0",a="\0",O="";class L{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=f(void 0),this._defaultEdgeLabelFn=f(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[a]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return b(e)||(e=f(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return _(this._nodes)}sources(){var e=this;return g(this.nodes(),function(t){return E(e._in[t])})}sinks(){var e=this;return g(this.nodes(),function(t){return E(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return d(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],d(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),d(_(this._in[e]),t),delete this._in[e],delete this._preds[e],d(_(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(l(t))t=a;else{t+="";for(var s=t;!l(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}}children(e){if(l(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return _(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return _(t)}successors(e){var t=this._sucs[e];if(t)return _(t)}neighbors(e){var t=this.predecessors(e);if(t)return D(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;d(this._nodes,function(n,h){e(h)&&t.setNode(h,n)}),d(this._edgeObjs,function(n){t.hasNode(n.v)&&t.hasNode(n.w)&&t.setEdge(n,s.edge(n))});var i={};function r(n){var h=s.parent(n);return h===void 0||t.hasNode(h)?(i[n]=h,h):h in i?i[h]:r(h)}return this._isCompound&&d(t.nodes(),function(n){t.setParent(n,r(n))}),t}setDefaultEdgeLabel(e){return b(e)||(e=f(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return p(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return w(e,function(r,n){return i.length>1?s.setEdge(r,n,t):s.setEdge(r,n),n}),this}setEdge(){var e,t,s,i,r=!1,n=arguments[0];typeof n=="object"&&n!==null&&"v"in n?(e=n.v,t=n.w,s=n.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=n,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,l(s)||(s=""+s);var h=c(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,h))return r&&(this._edgeLabels[h]=i),this;if(!l(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[h]=r?i:this._defaultEdgeLabelFn(e,t,s);var u=M(this._isDirected,e,t,s);return e=u.v,t=u.w,Object.freeze(u),this._edgeObjs[h]=u,y(this._preds[t],e),y(this._sucs[e],t),this._in[t][h]=u,this._out[e][h]=u,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?m(this._isDirected,arguments[0]):c(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],C(this._preds[t],e),C(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=p(s);return t?g(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=p(s);return t?g(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}L.prototype._nodeCount=0;L.prototype._edgeCount=0;function y(o,e){o[e]?o[e]++:o[e]=1}function C(o,e){--o[e]||delete o[e]}function c(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}return i+O+r+O+(l(s)?F:s)}function M(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var n=i;i=r,r=n}var h={v:i,w:r};return s&&(h.name=s),h}function m(o,e){return c(o,e.v,e.w,e.name)}export{L as G};