@senyao-design-system/editor 0.0.4 → 0.0.5
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 +12 -12
- package/dist/index.mjs +551 -543
- package/dist/types.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2,13 +2,13 @@ import * as ve from "react";
|
|
|
2
2
|
import Vr, { forwardRef as rt, useContext as Jn, useRef as ue, useEffect as ge, useImperativeHandle as Kn, useMemo as ht, useState as Ft, useCallback as se } from "react";
|
|
3
3
|
import { sql as zr } from "@codemirror/lang-sql";
|
|
4
4
|
import { json as Ur } from "@codemirror/lang-json";
|
|
5
|
-
import { keymap as
|
|
5
|
+
import { keymap as Ee, EditorView as V, Decoration as Q, ViewPlugin as Br, getPanel as dt, showPanel as Gr, runScopeHandlers as Qn, placeholder as br, lineNumbers as xr } from "@codemirror/view";
|
|
6
6
|
import { indentWithTab as Dt, insertNewlineAndIndent as Er } from "@codemirror/commands";
|
|
7
7
|
import { autocompletion as Hr, closeBrackets as Xn } from "@codemirror/autocomplete";
|
|
8
8
|
import { lintGutter as Zn, linter as eo } from "@codemirror/lint";
|
|
9
|
-
import { HighlightStyle as Jr, syntaxHighlighting as pt, defaultHighlightStyle as Sr, bracketMatching as to } from "@codemirror/language";
|
|
9
|
+
import { HighlightStyle as Jr, syntaxHighlighting as pt, defaultHighlightStyle as Sr, bracketMatching as to, codeFolding as ro, foldGutter as no, foldKeymap as oo } from "@codemirror/language";
|
|
10
10
|
import { tags as W } from "@lezer/highlight";
|
|
11
|
-
import { StateEffect as je, StateField as Gt, EditorState as be, Facet as Kr, Prec as Qr, EditorSelection as le, combineConfig as Xr, codePointAt as
|
|
11
|
+
import { StateEffect as je, StateField as Gt, EditorState as be, Facet as Kr, Prec as Qr, EditorSelection as le, combineConfig as Xr, codePointAt as io, fromCodePoint as so, codePointSize as ao, RangeSetBuilder as co, CharCategory as ae, findClusterBreak as Zr } from "@codemirror/state";
|
|
12
12
|
var Wt = { exports: {} }, He = {};
|
|
13
13
|
/**
|
|
14
14
|
* @license React
|
|
@@ -20,16 +20,16 @@ var Wt = { exports: {} }, He = {};
|
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
22
|
var Cr;
|
|
23
|
-
function
|
|
23
|
+
function lo() {
|
|
24
24
|
if (Cr) return He;
|
|
25
25
|
Cr = 1;
|
|
26
26
|
var e = Vr, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, o = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
27
|
-
function a(c, l,
|
|
28
|
-
var f, y = {},
|
|
29
|
-
|
|
27
|
+
function a(c, l, d) {
|
|
28
|
+
var f, y = {}, R = null, m = null;
|
|
29
|
+
d !== void 0 && (R = "" + d), l.key !== void 0 && (R = "" + l.key), l.ref !== void 0 && (m = l.ref);
|
|
30
30
|
for (f in l) n.call(l, f) && !i.hasOwnProperty(f) && (y[f] = l[f]);
|
|
31
31
|
if (c && c.defaultProps) for (f in l = c.defaultProps, l) y[f] === void 0 && (y[f] = l[f]);
|
|
32
|
-
return { $$typeof: t, type: c, key:
|
|
32
|
+
return { $$typeof: t, type: c, key: R, ref: m, props: y, _owner: o.current };
|
|
33
33
|
}
|
|
34
34
|
return He.Fragment = r, He.jsx = a, He.jsxs = a, He;
|
|
35
35
|
}
|
|
@@ -44,26 +44,26 @@ var Je = {};
|
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
46
|
var Rr;
|
|
47
|
-
function
|
|
47
|
+
function uo() {
|
|
48
48
|
return Rr || (Rr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
49
|
-
var e = Vr, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"),
|
|
49
|
+
var e = Vr, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), c = Symbol.for("react.context"), l = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), m = Symbol.for("react.offscreen"), w = Symbol.iterator, g = "@@iterator";
|
|
50
50
|
function x(s) {
|
|
51
51
|
if (s === null || typeof s != "object")
|
|
52
52
|
return null;
|
|
53
|
-
var u =
|
|
53
|
+
var u = w && s[w] || s[g];
|
|
54
54
|
return typeof u == "function" ? u : null;
|
|
55
55
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
56
|
+
var S = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
57
|
+
function v(s) {
|
|
58
58
|
{
|
|
59
|
-
for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0),
|
|
60
|
-
p[
|
|
61
|
-
|
|
59
|
+
for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0), _ = 1; _ < u; _++)
|
|
60
|
+
p[_ - 1] = arguments[_];
|
|
61
|
+
C("error", s, p);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function
|
|
64
|
+
function C(s, u, p) {
|
|
65
65
|
{
|
|
66
|
-
var
|
|
66
|
+
var _ = S.ReactDebugCurrentFrame, N = _.getStackAddendum();
|
|
67
67
|
N !== "" && (u += "%s", p = p.concat([N]));
|
|
68
68
|
var j = p.map(function(P) {
|
|
69
69
|
return String(P);
|
|
@@ -71,29 +71,29 @@ function ao() {
|
|
|
71
71
|
j.unshift("Warning: " + u), Function.prototype.apply.call(console[s], console, j);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var
|
|
75
|
-
|
|
74
|
+
var A = !1, h = !1, q = !1, $ = !1, Ye = !1, Se;
|
|
75
|
+
Se = Symbol.for("react.module.reference");
|
|
76
76
|
function Te(s) {
|
|
77
|
-
return !!(typeof s == "string" || typeof s == "function" || s === n || s === i || Ye || s === o || s ===
|
|
77
|
+
return !!(typeof s == "string" || typeof s == "function" || s === n || s === i || Ye || s === o || s === d || s === f || $ || s === m || A || h || q || typeof s == "object" && s !== null && (s.$$typeof === R || s.$$typeof === y || s.$$typeof === a || s.$$typeof === c || s.$$typeof === l || // This needs to include all possible module reference object
|
|
78
78
|
// types supported by any Flight configuration anywhere since
|
|
79
79
|
// we don't know which Flight build this will end up being used
|
|
80
80
|
// with.
|
|
81
|
-
s.$$typeof ===
|
|
81
|
+
s.$$typeof === Se || s.getModuleId !== void 0));
|
|
82
82
|
}
|
|
83
83
|
function ke(s, u, p) {
|
|
84
|
-
var
|
|
85
|
-
if (
|
|
86
|
-
return
|
|
84
|
+
var _ = s.displayName;
|
|
85
|
+
if (_)
|
|
86
|
+
return _;
|
|
87
87
|
var N = u.displayName || u.name || "";
|
|
88
88
|
return N !== "" ? p + "(" + N + ")" : p;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function Ce(s) {
|
|
91
91
|
return s.displayName || "Context";
|
|
92
92
|
}
|
|
93
93
|
function Z(s) {
|
|
94
94
|
if (s == null)
|
|
95
95
|
return null;
|
|
96
|
-
if (typeof s.tag == "number" &&
|
|
96
|
+
if (typeof s.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
|
|
97
97
|
return s.displayName || s.name || null;
|
|
98
98
|
if (typeof s == "string")
|
|
99
99
|
return s;
|
|
@@ -106,7 +106,7 @@ function ao() {
|
|
|
106
106
|
return "Profiler";
|
|
107
107
|
case o:
|
|
108
108
|
return "StrictMode";
|
|
109
|
-
case
|
|
109
|
+
case d:
|
|
110
110
|
return "Suspense";
|
|
111
111
|
case f:
|
|
112
112
|
return "SuspenseList";
|
|
@@ -115,16 +115,16 @@ function ao() {
|
|
|
115
115
|
switch (s.$$typeof) {
|
|
116
116
|
case c:
|
|
117
117
|
var u = s;
|
|
118
|
-
return
|
|
118
|
+
return Ce(u) + ".Consumer";
|
|
119
119
|
case a:
|
|
120
120
|
var p = s;
|
|
121
|
-
return
|
|
121
|
+
return Ce(p._context) + ".Provider";
|
|
122
122
|
case l:
|
|
123
123
|
return ke(s, s.render, "ForwardRef");
|
|
124
124
|
case y:
|
|
125
|
-
var
|
|
126
|
-
return
|
|
127
|
-
case
|
|
125
|
+
var _ = s.displayName || null;
|
|
126
|
+
return _ !== null ? _ : Z(s.type) || "Memo";
|
|
127
|
+
case R: {
|
|
128
128
|
var N = s, j = N._payload, P = N._init;
|
|
129
129
|
try {
|
|
130
130
|
return Z(P(j));
|
|
@@ -194,18 +194,18 @@ function ao() {
|
|
|
194
194
|
})
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
pe < 0 &&
|
|
197
|
+
pe < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
var Ve =
|
|
200
|
+
var Ve = S.ReactCurrentDispatcher, ze;
|
|
201
201
|
function Me(s, u, p) {
|
|
202
202
|
{
|
|
203
203
|
if (ze === void 0)
|
|
204
204
|
try {
|
|
205
205
|
throw Error();
|
|
206
206
|
} catch (N) {
|
|
207
|
-
var
|
|
208
|
-
ze =
|
|
207
|
+
var _ = N.stack.trim().match(/\n( *(at )?)/);
|
|
208
|
+
ze = _ && _[1] || "";
|
|
209
209
|
}
|
|
210
210
|
return `
|
|
211
211
|
` + ze + s;
|
|
@@ -224,7 +224,7 @@ function ao() {
|
|
|
224
224
|
if (p !== void 0)
|
|
225
225
|
return p;
|
|
226
226
|
}
|
|
227
|
-
var
|
|
227
|
+
var _;
|
|
228
228
|
Ue = !0;
|
|
229
229
|
var N = Error.prepareStackTrace;
|
|
230
230
|
Error.prepareStackTrace = void 0;
|
|
@@ -243,14 +243,14 @@ function ao() {
|
|
|
243
243
|
try {
|
|
244
244
|
Reflect.construct(P, []);
|
|
245
245
|
} catch (ee) {
|
|
246
|
-
|
|
246
|
+
_ = ee;
|
|
247
247
|
}
|
|
248
248
|
Reflect.construct(s, [], P);
|
|
249
249
|
} else {
|
|
250
250
|
try {
|
|
251
251
|
P.call();
|
|
252
252
|
} catch (ee) {
|
|
253
|
-
|
|
253
|
+
_ = ee;
|
|
254
254
|
}
|
|
255
255
|
s.call(P.prototype);
|
|
256
256
|
}
|
|
@@ -258,14 +258,14 @@ function ao() {
|
|
|
258
258
|
try {
|
|
259
259
|
throw Error();
|
|
260
260
|
} catch (ee) {
|
|
261
|
-
|
|
261
|
+
_ = ee;
|
|
262
262
|
}
|
|
263
263
|
s();
|
|
264
264
|
}
|
|
265
265
|
} catch (ee) {
|
|
266
|
-
if (ee &&
|
|
266
|
+
if (ee && _ && typeof ee.stack == "string") {
|
|
267
267
|
for (var M = ee.stack.split(`
|
|
268
|
-
`), X =
|
|
268
|
+
`), X = _.stack.split(`
|
|
269
269
|
`), z = M.length - 1, U = X.length - 1; z >= 1 && U >= 0 && M[z] !== X[U]; )
|
|
270
270
|
U--;
|
|
271
271
|
for (; z >= 1 && U >= 0; z--, U--)
|
|
@@ -284,8 +284,8 @@ function ao() {
|
|
|
284
284
|
} finally {
|
|
285
285
|
Ue = !1, Ve.current = j, Tt(), Error.prepareStackTrace = N;
|
|
286
286
|
}
|
|
287
|
-
var $e = s ? s.displayName || s.name : "",
|
|
288
|
-
return typeof s == "function" && Pe.set(s,
|
|
287
|
+
var $e = s ? s.displayName || s.name : "", we = $e ? Me($e) : "";
|
|
288
|
+
return typeof s == "function" && Pe.set(s, we), we;
|
|
289
289
|
}
|
|
290
290
|
function Be(s, u, p) {
|
|
291
291
|
return E(s, !1);
|
|
@@ -294,7 +294,7 @@ function ao() {
|
|
|
294
294
|
var u = s.prototype;
|
|
295
295
|
return !!(u && u.isReactComponent);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
297
|
+
function Re(s, u, p) {
|
|
298
298
|
if (s == null)
|
|
299
299
|
return "";
|
|
300
300
|
if (typeof s == "function")
|
|
@@ -302,7 +302,7 @@ function ao() {
|
|
|
302
302
|
if (typeof s == "string")
|
|
303
303
|
return Me(s);
|
|
304
304
|
switch (s) {
|
|
305
|
-
case
|
|
305
|
+
case d:
|
|
306
306
|
return Me("Suspense");
|
|
307
307
|
case f:
|
|
308
308
|
return Me("SuspenseList");
|
|
@@ -312,26 +312,26 @@ function ao() {
|
|
|
312
312
|
case l:
|
|
313
313
|
return Be(s.render);
|
|
314
314
|
case y:
|
|
315
|
-
return
|
|
316
|
-
case
|
|
317
|
-
var
|
|
315
|
+
return Re(s.type, u, p);
|
|
316
|
+
case R: {
|
|
317
|
+
var _ = s, N = _._payload, j = _._init;
|
|
318
318
|
try {
|
|
319
|
-
return
|
|
319
|
+
return Re(j(N), u, p);
|
|
320
320
|
} catch {
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
return "";
|
|
325
325
|
}
|
|
326
|
-
var Ge = Object.prototype.hasOwnProperty, ir = {}, sr =
|
|
326
|
+
var Ge = Object.prototype.hasOwnProperty, ir = {}, sr = S.ReactDebugCurrentFrame;
|
|
327
327
|
function it(s) {
|
|
328
328
|
if (s) {
|
|
329
|
-
var u = s._owner, p =
|
|
329
|
+
var u = s._owner, p = Re(s.type, s._source, u ? u.type : null);
|
|
330
330
|
sr.setExtraStackFrame(p);
|
|
331
331
|
} else
|
|
332
332
|
sr.setExtraStackFrame(null);
|
|
333
333
|
}
|
|
334
|
-
function Tn(s, u, p,
|
|
334
|
+
function Tn(s, u, p, _, N) {
|
|
335
335
|
{
|
|
336
336
|
var j = Function.call.bind(Ge);
|
|
337
337
|
for (var P in s)
|
|
@@ -339,14 +339,14 @@ function ao() {
|
|
|
339
339
|
var M = void 0;
|
|
340
340
|
try {
|
|
341
341
|
if (typeof s[P] != "function") {
|
|
342
|
-
var X = Error((
|
|
342
|
+
var X = Error((_ || "React class") + ": " + p + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
343
343
|
throw X.name = "Invariant Violation", X;
|
|
344
344
|
}
|
|
345
|
-
M = s[P](u, P,
|
|
345
|
+
M = s[P](u, P, _, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
346
346
|
} catch (z) {
|
|
347
347
|
M = z;
|
|
348
348
|
}
|
|
349
|
-
M && !(M instanceof Error) && (it(N),
|
|
349
|
+
M && !(M instanceof Error) && (it(N), v("%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).", _ || "React class", p, P, typeof M), it(null)), M instanceof Error && !(M.message in ir) && (ir[M.message] = !0, it(N), v("Failed %s type: %s", p, M.message), it(null));
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
}
|
|
@@ -372,9 +372,9 @@ function ao() {
|
|
|
372
372
|
}
|
|
373
373
|
function cr(s) {
|
|
374
374
|
if (Pn(s))
|
|
375
|
-
return
|
|
375
|
+
return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Mn(s)), ar(s);
|
|
376
376
|
}
|
|
377
|
-
var lr =
|
|
377
|
+
var lr = S.ReactCurrentOwner, On = {
|
|
378
378
|
key: !0,
|
|
379
379
|
ref: !0,
|
|
380
380
|
__self: !0,
|
|
@@ -402,7 +402,7 @@ function ao() {
|
|
|
402
402
|
function Ln(s, u) {
|
|
403
403
|
{
|
|
404
404
|
var p = function() {
|
|
405
|
-
ur || (ur = !0,
|
|
405
|
+
ur || (ur = !0, v("%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)", u));
|
|
406
406
|
};
|
|
407
407
|
p.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
408
408
|
get: p,
|
|
@@ -413,7 +413,7 @@ function ao() {
|
|
|
413
413
|
function Nn(s, u) {
|
|
414
414
|
{
|
|
415
415
|
var p = function() {
|
|
416
|
-
fr || (fr = !0,
|
|
416
|
+
fr || (fr = !0, v("%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)", u));
|
|
417
417
|
};
|
|
418
418
|
p.isReactWarning = !0, Object.defineProperty(s, "ref", {
|
|
419
419
|
get: p,
|
|
@@ -421,7 +421,7 @@ function ao() {
|
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
var In = function(s, u, p,
|
|
424
|
+
var In = function(s, u, p, _, N, j, P) {
|
|
425
425
|
var M = {
|
|
426
426
|
// This tag allows us to uniquely identify this as a React Element
|
|
427
427
|
$$typeof: t,
|
|
@@ -442,7 +442,7 @@ function ao() {
|
|
|
442
442
|
configurable: !1,
|
|
443
443
|
enumerable: !1,
|
|
444
444
|
writable: !1,
|
|
445
|
-
value:
|
|
445
|
+
value: _
|
|
446
446
|
}), Object.defineProperty(M, "_source", {
|
|
447
447
|
configurable: !1,
|
|
448
448
|
enumerable: !1,
|
|
@@ -450,7 +450,7 @@ function ao() {
|
|
|
450
450
|
value: N
|
|
451
451
|
}), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
|
|
452
452
|
};
|
|
453
|
-
function Dn(s, u, p,
|
|
453
|
+
function Dn(s, u, p, _, N) {
|
|
454
454
|
{
|
|
455
455
|
var j, P = {}, M = null, X = null;
|
|
456
456
|
p !== void 0 && (cr(p), M = "" + p), $n(u) && (cr(u.key), M = "" + u.key), An(u) && (X = u.ref, Fn(u, N));
|
|
@@ -465,13 +465,13 @@ function ao() {
|
|
|
465
465
|
var U = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
|
|
466
466
|
M && Ln(P, U), X && Nn(P, U);
|
|
467
467
|
}
|
|
468
|
-
return In(s, M, X, N,
|
|
468
|
+
return In(s, M, X, N, _, lr.current, P);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
var Pt =
|
|
471
|
+
var Pt = S.ReactCurrentOwner, hr = S.ReactDebugCurrentFrame;
|
|
472
472
|
function Ae(s) {
|
|
473
473
|
if (s) {
|
|
474
|
-
var u = s._owner, p =
|
|
474
|
+
var u = s._owner, p = Re(s.type, s._source, u ? u.type : null);
|
|
475
475
|
hr.setExtraStackFrame(p);
|
|
476
476
|
} else
|
|
477
477
|
hr.setExtraStackFrame(null);
|
|
@@ -518,8 +518,8 @@ Check the top-level render call using <` + p + ">.");
|
|
|
518
518
|
if (pr[p])
|
|
519
519
|
return;
|
|
520
520
|
pr[p] = !0;
|
|
521
|
-
var
|
|
522
|
-
s && s._owner && s._owner !== Pt.current && (
|
|
521
|
+
var _ = "";
|
|
522
|
+
s && s._owner && s._owner !== Pt.current && (_ = " It was passed a child from " + Z(s._owner.type) + "."), Ae(s), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, _), Ae(null);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
525
|
function gr(s, u) {
|
|
@@ -528,8 +528,8 @@ Check the top-level render call using <` + p + ">.");
|
|
|
528
528
|
return;
|
|
529
529
|
if (Mt(s))
|
|
530
530
|
for (var p = 0; p < s.length; p++) {
|
|
531
|
-
var
|
|
532
|
-
At(
|
|
531
|
+
var _ = s[p];
|
|
532
|
+
At(_) && mr(_, u);
|
|
533
533
|
}
|
|
534
534
|
else if (At(s))
|
|
535
535
|
s._store && (s._store.validated = !0);
|
|
@@ -556,30 +556,30 @@ Check the top-level render call using <` + p + ">.");
|
|
|
556
556
|
else
|
|
557
557
|
return;
|
|
558
558
|
if (p) {
|
|
559
|
-
var
|
|
560
|
-
Tn(p, s.props, "prop",
|
|
559
|
+
var _ = Z(u);
|
|
560
|
+
Tn(p, s.props, "prop", _, s);
|
|
561
561
|
} else if (u.PropTypes !== void 0 && !Ot) {
|
|
562
562
|
Ot = !0;
|
|
563
563
|
var N = Z(u);
|
|
564
|
-
|
|
564
|
+
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
|
565
565
|
}
|
|
566
|
-
typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved &&
|
|
566
|
+
typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
function Yn(s) {
|
|
570
570
|
{
|
|
571
571
|
for (var u = Object.keys(s.props), p = 0; p < u.length; p++) {
|
|
572
|
-
var
|
|
573
|
-
if (
|
|
574
|
-
Ae(s),
|
|
572
|
+
var _ = u[p];
|
|
573
|
+
if (_ !== "children" && _ !== "key") {
|
|
574
|
+
Ae(s), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", _), Ae(null);
|
|
575
575
|
break;
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
s.ref !== null && (Ae(s),
|
|
578
|
+
s.ref !== null && (Ae(s), v("Invalid attribute `ref` supplied to `React.Fragment`."), Ae(null));
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
581
|
var vr = {};
|
|
582
|
-
function yr(s, u, p,
|
|
582
|
+
function yr(s, u, p, _, N, j) {
|
|
583
583
|
{
|
|
584
584
|
var P = Te(s);
|
|
585
585
|
if (!P) {
|
|
@@ -588,7 +588,7 @@ Check the top-level render call using <` + p + ">.");
|
|
|
588
588
|
var X = Wn();
|
|
589
589
|
X ? M += X : M += dr();
|
|
590
590
|
var z;
|
|
591
|
-
s === null ? z = "null" : Mt(s) ? z = "array" : s !== void 0 && s.$$typeof === t ? (z = "<" + (Z(s.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : z = typeof s,
|
|
591
|
+
s === null ? z = "null" : Mt(s) ? z = "array" : s !== void 0 && s.$$typeof === t ? (z = "<" + (Z(s.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : z = typeof s, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", z, M);
|
|
592
592
|
}
|
|
593
593
|
var U = Dn(s, u, p, N, j);
|
|
594
594
|
if (U == null)
|
|
@@ -596,28 +596,28 @@ Check the top-level render call using <` + p + ">.");
|
|
|
596
596
|
if (P) {
|
|
597
597
|
var ie = u.children;
|
|
598
598
|
if (ie !== void 0)
|
|
599
|
-
if (
|
|
599
|
+
if (_)
|
|
600
600
|
if (Mt(ie)) {
|
|
601
601
|
for (var $e = 0; $e < ie.length; $e++)
|
|
602
602
|
gr(ie[$e], s);
|
|
603
603
|
Object.freeze && Object.freeze(ie);
|
|
604
604
|
} else
|
|
605
|
-
|
|
605
|
+
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
606
606
|
else
|
|
607
607
|
gr(ie, s);
|
|
608
608
|
}
|
|
609
609
|
if (Ge.call(u, "key")) {
|
|
610
|
-
var
|
|
610
|
+
var we = Z(s), ee = Object.keys(u).filter(function(Hn) {
|
|
611
611
|
return Hn !== "key";
|
|
612
612
|
}), $t = ee.length > 0 ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
613
|
-
if (!vr[
|
|
613
|
+
if (!vr[we + $t]) {
|
|
614
614
|
var Gn = ee.length > 0 ? "{" + ee.join(": ..., ") + ": ...}" : "{}";
|
|
615
|
-
|
|
615
|
+
v(`A props object containing a "key" prop is being spread into JSX:
|
|
616
616
|
let props = %s;
|
|
617
617
|
<%s {...props} />
|
|
618
618
|
React keys must be passed directly to JSX without using spread:
|
|
619
619
|
let props = %s;
|
|
620
|
-
<%s key={someKey} {...props} />`, $t,
|
|
620
|
+
<%s key={someKey} {...props} />`, $t, we, Gn, we), vr[we + $t] = !0;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
return s === n ? Yn(U) : qn(U), U;
|
|
@@ -633,20 +633,20 @@ React keys must be passed directly to JSX without using spread:
|
|
|
633
633
|
Je.Fragment = n, Je.jsx = Un, Je.jsxs = Bn;
|
|
634
634
|
}()), Je;
|
|
635
635
|
}
|
|
636
|
-
process.env.NODE_ENV === "production" ? Wt.exports =
|
|
636
|
+
process.env.NODE_ENV === "production" ? Wt.exports = lo() : Wt.exports = uo();
|
|
637
637
|
var wr = Wt.exports;
|
|
638
|
-
function
|
|
638
|
+
function fo(e) {
|
|
639
639
|
if (e.sheet)
|
|
640
640
|
return e.sheet;
|
|
641
641
|
for (var t = 0; t < document.styleSheets.length; t++)
|
|
642
642
|
if (document.styleSheets[t].ownerNode === e)
|
|
643
643
|
return document.styleSheets[t];
|
|
644
644
|
}
|
|
645
|
-
function
|
|
645
|
+
function ho(e) {
|
|
646
646
|
var t = document.createElement("style");
|
|
647
647
|
return t.setAttribute("data-emotion", e.key), e.nonce !== void 0 && t.setAttribute("nonce", e.nonce), t.appendChild(document.createTextNode("")), t.setAttribute("data-s", ""), t;
|
|
648
648
|
}
|
|
649
|
-
var
|
|
649
|
+
var po = /* @__PURE__ */ function() {
|
|
650
650
|
function e(r) {
|
|
651
651
|
var n = this;
|
|
652
652
|
this._insertTag = function(o) {
|
|
@@ -658,10 +658,10 @@ var uo = /* @__PURE__ */ function() {
|
|
|
658
658
|
return t.hydrate = function(n) {
|
|
659
659
|
n.forEach(this._insertTag);
|
|
660
660
|
}, t.insert = function(n) {
|
|
661
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
661
|
+
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(ho(this));
|
|
662
662
|
var o = this.tags[this.tags.length - 1];
|
|
663
663
|
if (this.isSpeedy) {
|
|
664
|
-
var i =
|
|
664
|
+
var i = fo(o);
|
|
665
665
|
try {
|
|
666
666
|
i.insertRule(n, i.cssRules.length);
|
|
667
667
|
} catch {
|
|
@@ -675,14 +675,14 @@ var uo = /* @__PURE__ */ function() {
|
|
|
675
675
|
return (o = n.parentNode) == null ? void 0 : o.removeChild(n);
|
|
676
676
|
}), this.tags = [], this.ctr = 0;
|
|
677
677
|
}, e;
|
|
678
|
-
}(), K = "-ms-", mt = "-moz-", F = "-webkit-", en = "comm", Ht = "rule", Jt = "decl",
|
|
679
|
-
function
|
|
678
|
+
}(), K = "-ms-", mt = "-moz-", F = "-webkit-", en = "comm", Ht = "rule", Jt = "decl", mo = "@import", tn = "@keyframes", go = "@layer", vo = Math.abs, St = String.fromCharCode, yo = Object.assign;
|
|
679
|
+
function bo(e, t) {
|
|
680
680
|
return J(e, 0) ^ 45 ? (((t << 2 ^ J(e, 0)) << 2 ^ J(e, 1)) << 2 ^ J(e, 2)) << 2 ^ J(e, 3) : 0;
|
|
681
681
|
}
|
|
682
682
|
function rn(e) {
|
|
683
683
|
return e.trim();
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function xo(e, t) {
|
|
686
686
|
return (e = t.exec(e)) ? e[0] : e;
|
|
687
687
|
}
|
|
688
688
|
function L(e, t, r) {
|
|
@@ -706,7 +706,7 @@ function Kt(e) {
|
|
|
706
706
|
function st(e, t) {
|
|
707
707
|
return t.push(e), e;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
709
|
+
function Eo(e, t) {
|
|
710
710
|
return e.map(t).join("");
|
|
711
711
|
}
|
|
712
712
|
var Ct = 1, De = 1, nn = 0, te = 0, B = 0, qe = "";
|
|
@@ -714,12 +714,12 @@ function Rt(e, t, r, n, o, i, a) {
|
|
|
714
714
|
return { value: e, root: t, parent: r, type: n, props: o, children: i, line: Ct, column: De, length: a, return: "" };
|
|
715
715
|
}
|
|
716
716
|
function Ke(e, t) {
|
|
717
|
-
return
|
|
717
|
+
return yo(Rt("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
719
|
+
function So() {
|
|
720
720
|
return B;
|
|
721
721
|
}
|
|
722
|
-
function
|
|
722
|
+
function Co() {
|
|
723
723
|
return B = te > 0 ? J(qe, --te) : 0, De--, B === 10 && (De = 1, Ct--), B;
|
|
724
724
|
}
|
|
725
725
|
function ne() {
|
|
@@ -775,12 +775,12 @@ function sn(e) {
|
|
|
775
775
|
function ut(e) {
|
|
776
776
|
return rn(nt(te - 1, qt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
777
777
|
}
|
|
778
|
-
function
|
|
778
|
+
function Ro(e) {
|
|
779
779
|
for (; (B = de()) && B < 33; )
|
|
780
780
|
ne();
|
|
781
781
|
return Ze(e) > 2 || Ze(B) > 3 ? "" : " ";
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function wo(e, t) {
|
|
784
784
|
for (; --t && ne() && !(B < 48 || B > 102 || B > 57 && B < 65 || B > 70 && B < 97); )
|
|
785
785
|
;
|
|
786
786
|
return nt(e, lt() + (t < 6 && de() == 32 && ne() == 32));
|
|
@@ -803,117 +803,117 @@ function qt(e) {
|
|
|
803
803
|
}
|
|
804
804
|
return te;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
806
|
+
function _o(e, t) {
|
|
807
807
|
for (; ne() && e + B !== 57; )
|
|
808
808
|
if (e + B === 84 && de() === 47)
|
|
809
809
|
break;
|
|
810
810
|
return "/*" + nt(t, te - 1) + "*" + St(e === 47 ? e : ne());
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function To(e) {
|
|
813
813
|
for (; !Ze(de()); )
|
|
814
814
|
ne();
|
|
815
815
|
return nt(e, te);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function ko(e) {
|
|
818
818
|
return sn(ft("", null, null, null, [""], e = on(e), 0, [0], e));
|
|
819
819
|
}
|
|
820
820
|
function ft(e, t, r, n, o, i, a, c, l) {
|
|
821
|
-
for (var
|
|
822
|
-
switch (
|
|
821
|
+
for (var d = 0, f = 0, y = a, R = 0, m = 0, w = 0, g = 1, x = 1, S = 1, v = 0, C = "", A = o, h = i, q = n, $ = C; x; )
|
|
822
|
+
switch (w = v, v = ne()) {
|
|
823
823
|
case 40:
|
|
824
|
-
if (
|
|
825
|
-
jt(
|
|
824
|
+
if (w != 108 && J($, y - 1) == 58) {
|
|
825
|
+
jt($ += L(ut(v), "&", "&\f"), "&\f") != -1 && (S = -1);
|
|
826
826
|
break;
|
|
827
827
|
}
|
|
828
828
|
case 34:
|
|
829
829
|
case 39:
|
|
830
830
|
case 91:
|
|
831
|
-
|
|
831
|
+
$ += ut(v);
|
|
832
832
|
break;
|
|
833
833
|
case 9:
|
|
834
834
|
case 10:
|
|
835
835
|
case 13:
|
|
836
836
|
case 32:
|
|
837
|
-
|
|
837
|
+
$ += Ro(w);
|
|
838
838
|
break;
|
|
839
839
|
case 92:
|
|
840
|
-
|
|
840
|
+
$ += wo(lt() - 1, 7);
|
|
841
841
|
continue;
|
|
842
842
|
case 47:
|
|
843
843
|
switch (de()) {
|
|
844
844
|
case 42:
|
|
845
845
|
case 47:
|
|
846
|
-
st(_o(
|
|
846
|
+
st(Mo(_o(ne(), lt()), t, r), l);
|
|
847
847
|
break;
|
|
848
848
|
default:
|
|
849
|
-
|
|
849
|
+
$ += "/";
|
|
850
850
|
}
|
|
851
851
|
break;
|
|
852
|
-
case 123 *
|
|
853
|
-
c[
|
|
854
|
-
case 125 *
|
|
852
|
+
case 123 * g:
|
|
853
|
+
c[d++] = fe($) * S;
|
|
854
|
+
case 125 * g:
|
|
855
855
|
case 59:
|
|
856
856
|
case 0:
|
|
857
|
-
switch (
|
|
857
|
+
switch (v) {
|
|
858
858
|
case 0:
|
|
859
859
|
case 125:
|
|
860
860
|
x = 0;
|
|
861
861
|
case 59 + f:
|
|
862
|
-
|
|
862
|
+
S == -1 && ($ = L($, /\f/g, "")), m > 0 && fe($) - y && st(m > 32 ? Tr($ + ";", n, r, y - 1) : Tr(L($, " ", "") + ";", n, r, y - 2), l);
|
|
863
863
|
break;
|
|
864
864
|
case 59:
|
|
865
|
-
|
|
865
|
+
$ += ";";
|
|
866
866
|
default:
|
|
867
|
-
if (st(q = _r(
|
|
867
|
+
if (st(q = _r($, t, r, d, f, o, c, C, A = [], h = [], y), i), v === 123)
|
|
868
868
|
if (f === 0)
|
|
869
|
-
ft(
|
|
869
|
+
ft($, t, q, q, A, i, y, c, h);
|
|
870
870
|
else
|
|
871
|
-
switch (
|
|
871
|
+
switch (R === 99 && J($, 3) === 110 ? 100 : R) {
|
|
872
872
|
case 100:
|
|
873
873
|
case 108:
|
|
874
874
|
case 109:
|
|
875
875
|
case 115:
|
|
876
|
-
ft(e, q, q, n && st(_r(e, q, q, 0, 0, o, c,
|
|
876
|
+
ft(e, q, q, n && st(_r(e, q, q, 0, 0, o, c, C, o, A = [], y), h), o, h, y, c, n ? A : h);
|
|
877
877
|
break;
|
|
878
878
|
default:
|
|
879
|
-
ft(
|
|
879
|
+
ft($, q, q, q, [""], h, 0, c, h);
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
|
-
|
|
882
|
+
d = f = m = 0, g = S = 1, C = $ = "", y = a;
|
|
883
883
|
break;
|
|
884
884
|
case 58:
|
|
885
|
-
y = 1 + fe(
|
|
885
|
+
y = 1 + fe($), m = w;
|
|
886
886
|
default:
|
|
887
|
-
if (
|
|
888
|
-
if (
|
|
889
|
-
--
|
|
890
|
-
else if (
|
|
887
|
+
if (g < 1) {
|
|
888
|
+
if (v == 123)
|
|
889
|
+
--g;
|
|
890
|
+
else if (v == 125 && g++ == 0 && Co() == 125)
|
|
891
891
|
continue;
|
|
892
892
|
}
|
|
893
|
-
switch (
|
|
893
|
+
switch ($ += St(v), v * g) {
|
|
894
894
|
case 38:
|
|
895
|
-
|
|
895
|
+
S = f > 0 ? 1 : ($ += "\f", -1);
|
|
896
896
|
break;
|
|
897
897
|
case 44:
|
|
898
|
-
c[
|
|
898
|
+
c[d++] = (fe($) - 1) * S, S = 1;
|
|
899
899
|
break;
|
|
900
900
|
case 64:
|
|
901
|
-
de() === 45 && (
|
|
901
|
+
de() === 45 && ($ += ut(ne())), R = de(), f = y = fe(C = $ += To(lt())), v++;
|
|
902
902
|
break;
|
|
903
903
|
case 45:
|
|
904
|
-
|
|
904
|
+
w === 45 && fe($) == 2 && (g = 0);
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
return i;
|
|
908
908
|
}
|
|
909
|
-
function _r(e, t, r, n, o, i, a, c, l,
|
|
910
|
-
for (var y = o - 1,
|
|
911
|
-
for (var
|
|
912
|
-
(
|
|
913
|
-
return Rt(e, t, r, o === 0 ? Ht : c, l,
|
|
909
|
+
function _r(e, t, r, n, o, i, a, c, l, d, f) {
|
|
910
|
+
for (var y = o - 1, R = o === 0 ? i : [""], m = Kt(R), w = 0, g = 0, x = 0; w < n; ++w)
|
|
911
|
+
for (var S = 0, v = Xe(e, y + 1, y = vo(g = a[w])), C = e; S < m; ++S)
|
|
912
|
+
(C = rn(g > 0 ? R[S] + " " + v : L(v, /&\f/g, R[S]))) && (l[x++] = C);
|
|
913
|
+
return Rt(e, t, r, o === 0 ? Ht : c, l, d, f);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
916
|
-
return Rt(e, t, r, en, St(
|
|
915
|
+
function Mo(e, t, r) {
|
|
916
|
+
return Rt(e, t, r, en, St(So()), Xe(e, 2, -2), 0);
|
|
917
917
|
}
|
|
918
918
|
function Tr(e, t, r, n) {
|
|
919
919
|
return Rt(e, t, r, Jt, Xe(e, 0, n), Xe(e, n + 1, -1), n);
|
|
@@ -923,11 +923,11 @@ function Ne(e, t) {
|
|
|
923
923
|
r += t(e[o], o, e, t) || "";
|
|
924
924
|
return r;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function Po(e, t, r, n) {
|
|
927
927
|
switch (e.type) {
|
|
928
|
-
case
|
|
928
|
+
case go:
|
|
929
929
|
if (e.children.length) break;
|
|
930
|
-
case
|
|
930
|
+
case mo:
|
|
931
931
|
case Jt:
|
|
932
932
|
return e.return = e.return || e.value;
|
|
933
933
|
case en:
|
|
@@ -939,7 +939,7 @@ function To(e, t, r, n) {
|
|
|
939
939
|
}
|
|
940
940
|
return fe(r = Ne(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function Oo(e) {
|
|
943
943
|
var t = Kt(e);
|
|
944
944
|
return function(r, n, o, i) {
|
|
945
945
|
for (var a = "", c = 0; c < t; c++)
|
|
@@ -947,27 +947,27 @@ function ko(e) {
|
|
|
947
947
|
return a;
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
-
function
|
|
950
|
+
function Ao(e) {
|
|
951
951
|
return function(t) {
|
|
952
952
|
t.root || (t = t.return) && e(t);
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
function
|
|
955
|
+
function $o(e) {
|
|
956
956
|
var t = /* @__PURE__ */ Object.create(null);
|
|
957
957
|
return function(r) {
|
|
958
958
|
return t[r] === void 0 && (t[r] = e(r)), t[r];
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
|
-
var
|
|
961
|
+
var Fo = function(t, r, n) {
|
|
962
962
|
for (var o = 0, i = 0; o = i, i = de(), o === 38 && i === 12 && (r[n] = 1), !Ze(i); )
|
|
963
963
|
ne();
|
|
964
964
|
return nt(t, te);
|
|
965
|
-
},
|
|
965
|
+
}, Lo = function(t, r) {
|
|
966
966
|
var n = -1, o = 44;
|
|
967
967
|
do
|
|
968
968
|
switch (Ze(o)) {
|
|
969
969
|
case 0:
|
|
970
|
-
o === 38 && de() === 12 && (r[n] = 1), t[n] +=
|
|
970
|
+
o === 38 && de() === 12 && (r[n] = 1), t[n] += Fo(te - 1, r, n);
|
|
971
971
|
break;
|
|
972
972
|
case 2:
|
|
973
973
|
t[n] += ut(o);
|
|
@@ -982,9 +982,9 @@ var Oo = function(t, r, n) {
|
|
|
982
982
|
}
|
|
983
983
|
while (o = ne());
|
|
984
984
|
return t;
|
|
985
|
-
},
|
|
986
|
-
return sn(
|
|
987
|
-
}, kr = /* @__PURE__ */ new WeakMap(),
|
|
985
|
+
}, No = function(t, r) {
|
|
986
|
+
return sn(Lo(on(t), r));
|
|
987
|
+
}, kr = /* @__PURE__ */ new WeakMap(), Io = function(t) {
|
|
988
988
|
if (!(t.type !== "rule" || !t.parent || // positive .length indicates that this rule contains pseudo
|
|
989
989
|
// negative .length indicates that this rule has been already prefixed
|
|
990
990
|
t.length < 1)) {
|
|
@@ -992,12 +992,12 @@ var Oo = function(t, r, n) {
|
|
|
992
992
|
if (n = n.parent, !n) return;
|
|
993
993
|
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !kr.get(n)) && !o) {
|
|
994
994
|
kr.set(t, !0);
|
|
995
|
-
for (var i = [], a =
|
|
996
|
-
for (var f = 0; f < c.length; f++,
|
|
997
|
-
t.props[
|
|
995
|
+
for (var i = [], a = No(r, i), c = n.props, l = 0, d = 0; l < a.length; l++)
|
|
996
|
+
for (var f = 0; f < c.length; f++, d++)
|
|
997
|
+
t.props[d] = i[l] ? a[l].replace(/&\f/g, c[f]) : c[f] + " " + a[l];
|
|
998
998
|
}
|
|
999
999
|
}
|
|
1000
|
-
},
|
|
1000
|
+
}, Do = function(t) {
|
|
1001
1001
|
if (t.type === "decl") {
|
|
1002
1002
|
var r = t.value;
|
|
1003
1003
|
// charcode for l
|
|
@@ -1006,7 +1006,7 @@ var Oo = function(t, r, n) {
|
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
1008
1008
|
function an(e, t) {
|
|
1009
|
-
switch (
|
|
1009
|
+
switch (bo(e, t)) {
|
|
1010
1010
|
case 5103:
|
|
1011
1011
|
return F + "print-" + e + e;
|
|
1012
1012
|
case 5737:
|
|
@@ -1116,7 +1116,7 @@ function an(e, t) {
|
|
|
1116
1116
|
}
|
|
1117
1117
|
return e;
|
|
1118
1118
|
}
|
|
1119
|
-
var
|
|
1119
|
+
var Wo = function(t, r, n, o) {
|
|
1120
1120
|
if (t.length > -1 && !t.return) switch (t.type) {
|
|
1121
1121
|
case Jt:
|
|
1122
1122
|
t.return = an(t.value, t.length);
|
|
@@ -1126,8 +1126,8 @@ var No = function(t, r, n, o) {
|
|
|
1126
1126
|
value: L(t.value, "@", "@" + F)
|
|
1127
1127
|
})], o);
|
|
1128
1128
|
case Ht:
|
|
1129
|
-
if (t.length) return
|
|
1130
|
-
switch (
|
|
1129
|
+
if (t.length) return Eo(t.props, function(i) {
|
|
1130
|
+
switch (xo(i, /(::plac\w+|:read-\w+)/)) {
|
|
1131
1131
|
case ":read-only":
|
|
1132
1132
|
case ":read-write":
|
|
1133
1133
|
return Ne([Ke(t, {
|
|
@@ -1145,40 +1145,40 @@ var No = function(t, r, n, o) {
|
|
|
1145
1145
|
return "";
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
},
|
|
1148
|
+
}, jo = [Wo], qo = function(t) {
|
|
1149
1149
|
var r = t.key;
|
|
1150
1150
|
if (r === "css") {
|
|
1151
1151
|
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
1152
|
-
Array.prototype.forEach.call(n, function(
|
|
1153
|
-
var x =
|
|
1154
|
-
x.indexOf(" ") !== -1 && (document.head.appendChild(
|
|
1152
|
+
Array.prototype.forEach.call(n, function(g) {
|
|
1153
|
+
var x = g.getAttribute("data-emotion");
|
|
1154
|
+
x.indexOf(" ") !== -1 && (document.head.appendChild(g), g.setAttribute("data-s", ""));
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
|
-
var o = t.stylisPlugins ||
|
|
1157
|
+
var o = t.stylisPlugins || jo, i = {}, a, c = [];
|
|
1158
1158
|
a = t.container || document.head, Array.prototype.forEach.call(
|
|
1159
1159
|
// this means we will ignore elements which don't have a space in them which
|
|
1160
1160
|
// means that the style elements we're looking at are only Emotion 11 server-rendered style elements
|
|
1161
1161
|
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
|
|
1162
|
-
function(
|
|
1163
|
-
for (var x =
|
|
1164
|
-
i[x[
|
|
1165
|
-
c.push(
|
|
1162
|
+
function(g) {
|
|
1163
|
+
for (var x = g.getAttribute("data-emotion").split(" "), S = 1; S < x.length; S++)
|
|
1164
|
+
i[x[S]] = !0;
|
|
1165
|
+
c.push(g);
|
|
1166
1166
|
}
|
|
1167
1167
|
);
|
|
1168
|
-
var l,
|
|
1168
|
+
var l, d = [Io, Do];
|
|
1169
1169
|
{
|
|
1170
|
-
var f, y = [
|
|
1171
|
-
f.insert(
|
|
1172
|
-
})],
|
|
1173
|
-
return Ne(
|
|
1170
|
+
var f, y = [Po, Ao(function(g) {
|
|
1171
|
+
f.insert(g);
|
|
1172
|
+
})], R = Oo(d.concat(o, y)), m = function(x) {
|
|
1173
|
+
return Ne(ko(x), R);
|
|
1174
1174
|
};
|
|
1175
|
-
l = function(x,
|
|
1176
|
-
f =
|
|
1175
|
+
l = function(x, S, v, C) {
|
|
1176
|
+
f = v, m(x ? x + "{" + S.styles + "}" : S.styles), C && (w.inserted[S.name] = !0);
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
1179
|
-
var
|
|
1179
|
+
var w = {
|
|
1180
1180
|
key: r,
|
|
1181
|
-
sheet: new
|
|
1181
|
+
sheet: new po({
|
|
1182
1182
|
key: r,
|
|
1183
1183
|
container: a,
|
|
1184
1184
|
nonce: t.nonce,
|
|
@@ -1191,7 +1191,7 @@ var No = function(t, r, n, o) {
|
|
|
1191
1191
|
registered: {},
|
|
1192
1192
|
insert: l
|
|
1193
1193
|
};
|
|
1194
|
-
return
|
|
1194
|
+
return w.sheet.hydrate(c), w;
|
|
1195
1195
|
}, Yt = { exports: {} }, I = {};
|
|
1196
1196
|
/** @license React v16.13.1
|
|
1197
1197
|
* react-is.production.min.js
|
|
@@ -1202,31 +1202,31 @@ var No = function(t, r, n, o) {
|
|
|
1202
1202
|
* LICENSE file in the root directory of this source tree.
|
|
1203
1203
|
*/
|
|
1204
1204
|
var Mr;
|
|
1205
|
-
function
|
|
1205
|
+
function Yo() {
|
|
1206
1206
|
if (Mr) return I;
|
|
1207
1207
|
Mr = 1;
|
|
1208
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
1209
|
-
function
|
|
1210
|
-
if (typeof
|
|
1211
|
-
var q =
|
|
1208
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, R = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, w = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, S = e ? Symbol.for("react.responder") : 60118, v = e ? Symbol.for("react.scope") : 60119;
|
|
1209
|
+
function C(h) {
|
|
1210
|
+
if (typeof h == "object" && h !== null) {
|
|
1211
|
+
var q = h.$$typeof;
|
|
1212
1212
|
switch (q) {
|
|
1213
1213
|
case t:
|
|
1214
|
-
switch (
|
|
1214
|
+
switch (h = h.type, h) {
|
|
1215
1215
|
case l:
|
|
1216
|
-
case
|
|
1216
|
+
case d:
|
|
1217
1217
|
case n:
|
|
1218
1218
|
case i:
|
|
1219
1219
|
case o:
|
|
1220
1220
|
case y:
|
|
1221
|
-
return
|
|
1221
|
+
return h;
|
|
1222
1222
|
default:
|
|
1223
|
-
switch (
|
|
1223
|
+
switch (h = h && h.$$typeof, h) {
|
|
1224
1224
|
case c:
|
|
1225
1225
|
case f:
|
|
1226
|
-
case
|
|
1227
|
-
case
|
|
1226
|
+
case w:
|
|
1227
|
+
case m:
|
|
1228
1228
|
case a:
|
|
1229
|
-
return
|
|
1229
|
+
return h;
|
|
1230
1230
|
default:
|
|
1231
1231
|
return q;
|
|
1232
1232
|
}
|
|
@@ -1236,36 +1236,36 @@ function Wo() {
|
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1240
|
-
return
|
|
1241
|
-
}
|
|
1242
|
-
return I.AsyncMode = l, I.ConcurrentMode =
|
|
1243
|
-
return
|
|
1244
|
-
}, I.isConcurrentMode =
|
|
1245
|
-
return
|
|
1246
|
-
}, I.isContextProvider = function(
|
|
1247
|
-
return
|
|
1248
|
-
}, I.isElement = function(
|
|
1249
|
-
return typeof
|
|
1250
|
-
}, I.isForwardRef = function(
|
|
1251
|
-
return
|
|
1252
|
-
}, I.isFragment = function(
|
|
1253
|
-
return
|
|
1254
|
-
}, I.isLazy = function(
|
|
1255
|
-
return
|
|
1256
|
-
}, I.isMemo = function(
|
|
1257
|
-
return
|
|
1258
|
-
}, I.isPortal = function(
|
|
1259
|
-
return
|
|
1260
|
-
}, I.isProfiler = function(
|
|
1261
|
-
return
|
|
1262
|
-
}, I.isStrictMode = function(
|
|
1263
|
-
return
|
|
1264
|
-
}, I.isSuspense = function(
|
|
1265
|
-
return
|
|
1266
|
-
}, I.isValidElementType = function(
|
|
1267
|
-
return typeof
|
|
1268
|
-
}, I.typeOf =
|
|
1239
|
+
function A(h) {
|
|
1240
|
+
return C(h) === d;
|
|
1241
|
+
}
|
|
1242
|
+
return I.AsyncMode = l, I.ConcurrentMode = d, I.ContextConsumer = c, I.ContextProvider = a, I.Element = t, I.ForwardRef = f, I.Fragment = n, I.Lazy = w, I.Memo = m, I.Portal = r, I.Profiler = i, I.StrictMode = o, I.Suspense = y, I.isAsyncMode = function(h) {
|
|
1243
|
+
return A(h) || C(h) === l;
|
|
1244
|
+
}, I.isConcurrentMode = A, I.isContextConsumer = function(h) {
|
|
1245
|
+
return C(h) === c;
|
|
1246
|
+
}, I.isContextProvider = function(h) {
|
|
1247
|
+
return C(h) === a;
|
|
1248
|
+
}, I.isElement = function(h) {
|
|
1249
|
+
return typeof h == "object" && h !== null && h.$$typeof === t;
|
|
1250
|
+
}, I.isForwardRef = function(h) {
|
|
1251
|
+
return C(h) === f;
|
|
1252
|
+
}, I.isFragment = function(h) {
|
|
1253
|
+
return C(h) === n;
|
|
1254
|
+
}, I.isLazy = function(h) {
|
|
1255
|
+
return C(h) === w;
|
|
1256
|
+
}, I.isMemo = function(h) {
|
|
1257
|
+
return C(h) === m;
|
|
1258
|
+
}, I.isPortal = function(h) {
|
|
1259
|
+
return C(h) === r;
|
|
1260
|
+
}, I.isProfiler = function(h) {
|
|
1261
|
+
return C(h) === i;
|
|
1262
|
+
}, I.isStrictMode = function(h) {
|
|
1263
|
+
return C(h) === o;
|
|
1264
|
+
}, I.isSuspense = function(h) {
|
|
1265
|
+
return C(h) === y;
|
|
1266
|
+
}, I.isValidElementType = function(h) {
|
|
1267
|
+
return typeof h == "string" || typeof h == "function" || h === n || h === d || h === i || h === o || h === y || h === R || typeof h == "object" && h !== null && (h.$$typeof === w || h.$$typeof === m || h.$$typeof === a || h.$$typeof === c || h.$$typeof === f || h.$$typeof === x || h.$$typeof === S || h.$$typeof === v || h.$$typeof === g);
|
|
1268
|
+
}, I.typeOf = C, I;
|
|
1269
1269
|
}
|
|
1270
1270
|
var D = {};
|
|
1271
1271
|
/** @license React v16.13.1
|
|
@@ -1277,14 +1277,14 @@ var D = {};
|
|
|
1277
1277
|
* LICENSE file in the root directory of this source tree.
|
|
1278
1278
|
*/
|
|
1279
1279
|
var Pr;
|
|
1280
|
-
function
|
|
1280
|
+
function Vo() {
|
|
1281
1281
|
return Pr || (Pr = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1282
|
-
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111,
|
|
1283
|
-
function
|
|
1282
|
+
var e = typeof Symbol == "function" && Symbol.for, t = e ? Symbol.for("react.element") : 60103, r = e ? Symbol.for("react.portal") : 60106, n = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, a = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, l = e ? Symbol.for("react.async_mode") : 60111, d = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, R = e ? Symbol.for("react.suspense_list") : 60120, m = e ? Symbol.for("react.memo") : 60115, w = e ? Symbol.for("react.lazy") : 60116, g = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, S = e ? Symbol.for("react.responder") : 60118, v = e ? Symbol.for("react.scope") : 60119;
|
|
1283
|
+
function C(E) {
|
|
1284
1284
|
return typeof E == "string" || typeof E == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1285
|
-
E === n || E ===
|
|
1285
|
+
E === n || E === d || E === i || E === o || E === y || E === R || typeof E == "object" && E !== null && (E.$$typeof === w || E.$$typeof === m || E.$$typeof === a || E.$$typeof === c || E.$$typeof === f || E.$$typeof === x || E.$$typeof === S || E.$$typeof === v || E.$$typeof === g);
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function A(E) {
|
|
1288
1288
|
if (typeof E == "object" && E !== null) {
|
|
1289
1289
|
var Be = E.$$typeof;
|
|
1290
1290
|
switch (Be) {
|
|
@@ -1292,21 +1292,21 @@ function jo() {
|
|
|
1292
1292
|
var Oe = E.type;
|
|
1293
1293
|
switch (Oe) {
|
|
1294
1294
|
case l:
|
|
1295
|
-
case
|
|
1295
|
+
case d:
|
|
1296
1296
|
case n:
|
|
1297
1297
|
case i:
|
|
1298
1298
|
case o:
|
|
1299
1299
|
case y:
|
|
1300
1300
|
return Oe;
|
|
1301
1301
|
default:
|
|
1302
|
-
var
|
|
1303
|
-
switch (
|
|
1302
|
+
var Re = Oe && Oe.$$typeof;
|
|
1303
|
+
switch (Re) {
|
|
1304
1304
|
case c:
|
|
1305
1305
|
case f:
|
|
1306
|
-
case
|
|
1307
|
-
case
|
|
1306
|
+
case w:
|
|
1307
|
+
case m:
|
|
1308
1308
|
case a:
|
|
1309
|
-
return
|
|
1309
|
+
return Re;
|
|
1310
1310
|
default:
|
|
1311
1311
|
return Be;
|
|
1312
1312
|
}
|
|
@@ -1316,57 +1316,57 @@ function jo() {
|
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
var
|
|
1319
|
+
var h = l, q = d, $ = c, Ye = a, Se = t, Te = f, ke = n, Ce = w, Z = m, ce = r, pe = i, b = o, T = y, k = !1;
|
|
1320
1320
|
function O(E) {
|
|
1321
|
-
return k || (k = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Y(E) ||
|
|
1321
|
+
return k || (k = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), Y(E) || A(E) === l;
|
|
1322
1322
|
}
|
|
1323
1323
|
function Y(E) {
|
|
1324
|
-
return
|
|
1324
|
+
return A(E) === d;
|
|
1325
1325
|
}
|
|
1326
1326
|
function G(E) {
|
|
1327
|
-
return
|
|
1327
|
+
return A(E) === c;
|
|
1328
1328
|
}
|
|
1329
1329
|
function oe(E) {
|
|
1330
|
-
return
|
|
1330
|
+
return A(E) === a;
|
|
1331
1331
|
}
|
|
1332
1332
|
function me(E) {
|
|
1333
1333
|
return typeof E == "object" && E !== null && E.$$typeof === t;
|
|
1334
1334
|
}
|
|
1335
1335
|
function _t(E) {
|
|
1336
|
-
return
|
|
1336
|
+
return A(E) === f;
|
|
1337
1337
|
}
|
|
1338
1338
|
function Tt(E) {
|
|
1339
|
-
return
|
|
1339
|
+
return A(E) === n;
|
|
1340
1340
|
}
|
|
1341
1341
|
function Ve(E) {
|
|
1342
|
-
return
|
|
1342
|
+
return A(E) === w;
|
|
1343
1343
|
}
|
|
1344
1344
|
function ze(E) {
|
|
1345
|
-
return
|
|
1345
|
+
return A(E) === m;
|
|
1346
1346
|
}
|
|
1347
1347
|
function Me(E) {
|
|
1348
|
-
return
|
|
1348
|
+
return A(E) === r;
|
|
1349
1349
|
}
|
|
1350
1350
|
function Ue(E) {
|
|
1351
|
-
return
|
|
1351
|
+
return A(E) === i;
|
|
1352
1352
|
}
|
|
1353
1353
|
function Pe(E) {
|
|
1354
|
-
return
|
|
1354
|
+
return A(E) === o;
|
|
1355
1355
|
}
|
|
1356
1356
|
function kt(E) {
|
|
1357
|
-
return
|
|
1357
|
+
return A(E) === y;
|
|
1358
1358
|
}
|
|
1359
|
-
D.AsyncMode =
|
|
1359
|
+
D.AsyncMode = h, D.ConcurrentMode = q, D.ContextConsumer = $, D.ContextProvider = Ye, D.Element = Se, D.ForwardRef = Te, D.Fragment = ke, D.Lazy = Ce, D.Memo = Z, D.Portal = ce, D.Profiler = pe, D.StrictMode = b, D.Suspense = T, D.isAsyncMode = O, D.isConcurrentMode = Y, D.isContextConsumer = G, D.isContextProvider = oe, D.isElement = me, D.isForwardRef = _t, D.isFragment = Tt, D.isLazy = Ve, D.isMemo = ze, D.isPortal = Me, D.isProfiler = Ue, D.isStrictMode = Pe, D.isSuspense = kt, D.isValidElementType = C, D.typeOf = A;
|
|
1360
1360
|
}()), D;
|
|
1361
1361
|
}
|
|
1362
|
-
process.env.NODE_ENV === "production" ? Yt.exports =
|
|
1363
|
-
var
|
|
1362
|
+
process.env.NODE_ENV === "production" ? Yt.exports = Yo() : Yt.exports = Vo();
|
|
1363
|
+
var zo = Yt.exports, cn = zo, Uo = {
|
|
1364
1364
|
$$typeof: !0,
|
|
1365
1365
|
render: !0,
|
|
1366
1366
|
defaultProps: !0,
|
|
1367
1367
|
displayName: !0,
|
|
1368
1368
|
propTypes: !0
|
|
1369
|
-
},
|
|
1369
|
+
}, Bo = {
|
|
1370
1370
|
$$typeof: !0,
|
|
1371
1371
|
compare: !0,
|
|
1372
1372
|
defaultProps: !0,
|
|
@@ -1374,10 +1374,10 @@ var qo = Yt.exports, cn = qo, Yo = {
|
|
|
1374
1374
|
propTypes: !0,
|
|
1375
1375
|
type: !0
|
|
1376
1376
|
}, ln = {};
|
|
1377
|
-
ln[cn.ForwardRef] =
|
|
1378
|
-
ln[cn.Memo] =
|
|
1379
|
-
var
|
|
1380
|
-
function
|
|
1377
|
+
ln[cn.ForwardRef] = Uo;
|
|
1378
|
+
ln[cn.Memo] = Bo;
|
|
1379
|
+
var Go = !0;
|
|
1380
|
+
function Ho(e, t, r) {
|
|
1381
1381
|
var n = "";
|
|
1382
1382
|
return r.split(" ").forEach(function(o) {
|
|
1383
1383
|
e[o] !== void 0 ? t.push(e[o] + ";") : o && (n += o + " ");
|
|
@@ -1394,8 +1394,8 @@ var un = function(t, r, n) {
|
|
|
1394
1394
|
// in node since emotion-server relies on whether a style is in
|
|
1395
1395
|
// the registered cache to know whether a style is global or not
|
|
1396
1396
|
// also, note that this check will be dead code eliminated in the browser
|
|
1397
|
-
|
|
1398
|
-
},
|
|
1397
|
+
Go === !1) && t.registered[o] === void 0 && (t.registered[o] = r.styles);
|
|
1398
|
+
}, Jo = function(t, r, n) {
|
|
1399
1399
|
un(t, r, n);
|
|
1400
1400
|
var o = t.key + "-" + r.name;
|
|
1401
1401
|
if (t.inserted[r.name] === void 0) {
|
|
@@ -1405,7 +1405,7 @@ var un = function(t, r, n) {
|
|
|
1405
1405
|
while (i !== void 0);
|
|
1406
1406
|
}
|
|
1407
1407
|
};
|
|
1408
|
-
function
|
|
1408
|
+
function Ko(e) {
|
|
1409
1409
|
for (var t = 0, r, n = 0, o = e.length; o >= 4; ++n, o -= 4)
|
|
1410
1410
|
r = e.charCodeAt(n) & 255 | (e.charCodeAt(++n) & 255) << 8 | (e.charCodeAt(++n) & 255) << 16 | (e.charCodeAt(++n) & 255) << 24, r = /* Math.imul(k, m): */
|
|
1411
1411
|
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
|
|
@@ -1424,7 +1424,7 @@ function Go(e) {
|
|
|
1424
1424
|
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
1425
1425
|
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
1426
1426
|
}
|
|
1427
|
-
var
|
|
1427
|
+
var Qo = {
|
|
1428
1428
|
animationIterationCount: 1,
|
|
1429
1429
|
aspectRatio: 1,
|
|
1430
1430
|
borderImageOutset: 1,
|
|
@@ -1473,18 +1473,18 @@ var Ho = {
|
|
|
1473
1473
|
strokeMiterlimit: 1,
|
|
1474
1474
|
strokeOpacity: 1,
|
|
1475
1475
|
strokeWidth: 1
|
|
1476
|
-
},
|
|
1476
|
+
}, Xo = /[A-Z]|^ms/g, Zo = /_EMO_([^_]+?)_([^]*?)_EMO_/g, fn = function(t) {
|
|
1477
1477
|
return t.charCodeAt(1) === 45;
|
|
1478
1478
|
}, Or = function(t) {
|
|
1479
1479
|
return t != null && typeof t != "boolean";
|
|
1480
|
-
}, Lt = /* @__PURE__ */
|
|
1481
|
-
return fn(e) ? e : e.replace(
|
|
1480
|
+
}, Lt = /* @__PURE__ */ $o(function(e) {
|
|
1481
|
+
return fn(e) ? e : e.replace(Xo, "-$&").toLowerCase();
|
|
1482
1482
|
}), Ar = function(t, r) {
|
|
1483
1483
|
switch (t) {
|
|
1484
1484
|
case "animation":
|
|
1485
1485
|
case "animationName":
|
|
1486
1486
|
if (typeof r == "string")
|
|
1487
|
-
return r.replace(
|
|
1487
|
+
return r.replace(Zo, function(n, o, i) {
|
|
1488
1488
|
return he = {
|
|
1489
1489
|
name: o,
|
|
1490
1490
|
styles: i,
|
|
@@ -1492,7 +1492,7 @@ var Ho = {
|
|
|
1492
1492
|
}, o;
|
|
1493
1493
|
});
|
|
1494
1494
|
}
|
|
1495
|
-
return
|
|
1495
|
+
return Qo[t] !== 1 && !fn(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
|
|
1496
1496
|
};
|
|
1497
1497
|
function et(e, t, r) {
|
|
1498
1498
|
if (r == null)
|
|
@@ -1524,12 +1524,12 @@ function et(e, t, r) {
|
|
|
1524
1524
|
var c = i.styles + ";";
|
|
1525
1525
|
return c;
|
|
1526
1526
|
}
|
|
1527
|
-
return
|
|
1527
|
+
return ei(e, t, r);
|
|
1528
1528
|
}
|
|
1529
1529
|
case "function": {
|
|
1530
1530
|
if (e !== void 0) {
|
|
1531
|
-
var l = he,
|
|
1532
|
-
return he = l, et(e, t,
|
|
1531
|
+
var l = he, d = r(e);
|
|
1532
|
+
return he = l, et(e, t, d);
|
|
1533
1533
|
}
|
|
1534
1534
|
break;
|
|
1535
1535
|
}
|
|
@@ -1537,7 +1537,7 @@ function et(e, t, r) {
|
|
|
1537
1537
|
var f = r;
|
|
1538
1538
|
return f;
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1540
|
+
function ei(e, t, r) {
|
|
1541
1541
|
var n = "";
|
|
1542
1542
|
if (Array.isArray(r))
|
|
1543
1543
|
for (var o = 0; o < r.length; o++)
|
|
@@ -1552,22 +1552,22 @@ function Qo(e, t, r) {
|
|
|
1552
1552
|
for (var l = 0; l < a.length; l++)
|
|
1553
1553
|
Or(a[l]) && (n += Lt(i) + ":" + Ar(i, a[l]) + ";");
|
|
1554
1554
|
else {
|
|
1555
|
-
var
|
|
1555
|
+
var d = et(e, t, a);
|
|
1556
1556
|
switch (i) {
|
|
1557
1557
|
case "animation":
|
|
1558
1558
|
case "animationName": {
|
|
1559
|
-
n += Lt(i) + ":" +
|
|
1559
|
+
n += Lt(i) + ":" + d + ";";
|
|
1560
1560
|
break;
|
|
1561
1561
|
}
|
|
1562
1562
|
default:
|
|
1563
|
-
n += i + "{" +
|
|
1563
|
+
n += i + "{" + d + "}";
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
1566
|
}
|
|
1567
1567
|
return n;
|
|
1568
1568
|
}
|
|
1569
1569
|
var $r = /label:\s*([^\s;{]+)\s*(;|$)/g, he;
|
|
1570
|
-
function
|
|
1570
|
+
function ti(e, t, r) {
|
|
1571
1571
|
if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
|
|
1572
1572
|
return e[0];
|
|
1573
1573
|
var n = !0, o = "";
|
|
@@ -1585,63 +1585,63 @@ function Xo(e, t, r) {
|
|
|
1585
1585
|
o += l[c];
|
|
1586
1586
|
}
|
|
1587
1587
|
$r.lastIndex = 0;
|
|
1588
|
-
for (var
|
|
1589
|
-
|
|
1590
|
-
var y =
|
|
1588
|
+
for (var d = "", f; (f = $r.exec(o)) !== null; )
|
|
1589
|
+
d += "-" + f[1];
|
|
1590
|
+
var y = Ko(o) + d;
|
|
1591
1591
|
return {
|
|
1592
1592
|
name: y,
|
|
1593
1593
|
styles: o,
|
|
1594
1594
|
next: he
|
|
1595
1595
|
};
|
|
1596
1596
|
}
|
|
1597
|
-
var
|
|
1597
|
+
var ri = function(t) {
|
|
1598
1598
|
return t();
|
|
1599
|
-
},
|
|
1599
|
+
}, ni = ve.useInsertionEffect ? ve.useInsertionEffect : !1, oi = ni || ri, hn = /* @__PURE__ */ ve.createContext(
|
|
1600
1600
|
// we're doing this to avoid preconstruct's dead code elimination in this one case
|
|
1601
1601
|
// because this module is primarily intended for the browser and node
|
|
1602
1602
|
// but it's also required in react native and similar environments sometimes
|
|
1603
1603
|
// and we could have a special build just for that
|
|
1604
1604
|
// but this is much easier and the native packages
|
|
1605
1605
|
// might use a different theme context in the future anyway
|
|
1606
|
-
typeof HTMLElement < "u" ? /* @__PURE__ */
|
|
1606
|
+
typeof HTMLElement < "u" ? /* @__PURE__ */ qo({
|
|
1607
1607
|
key: "css"
|
|
1608
1608
|
}) : null
|
|
1609
1609
|
);
|
|
1610
1610
|
hn.Provider;
|
|
1611
|
-
var
|
|
1611
|
+
var ii = function(t) {
|
|
1612
1612
|
return /* @__PURE__ */ rt(function(r, n) {
|
|
1613
1613
|
var o = Jn(hn);
|
|
1614
1614
|
return t(r, o, n);
|
|
1615
1615
|
});
|
|
1616
|
-
},
|
|
1616
|
+
}, si = /* @__PURE__ */ ve.createContext({}), Qt = {}.hasOwnProperty, Vt = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", ai = function(t, r) {
|
|
1617
1617
|
var n = {};
|
|
1618
1618
|
for (var o in r)
|
|
1619
1619
|
Qt.call(r, o) && (n[o] = r[o]);
|
|
1620
1620
|
return n[Vt] = t, n;
|
|
1621
|
-
},
|
|
1621
|
+
}, ci = function(t) {
|
|
1622
1622
|
var r = t.cache, n = t.serialized, o = t.isStringTag;
|
|
1623
|
-
return un(r, n, o),
|
|
1624
|
-
return
|
|
1623
|
+
return un(r, n, o), oi(function() {
|
|
1624
|
+
return Jo(r, n, o);
|
|
1625
1625
|
}), null;
|
|
1626
|
-
},
|
|
1626
|
+
}, li = /* @__PURE__ */ ii(function(e, t, r) {
|
|
1627
1627
|
var n = e.css;
|
|
1628
1628
|
typeof n == "string" && t.registered[n] !== void 0 && (n = t.registered[n]);
|
|
1629
1629
|
var o = e[Vt], i = [n], a = "";
|
|
1630
|
-
typeof e.className == "string" ? a =
|
|
1631
|
-
var c =
|
|
1630
|
+
typeof e.className == "string" ? a = Ho(t.registered, i, e.className) : e.className != null && (a = e.className + " ");
|
|
1631
|
+
var c = ti(i, void 0, ve.useContext(si));
|
|
1632
1632
|
a += t.key + "-" + c.name;
|
|
1633
1633
|
var l = {};
|
|
1634
|
-
for (var
|
|
1635
|
-
Qt.call(e,
|
|
1636
|
-
return l.className = a, r && (l.ref = r), /* @__PURE__ */ ve.createElement(ve.Fragment, null, /* @__PURE__ */ ve.createElement(
|
|
1634
|
+
for (var d in e)
|
|
1635
|
+
Qt.call(e, d) && d !== "css" && d !== Vt && (l[d] = e[d]);
|
|
1636
|
+
return l.className = a, r && (l.ref = r), /* @__PURE__ */ ve.createElement(ve.Fragment, null, /* @__PURE__ */ ve.createElement(ci, {
|
|
1637
1637
|
cache: t,
|
|
1638
1638
|
serialized: c,
|
|
1639
1639
|
isStringTag: typeof o == "string"
|
|
1640
1640
|
}), /* @__PURE__ */ ve.createElement(o, l));
|
|
1641
|
-
}),
|
|
1642
|
-
return Qt.call(r, "css") ? wr.jsx(
|
|
1641
|
+
}), ui = li, wt = function(t, r, n) {
|
|
1642
|
+
return Qt.call(r, "css") ? wr.jsx(ui, ai(t, r), n) : wr.jsx(t, r, n);
|
|
1643
1643
|
};
|
|
1644
|
-
function
|
|
1644
|
+
function fi(e) {
|
|
1645
1645
|
switch (e.toLowerCase()) {
|
|
1646
1646
|
case "sql":
|
|
1647
1647
|
return zr();
|
|
@@ -1651,19 +1651,19 @@ function ci(e) {
|
|
|
1651
1651
|
return [];
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function hi(e) {
|
|
1655
1655
|
return ["sql", "json"].includes(e.toLowerCase());
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1657
|
+
function di(e = {}) {
|
|
1658
1658
|
return Hr(e);
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1660
|
+
function ls(e) {
|
|
1661
1661
|
return [Zn(), eo(e)];
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1664
|
-
return
|
|
1663
|
+
function pi() {
|
|
1664
|
+
return Ee.of([Dt]);
|
|
1665
1665
|
}
|
|
1666
|
-
const
|
|
1666
|
+
const us = [pi(), di()], mi = Jr.define([{
|
|
1667
1667
|
tag: W.keyword,
|
|
1668
1668
|
color: "#1a1aa6",
|
|
1669
1669
|
fontWeight: "bold"
|
|
@@ -1749,7 +1749,7 @@ const as = [fi(), ui()], hi = Jr.define([{
|
|
|
1749
1749
|
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
|
|
1750
1750
|
backgroundColor: "rgba(181, 213, 255, 0.5)"
|
|
1751
1751
|
}
|
|
1752
|
-
}), pt(
|
|
1752
|
+
}), pt(mi)], gi = Jr.define([{
|
|
1753
1753
|
tag: W.keyword,
|
|
1754
1754
|
color: "#569cd6",
|
|
1755
1755
|
fontWeight: "bold"
|
|
@@ -1791,7 +1791,7 @@ const as = [fi(), ui()], hi = Jr.define([{
|
|
|
1791
1791
|
tag: W.link,
|
|
1792
1792
|
color: "#4e94ce",
|
|
1793
1793
|
textDecoration: "underline"
|
|
1794
|
-
}]),
|
|
1794
|
+
}]), vi = [V.theme({
|
|
1795
1795
|
"&": {
|
|
1796
1796
|
backgroundColor: "#1e1e1e",
|
|
1797
1797
|
color: "#d4d4d4",
|
|
@@ -1835,13 +1835,13 @@ const as = [fi(), ui()], hi = Jr.define([{
|
|
|
1835
1835
|
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
|
|
1836
1836
|
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
1837
1837
|
}
|
|
1838
|
-
}), pt(
|
|
1839
|
-
function
|
|
1838
|
+
}), pt(gi)];
|
|
1839
|
+
function yi(e) {
|
|
1840
1840
|
switch (e) {
|
|
1841
1841
|
case "light":
|
|
1842
1842
|
return Fr;
|
|
1843
1843
|
case "dark":
|
|
1844
|
-
return
|
|
1844
|
+
return vi;
|
|
1845
1845
|
default:
|
|
1846
1846
|
return Fr;
|
|
1847
1847
|
}
|
|
@@ -1893,7 +1893,7 @@ function dn(e) {
|
|
|
1893
1893
|
}), Q.set(t);
|
|
1894
1894
|
}
|
|
1895
1895
|
const Xt = /* @__PURE__ */ new WeakMap();
|
|
1896
|
-
function
|
|
1896
|
+
function bi(e) {
|
|
1897
1897
|
let t = e.map((r) => ({
|
|
1898
1898
|
...r
|
|
1899
1899
|
}));
|
|
@@ -1901,7 +1901,7 @@ function gi(e) {
|
|
|
1901
1901
|
// 添加状态字段
|
|
1902
1902
|
Nr.init(() => dn(t)),
|
|
1903
1903
|
// 添加按键映射,专门处理回车键
|
|
1904
|
-
|
|
1904
|
+
Ee.of([{
|
|
1905
1905
|
key: "Enter",
|
|
1906
1906
|
run: (r) => {
|
|
1907
1907
|
const n = r.state.selection.main, {
|
|
@@ -1960,8 +1960,8 @@ function gi(e) {
|
|
|
1960
1960
|
// 动态更新只读区域的装饰
|
|
1961
1961
|
V.updateListener.of((r) => {
|
|
1962
1962
|
if (r.docChanged) {
|
|
1963
|
-
const n =
|
|
1964
|
-
!
|
|
1963
|
+
const n = Ei(t, r);
|
|
1964
|
+
!xi(t, n) ? (t = n, Xt.set(r.view, n), r.view.dispatch({
|
|
1965
1965
|
effects: gt.of(n)
|
|
1966
1966
|
})) : r.view.dispatch({
|
|
1967
1967
|
effects: gt.of(n)
|
|
@@ -1976,7 +1976,7 @@ function gi(e) {
|
|
|
1976
1976
|
})
|
|
1977
1977
|
];
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1979
|
+
function xi(e, t) {
|
|
1980
1980
|
if (e.length !== t.length)
|
|
1981
1981
|
return !1;
|
|
1982
1982
|
for (let r = 0; r < e.length; r++)
|
|
@@ -1984,7 +1984,7 @@ function vi(e, t) {
|
|
|
1984
1984
|
return !1;
|
|
1985
1985
|
return !0;
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1987
|
+
function Ei(e, t) {
|
|
1988
1988
|
var o;
|
|
1989
1989
|
if (!t.docChanged)
|
|
1990
1990
|
return e;
|
|
@@ -1993,20 +1993,20 @@ function yi(e, t) {
|
|
|
1993
1993
|
const a = {
|
|
1994
1994
|
...i
|
|
1995
1995
|
};
|
|
1996
|
-
return t.changes.iterChanges((c, l,
|
|
1997
|
-
const y = f -
|
|
1996
|
+
return t.changes.iterChanges((c, l, d, f) => {
|
|
1997
|
+
const y = f - d, R = l - c, m = y - R;
|
|
1998
1998
|
if (c === 0 && (r = !0), c === 0 && y > 0 && i.start === 0) {
|
|
1999
|
-
a.start = y, a.end +=
|
|
1999
|
+
a.start = y, a.end += m;
|
|
2000
2000
|
return;
|
|
2001
2001
|
}
|
|
2002
2002
|
if (l <= i.start)
|
|
2003
|
-
a.start +=
|
|
2003
|
+
a.start += m, a.end += m;
|
|
2004
2004
|
else if (c >= i.start && c < i.end && l >= i.end)
|
|
2005
2005
|
a.end = c;
|
|
2006
2006
|
else if (!(c >= i.start && l <= i.end)) {
|
|
2007
2007
|
if (c < i.end && l > i.end) {
|
|
2008
|
-
const
|
|
2009
|
-
a.end = c + Math.min(
|
|
2008
|
+
const w = i.end - c;
|
|
2009
|
+
a.end = c + Math.min(w, y);
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
2012
|
}), a;
|
|
@@ -2020,7 +2020,7 @@ function yi(e, t) {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
return n.filter((i) => i.start < i.end);
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2023
|
+
function Si(e) {
|
|
2024
2024
|
return Xt.get(e) || [];
|
|
2025
2025
|
}
|
|
2026
2026
|
function ye(e, t) {
|
|
@@ -2081,7 +2081,7 @@ class We {
|
|
|
2081
2081
|
return -1;
|
|
2082
2082
|
this.bufferPos = 0, this.buffer = this.iter.value;
|
|
2083
2083
|
}
|
|
2084
|
-
return
|
|
2084
|
+
return io(this.buffer, this.bufferPos);
|
|
2085
2085
|
}
|
|
2086
2086
|
/**
|
|
2087
2087
|
Look for the next match. Updates the iterator's
|
|
@@ -2104,8 +2104,8 @@ class We {
|
|
|
2104
2104
|
let t = this.peek();
|
|
2105
2105
|
if (t < 0)
|
|
2106
2106
|
return this.done = !0, this;
|
|
2107
|
-
let r =
|
|
2108
|
-
this.bufferPos +=
|
|
2107
|
+
let r = so(t), n = this.bufferStart + this.bufferPos;
|
|
2108
|
+
this.bufferPos += ao(t);
|
|
2109
2109
|
let o = this.normalize(r);
|
|
2110
2110
|
if (o.length)
|
|
2111
2111
|
for (let i = 0, a = n; ; i++) {
|
|
@@ -2217,7 +2217,7 @@ class vn {
|
|
|
2217
2217
|
typeof Symbol < "u" && (gn.prototype[Symbol.iterator] = vn.prototype[Symbol.iterator] = function() {
|
|
2218
2218
|
return this;
|
|
2219
2219
|
});
|
|
2220
|
-
function
|
|
2220
|
+
function Ci(e) {
|
|
2221
2221
|
try {
|
|
2222
2222
|
return new RegExp(e, Zt), !0;
|
|
2223
2223
|
} catch {
|
|
@@ -2253,15 +2253,15 @@ function zt(e) {
|
|
|
2253
2253
|
let i = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.value);
|
|
2254
2254
|
if (!i)
|
|
2255
2255
|
return;
|
|
2256
|
-
let { state: a } = e, c = a.doc.lineAt(a.selection.main.head), [, l,
|
|
2257
|
-
if (
|
|
2258
|
-
let x =
|
|
2259
|
-
l && (x = x * (l == "-" ? -1 : 1) + c.number / a.doc.lines),
|
|
2260
|
-
} else
|
|
2261
|
-
let
|
|
2256
|
+
let { state: a } = e, c = a.doc.lineAt(a.selection.main.head), [, l, d, f, y] = i, R = f ? +f.slice(1) : 0, m = d ? +d : c.number;
|
|
2257
|
+
if (d && y) {
|
|
2258
|
+
let x = m / 100;
|
|
2259
|
+
l && (x = x * (l == "-" ? -1 : 1) + c.number / a.doc.lines), m = Math.round(a.doc.lines * x);
|
|
2260
|
+
} else d && l && (m = m * (l == "-" ? -1 : 1) + c.number);
|
|
2261
|
+
let w = a.doc.line(Math.max(1, Math.min(a.doc.lines, m))), g = le.cursor(w.from + Math.max(0, Math.min(R, w.length)));
|
|
2262
2262
|
e.dispatch({
|
|
2263
|
-
effects: [Qe.of(!1), V.scrollIntoView(
|
|
2264
|
-
selection:
|
|
2263
|
+
effects: [Qe.of(!1), V.scrollIntoView(g.from, { y: "center" })],
|
|
2264
|
+
selection: g
|
|
2265
2265
|
}), e.focus();
|
|
2266
2266
|
}
|
|
2267
2267
|
return { dom: n };
|
|
@@ -2276,14 +2276,14 @@ const Qe = /* @__PURE__ */ je.define(), Dr = /* @__PURE__ */ Gt.define({
|
|
|
2276
2276
|
return e;
|
|
2277
2277
|
},
|
|
2278
2278
|
provide: (e) => Gr.from(e, (t) => t ? zt : null)
|
|
2279
|
-
}),
|
|
2279
|
+
}), Ri = (e) => {
|
|
2280
2280
|
let t = dt(e, zt);
|
|
2281
2281
|
if (!t) {
|
|
2282
2282
|
let r = [Qe.of(!0)];
|
|
2283
|
-
e.state.field(Dr, !1) == null && r.push(je.appendConfig.of([Dr,
|
|
2283
|
+
e.state.field(Dr, !1) == null && r.push(je.appendConfig.of([Dr, wi])), e.dispatch({ effects: r }), t = dt(e, zt);
|
|
2284
2284
|
}
|
|
2285
2285
|
return t && t.dom.querySelector("input").select(), !0;
|
|
2286
|
-
},
|
|
2286
|
+
}, wi = /* @__PURE__ */ V.baseTheme({
|
|
2287
2287
|
".cm-panel.cm-gotoLine": {
|
|
2288
2288
|
padding: "2px 6px 4px",
|
|
2289
2289
|
position: "relative",
|
|
@@ -2299,14 +2299,14 @@ const Qe = /* @__PURE__ */ je.define(), Dr = /* @__PURE__ */ Gt.define({
|
|
|
2299
2299
|
padding: "0"
|
|
2300
2300
|
}
|
|
2301
2301
|
}
|
|
2302
|
-
}),
|
|
2302
|
+
}), _i = {
|
|
2303
2303
|
highlightWordAroundCursor: !1,
|
|
2304
2304
|
minSelectionLength: 1,
|
|
2305
2305
|
maxMatches: 100,
|
|
2306
2306
|
wholeWords: !1
|
|
2307
2307
|
}, yn = /* @__PURE__ */ Kr.define({
|
|
2308
2308
|
combine(e) {
|
|
2309
|
-
return Xr(e,
|
|
2309
|
+
return Xr(e, _i, {
|
|
2310
2310
|
highlightWordAroundCursor: (t, r) => t || r,
|
|
2311
2311
|
minSelectionLength: Math.min,
|
|
2312
2312
|
maxMatches: Math.min
|
|
@@ -2314,17 +2314,17 @@ const Qe = /* @__PURE__ */ je.define(), Dr = /* @__PURE__ */ Gt.define({
|
|
|
2314
2314
|
}
|
|
2315
2315
|
});
|
|
2316
2316
|
function er(e) {
|
|
2317
|
-
let t = [
|
|
2317
|
+
let t = [Oi, Pi];
|
|
2318
2318
|
return e && t.push(yn.of(e)), t;
|
|
2319
2319
|
}
|
|
2320
|
-
const
|
|
2320
|
+
const Ti = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch" }), ki = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
|
|
2321
2321
|
function Wr(e, t, r, n) {
|
|
2322
2322
|
return (r == 0 || e(t.sliceDoc(r - 1, r)) != ae.Word) && (n == t.doc.length || e(t.sliceDoc(n, n + 1)) != ae.Word);
|
|
2323
2323
|
}
|
|
2324
|
-
function
|
|
2324
|
+
function Mi(e, t, r, n) {
|
|
2325
2325
|
return e(t.sliceDoc(r, r + 1)) == ae.Word && e(t.sliceDoc(n - 1, n)) == ae.Word;
|
|
2326
2326
|
}
|
|
2327
|
-
const
|
|
2327
|
+
const Pi = /* @__PURE__ */ Br.fromClass(class {
|
|
2328
2328
|
constructor(e) {
|
|
2329
2329
|
this.decorations = this.getDeco(e);
|
|
2330
2330
|
}
|
|
@@ -2348,17 +2348,17 @@ const Ti = /* @__PURE__ */ Br.fromClass(class {
|
|
|
2348
2348
|
if (l < t.minSelectionLength || l > 200)
|
|
2349
2349
|
return Q.none;
|
|
2350
2350
|
if (t.wholeWords) {
|
|
2351
|
-
if (i = r.sliceDoc(o.from, o.to), a = r.charCategorizer(o.head), !(Wr(a, r, o.from, o.to) &&
|
|
2351
|
+
if (i = r.sliceDoc(o.from, o.to), a = r.charCategorizer(o.head), !(Wr(a, r, o.from, o.to) && Mi(a, r, o.from, o.to)))
|
|
2352
2352
|
return Q.none;
|
|
2353
2353
|
} else if (i = r.sliceDoc(o.from, o.to), !i)
|
|
2354
2354
|
return Q.none;
|
|
2355
2355
|
}
|
|
2356
2356
|
let c = [];
|
|
2357
2357
|
for (let l of e.visibleRanges) {
|
|
2358
|
-
let
|
|
2359
|
-
for (; !
|
|
2360
|
-
let { from: f, to: y } =
|
|
2361
|
-
if ((!a || Wr(a, r, f, y)) && (o.empty && f <= o.from && y >= o.to ? c.push(
|
|
2358
|
+
let d = new We(r.doc, i, l.from, l.to);
|
|
2359
|
+
for (; !d.next().done; ) {
|
|
2360
|
+
let { from: f, to: y } = d.value;
|
|
2361
|
+
if ((!a || Wr(a, r, f, y)) && (o.empty && f <= o.from && y >= o.to ? c.push(ki.range(f, y)) : (f >= o.to || y <= o.from) && c.push(Ti.range(f, y)), c.length > t.maxMatches))
|
|
2362
2362
|
return Q.none;
|
|
2363
2363
|
}
|
|
2364
2364
|
}
|
|
@@ -2366,14 +2366,14 @@ const Ti = /* @__PURE__ */ Br.fromClass(class {
|
|
|
2366
2366
|
}
|
|
2367
2367
|
}, {
|
|
2368
2368
|
decorations: (e) => e.decorations
|
|
2369
|
-
}),
|
|
2369
|
+
}), Oi = /* @__PURE__ */ V.baseTheme({
|
|
2370
2370
|
".cm-selectionMatch": { backgroundColor: "#99ff7780" },
|
|
2371
2371
|
".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
|
|
2372
|
-
}),
|
|
2372
|
+
}), Ai = ({ state: e, dispatch: t }) => {
|
|
2373
2373
|
let { selection: r } = e, n = le.create(r.ranges.map((o) => e.wordAt(o.head) || le.cursor(o.head)), r.mainIndex);
|
|
2374
2374
|
return n.eq(r) ? !1 : (t(e.update({ selection: n })), !0);
|
|
2375
2375
|
};
|
|
2376
|
-
function
|
|
2376
|
+
function $i(e, t) {
|
|
2377
2377
|
let { main: r, ranges: n } = e.selection, o = e.wordAt(r.head), i = o && o.from == r.from && o.to == r.to;
|
|
2378
2378
|
for (let a = !1, c = new We(e.doc, t, n[n.length - 1].to); ; )
|
|
2379
2379
|
if (c.next(), c.done) {
|
|
@@ -2391,14 +2391,14 @@ function Pi(e, t) {
|
|
|
2391
2391
|
return c.value;
|
|
2392
2392
|
}
|
|
2393
2393
|
}
|
|
2394
|
-
const
|
|
2394
|
+
const Fi = ({ state: e, dispatch: t }) => {
|
|
2395
2395
|
let { ranges: r } = e.selection;
|
|
2396
2396
|
if (r.some((i) => i.from === i.to))
|
|
2397
|
-
return
|
|
2397
|
+
return Ai({ state: e, dispatch: t });
|
|
2398
2398
|
let n = e.sliceDoc(r[0].from, r[0].to);
|
|
2399
2399
|
if (e.selection.ranges.some((i) => e.sliceDoc(i.from, i.to) != n))
|
|
2400
2400
|
return !1;
|
|
2401
|
-
let o =
|
|
2401
|
+
let o = $i(e, n);
|
|
2402
2402
|
return o ? (t(e.update({
|
|
2403
2403
|
selection: e.selection.addRange(le.range(o.from, o.to), !1),
|
|
2404
2404
|
effects: V.scrollIntoView(o.to)
|
|
@@ -2411,7 +2411,7 @@ const Oi = ({ state: e, dispatch: t }) => {
|
|
|
2411
2411
|
literal: !1,
|
|
2412
2412
|
regexp: !1,
|
|
2413
2413
|
wholeWord: !1,
|
|
2414
|
-
createPanel: (t) => new
|
|
2414
|
+
createPanel: (t) => new Ui(t),
|
|
2415
2415
|
scrollToMatch: (t) => V.scrollIntoView(t)
|
|
2416
2416
|
});
|
|
2417
2417
|
}
|
|
@@ -2424,7 +2424,7 @@ class xn {
|
|
|
2424
2424
|
Create a query object.
|
|
2425
2425
|
*/
|
|
2426
2426
|
constructor(t) {
|
|
2427
|
-
this.search = t.search, this.caseSensitive = !!t.caseSensitive, this.literal = !!t.literal, this.regexp = !!t.regexp, this.replace = t.replace || "", this.valid = !!this.search && (!this.regexp ||
|
|
2427
|
+
this.search = t.search, this.caseSensitive = !!t.caseSensitive, this.literal = !!t.literal, this.regexp = !!t.regexp, this.replace = t.replace || "", this.valid = !!this.search && (!this.regexp || Ci(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!t.wholeWord;
|
|
2428
2428
|
}
|
|
2429
2429
|
/**
|
|
2430
2430
|
@internal
|
|
@@ -2443,7 +2443,7 @@ class xn {
|
|
|
2443
2443
|
@internal
|
|
2444
2444
|
*/
|
|
2445
2445
|
create() {
|
|
2446
|
-
return this.regexp ? new
|
|
2446
|
+
return this.regexp ? new Di(this) : new Ni(this);
|
|
2447
2447
|
}
|
|
2448
2448
|
/**
|
|
2449
2449
|
Get a search cursor for this query, searching through the given
|
|
@@ -2460,12 +2460,12 @@ class En {
|
|
|
2460
2460
|
}
|
|
2461
2461
|
}
|
|
2462
2462
|
function Fe(e, t, r, n) {
|
|
2463
|
-
return new We(t.doc, e.unquoted, r, n, e.caseSensitive ? void 0 : (o) => o.toLowerCase(), e.wholeWord ?
|
|
2463
|
+
return new We(t.doc, e.unquoted, r, n, e.caseSensitive ? void 0 : (o) => o.toLowerCase(), e.wholeWord ? Li(t.doc, t.charCategorizer(t.selection.main.head)) : void 0);
|
|
2464
2464
|
}
|
|
2465
|
-
function
|
|
2465
|
+
function Li(e, t) {
|
|
2466
2466
|
return (r, n, o, i) => ((i > r || i + o.length < n) && (i = Math.max(0, r - 2), o = e.sliceString(i, Math.min(e.length, n + 2))), (t(yt(o, r - i)) != ae.Word || t(bt(o, r - i)) != ae.Word) && (t(bt(o, n - i)) != ae.Word || t(yt(o, n - i)) != ae.Word));
|
|
2467
2467
|
}
|
|
2468
|
-
class
|
|
2468
|
+
class Ni extends En {
|
|
2469
2469
|
constructor(t) {
|
|
2470
2470
|
super(t);
|
|
2471
2471
|
}
|
|
@@ -2516,7 +2516,7 @@ class $i extends En {
|
|
|
2516
2516
|
function Le(e, t, r, n) {
|
|
2517
2517
|
return new gn(t.doc, e.search, {
|
|
2518
2518
|
ignoreCase: !e.caseSensitive,
|
|
2519
|
-
test: e.wholeWord ?
|
|
2519
|
+
test: e.wholeWord ? Ii(t.charCategorizer(t.selection.main.head)) : void 0
|
|
2520
2520
|
}, r, n);
|
|
2521
2521
|
}
|
|
2522
2522
|
function yt(e, t) {
|
|
@@ -2525,10 +2525,10 @@ function yt(e, t) {
|
|
|
2525
2525
|
function bt(e, t) {
|
|
2526
2526
|
return e.slice(t, Zr(e, t));
|
|
2527
2527
|
}
|
|
2528
|
-
function
|
|
2528
|
+
function Ii(e) {
|
|
2529
2529
|
return (t, r, n) => !n[0].length || (e(yt(n.input, n.index)) != ae.Word || e(bt(n.input, n.index)) != ae.Word) && (e(bt(n.input, n.index + n[0].length)) != ae.Word || e(yt(n.input, n.index + n[0].length)) != ae.Word);
|
|
2530
2530
|
}
|
|
2531
|
-
class
|
|
2531
|
+
class Di extends En {
|
|
2532
2532
|
nextMatch(t, r, n) {
|
|
2533
2533
|
let o = Le(this.spec, t, n, t.doc.length).next();
|
|
2534
2534
|
return o.done && (o = Le(this.spec, t, 0, r).next()), o.done ? null : o.value;
|
|
@@ -2600,7 +2600,7 @@ class It {
|
|
|
2600
2600
|
this.query = t, this.panel = r;
|
|
2601
2601
|
}
|
|
2602
2602
|
}
|
|
2603
|
-
const
|
|
2603
|
+
const Wi = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch" }), ji = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), qi = /* @__PURE__ */ Br.fromClass(class {
|
|
2604
2604
|
constructor(e) {
|
|
2605
2605
|
this.view = e, this.decorations = this.highlight(e.state.field(xe));
|
|
2606
2606
|
}
|
|
@@ -2611,14 +2611,14 @@ const Ni = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch" }), Ii = /* @__PURE_
|
|
|
2611
2611
|
highlight({ query: e, panel: t }) {
|
|
2612
2612
|
if (!t || !e.spec.valid)
|
|
2613
2613
|
return Q.none;
|
|
2614
|
-
let { view: r } = this, n = new
|
|
2614
|
+
let { view: r } = this, n = new co();
|
|
2615
2615
|
for (let o = 0, i = r.visibleRanges, a = i.length; o < a; o++) {
|
|
2616
2616
|
let { from: c, to: l } = i[o];
|
|
2617
2617
|
for (; o < a - 1 && l > i[o + 1].from - 2 * 250; )
|
|
2618
2618
|
l = i[++o].to;
|
|
2619
|
-
e.highlight(r.state, c, l, (
|
|
2620
|
-
let y = r.state.selection.ranges.some((
|
|
2621
|
-
n.add(
|
|
2619
|
+
e.highlight(r.state, c, l, (d, f) => {
|
|
2620
|
+
let y = r.state.selection.ranges.some((R) => R.from == d && R.to == f);
|
|
2621
|
+
n.add(d, f, y ? ji : Wi);
|
|
2622
2622
|
});
|
|
2623
2623
|
}
|
|
2624
2624
|
return n.finish();
|
|
@@ -2652,13 +2652,13 @@ const xt = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
|
2652
2652
|
effects: [nr(e, o), a.scrollToMatch(i.main, e)],
|
|
2653
2653
|
userEvent: "select.search"
|
|
2654
2654
|
}), Cn(e), !0;
|
|
2655
|
-
}),
|
|
2655
|
+
}), Yi = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2656
2656
|
let r = t.matchAll(e.state, 1e3);
|
|
2657
2657
|
return !r || !r.length ? !1 : (e.dispatch({
|
|
2658
2658
|
selection: le.create(r.map((n) => le.range(n.from, n.to))),
|
|
2659
2659
|
userEvent: "select.search.matches"
|
|
2660
2660
|
}), !0);
|
|
2661
|
-
}),
|
|
2661
|
+
}), Vi = ({ state: e, dispatch: t }) => {
|
|
2662
2662
|
let r = e.selection;
|
|
2663
2663
|
if (r.ranges.length > 1 || r.main.empty)
|
|
2664
2664
|
return !1;
|
|
@@ -2679,8 +2679,8 @@ const xt = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
|
2679
2679
|
let i = t.nextMatch(r, n, n);
|
|
2680
2680
|
if (!i)
|
|
2681
2681
|
return !1;
|
|
2682
|
-
let a = i, c = [], l,
|
|
2683
|
-
a.from == n && a.to == o && (
|
|
2682
|
+
let a = i, c = [], l, d, f = [];
|
|
2683
|
+
a.from == n && a.to == o && (d = r.toText(t.getReplacement(a)), c.push({ from: a.from, to: a.to, insert: d }), a = t.nextMatch(r, a.from, a.to), f.push(V.announce.of(r.phrase("replaced match on line $", r.doc.lineAt(n).number) + ".")));
|
|
2684
2684
|
let y = e.state.changes(c);
|
|
2685
2685
|
return a && (l = le.single(a.from, a.to).map(y), f.push(nr(e, a)), f.push(r.facet(_e).scrollToMatch(l.main, e))), e.dispatch({
|
|
2686
2686
|
changes: y,
|
|
@@ -2688,7 +2688,7 @@ const xt = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
|
2688
2688
|
effects: f,
|
|
2689
2689
|
userEvent: "input.replace"
|
|
2690
2690
|
}), !0;
|
|
2691
|
-
}),
|
|
2691
|
+
}), zi = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2692
2692
|
if (e.state.readOnly)
|
|
2693
2693
|
return !1;
|
|
2694
2694
|
let r = t.matchAll(e.state, 1e9).map((o) => {
|
|
@@ -2712,13 +2712,13 @@ function Ut(e, t) {
|
|
|
2712
2712
|
let c = e.selection.main, l = c.empty || c.to > c.from + 100 ? "" : e.sliceDoc(c.from, c.to);
|
|
2713
2713
|
if (t && !l)
|
|
2714
2714
|
return t;
|
|
2715
|
-
let
|
|
2715
|
+
let d = e.facet(_e);
|
|
2716
2716
|
return new xn({
|
|
2717
|
-
search: ((r = t == null ? void 0 : t.literal) !== null && r !== void 0 ? r :
|
|
2718
|
-
caseSensitive: (n = t == null ? void 0 : t.caseSensitive) !== null && n !== void 0 ? n :
|
|
2719
|
-
literal: (o = t == null ? void 0 : t.literal) !== null && o !== void 0 ? o :
|
|
2720
|
-
regexp: (i = t == null ? void 0 : t.regexp) !== null && i !== void 0 ? i :
|
|
2721
|
-
wholeWord: (a = t == null ? void 0 : t.wholeWord) !== null && a !== void 0 ? a :
|
|
2717
|
+
search: ((r = t == null ? void 0 : t.literal) !== null && r !== void 0 ? r : d.literal) ? l : l.replace(/\n/g, "\\n"),
|
|
2718
|
+
caseSensitive: (n = t == null ? void 0 : t.caseSensitive) !== null && n !== void 0 ? n : d.caseSensitive,
|
|
2719
|
+
literal: (o = t == null ? void 0 : t.literal) !== null && o !== void 0 ? o : d.literal,
|
|
2720
|
+
regexp: (i = t == null ? void 0 : t.regexp) !== null && i !== void 0 ? i : d.regexp,
|
|
2721
|
+
wholeWord: (a = t == null ? void 0 : t.wholeWord) !== null && a !== void 0 ? a : d.wholeWord
|
|
2722
2722
|
});
|
|
2723
2723
|
}
|
|
2724
2724
|
function Sn(e) {
|
|
@@ -2754,11 +2754,11 @@ const Rn = (e) => {
|
|
|
2754
2754
|
{ key: "F3", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
|
|
2755
2755
|
{ key: "Mod-g", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
|
|
2756
2756
|
{ key: "Escape", run: wn, scope: "editor search-panel" },
|
|
2757
|
-
{ key: "Mod-Shift-l", run:
|
|
2758
|
-
{ key: "Mod-Alt-g", run:
|
|
2759
|
-
{ key: "Mod-d", run:
|
|
2757
|
+
{ key: "Mod-Shift-l", run: Vi },
|
|
2758
|
+
{ key: "Mod-Alt-g", run: Ri },
|
|
2759
|
+
{ key: "Mod-d", run: Fi, preventDefault: !0 }
|
|
2760
2760
|
];
|
|
2761
|
-
class
|
|
2761
|
+
class Ui {
|
|
2762
2762
|
constructor(t) {
|
|
2763
2763
|
this.view = t;
|
|
2764
2764
|
let r = this.query = t.state.field(xe).query.spec;
|
|
@@ -2807,7 +2807,7 @@ class Yi {
|
|
|
2807
2807
|
this.searchField,
|
|
2808
2808
|
n("next", () => xt(t), [re(t, "next")]),
|
|
2809
2809
|
n("prev", () => Et(t), [re(t, "previous")]),
|
|
2810
|
-
n("select", () =>
|
|
2810
|
+
n("select", () => Yi(t), [re(t, "all")]),
|
|
2811
2811
|
H("label", null, [this.caseField, re(t, "match case")]),
|
|
2812
2812
|
H("label", null, [this.reField, re(t, "regexp")]),
|
|
2813
2813
|
H("label", null, [this.wordField, re(t, "by word")]),
|
|
@@ -2815,7 +2815,7 @@ class Yi {
|
|
|
2815
2815
|
H("br"),
|
|
2816
2816
|
this.replaceField,
|
|
2817
2817
|
n("replace", () => jr(t), [re(t, "replace")]),
|
|
2818
|
-
n("replaceAll", () =>
|
|
2818
|
+
n("replaceAll", () => zi(t), [re(t, "replace all")])
|
|
2819
2819
|
],
|
|
2820
2820
|
H("button", {
|
|
2821
2821
|
name: "close",
|
|
@@ -2878,7 +2878,7 @@ function nr(e, { from: t, to: r }) {
|
|
|
2878
2878
|
}
|
|
2879
2879
|
return V.announce.of(`${e.state.phrase("current match")}. ${c} ${e.state.phrase("on line")} ${n.number}.`);
|
|
2880
2880
|
}
|
|
2881
|
-
const
|
|
2881
|
+
const Bi = /* @__PURE__ */ V.baseTheme({
|
|
2882
2882
|
".cm-panel.cm-search": {
|
|
2883
2883
|
padding: "2px 6px 4px",
|
|
2884
2884
|
position: "relative",
|
|
@@ -2909,9 +2909,9 @@ const Vi = /* @__PURE__ */ V.baseTheme({
|
|
|
2909
2909
|
"&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
|
|
2910
2910
|
}), Bt = [
|
|
2911
2911
|
xe,
|
|
2912
|
-
/* @__PURE__ */ Qr.low(
|
|
2913
|
-
|
|
2914
|
-
],
|
|
2912
|
+
/* @__PURE__ */ Qr.low(qi),
|
|
2913
|
+
Bi
|
|
2914
|
+
], fs = {
|
|
2915
2915
|
// 搜索面板标题
|
|
2916
2916
|
Search: "搜索",
|
|
2917
2917
|
Replace: "替换",
|
|
@@ -2944,7 +2944,7 @@ const Vi = /* @__PURE__ */ V.baseTheme({
|
|
|
2944
2944
|
"Query too long": "查询内容过长",
|
|
2945
2945
|
"Search string too long": "搜索字符串过长"
|
|
2946
2946
|
};
|
|
2947
|
-
function
|
|
2947
|
+
function Gi() {
|
|
2948
2948
|
return V.theme({
|
|
2949
2949
|
// 搜索面板样式优化
|
|
2950
2950
|
".cm-panel.cm-search": {
|
|
@@ -2964,7 +2964,7 @@ function zi() {
|
|
|
2964
2964
|
}
|
|
2965
2965
|
});
|
|
2966
2966
|
}
|
|
2967
|
-
function
|
|
2967
|
+
function Hi(e) {
|
|
2968
2968
|
setTimeout(() => {
|
|
2969
2969
|
const t = e.dom.querySelector(".cm-panel.cm-search");
|
|
2970
2970
|
if (!t) return;
|
|
@@ -3011,7 +3011,7 @@ function Ui(e) {
|
|
|
3011
3011
|
}
|
|
3012
3012
|
function qr() {
|
|
3013
3013
|
return [
|
|
3014
|
-
|
|
3014
|
+
Gi(),
|
|
3015
3015
|
// 中文样式
|
|
3016
3016
|
bn({
|
|
3017
3017
|
top: !0
|
|
@@ -3019,23 +3019,23 @@ function qr() {
|
|
|
3019
3019
|
}),
|
|
3020
3020
|
er(),
|
|
3021
3021
|
// 高亮相同的选中文本
|
|
3022
|
-
|
|
3022
|
+
Ee.of(_n),
|
|
3023
3023
|
// 搜索相关的键盘快捷键
|
|
3024
3024
|
// 监听 DOM 变化以应用中文翻译
|
|
3025
3025
|
V.updateListener.of((e) => {
|
|
3026
|
-
e.view.dom.querySelector(".cm-panel.cm-search") &&
|
|
3026
|
+
e.view.dom.querySelector(".cm-panel.cm-search") && Hi(e.view);
|
|
3027
3027
|
})
|
|
3028
3028
|
];
|
|
3029
3029
|
}
|
|
3030
|
-
function
|
|
3030
|
+
function hs() {
|
|
3031
3031
|
return [er()];
|
|
3032
3032
|
}
|
|
3033
3033
|
function Yr() {
|
|
3034
3034
|
return [bn({
|
|
3035
3035
|
top: !0
|
|
3036
|
-
}), er(),
|
|
3036
|
+
}), er(), Ee.of(_n)];
|
|
3037
3037
|
}
|
|
3038
|
-
const
|
|
3038
|
+
const ds = [
|
|
3039
3039
|
{
|
|
3040
3040
|
key: "Ctrl-f",
|
|
3041
3041
|
mac: "Cmd-f",
|
|
@@ -3052,7 +3052,7 @@ const us = [
|
|
|
3052
3052
|
run: () => !0
|
|
3053
3053
|
}
|
|
3054
3054
|
// 查找上一个的替代快捷键
|
|
3055
|
-
],
|
|
3055
|
+
], Ji = ({
|
|
3056
3056
|
value: e,
|
|
3057
3057
|
onChange: t,
|
|
3058
3058
|
extensions: r = [],
|
|
@@ -3062,14 +3062,14 @@ const us = [
|
|
|
3062
3062
|
style: a = {},
|
|
3063
3063
|
placeholder: c = "",
|
|
3064
3064
|
showLineNumbers: l = !0,
|
|
3065
|
-
onEditorViewCreated:
|
|
3065
|
+
onEditorViewCreated: d,
|
|
3066
3066
|
locale: f = "zh-CN"
|
|
3067
3067
|
}, y) => {
|
|
3068
|
-
const
|
|
3068
|
+
const R = ue(null), m = ue();
|
|
3069
3069
|
return ge(() => {
|
|
3070
|
-
if (!
|
|
3071
|
-
const
|
|
3072
|
-
|
|
3070
|
+
if (!R.current) return;
|
|
3071
|
+
const w = [
|
|
3072
|
+
Ee.of([Dt, {
|
|
3073
3073
|
key: "Enter",
|
|
3074
3074
|
run: Er
|
|
3075
3075
|
}]),
|
|
@@ -3080,43 +3080,43 @@ const us = [
|
|
|
3080
3080
|
c ? br(c) : [],
|
|
3081
3081
|
// 行号功能,根据配置决定是否启用
|
|
3082
3082
|
l ? xr() : [],
|
|
3083
|
-
V.updateListener.of((
|
|
3084
|
-
if (
|
|
3085
|
-
const
|
|
3086
|
-
value:
|
|
3083
|
+
V.updateListener.of((S) => {
|
|
3084
|
+
if (S.docChanged && t) {
|
|
3085
|
+
const v = {
|
|
3086
|
+
value: S.state.doc.toString(),
|
|
3087
3087
|
readOnlyRanges: []
|
|
3088
3088
|
// 基础编辑器没有只读区域逻辑,由特定编辑器实现
|
|
3089
3089
|
};
|
|
3090
|
-
t(
|
|
3090
|
+
t(v);
|
|
3091
3091
|
}
|
|
3092
3092
|
})
|
|
3093
3093
|
];
|
|
3094
|
-
o &&
|
|
3095
|
-
const
|
|
3094
|
+
o && w.push(be.readOnly.of(!0));
|
|
3095
|
+
const g = be.create({
|
|
3096
3096
|
doc: e,
|
|
3097
|
-
extensions: [...
|
|
3097
|
+
extensions: [...w, ...r]
|
|
3098
3098
|
}), x = new V({
|
|
3099
|
-
state:
|
|
3100
|
-
parent:
|
|
3099
|
+
state: g,
|
|
3100
|
+
parent: R.current
|
|
3101
3101
|
});
|
|
3102
|
-
return
|
|
3103
|
-
var
|
|
3104
|
-
(
|
|
3102
|
+
return m.current = x, d && d(x), () => {
|
|
3103
|
+
var S;
|
|
3104
|
+
(S = m.current) == null || S.destroy();
|
|
3105
3105
|
};
|
|
3106
3106
|
}, []), ge(() => {
|
|
3107
|
-
|
|
3107
|
+
m.current && e !== m.current.state.doc.toString() && m.current.dispatch({
|
|
3108
3108
|
changes: {
|
|
3109
3109
|
from: 0,
|
|
3110
|
-
to:
|
|
3110
|
+
to: m.current.state.doc.length,
|
|
3111
3111
|
insert: e
|
|
3112
3112
|
}
|
|
3113
3113
|
});
|
|
3114
3114
|
}, [e]), ge(() => {
|
|
3115
|
-
if (!
|
|
3116
|
-
const
|
|
3117
|
-
|
|
3118
|
-
const
|
|
3119
|
-
|
|
3115
|
+
if (!m.current || !R.current) return;
|
|
3116
|
+
const w = m.current.state.doc.toString();
|
|
3117
|
+
m.current.destroy();
|
|
3118
|
+
const g = [
|
|
3119
|
+
Ee.of([Dt, {
|
|
3120
3120
|
key: "Enter",
|
|
3121
3121
|
run: Er
|
|
3122
3122
|
}]),
|
|
@@ -3127,63 +3127,63 @@ const us = [
|
|
|
3127
3127
|
c ? br(c) : [],
|
|
3128
3128
|
// 行号功能,根据配置决定是否启用
|
|
3129
3129
|
l ? xr() : [],
|
|
3130
|
-
V.updateListener.of((
|
|
3131
|
-
if (
|
|
3132
|
-
const
|
|
3133
|
-
value:
|
|
3130
|
+
V.updateListener.of((v) => {
|
|
3131
|
+
if (v.docChanged && t) {
|
|
3132
|
+
const C = {
|
|
3133
|
+
value: v.state.doc.toString(),
|
|
3134
3134
|
readOnlyRanges: []
|
|
3135
3135
|
// 基础编辑器没有只读区域逻辑,由特定编辑器实现
|
|
3136
3136
|
};
|
|
3137
|
-
t(
|
|
3137
|
+
t(C);
|
|
3138
3138
|
}
|
|
3139
3139
|
})
|
|
3140
3140
|
];
|
|
3141
|
-
o &&
|
|
3141
|
+
o && g.push(be.readOnly.of(!0));
|
|
3142
3142
|
const x = be.create({
|
|
3143
|
-
doc:
|
|
3144
|
-
extensions: [...
|
|
3145
|
-
}),
|
|
3143
|
+
doc: w,
|
|
3144
|
+
extensions: [...g, ...r]
|
|
3145
|
+
}), S = new V({
|
|
3146
3146
|
state: x,
|
|
3147
|
-
parent:
|
|
3147
|
+
parent: R.current
|
|
3148
3148
|
});
|
|
3149
|
-
|
|
3149
|
+
m.current = S, d && d(S);
|
|
3150
3150
|
}, [o, l]), Kn(y, () => ({
|
|
3151
|
-
insertTextAtCursor: (
|
|
3152
|
-
const
|
|
3153
|
-
|
|
3151
|
+
insertTextAtCursor: (w) => {
|
|
3152
|
+
const g = m.current;
|
|
3153
|
+
g && (g.dispatch(g.state.replaceSelection(w)), g.focus());
|
|
3154
3154
|
},
|
|
3155
|
-
goToPosition: (
|
|
3156
|
-
const
|
|
3157
|
-
if (
|
|
3158
|
-
const x =
|
|
3159
|
-
|
|
3155
|
+
goToPosition: (w) => {
|
|
3156
|
+
const g = m.current;
|
|
3157
|
+
if (g) {
|
|
3158
|
+
const x = g.state.doc.length, S = Math.max(0, Math.min(w, x));
|
|
3159
|
+
g.dispatch({
|
|
3160
3160
|
selection: {
|
|
3161
|
-
anchor:
|
|
3162
|
-
head:
|
|
3161
|
+
anchor: S,
|
|
3162
|
+
head: S
|
|
3163
3163
|
},
|
|
3164
3164
|
scrollIntoView: !0
|
|
3165
|
-
}),
|
|
3165
|
+
}), g.focus();
|
|
3166
3166
|
}
|
|
3167
3167
|
},
|
|
3168
|
-
goToLine: (
|
|
3169
|
-
const x =
|
|
3168
|
+
goToLine: (w, g = 0) => {
|
|
3169
|
+
const x = m.current;
|
|
3170
3170
|
if (x) {
|
|
3171
|
-
const
|
|
3171
|
+
const S = x.state.doc, v = Math.max(1, Math.min(w, S.lines)), C = S.line(v), A = Math.max(0, Math.min(g, C.length)) + C.from;
|
|
3172
3172
|
x.dispatch({
|
|
3173
3173
|
selection: {
|
|
3174
|
-
anchor:
|
|
3175
|
-
head:
|
|
3174
|
+
anchor: A,
|
|
3175
|
+
head: A
|
|
3176
3176
|
},
|
|
3177
3177
|
scrollIntoView: !0
|
|
3178
3178
|
}), x.focus();
|
|
3179
3179
|
}
|
|
3180
3180
|
},
|
|
3181
|
-
getEditorView: () =>
|
|
3182
|
-
})), /* @__PURE__ */ wt("div", { ref:
|
|
3181
|
+
getEditorView: () => m.current
|
|
3182
|
+
})), /* @__PURE__ */ wt("div", { ref: R, className: `senyao-editor ${o ? "disabled" : ""} ${i}`, style: {
|
|
3183
3183
|
height: n,
|
|
3184
3184
|
...a
|
|
3185
3185
|
} });
|
|
3186
|
-
}, or = rt(
|
|
3186
|
+
}, or = rt(Ji), Ki = ({
|
|
3187
3187
|
value: e,
|
|
3188
3188
|
onChange: t,
|
|
3189
3189
|
language: r = "json",
|
|
@@ -3193,11 +3193,11 @@ const us = [
|
|
|
3193
3193
|
...a
|
|
3194
3194
|
}, c) => {
|
|
3195
3195
|
const l = ht(() => {
|
|
3196
|
-
const
|
|
3197
|
-
return [
|
|
3196
|
+
const d = hi(r) ? fi(r) : [], f = yi(o);
|
|
3197
|
+
return [d, f, ...n];
|
|
3198
3198
|
}, [r, n, o]);
|
|
3199
3199
|
return /* @__PURE__ */ wt(or, { ref: c, value: e, onChange: t, extensions: l, showLineNumbers: i, ...a });
|
|
3200
|
-
},
|
|
3200
|
+
}, ps = rt(Ki), Qi = ({
|
|
3201
3201
|
value: e,
|
|
3202
3202
|
onChange: t,
|
|
3203
3203
|
extensions: r = [],
|
|
@@ -3206,39 +3206,39 @@ const us = [
|
|
|
3206
3206
|
showLineNumbers: i = !0,
|
|
3207
3207
|
...a
|
|
3208
3208
|
}, c) => {
|
|
3209
|
-
const l = ue(null), f = ((b) => b != null && typeof b == "object" && "value" in b)(e), y = f ? e.value : e,
|
|
3209
|
+
const l = ue(null), f = ((b) => b != null && typeof b == "object" && "value" in b)(e), y = f ? e.value : e, R = (f && "readOnlyRanges" in e ? e.readOnlyRanges : n) ?? [], [m, w] = Ft(y ?? ""), g = ue(null), [x, S] = Ft(R), v = ue(m), [C, A] = Ft(null), h = ue(!1), q = ue(/* @__PURE__ */ new Map()), $ = ue(!1);
|
|
3210
3210
|
ge(() => {
|
|
3211
|
-
if (o &&
|
|
3211
|
+
if (o && R.length > 0 && !C) {
|
|
3212
3212
|
const b = [];
|
|
3213
3213
|
let T = 0;
|
|
3214
|
-
for (let k = 0; k <
|
|
3215
|
-
const O =
|
|
3214
|
+
for (let k = 0; k < R.length; k++) {
|
|
3215
|
+
const O = R[k];
|
|
3216
3216
|
O.start > T && b.push({
|
|
3217
|
-
content:
|
|
3217
|
+
content: m.substring(T, O.start),
|
|
3218
3218
|
editable: !0
|
|
3219
3219
|
}), b.push({
|
|
3220
|
-
content:
|
|
3220
|
+
content: m.substring(O.start, O.end),
|
|
3221
3221
|
editable: !1
|
|
3222
3222
|
}), T = O.end;
|
|
3223
3223
|
}
|
|
3224
|
-
T <
|
|
3225
|
-
content:
|
|
3224
|
+
T < m.length && b.push({
|
|
3225
|
+
content: m.substring(T),
|
|
3226
3226
|
editable: !0
|
|
3227
|
-
}),
|
|
3227
|
+
}), A(b);
|
|
3228
3228
|
}
|
|
3229
|
-
}, [o,
|
|
3230
|
-
if (
|
|
3229
|
+
}, [o, R, m, C]), ge(() => {
|
|
3230
|
+
if (m) {
|
|
3231
3231
|
const b = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], T = /* @__PURE__ */ new Map();
|
|
3232
3232
|
b.forEach((k) => {
|
|
3233
|
-
const O =
|
|
3233
|
+
const O = m.indexOf(k);
|
|
3234
3234
|
O >= 0 && T.set(k, O);
|
|
3235
3235
|
}), q.current = T;
|
|
3236
3236
|
}
|
|
3237
3237
|
}, []);
|
|
3238
3238
|
const Ye = ht(() => {
|
|
3239
3239
|
const b = [zr(), Hr()];
|
|
3240
|
-
return x.length > 0 && b.push(
|
|
3241
|
-
}, [r, x]),
|
|
3240
|
+
return x.length > 0 && b.push(bi(x)), [...b, ...r];
|
|
3241
|
+
}, [r, x]), Se = se((b, T, k = 0) => {
|
|
3242
3242
|
const O = b.indexOf(T, k);
|
|
3243
3243
|
return O >= 0 ? O : null;
|
|
3244
3244
|
}, []), Te = se((b, T) => {
|
|
@@ -3248,7 +3248,7 @@ const us = [
|
|
|
3248
3248
|
for (let G = 0; G < b.length; G++) {
|
|
3249
3249
|
const oe = b[G];
|
|
3250
3250
|
if (!oe.editable) {
|
|
3251
|
-
const me =
|
|
3251
|
+
const me = Se(T, oe.content, O);
|
|
3252
3252
|
me !== null && (G > 0 && b[G - 1].editable && me > O && (k[G - 1] = {
|
|
3253
3253
|
...k[G - 1],
|
|
3254
3254
|
content: T.substring(O, me)
|
|
@@ -3260,15 +3260,15 @@ const us = [
|
|
|
3260
3260
|
...Y,
|
|
3261
3261
|
content: T.substring(O)
|
|
3262
3262
|
}), k;
|
|
3263
|
-
}, [o,
|
|
3263
|
+
}, [o, Se]), ke = se((b) => {
|
|
3264
3264
|
let T = !1;
|
|
3265
3265
|
return q.current.forEach((k, O) => {
|
|
3266
3266
|
const Y = b.indexOf(O);
|
|
3267
3267
|
Y >= 0 && Math.abs(Y - k) > 0 && (q.current.set(O, Y), Y > k && (k === 0 || k < 15) && (T = !0));
|
|
3268
3268
|
}), T;
|
|
3269
|
-
}, []),
|
|
3270
|
-
if (!
|
|
3271
|
-
const b =
|
|
3269
|
+
}, []), Ce = se(() => {
|
|
3270
|
+
if (!g.current) return;
|
|
3271
|
+
const b = g.current, T = b.state.doc.toString(), k = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], O = b.state.selection;
|
|
3272
3272
|
let Y = !1;
|
|
3273
3273
|
for (const G of k) {
|
|
3274
3274
|
const oe = T.indexOf(G);
|
|
@@ -3290,26 +3290,26 @@ const us = [
|
|
|
3290
3290
|
});
|
|
3291
3291
|
}, 10);
|
|
3292
3292
|
}, []), Z = se(() => {
|
|
3293
|
-
if (!
|
|
3294
|
-
const b =
|
|
3293
|
+
if (!g.current) return;
|
|
3294
|
+
const b = g.current;
|
|
3295
3295
|
x.length > 0 && (ye(b, []), setTimeout(() => {
|
|
3296
3296
|
b.dom && document.contains(b.dom) && (ye(b, x), setTimeout(() => {
|
|
3297
3297
|
b.dom && document.contains(b.dom) && b.dispatch({});
|
|
3298
3298
|
}, 10));
|
|
3299
3299
|
}, 10));
|
|
3300
3300
|
}, [x]), ce = se((b) => {
|
|
3301
|
-
const T = b.value, k =
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
}, 10)),
|
|
3305
|
-
const O =
|
|
3306
|
-
if (o &&
|
|
3307
|
-
const Y = Te(
|
|
3308
|
-
|
|
3301
|
+
const T = b.value, k = v.current;
|
|
3302
|
+
w(T), k !== T && (!k || T.length > (k == null ? void 0 : k.length) && !k.startsWith(T.substring(0, 5)) && T.includes(k.substring(0, 10))) && (h.current = !0, ke(T) && setTimeout(() => {
|
|
3303
|
+
Ce();
|
|
3304
|
+
}, 10)), v.current = T;
|
|
3305
|
+
const O = g.current ? Si(g.current) : x;
|
|
3306
|
+
if (o && C) {
|
|
3307
|
+
const Y = Te(C, T);
|
|
3308
|
+
A(Y);
|
|
3309
3309
|
const {
|
|
3310
3310
|
readOnlyRanges: G
|
|
3311
3311
|
} = Lr(Y);
|
|
3312
|
-
|
|
3312
|
+
S(G), g.current && ye(g.current, G), t && t({
|
|
3313
3313
|
value: T,
|
|
3314
3314
|
readOnlyRanges: G
|
|
3315
3315
|
});
|
|
@@ -3318,117 +3318,125 @@ const us = [
|
|
|
3318
3318
|
value: T,
|
|
3319
3319
|
readOnlyRanges: O
|
|
3320
3320
|
});
|
|
3321
|
-
}, [t, o,
|
|
3321
|
+
}, [t, o, C, x, Te, ke, Ce]);
|
|
3322
3322
|
ge(() => {
|
|
3323
|
-
!o && JSON.stringify(
|
|
3324
|
-
}, [
|
|
3325
|
-
if (o &&
|
|
3323
|
+
!o && JSON.stringify(R) !== JSON.stringify(x) && (S(R), g.current && ye(g.current, R));
|
|
3324
|
+
}, [R, x, o]), ge(() => {
|
|
3325
|
+
if (o && C) {
|
|
3326
3326
|
const {
|
|
3327
3327
|
readOnlyRanges: b
|
|
3328
|
-
} = Lr(
|
|
3329
|
-
JSON.stringify(b) !== JSON.stringify(x) && (
|
|
3328
|
+
} = Lr(C);
|
|
3329
|
+
JSON.stringify(b) !== JSON.stringify(x) && (S(b), g.current && ye(g.current, b));
|
|
3330
3330
|
}
|
|
3331
|
-
}, [
|
|
3332
|
-
|
|
3333
|
-
}, [
|
|
3334
|
-
|
|
3331
|
+
}, [C, x, o]), ge(() => {
|
|
3332
|
+
g.current && h.current && (h.current = !1, g.current.dispatch({}));
|
|
3333
|
+
}, [m]), ge(() => {
|
|
3334
|
+
g.current && x.length > 0 && !$.current && ($.current = !0, setTimeout(() => {
|
|
3335
3335
|
Z();
|
|
3336
3336
|
}, 50), setTimeout(() => {
|
|
3337
3337
|
Z();
|
|
3338
3338
|
}, 200));
|
|
3339
3339
|
}, [Z, x]);
|
|
3340
3340
|
const pe = se((b) => {
|
|
3341
|
-
if (
|
|
3341
|
+
if (g.current = b, x.length > 0 && (ye(b, x), setTimeout(() => {
|
|
3342
3342
|
ye(b, []), setTimeout(() => {
|
|
3343
3343
|
ye(b, x);
|
|
3344
3344
|
}, 10);
|
|
3345
|
-
}, 50)),
|
|
3345
|
+
}, 50)), m) {
|
|
3346
3346
|
const T = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], k = /* @__PURE__ */ new Map();
|
|
3347
3347
|
T.forEach((O) => {
|
|
3348
|
-
const Y =
|
|
3348
|
+
const Y = m.indexOf(O);
|
|
3349
3349
|
Y >= 0 && k.set(O, Y);
|
|
3350
3350
|
}), q.current = k;
|
|
3351
3351
|
}
|
|
3352
|
-
}, [x,
|
|
3353
|
-
return /* @__PURE__ */ wt(or, { ref: l, value:
|
|
3354
|
-
},
|
|
3352
|
+
}, [x, m]);
|
|
3353
|
+
return /* @__PURE__ */ wt(or, { ref: l, value: m, onChange: ce, extensions: Ye, showLineNumbers: i, onEditorViewCreated: pe, ...a });
|
|
3354
|
+
}, ms = rt(Qi), Xi = (e, t) => {
|
|
3355
3355
|
const {
|
|
3356
3356
|
value: r,
|
|
3357
3357
|
onChange: n,
|
|
3358
3358
|
extensions: o = [],
|
|
3359
3359
|
showLineNumbers: i = !0,
|
|
3360
3360
|
enableFormatting: a = !1,
|
|
3361
|
-
|
|
3362
|
-
|
|
3361
|
+
enableCodeFolding: c = !0,
|
|
3362
|
+
...l
|
|
3363
|
+
} = e, d = ue(!0), f = ue(null), y = se((v) => {
|
|
3363
3364
|
try {
|
|
3364
|
-
return
|
|
3365
|
+
return v === "" || JSON.parse(v), !0;
|
|
3365
3366
|
} catch {
|
|
3366
3367
|
return !1;
|
|
3367
3368
|
}
|
|
3368
|
-
}, []),
|
|
3369
|
+
}, []), R = se((v) => {
|
|
3369
3370
|
try {
|
|
3370
|
-
if (!
|
|
3371
|
-
const
|
|
3372
|
-
return JSON.stringify(
|
|
3371
|
+
if (!v.trim()) return "";
|
|
3372
|
+
const C = JSON.parse(v);
|
|
3373
|
+
return JSON.stringify(C, null, 2);
|
|
3373
3374
|
} catch {
|
|
3374
|
-
return
|
|
3375
|
+
return v;
|
|
3375
3376
|
}
|
|
3376
|
-
}, []),
|
|
3377
|
-
if (!
|
|
3378
|
-
const
|
|
3379
|
-
if (
|
|
3380
|
-
const
|
|
3377
|
+
}, []), m = se(() => {
|
|
3378
|
+
if (!f.current) return !1;
|
|
3379
|
+
const v = f.current, C = v.state.doc.toString(), A = R(C);
|
|
3380
|
+
if (A === C) return !1;
|
|
3381
|
+
const h = v.state.update({
|
|
3381
3382
|
changes: {
|
|
3382
3383
|
from: 0,
|
|
3383
|
-
to:
|
|
3384
|
-
insert:
|
|
3384
|
+
to: v.state.doc.length,
|
|
3385
|
+
insert: A
|
|
3385
3386
|
}
|
|
3386
3387
|
});
|
|
3387
|
-
return
|
|
3388
|
-
}, [
|
|
3388
|
+
return v.dispatch(h), !0;
|
|
3389
|
+
}, [R]), w = ht(() => Ee.of([{
|
|
3389
3390
|
key: "Alt-f",
|
|
3390
3391
|
mac: "Mod-Alt-f",
|
|
3391
|
-
run: () =>
|
|
3392
|
-
}]), [
|
|
3392
|
+
run: () => m()
|
|
3393
|
+
}]), [m]), g = se((v) => {
|
|
3393
3394
|
if (n) {
|
|
3394
|
-
const
|
|
3395
|
-
|
|
3396
|
-
}
|
|
3397
|
-
}, [n,
|
|
3398
|
-
|
|
3399
|
-
|
|
3395
|
+
const C = y(v.value);
|
|
3396
|
+
d.current = C, n(v);
|
|
3397
|
+
}
|
|
3398
|
+
}, [n, y]), x = ht(() => {
|
|
3399
|
+
const v = [Ur(), to(), Xn(), Qr.highest(w), ...o];
|
|
3400
|
+
return c && v.push(ro(), no({
|
|
3401
|
+
// 自定义折叠按钮样式(可选)
|
|
3402
|
+
openText: "▼",
|
|
3403
|
+
closedText: "▶"
|
|
3404
|
+
}), Ee.of(oo)), v;
|
|
3405
|
+
}, [w, o, c]), S = se((v) => {
|
|
3406
|
+
f.current = v, a && r && setTimeout(() => {
|
|
3407
|
+
m();
|
|
3400
3408
|
}, 0);
|
|
3401
|
-
}, [a, r,
|
|
3402
|
-
return /* @__PURE__ */ wt(or, { ref: t, value: r, showLineNumbers: i, onChange:
|
|
3403
|
-
},
|
|
3409
|
+
}, [a, r, m]);
|
|
3410
|
+
return /* @__PURE__ */ wt(or, { ref: t, value: r, showLineNumbers: i, onChange: g, extensions: x, onEditorViewCreated: S, ...l });
|
|
3411
|
+
}, gs = rt(Xi);
|
|
3404
3412
|
export {
|
|
3405
|
-
|
|
3413
|
+
ps as Editor,
|
|
3406
3414
|
or as GenericEditor,
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3415
|
+
gs as JSONEditor,
|
|
3416
|
+
ms as SQLEditor,
|
|
3417
|
+
Hi as applyChinese,
|
|
3410
3418
|
Lr as blocksToEditorData,
|
|
3411
|
-
|
|
3419
|
+
Gi as chineseLanguageExtension,
|
|
3412
3420
|
wn as closeSearchPanel,
|
|
3413
|
-
|
|
3414
|
-
|
|
3421
|
+
us as commonExtensions,
|
|
3422
|
+
di as createAutocompletionExtension,
|
|
3415
3423
|
Yr as createEnglishSearchExtension,
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3424
|
+
hs as createHighlightOnlyExtension,
|
|
3425
|
+
pi as createKeymapExtension,
|
|
3426
|
+
ls as createLintExtension,
|
|
3419
3427
|
qr as createSearchExtension,
|
|
3420
|
-
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3428
|
+
ds as customSearchKeymap,
|
|
3429
|
+
vi as darkTheme,
|
|
3430
|
+
Si as getCurrentReadOnlyRanges,
|
|
3431
|
+
fi as getLanguageExtension,
|
|
3432
|
+
yi as getThemeExtension,
|
|
3425
3433
|
er as highlightSelectionMatches,
|
|
3426
|
-
|
|
3434
|
+
hi as isSupportedLanguage,
|
|
3427
3435
|
Fr as lightTheme,
|
|
3428
3436
|
Rn as openSearchPanel,
|
|
3429
|
-
|
|
3437
|
+
bi as readOnlyRanges,
|
|
3430
3438
|
bn as search,
|
|
3431
3439
|
_n as searchKeymap,
|
|
3432
|
-
|
|
3440
|
+
fs as searchTranslationsZhCN,
|
|
3433
3441
|
ye as updateReadOnlyRanges
|
|
3434
3442
|
};
|