react-markdown-table-ts 1.4.11 → 1.4.13
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.
- package/dist/LineNumbers.d.ts +4 -832
- package/dist/LineNumbers.d.ts.map +1 -1
- package/dist/MarkdownTable.d.ts.map +1 -1
- package/dist/index.cjs +94 -32
- package/dist/index.mjs +439 -391
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
var
|
|
1
|
+
import je, { useId as gr, useDeferredValue as mr, useEffect as pr } from "react";
|
|
2
|
+
var H = { exports: {} }, N = {};
|
|
3
3
|
/**
|
|
4
4
|
* @license React
|
|
5
5
|
* react-jsx-runtime.production.min.js
|
|
@@ -9,21 +9,21 @@ var q = { exports: {} }, N = {};
|
|
|
9
9
|
* This source code is licensed under the MIT license found in the
|
|
10
10
|
* LICENSE file in the root directory of this source tree.
|
|
11
11
|
*/
|
|
12
|
-
var
|
|
13
|
-
function
|
|
14
|
-
if (
|
|
15
|
-
|
|
16
|
-
var a =
|
|
17
|
-
function h(
|
|
18
|
-
var
|
|
19
|
-
|
|
20
|
-
for (
|
|
21
|
-
if (
|
|
22
|
-
return { $$typeof: t, type:
|
|
12
|
+
var $e;
|
|
13
|
+
function hr() {
|
|
14
|
+
if ($e) return N;
|
|
15
|
+
$e = 1;
|
|
16
|
+
var a = je, t = Symbol.for("react.element"), i = Symbol.for("react.fragment"), g = Object.prototype.hasOwnProperty, c = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, d = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
17
|
+
function h(m, p, R) {
|
|
18
|
+
var y, E = {}, C = null, $ = null;
|
|
19
|
+
R !== void 0 && (C = "" + R), p.key !== void 0 && (C = "" + p.key), p.ref !== void 0 && ($ = p.ref);
|
|
20
|
+
for (y in p) g.call(p, y) && !d.hasOwnProperty(y) && (E[y] = p[y]);
|
|
21
|
+
if (m && m.defaultProps) for (y in p = m.defaultProps, p) E[y] === void 0 && (E[y] = p[y]);
|
|
22
|
+
return { $$typeof: t, type: m, key: C, ref: $, props: E, _owner: c.current };
|
|
23
23
|
}
|
|
24
24
|
return N.Fragment = i, N.jsx = h, N.jsxs = h, N;
|
|
25
25
|
}
|
|
26
|
-
var
|
|
26
|
+
var B = {};
|
|
27
27
|
/**
|
|
28
28
|
* @license React
|
|
29
29
|
* react-jsx-runtime.development.js
|
|
@@ -33,17 +33,17 @@ var Y = {};
|
|
|
33
33
|
* This source code is licensed under the MIT license found in the
|
|
34
34
|
* LICENSE file in the root directory of this source tree.
|
|
35
35
|
*/
|
|
36
|
-
var
|
|
37
|
-
function
|
|
38
|
-
return
|
|
39
|
-
var a =
|
|
40
|
-
function
|
|
36
|
+
var Se;
|
|
37
|
+
function vr() {
|
|
38
|
+
return Se || (Se = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
39
|
+
var a = je, t = Symbol.for("react.element"), i = Symbol.for("react.portal"), g = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), d = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), m = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), R = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), $ = Symbol.for("react.offscreen"), S = Symbol.iterator, J = "@@iterator";
|
|
40
|
+
function W(e) {
|
|
41
41
|
if (e === null || typeof e != "object")
|
|
42
42
|
return null;
|
|
43
|
-
var r =
|
|
43
|
+
var r = S && e[S] || e[J];
|
|
44
44
|
return typeof r == "function" ? r : null;
|
|
45
45
|
}
|
|
46
|
-
var
|
|
46
|
+
var A = a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
47
47
|
function w(e) {
|
|
48
48
|
{
|
|
49
49
|
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
|
|
@@ -53,34 +53,34 @@ function br() {
|
|
|
53
53
|
}
|
|
54
54
|
function Pe(e, r, n) {
|
|
55
55
|
{
|
|
56
|
-
var o =
|
|
57
|
-
|
|
56
|
+
var o = A.ReactDebugCurrentFrame, u = o.getStackAddendum();
|
|
57
|
+
u !== "" && (r += "%s", n = n.concat([u]));
|
|
58
58
|
var f = n.map(function(l) {
|
|
59
59
|
return String(l);
|
|
60
60
|
});
|
|
61
61
|
f.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, f);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
var Ae = !1, Fe = !1, De = !1,
|
|
65
|
-
|
|
66
|
-
function
|
|
67
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
64
|
+
var Ae = !1, Fe = !1, De = !1, We = !1, Me = !1, te;
|
|
65
|
+
te = Symbol.for("react.module.reference");
|
|
66
|
+
function Ye(e) {
|
|
67
|
+
return !!(typeof e == "string" || typeof e == "function" || e === g || e === d || Me || e === c || e === R || e === y || We || e === $ || Ae || Fe || De || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === E || e.$$typeof === h || e.$$typeof === m || e.$$typeof === p || // This needs to include all possible module reference object
|
|
68
68
|
// types supported by any Flight configuration anywhere since
|
|
69
69
|
// we don't know which Flight build this will end up being used
|
|
70
70
|
// with.
|
|
71
|
-
e.$$typeof ===
|
|
71
|
+
e.$$typeof === te || e.getModuleId !== void 0));
|
|
72
72
|
}
|
|
73
73
|
function Ne(e, r, n) {
|
|
74
74
|
var o = e.displayName;
|
|
75
75
|
if (o)
|
|
76
76
|
return o;
|
|
77
|
-
var
|
|
78
|
-
return
|
|
77
|
+
var u = r.displayName || r.name || "";
|
|
78
|
+
return u !== "" ? n + "(" + u + ")" : n;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function ne(e) {
|
|
81
81
|
return e.displayName || "Context";
|
|
82
82
|
}
|
|
83
|
-
function
|
|
83
|
+
function k(e) {
|
|
84
84
|
if (e == null)
|
|
85
85
|
return null;
|
|
86
86
|
if (typeof e.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -88,36 +88,36 @@ function br() {
|
|
|
88
88
|
if (typeof e == "string")
|
|
89
89
|
return e;
|
|
90
90
|
switch (e) {
|
|
91
|
-
case
|
|
91
|
+
case g:
|
|
92
92
|
return "Fragment";
|
|
93
93
|
case i:
|
|
94
94
|
return "Portal";
|
|
95
|
-
case
|
|
95
|
+
case d:
|
|
96
96
|
return "Profiler";
|
|
97
|
-
case
|
|
97
|
+
case c:
|
|
98
98
|
return "StrictMode";
|
|
99
|
-
case
|
|
99
|
+
case R:
|
|
100
100
|
return "Suspense";
|
|
101
|
-
case
|
|
101
|
+
case y:
|
|
102
102
|
return "SuspenseList";
|
|
103
103
|
}
|
|
104
104
|
if (typeof e == "object")
|
|
105
105
|
switch (e.$$typeof) {
|
|
106
|
-
case
|
|
106
|
+
case m:
|
|
107
107
|
var r = e;
|
|
108
|
-
return
|
|
108
|
+
return ne(r) + ".Consumer";
|
|
109
109
|
case h:
|
|
110
110
|
var n = e;
|
|
111
|
-
return
|
|
112
|
-
case
|
|
111
|
+
return ne(n._context) + ".Provider";
|
|
112
|
+
case p:
|
|
113
113
|
return Ne(e, e.render, "ForwardRef");
|
|
114
|
-
case
|
|
114
|
+
case E:
|
|
115
115
|
var o = e.displayName || null;
|
|
116
|
-
return o !== null ? o :
|
|
117
|
-
case
|
|
118
|
-
var
|
|
116
|
+
return o !== null ? o : k(e.type) || "Memo";
|
|
117
|
+
case C: {
|
|
118
|
+
var u = e, f = u._payload, l = u._init;
|
|
119
119
|
try {
|
|
120
|
-
return
|
|
120
|
+
return k(l(f));
|
|
121
121
|
} catch {
|
|
122
122
|
return null;
|
|
123
123
|
}
|
|
@@ -125,18 +125,18 @@ function br() {
|
|
|
125
125
|
}
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
128
|
-
var j = Object.assign,
|
|
129
|
-
function
|
|
128
|
+
var j = Object.assign, M = 0, ae, oe, ie, se, le, ue, ce;
|
|
129
|
+
function fe() {
|
|
130
130
|
}
|
|
131
|
-
|
|
132
|
-
function
|
|
131
|
+
fe.__reactDisabledLog = !0;
|
|
132
|
+
function Be() {
|
|
133
133
|
{
|
|
134
|
-
if (
|
|
135
|
-
|
|
134
|
+
if (M === 0) {
|
|
135
|
+
ae = console.log, oe = console.info, ie = console.warn, se = console.error, le = console.group, ue = console.groupCollapsed, ce = console.groupEnd;
|
|
136
136
|
var e = {
|
|
137
137
|
configurable: !0,
|
|
138
138
|
enumerable: !0,
|
|
139
|
-
value:
|
|
139
|
+
value: fe,
|
|
140
140
|
writable: !0
|
|
141
141
|
};
|
|
142
142
|
Object.defineProperties(console, {
|
|
@@ -149,12 +149,12 @@ function br() {
|
|
|
149
149
|
groupEnd: e
|
|
150
150
|
});
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
M++;
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
|
-
function
|
|
155
|
+
function ze() {
|
|
156
156
|
{
|
|
157
|
-
if (
|
|
157
|
+
if (M--, M === 0) {
|
|
158
158
|
var e = {
|
|
159
159
|
configurable: !0,
|
|
160
160
|
enumerable: !0,
|
|
@@ -162,52 +162,52 @@ function br() {
|
|
|
162
162
|
};
|
|
163
163
|
Object.defineProperties(console, {
|
|
164
164
|
log: j({}, e, {
|
|
165
|
-
value:
|
|
165
|
+
value: ae
|
|
166
166
|
}),
|
|
167
167
|
info: j({}, e, {
|
|
168
|
-
value:
|
|
168
|
+
value: oe
|
|
169
169
|
}),
|
|
170
170
|
warn: j({}, e, {
|
|
171
|
-
value:
|
|
171
|
+
value: ie
|
|
172
172
|
}),
|
|
173
173
|
error: j({}, e, {
|
|
174
|
-
value:
|
|
174
|
+
value: se
|
|
175
175
|
}),
|
|
176
176
|
group: j({}, e, {
|
|
177
|
-
value:
|
|
177
|
+
value: le
|
|
178
178
|
}),
|
|
179
179
|
groupCollapsed: j({}, e, {
|
|
180
|
-
value:
|
|
180
|
+
value: ue
|
|
181
181
|
}),
|
|
182
182
|
groupEnd: j({}, e, {
|
|
183
|
-
value:
|
|
183
|
+
value: ce
|
|
184
184
|
})
|
|
185
185
|
});
|
|
186
186
|
}
|
|
187
|
-
|
|
187
|
+
M < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
188
188
|
}
|
|
189
189
|
}
|
|
190
|
-
var
|
|
190
|
+
var q = A.ReactCurrentDispatcher, K;
|
|
191
191
|
function V(e, r, n) {
|
|
192
192
|
{
|
|
193
|
-
if (
|
|
193
|
+
if (K === void 0)
|
|
194
194
|
try {
|
|
195
195
|
throw Error();
|
|
196
|
-
} catch (
|
|
197
|
-
var o =
|
|
198
|
-
|
|
196
|
+
} catch (u) {
|
|
197
|
+
var o = u.stack.trim().match(/\n( *(at )?)/);
|
|
198
|
+
K = o && o[1] || "";
|
|
199
199
|
}
|
|
200
200
|
return `
|
|
201
|
-
` +
|
|
201
|
+
` + K + e;
|
|
202
202
|
}
|
|
203
203
|
}
|
|
204
|
-
var
|
|
204
|
+
var X = !1, U;
|
|
205
205
|
{
|
|
206
|
-
var
|
|
207
|
-
U = new
|
|
206
|
+
var Ve = typeof WeakMap == "function" ? WeakMap : Map;
|
|
207
|
+
U = new Ve();
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
if (!e ||
|
|
209
|
+
function de(e, r) {
|
|
210
|
+
if (!e || X)
|
|
211
211
|
return "";
|
|
212
212
|
{
|
|
213
213
|
var n = U.get(e);
|
|
@@ -215,11 +215,11 @@ function br() {
|
|
|
215
215
|
return n;
|
|
216
216
|
}
|
|
217
217
|
var o;
|
|
218
|
-
|
|
219
|
-
var
|
|
218
|
+
X = !0;
|
|
219
|
+
var u = Error.prepareStackTrace;
|
|
220
220
|
Error.prepareStackTrace = void 0;
|
|
221
221
|
var f;
|
|
222
|
-
f =
|
|
222
|
+
f = q.current, q.current = null, Be();
|
|
223
223
|
try {
|
|
224
224
|
if (r) {
|
|
225
225
|
var l = function() {
|
|
@@ -232,98 +232,98 @@ function br() {
|
|
|
232
232
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
233
233
|
try {
|
|
234
234
|
Reflect.construct(l, []);
|
|
235
|
-
} catch (
|
|
236
|
-
o =
|
|
235
|
+
} catch (x) {
|
|
236
|
+
o = x;
|
|
237
237
|
}
|
|
238
238
|
Reflect.construct(e, [], l);
|
|
239
239
|
} else {
|
|
240
240
|
try {
|
|
241
241
|
l.call();
|
|
242
|
-
} catch (
|
|
243
|
-
o =
|
|
242
|
+
} catch (x) {
|
|
243
|
+
o = x;
|
|
244
244
|
}
|
|
245
245
|
e.call(l.prototype);
|
|
246
246
|
}
|
|
247
247
|
} else {
|
|
248
248
|
try {
|
|
249
249
|
throw Error();
|
|
250
|
-
} catch (
|
|
251
|
-
o =
|
|
250
|
+
} catch (x) {
|
|
251
|
+
o = x;
|
|
252
252
|
}
|
|
253
253
|
e();
|
|
254
254
|
}
|
|
255
|
-
} catch (
|
|
256
|
-
if (
|
|
257
|
-
for (var s =
|
|
255
|
+
} catch (x) {
|
|
256
|
+
if (x && o && typeof x.stack == "string") {
|
|
257
|
+
for (var s = x.stack.split(`
|
|
258
258
|
`), _ = o.stack.split(`
|
|
259
|
-
`), v = s.length - 1,
|
|
260
|
-
|
|
261
|
-
for (; v >= 1 &&
|
|
262
|
-
if (s[v] !== _[
|
|
263
|
-
if (v !== 1 ||
|
|
259
|
+
`), v = s.length - 1, b = _.length - 1; v >= 1 && b >= 0 && s[v] !== _[b]; )
|
|
260
|
+
b--;
|
|
261
|
+
for (; v >= 1 && b >= 0; v--, b--)
|
|
262
|
+
if (s[v] !== _[b]) {
|
|
263
|
+
if (v !== 1 || b !== 1)
|
|
264
264
|
do
|
|
265
|
-
if (v--,
|
|
265
|
+
if (v--, b--, b < 0 || s[v] !== _[b]) {
|
|
266
266
|
var T = `
|
|
267
267
|
` + s[v].replace(" at new ", " at ");
|
|
268
268
|
return e.displayName && T.includes("<anonymous>") && (T = T.replace("<anonymous>", e.displayName)), typeof e == "function" && U.set(e, T), T;
|
|
269
269
|
}
|
|
270
|
-
while (v >= 1 &&
|
|
270
|
+
while (v >= 1 && b >= 0);
|
|
271
271
|
break;
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
} finally {
|
|
275
|
-
|
|
275
|
+
X = !1, q.current = f, ze(), Error.prepareStackTrace = u;
|
|
276
276
|
}
|
|
277
|
-
var
|
|
278
|
-
return typeof e == "function" && U.set(e,
|
|
277
|
+
var D = e ? e.displayName || e.name : "", O = D ? V(D) : "";
|
|
278
|
+
return typeof e == "function" && U.set(e, O), O;
|
|
279
279
|
}
|
|
280
|
-
function
|
|
281
|
-
return
|
|
280
|
+
function Ue(e, r, n) {
|
|
281
|
+
return de(e, !1);
|
|
282
282
|
}
|
|
283
|
-
function
|
|
283
|
+
function Le(e) {
|
|
284
284
|
var r = e.prototype;
|
|
285
285
|
return !!(r && r.isReactComponent);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function L(e, r, n) {
|
|
288
288
|
if (e == null)
|
|
289
289
|
return "";
|
|
290
290
|
if (typeof e == "function")
|
|
291
|
-
return
|
|
291
|
+
return de(e, Le(e));
|
|
292
292
|
if (typeof e == "string")
|
|
293
293
|
return V(e);
|
|
294
294
|
switch (e) {
|
|
295
|
-
case
|
|
295
|
+
case R:
|
|
296
296
|
return V("Suspense");
|
|
297
|
-
case
|
|
297
|
+
case y:
|
|
298
298
|
return V("SuspenseList");
|
|
299
299
|
}
|
|
300
300
|
if (typeof e == "object")
|
|
301
301
|
switch (e.$$typeof) {
|
|
302
|
-
case
|
|
303
|
-
return
|
|
304
|
-
case
|
|
305
|
-
return
|
|
306
|
-
case
|
|
307
|
-
var o = e,
|
|
302
|
+
case p:
|
|
303
|
+
return Ue(e.render);
|
|
304
|
+
case E:
|
|
305
|
+
return L(e.type, r, n);
|
|
306
|
+
case C: {
|
|
307
|
+
var o = e, u = o._payload, f = o._init;
|
|
308
308
|
try {
|
|
309
|
-
return
|
|
309
|
+
return L(f(u), r, n);
|
|
310
310
|
} catch {
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
}
|
|
314
314
|
return "";
|
|
315
315
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
316
|
+
var Y = Object.prototype.hasOwnProperty, ge = {}, me = A.ReactDebugCurrentFrame;
|
|
317
|
+
function I(e) {
|
|
318
318
|
if (e) {
|
|
319
|
-
var r = e._owner, n =
|
|
319
|
+
var r = e._owner, n = L(e.type, e._source, r ? r.type : null);
|
|
320
320
|
me.setExtraStackFrame(n);
|
|
321
321
|
} else
|
|
322
322
|
me.setExtraStackFrame(null);
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Ie(e, r, n, o, u) {
|
|
325
325
|
{
|
|
326
|
-
var f = Function.call.bind(
|
|
326
|
+
var f = Function.call.bind(Y);
|
|
327
327
|
for (var l in e)
|
|
328
328
|
if (f(e, l)) {
|
|
329
329
|
var s = void 0;
|
|
@@ -336,12 +336,12 @@ function br() {
|
|
|
336
336
|
} catch (v) {
|
|
337
337
|
s = v;
|
|
338
338
|
}
|
|
339
|
-
s && !(s instanceof Error) && (
|
|
339
|
+
s && !(s instanceof Error) && (I(u), w("%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).", o || "React class", n, l, typeof s), I(null)), s instanceof Error && !(s.message in ge) && (ge[s.message] = !0, I(u), w("Failed %s type: %s", n, s.message), I(null));
|
|
340
340
|
}
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
var He = Array.isArray;
|
|
344
|
-
function
|
|
344
|
+
function G(e) {
|
|
345
345
|
return He(e);
|
|
346
346
|
}
|
|
347
347
|
function Je(e) {
|
|
@@ -352,26 +352,26 @@ function br() {
|
|
|
352
352
|
}
|
|
353
353
|
function qe(e) {
|
|
354
354
|
try {
|
|
355
|
-
return
|
|
355
|
+
return pe(e), !1;
|
|
356
356
|
} catch {
|
|
357
357
|
return !0;
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function pe(e) {
|
|
361
361
|
return "" + e;
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function he(e) {
|
|
364
364
|
if (qe(e))
|
|
365
|
-
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)),
|
|
365
|
+
return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(e)), pe(e);
|
|
366
366
|
}
|
|
367
|
-
var
|
|
367
|
+
var ve = A.ReactCurrentOwner, Ke = {
|
|
368
368
|
key: !0,
|
|
369
369
|
ref: !0,
|
|
370
370
|
__self: !0,
|
|
371
371
|
__source: !0
|
|
372
|
-
},
|
|
372
|
+
}, be, ye;
|
|
373
373
|
function Xe(e) {
|
|
374
|
-
if (
|
|
374
|
+
if (Y.call(e, "ref")) {
|
|
375
375
|
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
376
376
|
if (r && r.isReactWarning)
|
|
377
377
|
return !1;
|
|
@@ -379,7 +379,7 @@ function br() {
|
|
|
379
379
|
return e.ref !== void 0;
|
|
380
380
|
}
|
|
381
381
|
function Ge(e) {
|
|
382
|
-
if (
|
|
382
|
+
if (Y.call(e, "key")) {
|
|
383
383
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
384
384
|
if (r && r.isReactWarning)
|
|
385
385
|
return !1;
|
|
@@ -387,12 +387,12 @@ function br() {
|
|
|
387
387
|
return e.key !== void 0;
|
|
388
388
|
}
|
|
389
389
|
function Ze(e, r) {
|
|
390
|
-
typeof e.ref == "string" &&
|
|
390
|
+
typeof e.ref == "string" && ve.current;
|
|
391
391
|
}
|
|
392
392
|
function Qe(e, r) {
|
|
393
393
|
{
|
|
394
394
|
var n = function() {
|
|
395
|
-
|
|
395
|
+
be || (be = !0, w("%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));
|
|
396
396
|
};
|
|
397
397
|
n.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
398
398
|
get: n,
|
|
@@ -403,7 +403,7 @@ function br() {
|
|
|
403
403
|
function er(e, r) {
|
|
404
404
|
{
|
|
405
405
|
var n = function() {
|
|
406
|
-
|
|
406
|
+
ye || (ye = !0, w("%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));
|
|
407
407
|
};
|
|
408
408
|
n.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
409
409
|
get: n,
|
|
@@ -411,7 +411,7 @@ function br() {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
-
var rr = function(e, r, n, o,
|
|
414
|
+
var rr = function(e, r, n, o, u, f, l) {
|
|
415
415
|
var s = {
|
|
416
416
|
// This tag allows us to uniquely identify this as a React Element
|
|
417
417
|
$$typeof: t,
|
|
@@ -437,44 +437,44 @@ function br() {
|
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !1,
|
|
440
|
-
value:
|
|
440
|
+
value: u
|
|
441
441
|
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
442
442
|
};
|
|
443
|
-
function tr(e, r, n, o,
|
|
443
|
+
function tr(e, r, n, o, u) {
|
|
444
444
|
{
|
|
445
445
|
var f, l = {}, s = null, _ = null;
|
|
446
|
-
n !== void 0 && (
|
|
446
|
+
n !== void 0 && (he(n), s = "" + n), Ge(r) && (he(r.key), s = "" + r.key), Xe(r) && (_ = r.ref, Ze(r, u));
|
|
447
447
|
for (f in r)
|
|
448
|
-
|
|
448
|
+
Y.call(r, f) && !Ke.hasOwnProperty(f) && (l[f] = r[f]);
|
|
449
449
|
if (e && e.defaultProps) {
|
|
450
450
|
var v = e.defaultProps;
|
|
451
451
|
for (f in v)
|
|
452
452
|
l[f] === void 0 && (l[f] = v[f]);
|
|
453
453
|
}
|
|
454
454
|
if (s || _) {
|
|
455
|
-
var
|
|
456
|
-
s && Qe(l,
|
|
455
|
+
var b = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
456
|
+
s && Qe(l, b), _ && er(l, b);
|
|
457
457
|
}
|
|
458
|
-
return rr(e, s, _,
|
|
458
|
+
return rr(e, s, _, u, o, ve.current, l);
|
|
459
459
|
}
|
|
460
460
|
}
|
|
461
|
-
var
|
|
462
|
-
function
|
|
461
|
+
var Z = A.ReactCurrentOwner, Re = A.ReactDebugCurrentFrame;
|
|
462
|
+
function F(e) {
|
|
463
463
|
if (e) {
|
|
464
|
-
var r = e._owner, n =
|
|
465
|
-
|
|
464
|
+
var r = e._owner, n = L(e.type, e._source, r ? r.type : null);
|
|
465
|
+
Re.setExtraStackFrame(n);
|
|
466
466
|
} else
|
|
467
|
-
|
|
467
|
+
Re.setExtraStackFrame(null);
|
|
468
468
|
}
|
|
469
|
-
var
|
|
470
|
-
|
|
471
|
-
function
|
|
469
|
+
var Q;
|
|
470
|
+
Q = !1;
|
|
471
|
+
function ee(e) {
|
|
472
472
|
return typeof e == "object" && e !== null && e.$$typeof === t;
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function Ee() {
|
|
475
475
|
{
|
|
476
|
-
if (
|
|
477
|
-
var e =
|
|
476
|
+
if (Z.current) {
|
|
477
|
+
var e = k(Z.current.type);
|
|
478
478
|
if (e)
|
|
479
479
|
return `
|
|
480
480
|
|
|
@@ -486,10 +486,10 @@ Check the render method of \`` + e + "`.";
|
|
|
486
486
|
function nr(e) {
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
|
-
var
|
|
489
|
+
var we = {};
|
|
490
490
|
function ar(e) {
|
|
491
491
|
{
|
|
492
|
-
var r =
|
|
492
|
+
var r = Ee();
|
|
493
493
|
if (!r) {
|
|
494
494
|
var n = typeof e == "string" ? e : e.displayName || e.name;
|
|
495
495
|
n && (r = `
|
|
@@ -499,35 +499,35 @@ Check the top-level render call using <` + n + ">.");
|
|
|
499
499
|
return r;
|
|
500
500
|
}
|
|
501
501
|
}
|
|
502
|
-
function
|
|
502
|
+
function _e(e, r) {
|
|
503
503
|
{
|
|
504
504
|
if (!e._store || e._store.validated || e.key != null)
|
|
505
505
|
return;
|
|
506
506
|
e._store.validated = !0;
|
|
507
507
|
var n = ar(r);
|
|
508
|
-
if (
|
|
508
|
+
if (we[n])
|
|
509
509
|
return;
|
|
510
|
-
|
|
510
|
+
we[n] = !0;
|
|
511
511
|
var o = "";
|
|
512
|
-
e && e._owner && e._owner !==
|
|
512
|
+
e && e._owner && e._owner !== Z.current && (o = " It was passed a child from " + k(e._owner.type) + "."), F(e), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, o), F(null);
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function Ce(e, r) {
|
|
516
516
|
{
|
|
517
517
|
if (typeof e != "object")
|
|
518
518
|
return;
|
|
519
|
-
if (
|
|
519
|
+
if (G(e))
|
|
520
520
|
for (var n = 0; n < e.length; n++) {
|
|
521
521
|
var o = e[n];
|
|
522
|
-
|
|
522
|
+
ee(o) && _e(o, r);
|
|
523
523
|
}
|
|
524
|
-
else if (
|
|
524
|
+
else if (ee(e))
|
|
525
525
|
e._store && (e._store.validated = !0);
|
|
526
526
|
else if (e) {
|
|
527
|
-
var
|
|
528
|
-
if (typeof
|
|
529
|
-
for (var f =
|
|
530
|
-
|
|
527
|
+
var u = W(e);
|
|
528
|
+
if (typeof u == "function" && u !== e.entries)
|
|
529
|
+
for (var f = u.call(e), l; !(l = f.next()).done; )
|
|
530
|
+
ee(l.value) && _e(l.value, r);
|
|
531
531
|
}
|
|
532
532
|
}
|
|
533
533
|
}
|
|
@@ -539,19 +539,19 @@ Check the top-level render call using <` + n + ">.");
|
|
|
539
539
|
var n;
|
|
540
540
|
if (typeof r == "function")
|
|
541
541
|
n = r.propTypes;
|
|
542
|
-
else if (typeof r == "object" && (r.$$typeof ===
|
|
542
|
+
else if (typeof r == "object" && (r.$$typeof === p || // Note: Memo only checks outer props here.
|
|
543
543
|
// Inner props are checked in the reconciler.
|
|
544
|
-
r.$$typeof ===
|
|
544
|
+
r.$$typeof === E))
|
|
545
545
|
n = r.propTypes;
|
|
546
546
|
else
|
|
547
547
|
return;
|
|
548
548
|
if (n) {
|
|
549
|
-
var o =
|
|
550
|
-
|
|
551
|
-
} else if (r.PropTypes !== void 0 && !
|
|
552
|
-
|
|
553
|
-
var
|
|
554
|
-
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
549
|
+
var o = k(r);
|
|
550
|
+
Ie(n, e.props, "prop", o, e);
|
|
551
|
+
} else if (r.PropTypes !== void 0 && !Q) {
|
|
552
|
+
Q = !0;
|
|
553
|
+
var u = k(r);
|
|
554
|
+
w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", u || "Unknown");
|
|
555
555
|
}
|
|
556
556
|
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
557
557
|
}
|
|
@@ -561,151 +561,156 @@ Check the top-level render call using <` + n + ">.");
|
|
|
561
561
|
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
|
|
562
562
|
var o = r[n];
|
|
563
563
|
if (o !== "children" && o !== "key") {
|
|
564
|
-
|
|
564
|
+
F(e), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), F(null);
|
|
565
565
|
break;
|
|
566
566
|
}
|
|
567
567
|
}
|
|
568
|
-
e.ref !== null && (
|
|
568
|
+
e.ref !== null && (F(e), w("Invalid attribute `ref` supplied to `React.Fragment`."), F(null));
|
|
569
569
|
}
|
|
570
570
|
}
|
|
571
|
-
var
|
|
572
|
-
function
|
|
571
|
+
var xe = {};
|
|
572
|
+
function Te(e, r, n, o, u, f) {
|
|
573
573
|
{
|
|
574
|
-
var l =
|
|
574
|
+
var l = Ye(e);
|
|
575
575
|
if (!l) {
|
|
576
576
|
var s = "";
|
|
577
577
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (s += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
578
578
|
var _ = nr();
|
|
579
|
-
_ ? s += _ : s +=
|
|
579
|
+
_ ? s += _ : s += Ee();
|
|
580
580
|
var v;
|
|
581
|
-
e === null ? v = "null" :
|
|
581
|
+
e === null ? v = "null" : G(e) ? v = "array" : e !== void 0 && e.$$typeof === t ? (v = "<" + (k(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : v = typeof e, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", v, s);
|
|
582
582
|
}
|
|
583
|
-
var
|
|
584
|
-
if (
|
|
585
|
-
return
|
|
583
|
+
var b = tr(e, r, n, u, f);
|
|
584
|
+
if (b == null)
|
|
585
|
+
return b;
|
|
586
586
|
if (l) {
|
|
587
587
|
var T = r.children;
|
|
588
588
|
if (T !== void 0)
|
|
589
589
|
if (o)
|
|
590
|
-
if (
|
|
591
|
-
for (var
|
|
592
|
-
|
|
590
|
+
if (G(T)) {
|
|
591
|
+
for (var D = 0; D < T.length; D++)
|
|
592
|
+
Ce(T[D], e);
|
|
593
593
|
Object.freeze && Object.freeze(T);
|
|
594
594
|
} else
|
|
595
595
|
w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
596
596
|
else
|
|
597
|
-
|
|
597
|
+
Ce(T, e);
|
|
598
598
|
}
|
|
599
|
-
if (
|
|
600
|
-
var
|
|
599
|
+
if (Y.call(r, "key")) {
|
|
600
|
+
var O = k(e), x = Object.keys(r).filter(function(dr) {
|
|
601
601
|
return dr !== "key";
|
|
602
|
-
}),
|
|
603
|
-
if (!
|
|
604
|
-
var fr =
|
|
602
|
+
}), re = x.length > 0 ? "{key: someKey, " + x.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
603
|
+
if (!xe[O + re]) {
|
|
604
|
+
var fr = x.length > 0 ? "{" + x.join(": ..., ") + ": ...}" : "{}";
|
|
605
605
|
w(`A props object containing a "key" prop is being spread into JSX:
|
|
606
606
|
let props = %s;
|
|
607
607
|
<%s {...props} />
|
|
608
608
|
React keys must be passed directly to JSX without using spread:
|
|
609
609
|
let props = %s;
|
|
610
|
-
<%s key={someKey} {...props} />`,
|
|
610
|
+
<%s key={someKey} {...props} />`, re, O, fr, O), xe[O + re] = !0;
|
|
611
611
|
}
|
|
612
612
|
}
|
|
613
|
-
return e ===
|
|
613
|
+
return e === g ? ir(b) : or(b), b;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
616
|
function sr(e, r, n) {
|
|
617
|
-
return
|
|
617
|
+
return Te(e, r, n, !0);
|
|
618
618
|
}
|
|
619
619
|
function lr(e, r, n) {
|
|
620
|
-
return
|
|
620
|
+
return Te(e, r, n, !1);
|
|
621
621
|
}
|
|
622
622
|
var ur = lr, cr = sr;
|
|
623
|
-
|
|
624
|
-
})()),
|
|
625
|
-
}
|
|
626
|
-
var
|
|
627
|
-
function
|
|
628
|
-
return
|
|
629
|
-
}
|
|
630
|
-
var L = yr();
|
|
631
|
-
function Rr(a) {
|
|
632
|
-
const {
|
|
633
|
-
children: t,
|
|
634
|
-
showLineNumbers: i = !1,
|
|
635
|
-
startLine: d = 1,
|
|
636
|
-
className: u = "",
|
|
637
|
-
style: g = {},
|
|
638
|
-
topPadding: h = 16
|
|
639
|
-
} = a, E = (typeof t == "string" ? t : "").split(`
|
|
640
|
-
`).map((b, R) => d + R);
|
|
641
|
-
return D.createElement("pre", {
|
|
642
|
-
className: `language-markdown ${i ? "line-numbers" : ""} ${u}`.trim(),
|
|
643
|
-
"data-start": d,
|
|
644
|
-
style: {
|
|
645
|
-
position: "relative",
|
|
646
|
-
counterReset: `linenumber ${d - 1}`,
|
|
647
|
-
...i ? { paddingLeft: "1.2em" } : {},
|
|
648
|
-
...g
|
|
649
|
-
}
|
|
650
|
-
}, [
|
|
651
|
-
D.createElement("code", {
|
|
652
|
-
key: "code",
|
|
653
|
-
className: "language-markdown"
|
|
654
|
-
}, t),
|
|
655
|
-
i && D.createElement("span", {
|
|
656
|
-
key: "line-numbers",
|
|
657
|
-
className: "line-numbers-rows",
|
|
658
|
-
"aria-hidden": "true",
|
|
659
|
-
style: {
|
|
660
|
-
position: "absolute",
|
|
661
|
-
pointerEvents: "none",
|
|
662
|
-
top: `${1 + h / 16}em`,
|
|
663
|
-
fontSize: "100%",
|
|
664
|
-
left: "0em",
|
|
665
|
-
width: "2.5em",
|
|
666
|
-
letterSpacing: "-1px",
|
|
667
|
-
borderRight: "1px solid #999",
|
|
668
|
-
userSelect: "none",
|
|
669
|
-
lineHeight: "1.5"
|
|
670
|
-
}
|
|
671
|
-
}, E.map(
|
|
672
|
-
(b, R) => D.createElement("span", {
|
|
673
|
-
key: R,
|
|
674
|
-
style: {
|
|
675
|
-
display: "block",
|
|
676
|
-
textAlign: "right",
|
|
677
|
-
paddingRight: "0.8em",
|
|
678
|
-
color: "#999",
|
|
679
|
-
lineHeight: "1.5"
|
|
680
|
-
}
|
|
681
|
-
}, b)
|
|
682
|
-
))
|
|
683
|
-
].filter(Boolean));
|
|
623
|
+
B.Fragment = g, B.jsx = ur, B.jsxs = cr;
|
|
624
|
+
})()), B;
|
|
625
|
+
}
|
|
626
|
+
var ke;
|
|
627
|
+
function br() {
|
|
628
|
+
return ke || (ke = 1, process.env.NODE_ENV === "production" ? H.exports = hr() : H.exports = vr()), H.exports;
|
|
684
629
|
}
|
|
685
|
-
|
|
630
|
+
var P = br();
|
|
631
|
+
function yr({
|
|
632
|
+
children: a,
|
|
633
|
+
showLineNumbers: t = !1,
|
|
634
|
+
startLine: i = 1,
|
|
635
|
+
className: g = "",
|
|
636
|
+
style: c = {},
|
|
637
|
+
topPadding: d = 16,
|
|
638
|
+
codeStyle: h = {}
|
|
639
|
+
}) {
|
|
640
|
+
const R = (typeof a == "string" ? a : "").split(`
|
|
641
|
+
`).map(($, S) => i + S), y = {
|
|
642
|
+
position: "relative",
|
|
643
|
+
counterReset: `linenumber ${i - 1}`,
|
|
644
|
+
paddingTop: 0,
|
|
645
|
+
...t ? { paddingLeft: "1em" } : {},
|
|
646
|
+
...c
|
|
647
|
+
}, E = {
|
|
648
|
+
display: "block",
|
|
649
|
+
paddingTop: `${d}px`,
|
|
650
|
+
paddingLeft: t ? "3em" : "0.3em",
|
|
651
|
+
...h
|
|
652
|
+
}, C = {
|
|
653
|
+
position: "absolute",
|
|
654
|
+
pointerEvents: "none",
|
|
655
|
+
top: `${d}px`,
|
|
656
|
+
fontSize: "100%",
|
|
657
|
+
left: "0em",
|
|
658
|
+
width: "2.5em",
|
|
659
|
+
letterSpacing: "-1px",
|
|
660
|
+
borderRight: "1px solid #999",
|
|
661
|
+
userSelect: "none",
|
|
662
|
+
lineHeight: "1.5"
|
|
663
|
+
};
|
|
664
|
+
return /* @__PURE__ */ P.jsxs(
|
|
665
|
+
"pre",
|
|
666
|
+
{
|
|
667
|
+
className: `language-markdown ${t ? "line-numbers" : ""} ${g}`.trim(),
|
|
668
|
+
"data-start": i,
|
|
669
|
+
style: y,
|
|
670
|
+
children: [
|
|
671
|
+
/* @__PURE__ */ P.jsx("code", { className: "language-markdown", style: E, children: a }),
|
|
672
|
+
t && /* @__PURE__ */ P.jsx("span", { className: "line-numbers-rows", "aria-hidden": "true", style: C, children: R.map(($, S) => /* @__PURE__ */ P.jsx(
|
|
673
|
+
"span",
|
|
674
|
+
{
|
|
675
|
+
style: {
|
|
676
|
+
display: "block",
|
|
677
|
+
textAlign: "right",
|
|
678
|
+
paddingRight: "0.8em",
|
|
679
|
+
color: "#999",
|
|
680
|
+
lineHeight: "1.5"
|
|
681
|
+
},
|
|
682
|
+
children: $
|
|
683
|
+
},
|
|
684
|
+
S
|
|
685
|
+
)) })
|
|
686
|
+
]
|
|
687
|
+
}
|
|
688
|
+
);
|
|
689
|
+
}
|
|
690
|
+
function Oe(a) {
|
|
686
691
|
let t;
|
|
687
692
|
return a.useTabs ? t = " " : a.hasPadding ? t = " " : t = "", t;
|
|
688
693
|
}
|
|
689
|
-
class
|
|
694
|
+
class Rr {
|
|
690
695
|
padding;
|
|
691
696
|
constructor(t) {
|
|
692
|
-
this.padding =
|
|
697
|
+
this.padding = Oe(t);
|
|
693
698
|
}
|
|
694
|
-
formatCell(t, i,
|
|
695
|
-
const
|
|
699
|
+
formatCell(t, i, g) {
|
|
700
|
+
const c = g;
|
|
696
701
|
switch (i) {
|
|
697
702
|
case "right":
|
|
698
|
-
return `${this.padding}${t.padStart(
|
|
703
|
+
return `${this.padding}${t.padStart(c)}${this.padding}`;
|
|
699
704
|
case "center": {
|
|
700
|
-
const
|
|
701
|
-
return `${this.padding}${" ".repeat(h)}${t}${" ".repeat(
|
|
705
|
+
const d = c - t.length, h = Math.floor(d / 2), m = d - h;
|
|
706
|
+
return `${this.padding}${" ".repeat(h)}${t}${" ".repeat(m)}${this.padding}`;
|
|
702
707
|
}
|
|
703
708
|
default:
|
|
704
|
-
return `${this.padding}${t.padEnd(
|
|
709
|
+
return `${this.padding}${t.padEnd(c)}${this.padding}`;
|
|
705
710
|
}
|
|
706
711
|
}
|
|
707
712
|
}
|
|
708
|
-
class
|
|
713
|
+
class Er {
|
|
709
714
|
static indicators = {
|
|
710
715
|
left: (t) => `:${"-".repeat(t - 1)}`,
|
|
711
716
|
right: (t) => `${"-".repeat(t - 1)}:`,
|
|
@@ -716,12 +721,12 @@ class wr {
|
|
|
716
721
|
return this.indicators[t](i);
|
|
717
722
|
}
|
|
718
723
|
}
|
|
719
|
-
class
|
|
724
|
+
class wr {
|
|
720
725
|
config;
|
|
721
726
|
cellFormatter;
|
|
722
727
|
adjustedAlignments;
|
|
723
728
|
constructor(t) {
|
|
724
|
-
this.config = t, this.cellFormatter = new
|
|
729
|
+
this.config = t, this.cellFormatter = new Rr(t), this.adjustedAlignments = this.getAdjustedAlignments();
|
|
725
730
|
}
|
|
726
731
|
getAdjustedAlignments() {
|
|
727
732
|
return this.config.columnAlignments.length < this.config.columnCount ? [
|
|
@@ -730,75 +735,75 @@ class _r {
|
|
|
730
735
|
] : Array.from(this.config.columnAlignments);
|
|
731
736
|
}
|
|
732
737
|
formatRow(t) {
|
|
733
|
-
return `|${Array.from({ length: this.config.columnCount }, (
|
|
734
|
-
let
|
|
735
|
-
this.config.replaceNewlines && (
|
|
736
|
-
const h = this.adjustedAlignments[
|
|
737
|
-
return this.cellFormatter.formatCell(
|
|
738
|
+
return `|${Array.from({ length: this.config.columnCount }, (g, c) => {
|
|
739
|
+
let d = t[c] ?? "";
|
|
740
|
+
this.config.replaceNewlines && (d = d.replace(/\n/g, "<br>"));
|
|
741
|
+
const h = this.adjustedAlignments[c], m = this.config.columnWidths ? this.config.columnWidths[c] : d.length;
|
|
742
|
+
return this.cellFormatter.formatCell(d, h, m);
|
|
738
743
|
}).join("|")}|`;
|
|
739
744
|
}
|
|
740
745
|
formatAlignmentRow() {
|
|
741
|
-
const t =
|
|
742
|
-
return `|${Array.from({ length: this.config.columnCount }, (
|
|
743
|
-
const
|
|
744
|
-
return `${t}${
|
|
746
|
+
const t = Oe(this.config);
|
|
747
|
+
return `|${Array.from({ length: this.config.columnCount }, (g, c) => {
|
|
748
|
+
const d = this.adjustedAlignments[c], h = this.config.columnWidths ? this.config.columnWidths[c] : 3, m = Er.formatIndicator(d, h);
|
|
749
|
+
return `${t}${m}${t}`;
|
|
745
750
|
}).join("|")}|`;
|
|
746
751
|
}
|
|
747
752
|
}
|
|
748
|
-
function
|
|
753
|
+
function _r(a, t) {
|
|
749
754
|
const i = new Array(t).fill(3);
|
|
750
|
-
return a.forEach((
|
|
751
|
-
for (let
|
|
752
|
-
const
|
|
753
|
-
i[
|
|
755
|
+
return a.forEach((g) => {
|
|
756
|
+
for (let c = 0; c < t; c++) {
|
|
757
|
+
const d = g[c] ?? "";
|
|
758
|
+
i[c] = Math.max(i[c], d.length);
|
|
754
759
|
}
|
|
755
760
|
}), i;
|
|
756
761
|
}
|
|
757
|
-
function
|
|
758
|
-
const t = a.inputDataHeader.length, i = a.inputDataBody.map((
|
|
762
|
+
function Cr(a) {
|
|
763
|
+
const t = a.inputDataHeader.length, i = a.inputDataBody.map((g) => g.length);
|
|
759
764
|
return Math.max(t, ...i);
|
|
760
765
|
}
|
|
761
|
-
function
|
|
762
|
-
return i ?
|
|
766
|
+
function xr(a, t, i) {
|
|
767
|
+
return i ? _r(
|
|
763
768
|
[a.inputDataHeader, ...a.inputDataBody],
|
|
764
769
|
t
|
|
765
770
|
) : void 0;
|
|
766
771
|
}
|
|
767
|
-
function
|
|
768
|
-
const h =
|
|
772
|
+
function Tr(a, t, i = !0, g = !1, c = !1, d = !0) {
|
|
773
|
+
const h = Cr(a), m = xr(a, h, i), p = {
|
|
769
774
|
columnCount: h,
|
|
770
775
|
columnAlignments: t,
|
|
771
|
-
columnWidths:
|
|
772
|
-
useTabs:
|
|
773
|
-
replaceNewlines:
|
|
774
|
-
hasPadding:
|
|
775
|
-
},
|
|
776
|
+
columnWidths: m,
|
|
777
|
+
useTabs: g,
|
|
778
|
+
replaceNewlines: c,
|
|
779
|
+
hasPadding: d
|
|
780
|
+
}, R = new wr(p), y = R.formatRow(a.inputDataHeader), E = R.formatAlignmentRow(), C = a.inputDataBody.map(($) => R.formatRow($)).join(`
|
|
776
781
|
`);
|
|
777
|
-
return `${
|
|
778
|
-
${
|
|
779
|
-
${
|
|
782
|
+
return `${y}
|
|
783
|
+
${E}
|
|
784
|
+
${C}`.trimEnd();
|
|
780
785
|
}
|
|
781
|
-
function
|
|
786
|
+
function $r(a) {
|
|
782
787
|
let t = "", i = a;
|
|
783
788
|
for (; i >= 0; )
|
|
784
789
|
t = String.fromCharCode(i % 26 + 65) + t, i = Math.floor(i / 26) - 1;
|
|
785
790
|
return t;
|
|
786
791
|
}
|
|
787
|
-
function
|
|
788
|
-
return Array.from({ length: a }, (t, i) =>
|
|
792
|
+
function Sr(a) {
|
|
793
|
+
return Array.from({ length: a }, (t, i) => $r(i));
|
|
789
794
|
}
|
|
790
|
-
class
|
|
795
|
+
class z extends Error {
|
|
791
796
|
constructor(t, i) {
|
|
792
|
-
super(t, i), this.name = "MarkdownTableError", Object.setPrototypeOf(this,
|
|
797
|
+
super(t, i), this.name = "MarkdownTableError", Object.setPrototypeOf(this, z.prototype);
|
|
793
798
|
}
|
|
794
799
|
}
|
|
795
|
-
function
|
|
800
|
+
function kr(a) {
|
|
796
801
|
if (a === null || !Array.isArray(a))
|
|
797
|
-
throw new
|
|
802
|
+
throw new z("The 'data' prop must be a two-dimensional array.");
|
|
798
803
|
if (a.length === 0)
|
|
799
|
-
throw new
|
|
804
|
+
throw new z("The 'data' array must contain at least one row.");
|
|
800
805
|
}
|
|
801
|
-
function
|
|
806
|
+
function jr(a) {
|
|
802
807
|
return a === "light" ? {
|
|
803
808
|
textColor: "#000",
|
|
804
809
|
textShadow: "0 1px #fff",
|
|
@@ -812,120 +817,163 @@ function $r(a) {
|
|
|
812
817
|
borderRadius: ".3em"
|
|
813
818
|
};
|
|
814
819
|
}
|
|
815
|
-
function
|
|
816
|
-
const
|
|
820
|
+
function Or(a, t) {
|
|
821
|
+
const i = jr(a), g = `
|
|
822
|
+
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
|
|
823
|
+
font-size: 1em;
|
|
824
|
+
text-align: left;
|
|
825
|
+
white-space: pre;
|
|
826
|
+
word-spacing: normal;
|
|
827
|
+
word-break: normal;
|
|
828
|
+
word-wrap: normal;
|
|
829
|
+
line-height: 1.5;
|
|
830
|
+
-moz-tab-size: 4;
|
|
831
|
+
-o-tab-size: 4;
|
|
832
|
+
tab-size: 4;
|
|
833
|
+
-webkit-hyphens: none;
|
|
834
|
+
-moz-hyphens: none;
|
|
835
|
+
-ms-hyphens: none;
|
|
836
|
+
hyphens: none;
|
|
837
|
+
`.replace(/\s{2,}/g, "");
|
|
817
838
|
return `
|
|
818
|
-
|
|
819
|
-
|
|
839
|
+
#${t} code[class*=language-], #${t} pre[class*=language-] {
|
|
840
|
+
color: ${i.textColor};
|
|
841
|
+
background: 0 0;
|
|
842
|
+
text-shadow: ${i.textShadow};
|
|
843
|
+
${g}
|
|
844
|
+
}
|
|
845
|
+
#${t} code[class*=language-] ::-moz-selection,
|
|
846
|
+
#${t} code[class*=language-]::-moz-selection,
|
|
847
|
+
#${t} pre[class*=language-] ::-moz-selection,
|
|
848
|
+
#${t} pre[class*=language-]::-moz-selection {
|
|
849
|
+
text-shadow: none;
|
|
850
|
+
background: ${i.selectionBackground};
|
|
851
|
+
}
|
|
852
|
+
#${t} code[class*=language-] ::selection,
|
|
853
|
+
#${t} code[class*=language-]::selection,
|
|
854
|
+
#${t} pre[class*=language-] ::selection,
|
|
855
|
+
#${t} pre[class*=language-]::selection {
|
|
856
|
+
text-shadow: none;
|
|
857
|
+
background: ${i.selectionBackground};
|
|
858
|
+
}
|
|
859
|
+
@media print {
|
|
860
|
+
#${t} code[class*=language-], #${t} pre[class*=language-] {
|
|
861
|
+
text-shadow: none;
|
|
862
|
+
}
|
|
863
|
+
}
|
|
864
|
+
#${t} pre[class*=language-] {
|
|
865
|
+
padding: 1em;
|
|
866
|
+
margin: .5em 0;
|
|
867
|
+
overflow: visible${i.borderRadius ? `;
|
|
868
|
+
border-radius: ${i.borderRadius}` : ""};
|
|
820
869
|
}
|
|
821
|
-
|
|
822
|
-
|
|
870
|
+
#${t} :not(pre) > code[class*=language-],
|
|
871
|
+
#${t} pre[class*=language-] {
|
|
872
|
+
background: ${i.background};
|
|
823
873
|
}
|
|
824
|
-
|
|
874
|
+
#${t} :not(pre) > code[class*=language-] {
|
|
875
|
+
padding: .1em;
|
|
876
|
+
border-radius: .3em;
|
|
877
|
+
white-space: normal;
|
|
878
|
+
}
|
|
879
|
+
#${t} pre[class*=language-].line-numbers {
|
|
880
|
+
position: relative;
|
|
881
|
+
padding-left: 3.8em;
|
|
882
|
+
}
|
|
883
|
+
#${t} pre[class*=language-].line-numbers > code {
|
|
884
|
+
position: relative;
|
|
885
|
+
white-space: inherit;
|
|
886
|
+
}
|
|
887
|
+
#${t} .line-numbers .line-numbers-rows {
|
|
888
|
+
position: absolute;
|
|
889
|
+
pointer-events: none;
|
|
890
|
+
top: 0;
|
|
891
|
+
font-size: 100%;
|
|
892
|
+
left: -3.8em;
|
|
893
|
+
width: 3em;
|
|
894
|
+
letter-spacing: -1px;
|
|
895
|
+
border-right: 1px solid #999;
|
|
896
|
+
-webkit-user-select: none;
|
|
897
|
+
-moz-user-select: none;
|
|
898
|
+
-ms-user-select: none;
|
|
899
|
+
user-select: none;
|
|
900
|
+
}
|
|
901
|
+
#${t} .line-numbers-rows > span {
|
|
902
|
+
display: block;
|
|
903
|
+
}
|
|
904
|
+
`.trim();
|
|
905
|
+
}
|
|
906
|
+
function Pr(a, t) {
|
|
907
|
+
return t ? { inputDataHeader: a[0], inputDataBody: a.slice(1) } : { inputDataHeader: Sr(a[0].length), inputDataBody: a };
|
|
908
|
+
}
|
|
909
|
+
function Ar(a, t, i, g, c, d, h) {
|
|
825
910
|
try {
|
|
826
|
-
|
|
827
|
-
const { inputDataHeader:
|
|
828
|
-
return
|
|
829
|
-
{ inputDataHeader:
|
|
911
|
+
kr(a);
|
|
912
|
+
const { inputDataHeader: m, inputDataBody: p } = Pr(a, t);
|
|
913
|
+
return Tr(
|
|
914
|
+
{ inputDataHeader: m, inputDataBody: p },
|
|
830
915
|
i,
|
|
831
|
-
d,
|
|
832
|
-
u,
|
|
833
916
|
g,
|
|
917
|
+
c,
|
|
918
|
+
d,
|
|
834
919
|
h
|
|
835
920
|
);
|
|
836
|
-
} catch (
|
|
837
|
-
if (
|
|
838
|
-
return `Error: ${
|
|
839
|
-
throw
|
|
921
|
+
} catch (m) {
|
|
922
|
+
if (m instanceof z)
|
|
923
|
+
return `Error: ${m.message}`;
|
|
924
|
+
throw m;
|
|
840
925
|
}
|
|
841
926
|
}
|
|
842
|
-
function
|
|
927
|
+
function Dr({
|
|
843
928
|
inputData: a = null,
|
|
844
929
|
hasHeader: t = !0,
|
|
845
930
|
columnAlignments: i = [],
|
|
846
|
-
isCompact:
|
|
847
|
-
hasTabs:
|
|
848
|
-
hasPadding:
|
|
931
|
+
isCompact: g = !1,
|
|
932
|
+
hasTabs: c = !1,
|
|
933
|
+
hasPadding: d = !0,
|
|
849
934
|
convertLineBreaks: h = !1,
|
|
850
|
-
className:
|
|
851
|
-
onGenerate:
|
|
852
|
-
theme:
|
|
853
|
-
preStyle:
|
|
854
|
-
topPadding:
|
|
855
|
-
minWidth:
|
|
856
|
-
showLineNumbers:
|
|
935
|
+
className: m,
|
|
936
|
+
onGenerate: p,
|
|
937
|
+
theme: R = "light",
|
|
938
|
+
preStyle: y,
|
|
939
|
+
topPadding: E = 16,
|
|
940
|
+
minWidth: C,
|
|
941
|
+
showLineNumbers: $ = !0
|
|
857
942
|
}) {
|
|
858
|
-
const
|
|
859
|
-
|
|
860
|
-
t,
|
|
861
|
-
i,
|
|
862
|
-
!d,
|
|
863
|
-
u,
|
|
864
|
-
h,
|
|
865
|
-
g
|
|
866
|
-
), [
|
|
867
|
-
z,
|
|
943
|
+
const S = gr().replace(/:/g, "_"), J = mr(a), W = Ar(
|
|
944
|
+
J,
|
|
868
945
|
t,
|
|
869
946
|
i,
|
|
870
|
-
|
|
871
|
-
|
|
947
|
+
!g,
|
|
948
|
+
c,
|
|
872
949
|
h,
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
return
|
|
876
|
-
|
|
877
|
-
}, [
|
|
878
|
-
/* @__PURE__ */
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
/* Add top spacing for the table content */
|
|
882
|
-
#${k} pre > code {
|
|
883
|
-
display: block;
|
|
884
|
-
padding-top: ${R}px !important;
|
|
885
|
-
padding-left: 3em !important;
|
|
886
|
-
}
|
|
887
|
-
/* Hide line numbers when disabled */
|
|
888
|
-
#${k} pre:not(.line-numbers) .line-numbers-rows {
|
|
889
|
-
display: none !important;
|
|
890
|
-
}
|
|
891
|
-
#${k} pre:not(.line-numbers) > code {
|
|
892
|
-
padding-left: 0.3em !important;
|
|
893
|
-
}
|
|
894
|
-
/* Ensure line numbers are visible */
|
|
895
|
-
#${k} .line-numbers .line-numbers-rows {
|
|
896
|
-
display: block !important;
|
|
897
|
-
}
|
|
898
|
-
`
|
|
899
|
-
] }),
|
|
900
|
-
/* @__PURE__ */ L.jsx(
|
|
901
|
-
"div",
|
|
950
|
+
d
|
|
951
|
+
);
|
|
952
|
+
return pr(() => {
|
|
953
|
+
p && p(W);
|
|
954
|
+
}, [W, p]), /* @__PURE__ */ P.jsxs("div", { id: S, children: [
|
|
955
|
+
/* @__PURE__ */ P.jsx("style", { children: Or(R, S) }),
|
|
956
|
+
/* @__PURE__ */ P.jsx(
|
|
957
|
+
yr,
|
|
902
958
|
{
|
|
903
|
-
|
|
959
|
+
showLineNumbers: $,
|
|
960
|
+
className: `${R === "dark" ? "dark-theme" : ""} ${m || ""}`.trim(),
|
|
961
|
+
topPadding: E,
|
|
904
962
|
style: {
|
|
905
963
|
position: "relative",
|
|
906
964
|
isolation: "isolate",
|
|
907
|
-
display: "inline-block"
|
|
965
|
+
display: "inline-block",
|
|
966
|
+
width: "fit-content",
|
|
967
|
+
minWidth: C ? `${C}px` : "min-content",
|
|
968
|
+
margin: 0,
|
|
969
|
+
...y
|
|
908
970
|
},
|
|
909
|
-
children:
|
|
910
|
-
Rr,
|
|
911
|
-
{
|
|
912
|
-
showLineNumbers: S,
|
|
913
|
-
className: `${E === "dark" ? "dark-theme" : ""} ${p || ""}`.trim(),
|
|
914
|
-
topPadding: R,
|
|
915
|
-
style: {
|
|
916
|
-
width: "fit-content",
|
|
917
|
-
minWidth: x ? `${x}px` : "min-content",
|
|
918
|
-
margin: 0,
|
|
919
|
-
...b
|
|
920
|
-
},
|
|
921
|
-
children: I
|
|
922
|
-
}
|
|
923
|
-
)
|
|
971
|
+
children: W
|
|
924
972
|
}
|
|
925
973
|
)
|
|
926
974
|
] });
|
|
927
975
|
}
|
|
928
976
|
export {
|
|
929
|
-
|
|
930
|
-
|
|
977
|
+
Dr as MarkdownTable,
|
|
978
|
+
z as MarkdownTableError
|
|
931
979
|
};
|