@hep-code-runner/react 1.5.2 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +35 -23
- package/dist/index.mjs +784 -734
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import qe, { useRef as
|
|
1
|
+
import qe, { useRef as Ne, useMemo as xe, useEffect as Se, useState as V, useCallback as se, forwardRef as xr, useImperativeHandle as kr } 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(d) {
|
|
4
|
+
return d && d.__esModule && Object.prototype.hasOwnProperty.call(d, "default") ? d.default : d;
|
|
5
5
|
}
|
|
6
|
-
var
|
|
6
|
+
var Ce = { exports: {} }, Ee = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
@@ -14,20 +14,20 @@ var Ie = { exports: {} }, be = {};
|
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
16
|
var Xe;
|
|
17
|
-
function
|
|
18
|
-
if (Xe) return
|
|
17
|
+
function Sr() {
|
|
18
|
+
if (Xe) return Ee;
|
|
19
19
|
Xe = 1;
|
|
20
|
-
var
|
|
21
|
-
function
|
|
22
|
-
var
|
|
20
|
+
var d = qe, p = Symbol.for("react.element"), n = Symbol.for("react.fragment"), h = Object.prototype.hasOwnProperty, m = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, T = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
|
+
function w(l, b, y) {
|
|
22
|
+
var R, O = {}, D = null, I = null;
|
|
23
23
|
y !== void 0 && (D = "" + y), b.key !== void 0 && (D = "" + b.key), b.ref !== void 0 && (I = b.ref);
|
|
24
|
-
for (
|
|
25
|
-
if (l && l.defaultProps) for (
|
|
26
|
-
return { $$typeof:
|
|
24
|
+
for (R in b) h.call(b, R) && !T.hasOwnProperty(R) && (O[R] = b[R]);
|
|
25
|
+
if (l && l.defaultProps) for (R in b = l.defaultProps, b) O[R] === void 0 && (O[R] = b[R]);
|
|
26
|
+
return { $$typeof: p, type: l, key: D, ref: I, props: O, _owner: m.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return Ee.Fragment = n, Ee.jsx = w, Ee.jsxs = w, Ee;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var ye = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -38,90 +38,90 @@ var ve = {};
|
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
40
|
var Ke;
|
|
41
|
-
function
|
|
41
|
+
function Ar() {
|
|
42
42
|
return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && function() {
|
|
43
|
-
var
|
|
44
|
-
function
|
|
43
|
+
var d = qe, p = Symbol.for("react.element"), n = Symbol.for("react.portal"), h = Symbol.for("react.fragment"), m = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), w = Symbol.for("react.provider"), l = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), y = Symbol.for("react.suspense"), R = Symbol.for("react.suspense_list"), O = Symbol.for("react.memo"), D = Symbol.for("react.lazy"), I = Symbol.for("react.offscreen"), z = Symbol.iterator, F = "@@iterator";
|
|
44
|
+
function S(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var a =
|
|
47
|
+
var a = z && e[z] || e[F];
|
|
48
48
|
return typeof a == "function" ? a : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
51
|
-
function
|
|
50
|
+
var k = d.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
|
+
function r(e) {
|
|
52
52
|
{
|
|
53
|
-
for (var a = arguments.length,
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
for (var a = arguments.length, u = new Array(a > 1 ? a - 1 : 0), v = 1; v < a; v++)
|
|
54
|
+
u[v - 1] = arguments[v];
|
|
55
|
+
t("error", e, u);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function t(e, a, u) {
|
|
59
59
|
{
|
|
60
|
-
var v =
|
|
61
|
-
N !== "" && (a += "%s",
|
|
62
|
-
var L =
|
|
60
|
+
var v = k.ReactDebugCurrentFrame, N = v.getStackAddendum();
|
|
61
|
+
N !== "" && (a += "%s", u = u.concat([N]));
|
|
62
|
+
var L = u.map(function(A) {
|
|
63
63
|
return String(A);
|
|
64
64
|
});
|
|
65
65
|
L.unshift("Warning: " + a), Function.prototype.apply.call(console[e], console, L);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var i = !1, o = !1, s = !1, f = !1, E = !1,
|
|
69
|
-
|
|
68
|
+
var i = !1, o = !1, s = !1, f = !1, E = !1, g;
|
|
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 === h || e === T || E || e === m || e === y || e === R || f || e === I || i || o || s || typeof e == "object" && e !== null && (e.$$typeof === D || e.$$typeof === O || e.$$typeof === w || e.$$typeof === l || e.$$typeof === b || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
|
-
e.$$typeof ===
|
|
75
|
+
e.$$typeof === g || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function P(e, a,
|
|
77
|
+
function P(e, a, u) {
|
|
78
78
|
var v = e.displayName;
|
|
79
79
|
if (v)
|
|
80
80
|
return v;
|
|
81
81
|
var N = a.displayName || a.name || "";
|
|
82
|
-
return N !== "" ?
|
|
82
|
+
return N !== "" ? u + "(" + N + ")" : u;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function W(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function X(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 h:
|
|
96
96
|
return "Fragment";
|
|
97
97
|
case n:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case T:
|
|
100
100
|
return "Profiler";
|
|
101
101
|
case m:
|
|
102
102
|
return "StrictMode";
|
|
103
103
|
case y:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
105
|
+
case R:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof e == "object")
|
|
109
109
|
switch (e.$$typeof) {
|
|
110
110
|
case l:
|
|
111
111
|
var a = e;
|
|
112
|
-
return
|
|
113
|
-
case
|
|
114
|
-
var
|
|
115
|
-
return
|
|
112
|
+
return W(a) + ".Consumer";
|
|
113
|
+
case w:
|
|
114
|
+
var u = e;
|
|
115
|
+
return W(u._context) + ".Provider";
|
|
116
116
|
case b:
|
|
117
117
|
return P(e, e.render, "ForwardRef");
|
|
118
118
|
case O:
|
|
119
119
|
var v = e.displayName || null;
|
|
120
|
-
return v !== null ? v :
|
|
120
|
+
return v !== null ? v : X(e.type) || "Memo";
|
|
121
121
|
case D: {
|
|
122
122
|
var N = e, L = N._payload, A = N._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return X(A(L));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,18 +129,18 @@ function At() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var
|
|
133
|
-
function
|
|
132
|
+
var G = Object.assign, re = 0, he, ue, j, H, q, J, B;
|
|
133
|
+
function le() {
|
|
134
134
|
}
|
|
135
|
-
|
|
136
|
-
function
|
|
135
|
+
le.__reactDisabledLog = !0;
|
|
136
|
+
function Q() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (re === 0) {
|
|
139
|
+
he = console.log, ue = console.info, j = console.warn, H = console.error, q = console.group, J = console.groupCollapsed, B = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
143
|
-
value:
|
|
143
|
+
value: le,
|
|
144
144
|
writable: !0
|
|
145
145
|
};
|
|
146
146
|
Object.defineProperties(console, {
|
|
@@ -153,77 +153,77 @@ function At() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
re++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function K() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (re--, re === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
165
165
|
writable: !0
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
|
-
log:
|
|
169
|
-
value:
|
|
168
|
+
log: G({}, e, {
|
|
169
|
+
value: he
|
|
170
170
|
}),
|
|
171
|
-
info:
|
|
172
|
-
value:
|
|
171
|
+
info: G({}, e, {
|
|
172
|
+
value: ue
|
|
173
173
|
}),
|
|
174
|
-
warn:
|
|
174
|
+
warn: G({}, e, {
|
|
175
175
|
value: j
|
|
176
176
|
}),
|
|
177
|
-
error:
|
|
177
|
+
error: G({}, e, {
|
|
178
178
|
value: H
|
|
179
179
|
}),
|
|
180
|
-
group:
|
|
181
|
-
value:
|
|
180
|
+
group: G({}, e, {
|
|
181
|
+
value: q
|
|
182
182
|
}),
|
|
183
|
-
groupCollapsed:
|
|
184
|
-
value:
|
|
183
|
+
groupCollapsed: G({}, e, {
|
|
184
|
+
value: J
|
|
185
185
|
}),
|
|
186
|
-
groupEnd:
|
|
187
|
-
value:
|
|
186
|
+
groupEnd: G({}, e, {
|
|
187
|
+
value: B
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
re < 0 && r("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
194
|
+
var te = k.ReactCurrentDispatcher, ne;
|
|
195
|
+
function ae(e, a, u) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (ne === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
200
|
} catch (N) {
|
|
201
201
|
var v = N.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
-
|
|
202
|
+
ne = v && v[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + ne + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var
|
|
208
|
+
var de = !1, ie;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
210
|
+
var oe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
ie = new oe();
|
|
212
212
|
}
|
|
213
|
-
function
|
|
214
|
-
if (!e ||
|
|
213
|
+
function me(e, a) {
|
|
214
|
+
if (!e || de)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var
|
|
218
|
-
if (
|
|
219
|
-
return
|
|
217
|
+
var u = ie.get(e);
|
|
218
|
+
if (u !== void 0)
|
|
219
|
+
return u;
|
|
220
220
|
}
|
|
221
221
|
var v;
|
|
222
|
-
|
|
222
|
+
de = !0;
|
|
223
223
|
var N = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
225
|
var L;
|
|
226
|
-
L =
|
|
226
|
+
L = te.current, te.current = null, Q();
|
|
227
227
|
try {
|
|
228
228
|
if (a) {
|
|
229
229
|
var A = function() {
|
|
@@ -236,125 +236,125 @@ function At() {
|
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
238
|
Reflect.construct(A, []);
|
|
239
|
-
} catch (
|
|
240
|
-
v =
|
|
239
|
+
} catch (Z) {
|
|
240
|
+
v = Z;
|
|
241
241
|
}
|
|
242
242
|
Reflect.construct(e, [], A);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
245
|
A.call();
|
|
246
|
-
} catch (
|
|
247
|
-
v =
|
|
246
|
+
} catch (Z) {
|
|
247
|
+
v = Z;
|
|
248
248
|
}
|
|
249
249
|
e.call(A.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
v =
|
|
254
|
+
} catch (Z) {
|
|
255
|
+
v = Z;
|
|
256
256
|
}
|
|
257
257
|
e();
|
|
258
258
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var x =
|
|
259
|
+
} catch (Z) {
|
|
260
|
+
if (Z && v && typeof Z.stack == "string") {
|
|
261
|
+
for (var x = Z.stack.split(`
|
|
262
262
|
`), Y = v.stack.split(`
|
|
263
|
-
`),
|
|
263
|
+
`), M = x.length - 1, U = Y.length - 1; M >= 1 && U >= 0 && x[M] !== Y[U]; )
|
|
264
264
|
U--;
|
|
265
|
-
for (;
|
|
266
|
-
if (x[
|
|
267
|
-
if (
|
|
265
|
+
for (; M >= 1 && U >= 0; M--, U--)
|
|
266
|
+
if (x[M] !== Y[U]) {
|
|
267
|
+
if (M !== 1 || U !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
270
|
-
var
|
|
271
|
-
` + x[
|
|
272
|
-
return e.displayName &&
|
|
269
|
+
if (M--, U--, U < 0 || x[M] !== Y[U]) {
|
|
270
|
+
var ee = `
|
|
271
|
+
` + x[M].replace(" at new ", " at ");
|
|
272
|
+
return e.displayName && ee.includes("<anonymous>") && (ee = ee.replace("<anonymous>", e.displayName)), typeof e == "function" && ie.set(e, ee), ee;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (M >= 1 && U >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
|
|
279
|
+
de = !1, te.current = L, K(), Error.prepareStackTrace = N;
|
|
280
280
|
}
|
|
281
|
-
var
|
|
282
|
-
return typeof e == "function" &&
|
|
281
|
+
var ve = e ? e.displayName || e.name : "", ge = ve ? ae(ve) : "";
|
|
282
|
+
return typeof e == "function" && ie.set(e, ge), ge;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
285
|
-
return
|
|
284
|
+
function ce(e, a, u) {
|
|
285
|
+
return me(e, !1);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
287
|
+
function ke(e) {
|
|
288
288
|
var a = e.prototype;
|
|
289
289
|
return !!(a && a.isReactComponent);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function _(e, a, u) {
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return
|
|
295
|
+
return me(e, ke(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
|
-
return
|
|
297
|
+
return ae(e);
|
|
298
298
|
switch (e) {
|
|
299
299
|
case y:
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
return
|
|
300
|
+
return ae("Suspense");
|
|
301
|
+
case R:
|
|
302
|
+
return ae("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
306
|
case b:
|
|
307
|
-
return
|
|
307
|
+
return ce(e.render);
|
|
308
308
|
case O:
|
|
309
|
-
return
|
|
309
|
+
return _(e.type, a, u);
|
|
310
310
|
case D: {
|
|
311
311
|
var v = e, N = v._payload, L = v._init;
|
|
312
312
|
try {
|
|
313
|
-
return
|
|
313
|
+
return _(L(N), a, u);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
321
|
-
function
|
|
320
|
+
var $ = Object.prototype.hasOwnProperty, pe = {}, fe = k.ReactDebugCurrentFrame;
|
|
321
|
+
function we(e) {
|
|
322
322
|
if (e) {
|
|
323
|
-
var a = e._owner,
|
|
324
|
-
|
|
323
|
+
var a = e._owner, u = _(e.type, e._source, a ? a.type : null);
|
|
324
|
+
fe.setExtraStackFrame(u);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
fe.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function Qe(e, a,
|
|
328
|
+
function Qe(e, a, u, v, N) {
|
|
329
329
|
{
|
|
330
|
-
var L = Function.call.bind(
|
|
330
|
+
var L = Function.call.bind($);
|
|
331
331
|
for (var A in e)
|
|
332
332
|
if (L(e, A)) {
|
|
333
333
|
var x = void 0;
|
|
334
334
|
try {
|
|
335
335
|
if (typeof e[A] != "function") {
|
|
336
|
-
var Y = Error((v || "React class") + ": " +
|
|
336
|
+
var Y = Error((v || "React class") + ": " + u + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
337
|
throw Y.name = "Invariant Violation", Y;
|
|
338
338
|
}
|
|
339
|
-
x = e[A](a, A, v,
|
|
340
|
-
} catch (
|
|
341
|
-
x =
|
|
339
|
+
x = e[A](a, A, v, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (M) {
|
|
341
|
+
x = M;
|
|
342
342
|
}
|
|
343
|
-
x && !(x instanceof Error) && (
|
|
343
|
+
x && !(x instanceof Error) && (we(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, A, typeof x), we(null)), x instanceof Error && !(x.message in pe) && (pe[x.message] = !0, we(N), r("Failed %s type: %s", u, x.message), we(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
348
|
-
function
|
|
349
|
-
return
|
|
347
|
+
var er = Array.isArray;
|
|
348
|
+
function Ae(e) {
|
|
349
|
+
return er(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function rr(e) {
|
|
352
352
|
{
|
|
353
|
-
var a = typeof Symbol == "function" && Symbol.toStringTag,
|
|
354
|
-
return
|
|
353
|
+
var a = typeof Symbol == "function" && Symbol.toStringTag, u = a && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
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,64 +365,64 @@ function At() {
|
|
|
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 =
|
|
371
|
+
var je = k.ReactCurrentOwner, nr = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
376
|
}, $e, Me;
|
|
377
|
-
function
|
|
378
|
-
if (
|
|
377
|
+
function ar(e) {
|
|
378
|
+
if ($.call(e, "ref")) {
|
|
379
379
|
var a = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
380
380
|
if (a && a.isReactWarning)
|
|
381
381
|
return !1;
|
|
382
382
|
}
|
|
383
383
|
return e.ref !== void 0;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
if (
|
|
385
|
+
function ir(e) {
|
|
386
|
+
if ($.call(e, "key")) {
|
|
387
387
|
var a = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
388
388
|
if (a && a.isReactWarning)
|
|
389
389
|
return !1;
|
|
390
390
|
}
|
|
391
391
|
return e.key !== void 0;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function or(e, a) {
|
|
394
394
|
typeof e.ref == "string" && je.current;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function sr(e, a) {
|
|
397
397
|
{
|
|
398
|
-
var
|
|
399
|
-
$e || ($e = !0,
|
|
398
|
+
var u = function() {
|
|
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
|
-
|
|
402
|
-
get:
|
|
401
|
+
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
402
|
+
get: u,
|
|
403
403
|
configurable: !0
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function lr(e, a) {
|
|
408
408
|
{
|
|
409
|
-
var
|
|
410
|
-
Me || (Me = !0,
|
|
409
|
+
var u = function() {
|
|
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
|
-
|
|
413
|
-
get:
|
|
412
|
+
u.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
413
|
+
get: u,
|
|
414
414
|
configurable: !0
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var
|
|
418
|
+
var cr = function(e, a, u, v, N, L, A) {
|
|
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,
|
|
425
|
-
ref:
|
|
425
|
+
ref: u,
|
|
426
426
|
props: A,
|
|
427
427
|
// Record the component responsible for creating this element.
|
|
428
428
|
_owner: L
|
|
@@ -444,41 +444,41 @@ function At() {
|
|
|
444
444
|
value: N
|
|
445
445
|
}), Object.freeze && (Object.freeze(x.props), Object.freeze(x)), x;
|
|
446
446
|
};
|
|
447
|
-
function
|
|
447
|
+
function ur(e, a, u, v, N) {
|
|
448
448
|
{
|
|
449
449
|
var L, A = {}, x = null, Y = null;
|
|
450
|
-
|
|
450
|
+
u !== void 0 && (De(u), x = "" + u), ir(a) && (De(a.key), x = "" + a.key), ar(a) && (Y = a.ref, or(a, N));
|
|
451
451
|
for (L in a)
|
|
452
|
-
|
|
452
|
+
$.call(a, L) && !nr.hasOwnProperty(L) && (A[L] = a[L]);
|
|
453
453
|
if (e && e.defaultProps) {
|
|
454
|
-
var
|
|
455
|
-
for (L in
|
|
456
|
-
A[L] === void 0 && (A[L] =
|
|
454
|
+
var M = e.defaultProps;
|
|
455
|
+
for (L in M)
|
|
456
|
+
A[L] === void 0 && (A[L] = M[L]);
|
|
457
457
|
}
|
|
458
458
|
if (x || Y) {
|
|
459
459
|
var U = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
460
|
-
x &&
|
|
460
|
+
x && sr(A, U), Y && lr(A, U);
|
|
461
461
|
}
|
|
462
|
-
return
|
|
462
|
+
return cr(e, x, Y, N, v, je.current, A);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
var
|
|
466
|
-
function
|
|
465
|
+
var Te = k.ReactCurrentOwner, Ue = k.ReactDebugCurrentFrame;
|
|
466
|
+
function be(e) {
|
|
467
467
|
if (e) {
|
|
468
|
-
var a = e._owner,
|
|
469
|
-
Ue.setExtraStackFrame(
|
|
468
|
+
var a = e._owner, u = _(e.type, e._source, a ? a.type : null);
|
|
469
|
+
Ue.setExtraStackFrame(u);
|
|
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 Re;
|
|
474
|
+
Re = !1;
|
|
475
|
+
function _e(e) {
|
|
476
|
+
return typeof e == "object" && e !== null && e.$$typeof === p;
|
|
477
477
|
}
|
|
478
478
|
function He() {
|
|
479
479
|
{
|
|
480
|
-
if (
|
|
481
|
-
var e =
|
|
480
|
+
if (Te.current) {
|
|
481
|
+
var e = X(Te.current.type);
|
|
482
482
|
if (e)
|
|
483
483
|
return `
|
|
484
484
|
|
|
@@ -487,18 +487,18 @@ 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) {
|
|
498
|
-
var
|
|
499
|
-
|
|
498
|
+
var u = typeof e == "string" ? e : e.displayName || e.name;
|
|
499
|
+
u && (a = `
|
|
500
500
|
|
|
501
|
-
Check the top-level render call using <` +
|
|
501
|
+
Check the top-level render call using <` + u + ">.");
|
|
502
502
|
}
|
|
503
503
|
return a;
|
|
504
504
|
}
|
|
@@ -508,129 +508,129 @@ Check the top-level render call using <` + c + ">.");
|
|
|
508
508
|
if (!e._store || e._store.validated || e.key != null)
|
|
509
509
|
return;
|
|
510
510
|
e._store.validated = !0;
|
|
511
|
-
var
|
|
512
|
-
if (Be[
|
|
511
|
+
var u = pr(a);
|
|
512
|
+
if (Be[u])
|
|
513
513
|
return;
|
|
514
|
-
Be[
|
|
514
|
+
Be[u] = !0;
|
|
515
515
|
var v = "";
|
|
516
|
-
e && e._owner && e._owner !==
|
|
516
|
+
e && e._owner && e._owner !== Te.current && (v = " It was passed a child from " + X(e._owner.type) + "."), be(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), be(null);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
519
|
function We(e, a) {
|
|
520
520
|
{
|
|
521
521
|
if (typeof e != "object")
|
|
522
522
|
return;
|
|
523
|
-
if (
|
|
524
|
-
for (var
|
|
525
|
-
var v = e[
|
|
526
|
-
|
|
523
|
+
if (Ae(e))
|
|
524
|
+
for (var u = 0; u < e.length; u++) {
|
|
525
|
+
var v = e[u];
|
|
526
|
+
_e(v) && ze(v, a);
|
|
527
527
|
}
|
|
528
|
-
else if (
|
|
528
|
+
else if (_e(e))
|
|
529
529
|
e._store && (e._store.validated = !0);
|
|
530
530
|
else if (e) {
|
|
531
|
-
var N =
|
|
531
|
+
var N = S(e);
|
|
532
532
|
if (typeof N == "function" && N !== e.entries)
|
|
533
533
|
for (var L = N.call(e), A; !(A = L.next()).done; )
|
|
534
|
-
|
|
534
|
+
_e(A.value) && ze(A.value, a);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function hr(e) {
|
|
539
539
|
{
|
|
540
540
|
var a = e.type;
|
|
541
541
|
if (a == null || typeof a == "string")
|
|
542
542
|
return;
|
|
543
|
-
var
|
|
543
|
+
var u;
|
|
544
544
|
if (typeof a == "function")
|
|
545
|
-
|
|
545
|
+
u = a.propTypes;
|
|
546
546
|
else if (typeof a == "object" && (a.$$typeof === b || // 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;
|
|
550
550
|
else
|
|
551
551
|
return;
|
|
552
|
-
if (
|
|
553
|
-
var v =
|
|
554
|
-
Qe(
|
|
555
|
-
} else if (a.PropTypes !== void 0 && !
|
|
556
|
-
|
|
557
|
-
var N =
|
|
558
|
-
|
|
559
|
-
}
|
|
560
|
-
typeof a.getDefaultProps == "function" && !a.getDefaultProps.isReactClassApproved &&
|
|
552
|
+
if (u) {
|
|
553
|
+
var v = X(a);
|
|
554
|
+
Qe(u, e.props, "prop", v, e);
|
|
555
|
+
} else if (a.PropTypes !== void 0 && !Re) {
|
|
556
|
+
Re = !0;
|
|
557
|
+
var N = X(a);
|
|
558
|
+
r("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
|
559
|
+
}
|
|
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 fr(e) {
|
|
564
564
|
{
|
|
565
|
-
for (var a = Object.keys(e.props),
|
|
566
|
-
var v = a[
|
|
565
|
+
for (var a = Object.keys(e.props), u = 0; u < a.length; u++) {
|
|
566
|
+
var v = a[u];
|
|
567
567
|
if (v !== "children" && v !== "key") {
|
|
568
|
-
|
|
568
|
+
be(e), r("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", v), be(null);
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
e.ref !== null && (
|
|
572
|
+
e.ref !== null && (be(e), r("Invalid attribute `ref` supplied to `React.Fragment`."), be(null));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
575
|
var Ge = {};
|
|
576
|
-
function Ye(e, a,
|
|
576
|
+
function Ye(e, a, u, v, N, L) {
|
|
577
577
|
{
|
|
578
578
|
var A = C(e);
|
|
579
579
|
if (!A) {
|
|
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
|
-
var
|
|
585
|
-
e === null ?
|
|
584
|
+
var M;
|
|
585
|
+
e === null ? M = "null" : Ae(e) ? M = "array" : e !== void 0 && e.$$typeof === p ? (M = "<" + (X(e.type) || "Unknown") + " />", x = " Did you accidentally export a JSX literal instead of a component?") : M = 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", M, x);
|
|
586
586
|
}
|
|
587
|
-
var U =
|
|
587
|
+
var U = ur(e, a, u, N, L);
|
|
588
588
|
if (U == null)
|
|
589
589
|
return U;
|
|
590
590
|
if (A) {
|
|
591
|
-
var
|
|
592
|
-
if (
|
|
591
|
+
var ee = a.children;
|
|
592
|
+
if (ee !== void 0)
|
|
593
593
|
if (v)
|
|
594
|
-
if (
|
|
595
|
-
for (var
|
|
596
|
-
We(
|
|
597
|
-
Object.freeze && Object.freeze(
|
|
594
|
+
if (Ae(ee)) {
|
|
595
|
+
for (var ve = 0; ve < ee.length; ve++)
|
|
596
|
+
We(ee[ve], e);
|
|
597
|
+
Object.freeze && Object.freeze(ee);
|
|
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
|
-
We(
|
|
602
|
-
}
|
|
603
|
-
if (
|
|
604
|
-
var
|
|
605
|
-
return
|
|
606
|
-
}),
|
|
607
|
-
if (!Ge[
|
|
608
|
-
var
|
|
609
|
-
|
|
601
|
+
We(ee, e);
|
|
602
|
+
}
|
|
603
|
+
if ($.call(a, "key")) {
|
|
604
|
+
var ge = X(e), Z = Object.keys(a).filter(function(yr) {
|
|
605
|
+
return yr !== "key";
|
|
606
|
+
}), Fe = Z.length > 0 ? "{key: someKey, " + Z.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
607
|
+
if (!Ge[ge + Fe]) {
|
|
608
|
+
var Er = Z.length > 0 ? "{" + Z.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} />`, Fe, ge, Er, ge), Ge[ge + Fe] = !0;
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
|
-
return e ===
|
|
617
|
+
return e === h ? fr(U) : hr(U), U;
|
|
618
618
|
}
|
|
619
619
|
}
|
|
620
|
-
function
|
|
621
|
-
return Ye(e, a,
|
|
620
|
+
function gr(e, a, u) {
|
|
621
|
+
return Ye(e, a, u, !0);
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
return Ye(e, a,
|
|
623
|
+
function mr(e, a, u) {
|
|
624
|
+
return Ye(e, a, u, !1);
|
|
625
625
|
}
|
|
626
|
-
var
|
|
627
|
-
|
|
628
|
-
}()),
|
|
626
|
+
var br = mr, vr = gr;
|
|
627
|
+
ye.Fragment = h, ye.jsx = br, ye.jsxs = vr;
|
|
628
|
+
}()), ye;
|
|
629
629
|
}
|
|
630
|
-
process.env.NODE_ENV === "production" ?
|
|
631
|
-
var
|
|
632
|
-
(function(
|
|
633
|
-
var
|
|
630
|
+
process.env.NODE_ENV === "production" ? Ce.exports = Sr() : Ce.exports = Ar();
|
|
631
|
+
var c = Ce.exports, Je = { exports: {} };
|
|
632
|
+
(function(d) {
|
|
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 g = Ie.exports, Je = { exports: {} };
|
|
|
639
639
|
* @namespace
|
|
640
640
|
* @public
|
|
641
641
|
*/
|
|
642
|
-
var n = function(
|
|
643
|
-
var m = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i,
|
|
642
|
+
var n = function(h) {
|
|
643
|
+
var m = /(?:^|\s)lang(?:uage)?-([\w-]+)(?=\s|$)/i, T = 0, w = {}, 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 g = Ie.exports, Je = { exports: {} };
|
|
|
662
662
|
* @memberof Prism
|
|
663
663
|
* @public
|
|
664
664
|
*/
|
|
665
|
-
manual:
|
|
665
|
+
manual: h.Prism && h.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 g = Ie.exports, Je = { exports: {} };
|
|
|
684
684
|
* @memberof Prism
|
|
685
685
|
* @public
|
|
686
686
|
*/
|
|
687
|
-
disableWorkerMessageHandler:
|
|
687
|
+
disableWorkerMessageHandler: h.Prism && h.Prism.disableWorkerMessageHandler,
|
|
688
688
|
/**
|
|
689
689
|
* A namespace for utility methods.
|
|
690
690
|
*
|
|
@@ -695,8 +695,8 @@ var g = 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 b ? new b(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 g = 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 g = 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: ++T }), r.__id;
|
|
728
728
|
},
|
|
729
729
|
/**
|
|
730
730
|
* Creates a deep clone of the given object.
|
|
@@ -736,30 +736,30 @@ var g = 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 o, s;
|
|
742
|
-
switch (l.util.type(
|
|
742
|
+
switch (l.util.type(t)) {
|
|
743
743
|
case "Object":
|
|
744
|
-
if (s = l.util.objId(
|
|
744
|
+
if (s = l.util.objId(t), i[s])
|
|
745
745
|
return i[s];
|
|
746
746
|
o = /** @type {Record<string, any>} */
|
|
747
747
|
{}, i[s] = o;
|
|
748
|
-
for (var f in
|
|
749
|
-
|
|
748
|
+
for (var f in t)
|
|
749
|
+
t.hasOwnProperty(f) && (o[f] = r(t[f], i));
|
|
750
750
|
return (
|
|
751
751
|
/** @type {any} */
|
|
752
752
|
o
|
|
753
753
|
);
|
|
754
754
|
case "Array":
|
|
755
|
-
return s = l.util.objId(
|
|
755
|
+
return s = l.util.objId(t), i[s] ? i[s] : (o = [], i[s] = o, /** @type {Array} */
|
|
756
756
|
/** @type {any} */
|
|
757
|
-
|
|
758
|
-
o[
|
|
757
|
+
t.forEach(function(E, g) {
|
|
758
|
+
o[g] = r(E, i);
|
|
759
759
|
}), /** @type {any} */
|
|
760
760
|
o);
|
|
761
761
|
default:
|
|
762
|
-
return
|
|
762
|
+
return t;
|
|
763
763
|
}
|
|
764
764
|
},
|
|
765
765
|
/**
|
|
@@ -770,12 +770,12 @@ var g = 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 = m.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 g = 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(m, "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 g = Ie.exports, Je = { exports: {} };
|
|
|
807
807
|
try {
|
|
808
808
|
throw new Error();
|
|
809
809
|
} catch (o) {
|
|
810
|
-
var
|
|
811
|
-
if (
|
|
812
|
-
var
|
|
813
|
-
for (var i in
|
|
814
|
-
if (
|
|
815
|
-
return
|
|
810
|
+
var r = (/at [^(\r\n]*\((.*):[^:]+:[^:]+\)$/i.exec(o.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 g = Ie.exports, Je = { exports: {} };
|
|
|
836
836
|
* @param {boolean} [defaultActivation=false]
|
|
837
837
|
* @returns {boolean}
|
|
838
838
|
*/
|
|
839
|
-
isActive: function(
|
|
840
|
-
for (var o = "no-" +
|
|
841
|
-
var s =
|
|
842
|
-
if (s.contains(
|
|
839
|
+
isActive: function(r, t, i) {
|
|
840
|
+
for (var o = "no-" + t; r; ) {
|
|
841
|
+
var s = r.classList;
|
|
842
|
+
if (s.contains(t))
|
|
843
843
|
return !0;
|
|
844
844
|
if (s.contains(o))
|
|
845
845
|
return !1;
|
|
846
|
-
|
|
846
|
+
r = r.parentElement;
|
|
847
847
|
}
|
|
848
848
|
return !!i;
|
|
849
849
|
}
|
|
@@ -859,10 +859,10 @@ var g = Ie.exports, Je = { exports: {} };
|
|
|
859
859
|
/**
|
|
860
860
|
* The grammar for plain, unformatted text.
|
|
861
861
|
*/
|
|
862
|
-
plain:
|
|
863
|
-
plaintext:
|
|
864
|
-
text:
|
|
865
|
-
txt:
|
|
862
|
+
plain: w,
|
|
863
|
+
plaintext: w,
|
|
864
|
+
text: w,
|
|
865
|
+
txt: w,
|
|
866
866
|
/**
|
|
867
867
|
* Creates a deep copy of the language with the given id and appends the given tokens.
|
|
868
868
|
*
|
|
@@ -891,10 +891,10 @@ var g = 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 o in
|
|
897
|
-
i[o] =
|
|
894
|
+
extend: function(r, t) {
|
|
895
|
+
var i = l.util.clone(l.languages[r]);
|
|
896
|
+
for (var o in t)
|
|
897
|
+
i[o] = t[o];
|
|
898
898
|
return i;
|
|
899
899
|
},
|
|
900
900
|
/**
|
|
@@ -972,31 +972,31 @@ var g = 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, o) {
|
|
976
976
|
o = o || /** @type {any} */
|
|
977
977
|
l.languages;
|
|
978
|
-
var s = o[
|
|
978
|
+
var s = o[r], f = {};
|
|
979
979
|
for (var E in s)
|
|
980
980
|
if (s.hasOwnProperty(E)) {
|
|
981
|
-
if (E ==
|
|
982
|
-
for (var
|
|
983
|
-
i.hasOwnProperty(
|
|
981
|
+
if (E == t)
|
|
982
|
+
for (var g in i)
|
|
983
|
+
i.hasOwnProperty(g) && (f[g] = i[g]);
|
|
984
984
|
i.hasOwnProperty(E) || (f[E] = s[E]);
|
|
985
985
|
}
|
|
986
|
-
var C = o[
|
|
987
|
-
return o[
|
|
988
|
-
|
|
986
|
+
var C = o[r];
|
|
987
|
+
return o[r] = f, l.languages.DFS(l.languages, function(P, W) {
|
|
988
|
+
W === C && P != r && (this[P] = f);
|
|
989
989
|
}), f;
|
|
990
990
|
},
|
|
991
991
|
// Traverse a language definition with Depth First Search
|
|
992
|
-
DFS: function t
|
|
992
|
+
DFS: function r(t, i, o, s) {
|
|
993
993
|
s = s || {};
|
|
994
994
|
var f = l.util.objId;
|
|
995
|
-
for (var E in
|
|
996
|
-
if (
|
|
997
|
-
i.call(
|
|
998
|
-
var
|
|
999
|
-
C === "Object" && !s[f(
|
|
995
|
+
for (var E in t)
|
|
996
|
+
if (t.hasOwnProperty(E)) {
|
|
997
|
+
i.call(t, E, t[E], o || E);
|
|
998
|
+
var g = t[E], C = l.util.type(g);
|
|
999
|
+
C === "Object" && !s[f(g)] ? (s[f(g)] = !0, r(g, i, null, s)) : C === "Array" && !s[f(g)] && (s[f(g)] = !0, r(g, i, E, s));
|
|
1000
1000
|
}
|
|
1001
1001
|
}
|
|
1002
1002
|
},
|
|
@@ -1013,8 +1013,8 @@ var g = 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 g = 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 o = {
|
|
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", o), o.elements = Array.prototype.slice.apply(o.container.querySelectorAll(o.selector)), l.hooks.run("before-all-elements-highlight", o);
|
|
1041
1041
|
for (var s = 0, f; f = o.elements[s++]; )
|
|
1042
|
-
l.highlightElement(f,
|
|
1042
|
+
l.highlightElement(f, t === !0, o.callback);
|
|
1043
1043
|
},
|
|
1044
1044
|
/**
|
|
1045
1045
|
* Highlights the code inside a single element.
|
|
@@ -1069,39 +1069,39 @@ var g = Ie.exports, Je = { exports: {} };
|
|
|
1069
1069
|
* @memberof Prism
|
|
1070
1070
|
* @public
|
|
1071
1071
|
*/
|
|
1072
|
-
highlightElement: function(
|
|
1073
|
-
var o = l.util.getLanguage(
|
|
1074
|
-
l.util.setLanguage(
|
|
1075
|
-
var f =
|
|
1072
|
+
highlightElement: function(r, t, i) {
|
|
1073
|
+
var o = l.util.getLanguage(r), s = l.languages[o];
|
|
1074
|
+
l.util.setLanguage(r, o);
|
|
1075
|
+
var f = r.parentElement;
|
|
1076
1076
|
f && f.nodeName.toLowerCase() === "pre" && l.util.setLanguage(f, o);
|
|
1077
|
-
var E =
|
|
1078
|
-
element:
|
|
1077
|
+
var E = r.textContent, g = {
|
|
1078
|
+
element: r,
|
|
1079
1079
|
language: o,
|
|
1080
1080
|
grammar: s,
|
|
1081
1081
|
code: E
|
|
1082
1082
|
};
|
|
1083
|
-
function C(
|
|
1084
|
-
|
|
1083
|
+
function C(W) {
|
|
1084
|
+
g.highlightedCode = W, 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",
|
|
1087
|
-
l.hooks.run("complete",
|
|
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
|
+
l.hooks.run("complete", g), i && i.call(g.element);
|
|
1088
1088
|
return;
|
|
1089
1089
|
}
|
|
1090
|
-
if (l.hooks.run("before-highlight",
|
|
1091
|
-
C(l.util.encode(
|
|
1090
|
+
if (l.hooks.run("before-highlight", g), !g.grammar) {
|
|
1091
|
+
C(l.util.encode(g.code));
|
|
1092
1092
|
return;
|
|
1093
1093
|
}
|
|
1094
|
-
if (
|
|
1094
|
+
if (t && h.Worker) {
|
|
1095
1095
|
var P = new Worker(l.filename);
|
|
1096
|
-
P.onmessage = function(
|
|
1097
|
-
C(
|
|
1096
|
+
P.onmessage = function(W) {
|
|
1097
|
+
C(W.data);
|
|
1098
1098
|
}, P.postMessage(JSON.stringify({
|
|
1099
|
-
language:
|
|
1100
|
-
code:
|
|
1099
|
+
language: g.language,
|
|
1100
|
+
code: g.code,
|
|
1101
1101
|
immediateClose: !0
|
|
1102
1102
|
}));
|
|
1103
1103
|
} else
|
|
1104
|
-
C(l.highlight(
|
|
1104
|
+
C(l.highlight(g.code, g.grammar, g.language));
|
|
1105
1105
|
},
|
|
1106
1106
|
/**
|
|
1107
1107
|
* Low-level function, only use if you know what you’re doing. It accepts a string of text as input
|
|
@@ -1123,10 +1123,10 @@ var g = 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 o = {
|
|
1128
|
-
code:
|
|
1129
|
-
grammar:
|
|
1128
|
+
code: r,
|
|
1129
|
+
grammar: t,
|
|
1130
1130
|
language: i
|
|
1131
1131
|
};
|
|
1132
1132
|
if (l.hooks.run("before-tokenize", o), !o.grammar)
|
|
@@ -1157,15 +1157,15 @@ var g = 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 o in i)
|
|
1164
|
-
|
|
1165
|
-
delete
|
|
1164
|
+
t[o] = i[o];
|
|
1165
|
+
delete t.rest;
|
|
1166
1166
|
}
|
|
1167
1167
|
var s = new O();
|
|
1168
|
-
return D(s, s.head,
|
|
1168
|
+
return D(s, s.head, r), R(r, s, t, s.head, 0), z(s);
|
|
1169
1169
|
},
|
|
1170
1170
|
/**
|
|
1171
1171
|
* @namespace
|
|
@@ -1186,9 +1186,9 @@ var g = 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 g = 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 o = 0, s; s = i[o++]; )
|
|
1206
|
-
s(
|
|
1206
|
+
s(t);
|
|
1207
1207
|
}
|
|
1208
1208
|
},
|
|
1209
1209
|
Token: b
|
|
1210
1210
|
};
|
|
1211
|
-
|
|
1212
|
-
function b(
|
|
1213
|
-
this.type =
|
|
1214
|
-
}
|
|
1215
|
-
b.stringify = function t
|
|
1216
|
-
if (typeof
|
|
1217
|
-
return
|
|
1218
|
-
if (Array.isArray(
|
|
1211
|
+
h.Prism = l;
|
|
1212
|
+
function b(r, t, i, o) {
|
|
1213
|
+
this.type = r, this.content = t, this.alias = i, this.length = (o || "").length | 0;
|
|
1214
|
+
}
|
|
1215
|
+
b.stringify = function r(t, i) {
|
|
1216
|
+
if (typeof t == "string")
|
|
1217
|
+
return t;
|
|
1218
|
+
if (Array.isArray(t)) {
|
|
1219
1219
|
var o = "";
|
|
1220
|
-
return
|
|
1221
|
-
o +=
|
|
1220
|
+
return t.forEach(function(C) {
|
|
1221
|
+
o += r(C, i);
|
|
1222
1222
|
}), o;
|
|
1223
1223
|
}
|
|
1224
1224
|
var s = {
|
|
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
|
-
}, f =
|
|
1231
|
+
}, f = t.alias;
|
|
1232
1232
|
f && (Array.isArray(f) ? Array.prototype.push.apply(s.classes, f) : s.classes.push(f)), l.hooks.run("wrap", s);
|
|
1233
1233
|
var E = "";
|
|
1234
|
-
for (var
|
|
1235
|
-
E += " " +
|
|
1234
|
+
for (var g in s.attributes)
|
|
1235
|
+
E += " " + g + '="' + (s.attributes[g] || "").replace(/"/g, """) + '"';
|
|
1236
1236
|
return "<" + s.tag + ' class="' + s.classes.join(" ") + '"' + E + ">" + s.content + "</" + s.tag + ">";
|
|
1237
1237
|
};
|
|
1238
|
-
function y(
|
|
1239
|
-
|
|
1240
|
-
var s =
|
|
1238
|
+
function y(r, t, i, o) {
|
|
1239
|
+
r.lastIndex = t;
|
|
1240
|
+
var s = r.exec(i);
|
|
1241
1241
|
if (s && o && s[1]) {
|
|
1242
1242
|
var f = s[1].length;
|
|
1243
1243
|
s.index += f, s[0] = s[0].slice(f);
|
|
1244
1244
|
}
|
|
1245
1245
|
return s;
|
|
1246
1246
|
}
|
|
1247
|
-
function
|
|
1247
|
+
function R(r, t, i, o, s, f) {
|
|
1248
1248
|
for (var E in i)
|
|
1249
1249
|
if (!(!i.hasOwnProperty(E) || !i[E])) {
|
|
1250
|
-
var
|
|
1251
|
-
|
|
1252
|
-
for (var C = 0; C <
|
|
1250
|
+
var g = i[E];
|
|
1251
|
+
g = Array.isArray(g) ? g : [g];
|
|
1252
|
+
for (var C = 0; C < g.length; ++C) {
|
|
1253
1253
|
if (f && f.cause == E + "," + C)
|
|
1254
1254
|
return;
|
|
1255
|
-
var P =
|
|
1256
|
-
if (
|
|
1257
|
-
var
|
|
1258
|
-
P.pattern = RegExp(P.pattern.source,
|
|
1255
|
+
var P = g[C], W = P.inside, X = !!P.lookbehind, G = !!P.greedy, re = P.alias;
|
|
1256
|
+
if (G && !P.pattern.global) {
|
|
1257
|
+
var he = P.pattern.toString().match(/[imsuy]*$/)[0];
|
|
1258
|
+
P.pattern = RegExp(P.pattern.source, he + "g");
|
|
1259
1259
|
}
|
|
1260
|
-
for (var
|
|
1261
|
-
var
|
|
1262
|
-
if (
|
|
1260
|
+
for (var ue = P.pattern || P, j = o.next, H = s; j !== t.tail && !(f && H >= f.reach); H += j.value.length, j = j.next) {
|
|
1261
|
+
var q = j.value;
|
|
1262
|
+
if (t.length > r.length)
|
|
1263
1263
|
return;
|
|
1264
|
-
if (!(
|
|
1265
|
-
var
|
|
1266
|
-
if (
|
|
1267
|
-
if (
|
|
1264
|
+
if (!(q instanceof b)) {
|
|
1265
|
+
var J = 1, B;
|
|
1266
|
+
if (G) {
|
|
1267
|
+
if (B = y(ue, H, r, X), !B || B.index >= r.length)
|
|
1268
1268
|
break;
|
|
1269
|
-
var
|
|
1270
|
-
for (
|
|
1271
|
-
j = j.next,
|
|
1272
|
-
if (
|
|
1269
|
+
var te = B.index, le = B.index + B[0].length, Q = H;
|
|
1270
|
+
for (Q += j.value.length; te >= Q; )
|
|
1271
|
+
j = j.next, Q += j.value.length;
|
|
1272
|
+
if (Q -= j.value.length, H = Q, j.value instanceof b)
|
|
1273
1273
|
continue;
|
|
1274
|
-
for (var
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
} else if (
|
|
1274
|
+
for (var K = j; K !== t.tail && (Q < le || typeof K.value == "string"); K = K.next)
|
|
1275
|
+
J++, Q += K.value.length;
|
|
1276
|
+
J--, q = r.slice(H, Q), B.index -= H;
|
|
1277
|
+
} else if (B = y(ue, 0, q, X), !B)
|
|
1278
1278
|
continue;
|
|
1279
|
-
var
|
|
1280
|
-
f &&
|
|
1281
|
-
var
|
|
1282
|
-
|
|
1283
|
-
var
|
|
1284
|
-
if (j = D(
|
|
1285
|
-
var
|
|
1279
|
+
var te = B.index, ne = B[0], ae = q.slice(0, te), de = q.slice(te + ne.length), ie = H + q.length;
|
|
1280
|
+
f && ie > f.reach && (f.reach = ie);
|
|
1281
|
+
var oe = j.prev;
|
|
1282
|
+
ae && (oe = D(t, oe, ae), H += ae.length), I(t, oe, J);
|
|
1283
|
+
var me = new b(E, W ? l.tokenize(ne, W) : ne, re, ne);
|
|
1284
|
+
if (j = D(t, oe, me), de && D(t, j, de), J > 1) {
|
|
1285
|
+
var ce = {
|
|
1286
1286
|
cause: E + "," + C,
|
|
1287
|
-
reach:
|
|
1287
|
+
reach: ie
|
|
1288
1288
|
};
|
|
1289
|
-
|
|
1289
|
+
R(r, t, i, j.prev, H, ce), f && ce.reach > f.reach && (f.reach = ce.reach);
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
1292
|
}
|
|
@@ -1294,40 +1294,40 @@ var g = 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 o =
|
|
1302
|
-
return
|
|
1300
|
+
function D(r, t, i) {
|
|
1301
|
+
var o = t.next, s = { value: i, prev: t, next: o };
|
|
1302
|
+
return t.next = s, o.prev = s, r.length++, s;
|
|
1303
1303
|
}
|
|
1304
|
-
function I(
|
|
1305
|
-
for (var o =
|
|
1304
|
+
function I(r, t, i) {
|
|
1305
|
+
for (var o = t.next, s = 0; s < i && o !== r.tail; s++)
|
|
1306
1306
|
o = o.next;
|
|
1307
|
-
|
|
1307
|
+
t.next = o, o.prev = t, r.length -= s;
|
|
1308
1308
|
}
|
|
1309
|
-
function
|
|
1310
|
-
for (var
|
|
1311
|
-
|
|
1312
|
-
return
|
|
1309
|
+
function z(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 (!h.document)
|
|
1315
|
+
return h.addEventListener && (l.disableWorkerMessageHandler || h.addEventListener("message", function(r) {
|
|
1316
|
+
var t = JSON.parse(r.data), i = t.language, o = t.code, s = t.immediateClose;
|
|
1317
|
+
h.postMessage(l.highlight(o, l.languages[i], i)), s && h.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));
|
|
1321
|
-
function
|
|
1321
|
+
function S() {
|
|
1322
1322
|
l.manual || l.highlightAll();
|
|
1323
1323
|
}
|
|
1324
1324
|
if (!l.manual) {
|
|
1325
|
-
var
|
|
1326
|
-
|
|
1325
|
+
var k = document.readyState;
|
|
1326
|
+
k === "loading" || k === "interactive" && F && F.defer ? document.addEventListener("DOMContentLoaded", S) : window.requestAnimationFrame ? window.requestAnimationFrame(S) : window.setTimeout(S, 16);
|
|
1327
1327
|
}
|
|
1328
1328
|
return l;
|
|
1329
|
-
}(
|
|
1330
|
-
|
|
1329
|
+
}(p);
|
|
1330
|
+
d.exports && (d.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 g = 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(h) {
|
|
1408
|
+
h.type === "entity" && (h.attributes.title = h.content.replace(/&/, "&"));
|
|
1409
1409
|
}), Object.defineProperty(n.languages.markup.tag, "addInlined", {
|
|
1410
1410
|
/**
|
|
1411
1411
|
* Adds an inlined language to markup.
|
|
@@ -1418,22 +1418,22 @@ var g = Ie.exports, Je = { exports: {} };
|
|
|
1418
1418
|
* @example
|
|
1419
1419
|
* addInlined('style', 'css');
|
|
1420
1420
|
*/
|
|
1421
|
-
value: function(m,
|
|
1422
|
-
var
|
|
1423
|
-
|
|
1421
|
+
value: function(m, T) {
|
|
1422
|
+
var w = {};
|
|
1423
|
+
w["language-" + T] = {
|
|
1424
1424
|
pattern: /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i,
|
|
1425
1425
|
lookbehind: !0,
|
|
1426
|
-
inside: n.languages[
|
|
1427
|
-
},
|
|
1426
|
+
inside: n.languages[T]
|
|
1427
|
+
}, w.cdata = /^<!\[CDATA\[|\]\]>$/i;
|
|
1428
1428
|
var l = {
|
|
1429
1429
|
"included-cdata": {
|
|
1430
1430
|
pattern: /<!\[CDATA\[[\s\S]*?\]\]>/i,
|
|
1431
|
-
inside:
|
|
1431
|
+
inside: w
|
|
1432
1432
|
}
|
|
1433
1433
|
};
|
|
1434
|
-
l["language-" +
|
|
1434
|
+
l["language-" + T] = {
|
|
1435
1435
|
pattern: /[\s\S]+/,
|
|
1436
|
-
inside: n.languages[
|
|
1436
|
+
inside: n.languages[T]
|
|
1437
1437
|
};
|
|
1438
1438
|
var b = {};
|
|
1439
1439
|
b[m] = {
|
|
@@ -1457,10 +1457,10 @@ var g = Ie.exports, Je = { exports: {} };
|
|
|
1457
1457
|
* @example
|
|
1458
1458
|
* addAttribute('style', 'css');
|
|
1459
1459
|
*/
|
|
1460
|
-
value: function(
|
|
1460
|
+
value: function(h, m) {
|
|
1461
1461
|
n.languages.markup.tag.inside["special-attr"].push({
|
|
1462
1462
|
pattern: RegExp(
|
|
1463
|
-
/(^|["'\s])/.source + "(?:" +
|
|
1463
|
+
/(^|["'\s])/.source + "(?:" + h + ")" + /\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))/.source,
|
|
1464
1464
|
"i"
|
|
1465
1465
|
),
|
|
1466
1466
|
lookbehind: !0,
|
|
@@ -1487,9 +1487,9 @@ var g = 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(
|
|
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(h) {
|
|
1491
1491
|
var m = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
1492
|
-
|
|
1492
|
+
h.languages.css = {
|
|
1493
1493
|
comment: /\/\*[\s\S]*?\*\//,
|
|
1494
1494
|
atrule: {
|
|
1495
1495
|
pattern: RegExp("@[\\w-](?:" + /[^;{\s"']|\s+(?!\s)/.source + "|" + m.source + ")*?" + /(?:;|(?=\s*\{))/.source),
|
|
@@ -1538,9 +1538,9 @@ var g = Ie.exports, Je = { exports: {} };
|
|
|
1538
1538
|
lookbehind: !0
|
|
1539
1539
|
},
|
|
1540
1540
|
punctuation: /[(){};:,]/
|
|
1541
|
-
},
|
|
1542
|
-
var
|
|
1543
|
-
|
|
1541
|
+
}, h.languages.css.atrule.inside.rest = h.languages.css;
|
|
1542
|
+
var T = h.languages.markup;
|
|
1543
|
+
T && (T.tag.addInlined("style", "css"), T.tag.addAttribute("style", "css"));
|
|
1544
1544
|
}(n), n.languages.clike = {
|
|
1545
1545
|
comment: [
|
|
1546
1546
|
{
|
|
@@ -1705,9 +1705,9 @@ var g = 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
|
|
1709
|
-
return "✖ Error " + F + " while fetching file: " +
|
|
1710
|
-
},
|
|
1708
|
+
var h = "Loading…", m = function(F, S) {
|
|
1709
|
+
return "✖ Error " + F + " while fetching file: " + S;
|
|
1710
|
+
}, T = "✖ Error: File does not exist or is empty", w = {
|
|
1711
1711
|
js: "javascript",
|
|
1712
1712
|
py: "python",
|
|
1713
1713
|
rb: "ruby",
|
|
@@ -1717,52 +1717,52 @@ var g = Ie.exports, Je = { exports: {} };
|
|
|
1717
1717
|
bat: "batch",
|
|
1718
1718
|
h: "c",
|
|
1719
1719
|
tex: "latex"
|
|
1720
|
-
}, l = "data-src-status", b = "loading", y = "loaded",
|
|
1721
|
-
function D(F,
|
|
1722
|
-
var
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
},
|
|
1720
|
+
}, l = "data-src-status", b = "loading", y = "loaded", R = "failed", O = "pre[data-src]:not([" + l + '="' + y + '"]):not([' + l + '="' + b + '"])';
|
|
1721
|
+
function D(F, S, k) {
|
|
1722
|
+
var r = new XMLHttpRequest();
|
|
1723
|
+
r.open("GET", F, !0), r.onreadystatechange = function() {
|
|
1724
|
+
r.readyState == 4 && (r.status < 400 && r.responseText ? S(r.responseText) : r.status >= 400 ? k(m(r.status, r.statusText)) : k(T));
|
|
1725
|
+
}, r.send(null);
|
|
1726
1726
|
}
|
|
1727
1727
|
function I(F) {
|
|
1728
|
-
var
|
|
1729
|
-
if (
|
|
1730
|
-
var
|
|
1731
|
-
return
|
|
1728
|
+
var S = /^\s*(\d+)\s*(?:(,)\s*(?:(\d+)\s*)?)?$/.exec(F || "");
|
|
1729
|
+
if (S) {
|
|
1730
|
+
var k = Number(S[1]), r = S[2], t = S[3];
|
|
1731
|
+
return r ? t ? [k, Number(t)] : [k, void 0] : [k, k];
|
|
1732
1732
|
}
|
|
1733
1733
|
}
|
|
1734
1734
|
n.hooks.add("before-highlightall", function(F) {
|
|
1735
1735
|
F.selector += ", " + O;
|
|
1736
1736
|
}), n.hooks.add("before-sanity-check", function(F) {
|
|
1737
|
-
var
|
|
1737
|
+
var S = (
|
|
1738
1738
|
/** @type {HTMLPreElement} */
|
|
1739
1739
|
F.element
|
|
1740
1740
|
);
|
|
1741
|
-
if (
|
|
1742
|
-
F.code = "",
|
|
1743
|
-
var
|
|
1744
|
-
|
|
1745
|
-
var
|
|
1746
|
-
if (
|
|
1747
|
-
var i = (/\.(\w+)$/.exec(
|
|
1748
|
-
|
|
1749
|
-
}
|
|
1750
|
-
n.util.setLanguage(
|
|
1741
|
+
if (S.matches(O)) {
|
|
1742
|
+
F.code = "", S.setAttribute(l, b);
|
|
1743
|
+
var k = S.appendChild(document.createElement("CODE"));
|
|
1744
|
+
k.textContent = h;
|
|
1745
|
+
var r = S.getAttribute("data-src"), t = F.language;
|
|
1746
|
+
if (t === "none") {
|
|
1747
|
+
var i = (/\.(\w+)$/.exec(r) || [, "none"])[1];
|
|
1748
|
+
t = w[i] || i;
|
|
1749
|
+
}
|
|
1750
|
+
n.util.setLanguage(k, t), n.util.setLanguage(S, t);
|
|
1751
1751
|
var o = n.plugins.autoloader;
|
|
1752
|
-
o && o.loadLanguages(
|
|
1753
|
-
|
|
1752
|
+
o && o.loadLanguages(t), D(
|
|
1753
|
+
r,
|
|
1754
1754
|
function(s) {
|
|
1755
|
-
|
|
1756
|
-
var f = I(
|
|
1755
|
+
S.setAttribute(l, y);
|
|
1756
|
+
var f = I(S.getAttribute("data-range"));
|
|
1757
1757
|
if (f) {
|
|
1758
|
-
var E = s.split(/\r\n?|\n/g),
|
|
1759
|
-
|
|
1760
|
-
`),
|
|
1758
|
+
var E = s.split(/\r\n?|\n/g), g = f[0], C = f[1] == null ? E.length : f[1];
|
|
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)), s = E.slice(g, C).join(`
|
|
1760
|
+
`), S.hasAttribute("data-start") || S.setAttribute("data-start", String(g + 1));
|
|
1761
1761
|
}
|
|
1762
|
-
|
|
1762
|
+
k.textContent = s, n.highlightElement(k);
|
|
1763
1763
|
},
|
|
1764
1764
|
function(s) {
|
|
1765
|
-
|
|
1765
|
+
S.setAttribute(l, R), k.textContent = s;
|
|
1766
1766
|
}
|
|
1767
1767
|
);
|
|
1768
1768
|
}
|
|
@@ -1774,19 +1774,19 @@ var g = Ie.exports, Je = { exports: {} };
|
|
|
1774
1774
|
*
|
|
1775
1775
|
* @param {ParentNode} [container=document]
|
|
1776
1776
|
*/
|
|
1777
|
-
highlight: function(
|
|
1778
|
-
for (var
|
|
1779
|
-
n.highlightElement(
|
|
1777
|
+
highlight: function(S) {
|
|
1778
|
+
for (var k = (S || document).querySelectorAll(O), r = 0, t; t = k[r++]; )
|
|
1779
|
+
n.highlightElement(t);
|
|
1780
1780
|
}
|
|
1781
1781
|
};
|
|
1782
|
-
var
|
|
1782
|
+
var z = !1;
|
|
1783
1783
|
n.fileHighlight = function() {
|
|
1784
|
-
|
|
1784
|
+
z || (console.warn("Prism.fileHighlight is deprecated. Use `Prism.plugins.fileHighlight.highlight` instead."), z = !0), n.plugins.fileHighlight.highlight.apply(this, arguments);
|
|
1785
1785
|
};
|
|
1786
1786
|
}();
|
|
1787
1787
|
})(Je);
|
|
1788
|
-
var
|
|
1789
|
-
const
|
|
1788
|
+
var Tr = Je.exports;
|
|
1789
|
+
const Le = /* @__PURE__ */ wr(Tr);
|
|
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(d) {
|
|
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, h = {
|
|
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
|
+
d.languages.java = d.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
|
+
h,
|
|
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: h.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: h.inside
|
|
2082
2082
|
}
|
|
2083
2083
|
],
|
|
2084
|
-
keyword:
|
|
2084
|
+
keyword: p,
|
|
2085
2085
|
function: [
|
|
2086
|
-
|
|
2086
|
+
d.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
|
+
}), d.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
|
+
}), d.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": h,
|
|
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: h.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: h.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(d) {
|
|
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
|
+
}), d.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
|
+
}, d.languages.rust["closure-params"].inside.rest = d.languages.rust, d.languages.rust.attribute.inside.string = d.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(d) {
|
|
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
|
+
}, h = {
|
|
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
|
+
d.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: h
|
|
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: h
|
|
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: h.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: h.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,7 +2581,7 @@ Prism.languages.sql = {
|
|
|
2581
2581
|
pattern: /(^|\s)(?:[1-9]\d*|0)(?:[.,]\d+)?\b/,
|
|
2582
2582
|
lookbehind: !0
|
|
2583
2583
|
}
|
|
2584
|
-
}, n.inside =
|
|
2584
|
+
}, n.inside = d.languages.bash;
|
|
2585
2585
|
for (var m = [
|
|
2586
2586
|
"comment",
|
|
2587
2587
|
"function-name",
|
|
@@ -2598,9 +2598,9 @@ Prism.languages.sql = {
|
|
|
2598
2598
|
"operator",
|
|
2599
2599
|
"punctuation",
|
|
2600
2600
|
"number"
|
|
2601
|
-
],
|
|
2602
|
-
|
|
2603
|
-
|
|
2601
|
+
], T = h.variable[1].inside, w = 0; w < m.length; w++)
|
|
2602
|
+
T[m[w]] = d.languages.bash[m[w]];
|
|
2603
|
+
d.languages.sh = d.languages.bash, d.languages.shell = d.languages.bash;
|
|
2604
2604
|
})(Prism);
|
|
2605
2605
|
Prism.languages.json = {
|
|
2606
2606
|
property: {
|
|
@@ -2627,7 +2627,7 @@ Prism.languages.json = {
|
|
|
2627
2627
|
}
|
|
2628
2628
|
};
|
|
2629
2629
|
Prism.languages.webmanifest = Prism.languages.json;
|
|
2630
|
-
const
|
|
2630
|
+
const Rr = `
|
|
2631
2631
|
/* 默认代码颜色 */
|
|
2632
2632
|
.hep-cr-editor .hep-cr-highlight code,
|
|
2633
2633
|
.hep-cr-editor .hep-cr-highlight pre {
|
|
@@ -2711,7 +2711,7 @@ const Rt = `
|
|
|
2711
2711
|
.hep-cr-editor .token.console {
|
|
2712
2712
|
color: #f8f8f2 !important;
|
|
2713
2713
|
}
|
|
2714
|
-
`,
|
|
2714
|
+
`, _r = `
|
|
2715
2715
|
/* 默认代码颜色 */
|
|
2716
2716
|
.hep-cr-editor .hep-cr-highlight code,
|
|
2717
2717
|
.hep-cr-editor .hep-cr-highlight pre {
|
|
@@ -2789,15 +2789,15 @@ const Rt = `
|
|
|
2789
2789
|
color: #333 !important;
|
|
2790
2790
|
}
|
|
2791
2791
|
`;
|
|
2792
|
-
window.Prism =
|
|
2793
|
-
function
|
|
2792
|
+
window.Prism = Le;
|
|
2793
|
+
function Fr(d) {
|
|
2794
2794
|
if (typeof document > "u") return;
|
|
2795
|
-
const
|
|
2795
|
+
const p = "hep-cr-prism-styles", n = document.getElementById(p), h = d === "dark" ? Rr : _r;
|
|
2796
2796
|
n && n.remove();
|
|
2797
2797
|
const m = document.createElement("style");
|
|
2798
|
-
m.id =
|
|
2798
|
+
m.id = p, m.textContent = h, document.head.appendChild(m);
|
|
2799
2799
|
}
|
|
2800
|
-
const
|
|
2800
|
+
const Or = {
|
|
2801
2801
|
javascript: "javascript",
|
|
2802
2802
|
js: "javascript",
|
|
2803
2803
|
typescript: "typescript",
|
|
@@ -2829,58 +2829,58 @@ const Ot = {
|
|
|
2829
2829
|
markdown: "markdown",
|
|
2830
2830
|
md: "markdown"
|
|
2831
2831
|
};
|
|
2832
|
-
function
|
|
2833
|
-
const
|
|
2834
|
-
return
|
|
2832
|
+
function Ir(d) {
|
|
2833
|
+
const p = document.createElement("div");
|
|
2834
|
+
return p.textContent = d, p.innerHTML;
|
|
2835
2835
|
}
|
|
2836
|
-
const
|
|
2837
|
-
value:
|
|
2838
|
-
language:
|
|
2836
|
+
const Nr = ({
|
|
2837
|
+
value: d,
|
|
2838
|
+
language: p,
|
|
2839
2839
|
theme: n = "dark",
|
|
2840
|
-
disabled:
|
|
2840
|
+
disabled: h = !1,
|
|
2841
2841
|
onChange: m
|
|
2842
2842
|
}) => {
|
|
2843
|
-
const
|
|
2843
|
+
const T = Ne(null), w = Ne(null), l = xe(() => Or[p.toLowerCase()] || "javascript", [p]), b = n === "dark" ? "#1e1e1e" : "#fafafa", y = xe(() => {
|
|
2844
2844
|
try {
|
|
2845
|
-
const I =
|
|
2845
|
+
const I = Le.languages[l];
|
|
2846
2846
|
if (I)
|
|
2847
|
-
return
|
|
2847
|
+
return Le.highlight(d || "", I, l);
|
|
2848
2848
|
} catch {
|
|
2849
2849
|
}
|
|
2850
|
-
return
|
|
2851
|
-
}, [
|
|
2850
|
+
return Ir(d || "");
|
|
2851
|
+
}, [d, l]), R = (I) => {
|
|
2852
2852
|
m == null || m(I.target.value);
|
|
2853
2853
|
}, O = () => {
|
|
2854
|
-
|
|
2854
|
+
T.current && w.current && (w.current.scrollTop = T.current.scrollTop, w.current.scrollLeft = T.current.scrollLeft);
|
|
2855
2855
|
}, D = (I) => {
|
|
2856
2856
|
if (I.key === "Tab") {
|
|
2857
2857
|
I.preventDefault();
|
|
2858
|
-
const
|
|
2859
|
-
m == null || m(
|
|
2860
|
-
|
|
2858
|
+
const z = I.target, F = z.selectionStart, S = z.selectionEnd, k = d.substring(0, F) + " " + d.substring(S);
|
|
2859
|
+
m == null || m(k), requestAnimationFrame(() => {
|
|
2860
|
+
z.selectionStart = z.selectionEnd = F + 2;
|
|
2861
2861
|
});
|
|
2862
2862
|
}
|
|
2863
2863
|
};
|
|
2864
|
-
return
|
|
2865
|
-
|
|
2866
|
-
}, [n]), /* @__PURE__ */
|
|
2867
|
-
/* @__PURE__ */
|
|
2864
|
+
return Se(() => {
|
|
2865
|
+
Fr(n);
|
|
2866
|
+
}, [n]), /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-editor theme-${n}`, style: { background: b }, children: [
|
|
2867
|
+
/* @__PURE__ */ c.jsx(
|
|
2868
2868
|
"pre",
|
|
2869
2869
|
{
|
|
2870
|
-
ref:
|
|
2870
|
+
ref: w,
|
|
2871
2871
|
className: `hep-cr-highlight language-${l}`,
|
|
2872
2872
|
"aria-hidden": "true",
|
|
2873
|
-
children: /* @__PURE__ */
|
|
2873
|
+
children: /* @__PURE__ */ c.jsx("code", { dangerouslySetInnerHTML: { __html: y } })
|
|
2874
2874
|
}
|
|
2875
2875
|
),
|
|
2876
|
-
/* @__PURE__ */
|
|
2876
|
+
/* @__PURE__ */ c.jsx(
|
|
2877
2877
|
"textarea",
|
|
2878
2878
|
{
|
|
2879
|
-
ref:
|
|
2879
|
+
ref: T,
|
|
2880
2880
|
className: "hep-cr-input",
|
|
2881
|
-
value:
|
|
2882
|
-
disabled:
|
|
2883
|
-
onChange:
|
|
2881
|
+
value: d,
|
|
2882
|
+
disabled: h,
|
|
2883
|
+
onChange: R,
|
|
2884
2884
|
onScroll: O,
|
|
2885
2885
|
onKeyDown: D,
|
|
2886
2886
|
spellCheck: !1,
|
|
@@ -2888,7 +2888,7 @@ const Nt = ({
|
|
|
2888
2888
|
}
|
|
2889
2889
|
)
|
|
2890
2890
|
] });
|
|
2891
|
-
},
|
|
2891
|
+
}, Cr = `
|
|
2892
2892
|
.hep-cr-editor {
|
|
2893
2893
|
position: relative;
|
|
2894
2894
|
flex: 1;
|
|
@@ -2947,21 +2947,21 @@ const Nt = ({
|
|
|
2947
2947
|
}
|
|
2948
2948
|
`;
|
|
2949
2949
|
if (typeof document < "u") {
|
|
2950
|
-
const
|
|
2951
|
-
if (!document.getElementById(
|
|
2952
|
-
const
|
|
2953
|
-
|
|
2950
|
+
const d = "hep-cr-editor-styles";
|
|
2951
|
+
if (!document.getElementById(d)) {
|
|
2952
|
+
const p = document.createElement("style");
|
|
2953
|
+
p.id = d, p.textContent = Cr, document.head.appendChild(p);
|
|
2954
2954
|
}
|
|
2955
2955
|
}
|
|
2956
|
-
var
|
|
2957
|
-
let
|
|
2958
|
-
class
|
|
2959
|
-
constructor(
|
|
2960
|
-
Ze(this, "baseUrl"), Ze(this, "timeout"), this.baseUrl =
|
|
2956
|
+
var Lr = Object.defineProperty, Pr = (d, p, n) => p in d ? Lr(d, p, { enumerable: !0, configurable: !0, writable: !0, value: n }) : d[p] = n, Ze = (d, p, n) => Pr(d, typeof p != "symbol" ? p + "" : p, n);
|
|
2957
|
+
let Oe = null;
|
|
2958
|
+
class Dr {
|
|
2959
|
+
constructor(p = {}) {
|
|
2960
|
+
Ze(this, "baseUrl"), Ze(this, "timeout"), this.baseUrl = p.pistonUrl || "/api/piston", this.timeout = p.timeout || 3e3;
|
|
2961
2961
|
}
|
|
2962
|
-
async getRuntimes(
|
|
2963
|
-
if (
|
|
2964
|
-
return
|
|
2962
|
+
async getRuntimes(p = !1) {
|
|
2963
|
+
if (Oe && !p)
|
|
2964
|
+
return Oe;
|
|
2965
2965
|
try {
|
|
2966
2966
|
const n = await fetch(`${this.baseUrl}/runtimes`, {
|
|
2967
2967
|
method: "GET",
|
|
@@ -2971,33 +2971,33 @@ class Dt {
|
|
|
2971
2971
|
});
|
|
2972
2972
|
if (!n.ok)
|
|
2973
2973
|
throw new Error(`Failed to fetch runtimes: ${n.statusText}`);
|
|
2974
|
-
const
|
|
2975
|
-
return
|
|
2974
|
+
const h = await n.json();
|
|
2975
|
+
return Oe = h, h;
|
|
2976
2976
|
} catch (n) {
|
|
2977
2977
|
throw console.error("Failed to fetch runtimes:", n), n;
|
|
2978
2978
|
}
|
|
2979
2979
|
}
|
|
2980
|
-
async execute(
|
|
2980
|
+
async execute(p, n, h = {}) {
|
|
2981
2981
|
const m = (await this.getRuntimes()).find(
|
|
2982
2982
|
(b) => {
|
|
2983
2983
|
var y;
|
|
2984
|
-
return b.language.toLowerCase() ===
|
|
2984
|
+
return b.language.toLowerCase() === p.toLowerCase() || ((y = b.aliases) == null ? void 0 : y.some((R) => R.toLowerCase() === p.toLowerCase()));
|
|
2985
2985
|
}
|
|
2986
2986
|
);
|
|
2987
2987
|
if (!m)
|
|
2988
|
-
throw new Error(`Language '${
|
|
2989
|
-
const
|
|
2988
|
+
throw new Error(`Language '${p}' is not supported`);
|
|
2989
|
+
const T = this.getFileName(p), w = {
|
|
2990
2990
|
language: m.language,
|
|
2991
|
-
version:
|
|
2991
|
+
version: h.version || m.version,
|
|
2992
2992
|
files: [
|
|
2993
2993
|
{
|
|
2994
|
-
name:
|
|
2994
|
+
name: T,
|
|
2995
2995
|
content: n
|
|
2996
2996
|
}
|
|
2997
2997
|
],
|
|
2998
|
-
stdin:
|
|
2999
|
-
args:
|
|
3000
|
-
run_timeout:
|
|
2998
|
+
stdin: h.stdin || "",
|
|
2999
|
+
args: h.args || [],
|
|
3000
|
+
run_timeout: h.runTimeout || this.timeout,
|
|
3001
3001
|
compile_timeout: this.timeout
|
|
3002
3002
|
}, l = Date.now();
|
|
3003
3003
|
try {
|
|
@@ -3006,17 +3006,17 @@ class Dt {
|
|
|
3006
3006
|
headers: {
|
|
3007
3007
|
"Content-Type": "application/json"
|
|
3008
3008
|
},
|
|
3009
|
-
body: JSON.stringify(
|
|
3009
|
+
body: JSON.stringify(w)
|
|
3010
3010
|
});
|
|
3011
3011
|
if (!b.ok)
|
|
3012
3012
|
throw new Error(`Execute failed: ${b.statusText}`);
|
|
3013
|
-
const y = await b.json(),
|
|
3013
|
+
const y = await b.json(), R = Date.now() - l, O = y.run.stdout || "", D = y.run.stderr || "";
|
|
3014
3014
|
return {
|
|
3015
3015
|
success: y.run.code === 0,
|
|
3016
3016
|
output: O,
|
|
3017
3017
|
stderr: D,
|
|
3018
3018
|
code: y.run.code,
|
|
3019
|
-
executionTime:
|
|
3019
|
+
executionTime: R,
|
|
3020
3020
|
compile: y.compile ? {
|
|
3021
3021
|
stdout: y.compile.stdout || "",
|
|
3022
3022
|
stderr: y.compile.stderr || "",
|
|
@@ -3033,7 +3033,7 @@ class Dt {
|
|
|
3033
3033
|
};
|
|
3034
3034
|
}
|
|
3035
3035
|
}
|
|
3036
|
-
getFileName(
|
|
3036
|
+
getFileName(p) {
|
|
3037
3037
|
return {
|
|
3038
3038
|
javascript: "main.js",
|
|
3039
3039
|
typescript: "main.ts",
|
|
@@ -3060,10 +3060,10 @@ class Dt {
|
|
|
3060
3060
|
css: "style.css",
|
|
3061
3061
|
sql: "query.sql",
|
|
3062
3062
|
markdown: "readme.md"
|
|
3063
|
-
}[
|
|
3063
|
+
}[p.toLowerCase()] || `main.${p}`;
|
|
3064
3064
|
}
|
|
3065
3065
|
}
|
|
3066
|
-
const
|
|
3066
|
+
const jr = {
|
|
3067
3067
|
javascript: 'console.log("Hello, World!");',
|
|
3068
3068
|
typescript: 'console.log("Hello, World!");',
|
|
3069
3069
|
python: 'print("Hello, World!")',
|
|
@@ -3161,215 +3161,253 @@ h1 {
|
|
|
3161
3161
|
|
|
3162
3162
|
This is a sample markdown document.`
|
|
3163
3163
|
};
|
|
3164
|
-
function
|
|
3165
|
-
const
|
|
3166
|
-
return
|
|
3164
|
+
function Ie(d) {
|
|
3165
|
+
const p = d.toLowerCase();
|
|
3166
|
+
return jr[p] || `// ${d}
|
|
3167
3167
|
// Write your code here`;
|
|
3168
3168
|
}
|
|
3169
|
-
const $
|
|
3170
|
-
pistonUrl:
|
|
3171
|
-
language:
|
|
3169
|
+
const $r = ({
|
|
3170
|
+
pistonUrl: d = "/api/piston",
|
|
3171
|
+
language: p = "javascript",
|
|
3172
3172
|
theme: n = "light",
|
|
3173
|
-
showLanguageSelector:
|
|
3173
|
+
showLanguageSelector: h = !0,
|
|
3174
3174
|
showEditor: m = !0,
|
|
3175
|
-
editable:
|
|
3176
|
-
defaultCode:
|
|
3175
|
+
editable: T = !0,
|
|
3176
|
+
defaultCode: w = "",
|
|
3177
3177
|
executorLabel: l = "运行",
|
|
3178
3178
|
onExecuteStart: b,
|
|
3179
3179
|
onExecuteEnd: y,
|
|
3180
|
-
onLanguageChange:
|
|
3180
|
+
onLanguageChange: R
|
|
3181
3181
|
}) => {
|
|
3182
|
-
const [O, D] =
|
|
3183
|
-
value: `${
|
|
3184
|
-
label: `${
|
|
3185
|
-
})), [O]),
|
|
3186
|
-
|
|
3187
|
-
async function
|
|
3188
|
-
|
|
3182
|
+
const [O, D] = V([]), [I, z] = V(p), [F, S] = V(n), [k, r] = V(w), [t, i] = V(""), [o, s] = V(""), [f, E] = V(!1), [g, C] = V(null), [P, W] = V("stdout"), [X, G] = V(null), [re, he] = V(!0), [ue, j] = V(60), [H, q] = V(!1), [J, B] = V(!1), le = xe(() => new Dr({ pistonUrl: d }), [d]), Q = xe(() => O.map((_) => ({
|
|
3183
|
+
value: `${_.language}:${_.version}`,
|
|
3184
|
+
label: `${_.language.charAt(0).toUpperCase() + _.language.slice(1)} ${_.version}`
|
|
3185
|
+
})), [O]), K = xe(() => I.includes(":") ? I.split(":")[0] : I, [I]);
|
|
3186
|
+
Se(() => {
|
|
3187
|
+
async function _() {
|
|
3188
|
+
he(!0), G(null);
|
|
3189
3189
|
try {
|
|
3190
|
-
const
|
|
3191
|
-
D(
|
|
3192
|
-
} catch (
|
|
3193
|
-
|
|
3190
|
+
const $ = await le.getRuntimes();
|
|
3191
|
+
D($);
|
|
3192
|
+
} catch ($) {
|
|
3193
|
+
G($ instanceof Error ? $.message : "Failed to load runtimes");
|
|
3194
3194
|
} finally {
|
|
3195
|
-
|
|
3195
|
+
he(!1);
|
|
3196
3196
|
}
|
|
3197
3197
|
}
|
|
3198
|
-
|
|
3199
|
-
}, [
|
|
3200
|
-
!
|
|
3201
|
-
}, [O,
|
|
3202
|
-
const
|
|
3203
|
-
(
|
|
3204
|
-
const
|
|
3205
|
-
|
|
3206
|
-
const fe =
|
|
3207
|
-
|
|
3198
|
+
_();
|
|
3199
|
+
}, [le]), Se(() => {
|
|
3200
|
+
!k && O.length > 0 && r(w || Ie(K));
|
|
3201
|
+
}, [O, k, w, K]);
|
|
3202
|
+
const te = se(
|
|
3203
|
+
(_) => {
|
|
3204
|
+
const $ = _.target.value, pe = $.includes(":") ? $.split(":")[0] : $;
|
|
3205
|
+
z($);
|
|
3206
|
+
const fe = Ie(pe);
|
|
3207
|
+
r(fe), R == null || R(pe, fe);
|
|
3208
3208
|
},
|
|
3209
|
-
[
|
|
3210
|
-
),
|
|
3209
|
+
[R]
|
|
3210
|
+
), ne = se(async () => {
|
|
3211
3211
|
if (!f) {
|
|
3212
|
-
E(!0), i(""), s(""), C(null),
|
|
3212
|
+
E(!0), i(""), s(""), C(null), G(null), W("stdout"), b == null || b();
|
|
3213
3213
|
try {
|
|
3214
|
-
const
|
|
3215
|
-
i(
|
|
3216
|
-
} catch (
|
|
3217
|
-
const
|
|
3218
|
-
|
|
3214
|
+
const _ = await le.execute(K, k);
|
|
3215
|
+
i(_.output), s(_.stderr), C(_.executionTime || null), W(_.stderr ? "stderr" : "stdout"), y == null || y(_);
|
|
3216
|
+
} catch (_) {
|
|
3217
|
+
const $ = _ instanceof Error ? _.message : "Execution failed";
|
|
3218
|
+
G($), y == null || y({
|
|
3219
3219
|
success: !1,
|
|
3220
3220
|
output: "",
|
|
3221
|
-
stderr:
|
|
3221
|
+
stderr: $,
|
|
3222
3222
|
code: -1
|
|
3223
3223
|
});
|
|
3224
3224
|
} finally {
|
|
3225
3225
|
E(!1);
|
|
3226
3226
|
}
|
|
3227
3227
|
}
|
|
3228
|
-
}, [f, I,
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3228
|
+
}, [f, I, k, le, b, y]);
|
|
3229
|
+
se(() => {
|
|
3230
|
+
i(""), s(""), C(null), G(null);
|
|
3231
|
+
}, []);
|
|
3232
|
+
const ae = se(async () => {
|
|
3233
|
+
await navigator.clipboard.writeText(k), q(!0), setTimeout(() => {
|
|
3234
|
+
q(!1);
|
|
3235
|
+
}, 2e3);
|
|
3236
|
+
}, [k]), de = se(async () => {
|
|
3237
|
+
const _ = P === "stdout" ? t : o;
|
|
3238
|
+
await navigator.clipboard.writeText(_), B(!0), setTimeout(() => {
|
|
3239
|
+
B(!1);
|
|
3240
|
+
}, 2e3);
|
|
3241
|
+
}, [P, t, o]), ie = se(() => {
|
|
3242
|
+
r(Ie(K));
|
|
3243
|
+
}, [I]), oe = Ne(!1), me = se((_) => {
|
|
3244
|
+
oe.current = !0, document.addEventListener("mousemove", ce), document.addEventListener("mouseup", ke), document.body.style.cursor = "col-resize", document.body.style.userSelect = "none";
|
|
3245
|
+
}, []), ce = se((_) => {
|
|
3246
|
+
if (!oe.current) return;
|
|
3247
|
+
const $ = document.querySelector(".hep-cr-main");
|
|
3248
|
+
if (!$) return;
|
|
3249
|
+
const pe = $.getBoundingClientRect(), fe = (_.clientX - pe.left) / pe.width * 100;
|
|
3242
3250
|
j(Math.max(20, Math.min(80, fe)));
|
|
3243
|
-
}, []),
|
|
3244
|
-
|
|
3245
|
-
}, [
|
|
3246
|
-
return /* @__PURE__ */
|
|
3247
|
-
/* @__PURE__ */
|
|
3248
|
-
/* @__PURE__ */
|
|
3251
|
+
}, []), ke = se(() => {
|
|
3252
|
+
oe.current = !1, document.removeEventListener("mousemove", ce), document.removeEventListener("mouseup", ke), document.body.style.cursor = "", document.body.style.userSelect = "";
|
|
3253
|
+
}, [ce]);
|
|
3254
|
+
return /* @__PURE__ */ c.jsxs("div", { className: `hep-cr-runner hep-cr-runner-${F}`, children: [
|
|
3255
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-header", children: [
|
|
3256
|
+
/* @__PURE__ */ c.jsx("div", { className: "hep-cr-controls", children: h && /* @__PURE__ */ c.jsxs(
|
|
3249
3257
|
"select",
|
|
3250
3258
|
{
|
|
3251
3259
|
value: I,
|
|
3252
|
-
onChange:
|
|
3260
|
+
onChange: te,
|
|
3253
3261
|
className: "hep-cr-language-select",
|
|
3254
3262
|
disabled: f,
|
|
3255
3263
|
children: [
|
|
3256
|
-
|
|
3257
|
-
|
|
3264
|
+
re && /* @__PURE__ */ c.jsx("option", { value: "", children: "加载中..." }),
|
|
3265
|
+
Q.map((_) => /* @__PURE__ */ c.jsx("option", { value: _.value, children: _.label }, _.value))
|
|
3258
3266
|
]
|
|
3259
3267
|
}
|
|
3260
3268
|
) }),
|
|
3261
|
-
/* @__PURE__ */
|
|
3262
|
-
/* @__PURE__ */
|
|
3269
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-actions", children: [
|
|
3270
|
+
/* @__PURE__ */ c.jsxs(
|
|
3263
3271
|
"button",
|
|
3264
3272
|
{
|
|
3265
3273
|
className: "hep-cr-btn hep-cr-btn-run",
|
|
3266
|
-
disabled: f ||
|
|
3267
|
-
onClick:
|
|
3274
|
+
disabled: f || re,
|
|
3275
|
+
onClick: ne,
|
|
3268
3276
|
children: [
|
|
3269
|
-
f ? /* @__PURE__ */
|
|
3277
|
+
f ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-spinner" }) : /* @__PURE__ */ c.jsx("span", { className: "hep-cr-run-icon", children: "▶" }),
|
|
3270
3278
|
f ? "运行中..." : l
|
|
3271
3279
|
]
|
|
3272
3280
|
}
|
|
3273
3281
|
),
|
|
3274
|
-
m &&
|
|
3275
|
-
/* @__PURE__ */
|
|
3282
|
+
m && T && /* @__PURE__ */ c.jsx("button", { className: "hep-cr-btn hep-cr-btn-reset", onClick: ie, children: "重置" }),
|
|
3283
|
+
/* @__PURE__ */ c.jsx(
|
|
3276
3284
|
"button",
|
|
3277
3285
|
{
|
|
3278
3286
|
className: "hep-cr-btn hep-cr-btn-theme",
|
|
3279
|
-
onClick: () =>
|
|
3287
|
+
onClick: () => S(F === "light" ? "dark" : "light"),
|
|
3280
3288
|
title: F === "light" ? "Switch to dark mode" : "Switch to light mode",
|
|
3281
|
-
children: F === "light" ? "
|
|
3289
|
+
children: F === "light" ? /* @__PURE__ */ c.jsx("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: /* @__PURE__ */ c.jsx("path", { d: "M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z" }) }) : /* @__PURE__ */ c.jsxs("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", children: [
|
|
3290
|
+
/* @__PURE__ */ c.jsx("circle", { cx: "12", cy: "12", r: "5" }),
|
|
3291
|
+
/* @__PURE__ */ c.jsx("line", { x1: "12", y1: "1", x2: "12", y2: "3" }),
|
|
3292
|
+
/* @__PURE__ */ c.jsx("line", { x1: "12", y1: "21", x2: "12", y2: "23" }),
|
|
3293
|
+
/* @__PURE__ */ c.jsx("line", { x1: "4.22", y1: "4.22", x2: "5.64", y2: "5.64" }),
|
|
3294
|
+
/* @__PURE__ */ c.jsx("line", { x1: "18.36", y1: "18.36", x2: "19.78", y2: "19.78" }),
|
|
3295
|
+
/* @__PURE__ */ c.jsx("line", { x1: "1", y1: "12", x2: "3", y2: "12" }),
|
|
3296
|
+
/* @__PURE__ */ c.jsx("line", { x1: "21", y1: "12", x2: "23", y2: "12" }),
|
|
3297
|
+
/* @__PURE__ */ c.jsx("line", { x1: "4.22", y1: "19.78", x2: "5.64", y2: "18.36" }),
|
|
3298
|
+
/* @__PURE__ */ c.jsx("line", { x1: "18.36", y1: "5.64", x2: "19.78", y2: "4.22" })
|
|
3299
|
+
] })
|
|
3282
3300
|
}
|
|
3283
3301
|
)
|
|
3284
3302
|
] })
|
|
3285
3303
|
] }),
|
|
3286
|
-
|
|
3287
|
-
/* @__PURE__ */
|
|
3288
|
-
m && /* @__PURE__ */
|
|
3289
|
-
/* @__PURE__ */
|
|
3290
|
-
/* @__PURE__ */
|
|
3291
|
-
/* @__PURE__ */
|
|
3304
|
+
X && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-error-message", children: X }),
|
|
3305
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-main", children: [
|
|
3306
|
+
m && /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-editor-panel", style: { width: `${ue}%` }, children: [
|
|
3307
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3308
|
+
/* @__PURE__ */ c.jsx("span", { className: "hep-cr-panel-title", children: "编辑器" }),
|
|
3309
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-output-actions", children: [
|
|
3310
|
+
/* @__PURE__ */ c.jsx("span", { className: "hep-cr-language-badge", children: K }),
|
|
3311
|
+
/* @__PURE__ */ c.jsx(
|
|
3312
|
+
"button",
|
|
3313
|
+
{
|
|
3314
|
+
className: `hep-cr-btn-icon ${H ? "hep-cr-btn-copied" : ""}`,
|
|
3315
|
+
disabled: H,
|
|
3316
|
+
onClick: ae,
|
|
3317
|
+
title: H ? "已复制" : "复制",
|
|
3318
|
+
children: H ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : /* @__PURE__ */ c.jsxs(
|
|
3319
|
+
"svg",
|
|
3320
|
+
{
|
|
3321
|
+
width: "14",
|
|
3322
|
+
height: "14",
|
|
3323
|
+
viewBox: "0 0 24 24",
|
|
3324
|
+
fill: "none",
|
|
3325
|
+
stroke: "currentColor",
|
|
3326
|
+
strokeWidth: "2",
|
|
3327
|
+
children: [
|
|
3328
|
+
/* @__PURE__ */ c.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
3329
|
+
/* @__PURE__ */ c.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
3330
|
+
]
|
|
3331
|
+
}
|
|
3332
|
+
)
|
|
3333
|
+
}
|
|
3334
|
+
)
|
|
3335
|
+
] })
|
|
3292
3336
|
] }),
|
|
3293
|
-
/* @__PURE__ */
|
|
3294
|
-
|
|
3337
|
+
/* @__PURE__ */ c.jsx(
|
|
3338
|
+
Nr,
|
|
3295
3339
|
{
|
|
3296
|
-
value:
|
|
3297
|
-
language:
|
|
3340
|
+
value: k,
|
|
3341
|
+
language: K,
|
|
3298
3342
|
theme: F,
|
|
3299
|
-
disabled: !
|
|
3300
|
-
onChange:
|
|
3343
|
+
disabled: !T || f,
|
|
3344
|
+
onChange: r
|
|
3301
3345
|
}
|
|
3302
3346
|
)
|
|
3303
3347
|
] }),
|
|
3304
|
-
m && /* @__PURE__ */
|
|
3305
|
-
/* @__PURE__ */
|
|
3348
|
+
m && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-resize-handle", onMouseDown: me, children: /* @__PURE__ */ c.jsx("div", { className: "hep-cr-resize-line" }) }),
|
|
3349
|
+
/* @__PURE__ */ c.jsxs(
|
|
3306
3350
|
"div",
|
|
3307
3351
|
{
|
|
3308
3352
|
className: "hep-cr-output-panel",
|
|
3309
|
-
style: { width: m ? `${100 -
|
|
3353
|
+
style: { width: m ? `${100 - ue}%` : "100%" },
|
|
3310
3354
|
children: [
|
|
3311
|
-
/* @__PURE__ */
|
|
3312
|
-
/* @__PURE__ */
|
|
3313
|
-
/* @__PURE__ */
|
|
3355
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-panel-header", children: [
|
|
3356
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-output-tabs", children: [
|
|
3357
|
+
/* @__PURE__ */ c.jsx(
|
|
3314
3358
|
"button",
|
|
3315
3359
|
{
|
|
3316
3360
|
className: `hep-cr-tab ${P === "stdout" ? "active" : ""}`,
|
|
3317
|
-
onClick: () =>
|
|
3361
|
+
onClick: () => W("stdout"),
|
|
3318
3362
|
children: "输出"
|
|
3319
3363
|
}
|
|
3320
3364
|
),
|
|
3321
|
-
o && /* @__PURE__ */
|
|
3365
|
+
o && /* @__PURE__ */ c.jsx(
|
|
3322
3366
|
"button",
|
|
3323
3367
|
{
|
|
3324
|
-
className: `hep-cr-tab ${P === "stderr" ? "active" : ""}`,
|
|
3325
|
-
onClick: () =>
|
|
3368
|
+
className: `hep-cr-tab hep-cr-tab-error ${P === "stderr" ? "active" : ""}`,
|
|
3369
|
+
onClick: () => W("stderr"),
|
|
3326
3370
|
children: "错误"
|
|
3327
3371
|
}
|
|
3328
3372
|
)
|
|
3329
3373
|
] }),
|
|
3330
|
-
/* @__PURE__ */
|
|
3331
|
-
|
|
3332
|
-
|
|
3374
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-output-actions", children: [
|
|
3375
|
+
g !== null && /* @__PURE__ */ c.jsxs("span", { className: "hep-cr-execution-time", children: [
|
|
3376
|
+
g,
|
|
3333
3377
|
"ms"
|
|
3334
3378
|
] }),
|
|
3335
|
-
/* @__PURE__ */
|
|
3336
|
-
"
|
|
3337
|
-
{
|
|
3338
|
-
width: "14",
|
|
3339
|
-
height: "14",
|
|
3340
|
-
viewBox: "0 0 24 24",
|
|
3341
|
-
fill: "none",
|
|
3342
|
-
stroke: "currentColor",
|
|
3343
|
-
strokeWidth: "2",
|
|
3344
|
-
children: [
|
|
3345
|
-
/* @__PURE__ */ g.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
3346
|
-
/* @__PURE__ */ g.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
3347
|
-
]
|
|
3348
|
-
}
|
|
3349
|
-
) }),
|
|
3350
|
-
/* @__PURE__ */ g.jsx("button", { className: "hep-cr-btn-icon", onClick: q, title: "清除", children: /* @__PURE__ */ g.jsxs(
|
|
3351
|
-
"svg",
|
|
3379
|
+
/* @__PURE__ */ c.jsx(
|
|
3380
|
+
"button",
|
|
3352
3381
|
{
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
|
|
3357
|
-
|
|
3358
|
-
|
|
3359
|
-
|
|
3360
|
-
|
|
3361
|
-
|
|
3362
|
-
|
|
3382
|
+
className: `hep-cr-btn-icon ${J ? "hep-cr-btn-copied" : ""}`,
|
|
3383
|
+
disabled: J,
|
|
3384
|
+
onClick: de,
|
|
3385
|
+
title: J ? "已复制" : "复制",
|
|
3386
|
+
children: J ? /* @__PURE__ */ c.jsx("span", { className: "hep-cr-copied-text", children: "已复制" }) : /* @__PURE__ */ c.jsxs(
|
|
3387
|
+
"svg",
|
|
3388
|
+
{
|
|
3389
|
+
width: "14",
|
|
3390
|
+
height: "14",
|
|
3391
|
+
viewBox: "0 0 24 24",
|
|
3392
|
+
fill: "none",
|
|
3393
|
+
stroke: "currentColor",
|
|
3394
|
+
strokeWidth: "2",
|
|
3395
|
+
children: [
|
|
3396
|
+
/* @__PURE__ */ c.jsx("rect", { x: "9", y: "9", width: "13", height: "13", rx: "2", ry: "2" }),
|
|
3397
|
+
/* @__PURE__ */ c.jsx("path", { d: "M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" })
|
|
3398
|
+
]
|
|
3399
|
+
}
|
|
3400
|
+
)
|
|
3363
3401
|
}
|
|
3364
|
-
)
|
|
3402
|
+
)
|
|
3365
3403
|
] })
|
|
3366
3404
|
] }),
|
|
3367
|
-
/* @__PURE__ */
|
|
3405
|
+
/* @__PURE__ */ c.jsx("div", { className: "hep-cr-output-content", children: /* @__PURE__ */ c.jsx("pre", { children: P === "stdout" ? f ? "代码执行中..." : t || '点击"运行"执行代码' : o }) })
|
|
3368
3406
|
]
|
|
3369
3407
|
}
|
|
3370
3408
|
)
|
|
3371
3409
|
] }),
|
|
3372
|
-
/* @__PURE__ */
|
|
3410
|
+
/* @__PURE__ */ c.jsx("style", { children: `
|
|
3373
3411
|
.hep-cr-runner {
|
|
3374
3412
|
display: flex;
|
|
3375
3413
|
flex-direction: column;
|
|
@@ -3423,9 +3461,11 @@ const $t = ({
|
|
|
3423
3461
|
.hep-cr-btn-run:hover:not(:disabled) { background: linear-gradient(135deg, #66bb6a 0%, #4caf50 100%); }
|
|
3424
3462
|
.hep-cr-btn-reset { background: #3d3d3d; color: #aaa; }
|
|
3425
3463
|
.hep-cr-runner-light .hep-cr-btn-reset { background: #e0e0e0; color: #666; }
|
|
3426
|
-
.hep-cr-btn-theme { background:
|
|
3427
|
-
.hep-cr-
|
|
3428
|
-
.hep-cr-btn-theme
|
|
3464
|
+
.hep-cr-btn-theme { background: transparent; color: #fdd835; padding: 6px 10px; font-size: 14px; line-height: 1; height: auto; min-height: 28px; display: flex; align-items: center; justify-content: center; }
|
|
3465
|
+
.hep-cr-btn-theme svg { display: block; width: 18px; height: 18px; }
|
|
3466
|
+
.hep-cr-runner-light .hep-cr-btn-theme { color: #f57c00; }
|
|
3467
|
+
.hep-cr-btn-theme:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
|
|
3468
|
+
.hep-cr-runner-light .hep-cr-btn-theme:hover { background: rgba(0, 0, 0, 0.05); }
|
|
3429
3469
|
.hep-cr-error-message {
|
|
3430
3470
|
padding: 10px 16px;
|
|
3431
3471
|
background: #c62828;
|
|
@@ -3511,16 +3551,22 @@ const $t = ({
|
|
|
3511
3551
|
caret-color: #333333;
|
|
3512
3552
|
}
|
|
3513
3553
|
.hep-cr-resize-handle {
|
|
3514
|
-
width:
|
|
3515
|
-
background: #
|
|
3554
|
+
width: 8px;
|
|
3555
|
+
background: #2d2d2d;
|
|
3516
3556
|
cursor: col-resize;
|
|
3517
3557
|
display: flex;
|
|
3518
3558
|
align-items: center;
|
|
3519
3559
|
justify-content: center;
|
|
3560
|
+
border-left: 1px solid #3d3d3d;
|
|
3561
|
+
border-right: 1px solid #3d3d3d;
|
|
3520
3562
|
}
|
|
3521
3563
|
.hep-cr-resize-handle:hover { background: #4fc3f7; }
|
|
3522
|
-
.hep-cr-resize-line { width:
|
|
3564
|
+
.hep-cr-resize-line { width: 3px; height: 40px; background: #555; border-radius: 2px; transition: background 0.2s; }
|
|
3523
3565
|
.hep-cr-resize-handle:hover .hep-cr-resize-line { background: #fff; }
|
|
3566
|
+
.hep-cr-runner-light .hep-cr-resize-handle { background: #e0e0e0; border-color: #ccc; }
|
|
3567
|
+
.hep-cr-runner-light .hep-cr-resize-line { background: #bbb; }
|
|
3568
|
+
.hep-cr-runner-light .hep-cr-resize-handle:hover { background: #4fc3f7; }
|
|
3569
|
+
.hep-cr-runner-light .hep-cr-resize-handle:hover .hep-cr-resize-line { background: #fff; }
|
|
3524
3570
|
.hep-cr-output-panel {
|
|
3525
3571
|
display: flex;
|
|
3526
3572
|
flex-direction: column;
|
|
@@ -3542,6 +3588,7 @@ const $t = ({
|
|
|
3542
3588
|
.hep-cr-tab:hover { color: #d4d4d4; background: #3d3d3d; }
|
|
3543
3589
|
.hep-cr-runner-light .hep-cr-tab:hover { color: #333; background: #e0e0e0; }
|
|
3544
3590
|
.hep-cr-tab.active { background: #4fc3f7; color: #000; font-weight: 500; }
|
|
3591
|
+
.hep-cr-tab-error.active { background: #f44336; color: #fff; }
|
|
3545
3592
|
.hep-cr-output-actions { display: flex; align-items: center; gap: 12px; }
|
|
3546
3593
|
.hep-cr-execution-time { font-size: 12px; color: #4caf50; font-weight: 500; }
|
|
3547
3594
|
.hep-cr-btn-icon {
|
|
@@ -3558,6 +3605,9 @@ const $t = ({
|
|
|
3558
3605
|
}
|
|
3559
3606
|
.hep-cr-btn-icon:hover { color: #fff; background: #3d3d3d; }
|
|
3560
3607
|
.hep-cr-runner-light .hep-cr-btn-icon:hover { color: #333; background: #e0e0e0; }
|
|
3608
|
+
.hep-cr-btn-icon:disabled { cursor: not-allowed; opacity: 0.7; }
|
|
3609
|
+
.hep-cr-btn-copied { color: #4caf50 !important; }
|
|
3610
|
+
.hep-cr-copied-text { font-size: 12px; color: #4caf50; }
|
|
3561
3611
|
.hep-cr-output-content {
|
|
3562
3612
|
flex: 1;
|
|
3563
3613
|
padding: 12px 16px;
|
|
@@ -3586,35 +3636,35 @@ const $t = ({
|
|
|
3586
3636
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
3587
3637
|
` })
|
|
3588
3638
|
] });
|
|
3589
|
-
},
|
|
3639
|
+
}, Mr = xr(
|
|
3590
3640
|
({
|
|
3591
|
-
open:
|
|
3592
|
-
defaultOpen:
|
|
3641
|
+
open: d,
|
|
3642
|
+
defaultOpen: p = !1,
|
|
3593
3643
|
title: n = "代码执行器",
|
|
3594
|
-
width:
|
|
3644
|
+
width: h = 800,
|
|
3595
3645
|
onClose: m,
|
|
3596
|
-
footer:
|
|
3597
|
-
theme:
|
|
3646
|
+
footer: T,
|
|
3647
|
+
theme: w = "light",
|
|
3598
3648
|
...l
|
|
3599
3649
|
}, b) => {
|
|
3600
|
-
const [y,
|
|
3601
|
-
|
|
3602
|
-
O &&
|
|
3603
|
-
}, [
|
|
3604
|
-
const I =
|
|
3605
|
-
O ||
|
|
3606
|
-
}, [O, m]),
|
|
3607
|
-
|
|
3650
|
+
const [y, R] = V(p), O = d !== void 0, D = O ? d : y;
|
|
3651
|
+
Se(() => {
|
|
3652
|
+
O && d !== y && R(d);
|
|
3653
|
+
}, [d, O]);
|
|
3654
|
+
const I = se(() => {
|
|
3655
|
+
O || R(!1), m == null || m();
|
|
3656
|
+
}, [O, m]), z = (S) => {
|
|
3657
|
+
S.target === S.currentTarget && I();
|
|
3608
3658
|
};
|
|
3609
|
-
|
|
3659
|
+
kr(b, () => ({
|
|
3610
3660
|
close: I
|
|
3611
3661
|
}));
|
|
3612
|
-
const F = typeof
|
|
3613
|
-
return D ? /* @__PURE__ */
|
|
3614
|
-
/* @__PURE__ */
|
|
3615
|
-
/* @__PURE__ */
|
|
3616
|
-
/* @__PURE__ */
|
|
3617
|
-
/* @__PURE__ */
|
|
3662
|
+
const F = typeof h == "number" ? `${h}px` : h;
|
|
3663
|
+
return D ? /* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-overlay", onClick: z, children: [
|
|
3664
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-container", style: { width: F }, children: [
|
|
3665
|
+
/* @__PURE__ */ c.jsxs("div", { className: "hep-cr-dialog-header", children: [
|
|
3666
|
+
/* @__PURE__ */ c.jsx("h3", { className: "hep-cr-dialog-title", children: n }),
|
|
3667
|
+
/* @__PURE__ */ c.jsx("button", { className: "hep-cr-dialog-close", onClick: I, children: /* @__PURE__ */ c.jsxs(
|
|
3618
3668
|
"svg",
|
|
3619
3669
|
{
|
|
3620
3670
|
width: "16",
|
|
@@ -3624,16 +3674,16 @@ const $t = ({
|
|
|
3624
3674
|
stroke: "currentColor",
|
|
3625
3675
|
strokeWidth: "2",
|
|
3626
3676
|
children: [
|
|
3627
|
-
/* @__PURE__ */
|
|
3628
|
-
/* @__PURE__ */
|
|
3677
|
+
/* @__PURE__ */ c.jsx("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
|
3678
|
+
/* @__PURE__ */ c.jsx("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
|
3629
3679
|
]
|
|
3630
3680
|
}
|
|
3631
3681
|
) })
|
|
3632
3682
|
] }),
|
|
3633
|
-
/* @__PURE__ */
|
|
3634
|
-
|
|
3683
|
+
/* @__PURE__ */ c.jsx("div", { className: "hep-cr-dialog-body", children: /* @__PURE__ */ c.jsx($r, { theme: w, ...l }) }),
|
|
3684
|
+
T && /* @__PURE__ */ c.jsx("div", { className: "hep-cr-dialog-footer", children: T })
|
|
3635
3685
|
] }),
|
|
3636
|
-
/* @__PURE__ */
|
|
3686
|
+
/* @__PURE__ */ c.jsx("style", { children: `
|
|
3637
3687
|
.hep-cr-dialog-overlay {
|
|
3638
3688
|
position: fixed;
|
|
3639
3689
|
top: 0;
|
|
@@ -3725,9 +3775,9 @@ const $t = ({
|
|
|
3725
3775
|
] }) : null;
|
|
3726
3776
|
}
|
|
3727
3777
|
);
|
|
3728
|
-
|
|
3778
|
+
Mr.displayName = "CodeRunnerDialog";
|
|
3729
3779
|
export {
|
|
3730
|
-
$
|
|
3731
|
-
|
|
3732
|
-
$
|
|
3780
|
+
$r as CodeRunner,
|
|
3781
|
+
Mr as CodeRunnerDialog,
|
|
3782
|
+
$r as default
|
|
3733
3783
|
};
|