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