@akshay-rajput/git-graph-svg 2.0.2 → 2.0.3

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.
@@ -4,22 +4,22 @@ var Me;
4
4
  function yr() {
5
5
  if (Me) return ae;
6
6
  Me = 1;
7
- var O = Ce, R = /* @__PURE__ */ Symbol.for("react.element"), T = /* @__PURE__ */ Symbol.for("react.fragment"), C = Object.prototype.hasOwnProperty, m = O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, $ = { key: !0, ref: !0, __self: !0, __source: !0 };
7
+ var O = Ce, T = /* @__PURE__ */ Symbol.for("react.element"), b = /* @__PURE__ */ Symbol.for("react.fragment"), C = Object.prototype.hasOwnProperty, P = O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, $ = { key: !0, ref: !0, __self: !0, __source: !0 };
8
8
  function F(A, g, M) {
9
- var b, W = {}, U = null, I = null;
9
+ var _, W = {}, U = null, I = null;
10
10
  M !== void 0 && (U = "" + M), g.key !== void 0 && (U = "" + g.key), g.ref !== void 0 && (I = g.ref);
11
- for (b in g) C.call(g, b) && !$.hasOwnProperty(b) && (W[b] = g[b]);
12
- if (A && A.defaultProps) for (b in g = A.defaultProps, g) W[b] === void 0 && (W[b] = g[b]);
13
- return { $$typeof: R, type: A, key: U, ref: I, props: W, _owner: m.current };
11
+ for (_ in g) C.call(g, _) && !$.hasOwnProperty(_) && (W[_] = g[_]);
12
+ if (A && A.defaultProps) for (_ in g = A.defaultProps, g) W[_] === void 0 && (W[_] = g[_]);
13
+ return { $$typeof: T, type: A, key: U, ref: I, props: W, _owner: P.current };
14
14
  }
15
- return ae.Fragment = T, ae.jsx = F, ae.jsxs = F, ae;
15
+ return ae.Fragment = b, ae.jsx = F, ae.jsxs = F, ae;
16
16
  }
17
17
  var oe = {};
18
18
  var Ue;
19
19
  function br() {
20
20
  return Ue || (Ue = 1, process.env.NODE_ENV !== "production" && (function() {
21
- var O = Ce, R = /* @__PURE__ */ Symbol.for("react.element"), T = /* @__PURE__ */ Symbol.for("react.portal"), C = /* @__PURE__ */ Symbol.for("react.fragment"), m = /* @__PURE__ */ Symbol.for("react.strict_mode"), $ = /* @__PURE__ */ Symbol.for("react.profiler"), F = /* @__PURE__ */ Symbol.for("react.provider"), A = /* @__PURE__ */ Symbol.for("react.context"), g = /* @__PURE__ */ Symbol.for("react.forward_ref"), M = /* @__PURE__ */ Symbol.for("react.suspense"), b = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), U = /* @__PURE__ */ Symbol.for("react.lazy"), I = /* @__PURE__ */ Symbol.for("react.offscreen"), c = Symbol.iterator, y = "@@iterator";
22
- function P(e) {
21
+ var O = Ce, T = /* @__PURE__ */ Symbol.for("react.element"), b = /* @__PURE__ */ Symbol.for("react.portal"), C = /* @__PURE__ */ Symbol.for("react.fragment"), P = /* @__PURE__ */ Symbol.for("react.strict_mode"), $ = /* @__PURE__ */ Symbol.for("react.profiler"), F = /* @__PURE__ */ Symbol.for("react.provider"), A = /* @__PURE__ */ Symbol.for("react.context"), g = /* @__PURE__ */ Symbol.for("react.forward_ref"), M = /* @__PURE__ */ Symbol.for("react.suspense"), _ = /* @__PURE__ */ Symbol.for("react.suspense_list"), W = /* @__PURE__ */ Symbol.for("react.memo"), U = /* @__PURE__ */ Symbol.for("react.lazy"), I = /* @__PURE__ */ Symbol.for("react.offscreen"), c = Symbol.iterator, y = "@@iterator";
22
+ function m(e) {
23
23
  if (e === null || typeof e != "object")
24
24
  return null;
25
25
  var r = c && e[c] || e[y];
@@ -43,10 +43,10 @@ function br() {
43
43
  E.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, E);
44
44
  }
45
45
  }
46
- var H = !1, i = !1, Z = !1, J = !1, he = !1, re;
46
+ var H = !1, s = !1, Z = !1, J = !1, he = !1, re;
47
47
  re = /* @__PURE__ */ Symbol.for("react.module.reference");
48
48
  function pe(e) {
49
- return !!(typeof e == "string" || typeof e == "function" || e === C || e === $ || he || e === m || e === M || e === b || J || e === I || H || i || Z || typeof e == "object" && e !== null && (e.$$typeof === U || e.$$typeof === W || e.$$typeof === F || e.$$typeof === A || e.$$typeof === g || // This needs to include all possible module reference object
49
+ return !!(typeof e == "string" || typeof e == "function" || e === C || e === $ || he || e === P || e === M || e === _ || J || e === I || H || s || Z || typeof e == "object" && e !== null && (e.$$typeof === U || e.$$typeof === W || e.$$typeof === F || e.$$typeof === A || e.$$typeof === g || // This needs to include all possible module reference object
50
50
  // types supported by any Flight configuration anywhere since
51
51
  // we don't know which Flight build this will end up being used
52
52
  // with.
@@ -72,15 +72,15 @@ function br() {
72
72
  switch (e) {
73
73
  case C:
74
74
  return "Fragment";
75
- case T:
75
+ case b:
76
76
  return "Portal";
77
77
  case $:
78
78
  return "Profiler";
79
- case m:
79
+ case P:
80
80
  return "StrictMode";
81
81
  case M:
82
82
  return "Suspense";
83
- case b:
83
+ case _:
84
84
  return "SuspenseList";
85
85
  }
86
86
  if (typeof e == "object")
@@ -107,18 +107,18 @@ function br() {
107
107
  }
108
108
  return null;
109
109
  }
110
- var K = Object.assign, q = 0, n, o, l, s, f, v, _;
111
- function x() {
110
+ var K = Object.assign, q = 0, n, i, u, o, l, v, x;
111
+ function R() {
112
112
  }
113
- x.__reactDisabledLog = !0;
113
+ R.__reactDisabledLog = !0;
114
114
  function j() {
115
115
  {
116
116
  if (q === 0) {
117
- n = console.log, o = console.info, l = console.warn, s = console.error, f = console.group, v = console.groupCollapsed, _ = console.groupEnd;
117
+ n = console.log, i = console.info, u = console.warn, o = console.error, l = console.group, v = console.groupCollapsed, x = console.groupEnd;
118
118
  var e = {
119
119
  configurable: !0,
120
120
  enumerable: !0,
121
- value: x,
121
+ value: R,
122
122
  writable: !0
123
123
  };
124
124
  Object.defineProperties(console, {
@@ -147,22 +147,22 @@ function br() {
147
147
  value: n
148
148
  }),
149
149
  info: K({}, e, {
150
- value: o
150
+ value: i
151
151
  }),
152
152
  warn: K({}, e, {
153
- value: l
153
+ value: u
154
154
  }),
155
155
  error: K({}, e, {
156
- value: s
156
+ value: o
157
157
  }),
158
158
  group: K({}, e, {
159
- value: f
159
+ value: l
160
160
  }),
161
161
  groupCollapsed: K({}, e, {
162
162
  value: v
163
163
  }),
164
164
  groupEnd: K({}, e, {
165
- value: _
165
+ value: x
166
166
  })
167
167
  });
168
168
  }
@@ -236,17 +236,17 @@ function br() {
236
236
  }
237
237
  } catch (L) {
238
238
  if (L && a && typeof L.stack == "string") {
239
- for (var u = L.stack.split(`
239
+ for (var f = L.stack.split(`
240
240
  `), D = a.stack.split(`
241
- `), w = u.length - 1, S = D.length - 1; w >= 1 && S >= 0 && u[w] !== D[S]; )
241
+ `), w = f.length - 1, S = D.length - 1; w >= 1 && S >= 0 && f[w] !== D[S]; )
242
242
  S--;
243
243
  for (; w >= 1 && S >= 0; w--, S--)
244
- if (u[w] !== D[S]) {
244
+ if (f[w] !== D[S]) {
245
245
  if (w !== 1 || S !== 1)
246
246
  do
247
- if (w--, S--, S < 0 || u[w] !== D[S]) {
247
+ if (w--, S--, S < 0 || f[w] !== D[S]) {
248
248
  var Y = `
249
- ` + u[w].replace(" at new ", " at ");
249
+ ` + f[w].replace(" at new ", " at ");
250
250
  return e.displayName && Y.includes("<anonymous>") && (Y = Y.replace("<anonymous>", e.displayName)), typeof e == "function" && ue.set(e, Y), Y;
251
251
  }
252
252
  while (w >= 1 && S >= 0);
@@ -266,7 +266,7 @@ function br() {
266
266
  var r = e.prototype;
267
267
  return !!(r && r.isReactComponent);
268
268
  }
269
- function ce(e, r, t) {
269
+ function fe(e, r, t) {
270
270
  if (e == null)
271
271
  return "";
272
272
  if (typeof e == "function")
@@ -276,7 +276,7 @@ function br() {
276
276
  switch (e) {
277
277
  case M:
278
278
  return V("Suspense");
279
- case b:
279
+ case _:
280
280
  return V("SuspenseList");
281
281
  }
282
282
  if (typeof e == "object")
@@ -284,11 +284,11 @@ function br() {
284
284
  case g:
285
285
  return Ge(e.render);
286
286
  case W:
287
- return ce(e.type, r, t);
287
+ return fe(e.type, r, t);
288
288
  case U: {
289
289
  var a = e, h = a._payload, E = a._init;
290
290
  try {
291
- return ce(E(h), r, t);
291
+ return fe(E(h), r, t);
292
292
  } catch {
293
293
  }
294
294
  }
@@ -296,9 +296,9 @@ function br() {
296
296
  return "";
297
297
  }
298
298
  var ne = Object.prototype.hasOwnProperty, Se = {}, Oe = k.ReactDebugCurrentFrame;
299
- function fe(e) {
299
+ function ce(e) {
300
300
  if (e) {
301
- var r = e._owner, t = ce(e.type, e._source, r ? r.type : null);
301
+ var r = e._owner, t = fe(e.type, e._source, r ? r.type : null);
302
302
  Oe.setExtraStackFrame(t);
303
303
  } else
304
304
  Oe.setExtraStackFrame(null);
@@ -308,17 +308,17 @@ function br() {
308
308
  var E = Function.call.bind(ne);
309
309
  for (var d in e)
310
310
  if (E(e, d)) {
311
- var u = void 0;
311
+ var f = void 0;
312
312
  try {
313
313
  if (typeof e[d] != "function") {
314
314
  var D = Error((a || "React class") + ": " + t + " type `" + d + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[d] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
315
315
  throw D.name = "Invariant Violation", D;
316
316
  }
317
- u = e[d](r, d, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
317
+ f = e[d](r, d, a, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
318
318
  } catch (w) {
319
- u = w;
319
+ f = w;
320
320
  }
321
- u && !(u instanceof Error) && (fe(h), p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, d, typeof u), fe(null)), u instanceof Error && !(u.message in Se) && (Se[u.message] = !0, fe(h), p("Failed %s type: %s", t, u.message), fe(null));
321
+ f && !(f instanceof Error) && (ce(h), p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", a || "React class", t, d, typeof f), ce(null)), f instanceof Error && !(f.message in Se) && (Se[f.message] = !0, ce(h), p("Failed %s type: %s", t, f.message), ce(null));
322
322
  }
323
323
  }
324
324
  }
@@ -334,17 +334,17 @@ function br() {
334
334
  }
335
335
  function Xe(e) {
336
336
  try {
337
- return me(e), !1;
337
+ return Pe(e), !1;
338
338
  } catch {
339
339
  return !0;
340
340
  }
341
341
  }
342
- function me(e) {
342
+ function Pe(e) {
343
343
  return "" + e;
344
344
  }
345
- function Pe(e) {
345
+ function me(e) {
346
346
  if (Xe(e))
347
- return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), me(e);
347
+ return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", qe(e)), Pe(e);
348
348
  }
349
349
  var $e = k.ReactCurrentOwner, ze = {
350
350
  key: !0,
@@ -394,9 +394,9 @@ function br() {
394
394
  }
395
395
  }
396
396
  var nr = function(e, r, t, a, h, E, d) {
397
- var u = {
397
+ var f = {
398
398
  // This tag allows us to uniquely identify this as a React Element
399
- $$typeof: R,
399
+ $$typeof: T,
400
400
  // Built-in properties that belong on the element
401
401
  type: e,
402
402
  key: r,
@@ -405,27 +405,27 @@ function br() {
405
405
  // Record the component responsible for creating this element.
406
406
  _owner: E
407
407
  };
408
- return u._store = {}, Object.defineProperty(u._store, "validated", {
408
+ return f._store = {}, Object.defineProperty(f._store, "validated", {
409
409
  configurable: !1,
410
410
  enumerable: !1,
411
411
  writable: !0,
412
412
  value: !1
413
- }), Object.defineProperty(u, "_self", {
413
+ }), Object.defineProperty(f, "_self", {
414
414
  configurable: !1,
415
415
  enumerable: !1,
416
416
  writable: !1,
417
417
  value: a
418
- }), Object.defineProperty(u, "_source", {
418
+ }), Object.defineProperty(f, "_source", {
419
419
  configurable: !1,
420
420
  enumerable: !1,
421
421
  writable: !1,
422
422
  value: h
423
- }), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
423
+ }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
424
424
  };
425
425
  function ar(e, r, t, a, h) {
426
426
  {
427
- var E, d = {}, u = null, D = null;
428
- t !== void 0 && (Pe(t), u = "" + t), Qe(r) && (Pe(r.key), u = "" + r.key), Ze(r) && (D = r.ref, er(r, h));
427
+ var E, d = {}, f = null, D = null;
428
+ t !== void 0 && (me(t), f = "" + t), Qe(r) && (me(r.key), f = "" + r.key), Ze(r) && (D = r.ref, er(r, h));
429
429
  for (E in r)
430
430
  ne.call(r, E) && !ze.hasOwnProperty(E) && (d[E] = r[E]);
431
431
  if (e && e.defaultProps) {
@@ -433,17 +433,17 @@ function br() {
433
433
  for (E in w)
434
434
  d[E] === void 0 && (d[E] = w[E]);
435
435
  }
436
- if (u || D) {
436
+ if (f || D) {
437
437
  var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
438
- u && rr(d, S), D && tr(d, S);
438
+ f && rr(d, S), D && tr(d, S);
439
439
  }
440
- return nr(e, u, D, h, a, $e.current, d);
440
+ return nr(e, f, D, h, a, $e.current, d);
441
441
  }
442
442
  }
443
443
  var be = k.ReactCurrentOwner, ke = k.ReactDebugCurrentFrame;
444
444
  function Q(e) {
445
445
  if (e) {
446
- var r = e._owner, t = ce(e.type, e._source, r ? r.type : null);
446
+ var r = e._owner, t = fe(e.type, e._source, r ? r.type : null);
447
447
  ke.setExtraStackFrame(t);
448
448
  } else
449
449
  ke.setExtraStackFrame(null);
@@ -451,7 +451,7 @@ function br() {
451
451
  var _e;
452
452
  _e = !1;
453
453
  function xe(e) {
454
- return typeof e == "object" && e !== null && e.$$typeof === R;
454
+ return typeof e == "object" && e !== null && e.$$typeof === T;
455
455
  }
456
456
  function De() {
457
457
  {
@@ -506,7 +506,7 @@ Check the top-level render call using <` + t + ">.");
506
506
  else if (xe(e))
507
507
  e._store && (e._store.validated = !0);
508
508
  else if (e) {
509
- var h = P(e);
509
+ var h = m(e);
510
510
  if (typeof h == "function" && h !== e.entries)
511
511
  for (var E = h.call(e), d; !(d = E.next()).done; )
512
512
  xe(d.value) && Ae(d.value, r);
@@ -555,12 +555,12 @@ Check the top-level render call using <` + t + ">.");
555
555
  {
556
556
  var d = pe(e);
557
557
  if (!d) {
558
- var u = "";
559
- (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
558
+ var f = "";
559
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (f += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
560
560
  var D = or();
561
- D ? u += D : u += De();
561
+ D ? f += D : f += De();
562
562
  var w;
563
- e === null ? w = "null" : ye(e) ? w = "array" : e !== void 0 && e.$$typeof === R ? (w = "<" + (N(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : w = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, u);
563
+ e === null ? w = "null" : ye(e) ? w = "array" : e !== void 0 && e.$$typeof === T ? (w = "<" + (N(e.type) || "Unknown") + " />", f = " Did you accidentally export a JSX literal instead of a component?") : w = typeof e, p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", w, f);
564
564
  }
565
565
  var S = ar(e, r, t, h, E);
566
566
  if (S == null)
@@ -598,11 +598,11 @@ React keys must be passed directly to JSX without using spread:
598
598
  function ur(e, r, t) {
599
599
  return Be(e, r, t, !0);
600
600
  }
601
- function cr(e, r, t) {
601
+ function fr(e, r, t) {
602
602
  return Be(e, r, t, !1);
603
603
  }
604
- var fr = cr, dr = ur;
605
- oe.Fragment = C, oe.jsx = fr, oe.jsxs = dr;
604
+ var cr = fr, dr = ur;
605
+ oe.Fragment = C, oe.jsx = cr, oe.jsxs = dr;
606
606
  })()), oe;
607
607
  }
608
608
  var Ye;
@@ -610,25 +610,25 @@ function _r() {
610
610
  return Ye || (Ye = 1, process.env.NODE_ENV === "production" ? de.exports = yr() : de.exports = br()), de.exports;
611
611
  }
612
612
  var G = _r();
613
- const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0b"], Pr = ({
613
+ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0b"], mr = ({
614
614
  commits: O,
615
- rowHeight: R,
616
- colorPalette: T,
615
+ rowHeight: T,
616
+ colorPalette: b,
617
617
  laneWidth: C,
618
- renderNode: m,
618
+ renderNode: P,
619
619
  renderEdge: $
620
620
  }) => {
621
- const F = C || Ne, A = R || Ne, g = ie(
622
- () => (T || Rr).map((c, y) => ({
621
+ const F = C || Ne, A = T || Ne, g = ie(
622
+ () => (b || Rr).map((c, y) => ({
623
623
  color: c,
624
624
  branch: null,
625
625
  lane: y + 1,
626
626
  index: y
627
627
  })),
628
- [T, O]
628
+ [b, O]
629
629
  );
630
630
  function M() {
631
- var c = g.findIndex((P) => !P.branch);
631
+ var c = g.findIndex((m) => !m.branch);
632
632
  if (c > -1)
633
633
  return g[c];
634
634
  var y = {
@@ -639,12 +639,12 @@ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
639
639
  };
640
640
  return g.push(y), y;
641
641
  }
642
- const b = ie(() => {
642
+ const _ = ie(() => {
643
643
  var c = [];
644
644
  const y = /* @__PURE__ */ new Map();
645
- return O.forEach((P, k) => {
645
+ return O.forEach((m, k) => {
646
646
  var p = {
647
- ...P,
647
+ ...m,
648
648
  color: "",
649
649
  lane: 0,
650
650
  cx: 0,
@@ -652,35 +652,35 @@ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
652
652
  prev: [],
653
653
  // initialize empty
654
654
  index: k
655
- }, B = g.find((i) => i.branch == P.id);
656
- B ? g.forEach((i) => {
657
- i.branch === P.id && i.index !== B?.index && (i.branch = null);
655
+ }, B = g.find((s) => s.branch == m.id);
656
+ B ? g.forEach((s) => {
657
+ s.branch === m.id && s.index !== B?.index && (s.branch = null);
658
658
  }) : B = M();
659
- for (const i of P.parents)
660
- if (g.find((J) => J.branch === i))
661
- B.branch = i;
662
- else if (B.branch == P.id) B.branch = i;
659
+ for (const s of m.parents)
660
+ if (g.find((J) => J.branch === s))
661
+ B.branch = s;
662
+ else if (B.branch == m.id) B.branch = s;
663
663
  else {
664
664
  var H = g.find((J) => !J.branch);
665
- H || (H = M()), H.branch = i;
665
+ H || (H = M()), H.branch = s;
666
666
  }
667
667
  p.color = B.color, p.lane = B.lane, p.cx = p.lane * F - F / 2, p.cy = A * k + F / 2, c.push(p), y.set(p.id, p);
668
- }), c.forEach((P) => {
669
- P.parents.forEach((k) => {
668
+ }), c.forEach((m) => {
669
+ m.parents.forEach((k) => {
670
670
  const p = y.get(k);
671
- p && p.prev.push(P);
671
+ p && p.prev.push(m);
672
672
  });
673
673
  }), c;
674
674
  }, [O, A, F]);
675
675
  function W(c, y) {
676
676
  return `M ${c.cx} ${c.cy} L ${y.cx} ${y.cy}`;
677
677
  }
678
- const U = ie(() => Math.max(...b.map((c) => c.lane), 0), [b]), I = ie(() => U * F + 100, [U, F]);
679
- return /* @__PURE__ */ G.jsxs("svg", { width: I, height: A * b.length, children: [
680
- b.flatMap(
681
- (c) => c.prev.map((y, P) => {
678
+ const U = ie(() => Math.max(..._.map((c) => c.lane), 0), [_]), I = ie(() => U * F + 100, [U, F]);
679
+ return /* @__PURE__ */ G.jsxs("svg", { width: I, height: A * _.length, children: [
680
+ _.flatMap(
681
+ (c) => c.prev.map((y, m) => {
682
682
  if ($)
683
- return $(c, y, b, P);
683
+ return $(c, y, _, m);
684
684
  const k = W(c, y);
685
685
  return /* @__PURE__ */ G.jsx(
686
686
  "path",
@@ -690,11 +690,11 @@ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
690
690
  stroke: c.lane <= y.lane ? y.color : c.color,
691
691
  strokeWidth: 2
692
692
  },
693
- `${c.id}-${y.id}_${P}`
693
+ `${c.id}-${y.id}_${m}`
694
694
  );
695
695
  })
696
696
  ),
697
- b.map((c, y) => m ? m(c, y) : /* @__PURE__ */ G.jsx(
697
+ _.map((c, y) => P ? P(c, y) : /* @__PURE__ */ G.jsx(
698
698
  "circle",
699
699
  {
700
700
  cx: c.cx,
@@ -706,21 +706,21 @@ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
706
706
  ))
707
707
  ] });
708
708
  }, ve = {
709
- getCurveTop(O, R, T, C) {
710
- const m = Math.min(15, Math.abs(C - R) / 2);
711
- let $ = ` C ${O} ${R + m}, ${T} ${R + m}, ${T} ${R + m * 2}`;
712
- return R + m * 2 < C && ($ += ` L ${T} ${C}`), $;
709
+ getCurveTop(O, T, b, C) {
710
+ const P = Math.min(15, Math.abs(C - T) / 2);
711
+ let $ = ` C ${O} ${T + P}, ${b} ${T + P}, ${b} ${T + P * 2}`;
712
+ return T + P * 2 < C && ($ += ` L ${b} ${C}`), $;
713
713
  },
714
- getCurveBottom(O, R, T, C) {
715
- const m = Math.min(15, Math.abs(C - R) / 2);
714
+ getCurveBottom(O, T, b, C) {
715
+ const P = Math.min(15, Math.abs(C - T) / 2);
716
716
  let $ = "";
717
- return C - m * 2 > R && ($ += ` L ${O} ${C - m * 2}`), $ += ` C ${O} ${C - m}, ${T} ${C - m}, ${T} ${C}`, $;
717
+ return C - P * 2 > T && ($ += ` L ${O} ${C - P * 2}`), $ += ` C ${O} ${C - P}, ${b} ${C - P}, ${b} ${C}`, $;
718
718
  },
719
- drawFinalPath(O, R, T = 2) {
720
- return /* @__PURE__ */ G.jsx("path", { d: O, stroke: R, strokeWidth: T, fill: "none" });
719
+ drawFinalPath(O, T, b = 2) {
720
+ return /* @__PURE__ */ G.jsx("path", { d: O, stroke: T, strokeWidth: b, fill: "none" });
721
721
  },
722
- drawPoint(O, R, T, C) {
723
- return /* @__PURE__ */ G.jsx("circle", { cx: O, cy: R, r: 5, fill: T, stroke: "none" });
722
+ drawPoint(O, T, b, C) {
723
+ return /* @__PURE__ */ G.jsx("circle", { cx: O, cy: T, r: 5, fill: b, stroke: "none" });
724
724
  }
725
725
  }, Tr = [
726
726
  "#3a86ff",
@@ -733,172 +733,178 @@ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
733
733
  "#ff009d",
734
734
  "#fb7507",
735
735
  "#0b38ff"
736
- ], Cr = 35, wr = 35, Te = 25, Sr = 25, Or = 2, $r = pr((O, R) => {
736
+ ], Cr = 35, wr = 35, Te = 25, Sr = 25, Or = 2, $r = pr((O, T) => {
737
737
  const {
738
- commits: T,
738
+ commits: b,
739
739
  colorPalette: C,
740
- rowHeight: m,
740
+ rowHeight: P,
741
741
  laneWidth: $,
742
742
  style: F,
743
743
  renderNode: A,
744
744
  renderEdge: g,
745
745
  getMergeCurve: M,
746
- getBranchSplitCurve: b
746
+ getBranchSplitCurve: _
747
747
  } = O;
748
748
  gr(null);
749
749
  const [W, U] = Ce.useState(0);
750
750
  let I = 0;
751
- const c = C || Tr, y = m || Cr, P = $ || wr, { nodes: k, edges: p } = ie(() => {
751
+ const c = C || Tr, y = P || Cr, m = $ || wr, { nodes: k, edges: p } = ie(() => {
752
752
  const B = [], H = [];
753
- let i = {}, Z = [], J = 0;
754
- function he(n, o, l, s) {
755
- return I = Math.max(I, l, n), M ? M(n, o, l, s) : ve.getCurveTop(n, o, l, s);
753
+ let s = {}, Z = [], J = 0;
754
+ function he(n, i, u, o) {
755
+ return I = Math.max(I, u, n), M ? M(n, i, u, o) : ve.getCurveTop(n, i, u, o);
756
756
  }
757
- function re(n, o, l, s) {
758
- return I = Math.max(I, l, n), b ? b(n, o, l, s) : ve.getCurveBottom(n, o, l, s);
757
+ function re(n, i, u, o) {
758
+ return I = Math.max(I, u, n), _ ? _(n, i, u, o) : ve.getCurveBottom(n, i, u, o);
759
759
  }
760
- function pe(n, o, l, s = 2) {
760
+ function pe(n, i, u, o = 2) {
761
761
  if (g) {
762
- let f = g(o, l);
763
- n.push(f);
762
+ let l = g(i, u);
763
+ n.push(l);
764
764
  } else {
765
- let f = ve.drawFinalPath(o, l, s);
766
- n.push(f);
765
+ let l = ve.drawFinalPath(i, u, o);
766
+ n.push(l);
767
767
  }
768
768
  }
769
- function ge(n, o, l, s, f) {
770
- if (I = Math.max(I, o), A) {
771
- let v = A(o, l, s, f);
769
+ function ge(n, i, u, o, l) {
770
+ if (I = Math.max(I, i), A) {
771
+ let v = A(i, u, o, l);
772
772
  n.push(v);
773
773
  } else {
774
- let v = ve.drawPoint(o, l, s, f);
774
+ let v = ve.drawPoint(i, u, o, l);
775
775
  n.push(v);
776
776
  }
777
777
  }
778
778
  function se() {
779
- const n = Object.values(i), o = new Set(n.map((s) => s.xIndex));
780
- let l = 0;
781
- for (; o.has(l); ) l++;
779
+ const n = Object.values(s), i = new Set(n.map((o) => o.xIndex));
780
+ let u = 0;
781
+ for (; i.has(u); ) u++;
782
782
  return {
783
783
  color: c[J++ % c.length],
784
- xIndex: l
784
+ xIndex: u
785
785
  };
786
786
  }
787
787
  function N() {
788
- const n = Object.keys(i), o = /* @__PURE__ */ new Set();
789
- n.filter((s) => s.startsWith("merge_")).forEach((s) => {
790
- o.add(i[s].xIndex);
788
+ const n = Object.keys(s), i = /* @__PURE__ */ new Set();
789
+ n.filter((o) => o.startsWith("merge_")).forEach((o) => {
790
+ i.add(s[o].xIndex);
791
791
  });
792
- const l = n.filter((s) => !s.startsWith("merge_")).map((s) => i[s]);
793
- l.sort((s, f) => s.xIndex - f.xIndex);
794
- for (const s of l) {
795
- let f = 0;
796
- for (; o.has(f); )
797
- f++;
798
- f < s.xIndex && (s.xIndex = f), o.add(s.xIndex);
792
+ const u = n.filter((o) => !o.startsWith("merge_")).map((o) => s[o]);
793
+ u.sort((o, l) => o.xIndex - l.xIndex);
794
+ for (const o of u) {
795
+ let l = 0;
796
+ for (; i.has(l); )
797
+ l++;
798
+ l < o.xIndex && (o.xIndex = l), i.add(o.xIndex);
799
799
  }
800
800
  }
801
- function K(n, o) {
802
- let l = /* @__PURE__ */ new Set(), s = i[o];
803
- s && (l.add(o), s.toBeClosed && s.toBeClosed.forEach((f) => l.add(f))), Object.keys(i).forEach((f) => {
804
- if (l.has(f)) return;
805
- const v = i[f], _ = v.xIndex * P + Te;
806
- v.lastxy.y !== n && (v.lastxy.x !== _ ? v.pathStr += he(
801
+ function K(n, i) {
802
+ let u = /* @__PURE__ */ new Set(), o = s[i];
803
+ o && (u.add(i), o.toBeClosed && o.toBeClosed.forEach((l) => u.add(l))), Object.keys(s).forEach((l) => {
804
+ if (u.has(l)) return;
805
+ const v = s[l], x = v.xIndex * m + Te;
806
+ v.lastxy.y !== n && (v.lastxy.x !== x ? v.pathStr += he(
807
807
  v.lastxy.x,
808
808
  v.lastxy.y,
809
- _,
809
+ x,
810
810
  n
811
- ) : v.pathStr += ` L ${_} ${n}`, v.lastxy = { x: _, y: n });
811
+ ) : v.pathStr += ` L ${x} ${n}`, v.lastxy = { x, y: n });
812
812
  });
813
813
  }
814
814
  function q(n) {
815
- let o = i[n.id], l = 0, s = "";
816
- if (o)
817
- l = o.xIndex, s = o.color;
815
+ let i = s[n.id], u = 0, o = "";
816
+ if (i)
817
+ u = i.xIndex, o = i.color;
818
818
  else {
819
- let _ = se();
820
- l = _.xIndex, s = _.color;
819
+ let x = se();
820
+ u = x.xIndex, o = x.color;
821
821
  }
822
- const f = l * P + Te, v = n.meta.yIndex * y + Sr;
823
- if (K(v, n.id), o && ((o.lastxy.y !== v || o.lastxy.x !== f) && (o.pathStr += re(
824
- o.lastxy.x,
825
- o.lastxy.y,
826
- f,
822
+ const l = u * m + Te, v = n.meta.yIndex * y + Sr;
823
+ if (K(v, n.id), i && ((i.lastxy.y !== v || i.lastxy.x !== l) && (i.pathStr += re(
824
+ i.lastxy.x,
825
+ i.lastxy.y,
826
+ l,
827
827
  v
828
828
  )), Z.push({
829
- d: o.pathStr,
830
- color: o.color
831
- }), o.toBeClosed && o.toBeClosed.forEach((_) => {
832
- let x = i[_];
833
- x && ((x.lastxy.y !== v || x.lastxy.x !== f) && (x.pathStr += re(
834
- x.lastxy.x,
835
- x.lastxy.y,
836
- f,
829
+ d: i.pathStr,
830
+ color: i.color
831
+ }), i.toBeClosed && i.toBeClosed.forEach((x) => {
832
+ let R = s[x];
833
+ R && ((R.lastxy.y !== v || R.lastxy.x !== l) && (R.pathStr += re(
834
+ R.lastxy.x,
835
+ R.lastxy.y,
836
+ l,
837
837
  v
838
838
  )), Z.push({
839
- d: x.pathStr,
840
- color: x.color
841
- }), delete i[_]);
842
- }), delete i[n.id]), ge(B, f, v, s, n), n.parents.length > 0) {
843
- let _ = n.parents[0];
844
- if (!i[_])
845
- i[_] = {
846
- color: s,
847
- xIndex: l,
848
- lastxy: { x: f, y: v },
849
- pathStr: `M ${f} ${v}`
839
+ d: R.pathStr,
840
+ color: R.color
841
+ }), delete s[x]);
842
+ }), delete s[n.id]), ge(B, l, v, o, n), n.parents.length > 0) {
843
+ let x = n.parents[0];
844
+ if (!s[x])
845
+ s[x] = {
846
+ color: o,
847
+ xIndex: u,
848
+ lastxy: { x: l, y: v },
849
+ pathStr: `M ${l} ${v}`
850
850
  // Creates a fresh string for the parent
851
851
  };
852
852
  else {
853
- let x = i[_];
854
- if (l < x.xIndex) {
855
- let j = `merge_${n.id}_${_}_${x.xIndex}`;
856
- i[j] = x, i[_] = {
857
- color: s,
858
- xIndex: l,
859
- lastxy: { x: f, y: v },
860
- pathStr: `M ${f} ${v}`,
853
+ let R = s[x];
854
+ if (u < R.xIndex) {
855
+ let j = `merge_${n.id}_${x}_${R.xIndex}`;
856
+ s[j] = R, s[x] = {
857
+ color: o,
858
+ xIndex: u,
859
+ lastxy: { x: l, y: v },
860
+ pathStr: `M ${l} ${v}`,
861
861
  // Creates a fresh string
862
- toBeClosed: x.toBeClosed ? [...x.toBeClosed, j] : [j]
863
- }, delete x.toBeClosed;
862
+ toBeClosed: R.toBeClosed ? [...R.toBeClosed, j] : [j]
863
+ }, delete R.toBeClosed;
864
864
  } else {
865
- let j = `merge_${n.id}_${_}_${l}`;
866
- i[j] = {
867
- color: s,
868
- xIndex: l,
869
- lastxy: { x: f, y: v },
870
- pathStr: `M ${f} ${v}`
865
+ let j = `merge_${n.id}_${x}_${u}`;
866
+ s[j] = {
867
+ color: o,
868
+ xIndex: u,
869
+ lastxy: { x: l, y: v },
870
+ pathStr: `M ${l} ${v}`
871
871
  // Creates a fresh string
872
- }, i[_].toBeClosed || (i[_].toBeClosed = []), i[_].toBeClosed.push(j);
872
+ }, s[x].toBeClosed || (s[x].toBeClosed = []), s[x].toBeClosed.push(j);
873
873
  }
874
874
  }
875
- for (let x = 1; x < n.parents.length; x++) {
876
- let j = n.parents[x], te = l + x;
877
- Object.values(i).forEach((V) => {
875
+ for (let R = 1; R < n.parents.length; R++) {
876
+ let j = n.parents[R], te = u + R;
877
+ Object.values(s).forEach((V) => {
878
878
  V.xIndex >= te && V.xIndex++;
879
879
  });
880
880
  let X = {
881
881
  color: c[J++ % c.length],
882
882
  xIndex: te,
883
- lastxy: { x: f, y: v },
884
- pathStr: `M ${f} ${v}`
883
+ lastxy: { x: l, y: v },
884
+ pathStr: `M ${l} ${v}`
885
885
  // Creates a fresh string
886
886
  };
887
- if (!i[j])
888
- i[j] = X;
887
+ if (!s[j])
888
+ s[j] = X;
889
889
  else {
890
890
  let V = `merge_${n.id}_${j}_${te}`;
891
- X.color = i[j].color, i[V] = X, i[j].toBeClosed || (i[j].toBeClosed = []), i[j].toBeClosed.push(V);
891
+ X.color = s[j].color, s[V] = X, s[j].toBeClosed || (s[j].toBeClosed = []), s[j].toBeClosed.push(V);
892
892
  }
893
893
  }
894
894
  }
895
895
  N();
896
896
  }
897
- return T.sort(
898
- (n, o) => new Date(o.date).getTime() - new Date(n.date).getTime()
899
- ), T.forEach((n, o) => {
900
- n.meta = { yIndex: o };
901
- }), T.forEach((n) => {
897
+ return b.sort(
898
+ (n, i) => new Date(i.date).getTime() - new Date(n.date).getTime()
899
+ ), b.forEach((n, i) => {
900
+ n.meta == null && (n.meta = { yIndex: i, prev: [] }), n.meta.yIndex = i, n.parents.forEach((u) => {
901
+ var o = b.findIndex((v) => v.id === u);
902
+ if (o > -1) {
903
+ var l = b[o];
904
+ l.meta == null && (l.meta = { yIndex: o, prev: [] }), l.meta.prev.indexOf(n.id) < 0 && l.meta.prev.push(n.id);
905
+ }
906
+ });
907
+ }), b.forEach((n) => {
902
908
  q(n);
903
909
  }), Z.forEach((n) => {
904
910
  pe(H, n.d, n.color, Or);
@@ -909,8 +915,8 @@ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
909
915
  }, [I]), /* @__PURE__ */ G.jsx(G.Fragment, { children: /* @__PURE__ */ G.jsxs(
910
916
  "svg",
911
917
  {
912
- ref: R,
913
- height: y * T.length,
918
+ ref: T,
919
+ height: y * b.length,
914
920
  width: W,
915
921
  style: F,
916
922
  children: [
@@ -922,5 +928,5 @@ const Ne = 50, xr = 5, Rr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0
922
928
  });
923
929
  export {
924
930
  $r as GitGraph,
925
- Pr as GitGraphSVG
931
+ mr as GitGraphSVG
926
932
  };
@@ -1,14 +1,14 @@
1
- (function(J,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],k):(J=typeof globalThis<"u"?globalThis:J||self,k(J.GitRepoGraph={},J.React))})(this,(function(J,k){"use strict";var le={exports:{}},ne={};var we;function Ve(){if(we)return ne;we=1;var m=k,R=Symbol.for("react.element"),T=Symbol.for("react.fragment"),C=Object.prototype.hasOwnProperty,O=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function A(M,g,U){var b,W={},G=null,D=null;U!==void 0&&(G=""+U),g.key!==void 0&&(G=""+g.key),g.ref!==void 0&&(D=g.ref);for(b in g)C.call(g,b)&&!j.hasOwnProperty(b)&&(W[b]=g[b]);if(M&&M.defaultProps)for(b in g=M.defaultProps,g)W[b]===void 0&&(W[b]=g[b]);return{$$typeof:R,type:M,key:G,ref:D,props:W,_owner:O.current}}return ne.Fragment=T,ne.jsx=A,ne.jsxs=A,ne}var ae={};var Se;function Ne(){return Se||(Se=1,process.env.NODE_ENV!=="production"&&(function(){var m=k,R=Symbol.for("react.element"),T=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),O=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),M=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),b=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),c=Symbol.iterator,E="@@iterator";function P(e){if(e===null||typeof e!="object")return null;var r=c&&e[c]||e[E];return typeof r=="function"?r:null}var F=m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];B("error",e,t)}}function B(e,r,t){{var a=F.ReactDebugCurrentFrame,h=a.getStackAddendum();h!==""&&(r+="%s",t=t.concat([h]));var y=t.map(function(d){return String(d)});y.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,y)}}var X=!1,i=!1,ee=!1,z=!1,ge=!1,oe;oe=Symbol.for("react.module.reference");function ye(e){return!!(typeof e=="string"||typeof e=="function"||e===C||e===j||ge||e===O||e===U||e===b||z||e===D||X||i||ee||typeof e=="object"&&e!==null&&(e.$$typeof===G||e.$$typeof===W||e.$$typeof===A||e.$$typeof===M||e.$$typeof===g||e.$$typeof===oe||e.getModuleId!==void 0))}function Ee(e,r,t){var a=e.displayName;if(a)return a;var h=r.displayName||r.name||"";return h!==""?t+"("+h+")":t}function ce(e){return e.displayName||"Context"}function N(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case T:return"Portal";case j:return"Profiler";case O:return"StrictMode";case U:return"Suspense";case b:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case M:var r=e;return ce(r)+".Consumer";case A:var t=e;return ce(t._context)+".Provider";case g:return Ee(e,e.render,"ForwardRef");case W:var a=e.displayName||null;return a!==null?a:N(e.type)||"Memo";case G:{var h=e,y=h._payload,d=h._init;try{return N(d(y))}catch{return null}}}return null}var H=Object.assign,Z=0,n,o,l,s,f,v,_;function x(){}x.__reactDisabledLog=!0;function I(){{if(Z===0){n=console.log,o=console.info,l=console.warn,s=console.error,f=console.group,v=console.groupCollapsed,_=console.groupEnd;var e={configurable:!0,enumerable:!0,value:x,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Z++}}function ie(){{if(Z--,Z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},e,{value:n}),info:H({},e,{value:o}),warn:H({},e,{value:l}),error:H({},e,{value:s}),group:H({},e,{value:f}),groupCollapsed:H({},e,{value:v}),groupEnd:H({},e,{value:_})})}Z<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var fe=F.ReactCurrentDispatcher,q;function K(e,r,t){{if(q===void 0)try{throw Error()}catch(h){var a=h.stack.trim().match(/\n( *(at )?)/);q=a&&a[1]||""}return`
2
- `+q+e}}var be=!1,de;{var tr=typeof WeakMap=="function"?WeakMap:Map;de=new tr}function Pe(e,r){if(!e||be)return"";{var t=de.get(e);if(t!==void 0)return t}var a;be=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var y;y=fe.current,fe.current=null,I();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(L){a=L}Reflect.construct(e,[],d)}else{try{d.call()}catch(L){a=L}e.call(d.prototype)}}else{try{throw Error()}catch(L){a=L}e()}}catch(L){if(L&&a&&typeof L.stack=="string"){for(var u=L.stack.split(`
1
+ (function(J,k){typeof exports=="object"&&typeof module<"u"?k(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],k):(J=typeof globalThis<"u"?globalThis:J||self,k(J.GitRepoGraph={},J.React))})(this,(function(J,k){"use strict";var le={exports:{}},ne={};var we;function Ve(){if(we)return ne;we=1;var O=k,T=Symbol.for("react.element"),b=Symbol.for("react.fragment"),C=Object.prototype.hasOwnProperty,m=O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function A(M,g,U){var _,W={},G=null,D=null;U!==void 0&&(G=""+U),g.key!==void 0&&(G=""+g.key),g.ref!==void 0&&(D=g.ref);for(_ in g)C.call(g,_)&&!j.hasOwnProperty(_)&&(W[_]=g[_]);if(M&&M.defaultProps)for(_ in g=M.defaultProps,g)W[_]===void 0&&(W[_]=g[_]);return{$$typeof:T,type:M,key:G,ref:D,props:W,_owner:m.current}}return ne.Fragment=b,ne.jsx=A,ne.jsxs=A,ne}var ae={};var Se;function Ne(){return Se||(Se=1,process.env.NODE_ENV!=="production"&&(function(){var O=k,T=Symbol.for("react.element"),b=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),m=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),A=Symbol.for("react.provider"),M=Symbol.for("react.context"),g=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),W=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),D=Symbol.for("react.offscreen"),c=Symbol.iterator,E="@@iterator";function P(e){if(e===null||typeof e!="object")return null;var r=c&&e[c]||e[E];return typeof r=="function"?r:null}var F=O.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function p(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];B("error",e,t)}}function B(e,r,t){{var a=F.ReactDebugCurrentFrame,h=a.getStackAddendum();h!==""&&(r+="%s",t=t.concat([h]));var y=t.map(function(d){return String(d)});y.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,y)}}var X=!1,s=!1,ee=!1,z=!1,ge=!1,oe;oe=Symbol.for("react.module.reference");function ye(e){return!!(typeof e=="string"||typeof e=="function"||e===C||e===j||ge||e===m||e===U||e===_||z||e===D||X||s||ee||typeof e=="object"&&e!==null&&(e.$$typeof===G||e.$$typeof===W||e.$$typeof===A||e.$$typeof===M||e.$$typeof===g||e.$$typeof===oe||e.getModuleId!==void 0))}function Ee(e,r,t){var a=e.displayName;if(a)return a;var h=r.displayName||r.name||"";return h!==""?t+"("+h+")":t}function fe(e){return e.displayName||"Context"}function N(e){if(e==null)return null;if(typeof e.tag=="number"&&p("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case C:return"Fragment";case b:return"Portal";case j:return"Profiler";case m:return"StrictMode";case U:return"Suspense";case _:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case M:var r=e;return fe(r)+".Consumer";case A:var t=e;return fe(t._context)+".Provider";case g:return Ee(e,e.render,"ForwardRef");case W:var a=e.displayName||null;return a!==null?a:N(e.type)||"Memo";case G:{var h=e,y=h._payload,d=h._init;try{return N(d(y))}catch{return null}}}return null}var H=Object.assign,Z=0,n,i,u,o,l,v,x;function R(){}R.__reactDisabledLog=!0;function I(){{if(Z===0){n=console.log,i=console.info,u=console.warn,o=console.error,l=console.group,v=console.groupCollapsed,x=console.groupEnd;var e={configurable:!0,enumerable:!0,value:R,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}Z++}}function ie(){{if(Z--,Z===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:H({},e,{value:n}),info:H({},e,{value:i}),warn:H({},e,{value:u}),error:H({},e,{value:o}),group:H({},e,{value:l}),groupCollapsed:H({},e,{value:v}),groupEnd:H({},e,{value:x})})}Z<0&&p("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var ce=F.ReactCurrentDispatcher,q;function K(e,r,t){{if(q===void 0)try{throw Error()}catch(h){var a=h.stack.trim().match(/\n( *(at )?)/);q=a&&a[1]||""}return`
2
+ `+q+e}}var be=!1,de;{var tr=typeof WeakMap=="function"?WeakMap:Map;de=new tr}function Pe(e,r){if(!e||be)return"";{var t=de.get(e);if(t!==void 0)return t}var a;be=!0;var h=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var y;y=ce.current,ce.current=null,I();try{if(r){var d=function(){throw Error()};if(Object.defineProperty(d.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(d,[])}catch(L){a=L}Reflect.construct(e,[],d)}else{try{d.call()}catch(L){a=L}e.call(d.prototype)}}else{try{throw Error()}catch(L){a=L}e()}}catch(L){if(L&&a&&typeof L.stack=="string"){for(var f=L.stack.split(`
3
3
  `),$=a.stack.split(`
4
- `),w=u.length-1,S=$.length-1;w>=1&&S>=0&&u[w]!==$[S];)S--;for(;w>=1&&S>=0;w--,S--)if(u[w]!==$[S]){if(w!==1||S!==1)do if(w--,S--,S<0||u[w]!==$[S]){var Y=`
5
- `+u[w].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),typeof e=="function"&&de.set(e,Y),Y}while(w>=1&&S>=0);break}}}finally{be=!1,fe.current=y,ie(),Error.prepareStackTrace=h}var te=e?e.displayName||e.name:"",Q=te?K(te):"";return typeof e=="function"&&de.set(e,Q),Q}function nr(e,r,t){return Pe(e,!1)}function ar(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function ve(e,r,t){if(e==null)return"";if(typeof e=="function")return Pe(e,ar(e));if(typeof e=="string")return K(e);switch(e){case U:return K("Suspense");case b:return K("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return nr(e.render);case W:return ve(e.type,r,t);case G:{var a=e,h=a._payload,y=a._init;try{return ve(y(h),r,t)}catch{}}}return""}var se=Object.prototype.hasOwnProperty,je={},Ie=F.ReactDebugCurrentFrame;function he(e){if(e){var r=e._owner,t=ve(e.type,e._source,r?r.type:null);Ie.setExtraStackFrame(t)}else Ie.setExtraStackFrame(null)}function or(e,r,t,a,h){{var y=Function.call.bind(se);for(var d in e)if(y(e,d)){var u=void 0;try{if(typeof e[d]!="function"){var $=Error((a||"React class")+": "+t+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw $.name="Invariant Violation",$}u=e[d](r,d,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(w){u=w}u&&!(u instanceof Error)&&(he(h),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,d,typeof u),he(null)),u instanceof Error&&!(u.message in je)&&(je[u.message]=!0,he(h),p("Failed %s type: %s",t,u.message),he(null))}}}var ir=Array.isArray;function _e(e){return ir(e)}function sr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function lr(e){try{return ke(e),!1}catch{return!0}}function ke(e){return""+e}function De(e){if(lr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",sr(e)),ke(e)}var Fe=F.ReactCurrentOwner,ur={key:!0,ref:!0,__self:!0,__source:!0},$e,Ae;function cr(e){if(se.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function fr(e){if(se.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function dr(e,r){typeof e.ref=="string"&&Fe.current}function vr(e,r){{var t=function(){$e||($e=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function hr(e,r){{var t=function(){Ae||(Ae=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var pr=function(e,r,t,a,h,y,d){var u={$$typeof:R,type:e,key:r,ref:t,props:d,_owner:y};return u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(u,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(u,"_source",{configurable:!1,enumerable:!1,writable:!1,value:h}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u};function gr(e,r,t,a,h){{var y,d={},u=null,$=null;t!==void 0&&(De(t),u=""+t),fr(r)&&(De(r.key),u=""+r.key),cr(r)&&($=r.ref,dr(r,h));for(y in r)se.call(r,y)&&!ur.hasOwnProperty(y)&&(d[y]=r[y]);if(e&&e.defaultProps){var w=e.defaultProps;for(y in w)d[y]===void 0&&(d[y]=w[y])}if(u||$){var S=typeof e=="function"?e.displayName||e.name||"Unknown":e;u&&vr(d,S),$&&hr(d,S)}return pr(e,u,$,h,a,Fe.current,d)}}var xe=F.ReactCurrentOwner,Me=F.ReactDebugCurrentFrame;function re(e){if(e){var r=e._owner,t=ve(e.type,e._source,r?r.type:null);Me.setExtraStackFrame(t)}else Me.setExtraStackFrame(null)}var Re;Re=!1;function Te(e){return typeof e=="object"&&e!==null&&e.$$typeof===R}function Le(){{if(xe.current){var e=N(xe.current.type);if(e)return`
4
+ `),w=f.length-1,S=$.length-1;w>=1&&S>=0&&f[w]!==$[S];)S--;for(;w>=1&&S>=0;w--,S--)if(f[w]!==$[S]){if(w!==1||S!==1)do if(w--,S--,S<0||f[w]!==$[S]){var Y=`
5
+ `+f[w].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),typeof e=="function"&&de.set(e,Y),Y}while(w>=1&&S>=0);break}}}finally{be=!1,ce.current=y,ie(),Error.prepareStackTrace=h}var te=e?e.displayName||e.name:"",Q=te?K(te):"";return typeof e=="function"&&de.set(e,Q),Q}function nr(e,r,t){return Pe(e,!1)}function ar(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function ve(e,r,t){if(e==null)return"";if(typeof e=="function")return Pe(e,ar(e));if(typeof e=="string")return K(e);switch(e){case U:return K("Suspense");case _:return K("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case g:return nr(e.render);case W:return ve(e.type,r,t);case G:{var a=e,h=a._payload,y=a._init;try{return ve(y(h),r,t)}catch{}}}return""}var se=Object.prototype.hasOwnProperty,je={},Ie=F.ReactDebugCurrentFrame;function he(e){if(e){var r=e._owner,t=ve(e.type,e._source,r?r.type:null);Ie.setExtraStackFrame(t)}else Ie.setExtraStackFrame(null)}function or(e,r,t,a,h){{var y=Function.call.bind(se);for(var d in e)if(y(e,d)){var f=void 0;try{if(typeof e[d]!="function"){var $=Error((a||"React class")+": "+t+" type `"+d+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[d]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw $.name="Invariant Violation",$}f=e[d](r,d,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(w){f=w}f&&!(f instanceof Error)&&(he(h),p("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,d,typeof f),he(null)),f instanceof Error&&!(f.message in je)&&(je[f.message]=!0,he(h),p("Failed %s type: %s",t,f.message),he(null))}}}var ir=Array.isArray;function _e(e){return ir(e)}function sr(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function lr(e){try{return ke(e),!1}catch{return!0}}function ke(e){return""+e}function De(e){if(lr(e))return p("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",sr(e)),ke(e)}var Fe=F.ReactCurrentOwner,ur={key:!0,ref:!0,__self:!0,__source:!0},$e,Ae;function fr(e){if(se.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function cr(e){if(se.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function dr(e,r){typeof e.ref=="string"&&Fe.current}function vr(e,r){{var t=function(){$e||($e=!0,p("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function hr(e,r){{var t=function(){Ae||(Ae=!0,p("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var pr=function(e,r,t,a,h,y,d){var f={$$typeof:T,type:e,key:r,ref:t,props:d,_owner:y};return f._store={},Object.defineProperty(f._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(f,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(f,"_source",{configurable:!1,enumerable:!1,writable:!1,value:h}),Object.freeze&&(Object.freeze(f.props),Object.freeze(f)),f};function gr(e,r,t,a,h){{var y,d={},f=null,$=null;t!==void 0&&(De(t),f=""+t),cr(r)&&(De(r.key),f=""+r.key),fr(r)&&($=r.ref,dr(r,h));for(y in r)se.call(r,y)&&!ur.hasOwnProperty(y)&&(d[y]=r[y]);if(e&&e.defaultProps){var w=e.defaultProps;for(y in w)d[y]===void 0&&(d[y]=w[y])}if(f||$){var S=typeof e=="function"?e.displayName||e.name||"Unknown":e;f&&vr(d,S),$&&hr(d,S)}return pr(e,f,$,h,a,Fe.current,d)}}var xe=F.ReactCurrentOwner,Me=F.ReactDebugCurrentFrame;function re(e){if(e){var r=e._owner,t=ve(e.type,e._source,r?r.type:null);Me.setExtraStackFrame(t)}else Me.setExtraStackFrame(null)}var Re;Re=!1;function Te(e){return typeof e=="object"&&e!==null&&e.$$typeof===T}function Le(){{if(xe.current){var e=N(xe.current.type);if(e)return`
6
6
 
7
7
  Check the render method of \``+e+"`."}return""}}function yr(e){return""}var We={};function Er(e){{var r=Le();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
8
8
 
9
- Check the top-level render call using <`+t+">.")}return r}}function Be(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Er(r);if(We[t])return;We[t]=!0;var a="";e&&e._owner&&e._owner!==xe.current&&(a=" It was passed a child from "+N(e._owner.type)+"."),re(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),re(null)}}function Ue(e,r){{if(typeof e!="object")return;if(_e(e))for(var t=0;t<e.length;t++){var a=e[t];Te(a)&&Be(a,r)}else if(Te(e))e._store&&(e._store.validated=!0);else if(e){var h=P(e);if(typeof h=="function"&&h!==e.entries)for(var y=h.call(e),d;!(d=y.next()).done;)Te(d.value)&&Be(d.value,r)}}}function br(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===g||r.$$typeof===W))t=r.propTypes;else return;if(t){var a=N(r);or(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!Re){Re=!0;var h=N(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",h||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _r(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){re(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),re(null);break}}e.ref!==null&&(re(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}}var Ge={};function Ye(e,r,t,a,h,y){{var d=ye(e);if(!d){var u="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(u+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var $=yr();$?u+=$:u+=Le();var w;e===null?w="null":_e(e)?w="array":e!==void 0&&e.$$typeof===R?(w="<"+(N(e.type)||"Unknown")+" />",u=" Did you accidentally export a JSX literal instead of a component?"):w=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",w,u)}var S=gr(e,r,t,h,y);if(S==null)return S;if(d){var Y=r.children;if(Y!==void 0)if(a)if(_e(Y)){for(var te=0;te<Y.length;te++)Ue(Y[te],e);Object.freeze&&Object.freeze(Y)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ue(Y,e)}if(se.call(r,"key")){var Q=N(e),L=Object.keys(r).filter(function(Sr){return Sr!=="key"}),Ce=L.length>0?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}";if(!Ge[Q+Ce]){var wr=L.length>0?"{"+L.join(": ..., ")+": ...}":"{}";p(`A props object containing a "key" prop is being spread into JSX:
9
+ Check the top-level render call using <`+t+">.")}return r}}function Be(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Er(r);if(We[t])return;We[t]=!0;var a="";e&&e._owner&&e._owner!==xe.current&&(a=" It was passed a child from "+N(e._owner.type)+"."),re(e),p('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),re(null)}}function Ue(e,r){{if(typeof e!="object")return;if(_e(e))for(var t=0;t<e.length;t++){var a=e[t];Te(a)&&Be(a,r)}else if(Te(e))e._store&&(e._store.validated=!0);else if(e){var h=P(e);if(typeof h=="function"&&h!==e.entries)for(var y=h.call(e),d;!(d=y.next()).done;)Te(d.value)&&Be(d.value,r)}}}function br(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===g||r.$$typeof===W))t=r.propTypes;else return;if(t){var a=N(r);or(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!Re){Re=!0;var h=N(r);p("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",h||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&p("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function _r(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){re(e),p("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),re(null);break}}e.ref!==null&&(re(e),p("Invalid attribute `ref` supplied to `React.Fragment`."),re(null))}}var Ge={};function Ye(e,r,t,a,h,y){{var d=ye(e);if(!d){var f="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(f+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var $=yr();$?f+=$:f+=Le();var w;e===null?w="null":_e(e)?w="array":e!==void 0&&e.$$typeof===T?(w="<"+(N(e.type)||"Unknown")+" />",f=" Did you accidentally export a JSX literal instead of a component?"):w=typeof e,p("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",w,f)}var S=gr(e,r,t,h,y);if(S==null)return S;if(d){var Y=r.children;if(Y!==void 0)if(a)if(_e(Y)){for(var te=0;te<Y.length;te++)Ue(Y[te],e);Object.freeze&&Object.freeze(Y)}else p("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else Ue(Y,e)}if(se.call(r,"key")){var Q=N(e),L=Object.keys(r).filter(function(Sr){return Sr!=="key"}),Ce=L.length>0?"{key: someKey, "+L.join(": ..., ")+": ...}":"{key: someKey}";if(!Ge[Q+Ce]){var wr=L.length>0?"{"+L.join(": ..., ")+": ...}":"{}";p(`A props object containing a "key" prop is being spread into JSX:
10
10
  let props = %s;
11
11
  <%s {...props} />
12
12
  React keys must be passed directly to JSX without using spread:
13
13
  let props = %s;
14
- <%s key={someKey} {...props} />`,Ce,Q,wr,Q),Ge[Q+Ce]=!0}}return e===C?_r(S):br(S),S}}function xr(e,r,t){return Ye(e,r,t,!0)}function Rr(e,r,t){return Ye(e,r,t,!1)}var Tr=Rr,Cr=xr;ae.Fragment=C,ae.jsx=Tr,ae.jsxs=Cr})()),ae}var me;function Ke(){return me||(me=1,process.env.NODE_ENV==="production"?le.exports=Ve():le.exports=Ne()),le.exports}var V=Ke();const Oe=50,He=5,Je=["#3a86ff","#8338ec","#ff006e","#fb5607","#ffbe0b"],Xe=({commits:m,rowHeight:R,colorPalette:T,laneWidth:C,renderNode:O,renderEdge:j})=>{const A=C||Oe,M=R||Oe,g=k.useMemo(()=>(T||Je).map((c,E)=>({color:c,branch:null,lane:E+1,index:E})),[T,m]);function U(){var c=g.findIndex(P=>!P.branch);if(c>-1)return g[c];var E={color:"#"+Math.floor(Math.random()*16777215).toString(16),branch:null,lane:g.length+1,index:c};return g.push(E),E}const b=k.useMemo(()=>{var c=[];const E=new Map;return m.forEach((P,F)=>{var p={...P,color:"",lane:0,cx:0,cy:0,prev:[],index:F},B=g.find(i=>i.branch==P.id);B?g.forEach(i=>{i.branch===P.id&&i.index!==B?.index&&(i.branch=null)}):B=U();for(const i of P.parents)if(g.find(z=>z.branch===i))B.branch=i;else if(B.branch==P.id)B.branch=i;else{var X=g.find(z=>!z.branch);X||(X=U()),X.branch=i}p.color=B.color,p.lane=B.lane,p.cx=p.lane*A-A/2,p.cy=M*F+A/2,c.push(p),E.set(p.id,p)}),c.forEach(P=>{P.parents.forEach(F=>{const p=E.get(F);p&&p.prev.push(P)})}),c},[m,M,A]);function W(c,E){return`M ${c.cx} ${c.cy} L ${E.cx} ${E.cy}`}const G=k.useMemo(()=>Math.max(...b.map(c=>c.lane),0),[b]),D=k.useMemo(()=>G*A+100,[G,A]);return V.jsxs("svg",{width:D,height:M*b.length,children:[b.flatMap(c=>c.prev.map((E,P)=>{if(j)return j(c,E,b,P);const F=W(c,E);return V.jsx("path",{d:F,fill:"none",stroke:c.lane<=E.lane?E.color:c.color,strokeWidth:2},`${c.id}-${E.id}_${P}`)})),b.map((c,E)=>O?O(c,E):V.jsx("circle",{cx:c.cx,cy:c.cy,r:He,fill:c.color},`${c.id}_${E}`))]})},ue={getCurveTop(m,R,T,C){const O=Math.min(15,Math.abs(C-R)/2);let j=` C ${m} ${R+O}, ${T} ${R+O}, ${T} ${R+O*2}`;return R+O*2<C&&(j+=` L ${T} ${C}`),j},getCurveBottom(m,R,T,C){const O=Math.min(15,Math.abs(C-R)/2);let j="";return C-O*2>R&&(j+=` L ${m} ${C-O*2}`),j+=` C ${m} ${C-O}, ${T} ${C-O}, ${T} ${C}`,j},drawFinalPath(m,R,T=2){return V.jsx("path",{d:m,stroke:R,strokeWidth:T,fill:"none"})},drawPoint(m,R,T,C){return V.jsx("circle",{cx:m,cy:R,r:5,fill:T,stroke:"none"})}},ze=["#3a86ff","#8338ec","#ff006e","#fb5607","#ffbe0b","#3affbd","#adec38","#ff009d","#fb7507","#0b38ff"],Ze=35,qe=35,pe=25,Qe=25,er=2,rr=k.forwardRef((m,R)=>{const{commits:T,colorPalette:C,rowHeight:O,laneWidth:j,style:A,renderNode:M,renderEdge:g,getMergeCurve:U,getBranchSplitCurve:b}=m;k.useRef(null);const[W,G]=k.useState(0);let D=0;const c=C||ze,E=O||Ze,P=j||qe,{nodes:F,edges:p}=k.useMemo(()=>{const B=[],X=[];let i={},ee=[],z=0;function ge(n,o,l,s){return D=Math.max(D,l,n),U?U(n,o,l,s):ue.getCurveTop(n,o,l,s)}function oe(n,o,l,s){return D=Math.max(D,l,n),b?b(n,o,l,s):ue.getCurveBottom(n,o,l,s)}function ye(n,o,l,s=2){if(g){let f=g(o,l);n.push(f)}else{let f=ue.drawFinalPath(o,l,s);n.push(f)}}function Ee(n,o,l,s,f){if(D=Math.max(D,o),M){let v=M(o,l,s,f);n.push(v)}else{let v=ue.drawPoint(o,l,s,f);n.push(v)}}function ce(){const n=Object.values(i),o=new Set(n.map(s=>s.xIndex));let l=0;for(;o.has(l);)l++;return{color:c[z++%c.length],xIndex:l}}function N(){const n=Object.keys(i),o=new Set;n.filter(s=>s.startsWith("merge_")).forEach(s=>{o.add(i[s].xIndex)});const l=n.filter(s=>!s.startsWith("merge_")).map(s=>i[s]);l.sort((s,f)=>s.xIndex-f.xIndex);for(const s of l){let f=0;for(;o.has(f);)f++;f<s.xIndex&&(s.xIndex=f),o.add(s.xIndex)}}function H(n,o){let l=new Set,s=i[o];s&&(l.add(o),s.toBeClosed&&s.toBeClosed.forEach(f=>l.add(f))),Object.keys(i).forEach(f=>{if(l.has(f))return;const v=i[f],_=v.xIndex*P+pe;v.lastxy.y!==n&&(v.lastxy.x!==_?v.pathStr+=ge(v.lastxy.x,v.lastxy.y,_,n):v.pathStr+=` L ${_} ${n}`,v.lastxy={x:_,y:n})})}function Z(n){let o=i[n.id],l=0,s="";if(o)l=o.xIndex,s=o.color;else{let _=ce();l=_.xIndex,s=_.color}const f=l*P+pe,v=n.meta.yIndex*E+Qe;if(H(v,n.id),o&&((o.lastxy.y!==v||o.lastxy.x!==f)&&(o.pathStr+=oe(o.lastxy.x,o.lastxy.y,f,v)),ee.push({d:o.pathStr,color:o.color}),o.toBeClosed&&o.toBeClosed.forEach(_=>{let x=i[_];x&&((x.lastxy.y!==v||x.lastxy.x!==f)&&(x.pathStr+=oe(x.lastxy.x,x.lastxy.y,f,v)),ee.push({d:x.pathStr,color:x.color}),delete i[_])}),delete i[n.id]),Ee(B,f,v,s,n),n.parents.length>0){let _=n.parents[0];if(!i[_])i[_]={color:s,xIndex:l,lastxy:{x:f,y:v},pathStr:`M ${f} ${v}`};else{let x=i[_];if(l<x.xIndex){let I=`merge_${n.id}_${_}_${x.xIndex}`;i[I]=x,i[_]={color:s,xIndex:l,lastxy:{x:f,y:v},pathStr:`M ${f} ${v}`,toBeClosed:x.toBeClosed?[...x.toBeClosed,I]:[I]},delete x.toBeClosed}else{let I=`merge_${n.id}_${_}_${l}`;i[I]={color:s,xIndex:l,lastxy:{x:f,y:v},pathStr:`M ${f} ${v}`},i[_].toBeClosed||(i[_].toBeClosed=[]),i[_].toBeClosed.push(I)}}for(let x=1;x<n.parents.length;x++){let I=n.parents[x],ie=l+x;Object.values(i).forEach(K=>{K.xIndex>=ie&&K.xIndex++});let q={color:c[z++%c.length],xIndex:ie,lastxy:{x:f,y:v},pathStr:`M ${f} ${v}`};if(!i[I])i[I]=q;else{let K=`merge_${n.id}_${I}_${ie}`;q.color=i[I].color,i[K]=q,i[I].toBeClosed||(i[I].toBeClosed=[]),i[I].toBeClosed.push(K)}}}N()}return T.sort((n,o)=>new Date(o.date).getTime()-new Date(n.date).getTime()),T.forEach((n,o)=>{n.meta={yIndex:o}}),T.forEach(n=>{Z(n)}),ee.forEach(n=>{ye(X,n.d,n.color,er)}),{nodes:B,edges:X}},[{...m}]);return k.useEffect(()=>{G(D+pe)},[D]),V.jsx(V.Fragment,{children:V.jsxs("svg",{ref:R,height:E*T.length,width:W,style:A,children:[V.jsx("g",{id:"layer-lines",children:p}),V.jsx("g",{id:"layer-points",children:F})]})})});J.GitGraph=rr,J.GitGraphSVG=Xe,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})}));
14
+ <%s key={someKey} {...props} />`,Ce,Q,wr,Q),Ge[Q+Ce]=!0}}return e===C?_r(S):br(S),S}}function xr(e,r,t){return Ye(e,r,t,!0)}function Rr(e,r,t){return Ye(e,r,t,!1)}var Tr=Rr,Cr=xr;ae.Fragment=C,ae.jsx=Tr,ae.jsxs=Cr})()),ae}var Oe;function Ke(){return Oe||(Oe=1,process.env.NODE_ENV==="production"?le.exports=Ve():le.exports=Ne()),le.exports}var V=Ke();const me=50,He=5,Je=["#3a86ff","#8338ec","#ff006e","#fb5607","#ffbe0b"],Xe=({commits:O,rowHeight:T,colorPalette:b,laneWidth:C,renderNode:m,renderEdge:j})=>{const A=C||me,M=T||me,g=k.useMemo(()=>(b||Je).map((c,E)=>({color:c,branch:null,lane:E+1,index:E})),[b,O]);function U(){var c=g.findIndex(P=>!P.branch);if(c>-1)return g[c];var E={color:"#"+Math.floor(Math.random()*16777215).toString(16),branch:null,lane:g.length+1,index:c};return g.push(E),E}const _=k.useMemo(()=>{var c=[];const E=new Map;return O.forEach((P,F)=>{var p={...P,color:"",lane:0,cx:0,cy:0,prev:[],index:F},B=g.find(s=>s.branch==P.id);B?g.forEach(s=>{s.branch===P.id&&s.index!==B?.index&&(s.branch=null)}):B=U();for(const s of P.parents)if(g.find(z=>z.branch===s))B.branch=s;else if(B.branch==P.id)B.branch=s;else{var X=g.find(z=>!z.branch);X||(X=U()),X.branch=s}p.color=B.color,p.lane=B.lane,p.cx=p.lane*A-A/2,p.cy=M*F+A/2,c.push(p),E.set(p.id,p)}),c.forEach(P=>{P.parents.forEach(F=>{const p=E.get(F);p&&p.prev.push(P)})}),c},[O,M,A]);function W(c,E){return`M ${c.cx} ${c.cy} L ${E.cx} ${E.cy}`}const G=k.useMemo(()=>Math.max(..._.map(c=>c.lane),0),[_]),D=k.useMemo(()=>G*A+100,[G,A]);return V.jsxs("svg",{width:D,height:M*_.length,children:[_.flatMap(c=>c.prev.map((E,P)=>{if(j)return j(c,E,_,P);const F=W(c,E);return V.jsx("path",{d:F,fill:"none",stroke:c.lane<=E.lane?E.color:c.color,strokeWidth:2},`${c.id}-${E.id}_${P}`)})),_.map((c,E)=>m?m(c,E):V.jsx("circle",{cx:c.cx,cy:c.cy,r:He,fill:c.color},`${c.id}_${E}`))]})},ue={getCurveTop(O,T,b,C){const m=Math.min(15,Math.abs(C-T)/2);let j=` C ${O} ${T+m}, ${b} ${T+m}, ${b} ${T+m*2}`;return T+m*2<C&&(j+=` L ${b} ${C}`),j},getCurveBottom(O,T,b,C){const m=Math.min(15,Math.abs(C-T)/2);let j="";return C-m*2>T&&(j+=` L ${O} ${C-m*2}`),j+=` C ${O} ${C-m}, ${b} ${C-m}, ${b} ${C}`,j},drawFinalPath(O,T,b=2){return V.jsx("path",{d:O,stroke:T,strokeWidth:b,fill:"none"})},drawPoint(O,T,b,C){return V.jsx("circle",{cx:O,cy:T,r:5,fill:b,stroke:"none"})}},ze=["#3a86ff","#8338ec","#ff006e","#fb5607","#ffbe0b","#3affbd","#adec38","#ff009d","#fb7507","#0b38ff"],Ze=35,qe=35,pe=25,Qe=25,er=2,rr=k.forwardRef((O,T)=>{const{commits:b,colorPalette:C,rowHeight:m,laneWidth:j,style:A,renderNode:M,renderEdge:g,getMergeCurve:U,getBranchSplitCurve:_}=O;k.useRef(null);const[W,G]=k.useState(0);let D=0;const c=C||ze,E=m||Ze,P=j||qe,{nodes:F,edges:p}=k.useMemo(()=>{const B=[],X=[];let s={},ee=[],z=0;function ge(n,i,u,o){return D=Math.max(D,u,n),U?U(n,i,u,o):ue.getCurveTop(n,i,u,o)}function oe(n,i,u,o){return D=Math.max(D,u,n),_?_(n,i,u,o):ue.getCurveBottom(n,i,u,o)}function ye(n,i,u,o=2){if(g){let l=g(i,u);n.push(l)}else{let l=ue.drawFinalPath(i,u,o);n.push(l)}}function Ee(n,i,u,o,l){if(D=Math.max(D,i),M){let v=M(i,u,o,l);n.push(v)}else{let v=ue.drawPoint(i,u,o,l);n.push(v)}}function fe(){const n=Object.values(s),i=new Set(n.map(o=>o.xIndex));let u=0;for(;i.has(u);)u++;return{color:c[z++%c.length],xIndex:u}}function N(){const n=Object.keys(s),i=new Set;n.filter(o=>o.startsWith("merge_")).forEach(o=>{i.add(s[o].xIndex)});const u=n.filter(o=>!o.startsWith("merge_")).map(o=>s[o]);u.sort((o,l)=>o.xIndex-l.xIndex);for(const o of u){let l=0;for(;i.has(l);)l++;l<o.xIndex&&(o.xIndex=l),i.add(o.xIndex)}}function H(n,i){let u=new Set,o=s[i];o&&(u.add(i),o.toBeClosed&&o.toBeClosed.forEach(l=>u.add(l))),Object.keys(s).forEach(l=>{if(u.has(l))return;const v=s[l],x=v.xIndex*P+pe;v.lastxy.y!==n&&(v.lastxy.x!==x?v.pathStr+=ge(v.lastxy.x,v.lastxy.y,x,n):v.pathStr+=` L ${x} ${n}`,v.lastxy={x,y:n})})}function Z(n){let i=s[n.id],u=0,o="";if(i)u=i.xIndex,o=i.color;else{let x=fe();u=x.xIndex,o=x.color}const l=u*P+pe,v=n.meta.yIndex*E+Qe;if(H(v,n.id),i&&((i.lastxy.y!==v||i.lastxy.x!==l)&&(i.pathStr+=oe(i.lastxy.x,i.lastxy.y,l,v)),ee.push({d:i.pathStr,color:i.color}),i.toBeClosed&&i.toBeClosed.forEach(x=>{let R=s[x];R&&((R.lastxy.y!==v||R.lastxy.x!==l)&&(R.pathStr+=oe(R.lastxy.x,R.lastxy.y,l,v)),ee.push({d:R.pathStr,color:R.color}),delete s[x])}),delete s[n.id]),Ee(B,l,v,o,n),n.parents.length>0){let x=n.parents[0];if(!s[x])s[x]={color:o,xIndex:u,lastxy:{x:l,y:v},pathStr:`M ${l} ${v}`};else{let R=s[x];if(u<R.xIndex){let I=`merge_${n.id}_${x}_${R.xIndex}`;s[I]=R,s[x]={color:o,xIndex:u,lastxy:{x:l,y:v},pathStr:`M ${l} ${v}`,toBeClosed:R.toBeClosed?[...R.toBeClosed,I]:[I]},delete R.toBeClosed}else{let I=`merge_${n.id}_${x}_${u}`;s[I]={color:o,xIndex:u,lastxy:{x:l,y:v},pathStr:`M ${l} ${v}`},s[x].toBeClosed||(s[x].toBeClosed=[]),s[x].toBeClosed.push(I)}}for(let R=1;R<n.parents.length;R++){let I=n.parents[R],ie=u+R;Object.values(s).forEach(K=>{K.xIndex>=ie&&K.xIndex++});let q={color:c[z++%c.length],xIndex:ie,lastxy:{x:l,y:v},pathStr:`M ${l} ${v}`};if(!s[I])s[I]=q;else{let K=`merge_${n.id}_${I}_${ie}`;q.color=s[I].color,s[K]=q,s[I].toBeClosed||(s[I].toBeClosed=[]),s[I].toBeClosed.push(K)}}}N()}return b.sort((n,i)=>new Date(i.date).getTime()-new Date(n.date).getTime()),b.forEach((n,i)=>{n.meta==null&&(n.meta={yIndex:i,prev:[]}),n.meta.yIndex=i,n.parents.forEach(u=>{var o=b.findIndex(v=>v.id===u);if(o>-1){var l=b[o];l.meta==null&&(l.meta={yIndex:o,prev:[]}),l.meta.prev.indexOf(n.id)<0&&l.meta.prev.push(n.id)}})}),b.forEach(n=>{Z(n)}),ee.forEach(n=>{ye(X,n.d,n.color,er)}),{nodes:B,edges:X}},[{...O}]);return k.useEffect(()=>{G(D+pe)},[D]),V.jsx(V.Fragment,{children:V.jsxs("svg",{ref:T,height:E*b.length,width:W,style:A,children:[V.jsx("g",{id:"layer-lines",children:p}),V.jsx("g",{id:"layer-points",children:F})]})})});J.GitGraph=rr,J.GitGraphSVG=Xe,Object.defineProperty(J,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@akshay-rajput/git-graph-svg",
3
3
  "private": false,
4
- "version": "2.0.2",
4
+ "version": "2.0.3",
5
5
  "main": "dist/git-repo-graph.umd.js",
6
6
  "module": "dist/git-repo-graph.es.js",
7
7
  "types": "dist/index.d.ts",