bg-editor 0.0.1

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 (67) hide show
  1. package/LICENSE +8 -0
  2. package/README.md +51 -0
  3. package/README.zh-CN.md +51 -0
  4. package/dist/_basePickBy-4kmg42pS.js +158 -0
  5. package/dist/_baseUniq-WOvvCHTI.js +621 -0
  6. package/dist/arc-wItjmL5I.js +90 -0
  7. package/dist/architecture-U656AL7Q-FYDwFSxk.js +12 -0
  8. package/dist/architectureDiagram-VXUJARFQ-iG5MkBjx.js +4666 -0
  9. package/dist/blockDiagram-VD42YOAC-i2GlXmWy.js +2268 -0
  10. package/dist/c4Diagram-YG6GDRKO-IufO7T1R.js +1587 -0
  11. package/dist/channel-Dah4F59k.js +12 -0
  12. package/dist/chunk-4BX2VUAB-5_v9rnje.js +15 -0
  13. package/dist/chunk-55IACEB6-BDNtSypP.js +15 -0
  14. package/dist/chunk-B4BG7PRW-DzaYPsfW.js +1382 -0
  15. package/dist/chunk-DI55MBZ5-Buwrprkw.js +1377 -0
  16. package/dist/chunk-FMBD7UC4-BaEPEIWb.js +26 -0
  17. package/dist/chunk-QN33PNHL-DhbA7i5G.js +26 -0
  18. package/dist/chunk-QZHKN3VN-BAb_D1oz.js +22 -0
  19. package/dist/chunk-TZMSLE5B-OU1MJ2do.js +71 -0
  20. package/dist/classDiagram-2ON5EDUG-KStC8v09.js +23 -0
  21. package/dist/classDiagram-v2-WZHVMYZB-KStC8v09.js +23 -0
  22. package/dist/clone-C74UiRbr.js +15 -0
  23. package/dist/cose-bilkent-S5V4N54A-eRXCoix2.js +2612 -0
  24. package/dist/cytoscape.esm-BG3R4uVs.js +18738 -0
  25. package/dist/dagre-6UL2VRFP-Bi83jPQf.js +451 -0
  26. package/dist/defaultLocale-DgmhL6Re.js +178 -0
  27. package/dist/diagram-PSM6KHXK-aW98k2-4.js +539 -0
  28. package/dist/diagram-QEK2KX5R-BR--iNM5.js +224 -0
  29. package/dist/diagram-S2PKOQOG-NTnEy5_O.js +149 -0
  30. package/dist/erDiagram-Q2GNP2WA-C8oZ5c-S.js +848 -0
  31. package/dist/flowDiagram-NV44I4VS-DiKad3Bb.js +1627 -0
  32. package/dist/ganttDiagram-LVOFAZNH-CthzjjJq.js +2506 -0
  33. package/dist/gitGraph-F6HP7TQM-CuXAC0XT.js +12 -0
  34. package/dist/gitGraphDiagram-NY62KEGX-d4KszKqi.js +706 -0
  35. package/dist/graph-CnOTx4E0.js +254 -0
  36. package/dist/index-D6-Wf75-.js +122127 -0
  37. package/dist/info-NVLQJR56-Dhmtdc7O.js +12 -0
  38. package/dist/infoDiagram-ER5ION4S-DedidjTu.js +31 -0
  39. package/dist/init-d639unba.js +23 -0
  40. package/dist/journeyDiagram-XKPGCS4Q-BylvmUWL.js +843 -0
  41. package/dist/kanban-definition-3W4ZIXB7-DGV_aVgU.js +725 -0
  42. package/dist/layout-OXk4OSoz.js +1342 -0
  43. package/dist/linear-CO_vz87n.js +266 -0
  44. package/dist/mermaid-parser.core-CYtF6phW.js +12928 -0
  45. package/dist/mindmap-definition-VGOIOE7T-BU05Y6Vz.js +790 -0
  46. package/dist/ordinal-CofNqUw2.js +68 -0
  47. package/dist/packet-BFZMPI3H-D7H_8Q-U.js +12 -0
  48. package/dist/pie-7BOR55EZ-BNWNcO5Z.js +12 -0
  49. package/dist/pieDiagram-ADFJNKIX-reGTUsiW.js +168 -0
  50. package/dist/quadrantDiagram-AYHSOK5B-NeHOJ0lX.js +1029 -0
  51. package/dist/radar-NHE76QYJ-DrVEcvh1.js +12 -0
  52. package/dist/requirementDiagram-UZGBJVZJ-BE76XNaT.js +857 -0
  53. package/dist/sankeyDiagram-TZEHDZUN-UHfMLEKl.js +817 -0
  54. package/dist/sequenceDiagram-WL72ISMW-62KWnVbh.js +2518 -0
  55. package/dist/stateDiagram-FKZM4ZOC--_CkWvu6.js +270 -0
  56. package/dist/stateDiagram-v2-4FDKWEC3-Dj7ZjAmI.js +23 -0
  57. package/dist/style.css +1 -0
  58. package/dist/timeline-definition-IT6M3QCI-C3Wb0xMN.js +804 -0
  59. package/dist/treemap-KMMF4GRG-Bc8F2dFd.js +12 -0
  60. package/dist/umo-editor.js +16 -0
  61. package/dist/xychartDiagram-PRI3JC2R-D2J307cO.js +1347 -0
  62. package/package.json +200 -0
  63. package/types/index.d.ts +277 -0
  64. package/types/src/components/index.d.ts +9 -0
  65. package/types/src/components/menus/button.vue.d.ts +583 -0
  66. package/types/src/components/modal.vue.d.ts +2 -0
  67. package/types/src/components/tooltip.vue.d.ts +27 -0
@@ -0,0 +1,706 @@
1
+ import "./style.css";
2
+ import { p as Y } from "./chunk-4BX2VUAB-5_v9rnje.js";
3
+ import { I as K } from "./chunk-QZHKN3VN-BAb_D1oz.js";
4
+ import { _ as l, q as U, p as V, s as X, g as J, a as Q, b as Z, l as m, c as rr, d as er, u as tr, C as ar, y as sr, k as C, D as nr, E as or, F as cr, G as ir } from "./index-D6-Wf75-.js";
5
+ import { p as dr } from "./mermaid-parser.core-CYtF6phW.js";
6
+ /**
7
+ * @umoteam/editor 9.0.1
8
+ * @license MIT
9
+ * @author umodoc https://www.umodoc.com
10
+ * @see https://www.umodoc.com
11
+ **/
12
+ var x = {
13
+ NORMAL: 0,
14
+ REVERSE: 1,
15
+ HIGHLIGHT: 2,
16
+ MERGE: 3,
17
+ CHERRY_PICK: 4
18
+ }, hr = cr.gitGraph, I = /* @__PURE__ */ l(() => nr({
19
+ ...hr,
20
+ ...or().gitGraph
21
+ }), "getConfig"), c = new K(() => {
22
+ const t = I(), r = t.mainBranchName, s = t.mainBranchOrder;
23
+ return {
24
+ mainBranchName: r,
25
+ commits: /* @__PURE__ */ new Map(),
26
+ head: null,
27
+ branchConfig: /* @__PURE__ */ new Map([[r, { name: r, order: s }]]),
28
+ branches: /* @__PURE__ */ new Map([[r, null]]),
29
+ currBranch: r,
30
+ direction: "LR",
31
+ seq: 0,
32
+ options: {}
33
+ };
34
+ });
35
+ function A() {
36
+ return ir({ length: 7 });
37
+ }
38
+ l(A, "getID");
39
+ function F(t, r) {
40
+ const s = /* @__PURE__ */ Object.create(null);
41
+ return t.reduce((n, e) => {
42
+ const a = r(e);
43
+ return s[a] || (s[a] = !0, n.push(e)), n;
44
+ }, []);
45
+ }
46
+ l(F, "uniqBy");
47
+ var lr = /* @__PURE__ */ l(function(t) {
48
+ c.records.direction = t;
49
+ }, "setDirection"), $r = /* @__PURE__ */ l(function(t) {
50
+ m.debug("options str", t), t = t?.trim(), t = t || "{}";
51
+ try {
52
+ c.records.options = JSON.parse(t);
53
+ } catch (r) {
54
+ m.error("error while parsing gitGraph options", r.message);
55
+ }
56
+ }, "setOptions"), fr = /* @__PURE__ */ l(function() {
57
+ return c.records.options;
58
+ }, "getOptions"), gr = /* @__PURE__ */ l(function(t) {
59
+ let r = t.msg, s = t.id;
60
+ const n = t.type;
61
+ let e = t.tags;
62
+ m.info("commit", r, s, n, e), m.debug("Entering commit:", r, s, n, e);
63
+ const a = I();
64
+ s = C.sanitizeText(s, a), r = C.sanitizeText(r, a), e = e?.map((o) => C.sanitizeText(o, a));
65
+ const d = {
66
+ id: s || c.records.seq + "-" + A(),
67
+ message: r,
68
+ seq: c.records.seq++,
69
+ type: n ?? x.NORMAL,
70
+ tags: e ?? [],
71
+ parents: c.records.head == null ? [] : [c.records.head.id],
72
+ branch: c.records.currBranch
73
+ };
74
+ c.records.head = d, m.info("main branch", a.mainBranchName), c.records.commits.has(d.id) && m.warn(`Commit ID ${d.id} already exists`), c.records.commits.set(d.id, d), c.records.branches.set(c.records.currBranch, d.id), m.debug("in pushCommit " + d.id);
75
+ }, "commit"), yr = /* @__PURE__ */ l(function(t) {
76
+ let r = t.name;
77
+ const s = t.order;
78
+ if (r = C.sanitizeText(r, I()), c.records.branches.has(r))
79
+ throw new Error(
80
+ `Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`
81
+ );
82
+ c.records.branches.set(r, c.records.head != null ? c.records.head.id : null), c.records.branchConfig.set(r, { name: r, order: s }), z(r), m.debug("in createBranch");
83
+ }, "branch"), ur = /* @__PURE__ */ l((t) => {
84
+ let r = t.branch, s = t.id;
85
+ const n = t.type, e = t.tags, a = I();
86
+ r = C.sanitizeText(r, a), s && (s = C.sanitizeText(s, a));
87
+ const d = c.records.branches.get(c.records.currBranch), o = c.records.branches.get(r), f = d ? c.records.commits.get(d) : void 0, h = o ? c.records.commits.get(o) : void 0;
88
+ if (f && h && f.branch === r)
89
+ throw new Error(`Cannot merge branch '${r}' into itself.`);
90
+ if (c.records.currBranch === r) {
91
+ const i = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
92
+ throw i.hash = {
93
+ text: `merge ${r}`,
94
+ token: `merge ${r}`,
95
+ expected: ["branch abc"]
96
+ }, i;
97
+ }
98
+ if (f === void 0 || !f) {
99
+ const i = new Error(
100
+ `Incorrect usage of "merge". Current branch (${c.records.currBranch})has no commits`
101
+ );
102
+ throw i.hash = {
103
+ text: `merge ${r}`,
104
+ token: `merge ${r}`,
105
+ expected: ["commit"]
106
+ }, i;
107
+ }
108
+ if (!c.records.branches.has(r)) {
109
+ const i = new Error(
110
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
111
+ );
112
+ throw i.hash = {
113
+ text: `merge ${r}`,
114
+ token: `merge ${r}`,
115
+ expected: [`branch ${r}`]
116
+ }, i;
117
+ }
118
+ if (h === void 0 || !h) {
119
+ const i = new Error(
120
+ 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
121
+ );
122
+ throw i.hash = {
123
+ text: `merge ${r}`,
124
+ token: `merge ${r}`,
125
+ expected: ['"commit"']
126
+ }, i;
127
+ }
128
+ if (f === h) {
129
+ const i = new Error('Incorrect usage of "merge". Both branches have same head');
130
+ throw i.hash = {
131
+ text: `merge ${r}`,
132
+ token: `merge ${r}`,
133
+ expected: ["branch abc"]
134
+ }, i;
135
+ }
136
+ if (s && c.records.commits.has(s)) {
137
+ const i = new Error(
138
+ 'Incorrect usage of "merge". Commit with id:' + s + " already exists, use different custom id"
139
+ );
140
+ throw i.hash = {
141
+ text: `merge ${r} ${s} ${n} ${e?.join(" ")}`,
142
+ token: `merge ${r} ${s} ${n} ${e?.join(" ")}`,
143
+ expected: [
144
+ `merge ${r} ${s}_UNIQUE ${n} ${e?.join(" ")}`
145
+ ]
146
+ }, i;
147
+ }
148
+ const $ = o || "", g = {
149
+ id: s || `${c.records.seq}-${A()}`,
150
+ message: `merged branch ${r} into ${c.records.currBranch}`,
151
+ seq: c.records.seq++,
152
+ parents: c.records.head == null ? [] : [c.records.head.id, $],
153
+ branch: c.records.currBranch,
154
+ type: x.MERGE,
155
+ customType: n,
156
+ customId: !!s,
157
+ tags: e ?? []
158
+ };
159
+ c.records.head = g, c.records.commits.set(g.id, g), c.records.branches.set(c.records.currBranch, g.id), m.debug(c.records.branches), m.debug("in mergeBranch");
160
+ }, "merge"), pr = /* @__PURE__ */ l(function(t) {
161
+ let r = t.id, s = t.targetId, n = t.tags, e = t.parent;
162
+ m.debug("Entering cherryPick:", r, s, n);
163
+ const a = I();
164
+ if (r = C.sanitizeText(r, a), s = C.sanitizeText(s, a), n = n?.map((f) => C.sanitizeText(f, a)), e = C.sanitizeText(e, a), !r || !c.records.commits.has(r)) {
165
+ const f = new Error(
166
+ 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
167
+ );
168
+ throw f.hash = {
169
+ text: `cherryPick ${r} ${s}`,
170
+ token: `cherryPick ${r} ${s}`,
171
+ expected: ["cherry-pick abc"]
172
+ }, f;
173
+ }
174
+ const d = c.records.commits.get(r);
175
+ if (d === void 0 || !d)
176
+ throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
177
+ if (e && !(Array.isArray(d.parents) && d.parents.includes(e)))
178
+ throw new Error(
179
+ "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
180
+ );
181
+ const o = d.branch;
182
+ if (d.type === x.MERGE && !e)
183
+ throw new Error(
184
+ "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
185
+ );
186
+ if (!s || !c.records.commits.has(s)) {
187
+ if (o === c.records.currBranch) {
188
+ const g = new Error(
189
+ 'Incorrect usage of "cherryPick". Source commit is already on current branch'
190
+ );
191
+ throw g.hash = {
192
+ text: `cherryPick ${r} ${s}`,
193
+ token: `cherryPick ${r} ${s}`,
194
+ expected: ["cherry-pick abc"]
195
+ }, g;
196
+ }
197
+ const f = c.records.branches.get(c.records.currBranch);
198
+ if (f === void 0 || !f) {
199
+ const g = new Error(
200
+ `Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`
201
+ );
202
+ throw g.hash = {
203
+ text: `cherryPick ${r} ${s}`,
204
+ token: `cherryPick ${r} ${s}`,
205
+ expected: ["cherry-pick abc"]
206
+ }, g;
207
+ }
208
+ const h = c.records.commits.get(f);
209
+ if (h === void 0 || !h) {
210
+ const g = new Error(
211
+ `Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`
212
+ );
213
+ throw g.hash = {
214
+ text: `cherryPick ${r} ${s}`,
215
+ token: `cherryPick ${r} ${s}`,
216
+ expected: ["cherry-pick abc"]
217
+ }, g;
218
+ }
219
+ const $ = {
220
+ id: c.records.seq + "-" + A(),
221
+ message: `cherry-picked ${d?.message} into ${c.records.currBranch}`,
222
+ seq: c.records.seq++,
223
+ parents: c.records.head == null ? [] : [c.records.head.id, d.id],
224
+ branch: c.records.currBranch,
225
+ type: x.CHERRY_PICK,
226
+ tags: n ? n.filter(Boolean) : [
227
+ `cherry-pick:${d.id}${d.type === x.MERGE ? `|parent:${e}` : ""}`
228
+ ]
229
+ };
230
+ c.records.head = $, c.records.commits.set($.id, $), c.records.branches.set(c.records.currBranch, $.id), m.debug(c.records.branches), m.debug("in cherryPick");
231
+ }
232
+ }, "cherryPick"), z = /* @__PURE__ */ l(function(t) {
233
+ if (t = C.sanitizeText(t, I()), c.records.branches.has(t)) {
234
+ c.records.currBranch = t;
235
+ const r = c.records.branches.get(c.records.currBranch);
236
+ r === void 0 || !r ? c.records.head = null : c.records.head = c.records.commits.get(r) ?? null;
237
+ } else {
238
+ const r = new Error(
239
+ `Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`
240
+ );
241
+ throw r.hash = {
242
+ text: `checkout ${t}`,
243
+ token: `checkout ${t}`,
244
+ expected: [`branch ${t}`]
245
+ }, r;
246
+ }
247
+ }, "checkout");
248
+ function H(t, r, s) {
249
+ const n = t.indexOf(r);
250
+ n === -1 ? t.push(s) : t.splice(n, 1, s);
251
+ }
252
+ l(H, "upsert");
253
+ function P(t) {
254
+ const r = t.reduce((e, a) => e.seq > a.seq ? e : a, t[0]);
255
+ let s = "";
256
+ t.forEach(function(e) {
257
+ e === r ? s += " *" : s += " |";
258
+ });
259
+ const n = [s, r.id, r.seq];
260
+ for (const e in c.records.branches)
261
+ c.records.branches.get(e) === r.id && n.push(e);
262
+ if (m.debug(n.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
263
+ const e = c.records.commits.get(r.parents[0]);
264
+ H(t, r, e), r.parents[1] && t.push(c.records.commits.get(r.parents[1]));
265
+ } else {
266
+ if (r.parents.length == 0)
267
+ return;
268
+ if (r.parents[0]) {
269
+ const e = c.records.commits.get(r.parents[0]);
270
+ H(t, r, e);
271
+ }
272
+ }
273
+ t = F(t, (e) => e.id), P(t);
274
+ }
275
+ l(P, "prettyPrintCommitHistory");
276
+ var xr = /* @__PURE__ */ l(function() {
277
+ m.debug(c.records.commits);
278
+ const t = N()[0];
279
+ P([t]);
280
+ }, "prettyPrint"), mr = /* @__PURE__ */ l(function() {
281
+ c.reset(), sr();
282
+ }, "clear"), br = /* @__PURE__ */ l(function() {
283
+ return [...c.records.branchConfig.values()].map((r, s) => r.order !== null && r.order !== void 0 ? r : {
284
+ ...r,
285
+ order: parseFloat(`0.${s}`)
286
+ }).sort((r, s) => (r.order ?? 0) - (s.order ?? 0)).map(({ name: r }) => ({ name: r }));
287
+ }, "getBranchesAsObjArray"), wr = /* @__PURE__ */ l(function() {
288
+ return c.records.branches;
289
+ }, "getBranches"), vr = /* @__PURE__ */ l(function() {
290
+ return c.records.commits;
291
+ }, "getCommits"), N = /* @__PURE__ */ l(function() {
292
+ const t = [...c.records.commits.values()];
293
+ return t.forEach(function(r) {
294
+ m.debug(r.id);
295
+ }), t.sort((r, s) => r.seq - s.seq), t;
296
+ }, "getCommitsArray"), Cr = /* @__PURE__ */ l(function() {
297
+ return c.records.currBranch;
298
+ }, "getCurrentBranch"), Er = /* @__PURE__ */ l(function() {
299
+ return c.records.direction;
300
+ }, "getDirection"), Tr = /* @__PURE__ */ l(function() {
301
+ return c.records.head;
302
+ }, "getHead"), S = {
303
+ commitType: x,
304
+ getConfig: I,
305
+ setDirection: lr,
306
+ setOptions: $r,
307
+ getOptions: fr,
308
+ commit: gr,
309
+ branch: yr,
310
+ merge: ur,
311
+ cherryPick: pr,
312
+ checkout: z,
313
+ //reset,
314
+ prettyPrint: xr,
315
+ clear: mr,
316
+ getBranchesAsObjArray: br,
317
+ getBranches: wr,
318
+ getCommits: vr,
319
+ getCommitsArray: N,
320
+ getCurrentBranch: Cr,
321
+ getDirection: Er,
322
+ getHead: Tr,
323
+ setAccTitle: Z,
324
+ getAccTitle: Q,
325
+ getAccDescription: J,
326
+ setAccDescription: X,
327
+ setDiagramTitle: V,
328
+ getDiagramTitle: U
329
+ }, Br = /* @__PURE__ */ l((t, r) => {
330
+ Y(t, r), t.dir && r.setDirection(t.dir);
331
+ for (const s of t.statements)
332
+ Lr(s, r);
333
+ }, "populate"), Lr = /* @__PURE__ */ l((t, r) => {
334
+ const n = {
335
+ Commit: /* @__PURE__ */ l((e) => r.commit(kr(e)), "Commit"),
336
+ Branch: /* @__PURE__ */ l((e) => r.branch(Mr(e)), "Branch"),
337
+ Merge: /* @__PURE__ */ l((e) => r.merge(Ir(e)), "Merge"),
338
+ Checkout: /* @__PURE__ */ l((e) => r.checkout(Rr(e)), "Checkout"),
339
+ CherryPicking: /* @__PURE__ */ l((e) => r.cherryPick(Gr(e)), "CherryPicking")
340
+ }[t.$type];
341
+ n ? n(t) : m.error(`Unknown statement type: ${t.$type}`);
342
+ }, "parseStatement"), kr = /* @__PURE__ */ l((t) => ({
343
+ id: t.id,
344
+ msg: t.message ?? "",
345
+ type: t.type !== void 0 ? x[t.type] : x.NORMAL,
346
+ tags: t.tags ?? void 0
347
+ }), "parseCommit"), Mr = /* @__PURE__ */ l((t) => ({
348
+ name: t.name,
349
+ order: t.order ?? 0
350
+ }), "parseBranch"), Ir = /* @__PURE__ */ l((t) => ({
351
+ branch: t.branch,
352
+ id: t.id ?? "",
353
+ type: t.type !== void 0 ? x[t.type] : void 0,
354
+ tags: t.tags ?? void 0
355
+ }), "parseMerge"), Rr = /* @__PURE__ */ l((t) => t.branch, "parseCheckout"), Gr = /* @__PURE__ */ l((t) => ({
356
+ id: t.id,
357
+ targetId: "",
358
+ tags: t.tags?.length === 0 ? void 0 : t.tags,
359
+ parent: t.parent
360
+ }), "parseCherryPicking"), Or = {
361
+ parse: /* @__PURE__ */ l(async (t) => {
362
+ const r = await dr("gitGraph", t);
363
+ m.debug(r), Br(r, S);
364
+ }, "parse")
365
+ }, qr = rr(), v = qr?.gitGraph, L = 10, k = 40, E = 4, T = 2, M = 8, b = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), O = 30, R = /* @__PURE__ */ new Map(), q = [], B = 0, u = "LR", Ar = /* @__PURE__ */ l(() => {
366
+ b.clear(), w.clear(), R.clear(), B = 0, q = [], u = "LR";
367
+ }, "clear"), W = /* @__PURE__ */ l((t) => {
368
+ const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
369
+ return (typeof t == "string" ? t.split(/\\n|\n|<br\s*\/?>/gi) : t).forEach((n) => {
370
+ const e = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
371
+ e.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), e.setAttribute("dy", "1em"), e.setAttribute("x", "0"), e.setAttribute("class", "row"), e.textContent = n.trim(), r.appendChild(e);
372
+ }), r;
373
+ }, "drawText"), j = /* @__PURE__ */ l((t) => {
374
+ let r, s, n;
375
+ return u === "BT" ? (s = /* @__PURE__ */ l((e, a) => e <= a, "comparisonFunc"), n = 1 / 0) : (s = /* @__PURE__ */ l((e, a) => e >= a, "comparisonFunc"), n = 0), t.forEach((e) => {
376
+ const a = u === "TB" || u == "BT" ? w.get(e)?.y : w.get(e)?.x;
377
+ a !== void 0 && s(a, n) && (r = e, n = a);
378
+ }), r;
379
+ }, "findClosestParent"), _r = /* @__PURE__ */ l((t) => {
380
+ let r = "", s = 1 / 0;
381
+ return t.forEach((n) => {
382
+ const e = w.get(n).y;
383
+ e <= s && (r = n, s = e);
384
+ }), r || void 0;
385
+ }, "findClosestParentBT"), Hr = /* @__PURE__ */ l((t, r, s) => {
386
+ let n = s, e = s;
387
+ const a = [];
388
+ t.forEach((d) => {
389
+ const o = r.get(d);
390
+ if (!o)
391
+ throw new Error(`Commit not found for key ${d}`);
392
+ o.parents.length ? (n = Dr(o), e = Math.max(n, e)) : a.push(o), Fr(o, n);
393
+ }), n = e, a.forEach((d) => {
394
+ zr(d, n, s);
395
+ }), t.forEach((d) => {
396
+ const o = r.get(d);
397
+ if (o?.parents.length) {
398
+ const f = _r(o.parents);
399
+ n = w.get(f).y - k, n <= e && (e = n);
400
+ const h = b.get(o.branch).pos, $ = n - L;
401
+ w.set(o.id, { x: h, y: $ });
402
+ }
403
+ });
404
+ }, "setParallelBTPos"), Pr = /* @__PURE__ */ l((t) => {
405
+ const r = j(t.parents.filter((n) => n !== null));
406
+ if (!r)
407
+ throw new Error(`Closest parent not found for commit ${t.id}`);
408
+ const s = w.get(r)?.y;
409
+ if (s === void 0)
410
+ throw new Error(`Closest parent position not found for commit ${t.id}`);
411
+ return s;
412
+ }, "findClosestParentPos"), Dr = /* @__PURE__ */ l((t) => Pr(t) + k, "calculateCommitPosition"), Fr = /* @__PURE__ */ l((t, r) => {
413
+ const s = b.get(t.branch);
414
+ if (!s)
415
+ throw new Error(`Branch not found for commit ${t.id}`);
416
+ const n = s.pos, e = r + L;
417
+ return w.set(t.id, { x: n, y: e }), { x: n, y: e };
418
+ }, "setCommitPosition"), zr = /* @__PURE__ */ l((t, r, s) => {
419
+ const n = b.get(t.branch);
420
+ if (!n)
421
+ throw new Error(`Branch not found for commit ${t.id}`);
422
+ const e = r + s, a = n.pos;
423
+ w.set(t.id, { x: a, y: e });
424
+ }, "setRootPosition"), Nr = /* @__PURE__ */ l((t, r, s, n, e, a) => {
425
+ if (a === x.HIGHLIGHT)
426
+ t.append("rect").attr("x", s.x - 10).attr("y", s.y - 10).attr("width", 20).attr("height", 20).attr(
427
+ "class",
428
+ `commit ${r.id} commit-highlight${e % M} ${n}-outer`
429
+ ), t.append("rect").attr("x", s.x - 6).attr("y", s.y - 6).attr("width", 12).attr("height", 12).attr(
430
+ "class",
431
+ `commit ${r.id} commit${e % M} ${n}-inner`
432
+ );
433
+ else if (a === x.CHERRY_PICK)
434
+ t.append("circle").attr("cx", s.x).attr("cy", s.y).attr("r", 10).attr("class", `commit ${r.id} ${n}`), t.append("circle").attr("cx", s.x - 3).attr("cy", s.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("circle").attr("cx", s.x + 3).attr("cy", s.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("line").attr("x1", s.x + 3).attr("y1", s.y + 1).attr("x2", s.x).attr("y2", s.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("line").attr("x1", s.x - 3).attr("y1", s.y + 1).attr("x2", s.x).attr("y2", s.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${n}`);
435
+ else {
436
+ const d = t.append("circle");
437
+ if (d.attr("cx", s.x), d.attr("cy", s.y), d.attr("r", r.type === x.MERGE ? 9 : 10), d.attr("class", `commit ${r.id} commit${e % M}`), a === x.MERGE) {
438
+ const o = t.append("circle");
439
+ o.attr("cx", s.x), o.attr("cy", s.y), o.attr("r", 6), o.attr(
440
+ "class",
441
+ `commit ${n} ${r.id} commit${e % M}`
442
+ );
443
+ }
444
+ a === x.REVERSE && t.append("path").attr(
445
+ "d",
446
+ `M ${s.x - 5},${s.y - 5}L${s.x + 5},${s.y + 5}M${s.x - 5},${s.y + 5}L${s.x + 5},${s.y - 5}`
447
+ ).attr("class", `commit ${n} ${r.id} commit${e % M}`);
448
+ }
449
+ }, "drawCommitBullet"), Sr = /* @__PURE__ */ l((t, r, s, n) => {
450
+ if (r.type !== x.CHERRY_PICK && (r.customId && r.type === x.MERGE || r.type !== x.MERGE) && v?.showCommitLabel) {
451
+ const e = t.append("g"), a = e.insert("rect").attr("class", "commit-label-bkg"), d = e.append("text").attr("x", n).attr("y", s.y + 25).attr("class", "commit-label").text(r.id), o = d.node()?.getBBox();
452
+ if (o && (a.attr("x", s.posWithOffset - o.width / 2 - T).attr("y", s.y + 13.5).attr("width", o.width + 2 * T).attr("height", o.height + 2 * T), u === "TB" || u === "BT" ? (a.attr("x", s.x - (o.width + 4 * E + 5)).attr("y", s.y - 12), d.attr("x", s.x - (o.width + 4 * E)).attr("y", s.y + o.height - 12)) : d.attr("x", s.posWithOffset - o.width / 2), v.rotateCommitLabel))
453
+ if (u === "TB" || u === "BT")
454
+ d.attr(
455
+ "transform",
456
+ "rotate(-45, " + s.x + ", " + s.y + ")"
457
+ ), a.attr(
458
+ "transform",
459
+ "rotate(-45, " + s.x + ", " + s.y + ")"
460
+ );
461
+ else {
462
+ const f = -7.5 - (o.width + 10) / 25 * 9.5, h = 10 + o.width / 25 * 8.5;
463
+ e.attr(
464
+ "transform",
465
+ "translate(" + f + ", " + h + ") rotate(-45, " + n + ", " + s.y + ")"
466
+ );
467
+ }
468
+ }
469
+ }, "drawCommitLabel"), Wr = /* @__PURE__ */ l((t, r, s, n) => {
470
+ if (r.tags.length > 0) {
471
+ let e = 0, a = 0, d = 0;
472
+ const o = [];
473
+ for (const f of r.tags.reverse()) {
474
+ const h = t.insert("polygon"), $ = t.append("circle"), g = t.append("text").attr("y", s.y - 16 - e).attr("class", "tag-label").text(f), i = g.node()?.getBBox();
475
+ if (!i)
476
+ throw new Error("Tag bbox not found");
477
+ a = Math.max(a, i.width), d = Math.max(d, i.height), g.attr("x", s.posWithOffset - i.width / 2), o.push({
478
+ tag: g,
479
+ hole: $,
480
+ rect: h,
481
+ yOffset: e
482
+ }), e += 20;
483
+ }
484
+ for (const { tag: f, hole: h, rect: $, yOffset: g } of o) {
485
+ const i = d / 2, y = s.y - 19.2 - g;
486
+ if ($.attr("class", "tag-label-bkg").attr(
487
+ "points",
488
+ `
489
+ ${n - a / 2 - E / 2},${y + T}
490
+ ${n - a / 2 - E / 2},${y - T}
491
+ ${s.posWithOffset - a / 2 - E},${y - i - T}
492
+ ${s.posWithOffset + a / 2 + E},${y - i - T}
493
+ ${s.posWithOffset + a / 2 + E},${y + i + T}
494
+ ${s.posWithOffset - a / 2 - E},${y + i + T}`
495
+ ), h.attr("cy", y).attr("cx", n - a / 2 + E / 2).attr("r", 1.5).attr("class", "tag-hole"), u === "TB" || u === "BT") {
496
+ const p = n + g;
497
+ $.attr("class", "tag-label-bkg").attr(
498
+ "points",
499
+ `
500
+ ${s.x},${p + 2}
501
+ ${s.x},${p - 2}
502
+ ${s.x + L},${p - i - 2}
503
+ ${s.x + L + a + 4},${p - i - 2}
504
+ ${s.x + L + a + 4},${p + i + 2}
505
+ ${s.x + L},${p + i + 2}`
506
+ ).attr("transform", "translate(12,12) rotate(45, " + s.x + "," + n + ")"), h.attr("cx", s.x + E / 2).attr("cy", p).attr("transform", "translate(12,12) rotate(45, " + s.x + "," + n + ")"), f.attr("x", s.x + 5).attr("y", p + 3).attr("transform", "translate(14,14) rotate(45, " + s.x + "," + n + ")");
507
+ }
508
+ }
509
+ }
510
+ }, "drawCommitTags"), jr = /* @__PURE__ */ l((t) => {
511
+ switch (t.customType ?? t.type) {
512
+ case x.NORMAL:
513
+ return "commit-normal";
514
+ case x.REVERSE:
515
+ return "commit-reverse";
516
+ case x.HIGHLIGHT:
517
+ return "commit-highlight";
518
+ case x.MERGE:
519
+ return "commit-merge";
520
+ case x.CHERRY_PICK:
521
+ return "commit-cherry-pick";
522
+ default:
523
+ return "commit-normal";
524
+ }
525
+ }, "getCommitClassType"), Yr = /* @__PURE__ */ l((t, r, s, n) => {
526
+ const e = { x: 0, y: 0 };
527
+ if (t.parents.length > 0) {
528
+ const a = j(t.parents);
529
+ if (a) {
530
+ const d = n.get(a) ?? e;
531
+ return r === "TB" ? d.y + k : r === "BT" ? (n.get(t.id) ?? e).y - k : d.x + k;
532
+ }
533
+ } else
534
+ return r === "TB" ? O : r === "BT" ? (n.get(t.id) ?? e).y - k : 0;
535
+ return 0;
536
+ }, "calculatePosition"), Kr = /* @__PURE__ */ l((t, r, s) => {
537
+ const n = u === "BT" && s ? r : r + L, e = u === "TB" || u === "BT" ? n : b.get(t.branch)?.pos, a = u === "TB" || u === "BT" ? b.get(t.branch)?.pos : n;
538
+ if (a === void 0 || e === void 0)
539
+ throw new Error(`Position were undefined for commit ${t.id}`);
540
+ return { x: a, y: e, posWithOffset: n };
541
+ }, "getCommitPosition"), D = /* @__PURE__ */ l((t, r, s) => {
542
+ if (!v)
543
+ throw new Error("GitGraph config not found");
544
+ const n = t.append("g").attr("class", "commit-bullets"), e = t.append("g").attr("class", "commit-labels");
545
+ let a = u === "TB" || u === "BT" ? O : 0;
546
+ const d = [...r.keys()], o = v?.parallelCommits ?? !1, f = /* @__PURE__ */ l(($, g) => {
547
+ const i = r.get($)?.seq, y = r.get(g)?.seq;
548
+ return i !== void 0 && y !== void 0 ? i - y : 0;
549
+ }, "sortKeys");
550
+ let h = d.sort(f);
551
+ u === "BT" && (o && Hr(h, r, a), h = h.reverse()), h.forEach(($) => {
552
+ const g = r.get($);
553
+ if (!g)
554
+ throw new Error(`Commit not found for key ${$}`);
555
+ o && (a = Yr(g, u, a, w));
556
+ const i = Kr(g, a, o);
557
+ if (s) {
558
+ const y = jr(g), p = g.customType ?? g.type, _ = b.get(g.branch)?.index ?? 0;
559
+ Nr(n, g, i, y, _, p), Sr(e, g, i, a), Wr(e, g, i, a);
560
+ }
561
+ u === "TB" || u === "BT" ? w.set(g.id, { x: i.x, y: i.posWithOffset }) : w.set(g.id, { x: i.posWithOffset, y: i.y }), a = u === "BT" && o ? a + k : a + k + L, a > B && (B = a);
562
+ });
563
+ }, "drawCommits"), Ur = /* @__PURE__ */ l((t, r, s, n, e) => {
564
+ const d = (u === "TB" || u === "BT" ? s.x < n.x : s.y < n.y) ? r.branch : t.branch, o = /* @__PURE__ */ l((h) => h.branch === d, "isOnBranchToGetCurve"), f = /* @__PURE__ */ l((h) => h.seq > t.seq && h.seq < r.seq, "isBetweenCommits");
565
+ return [...e.values()].some((h) => f(h) && o(h));
566
+ }, "shouldRerouteArrow"), G = /* @__PURE__ */ l((t, r, s = 0) => {
567
+ const n = t + Math.abs(t - r) / 2;
568
+ if (s > 5)
569
+ return n;
570
+ if (q.every((d) => Math.abs(d - n) >= 10))
571
+ return q.push(n), n;
572
+ const a = Math.abs(t - r);
573
+ return G(t, r - a / 5, s + 1);
574
+ }, "findLane"), Vr = /* @__PURE__ */ l((t, r, s, n) => {
575
+ const e = w.get(r.id), a = w.get(s.id);
576
+ if (e === void 0 || a === void 0)
577
+ throw new Error(`Commit positions not found for commits ${r.id} and ${s.id}`);
578
+ const d = Ur(r, s, e, a, n);
579
+ let o = "", f = "", h = 0, $ = 0, g = b.get(s.branch)?.index;
580
+ s.type === x.MERGE && r.id !== s.parents[0] && (g = b.get(r.branch)?.index);
581
+ let i;
582
+ if (d) {
583
+ o = "A 10 10, 0, 0, 0,", f = "A 10 10, 0, 0, 1,", h = 10, $ = 10;
584
+ const y = e.y < a.y ? G(e.y, a.y) : G(a.y, e.y), p = e.x < a.x ? G(e.x, a.x) : G(a.x, e.x);
585
+ u === "TB" ? e.x < a.x ? i = `M ${e.x} ${e.y} L ${p - h} ${e.y} ${f} ${p} ${e.y + $} L ${p} ${a.y - h} ${o} ${p + $} ${a.y} L ${a.x} ${a.y}` : (g = b.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${p + h} ${e.y} ${o} ${p} ${e.y + $} L ${p} ${a.y - h} ${f} ${p - $} ${a.y} L ${a.x} ${a.y}`) : u === "BT" ? e.x < a.x ? i = `M ${e.x} ${e.y} L ${p - h} ${e.y} ${o} ${p} ${e.y - $} L ${p} ${a.y + h} ${f} ${p + $} ${a.y} L ${a.x} ${a.y}` : (g = b.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${p + h} ${e.y} ${f} ${p} ${e.y - $} L ${p} ${a.y + h} ${o} ${p - $} ${a.y} L ${a.x} ${a.y}`) : e.y < a.y ? i = `M ${e.x} ${e.y} L ${e.x} ${y - h} ${o} ${e.x + $} ${y} L ${a.x - h} ${y} ${f} ${a.x} ${y + $} L ${a.x} ${a.y}` : (g = b.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${e.x} ${y + h} ${f} ${e.x + $} ${y} L ${a.x - h} ${y} ${o} ${a.x} ${y - $} L ${a.x} ${a.y}`);
586
+ } else
587
+ o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, u === "TB" ? (e.x < a.x && (s.type === x.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${o} ${e.x + $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${f} ${a.x} ${e.y + $} L ${a.x} ${a.y}`), e.x > a.x && (o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, s.type === x.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${f} ${e.x - $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x + h} ${e.y} ${o} ${a.x} ${e.y + $} L ${a.x} ${a.y}`), e.x === a.x && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`)) : u === "BT" ? (e.x < a.x && (s.type === x.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${f} ${e.x + $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}`), e.x > a.x && (o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, s.type === x.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${o} ${e.x - $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}`), e.x === a.x && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`)) : (e.y < a.y && (s.type === x.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${f} ${a.x} ${e.y + $} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${o} ${e.x + $} ${a.y} L ${a.x} ${a.y}`), e.y > a.y && (s.type === x.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${f} ${e.x + $} ${a.y} L ${a.x} ${a.y}`), e.y === a.y && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`));
588
+ if (i === void 0)
589
+ throw new Error("Line definition not found");
590
+ t.append("path").attr("d", i).attr("class", "arrow arrow" + g % M);
591
+ }, "drawArrow"), Xr = /* @__PURE__ */ l((t, r) => {
592
+ const s = t.append("g").attr("class", "commit-arrows");
593
+ [...r.keys()].forEach((n) => {
594
+ const e = r.get(n);
595
+ e.parents && e.parents.length > 0 && e.parents.forEach((a) => {
596
+ Vr(s, r.get(a), e, r);
597
+ });
598
+ });
599
+ }, "drawArrows"), Jr = /* @__PURE__ */ l((t, r) => {
600
+ const s = t.append("g");
601
+ r.forEach((n, e) => {
602
+ const a = e % M, d = b.get(n.name)?.pos;
603
+ if (d === void 0)
604
+ throw new Error(`Position not found for branch ${n.name}`);
605
+ const o = s.append("line");
606
+ o.attr("x1", 0), o.attr("y1", d), o.attr("x2", B), o.attr("y2", d), o.attr("class", "branch branch" + a), u === "TB" ? (o.attr("y1", O), o.attr("x1", d), o.attr("y2", B), o.attr("x2", d)) : u === "BT" && (o.attr("y1", B), o.attr("x1", d), o.attr("y2", O), o.attr("x2", d)), q.push(d);
607
+ const f = n.name, h = W(f), $ = s.insert("rect"), i = s.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + a);
608
+ i.node().appendChild(h);
609
+ const y = h.getBBox();
610
+ $.attr("class", "branchLabelBkg label" + a).attr("rx", 4).attr("ry", 4).attr("x", -y.width - 4 - (v?.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -y.height / 2 + 8).attr("width", y.width + 18).attr("height", y.height + 4), i.attr(
611
+ "transform",
612
+ "translate(" + (-y.width - 14 - (v?.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (d - y.height / 2 - 1) + ")"
613
+ ), u === "TB" ? ($.attr("x", d - y.width / 2 - 10).attr("y", 0), i.attr("transform", "translate(" + (d - y.width / 2 - 5) + ", 0)")) : u === "BT" ? ($.attr("x", d - y.width / 2 - 10).attr("y", B), i.attr("transform", "translate(" + (d - y.width / 2 - 5) + ", " + B + ")")) : $.attr("transform", "translate(-19, " + (d - y.height / 2) + ")");
614
+ });
615
+ }, "drawBranches"), Qr = /* @__PURE__ */ l(function(t, r, s, n, e) {
616
+ return b.set(t, { pos: r, index: s }), r += 50 + (e ? 40 : 0) + (u === "TB" || u === "BT" ? n.width / 2 : 0), r;
617
+ }, "setBranchPosition"), Zr = /* @__PURE__ */ l(function(t, r, s, n) {
618
+ if (Ar(), m.debug("in gitgraph renderer", t + `
619
+ `, "id:", r, s), !v)
620
+ throw new Error("GitGraph config not found");
621
+ const e = v.rotateCommitLabel ?? !1, a = n.db;
622
+ R = a.getCommits();
623
+ const d = a.getBranchesAsObjArray();
624
+ u = a.getDirection();
625
+ const o = er(`[id="${r}"]`);
626
+ let f = 0;
627
+ d.forEach((h, $) => {
628
+ const g = W(h.name), i = o.append("g"), y = i.insert("g").attr("class", "branchLabel"), p = y.insert("g").attr("class", "label branch-label");
629
+ p.node()?.appendChild(g);
630
+ const _ = g.getBBox();
631
+ f = Qr(h.name, f, $, _, e), p.remove(), y.remove(), i.remove();
632
+ }), D(o, R, !1), v.showBranches && Jr(o, d), Xr(o, R), D(o, R, !0), tr.insertTitle(
633
+ o,
634
+ "gitTitleText",
635
+ v.titleTopMargin ?? 0,
636
+ a.getDiagramTitle()
637
+ ), ar(
638
+ void 0,
639
+ o,
640
+ v.diagramPadding,
641
+ v.useMaxWidth
642
+ );
643
+ }, "draw"), re = {
644
+ draw: Zr
645
+ }, ee = /* @__PURE__ */ l((t) => `
646
+ .commit-id,
647
+ .commit-msg,
648
+ .branch-label {
649
+ fill: lightgrey;
650
+ color: lightgrey;
651
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
652
+ font-family: var(--mermaid-font-family);
653
+ }
654
+ ${[0, 1, 2, 3, 4, 5, 6, 7].map(
655
+ (r) => `
656
+ .branch-label${r} { fill: ${t["gitBranchLabel" + r]}; }
657
+ .commit${r} { stroke: ${t["git" + r]}; fill: ${t["git" + r]}; }
658
+ .commit-highlight${r} { stroke: ${t["gitInv" + r]}; fill: ${t["gitInv" + r]}; }
659
+ .label${r} { fill: ${t["git" + r]}; }
660
+ .arrow${r} { stroke: ${t["git" + r]}; }
661
+ `
662
+ ).join(`
663
+ `)}
664
+
665
+ .branch {
666
+ stroke-width: 1;
667
+ stroke: ${t.lineColor};
668
+ stroke-dasharray: 2;
669
+ }
670
+ .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
671
+ .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
672
+ .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
673
+ .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
674
+ .tag-hole { fill: ${t.textColor}; }
675
+
676
+ .commit-merge {
677
+ stroke: ${t.primaryColor};
678
+ fill: ${t.primaryColor};
679
+ }
680
+ .commit-reverse {
681
+ stroke: ${t.primaryColor};
682
+ fill: ${t.primaryColor};
683
+ stroke-width: 3;
684
+ }
685
+ .commit-highlight-outer {
686
+ }
687
+ .commit-highlight-inner {
688
+ stroke: ${t.primaryColor};
689
+ fill: ${t.primaryColor};
690
+ }
691
+
692
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
693
+ .gitTitleText {
694
+ text-anchor: middle;
695
+ font-size: 18px;
696
+ fill: ${t.textColor};
697
+ }
698
+ `, "getStyles"), te = ee, ie = {
699
+ parser: Or,
700
+ db: S,
701
+ renderer: re,
702
+ styles: te
703
+ };
704
+ export {
705
+ ie as diagram
706
+ };