@antdv-next/x 1.0.2-beta.2 → 1.0.2-beta.4

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 (130) hide show
  1. package/dist/actions/Actions.js +1 -1
  2. package/dist/attachments/index.js +1 -1
  3. package/dist/conversations/index.js +1 -1
  4. package/dist/file-card/FileCard.js +1 -1
  5. package/dist/file-card/List.js +1 -1
  6. package/dist/index.umd.js +25 -25
  7. package/dist/locale/useLocale.js +1 -1
  8. package/dist/mermaid/Mermaid.js +1 -1
  9. package/dist/package.js +1 -1
  10. package/dist/prompts/Prompts.js +1 -1
  11. package/dist/sender/Sender.js +1 -1
  12. package/dist/sender/SenderHeader.js +1 -1
  13. package/dist/sender/SenderSwitch.js +1 -1
  14. package/dist/sources/Sources.js +1 -1
  15. package/dist/suggestion/Suggestion.js +1 -1
  16. package/dist/theme/genStyleUtils.js +1 -1
  17. package/dist/think/Think.js +1 -1
  18. package/dist/thought-chain/Item.js +1 -1
  19. package/dist/thought-chain/Node.js +1 -1
  20. package/dist/thought-chain/ThoughtChain.js +1 -1
  21. package/dist/welcome/index.js +1 -1
  22. package/dist/x-provider/hooks/use-x-provider-context.js +1 -1
  23. package/es/{Serializer-y_SfSPKv.js → Serializer-D1JYN1kI.js} +4 -4
  24. package/es/{_basePickBy-DPqob0cQ.js → _basePickBy-DFHEGO2M.js} +23 -23
  25. package/es/{_baseUniq-AMhRdOMz.js → _baseUniq-BlS7rXTs.js} +83 -83
  26. package/es/antdv-next-x.esm.js +44833 -7290
  27. package/es/{arc-caEkbRYF.js → arc-BuXEd18J.js} +3 -3
  28. package/es/architecture-PBZL5I3N-D7tS55xM.js +3 -0
  29. package/es/{architectureDiagram-2XIMDMQ5-ZOgJV9Kg.js → architectureDiagram-2XIMDMQ5-CmfsCwJk.js} +85 -85
  30. package/es/{blockDiagram-WCTKOSBZ-8iZwAKBK.js → blockDiagram-WCTKOSBZ-lJAan65A.js} +530 -530
  31. package/es/{c4Diagram-IC4MRINW-DrH9eRMR.js → c4Diagram-IC4MRINW-B1c2x_1Q.js} +170 -170
  32. package/es/channel-DFgF_2F7.js +5 -0
  33. package/es/{chunk-4BX2VUAB-DUVpjbJi.js → chunk-4BX2VUAB-J2N81Fpp.js} +2 -2
  34. package/es/{chunk-55IACEB6-RlJ-J3tE.js → chunk-55IACEB6-DGtfGRgi.js} +2 -2
  35. package/es/{chunk-7E7YKBS2-ChLFamzc.js → chunk-7E7YKBS2-CL2d4WAf.js} +2 -2
  36. package/es/{chunk-7R4GIKGN-B9vamSzt.js → chunk-7R4GIKGN-QT6IorJ_.js} +3 -3
  37. package/es/{chunk-C72U2L5F-BV-rXau1.js → chunk-C72U2L5F-OHTVpS-m.js} +2 -2
  38. package/es/{chunk-EGIJ26TM-GvsuORRL.js → chunk-EGIJ26TM-DyMPGYrB.js} +2 -2
  39. package/es/{chunk-FMBD7UC4-D6ZlqqMC.js → chunk-FMBD7UC4-DCcRjunY.js} +2 -2
  40. package/es/{chunk-GEFDOKGD-DM6dsEsk.js → chunk-GEFDOKGD-BWpC-zoH.js} +278 -278
  41. package/es/chunk-GLR3WWYH-DiXcKb5Y.js +41 -0
  42. package/es/{chunk-HHEYEP7N-FVfYw94p.js → chunk-HHEYEP7N-Cxc7E4dX.js} +3 -3
  43. package/es/{chunk-JSJVCQXG-Wr9uPcCh.js → chunk-JSJVCQXG-D8_heHOp.js} +4 -4
  44. package/es/{chunk-KX2RTZJC-BGffjoxB.js → chunk-KX2RTZJC-D5cc4rj6.js} +3 -3
  45. package/es/{chunk-KYZI473N-Bit5smNE.js → chunk-KYZI473N-BHJ3T5Zv.js} +573 -573
  46. package/es/{chunk-L3YUKLVL-DBuHDpQ2.js → chunk-L3YUKLVL-7oGaUOdc.js} +2 -2
  47. package/es/{chunk-MX3YWQON-Cbj2WwUZ.js → chunk-MX3YWQON-BxE-Aq9c.js} +2 -2
  48. package/es/{chunk-NQ4KR5QH-FPQ-IHJN.js → chunk-NQ4KR5QH-EYQBXkqP.js} +120 -120
  49. package/es/{chunk-O4XLMI2P-BCDk0ZIW.js → chunk-O4XLMI2P-qjOoGpnx.js} +238 -238
  50. package/es/{chunk-OZEHJAEY-BZ24IOgQ.js → chunk-OZEHJAEY-D82nx27s.js} +2 -2
  51. package/es/{chunk-PQ6SQG4A-DpwBx6Hx.js → chunk-PQ6SQG4A-D3jtNCWN.js} +3 -3
  52. package/es/{chunk-PU5JKC2W-BNpJuXxn.js → chunk-PU5JKC2W-DdP8BS-S.js} +76 -76
  53. package/es/{chunk-QZHKN3VN-NEMwPryC.js → chunk-QZHKN3VN-CW3cFN-h.js} +2 -2
  54. package/es/{chunk-R5LLSJPH-g44vgerl.js → chunk-R5LLSJPH-CreI2kO9.js} +2 -2
  55. package/es/{chunk-WL4C6EOR-B6l-Yy2t.js → chunk-WL4C6EOR-BDbxJyGk.js} +120 -120
  56. package/es/{chunk-XIRO2GV7-CaFInIOW.js → chunk-XIRO2GV7-S5KkbVnN.js} +2 -2
  57. package/es/{chunk-XPW4576I-Cp1j6iTN.js → chunk-XPW4576I-B0KVSHwE.js} +2 -2
  58. package/es/{chunk-XZSTWKYB-CGk7ipHd.js → chunk-XZSTWKYB-CucN1XvM.js} +93 -93
  59. package/es/{chunk-YBOYWFTD-dOTBpTYs.js → chunk-YBOYWFTD-CvaddD9G.js} +8 -8
  60. package/es/classDiagram-VBA2DB6C-Co3LMmg8.js +29 -0
  61. package/es/classDiagram-v2-RAHNMMFH-BZscgdF2.js +29 -0
  62. package/es/clone-r3YukIBB.js +8 -0
  63. package/es/{cose-bilkent-S5V4N54A-DlmXyn6m.js → cose-bilkent-S5V4N54A-B5OQuIhl.js} +3 -3
  64. package/es/{cytoscape.esm-BY3wHcbp.js → cytoscape.esm-i2CZcWd-.js} +1 -1
  65. package/es/{dagre-B1qTL793.js → dagre-5aGJFKmT.js} +57 -57
  66. package/es/dagre-KLK3FWXG-BI5QQMXo.js +294 -0
  67. package/es/{defaultLocale-BaPFSbai.js → defaultLocale-bckJcYh1.js} +12 -12
  68. package/es/{diagram-E7M64L7V-Dnd8N74o.js → diagram-E7M64L7V-Dz62Vz_a.js} +83 -83
  69. package/es/{diagram-IFDJBPK2-Dan7RsGr.js → diagram-IFDJBPK2-9fjvFkSc.js} +31 -31
  70. package/es/{diagram-P4PSJMXO-DwKJpttH.js → diagram-P4PSJMXO-BlX6jFjZ.js} +32 -32
  71. package/es/{dist-DltyvPj3.js → dist-BX_roQzC.js} +1 -1
  72. package/es/{erDiagram-INFDFZHY-CGO6k23w.js → erDiagram-INFDFZHY-BcRXu8Cp.js} +128 -128
  73. package/es/{flowDiagram-PKNHOUZH-DFN1GsRx.js → flowDiagram-PKNHOUZH-UeyfgU8z.js} +156 -156
  74. package/es/{ganttDiagram-A5KZAMGK-Cf5NxH1w.js → ganttDiagram-A5KZAMGK-txCzqgQ5.js} +625 -622
  75. package/es/gitGraph-HDMCJU4V-CxsS0Qr1.js +3 -0
  76. package/es/{gitGraphDiagram-K3NZZRJ6-BgE6aSZO.js → gitGraphDiagram-K3NZZRJ6-DghWYaFU.js} +176 -176
  77. package/es/{graphlib-DFxSohCv.js → graphlib-dRkI1OCL.js} +4 -4
  78. package/es/{html-C2-_98S6.js → html-B6UxjOv0.js} +1 -1
  79. package/es/html-Hb1oe8XT.js +2 -0
  80. package/es/info-3K5VOQVL-COqdvM99.js +3 -0
  81. package/es/{infoDiagram-LFFYTUFH-WcApcdl5.js → infoDiagram-LFFYTUFH-CA-vlAvP.js} +5 -5
  82. package/es/{init-PAs0hR-b.js → init-B75p2clj.js} +1 -1
  83. package/es/{isArrayLikeObject-BEG9p74d.js → isArrayLikeObject-jl2bjkAJ.js} +80 -80
  84. package/es/{isEmpty-B1YrVV8B.js → isEmpty-CmA-HYrg.js} +3 -3
  85. package/es/{ishikawaDiagram-PHBUUO56-DwK7J31a.js → ishikawaDiagram-PHBUUO56-DjdpS9Lb.js} +67 -67
  86. package/es/{journeyDiagram-4ABVD52K-CWuA57by.js → journeyDiagram-4ABVD52K-CIJfC1fp.js} +6 -6
  87. package/es/{kanban-definition-K7BYSVSG-DBt3gYRQ.js → kanban-definition-K7BYSVSG-CC2vwGck.js} +11 -11
  88. package/es/{katex-OR8z_f6I.js → katex-DCMiIo1z.js} +1 -1
  89. package/es/{line-zOBKZCP5.js → line-Cu9NTacD.js} +4 -4
  90. package/es/{linear-DttXWw4q.js → linear-C0rAYYmp.js} +23 -23
  91. package/es/{math-DPzKeDKn.js → math-CoDOuve-.js} +1 -1
  92. package/es/{mermaid-parser.core-CWNEdmZ_.js → mermaid-parser.core-7Wn2L29P.js} +16 -16
  93. package/es/{mermaid.core-DPBXXViR.js → mermaid.core-Bvy_Q6Hu.js} +208 -208
  94. package/es/{mindmap-definition-YRQLILUH-Bq2xqboX.js → mindmap-definition-YRQLILUH-BzTYDYmK.js} +16 -16
  95. package/es/{ordinal-D8PKtxfM.js → ordinal-F3U6aXtP.js} +3 -3
  96. package/es/packet-RMMSAZCW-2PTjWKLd.js +3 -0
  97. package/es/{path-DZ-6AyWK.js → path-Dm3C8WEs.js} +3 -3
  98. package/es/pie-UPGHQEXC-Du8-k-EA.js +3 -0
  99. package/es/{pieDiagram-SKSYHLDU-D4iMzwzH.js → pieDiagram-SKSYHLDU-COvqE_C6.js} +32 -32
  100. package/es/{quadrantDiagram-337W2JSQ-DSbXC0z6.js → quadrantDiagram-337W2JSQ-Dgv8ccjt.js} +4 -4
  101. package/es/radar-KQ55EAFF-jJOhyjxC.js +3 -0
  102. package/es/{requirementDiagram-Z7DCOOCP-D7eLn3fs.js → requirementDiagram-Z7DCOOCP-B2NyhxO-.js} +59 -59
  103. package/es/{rough.esm-C_hJ3ICT.js → rough.esm-BhGP2Udb.js} +1 -1
  104. package/es/{sankeyDiagram-WA2Y5GQK-DN5ZPgWU.js → sankeyDiagram-WA2Y5GQK-BfnH_gpl.js} +18 -18
  105. package/es/{sequenceDiagram-2WXFIKYE-CRFEBP8-.js → sequenceDiagram-2WXFIKYE-DXssVQOF.js} +390 -390
  106. package/es/{src-BH16DVv0.js → src-CUQ6oOYk.js} +86 -86
  107. package/es/{stateDiagram-RAJIS63D-CfO23QJX.js → stateDiagram-RAJIS63D-DvDLfupV.js} +68 -68
  108. package/es/stateDiagram-v2-FVOUBMTO-DIXyaX9W.js +27 -0
  109. package/es/{timeline-definition-YZTLITO2-DmpPrD-3.js → timeline-definition-YZTLITO2-ErcRjbZf.js} +4 -4
  110. package/es/treemap-KZPCXAKY-CvZAIYVa.js +3 -0
  111. package/es/{vennDiagram-LZ73GAT5-B80Xr4jV.js → vennDiagram-LZ73GAT5-CDTZUtc8.js} +107 -107
  112. package/es/{vue-DTiWrQBM.js → vue-2aJw7p5p.js} +2 -2
  113. package/es/{vue-html-BG3Xflut.js → vue-html-DEjI8X9t.js} +1 -1
  114. package/es/{xychartDiagram-JWTSCODW-DvQyPDr4.js → xychartDiagram-JWTSCODW-Y21jBOTg.js} +103 -103
  115. package/package.json +1 -1
  116. package/es/architecture-PBZL5I3N-CBmkTWjb.js +0 -3
  117. package/es/channel-DIQFjdG3.js +0 -5
  118. package/es/chunk-GLR3WWYH-CqFdLic9.js +0 -41
  119. package/es/classDiagram-VBA2DB6C-B3yBiQy3.js +0 -29
  120. package/es/classDiagram-v2-RAHNMMFH-jbFYm_Xj.js +0 -29
  121. package/es/clone-DXVS0uSx.js +0 -8
  122. package/es/dagre-KLK3FWXG-CEhXRLVR.js +0 -294
  123. package/es/gitGraph-HDMCJU4V-CrEEHSZS.js +0 -3
  124. package/es/html-JbFqcNgP.js +0 -2
  125. package/es/info-3K5VOQVL-Dg3DCp4F.js +0 -3
  126. package/es/packet-RMMSAZCW-Dk7mKMJ4.js +0 -3
  127. package/es/pie-UPGHQEXC-CnM5YLNO.js +0 -3
  128. package/es/radar-KQ55EAFF-BwfADDx8.js +0 -3
  129. package/es/stateDiagram-v2-FVOUBMTO-BGWbXepL.js +0 -27
  130. package/es/treemap-KZPCXAKY-BWfn7JxQ.js +0 -3
@@ -1,17 +1,17 @@
1
- import { h as e, p as t, r as n } from "./chunk-GEFDOKGD-DM6dsEsk.js";
2
- import { g as r, h as i, p as a } from "./src-BH16DVv0.js";
3
- import { B as o, C as s, V as c, W as l, _ as u, a as d, d as f, q as ee, s as p, v as te, y as m } from "./chunk-7R4GIKGN-B9vamSzt.js";
4
- import { t as h } from "./chunk-4BX2VUAB-DUVpjbJi.js";
5
- import { t as g } from "./mermaid-parser.core-CWNEdmZ_.js";
6
- import { t as ne } from "./chunk-QZHKN3VN-NEMwPryC.js";
7
- //#region ../../node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-K3NZZRJ6.mjs
1
+ import { g as e, h as t, p as n } from "./src-CUQ6oOYk.js";
2
+ import { h as r, p as i, r as a } from "./chunk-GEFDOKGD-BWpC-zoH.js";
3
+ import { B as o, C as s, V as c, W as l, _ as u, a as d, d as f, q as ee, s as p, v as te, y as m } from "./chunk-7R4GIKGN-QT6IorJ_.js";
4
+ import { t as h } from "./chunk-4BX2VUAB-J2N81Fpp.js";
5
+ import { t as g } from "./mermaid-parser.core-7Wn2L29P.js";
6
+ import { t as ne } from "./chunk-QZHKN3VN-CW3cFN-h.js";
7
+ //#region ../../node_modules/.pnpm/mermaid@11.13.0/node_modules/mermaid/dist/chunks/mermaid.core/gitGraphDiagram-K3NZZRJ6.mjs
8
8
  var _ = {
9
9
  NORMAL: 0,
10
10
  REVERSE: 1,
11
11
  HIGHLIGHT: 2,
12
12
  MERGE: 3,
13
13
  CHERRY_PICK: 4
14
- }, re = f.gitGraph, v = /* @__PURE__ */ i(() => n({
14
+ }, re = f.gitGraph, v = /* @__PURE__ */ t(() => a({
15
15
  ...re,
16
16
  ...m().gitGraph
17
17
  }), "getConfig"), y = new ne(() => {
@@ -32,9 +32,9 @@ var _ = {
32
32
  };
33
33
  });
34
34
  function b() {
35
- return t({ length: 7 });
35
+ return i({ length: 7 });
36
36
  }
37
- i(b, "getID");
37
+ t(b, "getID");
38
38
  function x(e, t) {
39
39
  let n = /* @__PURE__ */ Object.create(null);
40
40
  return e.reduce((e, r) => {
@@ -42,146 +42,146 @@ function x(e, t) {
42
42
  return n[i] || (n[i] = !0, e.push(r)), e;
43
43
  }, []);
44
44
  }
45
- i(x, "uniqBy");
46
- var S = /* @__PURE__ */ i(function(e) {
45
+ t(x, "uniqBy");
46
+ var S = /* @__PURE__ */ t(function(e) {
47
47
  y.records.direction = e;
48
- }, "setDirection"), C = /* @__PURE__ */ i(function(e) {
49
- r.debug("options str", e), e = e?.trim(), e ||= "{}";
48
+ }, "setDirection"), C = /* @__PURE__ */ t(function(t) {
49
+ e.debug("options str", t), t = t?.trim(), t ||= "{}";
50
50
  try {
51
- y.records.options = JSON.parse(e);
52
- } catch (e) {
53
- r.error("error while parsing gitGraph options", e.message);
51
+ y.records.options = JSON.parse(t);
52
+ } catch (t) {
53
+ e.error("error while parsing gitGraph options", t.message);
54
54
  }
55
- }, "setOptions"), ie = /* @__PURE__ */ i(function() {
55
+ }, "setOptions"), ie = /* @__PURE__ */ t(function() {
56
56
  return y.records.options;
57
- }, "getOptions"), ae = /* @__PURE__ */ i(function(e) {
58
- let t = e.msg, n = e.id, i = e.type, a = e.tags;
59
- r.info("commit", t, n, i, a), r.debug("Entering commit:", t, n, i, a);
57
+ }, "getOptions"), ae = /* @__PURE__ */ t(function(t) {
58
+ let n = t.msg, r = t.id, i = t.type, a = t.tags;
59
+ e.info("commit", n, r, i, a), e.debug("Entering commit:", n, r, i, a);
60
60
  let o = v();
61
- n = p.sanitizeText(n, o), t = p.sanitizeText(t, o), a = a?.map((e) => p.sanitizeText(e, o));
61
+ r = p.sanitizeText(r, o), n = p.sanitizeText(n, o), a = a?.map((e) => p.sanitizeText(e, o));
62
62
  let s = {
63
- id: n || y.records.seq + "-" + b(),
64
- message: t,
63
+ id: r || y.records.seq + "-" + b(),
64
+ message: n,
65
65
  seq: y.records.seq++,
66
66
  type: i ?? _.NORMAL,
67
67
  tags: a ?? [],
68
68
  parents: y.records.head == null ? [] : [y.records.head.id],
69
69
  branch: y.records.currBranch
70
70
  };
71
- y.records.head = s, r.info("main branch", o.mainBranchName), y.records.commits.has(s.id) && r.warn(`Commit ID ${s.id} already exists`), y.records.commits.set(s.id, s), y.records.branches.set(y.records.currBranch, s.id), r.debug("in pushCommit " + s.id);
72
- }, "commit"), oe = /* @__PURE__ */ i(function(e) {
73
- let t = e.name, n = e.order;
74
- if (t = p.sanitizeText(t, v()), y.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}")`);
75
- y.records.branches.set(t, y.records.head == null ? null : y.records.head.id), y.records.branchConfig.set(t, {
76
- name: t,
77
- order: n
78
- }), w(t), r.debug("in createBranch");
79
- }, "branch"), se = /* @__PURE__ */ i((e) => {
80
- let t = e.branch, n = e.id, i = e.type, a = e.tags, o = v();
81
- t = p.sanitizeText(t, o), n &&= p.sanitizeText(n, o);
82
- let s = y.records.branches.get(y.records.currBranch), c = y.records.branches.get(t), l = s ? y.records.commits.get(s) : void 0, u = c ? y.records.commits.get(c) : void 0;
83
- if (l && u && l.branch === t) throw Error(`Cannot merge branch '${t}' into itself.`);
84
- if (y.records.currBranch === t) {
71
+ y.records.head = s, e.info("main branch", o.mainBranchName), y.records.commits.has(s.id) && e.warn(`Commit ID ${s.id} already exists`), y.records.commits.set(s.id, s), y.records.branches.set(y.records.currBranch, s.id), e.debug("in pushCommit " + s.id);
72
+ }, "commit"), oe = /* @__PURE__ */ t(function(t) {
73
+ let n = t.name, r = t.order;
74
+ if (n = p.sanitizeText(n, v()), y.records.branches.has(n)) 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 ${n}")`);
75
+ y.records.branches.set(n, y.records.head == null ? null : y.records.head.id), y.records.branchConfig.set(n, {
76
+ name: n,
77
+ order: r
78
+ }), w(n), e.debug("in createBranch");
79
+ }, "branch"), se = /* @__PURE__ */ t((t) => {
80
+ let n = t.branch, r = t.id, i = t.type, a = t.tags, o = v();
81
+ n = p.sanitizeText(n, o), r &&= p.sanitizeText(r, o);
82
+ let s = y.records.branches.get(y.records.currBranch), c = y.records.branches.get(n), l = s ? y.records.commits.get(s) : void 0, u = c ? y.records.commits.get(c) : void 0;
83
+ if (l && u && l.branch === n) throw Error(`Cannot merge branch '${n}' into itself.`);
84
+ if (y.records.currBranch === n) {
85
85
  let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Cannot merge a branch to itself");
86
86
  throw e.hash = {
87
- text: `merge ${t}`,
88
- token: `merge ${t}`,
87
+ text: `merge ${n}`,
88
+ token: `merge ${n}`,
89
89
  expected: ["branch abc"]
90
90
  }, e;
91
91
  }
92
92
  if (l === void 0 || !l) {
93
93
  let e = /* @__PURE__ */ Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`);
94
94
  throw e.hash = {
95
- text: `merge ${t}`,
96
- token: `merge ${t}`,
95
+ text: `merge ${n}`,
96
+ token: `merge ${n}`,
97
97
  expected: ["commit"]
98
98
  }, e;
99
99
  }
100
- if (!y.records.branches.has(t)) {
101
- let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Branch to be merged (" + t + ") does not exist");
100
+ if (!y.records.branches.has(n)) {
101
+ let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Branch to be merged (" + n + ") does not exist");
102
102
  throw e.hash = {
103
- text: `merge ${t}`,
104
- token: `merge ${t}`,
105
- expected: [`branch ${t}`]
103
+ text: `merge ${n}`,
104
+ token: `merge ${n}`,
105
+ expected: [`branch ${n}`]
106
106
  }, e;
107
107
  }
108
108
  if (u === void 0 || !u) {
109
- let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Branch to be merged (" + t + ") has no commits");
109
+ let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Branch to be merged (" + n + ") has no commits");
110
110
  throw e.hash = {
111
- text: `merge ${t}`,
112
- token: `merge ${t}`,
111
+ text: `merge ${n}`,
112
+ token: `merge ${n}`,
113
113
  expected: ["\"commit\""]
114
114
  }, e;
115
115
  }
116
116
  if (l === u) {
117
117
  let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Both branches have same head");
118
118
  throw e.hash = {
119
- text: `merge ${t}`,
120
- token: `merge ${t}`,
119
+ text: `merge ${n}`,
120
+ token: `merge ${n}`,
121
121
  expected: ["branch abc"]
122
122
  }, e;
123
123
  }
124
- if (n && y.records.commits.has(n)) {
125
- let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Commit with id:" + n + " already exists, use different custom id");
124
+ if (r && y.records.commits.has(r)) {
125
+ let e = /* @__PURE__ */ Error("Incorrect usage of \"merge\". Commit with id:" + r + " already exists, use different custom id");
126
126
  throw e.hash = {
127
- text: `merge ${t} ${n} ${i} ${a?.join(" ")}`,
128
- token: `merge ${t} ${n} ${i} ${a?.join(" ")}`,
129
- expected: [`merge ${t} ${n}_UNIQUE ${i} ${a?.join(" ")}`]
127
+ text: `merge ${n} ${r} ${i} ${a?.join(" ")}`,
128
+ token: `merge ${n} ${r} ${i} ${a?.join(" ")}`,
129
+ expected: [`merge ${n} ${r}_UNIQUE ${i} ${a?.join(" ")}`]
130
130
  }, e;
131
131
  }
132
132
  let d = c || "", f = {
133
- id: n || `${y.records.seq}-${b()}`,
134
- message: `merged branch ${t} into ${y.records.currBranch}`,
133
+ id: r || `${y.records.seq}-${b()}`,
134
+ message: `merged branch ${n} into ${y.records.currBranch}`,
135
135
  seq: y.records.seq++,
136
136
  parents: y.records.head == null ? [] : [y.records.head.id, d],
137
137
  branch: y.records.currBranch,
138
138
  type: _.MERGE,
139
139
  customType: i,
140
- customId: !!n,
140
+ customId: !!r,
141
141
  tags: a ?? []
142
142
  };
143
- y.records.head = f, y.records.commits.set(f.id, f), y.records.branches.set(y.records.currBranch, f.id), r.debug(y.records.branches), r.debug("in mergeBranch");
144
- }, "merge"), ce = /* @__PURE__ */ i(function(e) {
145
- let t = e.id, n = e.targetId, i = e.tags, a = e.parent;
146
- r.debug("Entering cherryPick:", t, n, i);
143
+ y.records.head = f, y.records.commits.set(f.id, f), y.records.branches.set(y.records.currBranch, f.id), e.debug(y.records.branches), e.debug("in mergeBranch");
144
+ }, "merge"), ce = /* @__PURE__ */ t(function(t) {
145
+ let n = t.id, r = t.targetId, i = t.tags, a = t.parent;
146
+ e.debug("Entering cherryPick:", n, r, i);
147
147
  let o = v();
148
- if (t = p.sanitizeText(t, o), n = p.sanitizeText(n, o), i = i?.map((e) => p.sanitizeText(e, o)), a = p.sanitizeText(a, o), !t || !y.records.commits.has(t)) {
148
+ if (n = p.sanitizeText(n, o), r = p.sanitizeText(r, o), i = i?.map((e) => p.sanitizeText(e, o)), a = p.sanitizeText(a, o), !n || !y.records.commits.has(n)) {
149
149
  let e = /* @__PURE__ */ Error("Incorrect usage of \"cherryPick\". Source commit id should exist and provided");
150
150
  throw e.hash = {
151
- text: `cherryPick ${t} ${n}`,
152
- token: `cherryPick ${t} ${n}`,
151
+ text: `cherryPick ${n} ${r}`,
152
+ token: `cherryPick ${n} ${r}`,
153
153
  expected: ["cherry-pick abc"]
154
154
  }, e;
155
155
  }
156
- let s = y.records.commits.get(t);
156
+ let s = y.records.commits.get(n);
157
157
  if (s === void 0 || !s) throw Error("Incorrect usage of \"cherryPick\". Source commit id should exist and provided");
158
158
  if (a && !(Array.isArray(s.parents) && s.parents.includes(a))) throw /* @__PURE__ */ Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");
159
159
  let c = s.branch;
160
160
  if (s.type === _.MERGE && !a) throw /* @__PURE__ */ Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");
161
- if (!n || !y.records.commits.has(n)) {
161
+ if (!r || !y.records.commits.has(r)) {
162
162
  if (c === y.records.currBranch) {
163
163
  let e = /* @__PURE__ */ Error("Incorrect usage of \"cherryPick\". Source commit is already on current branch");
164
164
  throw e.hash = {
165
- text: `cherryPick ${t} ${n}`,
166
- token: `cherryPick ${t} ${n}`,
165
+ text: `cherryPick ${n} ${r}`,
166
+ token: `cherryPick ${n} ${r}`,
167
167
  expected: ["cherry-pick abc"]
168
168
  }, e;
169
169
  }
170
- let e = y.records.branches.get(y.records.currBranch);
171
- if (e === void 0 || !e) {
170
+ let t = y.records.branches.get(y.records.currBranch);
171
+ if (t === void 0 || !t) {
172
172
  let e = /* @__PURE__ */ Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);
173
173
  throw e.hash = {
174
- text: `cherryPick ${t} ${n}`,
175
- token: `cherryPick ${t} ${n}`,
174
+ text: `cherryPick ${n} ${r}`,
175
+ token: `cherryPick ${n} ${r}`,
176
176
  expected: ["cherry-pick abc"]
177
177
  }, e;
178
178
  }
179
- let o = y.records.commits.get(e);
179
+ let o = y.records.commits.get(t);
180
180
  if (o === void 0 || !o) {
181
181
  let e = /* @__PURE__ */ Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);
182
182
  throw e.hash = {
183
- text: `cherryPick ${t} ${n}`,
184
- token: `cherryPick ${t} ${n}`,
183
+ text: `cherryPick ${n} ${r}`,
184
+ token: `cherryPick ${n} ${r}`,
185
185
  expected: ["cherry-pick abc"]
186
186
  }, e;
187
187
  }
@@ -194,9 +194,9 @@ var S = /* @__PURE__ */ i(function(e) {
194
194
  type: _.CHERRY_PICK,
195
195
  tags: i ? i.filter(Boolean) : [`cherry-pick:${s.id}${s.type === _.MERGE ? `|parent:${a}` : ""}`]
196
196
  };
197
- y.records.head = l, y.records.commits.set(l.id, l), y.records.branches.set(y.records.currBranch, l.id), r.debug(y.records.branches), r.debug("in cherryPick");
197
+ y.records.head = l, y.records.commits.set(l.id, l), y.records.branches.set(y.records.currBranch, l.id), e.debug(y.records.branches), e.debug("in cherryPick");
198
198
  }
199
- }, "cherryPick"), w = /* @__PURE__ */ i(function(e) {
199
+ }, "cherryPick"), w = /* @__PURE__ */ t(function(e) {
200
200
  if (e = p.sanitizeText(e, v()), y.records.branches.has(e)) {
201
201
  y.records.currBranch = e;
202
202
  let t = y.records.branches.get(y.records.currBranch);
@@ -214,49 +214,49 @@ function T(e, t, n) {
214
214
  let r = e.indexOf(t);
215
215
  r === -1 ? e.push(n) : e.splice(r, 1, n);
216
216
  }
217
- i(T, "upsert");
218
- function E(e) {
219
- let t = e.reduce((e, t) => e.seq > t.seq ? e : t, e[0]), n = "";
220
- e.forEach(function(e) {
221
- e === t ? n += " *" : n += " |";
217
+ t(T, "upsert");
218
+ function E(t) {
219
+ let n = t.reduce((e, t) => e.seq > t.seq ? e : t, t[0]), r = "";
220
+ t.forEach(function(e) {
221
+ e === n ? r += " *" : r += " |";
222
222
  });
223
223
  let i = [
224
- n,
225
- t.id,
226
- t.seq
224
+ r,
225
+ n.id,
226
+ n.seq
227
227
  ];
228
- for (let e in y.records.branches) y.records.branches.get(e) === t.id && i.push(e);
229
- if (r.debug(i.join(" ")), t.parents && t.parents.length == 2 && t.parents[0] && t.parents[1]) {
230
- let n = y.records.commits.get(t.parents[0]);
231
- T(e, t, n), t.parents[1] && e.push(y.records.commits.get(t.parents[1]));
232
- } else if (t.parents.length == 0) return;
233
- else if (t.parents[0]) {
234
- let n = y.records.commits.get(t.parents[0]);
235
- T(e, t, n);
228
+ for (let e in y.records.branches) y.records.branches.get(e) === n.id && i.push(e);
229
+ if (e.debug(i.join(" ")), n.parents && n.parents.length == 2 && n.parents[0] && n.parents[1]) {
230
+ let e = y.records.commits.get(n.parents[0]);
231
+ T(t, n, e), n.parents[1] && t.push(y.records.commits.get(n.parents[1]));
232
+ } else if (n.parents.length == 0) return;
233
+ else if (n.parents[0]) {
234
+ let e = y.records.commits.get(n.parents[0]);
235
+ T(t, n, e);
236
236
  }
237
- e = x(e, (e) => e.id), E(e);
237
+ t = x(t, (e) => e.id), E(t);
238
238
  }
239
- i(E, "prettyPrintCommitHistory");
240
- var le = /* @__PURE__ */ i(function() {
241
- r.debug(y.records.commits);
242
- let e = D()[0];
243
- E([e]);
244
- }, "prettyPrint"), ue = /* @__PURE__ */ i(function() {
239
+ t(E, "prettyPrintCommitHistory");
240
+ var le = /* @__PURE__ */ t(function() {
241
+ e.debug(y.records.commits);
242
+ let t = D()[0];
243
+ E([t]);
244
+ }, "prettyPrint"), ue = /* @__PURE__ */ t(function() {
245
245
  y.reset(), d();
246
- }, "clear"), de = /* @__PURE__ */ i(function() {
246
+ }, "clear"), de = /* @__PURE__ */ t(function() {
247
247
  return [...y.records.branchConfig.values()].map((e, t) => e.order !== null && e.order !== void 0 ? e : {
248
248
  ...e,
249
249
  order: parseFloat(`0.${t}`)
250
250
  }).sort((e, t) => (e.order ?? 0) - (t.order ?? 0)).map(({ name: e }) => ({ name: e }));
251
- }, "getBranchesAsObjArray"), fe = /* @__PURE__ */ i(function() {
251
+ }, "getBranchesAsObjArray"), fe = /* @__PURE__ */ t(function() {
252
252
  return y.records.branches;
253
- }, "getBranches"), pe = /* @__PURE__ */ i(function() {
253
+ }, "getBranches"), pe = /* @__PURE__ */ t(function() {
254
254
  return y.records.commits;
255
- }, "getCommits"), D = /* @__PURE__ */ i(function() {
256
- let e = [...y.records.commits.values()];
257
- return e.forEach(function(e) {
258
- r.debug(e.id);
259
- }), e.sort((e, t) => e.seq - t.seq), e;
255
+ }, "getCommits"), D = /* @__PURE__ */ t(function() {
256
+ let t = [...y.records.commits.values()];
257
+ return t.forEach(function(t) {
258
+ e.debug(t.id);
259
+ }), t.sort((e, t) => e.seq - t.seq), t;
260
260
  }, "getCommitsArray"), O = {
261
261
  commitType: _,
262
262
  getConfig: v,
@@ -274,13 +274,13 @@ var le = /* @__PURE__ */ i(function() {
274
274
  getBranches: fe,
275
275
  getCommits: pe,
276
276
  getCommitsArray: D,
277
- getCurrentBranch: /* @__PURE__ */ i(function() {
277
+ getCurrentBranch: /* @__PURE__ */ t(function() {
278
278
  return y.records.currBranch;
279
279
  }, "getCurrentBranch"),
280
- getDirection: /* @__PURE__ */ i(function() {
280
+ getDirection: /* @__PURE__ */ t(function() {
281
281
  return y.records.direction;
282
282
  }, "getDirection"),
283
- getHead: /* @__PURE__ */ i(function() {
283
+ getHead: /* @__PURE__ */ t(function() {
284
284
  return y.records.head;
285
285
  }, "getHead"),
286
286
  setAccTitle: c,
@@ -289,60 +289,60 @@ var le = /* @__PURE__ */ i(function() {
289
289
  setAccDescription: o,
290
290
  setDiagramTitle: l,
291
291
  getDiagramTitle: s
292
- }, k = /* @__PURE__ */ i((e, t) => {
292
+ }, k = /* @__PURE__ */ t((e, t) => {
293
293
  h(e, t), e.dir && t.setDirection(e.dir);
294
294
  for (let n of e.statements) A(n, t);
295
- }, "populate"), A = /* @__PURE__ */ i((e, t) => {
296
- let n = {
297
- Commit: /* @__PURE__ */ i((e) => t.commit(j(e)), "Commit"),
298
- Branch: /* @__PURE__ */ i((e) => t.branch(M(e)), "Branch"),
299
- Merge: /* @__PURE__ */ i((e) => t.merge(N(e)), "Merge"),
300
- Checkout: /* @__PURE__ */ i((e) => t.checkout(P(e)), "Checkout"),
301
- CherryPicking: /* @__PURE__ */ i((e) => t.cherryPick(F(e)), "CherryPicking")
302
- }[e.$type];
303
- n ? n(e) : r.error(`Unknown statement type: ${e.$type}`);
304
- }, "parseStatement"), j = /* @__PURE__ */ i((e) => ({
295
+ }, "populate"), A = /* @__PURE__ */ t((n, r) => {
296
+ let i = {
297
+ Commit: /* @__PURE__ */ t((e) => r.commit(j(e)), "Commit"),
298
+ Branch: /* @__PURE__ */ t((e) => r.branch(M(e)), "Branch"),
299
+ Merge: /* @__PURE__ */ t((e) => r.merge(N(e)), "Merge"),
300
+ Checkout: /* @__PURE__ */ t((e) => r.checkout(P(e)), "Checkout"),
301
+ CherryPicking: /* @__PURE__ */ t((e) => r.cherryPick(F(e)), "CherryPicking")
302
+ }[n.$type];
303
+ i ? i(n) : e.error(`Unknown statement type: ${n.$type}`);
304
+ }, "parseStatement"), j = /* @__PURE__ */ t((e) => ({
305
305
  id: e.id,
306
306
  msg: e.message ?? "",
307
307
  type: e.type === void 0 ? _.NORMAL : _[e.type],
308
308
  tags: e.tags ?? void 0
309
- }), "parseCommit"), M = /* @__PURE__ */ i((e) => ({
309
+ }), "parseCommit"), M = /* @__PURE__ */ t((e) => ({
310
310
  name: e.name,
311
311
  order: e.order ?? 0
312
- }), "parseBranch"), N = /* @__PURE__ */ i((e) => ({
312
+ }), "parseBranch"), N = /* @__PURE__ */ t((e) => ({
313
313
  branch: e.branch,
314
314
  id: e.id ?? "",
315
315
  type: e.type === void 0 ? void 0 : _[e.type],
316
316
  tags: e.tags ?? void 0
317
- }), "parseMerge"), P = /* @__PURE__ */ i((e) => e.branch, "parseCheckout"), F = /* @__PURE__ */ i((e) => ({
317
+ }), "parseMerge"), P = /* @__PURE__ */ t((e) => e.branch, "parseCheckout"), F = /* @__PURE__ */ t((e) => ({
318
318
  id: e.id,
319
319
  targetId: "",
320
320
  tags: e.tags?.length === 0 ? void 0 : e.tags,
321
321
  parent: e.parent
322
- }), "parseCherryPicking"), I = { parse: /* @__PURE__ */ i(async (e) => {
323
- let t = await g("gitGraph", e);
324
- r.debug(t), k(t, O);
325
- }, "parse") }, L = 10, R = 40, z = 4, B = 2, V = 8, H = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map(), W = 30, G = /* @__PURE__ */ new Map(), K = [], q = 0, J = "LR", me = /* @__PURE__ */ i(() => {
322
+ }), "parseCherryPicking"), I = { parse: /* @__PURE__ */ t(async (t) => {
323
+ let n = await g("gitGraph", t);
324
+ e.debug(n), k(n, O);
325
+ }, "parse") }, L = 10, R = 40, z = 4, B = 2, V = 8, H = /* @__PURE__ */ new Map(), U = /* @__PURE__ */ new Map(), W = 30, G = /* @__PURE__ */ new Map(), K = [], q = 0, J = "LR", me = /* @__PURE__ */ t(() => {
326
326
  H.clear(), U.clear(), G.clear(), q = 0, K = [], J = "LR";
327
- }, "clear"), Y = /* @__PURE__ */ i((e) => {
327
+ }, "clear"), Y = /* @__PURE__ */ t((e) => {
328
328
  let t = document.createElementNS("http://www.w3.org/2000/svg", "text");
329
329
  return (typeof e == "string" ? e.split(/\\n|\n|<br\s*\/?>/gi) : e).forEach((e) => {
330
330
  let n = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
331
331
  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);
332
332
  }), t;
333
- }, "drawText"), X = /* @__PURE__ */ i((e) => {
334
- let t, n, r;
335
- return J === "BT" ? (n = /* @__PURE__ */ i((e, t) => e <= t, "comparisonFunc"), r = Infinity) : (n = /* @__PURE__ */ i((e, t) => e >= t, "comparisonFunc"), r = 0), e.forEach((e) => {
336
- let i = J === "TB" || J == "BT" ? U.get(e)?.y : U.get(e)?.x;
337
- i !== void 0 && n(i, r) && (t = e, r = i);
338
- }), t;
339
- }, "findClosestParent"), he = /* @__PURE__ */ i((e) => {
333
+ }, "drawText"), X = /* @__PURE__ */ t((e) => {
334
+ let n, r, i;
335
+ return J === "BT" ? (r = /* @__PURE__ */ t((e, t) => e <= t, "comparisonFunc"), i = Infinity) : (r = /* @__PURE__ */ t((e, t) => e >= t, "comparisonFunc"), i = 0), e.forEach((e) => {
336
+ let t = J === "TB" || J == "BT" ? U.get(e)?.y : U.get(e)?.x;
337
+ t !== void 0 && r(t, i) && (n = e, i = t);
338
+ }), n;
339
+ }, "findClosestParent"), he = /* @__PURE__ */ t((e) => {
340
340
  let t = "", n = Infinity;
341
341
  return e.forEach((e) => {
342
342
  let r = U.get(e).y;
343
343
  r <= n && (t = e, n = r);
344
344
  }), t || void 0;
345
- }, "findClosestParentBT"), ge = /* @__PURE__ */ i((e, t, n) => {
345
+ }, "findClosestParentBT"), ge = /* @__PURE__ */ t((e, t, n) => {
346
346
  let r = n, i = n, a = [];
347
347
  e.forEach((e) => {
348
348
  let n = t.get(e);
@@ -362,13 +362,13 @@ var le = /* @__PURE__ */ i(function() {
362
362
  });
363
363
  }
364
364
  });
365
- }, "setParallelBTPos"), _e = /* @__PURE__ */ i((e) => {
365
+ }, "setParallelBTPos"), _e = /* @__PURE__ */ t((e) => {
366
366
  let t = X(e.parents.filter((e) => e !== null));
367
367
  if (!t) throw Error(`Closest parent not found for commit ${e.id}`);
368
368
  let n = U.get(t)?.y;
369
369
  if (n === void 0) throw Error(`Closest parent position not found for commit ${e.id}`);
370
370
  return n;
371
- }, "findClosestParentPos"), ve = /* @__PURE__ */ i((e) => _e(e) + R, "calculateCommitPosition"), ye = /* @__PURE__ */ i((e, t) => {
371
+ }, "findClosestParentPos"), ve = /* @__PURE__ */ t((e) => _e(e) + R, "calculateCommitPosition"), ye = /* @__PURE__ */ t((e, t) => {
372
372
  let n = H.get(e.branch);
373
373
  if (!n) throw Error(`Branch not found for commit ${e.id}`);
374
374
  let r = n.pos, i = t + L;
@@ -379,7 +379,7 @@ var le = /* @__PURE__ */ i(function() {
379
379
  x: r,
380
380
  y: i
381
381
  };
382
- }, "setCommitPosition"), be = /* @__PURE__ */ i((e, t, n) => {
382
+ }, "setCommitPosition"), be = /* @__PURE__ */ t((e, t, n) => {
383
383
  let r = H.get(e.branch);
384
384
  if (!r) throw Error(`Branch not found for commit ${e.id}`);
385
385
  let i = t + n, a = r.pos;
@@ -387,7 +387,7 @@ var le = /* @__PURE__ */ i(function() {
387
387
  x: a,
388
388
  y: i
389
389
  });
390
- }, "setRootPosition"), xe = /* @__PURE__ */ i((e, t, n, r, i, a) => {
390
+ }, "setRootPosition"), xe = /* @__PURE__ */ t((e, t, n, r, i, a) => {
391
391
  if (a === _.HIGHLIGHT) e.append("rect").attr("x", n.x - 10).attr("y", n.y - 10).attr("width", 20).attr("height", 20).attr("class", `commit ${t.id} commit-highlight${i % V} ${r}-outer`), e.append("rect").attr("x", n.x - 6).attr("y", n.y - 6).attr("width", 12).attr("height", 12).attr("class", `commit ${t.id} commit${i % V} ${r}-inner`);
392
392
  else if (a === _.CHERRY_PICK) e.append("circle").attr("cx", n.x).attr("cy", n.y).attr("r", 10).attr("class", `commit ${t.id} ${r}`), e.append("circle").attr("cx", n.x - 3).attr("cy", n.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${t.id} ${r}`), e.append("circle").attr("cx", n.x + 3).attr("cy", n.y + 2).attr("r", 2.75).attr("fill", "#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", "#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", "#fff").attr("class", `commit ${t.id} ${r}`);
393
393
  else {
@@ -398,7 +398,7 @@ var le = /* @__PURE__ */ i(function() {
398
398
  }
399
399
  a === _.REVERSE && e.append("path").attr("d", `M ${n.x - 5},${n.y - 5}L${n.x + 5},${n.y + 5}M${n.x - 5},${n.y + 5}L${n.x + 5},${n.y - 5}`).attr("class", `commit ${r} ${t.id} commit${i % V}`);
400
400
  }
401
- }, "drawCommitBullet"), Se = /* @__PURE__ */ i((e, t, n, r, i) => {
401
+ }, "drawCommitBullet"), Se = /* @__PURE__ */ t((e, t, n, r, i) => {
402
402
  if (t.type !== _.CHERRY_PICK && (t.customId && t.type === _.MERGE || t.type !== _.MERGE) && i.showCommitLabel) {
403
403
  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();
404
404
  if (c && (o.attr("x", n.posWithOffset - c.width / 2 - B).attr("y", n.y + 13.5).attr("width", c.width + 2 * B).attr("height", c.height + 2 * B), J === "TB" || J === "BT" ? (o.attr("x", n.x - (c.width + 4 * z + 5)).attr("y", n.y - 12), s.attr("x", n.x - (c.width + 4 * z)).attr("y", n.y + c.height - 12)) : s.attr("x", n.posWithOffset - c.width / 2), i.rotateCommitLabel)) if (J === "TB" || J === "BT") s.attr("transform", "rotate(-45, " + n.x + ", " + n.y + ")"), o.attr("transform", "rotate(-45, " + n.x + ", " + n.y + ")");
@@ -407,7 +407,7 @@ var le = /* @__PURE__ */ i(function() {
407
407
  a.attr("transform", "translate(" + e + ", " + t + ") rotate(-45, " + r + ", " + n.y + ")");
408
408
  }
409
409
  }
410
- }, "drawCommitLabel"), Z = /* @__PURE__ */ i((e, t, n, r) => {
410
+ }, "drawCommitLabel"), Z = /* @__PURE__ */ t((e, t, n, r) => {
411
411
  if (t.tags.length > 0) {
412
412
  let i = 0, a = 0, o = 0, s = [];
413
413
  for (let r of t.tags.reverse()) {
@@ -440,7 +440,7 @@ var le = /* @__PURE__ */ i(function() {
440
440
  }
441
441
  }
442
442
  }
443
- }, "drawCommitTags"), Ce = /* @__PURE__ */ i((e) => {
443
+ }, "drawCommitTags"), Ce = /* @__PURE__ */ t((e) => {
444
444
  switch (e.customType ?? e.type) {
445
445
  case _.NORMAL: return "commit-normal";
446
446
  case _.REVERSE: return "commit-reverse";
@@ -449,7 +449,7 @@ var le = /* @__PURE__ */ i(function() {
449
449
  case _.CHERRY_PICK: return "commit-cherry-pick";
450
450
  default: return "commit-normal";
451
451
  }
452
- }, "getCommitClassType"), we = /* @__PURE__ */ i((e, t, n, r) => {
452
+ }, "getCommitClassType"), we = /* @__PURE__ */ t((e, t, n, r) => {
453
453
  let i = {
454
454
  x: 0,
455
455
  y: 0
@@ -464,7 +464,7 @@ var le = /* @__PURE__ */ i(function() {
464
464
  else if (t === "BT") return (r.get(e.id) ?? i).y - R;
465
465
  else return 0;
466
466
  return 0;
467
- }, "calculatePosition"), Te = /* @__PURE__ */ i((e, t, n) => {
467
+ }, "calculatePosition"), Te = /* @__PURE__ */ t((e, t, n) => {
468
468
  let r = J === "BT" && n ? t : t + L, i = J === "TB" || J === "BT" ? r : H.get(e.branch)?.pos, a = J === "TB" || J === "BT" ? H.get(e.branch)?.pos : r;
469
469
  if (a === void 0 || i === void 0) throw Error(`Position were undefined for commit ${e.id}`);
470
470
  return {
@@ -472,35 +472,35 @@ var le = /* @__PURE__ */ i(function() {
472
472
  y: i,
473
473
  posWithOffset: r
474
474
  };
475
- }, "getCommitPosition"), Q = /* @__PURE__ */ i((e, t, n, r) => {
476
- let a = e.append("g").attr("class", "commit-bullets"), o = e.append("g").attr("class", "commit-labels"), s = J === "TB" || J === "BT" ? W : 0, c = [...t.keys()], l = r.parallelCommits ?? !1, u = /* @__PURE__ */ i((e, n) => {
477
- let r = t.get(e)?.seq, i = t.get(n)?.seq;
475
+ }, "getCommitPosition"), Q = /* @__PURE__ */ t((e, n, r, i) => {
476
+ let a = e.append("g").attr("class", "commit-bullets"), o = e.append("g").attr("class", "commit-labels"), s = J === "TB" || J === "BT" ? W : 0, c = [...n.keys()], l = i.parallelCommits ?? !1, u = /* @__PURE__ */ t((e, t) => {
477
+ let r = n.get(e)?.seq, i = n.get(t)?.seq;
478
478
  return r !== void 0 && i !== void 0 ? r - i : 0;
479
479
  }, "sortKeys"), d = c.sort(u);
480
- J === "BT" && (l && ge(d, t, s), d = d.reverse()), d.forEach((e) => {
481
- let i = t.get(e);
482
- if (!i) throw Error(`Commit not found for key ${e}`);
483
- l && (s = we(i, J, s, U));
484
- let c = Te(i, s, l);
485
- if (n) {
486
- let e = Ce(i), t = i.customType ?? i.type;
487
- xe(a, i, c, e, H.get(i.branch)?.index ?? 0, t), Se(o, i, c, s, r), Z(o, i, c, s);
480
+ J === "BT" && (l && ge(d, n, s), d = d.reverse()), d.forEach((e) => {
481
+ let t = n.get(e);
482
+ if (!t) throw Error(`Commit not found for key ${e}`);
483
+ l && (s = we(t, J, s, U));
484
+ let c = Te(t, s, l);
485
+ if (r) {
486
+ let e = Ce(t), n = t.customType ?? t.type;
487
+ xe(a, t, c, e, H.get(t.branch)?.index ?? 0, n), Se(o, t, c, s, i), Z(o, t, c, s);
488
488
  }
489
- J === "TB" || J === "BT" ? U.set(i.id, {
489
+ J === "TB" || J === "BT" ? U.set(t.id, {
490
490
  x: c.x,
491
491
  y: c.posWithOffset
492
- }) : U.set(i.id, {
492
+ }) : U.set(t.id, {
493
493
  x: c.posWithOffset,
494
494
  y: c.y
495
495
  }), s = J === "BT" && l ? s + R : s + R + L, s > q && (q = s);
496
496
  });
497
- }, "drawCommits"), Ee = /* @__PURE__ */ i((e, t, n, r, a) => {
498
- let o = (J === "TB" || J === "BT" ? n.x < r.x : n.y < r.y) ? t.branch : e.branch, s = /* @__PURE__ */ i((e) => e.branch === o, "isOnBranchToGetCurve"), c = /* @__PURE__ */ i((n) => n.seq > e.seq && n.seq < t.seq, "isBetweenCommits");
497
+ }, "drawCommits"), Ee = /* @__PURE__ */ t((e, n, r, i, a) => {
498
+ let o = (J === "TB" || J === "BT" ? r.x < i.x : r.y < i.y) ? n.branch : e.branch, s = /* @__PURE__ */ t((e) => e.branch === o, "isOnBranchToGetCurve"), c = /* @__PURE__ */ t((t) => t.seq > e.seq && t.seq < n.seq, "isBetweenCommits");
499
499
  return [...a.values()].some((e) => c(e) && s(e));
500
- }, "shouldRerouteArrow"), $ = /* @__PURE__ */ i((e, t, n = 0) => {
500
+ }, "shouldRerouteArrow"), $ = /* @__PURE__ */ t((e, t, n = 0) => {
501
501
  let r = e + Math.abs(e - t) / 2;
502
502
  return n > 5 ? r : K.every((e) => Math.abs(e - r) >= 10) ? (K.push(r), r) : $(e, t - Math.abs(e - t) / 5, n + 1);
503
- }, "findLane"), De = /* @__PURE__ */ i((e, t, n, r) => {
503
+ }, "findLane"), De = /* @__PURE__ */ t((e, t, n, r) => {
504
504
  let i = U.get(t.id), a = U.get(n.id);
505
505
  if (i === void 0 || a === void 0) throw Error(`Commit positions not found for commits ${t.id} and ${n.id}`);
506
506
  let o = Ee(t, n, i, a, r), s = "", c = "", l = 0, u = 0, d = H.get(n.branch)?.index;
@@ -513,7 +513,7 @@ var le = /* @__PURE__ */ i(function() {
513
513
  } else s = "A 20 20, 0, 0, 0,", c = "A 20 20, 0, 0, 1,", l = 20, u = 20, J === "TB" ? (i.x < a.x && (f = n.type === _.MERGE && t.id !== n.parents[0] ? `M ${i.x} ${i.y} L ${i.x} ${a.y - l} ${s} ${i.x + u} ${a.y} L ${a.x} ${a.y}` : `M ${i.x} ${i.y} L ${a.x - l} ${i.y} ${c} ${a.x} ${i.y + u} L ${a.x} ${a.y}`), i.x > a.x && (s = "A 20 20, 0, 0, 0,", c = "A 20 20, 0, 0, 1,", l = 20, u = 20, f = n.type === _.MERGE && t.id !== n.parents[0] ? `M ${i.x} ${i.y} L ${i.x} ${a.y - l} ${c} ${i.x - u} ${a.y} L ${a.x} ${a.y}` : `M ${i.x} ${i.y} L ${a.x + l} ${i.y} ${s} ${a.x} ${i.y + u} L ${a.x} ${a.y}`), i.x === a.x && (f = `M ${i.x} ${i.y} L ${a.x} ${a.y}`)) : J === "BT" ? (i.x < a.x && (f = n.type === _.MERGE && t.id !== n.parents[0] ? `M ${i.x} ${i.y} L ${i.x} ${a.y + l} ${c} ${i.x + u} ${a.y} L ${a.x} ${a.y}` : `M ${i.x} ${i.y} L ${a.x - l} ${i.y} ${s} ${a.x} ${i.y - u} L ${a.x} ${a.y}`), i.x > a.x && (s = "A 20 20, 0, 0, 0,", c = "A 20 20, 0, 0, 1,", l = 20, u = 20, f = n.type === _.MERGE && t.id !== n.parents[0] ? `M ${i.x} ${i.y} L ${i.x} ${a.y + l} ${s} ${i.x - u} ${a.y} L ${a.x} ${a.y}` : `M ${i.x} ${i.y} L ${a.x + l} ${i.y} ${c} ${a.x} ${i.y - u} L ${a.x} ${a.y}`), i.x === a.x && (f = `M ${i.x} ${i.y} L ${a.x} ${a.y}`)) : (i.y < a.y && (f = n.type === _.MERGE && t.id !== n.parents[0] ? `M ${i.x} ${i.y} L ${a.x - l} ${i.y} ${c} ${a.x} ${i.y + u} L ${a.x} ${a.y}` : `M ${i.x} ${i.y} L ${i.x} ${a.y - l} ${s} ${i.x + u} ${a.y} L ${a.x} ${a.y}`), i.y > a.y && (f = n.type === _.MERGE && t.id !== n.parents[0] ? `M ${i.x} ${i.y} L ${a.x - l} ${i.y} ${s} ${a.x} ${i.y - u} L ${a.x} ${a.y}` : `M ${i.x} ${i.y} L ${i.x} ${a.y + l} ${c} ${i.x + u} ${a.y} L ${a.x} ${a.y}`), i.y === a.y && (f = `M ${i.x} ${i.y} L ${a.x} ${a.y}`));
514
514
  if (f === void 0) throw Error("Line definition not found");
515
515
  e.append("path").attr("d", f).attr("class", "arrow arrow" + d % V);
516
- }, "drawArrow"), Oe = /* @__PURE__ */ i((e, t) => {
516
+ }, "drawArrow"), Oe = /* @__PURE__ */ t((e, t) => {
517
517
  let n = e.append("g").attr("class", "commit-arrows");
518
518
  [...t.keys()].forEach((e) => {
519
519
  let r = t.get(e);
@@ -521,7 +521,7 @@ var le = /* @__PURE__ */ i(function() {
521
521
  De(n, t.get(e), r, t);
522
522
  });
523
523
  });
524
- }, "drawArrows"), ke = /* @__PURE__ */ i((e, t, n) => {
524
+ }, "drawArrows"), ke = /* @__PURE__ */ t((e, t, n) => {
525
525
  let r = e.append("g");
526
526
  t.forEach((e, t) => {
527
527
  let i = t % V, a = H.get(e.name)?.pos;
@@ -533,7 +533,7 @@ var le = /* @__PURE__ */ i(function() {
533
533
  let d = c.getBBox();
534
534
  l.attr("class", "branchLabelBkg label" + i).attr("rx", 4).attr("ry", 4).attr("x", -d.width - 4 - (n.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -d.height / 2 + 8).attr("width", d.width + 18).attr("height", d.height + 4), u.attr("transform", "translate(" + (-d.width - 14 - (n.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (a - d.height / 2 - 1) + ")"), J === "TB" ? (l.attr("x", a - d.width / 2 - 10).attr("y", 0), u.attr("transform", "translate(" + (a - d.width / 2 - 5) + ", 0)")) : J === "BT" ? (l.attr("x", a - d.width / 2 - 10).attr("y", q), u.attr("transform", "translate(" + (a - d.width / 2 - 5) + ", " + q + ")")) : l.attr("transform", "translate(-19, " + (a - d.height / 2) + ")");
535
535
  });
536
- }, "drawBranches"), Ae = /* @__PURE__ */ i(function(e, t, n, r, i) {
536
+ }, "drawBranches"), Ae = /* @__PURE__ */ t(function(e, t, n, r, i) {
537
537
  return H.set(e, {
538
538
  pos: t,
539
539
  index: n
@@ -541,26 +541,26 @@ var le = /* @__PURE__ */ i(function() {
541
541
  }, "setBranchPosition"), je = {
542
542
  parser: I,
543
543
  db: O,
544
- renderer: { draw: /* @__PURE__ */ i(function(t, n, i, o) {
545
- me(), r.debug("in gitgraph renderer", t + "\n", "id:", n, i);
544
+ renderer: { draw: /* @__PURE__ */ t(function(t, i, a, o) {
545
+ me(), e.debug("in gitgraph renderer", t + "\n", "id:", i, a);
546
546
  let s = o.db;
547
547
  if (!s.getConfig) {
548
- r.error("getConfig method is not available on db");
548
+ e.error("getConfig method is not available on db");
549
549
  return;
550
550
  }
551
551
  let c = s.getConfig(), l = c.rotateCommitLabel ?? !1;
552
552
  G = s.getCommits();
553
553
  let u = s.getBranchesAsObjArray();
554
554
  J = s.getDirection();
555
- let d = a(`[id="${n}"]`), f = 0;
555
+ let d = n(`[id="${i}"]`), f = 0;
556
556
  u.forEach((e, t) => {
557
557
  let n = Y(e.name), r = d.append("g"), i = r.insert("g").attr("class", "branchLabel"), a = i.insert("g").attr("class", "label branch-label");
558
558
  a.node()?.appendChild(n);
559
559
  let o = n.getBBox();
560
560
  f = Ae(e.name, f, t, o, l), a.remove(), i.remove(), r.remove();
561
- }), Q(d, G, !1, c), c.showBranches && ke(d, u, c), Oe(d, G), Q(d, G, !0, c), e.insertTitle(d, "gitTitleText", c.titleTopMargin ?? 0, s.getDiagramTitle()), ee(void 0, d, c.diagramPadding, c.useMaxWidth);
561
+ }), Q(d, G, !1, c), c.showBranches && ke(d, u, c), Oe(d, G), Q(d, G, !0, c), r.insertTitle(d, "gitTitleText", c.titleTopMargin ?? 0, s.getDiagramTitle()), ee(void 0, d, c.diagramPadding, c.useMaxWidth);
562
562
  }, "draw") },
563
- styles: /* @__PURE__ */ i((e) => `
563
+ styles: /* @__PURE__ */ t((e) => `
564
564
  .commit-id,
565
565
  .commit-msg,
566
566
  .branch-label {