@rainmanhhh/pi-web 0.32.44 → 0.32.46

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 (92) hide show
  1. package/dist/server.mjs +109 -110
  2. package/dist/static/assets/{CodeMirrorEditor-BnjPwO76.js → CodeMirrorEditor-C5O_9cJE.js} +2 -2
  3. package/dist/static/assets/{abnfDiagram-VCTEODGH-BeyytxY9.js → abnfDiagram-VCTEODGH-C_6Jktur.js} +1 -1
  4. package/dist/static/assets/architecture-7GRP2DOG-DCCFYi82.js +1 -0
  5. package/dist/static/assets/{architectureDiagram-5GKGNRK7-DDiVKIQZ.js → architectureDiagram-5GKGNRK7-CCqnwpzU.js} +1 -1
  6. package/dist/static/assets/{blockDiagram-I7D4REHJ-B5FGrsNe.js → blockDiagram-I7D4REHJ-2AD_zVEh.js} +1 -1
  7. package/dist/static/assets/{c4Diagram-7LVT6UL2-C7a6C_on.js → c4Diagram-7LVT6UL2-BLM8gBoV.js} +1 -1
  8. package/dist/static/assets/channel-ItU1FmMB.js +1 -0
  9. package/dist/static/assets/{chunk-4HAMMTFA-C_1wQqBh.js → chunk-4HAMMTFA-ClnxhIA1.js} +1 -1
  10. package/dist/static/assets/{chunk-75Z2AOVW-3Ea7Jx3m.js → chunk-75Z2AOVW-CQwn0kLg.js} +1 -1
  11. package/dist/static/assets/{chunk-DU6HZSFF-Dp71GLUP.js → chunk-DU6HZSFF-CBseBY69.js} +3 -2
  12. package/dist/static/assets/{chunk-F27PBJKO-CjrGTNXy.js → chunk-F27PBJKO-6R_r29hQ.js} +1 -1
  13. package/dist/static/assets/{chunk-GMAD6QVW-JC6q2B4c.js → chunk-GMAD6QVW-CihmxbuV.js} +1 -1
  14. package/dist/static/assets/{chunk-GVQU2GXP-BinbPujD.js → chunk-GVQU2GXP-gM79FAkf.js} +1 -1
  15. package/dist/static/assets/{chunk-IMKFNOWR-C6hvI376.js → chunk-IMKFNOWR-BRaDcus6.js} +1 -1
  16. package/dist/static/assets/{chunk-L3NEJ4N5-DmDer2OS.js → chunk-L3NEJ4N5-BIrVTun8.js} +1 -1
  17. package/dist/static/assets/{chunk-OSK3NFVY-D4GpfxXJ.js → chunk-OSK3NFVY-DzDmBFE1.js} +1 -1
  18. package/dist/static/assets/{chunk-P2QGCYS3-D0jua_Xj.js → chunk-P2QGCYS3-CR_NwngD.js} +1 -1
  19. package/dist/static/assets/{chunk-POPQ4Y6H-5wLmuPuP.js → chunk-POPQ4Y6H-DD8O3JX5.js} +1 -1
  20. package/dist/static/assets/{chunk-PWAF6VOD-CwQ5nesu.js → chunk-PWAF6VOD-BwdZC68l.js} +1 -1
  21. package/dist/static/assets/{chunk-SHT3W25Y-ClfoFi22.js → chunk-SHT3W25Y-BvvtlLeY.js} +1 -1
  22. package/dist/static/assets/{chunk-SVP7TREG-BsgtnEnb.js → chunk-SVP7TREG-BMNfL5Uk.js} +1 -1
  23. package/dist/static/assets/{chunk-TICWLB2K-DhcIYm5y.js → chunk-TICWLB2K-DT8L4cuK.js} +1 -1
  24. package/dist/static/assets/classDiagram-ZZMXUADV-KneFfqlc.js +1 -0
  25. package/dist/static/assets/classDiagram-v2-VYDZK3BY-KneFfqlc.js +1 -0
  26. package/dist/static/assets/{cynefin-OW5HDTMX-CugNhhb1.js → cynefin-OW5HDTMX-kkPVU-Re.js} +1 -1
  27. package/dist/static/assets/{cynefinDiagram-5FMLGOSQ-NRD10yCE.js → cynefinDiagram-5FMLGOSQ-BdzEu2Mr.js} +1 -1
  28. package/dist/static/assets/{dagre-GXQ25YYZ-D5Z8mcwi.js → dagre-GXQ25YYZ-fzZDMEPf.js} +1 -1
  29. package/dist/static/assets/{diagram-S7CK7UJ4-DkaycDPE.js → diagram-S7CK7UJ4-JfiKOoiZ.js} +1 -1
  30. package/dist/static/assets/{diagram-UQ7AKVKN-CyUKLvop.js → diagram-UQ7AKVKN-C7oDl7fX.js} +1 -1
  31. package/dist/static/assets/{diagram-VSXAHHWV-Cija31OO.js → diagram-VSXAHHWV-CG5kdhU7.js} +1 -1
  32. package/dist/static/assets/{diagram-VX7I27RA-BFHZ65gM.js → diagram-VX7I27RA-DWuMq62R.js} +1 -1
  33. package/dist/static/assets/{diagram-Z3DM3KII-7rfJC-fr.js → diagram-Z3DM3KII-77eXsDXG.js} +1 -1
  34. package/dist/static/assets/{ebnfDiagram-PWID7BFC-D9Z5ozm0.js → ebnfDiagram-PWID7BFC-BqCLb8HC.js} +1 -1
  35. package/dist/static/assets/{erDiagram-RLTQ6QDP-BEJLtfBD.js → erDiagram-RLTQ6QDP-B0gX2e8C.js} +1 -1
  36. package/dist/static/assets/eventmodeling-NTZA5JFV-B2EjZJw7.js +1 -0
  37. package/dist/static/assets/flowDiagram-HODETNUW-D_yLTRbx.js +1 -0
  38. package/dist/static/assets/{ganttDiagram-EL5Y4UJY-BHP28RmS.js → ganttDiagram-EL5Y4UJY-Cmx9u7Cp.js} +1 -1
  39. package/dist/static/assets/{gitGraph-4MIJSDKK-DefVJpSx.js → gitGraph-4MIJSDKK-Eu6Q4jQZ.js} +1 -1
  40. package/dist/static/assets/{gitGraphDiagram-WWUBYQGX-CqUIwPAG.js → gitGraphDiagram-WWUBYQGX-CrZj3Y9c.js} +1 -1
  41. package/dist/static/assets/{index-DgW82vHt.js → index-BQaIkSDW.js} +123 -127
  42. package/dist/static/assets/{info-A6RAGUB7-5Ntm9zzn.js → info-A6RAGUB7-BCtcwPTS.js} +1 -1
  43. package/dist/static/assets/{infoDiagram-27XIBGKW-BvbPJVbp.js → infoDiagram-27XIBGKW-C8cfo0ce.js} +1 -1
  44. package/dist/static/assets/{ishikawaDiagram-5VMMS53U-BK-awETG.js → ishikawaDiagram-5VMMS53U-C2zqzS9a.js} +1 -1
  45. package/dist/static/assets/{journeyDiagram-3NMN7TZE-DEbT7jqo.js → journeyDiagram-3NMN7TZE-BblJqNM0.js} +1 -1
  46. package/dist/static/assets/{kanban-definition-UXKFOSKX-B7fYfVvS.js → kanban-definition-UXKFOSKX-BB_cij1Y.js} +1 -1
  47. package/dist/static/assets/{line-BEes8GOV.js → line-p3QFM33N.js} +1 -1
  48. package/dist/static/assets/{markstream-BOx81-Dx.js → markstream-DJ7qcVeH.js} +2 -2
  49. package/dist/static/assets/{mermaid-parser.core-CiTZ-i0S.js → mermaid-parser.core-CItPmOJr.js} +3 -3
  50. package/dist/static/assets/{mermaid.core-D3RMXtwh.js → mermaid.core-BfAQXx35.js} +4 -4
  51. package/dist/static/assets/mhchem-DcVpZ_ee.js +1 -0
  52. package/dist/static/assets/{mindmap-definition-YA3MSWOX-BpnkxZDI.js → mindmap-definition-YA3MSWOX-C4chIVt7.js} +1 -1
  53. package/dist/static/assets/{packet-AYTQ26CC-DDylah2l.js → packet-AYTQ26CC-BSQlS-Ln.js} +1 -1
  54. package/dist/static/assets/{pegDiagram-XKGWAZYB-BrRfNobz.js → pegDiagram-XKGWAZYB-DsY8_3sz.js} +1 -1
  55. package/dist/static/assets/{pie-WAS4IAKB-B3S9b3RO.js → pie-WAS4IAKB-CTTesEo-.js} +1 -1
  56. package/dist/static/assets/{pieDiagram-E7YTZNPT-ChN_eT04.js → pieDiagram-E7YTZNPT-BfZFyc5N.js} +1 -1
  57. package/dist/static/assets/{quadrantDiagram-AXDQQJYC-ro6cIH8O.js → quadrantDiagram-AXDQQJYC-kQqRzJPn.js} +1 -1
  58. package/dist/static/assets/{radar-RG4KPBEZ-aRef0SBL.js → radar-RG4KPBEZ-CixqNalU.js} +1 -1
  59. package/dist/static/assets/{railroad-74A4TZTK-C9QWIfwZ.js → railroad-74A4TZTK-DK6eTAM3.js} +1 -1
  60. package/dist/static/assets/railroad-abnf-HS5TGJTU-DHhQ2TuX.js +1 -0
  61. package/dist/static/assets/railroad-ebnf-LZEXJU2U-Bzf-L2dV.js +1 -0
  62. package/dist/static/assets/railroad-peg-WCYAUIDC-Bs9Q9Phs.js +1 -0
  63. package/dist/static/assets/{railroadDiagram-O6MQD6OU-DWVSLF25.js → railroadDiagram-O6MQD6OU-DXpiYZSD.js} +1 -1
  64. package/dist/static/assets/{requirementDiagram-BXWQKSXE-BXf5oAmF.js → requirementDiagram-BXWQKSXE-Dd6a90YM.js} +1 -1
  65. package/dist/static/assets/{sankeyDiagram-P5KCCOFB-CU7pifI3.js → sankeyDiagram-P5KCCOFB-DKFbTZ0O.js} +1 -1
  66. package/dist/static/assets/{sequenceDiagram-WJ2MYXX4-CY4dFmCt.js → sequenceDiagram-WJ2MYXX4-Bpg0iLld.js} +1 -1
  67. package/dist/static/assets/{stateDiagram-D77RDMKH-Dcaa7h3c.js → stateDiagram-D77RDMKH-TWusWHVk.js} +1 -1
  68. package/dist/static/assets/stateDiagram-v2-MP3YSRHH-BQ_5dnrX.js +1 -0
  69. package/dist/static/assets/{swimlanes-42K2YHIH-CuJrlViM.js → swimlanes-42K2YHIH-DlSSsOXE.js} +1 -1
  70. package/dist/static/assets/swimlanesDiagram-VR7AAH4N-97OiS9Jl.js +8 -0
  71. package/dist/static/assets/{timeline-definition-24CTP7MA-xWn6hmdR.js → timeline-definition-24CTP7MA-C02rKjJA.js} +1 -1
  72. package/dist/static/assets/{treeView-Q6P3EWNA-DxAdsSRi.js → treeView-Q6P3EWNA-DhE_23GT.js} +1 -1
  73. package/dist/static/assets/{treemap-WGGIJYW6-Ds2LTioe.js → treemap-WGGIJYW6-DY3hDQ0R.js} +1 -1
  74. package/dist/static/assets/{vennDiagram-4TSXK5OY-TOw3ouP2.js → vennDiagram-4TSXK5OY-Btj8EZXU.js} +1 -1
  75. package/dist/static/assets/{wardley-WFR3VGLG-34a4sPcH.js → wardley-WFR3VGLG-DeP0uBgb.js} +1 -1
  76. package/dist/static/assets/{wardleyDiagram-VM6X3IG4-CHdr382V.js → wardleyDiagram-VM6X3IG4-C9xnkkcf.js} +1 -1
  77. package/dist/static/assets/{xychartDiagram-S5SC5T6Z-CwpcWSC2.js → xychartDiagram-S5SC5T6Z-moJE4OTJ.js} +1 -1
  78. package/dist/static/index.html +1 -1
  79. package/package.json +1 -1
  80. package/dist/static/assets/architecture-7GRP2DOG-SGV4-iEL.js +0 -1
  81. package/dist/static/assets/channel-Dgm6paqR.js +0 -1
  82. package/dist/static/assets/classDiagram-ZZMXUADV-CfMbp8sl.js +0 -1
  83. package/dist/static/assets/classDiagram-v2-VYDZK3BY-CfMbp8sl.js +0 -1
  84. package/dist/static/assets/eventmodeling-NTZA5JFV-CbDNsRRq.js +0 -1
  85. package/dist/static/assets/flowDiagram-HODETNUW-HpJ_h2pd.js +0 -1
  86. package/dist/static/assets/katex-CiJ_n4H9.js +0 -257
  87. package/dist/static/assets/mhchem-DkjroDml.js +0 -1
  88. package/dist/static/assets/railroad-abnf-HS5TGJTU-BdUjXru5.js +0 -1
  89. package/dist/static/assets/railroad-ebnf-LZEXJU2U-DaKpYxtu.js +0 -1
  90. package/dist/static/assets/railroad-peg-WCYAUIDC-DA3w7TKb.js +0 -1
  91. package/dist/static/assets/stateDiagram-v2-MP3YSRHH-CLLDHT5v.js +0 -1
  92. package/dist/static/assets/swimlanesDiagram-VR7AAH4N-Biti9ow2.js +0 -8
@@ -1,4 +1,4 @@
1
- import{g as e,i as t,m as n}from"./chunk-75Z2AOVW-3Ea7Jx3m.js";import{n as r}from"./mermaid-parser.core-CiTZ-i0S.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as a,p as o}from"./src-B6xuSHsQ.js";import{H as s,K as c,U as l,Y as u,a as d,b as f,f as p,s as m,v as h,w as g,x as _,y as v}from"./chunk-DU6HZSFF-Dp71GLUP.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=p.gitGraph,S=i(()=>t({...ee,...f().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return n({length:7})}i(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}i(T,`uniqBy`);var te=i(function(e){C.records.direction=e},`setDirection`),ne=i(function(e){a.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){a.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=i(function(){return C.records.options},`getOptions`),ie=i(function(e){let t=e.msg,n=e.id,r=e.type,i=e.tags;a.info(`commit`,t,n,r,i),a.debug(`Entering commit:`,t,n,r,i);let o=S();n=m.sanitizeText(n,o),t=m.sanitizeText(t,o),i=i?.map(e=>m.sanitizeText(e,o));let s={id:n||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:r??x.NORMAL,tags:i??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,a.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&a.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),a.debug(`in pushCommit `+s.id)},`commit`),ae=i(function(e){let t=e.name,n=e.order;if(t=m.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:n}),E(t),a.debug(`in createBranch`)},`branch`),oe=i(e=>{let t=e.branch,n=e.id,r=e.type,i=e.tags,o=S();t=m.sanitizeText(t,o),n&&=m.sanitizeText(n,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&C.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${r} ${i?.join(` `)}`,token:`merge ${t} ${n} ${r} ${i?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${r} ${i?.join(` `)}`]},e}let d=c||``,f={id:n||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,d],branch:C.records.currBranch,type:x.MERGE,customType:r,customId:!!n,tags:i??[]};C.records.head=f,C.records.commits.set(f.id,f),C.records.branches.set(C.records.currBranch,f.id),a.debug(C.records.branches),a.debug(`in mergeBranch`)},`merge`),se=i(function(e){let t=e.id,n=e.targetId,r=e.tags,i=e.parent;a.debug(`Entering cherryPick:`,t,n,r);let o=S();if(t=m.sanitizeText(t,o),n=m.sanitizeText(n,o),r=r?.map(e=>m.sanitizeText(e,o)),i=m.sanitizeText(i,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(i&&!(Array.isArray(s.parents)&&s.parents.includes(i)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!i)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!C.records.commits.has(n)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:r?r.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${i}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),a.debug(C.records.branches),a.debug(`in cherryPick`)}},`cherryPick`),E=i(function(e){if(e=m.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}i(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){n+=e===t?` *`:` |`});let r=[n,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&r.push(e);if(a.debug(r.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}i(O,`prettyPrintCommitHistory`);var ce=i(function(){a.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=i(function(){C.reset(),d()},`clear`),ue=i(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=i(function(){return C.records.branches},`getBranches`),fe=i(function(){return C.records.commits},`getCommits`),k=i(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){a.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:i(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:i(function(){return C.records.direction},`getDirection`),getHead:i(function(){return C.records.head},`getHead`),setAccTitle:l,getAccTitle:v,getAccDescription:h,setAccDescription:s,setDiagramTitle:c,getDiagramTitle:g},pe=i((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=i((e,t)=>{let n={Commit:i(e=>t.commit(he(e)),`Commit`),Branch:i(e=>t.branch(ge(e)),`Branch`),Merge:i(e=>t.merge(_e(e)),`Merge`),Checkout:i(e=>t.checkout(ve(e)),`Checkout`),CherryPicking:i(e=>t.cherryPick(ye(e)),`CherryPicking`)}[e.$type];n?n(e):a.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=i(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=i(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=i(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=i(e=>e.branch,`parseCheckout`),ye=i(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:i(async e=>{let t=await r(`gitGraph`,e);a.debug(t),pe(t,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=i((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=i(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=i(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=i(e=>{let t,n,r;return K===`BT`?(n=i((e,t)=>e<=t,`comparisonFunc`),r=1/0):(n=i((e,t)=>e>=t,`comparisonFunc`),r=0),e.forEach(e=>{let i=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;i!==void 0&&n(i,r)&&(t=e,r=i)}),t},`findClosestParent`),Ce=i(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=i((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=i(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=i(e=>Te(e)+M,`calculateCommitPosition`),De=i((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=i((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=i((e,t,n,r,i,a)=>{let{theme:o}=_(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=i((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel)){if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}}},`drawCommitLabel`),je=i((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
1
+ import{g as e,i as t,m as n}from"./chunk-75Z2AOVW-CQwn0kLg.js";import{n as r}from"./mermaid-parser.core-CItPmOJr.js";import{n as i}from"./chunk-Y2CYZVJY-DsF7k-Jl.js";import{m as a,p as o}from"./src-B6xuSHsQ.js";import{H as s,K as c,U as l,Y as u,a as d,b as f,f as p,s as m,v as h,w as g,x as _,y as v}from"./chunk-DU6HZSFF-CBseBY69.js";import{t as y}from"./chunk-JWPE2WC7-DVXcaiue.js";import{t as b}from"./chunk-2Q5K7J3B-C1jixKkw.js";var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ee=p.gitGraph,S=i(()=>t({...ee,...f().gitGraph}),`getConfig`),C=new b(()=>{let e=S(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function w(){return n({length:7})}i(w,`getID`);function T(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}i(T,`uniqBy`);var te=i(function(e){C.records.direction=e},`setDirection`),ne=i(function(e){a.debug(`options str`,e),e=e?.trim(),e||=`{}`;try{C.records.options=JSON.parse(e)}catch(e){a.error(`error while parsing gitGraph options`,e.message)}},`setOptions`),re=i(function(){return C.records.options},`getOptions`),ie=i(function(e){let t=e.msg,n=e.id,r=e.type,i=e.tags;a.info(`commit`,t,n,r,i),a.debug(`Entering commit:`,t,n,r,i);let o=S();n=m.sanitizeText(n,o),t=m.sanitizeText(t,o),i=i?.map(e=>m.sanitizeText(e,o));let s={id:n||C.records.seq+`-`+w(),message:t,seq:C.records.seq++,type:r??x.NORMAL,tags:i??[],parents:C.records.head==null?[]:[C.records.head.id],branch:C.records.currBranch};C.records.head=s,a.info(`main branch`,o.mainBranchName),C.records.commits.has(s.id)&&a.warn(`Commit ID ${s.id} already exists`),C.records.commits.set(s.id,s),C.records.branches.set(C.records.currBranch,s.id),a.debug(`in pushCommit `+s.id)},`commit`),ae=i(function(e){let t=e.name,n=e.order;if(t=m.sanitizeText(t,S()),C.records.branches.has(t))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${t}")`);C.records.branches.set(t,C.records.head==null?null:C.records.head.id),C.records.branchConfig.set(t,{name:t,order:n}),E(t),a.debug(`in createBranch`)},`branch`),oe=i(e=>{let t=e.branch,n=e.id,r=e.type,i=e.tags,o=S();t=m.sanitizeText(t,o),n&&=m.sanitizeText(n,o);let s=C.records.branches.get(C.records.currBranch),c=C.records.branches.get(t),l=s?C.records.commits.get(s):void 0,u=c?C.records.commits.get(c):void 0;if(l&&u&&l.branch===t)throw Error(`Cannot merge branch '${t}' into itself.`);if(C.records.currBranch===t){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`commit`]},e}if(!C.records.branches.has(t)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) does not exist`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch ${t}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+t+`) has no commits`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${t}`,token:`merge ${t}`,expected:[`branch abc`]},e}if(n&&C.records.commits.has(n)){let e=Error(`Incorrect usage of "merge". Commit with id:`+n+` already exists, use different custom id`);throw e.hash={text:`merge ${t} ${n} ${r} ${i?.join(` `)}`,token:`merge ${t} ${n} ${r} ${i?.join(` `)}`,expected:[`merge ${t} ${n}_UNIQUE ${r} ${i?.join(` `)}`]},e}let d=c||``,f={id:n||`${C.records.seq}-${w()}`,message:`merged branch ${t} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,d],branch:C.records.currBranch,type:x.MERGE,customType:r,customId:!!n,tags:i??[]};C.records.head=f,C.records.commits.set(f.id,f),C.records.branches.set(C.records.currBranch,f.id),a.debug(C.records.branches),a.debug(`in mergeBranch`)},`merge`),se=i(function(e){let t=e.id,n=e.targetId,r=e.tags,i=e.parent;a.debug(`Entering cherryPick:`,t,n,r);let o=S();if(t=m.sanitizeText(t,o),n=m.sanitizeText(n,o),r=r?.map(e=>m.sanitizeText(e,o)),i=m.sanitizeText(i,o),!t||!C.records.commits.has(t)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let s=C.records.commits.get(t);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(i&&!(Array.isArray(s.parents)&&s.parents.includes(i)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===x.MERGE&&!i)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!n||!C.records.commits.has(n)){if(c===C.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let e=C.records.branches.get(C.records.currBranch);if(e===void 0||!e){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let o=C.records.commits.get(e);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${C.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${t} ${n}`,token:`cherryPick ${t} ${n}`,expected:[`cherry-pick abc`]},e}let l={id:C.records.seq+`-`+w(),message:`cherry-picked ${s?.message} into ${C.records.currBranch}`,seq:C.records.seq++,parents:C.records.head==null?[]:[C.records.head.id,s.id],branch:C.records.currBranch,type:x.CHERRY_PICK,tags:r?r.filter(Boolean):[`cherry-pick:${s.id}${s.type===x.MERGE?`|parent:${i}`:``}`]};C.records.head=l,C.records.commits.set(l.id,l),C.records.branches.set(C.records.currBranch,l.id),a.debug(C.records.branches),a.debug(`in cherryPick`)}},`cherryPick`),E=i(function(e){if(e=m.sanitizeText(e,S()),C.records.branches.has(e)){C.records.currBranch=e;let t=C.records.branches.get(C.records.currBranch);t===void 0||!t?C.records.head=null:C.records.head=C.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function D(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}i(D,`upsert`);function O(e){let t=e.reduce((e,t)=>e.seq>t.seq?e:t,e[0]),n=``;e.forEach(function(e){n+=e===t?` *`:` |`});let r=[n,t.id,t.seq];for(let e in C.records.branches)C.records.branches.get(e)===t.id&&r.push(e);if(a.debug(r.join(` `)),t.parents&&t.parents.length==2&&t.parents[0]&&t.parents[1]){let n=C.records.commits.get(t.parents[0]);D(e,t,n),t.parents[1]&&e.push(C.records.commits.get(t.parents[1]))}else if(t.parents.length==0)return;else if(t.parents[0]){let n=C.records.commits.get(t.parents[0]);D(e,t,n)}e=T(e,e=>e.id),O(e)}i(O,`prettyPrintCommitHistory`);var ce=i(function(){a.debug(C.records.commits);let e=k()[0];O([e])},`prettyPrint`),le=i(function(){C.reset(),d()},`clear`),ue=i(function(){return[...C.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),de=i(function(){return C.records.branches},`getBranches`),fe=i(function(){return C.records.commits},`getCommits`),k=i(function(){let e=[...C.records.commits.values()];return e.forEach(function(e){a.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},`getCommitsArray`),A={commitType:x,getConfig:S,setDirection:te,setOptions:ne,getOptions:re,commit:ie,branch:ae,merge:oe,cherryPick:se,checkout:E,prettyPrint:ce,clear:le,getBranchesAsObjArray:ue,getBranches:de,getCommits:fe,getCommitsArray:k,getCurrentBranch:i(function(){return C.records.currBranch},`getCurrentBranch`),getDirection:i(function(){return C.records.direction},`getDirection`),getHead:i(function(){return C.records.head},`getHead`),setAccTitle:l,getAccTitle:v,getAccDescription:h,setAccDescription:s,setDiagramTitle:c,getDiagramTitle:g},pe=i((e,t)=>{y(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)me(n,t)},`populate`),me=i((e,t)=>{let n={Commit:i(e=>t.commit(he(e)),`Commit`),Branch:i(e=>t.branch(ge(e)),`Branch`),Merge:i(e=>t.merge(_e(e)),`Merge`),Checkout:i(e=>t.checkout(ve(e)),`Checkout`),CherryPicking:i(e=>t.cherryPick(ye(e)),`CherryPicking`)}[e.$type];n?n(e):a.error(`Unknown statement type: ${e.$type}`)},`parseStatement`),he=i(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?x.NORMAL:x[e.type],tags:e.tags??void 0}),`parseCommit`),ge=i(e=>({name:e.name,order:e.order??0}),`parseBranch`),_e=i(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:x[e.type],tags:e.tags??void 0}),`parseMerge`),ve=i(e=>e.branch,`parseCheckout`),ye=i(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),be={parse:i(async e=>{let t=await r(`gitGraph`,e);a.debug(t),pe(t,A)},`parse`)},j=10,M=40,N=4,P=2,F=8,I=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]),L=12,R=new Set([`redux-color`,`redux-dark-color`]),xe=new Set([`dark`,`redux-dark`,`redux-dark-color`,`neo-dark`]),z=i((e,t,n=!1)=>n&&e>0?(e-1)%(t-1)+1:e%t,`calcColorIndex`),B=new Map,V=new Map,H=30,U=new Map,W=[],G=0,K=`LR`,Se=i(()=>{B.clear(),V.clear(),U.clear(),G=0,W=[],K=`LR`},`clear`),q=i(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),J=i(e=>{let t,n,r;return K===`BT`?(n=i((e,t)=>e<=t,`comparisonFunc`),r=1/0):(n=i((e,t)=>e>=t,`comparisonFunc`),r=0),e.forEach(e=>{let i=K===`TB`||K==`BT`?V.get(e)?.y:V.get(e)?.x;i!==void 0&&n(i,r)&&(t=e,r=i)}),t},`findClosestParent`),Ce=i(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=V.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),we=i((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=Ee(n),i=Math.max(r,i)):a.push(n),De(n,r)}),r=i,a.forEach(e=>{Oe(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=Ce(n.parents);r=V.get(e).y-M,r<=i&&(i=r);let t=B.get(n.branch).pos,a=r-j;V.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),Te=i(e=>{let t=J(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=V.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),Ee=i(e=>Te(e)+M,`calculateCommitPosition`),De=i((e,t)=>{let n=B.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+j;return V.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),Oe=i((e,t,n)=>{let r=B.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;V.set(e.id,{x:a,y:i})},`setRootPosition`),ke=i((e,t,n,r,i,a)=>{let{theme:o}=_(),s=I.has(o??``),c=R.has(o??``),l=xe.has(o??``);if(a===x.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10+(s?3:0)).attr(`y`,n.y-10+(s?3:0)).attr(`width`,s?14:20).attr(`height`,s?14:20).attr(`class`,`commit ${t.id} commit-highlight${z(i,F,c)} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6+(s?2:0)).attr(`y`,n.y-6+(s?2:0)).attr(`width`,s?8:12).attr(`height`,s?8:12).attr(`class`,`commit ${t.id} commit${z(i,F,c)} ${r}-inner`);else if(a===x.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,s?7:10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,s?2.5:2.75).attr(`fill`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,l?`#000000`:`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,s?7:10),o.attr(`class`,`commit ${t.id} commit${z(i,F,c)}`),a===x.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,s?5:6),a.attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}if(a===x.REVERSE){let a=e.append(`path`),o=s?4:5;a.attr(`d`,`M ${n.x-o},${n.y-o}L${n.x+o},${n.y+o}M${n.x-o},${n.y+o}L${n.x+o},${n.y-o}`).attr(`class`,`commit ${r} ${t.id} commit${z(i,F,c)}`)}}},`drawCommitBullet`),Ae=i((e,t,n,r,i)=>{if(t.type!==x.CHERRY_PICK&&(t.customId&&t.type===x.MERGE||t.type!==x.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-P).attr(`y`,n.y+13.5).attr(`width`,c.width+2*P).attr(`height`,c.height+2*P),K===`TB`||K===`BT`?(o.attr(`x`,n.x-(c.width+4*N+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*N)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel)){if(K===`TB`||K===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}}},`drawCommitLabel`),je=i((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
2
2
  ${r-a/2-N/2},${l+P}
3
3
  ${r-a/2-N/2},${l-P}
4
4
  ${n.posWithOffset-a/2-N},${l-s-P}