react-markdown-table-ts 1.4.0 → 1.4.2
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/index.cjs +16 -15
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +468 -460
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import Ge, { useRef as
|
1
|
+
import Ge, { useRef as wn, useId as En, useDeferredValue as xn, useTransition as kn, useMemo as An, useEffect as Ne } from "react";
|
2
2
|
var We = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
3
|
-
function
|
4
|
-
return
|
3
|
+
function _n(u) {
|
4
|
+
return u && u.__esModule && Object.prototype.hasOwnProperty.call(u, "default") ? u.default : u;
|
5
5
|
}
|
6
6
|
var ye = { exports: {} }, de = {};
|
7
7
|
/**
|
@@ -14,18 +14,18 @@ var ye = { exports: {} }, de = {};
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
15
15
|
*/
|
16
16
|
var He;
|
17
|
-
function
|
17
|
+
function Sn() {
|
18
18
|
if (He) return de;
|
19
19
|
He = 1;
|
20
|
-
var
|
20
|
+
var u = Ge, g = Symbol.for("react.element"), t = Symbol.for("react.fragment"), m = Object.prototype.hasOwnProperty, v = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, E = { key: !0, ref: !0, __self: !0, __source: !0 };
|
21
21
|
function h(a, c, x) {
|
22
|
-
var p, f = {},
|
23
|
-
x !== void 0 && (
|
24
|
-
for (p in c) m.call(c, p) && !
|
22
|
+
var p, f = {}, k = null, R = null;
|
23
|
+
x !== void 0 && (k = "" + x), c.key !== void 0 && (k = "" + c.key), c.ref !== void 0 && (R = c.ref);
|
24
|
+
for (p in c) m.call(c, p) && !E.hasOwnProperty(p) && (f[p] = c[p]);
|
25
25
|
if (a && a.defaultProps) for (p in c = a.defaultProps, c) f[p] === void 0 && (f[p] = c[p]);
|
26
|
-
return { $$typeof: g, type: a, key:
|
26
|
+
return { $$typeof: g, type: a, key: k, ref: R, props: f, _owner: v.current };
|
27
27
|
}
|
28
|
-
return de.Fragment =
|
28
|
+
return de.Fragment = t, de.jsx = h, de.jsxs = h, de;
|
29
29
|
}
|
30
30
|
var fe = {};
|
31
31
|
/**
|
@@ -38,24 +38,24 @@ var fe = {};
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
39
39
|
*/
|
40
40
|
var qe;
|
41
|
-
function
|
41
|
+
function Fn() {
|
42
42
|
return qe || (qe = 1, process.env.NODE_ENV !== "production" && (function() {
|
43
|
-
var
|
43
|
+
var u = Ge, g = Symbol.for("react.element"), t = Symbol.for("react.portal"), m = Symbol.for("react.fragment"), v = Symbol.for("react.strict_mode"), E = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), x = Symbol.for("react.suspense"), p = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), k = Symbol.for("react.lazy"), R = Symbol.for("react.offscreen"), P = Symbol.iterator, S = "@@iterator";
|
44
44
|
function _(e) {
|
45
45
|
if (e === null || typeof e != "object")
|
46
46
|
return null;
|
47
47
|
var i = P && e[P] || e[S];
|
48
48
|
return typeof i == "function" ? i : null;
|
49
49
|
}
|
50
|
-
var A =
|
51
|
-
function
|
50
|
+
var A = u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
51
|
+
function n(e) {
|
52
52
|
{
|
53
53
|
for (var i = arguments.length, d = new Array(i > 1 ? i - 1 : 0), w = 1; w < i; w++)
|
54
54
|
d[w - 1] = arguments[w];
|
55
|
-
|
55
|
+
r("error", e, d);
|
56
56
|
}
|
57
57
|
}
|
58
|
-
function
|
58
|
+
function r(e, i, d) {
|
59
59
|
{
|
60
60
|
var w = A.ReactDebugCurrentFrame, $ = w.getStackAddendum();
|
61
61
|
$ !== "" && (i += "%s", d = d.concat([$]));
|
@@ -65,14 +65,14 @@ function St() {
|
|
65
65
|
O.unshift("Warning: " + i), Function.prototype.apply.call(console[e], console, O);
|
66
66
|
}
|
67
67
|
}
|
68
|
-
var o = !1, s = !1,
|
69
|
-
|
68
|
+
var o = !1, s = !1, l = !1, b = !1, C = !1, y;
|
69
|
+
y = Symbol.for("react.module.reference");
|
70
70
|
function j(e) {
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e === m || e ===
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === m || e === E || C || e === v || e === x || e === p || b || e === R || o || s || l || typeof e == "object" && e !== null && (e.$$typeof === k || e.$$typeof === f || e.$$typeof === h || e.$$typeof === a || e.$$typeof === c || // This needs to include all possible module reference object
|
72
72
|
// types supported by any Flight configuration anywhere since
|
73
73
|
// we don't know which Flight build this will end up being used
|
74
74
|
// with.
|
75
|
-
e.$$typeof ===
|
75
|
+
e.$$typeof === y || e.getModuleId !== void 0));
|
76
76
|
}
|
77
77
|
function z(e, i, d) {
|
78
78
|
var w = e.displayName;
|
@@ -87,16 +87,16 @@ function St() {
|
|
87
87
|
function Y(e) {
|
88
88
|
if (e == null)
|
89
89
|
return null;
|
90
|
-
if (typeof e.tag == "number" &&
|
90
|
+
if (typeof e.tag == "number" && n("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
91
91
|
return e.displayName || e.name || null;
|
92
92
|
if (typeof e == "string")
|
93
93
|
return e;
|
94
94
|
switch (e) {
|
95
95
|
case m:
|
96
96
|
return "Fragment";
|
97
|
-
case
|
97
|
+
case t:
|
98
98
|
return "Portal";
|
99
|
-
case
|
99
|
+
case E:
|
100
100
|
return "Profiler";
|
101
101
|
case v:
|
102
102
|
return "StrictMode";
|
@@ -118,7 +118,7 @@ function St() {
|
|
118
118
|
case f:
|
119
119
|
var w = e.displayName || null;
|
120
120
|
return w !== null ? w : Y(e.type) || "Memo";
|
121
|
-
case
|
121
|
+
case k: {
|
122
122
|
var $ = e, O = $._payload, T = $._init;
|
123
123
|
try {
|
124
124
|
return Y(T(O));
|
@@ -156,7 +156,7 @@ function St() {
|
|
156
156
|
Q++;
|
157
157
|
}
|
158
158
|
}
|
159
|
-
function
|
159
|
+
function ne() {
|
160
160
|
{
|
161
161
|
if (Q--, Q === 0) {
|
162
162
|
var e = {
|
@@ -188,7 +188,7 @@ function St() {
|
|
188
188
|
})
|
189
189
|
});
|
190
190
|
}
|
191
|
-
Q < 0 &&
|
191
|
+
Q < 0 && n("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
192
192
|
}
|
193
193
|
}
|
194
194
|
var J = A.ReactCurrentDispatcher, K;
|
@@ -205,13 +205,13 @@ function St() {
|
|
205
205
|
` + K + e;
|
206
206
|
}
|
207
207
|
}
|
208
|
-
var
|
208
|
+
var te = !1, X;
|
209
209
|
{
|
210
210
|
var ae = typeof WeakMap == "function" ? WeakMap : Map;
|
211
211
|
X = new ae();
|
212
212
|
}
|
213
213
|
function me(e, i) {
|
214
|
-
if (!e ||
|
214
|
+
if (!e || te)
|
215
215
|
return "";
|
216
216
|
{
|
217
217
|
var d = X.get(e);
|
@@ -219,7 +219,7 @@ function St() {
|
|
219
219
|
return d;
|
220
220
|
}
|
221
221
|
var w;
|
222
|
-
|
222
|
+
te = !0;
|
223
223
|
var $ = Error.prepareStackTrace;
|
224
224
|
Error.prepareStackTrace = void 0;
|
225
225
|
var O;
|
@@ -276,10 +276,10 @@ function St() {
|
|
276
276
|
}
|
277
277
|
}
|
278
278
|
} finally {
|
279
|
-
|
279
|
+
te = !1, J.current = O, ne(), Error.prepareStackTrace = $;
|
280
280
|
}
|
281
|
-
var oe = e ? e.displayName || e.name : "",
|
282
|
-
return typeof e == "function" && X.set(e,
|
281
|
+
var oe = e ? e.displayName || e.name : "", re = oe ? Z(oe) : "";
|
282
|
+
return typeof e == "function" && X.set(e, re), re;
|
283
283
|
}
|
284
284
|
function ue(e, i, d) {
|
285
285
|
return me(e, !1);
|
@@ -307,7 +307,7 @@ function St() {
|
|
307
307
|
return ue(e.render);
|
308
308
|
case f:
|
309
309
|
return ve(e.type, i, d);
|
310
|
-
case
|
310
|
+
case k: {
|
311
311
|
var w = e, $ = w._payload, O = w._init;
|
312
312
|
try {
|
313
313
|
return ve(O($), i, d);
|
@@ -340,7 +340,7 @@ function St() {
|
|
340
340
|
} catch (I) {
|
341
341
|
F = I;
|
342
342
|
}
|
343
|
-
F && !(F instanceof Error) && (be($),
|
343
|
+
F && !(F instanceof Error) && (be($), n("%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).", w || "React class", d, T, typeof F), be(null)), F instanceof Error && !(F.message in Se) && (Se[F.message] = !0, be($), n("Failed %s type: %s", d, F.message), be(null));
|
344
344
|
}
|
345
345
|
}
|
346
346
|
}
|
@@ -354,7 +354,7 @@ function St() {
|
|
354
354
|
return d;
|
355
355
|
}
|
356
356
|
}
|
357
|
-
function
|
357
|
+
function en(e) {
|
358
358
|
try {
|
359
359
|
return Re(e), !1;
|
360
360
|
} catch {
|
@@ -365,16 +365,16 @@ function St() {
|
|
365
365
|
return "" + e;
|
366
366
|
}
|
367
367
|
function Ce(e) {
|
368
|
-
if (
|
369
|
-
return
|
368
|
+
if (en(e))
|
369
|
+
return n("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(e)), Re(e);
|
370
370
|
}
|
371
|
-
var Te = A.ReactCurrentOwner,
|
371
|
+
var Te = A.ReactCurrentOwner, nn = {
|
372
372
|
key: !0,
|
373
373
|
ref: !0,
|
374
374
|
__self: !0,
|
375
375
|
__source: !0
|
376
376
|
}, $e, Oe;
|
377
|
-
function
|
377
|
+
function rn(e) {
|
378
378
|
if (ce.call(e, "ref")) {
|
379
379
|
var i = Object.getOwnPropertyDescriptor(e, "ref").get;
|
380
380
|
if (i && i.isReactWarning)
|
@@ -382,7 +382,7 @@ function St() {
|
|
382
382
|
}
|
383
383
|
return e.ref !== void 0;
|
384
384
|
}
|
385
|
-
function
|
385
|
+
function tn(e) {
|
386
386
|
if (ce.call(e, "key")) {
|
387
387
|
var i = Object.getOwnPropertyDescriptor(e, "key").get;
|
388
388
|
if (i && i.isReactWarning)
|
@@ -390,13 +390,13 @@ function St() {
|
|
390
390
|
}
|
391
391
|
return e.key !== void 0;
|
392
392
|
}
|
393
|
-
function
|
393
|
+
function an(e, i) {
|
394
394
|
typeof e.ref == "string" && Te.current;
|
395
395
|
}
|
396
|
-
function
|
396
|
+
function on(e, i) {
|
397
397
|
{
|
398
398
|
var d = function() {
|
399
|
-
$e || ($e = !0,
|
399
|
+
$e || ($e = !0, n("%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)", i));
|
400
400
|
};
|
401
401
|
d.isReactWarning = !0, Object.defineProperty(e, "key", {
|
402
402
|
get: d,
|
@@ -404,10 +404,10 @@ function St() {
|
|
404
404
|
});
|
405
405
|
}
|
406
406
|
}
|
407
|
-
function
|
407
|
+
function sn(e, i) {
|
408
408
|
{
|
409
409
|
var d = function() {
|
410
|
-
Oe || (Oe = !0,
|
410
|
+
Oe || (Oe = !0, n("%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)", i));
|
411
411
|
};
|
412
412
|
d.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
413
413
|
get: d,
|
@@ -415,7 +415,7 @@ function St() {
|
|
415
415
|
});
|
416
416
|
}
|
417
417
|
}
|
418
|
-
var
|
418
|
+
var ln = function(e, i, d, w, $, O, T) {
|
419
419
|
var F = {
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
421
421
|
$$typeof: g,
|
@@ -444,12 +444,12 @@ function St() {
|
|
444
444
|
value: $
|
445
445
|
}), Object.freeze && (Object.freeze(F.props), Object.freeze(F)), F;
|
446
446
|
};
|
447
|
-
function
|
447
|
+
function un(e, i, d, w, $) {
|
448
448
|
{
|
449
449
|
var O, T = {}, F = null, L = null;
|
450
|
-
d !== void 0 && (Ce(d), F = "" + d),
|
450
|
+
d !== void 0 && (Ce(d), F = "" + d), tn(i) && (Ce(i.key), F = "" + i.key), rn(i) && (L = i.ref, an(i, $));
|
451
451
|
for (O in i)
|
452
|
-
ce.call(i, O) && !
|
452
|
+
ce.call(i, O) && !nn.hasOwnProperty(O) && (T[O] = i[O]);
|
453
453
|
if (e && e.defaultProps) {
|
454
454
|
var I = e.defaultProps;
|
455
455
|
for (O in I)
|
@@ -457,12 +457,12 @@ function St() {
|
|
457
457
|
}
|
458
458
|
if (F || L) {
|
459
459
|
var D = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
460
|
-
F &&
|
460
|
+
F && on(T, D), L && sn(T, D);
|
461
461
|
}
|
462
|
-
return
|
462
|
+
return ln(e, F, L, $, w, Te.current, T);
|
463
463
|
}
|
464
464
|
}
|
465
|
-
var
|
465
|
+
var Ee = A.ReactCurrentOwner, je = A.ReactDebugCurrentFrame;
|
466
466
|
function ie(e) {
|
467
467
|
if (e) {
|
468
468
|
var i = e._owner, d = ve(e.type, e._source, i ? i.type : null);
|
@@ -472,13 +472,13 @@ function St() {
|
|
472
472
|
}
|
473
473
|
var xe;
|
474
474
|
xe = !1;
|
475
|
-
function
|
475
|
+
function ke(e) {
|
476
476
|
return typeof e == "object" && e !== null && e.$$typeof === g;
|
477
477
|
}
|
478
478
|
function Pe() {
|
479
479
|
{
|
480
|
-
if (
|
481
|
-
var e = Y(
|
480
|
+
if (Ee.current) {
|
481
|
+
var e = Y(Ee.current.type);
|
482
482
|
if (e)
|
483
483
|
return `
|
484
484
|
|
@@ -487,11 +487,11 @@ Check the render method of \`` + e + "`.";
|
|
487
487
|
return "";
|
488
488
|
}
|
489
489
|
}
|
490
|
-
function
|
490
|
+
function cn(e) {
|
491
491
|
return "";
|
492
492
|
}
|
493
493
|
var Ie = {};
|
494
|
-
function
|
494
|
+
function dn(e) {
|
495
495
|
{
|
496
496
|
var i = Pe();
|
497
497
|
if (!i) {
|
@@ -508,12 +508,12 @@ Check the top-level render call using <` + d + ">.");
|
|
508
508
|
if (!e._store || e._store.validated || e.key != null)
|
509
509
|
return;
|
510
510
|
e._store.validated = !0;
|
511
|
-
var d =
|
511
|
+
var d = dn(i);
|
512
512
|
if (Ie[d])
|
513
513
|
return;
|
514
514
|
Ie[d] = !0;
|
515
515
|
var w = "";
|
516
|
-
e && e._owner && e._owner !==
|
516
|
+
e && e._owner && e._owner !== Ee.current && (w = " It was passed a child from " + Y(e._owner.type) + "."), ie(e), n('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', d, w), ie(null);
|
517
517
|
}
|
518
518
|
}
|
519
519
|
function Me(e, i) {
|
@@ -523,19 +523,19 @@ Check the top-level render call using <` + d + ">.");
|
|
523
523
|
if (we(e))
|
524
524
|
for (var d = 0; d < e.length; d++) {
|
525
525
|
var w = e[d];
|
526
|
-
|
526
|
+
ke(w) && De(w, i);
|
527
527
|
}
|
528
|
-
else if (
|
528
|
+
else if (ke(e))
|
529
529
|
e._store && (e._store.validated = !0);
|
530
530
|
else if (e) {
|
531
531
|
var $ = _(e);
|
532
532
|
if (typeof $ == "function" && $ !== e.entries)
|
533
533
|
for (var O = $.call(e), T; !(T = O.next()).done; )
|
534
|
-
|
534
|
+
ke(T.value) && De(T.value, i);
|
535
535
|
}
|
536
536
|
}
|
537
537
|
}
|
538
|
-
function
|
538
|
+
function fn(e) {
|
539
539
|
{
|
540
540
|
var i = e.type;
|
541
541
|
if (i == null || typeof i == "string")
|
@@ -555,21 +555,21 @@ Check the top-level render call using <` + d + ">.");
|
|
555
555
|
} else if (i.PropTypes !== void 0 && !xe) {
|
556
556
|
xe = !0;
|
557
557
|
var $ = Y(i);
|
558
|
-
|
558
|
+
n("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", $ || "Unknown");
|
559
559
|
}
|
560
|
-
typeof i.getDefaultProps == "function" && !i.getDefaultProps.isReactClassApproved &&
|
560
|
+
typeof i.getDefaultProps == "function" && !i.getDefaultProps.isReactClassApproved && n("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
561
561
|
}
|
562
562
|
}
|
563
|
-
function
|
563
|
+
function gn(e) {
|
564
564
|
{
|
565
565
|
for (var i = Object.keys(e.props), d = 0; d < i.length; d++) {
|
566
566
|
var w = i[d];
|
567
567
|
if (w !== "children" && w !== "key") {
|
568
|
-
ie(e),
|
568
|
+
ie(e), n("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), ie(null);
|
569
569
|
break;
|
570
570
|
}
|
571
571
|
}
|
572
|
-
e.ref !== null && (ie(e),
|
572
|
+
e.ref !== null && (ie(e), n("Invalid attribute `ref` supplied to `React.Fragment`."), ie(null));
|
573
573
|
}
|
574
574
|
}
|
575
575
|
var ze = {};
|
@@ -579,12 +579,12 @@ Check the top-level render call using <` + d + ">.");
|
|
579
579
|
if (!T) {
|
580
580
|
var F = "";
|
581
581
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (F += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
582
|
-
var L =
|
582
|
+
var L = cn();
|
583
583
|
L ? F += L : F += Pe();
|
584
584
|
var I;
|
585
|
-
e === null ? I = "null" : we(e) ? I = "array" : e !== void 0 && e.$$typeof === g ? (I = "<" + (Y(e.type) || "Unknown") + " />", F = " Did you accidentally export a JSX literal instead of a component?") : I = typeof e,
|
585
|
+
e === null ? I = "null" : we(e) ? I = "array" : e !== void 0 && e.$$typeof === g ? (I = "<" + (Y(e.type) || "Unknown") + " />", F = " Did you accidentally export a JSX literal instead of a component?") : I = typeof e, n("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", I, F);
|
586
586
|
}
|
587
|
-
var D =
|
587
|
+
var D = un(e, i, d, $, O);
|
588
588
|
if (D == null)
|
589
589
|
return D;
|
590
590
|
if (T) {
|
@@ -596,44 +596,44 @@ Check the top-level render call using <` + d + ">.");
|
|
596
596
|
Me(q[oe], e);
|
597
597
|
Object.freeze && Object.freeze(q);
|
598
598
|
} else
|
599
|
-
|
599
|
+
n("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
600
600
|
else
|
601
601
|
Me(q, e);
|
602
602
|
}
|
603
603
|
if (ce.call(i, "key")) {
|
604
|
-
var
|
605
|
-
return
|
604
|
+
var re = Y(e), W = Object.keys(i).filter(function(yn) {
|
605
|
+
return yn !== "key";
|
606
606
|
}), Ae = W.length > 0 ? "{key: someKey, " + W.join(": ..., ") + ": ...}" : "{key: someKey}";
|
607
|
-
if (!ze[
|
608
|
-
var
|
609
|
-
|
607
|
+
if (!ze[re + Ae]) {
|
608
|
+
var bn = W.length > 0 ? "{" + W.join(": ..., ") + ": ...}" : "{}";
|
609
|
+
n(`A props object containing a "key" prop is being spread into JSX:
|
610
610
|
let props = %s;
|
611
611
|
<%s {...props} />
|
612
612
|
React keys must be passed directly to JSX without using spread:
|
613
613
|
let props = %s;
|
614
|
-
<%s key={someKey} {...props} />`, Ae,
|
614
|
+
<%s key={someKey} {...props} />`, Ae, re, bn, re), ze[re + Ae] = !0;
|
615
615
|
}
|
616
616
|
}
|
617
|
-
return e === m ?
|
617
|
+
return e === m ? gn(D) : fn(D), D;
|
618
618
|
}
|
619
619
|
}
|
620
|
-
function
|
620
|
+
function pn(e, i, d) {
|
621
621
|
return Le(e, i, d, !0);
|
622
622
|
}
|
623
|
-
function
|
623
|
+
function hn(e, i, d) {
|
624
624
|
return Le(e, i, d, !1);
|
625
625
|
}
|
626
|
-
var
|
627
|
-
fe.Fragment = m, fe.jsx =
|
626
|
+
var mn = hn, vn = pn;
|
627
|
+
fe.Fragment = m, fe.jsx = mn, fe.jsxs = vn;
|
628
628
|
})()), fe;
|
629
629
|
}
|
630
630
|
var Ue;
|
631
|
-
function
|
632
|
-
return Ue || (Ue = 1, process.env.NODE_ENV === "production" ? ye.exports =
|
631
|
+
function Rn() {
|
632
|
+
return Ue || (Ue = 1, process.env.NODE_ENV === "production" ? ye.exports = Sn() : ye.exports = Fn()), ye.exports;
|
633
633
|
}
|
634
|
-
var se =
|
635
|
-
function
|
636
|
-
return Ye || (Ye = 1, (function(
|
634
|
+
var se = Rn(), _e = { exports: {} }, Ye;
|
635
|
+
function Cn() {
|
636
|
+
return Ye || (Ye = 1, (function(u) {
|
637
637
|
var g = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
|
638
638
|
/**
|
639
639
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
@@ -643,8 +643,8 @@ function Rt() {
|
|
643
643
|
* @namespace
|
644
644
|
* @public
|
645
645
|
*/
|
646
|
-
var
|
647
|
-
var v = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
|
646
|
+
var t = (function(m) {
|
647
|
+
var v = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, E = 0, h = {}, a = {
|
648
648
|
/**
|
649
649
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
650
650
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
@@ -699,8 +699,8 @@ function Rt() {
|
|
699
699
|
* @memberof Prism
|
700
700
|
*/
|
701
701
|
util: {
|
702
|
-
encode: function
|
703
|
-
return
|
702
|
+
encode: function n(r) {
|
703
|
+
return r instanceof c ? new c(r.type, n(r.content), r.alias) : Array.isArray(r) ? r.map(n) : r.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
704
704
|
},
|
705
705
|
/**
|
706
706
|
* Returns the name of the type of the given value.
|
@@ -718,8 +718,8 @@ function Rt() {
|
|
718
718
|
* type(String) === 'Function'
|
719
719
|
* type(/abc+/) === 'RegExp'
|
720
720
|
*/
|
721
|
-
type: function(
|
722
|
-
return Object.prototype.toString.call(
|
721
|
+
type: function(n) {
|
722
|
+
return Object.prototype.toString.call(n).slice(8, -1);
|
723
723
|
},
|
724
724
|
/**
|
725
725
|
* Returns a unique number for the given object. Later calls will still return the same number.
|
@@ -727,8 +727,8 @@ function Rt() {
|
|
727
727
|
* @param {Object} obj
|
728
728
|
* @returns {number}
|
729
729
|
*/
|
730
|
-
objId: function(
|
731
|
-
return
|
730
|
+
objId: function(n) {
|
731
|
+
return n.__id || Object.defineProperty(n, "__id", { value: ++E }), n.__id;
|
732
732
|
},
|
733
733
|
/**
|
734
734
|
* Creates a deep clone of the given object.
|
@@ -740,30 +740,30 @@ function Rt() {
|
|
740
740
|
* @returns {T}
|
741
741
|
* @template T
|
742
742
|
*/
|
743
|
-
clone: function
|
743
|
+
clone: function n(r, o) {
|
744
744
|
o = o || {};
|
745
|
-
var s,
|
746
|
-
switch (a.util.type(
|
745
|
+
var s, l;
|
746
|
+
switch (a.util.type(r)) {
|
747
747
|
case "Object":
|
748
|
-
if (
|
749
|
-
return o[
|
748
|
+
if (l = a.util.objId(r), o[l])
|
749
|
+
return o[l];
|
750
750
|
s = /** @type {Record<string, any>} */
|
751
|
-
{}, o[
|
752
|
-
for (var
|
753
|
-
|
751
|
+
{}, o[l] = s;
|
752
|
+
for (var b in r)
|
753
|
+
r.hasOwnProperty(b) && (s[b] = n(r[b], o));
|
754
754
|
return (
|
755
755
|
/** @type {any} */
|
756
756
|
s
|
757
757
|
);
|
758
758
|
case "Array":
|
759
|
-
return
|
759
|
+
return l = a.util.objId(r), o[l] ? o[l] : (s = [], o[l] = s, /** @type {Array} */
|
760
760
|
/** @type {any} */
|
761
|
-
|
762
|
-
s[
|
761
|
+
r.forEach(function(C, y) {
|
762
|
+
s[y] = n(C, o);
|
763
763
|
}), /** @type {any} */
|
764
764
|
s);
|
765
765
|
default:
|
766
|
-
return
|
766
|
+
return r;
|
767
767
|
}
|
768
768
|
},
|
769
769
|
/**
|
@@ -774,12 +774,12 @@ function Rt() {
|
|
774
774
|
* @param {Element} element
|
775
775
|
* @returns {string}
|
776
776
|
*/
|
777
|
-
getLanguage: function(
|
778
|
-
for (;
|
779
|
-
var
|
780
|
-
if (
|
781
|
-
return
|
782
|
-
|
777
|
+
getLanguage: function(n) {
|
778
|
+
for (; n; ) {
|
779
|
+
var r = v.exec(n.className);
|
780
|
+
if (r)
|
781
|
+
return r[1].toLowerCase();
|
782
|
+
n = n.parentElement;
|
783
783
|
}
|
784
784
|
return "none";
|
785
785
|
},
|
@@ -790,8 +790,8 @@ function Rt() {
|
|
790
790
|
* @param {string} language
|
791
791
|
* @returns {void}
|
792
792
|
*/
|
793
|
-
setLanguage: function(
|
794
|
-
|
793
|
+
setLanguage: function(n, r) {
|
794
|
+
n.className = n.className.replace(RegExp(v, "gi"), ""), n.classList.add("language-" + r);
|
795
795
|
},
|
796
796
|
/**
|
797
797
|
* Returns the script element that is currently executing.
|
@@ -811,12 +811,12 @@ function Rt() {
|
|
811
811
|
try {
|
812
812
|
throw new Error();
|
813
813
|
} catch (s) {
|
814
|
-
var
|
815
|
-
if (
|
816
|
-
var
|
817
|
-
for (var o in
|
818
|
-
if (
|
819
|
-
return
|
814
|
+
var n = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack) || [])[1];
|
815
|
+
if (n) {
|
816
|
+
var r = document.getElementsByTagName("script");
|
817
|
+
for (var o in r)
|
818
|
+
if (r[o].src == n)
|
819
|
+
return r[o];
|
820
820
|
}
|
821
821
|
return null;
|
822
822
|
}
|
@@ -840,14 +840,14 @@ function Rt() {
|
|
840
840
|
* @param {boolean} [defaultActivation=false]
|
841
841
|
* @returns {boolean}
|
842
842
|
*/
|
843
|
-
isActive: function(
|
844
|
-
for (var s = "no-" +
|
845
|
-
var
|
846
|
-
if (
|
843
|
+
isActive: function(n, r, o) {
|
844
|
+
for (var s = "no-" + r; n; ) {
|
845
|
+
var l = n.classList;
|
846
|
+
if (l.contains(r))
|
847
847
|
return !0;
|
848
|
-
if (
|
848
|
+
if (l.contains(s))
|
849
849
|
return !1;
|
850
|
-
|
850
|
+
n = n.parentElement;
|
851
851
|
}
|
852
852
|
return !!o;
|
853
853
|
}
|
@@ -895,10 +895,10 @@ function Rt() {
|
|
895
895
|
* 'color': /\b(?:red|green|blue)\b/
|
896
896
|
* });
|
897
897
|
*/
|
898
|
-
extend: function(
|
899
|
-
var o = a.util.clone(a.languages[
|
900
|
-
for (var s in
|
901
|
-
o[s] =
|
898
|
+
extend: function(n, r) {
|
899
|
+
var o = a.util.clone(a.languages[n]);
|
900
|
+
for (var s in r)
|
901
|
+
o[s] = r[s];
|
902
902
|
return o;
|
903
903
|
},
|
904
904
|
/**
|
@@ -976,31 +976,31 @@ function Rt() {
|
|
976
976
|
* @returns {Grammar} The new grammar object.
|
977
977
|
* @public
|
978
978
|
*/
|
979
|
-
insertBefore: function(
|
979
|
+
insertBefore: function(n, r, o, s) {
|
980
980
|
s = s || /** @type {any} */
|
981
981
|
a.languages;
|
982
|
-
var
|
983
|
-
for (var
|
984
|
-
if (
|
985
|
-
if (
|
986
|
-
for (var
|
987
|
-
o.hasOwnProperty(
|
988
|
-
o.hasOwnProperty(
|
982
|
+
var l = s[n], b = {};
|
983
|
+
for (var C in l)
|
984
|
+
if (l.hasOwnProperty(C)) {
|
985
|
+
if (C == r)
|
986
|
+
for (var y in o)
|
987
|
+
o.hasOwnProperty(y) && (b[y] = o[y]);
|
988
|
+
o.hasOwnProperty(C) || (b[C] = l[C]);
|
989
989
|
}
|
990
|
-
var j = s[
|
991
|
-
return s[
|
992
|
-
U === j && z !=
|
993
|
-
}),
|
990
|
+
var j = s[n];
|
991
|
+
return s[n] = b, a.languages.DFS(a.languages, function(z, U) {
|
992
|
+
U === j && z != n && (this[z] = b);
|
993
|
+
}), b;
|
994
994
|
},
|
995
995
|
// Traverse a language definition with Depth First Search
|
996
|
-
DFS: function
|
997
|
-
|
998
|
-
var
|
999
|
-
for (var
|
1000
|
-
if (
|
1001
|
-
o.call(
|
1002
|
-
var
|
1003
|
-
j === "Object" && !
|
996
|
+
DFS: function n(r, o, s, l) {
|
997
|
+
l = l || {};
|
998
|
+
var b = a.util.objId;
|
999
|
+
for (var C in r)
|
1000
|
+
if (r.hasOwnProperty(C)) {
|
1001
|
+
o.call(r, C, r[C], s || C);
|
1002
|
+
var y = r[C], j = a.util.type(y);
|
1003
|
+
j === "Object" && !l[b(y)] ? (l[b(y)] = !0, n(y, o, null, l)) : j === "Array" && !l[b(y)] && (l[b(y)] = !0, n(y, o, C, l));
|
1004
1004
|
}
|
1005
1005
|
}
|
1006
1006
|
},
|
@@ -1017,8 +1017,8 @@ function Rt() {
|
|
1017
1017
|
* @memberof Prism
|
1018
1018
|
* @public
|
1019
1019
|
*/
|
1020
|
-
highlightAll: function(
|
1021
|
-
a.highlightAllUnder(document,
|
1020
|
+
highlightAll: function(n, r) {
|
1021
|
+
a.highlightAllUnder(document, n, r);
|
1022
1022
|
},
|
1023
1023
|
/**
|
1024
1024
|
* Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
|
@@ -1035,15 +1035,15 @@ function Rt() {
|
|
1035
1035
|
* @memberof Prism
|
1036
1036
|
* @public
|
1037
1037
|
*/
|
1038
|
-
highlightAllUnder: function(
|
1038
|
+
highlightAllUnder: function(n, r, o) {
|
1039
1039
|
var s = {
|
1040
1040
|
callback: o,
|
1041
|
-
container:
|
1041
|
+
container: n,
|
1042
1042
|
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
1043
1043
|
};
|
1044
1044
|
a.hooks.run("before-highlightall", s), s.elements = Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)), a.hooks.run("before-all-elements-highlight", s);
|
1045
|
-
for (var
|
1046
|
-
a.highlightElement(
|
1045
|
+
for (var l = 0, b; b = s.elements[l++]; )
|
1046
|
+
a.highlightElement(b, r === !0, s.callback);
|
1047
1047
|
},
|
1048
1048
|
/**
|
1049
1049
|
* Highlights the code inside a single element.
|
@@ -1073,39 +1073,39 @@ function Rt() {
|
|
1073
1073
|
* @memberof Prism
|
1074
1074
|
* @public
|
1075
1075
|
*/
|
1076
|
-
highlightElement: function(
|
1077
|
-
var s = a.util.getLanguage(
|
1078
|
-
a.util.setLanguage(
|
1079
|
-
var
|
1080
|
-
|
1081
|
-
var
|
1082
|
-
element:
|
1076
|
+
highlightElement: function(n, r, o) {
|
1077
|
+
var s = a.util.getLanguage(n), l = a.languages[s];
|
1078
|
+
a.util.setLanguage(n, s);
|
1079
|
+
var b = n.parentElement;
|
1080
|
+
b && b.nodeName.toLowerCase() === "pre" && a.util.setLanguage(b, s);
|
1081
|
+
var C = n.textContent, y = {
|
1082
|
+
element: n,
|
1083
1083
|
language: s,
|
1084
|
-
grammar:
|
1085
|
-
code:
|
1084
|
+
grammar: l,
|
1085
|
+
code: C
|
1086
1086
|
};
|
1087
1087
|
function j(U) {
|
1088
|
-
|
1088
|
+
y.highlightedCode = U, a.hooks.run("before-insert", y), y.element.innerHTML = y.highlightedCode, a.hooks.run("after-highlight", y), a.hooks.run("complete", y), o && o.call(y.element);
|
1089
1089
|
}
|
1090
|
-
if (a.hooks.run("before-sanity-check",
|
1091
|
-
a.hooks.run("complete",
|
1090
|
+
if (a.hooks.run("before-sanity-check", y), b = y.element.parentElement, b && b.nodeName.toLowerCase() === "pre" && !b.hasAttribute("tabindex") && b.setAttribute("tabindex", "0"), !y.code) {
|
1091
|
+
a.hooks.run("complete", y), o && o.call(y.element);
|
1092
1092
|
return;
|
1093
1093
|
}
|
1094
|
-
if (a.hooks.run("before-highlight",
|
1095
|
-
j(a.util.encode(
|
1094
|
+
if (a.hooks.run("before-highlight", y), !y.grammar) {
|
1095
|
+
j(a.util.encode(y.code));
|
1096
1096
|
return;
|
1097
1097
|
}
|
1098
|
-
if (
|
1098
|
+
if (r && m.Worker) {
|
1099
1099
|
var z = new Worker(a.filename);
|
1100
1100
|
z.onmessage = function(U) {
|
1101
1101
|
j(U.data);
|
1102
1102
|
}, z.postMessage(JSON.stringify({
|
1103
|
-
language:
|
1104
|
-
code:
|
1103
|
+
language: y.language,
|
1104
|
+
code: y.code,
|
1105
1105
|
immediateClose: !0
|
1106
1106
|
}));
|
1107
1107
|
} else
|
1108
|
-
j(a.highlight(
|
1108
|
+
j(a.highlight(y.code, y.grammar, y.language));
|
1109
1109
|
},
|
1110
1110
|
/**
|
1111
1111
|
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
|
@@ -1127,10 +1127,10 @@ function Rt() {
|
|
1127
1127
|
* @example
|
1128
1128
|
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
1129
1129
|
*/
|
1130
|
-
highlight: function(
|
1130
|
+
highlight: function(n, r, o) {
|
1131
1131
|
var s = {
|
1132
|
-
code:
|
1133
|
-
grammar:
|
1132
|
+
code: n,
|
1133
|
+
grammar: r,
|
1134
1134
|
language: o
|
1135
1135
|
};
|
1136
1136
|
if (a.hooks.run("before-tokenize", s), !s.grammar)
|
@@ -1161,15 +1161,15 @@ function Rt() {
|
|
1161
1161
|
* }
|
1162
1162
|
* });
|
1163
1163
|
*/
|
1164
|
-
tokenize: function(
|
1165
|
-
var o =
|
1164
|
+
tokenize: function(n, r) {
|
1165
|
+
var o = r.rest;
|
1166
1166
|
if (o) {
|
1167
1167
|
for (var s in o)
|
1168
|
-
|
1169
|
-
delete
|
1168
|
+
r[s] = o[s];
|
1169
|
+
delete r.rest;
|
1170
1170
|
}
|
1171
|
-
var
|
1172
|
-
return
|
1171
|
+
var l = new f();
|
1172
|
+
return k(l, l.head, n), p(n, l, r, l.head, 0), P(l);
|
1173
1173
|
},
|
1174
1174
|
/**
|
1175
1175
|
* @namespace
|
@@ -1190,9 +1190,9 @@ function Rt() {
|
|
1190
1190
|
* @param {HookCallback} callback The callback function which is given environment variables.
|
1191
1191
|
* @public
|
1192
1192
|
*/
|
1193
|
-
add: function(
|
1193
|
+
add: function(n, r) {
|
1194
1194
|
var o = a.hooks.all;
|
1195
|
-
o[
|
1195
|
+
o[n] = o[n] || [], o[n].push(r);
|
1196
1196
|
},
|
1197
1197
|
/**
|
1198
1198
|
* Runs a hook invoking all registered callbacks with the given environment variables.
|
@@ -1203,94 +1203,94 @@ function Rt() {
|
|
1203
1203
|
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
1204
1204
|
* @public
|
1205
1205
|
*/
|
1206
|
-
run: function(
|
1207
|
-
var o = a.hooks.all[
|
1206
|
+
run: function(n, r) {
|
1207
|
+
var o = a.hooks.all[n];
|
1208
1208
|
if (!(!o || !o.length))
|
1209
|
-
for (var s = 0,
|
1210
|
-
|
1209
|
+
for (var s = 0, l; l = o[s++]; )
|
1210
|
+
l(r);
|
1211
1211
|
}
|
1212
1212
|
},
|
1213
1213
|
Token: c
|
1214
1214
|
};
|
1215
1215
|
m.Prism = a;
|
1216
|
-
function c(
|
1217
|
-
this.type =
|
1216
|
+
function c(n, r, o, s) {
|
1217
|
+
this.type = n, this.content = r, this.alias = o, this.length = (s || "").length | 0;
|
1218
1218
|
}
|
1219
|
-
c.stringify = function
|
1220
|
-
if (typeof
|
1221
|
-
return
|
1222
|
-
if (Array.isArray(
|
1219
|
+
c.stringify = function n(r, o) {
|
1220
|
+
if (typeof r == "string")
|
1221
|
+
return r;
|
1222
|
+
if (Array.isArray(r)) {
|
1223
1223
|
var s = "";
|
1224
|
-
return
|
1225
|
-
s +=
|
1224
|
+
return r.forEach(function(j) {
|
1225
|
+
s += n(j, o);
|
1226
1226
|
}), s;
|
1227
1227
|
}
|
1228
|
-
var
|
1229
|
-
type:
|
1230
|
-
content:
|
1228
|
+
var l = {
|
1229
|
+
type: r.type,
|
1230
|
+
content: n(r.content, o),
|
1231
1231
|
tag: "span",
|
1232
|
-
classes: ["token",
|
1232
|
+
classes: ["token", r.type],
|
1233
1233
|
attributes: {},
|
1234
1234
|
language: o
|
1235
|
-
},
|
1236
|
-
|
1237
|
-
var
|
1238
|
-
for (var
|
1239
|
-
|
1240
|
-
return "<" +
|
1235
|
+
}, b = r.alias;
|
1236
|
+
b && (Array.isArray(b) ? Array.prototype.push.apply(l.classes, b) : l.classes.push(b)), a.hooks.run("wrap", l);
|
1237
|
+
var C = "";
|
1238
|
+
for (var y in l.attributes)
|
1239
|
+
C += " " + y + '="' + (l.attributes[y] || "").replace(/"/g, """) + '"';
|
1240
|
+
return "<" + l.tag + ' class="' + l.classes.join(" ") + '"' + C + ">" + l.content + "</" + l.tag + ">";
|
1241
1241
|
};
|
1242
|
-
function x(
|
1243
|
-
|
1244
|
-
var
|
1245
|
-
if (
|
1246
|
-
var
|
1247
|
-
|
1242
|
+
function x(n, r, o, s) {
|
1243
|
+
n.lastIndex = r;
|
1244
|
+
var l = n.exec(o);
|
1245
|
+
if (l && s && l[1]) {
|
1246
|
+
var b = l[1].length;
|
1247
|
+
l.index += b, l[0] = l[0].slice(b);
|
1248
1248
|
}
|
1249
|
-
return
|
1249
|
+
return l;
|
1250
1250
|
}
|
1251
|
-
function p(
|
1252
|
-
for (var
|
1253
|
-
if (!(!o.hasOwnProperty(
|
1254
|
-
var
|
1255
|
-
|
1256
|
-
for (var j = 0; j <
|
1257
|
-
if (
|
1251
|
+
function p(n, r, o, s, l, b) {
|
1252
|
+
for (var C in o)
|
1253
|
+
if (!(!o.hasOwnProperty(C) || !o[C])) {
|
1254
|
+
var y = o[C];
|
1255
|
+
y = Array.isArray(y) ? y : [y];
|
1256
|
+
for (var j = 0; j < y.length; ++j) {
|
1257
|
+
if (b && b.cause == C + "," + j)
|
1258
1258
|
return;
|
1259
|
-
var z =
|
1259
|
+
var z = y[j], U = z.inside, Y = !!z.lookbehind, B = !!z.greedy, Q = z.alias;
|
1260
1260
|
if (B && !z.pattern.global) {
|
1261
1261
|
var pe = z.pattern.toString().match(/[imsuy]*$/)[0];
|
1262
1262
|
z.pattern = RegExp(z.pattern.source, pe + "g");
|
1263
1263
|
}
|
1264
|
-
for (var le = z.pattern || z, M = s.next, H =
|
1264
|
+
for (var le = z.pattern || z, M = s.next, H = l; M !== r.tail && !(b && H >= b.reach); H += M.value.length, M = M.next) {
|
1265
1265
|
var G = M.value;
|
1266
|
-
if (
|
1266
|
+
if (r.length > n.length)
|
1267
1267
|
return;
|
1268
1268
|
if (!(G instanceof c)) {
|
1269
1269
|
var ee = 1, N;
|
1270
1270
|
if (B) {
|
1271
|
-
if (N = x(le, H,
|
1271
|
+
if (N = x(le, H, n, Y), !N || N.index >= n.length)
|
1272
1272
|
break;
|
1273
1273
|
var J = N.index, he = N.index + N[0].length, V = H;
|
1274
1274
|
for (V += M.value.length; J >= V; )
|
1275
1275
|
M = M.next, V += M.value.length;
|
1276
1276
|
if (V -= M.value.length, H = V, M.value instanceof c)
|
1277
1277
|
continue;
|
1278
|
-
for (var
|
1279
|
-
ee++, V +=
|
1280
|
-
ee--, G =
|
1278
|
+
for (var ne = M; ne !== r.tail && (V < he || typeof ne.value == "string"); ne = ne.next)
|
1279
|
+
ee++, V += ne.value.length;
|
1280
|
+
ee--, G = n.slice(H, V), N.index -= H;
|
1281
1281
|
} else if (N = x(le, 0, G, Y), !N)
|
1282
1282
|
continue;
|
1283
|
-
var J = N.index, K = N[0], Z = G.slice(0, J),
|
1284
|
-
|
1283
|
+
var J = N.index, K = N[0], Z = G.slice(0, J), te = G.slice(J + K.length), X = H + G.length;
|
1284
|
+
b && X > b.reach && (b.reach = X);
|
1285
1285
|
var ae = M.prev;
|
1286
|
-
Z && (ae =
|
1287
|
-
var me = new c(
|
1288
|
-
if (M =
|
1286
|
+
Z && (ae = k(r, ae, Z), H += Z.length), R(r, ae, ee);
|
1287
|
+
var me = new c(C, U ? a.tokenize(K, U) : K, Q, K);
|
1288
|
+
if (M = k(r, ae, me), te && k(r, M, te), ee > 1) {
|
1289
1289
|
var ue = {
|
1290
|
-
cause:
|
1290
|
+
cause: C + "," + j,
|
1291
1291
|
reach: X
|
1292
1292
|
};
|
1293
|
-
p(
|
1293
|
+
p(n, r, o, M.prev, H, ue), b && ue.reach > b.reach && (b.reach = ue.reach);
|
1294
1294
|
}
|
1295
1295
|
}
|
1296
1296
|
}
|
@@ -1298,27 +1298,27 @@ function Rt() {
|
|
1298
1298
|
}
|
1299
1299
|
}
|
1300
1300
|
function f() {
|
1301
|
-
var
|
1302
|
-
|
1301
|
+
var n = { value: null, prev: null, next: null }, r = { value: null, prev: n, next: null };
|
1302
|
+
n.next = r, this.head = n, this.tail = r, this.length = 0;
|
1303
1303
|
}
|
1304
|
-
function
|
1305
|
-
var s =
|
1306
|
-
return
|
1304
|
+
function k(n, r, o) {
|
1305
|
+
var s = r.next, l = { value: o, prev: r, next: s };
|
1306
|
+
return r.next = l, s.prev = l, n.length++, l;
|
1307
1307
|
}
|
1308
|
-
function
|
1309
|
-
for (var s =
|
1308
|
+
function R(n, r, o) {
|
1309
|
+
for (var s = r.next, l = 0; l < o && s !== n.tail; l++)
|
1310
1310
|
s = s.next;
|
1311
|
-
|
1311
|
+
r.next = s, s.prev = r, n.length -= l;
|
1312
1312
|
}
|
1313
|
-
function P(
|
1314
|
-
for (var
|
1315
|
-
|
1316
|
-
return
|
1313
|
+
function P(n) {
|
1314
|
+
for (var r = [], o = n.head.next; o !== n.tail; )
|
1315
|
+
r.push(o.value), o = o.next;
|
1316
|
+
return r;
|
1317
1317
|
}
|
1318
1318
|
if (!m.document)
|
1319
|
-
return m.addEventListener && (a.disableWorkerMessageHandler || m.addEventListener("message", function(
|
1320
|
-
var
|
1321
|
-
m.postMessage(a.highlight(s, a.languages[o], o)),
|
1319
|
+
return m.addEventListener && (a.disableWorkerMessageHandler || m.addEventListener("message", function(n) {
|
1320
|
+
var r = JSON.parse(n.data), o = r.language, s = r.code, l = r.immediateClose;
|
1321
|
+
m.postMessage(a.highlight(s, a.languages[o], o)), l && m.close();
|
1322
1322
|
}, !1)), a;
|
1323
1323
|
var S = a.util.currentScript();
|
1324
1324
|
S && (a.filename = S.src, S.hasAttribute("data-manual") && (a.manual = !0));
|
@@ -1331,7 +1331,7 @@ function Rt() {
|
|
1331
1331
|
}
|
1332
1332
|
return a;
|
1333
1333
|
})(g);
|
1334
|
-
|
1334
|
+
u.exports && (u.exports = t), typeof We < "u" && (We.Prism = t), t.languages.markup = {
|
1335
1335
|
comment: {
|
1336
1336
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
1337
1337
|
greedy: !0
|
@@ -1408,9 +1408,9 @@ function Rt() {
|
|
1408
1408
|
},
|
1409
1409
|
/&#x?[\da-f]{1,8};/i
|
1410
1410
|
]
|
1411
|
-
},
|
1411
|
+
}, t.languages.markup.tag.inside["attr-value"].inside.entity = t.languages.markup.entity, t.languages.markup.doctype.inside["internal-subset"].inside = t.languages.markup, t.hooks.add("wrap", function(m) {
|
1412
1412
|
m.type === "entity" && (m.attributes.title = m.content.replace(/&/, "&"));
|
1413
|
-
}), Object.defineProperty(
|
1413
|
+
}), Object.defineProperty(t.languages.markup.tag, "addInlined", {
|
1414
1414
|
/**
|
1415
1415
|
* Adds an inlined language to markup.
|
1416
1416
|
*
|
@@ -1422,12 +1422,12 @@ function Rt() {
|
|
1422
1422
|
* @example
|
1423
1423
|
* addInlined('style', 'css');
|
1424
1424
|
*/
|
1425
|
-
value: function(v,
|
1425
|
+
value: function(v, E) {
|
1426
1426
|
var h = {};
|
1427
|
-
h["language-" +
|
1427
|
+
h["language-" + E] = {
|
1428
1428
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
1429
1429
|
lookbehind: !0,
|
1430
|
-
inside:
|
1430
|
+
inside: t.languages[E]
|
1431
1431
|
}, h.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
1432
1432
|
var a = {
|
1433
1433
|
"included-cdata": {
|
@@ -1435,9 +1435,9 @@ function Rt() {
|
|
1435
1435
|
inside: h
|
1436
1436
|
}
|
1437
1437
|
};
|
1438
|
-
a["language-" +
|
1438
|
+
a["language-" + E] = {
|
1439
1439
|
pattern: /[\s\S]+/,
|
1440
|
-
inside:
|
1440
|
+
inside: t.languages[E]
|
1441
1441
|
};
|
1442
1442
|
var c = {};
|
1443
1443
|
c[v] = {
|
@@ -1447,9 +1447,9 @@ function Rt() {
|
|
1447
1447
|
lookbehind: !0,
|
1448
1448
|
greedy: !0,
|
1449
1449
|
inside: a
|
1450
|
-
},
|
1450
|
+
}, t.languages.insertBefore("markup", "cdata", c);
|
1451
1451
|
}
|
1452
|
-
}), Object.defineProperty(
|
1452
|
+
}), Object.defineProperty(t.languages.markup.tag, "addAttribute", {
|
1453
1453
|
/**
|
1454
1454
|
* Adds an pattern to highlight languages embedded in HTML attributes.
|
1455
1455
|
*
|
@@ -1462,7 +1462,7 @@ function Rt() {
|
|
1462
1462
|
* addAttribute('style', 'css');
|
1463
1463
|
*/
|
1464
1464
|
value: function(m, v) {
|
1465
|
-
|
1465
|
+
t.languages.markup.tag.inside["special-attr"].push({
|
1466
1466
|
pattern: RegExp(
|
1467
1467
|
/(^|["'\s])/.source + "(?:" + m + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
|
1468
1468
|
"i"
|
@@ -1477,7 +1477,7 @@ function Rt() {
|
|
1477
1477
|
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
1478
1478
|
lookbehind: !0,
|
1479
1479
|
alias: [v, "language-" + v],
|
1480
|
-
inside:
|
1480
|
+
inside: t.languages[v]
|
1481
1481
|
},
|
1482
1482
|
punctuation: [
|
1483
1483
|
{
|
@@ -1491,7 +1491,7 @@ function Rt() {
|
|
1491
1491
|
}
|
1492
1492
|
});
|
1493
1493
|
}
|
1494
|
-
}),
|
1494
|
+
}), t.languages.html = t.languages.markup, t.languages.mathml = t.languages.markup, t.languages.svg = t.languages.markup, t.languages.xml = t.languages.extend("markup", {}), t.languages.ssml = t.languages.xml, t.languages.atom = t.languages.xml, t.languages.rss = t.languages.xml, (function(m) {
|
1495
1495
|
var v = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
1496
1496
|
m.languages.css = {
|
1497
1497
|
comment: /\/\*[\s\S]*?\*\//,
|
@@ -1543,9 +1543,9 @@ function Rt() {
|
|
1543
1543
|
},
|
1544
1544
|
punctuation: /[(){};:,]/
|
1545
1545
|
}, m.languages.css.atrule.inside.rest = m.languages.css;
|
1546
|
-
var
|
1547
|
-
|
1548
|
-
})(
|
1546
|
+
var E = m.languages.markup;
|
1547
|
+
E && (E.tag.addInlined("style", "css"), E.tag.addAttribute("style", "css"));
|
1548
|
+
})(t), t.languages.clike = {
|
1549
1549
|
comment: [
|
1550
1550
|
{
|
1551
1551
|
pattern: /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,
|
@@ -1575,9 +1575,9 @@ function Rt() {
|
|
1575
1575
|
number: /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,
|
1576
1576
|
operator: /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/,
|
1577
1577
|
punctuation: /[{}[\];(),.:]/
|
1578
|
-
},
|
1578
|
+
}, t.languages.javascript = t.languages.extend("clike", {
|
1579
1579
|
"class-name": [
|
1580
|
-
|
1580
|
+
t.languages.clike["class-name"],
|
1581
1581
|
{
|
1582
1582
|
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:constructor|prototype))/,
|
1583
1583
|
lookbehind: !0
|
@@ -1608,7 +1608,7 @@ function Rt() {
|
|
1608
1608
|
lookbehind: !0
|
1609
1609
|
},
|
1610
1610
|
operator: /--|\+\+|\*\*=?|=>|&&=?|\|\|=?|[!=]==|<<=?|>>>?=?|[-+*/%&|^!=<>]=?|\.{3}|\?\?=?|\?\.?|[~:]/
|
1611
|
-
}),
|
1611
|
+
}), t.languages.javascript["class-name"][0].pattern = /(\b(?:class|extends|implements|instanceof|interface|new)\s+)[\w.\\]+/, t.languages.insertBefore("javascript", "keyword", {
|
1612
1612
|
regex: {
|
1613
1613
|
pattern: RegExp(
|
1614
1614
|
// lookbehind
|
@@ -1628,7 +1628,7 @@ function Rt() {
|
|
1628
1628
|
pattern: /^(\/)[\s\S]+(?=\/[a-z]*$)/,
|
1629
1629
|
lookbehind: !0,
|
1630
1630
|
alias: "language-regex",
|
1631
|
-
inside:
|
1631
|
+
inside: t.languages.regex
|
1632
1632
|
},
|
1633
1633
|
"regex-delimiter": /^\/|\/$/,
|
1634
1634
|
"regex-flags": /^[a-z]+$/
|
@@ -1643,26 +1643,26 @@ function Rt() {
|
|
1643
1643
|
{
|
1644
1644
|
pattern: /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/,
|
1645
1645
|
lookbehind: !0,
|
1646
|
-
inside:
|
1646
|
+
inside: t.languages.javascript
|
1647
1647
|
},
|
1648
1648
|
{
|
1649
1649
|
pattern: /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$a-z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i,
|
1650
1650
|
lookbehind: !0,
|
1651
|
-
inside:
|
1651
|
+
inside: t.languages.javascript
|
1652
1652
|
},
|
1653
1653
|
{
|
1654
1654
|
pattern: /(\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*=>)/,
|
1655
1655
|
lookbehind: !0,
|
1656
|
-
inside:
|
1656
|
+
inside: t.languages.javascript
|
1657
1657
|
},
|
1658
1658
|
{
|
1659
1659
|
pattern: /((?:\b|\s|^)(?!(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/,
|
1660
1660
|
lookbehind: !0,
|
1661
|
-
inside:
|
1661
|
+
inside: t.languages.javascript
|
1662
1662
|
}
|
1663
1663
|
],
|
1664
1664
|
constant: /\b[A-Z](?:[A-Z_]|\dx?)*\b/
|
1665
|
-
}),
|
1665
|
+
}), t.languages.insertBefore("javascript", "string", {
|
1666
1666
|
hashbang: {
|
1667
1667
|
pattern: /^#!.*/,
|
1668
1668
|
greedy: !0,
|
@@ -1684,7 +1684,7 @@ function Rt() {
|
|
1684
1684
|
pattern: /^\$\{|\}$/,
|
1685
1685
|
alias: "punctuation"
|
1686
1686
|
},
|
1687
|
-
rest:
|
1687
|
+
rest: t.languages.javascript
|
1688
1688
|
}
|
1689
1689
|
},
|
1690
1690
|
string: /[\s\S]+/
|
@@ -1696,22 +1696,22 @@ function Rt() {
|
|
1696
1696
|
greedy: !0,
|
1697
1697
|
alias: "property"
|
1698
1698
|
}
|
1699
|
-
}),
|
1699
|
+
}), t.languages.insertBefore("javascript", "operator", {
|
1700
1700
|
"literal-property": {
|
1701
1701
|
pattern: /((?:^|[,{])[ \t]*)(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*:)/m,
|
1702
1702
|
lookbehind: !0,
|
1703
1703
|
alias: "property"
|
1704
1704
|
}
|
1705
|
-
}),
|
1705
|
+
}), t.languages.markup && (t.languages.markup.tag.addInlined("script", "javascript"), t.languages.markup.tag.addAttribute(
|
1706
1706
|
/on(?:abort|blur|change|click|composition(?:end|start|update)|dblclick|error|focus(?:in|out)?|key(?:down|up)|load|mouse(?:down|enter|leave|move|out|over|up)|reset|resize|scroll|select|slotchange|submit|unload|wheel)/.source,
|
1707
1707
|
"javascript"
|
1708
|
-
)),
|
1709
|
-
if (typeof
|
1708
|
+
)), t.languages.js = t.languages.javascript, (function() {
|
1709
|
+
if (typeof t > "u" || typeof document > "u")
|
1710
1710
|
return;
|
1711
1711
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
1712
1712
|
var m = "Loading…", v = function(S, _) {
|
1713
1713
|
return "✖ Error " + S + " while fetching file: " + _;
|
1714
|
-
},
|
1714
|
+
}, E = "✖ Error: File does not exist or is empty", h = {
|
1715
1715
|
js: "javascript",
|
1716
1716
|
py: "python",
|
1717
1717
|
rb: "ruby",
|
@@ -1722,22 +1722,22 @@ function Rt() {
|
|
1722
1722
|
h: "c",
|
1723
1723
|
tex: "latex"
|
1724
1724
|
}, a = "data-src-status", c = "loading", x = "loaded", p = "failed", f = "pre[data-src]:not([" + a + '="' + x + '"]):not([' + a + '="' + c + '"])';
|
1725
|
-
function
|
1726
|
-
var
|
1727
|
-
|
1728
|
-
|
1729
|
-
},
|
1725
|
+
function k(S, _, A) {
|
1726
|
+
var n = new XMLHttpRequest();
|
1727
|
+
n.open("GET", S, !0), n.onreadystatechange = function() {
|
1728
|
+
n.readyState == 4 && (n.status < 400 && n.responseText ? _(n.responseText) : n.status >= 400 ? A(v(n.status, n.statusText)) : A(E));
|
1729
|
+
}, n.send(null);
|
1730
1730
|
}
|
1731
|
-
function
|
1731
|
+
function R(S) {
|
1732
1732
|
var _ = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(S || "");
|
1733
1733
|
if (_) {
|
1734
|
-
var A = Number(_[1]),
|
1735
|
-
return
|
1734
|
+
var A = Number(_[1]), n = _[2], r = _[3];
|
1735
|
+
return n ? r ? [A, Number(r)] : [A, void 0] : [A, A];
|
1736
1736
|
}
|
1737
1737
|
}
|
1738
|
-
|
1738
|
+
t.hooks.add("before-highlightall", function(S) {
|
1739
1739
|
S.selector += ", " + f;
|
1740
|
-
}),
|
1740
|
+
}), t.hooks.add("before-sanity-check", function(S) {
|
1741
1741
|
var _ = (
|
1742
1742
|
/** @type {HTMLPreElement} */
|
1743
1743
|
S.element
|
@@ -1746,31 +1746,31 @@ function Rt() {
|
|
1746
1746
|
S.code = "", _.setAttribute(a, c);
|
1747
1747
|
var A = _.appendChild(document.createElement("CODE"));
|
1748
1748
|
A.textContent = m;
|
1749
|
-
var
|
1750
|
-
if (
|
1751
|
-
var o = (/\.(\w+)$/.exec(
|
1752
|
-
|
1749
|
+
var n = _.getAttribute("data-src"), r = S.language;
|
1750
|
+
if (r === "none") {
|
1751
|
+
var o = (/\.(\w+)$/.exec(n) || [, "none"])[1];
|
1752
|
+
r = h[o] || o;
|
1753
1753
|
}
|
1754
|
-
|
1755
|
-
var s =
|
1756
|
-
s && s.loadLanguages(
|
1757
|
-
|
1758
|
-
function(
|
1754
|
+
t.util.setLanguage(A, r), t.util.setLanguage(_, r);
|
1755
|
+
var s = t.plugins.autoloader;
|
1756
|
+
s && s.loadLanguages(r), k(
|
1757
|
+
n,
|
1758
|
+
function(l) {
|
1759
1759
|
_.setAttribute(a, x);
|
1760
|
-
var
|
1761
|
-
if (
|
1762
|
-
var
|
1763
|
-
|
1764
|
-
`), _.hasAttribute("data-start") || _.setAttribute("data-start", String(
|
1760
|
+
var b = R(_.getAttribute("data-range"));
|
1761
|
+
if (b) {
|
1762
|
+
var C = l.split(/\r\n?|\n/g), y = b[0], j = b[1] == null ? C.length : b[1];
|
1763
|
+
y < 0 && (y += C.length), y = Math.max(0, Math.min(y - 1, C.length)), j < 0 && (j += C.length), j = Math.max(0, Math.min(j, C.length)), l = C.slice(y, j).join(`
|
1764
|
+
`), _.hasAttribute("data-start") || _.setAttribute("data-start", String(y + 1));
|
1765
1765
|
}
|
1766
|
-
A.textContent =
|
1766
|
+
A.textContent = l, t.highlightElement(A);
|
1767
1767
|
},
|
1768
|
-
function(
|
1769
|
-
_.setAttribute(a, p), A.textContent =
|
1768
|
+
function(l) {
|
1769
|
+
_.setAttribute(a, p), A.textContent = l;
|
1770
1770
|
}
|
1771
1771
|
);
|
1772
1772
|
}
|
1773
|
-
}),
|
1773
|
+
}), t.plugins.fileHighlight = {
|
1774
1774
|
/**
|
1775
1775
|
* Executes the File Highlight plugin for all matching `pre` elements under the given container.
|
1776
1776
|
*
|
@@ -1779,30 +1779,30 @@ function Rt() {
|
|
1779
1779
|
* @param {ParentNode} [container=document]
|
1780
1780
|
*/
|
1781
1781
|
highlight: function(_) {
|
1782
|
-
for (var A = (_ || document).querySelectorAll(f),
|
1783
|
-
|
1782
|
+
for (var A = (_ || document).querySelectorAll(f), n = 0, r; r = A[n++]; )
|
1783
|
+
t.highlightElement(r);
|
1784
1784
|
}
|
1785
1785
|
};
|
1786
1786
|
var P = !1;
|
1787
|
-
|
1788
|
-
P || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), P = !0),
|
1787
|
+
t.fileHighlight = function() {
|
1788
|
+
P || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), P = !0), t.plugins.fileHighlight.highlight.apply(this, arguments);
|
1789
1789
|
};
|
1790
1790
|
})();
|
1791
1791
|
})(_e)), _e.exports;
|
1792
1792
|
}
|
1793
|
-
var
|
1794
|
-
const
|
1795
|
-
(function(
|
1793
|
+
var Tn = Cn();
|
1794
|
+
const $n = /* @__PURE__ */ _n(Tn);
|
1795
|
+
(function(u) {
|
1796
1796
|
var g = /(?:\\.|[^\\\n\r]|(?:\n|\r\n?)(?![\r\n]))/.source;
|
1797
|
-
function
|
1797
|
+
function t(p) {
|
1798
1798
|
return p = p.replace(/<inner>/g, function() {
|
1799
1799
|
return g;
|
1800
1800
|
}), RegExp(/((?:^|[^\\])(?:\\{2})*)/.source + "(?:" + p + ")");
|
1801
1801
|
}
|
1802
1802
|
var m = /(?:\\.|``(?:[^`\r\n]|`(?!`))+``|`[^`\r\n]+`|[^\\|\r\n`])+/.source, v = /\|?__(?:\|__)+\|?(?:(?:\n|\r\n?)|(?![\s\S]))/.source.replace(/__/g, function() {
|
1803
1803
|
return m;
|
1804
|
-
}),
|
1805
|
-
|
1804
|
+
}), E = /\|?[ \t]*:?-{3,}:?[ \t]*(?:\|[ \t]*:?-{3,}:?[ \t]*)+\|?(?:\n|\r\n?)/.source;
|
1805
|
+
u.languages.markdown = u.languages.extend("markup", {}), u.languages.insertBefore("markdown", "prolog", {
|
1806
1806
|
"front-matter-block": {
|
1807
1807
|
pattern: /(^(?:\s*[\r\n])?)---(?!.)[\s\S]*?[\r\n]---(?!.)/,
|
1808
1808
|
lookbehind: !0,
|
@@ -1812,7 +1812,7 @@ const Tt = /* @__PURE__ */ At(Ct);
|
|
1812
1812
|
"front-matter": {
|
1813
1813
|
pattern: /\S+(?:\s+\S+)*/,
|
1814
1814
|
alias: ["yaml", "language-yaml"],
|
1815
|
-
inside:
|
1815
|
+
inside: u.languages.yaml
|
1816
1816
|
}
|
1817
1817
|
}
|
1818
1818
|
},
|
@@ -1822,21 +1822,21 @@ const Tt = /* @__PURE__ */ At(Ct);
|
|
1822
1822
|
alias: "punctuation"
|
1823
1823
|
},
|
1824
1824
|
table: {
|
1825
|
-
pattern: RegExp("^" + v +
|
1825
|
+
pattern: RegExp("^" + v + E + "(?:" + v + ")*", "m"),
|
1826
1826
|
inside: {
|
1827
1827
|
"table-data-rows": {
|
1828
|
-
pattern: RegExp("^(" + v +
|
1828
|
+
pattern: RegExp("^(" + v + E + ")(?:" + v + ")*$"),
|
1829
1829
|
lookbehind: !0,
|
1830
1830
|
inside: {
|
1831
1831
|
"table-data": {
|
1832
1832
|
pattern: RegExp(m),
|
1833
|
-
inside:
|
1833
|
+
inside: u.languages.markdown
|
1834
1834
|
},
|
1835
1835
|
punctuation: /\|/
|
1836
1836
|
}
|
1837
1837
|
},
|
1838
1838
|
"table-line": {
|
1839
|
-
pattern: RegExp("^(" + v + ")" +
|
1839
|
+
pattern: RegExp("^(" + v + ")" + E + "$"),
|
1840
1840
|
lookbehind: !0,
|
1841
1841
|
inside: {
|
1842
1842
|
punctuation: /\||:?-{3,}:?/
|
@@ -1848,7 +1848,7 @@ const Tt = /* @__PURE__ */ At(Ct);
|
|
1848
1848
|
"table-header": {
|
1849
1849
|
pattern: RegExp(m),
|
1850
1850
|
alias: "important",
|
1851
|
-
inside:
|
1851
|
+
inside: u.languages.markdown
|
1852
1852
|
},
|
1853
1853
|
punctuation: /\|/
|
1854
1854
|
}
|
@@ -1942,7 +1942,7 @@ const Tt = /* @__PURE__ */ At(Ct);
|
|
1942
1942
|
// **strong**
|
1943
1943
|
// __strong__
|
1944
1944
|
// allow one nested instance of italic text using the same delimiter
|
1945
|
-
pattern:
|
1945
|
+
pattern: t(/\b__(?:(?!_)<inner>|_(?:(?!_)<inner>)+_)+__\b|\*\*(?:(?!\*)<inner>|\*(?:(?!\*)<inner>)+\*)+\*\*/.source),
|
1946
1946
|
lookbehind: !0,
|
1947
1947
|
greedy: !0,
|
1948
1948
|
inside: {
|
@@ -1959,7 +1959,7 @@ const Tt = /* @__PURE__ */ At(Ct);
|
|
1959
1959
|
// *em*
|
1960
1960
|
// _em_
|
1961
1961
|
// allow one nested instance of bold text using the same delimiter
|
1962
|
-
pattern:
|
1962
|
+
pattern: t(/\b_(?:(?!_)<inner>|__(?:(?!_)<inner>)+__)+_\b|\*(?:(?!\*)<inner>|\*\*(?:(?!\*)<inner>)+\*\*)+\*/.source),
|
1963
1963
|
lookbehind: !0,
|
1964
1964
|
greedy: !0,
|
1965
1965
|
inside: {
|
@@ -1976,7 +1976,7 @@ const Tt = /* @__PURE__ */ At(Ct);
|
|
1976
1976
|
// ~~strike through~~
|
1977
1977
|
// ~strike~
|
1978
1978
|
// eslint-disable-next-line regexp/strict
|
1979
|
-
pattern:
|
1979
|
+
pattern: t(/(~~?)(?:(?!~)<inner>)+\2/.source),
|
1980
1980
|
lookbehind: !0,
|
1981
1981
|
greedy: !0,
|
1982
1982
|
inside: {
|
@@ -2001,7 +2001,7 @@ const Tt = /* @__PURE__ */ At(Ct);
|
|
2001
2001
|
// [example](http://example.com "Optional title")
|
2002
2002
|
// [example][id]
|
2003
2003
|
// [example] [id]
|
2004
|
-
pattern:
|
2004
|
+
pattern: t(/!?\[(?:(?!\])<inner>)+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)|[ \t]?\[(?:(?!\])<inner>)+\])/.source),
|
2005
2005
|
lookbehind: !0,
|
2006
2006
|
greedy: !0,
|
2007
2007
|
inside: {
|
@@ -2028,51 +2028,51 @@ const Tt = /* @__PURE__ */ At(Ct);
|
|
2028
2028
|
}
|
2029
2029
|
}), ["url", "bold", "italic", "strike"].forEach(function(p) {
|
2030
2030
|
["url", "bold", "italic", "strike", "code-snippet"].forEach(function(f) {
|
2031
|
-
p !== f && (
|
2031
|
+
p !== f && (u.languages.markdown[p].inside.content.inside[f] = u.languages.markdown[f]);
|
2032
2032
|
});
|
2033
|
-
}),
|
2033
|
+
}), u.hooks.add("after-tokenize", function(p) {
|
2034
2034
|
if (p.language !== "markdown" && p.language !== "md")
|
2035
2035
|
return;
|
2036
|
-
function f(
|
2037
|
-
if (!(!
|
2038
|
-
for (var
|
2039
|
-
var S =
|
2036
|
+
function f(k) {
|
2037
|
+
if (!(!k || typeof k == "string"))
|
2038
|
+
for (var R = 0, P = k.length; R < P; R++) {
|
2039
|
+
var S = k[R];
|
2040
2040
|
if (S.type !== "code") {
|
2041
2041
|
f(S.content);
|
2042
2042
|
continue;
|
2043
2043
|
}
|
2044
2044
|
var _ = S.content[1], A = S.content[3];
|
2045
2045
|
if (_ && A && _.type === "code-language" && A.type === "code-block" && typeof _.content == "string") {
|
2046
|
-
var
|
2047
|
-
|
2048
|
-
var
|
2049
|
-
A.alias ? typeof A.alias == "string" ? A.alias = [A.alias,
|
2046
|
+
var n = _.content.replace(/\b#/g, "sharp").replace(/\b\+\+/g, "pp");
|
2047
|
+
n = (/[a-z][\w-]*/i.exec(n) || [""])[0].toLowerCase();
|
2048
|
+
var r = "language-" + n;
|
2049
|
+
A.alias ? typeof A.alias == "string" ? A.alias = [A.alias, r] : A.alias.push(r) : A.alias = [r];
|
2050
2050
|
}
|
2051
2051
|
}
|
2052
2052
|
}
|
2053
2053
|
f(p.tokens);
|
2054
|
-
}),
|
2054
|
+
}), u.hooks.add("wrap", function(p) {
|
2055
2055
|
if (p.type === "code-block") {
|
2056
|
-
for (var f = "",
|
2057
|
-
var P = p.classes[
|
2056
|
+
for (var f = "", k = 0, R = p.classes.length; k < R; k++) {
|
2057
|
+
var P = p.classes[k], S = /language-(.+)/.exec(P);
|
2058
2058
|
if (S) {
|
2059
2059
|
f = S[1];
|
2060
2060
|
break;
|
2061
2061
|
}
|
2062
2062
|
}
|
2063
|
-
var _ =
|
2063
|
+
var _ = u.languages[f];
|
2064
2064
|
if (_)
|
2065
|
-
p.content =
|
2066
|
-
else if (f && f !== "none" &&
|
2065
|
+
p.content = u.highlight(x(p.content), _, f);
|
2066
|
+
else if (f && f !== "none" && u.plugins.autoloader) {
|
2067
2067
|
var A = "md-" + (/* @__PURE__ */ new Date()).valueOf() + "-" + Math.floor(Math.random() * 1e16);
|
2068
|
-
p.attributes.id = A,
|
2069
|
-
var
|
2070
|
-
|
2068
|
+
p.attributes.id = A, u.plugins.autoloader.loadLanguages(f, function() {
|
2069
|
+
var n = document.getElementById(A);
|
2070
|
+
n && (n.innerHTML = u.highlight(n.textContent, u.languages[f], f));
|
2071
2071
|
});
|
2072
2072
|
}
|
2073
2073
|
}
|
2074
2074
|
});
|
2075
|
-
var h = RegExp(
|
2075
|
+
var h = RegExp(u.languages.markup.tag.pattern.source, "gi"), a = {
|
2076
2076
|
amp: "&",
|
2077
2077
|
lt: "<",
|
2078
2078
|
gt: ">",
|
@@ -2080,24 +2080,24 @@ const Tt = /* @__PURE__ */ At(Ct);
|
|
2080
2080
|
}, c = String.fromCodePoint || String.fromCharCode;
|
2081
2081
|
function x(p) {
|
2082
2082
|
var f = p.replace(h, "");
|
2083
|
-
return f = f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(
|
2084
|
-
if (
|
2083
|
+
return f = f.replace(/&(\w{1,8}|#x?[\da-f]{1,8});/gi, function(k, R) {
|
2084
|
+
if (R = R.toLowerCase(), R[0] === "#") {
|
2085
2085
|
var P;
|
2086
|
-
return
|
2086
|
+
return R[1] === "x" ? P = parseInt(R.slice(2), 16) : P = Number(R.slice(1)), c(P);
|
2087
2087
|
} else {
|
2088
|
-
var S = a[
|
2089
|
-
return S ||
|
2088
|
+
var S = a[R];
|
2089
|
+
return S || k;
|
2090
2090
|
}
|
2091
2091
|
}), f;
|
2092
2092
|
}
|
2093
|
-
|
2093
|
+
u.languages.md = u.languages.markdown;
|
2094
2094
|
})(Prism);
|
2095
2095
|
var Be = {}, Ve;
|
2096
|
-
function
|
2096
|
+
function On() {
|
2097
2097
|
return Ve || (Ve = 1, (function() {
|
2098
2098
|
if (typeof Prism > "u" || typeof document > "u")
|
2099
2099
|
return;
|
2100
|
-
var
|
2100
|
+
var u = "line-numbers", g = /\n(?!$)/g, t = Prism.plugins.lineNumbers = {
|
2101
2101
|
/**
|
2102
2102
|
* Get node for provided line number
|
2103
2103
|
*
|
@@ -2106,7 +2106,7 @@ function $t() {
|
|
2106
2106
|
* @returns {Element|undefined}
|
2107
2107
|
*/
|
2108
2108
|
getLine: function(h, a) {
|
2109
|
-
if (!(h.tagName !== "PRE" || !h.classList.contains(
|
2109
|
+
if (!(h.tagName !== "PRE" || !h.classList.contains(u))) {
|
2110
2110
|
var c = h.querySelector(".line-numbers-rows");
|
2111
2111
|
if (c) {
|
2112
2112
|
var x = parseInt(h.getAttribute("data-start"), 10) || 1, p = x + (c.children.length - 1);
|
@@ -2147,34 +2147,34 @@ function $t() {
|
|
2147
2147
|
var a = h.map(function(c) {
|
2148
2148
|
var x = c.querySelector("code"), p = c.querySelector(".line-numbers-rows");
|
2149
2149
|
if (!(!x || !p)) {
|
2150
|
-
var f = c.querySelector(".line-numbers-sizer"),
|
2150
|
+
var f = c.querySelector(".line-numbers-sizer"), k = x.textContent.split(g);
|
2151
2151
|
f || (f = document.createElement("span"), f.className = "line-numbers-sizer", x.appendChild(f)), f.innerHTML = "0", f.style.display = "block";
|
2152
|
-
var
|
2152
|
+
var R = f.getBoundingClientRect().height;
|
2153
2153
|
return f.innerHTML = "", {
|
2154
2154
|
element: c,
|
2155
|
-
lines:
|
2155
|
+
lines: k,
|
2156
2156
|
lineHeights: [],
|
2157
|
-
oneLinerHeight:
|
2157
|
+
oneLinerHeight: R,
|
2158
2158
|
sizer: f
|
2159
2159
|
};
|
2160
2160
|
}
|
2161
2161
|
}).filter(Boolean);
|
2162
2162
|
a.forEach(function(c) {
|
2163
|
-
var x = c.sizer, p = c.lines, f = c.lineHeights,
|
2164
|
-
f[p.length - 1] = void 0, p.forEach(function(
|
2165
|
-
if (
|
2163
|
+
var x = c.sizer, p = c.lines, f = c.lineHeights, k = c.oneLinerHeight;
|
2164
|
+
f[p.length - 1] = void 0, p.forEach(function(R, P) {
|
2165
|
+
if (R && R.length > 1) {
|
2166
2166
|
var S = x.appendChild(document.createElement("span"));
|
2167
|
-
S.style.display = "block", S.textContent =
|
2167
|
+
S.style.display = "block", S.textContent = R;
|
2168
2168
|
} else
|
2169
|
-
f[P] =
|
2169
|
+
f[P] = k;
|
2170
2170
|
});
|
2171
2171
|
}), a.forEach(function(c) {
|
2172
|
-
for (var x = c.sizer, p = c.lineHeights, f = 0,
|
2173
|
-
p[
|
2172
|
+
for (var x = c.sizer, p = c.lineHeights, f = 0, k = 0; k < p.length; k++)
|
2173
|
+
p[k] === void 0 && (p[k] = x.children[f++].getBoundingClientRect().height);
|
2174
2174
|
}), a.forEach(function(c) {
|
2175
2175
|
var x = c.sizer, p = c.element.querySelector(".line-numbers-rows");
|
2176
|
-
x.style.display = "none", x.innerHTML = "", c.lineHeights.forEach(function(f,
|
2177
|
-
p.children[
|
2176
|
+
x.style.display = "none", x.innerHTML = "", c.lineHeights.forEach(function(f, k) {
|
2177
|
+
p.children[k].style.height = f + "px";
|
2178
2178
|
});
|
2179
2179
|
});
|
2180
2180
|
}
|
@@ -2182,9 +2182,9 @@ function $t() {
|
|
2182
2182
|
function v(h) {
|
2183
2183
|
return h ? window.getComputedStyle ? getComputedStyle(h) : h.currentStyle || null : null;
|
2184
2184
|
}
|
2185
|
-
var
|
2185
|
+
var E = void 0;
|
2186
2186
|
window.addEventListener("resize", function() {
|
2187
|
-
|
2187
|
+
t.assumeViewportIndependence && E === window.innerWidth || (E = window.innerWidth, m(Array.prototype.slice.call(document.querySelectorAll("pre." + u))));
|
2188
2188
|
}), Prism.hooks.add("complete", function(h) {
|
2189
2189
|
if (h.code) {
|
2190
2190
|
var a = (
|
@@ -2194,10 +2194,10 @@ function $t() {
|
|
2194
2194
|
/** @type {HTMLElement} */
|
2195
2195
|
a.parentNode
|
2196
2196
|
);
|
2197
|
-
if (!(!c || !/pre/i.test(c.nodeName)) && !a.querySelector(".line-numbers-rows") && Prism.util.isActive(a,
|
2198
|
-
a.classList.remove(
|
2199
|
-
var x = h.code.match(g), p = x ? x.length + 1 : 1, f,
|
2200
|
-
f = document.createElement("span"), f.setAttribute("aria-hidden", "true"), f.className = "line-numbers-rows", f.innerHTML =
|
2197
|
+
if (!(!c || !/pre/i.test(c.nodeName)) && !a.querySelector(".line-numbers-rows") && Prism.util.isActive(a, u)) {
|
2198
|
+
a.classList.remove(u), c.classList.add(u);
|
2199
|
+
var x = h.code.match(g), p = x ? x.length + 1 : 1, f, k = new Array(p + 1).join("<span></span>");
|
2200
|
+
f = document.createElement("span"), f.setAttribute("aria-hidden", "true"), f.className = "line-numbers-rows", f.innerHTML = k, c.hasAttribute("data-start") && (c.style.counterReset = "linenumber " + (parseInt(c.getAttribute("data-start"), 10) - 1)), h.element.appendChild(f), m([c]), Prism.hooks.run("line-numbers", h);
|
2201
2201
|
}
|
2202
2202
|
}
|
2203
2203
|
}), Prism.hooks.add("line-numbers", function(h) {
|
@@ -2205,22 +2205,22 @@ function $t() {
|
|
2205
2205
|
});
|
2206
2206
|
})()), Be;
|
2207
2207
|
}
|
2208
|
-
|
2209
|
-
function Je(
|
2210
|
-
return
|
2208
|
+
On();
|
2209
|
+
function Je(u) {
|
2210
|
+
return u.useTabs ? " " : u.hasPadding ? " " : "";
|
2211
2211
|
}
|
2212
|
-
class
|
2212
|
+
class jn {
|
2213
2213
|
padding;
|
2214
2214
|
constructor(g) {
|
2215
2215
|
this.padding = Je(g);
|
2216
2216
|
}
|
2217
|
-
formatCell(g,
|
2217
|
+
formatCell(g, t, m) {
|
2218
2218
|
const v = m;
|
2219
|
-
switch (
|
2219
|
+
switch (t) {
|
2220
2220
|
case "right":
|
2221
2221
|
return `${this.padding}${g.padStart(v)}${this.padding}`;
|
2222
2222
|
case "center": {
|
2223
|
-
const
|
2223
|
+
const E = v - g.length, h = Math.floor(E / 2), a = E - h;
|
2224
2224
|
return `${this.padding}${" ".repeat(h)}${g}${" ".repeat(a)}${this.padding}`;
|
2225
2225
|
}
|
2226
2226
|
default:
|
@@ -2228,23 +2228,23 @@ class Ot {
|
|
2228
2228
|
}
|
2229
2229
|
}
|
2230
2230
|
}
|
2231
|
-
class
|
2231
|
+
class Pn {
|
2232
2232
|
static indicators = {
|
2233
2233
|
left: (g) => `:${"-".repeat(g - 1)}`,
|
2234
2234
|
right: (g) => `${"-".repeat(g - 1)}:`,
|
2235
2235
|
center: (g) => `:${"-".repeat(g - 2)}:`,
|
2236
2236
|
none: (g) => "-".repeat(g)
|
2237
2237
|
};
|
2238
|
-
static formatIndicator(g,
|
2239
|
-
return this.indicators[g](
|
2238
|
+
static formatIndicator(g, t) {
|
2239
|
+
return this.indicators[g](t);
|
2240
2240
|
}
|
2241
2241
|
}
|
2242
|
-
class
|
2242
|
+
class In {
|
2243
2243
|
config;
|
2244
2244
|
cellFormatter;
|
2245
2245
|
adjustedAlignments;
|
2246
2246
|
constructor(g) {
|
2247
|
-
this.config = g, this.cellFormatter = new
|
2247
|
+
this.config = g, this.cellFormatter = new jn(g), this.adjustedAlignments = this.getAdjustedAlignments();
|
2248
2248
|
}
|
2249
2249
|
getAdjustedAlignments() {
|
2250
2250
|
return this.config.columnAlignments.length < this.config.columnCount ? [
|
@@ -2254,91 +2254,91 @@ class Pt {
|
|
2254
2254
|
}
|
2255
2255
|
formatRow(g) {
|
2256
2256
|
return `|${Array.from({ length: this.config.columnCount }, (m, v) => {
|
2257
|
-
let
|
2258
|
-
this.config.replaceNewlines && (
|
2259
|
-
const h = this.adjustedAlignments[v], a = this.config.columnWidths ? this.config.columnWidths[v] :
|
2260
|
-
return this.cellFormatter.formatCell(
|
2257
|
+
let E = g[v] ?? "";
|
2258
|
+
this.config.replaceNewlines && (E = E.replace(/\n/g, "<br>"));
|
2259
|
+
const h = this.adjustedAlignments[v], a = this.config.columnWidths ? this.config.columnWidths[v] : E.length;
|
2260
|
+
return this.cellFormatter.formatCell(E, h, a);
|
2261
2261
|
}).join("|")}|`;
|
2262
2262
|
}
|
2263
2263
|
formatAlignmentRow() {
|
2264
2264
|
const g = Je(this.config);
|
2265
2265
|
return `|${Array.from({ length: this.config.columnCount }, (m, v) => {
|
2266
|
-
const
|
2266
|
+
const E = this.adjustedAlignments[v], h = this.config.columnWidths ? this.config.columnWidths[v] : 3, a = Pn.formatIndicator(E, h);
|
2267
2267
|
return `${g}${a}${g}`;
|
2268
2268
|
}).join("|")}|`;
|
2269
2269
|
}
|
2270
2270
|
}
|
2271
|
-
function
|
2272
|
-
const
|
2273
|
-
return
|
2271
|
+
function Dn(u, g) {
|
2272
|
+
const t = new Array(g).fill(3);
|
2273
|
+
return u.forEach((m) => {
|
2274
2274
|
for (let v = 0; v < g; v++) {
|
2275
|
-
const
|
2276
|
-
|
2275
|
+
const E = m[v] ?? "";
|
2276
|
+
t[v] = Math.max(t[v], E.length);
|
2277
2277
|
}
|
2278
|
-
}),
|
2278
|
+
}), t;
|
2279
2279
|
}
|
2280
|
-
function
|
2281
|
-
const g =
|
2282
|
-
return Math.max(g, ...
|
2280
|
+
function Mn(u) {
|
2281
|
+
const g = u.inputDataHeader.length, t = u.inputDataBody.map((m) => m.length);
|
2282
|
+
return Math.max(g, ...t);
|
2283
2283
|
}
|
2284
|
-
function
|
2285
|
-
return
|
2286
|
-
[
|
2284
|
+
function zn(u, g, t) {
|
2285
|
+
return t ? Dn(
|
2286
|
+
[u.inputDataHeader, ...u.inputDataBody],
|
2287
2287
|
g
|
2288
2288
|
) : void 0;
|
2289
2289
|
}
|
2290
|
-
function
|
2291
|
-
const h =
|
2290
|
+
function Ln(u, g, t = !0, m = !1, v = !1, E = !0) {
|
2291
|
+
const h = Mn(u), a = zn(u, h, t), c = {
|
2292
2292
|
columnCount: h,
|
2293
2293
|
columnAlignments: g,
|
2294
2294
|
columnWidths: a,
|
2295
2295
|
useTabs: m,
|
2296
2296
|
replaceNewlines: v,
|
2297
|
-
hasPadding:
|
2298
|
-
}, x = new
|
2297
|
+
hasPadding: E
|
2298
|
+
}, x = new In(c), p = x.formatRow(u.inputDataHeader), f = x.formatAlignmentRow(), k = u.inputDataBody.map((R) => x.formatRow(R)).join(`
|
2299
2299
|
`);
|
2300
2300
|
return `${p}
|
2301
2301
|
${f}
|
2302
|
-
${
|
2302
|
+
${k}`.trimEnd();
|
2303
2303
|
}
|
2304
|
-
function
|
2305
|
-
let g = "",
|
2306
|
-
for (;
|
2307
|
-
g = String.fromCharCode(
|
2304
|
+
function Nn(u) {
|
2305
|
+
let g = "", t = u;
|
2306
|
+
for (; t >= 0; )
|
2307
|
+
g = String.fromCharCode(t % 26 + 65) + g, t = Math.floor(t / 26) - 1;
|
2308
2308
|
return g;
|
2309
2309
|
}
|
2310
|
-
function
|
2311
|
-
return Array.from({ length:
|
2310
|
+
function Wn(u) {
|
2311
|
+
return Array.from({ length: u }, (g, t) => Nn(t));
|
2312
2312
|
}
|
2313
2313
|
class ge extends Error {
|
2314
|
-
constructor(g,
|
2315
|
-
super(g,
|
2314
|
+
constructor(g, t) {
|
2315
|
+
super(g, t), this.name = "MarkdownTableError", Object.setPrototypeOf(this, ge.prototype);
|
2316
2316
|
}
|
2317
2317
|
}
|
2318
|
-
function
|
2319
|
-
if (
|
2318
|
+
function Hn(u) {
|
2319
|
+
if (u === null || !Array.isArray(u))
|
2320
2320
|
throw new ge("The 'data' prop must be a two-dimensional array.");
|
2321
|
-
if (
|
2321
|
+
if (u.length === 0)
|
2322
2322
|
throw new ge("The 'data' array must contain at least one row.");
|
2323
2323
|
}
|
2324
|
-
const
|
2325
|
-
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}
|
2326
|
-
`,
|
2327
|
-
code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#282a36}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}
|
2324
|
+
const qn = `
|
2325
|
+
code[class*=language-],pre[class*=language-]{color:#000;background:0 0;text-shadow:0 1px #fff;font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}code[class*=language-] ::-moz-selection,code[class*=language-]::-moz-selection,pre[class*=language-] ::-moz-selection,pre[class*=language-]::-moz-selection{text-shadow:none;background:#b3d4fc}code[class*=language-] ::selection,code[class*=language-]::selection,pre[class*=language-] ::selection,pre[class*=language-]::selection{text-shadow:none;background:#b3d4fc}@media print{code[class*=language-],pre[class*=language-]{text-shadow:none}}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto}:not(pre)>code[class*=language-],pre[class*=language-]{background:#f5f2f0}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}pre[class*=language-].line-numbers{position:relative;padding-left:2.4em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.5em;text-align:right}
|
2326
|
+
`, Un = `
|
2327
|
+
code[class*=language-],pre[class*=language-]{color:#f8f8f2;background:0 0;text-shadow:0 1px rgba(0,0,0,.3);font-family:Consolas,Monaco,'Andale Mono','Ubuntu Mono',monospace;font-size:1em;text-align:left;white-space:pre;word-spacing:normal;word-break:normal;word-wrap:normal;line-height:1.5;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-hyphens:none;-moz-hyphens:none;-ms-hyphens:none;hyphens:none}pre[class*=language-]{padding:1em;margin:.5em 0;overflow:auto;border-radius:.3em}:not(pre)>code[class*=language-],pre[class*=language-]{background:#282a36}:not(pre)>code[class*=language-]{padding:.1em;border-radius:.3em;white-space:normal}pre[class*=language-].line-numbers{position:relative;padding-left:2.4em;counter-reset:linenumber}pre[class*=language-].line-numbers>code{position:relative;white-space:inherit}.line-numbers .line-numbers-rows{position:absolute;pointer-events:none;top:0;font-size:100%;left:-3.8em;width:3em;letter-spacing:-1px;border-right:1px solid #999;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.line-numbers-rows>span{display:block;counter-increment:linenumber}.line-numbers-rows>span:before{content:counter(linenumber);color:#999;display:block;padding-right:.5em;text-align:right}
|
2328
2328
|
`;
|
2329
|
-
function
|
2330
|
-
return g ? { inputDataHeader:
|
2329
|
+
function Yn(u, g) {
|
2330
|
+
return g ? { inputDataHeader: u[0], inputDataBody: u.slice(1) } : { inputDataHeader: Wn(u[0].length), inputDataBody: u };
|
2331
2331
|
}
|
2332
|
-
function
|
2332
|
+
function Bn(u, g, t, m, v, E, h) {
|
2333
2333
|
try {
|
2334
|
-
|
2335
|
-
const { inputDataHeader: a, inputDataBody: c } =
|
2336
|
-
return
|
2334
|
+
Hn(u);
|
2335
|
+
const { inputDataHeader: a, inputDataBody: c } = Yn(u, g);
|
2336
|
+
return Ln(
|
2337
2337
|
{ inputDataHeader: a, inputDataBody: c },
|
2338
|
-
|
2338
|
+
t,
|
2339
2339
|
m,
|
2340
2340
|
v,
|
2341
|
-
|
2341
|
+
E,
|
2342
2342
|
h
|
2343
2343
|
);
|
2344
2344
|
} catch (a) {
|
@@ -2347,54 +2347,62 @@ function Yt(l, g, r, m, v, k, h) {
|
|
2347
2347
|
throw a;
|
2348
2348
|
}
|
2349
2349
|
}
|
2350
|
-
function
|
2351
|
-
inputData:
|
2350
|
+
function Gn({
|
2351
|
+
inputData: u = null,
|
2352
2352
|
hasHeader: g = !0,
|
2353
|
-
columnAlignments:
|
2353
|
+
columnAlignments: t = [],
|
2354
2354
|
isCompact: m = !1,
|
2355
2355
|
hasTabs: v = !1,
|
2356
|
-
hasPadding:
|
2356
|
+
hasPadding: E = !0,
|
2357
2357
|
convertLineBreaks: h = !1,
|
2358
2358
|
className: a,
|
2359
2359
|
onGenerate: c,
|
2360
2360
|
theme: x = "light",
|
2361
2361
|
preStyle: p,
|
2362
2362
|
topPadding: f = 16,
|
2363
|
-
minWidth:
|
2364
|
-
showLineNumbers:
|
2363
|
+
minWidth: k,
|
2364
|
+
showLineNumbers: R = !0
|
2365
2365
|
}) {
|
2366
|
-
const P =
|
2366
|
+
const P = wn(null), S = En(), _ = xn(u), [, A] = kn(), n = An(() => Bn(
|
2367
2367
|
_,
|
2368
2368
|
g,
|
2369
|
-
|
2369
|
+
t,
|
2370
2370
|
!m,
|
2371
2371
|
v,
|
2372
2372
|
h,
|
2373
|
-
|
2373
|
+
E
|
2374
2374
|
), [
|
2375
2375
|
_,
|
2376
2376
|
g,
|
2377
|
-
|
2377
|
+
t,
|
2378
2378
|
m,
|
2379
2379
|
v,
|
2380
2380
|
h,
|
2381
|
-
|
2381
|
+
E
|
2382
2382
|
]);
|
2383
2383
|
return Ne(() => {
|
2384
|
-
c && c(
|
2385
|
-
}, [
|
2386
|
-
const
|
2387
|
-
|
2384
|
+
c && c(n);
|
2385
|
+
}, [n, c]), Ne(() => {
|
2386
|
+
const r = P.current?.querySelector("code"), o = P.current;
|
2387
|
+
r && o && n && A(() => {
|
2388
2388
|
requestAnimationFrame(() => {
|
2389
|
-
if (
|
2390
|
-
const
|
2391
|
-
|
2389
|
+
if ($n.highlightElement(r), R && !o.querySelector(".line-numbers-rows")) {
|
2390
|
+
const s = n.split(`
|
2391
|
+
`), l = document.createElement("span");
|
2392
|
+
l.setAttribute("aria-hidden", "true"), l.className = "line-numbers-rows", s.forEach(() => {
|
2393
|
+
const b = document.createElement("span");
|
2394
|
+
l.appendChild(b);
|
2395
|
+
}), r.appendChild(l);
|
2396
|
+
}
|
2397
|
+
if (!R && o) {
|
2398
|
+
const s = o.querySelector(".line-numbers-rows");
|
2399
|
+
s && s.remove();
|
2392
2400
|
}
|
2393
2401
|
});
|
2394
2402
|
});
|
2395
|
-
}, [
|
2403
|
+
}, [n, A, R]), /* @__PURE__ */ se.jsxs(se.Fragment, { children: [
|
2396
2404
|
/* @__PURE__ */ se.jsxs("style", { children: [
|
2397
|
-
x === "light" ?
|
2405
|
+
x === "light" ? qn : Un,
|
2398
2406
|
`
|
2399
2407
|
pre {
|
2400
2408
|
position: relative;
|
@@ -2434,14 +2442,14 @@ function Vt({
|
|
2434
2442
|
"pre",
|
2435
2443
|
{
|
2436
2444
|
ref: P,
|
2437
|
-
className: `${a} language-markdown ${
|
2445
|
+
className: `${a} language-markdown ${R ? "line-numbers" : ""} ${x === "dark" ? "dark-theme" : ""}`,
|
2438
2446
|
style: {
|
2439
2447
|
width: "fit-content",
|
2440
|
-
minWidth:
|
2448
|
+
minWidth: k ? `${k}px` : "min-content",
|
2441
2449
|
margin: 0,
|
2442
2450
|
...p
|
2443
2451
|
},
|
2444
|
-
children: /* @__PURE__ */ se.jsx("code", { className: "language-markdown", role: "code", children:
|
2452
|
+
children: /* @__PURE__ */ se.jsx("code", { className: "language-markdown", role: "code", children: n })
|
2445
2453
|
}
|
2446
2454
|
)
|
2447
2455
|
}
|
@@ -2449,6 +2457,6 @@ function Vt({
|
|
2449
2457
|
] });
|
2450
2458
|
}
|
2451
2459
|
export {
|
2452
|
-
|
2460
|
+
Gn as MarkdownTable,
|
2453
2461
|
ge as MarkdownTableError
|
2454
2462
|
};
|