@hep-code-runner/react 1.2.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +139 -82
- package/dist/index.mjs +600 -550
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import qe, { useRef as
|
|
1
|
+
import qe, { useRef as Fe, useMemo as Ee, useState as Z, useEffect as Oe, useCallback as le, forwardRef as xr, useImperativeHandle as Sr } from "react";
|
|
2
2
|
var Ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
3
|
-
function
|
|
4
|
-
return
|
|
3
|
+
function wr(c) {
|
|
4
|
+
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
5
5
|
}
|
|
6
6
|
var Ie = { exports: {} }, be = {};
|
|
7
7
|
/**
|
|
@@ -14,16 +14,16 @@ var Ie = { exports: {} }, be = {};
|
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
16
|
var Xe;
|
|
17
|
-
function
|
|
17
|
+
function Ar() {
|
|
18
18
|
if (Xe) return be;
|
|
19
19
|
Xe = 1;
|
|
20
|
-
var
|
|
21
|
-
function S(l,
|
|
20
|
+
var c = qe, p = Symbol.for("react.element"), n = Symbol.for("react.fragment"), d = Object.prototype.hasOwnProperty, b = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, k = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
|
+
function S(l, m, y) {
|
|
22
22
|
var _, O = {}, D = null, I = null;
|
|
23
|
-
y !== void 0 && (D = "" + y),
|
|
24
|
-
for (_ in
|
|
25
|
-
if (l && l.defaultProps) for (_ in
|
|
26
|
-
return { $$typeof:
|
|
23
|
+
y !== void 0 && (D = "" + y), m.key !== void 0 && (D = "" + m.key), m.ref !== void 0 && (I = m.ref);
|
|
24
|
+
for (_ in m) d.call(m, _) && !k.hasOwnProperty(_) && (O[_] = m[_]);
|
|
25
|
+
if (l && l.defaultProps) for (_ in m = l.defaultProps, m) O[_] === void 0 && (O[_] = m[_]);
|
|
26
|
+
return { $$typeof: p, type: l, key: D, ref: I, props: O, _owner: b.current };
|
|
27
27
|
}
|
|
28
28
|
return be.Fragment = n, be.jsx = S, be.jsxs = S, be;
|
|
29
29
|
}
|
|
@@ -38,24 +38,24 @@ var ve = {};
|
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
40
|
var Ke;
|
|
41
|
-
function
|
|
41
|
+
function Tr() {
|
|
42
42
|
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var
|
|
43
|
+
var c = qe, p = Symbol.for("react.element"), n = Symbol.for("react.portal"), d = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), k = Symbol.for("react.profiler"), S = Symbol.for("react.provider"), l = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), _ = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), B = Symbol.iterator, F = "@@iterator";
|
|
44
44
|
function w(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
47
|
var a = B && e[B] || e[F];
|
|
48
48
|
return typeof a == "function" ? a : null;
|
|
49
49
|
}
|
|
50
|
-
var R =
|
|
51
|
-
function
|
|
50
|
+
var R = c.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function r(e) {
|
|
52
52
|
{
|
|
53
53
|
for (var a = arguments.length, u = new Array(a > 1 ? a - 1 : 0), v = 1; v < a; v++)
|
|
54
54
|
u[v - 1] = arguments[v];
|
|
55
|
-
|
|
55
|
+
t("error", e, u);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function t(e, a, u) {
|
|
59
59
|
{
|
|
60
60
|
var v = R.ReactDebugCurrentFrame, N = v.getStackAddendum();
|
|
61
61
|
N !== "" && (a += "%s", u = u.concat([N]));
|
|
@@ -65,10 +65,10 @@ function Tt() {
|
|
|
65
65
|
L.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, L);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var i = !1, s = !1, o = !1,
|
|
68
|
+
var i = !1, s = !1, o = !1, f = !1, E = !1, g;
|
|
69
69
|
g = Symbol.for("react.module.reference");
|
|
70
70
|
function C(e) {
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e ===
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === d || e === k || E || e === b || e === y || e === _ || f || e === I || i || s || o || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === O || e.$$typeof === S || e.$$typeof === l || e.$$typeof === m || // 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.
|
|
@@ -87,18 +87,18 @@ function Tt() {
|
|
|
87
87
|
function V(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
|
-
if (typeof e.tag == "number" &&
|
|
90
|
+
if (typeof e.tag == "number" && r("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
|
-
case
|
|
95
|
+
case d:
|
|
96
96
|
return "Fragment";
|
|
97
97
|
case n:
|
|
98
98
|
return "Portal";
|
|
99
99
|
case k:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case b:
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case y:
|
|
104
104
|
return "Suspense";
|
|
@@ -113,7 +113,7 @@ function Tt() {
|
|
|
113
113
|
case S:
|
|
114
114
|
var u = e;
|
|
115
115
|
return z(u._context) + ".Provider";
|
|
116
|
-
case
|
|
116
|
+
case m:
|
|
117
117
|
return P(e, e.render, "ForwardRef");
|
|
118
118
|
case O:
|
|
119
119
|
var v = e.displayName || null;
|
|
@@ -188,7 +188,7 @@ function Tt() {
|
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
ne < 0 &&
|
|
191
|
+
ne < 0 && r("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
194
|
var ae = R.ReactCurrentDispatcher, J;
|
|
@@ -205,16 +205,16 @@ function Tt() {
|
|
|
205
205
|
` + J + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var se = !1,
|
|
208
|
+
var se = !1, re;
|
|
209
209
|
{
|
|
210
210
|
var A = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
-
|
|
211
|
+
re = new A();
|
|
212
212
|
}
|
|
213
213
|
function M(e, a) {
|
|
214
214
|
if (!e || se)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var u =
|
|
217
|
+
var u = re.get(e);
|
|
218
218
|
if (u !== void 0)
|
|
219
219
|
return u;
|
|
220
220
|
}
|
|
@@ -269,7 +269,7 @@ function Tt() {
|
|
|
269
269
|
if ($--, U--, U < 0 || x[$] !== Y[U]) {
|
|
270
270
|
var Q = `
|
|
271
271
|
` + x[$].replace(" at new ", " at ");
|
|
272
|
-
return e.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
272
|
+
return e.displayName && Q.includes("<anonymous>") && (Q = Q.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, Q), Q;
|
|
273
273
|
}
|
|
274
274
|
while ($ >= 1 && U >= 0);
|
|
275
275
|
break;
|
|
@@ -279,9 +279,9 @@ function Tt() {
|
|
|
279
279
|
se = !1, ae.current = L, oe(), Error.prepareStackTrace = N;
|
|
280
280
|
}
|
|
281
281
|
var he = e ? e.displayName || e.name : "", de = he ? ie(he) : "";
|
|
282
|
-
return typeof e == "function" &&
|
|
282
|
+
return typeof e == "function" && re.set(e, de), de;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function te(e, a, u) {
|
|
285
285
|
return M(e, !1);
|
|
286
286
|
}
|
|
287
287
|
function fe(e) {
|
|
@@ -303,8 +303,8 @@ function Tt() {
|
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
307
|
-
return
|
|
306
|
+
case m:
|
|
307
|
+
return te(e.render);
|
|
308
308
|
case O:
|
|
309
309
|
return ye(e.type, a, u);
|
|
310
310
|
case D: {
|
|
@@ -340,21 +340,21 @@ function Tt() {
|
|
|
340
340
|
} catch ($) {
|
|
341
341
|
x = $;
|
|
342
342
|
}
|
|
343
|
-
x && !(x instanceof Error) && (xe(N),
|
|
343
|
+
x && !(x instanceof Error) && (xe(N), r("%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).", v || "React class", u, T, typeof x), xe(null)), x instanceof Error && !(x.message in Ce) && (Ce[x.message] = !0, xe(N), r("Failed %s type: %s", u, x.message), xe(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
348
|
-
function
|
|
349
|
-
return
|
|
347
|
+
var er = Array.isArray;
|
|
348
|
+
function Se(e) {
|
|
349
|
+
return er(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function rr(e) {
|
|
352
352
|
{
|
|
353
353
|
var a = typeof Symbol == "function" && Symbol.toStringTag, u = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
354
|
return u;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function tr(e) {
|
|
358
358
|
try {
|
|
359
359
|
return Pe(e), !1;
|
|
360
360
|
} catch {
|
|
@@ -365,16 +365,16 @@ function Tt() {
|
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
367
|
function De(e) {
|
|
368
|
-
if (
|
|
369
|
-
return
|
|
368
|
+
if (tr(e))
|
|
369
|
+
return r("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rr(e)), Pe(e);
|
|
370
370
|
}
|
|
371
|
-
var je = R.ReactCurrentOwner,
|
|
371
|
+
var je = R.ReactCurrentOwner, nr = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
376
|
}, $e, Me;
|
|
377
|
-
function
|
|
377
|
+
function ar(e) {
|
|
378
378
|
if (me.call(e, "ref")) {
|
|
379
379
|
var a = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
380
380
|
if (a && a.isReactWarning)
|
|
@@ -382,7 +382,7 @@ function Tt() {
|
|
|
382
382
|
}
|
|
383
383
|
return e.ref !== void 0;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
385
|
+
function ir(e) {
|
|
386
386
|
if (me.call(e, "key")) {
|
|
387
387
|
var a = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
388
388
|
if (a && a.isReactWarning)
|
|
@@ -390,13 +390,13 @@ function Tt() {
|
|
|
390
390
|
}
|
|
391
391
|
return e.key !== void 0;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function sr(e, a) {
|
|
394
394
|
typeof e.ref == "string" && je.current;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function or(e, a) {
|
|
397
397
|
{
|
|
398
398
|
var u = function() {
|
|
399
|
-
$e || ($e = !0,
|
|
399
|
+
$e || ($e = !0, r("%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)", a));
|
|
400
400
|
};
|
|
401
401
|
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
402
402
|
get: u,
|
|
@@ -404,10 +404,10 @@ function Tt() {
|
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function lr(e, a) {
|
|
408
408
|
{
|
|
409
409
|
var u = function() {
|
|
410
|
-
Me || (Me = !0,
|
|
410
|
+
Me || (Me = !0, r("%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)", a));
|
|
411
411
|
};
|
|
412
412
|
u.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
413
413
|
get: u,
|
|
@@ -415,10 +415,10 @@ function Tt() {
|
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var
|
|
418
|
+
var ur = function(e, a, u, v, N, L, T) {
|
|
419
419
|
var x = {
|
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
|
421
|
-
$$typeof:
|
|
421
|
+
$$typeof: p,
|
|
422
422
|
// Built-in properties that belong on the element
|
|
423
423
|
type: e,
|
|
424
424
|
key: a,
|
|
@@ -444,12 +444,12 @@ function Tt() {
|
|
|
444
444
|
value: N
|
|
445
445
|
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
446
446
|
};
|
|
447
|
-
function
|
|
447
|
+
function cr(e, a, u, v, N) {
|
|
448
448
|
{
|
|
449
449
|
var L, T = {}, x = null, Y = null;
|
|
450
|
-
u !== void 0 && (De(u), x = "" + u),
|
|
450
|
+
u !== void 0 && (De(u), x = "" + u), ir(a) && (De(a.key), x = "" + a.key), ar(a) && (Y = a.ref, sr(a, N));
|
|
451
451
|
for (L in a)
|
|
452
|
-
me.call(a, L) && !
|
|
452
|
+
me.call(a, L) && !nr.hasOwnProperty(L) && (T[L] = a[L]);
|
|
453
453
|
if (e && e.defaultProps) {
|
|
454
454
|
var $ = e.defaultProps;
|
|
455
455
|
for (L in $)
|
|
@@ -457,12 +457,12 @@ function Tt() {
|
|
|
457
457
|
}
|
|
458
458
|
if (x || Y) {
|
|
459
459
|
var U = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
460
|
-
x &&
|
|
460
|
+
x && or(T, U), Y && lr(T, U);
|
|
461
461
|
}
|
|
462
|
-
return
|
|
462
|
+
return ur(e, x, Y, N, v, je.current, T);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
var
|
|
465
|
+
var we = R.ReactCurrentOwner, Ue = R.ReactDebugCurrentFrame;
|
|
466
466
|
function ge(e) {
|
|
467
467
|
if (e) {
|
|
468
468
|
var a = e._owner, u = ye(e.type, e._source, a ? a.type : null);
|
|
@@ -470,15 +470,15 @@ function Tt() {
|
|
|
470
470
|
} else
|
|
471
471
|
Ue.setExtraStackFrame(null);
|
|
472
472
|
}
|
|
473
|
-
var
|
|
474
|
-
|
|
475
|
-
function
|
|
476
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
473
|
+
var Ae;
|
|
474
|
+
Ae = !1;
|
|
475
|
+
function Te(e) {
|
|
476
|
+
return typeof e == "object" && e !== null && e.$$typeof === p;
|
|
477
477
|
}
|
|
478
478
|
function He() {
|
|
479
479
|
{
|
|
480
|
-
if (
|
|
481
|
-
var e = V(
|
|
480
|
+
if (we.current) {
|
|
481
|
+
var e = V(we.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 dr(e) {
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
493
|
var Be = {};
|
|
494
|
-
function
|
|
494
|
+
function pr(e) {
|
|
495
495
|
{
|
|
496
496
|
var a = He();
|
|
497
497
|
if (!a) {
|
|
@@ -508,34 +508,34 @@ Check the top-level render call using <` + u + ">.");
|
|
|
508
508
|
if (!e._store || e._store.validated || e.key != null)
|
|
509
509
|
return;
|
|
510
510
|
e._store.validated = !0;
|
|
511
|
-
var u =
|
|
511
|
+
var u = pr(a);
|
|
512
512
|
if (Be[u])
|
|
513
513
|
return;
|
|
514
514
|
Be[u] = !0;
|
|
515
515
|
var v = "";
|
|
516
|
-
e && e._owner && e._owner !==
|
|
516
|
+
e && e._owner && e._owner !== we.current && (v = " It was passed a child from " + V(e._owner.type) + "."), ge(e), r('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, v), ge(null);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
function We(e, a) {
|
|
520
520
|
{
|
|
521
521
|
if (typeof e != "object")
|
|
522
522
|
return;
|
|
523
|
-
if (
|
|
523
|
+
if (Se(e))
|
|
524
524
|
for (var u = 0; u < e.length; u++) {
|
|
525
525
|
var v = e[u];
|
|
526
|
-
|
|
526
|
+
Te(v) && ze(v, a);
|
|
527
527
|
}
|
|
528
|
-
else if (
|
|
528
|
+
else if (Te(e))
|
|
529
529
|
e._store && (e._store.validated = !0);
|
|
530
530
|
else if (e) {
|
|
531
531
|
var N = w(e);
|
|
532
532
|
if (typeof N == "function" && N !== e.entries)
|
|
533
533
|
for (var L = N.call(e), T; !(T = L.next()).done; )
|
|
534
|
-
|
|
534
|
+
Te(T.value) && ze(T.value, a);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function fr(e) {
|
|
539
539
|
{
|
|
540
540
|
var a = e.type;
|
|
541
541
|
if (a == null || typeof a == "string")
|
|
@@ -543,7 +543,7 @@ Check the top-level render call using <` + u + ">.");
|
|
|
543
543
|
var u;
|
|
544
544
|
if (typeof a == "function")
|
|
545
545
|
u = a.propTypes;
|
|
546
|
-
else if (typeof a == "object" && (a.$$typeof ===
|
|
546
|
+
else if (typeof a == "object" && (a.$$typeof === m || // Note: Memo only checks outer props here.
|
|
547
547
|
// Inner props are checked in the reconciler.
|
|
548
548
|
a.$$typeof === O))
|
|
549
549
|
u = a.propTypes;
|
|
@@ -552,24 +552,24 @@ Check the top-level render call using <` + u + ">.");
|
|
|
552
552
|
if (u) {
|
|
553
553
|
var v = V(a);
|
|
554
554
|
Qe(u, e.props, "prop", v, e);
|
|
555
|
-
} else if (a.PropTypes !== void 0 && !
|
|
556
|
-
|
|
555
|
+
} else if (a.PropTypes !== void 0 && !Ae) {
|
|
556
|
+
Ae = !0;
|
|
557
557
|
var N = V(a);
|
|
558
|
-
|
|
558
|
+
r("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
|
559
559
|
}
|
|
560
|
-
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved &&
|
|
560
|
+
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved && r("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function gr(e) {
|
|
564
564
|
{
|
|
565
565
|
for (var a = Object.keys(e.props), u = 0; u < a.length; u++) {
|
|
566
566
|
var v = a[u];
|
|
567
567
|
if (v !== "children" && v !== "key") {
|
|
568
|
-
ge(e),
|
|
568
|
+
ge(e), r("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), ge(null);
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
e.ref !== null && (ge(e),
|
|
572
|
+
e.ref !== null && (ge(e), r("Invalid attribute `ref` supplied to `React.Fragment`."), ge(null));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
var Ge = {};
|
|
@@ -579,58 +579,58 @@ Check the top-level render call using <` + u + ">.");
|
|
|
579
579
|
if (!T) {
|
|
580
580
|
var x = "";
|
|
581
581
|
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (x += " 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 Y =
|
|
582
|
+
var Y = dr();
|
|
583
583
|
Y ? x += Y : x += He();
|
|
584
584
|
var $;
|
|
585
|
-
e === null ? $ = "null" :
|
|
585
|
+
e === null ? $ = "null" : Se(e) ? $ = "array" : e !== void 0 && e.$$typeof === p ? ($ = "<" + (V(e.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof e, r("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, x);
|
|
586
586
|
}
|
|
587
|
-
var U =
|
|
587
|
+
var U = cr(e, a, u, N, L);
|
|
588
588
|
if (U == null)
|
|
589
589
|
return U;
|
|
590
590
|
if (T) {
|
|
591
591
|
var Q = a.children;
|
|
592
592
|
if (Q !== void 0)
|
|
593
593
|
if (v)
|
|
594
|
-
if (
|
|
594
|
+
if (Se(Q)) {
|
|
595
595
|
for (var he = 0; he < Q.length; he++)
|
|
596
596
|
We(Q[he], e);
|
|
597
597
|
Object.freeze && Object.freeze(Q);
|
|
598
598
|
} else
|
|
599
|
-
|
|
599
|
+
r("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
|
We(Q, e);
|
|
602
602
|
}
|
|
603
603
|
if (me.call(a, "key")) {
|
|
604
|
-
var de = V(e), K = Object.keys(a).filter(function(
|
|
605
|
-
return
|
|
606
|
-
}),
|
|
607
|
-
if (!Ge[de +
|
|
608
|
-
var
|
|
609
|
-
|
|
604
|
+
var de = V(e), K = Object.keys(a).filter(function(yr) {
|
|
605
|
+
return yr !== "key";
|
|
606
|
+
}), Re = K.length > 0 ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
|
+
if (!Ge[de + Re]) {
|
|
608
|
+
var Er = K.length > 0 ? "{" + K.join(": ..., ") + ": ...}" : "{}";
|
|
609
|
+
r(`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} />`,
|
|
614
|
+
<%s key={someKey} {...props} />`, Re, de, Er, de), Ge[de + Re] = !0;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
return e ===
|
|
617
|
+
return e === d ? gr(U) : fr(U), U;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function
|
|
620
|
+
function hr(e, a, u) {
|
|
621
621
|
return Ye(e, a, u, !0);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
623
|
+
function mr(e, a, u) {
|
|
624
624
|
return Ye(e, a, u, !1);
|
|
625
625
|
}
|
|
626
|
-
var
|
|
627
|
-
ve.Fragment =
|
|
626
|
+
var br = mr, vr = hr;
|
|
627
|
+
ve.Fragment = d, ve.jsx = br, ve.jsxs = vr;
|
|
628
628
|
}()), ve;
|
|
629
629
|
}
|
|
630
|
-
process.env.NODE_ENV === "production" ? Ie.exports =
|
|
630
|
+
process.env.NODE_ENV === "production" ? Ie.exports = Ar() : Ie.exports = Tr();
|
|
631
631
|
var h = Ie.exports, Je = { exports: {} };
|
|
632
|
-
(function(
|
|
633
|
-
var
|
|
632
|
+
(function(c) {
|
|
633
|
+
var p = typeof window < "u" ? window : typeof WorkerGlobalScope < "u" && self instanceof WorkerGlobalScope ? self : {};
|
|
634
634
|
/**
|
|
635
635
|
* Prism: Lightweight, robust, elegant syntax highlighting
|
|
636
636
|
*
|
|
@@ -639,8 +639,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
639
639
|
* @namespace
|
|
640
640
|
* @public
|
|
641
641
|
*/
|
|
642
|
-
var n = function(
|
|
643
|
-
var
|
|
642
|
+
var n = function(d) {
|
|
643
|
+
var b = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, k = 0, S = {}, l = {
|
|
644
644
|
/**
|
|
645
645
|
* By default, Prism will attempt to highlight all code elements (by calling {@link Prism.highlightAll}) on the
|
|
646
646
|
* current page after the page finished loading. This might be a problem if e.g. you wanted to asynchronously load
|
|
@@ -662,7 +662,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
662
662
|
* @memberof Prism
|
|
663
663
|
* @public
|
|
664
664
|
*/
|
|
665
|
-
manual:
|
|
665
|
+
manual: d.Prism && d.Prism.manual,
|
|
666
666
|
/**
|
|
667
667
|
* By default, if Prism is in a web worker, it assumes that it is in a worker it created itself, so it uses
|
|
668
668
|
* `addEventListener` to communicate with its parent instance. However, if you're using Prism manually in your
|
|
@@ -684,7 +684,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
684
684
|
* @memberof Prism
|
|
685
685
|
* @public
|
|
686
686
|
*/
|
|
687
|
-
disableWorkerMessageHandler:
|
|
687
|
+
disableWorkerMessageHandler: d.Prism && d.Prism.disableWorkerMessageHandler,
|
|
688
688
|
/**
|
|
689
689
|
* A namespace for utility methods.
|
|
690
690
|
*
|
|
@@ -695,8 +695,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
695
695
|
* @memberof Prism
|
|
696
696
|
*/
|
|
697
697
|
util: {
|
|
698
|
-
encode: function t
|
|
699
|
-
return
|
|
698
|
+
encode: function r(t) {
|
|
699
|
+
return t instanceof m ? new m(t.type, r(t.content), t.alias) : Array.isArray(t) ? t.map(r) : t.replace(/&/g, "&").replace(/</g, "<").replace(/\u00a0/g, " ");
|
|
700
700
|
},
|
|
701
701
|
/**
|
|
702
702
|
* Returns the name of the type of the given value.
|
|
@@ -714,8 +714,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
714
714
|
* type(String) === 'Function'
|
|
715
715
|
* type(/abc+/) === 'RegExp'
|
|
716
716
|
*/
|
|
717
|
-
type: function(
|
|
718
|
-
return Object.prototype.toString.call(
|
|
717
|
+
type: function(r) {
|
|
718
|
+
return Object.prototype.toString.call(r).slice(8, -1);
|
|
719
719
|
},
|
|
720
720
|
/**
|
|
721
721
|
* Returns a unique number for the given object. Later calls will still return the same number.
|
|
@@ -723,8 +723,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
723
723
|
* @param {Object} obj
|
|
724
724
|
* @returns {number}
|
|
725
725
|
*/
|
|
726
|
-
objId: function(
|
|
727
|
-
return
|
|
726
|
+
objId: function(r) {
|
|
727
|
+
return r.__id || Object.defineProperty(r, "__id", { value: ++k }), r.__id;
|
|
728
728
|
},
|
|
729
729
|
/**
|
|
730
730
|
* Creates a deep clone of the given object.
|
|
@@ -736,30 +736,30 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
736
736
|
* @returns {T}
|
|
737
737
|
* @template T
|
|
738
738
|
*/
|
|
739
|
-
clone: function t
|
|
739
|
+
clone: function r(t, i) {
|
|
740
740
|
i = i || {};
|
|
741
741
|
var s, o;
|
|
742
|
-
switch (l.util.type(
|
|
742
|
+
switch (l.util.type(t)) {
|
|
743
743
|
case "Object":
|
|
744
|
-
if (o = l.util.objId(
|
|
744
|
+
if (o = l.util.objId(t), i[o])
|
|
745
745
|
return i[o];
|
|
746
746
|
s = /** @type {Record<string, any>} */
|
|
747
747
|
{}, i[o] = s;
|
|
748
|
-
for (var
|
|
749
|
-
|
|
748
|
+
for (var f in t)
|
|
749
|
+
t.hasOwnProperty(f) && (s[f] = r(t[f], i));
|
|
750
750
|
return (
|
|
751
751
|
/** @type {any} */
|
|
752
752
|
s
|
|
753
753
|
);
|
|
754
754
|
case "Array":
|
|
755
|
-
return o = l.util.objId(
|
|
755
|
+
return o = l.util.objId(t), i[o] ? i[o] : (s = [], i[o] = s, /** @type {Array} */
|
|
756
756
|
/** @type {any} */
|
|
757
|
-
|
|
758
|
-
s[g] =
|
|
757
|
+
t.forEach(function(E, g) {
|
|
758
|
+
s[g] = r(E, i);
|
|
759
759
|
}), /** @type {any} */
|
|
760
760
|
s);
|
|
761
761
|
default:
|
|
762
|
-
return
|
|
762
|
+
return t;
|
|
763
763
|
}
|
|
764
764
|
},
|
|
765
765
|
/**
|
|
@@ -770,12 +770,12 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
770
770
|
* @param {Element} element
|
|
771
771
|
* @returns {string}
|
|
772
772
|
*/
|
|
773
|
-
getLanguage: function(
|
|
774
|
-
for (;
|
|
775
|
-
var
|
|
776
|
-
if (
|
|
777
|
-
return
|
|
778
|
-
|
|
773
|
+
getLanguage: function(r) {
|
|
774
|
+
for (; r; ) {
|
|
775
|
+
var t = b.exec(r.className);
|
|
776
|
+
if (t)
|
|
777
|
+
return t[1].toLowerCase();
|
|
778
|
+
r = r.parentElement;
|
|
779
779
|
}
|
|
780
780
|
return "none";
|
|
781
781
|
},
|
|
@@ -786,8 +786,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
786
786
|
* @param {string} language
|
|
787
787
|
* @returns {void}
|
|
788
788
|
*/
|
|
789
|
-
setLanguage: function(
|
|
790
|
-
|
|
789
|
+
setLanguage: function(r, t) {
|
|
790
|
+
r.className = r.className.replace(RegExp(b, "gi"), ""), r.classList.add("language-" + t);
|
|
791
791
|
},
|
|
792
792
|
/**
|
|
793
793
|
* Returns the script element that is currently executing.
|
|
@@ -807,12 +807,12 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
807
807
|
try {
|
|
808
808
|
throw new Error();
|
|
809
809
|
} catch (s) {
|
|
810
|
-
var
|
|
811
|
-
if (
|
|
812
|
-
var
|
|
813
|
-
for (var i in
|
|
814
|
-
if (
|
|
815
|
-
return
|
|
810
|
+
var r = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(s.stack) || [])[1];
|
|
811
|
+
if (r) {
|
|
812
|
+
var t = document.getElementsByTagName("script");
|
|
813
|
+
for (var i in t)
|
|
814
|
+
if (t[i].src == r)
|
|
815
|
+
return t[i];
|
|
816
816
|
}
|
|
817
817
|
return null;
|
|
818
818
|
}
|
|
@@ -836,14 +836,14 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
836
836
|
* @param {boolean} [defaultActivation=false]
|
|
837
837
|
* @returns {boolean}
|
|
838
838
|
*/
|
|
839
|
-
isActive: function(
|
|
840
|
-
for (var s = "no-" +
|
|
841
|
-
var o =
|
|
842
|
-
if (o.contains(
|
|
839
|
+
isActive: function(r, t, i) {
|
|
840
|
+
for (var s = "no-" + t; r; ) {
|
|
841
|
+
var o = r.classList;
|
|
842
|
+
if (o.contains(t))
|
|
843
843
|
return !0;
|
|
844
844
|
if (o.contains(s))
|
|
845
845
|
return !1;
|
|
846
|
-
|
|
846
|
+
r = r.parentElement;
|
|
847
847
|
}
|
|
848
848
|
return !!i;
|
|
849
849
|
}
|
|
@@ -891,10 +891,10 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
891
891
|
* 'color': /\b(?:red|green|blue)\b/
|
|
892
892
|
* });
|
|
893
893
|
*/
|
|
894
|
-
extend: function(
|
|
895
|
-
var i = l.util.clone(l.languages[
|
|
896
|
-
for (var s in
|
|
897
|
-
i[s] =
|
|
894
|
+
extend: function(r, t) {
|
|
895
|
+
var i = l.util.clone(l.languages[r]);
|
|
896
|
+
for (var s in t)
|
|
897
|
+
i[s] = t[s];
|
|
898
898
|
return i;
|
|
899
899
|
},
|
|
900
900
|
/**
|
|
@@ -972,31 +972,31 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
972
972
|
* @returns {Grammar} The new grammar object.
|
|
973
973
|
* @public
|
|
974
974
|
*/
|
|
975
|
-
insertBefore: function(
|
|
975
|
+
insertBefore: function(r, t, i, s) {
|
|
976
976
|
s = s || /** @type {any} */
|
|
977
977
|
l.languages;
|
|
978
|
-
var o = s[
|
|
978
|
+
var o = s[r], f = {};
|
|
979
979
|
for (var E in o)
|
|
980
980
|
if (o.hasOwnProperty(E)) {
|
|
981
|
-
if (E ==
|
|
981
|
+
if (E == t)
|
|
982
982
|
for (var g in i)
|
|
983
|
-
i.hasOwnProperty(g) && (
|
|
984
|
-
i.hasOwnProperty(E) || (
|
|
983
|
+
i.hasOwnProperty(g) && (f[g] = i[g]);
|
|
984
|
+
i.hasOwnProperty(E) || (f[E] = o[E]);
|
|
985
985
|
}
|
|
986
|
-
var C = s[
|
|
987
|
-
return s[
|
|
988
|
-
z === C && P !=
|
|
989
|
-
}),
|
|
986
|
+
var C = s[r];
|
|
987
|
+
return s[r] = f, l.languages.DFS(l.languages, function(P, z) {
|
|
988
|
+
z === C && P != r && (this[P] = f);
|
|
989
|
+
}), f;
|
|
990
990
|
},
|
|
991
991
|
// Traverse a language definition with Depth First Search
|
|
992
|
-
DFS: function t
|
|
992
|
+
DFS: function r(t, i, s, o) {
|
|
993
993
|
o = o || {};
|
|
994
|
-
var
|
|
995
|
-
for (var E in
|
|
996
|
-
if (
|
|
997
|
-
i.call(
|
|
998
|
-
var g =
|
|
999
|
-
C === "Object" && !o[
|
|
994
|
+
var f = l.util.objId;
|
|
995
|
+
for (var E in t)
|
|
996
|
+
if (t.hasOwnProperty(E)) {
|
|
997
|
+
i.call(t, E, t[E], s || E);
|
|
998
|
+
var g = t[E], C = l.util.type(g);
|
|
999
|
+
C === "Object" && !o[f(g)] ? (o[f(g)] = !0, r(g, i, null, o)) : C === "Array" && !o[f(g)] && (o[f(g)] = !0, r(g, i, E, o));
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
},
|
|
@@ -1013,8 +1013,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1013
1013
|
* @memberof Prism
|
|
1014
1014
|
* @public
|
|
1015
1015
|
*/
|
|
1016
|
-
highlightAll: function(
|
|
1017
|
-
l.highlightAllUnder(document,
|
|
1016
|
+
highlightAll: function(r, t) {
|
|
1017
|
+
l.highlightAllUnder(document, r, t);
|
|
1018
1018
|
},
|
|
1019
1019
|
/**
|
|
1020
1020
|
* Fetches all the descendants of `container` that have a `.language-xxxx` class and then calls
|
|
@@ -1031,15 +1031,15 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1031
1031
|
* @memberof Prism
|
|
1032
1032
|
* @public
|
|
1033
1033
|
*/
|
|
1034
|
-
highlightAllUnder: function(
|
|
1034
|
+
highlightAllUnder: function(r, t, i) {
|
|
1035
1035
|
var s = {
|
|
1036
1036
|
callback: i,
|
|
1037
|
-
container:
|
|
1037
|
+
container: r,
|
|
1038
1038
|
selector: 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code'
|
|
1039
1039
|
};
|
|
1040
1040
|
l.hooks.run("before-highlightall", s), s.elements = Array.prototype.slice.apply(s.container.querySelectorAll(s.selector)), l.hooks.run("before-all-elements-highlight", s);
|
|
1041
|
-
for (var o = 0,
|
|
1042
|
-
l.highlightElement(
|
|
1041
|
+
for (var o = 0, f; f = s.elements[o++]; )
|
|
1042
|
+
l.highlightElement(f, t === !0, s.callback);
|
|
1043
1043
|
},
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Highlights the code inside a single element.
|
|
@@ -1069,13 +1069,13 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1069
1069
|
* @memberof Prism
|
|
1070
1070
|
* @public
|
|
1071
1071
|
*/
|
|
1072
|
-
highlightElement: function(
|
|
1073
|
-
var s = l.util.getLanguage(
|
|
1074
|
-
l.util.setLanguage(
|
|
1075
|
-
var
|
|
1076
|
-
|
|
1077
|
-
var E =
|
|
1078
|
-
element:
|
|
1072
|
+
highlightElement: function(r, t, i) {
|
|
1073
|
+
var s = l.util.getLanguage(r), o = l.languages[s];
|
|
1074
|
+
l.util.setLanguage(r, s);
|
|
1075
|
+
var f = r.parentElement;
|
|
1076
|
+
f && f.nodeName.toLowerCase() === "pre" && l.util.setLanguage(f, s);
|
|
1077
|
+
var E = r.textContent, g = {
|
|
1078
|
+
element: r,
|
|
1079
1079
|
language: s,
|
|
1080
1080
|
grammar: o,
|
|
1081
1081
|
code: E
|
|
@@ -1083,7 +1083,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1083
1083
|
function C(z) {
|
|
1084
1084
|
g.highlightedCode = z, l.hooks.run("before-insert", g), g.element.innerHTML = g.highlightedCode, l.hooks.run("after-highlight", g), l.hooks.run("complete", g), i && i.call(g.element);
|
|
1085
1085
|
}
|
|
1086
|
-
if (l.hooks.run("before-sanity-check", g),
|
|
1086
|
+
if (l.hooks.run("before-sanity-check", g), f = g.element.parentElement, f && f.nodeName.toLowerCase() === "pre" && !f.hasAttribute("tabindex") && f.setAttribute("tabindex", "0"), !g.code) {
|
|
1087
1087
|
l.hooks.run("complete", g), i && i.call(g.element);
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
@@ -1091,7 +1091,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1091
1091
|
C(l.util.encode(g.code));
|
|
1092
1092
|
return;
|
|
1093
1093
|
}
|
|
1094
|
-
if (
|
|
1094
|
+
if (t && d.Worker) {
|
|
1095
1095
|
var P = new Worker(l.filename);
|
|
1096
1096
|
P.onmessage = function(z) {
|
|
1097
1097
|
C(z.data);
|
|
@@ -1123,15 +1123,15 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1123
1123
|
* @example
|
|
1124
1124
|
* Prism.highlight('var foo = true;', Prism.languages.javascript, 'javascript');
|
|
1125
1125
|
*/
|
|
1126
|
-
highlight: function(
|
|
1126
|
+
highlight: function(r, t, i) {
|
|
1127
1127
|
var s = {
|
|
1128
|
-
code:
|
|
1129
|
-
grammar:
|
|
1128
|
+
code: r,
|
|
1129
|
+
grammar: t,
|
|
1130
1130
|
language: i
|
|
1131
1131
|
};
|
|
1132
1132
|
if (l.hooks.run("before-tokenize", s), !s.grammar)
|
|
1133
1133
|
throw new Error('The language "' + s.language + '" has no grammar.');
|
|
1134
|
-
return s.tokens = l.tokenize(s.code, s.grammar), l.hooks.run("after-tokenize", s),
|
|
1134
|
+
return s.tokens = l.tokenize(s.code, s.grammar), l.hooks.run("after-tokenize", s), m.stringify(l.util.encode(s.tokens), s.language);
|
|
1135
1135
|
},
|
|
1136
1136
|
/**
|
|
1137
1137
|
* This is the heart of Prism, and the most low-level function you can use. It accepts a string of text as input
|
|
@@ -1157,15 +1157,15 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1157
1157
|
* }
|
|
1158
1158
|
* });
|
|
1159
1159
|
*/
|
|
1160
|
-
tokenize: function(
|
|
1161
|
-
var i =
|
|
1160
|
+
tokenize: function(r, t) {
|
|
1161
|
+
var i = t.rest;
|
|
1162
1162
|
if (i) {
|
|
1163
1163
|
for (var s in i)
|
|
1164
|
-
|
|
1165
|
-
delete
|
|
1164
|
+
t[s] = i[s];
|
|
1165
|
+
delete t.rest;
|
|
1166
1166
|
}
|
|
1167
1167
|
var o = new O();
|
|
1168
|
-
return D(o, o.head,
|
|
1168
|
+
return D(o, o.head, r), _(r, o, t, o.head, 0), B(o);
|
|
1169
1169
|
},
|
|
1170
1170
|
/**
|
|
1171
1171
|
* @namespace
|
|
@@ -1186,9 +1186,9 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1186
1186
|
* @param {HookCallback} callback The callback function which is given environment variables.
|
|
1187
1187
|
* @public
|
|
1188
1188
|
*/
|
|
1189
|
-
add: function(
|
|
1189
|
+
add: function(r, t) {
|
|
1190
1190
|
var i = l.hooks.all;
|
|
1191
|
-
i[
|
|
1191
|
+
i[r] = i[r] || [], i[r].push(t);
|
|
1192
1192
|
},
|
|
1193
1193
|
/**
|
|
1194
1194
|
* Runs a hook invoking all registered callbacks with the given environment variables.
|
|
@@ -1199,94 +1199,94 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1199
1199
|
* @param {Object<string, any>} env The environment variables of the hook passed to all callbacks registered.
|
|
1200
1200
|
* @public
|
|
1201
1201
|
*/
|
|
1202
|
-
run: function(
|
|
1203
|
-
var i = l.hooks.all[
|
|
1202
|
+
run: function(r, t) {
|
|
1203
|
+
var i = l.hooks.all[r];
|
|
1204
1204
|
if (!(!i || !i.length))
|
|
1205
1205
|
for (var s = 0, o; o = i[s++]; )
|
|
1206
|
-
o(
|
|
1206
|
+
o(t);
|
|
1207
1207
|
}
|
|
1208
1208
|
},
|
|
1209
|
-
Token:
|
|
1209
|
+
Token: m
|
|
1210
1210
|
};
|
|
1211
|
-
|
|
1212
|
-
function
|
|
1213
|
-
this.type =
|
|
1214
|
-
}
|
|
1215
|
-
|
|
1216
|
-
if (typeof
|
|
1217
|
-
return
|
|
1218
|
-
if (Array.isArray(
|
|
1211
|
+
d.Prism = l;
|
|
1212
|
+
function m(r, t, i, s) {
|
|
1213
|
+
this.type = r, this.content = t, this.alias = i, this.length = (s || "").length | 0;
|
|
1214
|
+
}
|
|
1215
|
+
m.stringify = function r(t, i) {
|
|
1216
|
+
if (typeof t == "string")
|
|
1217
|
+
return t;
|
|
1218
|
+
if (Array.isArray(t)) {
|
|
1219
1219
|
var s = "";
|
|
1220
|
-
return
|
|
1221
|
-
s +=
|
|
1220
|
+
return t.forEach(function(C) {
|
|
1221
|
+
s += r(C, i);
|
|
1222
1222
|
}), s;
|
|
1223
1223
|
}
|
|
1224
1224
|
var o = {
|
|
1225
|
-
type:
|
|
1226
|
-
content: t
|
|
1225
|
+
type: t.type,
|
|
1226
|
+
content: r(t.content, i),
|
|
1227
1227
|
tag: "span",
|
|
1228
|
-
classes: ["token",
|
|
1228
|
+
classes: ["token", t.type],
|
|
1229
1229
|
attributes: {},
|
|
1230
1230
|
language: i
|
|
1231
|
-
},
|
|
1232
|
-
|
|
1231
|
+
}, f = t.alias;
|
|
1232
|
+
f && (Array.isArray(f) ? Array.prototype.push.apply(o.classes, f) : o.classes.push(f)), l.hooks.run("wrap", o);
|
|
1233
1233
|
var E = "";
|
|
1234
1234
|
for (var g in o.attributes)
|
|
1235
1235
|
E += " " + g + '="' + (o.attributes[g] || "").replace(/"/g, """) + '"';
|
|
1236
1236
|
return "<" + o.tag + ' class="' + o.classes.join(" ") + '"' + E + ">" + o.content + "</" + o.tag + ">";
|
|
1237
1237
|
};
|
|
1238
|
-
function y(
|
|
1239
|
-
|
|
1240
|
-
var o =
|
|
1238
|
+
function y(r, t, i, s) {
|
|
1239
|
+
r.lastIndex = t;
|
|
1240
|
+
var o = r.exec(i);
|
|
1241
1241
|
if (o && s && o[1]) {
|
|
1242
|
-
var
|
|
1243
|
-
o.index +=
|
|
1242
|
+
var f = o[1].length;
|
|
1243
|
+
o.index += f, o[0] = o[0].slice(f);
|
|
1244
1244
|
}
|
|
1245
1245
|
return o;
|
|
1246
1246
|
}
|
|
1247
|
-
function _(
|
|
1247
|
+
function _(r, t, i, s, o, f) {
|
|
1248
1248
|
for (var E in i)
|
|
1249
1249
|
if (!(!i.hasOwnProperty(E) || !i[E])) {
|
|
1250
1250
|
var g = i[E];
|
|
1251
1251
|
g = Array.isArray(g) ? g : [g];
|
|
1252
1252
|
for (var C = 0; C < g.length; ++C) {
|
|
1253
|
-
if (
|
|
1253
|
+
if (f && f.cause == E + "," + C)
|
|
1254
1254
|
return;
|
|
1255
1255
|
var P = g[C], z = P.inside, V = !!P.lookbehind, W = !!P.greedy, ne = P.alias;
|
|
1256
1256
|
if (W && !P.pattern.global) {
|
|
1257
1257
|
var ce = P.pattern.toString().match(/[imsuy]*$/)[0];
|
|
1258
1258
|
P.pattern = RegExp(P.pattern.source, ce + "g");
|
|
1259
1259
|
}
|
|
1260
|
-
for (var ue = P.pattern || P, j = s.next, H = o; j !==
|
|
1260
|
+
for (var ue = P.pattern || P, j = s.next, H = o; j !== t.tail && !(f && H >= f.reach); H += j.value.length, j = j.next) {
|
|
1261
1261
|
var ee = j.value;
|
|
1262
|
-
if (
|
|
1262
|
+
if (t.length > r.length)
|
|
1263
1263
|
return;
|
|
1264
|
-
if (!(ee instanceof
|
|
1264
|
+
if (!(ee instanceof m)) {
|
|
1265
1265
|
var X = 1, G;
|
|
1266
1266
|
if (W) {
|
|
1267
|
-
if (G = y(ue, H,
|
|
1267
|
+
if (G = y(ue, H, r, V), !G || G.index >= r.length)
|
|
1268
1268
|
break;
|
|
1269
1269
|
var ae = G.index, pe = G.index + G[0].length, q = H;
|
|
1270
1270
|
for (q += j.value.length; ae >= q; )
|
|
1271
1271
|
j = j.next, q += j.value.length;
|
|
1272
|
-
if (q -= j.value.length, H = q, j.value instanceof
|
|
1272
|
+
if (q -= j.value.length, H = q, j.value instanceof m)
|
|
1273
1273
|
continue;
|
|
1274
|
-
for (var oe = j; oe !==
|
|
1274
|
+
for (var oe = j; oe !== t.tail && (q < pe || typeof oe.value == "string"); oe = oe.next)
|
|
1275
1275
|
X++, q += oe.value.length;
|
|
1276
|
-
X--, ee =
|
|
1276
|
+
X--, ee = r.slice(H, q), G.index -= H;
|
|
1277
1277
|
} else if (G = y(ue, 0, ee, V), !G)
|
|
1278
1278
|
continue;
|
|
1279
|
-
var ae = G.index, J = G[0], ie = ee.slice(0, ae), se = ee.slice(ae + J.length),
|
|
1280
|
-
|
|
1279
|
+
var ae = G.index, J = G[0], ie = ee.slice(0, ae), se = ee.slice(ae + J.length), re = H + ee.length;
|
|
1280
|
+
f && re > f.reach && (f.reach = re);
|
|
1281
1281
|
var A = j.prev;
|
|
1282
|
-
ie && (A = D(
|
|
1283
|
-
var M = new
|
|
1284
|
-
if (j = D(
|
|
1285
|
-
var
|
|
1282
|
+
ie && (A = D(t, A, ie), H += ie.length), I(t, A, X);
|
|
1283
|
+
var M = new m(E, z ? l.tokenize(J, z) : J, ne, J);
|
|
1284
|
+
if (j = D(t, A, M), se && D(t, j, se), X > 1) {
|
|
1285
|
+
var te = {
|
|
1286
1286
|
cause: E + "," + C,
|
|
1287
|
-
reach:
|
|
1287
|
+
reach: re
|
|
1288
1288
|
};
|
|
1289
|
-
_(
|
|
1289
|
+
_(r, t, i, j.prev, H, te), f && te.reach > f.reach && (f.reach = te.reach);
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
@@ -1294,27 +1294,27 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1294
1294
|
}
|
|
1295
1295
|
}
|
|
1296
1296
|
function O() {
|
|
1297
|
-
var
|
|
1298
|
-
|
|
1297
|
+
var r = { value: null, prev: null, next: null }, t = { value: null, prev: r, next: null };
|
|
1298
|
+
r.next = t, this.head = r, this.tail = t, this.length = 0;
|
|
1299
1299
|
}
|
|
1300
|
-
function D(
|
|
1301
|
-
var s =
|
|
1302
|
-
return
|
|
1300
|
+
function D(r, t, i) {
|
|
1301
|
+
var s = t.next, o = { value: i, prev: t, next: s };
|
|
1302
|
+
return t.next = o, s.prev = o, r.length++, o;
|
|
1303
1303
|
}
|
|
1304
|
-
function I(
|
|
1305
|
-
for (var s =
|
|
1304
|
+
function I(r, t, i) {
|
|
1305
|
+
for (var s = t.next, o = 0; o < i && s !== r.tail; o++)
|
|
1306
1306
|
s = s.next;
|
|
1307
|
-
|
|
1307
|
+
t.next = s, s.prev = t, r.length -= o;
|
|
1308
1308
|
}
|
|
1309
|
-
function B(
|
|
1310
|
-
for (var
|
|
1311
|
-
|
|
1312
|
-
return
|
|
1309
|
+
function B(r) {
|
|
1310
|
+
for (var t = [], i = r.head.next; i !== r.tail; )
|
|
1311
|
+
t.push(i.value), i = i.next;
|
|
1312
|
+
return t;
|
|
1313
1313
|
}
|
|
1314
|
-
if (!
|
|
1315
|
-
return
|
|
1316
|
-
var
|
|
1317
|
-
|
|
1314
|
+
if (!d.document)
|
|
1315
|
+
return d.addEventListener && (l.disableWorkerMessageHandler || d.addEventListener("message", function(r) {
|
|
1316
|
+
var t = JSON.parse(r.data), i = t.language, s = t.code, o = t.immediateClose;
|
|
1317
|
+
d.postMessage(l.highlight(s, l.languages[i], i)), o && d.close();
|
|
1318
1318
|
}, !1)), l;
|
|
1319
1319
|
var F = l.util.currentScript();
|
|
1320
1320
|
F && (l.filename = F.src, F.hasAttribute("data-manual") && (l.manual = !0));
|
|
@@ -1326,8 +1326,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1326
1326
|
R === "loading" || R === "interactive" && F && F.defer ? document.addEventListener("DOMContentLoaded", w) : window.requestAnimationFrame ? window.requestAnimationFrame(w) : window.setTimeout(w, 16);
|
|
1327
1327
|
}
|
|
1328
1328
|
return l;
|
|
1329
|
-
}(
|
|
1330
|
-
|
|
1329
|
+
}(p);
|
|
1330
|
+
c.exports && (c.exports = n), typeof Ve < "u" && (Ve.Prism = n), n.languages.markup = {
|
|
1331
1331
|
comment: {
|
|
1332
1332
|
pattern: /<!--(?:(?!<!--)[\s\S])*?-->/,
|
|
1333
1333
|
greedy: !0
|
|
@@ -1404,8 +1404,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1404
1404
|
},
|
|
1405
1405
|
/&#x?[\da-f]{1,8};/i
|
|
1406
1406
|
]
|
|
1407
|
-
}, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(
|
|
1408
|
-
|
|
1407
|
+
}, n.languages.markup.tag.inside["attr-value"].inside.entity = n.languages.markup.entity, n.languages.markup.doctype.inside["internal-subset"].inside = n.languages.markup, n.hooks.add("wrap", function(d) {
|
|
1408
|
+
d.type === "entity" && (d.attributes.title = d.content.replace(/&/, "&"));
|
|
1409
1409
|
}), Object.defineProperty(n.languages.markup.tag, "addInlined", {
|
|
1410
1410
|
/**
|
|
1411
1411
|
* Adds an inlined language to markup.
|
|
@@ -1418,7 +1418,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1418
1418
|
* @example
|
|
1419
1419
|
* addInlined('style', 'css');
|
|
1420
1420
|
*/
|
|
1421
|
-
value: function(
|
|
1421
|
+
value: function(b, k) {
|
|
1422
1422
|
var S = {};
|
|
1423
1423
|
S["language-" + k] = {
|
|
1424
1424
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
@@ -1435,15 +1435,15 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1435
1435
|
pattern: /[\s\S]+/,
|
|
1436
1436
|
inside: n.languages[k]
|
|
1437
1437
|
};
|
|
1438
|
-
var
|
|
1439
|
-
b
|
|
1438
|
+
var m = {};
|
|
1439
|
+
m[b] = {
|
|
1440
1440
|
pattern: RegExp(/(<__[^>]*>)(?:<!\[CDATA\[(?:[^\]]|\](?!\]>))*\]\]>|(?!<!\[CDATA\[)[\s\S])*?(?=<\/__>)/.source.replace(/__/g, function() {
|
|
1441
|
-
return
|
|
1441
|
+
return b;
|
|
1442
1442
|
}), "i"),
|
|
1443
1443
|
lookbehind: !0,
|
|
1444
1444
|
greedy: !0,
|
|
1445
1445
|
inside: l
|
|
1446
|
-
}, n.languages.insertBefore("markup", "cdata",
|
|
1446
|
+
}, n.languages.insertBefore("markup", "cdata", m);
|
|
1447
1447
|
}
|
|
1448
1448
|
}), Object.defineProperty(n.languages.markup.tag, "addAttribute", {
|
|
1449
1449
|
/**
|
|
@@ -1457,10 +1457,10 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1457
1457
|
* @example
|
|
1458
1458
|
* addAttribute('style', 'css');
|
|
1459
1459
|
*/
|
|
1460
|
-
value: function(
|
|
1460
|
+
value: function(d, b) {
|
|
1461
1461
|
n.languages.markup.tag.inside["special-attr"].push({
|
|
1462
1462
|
pattern: RegExp(
|
|
1463
|
-
/(^|["'\s])/.source + "(?:" +
|
|
1463
|
+
/(^|["'\s])/.source + "(?:" + d + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
|
|
1464
1464
|
"i"
|
|
1465
1465
|
),
|
|
1466
1466
|
lookbehind: !0,
|
|
@@ -1472,8 +1472,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1472
1472
|
value: {
|
|
1473
1473
|
pattern: /(^=\s*(["']|(?!["'])))\S[\s\S]*(?=\2$)/,
|
|
1474
1474
|
lookbehind: !0,
|
|
1475
|
-
alias: [
|
|
1476
|
-
inside: n.languages[
|
|
1475
|
+
alias: [b, "language-" + b],
|
|
1476
|
+
inside: n.languages[b]
|
|
1477
1477
|
},
|
|
1478
1478
|
punctuation: [
|
|
1479
1479
|
{
|
|
@@ -1487,12 +1487,12 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1487
1487
|
}
|
|
1488
1488
|
});
|
|
1489
1489
|
}
|
|
1490
|
-
}), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(
|
|
1491
|
-
var
|
|
1492
|
-
|
|
1490
|
+
}), n.languages.html = n.languages.markup, n.languages.mathml = n.languages.markup, n.languages.svg = n.languages.markup, n.languages.xml = n.languages.extend("markup", {}), n.languages.ssml = n.languages.xml, n.languages.atom = n.languages.xml, n.languages.rss = n.languages.xml, function(d) {
|
|
1491
|
+
var b = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
1492
|
+
d.languages.css = {
|
|
1493
1493
|
comment: /\/\*[\s\S]*?\*\//,
|
|
1494
1494
|
atrule: {
|
|
1495
|
-
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" +
|
|
1495
|
+
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + b.source + ")*?" + /(?:;|(?=\s*\{))/.source),
|
|
1496
1496
|
inside: {
|
|
1497
1497
|
rule: /^@[\w-]+/,
|
|
1498
1498
|
"selector-function-argument": {
|
|
@@ -1509,23 +1509,23 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1509
1509
|
},
|
|
1510
1510
|
url: {
|
|
1511
1511
|
// https://drafts.csswg.org/css-values-3/#urls
|
|
1512
|
-
pattern: RegExp("\\burl\\((?:" +
|
|
1512
|
+
pattern: RegExp("\\burl\\((?:" + b.source + "|" + /(?:[^\\\r\n()"']|\\[\s\S])*/.source + ")\\)", "i"),
|
|
1513
1513
|
greedy: !0,
|
|
1514
1514
|
inside: {
|
|
1515
1515
|
function: /^url/i,
|
|
1516
1516
|
punctuation: /^\(|\)$/,
|
|
1517
1517
|
string: {
|
|
1518
|
-
pattern: RegExp("^" +
|
|
1518
|
+
pattern: RegExp("^" + b.source + "$"),
|
|
1519
1519
|
alias: "url"
|
|
1520
1520
|
}
|
|
1521
1521
|
}
|
|
1522
1522
|
},
|
|
1523
1523
|
selector: {
|
|
1524
|
-
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` +
|
|
1524
|
+
pattern: RegExp(`(^|[{}\\s])[^{}\\s](?:[^{};"'\\s]|\\s+(?![\\s{])|` + b.source + ")*(?=\\s*\\{)"),
|
|
1525
1525
|
lookbehind: !0
|
|
1526
1526
|
},
|
|
1527
1527
|
string: {
|
|
1528
|
-
pattern:
|
|
1528
|
+
pattern: b,
|
|
1529
1529
|
greedy: !0
|
|
1530
1530
|
},
|
|
1531
1531
|
property: {
|
|
@@ -1538,8 +1538,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1538
1538
|
lookbehind: !0
|
|
1539
1539
|
},
|
|
1540
1540
|
punctuation: /[(){};:,]/
|
|
1541
|
-
},
|
|
1542
|
-
var k =
|
|
1541
|
+
}, d.languages.css.atrule.inside.rest = d.languages.css;
|
|
1542
|
+
var k = d.languages.markup;
|
|
1543
1543
|
k && (k.tag.addInlined("style", "css"), k.tag.addAttribute("style", "css"));
|
|
1544
1544
|
}(n), n.languages.clike = {
|
|
1545
1545
|
comment: [
|
|
@@ -1705,7 +1705,7 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1705
1705
|
if (typeof n > "u" || typeof document > "u")
|
|
1706
1706
|
return;
|
|
1707
1707
|
Element.prototype.matches || (Element.prototype.matches = Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector);
|
|
1708
|
-
var
|
|
1708
|
+
var d = "Loading…", b = function(F, w) {
|
|
1709
1709
|
return "✖ Error " + F + " while fetching file: " + w;
|
|
1710
1710
|
}, k = "✖ Error: File does not exist or is empty", S = {
|
|
1711
1711
|
js: "javascript",
|
|
@@ -1717,18 +1717,18 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1717
1717
|
bat: "batch",
|
|
1718
1718
|
h: "c",
|
|
1719
1719
|
tex: "latex"
|
|
1720
|
-
}, l = "data-src-status",
|
|
1720
|
+
}, l = "data-src-status", m = "loading", y = "loaded", _ = "failed", O = "pre[data-src]:not([" + l + '="' + y + '"]):not([' + l + '="' + m + '"])';
|
|
1721
1721
|
function D(F, w, R) {
|
|
1722
|
-
var
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
},
|
|
1722
|
+
var r = new XMLHttpRequest();
|
|
1723
|
+
r.open("GET", F, !0), r.onreadystatechange = function() {
|
|
1724
|
+
r.readyState == 4 && (r.status < 400 && r.responseText ? w(r.responseText) : r.status >= 400 ? R(b(r.status, r.statusText)) : R(k));
|
|
1725
|
+
}, r.send(null);
|
|
1726
1726
|
}
|
|
1727
1727
|
function I(F) {
|
|
1728
1728
|
var w = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(F || "");
|
|
1729
1729
|
if (w) {
|
|
1730
|
-
var R = Number(w[1]),
|
|
1731
|
-
return
|
|
1730
|
+
var R = Number(w[1]), r = w[2], t = w[3];
|
|
1731
|
+
return r ? t ? [R, Number(t)] : [R, void 0] : [R, R];
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
n.hooks.add("before-highlightall", function(F) {
|
|
@@ -1739,23 +1739,23 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1739
1739
|
F.element
|
|
1740
1740
|
);
|
|
1741
1741
|
if (w.matches(O)) {
|
|
1742
|
-
F.code = "", w.setAttribute(l,
|
|
1742
|
+
F.code = "", w.setAttribute(l, m);
|
|
1743
1743
|
var R = w.appendChild(document.createElement("CODE"));
|
|
1744
|
-
R.textContent =
|
|
1745
|
-
var
|
|
1746
|
-
if (
|
|
1747
|
-
var i = (/\.(\w+)$/.exec(
|
|
1748
|
-
|
|
1744
|
+
R.textContent = d;
|
|
1745
|
+
var r = w.getAttribute("data-src"), t = F.language;
|
|
1746
|
+
if (t === "none") {
|
|
1747
|
+
var i = (/\.(\w+)$/.exec(r) || [, "none"])[1];
|
|
1748
|
+
t = S[i] || i;
|
|
1749
1749
|
}
|
|
1750
|
-
n.util.setLanguage(R,
|
|
1750
|
+
n.util.setLanguage(R, t), n.util.setLanguage(w, t);
|
|
1751
1751
|
var s = n.plugins.autoloader;
|
|
1752
|
-
s && s.loadLanguages(
|
|
1753
|
-
|
|
1752
|
+
s && s.loadLanguages(t), D(
|
|
1753
|
+
r,
|
|
1754
1754
|
function(o) {
|
|
1755
1755
|
w.setAttribute(l, y);
|
|
1756
|
-
var
|
|
1757
|
-
if (
|
|
1758
|
-
var E = o.split(/\r\n?|\n/g), g =
|
|
1756
|
+
var f = I(w.getAttribute("data-range"));
|
|
1757
|
+
if (f) {
|
|
1758
|
+
var E = o.split(/\r\n?|\n/g), g = f[0], C = f[1] == null ? E.length : f[1];
|
|
1759
1759
|
g < 0 && (g += E.length), g = Math.max(0, Math.min(g - 1, E.length)), C < 0 && (C += E.length), C = Math.max(0, Math.min(C, E.length)), o = E.slice(g, C).join(`
|
|
1760
1760
|
`), w.hasAttribute("data-start") || w.setAttribute("data-start", String(g + 1));
|
|
1761
1761
|
}
|
|
@@ -1775,8 +1775,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1775
1775
|
* @param {ParentNode} [container=document]
|
|
1776
1776
|
*/
|
|
1777
1777
|
highlight: function(w) {
|
|
1778
|
-
for (var R = (w || document).querySelectorAll(O),
|
|
1779
|
-
n.highlightElement(
|
|
1778
|
+
for (var R = (w || document).querySelectorAll(O), r = 0, t; t = R[r++]; )
|
|
1779
|
+
n.highlightElement(t);
|
|
1780
1780
|
}
|
|
1781
1781
|
};
|
|
1782
1782
|
var B = !1;
|
|
@@ -1785,8 +1785,8 @@ var h = Ie.exports, Je = { exports: {} };
|
|
|
1785
1785
|
};
|
|
1786
1786
|
}();
|
|
1787
1787
|
})(Je);
|
|
1788
|
-
var
|
|
1789
|
-
const Ne = /* @__PURE__ */
|
|
1788
|
+
var Rr = Je.exports;
|
|
1789
|
+
const Ne = /* @__PURE__ */ wr(Rr);
|
|
1790
1790
|
Prism.languages.clike = {
|
|
1791
1791
|
comment: [
|
|
1792
1792
|
{
|
|
@@ -2044,8 +2044,8 @@ Prism.languages.insertBefore("go", "string", {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
});
|
|
2046
2046
|
delete Prism.languages.go["class-name"];
|
|
2047
|
-
(function(
|
|
2048
|
-
var
|
|
2047
|
+
(function(c) {
|
|
2048
|
+
var p = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record(?!\s*[(){}[\]<>=%~.:,;?+\-*/&|^])|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/, n = /(?:[a-z]\w*\s*\.\s*)*(?:[A-Z]\w*\s*\.\s*)*/.source, d = {
|
|
2049
2049
|
pattern: RegExp(/(^|[^\w.])/.source + n + /[A-Z](?:[\d_A-Z]*[a-z]\w*)?\b/.source),
|
|
2050
2050
|
lookbehind: !0,
|
|
2051
2051
|
inside: {
|
|
@@ -2058,32 +2058,32 @@ delete Prism.languages.go["class-name"];
|
|
|
2058
2058
|
punctuation: /\./
|
|
2059
2059
|
}
|
|
2060
2060
|
};
|
|
2061
|
-
|
|
2061
|
+
c.languages.java = c.languages.extend("clike", {
|
|
2062
2062
|
string: {
|
|
2063
2063
|
pattern: /(^|[^\\])"(?:\\.|[^"\\\r\n])*"/,
|
|
2064
2064
|
lookbehind: !0,
|
|
2065
2065
|
greedy: !0
|
|
2066
2066
|
},
|
|
2067
2067
|
"class-name": [
|
|
2068
|
-
|
|
2068
|
+
d,
|
|
2069
2069
|
{
|
|
2070
2070
|
// variables, parameters, and constructor references
|
|
2071
2071
|
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
2072
2072
|
pattern: RegExp(/(^|[^\w.])/.source + n + /[A-Z]\w*(?=\s+\w+\s*[;,=()]|\s*(?:\[[\s,]*\]\s*)?::\s*new\b)/.source),
|
|
2073
2073
|
lookbehind: !0,
|
|
2074
|
-
inside:
|
|
2074
|
+
inside: d.inside
|
|
2075
2075
|
},
|
|
2076
2076
|
{
|
|
2077
2077
|
// class names based on keyword
|
|
2078
2078
|
// this to support class names (or generic parameters) which do not contain a lower case letter (also works for methods)
|
|
2079
2079
|
pattern: RegExp(/(\b(?:class|enum|extends|implements|instanceof|interface|new|record|throws)\s+)/.source + n + /[A-Z]\w*\b/.source),
|
|
2080
2080
|
lookbehind: !0,
|
|
2081
|
-
inside:
|
|
2081
|
+
inside: d.inside
|
|
2082
2082
|
}
|
|
2083
2083
|
],
|
|
2084
|
-
keyword:
|
|
2084
|
+
keyword: p,
|
|
2085
2085
|
function: [
|
|
2086
|
-
|
|
2086
|
+
c.languages.clike.function,
|
|
2087
2087
|
{
|
|
2088
2088
|
pattern: /(::\s*)[a-z_]\w*/,
|
|
2089
2089
|
lookbehind: !0
|
|
@@ -2095,7 +2095,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2095
2095
|
lookbehind: !0
|
|
2096
2096
|
},
|
|
2097
2097
|
constant: /\b[A-Z][A-Z_\d]+\b/
|
|
2098
|
-
}),
|
|
2098
|
+
}), c.languages.insertBefore("java", "string", {
|
|
2099
2099
|
"triple-quoted-string": {
|
|
2100
2100
|
// http://openjdk.java.net/jeps/355#Description
|
|
2101
2101
|
pattern: /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/,
|
|
@@ -2106,7 +2106,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2106
2106
|
pattern: /'(?:\\.|[^'\\\r\n]){1,6}'/,
|
|
2107
2107
|
greedy: !0
|
|
2108
2108
|
}
|
|
2109
|
-
}),
|
|
2109
|
+
}), c.languages.insertBefore("java", "class-name", {
|
|
2110
2110
|
annotation: {
|
|
2111
2111
|
pattern: /(^|[^.])@\w+(?:\s*\.\s*\w+)*/,
|
|
2112
2112
|
lookbehind: !0,
|
|
@@ -2115,8 +2115,8 @@ delete Prism.languages.go["class-name"];
|
|
|
2115
2115
|
generics: {
|
|
2116
2116
|
pattern: /<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&)|<(?:[\w\s,.?]|&(?!&))*>)*>)*>)*>/,
|
|
2117
2117
|
inside: {
|
|
2118
|
-
"class-name":
|
|
2119
|
-
keyword:
|
|
2118
|
+
"class-name": d,
|
|
2119
|
+
keyword: p,
|
|
2120
2120
|
punctuation: /[<>(),.:]/,
|
|
2121
2121
|
operator: /[?&|]/
|
|
2122
2122
|
}
|
|
@@ -2126,7 +2126,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2126
2126
|
pattern: RegExp(/(\bimport\s+)/.source + n + /(?:[A-Z]\w*|\*)(?=\s*;)/.source),
|
|
2127
2127
|
lookbehind: !0,
|
|
2128
2128
|
inside: {
|
|
2129
|
-
namespace:
|
|
2129
|
+
namespace: d.inside.namespace,
|
|
2130
2130
|
punctuation: /\./,
|
|
2131
2131
|
operator: /\*/,
|
|
2132
2132
|
"class-name": /\w+/
|
|
@@ -2137,7 +2137,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2137
2137
|
lookbehind: !0,
|
|
2138
2138
|
alias: "static",
|
|
2139
2139
|
inside: {
|
|
2140
|
-
namespace:
|
|
2140
|
+
namespace: d.inside.namespace,
|
|
2141
2141
|
static: /\b\w+$/,
|
|
2142
2142
|
punctuation: /\./,
|
|
2143
2143
|
operator: /\*/,
|
|
@@ -2148,7 +2148,7 @@ delete Prism.languages.go["class-name"];
|
|
|
2148
2148
|
namespace: {
|
|
2149
2149
|
pattern: RegExp(
|
|
2150
2150
|
/(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)(?!<keyword>)[a-z]\w*(?:\.[a-z]\w*)*\.?/.source.replace(/<keyword>/g, function() {
|
|
2151
|
-
return
|
|
2151
|
+
return p.source;
|
|
2152
2152
|
})
|
|
2153
2153
|
),
|
|
2154
2154
|
lookbehind: !0,
|
|
@@ -2234,17 +2234,17 @@ Prism.languages.insertBefore("c", "function", {
|
|
|
2234
2234
|
constant: /\b(?:EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|__DATE__|__FILE__|__LINE__|__TIMESTAMP__|__TIME__|__func__|stderr|stdin|stdout)\b/
|
|
2235
2235
|
});
|
|
2236
2236
|
delete Prism.languages.c.boolean;
|
|
2237
|
-
(function(
|
|
2238
|
-
for (var
|
|
2239
|
-
|
|
2240
|
-
return
|
|
2237
|
+
(function(c) {
|
|
2238
|
+
for (var p = /\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|<self>)*\*\//.source, n = 0; n < 2; n++)
|
|
2239
|
+
p = p.replace(/<self>/g, function() {
|
|
2240
|
+
return p;
|
|
2241
2241
|
});
|
|
2242
|
-
|
|
2242
|
+
p = p.replace(/<self>/g, function() {
|
|
2243
2243
|
return /[^\s\S]/.source;
|
|
2244
|
-
}),
|
|
2244
|
+
}), c.languages.rust = {
|
|
2245
2245
|
comment: [
|
|
2246
2246
|
{
|
|
2247
|
-
pattern: RegExp(/(^|[^\\])/.source +
|
|
2247
|
+
pattern: RegExp(/(^|[^\\])/.source + p),
|
|
2248
2248
|
lookbehind: !0,
|
|
2249
2249
|
greedy: !0
|
|
2250
2250
|
},
|
|
@@ -2348,7 +2348,7 @@ delete Prism.languages.c.boolean;
|
|
|
2348
2348
|
boolean: /\b(?:false|true)\b/,
|
|
2349
2349
|
punctuation: /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/,
|
|
2350
2350
|
operator: /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/
|
|
2351
|
-
},
|
|
2351
|
+
}, c.languages.rust["closure-params"].inside.rest = c.languages.rust, c.languages.rust.attribute.inside.string = c.languages.rust.string;
|
|
2352
2352
|
})(Prism);
|
|
2353
2353
|
Prism.languages.sql = {
|
|
2354
2354
|
comment: {
|
|
@@ -2383,18 +2383,18 @@ Prism.languages.sql = {
|
|
|
2383
2383
|
operator: /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|DIV|ILIKE|IN|IS|LIKE|NOT|OR|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i,
|
|
2384
2384
|
punctuation: /[;[\]()`,.]/
|
|
2385
2385
|
};
|
|
2386
|
-
(function(
|
|
2387
|
-
var
|
|
2386
|
+
(function(c) {
|
|
2387
|
+
var p = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b", n = {
|
|
2388
2388
|
pattern: /(^(["']?)\w+\2)[ \t]+\S.*/,
|
|
2389
2389
|
lookbehind: !0,
|
|
2390
2390
|
alias: "punctuation",
|
|
2391
2391
|
// this looks reasonably well in all themes
|
|
2392
2392
|
inside: null
|
|
2393
2393
|
// see below
|
|
2394
|
-
},
|
|
2394
|
+
}, d = {
|
|
2395
2395
|
bash: n,
|
|
2396
2396
|
environment: {
|
|
2397
|
-
pattern: RegExp("\\$" +
|
|
2397
|
+
pattern: RegExp("\\$" + p),
|
|
2398
2398
|
alias: "constant"
|
|
2399
2399
|
},
|
|
2400
2400
|
variable: [
|
|
@@ -2434,7 +2434,7 @@ Prism.languages.sql = {
|
|
|
2434
2434
|
operator: /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/,
|
|
2435
2435
|
punctuation: /[\[\]]/,
|
|
2436
2436
|
environment: {
|
|
2437
|
-
pattern: RegExp("(\\{)" +
|
|
2437
|
+
pattern: RegExp("(\\{)" + p),
|
|
2438
2438
|
lookbehind: !0,
|
|
2439
2439
|
alias: "constant"
|
|
2440
2440
|
}
|
|
@@ -2445,7 +2445,7 @@ Prism.languages.sql = {
|
|
|
2445
2445
|
// Escape sequences from echo and printf's manuals, and escaped quotes.
|
|
2446
2446
|
entity: /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|U[0-9a-fA-F]{8}|u[0-9a-fA-F]{4}|x[0-9a-fA-F]{1,2})/
|
|
2447
2447
|
};
|
|
2448
|
-
|
|
2448
|
+
c.languages.bash = {
|
|
2449
2449
|
shebang: {
|
|
2450
2450
|
pattern: /^#!\s*\/.*/,
|
|
2451
2451
|
alias: "important"
|
|
@@ -2483,7 +2483,7 @@ Prism.languages.sql = {
|
|
|
2483
2483
|
pattern: /(^|[\s;|&]|[<>]\()\w+(?:\.\w+)*(?=\+?=)/,
|
|
2484
2484
|
inside: {
|
|
2485
2485
|
environment: {
|
|
2486
|
-
pattern: RegExp("(^|[\\s;|&]|[<>]\\()" +
|
|
2486
|
+
pattern: RegExp("(^|[\\s;|&]|[<>]\\()" + p),
|
|
2487
2487
|
lookbehind: !0,
|
|
2488
2488
|
alias: "constant"
|
|
2489
2489
|
}
|
|
@@ -2503,7 +2503,7 @@ Prism.languages.sql = {
|
|
|
2503
2503
|
pattern: /((?:^|[^<])<<-?\s*)(\w+)\s[\s\S]*?(?:\r?\n|\r)\2/,
|
|
2504
2504
|
lookbehind: !0,
|
|
2505
2505
|
greedy: !0,
|
|
2506
|
-
inside:
|
|
2506
|
+
inside: d
|
|
2507
2507
|
},
|
|
2508
2508
|
// Here-document with quotes around the tag
|
|
2509
2509
|
// → No expansion (so no “inside”).
|
|
@@ -2521,7 +2521,7 @@ Prism.languages.sql = {
|
|
|
2521
2521
|
pattern: /(^|[^\\](?:\\\\)*)"(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|[^"\\`$])*"/,
|
|
2522
2522
|
lookbehind: !0,
|
|
2523
2523
|
greedy: !0,
|
|
2524
|
-
inside:
|
|
2524
|
+
inside: d
|
|
2525
2525
|
},
|
|
2526
2526
|
{
|
|
2527
2527
|
// https://www.gnu.org/software/bash/manual/html_node/Single-Quotes.html
|
|
@@ -2534,15 +2534,15 @@ Prism.languages.sql = {
|
|
|
2534
2534
|
pattern: /\$'(?:[^'\\]|\\[\s\S])*'/,
|
|
2535
2535
|
greedy: !0,
|
|
2536
2536
|
inside: {
|
|
2537
|
-
entity:
|
|
2537
|
+
entity: d.entity
|
|
2538
2538
|
}
|
|
2539
2539
|
}
|
|
2540
2540
|
],
|
|
2541
2541
|
environment: {
|
|
2542
|
-
pattern: RegExp("\\$?" +
|
|
2542
|
+
pattern: RegExp("\\$?" + p),
|
|
2543
2543
|
alias: "constant"
|
|
2544
2544
|
},
|
|
2545
|
-
variable:
|
|
2545
|
+
variable: d.variable,
|
|
2546
2546
|
function: {
|
|
2547
2547
|
pattern: /(^|[\s;|&]|[<>]\()(?:add|apropos|apt|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|bzip2|cal|cargo|cat|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|column|comm|composer|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|docker|docker-compose|du|egrep|eject|env|ethtool|expand|expect|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|git|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|head|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|java|jobs|join|kill|killall|less|link|ln|locate|logname|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|node|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|pnpm|podman|podman-compose|popd|pr|printcap|printenv|ps|pushd|pv|quota|quotacheck|quotactl|ram|rar|rcp|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|sh|shellcheck|shuf|shutdown|sleep|slocate|sort|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|sysctl|tac|tail|tar|tee|time|timeout|top|touch|tr|traceroute|tsort|tty|umount|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|v|vcpkg|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yarn|yes|zenity|zip|zsh|zypper)(?=$|[)\s;|&])/,
|
|
2548
2548
|
lookbehind: !0
|
|
@@ -2581,8 +2581,8 @@ Prism.languages.sql = {
|
|
|
2581
2581
|
pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
|
|
2582
2582
|
lookbehind: !0
|
|
2583
2583
|
}
|
|
2584
|
-
}, n.inside =
|
|
2585
|
-
for (var
|
|
2584
|
+
}, n.inside = c.languages.bash;
|
|
2585
|
+
for (var b = [
|
|
2586
2586
|
"comment",
|
|
2587
2587
|
"function-name",
|
|
2588
2588
|
"for-or-select",
|
|
@@ -2598,9 +2598,9 @@ Prism.languages.sql = {
|
|
|
2598
2598
|
"operator",
|
|
2599
2599
|
"punctuation",
|
|
2600
2600
|
"number"
|
|
2601
|
-
], k =
|
|
2602
|
-
k[
|
|
2603
|
-
|
|
2601
|
+
], k = d.variable[1].inside, S = 0; S < b.length; S++)
|
|
2602
|
+
k[b[S]] = c.languages.bash[b[S]];
|
|
2603
|
+
c.languages.sh = c.languages.bash, c.languages.shell = c.languages.bash;
|
|
2604
2604
|
})(Prism);
|
|
2605
2605
|
Prism.languages.json = {
|
|
2606
2606
|
property: {
|
|
@@ -2627,18 +2627,8 @@ Prism.languages.json = {
|
|
|
2627
2627
|
}
|
|
2628
2628
|
};
|
|
2629
2629
|
Prism.languages.webmanifest = Prism.languages.json;
|
|
2630
|
-
function kt(d) {
|
|
2631
|
-
if (typeof document > "u") return;
|
|
2632
|
-
const f = d === "dark" ? "prism-okaidia" : "prism", n = document.getElementById("prism-theme-style"), c = `https://cdnjs.cloudflare.com/ajax/libs/prism/1.29.0/themes/${f}.min.css`;
|
|
2633
|
-
if (n)
|
|
2634
|
-
n.setAttribute("href", c);
|
|
2635
|
-
else {
|
|
2636
|
-
const m = document.createElement("link");
|
|
2637
|
-
m.id = "prism-theme-style", m.rel = "stylesheet", m.href = c, document.head.appendChild(m);
|
|
2638
|
-
}
|
|
2639
|
-
}
|
|
2640
2630
|
window.Prism = Ne;
|
|
2641
|
-
const
|
|
2631
|
+
const kr = {
|
|
2642
2632
|
javascript: "javascript",
|
|
2643
2633
|
js: "javascript",
|
|
2644
2634
|
typescript: "typescript",
|
|
@@ -2670,48 +2660,44 @@ const _t = {
|
|
|
2670
2660
|
markdown: "markdown",
|
|
2671
2661
|
md: "markdown"
|
|
2672
2662
|
};
|
|
2673
|
-
function
|
|
2674
|
-
const
|
|
2675
|
-
return
|
|
2663
|
+
function _r(c) {
|
|
2664
|
+
const p = document.createElement("div");
|
|
2665
|
+
return p.textContent = c, p.innerHTML;
|
|
2676
2666
|
}
|
|
2677
|
-
const
|
|
2678
|
-
value:
|
|
2679
|
-
language:
|
|
2667
|
+
const Fr = ({
|
|
2668
|
+
value: c,
|
|
2669
|
+
language: p,
|
|
2680
2670
|
theme: n = "dark",
|
|
2681
|
-
disabled:
|
|
2682
|
-
onChange:
|
|
2671
|
+
disabled: d = !1,
|
|
2672
|
+
onChange: b
|
|
2683
2673
|
}) => {
|
|
2684
|
-
const k =
|
|
2674
|
+
const k = Fe(null), S = Fe(null), l = Ee(() => kr[p.toLowerCase()] || "javascript", [p]), m = n === "dark" ? "#1e1e1e" : "#fafafa", y = Ee(() => {
|
|
2685
2675
|
try {
|
|
2686
2676
|
const I = Ne.languages[l];
|
|
2687
2677
|
if (I)
|
|
2688
|
-
return Ne.highlight(
|
|
2678
|
+
return Ne.highlight(c || "", I, l);
|
|
2689
2679
|
} catch {
|
|
2690
2680
|
}
|
|
2691
|
-
return
|
|
2692
|
-
}, [
|
|
2693
|
-
|
|
2681
|
+
return _r(c || "");
|
|
2682
|
+
}, [c, l]), _ = (I) => {
|
|
2683
|
+
b == null || b(I.target.value);
|
|
2694
2684
|
}, O = () => {
|
|
2695
2685
|
k.current && S.current && (S.current.scrollTop = k.current.scrollTop, S.current.scrollLeft = k.current.scrollLeft);
|
|
2696
|
-
}
|
|
2697
|
-
Se(() => {
|
|
2698
|
-
kt(n);
|
|
2699
|
-
}, [n]);
|
|
2700
|
-
const D = (I) => {
|
|
2686
|
+
}, D = (I) => {
|
|
2701
2687
|
if (I.key === "Tab") {
|
|
2702
2688
|
I.preventDefault();
|
|
2703
|
-
const B = I.target, F = B.selectionStart, w = B.selectionEnd, R =
|
|
2704
|
-
|
|
2689
|
+
const B = I.target, F = B.selectionStart, w = B.selectionEnd, R = c.substring(0, F) + " " + c.substring(w);
|
|
2690
|
+
b == null || b(R), requestAnimationFrame(() => {
|
|
2705
2691
|
B.selectionStart = B.selectionEnd = F + 2;
|
|
2706
2692
|
});
|
|
2707
2693
|
}
|
|
2708
2694
|
};
|
|
2709
|
-
return /* @__PURE__ */ h.jsxs("div", { className: `
|
|
2695
|
+
return /* @__PURE__ */ h.jsxs("div", { className: `hep-cr-editor theme-${n}`, style: { background: m }, children: [
|
|
2710
2696
|
/* @__PURE__ */ h.jsx(
|
|
2711
2697
|
"pre",
|
|
2712
2698
|
{
|
|
2713
2699
|
ref: S,
|
|
2714
|
-
className: `
|
|
2700
|
+
className: `hep-cr-highlight language-${l}`,
|
|
2715
2701
|
"aria-hidden": "true",
|
|
2716
2702
|
children: /* @__PURE__ */ h.jsx("code", { dangerouslySetInnerHTML: { __html: y } })
|
|
2717
2703
|
}
|
|
@@ -2720,9 +2706,9 @@ const Ot = ({
|
|
|
2720
2706
|
"textarea",
|
|
2721
2707
|
{
|
|
2722
2708
|
ref: k,
|
|
2723
|
-
className: "
|
|
2724
|
-
value:
|
|
2725
|
-
disabled:
|
|
2709
|
+
className: "hep-cr-input",
|
|
2710
|
+
value: c,
|
|
2711
|
+
disabled: d,
|
|
2726
2712
|
onChange: _,
|
|
2727
2713
|
onScroll: O,
|
|
2728
2714
|
onKeyDown: D,
|
|
@@ -2731,16 +2717,80 @@ const Ot = ({
|
|
|
2731
2717
|
}
|
|
2732
2718
|
)
|
|
2733
2719
|
] });
|
|
2734
|
-
}
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2720
|
+
}, Or = `
|
|
2721
|
+
.hep-cr-editor {
|
|
2722
|
+
position: relative;
|
|
2723
|
+
flex: 1;
|
|
2724
|
+
overflow: hidden;
|
|
2725
|
+
}
|
|
2726
|
+
|
|
2727
|
+
.hep-cr-highlight,
|
|
2728
|
+
.hep-cr-input {
|
|
2729
|
+
position: absolute;
|
|
2730
|
+
top: 0;
|
|
2731
|
+
left: 0;
|
|
2732
|
+
width: 100%;
|
|
2733
|
+
height: 100%;
|
|
2734
|
+
padding: 12px 16px;
|
|
2735
|
+
margin: 0;
|
|
2736
|
+
border: none;
|
|
2737
|
+
font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
2738
|
+
font-size: 14px;
|
|
2739
|
+
line-height: 1.6;
|
|
2740
|
+
white-space: pre;
|
|
2741
|
+
overflow: auto;
|
|
2742
|
+
}
|
|
2743
|
+
|
|
2744
|
+
.hep-cr-highlight {
|
|
2745
|
+
pointer-events: none;
|
|
2746
|
+
z-index: 1;
|
|
2747
|
+
}
|
|
2748
|
+
|
|
2749
|
+
.hep-cr-highlight.hep-cr-highlight {
|
|
2750
|
+
background: transparent !important;
|
|
2751
|
+
}
|
|
2752
|
+
|
|
2753
|
+
.hep-cr-highlight code {
|
|
2754
|
+
display: block;
|
|
2755
|
+
font-family: inherit;
|
|
2756
|
+
background: transparent !important;
|
|
2757
|
+
}
|
|
2758
|
+
|
|
2759
|
+
.hep-cr-input {
|
|
2760
|
+
position: relative;
|
|
2761
|
+
z-index: 2;
|
|
2762
|
+
background: transparent;
|
|
2763
|
+
color: transparent;
|
|
2764
|
+
caret-color: #d4d4d4;
|
|
2765
|
+
resize: none;
|
|
2766
|
+
outline: none;
|
|
2767
|
+
}
|
|
2768
|
+
|
|
2769
|
+
.hep-cr-input:disabled {
|
|
2770
|
+
opacity: 0.7;
|
|
2771
|
+
}
|
|
2772
|
+
|
|
2773
|
+
/* Light theme caret */
|
|
2774
|
+
.theme-light .hep-cr-input {
|
|
2775
|
+
caret-color: #333333;
|
|
2776
|
+
}
|
|
2777
|
+
`;
|
|
2778
|
+
if (typeof document < "u") {
|
|
2779
|
+
const c = "hep-cr-editor-styles";
|
|
2780
|
+
if (!document.getElementById(c)) {
|
|
2781
|
+
const p = document.createElement("style");
|
|
2782
|
+
p.id = c, p.textContent = Or, document.head.appendChild(p);
|
|
2783
|
+
}
|
|
2784
|
+
}
|
|
2785
|
+
var Ir = Object.defineProperty, Nr = (c, p, n) => p in c ? Ir(c, p, { enumerable: !0, configurable: !0, writable: !0, value: n }) : c[p] = n, Ze = (c, p, n) => Nr(c, typeof p != "symbol" ? p + "" : p, n);
|
|
2786
|
+
let ke = null;
|
|
2787
|
+
class Cr {
|
|
2788
|
+
constructor(p = {}) {
|
|
2789
|
+
Ze(this, "baseUrl"), Ze(this, "timeout"), this.baseUrl = p.pistonUrl || "/api/piston", this.timeout = p.timeout || 3e3;
|
|
2740
2790
|
}
|
|
2741
|
-
async getRuntimes(
|
|
2742
|
-
if (
|
|
2743
|
-
return
|
|
2791
|
+
async getRuntimes(p = !1) {
|
|
2792
|
+
if (ke && !p)
|
|
2793
|
+
return ke;
|
|
2744
2794
|
try {
|
|
2745
2795
|
const n = await fetch(`${this.baseUrl}/runtimes`, {
|
|
2746
2796
|
method: "GET",
|
|
@@ -2750,46 +2800,46 @@ class Ct {
|
|
|
2750
2800
|
});
|
|
2751
2801
|
if (!n.ok)
|
|
2752
2802
|
throw new Error(`Failed to fetch runtimes: ${n.statusText}`);
|
|
2753
|
-
const
|
|
2754
|
-
return
|
|
2803
|
+
const d = await n.json();
|
|
2804
|
+
return ke = d, d;
|
|
2755
2805
|
} catch (n) {
|
|
2756
2806
|
throw console.error("Failed to fetch runtimes:", n), n;
|
|
2757
2807
|
}
|
|
2758
2808
|
}
|
|
2759
|
-
async execute(
|
|
2760
|
-
const
|
|
2761
|
-
(
|
|
2809
|
+
async execute(p, n, d = {}) {
|
|
2810
|
+
const b = (await this.getRuntimes()).find(
|
|
2811
|
+
(m) => {
|
|
2762
2812
|
var y;
|
|
2763
|
-
return
|
|
2813
|
+
return m.language.toLowerCase() === p.toLowerCase() || ((y = m.aliases) == null ? void 0 : y.some((_) => _.toLowerCase() === p.toLowerCase()));
|
|
2764
2814
|
}
|
|
2765
2815
|
);
|
|
2766
|
-
if (!
|
|
2767
|
-
throw new Error(`Language '${
|
|
2768
|
-
const k = this.getFileName(
|
|
2769
|
-
language:
|
|
2770
|
-
version:
|
|
2816
|
+
if (!b)
|
|
2817
|
+
throw new Error(`Language '${p}' is not supported`);
|
|
2818
|
+
const k = this.getFileName(p), S = {
|
|
2819
|
+
language: b.language,
|
|
2820
|
+
version: d.version || b.version,
|
|
2771
2821
|
files: [
|
|
2772
2822
|
{
|
|
2773
2823
|
name: k,
|
|
2774
2824
|
content: n
|
|
2775
2825
|
}
|
|
2776
2826
|
],
|
|
2777
|
-
stdin:
|
|
2778
|
-
args:
|
|
2779
|
-
run_timeout:
|
|
2827
|
+
stdin: d.stdin || "",
|
|
2828
|
+
args: d.args || [],
|
|
2829
|
+
run_timeout: d.runTimeout || this.timeout,
|
|
2780
2830
|
compile_timeout: this.timeout
|
|
2781
2831
|
}, l = Date.now();
|
|
2782
2832
|
try {
|
|
2783
|
-
const
|
|
2833
|
+
const m = await fetch(`${this.baseUrl}/execute`, {
|
|
2784
2834
|
method: "POST",
|
|
2785
2835
|
headers: {
|
|
2786
2836
|
"Content-Type": "application/json"
|
|
2787
2837
|
},
|
|
2788
2838
|
body: JSON.stringify(S)
|
|
2789
2839
|
});
|
|
2790
|
-
if (!
|
|
2791
|
-
throw new Error(`Execute failed: ${
|
|
2792
|
-
const y = await
|
|
2840
|
+
if (!m.ok)
|
|
2841
|
+
throw new Error(`Execute failed: ${m.statusText}`);
|
|
2842
|
+
const y = await m.json(), _ = Date.now() - l, O = y.run.stdout || "", D = y.run.stderr || "";
|
|
2793
2843
|
return {
|
|
2794
2844
|
success: y.run.code === 0,
|
|
2795
2845
|
output: O,
|
|
@@ -2802,17 +2852,17 @@ class Ct {
|
|
|
2802
2852
|
code: y.compile.code
|
|
2803
2853
|
} : void 0
|
|
2804
2854
|
};
|
|
2805
|
-
} catch (
|
|
2855
|
+
} catch (m) {
|
|
2806
2856
|
return {
|
|
2807
2857
|
success: !1,
|
|
2808
2858
|
output: "",
|
|
2809
|
-
stderr:
|
|
2859
|
+
stderr: m instanceof Error ? m.message : "Unknown error",
|
|
2810
2860
|
code: -1,
|
|
2811
2861
|
executionTime: Date.now() - l
|
|
2812
2862
|
};
|
|
2813
2863
|
}
|
|
2814
2864
|
}
|
|
2815
|
-
getFileName(
|
|
2865
|
+
getFileName(p) {
|
|
2816
2866
|
return {
|
|
2817
2867
|
javascript: "main.js",
|
|
2818
2868
|
typescript: "main.ts",
|
|
@@ -2839,10 +2889,10 @@ class Ct {
|
|
|
2839
2889
|
css: "style.css",
|
|
2840
2890
|
sql: "query.sql",
|
|
2841
2891
|
markdown: "readme.md"
|
|
2842
|
-
}[
|
|
2892
|
+
}[p.toLowerCase()] || `main.${p}`;
|
|
2843
2893
|
}
|
|
2844
2894
|
}
|
|
2845
|
-
const
|
|
2895
|
+
const Lr = {
|
|
2846
2896
|
javascript: 'console.log("Hello, World!");',
|
|
2847
2897
|
typescript: 'console.log("Hello, World!");',
|
|
2848
2898
|
python: 'print("Hello, World!")',
|
|
@@ -2940,29 +2990,29 @@ h1 {
|
|
|
2940
2990
|
|
|
2941
2991
|
This is a sample markdown document.`
|
|
2942
2992
|
};
|
|
2943
|
-
function
|
|
2944
|
-
const
|
|
2945
|
-
return
|
|
2993
|
+
function _e(c) {
|
|
2994
|
+
const p = c.toLowerCase();
|
|
2995
|
+
return Lr[p] || `// ${c}
|
|
2946
2996
|
// Write your code here`;
|
|
2947
2997
|
}
|
|
2948
|
-
const
|
|
2949
|
-
pistonUrl:
|
|
2950
|
-
language:
|
|
2998
|
+
const Pr = ({
|
|
2999
|
+
pistonUrl: c = "/api/piston",
|
|
3000
|
+
language: p = "javascript",
|
|
2951
3001
|
theme: n = "light",
|
|
2952
|
-
showLanguageSelector:
|
|
2953
|
-
showEditor:
|
|
3002
|
+
showLanguageSelector: d = !0,
|
|
3003
|
+
showEditor: b = !0,
|
|
2954
3004
|
editable: k = !0,
|
|
2955
3005
|
defaultCode: S = "",
|
|
2956
3006
|
executorLabel: l = "运行",
|
|
2957
|
-
onExecuteStart:
|
|
3007
|
+
onExecuteStart: m,
|
|
2958
3008
|
onExecuteEnd: y,
|
|
2959
3009
|
onLanguageChange: _
|
|
2960
3010
|
}) => {
|
|
2961
|
-
const [O, D] = Z([]), [I, B] = Z(
|
|
3011
|
+
const [O, D] = Z([]), [I, B] = Z(p), [F, w] = Z(n), [R, r] = Z(S), [t, i] = Z(""), [s, o] = Z(""), [f, E] = Z(!1), [g, C] = Z(null), [P, z] = Z("stdout"), [V, W] = Z(null), [ne, ce] = Z(!0), [ue, j] = Z(60), H = Ee(() => new Cr({ pistonUrl: c }), [c]), ee = Ee(() => O.map((A) => ({
|
|
2962
3012
|
value: `${A.language}:${A.version}`,
|
|
2963
3013
|
label: `${A.language.charAt(0).toUpperCase() + A.language.slice(1)} ${A.version}`
|
|
2964
3014
|
})), [O]), X = Ee(() => I.includes(":") ? I.split(":")[0] : I, [I]);
|
|
2965
|
-
|
|
3015
|
+
Oe(() => {
|
|
2966
3016
|
async function A() {
|
|
2967
3017
|
ce(!0), W(null);
|
|
2968
3018
|
try {
|
|
@@ -2975,20 +3025,20 @@ const Pt = ({
|
|
|
2975
3025
|
}
|
|
2976
3026
|
}
|
|
2977
3027
|
A();
|
|
2978
|
-
}, [H]),
|
|
2979
|
-
!R && O.length > 0 &&
|
|
3028
|
+
}, [H]), Oe(() => {
|
|
3029
|
+
!R && O.length > 0 && r(S || _e(X));
|
|
2980
3030
|
}, [O, R, S, X]);
|
|
2981
3031
|
const G = le(
|
|
2982
3032
|
(A) => {
|
|
2983
|
-
const M = A.target.value,
|
|
3033
|
+
const M = A.target.value, te = M.includes(":") ? M.split(":")[0] : M;
|
|
2984
3034
|
B(M);
|
|
2985
|
-
const fe =
|
|
2986
|
-
|
|
3035
|
+
const fe = _e(te);
|
|
3036
|
+
r(fe), _ == null || _(te, fe);
|
|
2987
3037
|
},
|
|
2988
3038
|
[_]
|
|
2989
3039
|
), pe = le(async () => {
|
|
2990
|
-
if (!
|
|
2991
|
-
E(!0), i(""), o(""), C(null), W(null), z("stdout"),
|
|
3040
|
+
if (!f) {
|
|
3041
|
+
E(!0), i(""), o(""), C(null), W(null), z("stdout"), m == null || m();
|
|
2992
3042
|
try {
|
|
2993
3043
|
const A = await H.execute(X, R);
|
|
2994
3044
|
i(A.output), o(A.stderr), C(A.executionTime || null), z(A.stderr ? "stderr" : "stdout"), y == null || y(A);
|
|
@@ -3004,57 +3054,57 @@ const Pt = ({
|
|
|
3004
3054
|
E(!1);
|
|
3005
3055
|
}
|
|
3006
3056
|
}
|
|
3007
|
-
}, [
|
|
3057
|
+
}, [f, I, R, H, m, y]), q = le(() => {
|
|
3008
3058
|
i(""), o(""), C(null), W(null);
|
|
3009
3059
|
}, []), oe = le(async () => {
|
|
3010
|
-
const A = P === "stdout" ?
|
|
3060
|
+
const A = P === "stdout" ? t : s;
|
|
3011
3061
|
await navigator.clipboard.writeText(A);
|
|
3012
|
-
}, [P,
|
|
3013
|
-
|
|
3014
|
-
}, [I]), J =
|
|
3015
|
-
J.current = !0, document.addEventListener("mousemove", se), document.addEventListener("mouseup",
|
|
3062
|
+
}, [P, t, s]), ae = le(() => {
|
|
3063
|
+
r(_e(X));
|
|
3064
|
+
}, [I]), J = Fe(!1), ie = le((A) => {
|
|
3065
|
+
J.current = !0, document.addEventListener("mousemove", se), document.addEventListener("mouseup", re), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
3016
3066
|
}, []), se = le((A) => {
|
|
3017
3067
|
if (!J.current) return;
|
|
3018
|
-
const M = document.querySelector(".
|
|
3068
|
+
const M = document.querySelector(".hep-cr-main");
|
|
3019
3069
|
if (!M) return;
|
|
3020
|
-
const
|
|
3070
|
+
const te = M.getBoundingClientRect(), fe = (A.clientX - te.left) / te.width * 100;
|
|
3021
3071
|
j(Math.max(20, Math.min(80, fe)));
|
|
3022
|
-
}, []),
|
|
3023
|
-
J.current = !1, document.removeEventListener("mousemove", se), document.removeEventListener("mouseup",
|
|
3072
|
+
}, []), re = le(() => {
|
|
3073
|
+
J.current = !1, document.removeEventListener("mousemove", se), document.removeEventListener("mouseup", re), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
3024
3074
|
}, [se]);
|
|
3025
|
-
return /* @__PURE__ */ h.jsxs("div", { className: `
|
|
3026
|
-
/* @__PURE__ */ h.jsxs("div", { className: "
|
|
3027
|
-
/* @__PURE__ */ h.jsx("div", { className: "
|
|
3075
|
+
return /* @__PURE__ */ h.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${F}`, children: [
|
|
3076
|
+
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-header", children: [
|
|
3077
|
+
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-controls", children: d && /* @__PURE__ */ h.jsxs(
|
|
3028
3078
|
"select",
|
|
3029
3079
|
{
|
|
3030
3080
|
value: I,
|
|
3031
3081
|
onChange: G,
|
|
3032
|
-
className: "language-select",
|
|
3033
|
-
disabled:
|
|
3082
|
+
className: "hep-cr-language-select",
|
|
3083
|
+
disabled: f,
|
|
3034
3084
|
children: [
|
|
3035
3085
|
ne && /* @__PURE__ */ h.jsx("option", { value: "", children: "加载中..." }),
|
|
3036
3086
|
ee.map((A) => /* @__PURE__ */ h.jsx("option", { value: A.value, children: A.label }, A.value))
|
|
3037
3087
|
]
|
|
3038
3088
|
}
|
|
3039
3089
|
) }),
|
|
3040
|
-
/* @__PURE__ */ h.jsxs("div", { className: "
|
|
3090
|
+
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-actions", children: [
|
|
3041
3091
|
/* @__PURE__ */ h.jsxs(
|
|
3042
3092
|
"button",
|
|
3043
3093
|
{
|
|
3044
|
-
className: "btn btn-run",
|
|
3045
|
-
disabled:
|
|
3094
|
+
className: "hep-cr-btn hep-cr-btn-run",
|
|
3095
|
+
disabled: f || ne,
|
|
3046
3096
|
onClick: pe,
|
|
3047
3097
|
children: [
|
|
3048
|
-
|
|
3049
|
-
|
|
3098
|
+
f ? /* @__PURE__ */ h.jsx("span", { className: "hep-cr-spinner" }) : /* @__PURE__ */ h.jsx("span", { className: "hep-cr-run-icon", children: "▶" }),
|
|
3099
|
+
f ? "运行中..." : l
|
|
3050
3100
|
]
|
|
3051
3101
|
}
|
|
3052
3102
|
),
|
|
3053
|
-
|
|
3103
|
+
b && k && /* @__PURE__ */ h.jsx("button", { className: "hep-cr-btn hep-cr-btn-reset", onClick: ae, children: "重置" }),
|
|
3054
3104
|
/* @__PURE__ */ h.jsx(
|
|
3055
3105
|
"button",
|
|
3056
3106
|
{
|
|
3057
|
-
className: "btn btn-theme",
|
|
3107
|
+
className: "hep-cr-btn hep-cr-btn-theme",
|
|
3058
3108
|
onClick: () => w(F === "light" ? "dark" : "light"),
|
|
3059
3109
|
title: F === "light" ? "Switch to dark mode" : "Switch to light mode",
|
|
3060
3110
|
children: F === "light" ? "🌙" : "☀️"
|
|
@@ -3062,37 +3112,37 @@ const Pt = ({
|
|
|
3062
3112
|
)
|
|
3063
3113
|
] })
|
|
3064
3114
|
] }),
|
|
3065
|
-
V && /* @__PURE__ */ h.jsx("div", { className: "error-message", children: V }),
|
|
3066
|
-
/* @__PURE__ */ h.jsxs("div", { className: "
|
|
3067
|
-
|
|
3068
|
-
/* @__PURE__ */ h.jsxs("div", { className: "panel-header", children: [
|
|
3069
|
-
/* @__PURE__ */ h.jsx("span", { className: "panel-title", children: "编辑器" }),
|
|
3070
|
-
/* @__PURE__ */ h.jsx("span", { className: "language-badge", children: X })
|
|
3115
|
+
V && /* @__PURE__ */ h.jsx("div", { className: "hep-cr-error-message", children: V }),
|
|
3116
|
+
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-main", children: [
|
|
3117
|
+
b && /* @__PURE__ */ h.jsxs("div", { className: "hep-cr-editor-panel", style: { width: `${ue}%` }, children: [
|
|
3118
|
+
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3119
|
+
/* @__PURE__ */ h.jsx("span", { className: "hep-cr-panel-title", children: "编辑器" }),
|
|
3120
|
+
/* @__PURE__ */ h.jsx("span", { className: "hep-cr-language-badge", children: X })
|
|
3071
3121
|
] }),
|
|
3072
3122
|
/* @__PURE__ */ h.jsx(
|
|
3073
|
-
|
|
3123
|
+
Fr,
|
|
3074
3124
|
{
|
|
3075
3125
|
value: R,
|
|
3076
3126
|
language: X,
|
|
3077
3127
|
theme: F,
|
|
3078
|
-
disabled: !k ||
|
|
3079
|
-
onChange:
|
|
3128
|
+
disabled: !k || f,
|
|
3129
|
+
onChange: r
|
|
3080
3130
|
}
|
|
3081
3131
|
)
|
|
3082
3132
|
] }),
|
|
3083
|
-
|
|
3133
|
+
b && /* @__PURE__ */ h.jsx("div", { className: "hep-cr-resize-handle", onMouseDown: ie, children: /* @__PURE__ */ h.jsx("div", { className: "hep-cr-resize-line" }) }),
|
|
3084
3134
|
/* @__PURE__ */ h.jsxs(
|
|
3085
3135
|
"div",
|
|
3086
3136
|
{
|
|
3087
|
-
className: "output-panel",
|
|
3088
|
-
style: { width:
|
|
3137
|
+
className: "hep-cr-output-panel",
|
|
3138
|
+
style: { width: b ? `${100 - ue}%` : "100%" },
|
|
3089
3139
|
children: [
|
|
3090
|
-
/* @__PURE__ */ h.jsxs("div", { className: "panel-header", children: [
|
|
3091
|
-
/* @__PURE__ */ h.jsxs("div", { className: "output-tabs", children: [
|
|
3140
|
+
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3141
|
+
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-output-tabs", children: [
|
|
3092
3142
|
/* @__PURE__ */ h.jsx(
|
|
3093
3143
|
"button",
|
|
3094
3144
|
{
|
|
3095
|
-
className: `tab ${P === "stdout" ? "active" : ""}`,
|
|
3145
|
+
className: `hep-cr-tab ${P === "stdout" ? "active" : ""}`,
|
|
3096
3146
|
onClick: () => z("stdout"),
|
|
3097
3147
|
children: "输出"
|
|
3098
3148
|
}
|
|
@@ -3100,18 +3150,18 @@ const Pt = ({
|
|
|
3100
3150
|
s && /* @__PURE__ */ h.jsx(
|
|
3101
3151
|
"button",
|
|
3102
3152
|
{
|
|
3103
|
-
className: `tab ${P === "stderr" ? "active" : ""}`,
|
|
3153
|
+
className: `hep-cr-tab ${P === "stderr" ? "active" : ""}`,
|
|
3104
3154
|
onClick: () => z("stderr"),
|
|
3105
3155
|
children: "错误"
|
|
3106
3156
|
}
|
|
3107
3157
|
)
|
|
3108
3158
|
] }),
|
|
3109
|
-
/* @__PURE__ */ h.jsxs("div", { className: "output-actions", children: [
|
|
3110
|
-
g !== null && /* @__PURE__ */ h.jsxs("span", { className: "execution-time", children: [
|
|
3159
|
+
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-output-actions", children: [
|
|
3160
|
+
g !== null && /* @__PURE__ */ h.jsxs("span", { className: "hep-cr-execution-time", children: [
|
|
3111
3161
|
g,
|
|
3112
3162
|
"ms"
|
|
3113
3163
|
] }),
|
|
3114
|
-
/* @__PURE__ */ h.jsx("button", { className: "btn-icon", onClick: oe, title: "复制", children: /* @__PURE__ */ h.jsxs(
|
|
3164
|
+
/* @__PURE__ */ h.jsx("button", { className: "hep-cr-btn-icon", onClick: oe, title: "复制", children: /* @__PURE__ */ h.jsxs(
|
|
3115
3165
|
"svg",
|
|
3116
3166
|
{
|
|
3117
3167
|
width: "14",
|
|
@@ -3126,7 +3176,7 @@ const Pt = ({
|
|
|
3126
3176
|
]
|
|
3127
3177
|
}
|
|
3128
3178
|
) }),
|
|
3129
|
-
/* @__PURE__ */ h.jsx("button", { className: "btn-icon", onClick: q, title: "清除", children: /* @__PURE__ */ h.jsxs(
|
|
3179
|
+
/* @__PURE__ */ h.jsx("button", { className: "hep-cr-btn-icon", onClick: q, title: "清除", children: /* @__PURE__ */ h.jsxs(
|
|
3130
3180
|
"svg",
|
|
3131
3181
|
{
|
|
3132
3182
|
width: "14",
|
|
@@ -3143,13 +3193,13 @@ const Pt = ({
|
|
|
3143
3193
|
) })
|
|
3144
3194
|
] })
|
|
3145
3195
|
] }),
|
|
3146
|
-
/* @__PURE__ */ h.jsx("div", { className: "output-content", children: /* @__PURE__ */ h.jsx("pre", { children: P === "stdout" ?
|
|
3196
|
+
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-output-content", children: /* @__PURE__ */ h.jsx("pre", { children: P === "stdout" ? t || '点击"运行"执行代码' : s }) })
|
|
3147
3197
|
]
|
|
3148
3198
|
}
|
|
3149
3199
|
)
|
|
3150
3200
|
] }),
|
|
3151
3201
|
/* @__PURE__ */ h.jsx("style", { children: `
|
|
3152
|
-
.
|
|
3202
|
+
.hep-cr-runner {
|
|
3153
3203
|
display: flex;
|
|
3154
3204
|
flex-direction: column;
|
|
3155
3205
|
border: 1px solid #e0e0e0;
|
|
@@ -3157,9 +3207,9 @@ const Pt = ({
|
|
|
3157
3207
|
overflow: hidden;
|
|
3158
3208
|
font-family: 'SF Mono', 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
|
|
3159
3209
|
}
|
|
3160
|
-
.
|
|
3161
|
-
.
|
|
3162
|
-
.
|
|
3210
|
+
.hep-cr-runner-dark { background: #1e1e1e; border-color: #333; }
|
|
3211
|
+
.hep-cr-runner-light { background: #ffffff; }
|
|
3212
|
+
.hep-cr-header {
|
|
3163
3213
|
display: flex;
|
|
3164
3214
|
justify-content: space-between;
|
|
3165
3215
|
align-items: center;
|
|
@@ -3167,9 +3217,9 @@ const Pt = ({
|
|
|
3167
3217
|
background: #252526;
|
|
3168
3218
|
border-bottom: 1px solid #333;
|
|
3169
3219
|
}
|
|
3170
|
-
.
|
|
3171
|
-
.
|
|
3172
|
-
.language-select {
|
|
3220
|
+
.hep-cr-runner-light .hep-cr-header { background: #f3f3f3; border-color: #e0e0e0; }
|
|
3221
|
+
.hep-cr-controls { display: flex; gap: 8px; }
|
|
3222
|
+
.hep-cr-language-select {
|
|
3173
3223
|
padding: 6px 12px;
|
|
3174
3224
|
border: 1px solid #444;
|
|
3175
3225
|
border-radius: 6px;
|
|
@@ -3179,10 +3229,10 @@ const Pt = ({
|
|
|
3179
3229
|
cursor: pointer;
|
|
3180
3230
|
outline: none;
|
|
3181
3231
|
}
|
|
3182
|
-
.
|
|
3183
|
-
.language-select:focus { border-color: #4fc3f7; }
|
|
3184
|
-
.
|
|
3185
|
-
.btn {
|
|
3232
|
+
.hep-cr-runner-light .hep-cr-language-select { background: white; color: #333; border-color: #ccc; }
|
|
3233
|
+
.hep-cr-language-select:focus { border-color: #4fc3f7; }
|
|
3234
|
+
.hep-cr-actions { display: flex; gap: 8px; }
|
|
3235
|
+
.hep-cr-btn {
|
|
3186
3236
|
padding: 6px 16px;
|
|
3187
3237
|
border: none;
|
|
3188
3238
|
border-radius: 6px;
|
|
@@ -3194,31 +3244,31 @@ const Pt = ({
|
|
|
3194
3244
|
gap: 6px;
|
|
3195
3245
|
transition: all 0.2s;
|
|
3196
3246
|
}
|
|
3197
|
-
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
3198
|
-
.btn-run {
|
|
3247
|
+
.hep-cr-btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
3248
|
+
.hep-cr-btn-run {
|
|
3199
3249
|
background: linear-gradient(135deg, #4caf50 0%, #43a047 100%);
|
|
3200
3250
|
color: white;
|
|
3201
3251
|
}
|
|
3202
|
-
.btn-run:hover:not(:disabled) { background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%); }
|
|
3203
|
-
.btn-reset { background: #3d3d3d; color: #aaa; }
|
|
3204
|
-
.
|
|
3205
|
-
.btn-theme { background: #3d3d3d; color: #aaa; padding: 5px 10px; font-size: 14px; line-height: 1; height: auto; min-height: 28px; }
|
|
3206
|
-
.
|
|
3207
|
-
.btn-theme:hover { background: #4d4d4d; color: #fff; }
|
|
3208
|
-
.error-message {
|
|
3252
|
+
.hep-cr-btn-run:hover:not(:disabled) { background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%); }
|
|
3253
|
+
.hep-cr-btn-reset { background: #3d3d3d; color: #aaa; }
|
|
3254
|
+
.hep-cr-runner-light .hep-cr-btn-reset { background: #e0e0e0; color: #666; }
|
|
3255
|
+
.hep-cr-btn-theme { background: #3d3d3d; color: #aaa; padding: 5px 10px; font-size: 14px; line-height: 1; height: auto; min-height: 28px; }
|
|
3256
|
+
.hep-cr-runner-light .hep-cr-btn-theme { background: #e0e0e0; }
|
|
3257
|
+
.hep-cr-btn-theme:hover { background: #4d4d4d; color: #fff; }
|
|
3258
|
+
.hep-cr-error-message {
|
|
3209
3259
|
padding: 10px 16px;
|
|
3210
3260
|
background: #c62828;
|
|
3211
3261
|
color: white;
|
|
3212
3262
|
font-size: 13px;
|
|
3213
3263
|
}
|
|
3214
|
-
.
|
|
3215
|
-
.editor-panel {
|
|
3264
|
+
.hep-cr-main { display: flex; height: 400px; overflow: hidden; }
|
|
3265
|
+
.hep-cr-editor-panel {
|
|
3216
3266
|
display: flex;
|
|
3217
3267
|
flex-direction: column;
|
|
3218
3268
|
min-width: 20%;
|
|
3219
3269
|
max-width: 80%;
|
|
3220
3270
|
}
|
|
3221
|
-
.panel-header {
|
|
3271
|
+
.hep-cr-panel-header {
|
|
3222
3272
|
display: flex;
|
|
3223
3273
|
justify-content: space-between;
|
|
3224
3274
|
align-items: center;
|
|
@@ -3226,15 +3276,15 @@ const Pt = ({
|
|
|
3226
3276
|
background: #2d2d2d;
|
|
3227
3277
|
border-bottom: 1px solid #333;
|
|
3228
3278
|
}
|
|
3229
|
-
.
|
|
3230
|
-
.panel-title {
|
|
3279
|
+
.hep-cr-runner-light .hep-cr-panel-header { background: #f0f0f0; border-color: #e0e0e0; }
|
|
3280
|
+
.hep-cr-panel-title {
|
|
3231
3281
|
font-size: 12px;
|
|
3232
3282
|
font-weight: 600;
|
|
3233
3283
|
color: #888;
|
|
3234
3284
|
text-transform: uppercase;
|
|
3235
3285
|
letter-spacing: 0.5px;
|
|
3236
3286
|
}
|
|
3237
|
-
.language-badge {
|
|
3287
|
+
.hep-cr-language-badge {
|
|
3238
3288
|
font-size: 11px;
|
|
3239
3289
|
padding: 2px 8px;
|
|
3240
3290
|
background: #4fc3f7;
|
|
@@ -3242,15 +3292,15 @@ const Pt = ({
|
|
|
3242
3292
|
border-radius: 10px;
|
|
3243
3293
|
font-weight: 500;
|
|
3244
3294
|
}
|
|
3245
|
-
.
|
|
3295
|
+
.hep-cr-editor {
|
|
3246
3296
|
flex: 1;
|
|
3247
3297
|
width: 100%;
|
|
3248
3298
|
background: #1e1e1e;
|
|
3249
3299
|
position: relative;
|
|
3250
3300
|
overflow: hidden;
|
|
3251
3301
|
}
|
|
3252
|
-
.
|
|
3253
|
-
.
|
|
3302
|
+
.hep-cr-editor .hep-cr-highlight,
|
|
3303
|
+
.hep-cr-editor .hep-cr-input {
|
|
3254
3304
|
position: absolute;
|
|
3255
3305
|
top: 0;
|
|
3256
3306
|
left: 0;
|
|
@@ -3265,16 +3315,16 @@ const Pt = ({
|
|
|
3265
3315
|
white-space: pre;
|
|
3266
3316
|
overflow: auto;
|
|
3267
3317
|
}
|
|
3268
|
-
.
|
|
3318
|
+
.hep-cr-editor .hep-cr-highlight {
|
|
3269
3319
|
background: transparent !important;
|
|
3270
3320
|
pointer-events: none;
|
|
3271
3321
|
z-index: 1;
|
|
3272
3322
|
}
|
|
3273
|
-
.
|
|
3323
|
+
.hep-cr-editor .hep-cr-highlight code {
|
|
3274
3324
|
display: block;
|
|
3275
3325
|
font-family: inherit;
|
|
3276
3326
|
}
|
|
3277
|
-
.
|
|
3327
|
+
.hep-cr-editor .hep-cr-input {
|
|
3278
3328
|
background: transparent !important;
|
|
3279
3329
|
color: transparent !important;
|
|
3280
3330
|
caret-color: #d4d4d4;
|
|
@@ -3282,14 +3332,14 @@ const Pt = ({
|
|
|
3282
3332
|
outline: none;
|
|
3283
3333
|
z-index: 2;
|
|
3284
3334
|
}
|
|
3285
|
-
.
|
|
3286
|
-
.
|
|
3335
|
+
.hep-cr-editor .hep-cr-input:disabled { opacity: 0.7; }
|
|
3336
|
+
.hep-cr-runner-light .hep-cr-editor .hep-cr-highlight code {
|
|
3287
3337
|
color: #333333;
|
|
3288
3338
|
}
|
|
3289
|
-
.
|
|
3339
|
+
.hep-cr-runner-light .hep-cr-editor .hep-cr-input {
|
|
3290
3340
|
caret-color: #333333;
|
|
3291
3341
|
}
|
|
3292
|
-
.resize-handle {
|
|
3342
|
+
.hep-cr-resize-handle {
|
|
3293
3343
|
width: 6px;
|
|
3294
3344
|
background: #252526;
|
|
3295
3345
|
cursor: col-resize;
|
|
@@ -3297,18 +3347,18 @@ const Pt = ({
|
|
|
3297
3347
|
align-items: center;
|
|
3298
3348
|
justify-content: center;
|
|
3299
3349
|
}
|
|
3300
|
-
.resize-handle:hover { background: #4fc3f7; }
|
|
3301
|
-
.resize-line { width: 2px; height: 40px; background: #444; border-radius: 1px; }
|
|
3302
|
-
.resize-handle:hover .resize-line { background: #fff; }
|
|
3303
|
-
.output-panel {
|
|
3350
|
+
.hep-cr-resize-handle:hover { background: #4fc3f7; }
|
|
3351
|
+
.hep-cr-resize-line { width: 2px; height: 40px; background: #444; border-radius: 1px; }
|
|
3352
|
+
.hep-cr-resize-handle:hover .hep-cr-resize-line { background: #fff; }
|
|
3353
|
+
.hep-cr-output-panel {
|
|
3304
3354
|
display: flex;
|
|
3305
3355
|
flex-direction: column;
|
|
3306
3356
|
min-width: 20%;
|
|
3307
3357
|
border-left: 1px solid #333;
|
|
3308
3358
|
}
|
|
3309
|
-
.
|
|
3310
|
-
.output-tabs { display: flex; gap: 4px; }
|
|
3311
|
-
.tab {
|
|
3359
|
+
.hep-cr-runner-light .hep-cr-output-panel { border-color: #e0e0e0; }
|
|
3360
|
+
.hep-cr-output-tabs { display: flex; gap: 4px; }
|
|
3361
|
+
.hep-cr-tab {
|
|
3312
3362
|
padding: 4px 12px;
|
|
3313
3363
|
border: none;
|
|
3314
3364
|
background: transparent;
|
|
@@ -3318,12 +3368,12 @@ const Pt = ({
|
|
|
3318
3368
|
color: #888;
|
|
3319
3369
|
transition: all 0.2s;
|
|
3320
3370
|
}
|
|
3321
|
-
.tab:hover { color: #d4d4d4; background: #3d3d3d; }
|
|
3322
|
-
.
|
|
3323
|
-
.tab.active { background: #4fc3f7; color: #000; font-weight: 500; }
|
|
3324
|
-
.output-actions { display: flex; align-items: center; gap: 12px; }
|
|
3325
|
-
.execution-time { font-size: 12px; color: #4caf50; font-weight: 500; }
|
|
3326
|
-
.btn-icon {
|
|
3371
|
+
.hep-cr-tab:hover { color: #d4d4d4; background: #3d3d3d; }
|
|
3372
|
+
.hep-cr-runner-light .hep-cr-tab:hover { color: #333; background: #e0e0e0; }
|
|
3373
|
+
.hep-cr-tab.active { background: #4fc3f7; color: #000; font-weight: 500; }
|
|
3374
|
+
.hep-cr-output-actions { display: flex; align-items: center; gap: 12px; }
|
|
3375
|
+
.hep-cr-execution-time { font-size: 12px; color: #4caf50; font-weight: 500; }
|
|
3376
|
+
.hep-cr-btn-icon {
|
|
3327
3377
|
background: transparent;
|
|
3328
3378
|
border: none;
|
|
3329
3379
|
cursor: pointer;
|
|
@@ -3335,16 +3385,16 @@ const Pt = ({
|
|
|
3335
3385
|
justify-content: center;
|
|
3336
3386
|
transition: all 0.2s;
|
|
3337
3387
|
}
|
|
3338
|
-
.btn-icon:hover { color: #fff; background: #3d3d3d; }
|
|
3339
|
-
.
|
|
3340
|
-
.output-content {
|
|
3388
|
+
.hep-cr-btn-icon:hover { color: #fff; background: #3d3d3d; }
|
|
3389
|
+
.hep-cr-runner-light .hep-cr-btn-icon:hover { color: #333; background: #e0e0e0; }
|
|
3390
|
+
.hep-cr-output-content {
|
|
3341
3391
|
flex: 1;
|
|
3342
3392
|
padding: 12px 16px;
|
|
3343
3393
|
overflow: auto;
|
|
3344
3394
|
background: #1e1e1e;
|
|
3345
3395
|
}
|
|
3346
|
-
.
|
|
3347
|
-
.output-content pre {
|
|
3396
|
+
.hep-cr-runner-light .hep-cr-output-content { background: #fff; }
|
|
3397
|
+
.hep-cr-output-content pre {
|
|
3348
3398
|
margin: 0;
|
|
3349
3399
|
font-size: 13px;
|
|
3350
3400
|
line-height: 1.6;
|
|
@@ -3352,9 +3402,9 @@ const Pt = ({
|
|
|
3352
3402
|
word-break: break-all;
|
|
3353
3403
|
color: #d4d4d4;
|
|
3354
3404
|
}
|
|
3355
|
-
.
|
|
3356
|
-
.output-content .stderr { color: #f44336; }
|
|
3357
|
-
.spinner {
|
|
3405
|
+
.hep-cr-runner-light .hep-cr-output-content pre { color: #333; }
|
|
3406
|
+
.hep-cr-output-content .stderr { color: #f44336; }
|
|
3407
|
+
.hep-cr-spinner {
|
|
3358
3408
|
width: 12px;
|
|
3359
3409
|
height: 12px;
|
|
3360
3410
|
border: 2px solid rgba(255,255,255,0.3);
|
|
@@ -3365,35 +3415,35 @@ const Pt = ({
|
|
|
3365
3415
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
3366
3416
|
` })
|
|
3367
3417
|
] });
|
|
3368
|
-
},
|
|
3418
|
+
}, Dr = xr(
|
|
3369
3419
|
({
|
|
3370
|
-
open:
|
|
3371
|
-
defaultOpen:
|
|
3420
|
+
open: c,
|
|
3421
|
+
defaultOpen: p = !1,
|
|
3372
3422
|
title: n = "代码执行器",
|
|
3373
|
-
width:
|
|
3374
|
-
onClose:
|
|
3423
|
+
width: d = 800,
|
|
3424
|
+
onClose: b,
|
|
3375
3425
|
footer: k,
|
|
3376
3426
|
theme: S = "light",
|
|
3377
3427
|
...l
|
|
3378
|
-
},
|
|
3379
|
-
const [y, _] = Z(
|
|
3380
|
-
|
|
3381
|
-
O &&
|
|
3382
|
-
}, [
|
|
3428
|
+
}, m) => {
|
|
3429
|
+
const [y, _] = Z(p), O = c !== void 0, D = O ? c : y;
|
|
3430
|
+
Oe(() => {
|
|
3431
|
+
O && c !== y && _(c);
|
|
3432
|
+
}, [c, O]);
|
|
3383
3433
|
const I = le(() => {
|
|
3384
|
-
O || _(!1),
|
|
3385
|
-
}, [O,
|
|
3434
|
+
O || _(!1), b == null || b();
|
|
3435
|
+
}, [O, b]), B = (w) => {
|
|
3386
3436
|
w.target === w.currentTarget && I();
|
|
3387
3437
|
};
|
|
3388
|
-
|
|
3438
|
+
Sr(m, () => ({
|
|
3389
3439
|
close: I
|
|
3390
3440
|
}));
|
|
3391
|
-
const F = typeof
|
|
3392
|
-
return D ? /* @__PURE__ */ h.jsxs("div", { className: "dialog-overlay", onClick: B, children: [
|
|
3393
|
-
/* @__PURE__ */ h.jsxs("div", { className: "dialog-container", style: { width: F }, children: [
|
|
3394
|
-
/* @__PURE__ */ h.jsxs("div", { className: "dialog-header", children: [
|
|
3395
|
-
/* @__PURE__ */ h.jsx("h3", { className: "dialog-title", children: n }),
|
|
3396
|
-
/* @__PURE__ */ h.jsx("button", { className: "dialog-close", onClick: I, children: /* @__PURE__ */ h.jsxs(
|
|
3441
|
+
const F = typeof d == "number" ? `${d}px` : d;
|
|
3442
|
+
return D ? /* @__PURE__ */ h.jsxs("div", { className: "hep-cr-dialog-overlay", onClick: B, children: [
|
|
3443
|
+
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-dialog-container", style: { width: F }, children: [
|
|
3444
|
+
/* @__PURE__ */ h.jsxs("div", { className: "hep-cr-dialog-header", children: [
|
|
3445
|
+
/* @__PURE__ */ h.jsx("h3", { className: "hep-cr-dialog-title", children: n }),
|
|
3446
|
+
/* @__PURE__ */ h.jsx("button", { className: "hep-cr-dialog-close", onClick: I, children: /* @__PURE__ */ h.jsxs(
|
|
3397
3447
|
"svg",
|
|
3398
3448
|
{
|
|
3399
3449
|
width: "16",
|
|
@@ -3409,11 +3459,11 @@ const Pt = ({
|
|
|
3409
3459
|
}
|
|
3410
3460
|
) })
|
|
3411
3461
|
] }),
|
|
3412
|
-
/* @__PURE__ */ h.jsx("div", { className: "dialog-body", children: /* @__PURE__ */ h.jsx(
|
|
3413
|
-
k && /* @__PURE__ */ h.jsx("div", { className: "dialog-footer", children: k })
|
|
3462
|
+
/* @__PURE__ */ h.jsx("div", { className: "hep-cr-dialog-body", children: /* @__PURE__ */ h.jsx(Pr, { theme: S, ...l }) }),
|
|
3463
|
+
k && /* @__PURE__ */ h.jsx("div", { className: "hep-cr-dialog-footer", children: k })
|
|
3414
3464
|
] }),
|
|
3415
3465
|
/* @__PURE__ */ h.jsx("style", { children: `
|
|
3416
|
-
.dialog-overlay {
|
|
3466
|
+
.hep-cr-dialog-overlay {
|
|
3417
3467
|
position: fixed;
|
|
3418
3468
|
top: 0;
|
|
3419
3469
|
left: 0;
|
|
@@ -3424,10 +3474,10 @@ const Pt = ({
|
|
|
3424
3474
|
align-items: center;
|
|
3425
3475
|
justify-content: center;
|
|
3426
3476
|
z-index: 9999;
|
|
3427
|
-
animation: dialog-fade-in 0.2s ease;
|
|
3477
|
+
animation: hep-cr-dialog-fade-in 0.2s ease;
|
|
3428
3478
|
}
|
|
3429
3479
|
|
|
3430
|
-
.dialog-container {
|
|
3480
|
+
.hep-cr-dialog-container {
|
|
3431
3481
|
background: #fff;
|
|
3432
3482
|
border-radius: 12px;
|
|
3433
3483
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
|
|
@@ -3436,10 +3486,10 @@ const Pt = ({
|
|
|
3436
3486
|
display: flex;
|
|
3437
3487
|
flex-direction: column;
|
|
3438
3488
|
overflow: hidden;
|
|
3439
|
-
animation: dialog-scale-in 0.2s ease;
|
|
3489
|
+
animation: hep-cr-dialog-scale-in 0.2s ease;
|
|
3440
3490
|
}
|
|
3441
3491
|
|
|
3442
|
-
.dialog-header {
|
|
3492
|
+
.hep-cr-dialog-header {
|
|
3443
3493
|
display: flex;
|
|
3444
3494
|
align-items: center;
|
|
3445
3495
|
justify-content: space-between;
|
|
@@ -3447,14 +3497,14 @@ const Pt = ({
|
|
|
3447
3497
|
border-bottom: 1px solid #e0e0e0;
|
|
3448
3498
|
}
|
|
3449
3499
|
|
|
3450
|
-
.dialog-title {
|
|
3500
|
+
.hep-cr-dialog-title {
|
|
3451
3501
|
margin: 0;
|
|
3452
3502
|
font-size: 16px;
|
|
3453
3503
|
font-weight: 600;
|
|
3454
3504
|
color: #333;
|
|
3455
3505
|
}
|
|
3456
3506
|
|
|
3457
|
-
.dialog-close {
|
|
3507
|
+
.hep-cr-dialog-close {
|
|
3458
3508
|
background: none;
|
|
3459
3509
|
border: none;
|
|
3460
3510
|
cursor: pointer;
|
|
@@ -3467,23 +3517,23 @@ const Pt = ({
|
|
|
3467
3517
|
transition: all 0.2s;
|
|
3468
3518
|
}
|
|
3469
3519
|
|
|
3470
|
-
.dialog-close:hover {
|
|
3520
|
+
.hep-cr-dialog-close:hover {
|
|
3471
3521
|
background: #f0f0f0;
|
|
3472
3522
|
color: #333;
|
|
3473
3523
|
}
|
|
3474
3524
|
|
|
3475
|
-
.dialog-body {
|
|
3525
|
+
.hep-cr-dialog-body {
|
|
3476
3526
|
flex: 1;
|
|
3477
3527
|
overflow: auto;
|
|
3478
3528
|
padding: 0;
|
|
3479
3529
|
}
|
|
3480
3530
|
|
|
3481
|
-
.dialog-body .
|
|
3531
|
+
.hep-cr-dialog-body .hep-cr-runner {
|
|
3482
3532
|
border: none;
|
|
3483
3533
|
border-radius: 0;
|
|
3484
3534
|
}
|
|
3485
3535
|
|
|
3486
|
-
.dialog-footer {
|
|
3536
|
+
.hep-cr-dialog-footer {
|
|
3487
3537
|
padding: 12px 20px;
|
|
3488
3538
|
border-top: 1px solid #e0e0e0;
|
|
3489
3539
|
display: flex;
|
|
@@ -3491,12 +3541,12 @@ const Pt = ({
|
|
|
3491
3541
|
gap: 12px;
|
|
3492
3542
|
}
|
|
3493
3543
|
|
|
3494
|
-
@keyframes dialog-fade-in {
|
|
3544
|
+
@keyframes hep-cr-dialog-fade-in {
|
|
3495
3545
|
from { opacity: 0; }
|
|
3496
3546
|
to { opacity: 1; }
|
|
3497
3547
|
}
|
|
3498
3548
|
|
|
3499
|
-
@keyframes dialog-scale-in {
|
|
3549
|
+
@keyframes hep-cr-dialog-scale-in {
|
|
3500
3550
|
from { transform: scale(0.95); }
|
|
3501
3551
|
to { transform: scale(1); }
|
|
3502
3552
|
}
|
|
@@ -3504,9 +3554,9 @@ const Pt = ({
|
|
|
3504
3554
|
] }) : null;
|
|
3505
3555
|
}
|
|
3506
3556
|
);
|
|
3507
|
-
|
|
3557
|
+
Dr.displayName = "CodeRunnerDialog";
|
|
3508
3558
|
export {
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3559
|
+
Pr as CodeRunner,
|
|
3560
|
+
Dr as CodeRunnerDialog,
|
|
3561
|
+
Pr as default
|
|
3512
3562
|
};
|