@akshay-rajput/git-graph-svg 1.0.7 → 2.0.0

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.
@@ -1,105 +1,105 @@
1
- import Ir, { useMemo as z } from "react";
2
- var X = { exports: {} }, N = {};
3
- var Dr;
4
- function ve() {
5
- if (Dr) return N;
6
- Dr = 1;
7
- var P = Ir, j = /* @__PURE__ */ Symbol.for("react.element"), $ = /* @__PURE__ */ Symbol.for("react.fragment"), x = Object.prototype.hasOwnProperty, k = P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, D = { key: !0, ref: !0, __self: !0, __source: !0 };
8
- function _(T, f, w) {
9
- var p, O = {}, m = null, I = null;
10
- w !== void 0 && (m = "" + w), f.key !== void 0 && (m = "" + f.key), f.ref !== void 0 && (I = f.ref);
11
- for (p in f) x.call(f, p) && !D.hasOwnProperty(p) && (O[p] = f[p]);
12
- if (T && T.defaultProps) for (p in f = T.defaultProps, f) O[p] === void 0 && (O[p] = f[p]);
13
- return { $$typeof: j, type: T, key: m, ref: I, props: O, _owner: k.current };
1
+ import Ye, { useMemo as re, useRef as gr } from "react";
2
+ var le = { exports: {} }, Q = {};
3
+ var Ae;
4
+ function Er() {
5
+ if (Ae) return Q;
6
+ Ae = 1;
7
+ var S = Ye, y = /* @__PURE__ */ Symbol.for("react.element"), O = /* @__PURE__ */ Symbol.for("react.fragment"), T = Object.prototype.hasOwnProperty, P = S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, m = { key: !0, ref: !0, __self: !0, __source: !0 };
8
+ function I(D, g, F) {
9
+ var _, A = {}, W = null, N = null;
10
+ F !== void 0 && (W = "" + F), g.key !== void 0 && (W = "" + g.key), g.ref !== void 0 && (N = g.ref);
11
+ for (_ in g) T.call(g, _) && !m.hasOwnProperty(_) && (A[_] = g[_]);
12
+ if (D && D.defaultProps) for (_ in g = D.defaultProps, g) A[_] === void 0 && (A[_] = g[_]);
13
+ return { $$typeof: y, type: D, key: W, ref: N, props: A, _owner: P.current };
14
14
  }
15
- return N.Fragment = $, N.jsx = _, N.jsxs = _, N;
15
+ return Q.Fragment = O, Q.jsx = I, Q.jsxs = I, Q;
16
16
  }
17
- var J = {};
18
- var Ar;
19
- function pe() {
20
- return Ar || (Ar = 1, process.env.NODE_ENV !== "production" && (function() {
21
- var P = Ir, j = /* @__PURE__ */ Symbol.for("react.element"), $ = /* @__PURE__ */ Symbol.for("react.portal"), x = /* @__PURE__ */ Symbol.for("react.fragment"), k = /* @__PURE__ */ Symbol.for("react.strict_mode"), D = /* @__PURE__ */ Symbol.for("react.profiler"), _ = /* @__PURE__ */ Symbol.for("react.provider"), T = /* @__PURE__ */ Symbol.for("react.context"), f = /* @__PURE__ */ Symbol.for("react.forward_ref"), w = /* @__PURE__ */ Symbol.for("react.suspense"), p = /* @__PURE__ */ Symbol.for("react.suspense_list"), O = /* @__PURE__ */ Symbol.for("react.memo"), m = /* @__PURE__ */ Symbol.for("react.lazy"), I = /* @__PURE__ */ Symbol.for("react.offscreen"), i = Symbol.iterator, c = "@@iterator";
22
- function h(r) {
23
- if (r === null || typeof r != "object")
17
+ var ee = {};
18
+ var Le;
19
+ function yr() {
20
+ return Le || (Le = 1, process.env.NODE_ENV !== "production" && (function() {
21
+ var S = Ye, y = /* @__PURE__ */ Symbol.for("react.element"), O = /* @__PURE__ */ Symbol.for("react.portal"), T = /* @__PURE__ */ Symbol.for("react.fragment"), P = /* @__PURE__ */ Symbol.for("react.strict_mode"), m = /* @__PURE__ */ Symbol.for("react.profiler"), I = /* @__PURE__ */ Symbol.for("react.provider"), D = /* @__PURE__ */ Symbol.for("react.context"), g = /* @__PURE__ */ Symbol.for("react.forward_ref"), F = /* @__PURE__ */ Symbol.for("react.suspense"), _ = /* @__PURE__ */ Symbol.for("react.suspense_list"), A = /* @__PURE__ */ Symbol.for("react.memo"), W = /* @__PURE__ */ Symbol.for("react.lazy"), N = /* @__PURE__ */ Symbol.for("react.offscreen"), d = Symbol.iterator, b = "@@iterator";
22
+ function i(e) {
23
+ if (e === null || typeof e != "object")
24
24
  return null;
25
- var e = i && r[i] || r[c];
26
- return typeof e == "function" ? e : null;
25
+ var r = d && e[d] || e[b];
26
+ return typeof r == "function" ? r : null;
27
27
  }
28
- var E = P.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
29
- function s(r) {
28
+ var $ = S.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
29
+ function v(e) {
30
30
  {
31
- for (var e = arguments.length, n = new Array(e > 1 ? e - 1 : 0), t = 1; t < e; t++)
32
- n[t - 1] = arguments[t];
33
- S("error", r, n);
31
+ for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), n = 1; n < r; n++)
32
+ t[n - 1] = arguments[n];
33
+ M("error", e, t);
34
34
  }
35
35
  }
36
- function S(r, e, n) {
36
+ function M(e, r, t) {
37
37
  {
38
- var t = E.ReactDebugCurrentFrame, u = t.getStackAddendum();
39
- u !== "" && (e += "%s", n = n.concat([u]));
40
- var l = n.map(function(o) {
41
- return String(o);
38
+ var n = $.ReactDebugCurrentFrame, p = n.getStackAddendum();
39
+ p !== "" && (r += "%s", t = t.concat([p]));
40
+ var E = t.map(function(f) {
41
+ return String(f);
42
42
  });
43
- l.unshift("Warning: " + e), Function.prototype.apply.call(console[r], console, l);
43
+ E.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, E);
44
44
  }
45
45
  }
46
- var Y = !1, y = !1, ir = !1, L = !1, Wr = !1, ur;
47
- ur = /* @__PURE__ */ Symbol.for("react.module.reference");
48
- function Mr(r) {
49
- return !!(typeof r == "string" || typeof r == "function" || r === x || r === D || Wr || r === k || r === w || r === p || L || r === I || Y || y || ir || typeof r == "object" && r !== null && (r.$$typeof === m || r.$$typeof === O || r.$$typeof === _ || r.$$typeof === T || r.$$typeof === f || // This needs to include all possible module reference object
46
+ var V = !1, L = !1, te = !1, K = !1, ce = !1, ne;
47
+ ne = /* @__PURE__ */ Symbol.for("react.module.reference");
48
+ function fe(e) {
49
+ return !!(typeof e == "string" || typeof e == "function" || e === T || e === m || ce || e === P || e === F || e === _ || K || e === N || V || L || te || typeof e == "object" && e !== null && (e.$$typeof === W || e.$$typeof === A || e.$$typeof === I || e.$$typeof === D || 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.
53
- r.$$typeof === ur || r.getModuleId !== void 0));
53
+ e.$$typeof === ne || e.getModuleId !== void 0));
54
54
  }
55
- function Yr(r, e, n) {
56
- var t = r.displayName;
57
- if (t)
58
- return t;
59
- var u = e.displayName || e.name || "";
60
- return u !== "" ? n + "(" + u + ")" : n;
55
+ function a(e, r, t) {
56
+ var n = e.displayName;
57
+ if (n)
58
+ return n;
59
+ var p = r.displayName || r.name || "";
60
+ return p !== "" ? t + "(" + p + ")" : t;
61
61
  }
62
- function sr(r) {
63
- return r.displayName || "Context";
62
+ function s(e) {
63
+ return e.displayName || "Context";
64
64
  }
65
- function C(r) {
66
- if (r == null)
65
+ function l(e) {
66
+ if (e == null)
67
67
  return null;
68
- if (typeof r.tag == "number" && s("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
69
- return r.displayName || r.name || null;
70
- if (typeof r == "string")
71
- return r;
72
- switch (r) {
73
- case x:
68
+ if (typeof e.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
69
+ return e.displayName || e.name || null;
70
+ if (typeof e == "string")
71
+ return e;
72
+ switch (e) {
73
+ case T:
74
74
  return "Fragment";
75
- case $:
75
+ case O:
76
76
  return "Portal";
77
- case D:
77
+ case m:
78
78
  return "Profiler";
79
- case k:
79
+ case P:
80
80
  return "StrictMode";
81
- case w:
81
+ case F:
82
82
  return "Suspense";
83
- case p:
83
+ case _:
84
84
  return "SuspenseList";
85
85
  }
86
- if (typeof r == "object")
87
- switch (r.$$typeof) {
88
- case T:
89
- var e = r;
90
- return sr(e) + ".Consumer";
91
- case _:
92
- var n = r;
93
- return sr(n._context) + ".Provider";
94
- case f:
95
- return Yr(r, r.render, "ForwardRef");
96
- case O:
97
- var t = r.displayName || null;
98
- return t !== null ? t : C(r.type) || "Memo";
99
- case m: {
100
- var u = r, l = u._payload, o = u._init;
86
+ if (typeof e == "object")
87
+ switch (e.$$typeof) {
88
+ case D:
89
+ var r = e;
90
+ return s(r) + ".Consumer";
91
+ case I:
92
+ var t = e;
93
+ return s(t._context) + ".Provider";
94
+ case g:
95
+ return a(e, e.render, "ForwardRef");
96
+ case A:
97
+ var n = e.displayName || null;
98
+ return n !== null ? n : l(e.type) || "Memo";
99
+ case W: {
100
+ var p = e, E = p._payload, f = p._init;
101
101
  try {
102
- return C(o(l));
102
+ return l(f(E));
103
103
  } catch {
104
104
  return null;
105
105
  }
@@ -107,605 +107,813 @@ function pe() {
107
107
  }
108
108
  return null;
109
109
  }
110
- var A = Object.assign, V = 0, lr, fr, cr, dr, vr, pr, hr;
111
- function br() {
110
+ var o = Object.assign, u = 0, h, x, R, j, J, de, q;
111
+ function G() {
112
112
  }
113
- br.__reactDisabledLog = !0;
114
- function Lr() {
113
+ G.__reactDisabledLog = !0;
114
+ function Ne() {
115
115
  {
116
- if (V === 0) {
117
- lr = console.log, fr = console.info, cr = console.warn, dr = console.error, vr = console.group, pr = console.groupCollapsed, hr = console.groupEnd;
118
- var r = {
116
+ if (u === 0) {
117
+ h = console.log, x = console.info, R = console.warn, j = console.error, J = console.group, de = console.groupCollapsed, q = console.groupEnd;
118
+ var e = {
119
119
  configurable: !0,
120
120
  enumerable: !0,
121
- value: br,
121
+ value: G,
122
122
  writable: !0
123
123
  };
124
124
  Object.defineProperties(console, {
125
- info: r,
126
- log: r,
127
- warn: r,
128
- error: r,
129
- group: r,
130
- groupCollapsed: r,
131
- groupEnd: r
125
+ info: e,
126
+ log: e,
127
+ warn: e,
128
+ error: e,
129
+ group: e,
130
+ groupCollapsed: e,
131
+ groupEnd: e
132
132
  });
133
133
  }
134
- V++;
134
+ u++;
135
135
  }
136
136
  }
137
- function Vr() {
137
+ function Ve() {
138
138
  {
139
- if (V--, V === 0) {
140
- var r = {
139
+ if (u--, u === 0) {
140
+ var e = {
141
141
  configurable: !0,
142
142
  enumerable: !0,
143
143
  writable: !0
144
144
  };
145
145
  Object.defineProperties(console, {
146
- log: A({}, r, {
147
- value: lr
146
+ log: o({}, e, {
147
+ value: h
148
148
  }),
149
- info: A({}, r, {
150
- value: fr
149
+ info: o({}, e, {
150
+ value: x
151
151
  }),
152
- warn: A({}, r, {
153
- value: cr
152
+ warn: o({}, e, {
153
+ value: R
154
154
  }),
155
- error: A({}, r, {
156
- value: dr
155
+ error: o({}, e, {
156
+ value: j
157
157
  }),
158
- group: A({}, r, {
159
- value: vr
158
+ group: o({}, e, {
159
+ value: J
160
160
  }),
161
- groupCollapsed: A({}, r, {
162
- value: pr
161
+ groupCollapsed: o({}, e, {
162
+ value: de
163
163
  }),
164
- groupEnd: A({}, r, {
165
- value: hr
164
+ groupEnd: o({}, e, {
165
+ value: q
166
166
  })
167
167
  });
168
168
  }
169
- V < 0 && s("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
169
+ u < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
170
170
  }
171
171
  }
172
- var H = E.ReactCurrentDispatcher, Z;
173
- function q(r, e, n) {
172
+ var ve = $.ReactCurrentDispatcher, he;
173
+ function ae(e, r, t) {
174
174
  {
175
- if (Z === void 0)
175
+ if (he === void 0)
176
176
  try {
177
177
  throw Error();
178
- } catch (u) {
179
- var t = u.stack.trim().match(/\n( *(at )?)/);
180
- Z = t && t[1] || "";
178
+ } catch (p) {
179
+ var n = p.stack.trim().match(/\n( *(at )?)/);
180
+ he = n && n[1] || "";
181
181
  }
182
182
  return `
183
- ` + Z + r;
183
+ ` + he + e;
184
184
  }
185
185
  }
186
- var Q = !1, B;
186
+ var pe = !1, oe;
187
187
  {
188
- var Ur = typeof WeakMap == "function" ? WeakMap : Map;
189
- B = new Ur();
188
+ var Ge = typeof WeakMap == "function" ? WeakMap : Map;
189
+ oe = new Ge();
190
190
  }
191
- function gr(r, e) {
192
- if (!r || Q)
191
+ function xe(e, r) {
192
+ if (!e || pe)
193
193
  return "";
194
194
  {
195
- var n = B.get(r);
196
- if (n !== void 0)
197
- return n;
195
+ var t = oe.get(e);
196
+ if (t !== void 0)
197
+ return t;
198
198
  }
199
- var t;
200
- Q = !0;
201
- var u = Error.prepareStackTrace;
199
+ var n;
200
+ pe = !0;
201
+ var p = Error.prepareStackTrace;
202
202
  Error.prepareStackTrace = void 0;
203
- var l;
204
- l = H.current, H.current = null, Lr();
203
+ var E;
204
+ E = ve.current, ve.current = null, Ne();
205
205
  try {
206
- if (e) {
207
- var o = function() {
206
+ if (r) {
207
+ var f = function() {
208
208
  throw Error();
209
209
  };
210
- if (Object.defineProperty(o.prototype, "props", {
210
+ if (Object.defineProperty(f.prototype, "props", {
211
211
  set: function() {
212
212
  throw Error();
213
213
  }
214
214
  }), typeof Reflect == "object" && Reflect.construct) {
215
215
  try {
216
- Reflect.construct(o, []);
217
- } catch (g) {
218
- t = g;
216
+ Reflect.construct(f, []);
217
+ } catch (B) {
218
+ n = B;
219
219
  }
220
- Reflect.construct(r, [], o);
220
+ Reflect.construct(e, [], f);
221
221
  } else {
222
222
  try {
223
- o.call();
224
- } catch (g) {
225
- t = g;
223
+ f.call();
224
+ } catch (B) {
225
+ n = B;
226
226
  }
227
- r.call(o.prototype);
227
+ e.call(f.prototype);
228
228
  }
229
229
  } else {
230
230
  try {
231
231
  throw Error();
232
- } catch (g) {
233
- t = g;
232
+ } catch (B) {
233
+ n = B;
234
234
  }
235
- r();
235
+ e();
236
236
  }
237
- } catch (g) {
238
- if (g && t && typeof g.stack == "string") {
239
- for (var a = g.stack.split(`
240
- `), b = t.stack.split(`
241
- `), d = a.length - 1, v = b.length - 1; d >= 1 && v >= 0 && a[d] !== b[v]; )
242
- v--;
243
- for (; d >= 1 && v >= 0; d--, v--)
244
- if (a[d] !== b[v]) {
245
- if (d !== 1 || v !== 1)
237
+ } catch (B) {
238
+ if (B && n && typeof B.stack == "string") {
239
+ for (var c = B.stack.split(`
240
+ `), k = n.stack.split(`
241
+ `), C = c.length - 1, w = k.length - 1; C >= 1 && w >= 0 && c[C] !== k[w]; )
242
+ w--;
243
+ for (; C >= 1 && w >= 0; C--, w--)
244
+ if (c[C] !== k[w]) {
245
+ if (C !== 1 || w !== 1)
246
246
  do
247
- if (d--, v--, v < 0 || a[d] !== b[v]) {
248
- var R = `
249
- ` + a[d].replace(" at new ", " at ");
250
- return r.displayName && R.includes("<anonymous>") && (R = R.replace("<anonymous>", r.displayName)), typeof r == "function" && B.set(r, R), R;
247
+ if (C--, w--, w < 0 || c[C] !== k[w]) {
248
+ var U = `
249
+ ` + c[C].replace(" at new ", " at ");
250
+ return e.displayName && U.includes("<anonymous>") && (U = U.replace("<anonymous>", e.displayName)), typeof e == "function" && oe.set(e, U), U;
251
251
  }
252
- while (d >= 1 && v >= 0);
252
+ while (C >= 1 && w >= 0);
253
253
  break;
254
254
  }
255
255
  }
256
256
  } finally {
257
- Q = !1, H.current = l, Vr(), Error.prepareStackTrace = u;
257
+ pe = !1, ve.current = E, Ve(), Error.prepareStackTrace = p;
258
258
  }
259
- var M = r ? r.displayName || r.name : "", F = M ? q(M) : "";
260
- return typeof r == "function" && B.set(r, F), F;
259
+ var z = e ? e.displayName || e.name : "", H = z ? ae(z) : "";
260
+ return typeof e == "function" && oe.set(e, H), H;
261
261
  }
262
- function Nr(r, e, n) {
263
- return gr(r, !1);
262
+ function Ke(e, r, t) {
263
+ return xe(e, !1);
264
264
  }
265
- function Jr(r) {
266
- var e = r.prototype;
267
- return !!(e && e.isReactComponent);
265
+ function He(e) {
266
+ var r = e.prototype;
267
+ return !!(r && r.isReactComponent);
268
268
  }
269
- function G(r, e, n) {
270
- if (r == null)
269
+ function ie(e, r, t) {
270
+ if (e == null)
271
271
  return "";
272
- if (typeof r == "function")
273
- return gr(r, Jr(r));
274
- if (typeof r == "string")
275
- return q(r);
276
- switch (r) {
277
- case w:
278
- return q("Suspense");
279
- case p:
280
- return q("SuspenseList");
272
+ if (typeof e == "function")
273
+ return xe(e, He(e));
274
+ if (typeof e == "string")
275
+ return ae(e);
276
+ switch (e) {
277
+ case F:
278
+ return ae("Suspense");
279
+ case _:
280
+ return ae("SuspenseList");
281
281
  }
282
- if (typeof r == "object")
283
- switch (r.$$typeof) {
284
- case f:
285
- return Nr(r.render);
286
- case O:
287
- return G(r.type, e, n);
288
- case m: {
289
- var t = r, u = t._payload, l = t._init;
282
+ if (typeof e == "object")
283
+ switch (e.$$typeof) {
284
+ case g:
285
+ return Ke(e.render);
286
+ case A:
287
+ return ie(e.type, r, t);
288
+ case W: {
289
+ var n = e, p = n._payload, E = n._init;
290
290
  try {
291
- return G(l(u), e, n);
291
+ return ie(E(p), r, t);
292
292
  } catch {
293
293
  }
294
294
  }
295
295
  }
296
296
  return "";
297
297
  }
298
- var U = Object.prototype.hasOwnProperty, Er = {}, _r = E.ReactDebugCurrentFrame;
299
- function K(r) {
300
- if (r) {
301
- var e = r._owner, n = G(r.type, r._source, e ? e.type : null);
302
- _r.setExtraStackFrame(n);
298
+ var Z = Object.prototype.hasOwnProperty, Re = {}, Te = $.ReactDebugCurrentFrame;
299
+ function se(e) {
300
+ if (e) {
301
+ var r = e._owner, t = ie(e.type, e._source, r ? r.type : null);
302
+ Te.setExtraStackFrame(t);
303
303
  } else
304
- _r.setExtraStackFrame(null);
304
+ Te.setExtraStackFrame(null);
305
305
  }
306
- function qr(r, e, n, t, u) {
306
+ function Je(e, r, t, n, p) {
307
307
  {
308
- var l = Function.call.bind(U);
309
- for (var o in r)
310
- if (l(r, o)) {
311
- var a = void 0;
308
+ var E = Function.call.bind(Z);
309
+ for (var f in e)
310
+ if (E(e, f)) {
311
+ var c = void 0;
312
312
  try {
313
- if (typeof r[o] != "function") {
314
- var b = Error((t || "React class") + ": " + n + " type `" + o + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[o] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
315
- throw b.name = "Invariant Violation", b;
313
+ if (typeof e[f] != "function") {
314
+ var k = Error((n || "React class") + ": " + t + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
315
+ throw k.name = "Invariant Violation", k;
316
316
  }
317
- a = r[o](e, o, t, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
318
- } catch (d) {
319
- a = d;
317
+ c = e[f](r, f, n, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
318
+ } catch (C) {
319
+ c = C;
320
320
  }
321
- a && !(a instanceof Error) && (K(u), s("%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).", t || "React class", n, o, typeof a), K(null)), a instanceof Error && !(a.message in Er) && (Er[a.message] = !0, K(u), s("Failed %s type: %s", n, a.message), K(null));
321
+ c && !(c instanceof Error) && (se(p), v("%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).", n || "React class", t, f, typeof c), se(null)), c instanceof Error && !(c.message in Re) && (Re[c.message] = !0, se(p), v("Failed %s type: %s", t, c.message), se(null));
322
322
  }
323
323
  }
324
324
  }
325
- var Br = Array.isArray;
326
- function rr(r) {
327
- return Br(r);
325
+ var qe = Array.isArray;
326
+ function ge(e) {
327
+ return qe(e);
328
328
  }
329
- function Gr(r) {
329
+ function Xe(e) {
330
330
  {
331
- var e = typeof Symbol == "function" && Symbol.toStringTag, n = e && r[Symbol.toStringTag] || r.constructor.name || "Object";
332
- return n;
331
+ var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
332
+ return t;
333
333
  }
334
334
  }
335
- function Kr(r) {
335
+ function ze(e) {
336
336
  try {
337
- return yr(r), !1;
337
+ return Ce(e), !1;
338
338
  } catch {
339
339
  return !0;
340
340
  }
341
341
  }
342
- function yr(r) {
343
- return "" + r;
342
+ function Ce(e) {
343
+ return "" + e;
344
344
  }
345
- function Rr(r) {
346
- if (Kr(r))
347
- return s("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Gr(r)), yr(r);
345
+ function we(e) {
346
+ if (ze(e))
347
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Xe(e)), Ce(e);
348
348
  }
349
- var Tr = E.ReactCurrentOwner, zr = {
349
+ var Se = $.ReactCurrentOwner, Ze = {
350
350
  key: !0,
351
351
  ref: !0,
352
352
  __self: !0,
353
353
  __source: !0
354
- }, Or, mr;
355
- function Xr(r) {
356
- if (U.call(r, "ref")) {
357
- var e = Object.getOwnPropertyDescriptor(r, "ref").get;
358
- if (e && e.isReactWarning)
354
+ }, Oe, Pe;
355
+ function Qe(e) {
356
+ if (Z.call(e, "ref")) {
357
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
358
+ if (r && r.isReactWarning)
359
359
  return !1;
360
360
  }
361
- return r.ref !== void 0;
361
+ return e.ref !== void 0;
362
362
  }
363
- function Hr(r) {
364
- if (U.call(r, "key")) {
365
- var e = Object.getOwnPropertyDescriptor(r, "key").get;
366
- if (e && e.isReactWarning)
363
+ function er(e) {
364
+ if (Z.call(e, "key")) {
365
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
366
+ if (r && r.isReactWarning)
367
367
  return !1;
368
368
  }
369
- return r.key !== void 0;
369
+ return e.key !== void 0;
370
370
  }
371
- function Zr(r, e) {
372
- typeof r.ref == "string" && Tr.current;
371
+ function rr(e, r) {
372
+ typeof e.ref == "string" && Se.current;
373
373
  }
374
- function Qr(r, e) {
374
+ function tr(e, r) {
375
375
  {
376
- var n = function() {
377
- Or || (Or = !0, s("%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)", e));
376
+ var t = function() {
377
+ Oe || (Oe = !0, v("%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));
378
378
  };
379
- n.isReactWarning = !0, Object.defineProperty(r, "key", {
380
- get: n,
379
+ t.isReactWarning = !0, Object.defineProperty(e, "key", {
380
+ get: t,
381
381
  configurable: !0
382
382
  });
383
383
  }
384
384
  }
385
- function re(r, e) {
385
+ function nr(e, r) {
386
386
  {
387
- var n = function() {
388
- mr || (mr = !0, s("%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)", e));
387
+ var t = function() {
388
+ Pe || (Pe = !0, v("%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));
389
389
  };
390
- n.isReactWarning = !0, Object.defineProperty(r, "ref", {
391
- get: n,
390
+ t.isReactWarning = !0, Object.defineProperty(e, "ref", {
391
+ get: t,
392
392
  configurable: !0
393
393
  });
394
394
  }
395
395
  }
396
- var ee = function(r, e, n, t, u, l, o) {
397
- var a = {
396
+ var ar = function(e, r, t, n, p, E, f) {
397
+ var c = {
398
398
  // This tag allows us to uniquely identify this as a React Element
399
- $$typeof: j,
399
+ $$typeof: y,
400
400
  // Built-in properties that belong on the element
401
- type: r,
402
- key: e,
403
- ref: n,
404
- props: o,
401
+ type: e,
402
+ key: r,
403
+ ref: t,
404
+ props: f,
405
405
  // Record the component responsible for creating this element.
406
- _owner: l
406
+ _owner: E
407
407
  };
408
- return a._store = {}, Object.defineProperty(a._store, "validated", {
408
+ return c._store = {}, Object.defineProperty(c._store, "validated", {
409
409
  configurable: !1,
410
410
  enumerable: !1,
411
411
  writable: !0,
412
412
  value: !1
413
- }), Object.defineProperty(a, "_self", {
413
+ }), Object.defineProperty(c, "_self", {
414
414
  configurable: !1,
415
415
  enumerable: !1,
416
416
  writable: !1,
417
- value: t
418
- }), Object.defineProperty(a, "_source", {
417
+ value: n
418
+ }), Object.defineProperty(c, "_source", {
419
419
  configurable: !1,
420
420
  enumerable: !1,
421
421
  writable: !1,
422
- value: u
423
- }), Object.freeze && (Object.freeze(a.props), Object.freeze(a)), a;
422
+ value: p
423
+ }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
424
424
  };
425
- function ne(r, e, n, t, u) {
425
+ function or(e, r, t, n, p) {
426
426
  {
427
- var l, o = {}, a = null, b = null;
428
- n !== void 0 && (Rr(n), a = "" + n), Hr(e) && (Rr(e.key), a = "" + e.key), Xr(e) && (b = e.ref, Zr(e, u));
429
- for (l in e)
430
- U.call(e, l) && !zr.hasOwnProperty(l) && (o[l] = e[l]);
431
- if (r && r.defaultProps) {
432
- var d = r.defaultProps;
433
- for (l in d)
434
- o[l] === void 0 && (o[l] = d[l]);
427
+ var E, f = {}, c = null, k = null;
428
+ t !== void 0 && (we(t), c = "" + t), er(r) && (we(r.key), c = "" + r.key), Qe(r) && (k = r.ref, rr(r, p));
429
+ for (E in r)
430
+ Z.call(r, E) && !Ze.hasOwnProperty(E) && (f[E] = r[E]);
431
+ if (e && e.defaultProps) {
432
+ var C = e.defaultProps;
433
+ for (E in C)
434
+ f[E] === void 0 && (f[E] = C[E]);
435
435
  }
436
- if (a || b) {
437
- var v = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
438
- a && Qr(o, v), b && re(o, v);
436
+ if (c || k) {
437
+ var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
438
+ c && tr(f, w), k && nr(f, w);
439
439
  }
440
- return ee(r, a, b, u, t, Tr.current, o);
440
+ return ar(e, c, k, p, n, Se.current, f);
441
441
  }
442
442
  }
443
- var er = E.ReactCurrentOwner, Sr = E.ReactDebugCurrentFrame;
444
- function W(r) {
445
- if (r) {
446
- var e = r._owner, n = G(r.type, r._source, e ? e.type : null);
447
- Sr.setExtraStackFrame(n);
443
+ var Ee = $.ReactCurrentOwner, me = $.ReactDebugCurrentFrame;
444
+ function X(e) {
445
+ if (e) {
446
+ var r = e._owner, t = ie(e.type, e._source, r ? r.type : null);
447
+ me.setExtraStackFrame(t);
448
448
  } else
449
- Sr.setExtraStackFrame(null);
449
+ me.setExtraStackFrame(null);
450
450
  }
451
- var nr;
452
- nr = !1;
453
- function tr(r) {
454
- return typeof r == "object" && r !== null && r.$$typeof === j;
451
+ var ye;
452
+ ye = !1;
453
+ function be(e) {
454
+ return typeof e == "object" && e !== null && e.$$typeof === y;
455
455
  }
456
- function wr() {
456
+ function $e() {
457
457
  {
458
- if (er.current) {
459
- var r = C(er.current.type);
460
- if (r)
458
+ if (Ee.current) {
459
+ var e = l(Ee.current.type);
460
+ if (e)
461
461
  return `
462
462
 
463
- Check the render method of \`` + r + "`.";
463
+ Check the render method of \`` + e + "`.";
464
464
  }
465
465
  return "";
466
466
  }
467
467
  }
468
- function te(r) {
468
+ function ir(e) {
469
469
  return "";
470
470
  }
471
- var xr = {};
472
- function ae(r) {
471
+ var je = {};
472
+ function sr(e) {
473
473
  {
474
- var e = wr();
475
- if (!e) {
476
- var n = typeof r == "string" ? r : r.displayName || r.name;
477
- n && (e = `
474
+ var r = $e();
475
+ if (!r) {
476
+ var t = typeof e == "string" ? e : e.displayName || e.name;
477
+ t && (r = `
478
478
 
479
- Check the top-level render call using <` + n + ">.");
479
+ Check the top-level render call using <` + t + ">.");
480
480
  }
481
- return e;
481
+ return r;
482
482
  }
483
483
  }
484
- function Cr(r, e) {
484
+ function Ie(e, r) {
485
485
  {
486
- if (!r._store || r._store.validated || r.key != null)
486
+ if (!e._store || e._store.validated || e.key != null)
487
487
  return;
488
- r._store.validated = !0;
489
- var n = ae(e);
490
- if (xr[n])
488
+ e._store.validated = !0;
489
+ var t = sr(r);
490
+ if (je[t])
491
491
  return;
492
- xr[n] = !0;
493
- var t = "";
494
- r && r._owner && r._owner !== er.current && (t = " It was passed a child from " + C(r._owner.type) + "."), W(r), s('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, t), W(null);
492
+ je[t] = !0;
493
+ var n = "";
494
+ e && e._owner && e._owner !== Ee.current && (n = " It was passed a child from " + l(e._owner.type) + "."), X(e), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, n), X(null);
495
495
  }
496
496
  }
497
- function Pr(r, e) {
497
+ function ke(e, r) {
498
498
  {
499
- if (typeof r != "object")
499
+ if (typeof e != "object")
500
500
  return;
501
- if (rr(r))
502
- for (var n = 0; n < r.length; n++) {
503
- var t = r[n];
504
- tr(t) && Cr(t, e);
501
+ if (ge(e))
502
+ for (var t = 0; t < e.length; t++) {
503
+ var n = e[t];
504
+ be(n) && Ie(n, r);
505
505
  }
506
- else if (tr(r))
507
- r._store && (r._store.validated = !0);
508
- else if (r) {
509
- var u = h(r);
510
- if (typeof u == "function" && u !== r.entries)
511
- for (var l = u.call(r), o; !(o = l.next()).done; )
512
- tr(o.value) && Cr(o.value, e);
506
+ else if (be(e))
507
+ e._store && (e._store.validated = !0);
508
+ else if (e) {
509
+ var p = i(e);
510
+ if (typeof p == "function" && p !== e.entries)
511
+ for (var E = p.call(e), f; !(f = E.next()).done; )
512
+ be(f.value) && Ie(f.value, r);
513
513
  }
514
514
  }
515
515
  }
516
- function oe(r) {
516
+ function lr(e) {
517
517
  {
518
- var e = r.type;
519
- if (e == null || typeof e == "string")
518
+ var r = e.type;
519
+ if (r == null || typeof r == "string")
520
520
  return;
521
- var n;
522
- if (typeof e == "function")
523
- n = e.propTypes;
524
- else if (typeof e == "object" && (e.$$typeof === f || // Note: Memo only checks outer props here.
521
+ var t;
522
+ if (typeof r == "function")
523
+ t = r.propTypes;
524
+ else if (typeof r == "object" && (r.$$typeof === g || // Note: Memo only checks outer props here.
525
525
  // Inner props are checked in the reconciler.
526
- e.$$typeof === O))
527
- n = e.propTypes;
526
+ r.$$typeof === A))
527
+ t = r.propTypes;
528
528
  else
529
529
  return;
530
- if (n) {
531
- var t = C(e);
532
- qr(n, r.props, "prop", t, r);
533
- } else if (e.PropTypes !== void 0 && !nr) {
534
- nr = !0;
535
- var u = C(e);
536
- s("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
530
+ if (t) {
531
+ var n = l(r);
532
+ Je(t, e.props, "prop", n, e);
533
+ } else if (r.PropTypes !== void 0 && !ye) {
534
+ ye = !0;
535
+ var p = l(r);
536
+ v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", p || "Unknown");
537
537
  }
538
- typeof e.getDefaultProps == "function" && !e.getDefaultProps.isReactClassApproved && s("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
538
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
539
539
  }
540
540
  }
541
- function ie(r) {
541
+ function ur(e) {
542
542
  {
543
- for (var e = Object.keys(r.props), n = 0; n < e.length; n++) {
544
- var t = e[n];
545
- if (t !== "children" && t !== "key") {
546
- W(r), s("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", t), W(null);
543
+ for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
544
+ var n = r[t];
545
+ if (n !== "children" && n !== "key") {
546
+ X(e), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", n), X(null);
547
547
  break;
548
548
  }
549
549
  }
550
- r.ref !== null && (W(r), s("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
550
+ e.ref !== null && (X(e), v("Invalid attribute `ref` supplied to `React.Fragment`."), X(null));
551
551
  }
552
552
  }
553
- var jr = {};
554
- function kr(r, e, n, t, u, l) {
553
+ var De = {};
554
+ function Fe(e, r, t, n, p, E) {
555
555
  {
556
- var o = Mr(r);
557
- if (!o) {
558
- var a = "";
559
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (a += " 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
- var b = te();
561
- b ? a += b : a += wr();
562
- var d;
563
- r === null ? d = "null" : rr(r) ? d = "array" : r !== void 0 && r.$$typeof === j ? (d = "<" + (C(r.type) || "Unknown") + " />", a = " Did you accidentally export a JSX literal instead of a component?") : d = typeof r, s("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", d, a);
556
+ var f = fe(e);
557
+ if (!f) {
558
+ var c = "";
559
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " 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
+ var k = ir();
561
+ k ? c += k : c += $e();
562
+ var C;
563
+ e === null ? C = "null" : ge(e) ? C = "array" : e !== void 0 && e.$$typeof === y ? (C = "<" + (l(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : C = typeof e, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", C, c);
564
564
  }
565
- var v = ne(r, e, n, u, l);
566
- if (v == null)
567
- return v;
568
- if (o) {
569
- var R = e.children;
570
- if (R !== void 0)
571
- if (t)
572
- if (rr(R)) {
573
- for (var M = 0; M < R.length; M++)
574
- Pr(R[M], r);
575
- Object.freeze && Object.freeze(R);
565
+ var w = or(e, r, t, p, E);
566
+ if (w == null)
567
+ return w;
568
+ if (f) {
569
+ var U = r.children;
570
+ if (U !== void 0)
571
+ if (n)
572
+ if (ge(U)) {
573
+ for (var z = 0; z < U.length; z++)
574
+ ke(U[z], e);
575
+ Object.freeze && Object.freeze(U);
576
576
  } else
577
- s("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
577
+ v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
578
578
  else
579
- Pr(R, r);
579
+ ke(U, e);
580
580
  }
581
- if (U.call(e, "key")) {
582
- var F = C(r), g = Object.keys(e).filter(function(de) {
583
- return de !== "key";
584
- }), ar = g.length > 0 ? "{key: someKey, " + g.join(": ..., ") + ": ...}" : "{key: someKey}";
585
- if (!jr[F + ar]) {
586
- var ce = g.length > 0 ? "{" + g.join(": ..., ") + ": ...}" : "{}";
587
- s(`A props object containing a "key" prop is being spread into JSX:
581
+ if (Z.call(r, "key")) {
582
+ var H = l(e), B = Object.keys(r).filter(function(pr) {
583
+ return pr !== "key";
584
+ }), _e = B.length > 0 ? "{key: someKey, " + B.join(": ..., ") + ": ...}" : "{key: someKey}";
585
+ if (!De[H + _e]) {
586
+ var hr = B.length > 0 ? "{" + B.join(": ..., ") + ": ...}" : "{}";
587
+ v(`A props object containing a "key" prop is being spread into JSX:
588
588
  let props = %s;
589
589
  <%s {...props} />
590
590
  React keys must be passed directly to JSX without using spread:
591
591
  let props = %s;
592
- <%s key={someKey} {...props} />`, ar, F, ce, F), jr[F + ar] = !0;
592
+ <%s key={someKey} {...props} />`, _e, H, hr, H), De[H + _e] = !0;
593
593
  }
594
594
  }
595
- return r === x ? ie(v) : oe(v), v;
595
+ return e === T ? ur(w) : lr(w), w;
596
596
  }
597
597
  }
598
- function ue(r, e, n) {
599
- return kr(r, e, n, !0);
598
+ function cr(e, r, t) {
599
+ return Fe(e, r, t, !0);
600
600
  }
601
- function se(r, e, n) {
602
- return kr(r, e, n, !1);
601
+ function fr(e, r, t) {
602
+ return Fe(e, r, t, !1);
603
603
  }
604
- var le = se, fe = ue;
605
- J.Fragment = x, J.jsx = le, J.jsxs = fe;
606
- })()), J;
604
+ var dr = fr, vr = cr;
605
+ ee.Fragment = T, ee.jsx = dr, ee.jsxs = vr;
606
+ })()), ee;
607
607
  }
608
- var Fr;
609
- function he() {
610
- return Fr || (Fr = 1, process.env.NODE_ENV === "production" ? X.exports = ve() : X.exports = pe()), X.exports;
608
+ var Be;
609
+ function br() {
610
+ return Be || (Be = 1, process.env.NODE_ENV === "production" ? le.exports = Er() : le.exports = yr()), le.exports;
611
611
  }
612
- var or = he();
613
- const $r = 50, be = 5, ge = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0b"], _e = ({
614
- commits: P,
615
- rowHeight: j,
616
- colorPalette: $,
617
- laneWidth: x,
618
- renderNode: k,
619
- renderEdge: D
612
+ var Y = br();
613
+ const We = 50, _r = 5, xr = ["#3a86ff", "#8338ec", "#ff006e", "#fb5607", "#ffbe0b"], Or = ({
614
+ commits: S,
615
+ rowHeight: y,
616
+ colorPalette: O,
617
+ laneWidth: T,
618
+ renderNode: P,
619
+ renderEdge: m
620
620
  }) => {
621
- const _ = x || $r, T = j || $r, f = z(
622
- () => ($ || ge).map((i, c) => ({
623
- color: i,
621
+ const I = T || We, D = y || We, g = re(
622
+ () => (O || xr).map((d, b) => ({
623
+ color: d,
624
624
  branch: null,
625
- lane: c + 1,
626
- index: c
625
+ lane: b + 1,
626
+ index: b
627
627
  })),
628
- [$, P]
628
+ [O, S]
629
629
  );
630
- function w() {
631
- var i = f.findIndex((h) => !h.branch);
632
- if (i > -1)
633
- return f[i];
634
- var c = {
630
+ function F() {
631
+ var d = g.findIndex((i) => !i.branch);
632
+ if (d > -1)
633
+ return g[d];
634
+ var b = {
635
635
  color: "#" + Math.floor(Math.random() * 16777215).toString(16),
636
636
  branch: null,
637
- lane: f.length + 1,
638
- index: i
637
+ lane: g.length + 1,
638
+ index: d
639
639
  };
640
- return f.push(c), c;
640
+ return g.push(b), b;
641
641
  }
642
- const p = z(() => {
643
- var i = [];
644
- const c = /* @__PURE__ */ new Map();
645
- return P.forEach((h, E) => {
646
- var s = {
647
- ...h,
642
+ const _ = re(() => {
643
+ var d = [];
644
+ const b = /* @__PURE__ */ new Map();
645
+ return S.forEach((i, $) => {
646
+ var v = {
647
+ ...i,
648
648
  color: "",
649
649
  lane: 0,
650
650
  cx: 0,
651
651
  cy: 0,
652
652
  prev: [],
653
653
  // initialize empty
654
- index: E
655
- }, S = f.find((y) => y.branch == h.id);
656
- S ? f.forEach((y) => {
657
- y.branch === h.id && y.index !== S?.index && (y.branch = null);
658
- }) : S = w();
659
- for (const y of h.parents)
660
- if (f.find((L) => L.branch === y))
661
- S.branch = y;
662
- else if (S.branch == h.id) S.branch = y;
654
+ index: $
655
+ }, M = g.find((L) => L.branch == i.id);
656
+ M ? g.forEach((L) => {
657
+ L.branch === i.id && L.index !== M?.index && (L.branch = null);
658
+ }) : M = F();
659
+ for (const L of i.parents)
660
+ if (g.find((K) => K.branch === L))
661
+ M.branch = L;
662
+ else if (M.branch == i.id) M.branch = L;
663
663
  else {
664
- var Y = f.find((L) => !L.branch);
665
- Y || (Y = w()), Y.branch = y;
664
+ var V = g.find((K) => !K.branch);
665
+ V || (V = F()), V.branch = L;
666
666
  }
667
- s.color = S.color, s.lane = S.lane, s.cx = s.lane * _ - _ / 2, s.cy = T * E + _ / 2, i.push(s), c.set(s.id, s);
668
- }), i.forEach((h) => {
669
- h.parents.forEach((E) => {
670
- const s = c.get(E);
671
- s && s.prev.push(h);
667
+ v.color = M.color, v.lane = M.lane, v.cx = v.lane * I - I / 2, v.cy = D * $ + I / 2, d.push(v), b.set(v.id, v);
668
+ }), d.forEach((i) => {
669
+ i.parents.forEach(($) => {
670
+ const v = b.get($);
671
+ v && v.prev.push(i);
672
672
  });
673
- }), i;
674
- }, [P, T, _]);
675
- function O(i, c) {
676
- return `M ${i.cx} ${i.cy} L ${c.cx} ${c.cy}`;
673
+ }), d;
674
+ }, [S, D, I]);
675
+ function A(d, b) {
676
+ return `M ${d.cx} ${d.cy} L ${b.cx} ${b.cy}`;
677
677
  }
678
- const m = z(() => Math.max(...p.map((i) => i.lane), 0), [p]), I = z(() => m * _ + 100, [m, _]);
679
- return /* @__PURE__ */ or.jsxs("svg", { width: I, height: T * p.length, children: [
680
- p.flatMap(
681
- (i) => i.prev.map((c, h) => {
682
- if (D)
683
- return D(i, c, h);
684
- const E = O(i, c);
685
- return /* @__PURE__ */ or.jsx(
678
+ const W = re(() => Math.max(..._.map((d) => d.lane), 0), [_]), N = re(() => W * I + 100, [W, I]);
679
+ return /* @__PURE__ */ Y.jsxs("svg", { width: N, height: D * _.length, children: [
680
+ _.flatMap(
681
+ (d) => d.prev.map((b, i) => {
682
+ if (m)
683
+ return m(d, b, _, i);
684
+ const $ = A(d, b);
685
+ return /* @__PURE__ */ Y.jsx(
686
686
  "path",
687
687
  {
688
- d: E,
688
+ d: $,
689
689
  fill: "none",
690
- stroke: i.lane <= c.lane ? c.color : i.color,
690
+ stroke: d.lane <= b.lane ? b.color : d.color,
691
691
  strokeWidth: 2
692
692
  },
693
- `${i.id}-${c.id}_${h}`
693
+ `${d.id}-${b.id}_${i}`
694
694
  );
695
695
  })
696
696
  ),
697
- p.map((i, c) => k ? k(i, c) : /* @__PURE__ */ or.jsx(
697
+ _.map((d, b) => P ? P(d, b) : /* @__PURE__ */ Y.jsx(
698
698
  "circle",
699
699
  {
700
- cx: i.cx,
701
- cy: i.cy,
702
- r: be,
703
- fill: i.color
700
+ cx: d.cx,
701
+ cy: d.cy,
702
+ r: _r,
703
+ fill: d.color
704
704
  },
705
- `${i.id}_${c}`
705
+ `${d.id}_${b}`
706
706
  ))
707
707
  ] });
708
+ }, ue = {
709
+ getCurveTop(S, y, O, T) {
710
+ const P = Math.min(15, Math.abs(T - y) / 2);
711
+ let m = ` C ${S} ${y + P}, ${O} ${y + P}, ${O} ${y + P * 2}`;
712
+ return y + P * 2 < T && (m += ` L ${O} ${T}`), m;
713
+ },
714
+ getCurveBottom(S, y, O, T) {
715
+ const P = Math.min(15, Math.abs(T - y) / 2);
716
+ let m = "";
717
+ return T - P * 2 > y && (m += ` L ${S} ${T - P * 2}`), m += ` C ${S} ${T - P}, ${O} ${T - P}, ${O} ${T}`, m;
718
+ },
719
+ drawFinalPath(S, y, O = 2) {
720
+ return /* @__PURE__ */ Y.jsx("path", { d: S, stroke: y, strokeWidth: O, fill: "none" });
721
+ },
722
+ drawPoint(S, y, O, T) {
723
+ return /* @__PURE__ */ Y.jsx("circle", { cx: S, cy: y, r: 5, fill: O, stroke: "none" });
724
+ }
725
+ }, Rr = [
726
+ "#3a86ff",
727
+ "#8338ec",
728
+ "#ff006e",
729
+ "#fb5607",
730
+ "#ffbe0b",
731
+ "#3affbd",
732
+ "#adec38",
733
+ "#ff009d",
734
+ "#fb7507",
735
+ "#0b38ff"
736
+ ], Tr = 35, Cr = 35, Me = 25, Ue = 25, wr = 2, Pr = (S) => {
737
+ const {
738
+ commits: y,
739
+ colorPalette: O,
740
+ rowHeight: T,
741
+ laneWidth: P,
742
+ renderNode: m,
743
+ renderEdge: I,
744
+ getMergeCurve: D,
745
+ getBranchSplitCurve: g
746
+ } = S;
747
+ gr(null);
748
+ const F = O || Rr, _ = T || Tr, A = P || Cr, { nodes: W, edges: N } = re(() => {
749
+ const d = [], b = [];
750
+ let i = {}, $ = [], v = 0;
751
+ function M(a, s, l, o) {
752
+ return D ? D(a, s, l, o) : ue.getCurveTop(a, s, l, o);
753
+ }
754
+ function V(a, s, l, o) {
755
+ return g ? g(a, s, l, o) : ue.getCurveBottom(a, s, l, o);
756
+ }
757
+ function L(a, s, l, o = 2) {
758
+ if (I) {
759
+ let u = I(s, l);
760
+ a.push(u);
761
+ } else {
762
+ let u = ue.drawFinalPath(s, l, o);
763
+ a.push(u);
764
+ }
765
+ }
766
+ function te(a, s, l, o, u) {
767
+ if (m) {
768
+ let h = m(s, l, o, u);
769
+ a.push(h);
770
+ } else {
771
+ let h = ue.drawPoint(s, l, o, u);
772
+ a.push(h);
773
+ }
774
+ }
775
+ function K() {
776
+ const a = Object.values(i), s = new Set(a.map((o) => o.xIndex));
777
+ let l = 0;
778
+ for (; s.has(l); ) l++;
779
+ return {
780
+ color: F[v++ % F.length],
781
+ xIndex: l
782
+ };
783
+ }
784
+ function ce() {
785
+ const a = Object.keys(i), s = /* @__PURE__ */ new Set();
786
+ a.filter((o) => o.startsWith("merge_")).forEach((o) => {
787
+ s.add(i[o].xIndex);
788
+ });
789
+ const l = a.filter((o) => !o.startsWith("merge_")).map((o) => i[o]);
790
+ l.sort((o, u) => o.xIndex - u.xIndex);
791
+ for (const o of l) {
792
+ let u = 0;
793
+ for (; s.has(u); )
794
+ u++;
795
+ u < o.xIndex && (o.xIndex = u), s.add(o.xIndex);
796
+ }
797
+ }
798
+ function ne(a, s) {
799
+ let l = /* @__PURE__ */ new Set(), o = i[s];
800
+ o && (l.add(s), o.toBeClosed && o.toBeClosed.forEach((u) => l.add(u))), Object.keys(i).forEach((u) => {
801
+ if (l.has(u)) return;
802
+ const h = i[u], x = h.xIndex * A + Me;
803
+ h.lastxy.y !== a && (h.lastxy.x !== x ? h.pathStr += M(
804
+ h.lastxy.x,
805
+ h.lastxy.y,
806
+ x,
807
+ a
808
+ ) : h.pathStr += ` L ${x} ${a}`, h.lastxy = { x, y: a });
809
+ });
810
+ }
811
+ function fe(a) {
812
+ let s = i[a.id], l = 0, o = "";
813
+ if (s)
814
+ l = s.xIndex, o = s.color;
815
+ else {
816
+ let x = K();
817
+ l = x.xIndex, o = x.color;
818
+ }
819
+ const u = l * A + Me, h = a.meta.yIndex * _ + Ue;
820
+ if (ne(h, a.id), s && ((s.lastxy.y !== h || s.lastxy.x !== u) && (s.pathStr += V(
821
+ s.lastxy.x,
822
+ s.lastxy.y,
823
+ u,
824
+ h
825
+ )), $.push({
826
+ d: s.pathStr,
827
+ color: s.color
828
+ }), s.toBeClosed && s.toBeClosed.forEach((x) => {
829
+ let R = i[x];
830
+ R && ((R.lastxy.y !== h || R.lastxy.x !== u) && (R.pathStr += V(
831
+ R.lastxy.x,
832
+ R.lastxy.y,
833
+ u,
834
+ h
835
+ )), $.push({
836
+ d: R.pathStr,
837
+ color: R.color
838
+ }), delete i[x]);
839
+ }), delete i[a.id]), te(d, u, h, o, a), a.parents.length > 0) {
840
+ let x = a.parents[0];
841
+ if (!i[x])
842
+ i[x] = {
843
+ color: o,
844
+ xIndex: l,
845
+ lastxy: { x: u, y: h },
846
+ pathStr: `M ${u} ${h}`
847
+ // Creates a fresh string for the parent
848
+ };
849
+ else {
850
+ let R = i[x];
851
+ if (l < R.xIndex) {
852
+ let j = `merge_${a.id}_${x}_${R.xIndex}`;
853
+ i[j] = R, i[x] = {
854
+ color: o,
855
+ xIndex: l,
856
+ lastxy: { x: u, y: h },
857
+ pathStr: `M ${u} ${h}`,
858
+ // Creates a fresh string
859
+ toBeClosed: R.toBeClosed ? [...R.toBeClosed, j] : [j]
860
+ }, delete R.toBeClosed;
861
+ } else {
862
+ let j = `merge_${a.id}_${x}_${l}`;
863
+ i[j] = {
864
+ color: o,
865
+ xIndex: l,
866
+ lastxy: { x: u, y: h },
867
+ pathStr: `M ${u} ${h}`
868
+ // Creates a fresh string
869
+ }, i[x].toBeClosed || (i[x].toBeClosed = []), i[x].toBeClosed.push(j);
870
+ }
871
+ }
872
+ for (let R = 1; R < a.parents.length; R++) {
873
+ let j = a.parents[R], J = l + R;
874
+ Object.values(i).forEach((G) => {
875
+ G.xIndex >= J && G.xIndex++;
876
+ });
877
+ let q = {
878
+ color: F[v++ % F.length],
879
+ xIndex: J,
880
+ lastxy: { x: u, y: h },
881
+ pathStr: `M ${u} ${h}`
882
+ // Creates a fresh string
883
+ };
884
+ if (!i[j])
885
+ i[j] = q;
886
+ else {
887
+ let G = `merge_${a.id}_${j}_${J}`;
888
+ q.color = i[j].color, i[G] = q, i[j].toBeClosed || (i[j].toBeClosed = []), i[j].toBeClosed.push(G);
889
+ }
890
+ }
891
+ }
892
+ ce();
893
+ }
894
+ return y.sort(
895
+ (a, s) => new Date(s.date).getTime() - new Date(a.date).getTime()
896
+ ), y.forEach((a, s) => {
897
+ a.meta = { yIndex: s };
898
+ }), y.forEach((a) => {
899
+ fe(a);
900
+ }), $.forEach((a) => {
901
+ L(b, a.d, a.color, wr);
902
+ }), { nodes: d, edges: b };
903
+ }, [{ ...S }]);
904
+ return /* @__PURE__ */ Y.jsx(Y.Fragment, { children: /* @__PURE__ */ Y.jsxs(
905
+ "svg",
906
+ {
907
+ height: _ * y.length + Ue,
908
+ style: {},
909
+ children: [
910
+ /* @__PURE__ */ Y.jsx("g", { id: "layer-lines", children: N }),
911
+ /* @__PURE__ */ Y.jsx("g", { id: "layer-points", children: W })
912
+ ]
913
+ }
914
+ ) });
708
915
  };
709
916
  export {
710
- _e as GitGraphSVG
917
+ Pr as GitGraph,
918
+ Or as GitGraphSVG
711
919
  };