@hachej/boring-ui-cli 0.1.24 → 0.1.26

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 (152) hide show
  1. package/dist/server/cli.js +465 -44
  2. package/dist/server/pluginDiscovery.js +36 -0
  3. package/dist/server/pluginFrontRuntime.js +1458 -0
  4. package/package.json +7 -7
  5. package/public/assets/DebugDrawer-kRj0QGoh.js +1 -0
  6. package/public/assets/_baseUniq-BaoahSEi.js +1 -0
  7. package/public/assets/angular-ts-BrjP3tb8.js +1 -1
  8. package/public/assets/angular-ts-BwZT4LLn.js +1 -1
  9. package/public/assets/apl-CORt7UWP.js +1 -1
  10. package/public/assets/apl-dKokRX4l.js +1 -1
  11. package/public/assets/arc-BGT9Yoor.js +1 -0
  12. package/public/assets/architectureDiagram-Q4EWVU46-8Fsx8Bw5.js +36 -0
  13. package/public/assets/astro-CbQHKStN.js +1 -1
  14. package/public/assets/astro-HNnZUWAn.js +1 -1
  15. package/public/assets/blade-BjGOyj-B.js +1 -1
  16. package/public/assets/blade-D4QpJJKB.js +1 -1
  17. package/public/assets/{blockDiagram-DXYQGD6D-DEkkj6Fh.js → blockDiagram-DXYQGD6D-CSD_8P6t.js} +5 -5
  18. package/public/assets/{c4Diagram-AHTNJAMY-CEZo72O7.js → c4Diagram-AHTNJAMY-BANFpiWc.js} +1 -1
  19. package/public/assets/channel-BdMajkgC.js +1 -0
  20. package/public/assets/{chunk-4BX2VUAB-kct9rMc4.js → chunk-4BX2VUAB-DwXbCZ7y.js} +1 -1
  21. package/public/assets/{chunk-4TB4RGXK-przR2bht.js → chunk-4TB4RGXK-Dk2hp0kY.js} +3 -3
  22. package/public/assets/{chunk-55IACEB6-BtFWJCbx.js → chunk-55IACEB6-CFeiGe8t.js} +1 -1
  23. package/public/assets/{chunk-EDXVE4YY-wnitHF3B.js → chunk-EDXVE4YY-B0SJv4ej.js} +1 -1
  24. package/public/assets/{chunk-FMBD7UC4-8PDhdiie.js → chunk-FMBD7UC4-BakGwea6.js} +1 -1
  25. package/public/assets/{chunk-OYMX7WX6-TDftW5K8.js → chunk-OYMX7WX6-Dq0T_fTM.js} +2 -2
  26. package/public/assets/{chunk-QZHKN3VN-B5vnQXaM.js → chunk-QZHKN3VN-B5OglTTC.js} +1 -1
  27. package/public/assets/{chunk-YZCP3GAM-CGg2izn8.js → chunk-YZCP3GAM-NDaB-kfw.js} +1 -1
  28. package/public/assets/classDiagram-6PBFFD2Q-B-lcy3NJ.js +1 -0
  29. package/public/assets/classDiagram-v2-HSJHXN6E-B-lcy3NJ.js +1 -0
  30. package/public/assets/clone-CQaScT6j.js +1 -0
  31. package/public/assets/cobol-nBiQ_Alo.js +1 -1
  32. package/public/assets/cobol-nwyudZeR.js +1 -1
  33. package/public/assets/{cose-bilkent-S5V4N54A-CjXKbjHV.js → cose-bilkent-S5V4N54A-C_XiHCxn.js} +1 -1
  34. package/public/assets/crystal-DNxU26gB.js +1 -1
  35. package/public/assets/crystal-tKQVLTB8.js +1 -1
  36. package/public/assets/{dagre-KV5264BT-D-wBcwT7.js → dagre-KV5264BT-DeKC0ZTS.js} +2 -2
  37. package/public/assets/diagram-5BDNPKRD-BI21qA6c.js +10 -0
  38. package/public/assets/diagram-G4DWMVQ6-DXlN6VCm.js +24 -0
  39. package/public/assets/diagram-MMDJMWI5-BCJkUUZU.js +43 -0
  40. package/public/assets/diagram-TYMM5635-C-KOEBZV.js +24 -0
  41. package/public/assets/edge-BkV0erSs.js +1 -1
  42. package/public/assets/edge-FbVlp4U3.js +1 -1
  43. package/public/assets/elixir-CDX3lj18.js +1 -1
  44. package/public/assets/elixir-CkH2-t6x.js +1 -1
  45. package/public/assets/{erDiagram-SMLLAGMA-CUWacc8b.js → erDiagram-SMLLAGMA-_vucZwTa.js} +2 -2
  46. package/public/assets/erb-B12qg9BL.js +1 -1
  47. package/public/assets/erb-BYCe7drp.js +1 -1
  48. package/public/assets/{flowDiagram-DWJPFMVM-DVIhUX7Z.js → flowDiagram-DWJPFMVM-CWye_WgN.js} +4 -4
  49. package/public/assets/{ganttDiagram-T4ZO3ILL-g3ncLabH.js → ganttDiagram-T4ZO3ILL-Cg6T_N_V.js} +3 -3
  50. package/public/assets/gitGraphDiagram-UUTBAWPF-CI6tYFw1.js +106 -0
  51. package/public/assets/glimmer-js-ByusRIyA.js +1 -1
  52. package/public/assets/glimmer-js-Rg0-pVw9.js +1 -1
  53. package/public/assets/glimmer-ts-BfAWNZQY.js +1 -1
  54. package/public/assets/glimmer-ts-U6CK756n.js +1 -1
  55. package/public/assets/{graph-CDl50skT.js → graph-Ci4pDE3A.js} +1 -1
  56. package/public/assets/hack-CaT9iCJl.js +1 -1
  57. package/public/assets/hack-i7_Ulhet.js +1 -1
  58. package/public/assets/haml-B8DHNrY2.js +1 -1
  59. package/public/assets/haml-D5jkg6IW.js +1 -1
  60. package/public/assets/handlebars-BL8al0AC.js +1 -1
  61. package/public/assets/handlebars-BpdQsYii.js +1 -1
  62. package/public/assets/highlighted-body-OFNGDK62-xGLlGy3l.js +1 -0
  63. package/public/assets/html-GMplVEZG.js +1 -1
  64. package/public/assets/html-derivative-BFtXZ54Q.js +1 -1
  65. package/public/assets/html-derivative-DlHx6ybY.js +1 -1
  66. package/public/assets/html-pp8916En.js +1 -1
  67. package/public/assets/index-BNz332Xu.js +1669 -0
  68. package/public/assets/index-D5qFagsx.css +1 -0
  69. package/public/assets/infoDiagram-42DDH7IO-CigcPMhk.js +2 -0
  70. package/public/assets/{ishikawaDiagram-UXIWVN3A-BbjR1GdS.js → ishikawaDiagram-UXIWVN3A-CDZTRajH.js} +4 -4
  71. package/public/assets/jinja-4LBKfQ-Z.js +1 -1
  72. package/public/assets/jinja-f2NsQr07.js +1 -1
  73. package/public/assets/{journeyDiagram-VCZTEJTY-DJHw1u4a.js → journeyDiagram-VCZTEJTY-C9MHFDJ6.js} +4 -4
  74. package/public/assets/just-Cw27pwNe.js +1 -1
  75. package/public/assets/just-VxiPbLrw.js +1 -1
  76. package/public/assets/{kanban-definition-6JOO6SKY-agbEFS20.js → kanban-definition-6JOO6SKY-Hpr02Gir.js} +7 -7
  77. package/public/assets/{layout-BtrYpvUW.js → layout-uDkQb6eL.js} +1 -1
  78. package/public/assets/{linear-C4IQ6Sya.js → linear-D9bVI_aq.js} +1 -1
  79. package/public/assets/liquid-C0sCDyMI.js +1 -1
  80. package/public/assets/liquid-DYVedYrR.js +1 -1
  81. package/public/assets/marko-CnJfTvn9.js +1 -1
  82. package/public/assets/marko-DjSrsDqO.js +1 -1
  83. package/public/assets/mdc-BMNejdWA.js +1 -1
  84. package/public/assets/mdc-DTYItulj.js +1 -1
  85. package/public/assets/{min-DDWmdqiX.js → min-T0CPelcS.js} +1 -1
  86. package/public/assets/{mindmap-definition-QFDTVHPH-By9_uC_s.js → mindmap-definition-QFDTVHPH-BxDJYpMb.js} +8 -8
  87. package/public/assets/nim-BIad80T-.js +1 -1
  88. package/public/assets/nim-CVrawwO9.js +1 -1
  89. package/public/assets/perl-C0TMdlhV.js +1 -1
  90. package/public/assets/perl-NvoQZIq0.js +1 -1
  91. package/public/assets/php-Dhbhpdrm.js +1 -1
  92. package/public/assets/php-R6g_5hLQ.js +1 -1
  93. package/public/assets/pieDiagram-DEJITSTG-C214NdS2.js +30 -0
  94. package/public/assets/pug-CGlum2m_.js +1 -1
  95. package/public/assets/pug-DKIMFp6K.js +1 -1
  96. package/public/assets/{quadrantDiagram-34T5L4WZ-BszNW2Gc.js → quadrantDiagram-34T5L4WZ-B4hldTdV.js} +3 -3
  97. package/public/assets/razor-BDqjjVU7.js +1 -1
  98. package/public/assets/razor-Uh8Bk_45.js +1 -1
  99. package/public/assets/{requirementDiagram-MS252O5E-fdyCkRN5.js → requirementDiagram-MS252O5E-Cv-IZSGz.js} +1 -1
  100. package/public/assets/rst-BrH8l1NY.js +1 -1
  101. package/public/assets/rst-CRjBmOyv.js +1 -1
  102. package/public/assets/ruby-Dw2BHqvy.js +1 -1
  103. package/public/assets/ruby-Wjq7vjNf.js +1 -1
  104. package/public/assets/{sankeyDiagram-XADWPNL6-tg2HOfl2.js → sankeyDiagram-XADWPNL6-C52Wx9t_.js} +2 -2
  105. package/public/assets/{sequenceDiagram-FGHM5R23-GF78cQ5y.js → sequenceDiagram-FGHM5R23-C9gRx_I2.js} +5 -5
  106. package/public/assets/soy-8wufbnw4.js +1 -1
  107. package/public/assets/soy-Brmx7dQM.js +1 -1
  108. package/public/assets/{stateDiagram-FHFEXIEX-C709lyuE.js → stateDiagram-FHFEXIEX-BVweWFAE.js} +1 -1
  109. package/public/assets/stateDiagram-v2-QKLJ7IA2-CftkpTOS.js +1 -0
  110. package/public/assets/svelte-C_ipcX3V.js +1 -1
  111. package/public/assets/svelte-Cy7k_4gC.js +1 -1
  112. package/public/assets/templ-DhtptRzy.js +1 -1
  113. package/public/assets/templ-P3uqSqPl.js +1 -1
  114. package/public/assets/{timeline-definition-GMOUNBTQ-D2y-83yP.js → timeline-definition-GMOUNBTQ-Boc8Q03t.js} +3 -3
  115. package/public/assets/ts-tags-DQrlYJgV.js +1 -1
  116. package/public/assets/ts-tags-zn1MmPIZ.js +1 -1
  117. package/public/assets/twig-DNn4PbVi.js +1 -1
  118. package/public/assets/twig-xg9kU7Mw.js +1 -1
  119. package/public/assets/vennDiagram-DHZGUBPP-BE8XjSYZ.js +34 -0
  120. package/public/assets/vue-D2xRrEX4.js +1 -1
  121. package/public/assets/vue-DN_0RTcg.js +1 -1
  122. package/public/assets/vue-vine-BoDAl6tE.js +1 -1
  123. package/public/assets/vue-vine-CQOfvN7w.js +1 -1
  124. package/public/assets/{wardley-RL74JXVD-NEg4mPyC.js → wardley-RL74JXVD-MQjS4K_T.js} +1 -1
  125. package/public/assets/{wardleyDiagram-NUSXRM2D-BbXAj99t.js → wardleyDiagram-NUSXRM2D-CKUw97nD.js} +2 -2
  126. package/public/assets/{xychartDiagram-5P7HB3ND-C8Y3cC5f.js → xychartDiagram-5P7HB3ND-OkP2T3uc.js} +3 -3
  127. package/public/index.html +2 -2
  128. package/templates/front-canonical.tsx +4 -2
  129. package/public/assets/CodeEditor-DQqOn4xz-BnYIpEQ0.js +0 -31
  130. package/public/assets/FileTree-DjPzfDMq-jOFMfLV-.js +0 -21
  131. package/public/assets/MarkdownEditor-BbSy0bLV-_8qFqqna.js +0 -254
  132. package/public/assets/_baseUniq-DysFpiFw.js +0 -1
  133. package/public/assets/arc-D0sqkACA.js +0 -1
  134. package/public/assets/architectureDiagram-Q4EWVU46-DnyELkA2.js +0 -36
  135. package/public/assets/channel-Ci4DEwaO.js +0 -1
  136. package/public/assets/classDiagram-6PBFFD2Q-0PAZNzgC.js +0 -1
  137. package/public/assets/classDiagram-v2-HSJHXN6E-0PAZNzgC.js +0 -1
  138. package/public/assets/clone-_lPYOTLf.js +0 -1
  139. package/public/assets/diagram-5BDNPKRD-Ch4e4G6h.js +0 -10
  140. package/public/assets/diagram-G4DWMVQ6-a_PPD1uY.js +0 -24
  141. package/public/assets/diagram-MMDJMWI5-D9Lkv8IB.js +0 -43
  142. package/public/assets/diagram-TYMM5635-BlfaVidf.js +0 -24
  143. package/public/assets/gitGraphDiagram-UUTBAWPF-DpPqglKx.js +0 -106
  144. package/public/assets/highlighted-body-OFNGDK62-BcVhfY0-.js +0 -1
  145. package/public/assets/index-C9S_GD0T.js +0 -1330
  146. package/public/assets/index-CrFvzn5a.js +0 -9
  147. package/public/assets/index-Css1pwyY.css +0 -1
  148. package/public/assets/index-Vcq4gwWv.js +0 -1
  149. package/public/assets/infoDiagram-42DDH7IO-COfGVlDB.js +0 -2
  150. package/public/assets/pieDiagram-DEJITSTG-DfzJSvMR.js +0 -30
  151. package/public/assets/stateDiagram-v2-QKLJ7IA2-BbgcVrKo.js +0 -1
  152. package/public/assets/vennDiagram-DHZGUBPP-BOsWwU4c.js +0 -34
@@ -1,24 +0,0 @@
1
- import{_ as b,M as m,P as B,e as C,l as w,b as S,a as D,v as P,x as T,g as z,s as E,N as F,I as A,D as W}from"./index-C9S_GD0T.js";import{p as _}from"./chunk-4BX2VUAB-kct9rMc4.js";import{p as N}from"./wardley-RL74JXVD-NEg4mPyC.js";import"./min-DDWmdqiX.js";import"./_baseUniq-DysFpiFw.js";var M=F.packet,u,v=(u=class{constructor(){this.packet=[],this.setAccTitle=S,this.getAccTitle=D,this.setDiagramTitle=P,this.getDiagramTitle=T,this.getAccDescription=z,this.setAccDescription=E}getConfig(){const t=m({...M,...A().packet});return t.showBits&&(t.paddingY+=10),t}getPacket(){return this.packet}pushWord(t){t.length>0&&this.packet.push(t)}clear(){W(),this.packet=[]}},b(u,"PacketDB"),u),I=1e4,L=b((e,t)=>{_(e,t);let s=-1,r=[],n=1;const{bitsPerRow:l}=t.getConfig();for(let{start:a,end:i,bits:d,label:c}of e.blocks){if(a!==void 0&&i!==void 0&&i<a)throw new Error(`Packet block ${a} - ${i} is invalid. End must be greater than start.`);if(a??(a=s+1),a!==s+1)throw new Error(`Packet block ${a} - ${i??a} is not contiguous. It should start from ${s+1}.`);if(d===0)throw new Error(`Packet block ${a} is invalid. Cannot have a zero bit field.`);for(i??(i=a+(d??1)-1),d??(d=i-a+1),s=i,w.debug(`Packet block ${a} - ${s} with label ${c}`);r.length<=l+1&&t.getPacket().length<I;){const[p,o]=Y({start:a,end:i,bits:d,label:c},n,l);if(r.push(p),p.end+1===n*l&&(t.pushWord(r),r=[],n++),!o)break;({start:a,end:i,bits:d,label:c}=o)}}t.pushWord(r)},"populate"),Y=b((e,t,s)=>{if(e.start===void 0)throw new Error("start should have been set during first phase");if(e.end===void 0)throw new Error("end should have been set during first phase");if(e.start>e.end)throw new Error(`Block start ${e.start} is greater than block end ${e.end}.`);if(e.end+1<=t*s)return[e,void 0];const r=t*s-1,n=t*s;return[{start:e.start,end:r,label:e.label,bits:r-e.start},{start:n,end:e.end,label:e.label,bits:e.end-n}]},"getNextFittingBlock"),x={parser:{yy:void 0},parse:b(async e=>{var r;const t=await N("packet",e),s=(r=x.parser)==null?void 0:r.yy;if(!(s instanceof v))throw new Error("parser.parser?.yy was not a PacketDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");w.debug(t),L(t,s)},"parse")},O=b((e,t,s,r)=>{const n=r.db,l=n.getConfig(),{rowHeight:a,paddingY:i,bitWidth:d,bitsPerRow:c}=l,p=n.getPacket(),o=n.getDiagramTitle(),h=a+i,g=h*(p.length+1)-(o?0:a),k=d*c+2,f=B(t);f.attr("viewBox",`0 0 ${k} ${g}`),C(f,g,k,l.useMaxWidth);for(const[y,$]of p.entries())j(f,$,y,l);f.append("text").text(o).attr("x",k/2).attr("y",g-h/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),j=b((e,t,s,{rowHeight:r,paddingX:n,paddingY:l,bitWidth:a,bitsPerRow:i,showBits:d})=>{const c=e.append("g"),p=s*(r+l)+l;for(const o of t){const h=o.start%i*a+1,g=(o.end-o.start+1)*a-n;if(c.append("rect").attr("x",h).attr("y",p).attr("width",g).attr("height",r).attr("class","packetBlock"),c.append("text").attr("x",h+g/2).attr("y",p+r/2).attr("class","packetLabel").attr("dominant-baseline","middle").attr("text-anchor","middle").text(o.label),!d)continue;const k=o.end===o.start,f=p-2;c.append("text").attr("x",h+(k?g/2:0)).attr("y",f).attr("class","packetByte start").attr("dominant-baseline","auto").attr("text-anchor",k?"middle":"start").text(o.start),k||c.append("text").attr("x",h+g).attr("y",f).attr("class","packetByte end").attr("dominant-baseline","auto").attr("text-anchor","end").text(o.end)}},"drawWord"),G={draw:O},H={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},K=b(({packet:e}={})=>{const t=m(H,e);return`
2
- .packetByte {
3
- font-size: ${t.byteFontSize};
4
- }
5
- .packetByte.start {
6
- fill: ${t.startByteColor};
7
- }
8
- .packetByte.end {
9
- fill: ${t.endByteColor};
10
- }
11
- .packetLabel {
12
- fill: ${t.labelColor};
13
- font-size: ${t.labelFontSize};
14
- }
15
- .packetTitle {
16
- fill: ${t.titleColor};
17
- font-size: ${t.titleFontSize};
18
- }
19
- .packetBlock {
20
- stroke: ${t.blockStrokeColor};
21
- stroke-width: ${t.blockStrokeWidth};
22
- fill: ${t.blockFillColor};
23
- }
24
- `},"styles"),Q={parser:x,get db(){return new v},renderer:G,styles:K};export{Q as diagram};
@@ -1,106 +0,0 @@
1
- import{p as he}from"./chunk-4BX2VUAB-kct9rMc4.js";import{I as $e}from"./chunk-QZHKN3VN-B5vnQXaM.js";import{x as fe,v as ge,s as ue,g as ye,a as xe,b as me,_ as $,I as Q,l as k,d as pe,c as z,u as be,K as we,D as ke,m as L,M as ve,N as Ee,O as Ce}from"./index-C9S_GD0T.js";import{p as Be}from"./wardley-RL74JXVD-NEg4mPyC.js";import"./min-DDWmdqiX.js";import"./_baseUniq-DysFpiFw.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 U(){return Ce({length:7})}$(U,"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"),Ie=$(function(){return i.records.options},"getOptions"),Re=$(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+"-"+U(),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}-${U()}`,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+"-"+U(),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"),Pe=$(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"),We=$(function(){return i.records.currBranch},"getCurrentBranch"),qe=$(function(){return i.records.direction},"getDirection"),Ne=$(function(){return i.records.head},"getHead"),oe={commitType:p,getConfig:D,setDirection:Le,setOptions:Me,getOptions:Ie,commit:Re,branch:Oe,merge:_e,cherryPick:Ge,checkout:ne,prettyPrint:He,clear:Se,getBranchesAsObjArray:Ae,getBranches:De,getCommits:Pe,getCommitsArray:se,getCurrentBranch:We,getDirection:qe,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(Ke(s)),"Merge"),Checkout:$(s=>r.checkout(Ue(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"),Ke=$(e=>({branch:e.branch,id:e.id??"",type:e.type!==void 0?p[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),Ue=$(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,R=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,K=[],O=0,y="LR",Qe=$(()=>{B.clear(),T.clear(),N.clear(),O=0,K=[],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-R).attr("y",t.y+13.5).attr("width",h.width+2*R).attr("height",h.height+2*R),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+R}
3
- ${o-n/2-M/2},${u-R}
4
- ${t.posWithOffset-n/2-M},${u-x-R}
5
- ${t.posWithOffset+n/2+M},${u-x-R}
6
- ${t.posWithOffset+n/2+M},${u+x+R}
7
- ${t.posWithOffset-n/2-M},${u+x+R}`),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(K.every(n=>Math.abs(n-o)>=10))return K.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,P,_;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=(P=B.get(r.branch))==null?void 0:P.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)),K.push(E);const P=c.name,_=ce(P),v=f.insert("rect"),I=f.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+u);I.node().appendChild(_);const C=_.getBBox(),q=h?0:4,Y=h?16:0,W=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",q).attr("ry",q).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+W),I.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),I.attr("transform","translate("+(m-C.width/2-5)+", 0)"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${-W-10})`),I.attr("transform","translate("+(m-C.width/2-5)+", "+(-W*2+7)+")"))):y==="BT"?(v.attr("x",m-C.width/2-10).attr("y",O),I.attr("transform","translate("+(m-C.width/2-5)+", "+O+")"),h&&(v.attr("transform",`translate(${-Y/2-3}, ${W+10})`),I.attr("transform","translate("+(m-C.width/2-5)+", "+(O+W*2+4)+")"))):v.attr("transform","translate(-19, "+(E-12-W/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,P)=>{var q;const _=ce(b.name),v=l.append("g"),w=v.insert("g").attr("class","branchLabel"),I=w.insert("g").attr("class","label branch-label");(q=I.node())==null||q.appendChild(_);const C=_.getBBox();E=ur(b.name,E,P,C,n),I.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,_r={parser:Xe,db:oe,renderer:xr,styles:Br};export{_r as diagram};
@@ -1 +0,0 @@
1
- import{r,R as x,L as d,j as f,A as p}from"./index-C9S_GD0T.js";var N=({code:i,language:e,raw:a,className:u,startLine:n,lineNumbers:g,...m})=>{let{shikiTheme:l}=r.useContext(x),s=d(),[h,t]=r.useState(a);return r.useEffect(()=>{if(!s){t(a);return}let o=s.highlight({code:i,language:e,themes:l},c=>{t(c)});o&&t(o)},[i,e,l,s,a]),f.jsx(p,{className:u,language:e,lineNumbers:g,result:h,startLine:n,...m})};export{N as HighlightedCodeBlockBody};