@senyao-design-system/editor 0.0.3 → 0.0.4
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/README.md +251 -172
- package/dist/assets/style.css +1 -1
- package/dist/components/Editor.d.ts +4 -8
- package/dist/components/GenericEditor.d.ts +4 -3
- package/dist/components/JSONEditor.d.ts +4 -6
- package/dist/components/SQLEditor.d.ts +3 -7
- package/dist/extensions/index.d.ts +1 -0
- package/dist/extensions/search.d.ts +38 -0
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n/search-zh-cn-v2.d.ts +13 -0
- package/dist/i18n/search-zh-cn.d.ts +44 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +16 -16
- package/dist/index.mjs +2388 -1344
- package/dist/types.d.ts +90 -0
- package/package.json +45 -43
- package/dist/types/index.d.ts +0 -115
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { sql as
|
|
4
|
-
import { json as
|
|
5
|
-
import { keymap as
|
|
6
|
-
import { indentWithTab as
|
|
7
|
-
import { autocompletion as
|
|
8
|
-
import { lintGutter as
|
|
9
|
-
import { HighlightStyle as
|
|
1
|
+
import * as ve from "react";
|
|
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
|
+
import { sql as zr } from "@codemirror/lang-sql";
|
|
4
|
+
import { json as Ur } from "@codemirror/lang-json";
|
|
5
|
+
import { keymap as we, 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
|
+
import { indentWithTab as Dt, insertNewlineAndIndent as Er } from "@codemirror/commands";
|
|
7
|
+
import { autocompletion as Hr, closeBrackets as Xn } from "@codemirror/autocomplete";
|
|
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";
|
|
10
10
|
import { tags as W } from "@lezer/highlight";
|
|
11
|
-
import { StateEffect as
|
|
12
|
-
var
|
|
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 ro, fromCodePoint as no, codePointSize as oo, RangeSetBuilder as io, CharCategory as ae, findClusterBreak as Zr } from "@codemirror/state";
|
|
12
|
+
var Wt = { exports: {} }, He = {};
|
|
13
13
|
/**
|
|
14
14
|
* @license React
|
|
15
15
|
* react-jsx-runtime.production.min.js
|
|
@@ -19,21 +19,21 @@ var hr = { exports: {} }, ke = {};
|
|
|
19
19
|
* This source code is licensed under the MIT license found in the
|
|
20
20
|
* LICENSE file in the root directory of this source tree.
|
|
21
21
|
*/
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
var e =
|
|
27
|
-
function
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
for (
|
|
31
|
-
if (
|
|
32
|
-
return { $$typeof:
|
|
33
|
-
}
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
var
|
|
22
|
+
var Cr;
|
|
23
|
+
function so() {
|
|
24
|
+
if (Cr) return He;
|
|
25
|
+
Cr = 1;
|
|
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, h) {
|
|
28
|
+
var f, y = {}, C = null, v = null;
|
|
29
|
+
h !== void 0 && (C = "" + h), l.key !== void 0 && (C = "" + l.key), l.ref !== void 0 && (v = l.ref);
|
|
30
|
+
for (f in l) n.call(l, f) && !i.hasOwnProperty(f) && (y[f] = l[f]);
|
|
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: C, ref: v, props: y, _owner: o.current };
|
|
33
|
+
}
|
|
34
|
+
return He.Fragment = r, He.jsx = a, He.jsxs = a, He;
|
|
35
|
+
}
|
|
36
|
+
var Je = {};
|
|
37
37
|
/**
|
|
38
38
|
* @license React
|
|
39
39
|
* react-jsx-runtime.development.js
|
|
@@ -43,91 +43,91 @@ var $e = {};
|
|
|
43
43
|
* This source code is licensed under the MIT license found in the
|
|
44
44
|
* LICENSE file in the root directory of this source tree.
|
|
45
45
|
*/
|
|
46
|
-
var
|
|
47
|
-
function
|
|
48
|
-
return
|
|
49
|
-
var e =
|
|
50
|
-
function
|
|
51
|
-
if (
|
|
46
|
+
var Rr;
|
|
47
|
+
function ao() {
|
|
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"), h = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), v = Symbol.for("react.offscreen"), R = Symbol.iterator, m = "@@iterator";
|
|
50
|
+
function x(s) {
|
|
51
|
+
if (s === null || typeof s != "object")
|
|
52
52
|
return null;
|
|
53
|
-
var
|
|
54
|
-
return typeof
|
|
53
|
+
var u = R && s[R] || s[m];
|
|
54
|
+
return typeof u == "function" ? u : null;
|
|
55
55
|
}
|
|
56
|
-
var
|
|
57
|
-
function
|
|
56
|
+
var g = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
57
|
+
function S(s) {
|
|
58
58
|
{
|
|
59
|
-
for (var
|
|
60
|
-
|
|
61
|
-
_("error",
|
|
59
|
+
for (var u = arguments.length, p = new Array(u > 1 ? u - 1 : 0), w = 1; w < u; w++)
|
|
60
|
+
p[w - 1] = arguments[w];
|
|
61
|
+
_("error", s, p);
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
function _(
|
|
64
|
+
function _(s, u, p) {
|
|
65
65
|
{
|
|
66
|
-
var
|
|
67
|
-
|
|
68
|
-
var
|
|
69
|
-
return String(
|
|
66
|
+
var w = g.ReactDebugCurrentFrame, N = w.getStackAddendum();
|
|
67
|
+
N !== "" && (u += "%s", p = p.concat([N]));
|
|
68
|
+
var j = p.map(function(P) {
|
|
69
|
+
return String(P);
|
|
70
70
|
});
|
|
71
|
-
|
|
71
|
+
j.unshift("Warning: " + u), Function.prototype.apply.call(console[s], console, j);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
var
|
|
75
|
-
|
|
76
|
-
function
|
|
77
|
-
return !!(typeof
|
|
74
|
+
var $ = !1, d = !1, q = !1, A = !1, Ye = !1, Ee;
|
|
75
|
+
Ee = Symbol.for("react.module.reference");
|
|
76
|
+
function Te(s) {
|
|
77
|
+
return !!(typeof s == "string" || typeof s == "function" || s === n || s === i || Ye || s === o || s === h || s === f || A || s === v || $ || d || q || typeof s == "object" && s !== null && (s.$$typeof === C || 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
|
-
|
|
81
|
+
s.$$typeof === Ee || s.getModuleId !== void 0));
|
|
82
82
|
}
|
|
83
|
-
function
|
|
84
|
-
var
|
|
85
|
-
if (
|
|
86
|
-
return
|
|
87
|
-
var
|
|
88
|
-
return
|
|
83
|
+
function ke(s, u, p) {
|
|
84
|
+
var w = s.displayName;
|
|
85
|
+
if (w)
|
|
86
|
+
return w;
|
|
87
|
+
var N = u.displayName || u.name || "";
|
|
88
|
+
return N !== "" ? p + "(" + N + ")" : p;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
91
|
-
return
|
|
90
|
+
function Se(s) {
|
|
91
|
+
return s.displayName || "Context";
|
|
92
92
|
}
|
|
93
|
-
function
|
|
94
|
-
if (
|
|
93
|
+
function Z(s) {
|
|
94
|
+
if (s == null)
|
|
95
95
|
return null;
|
|
96
|
-
if (typeof
|
|
97
|
-
return
|
|
98
|
-
if (typeof
|
|
99
|
-
return
|
|
100
|
-
switch (
|
|
101
|
-
case o:
|
|
102
|
-
return "Fragment";
|
|
96
|
+
if (typeof s.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
|
|
97
|
+
return s.displayName || s.name || null;
|
|
98
|
+
if (typeof s == "string")
|
|
99
|
+
return s;
|
|
100
|
+
switch (s) {
|
|
103
101
|
case n:
|
|
102
|
+
return "Fragment";
|
|
103
|
+
case r:
|
|
104
104
|
return "Portal";
|
|
105
105
|
case i:
|
|
106
106
|
return "Profiler";
|
|
107
|
-
case
|
|
107
|
+
case o:
|
|
108
108
|
return "StrictMode";
|
|
109
|
-
case
|
|
109
|
+
case h:
|
|
110
110
|
return "Suspense";
|
|
111
|
-
case
|
|
111
|
+
case f:
|
|
112
112
|
return "SuspenseList";
|
|
113
113
|
}
|
|
114
|
-
if (typeof
|
|
115
|
-
switch (
|
|
116
|
-
case
|
|
117
|
-
var
|
|
118
|
-
return
|
|
119
|
-
case
|
|
120
|
-
var
|
|
121
|
-
return
|
|
122
|
-
case
|
|
123
|
-
return
|
|
124
|
-
case
|
|
125
|
-
var
|
|
126
|
-
return
|
|
127
|
-
case
|
|
128
|
-
var
|
|
114
|
+
if (typeof s == "object")
|
|
115
|
+
switch (s.$$typeof) {
|
|
116
|
+
case c:
|
|
117
|
+
var u = s;
|
|
118
|
+
return Se(u) + ".Consumer";
|
|
119
|
+
case a:
|
|
120
|
+
var p = s;
|
|
121
|
+
return Se(p._context) + ".Provider";
|
|
122
|
+
case l:
|
|
123
|
+
return ke(s, s.render, "ForwardRef");
|
|
124
|
+
case y:
|
|
125
|
+
var w = s.displayName || null;
|
|
126
|
+
return w !== null ? w : Z(s.type) || "Memo";
|
|
127
|
+
case C: {
|
|
128
|
+
var N = s, j = N._payload, P = N._init;
|
|
129
129
|
try {
|
|
130
|
-
return
|
|
130
|
+
return Z(P(j));
|
|
131
131
|
} catch {
|
|
132
132
|
return null;
|
|
133
133
|
}
|
|
@@ -135,606 +135,606 @@ function Ht() {
|
|
|
135
135
|
}
|
|
136
136
|
return null;
|
|
137
137
|
}
|
|
138
|
-
var
|
|
139
|
-
function
|
|
138
|
+
var ce = Object.assign, pe = 0, b, T, k, O, Y, G, oe;
|
|
139
|
+
function me() {
|
|
140
140
|
}
|
|
141
|
-
|
|
142
|
-
function
|
|
141
|
+
me.__reactDisabledLog = !0;
|
|
142
|
+
function _t() {
|
|
143
143
|
{
|
|
144
|
-
if (
|
|
145
|
-
|
|
146
|
-
var
|
|
144
|
+
if (pe === 0) {
|
|
145
|
+
b = console.log, T = console.info, k = console.warn, O = console.error, Y = console.group, G = console.groupCollapsed, oe = console.groupEnd;
|
|
146
|
+
var s = {
|
|
147
147
|
configurable: !0,
|
|
148
148
|
enumerable: !0,
|
|
149
|
-
value:
|
|
149
|
+
value: me,
|
|
150
150
|
writable: !0
|
|
151
151
|
};
|
|
152
152
|
Object.defineProperties(console, {
|
|
153
|
-
info:
|
|
154
|
-
log:
|
|
155
|
-
warn:
|
|
156
|
-
error:
|
|
157
|
-
group:
|
|
158
|
-
groupCollapsed:
|
|
159
|
-
groupEnd:
|
|
153
|
+
info: s,
|
|
154
|
+
log: s,
|
|
155
|
+
warn: s,
|
|
156
|
+
error: s,
|
|
157
|
+
group: s,
|
|
158
|
+
groupCollapsed: s,
|
|
159
|
+
groupEnd: s
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
|
-
|
|
162
|
+
pe++;
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function Tt() {
|
|
166
166
|
{
|
|
167
|
-
if (
|
|
168
|
-
var
|
|
167
|
+
if (pe--, pe === 0) {
|
|
168
|
+
var s = {
|
|
169
169
|
configurable: !0,
|
|
170
170
|
enumerable: !0,
|
|
171
171
|
writable: !0
|
|
172
172
|
};
|
|
173
173
|
Object.defineProperties(console, {
|
|
174
|
-
log:
|
|
175
|
-
value:
|
|
174
|
+
log: ce({}, s, {
|
|
175
|
+
value: b
|
|
176
176
|
}),
|
|
177
|
-
info:
|
|
178
|
-
value:
|
|
177
|
+
info: ce({}, s, {
|
|
178
|
+
value: T
|
|
179
179
|
}),
|
|
180
|
-
warn:
|
|
181
|
-
value:
|
|
180
|
+
warn: ce({}, s, {
|
|
181
|
+
value: k
|
|
182
182
|
}),
|
|
183
|
-
error:
|
|
184
|
-
value:
|
|
183
|
+
error: ce({}, s, {
|
|
184
|
+
value: O
|
|
185
185
|
}),
|
|
186
|
-
group:
|
|
187
|
-
value:
|
|
186
|
+
group: ce({}, s, {
|
|
187
|
+
value: Y
|
|
188
188
|
}),
|
|
189
|
-
groupCollapsed:
|
|
190
|
-
value:
|
|
189
|
+
groupCollapsed: ce({}, s, {
|
|
190
|
+
value: G
|
|
191
191
|
}),
|
|
192
|
-
groupEnd:
|
|
193
|
-
value:
|
|
192
|
+
groupEnd: ce({}, s, {
|
|
193
|
+
value: oe
|
|
194
194
|
})
|
|
195
195
|
});
|
|
196
196
|
}
|
|
197
|
-
|
|
197
|
+
pe < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
var
|
|
201
|
-
function
|
|
200
|
+
var Ve = g.ReactCurrentDispatcher, ze;
|
|
201
|
+
function Me(s, u, p) {
|
|
202
202
|
{
|
|
203
|
-
if (
|
|
203
|
+
if (ze === void 0)
|
|
204
204
|
try {
|
|
205
205
|
throw Error();
|
|
206
|
-
} catch (
|
|
207
|
-
var
|
|
208
|
-
|
|
206
|
+
} catch (N) {
|
|
207
|
+
var w = N.stack.trim().match(/\n( *(at )?)/);
|
|
208
|
+
ze = w && w[1] || "";
|
|
209
209
|
}
|
|
210
210
|
return `
|
|
211
|
-
` +
|
|
211
|
+
` + ze + s;
|
|
212
212
|
}
|
|
213
213
|
}
|
|
214
|
-
var
|
|
214
|
+
var Ue = !1, Pe;
|
|
215
215
|
{
|
|
216
|
-
var
|
|
217
|
-
|
|
216
|
+
var kt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
217
|
+
Pe = new kt();
|
|
218
218
|
}
|
|
219
|
-
function
|
|
220
|
-
if (!
|
|
219
|
+
function E(s, u) {
|
|
220
|
+
if (!s || Ue)
|
|
221
221
|
return "";
|
|
222
222
|
{
|
|
223
|
-
var
|
|
224
|
-
if (
|
|
225
|
-
return
|
|
223
|
+
var p = Pe.get(s);
|
|
224
|
+
if (p !== void 0)
|
|
225
|
+
return p;
|
|
226
226
|
}
|
|
227
|
-
var
|
|
228
|
-
|
|
229
|
-
var
|
|
227
|
+
var w;
|
|
228
|
+
Ue = !0;
|
|
229
|
+
var N = Error.prepareStackTrace;
|
|
230
230
|
Error.prepareStackTrace = void 0;
|
|
231
|
-
var
|
|
232
|
-
|
|
231
|
+
var j;
|
|
232
|
+
j = Ve.current, Ve.current = null, _t();
|
|
233
233
|
try {
|
|
234
|
-
if (
|
|
235
|
-
var
|
|
234
|
+
if (u) {
|
|
235
|
+
var P = function() {
|
|
236
236
|
throw Error();
|
|
237
237
|
};
|
|
238
|
-
if (Object.defineProperty(
|
|
238
|
+
if (Object.defineProperty(P.prototype, "props", {
|
|
239
239
|
set: function() {
|
|
240
240
|
throw Error();
|
|
241
241
|
}
|
|
242
242
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
243
243
|
try {
|
|
244
|
-
Reflect.construct(
|
|
245
|
-
} catch (
|
|
246
|
-
|
|
244
|
+
Reflect.construct(P, []);
|
|
245
|
+
} catch (ee) {
|
|
246
|
+
w = ee;
|
|
247
247
|
}
|
|
248
|
-
Reflect.construct(
|
|
248
|
+
Reflect.construct(s, [], P);
|
|
249
249
|
} else {
|
|
250
250
|
try {
|
|
251
|
-
|
|
252
|
-
} catch (
|
|
253
|
-
|
|
251
|
+
P.call();
|
|
252
|
+
} catch (ee) {
|
|
253
|
+
w = ee;
|
|
254
254
|
}
|
|
255
|
-
|
|
255
|
+
s.call(P.prototype);
|
|
256
256
|
}
|
|
257
257
|
} else {
|
|
258
258
|
try {
|
|
259
259
|
throw Error();
|
|
260
|
-
} catch (
|
|
261
|
-
|
|
260
|
+
} catch (ee) {
|
|
261
|
+
w = ee;
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
s();
|
|
264
264
|
}
|
|
265
|
-
} catch (
|
|
266
|
-
if (
|
|
267
|
-
for (var
|
|
268
|
-
`),
|
|
269
|
-
`), z =
|
|
270
|
-
|
|
271
|
-
for (; z >= 1 &&
|
|
272
|
-
if (
|
|
273
|
-
if (z !== 1 ||
|
|
265
|
+
} catch (ee) {
|
|
266
|
+
if (ee && w && typeof ee.stack == "string") {
|
|
267
|
+
for (var M = ee.stack.split(`
|
|
268
|
+
`), X = w.stack.split(`
|
|
269
|
+
`), z = M.length - 1, U = X.length - 1; z >= 1 && U >= 0 && M[z] !== X[U]; )
|
|
270
|
+
U--;
|
|
271
|
+
for (; z >= 1 && U >= 0; z--, U--)
|
|
272
|
+
if (M[z] !== X[U]) {
|
|
273
|
+
if (z !== 1 || U !== 1)
|
|
274
274
|
do
|
|
275
|
-
if (z--,
|
|
276
|
-
var
|
|
277
|
-
` +
|
|
278
|
-
return
|
|
275
|
+
if (z--, U--, U < 0 || M[z] !== X[U]) {
|
|
276
|
+
var ie = `
|
|
277
|
+
` + M[z].replace(" at new ", " at ");
|
|
278
|
+
return s.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", s.displayName)), typeof s == "function" && Pe.set(s, ie), ie;
|
|
279
279
|
}
|
|
280
|
-
while (z >= 1 &&
|
|
280
|
+
while (z >= 1 && U >= 0);
|
|
281
281
|
break;
|
|
282
282
|
}
|
|
283
283
|
}
|
|
284
284
|
} finally {
|
|
285
|
-
|
|
285
|
+
Ue = !1, Ve.current = j, Tt(), Error.prepareStackTrace = N;
|
|
286
286
|
}
|
|
287
|
-
var
|
|
288
|
-
return typeof
|
|
287
|
+
var $e = s ? s.displayName || s.name : "", Re = $e ? Me($e) : "";
|
|
288
|
+
return typeof s == "function" && Pe.set(s, Re), Re;
|
|
289
289
|
}
|
|
290
|
-
function
|
|
291
|
-
return
|
|
290
|
+
function Be(s, u, p) {
|
|
291
|
+
return E(s, !1);
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
var
|
|
295
|
-
return !!(
|
|
293
|
+
function Oe(s) {
|
|
294
|
+
var u = s.prototype;
|
|
295
|
+
return !!(u && u.isReactComponent);
|
|
296
296
|
}
|
|
297
|
-
function
|
|
298
|
-
if (
|
|
297
|
+
function Ce(s, u, p) {
|
|
298
|
+
if (s == null)
|
|
299
299
|
return "";
|
|
300
|
-
if (typeof
|
|
301
|
-
return
|
|
302
|
-
if (typeof
|
|
303
|
-
return
|
|
304
|
-
switch (
|
|
305
|
-
case
|
|
306
|
-
return
|
|
307
|
-
case
|
|
308
|
-
return
|
|
300
|
+
if (typeof s == "function")
|
|
301
|
+
return E(s, Oe(s));
|
|
302
|
+
if (typeof s == "string")
|
|
303
|
+
return Me(s);
|
|
304
|
+
switch (s) {
|
|
305
|
+
case h:
|
|
306
|
+
return Me("Suspense");
|
|
307
|
+
case f:
|
|
308
|
+
return Me("SuspenseList");
|
|
309
309
|
}
|
|
310
|
-
if (typeof
|
|
311
|
-
switch (
|
|
312
|
-
case
|
|
313
|
-
return
|
|
314
|
-
case
|
|
315
|
-
return
|
|
316
|
-
case
|
|
317
|
-
var
|
|
310
|
+
if (typeof s == "object")
|
|
311
|
+
switch (s.$$typeof) {
|
|
312
|
+
case l:
|
|
313
|
+
return Be(s.render);
|
|
314
|
+
case y:
|
|
315
|
+
return Ce(s.type, u, p);
|
|
316
|
+
case C: {
|
|
317
|
+
var w = s, N = w._payload, j = w._init;
|
|
318
318
|
try {
|
|
319
|
-
return
|
|
319
|
+
return Ce(j(N), u, p);
|
|
320
320
|
} catch {
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
323
|
}
|
|
324
324
|
return "";
|
|
325
325
|
}
|
|
326
|
-
var
|
|
327
|
-
function
|
|
328
|
-
if (
|
|
329
|
-
var
|
|
330
|
-
|
|
326
|
+
var Ge = Object.prototype.hasOwnProperty, ir = {}, sr = g.ReactDebugCurrentFrame;
|
|
327
|
+
function it(s) {
|
|
328
|
+
if (s) {
|
|
329
|
+
var u = s._owner, p = Ce(s.type, s._source, u ? u.type : null);
|
|
330
|
+
sr.setExtraStackFrame(p);
|
|
331
331
|
} else
|
|
332
|
-
|
|
332
|
+
sr.setExtraStackFrame(null);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function Tn(s, u, p, w, N) {
|
|
335
335
|
{
|
|
336
|
-
var
|
|
337
|
-
for (var
|
|
338
|
-
if (
|
|
339
|
-
var
|
|
336
|
+
var j = Function.call.bind(Ge);
|
|
337
|
+
for (var P in s)
|
|
338
|
+
if (j(s, P)) {
|
|
339
|
+
var M = void 0;
|
|
340
340
|
try {
|
|
341
|
-
if (typeof
|
|
342
|
-
var
|
|
343
|
-
throw
|
|
341
|
+
if (typeof s[P] != "function") {
|
|
342
|
+
var X = Error((w || "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
|
+
throw X.name = "Invariant Violation", X;
|
|
344
344
|
}
|
|
345
|
-
|
|
345
|
+
M = s[P](u, P, w, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
346
346
|
} catch (z) {
|
|
347
|
-
|
|
347
|
+
M = z;
|
|
348
348
|
}
|
|
349
|
-
|
|
349
|
+
M && !(M instanceof Error) && (it(N), S("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", p, P, typeof M), it(null)), M instanceof Error && !(M.message in ir) && (ir[M.message] = !0, it(N), S("Failed %s type: %s", p, M.message), it(null));
|
|
350
350
|
}
|
|
351
351
|
}
|
|
352
352
|
}
|
|
353
|
-
var
|
|
354
|
-
function
|
|
355
|
-
return
|
|
353
|
+
var kn = Array.isArray;
|
|
354
|
+
function Mt(s) {
|
|
355
|
+
return kn(s);
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function Mn(s) {
|
|
358
358
|
{
|
|
359
|
-
var
|
|
360
|
-
return
|
|
359
|
+
var u = typeof Symbol == "function" && Symbol.toStringTag, p = u && s[Symbol.toStringTag] || s.constructor.name || "Object";
|
|
360
|
+
return p;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
-
function
|
|
363
|
+
function Pn(s) {
|
|
364
364
|
try {
|
|
365
|
-
return
|
|
365
|
+
return ar(s), !1;
|
|
366
366
|
} catch {
|
|
367
367
|
return !0;
|
|
368
368
|
}
|
|
369
369
|
}
|
|
370
|
-
function
|
|
371
|
-
return "" +
|
|
370
|
+
function ar(s) {
|
|
371
|
+
return "" + s;
|
|
372
372
|
}
|
|
373
|
-
function
|
|
374
|
-
if (
|
|
375
|
-
return
|
|
373
|
+
function cr(s) {
|
|
374
|
+
if (Pn(s))
|
|
375
|
+
return S("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
|
|
377
|
+
var lr = g.ReactCurrentOwner, On = {
|
|
378
378
|
key: !0,
|
|
379
379
|
ref: !0,
|
|
380
380
|
__self: !0,
|
|
381
381
|
__source: !0
|
|
382
|
-
},
|
|
383
|
-
function
|
|
384
|
-
if (
|
|
385
|
-
var
|
|
386
|
-
if (
|
|
382
|
+
}, ur, fr;
|
|
383
|
+
function An(s) {
|
|
384
|
+
if (Ge.call(s, "ref")) {
|
|
385
|
+
var u = Object.getOwnPropertyDescriptor(s, "ref").get;
|
|
386
|
+
if (u && u.isReactWarning)
|
|
387
387
|
return !1;
|
|
388
388
|
}
|
|
389
|
-
return
|
|
389
|
+
return s.ref !== void 0;
|
|
390
390
|
}
|
|
391
|
-
function
|
|
392
|
-
if (
|
|
393
|
-
var
|
|
394
|
-
if (
|
|
391
|
+
function $n(s) {
|
|
392
|
+
if (Ge.call(s, "key")) {
|
|
393
|
+
var u = Object.getOwnPropertyDescriptor(s, "key").get;
|
|
394
|
+
if (u && u.isReactWarning)
|
|
395
395
|
return !1;
|
|
396
396
|
}
|
|
397
|
-
return
|
|
397
|
+
return s.key !== void 0;
|
|
398
398
|
}
|
|
399
|
-
function
|
|
400
|
-
typeof
|
|
399
|
+
function Fn(s, u) {
|
|
400
|
+
typeof s.ref == "string" && lr.current;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
402
|
+
function Ln(s, u) {
|
|
403
403
|
{
|
|
404
|
-
var
|
|
405
|
-
|
|
404
|
+
var p = function() {
|
|
405
|
+
ur || (ur = !0, S("%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
|
-
|
|
408
|
-
get:
|
|
407
|
+
p.isReactWarning = !0, Object.defineProperty(s, "key", {
|
|
408
|
+
get: p,
|
|
409
409
|
configurable: !0
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
|
-
function
|
|
413
|
+
function Nn(s, u) {
|
|
414
414
|
{
|
|
415
|
-
var
|
|
416
|
-
|
|
415
|
+
var p = function() {
|
|
416
|
+
fr || (fr = !0, S("%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
|
-
|
|
419
|
-
get:
|
|
418
|
+
p.isReactWarning = !0, Object.defineProperty(s, "ref", {
|
|
419
|
+
get: p,
|
|
420
420
|
configurable: !0
|
|
421
421
|
});
|
|
422
422
|
}
|
|
423
423
|
}
|
|
424
|
-
var
|
|
425
|
-
var
|
|
424
|
+
var In = function(s, u, p, w, N, j, P) {
|
|
425
|
+
var M = {
|
|
426
426
|
// This tag allows us to uniquely identify this as a React Element
|
|
427
|
-
$$typeof:
|
|
427
|
+
$$typeof: t,
|
|
428
428
|
// Built-in properties that belong on the element
|
|
429
|
-
type:
|
|
430
|
-
key:
|
|
431
|
-
ref:
|
|
432
|
-
props:
|
|
429
|
+
type: s,
|
|
430
|
+
key: u,
|
|
431
|
+
ref: p,
|
|
432
|
+
props: P,
|
|
433
433
|
// Record the component responsible for creating this element.
|
|
434
|
-
_owner:
|
|
434
|
+
_owner: j
|
|
435
435
|
};
|
|
436
|
-
return
|
|
436
|
+
return M._store = {}, Object.defineProperty(M._store, "validated", {
|
|
437
437
|
configurable: !1,
|
|
438
438
|
enumerable: !1,
|
|
439
439
|
writable: !0,
|
|
440
440
|
value: !1
|
|
441
|
-
}), Object.defineProperty(
|
|
441
|
+
}), Object.defineProperty(M, "_self", {
|
|
442
442
|
configurable: !1,
|
|
443
443
|
enumerable: !1,
|
|
444
444
|
writable: !1,
|
|
445
|
-
value:
|
|
446
|
-
}), Object.defineProperty(
|
|
445
|
+
value: w
|
|
446
|
+
}), Object.defineProperty(M, "_source", {
|
|
447
447
|
configurable: !1,
|
|
448
448
|
enumerable: !1,
|
|
449
449
|
writable: !1,
|
|
450
|
-
value:
|
|
451
|
-
}), Object.freeze && (Object.freeze(
|
|
450
|
+
value: N
|
|
451
|
+
}), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
|
|
452
452
|
};
|
|
453
|
-
function
|
|
453
|
+
function Dn(s, u, p, w, N) {
|
|
454
454
|
{
|
|
455
|
-
var
|
|
456
|
-
|
|
457
|
-
for (
|
|
458
|
-
|
|
459
|
-
if (
|
|
460
|
-
var z =
|
|
461
|
-
for (
|
|
462
|
-
|
|
455
|
+
var j, P = {}, M = null, X = null;
|
|
456
|
+
p !== void 0 && (cr(p), M = "" + p), $n(u) && (cr(u.key), M = "" + u.key), An(u) && (X = u.ref, Fn(u, N));
|
|
457
|
+
for (j in u)
|
|
458
|
+
Ge.call(u, j) && !On.hasOwnProperty(j) && (P[j] = u[j]);
|
|
459
|
+
if (s && s.defaultProps) {
|
|
460
|
+
var z = s.defaultProps;
|
|
461
|
+
for (j in z)
|
|
462
|
+
P[j] === void 0 && (P[j] = z[j]);
|
|
463
463
|
}
|
|
464
|
-
if (
|
|
465
|
-
var
|
|
466
|
-
|
|
464
|
+
if (M || X) {
|
|
465
|
+
var U = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
|
|
466
|
+
M && Ln(P, U), X && Nn(P, U);
|
|
467
467
|
}
|
|
468
|
-
return
|
|
468
|
+
return In(s, M, X, N, w, lr.current, P);
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
var
|
|
472
|
-
function
|
|
473
|
-
if (
|
|
474
|
-
var
|
|
475
|
-
|
|
471
|
+
var Pt = g.ReactCurrentOwner, hr = g.ReactDebugCurrentFrame;
|
|
472
|
+
function Ae(s) {
|
|
473
|
+
if (s) {
|
|
474
|
+
var u = s._owner, p = Ce(s.type, s._source, u ? u.type : null);
|
|
475
|
+
hr.setExtraStackFrame(p);
|
|
476
476
|
} else
|
|
477
|
-
|
|
477
|
+
hr.setExtraStackFrame(null);
|
|
478
478
|
}
|
|
479
|
-
var
|
|
480
|
-
|
|
481
|
-
function
|
|
482
|
-
return typeof
|
|
479
|
+
var Ot;
|
|
480
|
+
Ot = !1;
|
|
481
|
+
function At(s) {
|
|
482
|
+
return typeof s == "object" && s !== null && s.$$typeof === t;
|
|
483
483
|
}
|
|
484
|
-
function
|
|
484
|
+
function dr() {
|
|
485
485
|
{
|
|
486
|
-
if (
|
|
487
|
-
var
|
|
488
|
-
if (
|
|
486
|
+
if (Pt.current) {
|
|
487
|
+
var s = Z(Pt.current.type);
|
|
488
|
+
if (s)
|
|
489
489
|
return `
|
|
490
490
|
|
|
491
|
-
Check the render method of \`` +
|
|
491
|
+
Check the render method of \`` + s + "`.";
|
|
492
492
|
}
|
|
493
493
|
return "";
|
|
494
494
|
}
|
|
495
495
|
}
|
|
496
|
-
function
|
|
496
|
+
function Wn(s) {
|
|
497
497
|
return "";
|
|
498
498
|
}
|
|
499
|
-
var
|
|
500
|
-
function
|
|
499
|
+
var pr = {};
|
|
500
|
+
function jn(s) {
|
|
501
501
|
{
|
|
502
|
-
var
|
|
503
|
-
if (!
|
|
504
|
-
var
|
|
505
|
-
|
|
502
|
+
var u = dr();
|
|
503
|
+
if (!u) {
|
|
504
|
+
var p = typeof s == "string" ? s : s.displayName || s.name;
|
|
505
|
+
p && (u = `
|
|
506
506
|
|
|
507
|
-
Check the top-level render call using <` +
|
|
507
|
+
Check the top-level render call using <` + p + ">.");
|
|
508
508
|
}
|
|
509
|
-
return
|
|
509
|
+
return u;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
function
|
|
512
|
+
function mr(s, u) {
|
|
513
513
|
{
|
|
514
|
-
if (!
|
|
514
|
+
if (!s._store || s._store.validated || s.key != null)
|
|
515
515
|
return;
|
|
516
|
-
|
|
517
|
-
var
|
|
518
|
-
if (
|
|
516
|
+
s._store.validated = !0;
|
|
517
|
+
var p = jn(u);
|
|
518
|
+
if (pr[p])
|
|
519
519
|
return;
|
|
520
|
-
|
|
521
|
-
var
|
|
522
|
-
|
|
520
|
+
pr[p] = !0;
|
|
521
|
+
var w = "";
|
|
522
|
+
s && s._owner && s._owner !== Pt.current && (w = " It was passed a child from " + Z(s._owner.type) + "."), Ae(s), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, w), Ae(null);
|
|
523
523
|
}
|
|
524
524
|
}
|
|
525
|
-
function
|
|
525
|
+
function gr(s, u) {
|
|
526
526
|
{
|
|
527
|
-
if (typeof
|
|
527
|
+
if (typeof s != "object")
|
|
528
528
|
return;
|
|
529
|
-
if (
|
|
530
|
-
for (var
|
|
531
|
-
var
|
|
532
|
-
|
|
529
|
+
if (Mt(s))
|
|
530
|
+
for (var p = 0; p < s.length; p++) {
|
|
531
|
+
var w = s[p];
|
|
532
|
+
At(w) && mr(w, u);
|
|
533
533
|
}
|
|
534
|
-
else if (
|
|
535
|
-
|
|
536
|
-
else if (
|
|
537
|
-
var
|
|
538
|
-
if (typeof
|
|
539
|
-
for (var
|
|
540
|
-
|
|
534
|
+
else if (At(s))
|
|
535
|
+
s._store && (s._store.validated = !0);
|
|
536
|
+
else if (s) {
|
|
537
|
+
var N = x(s);
|
|
538
|
+
if (typeof N == "function" && N !== s.entries)
|
|
539
|
+
for (var j = N.call(s), P; !(P = j.next()).done; )
|
|
540
|
+
At(P.value) && mr(P.value, u);
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
|
-
function
|
|
544
|
+
function qn(s) {
|
|
545
545
|
{
|
|
546
|
-
var
|
|
547
|
-
if (
|
|
546
|
+
var u = s.type;
|
|
547
|
+
if (u == null || typeof u == "string")
|
|
548
548
|
return;
|
|
549
|
-
var
|
|
550
|
-
if (typeof
|
|
551
|
-
|
|
552
|
-
else if (typeof
|
|
549
|
+
var p;
|
|
550
|
+
if (typeof u == "function")
|
|
551
|
+
p = u.propTypes;
|
|
552
|
+
else if (typeof u == "object" && (u.$$typeof === l || // Note: Memo only checks outer props here.
|
|
553
553
|
// Inner props are checked in the reconciler.
|
|
554
|
-
|
|
555
|
-
|
|
554
|
+
u.$$typeof === y))
|
|
555
|
+
p = u.propTypes;
|
|
556
556
|
else
|
|
557
557
|
return;
|
|
558
|
-
if (
|
|
559
|
-
var
|
|
560
|
-
|
|
561
|
-
} else if (
|
|
562
|
-
|
|
563
|
-
var
|
|
564
|
-
|
|
558
|
+
if (p) {
|
|
559
|
+
var w = Z(u);
|
|
560
|
+
Tn(p, s.props, "prop", w, s);
|
|
561
|
+
} else if (u.PropTypes !== void 0 && !Ot) {
|
|
562
|
+
Ot = !0;
|
|
563
|
+
var N = Z(u);
|
|
564
|
+
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
|
|
565
565
|
}
|
|
566
|
-
typeof
|
|
566
|
+
typeof u.getDefaultProps == "function" && !u.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
|
-
function
|
|
569
|
+
function Yn(s) {
|
|
570
570
|
{
|
|
571
|
-
for (var
|
|
572
|
-
var
|
|
573
|
-
if (
|
|
574
|
-
|
|
571
|
+
for (var u = Object.keys(s.props), p = 0; p < u.length; p++) {
|
|
572
|
+
var w = u[p];
|
|
573
|
+
if (w !== "children" && w !== "key") {
|
|
574
|
+
Ae(s), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), Ae(null);
|
|
575
575
|
break;
|
|
576
576
|
}
|
|
577
577
|
}
|
|
578
|
-
|
|
578
|
+
s.ref !== null && (Ae(s), S("Invalid attribute `ref` supplied to `React.Fragment`."), Ae(null));
|
|
579
579
|
}
|
|
580
580
|
}
|
|
581
|
-
var
|
|
582
|
-
function
|
|
581
|
+
var vr = {};
|
|
582
|
+
function yr(s, u, p, w, N, j) {
|
|
583
583
|
{
|
|
584
|
-
var
|
|
585
|
-
if (!
|
|
586
|
-
var
|
|
587
|
-
(
|
|
588
|
-
var
|
|
589
|
-
|
|
584
|
+
var P = Te(s);
|
|
585
|
+
if (!P) {
|
|
586
|
+
var M = "";
|
|
587
|
+
(s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (M += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
588
|
+
var X = Wn();
|
|
589
|
+
X ? M += X : M += dr();
|
|
590
590
|
var z;
|
|
591
|
-
|
|
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, S("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
|
-
var
|
|
594
|
-
if (
|
|
595
|
-
return
|
|
596
|
-
if (
|
|
597
|
-
var
|
|
598
|
-
if (
|
|
599
|
-
if (
|
|
600
|
-
if (
|
|
601
|
-
for (var
|
|
602
|
-
|
|
603
|
-
Object.freeze && Object.freeze(
|
|
593
|
+
var U = Dn(s, u, p, N, j);
|
|
594
|
+
if (U == null)
|
|
595
|
+
return U;
|
|
596
|
+
if (P) {
|
|
597
|
+
var ie = u.children;
|
|
598
|
+
if (ie !== void 0)
|
|
599
|
+
if (w)
|
|
600
|
+
if (Mt(ie)) {
|
|
601
|
+
for (var $e = 0; $e < ie.length; $e++)
|
|
602
|
+
gr(ie[$e], s);
|
|
603
|
+
Object.freeze && Object.freeze(ie);
|
|
604
604
|
} else
|
|
605
|
-
|
|
605
|
+
S("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
|
-
if (
|
|
610
|
-
var
|
|
611
|
-
return
|
|
612
|
-
}),
|
|
613
|
-
if (!
|
|
614
|
-
var
|
|
615
|
-
|
|
609
|
+
if (Ge.call(u, "key")) {
|
|
610
|
+
var Re = Z(s), ee = Object.keys(u).filter(function(Hn) {
|
|
611
|
+
return Hn !== "key";
|
|
612
|
+
}), $t = ee.length > 0 ? "{key: someKey, " + ee.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
613
|
+
if (!vr[Re + $t]) {
|
|
614
|
+
var Gn = ee.length > 0 ? "{" + ee.join(": ..., ") + ": ...}" : "{}";
|
|
615
|
+
S(`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} />`,
|
|
620
|
+
<%s key={someKey} {...props} />`, $t, Re, Gn, Re), vr[Re + $t] = !0;
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
return
|
|
623
|
+
return s === n ? Yn(U) : qn(U), U;
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
|
-
function
|
|
627
|
-
return
|
|
626
|
+
function Vn(s, u, p) {
|
|
627
|
+
return yr(s, u, p, !0);
|
|
628
628
|
}
|
|
629
|
-
function
|
|
630
|
-
return
|
|
629
|
+
function zn(s, u, p) {
|
|
630
|
+
return yr(s, u, p, !1);
|
|
631
631
|
}
|
|
632
|
-
var
|
|
633
|
-
|
|
634
|
-
}()),
|
|
632
|
+
var Un = zn, Bn = Vn;
|
|
633
|
+
Je.Fragment = n, Je.jsx = Un, Je.jsxs = Bn;
|
|
634
|
+
}()), Je;
|
|
635
635
|
}
|
|
636
|
-
process.env.NODE_ENV === "production" ?
|
|
637
|
-
var
|
|
638
|
-
function
|
|
636
|
+
process.env.NODE_ENV === "production" ? Wt.exports = so() : Wt.exports = ao();
|
|
637
|
+
var wr = Wt.exports;
|
|
638
|
+
function co(e) {
|
|
639
639
|
if (e.sheet)
|
|
640
640
|
return e.sheet;
|
|
641
|
-
for (var
|
|
642
|
-
if (document.styleSheets[
|
|
643
|
-
return document.styleSheets[
|
|
644
|
-
}
|
|
645
|
-
function
|
|
646
|
-
var
|
|
647
|
-
return
|
|
648
|
-
}
|
|
649
|
-
var
|
|
650
|
-
function e(
|
|
651
|
-
var
|
|
652
|
-
this._insertTag = function(
|
|
641
|
+
for (var t = 0; t < document.styleSheets.length; t++)
|
|
642
|
+
if (document.styleSheets[t].ownerNode === e)
|
|
643
|
+
return document.styleSheets[t];
|
|
644
|
+
}
|
|
645
|
+
function lo(e) {
|
|
646
|
+
var t = document.createElement("style");
|
|
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
|
+
}
|
|
649
|
+
var uo = /* @__PURE__ */ function() {
|
|
650
|
+
function e(r) {
|
|
651
|
+
var n = this;
|
|
652
|
+
this._insertTag = function(o) {
|
|
653
653
|
var i;
|
|
654
|
-
|
|
655
|
-
}, this.isSpeedy =
|
|
656
|
-
}
|
|
657
|
-
var
|
|
658
|
-
return
|
|
659
|
-
|
|
660
|
-
},
|
|
661
|
-
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(
|
|
662
|
-
var
|
|
654
|
+
n.tags.length === 0 ? n.insertionPoint ? i = n.insertionPoint.nextSibling : n.prepend ? i = n.container.firstChild : i = n.before : i = n.tags[n.tags.length - 1].nextSibling, n.container.insertBefore(o, i), n.tags.push(o);
|
|
655
|
+
}, this.isSpeedy = r.speedy === void 0 ? !0 : r.speedy, this.tags = [], this.ctr = 0, this.nonce = r.nonce, this.key = r.key, this.container = r.container, this.prepend = r.prepend, this.insertionPoint = r.insertionPoint, this.before = null;
|
|
656
|
+
}
|
|
657
|
+
var t = e.prototype;
|
|
658
|
+
return t.hydrate = function(n) {
|
|
659
|
+
n.forEach(this._insertTag);
|
|
660
|
+
}, t.insert = function(n) {
|
|
661
|
+
this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(lo(this));
|
|
662
|
+
var o = this.tags[this.tags.length - 1];
|
|
663
663
|
if (this.isSpeedy) {
|
|
664
|
-
var i =
|
|
664
|
+
var i = co(o);
|
|
665
665
|
try {
|
|
666
|
-
i.insertRule(
|
|
666
|
+
i.insertRule(n, i.cssRules.length);
|
|
667
667
|
} catch {
|
|
668
668
|
}
|
|
669
669
|
} else
|
|
670
|
-
|
|
670
|
+
o.appendChild(document.createTextNode(n));
|
|
671
671
|
this.ctr++;
|
|
672
|
-
},
|
|
673
|
-
this.tags.forEach(function(
|
|
674
|
-
var
|
|
675
|
-
return (
|
|
672
|
+
}, t.flush = function() {
|
|
673
|
+
this.tags.forEach(function(n) {
|
|
674
|
+
var o;
|
|
675
|
+
return (o = n.parentNode) == null ? void 0 : o.removeChild(n);
|
|
676
676
|
}), this.tags = [], this.ctr = 0;
|
|
677
677
|
}, e;
|
|
678
|
-
}(),
|
|
679
|
-
function
|
|
680
|
-
return J(e, 0) ^ 45 ? (((
|
|
678
|
+
}(), K = "-ms-", mt = "-moz-", F = "-webkit-", en = "comm", Ht = "rule", Jt = "decl", fo = "@import", tn = "@keyframes", ho = "@layer", po = Math.abs, St = String.fromCharCode, mo = Object.assign;
|
|
679
|
+
function go(e, t) {
|
|
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
|
-
function
|
|
682
|
+
function rn(e) {
|
|
683
683
|
return e.trim();
|
|
684
684
|
}
|
|
685
|
-
function
|
|
686
|
-
return (e =
|
|
685
|
+
function vo(e, t) {
|
|
686
|
+
return (e = t.exec(e)) ? e[0] : e;
|
|
687
687
|
}
|
|
688
|
-
function
|
|
689
|
-
return e.replace(
|
|
688
|
+
function L(e, t, r) {
|
|
689
|
+
return e.replace(t, r);
|
|
690
690
|
}
|
|
691
|
-
function
|
|
692
|
-
return e.indexOf(
|
|
691
|
+
function jt(e, t) {
|
|
692
|
+
return e.indexOf(t);
|
|
693
693
|
}
|
|
694
|
-
function J(e,
|
|
695
|
-
return e.charCodeAt(
|
|
694
|
+
function J(e, t) {
|
|
695
|
+
return e.charCodeAt(t) | 0;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
698
|
-
return e.slice(
|
|
697
|
+
function Xe(e, t, r) {
|
|
698
|
+
return e.slice(t, r);
|
|
699
699
|
}
|
|
700
|
-
function
|
|
700
|
+
function fe(e) {
|
|
701
701
|
return e.length;
|
|
702
702
|
}
|
|
703
|
-
function
|
|
703
|
+
function Kt(e) {
|
|
704
704
|
return e.length;
|
|
705
705
|
}
|
|
706
|
-
function
|
|
707
|
-
return
|
|
706
|
+
function st(e, t) {
|
|
707
|
+
return t.push(e), e;
|
|
708
708
|
}
|
|
709
|
-
function
|
|
710
|
-
return e.map(
|
|
709
|
+
function yo(e, t) {
|
|
710
|
+
return e.map(t).join("");
|
|
711
711
|
}
|
|
712
|
-
var
|
|
713
|
-
function
|
|
714
|
-
return { value: e, root:
|
|
712
|
+
var Ct = 1, De = 1, nn = 0, te = 0, B = 0, qe = "";
|
|
713
|
+
function Rt(e, t, r, n, o, i, a) {
|
|
714
|
+
return { value: e, root: t, parent: r, type: n, props: o, children: i, line: Ct, column: De, length: a, return: "" };
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
return
|
|
716
|
+
function Ke(e, t) {
|
|
717
|
+
return mo(Rt("", null, null, "", null, null, 0), e, { length: -e.length }, t);
|
|
718
718
|
}
|
|
719
|
-
function
|
|
720
|
-
return
|
|
719
|
+
function bo() {
|
|
720
|
+
return B;
|
|
721
721
|
}
|
|
722
|
-
function
|
|
723
|
-
return
|
|
722
|
+
function xo() {
|
|
723
|
+
return B = te > 0 ? J(qe, --te) : 0, De--, B === 10 && (De = 1, Ct--), B;
|
|
724
724
|
}
|
|
725
|
-
function
|
|
726
|
-
return
|
|
725
|
+
function ne() {
|
|
726
|
+
return B = te < nn ? J(qe, te++) : 0, De++, B === 10 && (De = 1, Ct++), B;
|
|
727
727
|
}
|
|
728
|
-
function
|
|
729
|
-
return J(
|
|
728
|
+
function de() {
|
|
729
|
+
return J(qe, te);
|
|
730
730
|
}
|
|
731
|
-
function
|
|
732
|
-
return
|
|
731
|
+
function lt() {
|
|
732
|
+
return te;
|
|
733
733
|
}
|
|
734
|
-
function
|
|
735
|
-
return
|
|
734
|
+
function nt(e, t) {
|
|
735
|
+
return Xe(qe, e, t);
|
|
736
736
|
}
|
|
737
|
-
function
|
|
737
|
+
function Ze(e) {
|
|
738
738
|
switch (e) {
|
|
739
739
|
case 0:
|
|
740
740
|
case 9:
|
|
@@ -766,249 +766,249 @@ function Ie(e) {
|
|
|
766
766
|
}
|
|
767
767
|
return 0;
|
|
768
768
|
}
|
|
769
|
-
function
|
|
770
|
-
return
|
|
769
|
+
function on(e) {
|
|
770
|
+
return Ct = De = 1, nn = fe(qe = e), te = 0, [];
|
|
771
771
|
}
|
|
772
|
-
function
|
|
773
|
-
return
|
|
772
|
+
function sn(e) {
|
|
773
|
+
return qe = "", e;
|
|
774
774
|
}
|
|
775
|
-
function
|
|
776
|
-
return
|
|
775
|
+
function ut(e) {
|
|
776
|
+
return rn(nt(te - 1, qt(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
|
|
777
777
|
}
|
|
778
|
-
function
|
|
779
|
-
for (; (
|
|
780
|
-
|
|
781
|
-
return
|
|
778
|
+
function Eo(e) {
|
|
779
|
+
for (; (B = de()) && B < 33; )
|
|
780
|
+
ne();
|
|
781
|
+
return Ze(e) > 2 || Ze(B) > 3 ? "" : " ";
|
|
782
782
|
}
|
|
783
|
-
function
|
|
784
|
-
for (; --
|
|
783
|
+
function So(e, t) {
|
|
784
|
+
for (; --t && ne() && !(B < 48 || B > 102 || B > 57 && B < 65 || B > 70 && B < 97); )
|
|
785
785
|
;
|
|
786
|
-
return
|
|
786
|
+
return nt(e, lt() + (t < 6 && de() == 32 && ne() == 32));
|
|
787
787
|
}
|
|
788
|
-
function
|
|
789
|
-
for (;
|
|
790
|
-
switch (
|
|
788
|
+
function qt(e) {
|
|
789
|
+
for (; ne(); )
|
|
790
|
+
switch (B) {
|
|
791
791
|
case e:
|
|
792
|
-
return
|
|
792
|
+
return te;
|
|
793
793
|
case 34:
|
|
794
794
|
case 39:
|
|
795
|
-
e !== 34 && e !== 39 &&
|
|
795
|
+
e !== 34 && e !== 39 && qt(B);
|
|
796
796
|
break;
|
|
797
797
|
case 40:
|
|
798
|
-
e === 41 &&
|
|
798
|
+
e === 41 && qt(e);
|
|
799
799
|
break;
|
|
800
800
|
case 92:
|
|
801
|
-
|
|
801
|
+
ne();
|
|
802
802
|
break;
|
|
803
803
|
}
|
|
804
|
-
return
|
|
804
|
+
return te;
|
|
805
805
|
}
|
|
806
|
-
function
|
|
807
|
-
for (;
|
|
808
|
-
if (e +
|
|
806
|
+
function Co(e, t) {
|
|
807
|
+
for (; ne() && e + B !== 57; )
|
|
808
|
+
if (e + B === 84 && de() === 47)
|
|
809
809
|
break;
|
|
810
|
-
return "/*" +
|
|
810
|
+
return "/*" + nt(t, te - 1) + "*" + St(e === 47 ? e : ne());
|
|
811
811
|
}
|
|
812
|
-
function
|
|
813
|
-
for (; !
|
|
814
|
-
|
|
815
|
-
return
|
|
812
|
+
function Ro(e) {
|
|
813
|
+
for (; !Ze(de()); )
|
|
814
|
+
ne();
|
|
815
|
+
return nt(e, te);
|
|
816
816
|
}
|
|
817
|
-
function
|
|
818
|
-
return
|
|
817
|
+
function wo(e) {
|
|
818
|
+
return sn(ft("", null, null, null, [""], e = on(e), 0, [0], e));
|
|
819
819
|
}
|
|
820
|
-
function
|
|
821
|
-
for (var
|
|
822
|
-
switch (
|
|
820
|
+
function ft(e, t, r, n, o, i, a, c, l) {
|
|
821
|
+
for (var h = 0, f = 0, y = a, C = 0, v = 0, R = 0, m = 1, x = 1, g = 1, S = 0, _ = "", $ = o, d = i, q = n, A = _; x; )
|
|
822
|
+
switch (R = S, S = ne()) {
|
|
823
823
|
case 40:
|
|
824
|
-
if (
|
|
825
|
-
|
|
824
|
+
if (R != 108 && J(A, y - 1) == 58) {
|
|
825
|
+
jt(A += L(ut(S), "&", "&\f"), "&\f") != -1 && (g = -1);
|
|
826
826
|
break;
|
|
827
827
|
}
|
|
828
828
|
case 34:
|
|
829
829
|
case 39:
|
|
830
830
|
case 91:
|
|
831
|
-
A +=
|
|
831
|
+
A += ut(S);
|
|
832
832
|
break;
|
|
833
833
|
case 9:
|
|
834
834
|
case 10:
|
|
835
835
|
case 13:
|
|
836
836
|
case 32:
|
|
837
|
-
A +=
|
|
837
|
+
A += Eo(R);
|
|
838
838
|
break;
|
|
839
839
|
case 92:
|
|
840
|
-
A +=
|
|
840
|
+
A += So(lt() - 1, 7);
|
|
841
841
|
continue;
|
|
842
842
|
case 47:
|
|
843
|
-
switch (
|
|
843
|
+
switch (de()) {
|
|
844
844
|
case 42:
|
|
845
845
|
case 47:
|
|
846
|
-
|
|
846
|
+
st(_o(Co(ne(), lt()), t, r), l);
|
|
847
847
|
break;
|
|
848
848
|
default:
|
|
849
849
|
A += "/";
|
|
850
850
|
}
|
|
851
851
|
break;
|
|
852
|
-
case 123 *
|
|
853
|
-
|
|
854
|
-
case 125 *
|
|
852
|
+
case 123 * m:
|
|
853
|
+
c[h++] = fe(A) * g;
|
|
854
|
+
case 125 * m:
|
|
855
855
|
case 59:
|
|
856
856
|
case 0:
|
|
857
|
-
switch (
|
|
857
|
+
switch (S) {
|
|
858
858
|
case 0:
|
|
859
859
|
case 125:
|
|
860
|
-
|
|
861
|
-
case 59 +
|
|
862
|
-
|
|
860
|
+
x = 0;
|
|
861
|
+
case 59 + f:
|
|
862
|
+
g == -1 && (A = L(A, /\f/g, "")), v > 0 && fe(A) - y && st(v > 32 ? Tr(A + ";", n, r, y - 1) : Tr(L(A, " ", "") + ";", n, r, y - 2), l);
|
|
863
863
|
break;
|
|
864
864
|
case 59:
|
|
865
865
|
A += ";";
|
|
866
866
|
default:
|
|
867
|
-
if (
|
|
868
|
-
if (
|
|
869
|
-
|
|
867
|
+
if (st(q = _r(A, t, r, h, f, o, c, _, $ = [], d = [], y), i), S === 123)
|
|
868
|
+
if (f === 0)
|
|
869
|
+
ft(A, t, q, q, $, i, y, c, d);
|
|
870
870
|
else
|
|
871
|
-
switch (
|
|
871
|
+
switch (C === 99 && J(A, 3) === 110 ? 100 : C) {
|
|
872
872
|
case 100:
|
|
873
873
|
case 108:
|
|
874
874
|
case 109:
|
|
875
875
|
case 115:
|
|
876
|
-
|
|
876
|
+
ft(e, q, q, n && st(_r(e, q, q, 0, 0, o, c, _, o, $ = [], y), d), o, d, y, c, n ? $ : d);
|
|
877
877
|
break;
|
|
878
878
|
default:
|
|
879
|
-
|
|
879
|
+
ft(A, q, q, q, [""], d, 0, c, d);
|
|
880
880
|
}
|
|
881
881
|
}
|
|
882
|
-
|
|
882
|
+
h = f = v = 0, m = g = 1, _ = A = "", y = a;
|
|
883
883
|
break;
|
|
884
884
|
case 58:
|
|
885
|
-
|
|
885
|
+
y = 1 + fe(A), v = R;
|
|
886
886
|
default:
|
|
887
|
-
if (
|
|
888
|
-
if (
|
|
889
|
-
--
|
|
890
|
-
else if (
|
|
887
|
+
if (m < 1) {
|
|
888
|
+
if (S == 123)
|
|
889
|
+
--m;
|
|
890
|
+
else if (S == 125 && m++ == 0 && xo() == 125)
|
|
891
891
|
continue;
|
|
892
892
|
}
|
|
893
|
-
switch (A +=
|
|
893
|
+
switch (A += St(S), S * m) {
|
|
894
894
|
case 38:
|
|
895
|
-
|
|
895
|
+
g = f > 0 ? 1 : (A += "\f", -1);
|
|
896
896
|
break;
|
|
897
897
|
case 44:
|
|
898
|
-
|
|
898
|
+
c[h++] = (fe(A) - 1) * g, g = 1;
|
|
899
899
|
break;
|
|
900
900
|
case 64:
|
|
901
|
-
|
|
901
|
+
de() === 45 && (A += ut(ne())), C = de(), f = y = fe(_ = A += Ro(lt())), S++;
|
|
902
902
|
break;
|
|
903
903
|
case 45:
|
|
904
|
-
|
|
904
|
+
R === 45 && fe(A) == 2 && (m = 0);
|
|
905
905
|
}
|
|
906
906
|
}
|
|
907
907
|
return i;
|
|
908
908
|
}
|
|
909
|
-
function
|
|
910
|
-
for (var
|
|
911
|
-
for (var
|
|
912
|
-
(_ =
|
|
913
|
-
return
|
|
909
|
+
function _r(e, t, r, n, o, i, a, c, l, h, f) {
|
|
910
|
+
for (var y = o - 1, C = o === 0 ? i : [""], v = Kt(C), R = 0, m = 0, x = 0; R < n; ++R)
|
|
911
|
+
for (var g = 0, S = Xe(e, y + 1, y = po(m = a[R])), _ = e; g < v; ++g)
|
|
912
|
+
(_ = rn(m > 0 ? C[g] + " " + S : L(S, /&\f/g, C[g]))) && (l[x++] = _);
|
|
913
|
+
return Rt(e, t, r, o === 0 ? Ht : c, l, h, f);
|
|
914
914
|
}
|
|
915
|
-
function
|
|
916
|
-
return
|
|
915
|
+
function _o(e, t, r) {
|
|
916
|
+
return Rt(e, t, r, en, St(bo()), Xe(e, 2, -2), 0);
|
|
917
917
|
}
|
|
918
|
-
function
|
|
919
|
-
return
|
|
918
|
+
function Tr(e, t, r, n) {
|
|
919
|
+
return Rt(e, t, r, Jt, Xe(e, 0, n), Xe(e, n + 1, -1), n);
|
|
920
920
|
}
|
|
921
|
-
function
|
|
922
|
-
for (var
|
|
923
|
-
|
|
924
|
-
return
|
|
921
|
+
function Ne(e, t) {
|
|
922
|
+
for (var r = "", n = Kt(e), o = 0; o < n; o++)
|
|
923
|
+
r += t(e[o], o, e, t) || "";
|
|
924
|
+
return r;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
926
|
+
function To(e, t, r, n) {
|
|
927
927
|
switch (e.type) {
|
|
928
|
-
case
|
|
928
|
+
case ho:
|
|
929
929
|
if (e.children.length) break;
|
|
930
|
-
case
|
|
931
|
-
case
|
|
930
|
+
case fo:
|
|
931
|
+
case Jt:
|
|
932
932
|
return e.return = e.return || e.value;
|
|
933
|
-
case
|
|
933
|
+
case en:
|
|
934
934
|
return "";
|
|
935
|
-
case
|
|
936
|
-
return e.return = e.value + "{" +
|
|
937
|
-
case
|
|
935
|
+
case tn:
|
|
936
|
+
return e.return = e.value + "{" + Ne(e.children, n) + "}";
|
|
937
|
+
case Ht:
|
|
938
938
|
e.value = e.props.join(",");
|
|
939
939
|
}
|
|
940
|
-
return
|
|
940
|
+
return fe(r = Ne(e.children, n)) ? e.return = e.value + "{" + r + "}" : "";
|
|
941
941
|
}
|
|
942
|
-
function
|
|
943
|
-
var
|
|
944
|
-
return function(n, o,
|
|
945
|
-
for (var
|
|
946
|
-
|
|
947
|
-
return
|
|
942
|
+
function ko(e) {
|
|
943
|
+
var t = Kt(e);
|
|
944
|
+
return function(r, n, o, i) {
|
|
945
|
+
for (var a = "", c = 0; c < t; c++)
|
|
946
|
+
a += e[c](r, n, o, i) || "";
|
|
947
|
+
return a;
|
|
948
948
|
};
|
|
949
949
|
}
|
|
950
|
-
function
|
|
951
|
-
return function(
|
|
952
|
-
|
|
950
|
+
function Mo(e) {
|
|
951
|
+
return function(t) {
|
|
952
|
+
t.root || (t = t.return) && e(t);
|
|
953
953
|
};
|
|
954
954
|
}
|
|
955
|
-
function
|
|
956
|
-
var
|
|
957
|
-
return function(
|
|
958
|
-
return r
|
|
955
|
+
function Po(e) {
|
|
956
|
+
var t = /* @__PURE__ */ Object.create(null);
|
|
957
|
+
return function(r) {
|
|
958
|
+
return t[r] === void 0 && (t[r] = e(r)), t[r];
|
|
959
959
|
};
|
|
960
960
|
}
|
|
961
|
-
var
|
|
962
|
-
for (var
|
|
963
|
-
|
|
964
|
-
return
|
|
965
|
-
},
|
|
966
|
-
var
|
|
961
|
+
var Oo = function(t, r, n) {
|
|
962
|
+
for (var o = 0, i = 0; o = i, i = de(), o === 38 && i === 12 && (r[n] = 1), !Ze(i); )
|
|
963
|
+
ne();
|
|
964
|
+
return nt(t, te);
|
|
965
|
+
}, Ao = function(t, r) {
|
|
966
|
+
var n = -1, o = 44;
|
|
967
967
|
do
|
|
968
|
-
switch (
|
|
968
|
+
switch (Ze(o)) {
|
|
969
969
|
case 0:
|
|
970
|
-
|
|
970
|
+
o === 38 && de() === 12 && (r[n] = 1), t[n] += Oo(te - 1, r, n);
|
|
971
971
|
break;
|
|
972
972
|
case 2:
|
|
973
|
-
|
|
973
|
+
t[n] += ut(o);
|
|
974
974
|
break;
|
|
975
975
|
case 4:
|
|
976
|
-
if (
|
|
977
|
-
|
|
976
|
+
if (o === 44) {
|
|
977
|
+
t[++n] = de() === 58 ? "&\f" : "", r[n] = t[n].length;
|
|
978
978
|
break;
|
|
979
979
|
}
|
|
980
980
|
default:
|
|
981
|
-
|
|
982
|
-
}
|
|
983
|
-
while (
|
|
984
|
-
return
|
|
985
|
-
},
|
|
986
|
-
return
|
|
987
|
-
},
|
|
988
|
-
if (!(
|
|
981
|
+
t[n] += St(o);
|
|
982
|
+
}
|
|
983
|
+
while (o = ne());
|
|
984
|
+
return t;
|
|
985
|
+
}, $o = function(t, r) {
|
|
986
|
+
return sn(Ao(on(t), r));
|
|
987
|
+
}, kr = /* @__PURE__ */ new WeakMap(), Fo = function(t) {
|
|
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
|
-
|
|
991
|
-
for (var
|
|
992
|
-
if (
|
|
993
|
-
if (!(
|
|
994
|
-
|
|
995
|
-
for (var i = [],
|
|
996
|
-
for (var
|
|
997
|
-
|
|
998
|
-
}
|
|
999
|
-
}
|
|
1000
|
-
},
|
|
1001
|
-
if (
|
|
1002
|
-
var
|
|
990
|
+
t.length < 1)) {
|
|
991
|
+
for (var r = t.value, n = t.parent, o = t.column === n.column && t.line === n.line; n.type !== "rule"; )
|
|
992
|
+
if (n = n.parent, !n) return;
|
|
993
|
+
if (!(t.props.length === 1 && r.charCodeAt(0) !== 58 && !kr.get(n)) && !o) {
|
|
994
|
+
kr.set(t, !0);
|
|
995
|
+
for (var i = [], a = $o(r, i), c = n.props, l = 0, h = 0; l < a.length; l++)
|
|
996
|
+
for (var f = 0; f < c.length; f++, h++)
|
|
997
|
+
t.props[h] = i[l] ? a[l].replace(/&\f/g, c[f]) : c[f] + " " + a[l];
|
|
998
|
+
}
|
|
999
|
+
}
|
|
1000
|
+
}, Lo = function(t) {
|
|
1001
|
+
if (t.type === "decl") {
|
|
1002
|
+
var r = t.value;
|
|
1003
1003
|
// charcode for l
|
|
1004
|
-
|
|
1005
|
-
|
|
1004
|
+
r.charCodeAt(0) === 108 && // charcode for b
|
|
1005
|
+
r.charCodeAt(2) === 98 && (t.return = "", t.value = "");
|
|
1006
1006
|
}
|
|
1007
1007
|
};
|
|
1008
|
-
function
|
|
1009
|
-
switch (
|
|
1008
|
+
function an(e, t) {
|
|
1009
|
+
switch (go(e, t)) {
|
|
1010
1010
|
case 5103:
|
|
1011
|
-
return
|
|
1011
|
+
return F + "print-" + e + e;
|
|
1012
1012
|
case 5737:
|
|
1013
1013
|
case 4201:
|
|
1014
1014
|
case 3177:
|
|
@@ -1034,44 +1034,44 @@ function dt(e, r) {
|
|
|
1034
1034
|
case 5365:
|
|
1035
1035
|
case 5621:
|
|
1036
1036
|
case 3829:
|
|
1037
|
-
return
|
|
1037
|
+
return F + e + e;
|
|
1038
1038
|
case 5349:
|
|
1039
1039
|
case 4246:
|
|
1040
1040
|
case 4810:
|
|
1041
1041
|
case 6968:
|
|
1042
1042
|
case 2756:
|
|
1043
|
-
return
|
|
1043
|
+
return F + e + mt + e + K + e + e;
|
|
1044
1044
|
case 6828:
|
|
1045
1045
|
case 4268:
|
|
1046
|
-
return
|
|
1046
|
+
return F + e + K + e + e;
|
|
1047
1047
|
case 6165:
|
|
1048
|
-
return
|
|
1048
|
+
return F + e + K + "flex-" + e + e;
|
|
1049
1049
|
case 5187:
|
|
1050
|
-
return
|
|
1050
|
+
return F + e + L(e, /(\w+).+(:[^]+)/, F + "box-$1$2" + K + "flex-$1$2") + e;
|
|
1051
1051
|
case 5443:
|
|
1052
|
-
return
|
|
1052
|
+
return F + e + K + "flex-item-" + L(e, /flex-|-self/, "") + e;
|
|
1053
1053
|
case 4675:
|
|
1054
|
-
return
|
|
1054
|
+
return F + e + K + "flex-line-pack" + L(e, /align-content|flex-|-self/, "") + e;
|
|
1055
1055
|
case 5548:
|
|
1056
|
-
return
|
|
1056
|
+
return F + e + K + L(e, "shrink", "negative") + e;
|
|
1057
1057
|
case 5292:
|
|
1058
|
-
return
|
|
1058
|
+
return F + e + K + L(e, "basis", "preferred-size") + e;
|
|
1059
1059
|
case 6060:
|
|
1060
|
-
return
|
|
1060
|
+
return F + "box-" + L(e, "-grow", "") + F + e + K + L(e, "grow", "positive") + e;
|
|
1061
1061
|
case 4554:
|
|
1062
|
-
return
|
|
1062
|
+
return F + L(e, /([^-])(transform)/g, "$1" + F + "$2") + e;
|
|
1063
1063
|
case 6187:
|
|
1064
|
-
return
|
|
1064
|
+
return L(L(L(e, /(zoom-|grab)/, F + "$1"), /(image-set)/, F + "$1"), e, "") + e;
|
|
1065
1065
|
case 5495:
|
|
1066
1066
|
case 3959:
|
|
1067
|
-
return
|
|
1067
|
+
return L(e, /(image-set\([^]*)/, F + "$1$`$1");
|
|
1068
1068
|
case 4968:
|
|
1069
|
-
return
|
|
1069
|
+
return L(L(e, /(.+:)(flex-)?(.*)/, F + "box-pack:$3" + K + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + F + e + e;
|
|
1070
1070
|
case 4095:
|
|
1071
1071
|
case 3583:
|
|
1072
1072
|
case 4068:
|
|
1073
1073
|
case 2532:
|
|
1074
|
-
return
|
|
1074
|
+
return L(e, /(.+)-inline(.+)/, F + "$1$2") + e;
|
|
1075
1075
|
case 8116:
|
|
1076
1076
|
case 7059:
|
|
1077
1077
|
case 5753:
|
|
@@ -1084,115 +1084,115 @@ function dt(e, r) {
|
|
|
1084
1084
|
case 5789:
|
|
1085
1085
|
case 5021:
|
|
1086
1086
|
case 4765:
|
|
1087
|
-
if (
|
|
1087
|
+
if (fe(e) - 1 - t > 6) switch (J(e, t + 1)) {
|
|
1088
1088
|
case 109:
|
|
1089
|
-
if (J(e,
|
|
1089
|
+
if (J(e, t + 4) !== 45) break;
|
|
1090
1090
|
case 102:
|
|
1091
|
-
return
|
|
1091
|
+
return L(e, /(.+:)(.+)-([^]+)/, "$1" + F + "$2-$3$1" + mt + (J(e, t + 3) == 108 ? "$3" : "$2-$3")) + e;
|
|
1092
1092
|
case 115:
|
|
1093
|
-
return ~
|
|
1093
|
+
return ~jt(e, "stretch") ? an(L(e, "stretch", "fill-available"), t) + e : e;
|
|
1094
1094
|
}
|
|
1095
1095
|
break;
|
|
1096
1096
|
case 4949:
|
|
1097
|
-
if (J(e,
|
|
1097
|
+
if (J(e, t + 1) !== 115) break;
|
|
1098
1098
|
case 6444:
|
|
1099
|
-
switch (J(e,
|
|
1099
|
+
switch (J(e, fe(e) - 3 - (~jt(e, "!important") && 10))) {
|
|
1100
1100
|
case 107:
|
|
1101
|
-
return
|
|
1101
|
+
return L(e, ":", ":" + F) + e;
|
|
1102
1102
|
case 101:
|
|
1103
|
-
return
|
|
1103
|
+
return L(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + F + (J(e, 14) === 45 ? "inline-" : "") + "box$3$1" + F + "$2$3$1" + K + "$2box$3") + e;
|
|
1104
1104
|
}
|
|
1105
1105
|
break;
|
|
1106
1106
|
case 5936:
|
|
1107
|
-
switch (J(e,
|
|
1107
|
+
switch (J(e, t + 11)) {
|
|
1108
1108
|
case 114:
|
|
1109
|
-
return
|
|
1109
|
+
return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
|
|
1110
1110
|
case 108:
|
|
1111
|
-
return
|
|
1111
|
+
return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
|
|
1112
1112
|
case 45:
|
|
1113
|
-
return
|
|
1113
|
+
return F + e + K + L(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
|
|
1114
1114
|
}
|
|
1115
|
-
return
|
|
1115
|
+
return F + e + K + e + e;
|
|
1116
1116
|
}
|
|
1117
1117
|
return e;
|
|
1118
1118
|
}
|
|
1119
|
-
var
|
|
1120
|
-
if (
|
|
1121
|
-
case
|
|
1122
|
-
|
|
1119
|
+
var No = function(t, r, n, o) {
|
|
1120
|
+
if (t.length > -1 && !t.return) switch (t.type) {
|
|
1121
|
+
case Jt:
|
|
1122
|
+
t.return = an(t.value, t.length);
|
|
1123
1123
|
break;
|
|
1124
|
-
case
|
|
1125
|
-
return
|
|
1126
|
-
value:
|
|
1127
|
-
})],
|
|
1128
|
-
case
|
|
1129
|
-
if (
|
|
1130
|
-
switch (
|
|
1124
|
+
case tn:
|
|
1125
|
+
return Ne([Ke(t, {
|
|
1126
|
+
value: L(t.value, "@", "@" + F)
|
|
1127
|
+
})], o);
|
|
1128
|
+
case Ht:
|
|
1129
|
+
if (t.length) return yo(t.props, function(i) {
|
|
1130
|
+
switch (vo(i, /(::plac\w+|:read-\w+)/)) {
|
|
1131
1131
|
case ":read-only":
|
|
1132
1132
|
case ":read-write":
|
|
1133
|
-
return
|
|
1134
|
-
props: [
|
|
1135
|
-
})],
|
|
1133
|
+
return Ne([Ke(t, {
|
|
1134
|
+
props: [L(i, /:(read-\w+)/, ":" + mt + "$1")]
|
|
1135
|
+
})], o);
|
|
1136
1136
|
case "::placeholder":
|
|
1137
|
-
return
|
|
1138
|
-
props: [
|
|
1139
|
-
}),
|
|
1140
|
-
props: [
|
|
1141
|
-
}),
|
|
1142
|
-
props: [
|
|
1143
|
-
})],
|
|
1137
|
+
return Ne([Ke(t, {
|
|
1138
|
+
props: [L(i, /:(plac\w+)/, ":" + F + "input-$1")]
|
|
1139
|
+
}), Ke(t, {
|
|
1140
|
+
props: [L(i, /:(plac\w+)/, ":" + mt + "$1")]
|
|
1141
|
+
}), Ke(t, {
|
|
1142
|
+
props: [L(i, /:(plac\w+)/, K + "input-$1")]
|
|
1143
|
+
})], o);
|
|
1144
1144
|
}
|
|
1145
1145
|
return "";
|
|
1146
1146
|
});
|
|
1147
1147
|
}
|
|
1148
|
-
},
|
|
1149
|
-
var
|
|
1150
|
-
if (
|
|
1151
|
-
var
|
|
1152
|
-
Array.prototype.forEach.call(
|
|
1153
|
-
var
|
|
1154
|
-
|
|
1148
|
+
}, Io = [No], Do = function(t) {
|
|
1149
|
+
var r = t.key;
|
|
1150
|
+
if (r === "css") {
|
|
1151
|
+
var n = document.querySelectorAll("style[data-emotion]:not([data-s])");
|
|
1152
|
+
Array.prototype.forEach.call(n, function(m) {
|
|
1153
|
+
var x = m.getAttribute("data-emotion");
|
|
1154
|
+
x.indexOf(" ") !== -1 && (document.head.appendChild(m), m.setAttribute("data-s", ""));
|
|
1155
1155
|
});
|
|
1156
1156
|
}
|
|
1157
|
-
var
|
|
1158
|
-
|
|
1157
|
+
var o = t.stylisPlugins || Io, i = {}, a, c = [];
|
|
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
|
-
document.querySelectorAll('style[data-emotion^="' +
|
|
1162
|
-
function(
|
|
1163
|
-
for (var
|
|
1164
|
-
i[
|
|
1165
|
-
|
|
1161
|
+
document.querySelectorAll('style[data-emotion^="' + r + ' "]'),
|
|
1162
|
+
function(m) {
|
|
1163
|
+
for (var x = m.getAttribute("data-emotion").split(" "), g = 1; g < x.length; g++)
|
|
1164
|
+
i[x[g]] = !0;
|
|
1165
|
+
c.push(m);
|
|
1166
1166
|
}
|
|
1167
1167
|
);
|
|
1168
|
-
var
|
|
1168
|
+
var l, h = [Fo, Lo];
|
|
1169
1169
|
{
|
|
1170
|
-
var
|
|
1171
|
-
|
|
1172
|
-
})],
|
|
1173
|
-
return
|
|
1170
|
+
var f, y = [To, Mo(function(m) {
|
|
1171
|
+
f.insert(m);
|
|
1172
|
+
})], C = ko(h.concat(o, y)), v = function(x) {
|
|
1173
|
+
return Ne(wo(x), C);
|
|
1174
1174
|
};
|
|
1175
|
-
|
|
1176
|
-
|
|
1175
|
+
l = function(x, g, S, _) {
|
|
1176
|
+
f = S, v(x ? x + "{" + g.styles + "}" : g.styles), _ && (R.inserted[g.name] = !0);
|
|
1177
1177
|
};
|
|
1178
1178
|
}
|
|
1179
|
-
var
|
|
1180
|
-
key:
|
|
1181
|
-
sheet: new
|
|
1182
|
-
key:
|
|
1183
|
-
container:
|
|
1184
|
-
nonce:
|
|
1185
|
-
speedy:
|
|
1186
|
-
prepend:
|
|
1187
|
-
insertionPoint:
|
|
1179
|
+
var R = {
|
|
1180
|
+
key: r,
|
|
1181
|
+
sheet: new uo({
|
|
1182
|
+
key: r,
|
|
1183
|
+
container: a,
|
|
1184
|
+
nonce: t.nonce,
|
|
1185
|
+
speedy: t.speedy,
|
|
1186
|
+
prepend: t.prepend,
|
|
1187
|
+
insertionPoint: t.insertionPoint
|
|
1188
1188
|
}),
|
|
1189
|
-
nonce:
|
|
1189
|
+
nonce: t.nonce,
|
|
1190
1190
|
inserted: i,
|
|
1191
1191
|
registered: {},
|
|
1192
|
-
insert:
|
|
1192
|
+
insert: l
|
|
1193
1193
|
};
|
|
1194
|
-
return
|
|
1195
|
-
},
|
|
1194
|
+
return R.sheet.hydrate(c), R;
|
|
1195
|
+
}, Yt = { exports: {} }, I = {};
|
|
1196
1196
|
/** @license React v16.13.1
|
|
1197
1197
|
* react-is.production.min.js
|
|
1198
1198
|
*
|
|
@@ -1201,71 +1201,71 @@ var _n = function(r, n, o, a) {
|
|
|
1201
1201
|
* This source code is licensed under the MIT license found in the
|
|
1202
1202
|
* LICENSE file in the root directory of this source tree.
|
|
1203
1203
|
*/
|
|
1204
|
-
var
|
|
1205
|
-
function
|
|
1206
|
-
if (
|
|
1207
|
-
|
|
1208
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
1209
|
-
function _(
|
|
1210
|
-
if (typeof
|
|
1211
|
-
var
|
|
1212
|
-
switch (
|
|
1213
|
-
case
|
|
1214
|
-
switch (
|
|
1215
|
-
case
|
|
1216
|
-
case
|
|
1217
|
-
case
|
|
1204
|
+
var Mr;
|
|
1205
|
+
function Wo() {
|
|
1206
|
+
if (Mr) return I;
|
|
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, h = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, C = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
|
|
1209
|
+
function _(d) {
|
|
1210
|
+
if (typeof d == "object" && d !== null) {
|
|
1211
|
+
var q = d.$$typeof;
|
|
1212
|
+
switch (q) {
|
|
1213
|
+
case t:
|
|
1214
|
+
switch (d = d.type, d) {
|
|
1215
|
+
case l:
|
|
1216
|
+
case h:
|
|
1217
|
+
case n:
|
|
1218
1218
|
case i:
|
|
1219
|
-
case
|
|
1220
|
-
case
|
|
1221
|
-
return
|
|
1219
|
+
case o:
|
|
1220
|
+
case y:
|
|
1221
|
+
return d;
|
|
1222
1222
|
default:
|
|
1223
|
-
switch (
|
|
1224
|
-
case
|
|
1225
|
-
case
|
|
1226
|
-
case
|
|
1227
|
-
case
|
|
1228
|
-
case
|
|
1229
|
-
return
|
|
1223
|
+
switch (d = d && d.$$typeof, d) {
|
|
1224
|
+
case c:
|
|
1225
|
+
case f:
|
|
1226
|
+
case R:
|
|
1227
|
+
case v:
|
|
1228
|
+
case a:
|
|
1229
|
+
return d;
|
|
1230
1230
|
default:
|
|
1231
|
-
return
|
|
1231
|
+
return q;
|
|
1232
1232
|
}
|
|
1233
1233
|
}
|
|
1234
|
-
case
|
|
1235
|
-
return
|
|
1234
|
+
case r:
|
|
1235
|
+
return q;
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
1239
|
-
function
|
|
1240
|
-
return _(
|
|
1241
|
-
}
|
|
1242
|
-
return
|
|
1243
|
-
return
|
|
1244
|
-
},
|
|
1245
|
-
return _(
|
|
1246
|
-
},
|
|
1247
|
-
return _(
|
|
1248
|
-
},
|
|
1249
|
-
return typeof
|
|
1250
|
-
},
|
|
1251
|
-
return _(
|
|
1252
|
-
},
|
|
1253
|
-
return _(
|
|
1254
|
-
},
|
|
1255
|
-
return _(
|
|
1256
|
-
},
|
|
1257
|
-
return _(
|
|
1258
|
-
},
|
|
1259
|
-
return _(
|
|
1260
|
-
},
|
|
1261
|
-
return _(
|
|
1262
|
-
},
|
|
1263
|
-
return _(
|
|
1264
|
-
},
|
|
1265
|
-
return _(
|
|
1266
|
-
},
|
|
1267
|
-
return typeof
|
|
1268
|
-
},
|
|
1239
|
+
function $(d) {
|
|
1240
|
+
return _(d) === h;
|
|
1241
|
+
}
|
|
1242
|
+
return I.AsyncMode = l, I.ConcurrentMode = h, I.ContextConsumer = c, I.ContextProvider = a, I.Element = t, I.ForwardRef = f, I.Fragment = n, I.Lazy = R, I.Memo = v, I.Portal = r, I.Profiler = i, I.StrictMode = o, I.Suspense = y, I.isAsyncMode = function(d) {
|
|
1243
|
+
return $(d) || _(d) === l;
|
|
1244
|
+
}, I.isConcurrentMode = $, I.isContextConsumer = function(d) {
|
|
1245
|
+
return _(d) === c;
|
|
1246
|
+
}, I.isContextProvider = function(d) {
|
|
1247
|
+
return _(d) === a;
|
|
1248
|
+
}, I.isElement = function(d) {
|
|
1249
|
+
return typeof d == "object" && d !== null && d.$$typeof === t;
|
|
1250
|
+
}, I.isForwardRef = function(d) {
|
|
1251
|
+
return _(d) === f;
|
|
1252
|
+
}, I.isFragment = function(d) {
|
|
1253
|
+
return _(d) === n;
|
|
1254
|
+
}, I.isLazy = function(d) {
|
|
1255
|
+
return _(d) === R;
|
|
1256
|
+
}, I.isMemo = function(d) {
|
|
1257
|
+
return _(d) === v;
|
|
1258
|
+
}, I.isPortal = function(d) {
|
|
1259
|
+
return _(d) === r;
|
|
1260
|
+
}, I.isProfiler = function(d) {
|
|
1261
|
+
return _(d) === i;
|
|
1262
|
+
}, I.isStrictMode = function(d) {
|
|
1263
|
+
return _(d) === o;
|
|
1264
|
+
}, I.isSuspense = function(d) {
|
|
1265
|
+
return _(d) === y;
|
|
1266
|
+
}, I.isValidElementType = function(d) {
|
|
1267
|
+
return typeof d == "string" || typeof d == "function" || d === n || d === h || d === i || d === o || d === y || d === C || typeof d == "object" && d !== null && (d.$$typeof === R || d.$$typeof === v || d.$$typeof === a || d.$$typeof === c || d.$$typeof === f || d.$$typeof === x || d.$$typeof === g || d.$$typeof === S || d.$$typeof === m);
|
|
1268
|
+
}, I.typeOf = _, I;
|
|
1269
1269
|
}
|
|
1270
1270
|
var D = {};
|
|
1271
1271
|
/** @license React v16.13.1
|
|
@@ -1276,155 +1276,155 @@ var D = {};
|
|
|
1276
1276
|
* This source code is licensed under the MIT license found in the
|
|
1277
1277
|
* LICENSE file in the root directory of this source tree.
|
|
1278
1278
|
*/
|
|
1279
|
-
var
|
|
1280
|
-
function
|
|
1281
|
-
return
|
|
1282
|
-
var e = typeof Symbol == "function" && Symbol.for,
|
|
1283
|
-
function _(
|
|
1284
|
-
return typeof
|
|
1285
|
-
|
|
1286
|
-
}
|
|
1287
|
-
function
|
|
1288
|
-
if (typeof
|
|
1289
|
-
var
|
|
1290
|
-
switch (
|
|
1291
|
-
case
|
|
1292
|
-
var
|
|
1293
|
-
switch (
|
|
1294
|
-
case
|
|
1295
|
-
case
|
|
1296
|
-
case
|
|
1279
|
+
var Pr;
|
|
1280
|
+
function jo() {
|
|
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, h = e ? Symbol.for("react.concurrent_mode") : 60111, f = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, C = e ? Symbol.for("react.suspense_list") : 60120, v = e ? Symbol.for("react.memo") : 60115, R = e ? Symbol.for("react.lazy") : 60116, m = e ? Symbol.for("react.block") : 60121, x = e ? Symbol.for("react.fundamental") : 60117, g = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
|
|
1283
|
+
function _(E) {
|
|
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 === h || E === i || E === o || E === y || E === C || typeof E == "object" && E !== null && (E.$$typeof === R || E.$$typeof === v || E.$$typeof === a || E.$$typeof === c || E.$$typeof === f || E.$$typeof === x || E.$$typeof === g || E.$$typeof === S || E.$$typeof === m);
|
|
1286
|
+
}
|
|
1287
|
+
function $(E) {
|
|
1288
|
+
if (typeof E == "object" && E !== null) {
|
|
1289
|
+
var Be = E.$$typeof;
|
|
1290
|
+
switch (Be) {
|
|
1291
|
+
case t:
|
|
1292
|
+
var Oe = E.type;
|
|
1293
|
+
switch (Oe) {
|
|
1294
|
+
case l:
|
|
1295
|
+
case h:
|
|
1296
|
+
case n:
|
|
1297
1297
|
case i:
|
|
1298
|
-
case
|
|
1299
|
-
case
|
|
1300
|
-
return
|
|
1298
|
+
case o:
|
|
1299
|
+
case y:
|
|
1300
|
+
return Oe;
|
|
1301
1301
|
default:
|
|
1302
|
-
var
|
|
1303
|
-
switch (
|
|
1304
|
-
case
|
|
1305
|
-
case
|
|
1306
|
-
case
|
|
1307
|
-
case
|
|
1308
|
-
case
|
|
1309
|
-
return
|
|
1302
|
+
var Ce = Oe && Oe.$$typeof;
|
|
1303
|
+
switch (Ce) {
|
|
1304
|
+
case c:
|
|
1305
|
+
case f:
|
|
1306
|
+
case R:
|
|
1307
|
+
case v:
|
|
1308
|
+
case a:
|
|
1309
|
+
return Ce;
|
|
1310
1310
|
default:
|
|
1311
|
-
return
|
|
1311
|
+
return Be;
|
|
1312
1312
|
}
|
|
1313
1313
|
}
|
|
1314
|
-
case
|
|
1315
|
-
return
|
|
1314
|
+
case r:
|
|
1315
|
+
return Be;
|
|
1316
1316
|
}
|
|
1317
1317
|
}
|
|
1318
1318
|
}
|
|
1319
|
-
var
|
|
1320
|
-
function
|
|
1321
|
-
return
|
|
1319
|
+
var d = l, q = h, A = c, Ye = a, Ee = t, Te = f, ke = n, Se = R, Z = v, ce = r, pe = i, b = o, T = y, k = !1;
|
|
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) || $(E) === l;
|
|
1322
1322
|
}
|
|
1323
|
-
function
|
|
1324
|
-
return
|
|
1323
|
+
function Y(E) {
|
|
1324
|
+
return $(E) === h;
|
|
1325
1325
|
}
|
|
1326
|
-
function
|
|
1327
|
-
return
|
|
1326
|
+
function G(E) {
|
|
1327
|
+
return $(E) === c;
|
|
1328
1328
|
}
|
|
1329
|
-
function
|
|
1330
|
-
return
|
|
1329
|
+
function oe(E) {
|
|
1330
|
+
return $(E) === a;
|
|
1331
1331
|
}
|
|
1332
|
-
function
|
|
1333
|
-
return typeof
|
|
1332
|
+
function me(E) {
|
|
1333
|
+
return typeof E == "object" && E !== null && E.$$typeof === t;
|
|
1334
1334
|
}
|
|
1335
|
-
function
|
|
1336
|
-
return
|
|
1335
|
+
function _t(E) {
|
|
1336
|
+
return $(E) === f;
|
|
1337
1337
|
}
|
|
1338
|
-
function
|
|
1339
|
-
return
|
|
1338
|
+
function Tt(E) {
|
|
1339
|
+
return $(E) === n;
|
|
1340
1340
|
}
|
|
1341
|
-
function
|
|
1342
|
-
return
|
|
1341
|
+
function Ve(E) {
|
|
1342
|
+
return $(E) === R;
|
|
1343
1343
|
}
|
|
1344
|
-
function
|
|
1345
|
-
return
|
|
1344
|
+
function ze(E) {
|
|
1345
|
+
return $(E) === v;
|
|
1346
1346
|
}
|
|
1347
|
-
function
|
|
1348
|
-
return
|
|
1347
|
+
function Me(E) {
|
|
1348
|
+
return $(E) === r;
|
|
1349
1349
|
}
|
|
1350
|
-
function
|
|
1351
|
-
return
|
|
1350
|
+
function Ue(E) {
|
|
1351
|
+
return $(E) === i;
|
|
1352
1352
|
}
|
|
1353
|
-
function
|
|
1354
|
-
return
|
|
1353
|
+
function Pe(E) {
|
|
1354
|
+
return $(E) === o;
|
|
1355
1355
|
}
|
|
1356
|
-
function
|
|
1357
|
-
return
|
|
1356
|
+
function kt(E) {
|
|
1357
|
+
return $(E) === y;
|
|
1358
1358
|
}
|
|
1359
|
-
D.AsyncMode =
|
|
1359
|
+
D.AsyncMode = d, D.ConcurrentMode = q, D.ContextConsumer = A, D.ContextProvider = Ye, D.Element = Ee, D.ForwardRef = Te, D.Fragment = ke, D.Lazy = Se, 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 = _, D.typeOf = $;
|
|
1360
1360
|
}()), D;
|
|
1361
1361
|
}
|
|
1362
|
-
process.env.NODE_ENV === "production" ?
|
|
1363
|
-
var
|
|
1362
|
+
process.env.NODE_ENV === "production" ? Yt.exports = Wo() : Yt.exports = jo();
|
|
1363
|
+
var qo = Yt.exports, cn = qo, Yo = {
|
|
1364
1364
|
$$typeof: !0,
|
|
1365
1365
|
render: !0,
|
|
1366
1366
|
defaultProps: !0,
|
|
1367
1367
|
displayName: !0,
|
|
1368
1368
|
propTypes: !0
|
|
1369
|
-
},
|
|
1369
|
+
}, Vo = {
|
|
1370
1370
|
$$typeof: !0,
|
|
1371
1371
|
compare: !0,
|
|
1372
1372
|
defaultProps: !0,
|
|
1373
1373
|
displayName: !0,
|
|
1374
1374
|
propTypes: !0,
|
|
1375
1375
|
type: !0
|
|
1376
|
-
},
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
var
|
|
1380
|
-
function
|
|
1381
|
-
var
|
|
1382
|
-
return
|
|
1383
|
-
e[
|
|
1384
|
-
}),
|
|
1385
|
-
}
|
|
1386
|
-
var
|
|
1387
|
-
var
|
|
1376
|
+
}, ln = {};
|
|
1377
|
+
ln[cn.ForwardRef] = Yo;
|
|
1378
|
+
ln[cn.Memo] = Vo;
|
|
1379
|
+
var zo = !0;
|
|
1380
|
+
function Uo(e, t, r) {
|
|
1381
|
+
var n = "";
|
|
1382
|
+
return r.split(" ").forEach(function(o) {
|
|
1383
|
+
e[o] !== void 0 ? t.push(e[o] + ";") : o && (n += o + " ");
|
|
1384
|
+
}), n;
|
|
1385
|
+
}
|
|
1386
|
+
var un = function(t, r, n) {
|
|
1387
|
+
var o = t.key + "-" + r.name;
|
|
1388
1388
|
// we only need to add the styles to the registered cache if the
|
|
1389
1389
|
// class name could be used further down
|
|
1390
1390
|
// the tree but if it's a string tag, we know it won't
|
|
1391
1391
|
// so we don't have to add it to registered cache.
|
|
1392
1392
|
// this improves memory usage since we can avoid storing the whole style string
|
|
1393
|
-
(
|
|
1393
|
+
(n === !1 || // we need to always store it if we're in compat mode and
|
|
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
|
-
},
|
|
1399
|
-
|
|
1400
|
-
var
|
|
1401
|
-
if (
|
|
1402
|
-
var i =
|
|
1397
|
+
zo === !1) && t.registered[o] === void 0 && (t.registered[o] = r.styles);
|
|
1398
|
+
}, Bo = function(t, r, n) {
|
|
1399
|
+
un(t, r, n);
|
|
1400
|
+
var o = t.key + "-" + r.name;
|
|
1401
|
+
if (t.inserted[r.name] === void 0) {
|
|
1402
|
+
var i = r;
|
|
1403
1403
|
do
|
|
1404
|
-
|
|
1404
|
+
t.insert(r === i ? "." + o : "", i, t.sheet, !0), i = i.next;
|
|
1405
1405
|
while (i !== void 0);
|
|
1406
1406
|
}
|
|
1407
1407
|
};
|
|
1408
|
-
function
|
|
1409
|
-
for (var
|
|
1410
|
-
|
|
1411
|
-
(
|
|
1412
|
-
|
|
1413
|
-
(
|
|
1414
|
-
(
|
|
1415
|
-
switch (
|
|
1408
|
+
function Go(e) {
|
|
1409
|
+
for (var t = 0, r, n = 0, o = e.length; o >= 4; ++n, o -= 4)
|
|
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
|
+
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), r ^= /* k >>> r: */
|
|
1412
|
+
r >>> 24, t = /* Math.imul(k, m): */
|
|
1413
|
+
(r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
|
|
1414
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
1415
|
+
switch (o) {
|
|
1416
1416
|
case 3:
|
|
1417
|
-
|
|
1417
|
+
t ^= (e.charCodeAt(n + 2) & 255) << 16;
|
|
1418
1418
|
case 2:
|
|
1419
|
-
|
|
1419
|
+
t ^= (e.charCodeAt(n + 1) & 255) << 8;
|
|
1420
1420
|
case 1:
|
|
1421
|
-
|
|
1422
|
-
(
|
|
1421
|
+
t ^= e.charCodeAt(n) & 255, t = /* Math.imul(h, m): */
|
|
1422
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16);
|
|
1423
1423
|
}
|
|
1424
|
-
return
|
|
1425
|
-
(
|
|
1424
|
+
return t ^= t >>> 13, t = /* Math.imul(h, m): */
|
|
1425
|
+
(t & 65535) * 1540483477 + ((t >>> 16) * 59797 << 16), ((t ^ t >>> 15) >>> 0).toString(36);
|
|
1426
1426
|
}
|
|
1427
|
-
var
|
|
1427
|
+
var Ho = {
|
|
1428
1428
|
animationIterationCount: 1,
|
|
1429
1429
|
aspectRatio: 1,
|
|
1430
1430
|
borderImageOutset: 1,
|
|
@@ -1473,197 +1473,197 @@ var Dn = {
|
|
|
1473
1473
|
strokeMiterlimit: 1,
|
|
1474
1474
|
strokeOpacity: 1,
|
|
1475
1475
|
strokeWidth: 1
|
|
1476
|
-
},
|
|
1477
|
-
return
|
|
1478
|
-
},
|
|
1479
|
-
return
|
|
1480
|
-
},
|
|
1481
|
-
return
|
|
1482
|
-
}),
|
|
1483
|
-
switch (
|
|
1476
|
+
}, Jo = /[A-Z]|^ms/g, Ko = /_EMO_([^_]+?)_([^]*?)_EMO_/g, fn = function(t) {
|
|
1477
|
+
return t.charCodeAt(1) === 45;
|
|
1478
|
+
}, Or = function(t) {
|
|
1479
|
+
return t != null && typeof t != "boolean";
|
|
1480
|
+
}, Lt = /* @__PURE__ */ Po(function(e) {
|
|
1481
|
+
return fn(e) ? e : e.replace(Jo, "-$&").toLowerCase();
|
|
1482
|
+
}), Ar = function(t, r) {
|
|
1483
|
+
switch (t) {
|
|
1484
1484
|
case "animation":
|
|
1485
1485
|
case "animationName":
|
|
1486
|
-
if (typeof
|
|
1487
|
-
return
|
|
1488
|
-
return
|
|
1489
|
-
name:
|
|
1486
|
+
if (typeof r == "string")
|
|
1487
|
+
return r.replace(Ko, function(n, o, i) {
|
|
1488
|
+
return he = {
|
|
1489
|
+
name: o,
|
|
1490
1490
|
styles: i,
|
|
1491
|
-
next:
|
|
1492
|
-
},
|
|
1491
|
+
next: he
|
|
1492
|
+
}, o;
|
|
1493
1493
|
});
|
|
1494
1494
|
}
|
|
1495
|
-
return
|
|
1495
|
+
return Ho[t] !== 1 && !fn(t) && typeof r == "number" && r !== 0 ? r + "px" : r;
|
|
1496
1496
|
};
|
|
1497
|
-
function
|
|
1498
|
-
if (
|
|
1497
|
+
function et(e, t, r) {
|
|
1498
|
+
if (r == null)
|
|
1499
1499
|
return "";
|
|
1500
|
-
var
|
|
1501
|
-
if (
|
|
1502
|
-
return
|
|
1503
|
-
switch (typeof
|
|
1500
|
+
var n = r;
|
|
1501
|
+
if (n.__emotion_styles !== void 0)
|
|
1502
|
+
return n;
|
|
1503
|
+
switch (typeof r) {
|
|
1504
1504
|
case "boolean":
|
|
1505
1505
|
return "";
|
|
1506
1506
|
case "object": {
|
|
1507
|
-
var
|
|
1508
|
-
if (
|
|
1509
|
-
return
|
|
1510
|
-
name:
|
|
1511
|
-
styles:
|
|
1512
|
-
next:
|
|
1513
|
-
},
|
|
1514
|
-
var i =
|
|
1507
|
+
var o = r;
|
|
1508
|
+
if (o.anim === 1)
|
|
1509
|
+
return he = {
|
|
1510
|
+
name: o.name,
|
|
1511
|
+
styles: o.styles,
|
|
1512
|
+
next: he
|
|
1513
|
+
}, o.name;
|
|
1514
|
+
var i = r;
|
|
1515
1515
|
if (i.styles !== void 0) {
|
|
1516
|
-
var
|
|
1517
|
-
if (
|
|
1518
|
-
for (;
|
|
1519
|
-
|
|
1520
|
-
name:
|
|
1521
|
-
styles:
|
|
1522
|
-
next:
|
|
1523
|
-
},
|
|
1524
|
-
var
|
|
1525
|
-
return
|
|
1516
|
+
var a = i.next;
|
|
1517
|
+
if (a !== void 0)
|
|
1518
|
+
for (; a !== void 0; )
|
|
1519
|
+
he = {
|
|
1520
|
+
name: a.name,
|
|
1521
|
+
styles: a.styles,
|
|
1522
|
+
next: he
|
|
1523
|
+
}, a = a.next;
|
|
1524
|
+
var c = i.styles + ";";
|
|
1525
|
+
return c;
|
|
1526
1526
|
}
|
|
1527
|
-
return
|
|
1527
|
+
return Qo(e, t, r);
|
|
1528
1528
|
}
|
|
1529
1529
|
case "function": {
|
|
1530
1530
|
if (e !== void 0) {
|
|
1531
|
-
var
|
|
1532
|
-
return
|
|
1531
|
+
var l = he, h = r(e);
|
|
1532
|
+
return he = l, et(e, t, h);
|
|
1533
1533
|
}
|
|
1534
1534
|
break;
|
|
1535
1535
|
}
|
|
1536
1536
|
}
|
|
1537
|
-
var
|
|
1538
|
-
return
|
|
1537
|
+
var f = r;
|
|
1538
|
+
return f;
|
|
1539
1539
|
}
|
|
1540
|
-
function
|
|
1541
|
-
var
|
|
1542
|
-
if (Array.isArray(
|
|
1543
|
-
for (var
|
|
1544
|
-
|
|
1540
|
+
function Qo(e, t, r) {
|
|
1541
|
+
var n = "";
|
|
1542
|
+
if (Array.isArray(r))
|
|
1543
|
+
for (var o = 0; o < r.length; o++)
|
|
1544
|
+
n += et(e, t, r[o]) + ";";
|
|
1545
1545
|
else
|
|
1546
|
-
for (var i in
|
|
1547
|
-
var
|
|
1548
|
-
if (typeof
|
|
1549
|
-
var
|
|
1550
|
-
|
|
1551
|
-
} else if (Array.isArray(
|
|
1552
|
-
for (var
|
|
1553
|
-
|
|
1546
|
+
for (var i in r) {
|
|
1547
|
+
var a = r[i];
|
|
1548
|
+
if (typeof a != "object") {
|
|
1549
|
+
var c = a;
|
|
1550
|
+
Or(c) && (n += Lt(i) + ":" + Ar(i, c) + ";");
|
|
1551
|
+
} else if (Array.isArray(a) && typeof a[0] == "string" && t == null)
|
|
1552
|
+
for (var l = 0; l < a.length; l++)
|
|
1553
|
+
Or(a[l]) && (n += Lt(i) + ":" + Ar(i, a[l]) + ";");
|
|
1554
1554
|
else {
|
|
1555
|
-
var
|
|
1555
|
+
var h = et(e, t, a);
|
|
1556
1556
|
switch (i) {
|
|
1557
1557
|
case "animation":
|
|
1558
1558
|
case "animationName": {
|
|
1559
|
-
|
|
1559
|
+
n += Lt(i) + ":" + h + ";";
|
|
1560
1560
|
break;
|
|
1561
1561
|
}
|
|
1562
1562
|
default:
|
|
1563
|
-
|
|
1563
|
+
n += i + "{" + h + "}";
|
|
1564
1564
|
}
|
|
1565
1565
|
}
|
|
1566
1566
|
}
|
|
1567
|
-
return
|
|
1567
|
+
return n;
|
|
1568
1568
|
}
|
|
1569
|
-
var
|
|
1570
|
-
function
|
|
1569
|
+
var $r = /label:\s*([^\s;{]+)\s*(;|$)/g, he;
|
|
1570
|
+
function Xo(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
|
-
var
|
|
1574
|
-
|
|
1573
|
+
var n = !0, o = "";
|
|
1574
|
+
he = void 0;
|
|
1575
1575
|
var i = e[0];
|
|
1576
1576
|
if (i == null || i.raw === void 0)
|
|
1577
|
-
|
|
1577
|
+
n = !1, o += et(r, t, i);
|
|
1578
1578
|
else {
|
|
1579
|
-
var
|
|
1580
|
-
|
|
1581
|
-
}
|
|
1582
|
-
for (var
|
|
1583
|
-
if (
|
|
1584
|
-
var
|
|
1585
|
-
|
|
1586
|
-
}
|
|
1587
|
-
|
|
1588
|
-
for (var
|
|
1589
|
-
|
|
1590
|
-
var
|
|
1579
|
+
var a = i;
|
|
1580
|
+
o += a[0];
|
|
1581
|
+
}
|
|
1582
|
+
for (var c = 1; c < e.length; c++)
|
|
1583
|
+
if (o += et(r, t, e[c]), n) {
|
|
1584
|
+
var l = i;
|
|
1585
|
+
o += l[c];
|
|
1586
|
+
}
|
|
1587
|
+
$r.lastIndex = 0;
|
|
1588
|
+
for (var h = "", f; (f = $r.exec(o)) !== null; )
|
|
1589
|
+
h += "-" + f[1];
|
|
1590
|
+
var y = Go(o) + h;
|
|
1591
1591
|
return {
|
|
1592
|
-
name:
|
|
1593
|
-
styles:
|
|
1594
|
-
next:
|
|
1592
|
+
name: y,
|
|
1593
|
+
styles: o,
|
|
1594
|
+
next: he
|
|
1595
1595
|
};
|
|
1596
1596
|
}
|
|
1597
|
-
var
|
|
1598
|
-
return
|
|
1599
|
-
},
|
|
1597
|
+
var Zo = function(t) {
|
|
1598
|
+
return t();
|
|
1599
|
+
}, ei = ve.useInsertionEffect ? ve.useInsertionEffect : !1, ti = ei || Zo, 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__ */ Do({
|
|
1607
1607
|
key: "css"
|
|
1608
1608
|
}) : null
|
|
1609
1609
|
);
|
|
1610
|
-
|
|
1611
|
-
var
|
|
1612
|
-
return /* @__PURE__ */
|
|
1613
|
-
var
|
|
1614
|
-
return r
|
|
1610
|
+
hn.Provider;
|
|
1611
|
+
var ri = function(t) {
|
|
1612
|
+
return /* @__PURE__ */ rt(function(r, n) {
|
|
1613
|
+
var o = Jn(hn);
|
|
1614
|
+
return t(r, o, n);
|
|
1615
1615
|
});
|
|
1616
|
-
},
|
|
1617
|
-
var
|
|
1618
|
-
for (var
|
|
1619
|
-
|
|
1620
|
-
return
|
|
1621
|
-
},
|
|
1622
|
-
var
|
|
1623
|
-
return
|
|
1624
|
-
return
|
|
1616
|
+
}, ni = /* @__PURE__ */ ve.createContext({}), Qt = {}.hasOwnProperty, Vt = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", oi = function(t, r) {
|
|
1617
|
+
var n = {};
|
|
1618
|
+
for (var o in r)
|
|
1619
|
+
Qt.call(r, o) && (n[o] = r[o]);
|
|
1620
|
+
return n[Vt] = t, n;
|
|
1621
|
+
}, ii = function(t) {
|
|
1622
|
+
var r = t.cache, n = t.serialized, o = t.isStringTag;
|
|
1623
|
+
return un(r, n, o), ti(function() {
|
|
1624
|
+
return Bo(r, n, o);
|
|
1625
1625
|
}), null;
|
|
1626
|
-
},
|
|
1627
|
-
var
|
|
1628
|
-
typeof
|
|
1629
|
-
var
|
|
1630
|
-
typeof e.className == "string" ?
|
|
1631
|
-
var
|
|
1632
|
-
|
|
1633
|
-
var
|
|
1634
|
-
for (var
|
|
1635
|
-
|
|
1636
|
-
return
|
|
1637
|
-
cache:
|
|
1638
|
-
serialized:
|
|
1639
|
-
isStringTag: typeof
|
|
1640
|
-
}), /* @__PURE__ */
|
|
1641
|
-
}),
|
|
1642
|
-
return
|
|
1626
|
+
}, si = /* @__PURE__ */ ri(function(e, t, r) {
|
|
1627
|
+
var n = e.css;
|
|
1628
|
+
typeof n == "string" && t.registered[n] !== void 0 && (n = t.registered[n]);
|
|
1629
|
+
var o = e[Vt], i = [n], a = "";
|
|
1630
|
+
typeof e.className == "string" ? a = Uo(t.registered, i, e.className) : e.className != null && (a = e.className + " ");
|
|
1631
|
+
var c = Xo(i, void 0, ve.useContext(ni));
|
|
1632
|
+
a += t.key + "-" + c.name;
|
|
1633
|
+
var l = {};
|
|
1634
|
+
for (var h in e)
|
|
1635
|
+
Qt.call(e, h) && h !== "css" && h !== Vt && (l[h] = e[h]);
|
|
1636
|
+
return l.className = a, r && (l.ref = r), /* @__PURE__ */ ve.createElement(ve.Fragment, null, /* @__PURE__ */ ve.createElement(ii, {
|
|
1637
|
+
cache: t,
|
|
1638
|
+
serialized: c,
|
|
1639
|
+
isStringTag: typeof o == "string"
|
|
1640
|
+
}), /* @__PURE__ */ ve.createElement(o, l));
|
|
1641
|
+
}), ai = si, wt = function(t, r, n) {
|
|
1642
|
+
return Qt.call(r, "css") ? wr.jsx(ai, oi(t, r), n) : wr.jsx(t, r, n);
|
|
1643
1643
|
};
|
|
1644
|
-
function
|
|
1644
|
+
function ci(e) {
|
|
1645
1645
|
switch (e.toLowerCase()) {
|
|
1646
1646
|
case "sql":
|
|
1647
|
-
return
|
|
1647
|
+
return zr();
|
|
1648
1648
|
case "json":
|
|
1649
|
-
return
|
|
1649
|
+
return Ur();
|
|
1650
1650
|
default:
|
|
1651
1651
|
return [];
|
|
1652
1652
|
}
|
|
1653
1653
|
}
|
|
1654
|
-
function
|
|
1654
|
+
function li(e) {
|
|
1655
1655
|
return ["sql", "json"].includes(e.toLowerCase());
|
|
1656
1656
|
}
|
|
1657
|
-
function
|
|
1658
|
-
return
|
|
1657
|
+
function ui(e = {}) {
|
|
1658
|
+
return Hr(e);
|
|
1659
1659
|
}
|
|
1660
|
-
function
|
|
1661
|
-
return [
|
|
1660
|
+
function ss(e) {
|
|
1661
|
+
return [Zn(), eo(e)];
|
|
1662
1662
|
}
|
|
1663
|
-
function
|
|
1664
|
-
return
|
|
1663
|
+
function fi() {
|
|
1664
|
+
return we.of([Dt]);
|
|
1665
1665
|
}
|
|
1666
|
-
const
|
|
1666
|
+
const as = [fi(), ui()], hi = Jr.define([{
|
|
1667
1667
|
tag: W.keyword,
|
|
1668
1668
|
color: "#1a1aa6",
|
|
1669
1669
|
fontWeight: "bold"
|
|
@@ -1705,7 +1705,7 @@ const So = [eo(), Qn()], ro = at.define([{
|
|
|
1705
1705
|
tag: W.link,
|
|
1706
1706
|
color: "#0563c1",
|
|
1707
1707
|
textDecoration: "underline"
|
|
1708
|
-
}]),
|
|
1708
|
+
}]), Fr = [V.theme({
|
|
1709
1709
|
"&": {
|
|
1710
1710
|
backgroundColor: "#ffffff",
|
|
1711
1711
|
color: "#333333",
|
|
@@ -1749,7 +1749,7 @@ const So = [eo(), Qn()], ro = at.define([{
|
|
|
1749
1749
|
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
|
|
1750
1750
|
backgroundColor: "rgba(181, 213, 255, 0.5)"
|
|
1751
1751
|
}
|
|
1752
|
-
}),
|
|
1752
|
+
}), pt(hi)], di = Jr.define([{
|
|
1753
1753
|
tag: W.keyword,
|
|
1754
1754
|
color: "#569cd6",
|
|
1755
1755
|
fontWeight: "bold"
|
|
@@ -1791,7 +1791,7 @@ const So = [eo(), Qn()], ro = at.define([{
|
|
|
1791
1791
|
tag: W.link,
|
|
1792
1792
|
color: "#4e94ce",
|
|
1793
1793
|
textDecoration: "underline"
|
|
1794
|
-
}]),
|
|
1794
|
+
}]), pi = [V.theme({
|
|
1795
1795
|
"&": {
|
|
1796
1796
|
backgroundColor: "#1e1e1e",
|
|
1797
1797
|
color: "#d4d4d4",
|
|
@@ -1835,53 +1835,53 @@ const So = [eo(), Qn()], ro = at.define([{
|
|
|
1835
1835
|
"&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
|
|
1836
1836
|
backgroundColor: "rgba(255, 255, 255, 0.1)"
|
|
1837
1837
|
}
|
|
1838
|
-
}),
|
|
1839
|
-
function
|
|
1838
|
+
}), pt(di)];
|
|
1839
|
+
function mi(e) {
|
|
1840
1840
|
switch (e) {
|
|
1841
1841
|
case "light":
|
|
1842
|
-
return
|
|
1842
|
+
return Fr;
|
|
1843
1843
|
case "dark":
|
|
1844
|
-
return
|
|
1844
|
+
return pi;
|
|
1845
1845
|
default:
|
|
1846
|
-
return
|
|
1846
|
+
return Fr;
|
|
1847
1847
|
}
|
|
1848
1848
|
}
|
|
1849
|
-
const
|
|
1850
|
-
const
|
|
1849
|
+
const Lr = (e) => {
|
|
1850
|
+
const t = {
|
|
1851
1851
|
value: "",
|
|
1852
1852
|
readOnlyRanges: []
|
|
1853
1853
|
};
|
|
1854
|
-
let
|
|
1855
|
-
return e.forEach((
|
|
1854
|
+
let r = 0;
|
|
1855
|
+
return e.forEach((n) => {
|
|
1856
1856
|
const {
|
|
1857
|
-
content:
|
|
1857
|
+
content: o,
|
|
1858
1858
|
editable: i
|
|
1859
|
-
} =
|
|
1860
|
-
`),
|
|
1861
|
-
|
|
1862
|
-
start:
|
|
1863
|
-
end:
|
|
1864
|
-
}),
|
|
1865
|
-
}),
|
|
1866
|
-
},
|
|
1859
|
+
} = n, a = o.replace(/\r\n/g, `
|
|
1860
|
+
`), c = r, l = c + a.length;
|
|
1861
|
+
t.value += o, i || t.readOnlyRanges.push({
|
|
1862
|
+
start: c,
|
|
1863
|
+
end: l
|
|
1864
|
+
}), r = l;
|
|
1865
|
+
}), t;
|
|
1866
|
+
}, gt = je.define(), Nr = Gt.define({
|
|
1867
1867
|
create() {
|
|
1868
|
-
return
|
|
1868
|
+
return Q.none;
|
|
1869
1869
|
},
|
|
1870
|
-
update(e,
|
|
1871
|
-
e = e.map(
|
|
1872
|
-
for (const
|
|
1873
|
-
if (
|
|
1874
|
-
return console.log(2939),
|
|
1875
|
-
return
|
|
1870
|
+
update(e, t) {
|
|
1871
|
+
e = e.map(t.changes);
|
|
1872
|
+
for (const r of t.effects)
|
|
1873
|
+
if (r.is(gt))
|
|
1874
|
+
return console.log(2939), dn(r.value);
|
|
1875
|
+
return t.docChanged, e;
|
|
1876
1876
|
},
|
|
1877
1877
|
provide(e) {
|
|
1878
|
-
return
|
|
1878
|
+
return V.decorations.from(e);
|
|
1879
1879
|
}
|
|
1880
1880
|
});
|
|
1881
|
-
function
|
|
1882
|
-
const
|
|
1883
|
-
return console.log(e, 9999299), e.forEach((
|
|
1884
|
-
|
|
1881
|
+
function dn(e) {
|
|
1882
|
+
const t = [];
|
|
1883
|
+
return console.log(e, 9999299), e.forEach((r) => {
|
|
1884
|
+
r.start < r.end && t.push(Q.mark({
|
|
1885
1885
|
inclusive: !0,
|
|
1886
1886
|
attributes: {
|
|
1887
1887
|
class: "cm-readOnly",
|
|
@@ -1889,502 +1889,1546 @@ function yt(e) {
|
|
|
1889
1889
|
},
|
|
1890
1890
|
// 设置较低的优先级,确保语法高亮装饰可以覆盖
|
|
1891
1891
|
priority: -100
|
|
1892
|
-
}).range(
|
|
1893
|
-
}),
|
|
1892
|
+
}).range(r.start, r.end));
|
|
1893
|
+
}), Q.set(t);
|
|
1894
1894
|
}
|
|
1895
|
-
const
|
|
1896
|
-
function
|
|
1897
|
-
let
|
|
1898
|
-
...
|
|
1895
|
+
const Xt = /* @__PURE__ */ new WeakMap();
|
|
1896
|
+
function gi(e) {
|
|
1897
|
+
let t = e.map((r) => ({
|
|
1898
|
+
...r
|
|
1899
1899
|
}));
|
|
1900
1900
|
return [
|
|
1901
1901
|
// 添加状态字段
|
|
1902
|
-
|
|
1902
|
+
Nr.init(() => dn(t)),
|
|
1903
1903
|
// 添加按键映射,专门处理回车键
|
|
1904
|
-
|
|
1904
|
+
we.of([{
|
|
1905
1905
|
key: "Enter",
|
|
1906
|
-
run: (
|
|
1907
|
-
const
|
|
1908
|
-
from:
|
|
1906
|
+
run: (r) => {
|
|
1907
|
+
const n = r.state.selection.main, {
|
|
1908
|
+
from: o,
|
|
1909
1909
|
to: i
|
|
1910
|
-
} =
|
|
1911
|
-
if (
|
|
1912
|
-
for (const
|
|
1913
|
-
if (
|
|
1910
|
+
} = n;
|
|
1911
|
+
if (o !== i) {
|
|
1912
|
+
for (const c of t)
|
|
1913
|
+
if (o < c.end && i > c.start)
|
|
1914
1914
|
return !1;
|
|
1915
1915
|
}
|
|
1916
|
-
let
|
|
1917
|
-
for (const
|
|
1918
|
-
if (
|
|
1919
|
-
|
|
1916
|
+
let a = !1;
|
|
1917
|
+
for (const c of t)
|
|
1918
|
+
if (o > c.start && o < c.end) {
|
|
1919
|
+
a = !0;
|
|
1920
1920
|
break;
|
|
1921
1921
|
}
|
|
1922
|
-
return
|
|
1922
|
+
return a ? !1 : (r.dispatch({
|
|
1923
1923
|
changes: {
|
|
1924
|
-
from:
|
|
1924
|
+
from: o,
|
|
1925
1925
|
to: i,
|
|
1926
1926
|
insert: `
|
|
1927
1927
|
`
|
|
1928
1928
|
},
|
|
1929
1929
|
selection: {
|
|
1930
|
-
anchor:
|
|
1930
|
+
anchor: o + 1
|
|
1931
1931
|
}
|
|
1932
1932
|
}), !0);
|
|
1933
1933
|
}
|
|
1934
1934
|
}]),
|
|
1935
1935
|
// 添加事务过滤器,阻止只读区域的编辑
|
|
1936
|
-
|
|
1937
|
-
if (!
|
|
1938
|
-
return
|
|
1939
|
-
let
|
|
1940
|
-
return
|
|
1941
|
-
if (!(
|
|
1942
|
-
` &&
|
|
1943
|
-
for (const
|
|
1944
|
-
if (
|
|
1945
|
-
if (
|
|
1946
|
-
|
|
1936
|
+
be.transactionFilter.of((r) => {
|
|
1937
|
+
if (!r.docChanged || r.isUserEvent("input.type.Enter") || r.isUserEvent("input.enter"))
|
|
1938
|
+
return r;
|
|
1939
|
+
let n = !1;
|
|
1940
|
+
return r.changes.iterChanges((o, i, a, c) => {
|
|
1941
|
+
if (!(r.newDoc.sliceString(a, c) === `
|
|
1942
|
+
` && o === i)) {
|
|
1943
|
+
for (const f of t)
|
|
1944
|
+
if (o === i) {
|
|
1945
|
+
if (o > f.start && o < f.end) {
|
|
1946
|
+
n = !0;
|
|
1947
1947
|
break;
|
|
1948
1948
|
}
|
|
1949
1949
|
} else if (
|
|
1950
1950
|
// 删除或替换操作
|
|
1951
|
-
|
|
1952
|
-
|
|
1951
|
+
o < f.end && i > f.start || // 处理边界情况:删除操作正好落在只读区域的开始或结束位置
|
|
1952
|
+
o === f.start && i > o || i === f.end && o < i
|
|
1953
1953
|
) {
|
|
1954
|
-
|
|
1954
|
+
n = !0;
|
|
1955
1955
|
break;
|
|
1956
1956
|
}
|
|
1957
1957
|
}
|
|
1958
|
-
}),
|
|
1958
|
+
}), n ? [] : r;
|
|
1959
1959
|
}),
|
|
1960
1960
|
// 动态更新只读区域的装饰
|
|
1961
|
-
|
|
1962
|
-
if (
|
|
1963
|
-
const
|
|
1964
|
-
!
|
|
1965
|
-
effects:
|
|
1966
|
-
})) :
|
|
1967
|
-
effects:
|
|
1961
|
+
V.updateListener.of((r) => {
|
|
1962
|
+
if (r.docChanged) {
|
|
1963
|
+
const n = yi(t, r);
|
|
1964
|
+
!vi(t, n) ? (t = n, Xt.set(r.view, n), r.view.dispatch({
|
|
1965
|
+
effects: gt.of(n)
|
|
1966
|
+
})) : r.view.dispatch({
|
|
1967
|
+
effects: gt.of(n)
|
|
1968
1968
|
});
|
|
1969
1969
|
}
|
|
1970
1970
|
}),
|
|
1971
1971
|
// 添加一个延迟执行的额外更新,以确保在文档变化后能重新计算语法高亮
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1972
|
+
V.updateListener.of((r) => {
|
|
1973
|
+
r.docChanged && setTimeout(() => {
|
|
1974
|
+
r.view.state.field(Nr, !1) && r.view.dispatch({});
|
|
1975
1975
|
}, 10);
|
|
1976
1976
|
})
|
|
1977
1977
|
];
|
|
1978
1978
|
}
|
|
1979
|
-
function
|
|
1980
|
-
if (e.length !==
|
|
1979
|
+
function vi(e, t) {
|
|
1980
|
+
if (e.length !== t.length)
|
|
1981
1981
|
return !1;
|
|
1982
|
-
for (let
|
|
1983
|
-
if (e[
|
|
1982
|
+
for (let r = 0; r < e.length; r++)
|
|
1983
|
+
if (e[r].start !== t[r].start || e[r].end !== t[r].end)
|
|
1984
1984
|
return !1;
|
|
1985
1985
|
return !0;
|
|
1986
1986
|
}
|
|
1987
|
-
function
|
|
1988
|
-
var
|
|
1989
|
-
if (!
|
|
1987
|
+
function yi(e, t) {
|
|
1988
|
+
var o;
|
|
1989
|
+
if (!t.docChanged)
|
|
1990
1990
|
return e;
|
|
1991
|
-
let
|
|
1992
|
-
const
|
|
1993
|
-
const
|
|
1991
|
+
let r = !1;
|
|
1992
|
+
const n = e.map((i) => {
|
|
1993
|
+
const a = {
|
|
1994
1994
|
...i
|
|
1995
1995
|
};
|
|
1996
|
-
return
|
|
1997
|
-
const
|
|
1998
|
-
if (
|
|
1999
|
-
|
|
1996
|
+
return t.changes.iterChanges((c, l, h, f) => {
|
|
1997
|
+
const y = f - h, C = l - c, v = y - C;
|
|
1998
|
+
if (c === 0 && (r = !0), c === 0 && y > 0 && i.start === 0) {
|
|
1999
|
+
a.start = y, a.end += v;
|
|
2000
2000
|
return;
|
|
2001
2001
|
}
|
|
2002
|
-
if (
|
|
2003
|
-
|
|
2004
|
-
else if (
|
|
2005
|
-
|
|
2006
|
-
else if (!(
|
|
2007
|
-
if (
|
|
2008
|
-
const
|
|
2009
|
-
|
|
2002
|
+
if (l <= i.start)
|
|
2003
|
+
a.start += v, a.end += v;
|
|
2004
|
+
else if (c >= i.start && c < i.end && l >= i.end)
|
|
2005
|
+
a.end = c;
|
|
2006
|
+
else if (!(c >= i.start && l <= i.end)) {
|
|
2007
|
+
if (c < i.end && l > i.end) {
|
|
2008
|
+
const R = i.end - c;
|
|
2009
|
+
a.end = c + Math.min(R, y);
|
|
2010
2010
|
}
|
|
2011
2011
|
}
|
|
2012
|
-
}),
|
|
2012
|
+
}), a;
|
|
2013
2013
|
});
|
|
2014
|
-
if (
|
|
2015
|
-
const i = ((
|
|
2016
|
-
let
|
|
2017
|
-
for (let
|
|
2018
|
-
|
|
2019
|
-
|
|
2014
|
+
if (r && n.length > 0) {
|
|
2015
|
+
const i = ((o = t.changes.newDoc) == null ? void 0 : o.toString()) || "";
|
|
2016
|
+
let a = 0;
|
|
2017
|
+
for (let c = 0; c < i.length && /\s/.test(i[c]); c++)
|
|
2018
|
+
a++;
|
|
2019
|
+
n[0].start === 0 && a > 0 && (n[0].start = a);
|
|
2020
2020
|
}
|
|
2021
|
-
return
|
|
2021
|
+
return n.filter((i) => i.start < i.end);
|
|
2022
2022
|
}
|
|
2023
|
-
function
|
|
2024
|
-
return
|
|
2023
|
+
function bi(e) {
|
|
2024
|
+
return Xt.get(e) || [];
|
|
2025
2025
|
}
|
|
2026
|
-
function
|
|
2027
|
-
const
|
|
2028
|
-
...
|
|
2026
|
+
function ye(e, t) {
|
|
2027
|
+
const r = t.map((n) => ({
|
|
2028
|
+
...n
|
|
2029
2029
|
}));
|
|
2030
|
-
|
|
2031
|
-
effects:
|
|
2030
|
+
Xt.set(e, r), e.dispatch({
|
|
2031
|
+
effects: gt.of(r)
|
|
2032
2032
|
}), setTimeout(() => {
|
|
2033
2033
|
e.dom && document.contains(e.dom) && e.dispatch({});
|
|
2034
2034
|
}, 10);
|
|
2035
2035
|
}
|
|
2036
|
-
|
|
2036
|
+
function H() {
|
|
2037
|
+
var e = arguments[0];
|
|
2038
|
+
typeof e == "string" && (e = document.createElement(e));
|
|
2039
|
+
var t = 1, r = arguments[1];
|
|
2040
|
+
if (r && typeof r == "object" && r.nodeType == null && !Array.isArray(r)) {
|
|
2041
|
+
for (var n in r) if (Object.prototype.hasOwnProperty.call(r, n)) {
|
|
2042
|
+
var o = r[n];
|
|
2043
|
+
typeof o == "string" ? e.setAttribute(n, o) : o != null && (e[n] = o);
|
|
2044
|
+
}
|
|
2045
|
+
t++;
|
|
2046
|
+
}
|
|
2047
|
+
for (; t < arguments.length; t++) pn(e, arguments[t]);
|
|
2048
|
+
return e;
|
|
2049
|
+
}
|
|
2050
|
+
function pn(e, t) {
|
|
2051
|
+
if (typeof t == "string")
|
|
2052
|
+
e.appendChild(document.createTextNode(t));
|
|
2053
|
+
else if (t != null) if (t.nodeType != null)
|
|
2054
|
+
e.appendChild(t);
|
|
2055
|
+
else if (Array.isArray(t))
|
|
2056
|
+
for (var r = 0; r < t.length; r++) pn(e, t[r]);
|
|
2057
|
+
else
|
|
2058
|
+
throw new RangeError("Unsupported child node: " + t);
|
|
2059
|
+
}
|
|
2060
|
+
const Ir = typeof String.prototype.normalize == "function" ? (e) => e.normalize("NFKD") : (e) => e;
|
|
2061
|
+
class We {
|
|
2062
|
+
/**
|
|
2063
|
+
Create a text cursor. The query is the search string, `from` to
|
|
2064
|
+
`to` provides the region to search.
|
|
2065
|
+
|
|
2066
|
+
When `normalize` is given, it will be called, on both the query
|
|
2067
|
+
string and the content it is matched against, before comparing.
|
|
2068
|
+
You can, for example, create a case-insensitive search by
|
|
2069
|
+
passing `s => s.toLowerCase()`.
|
|
2070
|
+
|
|
2071
|
+
Text is always normalized with
|
|
2072
|
+
[`.normalize("NFKD")`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/normalize)
|
|
2073
|
+
(when supported).
|
|
2074
|
+
*/
|
|
2075
|
+
constructor(t, r, n = 0, o = t.length, i, a) {
|
|
2076
|
+
this.test = a, this.value = { from: 0, to: 0 }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = t.iterRange(n, o), this.bufferStart = n, this.normalize = i ? (c) => i(Ir(c)) : Ir, this.query = this.normalize(r);
|
|
2077
|
+
}
|
|
2078
|
+
peek() {
|
|
2079
|
+
if (this.bufferPos == this.buffer.length) {
|
|
2080
|
+
if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done)
|
|
2081
|
+
return -1;
|
|
2082
|
+
this.bufferPos = 0, this.buffer = this.iter.value;
|
|
2083
|
+
}
|
|
2084
|
+
return ro(this.buffer, this.bufferPos);
|
|
2085
|
+
}
|
|
2086
|
+
/**
|
|
2087
|
+
Look for the next match. Updates the iterator's
|
|
2088
|
+
[`value`](https://codemirror.net/6/docs/ref/#search.SearchCursor.value) and
|
|
2089
|
+
[`done`](https://codemirror.net/6/docs/ref/#search.SearchCursor.done) properties. Should be called
|
|
2090
|
+
at least once before using the cursor.
|
|
2091
|
+
*/
|
|
2092
|
+
next() {
|
|
2093
|
+
for (; this.matches.length; )
|
|
2094
|
+
this.matches.pop();
|
|
2095
|
+
return this.nextOverlapping();
|
|
2096
|
+
}
|
|
2097
|
+
/**
|
|
2098
|
+
The `next` method will ignore matches that partially overlap a
|
|
2099
|
+
previous match. This method behaves like `next`, but includes
|
|
2100
|
+
such matches.
|
|
2101
|
+
*/
|
|
2102
|
+
nextOverlapping() {
|
|
2103
|
+
for (; ; ) {
|
|
2104
|
+
let t = this.peek();
|
|
2105
|
+
if (t < 0)
|
|
2106
|
+
return this.done = !0, this;
|
|
2107
|
+
let r = no(t), n = this.bufferStart + this.bufferPos;
|
|
2108
|
+
this.bufferPos += oo(t);
|
|
2109
|
+
let o = this.normalize(r);
|
|
2110
|
+
if (o.length)
|
|
2111
|
+
for (let i = 0, a = n; ; i++) {
|
|
2112
|
+
let c = o.charCodeAt(i), l = this.match(c, a, this.bufferPos + this.bufferStart);
|
|
2113
|
+
if (i == o.length - 1) {
|
|
2114
|
+
if (l)
|
|
2115
|
+
return this.value = l, this;
|
|
2116
|
+
break;
|
|
2117
|
+
}
|
|
2118
|
+
a == n && i < r.length && r.charCodeAt(i) == c && a++;
|
|
2119
|
+
}
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
match(t, r, n) {
|
|
2123
|
+
let o = null;
|
|
2124
|
+
for (let i = 0; i < this.matches.length; i += 2) {
|
|
2125
|
+
let a = this.matches[i], c = !1;
|
|
2126
|
+
this.query.charCodeAt(a) == t && (a == this.query.length - 1 ? o = { from: this.matches[i + 1], to: n } : (this.matches[i]++, c = !0)), c || (this.matches.splice(i, 2), i -= 2);
|
|
2127
|
+
}
|
|
2128
|
+
return this.query.charCodeAt(0) == t && (this.query.length == 1 ? o = { from: r, to: n } : this.matches.push(1, r)), o && this.test && !this.test(o.from, o.to, this.buffer, this.bufferStart) && (o = null), o;
|
|
2129
|
+
}
|
|
2130
|
+
}
|
|
2131
|
+
typeof Symbol < "u" && (We.prototype[Symbol.iterator] = function() {
|
|
2132
|
+
return this;
|
|
2133
|
+
});
|
|
2134
|
+
const mn = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, Zt = "gm" + (/x/.unicode == null ? "" : "u");
|
|
2135
|
+
class gn {
|
|
2136
|
+
/**
|
|
2137
|
+
Create a cursor that will search the given range in the given
|
|
2138
|
+
document. `query` should be the raw pattern (as you'd pass it to
|
|
2139
|
+
`new RegExp`).
|
|
2140
|
+
*/
|
|
2141
|
+
constructor(t, r, n, o = 0, i = t.length) {
|
|
2142
|
+
if (this.text = t, this.to = i, this.curLine = "", this.done = !1, this.value = mn, /\\[sWDnr]|\n|\r|\[\^/.test(r))
|
|
2143
|
+
return new vn(t, r, n, o, i);
|
|
2144
|
+
this.re = new RegExp(r, Zt + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.iter = t.iter();
|
|
2145
|
+
let a = t.lineAt(o);
|
|
2146
|
+
this.curLineStart = a.from, this.matchPos = vt(t, o), this.getLine(this.curLineStart);
|
|
2147
|
+
}
|
|
2148
|
+
getLine(t) {
|
|
2149
|
+
this.iter.next(t), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
|
|
2150
|
+
}
|
|
2151
|
+
nextLine() {
|
|
2152
|
+
this.curLineStart = this.curLineStart + this.curLine.length + 1, this.curLineStart > this.to ? this.curLine = "" : this.getLine(0);
|
|
2153
|
+
}
|
|
2154
|
+
/**
|
|
2155
|
+
Move to the next match, if there is one.
|
|
2156
|
+
*/
|
|
2157
|
+
next() {
|
|
2158
|
+
for (let t = this.matchPos - this.curLineStart; ; ) {
|
|
2159
|
+
this.re.lastIndex = t;
|
|
2160
|
+
let r = this.matchPos <= this.to && this.re.exec(this.curLine);
|
|
2161
|
+
if (r) {
|
|
2162
|
+
let n = this.curLineStart + r.index, o = n + r[0].length;
|
|
2163
|
+
if (this.matchPos = vt(this.text, o + (n == o ? 1 : 0)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < o || n > this.value.to) && (!this.test || this.test(n, o, r)))
|
|
2164
|
+
return this.value = { from: n, to: o, match: r }, this;
|
|
2165
|
+
t = this.matchPos - this.curLineStart;
|
|
2166
|
+
} else if (this.curLineStart + this.curLine.length < this.to)
|
|
2167
|
+
this.nextLine(), t = 0;
|
|
2168
|
+
else
|
|
2169
|
+
return this.done = !0, this;
|
|
2170
|
+
}
|
|
2171
|
+
}
|
|
2172
|
+
}
|
|
2173
|
+
const Nt = /* @__PURE__ */ new WeakMap();
|
|
2174
|
+
class Ie {
|
|
2175
|
+
constructor(t, r) {
|
|
2176
|
+
this.from = t, this.text = r;
|
|
2177
|
+
}
|
|
2178
|
+
get to() {
|
|
2179
|
+
return this.from + this.text.length;
|
|
2180
|
+
}
|
|
2181
|
+
static get(t, r, n) {
|
|
2182
|
+
let o = Nt.get(t);
|
|
2183
|
+
if (!o || o.from >= n || o.to <= r) {
|
|
2184
|
+
let c = new Ie(r, t.sliceString(r, n));
|
|
2185
|
+
return Nt.set(t, c), c;
|
|
2186
|
+
}
|
|
2187
|
+
if (o.from == r && o.to == n)
|
|
2188
|
+
return o;
|
|
2189
|
+
let { text: i, from: a } = o;
|
|
2190
|
+
return a > r && (i = t.sliceString(r, a) + i, a = r), o.to < n && (i += t.sliceString(o.to, n)), Nt.set(t, new Ie(a, i)), new Ie(r, i.slice(r - a, n - a));
|
|
2191
|
+
}
|
|
2192
|
+
}
|
|
2193
|
+
class vn {
|
|
2194
|
+
constructor(t, r, n, o, i) {
|
|
2195
|
+
this.text = t, this.to = i, this.done = !1, this.value = mn, this.matchPos = vt(t, o), this.re = new RegExp(r, Zt + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = Ie.get(t, o, this.chunkEnd(
|
|
2196
|
+
o + 5e3
|
|
2197
|
+
/* Chunk.Base */
|
|
2198
|
+
));
|
|
2199
|
+
}
|
|
2200
|
+
chunkEnd(t) {
|
|
2201
|
+
return t >= this.to ? this.to : this.text.lineAt(t).to;
|
|
2202
|
+
}
|
|
2203
|
+
next() {
|
|
2204
|
+
for (; ; ) {
|
|
2205
|
+
let t = this.re.lastIndex = this.matchPos - this.flat.from, r = this.re.exec(this.flat.text);
|
|
2206
|
+
if (r && !r[0] && r.index == t && (this.re.lastIndex = t + 1, r = this.re.exec(this.flat.text)), r) {
|
|
2207
|
+
let n = this.flat.from + r.index, o = n + r[0].length;
|
|
2208
|
+
if ((this.flat.to >= this.to || r.index + r[0].length <= this.flat.text.length - 10) && (!this.test || this.test(n, o, r)))
|
|
2209
|
+
return this.value = { from: n, to: o, match: r }, this.matchPos = vt(this.text, o + (n == o ? 1 : 0)), this;
|
|
2210
|
+
}
|
|
2211
|
+
if (this.flat.to == this.to)
|
|
2212
|
+
return this.done = !0, this;
|
|
2213
|
+
this.flat = Ie.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
|
|
2214
|
+
}
|
|
2215
|
+
}
|
|
2216
|
+
}
|
|
2217
|
+
typeof Symbol < "u" && (gn.prototype[Symbol.iterator] = vn.prototype[Symbol.iterator] = function() {
|
|
2218
|
+
return this;
|
|
2219
|
+
});
|
|
2220
|
+
function xi(e) {
|
|
2221
|
+
try {
|
|
2222
|
+
return new RegExp(e, Zt), !0;
|
|
2223
|
+
} catch {
|
|
2224
|
+
return !1;
|
|
2225
|
+
}
|
|
2226
|
+
}
|
|
2227
|
+
function vt(e, t) {
|
|
2228
|
+
if (t >= e.length)
|
|
2229
|
+
return t;
|
|
2230
|
+
let r = e.lineAt(t), n;
|
|
2231
|
+
for (; t < r.to && (n = r.text.charCodeAt(t - r.from)) >= 56320 && n < 57344; )
|
|
2232
|
+
t++;
|
|
2233
|
+
return t;
|
|
2234
|
+
}
|
|
2235
|
+
function zt(e) {
|
|
2236
|
+
let t = String(e.state.doc.lineAt(e.state.selection.main.head).number), r = H("input", { class: "cm-textfield", name: "line", value: t }), n = H("form", {
|
|
2237
|
+
class: "cm-gotoLine",
|
|
2238
|
+
onkeydown: (i) => {
|
|
2239
|
+
i.keyCode == 27 ? (i.preventDefault(), e.dispatch({ effects: Qe.of(!1) }), e.focus()) : i.keyCode == 13 && (i.preventDefault(), o());
|
|
2240
|
+
},
|
|
2241
|
+
onsubmit: (i) => {
|
|
2242
|
+
i.preventDefault(), o();
|
|
2243
|
+
}
|
|
2244
|
+
}, H("label", e.state.phrase("Go to line"), ": ", r), " ", H("button", { class: "cm-button", type: "submit" }, e.state.phrase("go")), H("button", {
|
|
2245
|
+
name: "close",
|
|
2246
|
+
onclick: () => {
|
|
2247
|
+
e.dispatch({ effects: Qe.of(!1) }), e.focus();
|
|
2248
|
+
},
|
|
2249
|
+
"aria-label": e.state.phrase("close"),
|
|
2250
|
+
type: "button"
|
|
2251
|
+
}, ["×"]));
|
|
2252
|
+
function o() {
|
|
2253
|
+
let i = /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.value);
|
|
2254
|
+
if (!i)
|
|
2255
|
+
return;
|
|
2256
|
+
let { state: a } = e, c = a.doc.lineAt(a.selection.main.head), [, l, h, f, y] = i, C = f ? +f.slice(1) : 0, v = h ? +h : c.number;
|
|
2257
|
+
if (h && y) {
|
|
2258
|
+
let x = v / 100;
|
|
2259
|
+
l && (x = x * (l == "-" ? -1 : 1) + c.number / a.doc.lines), v = Math.round(a.doc.lines * x);
|
|
2260
|
+
} else h && l && (v = v * (l == "-" ? -1 : 1) + c.number);
|
|
2261
|
+
let R = a.doc.line(Math.max(1, Math.min(a.doc.lines, v))), m = le.cursor(R.from + Math.max(0, Math.min(C, R.length)));
|
|
2262
|
+
e.dispatch({
|
|
2263
|
+
effects: [Qe.of(!1), V.scrollIntoView(m.from, { y: "center" })],
|
|
2264
|
+
selection: m
|
|
2265
|
+
}), e.focus();
|
|
2266
|
+
}
|
|
2267
|
+
return { dom: n };
|
|
2268
|
+
}
|
|
2269
|
+
const Qe = /* @__PURE__ */ je.define(), Dr = /* @__PURE__ */ Gt.define({
|
|
2270
|
+
create() {
|
|
2271
|
+
return !0;
|
|
2272
|
+
},
|
|
2273
|
+
update(e, t) {
|
|
2274
|
+
for (let r of t.effects)
|
|
2275
|
+
r.is(Qe) && (e = r.value);
|
|
2276
|
+
return e;
|
|
2277
|
+
},
|
|
2278
|
+
provide: (e) => Gr.from(e, (t) => t ? zt : null)
|
|
2279
|
+
}), Ei = (e) => {
|
|
2280
|
+
let t = dt(e, zt);
|
|
2281
|
+
if (!t) {
|
|
2282
|
+
let r = [Qe.of(!0)];
|
|
2283
|
+
e.state.field(Dr, !1) == null && r.push(je.appendConfig.of([Dr, Si])), e.dispatch({ effects: r }), t = dt(e, zt);
|
|
2284
|
+
}
|
|
2285
|
+
return t && t.dom.querySelector("input").select(), !0;
|
|
2286
|
+
}, Si = /* @__PURE__ */ V.baseTheme({
|
|
2287
|
+
".cm-panel.cm-gotoLine": {
|
|
2288
|
+
padding: "2px 6px 4px",
|
|
2289
|
+
position: "relative",
|
|
2290
|
+
"& label": { fontSize: "80%" },
|
|
2291
|
+
"& [name=close]": {
|
|
2292
|
+
position: "absolute",
|
|
2293
|
+
top: "0",
|
|
2294
|
+
bottom: "0",
|
|
2295
|
+
right: "4px",
|
|
2296
|
+
backgroundColor: "inherit",
|
|
2297
|
+
border: "none",
|
|
2298
|
+
font: "inherit",
|
|
2299
|
+
padding: "0"
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
}), Ci = {
|
|
2303
|
+
highlightWordAroundCursor: !1,
|
|
2304
|
+
minSelectionLength: 1,
|
|
2305
|
+
maxMatches: 100,
|
|
2306
|
+
wholeWords: !1
|
|
2307
|
+
}, yn = /* @__PURE__ */ Kr.define({
|
|
2308
|
+
combine(e) {
|
|
2309
|
+
return Xr(e, Ci, {
|
|
2310
|
+
highlightWordAroundCursor: (t, r) => t || r,
|
|
2311
|
+
minSelectionLength: Math.min,
|
|
2312
|
+
maxMatches: Math.min
|
|
2313
|
+
});
|
|
2314
|
+
}
|
|
2315
|
+
});
|
|
2316
|
+
function er(e) {
|
|
2317
|
+
let t = [ki, Ti];
|
|
2318
|
+
return e && t.push(yn.of(e)), t;
|
|
2319
|
+
}
|
|
2320
|
+
const Ri = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch" }), wi = /* @__PURE__ */ Q.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
|
|
2321
|
+
function Wr(e, t, r, n) {
|
|
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
|
+
}
|
|
2324
|
+
function _i(e, t, r, n) {
|
|
2325
|
+
return e(t.sliceDoc(r, r + 1)) == ae.Word && e(t.sliceDoc(n - 1, n)) == ae.Word;
|
|
2326
|
+
}
|
|
2327
|
+
const Ti = /* @__PURE__ */ Br.fromClass(class {
|
|
2328
|
+
constructor(e) {
|
|
2329
|
+
this.decorations = this.getDeco(e);
|
|
2330
|
+
}
|
|
2331
|
+
update(e) {
|
|
2332
|
+
(e.selectionSet || e.docChanged || e.viewportChanged) && (this.decorations = this.getDeco(e.view));
|
|
2333
|
+
}
|
|
2334
|
+
getDeco(e) {
|
|
2335
|
+
let t = e.state.facet(yn), { state: r } = e, n = r.selection;
|
|
2336
|
+
if (n.ranges.length > 1)
|
|
2337
|
+
return Q.none;
|
|
2338
|
+
let o = n.main, i, a = null;
|
|
2339
|
+
if (o.empty) {
|
|
2340
|
+
if (!t.highlightWordAroundCursor)
|
|
2341
|
+
return Q.none;
|
|
2342
|
+
let l = r.wordAt(o.head);
|
|
2343
|
+
if (!l)
|
|
2344
|
+
return Q.none;
|
|
2345
|
+
a = r.charCategorizer(o.head), i = r.sliceDoc(l.from, l.to);
|
|
2346
|
+
} else {
|
|
2347
|
+
let l = o.to - o.from;
|
|
2348
|
+
if (l < t.minSelectionLength || l > 200)
|
|
2349
|
+
return Q.none;
|
|
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) && _i(a, r, o.from, o.to)))
|
|
2352
|
+
return Q.none;
|
|
2353
|
+
} else if (i = r.sliceDoc(o.from, o.to), !i)
|
|
2354
|
+
return Q.none;
|
|
2355
|
+
}
|
|
2356
|
+
let c = [];
|
|
2357
|
+
for (let l of e.visibleRanges) {
|
|
2358
|
+
let h = new We(r.doc, i, l.from, l.to);
|
|
2359
|
+
for (; !h.next().done; ) {
|
|
2360
|
+
let { from: f, to: y } = h.value;
|
|
2361
|
+
if ((!a || Wr(a, r, f, y)) && (o.empty && f <= o.from && y >= o.to ? c.push(wi.range(f, y)) : (f >= o.to || y <= o.from) && c.push(Ri.range(f, y)), c.length > t.maxMatches))
|
|
2362
|
+
return Q.none;
|
|
2363
|
+
}
|
|
2364
|
+
}
|
|
2365
|
+
return Q.set(c);
|
|
2366
|
+
}
|
|
2367
|
+
}, {
|
|
2368
|
+
decorations: (e) => e.decorations
|
|
2369
|
+
}), ki = /* @__PURE__ */ V.baseTheme({
|
|
2370
|
+
".cm-selectionMatch": { backgroundColor: "#99ff7780" },
|
|
2371
|
+
".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
|
|
2372
|
+
}), Mi = ({ state: e, dispatch: t }) => {
|
|
2373
|
+
let { selection: r } = e, n = le.create(r.ranges.map((o) => e.wordAt(o.head) || le.cursor(o.head)), r.mainIndex);
|
|
2374
|
+
return n.eq(r) ? !1 : (t(e.update({ selection: n })), !0);
|
|
2375
|
+
};
|
|
2376
|
+
function Pi(e, t) {
|
|
2377
|
+
let { main: r, ranges: n } = e.selection, o = e.wordAt(r.head), i = o && o.from == r.from && o.to == r.to;
|
|
2378
|
+
for (let a = !1, c = new We(e.doc, t, n[n.length - 1].to); ; )
|
|
2379
|
+
if (c.next(), c.done) {
|
|
2380
|
+
if (a)
|
|
2381
|
+
return null;
|
|
2382
|
+
c = new We(e.doc, t, 0, Math.max(0, n[n.length - 1].from - 1)), a = !0;
|
|
2383
|
+
} else {
|
|
2384
|
+
if (a && n.some((l) => l.from == c.value.from))
|
|
2385
|
+
continue;
|
|
2386
|
+
if (i) {
|
|
2387
|
+
let l = e.wordAt(c.value.from);
|
|
2388
|
+
if (!l || l.from != c.value.from || l.to != c.value.to)
|
|
2389
|
+
continue;
|
|
2390
|
+
}
|
|
2391
|
+
return c.value;
|
|
2392
|
+
}
|
|
2393
|
+
}
|
|
2394
|
+
const Oi = ({ state: e, dispatch: t }) => {
|
|
2395
|
+
let { ranges: r } = e.selection;
|
|
2396
|
+
if (r.some((i) => i.from === i.to))
|
|
2397
|
+
return Mi({ state: e, dispatch: t });
|
|
2398
|
+
let n = e.sliceDoc(r[0].from, r[0].to);
|
|
2399
|
+
if (e.selection.ranges.some((i) => e.sliceDoc(i.from, i.to) != n))
|
|
2400
|
+
return !1;
|
|
2401
|
+
let o = Pi(e, n);
|
|
2402
|
+
return o ? (t(e.update({
|
|
2403
|
+
selection: e.selection.addRange(le.range(o.from, o.to), !1),
|
|
2404
|
+
effects: V.scrollIntoView(o.to)
|
|
2405
|
+
})), !0) : !1;
|
|
2406
|
+
}, _e = /* @__PURE__ */ Kr.define({
|
|
2407
|
+
combine(e) {
|
|
2408
|
+
return Xr(e, {
|
|
2409
|
+
top: !1,
|
|
2410
|
+
caseSensitive: !1,
|
|
2411
|
+
literal: !1,
|
|
2412
|
+
regexp: !1,
|
|
2413
|
+
wholeWord: !1,
|
|
2414
|
+
createPanel: (t) => new Yi(t),
|
|
2415
|
+
scrollToMatch: (t) => V.scrollIntoView(t)
|
|
2416
|
+
});
|
|
2417
|
+
}
|
|
2418
|
+
});
|
|
2419
|
+
function bn(e) {
|
|
2420
|
+
return e ? [_e.of(e), Bt] : Bt;
|
|
2421
|
+
}
|
|
2422
|
+
class xn {
|
|
2423
|
+
/**
|
|
2424
|
+
Create a query object.
|
|
2425
|
+
*/
|
|
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 || xi(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!t.wholeWord;
|
|
2428
|
+
}
|
|
2429
|
+
/**
|
|
2430
|
+
@internal
|
|
2431
|
+
*/
|
|
2432
|
+
unquote(t) {
|
|
2433
|
+
return this.literal ? t : t.replace(/\\([nrt\\])/g, (r, n) => n == "n" ? `
|
|
2434
|
+
` : n == "r" ? "\r" : n == "t" ? " " : "\\");
|
|
2435
|
+
}
|
|
2436
|
+
/**
|
|
2437
|
+
Compare this query to another query.
|
|
2438
|
+
*/
|
|
2439
|
+
eq(t) {
|
|
2440
|
+
return this.search == t.search && this.replace == t.replace && this.caseSensitive == t.caseSensitive && this.regexp == t.regexp && this.wholeWord == t.wholeWord;
|
|
2441
|
+
}
|
|
2442
|
+
/**
|
|
2443
|
+
@internal
|
|
2444
|
+
*/
|
|
2445
|
+
create() {
|
|
2446
|
+
return this.regexp ? new Li(this) : new $i(this);
|
|
2447
|
+
}
|
|
2448
|
+
/**
|
|
2449
|
+
Get a search cursor for this query, searching through the given
|
|
2450
|
+
range in the given state.
|
|
2451
|
+
*/
|
|
2452
|
+
getCursor(t, r = 0, n) {
|
|
2453
|
+
let o = t.doc ? t : be.create({ doc: t });
|
|
2454
|
+
return n == null && (n = o.doc.length), this.regexp ? Le(this, o, r, n) : Fe(this, o, r, n);
|
|
2455
|
+
}
|
|
2456
|
+
}
|
|
2457
|
+
class En {
|
|
2458
|
+
constructor(t) {
|
|
2459
|
+
this.spec = t;
|
|
2460
|
+
}
|
|
2461
|
+
}
|
|
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 ? Ai(t.doc, t.charCategorizer(t.selection.main.head)) : void 0);
|
|
2464
|
+
}
|
|
2465
|
+
function Ai(e, t) {
|
|
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
|
+
}
|
|
2468
|
+
class $i extends En {
|
|
2469
|
+
constructor(t) {
|
|
2470
|
+
super(t);
|
|
2471
|
+
}
|
|
2472
|
+
nextMatch(t, r, n) {
|
|
2473
|
+
let o = Fe(this.spec, t, n, t.doc.length).nextOverlapping();
|
|
2474
|
+
if (o.done) {
|
|
2475
|
+
let i = Math.min(t.doc.length, r + this.spec.unquoted.length);
|
|
2476
|
+
o = Fe(this.spec, t, 0, i).nextOverlapping();
|
|
2477
|
+
}
|
|
2478
|
+
return o.done || o.value.from == r && o.value.to == n ? null : o.value;
|
|
2479
|
+
}
|
|
2480
|
+
// Searching in reverse is, rather than implementing an inverted search
|
|
2481
|
+
// cursor, done by scanning chunk after chunk forward.
|
|
2482
|
+
prevMatchInRange(t, r, n) {
|
|
2483
|
+
for (let o = n; ; ) {
|
|
2484
|
+
let i = Math.max(r, o - 1e4 - this.spec.unquoted.length), a = Fe(this.spec, t, i, o), c = null;
|
|
2485
|
+
for (; !a.nextOverlapping().done; )
|
|
2486
|
+
c = a.value;
|
|
2487
|
+
if (c)
|
|
2488
|
+
return c;
|
|
2489
|
+
if (i == r)
|
|
2490
|
+
return null;
|
|
2491
|
+
o -= 1e4;
|
|
2492
|
+
}
|
|
2493
|
+
}
|
|
2494
|
+
prevMatch(t, r, n) {
|
|
2495
|
+
let o = this.prevMatchInRange(t, 0, r);
|
|
2496
|
+
return o || (o = this.prevMatchInRange(t, Math.max(0, n - this.spec.unquoted.length), t.doc.length)), o && (o.from != r || o.to != n) ? o : null;
|
|
2497
|
+
}
|
|
2498
|
+
getReplacement(t) {
|
|
2499
|
+
return this.spec.unquote(this.spec.replace);
|
|
2500
|
+
}
|
|
2501
|
+
matchAll(t, r) {
|
|
2502
|
+
let n = Fe(this.spec, t, 0, t.doc.length), o = [];
|
|
2503
|
+
for (; !n.next().done; ) {
|
|
2504
|
+
if (o.length >= r)
|
|
2505
|
+
return null;
|
|
2506
|
+
o.push(n.value);
|
|
2507
|
+
}
|
|
2508
|
+
return o;
|
|
2509
|
+
}
|
|
2510
|
+
highlight(t, r, n, o) {
|
|
2511
|
+
let i = Fe(this.spec, t, Math.max(0, r - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, t.doc.length));
|
|
2512
|
+
for (; !i.next().done; )
|
|
2513
|
+
o(i.value.from, i.value.to);
|
|
2514
|
+
}
|
|
2515
|
+
}
|
|
2516
|
+
function Le(e, t, r, n) {
|
|
2517
|
+
return new gn(t.doc, e.search, {
|
|
2518
|
+
ignoreCase: !e.caseSensitive,
|
|
2519
|
+
test: e.wholeWord ? Fi(t.charCategorizer(t.selection.main.head)) : void 0
|
|
2520
|
+
}, r, n);
|
|
2521
|
+
}
|
|
2522
|
+
function yt(e, t) {
|
|
2523
|
+
return e.slice(Zr(e, t, !1), t);
|
|
2524
|
+
}
|
|
2525
|
+
function bt(e, t) {
|
|
2526
|
+
return e.slice(t, Zr(e, t));
|
|
2527
|
+
}
|
|
2528
|
+
function Fi(e) {
|
|
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
|
+
}
|
|
2531
|
+
class Li extends En {
|
|
2532
|
+
nextMatch(t, r, n) {
|
|
2533
|
+
let o = Le(this.spec, t, n, t.doc.length).next();
|
|
2534
|
+
return o.done && (o = Le(this.spec, t, 0, r).next()), o.done ? null : o.value;
|
|
2535
|
+
}
|
|
2536
|
+
prevMatchInRange(t, r, n) {
|
|
2537
|
+
for (let o = 1; ; o++) {
|
|
2538
|
+
let i = Math.max(
|
|
2539
|
+
r,
|
|
2540
|
+
n - o * 1e4
|
|
2541
|
+
/* FindPrev.ChunkSize */
|
|
2542
|
+
), a = Le(this.spec, t, i, n), c = null;
|
|
2543
|
+
for (; !a.next().done; )
|
|
2544
|
+
c = a.value;
|
|
2545
|
+
if (c && (i == r || c.from > i + 10))
|
|
2546
|
+
return c;
|
|
2547
|
+
if (i == r)
|
|
2548
|
+
return null;
|
|
2549
|
+
}
|
|
2550
|
+
}
|
|
2551
|
+
prevMatch(t, r, n) {
|
|
2552
|
+
return this.prevMatchInRange(t, 0, r) || this.prevMatchInRange(t, n, t.doc.length);
|
|
2553
|
+
}
|
|
2554
|
+
getReplacement(t) {
|
|
2555
|
+
return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g, (r, n) => {
|
|
2556
|
+
if (n == "&")
|
|
2557
|
+
return t.match[0];
|
|
2558
|
+
if (n == "$")
|
|
2559
|
+
return "$";
|
|
2560
|
+
for (let o = n.length; o > 0; o--) {
|
|
2561
|
+
let i = +n.slice(0, o);
|
|
2562
|
+
if (i > 0 && i < t.match.length)
|
|
2563
|
+
return t.match[i] + n.slice(o);
|
|
2564
|
+
}
|
|
2565
|
+
return r;
|
|
2566
|
+
});
|
|
2567
|
+
}
|
|
2568
|
+
matchAll(t, r) {
|
|
2569
|
+
let n = Le(this.spec, t, 0, t.doc.length), o = [];
|
|
2570
|
+
for (; !n.next().done; ) {
|
|
2571
|
+
if (o.length >= r)
|
|
2572
|
+
return null;
|
|
2573
|
+
o.push(n.value);
|
|
2574
|
+
}
|
|
2575
|
+
return o;
|
|
2576
|
+
}
|
|
2577
|
+
highlight(t, r, n, o) {
|
|
2578
|
+
let i = Le(this.spec, t, Math.max(
|
|
2579
|
+
0,
|
|
2580
|
+
r - 250
|
|
2581
|
+
/* RegExp.HighlightMargin */
|
|
2582
|
+
), Math.min(n + 250, t.doc.length));
|
|
2583
|
+
for (; !i.next().done; )
|
|
2584
|
+
o(i.value.from, i.value.to);
|
|
2585
|
+
}
|
|
2586
|
+
}
|
|
2587
|
+
const tt = /* @__PURE__ */ je.define(), tr = /* @__PURE__ */ je.define(), xe = /* @__PURE__ */ Gt.define({
|
|
2588
|
+
create(e) {
|
|
2589
|
+
return new It(Ut(e).create(), null);
|
|
2590
|
+
},
|
|
2591
|
+
update(e, t) {
|
|
2592
|
+
for (let r of t.effects)
|
|
2593
|
+
r.is(tt) ? e = new It(r.value.create(), e.panel) : r.is(tr) && (e = new It(e.query, r.value ? rr : null));
|
|
2594
|
+
return e;
|
|
2595
|
+
},
|
|
2596
|
+
provide: (e) => Gr.from(e, (t) => t.panel)
|
|
2597
|
+
});
|
|
2598
|
+
class It {
|
|
2599
|
+
constructor(t, r) {
|
|
2600
|
+
this.query = t, this.panel = r;
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
const Ni = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch" }), Ii = /* @__PURE__ */ Q.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), Di = /* @__PURE__ */ Br.fromClass(class {
|
|
2604
|
+
constructor(e) {
|
|
2605
|
+
this.view = e, this.decorations = this.highlight(e.state.field(xe));
|
|
2606
|
+
}
|
|
2607
|
+
update(e) {
|
|
2608
|
+
let t = e.state.field(xe);
|
|
2609
|
+
(t != e.startState.field(xe) || e.docChanged || e.selectionSet || e.viewportChanged) && (this.decorations = this.highlight(t));
|
|
2610
|
+
}
|
|
2611
|
+
highlight({ query: e, panel: t }) {
|
|
2612
|
+
if (!t || !e.spec.valid)
|
|
2613
|
+
return Q.none;
|
|
2614
|
+
let { view: r } = this, n = new io();
|
|
2615
|
+
for (let o = 0, i = r.visibleRanges, a = i.length; o < a; o++) {
|
|
2616
|
+
let { from: c, to: l } = i[o];
|
|
2617
|
+
for (; o < a - 1 && l > i[o + 1].from - 2 * 250; )
|
|
2618
|
+
l = i[++o].to;
|
|
2619
|
+
e.highlight(r.state, c, l, (h, f) => {
|
|
2620
|
+
let y = r.state.selection.ranges.some((C) => C.from == h && C.to == f);
|
|
2621
|
+
n.add(h, f, y ? Ii : Ni);
|
|
2622
|
+
});
|
|
2623
|
+
}
|
|
2624
|
+
return n.finish();
|
|
2625
|
+
}
|
|
2626
|
+
}, {
|
|
2627
|
+
decorations: (e) => e.decorations
|
|
2628
|
+
});
|
|
2629
|
+
function ot(e) {
|
|
2630
|
+
return (t) => {
|
|
2631
|
+
let r = t.state.field(xe, !1);
|
|
2632
|
+
return r && r.query.spec.valid ? e(t, r) : Rn(t);
|
|
2633
|
+
};
|
|
2634
|
+
}
|
|
2635
|
+
const xt = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2636
|
+
let { to: r } = e.state.selection.main, n = t.nextMatch(e.state, r, r);
|
|
2637
|
+
if (!n)
|
|
2638
|
+
return !1;
|
|
2639
|
+
let o = le.single(n.from, n.to), i = e.state.facet(_e);
|
|
2640
|
+
return e.dispatch({
|
|
2641
|
+
selection: o,
|
|
2642
|
+
effects: [nr(e, n), i.scrollToMatch(o.main, e)],
|
|
2643
|
+
userEvent: "select.search"
|
|
2644
|
+
}), Cn(e), !0;
|
|
2645
|
+
}), Et = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2646
|
+
let { state: r } = e, { from: n } = r.selection.main, o = t.prevMatch(r, n, n);
|
|
2647
|
+
if (!o)
|
|
2648
|
+
return !1;
|
|
2649
|
+
let i = le.single(o.from, o.to), a = e.state.facet(_e);
|
|
2650
|
+
return e.dispatch({
|
|
2651
|
+
selection: i,
|
|
2652
|
+
effects: [nr(e, o), a.scrollToMatch(i.main, e)],
|
|
2653
|
+
userEvent: "select.search"
|
|
2654
|
+
}), Cn(e), !0;
|
|
2655
|
+
}), Wi = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2656
|
+
let r = t.matchAll(e.state, 1e3);
|
|
2657
|
+
return !r || !r.length ? !1 : (e.dispatch({
|
|
2658
|
+
selection: le.create(r.map((n) => le.range(n.from, n.to))),
|
|
2659
|
+
userEvent: "select.search.matches"
|
|
2660
|
+
}), !0);
|
|
2661
|
+
}), ji = ({ state: e, dispatch: t }) => {
|
|
2662
|
+
let r = e.selection;
|
|
2663
|
+
if (r.ranges.length > 1 || r.main.empty)
|
|
2664
|
+
return !1;
|
|
2665
|
+
let { from: n, to: o } = r.main, i = [], a = 0;
|
|
2666
|
+
for (let c = new We(e.doc, e.sliceDoc(n, o)); !c.next().done; ) {
|
|
2667
|
+
if (i.length > 1e3)
|
|
2668
|
+
return !1;
|
|
2669
|
+
c.value.from == n && (a = i.length), i.push(le.range(c.value.from, c.value.to));
|
|
2670
|
+
}
|
|
2671
|
+
return t(e.update({
|
|
2672
|
+
selection: le.create(i, a),
|
|
2673
|
+
userEvent: "select.search.matches"
|
|
2674
|
+
})), !0;
|
|
2675
|
+
}, jr = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2676
|
+
let { state: r } = e, { from: n, to: o } = r.selection.main;
|
|
2677
|
+
if (r.readOnly)
|
|
2678
|
+
return !1;
|
|
2679
|
+
let i = t.nextMatch(r, n, n);
|
|
2680
|
+
if (!i)
|
|
2681
|
+
return !1;
|
|
2682
|
+
let a = i, c = [], l, h, f = [];
|
|
2683
|
+
a.from == n && a.to == o && (h = r.toText(t.getReplacement(a)), c.push({ from: a.from, to: a.to, insert: h }), 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
|
+
let y = e.state.changes(c);
|
|
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
|
+
changes: y,
|
|
2687
|
+
selection: l,
|
|
2688
|
+
effects: f,
|
|
2689
|
+
userEvent: "input.replace"
|
|
2690
|
+
}), !0;
|
|
2691
|
+
}), qi = /* @__PURE__ */ ot((e, { query: t }) => {
|
|
2692
|
+
if (e.state.readOnly)
|
|
2693
|
+
return !1;
|
|
2694
|
+
let r = t.matchAll(e.state, 1e9).map((o) => {
|
|
2695
|
+
let { from: i, to: a } = o;
|
|
2696
|
+
return { from: i, to: a, insert: t.getReplacement(o) };
|
|
2697
|
+
});
|
|
2698
|
+
if (!r.length)
|
|
2699
|
+
return !1;
|
|
2700
|
+
let n = e.state.phrase("replaced $ matches", r.length) + ".";
|
|
2701
|
+
return e.dispatch({
|
|
2702
|
+
changes: r,
|
|
2703
|
+
effects: V.announce.of(n),
|
|
2704
|
+
userEvent: "input.replace.all"
|
|
2705
|
+
}), !0;
|
|
2706
|
+
});
|
|
2707
|
+
function rr(e) {
|
|
2708
|
+
return e.state.facet(_e).createPanel(e);
|
|
2709
|
+
}
|
|
2710
|
+
function Ut(e, t) {
|
|
2711
|
+
var r, n, o, i, a;
|
|
2712
|
+
let c = e.selection.main, l = c.empty || c.to > c.from + 100 ? "" : e.sliceDoc(c.from, c.to);
|
|
2713
|
+
if (t && !l)
|
|
2714
|
+
return t;
|
|
2715
|
+
let h = e.facet(_e);
|
|
2716
|
+
return new xn({
|
|
2717
|
+
search: ((r = t == null ? void 0 : t.literal) !== null && r !== void 0 ? r : h.literal) ? l : l.replace(/\n/g, "\\n"),
|
|
2718
|
+
caseSensitive: (n = t == null ? void 0 : t.caseSensitive) !== null && n !== void 0 ? n : h.caseSensitive,
|
|
2719
|
+
literal: (o = t == null ? void 0 : t.literal) !== null && o !== void 0 ? o : h.literal,
|
|
2720
|
+
regexp: (i = t == null ? void 0 : t.regexp) !== null && i !== void 0 ? i : h.regexp,
|
|
2721
|
+
wholeWord: (a = t == null ? void 0 : t.wholeWord) !== null && a !== void 0 ? a : h.wholeWord
|
|
2722
|
+
});
|
|
2723
|
+
}
|
|
2724
|
+
function Sn(e) {
|
|
2725
|
+
let t = dt(e, rr);
|
|
2726
|
+
return t && t.dom.querySelector("[main-field]");
|
|
2727
|
+
}
|
|
2728
|
+
function Cn(e) {
|
|
2729
|
+
let t = Sn(e);
|
|
2730
|
+
t && t == e.root.activeElement && t.select();
|
|
2731
|
+
}
|
|
2732
|
+
const Rn = (e) => {
|
|
2733
|
+
let t = e.state.field(xe, !1);
|
|
2734
|
+
if (t && t.panel) {
|
|
2735
|
+
let r = Sn(e);
|
|
2736
|
+
if (r && r != e.root.activeElement) {
|
|
2737
|
+
let n = Ut(e.state, t.query.spec);
|
|
2738
|
+
n.valid && e.dispatch({ effects: tt.of(n) }), r.focus(), r.select();
|
|
2739
|
+
}
|
|
2740
|
+
} else
|
|
2741
|
+
e.dispatch({ effects: [
|
|
2742
|
+
tr.of(!0),
|
|
2743
|
+
t ? tt.of(Ut(e.state, t.query.spec)) : je.appendConfig.of(Bt)
|
|
2744
|
+
] });
|
|
2745
|
+
return !0;
|
|
2746
|
+
}, wn = (e) => {
|
|
2747
|
+
let t = e.state.field(xe, !1);
|
|
2748
|
+
if (!t || !t.panel)
|
|
2749
|
+
return !1;
|
|
2750
|
+
let r = dt(e, rr);
|
|
2751
|
+
return r && r.dom.contains(e.root.activeElement) && e.focus(), e.dispatch({ effects: tr.of(!1) }), !0;
|
|
2752
|
+
}, _n = [
|
|
2753
|
+
{ key: "Mod-f", run: Rn, scope: "editor search-panel" },
|
|
2754
|
+
{ key: "F3", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
|
|
2755
|
+
{ key: "Mod-g", run: xt, shift: Et, scope: "editor search-panel", preventDefault: !0 },
|
|
2756
|
+
{ key: "Escape", run: wn, scope: "editor search-panel" },
|
|
2757
|
+
{ key: "Mod-Shift-l", run: ji },
|
|
2758
|
+
{ key: "Mod-Alt-g", run: Ei },
|
|
2759
|
+
{ key: "Mod-d", run: Oi, preventDefault: !0 }
|
|
2760
|
+
];
|
|
2761
|
+
class Yi {
|
|
2762
|
+
constructor(t) {
|
|
2763
|
+
this.view = t;
|
|
2764
|
+
let r = this.query = t.state.field(xe).query.spec;
|
|
2765
|
+
this.commit = this.commit.bind(this), this.searchField = H("input", {
|
|
2766
|
+
value: r.search,
|
|
2767
|
+
placeholder: re(t, "Find"),
|
|
2768
|
+
"aria-label": re(t, "Find"),
|
|
2769
|
+
class: "cm-textfield",
|
|
2770
|
+
name: "search",
|
|
2771
|
+
form: "",
|
|
2772
|
+
"main-field": "true",
|
|
2773
|
+
onchange: this.commit,
|
|
2774
|
+
onkeyup: this.commit
|
|
2775
|
+
}), this.replaceField = H("input", {
|
|
2776
|
+
value: r.replace,
|
|
2777
|
+
placeholder: re(t, "Replace"),
|
|
2778
|
+
"aria-label": re(t, "Replace"),
|
|
2779
|
+
class: "cm-textfield",
|
|
2780
|
+
name: "replace",
|
|
2781
|
+
form: "",
|
|
2782
|
+
onchange: this.commit,
|
|
2783
|
+
onkeyup: this.commit
|
|
2784
|
+
}), this.caseField = H("input", {
|
|
2785
|
+
type: "checkbox",
|
|
2786
|
+
name: "case",
|
|
2787
|
+
form: "",
|
|
2788
|
+
checked: r.caseSensitive,
|
|
2789
|
+
onchange: this.commit
|
|
2790
|
+
}), this.reField = H("input", {
|
|
2791
|
+
type: "checkbox",
|
|
2792
|
+
name: "re",
|
|
2793
|
+
form: "",
|
|
2794
|
+
checked: r.regexp,
|
|
2795
|
+
onchange: this.commit
|
|
2796
|
+
}), this.wordField = H("input", {
|
|
2797
|
+
type: "checkbox",
|
|
2798
|
+
name: "word",
|
|
2799
|
+
form: "",
|
|
2800
|
+
checked: r.wholeWord,
|
|
2801
|
+
onchange: this.commit
|
|
2802
|
+
});
|
|
2803
|
+
function n(o, i, a) {
|
|
2804
|
+
return H("button", { class: "cm-button", name: o, onclick: i, type: "button" }, a);
|
|
2805
|
+
}
|
|
2806
|
+
this.dom = H("div", { onkeydown: (o) => this.keydown(o), class: "cm-search" }, [
|
|
2807
|
+
this.searchField,
|
|
2808
|
+
n("next", () => xt(t), [re(t, "next")]),
|
|
2809
|
+
n("prev", () => Et(t), [re(t, "previous")]),
|
|
2810
|
+
n("select", () => Wi(t), [re(t, "all")]),
|
|
2811
|
+
H("label", null, [this.caseField, re(t, "match case")]),
|
|
2812
|
+
H("label", null, [this.reField, re(t, "regexp")]),
|
|
2813
|
+
H("label", null, [this.wordField, re(t, "by word")]),
|
|
2814
|
+
...t.state.readOnly ? [] : [
|
|
2815
|
+
H("br"),
|
|
2816
|
+
this.replaceField,
|
|
2817
|
+
n("replace", () => jr(t), [re(t, "replace")]),
|
|
2818
|
+
n("replaceAll", () => qi(t), [re(t, "replace all")])
|
|
2819
|
+
],
|
|
2820
|
+
H("button", {
|
|
2821
|
+
name: "close",
|
|
2822
|
+
onclick: () => wn(t),
|
|
2823
|
+
"aria-label": re(t, "close"),
|
|
2824
|
+
type: "button"
|
|
2825
|
+
}, ["×"])
|
|
2826
|
+
]);
|
|
2827
|
+
}
|
|
2828
|
+
commit() {
|
|
2829
|
+
let t = new xn({
|
|
2830
|
+
search: this.searchField.value,
|
|
2831
|
+
caseSensitive: this.caseField.checked,
|
|
2832
|
+
regexp: this.reField.checked,
|
|
2833
|
+
wholeWord: this.wordField.checked,
|
|
2834
|
+
replace: this.replaceField.value
|
|
2835
|
+
});
|
|
2836
|
+
t.eq(this.query) || (this.query = t, this.view.dispatch({ effects: tt.of(t) }));
|
|
2837
|
+
}
|
|
2838
|
+
keydown(t) {
|
|
2839
|
+
Qn(this.view, t, "search-panel") ? t.preventDefault() : t.keyCode == 13 && t.target == this.searchField ? (t.preventDefault(), (t.shiftKey ? Et : xt)(this.view)) : t.keyCode == 13 && t.target == this.replaceField && (t.preventDefault(), jr(this.view));
|
|
2840
|
+
}
|
|
2841
|
+
update(t) {
|
|
2842
|
+
for (let r of t.transactions)
|
|
2843
|
+
for (let n of r.effects)
|
|
2844
|
+
n.is(tt) && !n.value.eq(this.query) && this.setQuery(n.value);
|
|
2845
|
+
}
|
|
2846
|
+
setQuery(t) {
|
|
2847
|
+
this.query = t, this.searchField.value = t.search, this.replaceField.value = t.replace, this.caseField.checked = t.caseSensitive, this.reField.checked = t.regexp, this.wordField.checked = t.wholeWord;
|
|
2848
|
+
}
|
|
2849
|
+
mount() {
|
|
2850
|
+
this.searchField.select();
|
|
2851
|
+
}
|
|
2852
|
+
get pos() {
|
|
2853
|
+
return 80;
|
|
2854
|
+
}
|
|
2855
|
+
get top() {
|
|
2856
|
+
return this.view.state.facet(_e).top;
|
|
2857
|
+
}
|
|
2858
|
+
}
|
|
2859
|
+
function re(e, t) {
|
|
2860
|
+
return e.state.phrase(t);
|
|
2861
|
+
}
|
|
2862
|
+
const at = 30, ct = /[\s\.,:;?!]/;
|
|
2863
|
+
function nr(e, { from: t, to: r }) {
|
|
2864
|
+
let n = e.state.doc.lineAt(t), o = e.state.doc.lineAt(r).to, i = Math.max(n.from, t - at), a = Math.min(o, r + at), c = e.state.sliceDoc(i, a);
|
|
2865
|
+
if (i != n.from) {
|
|
2866
|
+
for (let l = 0; l < at; l++)
|
|
2867
|
+
if (!ct.test(c[l + 1]) && ct.test(c[l])) {
|
|
2868
|
+
c = c.slice(l);
|
|
2869
|
+
break;
|
|
2870
|
+
}
|
|
2871
|
+
}
|
|
2872
|
+
if (a != o) {
|
|
2873
|
+
for (let l = c.length - 1; l > c.length - at; l--)
|
|
2874
|
+
if (!ct.test(c[l - 1]) && ct.test(c[l])) {
|
|
2875
|
+
c = c.slice(0, l);
|
|
2876
|
+
break;
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
return V.announce.of(`${e.state.phrase("current match")}. ${c} ${e.state.phrase("on line")} ${n.number}.`);
|
|
2880
|
+
}
|
|
2881
|
+
const Vi = /* @__PURE__ */ V.baseTheme({
|
|
2882
|
+
".cm-panel.cm-search": {
|
|
2883
|
+
padding: "2px 6px 4px",
|
|
2884
|
+
position: "relative",
|
|
2885
|
+
"& [name=close]": {
|
|
2886
|
+
position: "absolute",
|
|
2887
|
+
top: "0",
|
|
2888
|
+
right: "4px",
|
|
2889
|
+
backgroundColor: "inherit",
|
|
2890
|
+
border: "none",
|
|
2891
|
+
font: "inherit",
|
|
2892
|
+
padding: 0,
|
|
2893
|
+
margin: 0
|
|
2894
|
+
},
|
|
2895
|
+
"& input, & button, & label": {
|
|
2896
|
+
margin: ".2em .6em .2em 0"
|
|
2897
|
+
},
|
|
2898
|
+
"& input[type=checkbox]": {
|
|
2899
|
+
marginRight: ".2em"
|
|
2900
|
+
},
|
|
2901
|
+
"& label": {
|
|
2902
|
+
fontSize: "80%",
|
|
2903
|
+
whiteSpace: "pre"
|
|
2904
|
+
}
|
|
2905
|
+
},
|
|
2906
|
+
"&light .cm-searchMatch": { backgroundColor: "#ffff0054" },
|
|
2907
|
+
"&dark .cm-searchMatch": { backgroundColor: "#00ffff8a" },
|
|
2908
|
+
"&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
|
|
2909
|
+
"&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
|
|
2910
|
+
}), Bt = [
|
|
2911
|
+
xe,
|
|
2912
|
+
/* @__PURE__ */ Qr.low(Di),
|
|
2913
|
+
Vi
|
|
2914
|
+
], cs = {
|
|
2915
|
+
// 搜索面板标题
|
|
2916
|
+
Search: "搜索",
|
|
2917
|
+
Replace: "替换",
|
|
2918
|
+
Find: "查找",
|
|
2919
|
+
// 按钮
|
|
2920
|
+
"Replace all": "全部替换",
|
|
2921
|
+
Next: "下一个",
|
|
2922
|
+
Previous: "上一个",
|
|
2923
|
+
All: "全部",
|
|
2924
|
+
Close: "关闭",
|
|
2925
|
+
done: "完成",
|
|
2926
|
+
// 选项
|
|
2927
|
+
"Match case": "区分大小写",
|
|
2928
|
+
"Match whole word": "全字匹配",
|
|
2929
|
+
"Use regular expression": "使用正则表达式",
|
|
2930
|
+
"by word": "按单词",
|
|
2931
|
+
replace: "替换",
|
|
2932
|
+
// 输入框提示
|
|
2933
|
+
"Search for": "搜索内容",
|
|
2934
|
+
"Replace with": "替换为",
|
|
2935
|
+
// 状态信息
|
|
2936
|
+
"No matches": "无匹配结果",
|
|
2937
|
+
"replaced $ matches": "已替换 $ 个匹配项",
|
|
2938
|
+
"replaced match on line $": "已替换第 $ 行的匹配项",
|
|
2939
|
+
"on line": "在第",
|
|
2940
|
+
line: "行",
|
|
2941
|
+
"$ of $ matches": "第 $ 个,共 $ 个匹配",
|
|
2942
|
+
// 错误信息
|
|
2943
|
+
"Invalid regular expression": "无效的正则表达式",
|
|
2944
|
+
"Query too long": "查询内容过长",
|
|
2945
|
+
"Search string too long": "搜索字符串过长"
|
|
2946
|
+
};
|
|
2947
|
+
function zi() {
|
|
2948
|
+
return V.theme({
|
|
2949
|
+
// 搜索面板样式优化
|
|
2950
|
+
".cm-panel.cm-search": {
|
|
2951
|
+
fontSize: "14px",
|
|
2952
|
+
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif'
|
|
2953
|
+
},
|
|
2954
|
+
".cm-search label": {
|
|
2955
|
+
fontSize: "13px"
|
|
2956
|
+
},
|
|
2957
|
+
".cm-search input": {
|
|
2958
|
+
fontSize: "13px",
|
|
2959
|
+
fontFamily: "inherit"
|
|
2960
|
+
},
|
|
2961
|
+
".cm-search button": {
|
|
2962
|
+
fontSize: "12px",
|
|
2963
|
+
fontFamily: "inherit"
|
|
2964
|
+
}
|
|
2965
|
+
});
|
|
2966
|
+
}
|
|
2967
|
+
function Ui(e) {
|
|
2968
|
+
setTimeout(() => {
|
|
2969
|
+
const t = e.dom.querySelector(".cm-panel.cm-search");
|
|
2970
|
+
if (!t) return;
|
|
2971
|
+
t.querySelectorAll("label").forEach((i) => {
|
|
2972
|
+
var c;
|
|
2973
|
+
switch ((c = i.textContent) == null ? void 0 : c.trim()) {
|
|
2974
|
+
case "Match case":
|
|
2975
|
+
i.textContent = "区分大小写";
|
|
2976
|
+
break;
|
|
2977
|
+
case "Match whole word":
|
|
2978
|
+
i.textContent = "全字匹配";
|
|
2979
|
+
break;
|
|
2980
|
+
case "Use regular expression":
|
|
2981
|
+
i.textContent = "使用正则表达式";
|
|
2982
|
+
break;
|
|
2983
|
+
}
|
|
2984
|
+
}), t.querySelectorAll("button").forEach((i) => {
|
|
2985
|
+
var c;
|
|
2986
|
+
switch ((c = i.textContent) == null ? void 0 : c.trim()) {
|
|
2987
|
+
case "Next":
|
|
2988
|
+
i.textContent = "下一个";
|
|
2989
|
+
break;
|
|
2990
|
+
case "Previous":
|
|
2991
|
+
i.textContent = "上一个";
|
|
2992
|
+
break;
|
|
2993
|
+
case "All":
|
|
2994
|
+
i.textContent = "全部";
|
|
2995
|
+
break;
|
|
2996
|
+
case "Replace all":
|
|
2997
|
+
i.textContent = "全部替换";
|
|
2998
|
+
break;
|
|
2999
|
+
case "Close":
|
|
3000
|
+
i.textContent = "关闭";
|
|
3001
|
+
break;
|
|
3002
|
+
case "done":
|
|
3003
|
+
i.textContent = "完成";
|
|
3004
|
+
break;
|
|
3005
|
+
}
|
|
3006
|
+
}), t.querySelectorAll('input[type="text"]').forEach((i, a) => {
|
|
3007
|
+
const c = i;
|
|
3008
|
+
a === 0 ? c.placeholder = "搜索内容" : a === 1 && (c.placeholder = "替换为");
|
|
3009
|
+
});
|
|
3010
|
+
}, 100);
|
|
3011
|
+
}
|
|
3012
|
+
function qr() {
|
|
3013
|
+
return [
|
|
3014
|
+
zi(),
|
|
3015
|
+
// 中文样式
|
|
3016
|
+
bn({
|
|
3017
|
+
top: !0
|
|
3018
|
+
// 搜索面板显示在顶部
|
|
3019
|
+
}),
|
|
3020
|
+
er(),
|
|
3021
|
+
// 高亮相同的选中文本
|
|
3022
|
+
we.of(_n),
|
|
3023
|
+
// 搜索相关的键盘快捷键
|
|
3024
|
+
// 监听 DOM 变化以应用中文翻译
|
|
3025
|
+
V.updateListener.of((e) => {
|
|
3026
|
+
e.view.dom.querySelector(".cm-panel.cm-search") && Ui(e.view);
|
|
3027
|
+
})
|
|
3028
|
+
];
|
|
3029
|
+
}
|
|
3030
|
+
function ls() {
|
|
3031
|
+
return [er()];
|
|
3032
|
+
}
|
|
3033
|
+
function Yr() {
|
|
3034
|
+
return [bn({
|
|
3035
|
+
top: !0
|
|
3036
|
+
}), er(), we.of(_n)];
|
|
3037
|
+
}
|
|
3038
|
+
const us = [
|
|
3039
|
+
{
|
|
3040
|
+
key: "Ctrl-f",
|
|
3041
|
+
mac: "Cmd-f",
|
|
3042
|
+
run: () => !0
|
|
3043
|
+
},
|
|
3044
|
+
// 将被搜索面板接管
|
|
3045
|
+
{
|
|
3046
|
+
key: "F3",
|
|
3047
|
+
run: () => !0
|
|
3048
|
+
},
|
|
3049
|
+
// 查找下一个的替代快捷键
|
|
3050
|
+
{
|
|
3051
|
+
key: "Shift-F3",
|
|
3052
|
+
run: () => !0
|
|
3053
|
+
}
|
|
3054
|
+
// 查找上一个的替代快捷键
|
|
3055
|
+
], Bi = ({
|
|
2037
3056
|
value: e,
|
|
2038
|
-
onChange:
|
|
2039
|
-
extensions:
|
|
2040
|
-
height:
|
|
2041
|
-
disabled:
|
|
3057
|
+
onChange: t,
|
|
3058
|
+
extensions: r = [],
|
|
3059
|
+
height: n = "300px",
|
|
3060
|
+
disabled: o = !1,
|
|
2042
3061
|
className: i = "",
|
|
2043
|
-
style:
|
|
2044
|
-
placeholder:
|
|
2045
|
-
showLineNumbers:
|
|
2046
|
-
onEditorViewCreated:
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
3062
|
+
style: a = {},
|
|
3063
|
+
placeholder: c = "",
|
|
3064
|
+
showLineNumbers: l = !0,
|
|
3065
|
+
onEditorViewCreated: h,
|
|
3066
|
+
locale: f = "zh-CN"
|
|
3067
|
+
}, y) => {
|
|
3068
|
+
const C = ue(null), v = ue();
|
|
3069
|
+
return ge(() => {
|
|
3070
|
+
if (!C.current) return;
|
|
3071
|
+
const R = [
|
|
3072
|
+
we.of([Dt, {
|
|
3073
|
+
key: "Enter",
|
|
3074
|
+
run: Er
|
|
3075
|
+
}]),
|
|
3076
|
+
V.lineWrapping,
|
|
3077
|
+
pt(Sr),
|
|
3078
|
+
be.allowMultipleSelections.of(!0),
|
|
3079
|
+
f === "zh-CN" ? qr() : Yr(),
|
|
3080
|
+
c ? br(c) : [],
|
|
2057
3081
|
// 行号功能,根据配置决定是否启用
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
if (
|
|
2061
|
-
const
|
|
2062
|
-
value:
|
|
3082
|
+
l ? xr() : [],
|
|
3083
|
+
V.updateListener.of((g) => {
|
|
3084
|
+
if (g.docChanged && t) {
|
|
3085
|
+
const S = {
|
|
3086
|
+
value: g.state.doc.toString(),
|
|
2063
3087
|
readOnlyRanges: []
|
|
2064
3088
|
// 基础编辑器没有只读区域逻辑,由特定编辑器实现
|
|
2065
3089
|
};
|
|
2066
|
-
|
|
3090
|
+
t(S);
|
|
2067
3091
|
}
|
|
2068
3092
|
})
|
|
2069
3093
|
];
|
|
2070
|
-
|
|
2071
|
-
const
|
|
3094
|
+
o && R.push(be.readOnly.of(!0));
|
|
3095
|
+
const m = be.create({
|
|
2072
3096
|
doc: e,
|
|
2073
|
-
extensions: [...
|
|
2074
|
-
}), x = new
|
|
2075
|
-
state:
|
|
2076
|
-
parent:
|
|
3097
|
+
extensions: [...R, ...r]
|
|
3098
|
+
}), x = new V({
|
|
3099
|
+
state: m,
|
|
3100
|
+
parent: C.current
|
|
2077
3101
|
});
|
|
2078
|
-
return
|
|
2079
|
-
var
|
|
2080
|
-
(
|
|
3102
|
+
return v.current = x, h && h(x), () => {
|
|
3103
|
+
var g;
|
|
3104
|
+
(g = v.current) == null || g.destroy();
|
|
2081
3105
|
};
|
|
2082
|
-
}, []),
|
|
2083
|
-
|
|
3106
|
+
}, []), ge(() => {
|
|
3107
|
+
v.current && e !== v.current.state.doc.toString() && v.current.dispatch({
|
|
2084
3108
|
changes: {
|
|
2085
3109
|
from: 0,
|
|
2086
|
-
to:
|
|
3110
|
+
to: v.current.state.doc.length,
|
|
2087
3111
|
insert: e
|
|
2088
3112
|
}
|
|
2089
3113
|
});
|
|
2090
|
-
}, [e]),
|
|
2091
|
-
if (!
|
|
2092
|
-
const
|
|
2093
|
-
|
|
2094
|
-
const
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
3114
|
+
}, [e]), ge(() => {
|
|
3115
|
+
if (!v.current || !C.current) return;
|
|
3116
|
+
const R = v.current.state.doc.toString();
|
|
3117
|
+
v.current.destroy();
|
|
3118
|
+
const m = [
|
|
3119
|
+
we.of([Dt, {
|
|
3120
|
+
key: "Enter",
|
|
3121
|
+
run: Er
|
|
3122
|
+
}]),
|
|
3123
|
+
V.lineWrapping,
|
|
3124
|
+
pt(Sr),
|
|
3125
|
+
be.allowMultipleSelections.of(!0),
|
|
3126
|
+
f === "zh-CN" ? qr() : Yr(),
|
|
3127
|
+
c ? br(c) : [],
|
|
2100
3128
|
// 行号功能,根据配置决定是否启用
|
|
2101
|
-
|
|
2102
|
-
|
|
2103
|
-
if (
|
|
2104
|
-
const
|
|
2105
|
-
value:
|
|
3129
|
+
l ? xr() : [],
|
|
3130
|
+
V.updateListener.of((S) => {
|
|
3131
|
+
if (S.docChanged && t) {
|
|
3132
|
+
const _ = {
|
|
3133
|
+
value: S.state.doc.toString(),
|
|
2106
3134
|
readOnlyRanges: []
|
|
2107
3135
|
// 基础编辑器没有只读区域逻辑,由特定编辑器实现
|
|
2108
3136
|
};
|
|
2109
|
-
|
|
3137
|
+
t(_);
|
|
2110
3138
|
}
|
|
2111
3139
|
})
|
|
2112
3140
|
];
|
|
2113
|
-
|
|
2114
|
-
const x =
|
|
2115
|
-
doc:
|
|
2116
|
-
extensions: [...
|
|
2117
|
-
}),
|
|
3141
|
+
o && m.push(be.readOnly.of(!0));
|
|
3142
|
+
const x = be.create({
|
|
3143
|
+
doc: R,
|
|
3144
|
+
extensions: [...m, ...r]
|
|
3145
|
+
}), g = new V({
|
|
2118
3146
|
state: x,
|
|
2119
|
-
parent:
|
|
3147
|
+
parent: C.current
|
|
2120
3148
|
});
|
|
2121
|
-
|
|
2122
|
-
}, [
|
|
2123
|
-
|
|
2124
|
-
|
|
3149
|
+
v.current = g, h && h(g);
|
|
3150
|
+
}, [o, l]), Kn(y, () => ({
|
|
3151
|
+
insertTextAtCursor: (R) => {
|
|
3152
|
+
const m = v.current;
|
|
3153
|
+
m && (m.dispatch(m.state.replaceSelection(R)), m.focus());
|
|
3154
|
+
},
|
|
3155
|
+
goToPosition: (R) => {
|
|
3156
|
+
const m = v.current;
|
|
3157
|
+
if (m) {
|
|
3158
|
+
const x = m.state.doc.length, g = Math.max(0, Math.min(R, x));
|
|
3159
|
+
m.dispatch({
|
|
3160
|
+
selection: {
|
|
3161
|
+
anchor: g,
|
|
3162
|
+
head: g
|
|
3163
|
+
},
|
|
3164
|
+
scrollIntoView: !0
|
|
3165
|
+
}), m.focus();
|
|
3166
|
+
}
|
|
3167
|
+
},
|
|
3168
|
+
goToLine: (R, m = 0) => {
|
|
3169
|
+
const x = v.current;
|
|
3170
|
+
if (x) {
|
|
3171
|
+
const g = x.state.doc, S = Math.max(1, Math.min(R, g.lines)), _ = g.line(S), $ = Math.max(0, Math.min(m, _.length)) + _.from;
|
|
3172
|
+
x.dispatch({
|
|
3173
|
+
selection: {
|
|
3174
|
+
anchor: $,
|
|
3175
|
+
head: $
|
|
3176
|
+
},
|
|
3177
|
+
scrollIntoView: !0
|
|
3178
|
+
}), x.focus();
|
|
3179
|
+
}
|
|
3180
|
+
},
|
|
3181
|
+
getEditorView: () => v.current
|
|
3182
|
+
})), /* @__PURE__ */ wt("div", { ref: C, className: `senyao-editor ${o ? "disabled" : ""} ${i}`, style: {
|
|
3183
|
+
height: n,
|
|
3184
|
+
...a
|
|
2125
3185
|
} });
|
|
2126
|
-
},
|
|
3186
|
+
}, or = rt(Bi), Gi = ({
|
|
2127
3187
|
value: e,
|
|
2128
|
-
onChange:
|
|
2129
|
-
language:
|
|
2130
|
-
extensions:
|
|
2131
|
-
theme:
|
|
3188
|
+
onChange: t,
|
|
3189
|
+
language: r = "json",
|
|
3190
|
+
extensions: n = [],
|
|
3191
|
+
theme: o = "light",
|
|
2132
3192
|
showLineNumbers: i = !0,
|
|
2133
|
-
...
|
|
2134
|
-
}) => {
|
|
2135
|
-
const
|
|
2136
|
-
const
|
|
2137
|
-
return [
|
|
2138
|
-
}, [n, o
|
|
2139
|
-
return /* @__PURE__ */
|
|
2140
|
-
},
|
|
3193
|
+
...a
|
|
3194
|
+
}, c) => {
|
|
3195
|
+
const l = ht(() => {
|
|
3196
|
+
const h = li(r) ? ci(r) : [], f = mi(o);
|
|
3197
|
+
return [h, f, ...n];
|
|
3198
|
+
}, [r, n, o]);
|
|
3199
|
+
return /* @__PURE__ */ wt(or, { ref: c, value: e, onChange: t, extensions: l, showLineNumbers: i, ...a });
|
|
3200
|
+
}, fs = rt(Gi), Hi = ({
|
|
2141
3201
|
value: e,
|
|
2142
|
-
onChange:
|
|
2143
|
-
extensions:
|
|
2144
|
-
readOnlyRanges:
|
|
2145
|
-
manageReadOnlyRanges:
|
|
3202
|
+
onChange: t,
|
|
3203
|
+
extensions: r = [],
|
|
3204
|
+
readOnlyRanges: n,
|
|
3205
|
+
manageReadOnlyRanges: o = !0,
|
|
2146
3206
|
showLineNumbers: i = !0,
|
|
2147
|
-
...
|
|
2148
|
-
}) => {
|
|
2149
|
-
const
|
|
2150
|
-
|
|
2151
|
-
if (
|
|
2152
|
-
const
|
|
2153
|
-
let
|
|
2154
|
-
for (let
|
|
2155
|
-
const
|
|
2156
|
-
|
|
2157
|
-
content:
|
|
3207
|
+
...a
|
|
3208
|
+
}, c) => {
|
|
3209
|
+
const l = ue(null), f = ((b) => b != null && typeof b == "object" && "value" in b)(e), y = f ? e.value : e, C = (f && "readOnlyRanges" in e ? e.readOnlyRanges : n) ?? [], [v, R] = Ft(y ?? ""), m = ue(null), [x, g] = Ft(C), S = ue(v), [_, $] = Ft(null), d = ue(!1), q = ue(/* @__PURE__ */ new Map()), A = ue(!1);
|
|
3210
|
+
ge(() => {
|
|
3211
|
+
if (o && C.length > 0 && !_) {
|
|
3212
|
+
const b = [];
|
|
3213
|
+
let T = 0;
|
|
3214
|
+
for (let k = 0; k < C.length; k++) {
|
|
3215
|
+
const O = C[k];
|
|
3216
|
+
O.start > T && b.push({
|
|
3217
|
+
content: v.substring(T, O.start),
|
|
2158
3218
|
editable: !0
|
|
2159
|
-
}),
|
|
2160
|
-
content:
|
|
3219
|
+
}), b.push({
|
|
3220
|
+
content: v.substring(O.start, O.end),
|
|
2161
3221
|
editable: !1
|
|
2162
|
-
}),
|
|
3222
|
+
}), T = O.end;
|
|
2163
3223
|
}
|
|
2164
|
-
|
|
2165
|
-
content:
|
|
3224
|
+
T < v.length && b.push({
|
|
3225
|
+
content: v.substring(T),
|
|
2166
3226
|
editable: !0
|
|
2167
|
-
}),
|
|
3227
|
+
}), $(b);
|
|
2168
3228
|
}
|
|
2169
|
-
}, [
|
|
2170
|
-
if (
|
|
2171
|
-
const
|
|
2172
|
-
|
|
2173
|
-
const
|
|
2174
|
-
|
|
2175
|
-
}),
|
|
3229
|
+
}, [o, C, v, _]), ge(() => {
|
|
3230
|
+
if (v) {
|
|
3231
|
+
const b = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], T = /* @__PURE__ */ new Map();
|
|
3232
|
+
b.forEach((k) => {
|
|
3233
|
+
const O = v.indexOf(k);
|
|
3234
|
+
O >= 0 && T.set(k, O);
|
|
3235
|
+
}), q.current = T;
|
|
2176
3236
|
}
|
|
2177
3237
|
}, []);
|
|
2178
|
-
const
|
|
2179
|
-
const
|
|
2180
|
-
return
|
|
2181
|
-
}, [
|
|
2182
|
-
const
|
|
2183
|
-
return
|
|
2184
|
-
}, []),
|
|
2185
|
-
if (!
|
|
2186
|
-
const
|
|
2187
|
-
let
|
|
2188
|
-
for (let
|
|
2189
|
-
const
|
|
2190
|
-
if (!
|
|
2191
|
-
const
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
content:
|
|
2195
|
-
}),
|
|
3238
|
+
const Ye = ht(() => {
|
|
3239
|
+
const b = [zr(), Hr()];
|
|
3240
|
+
return x.length > 0 && b.push(gi(x)), [...b, ...r];
|
|
3241
|
+
}, [r, x]), Ee = se((b, T, k = 0) => {
|
|
3242
|
+
const O = b.indexOf(T, k);
|
|
3243
|
+
return O >= 0 ? O : null;
|
|
3244
|
+
}, []), Te = se((b, T) => {
|
|
3245
|
+
if (!o || !b || b.length === 0) return b;
|
|
3246
|
+
const k = [...b];
|
|
3247
|
+
let O = 0;
|
|
3248
|
+
for (let G = 0; G < b.length; G++) {
|
|
3249
|
+
const oe = b[G];
|
|
3250
|
+
if (!oe.editable) {
|
|
3251
|
+
const me = Ee(T, oe.content, O);
|
|
3252
|
+
me !== null && (G > 0 && b[G - 1].editable && me > O && (k[G - 1] = {
|
|
3253
|
+
...k[G - 1],
|
|
3254
|
+
content: T.substring(O, me)
|
|
3255
|
+
}), O = me + oe.content.length);
|
|
2196
3256
|
}
|
|
2197
3257
|
}
|
|
2198
|
-
const
|
|
2199
|
-
return
|
|
2200
|
-
...
|
|
2201
|
-
content:
|
|
2202
|
-
}),
|
|
2203
|
-
}, [
|
|
2204
|
-
let
|
|
2205
|
-
return
|
|
2206
|
-
const
|
|
2207
|
-
|
|
2208
|
-
}),
|
|
2209
|
-
}, []),
|
|
2210
|
-
if (!
|
|
2211
|
-
const
|
|
2212
|
-
let
|
|
2213
|
-
for (const
|
|
2214
|
-
const
|
|
2215
|
-
if (
|
|
2216
|
-
|
|
3258
|
+
const Y = b[b.length - 1];
|
|
3259
|
+
return Y.editable && O < T.length && (k[b.length - 1] = {
|
|
3260
|
+
...Y,
|
|
3261
|
+
content: T.substring(O)
|
|
3262
|
+
}), k;
|
|
3263
|
+
}, [o, Ee]), ke = se((b) => {
|
|
3264
|
+
let T = !1;
|
|
3265
|
+
return q.current.forEach((k, O) => {
|
|
3266
|
+
const Y = b.indexOf(O);
|
|
3267
|
+
Y >= 0 && Math.abs(Y - k) > 0 && (q.current.set(O, Y), Y > k && (k === 0 || k < 15) && (T = !0));
|
|
3268
|
+
}), T;
|
|
3269
|
+
}, []), Se = se(() => {
|
|
3270
|
+
if (!m.current) return;
|
|
3271
|
+
const b = m.current, T = b.state.doc.toString(), k = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], O = b.state.selection;
|
|
3272
|
+
let Y = !1;
|
|
3273
|
+
for (const G of k) {
|
|
3274
|
+
const oe = T.indexOf(G);
|
|
3275
|
+
if (oe >= 0) {
|
|
3276
|
+
b.dispatch({
|
|
2217
3277
|
selection: {
|
|
2218
|
-
anchor:
|
|
2219
|
-
head:
|
|
3278
|
+
anchor: oe,
|
|
3279
|
+
head: oe + G.length
|
|
2220
3280
|
},
|
|
2221
3281
|
scrollIntoView: !1
|
|
2222
|
-
}),
|
|
3282
|
+
}), Y = !0;
|
|
2223
3283
|
break;
|
|
2224
3284
|
}
|
|
2225
3285
|
}
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
selection:
|
|
3286
|
+
Y && setTimeout(() => {
|
|
3287
|
+
b.dom && document.contains(b.dom) && b.dispatch({
|
|
3288
|
+
selection: O,
|
|
2229
3289
|
scrollIntoView: !1
|
|
2230
3290
|
});
|
|
2231
3291
|
}, 10);
|
|
2232
|
-
}, []),
|
|
2233
|
-
if (!
|
|
2234
|
-
const
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
3292
|
+
}, []), Z = se(() => {
|
|
3293
|
+
if (!m.current) return;
|
|
3294
|
+
const b = m.current;
|
|
3295
|
+
x.length > 0 && (ye(b, []), setTimeout(() => {
|
|
3296
|
+
b.dom && document.contains(b.dom) && (ye(b, x), setTimeout(() => {
|
|
3297
|
+
b.dom && document.contains(b.dom) && b.dispatch({});
|
|
2238
3298
|
}, 10));
|
|
2239
3299
|
}, 10));
|
|
2240
|
-
}, [
|
|
2241
|
-
const
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
}, 10)),
|
|
2245
|
-
const
|
|
2246
|
-
if (
|
|
2247
|
-
const
|
|
2248
|
-
|
|
3300
|
+
}, [x]), ce = se((b) => {
|
|
3301
|
+
const T = b.value, k = S.current;
|
|
3302
|
+
R(T), k !== T && (!k || T.length > (k == null ? void 0 : k.length) && !k.startsWith(T.substring(0, 5)) && T.includes(k.substring(0, 10))) && (d.current = !0, ke(T) && setTimeout(() => {
|
|
3303
|
+
Se();
|
|
3304
|
+
}, 10)), S.current = T;
|
|
3305
|
+
const O = m.current ? bi(m.current) : x;
|
|
3306
|
+
if (o && _) {
|
|
3307
|
+
const Y = Te(_, T);
|
|
3308
|
+
$(Y);
|
|
2249
3309
|
const {
|
|
2250
|
-
readOnlyRanges:
|
|
2251
|
-
} =
|
|
2252
|
-
|
|
2253
|
-
value:
|
|
2254
|
-
readOnlyRanges:
|
|
3310
|
+
readOnlyRanges: G
|
|
3311
|
+
} = Lr(Y);
|
|
3312
|
+
g(G), m.current && ye(m.current, G), t && t({
|
|
3313
|
+
value: T,
|
|
3314
|
+
readOnlyRanges: G
|
|
2255
3315
|
});
|
|
2256
3316
|
} else
|
|
2257
|
-
|
|
2258
|
-
value:
|
|
2259
|
-
readOnlyRanges:
|
|
3317
|
+
t && t({
|
|
3318
|
+
value: T,
|
|
3319
|
+
readOnlyRanges: O
|
|
2260
3320
|
});
|
|
2261
|
-
}, [
|
|
2262
|
-
|
|
2263
|
-
!
|
|
2264
|
-
}, [
|
|
2265
|
-
if (
|
|
3321
|
+
}, [t, o, _, x, Te, ke, Se]);
|
|
3322
|
+
ge(() => {
|
|
3323
|
+
!o && JSON.stringify(C) !== JSON.stringify(x) && (g(C), m.current && ye(m.current, C));
|
|
3324
|
+
}, [C, x, o]), ge(() => {
|
|
3325
|
+
if (o && _) {
|
|
2266
3326
|
const {
|
|
2267
|
-
readOnlyRanges:
|
|
2268
|
-
} =
|
|
2269
|
-
JSON.stringify(
|
|
2270
|
-
}
|
|
2271
|
-
}, [
|
|
2272
|
-
|
|
2273
|
-
}, [
|
|
2274
|
-
|
|
2275
|
-
|
|
3327
|
+
readOnlyRanges: b
|
|
3328
|
+
} = Lr(_);
|
|
3329
|
+
JSON.stringify(b) !== JSON.stringify(x) && (g(b), m.current && ye(m.current, b));
|
|
3330
|
+
}
|
|
3331
|
+
}, [_, x, o]), ge(() => {
|
|
3332
|
+
m.current && d.current && (d.current = !1, m.current.dispatch({}));
|
|
3333
|
+
}, [v]), ge(() => {
|
|
3334
|
+
m.current && x.length > 0 && !A.current && (A.current = !0, setTimeout(() => {
|
|
3335
|
+
Z();
|
|
2276
3336
|
}, 50), setTimeout(() => {
|
|
2277
|
-
|
|
3337
|
+
Z();
|
|
2278
3338
|
}, 200));
|
|
2279
|
-
}, [
|
|
2280
|
-
const
|
|
2281
|
-
if (
|
|
2282
|
-
|
|
2283
|
-
|
|
3339
|
+
}, [Z, x]);
|
|
3340
|
+
const pe = se((b) => {
|
|
3341
|
+
if (m.current = b, x.length > 0 && (ye(b, x), setTimeout(() => {
|
|
3342
|
+
ye(b, []), setTimeout(() => {
|
|
3343
|
+
ye(b, x);
|
|
2284
3344
|
}, 10);
|
|
2285
|
-
}, 50)),
|
|
2286
|
-
const
|
|
2287
|
-
|
|
2288
|
-
const
|
|
2289
|
-
|
|
2290
|
-
}),
|
|
2291
|
-
}
|
|
2292
|
-
}, [
|
|
2293
|
-
|
|
2294
|
-
|
|
2295
|
-
}, 0);
|
|
2296
|
-
}, [U]);
|
|
2297
|
-
return /* @__PURE__ */ rr(xr, { value: e, onChange: Re, extensions: y, onEditorViewCreated: A, showLineNumbers: i, ...u });
|
|
2298
|
-
};
|
|
2299
|
-
function Co(e) {
|
|
3345
|
+
}, 50)), v) {
|
|
3346
|
+
const T = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], k = /* @__PURE__ */ new Map();
|
|
3347
|
+
T.forEach((O) => {
|
|
3348
|
+
const Y = v.indexOf(O);
|
|
3349
|
+
Y >= 0 && k.set(O, Y);
|
|
3350
|
+
}), q.current = k;
|
|
3351
|
+
}
|
|
3352
|
+
}, [x, v]);
|
|
3353
|
+
return /* @__PURE__ */ wt(or, { ref: l, value: v, onChange: ce, extensions: Ye, showLineNumbers: i, onEditorViewCreated: pe, ...a });
|
|
3354
|
+
}, hs = rt(Hi), Ji = (e, t) => {
|
|
2300
3355
|
const {
|
|
2301
3356
|
value: r,
|
|
2302
3357
|
onChange: n,
|
|
2303
3358
|
extensions: o = [],
|
|
2304
|
-
showLineNumbers:
|
|
2305
|
-
enableFormatting:
|
|
2306
|
-
...
|
|
2307
|
-
} = e,
|
|
3359
|
+
showLineNumbers: i = !0,
|
|
3360
|
+
enableFormatting: a = !1,
|
|
3361
|
+
...c
|
|
3362
|
+
} = e, l = ue(!0), h = ue(null), f = se((g) => {
|
|
2308
3363
|
try {
|
|
2309
|
-
return
|
|
3364
|
+
return g === "" || JSON.parse(g), !0;
|
|
2310
3365
|
} catch {
|
|
2311
3366
|
return !1;
|
|
2312
3367
|
}
|
|
2313
|
-
}, []),
|
|
3368
|
+
}, []), y = se((g) => {
|
|
2314
3369
|
try {
|
|
2315
|
-
if (!
|
|
2316
|
-
const S = JSON.parse(
|
|
3370
|
+
if (!g.trim()) return "";
|
|
3371
|
+
const S = JSON.parse(g);
|
|
2317
3372
|
return JSON.stringify(S, null, 2);
|
|
2318
3373
|
} catch {
|
|
2319
|
-
return
|
|
3374
|
+
return g;
|
|
2320
3375
|
}
|
|
2321
|
-
}, []),
|
|
2322
|
-
if (!
|
|
2323
|
-
const
|
|
2324
|
-
if (
|
|
2325
|
-
const
|
|
3376
|
+
}, []), C = se(() => {
|
|
3377
|
+
if (!h.current) return !1;
|
|
3378
|
+
const g = h.current, S = g.state.doc.toString(), _ = y(S);
|
|
3379
|
+
if (_ === S) return !1;
|
|
3380
|
+
const $ = g.state.update({
|
|
2326
3381
|
changes: {
|
|
2327
3382
|
from: 0,
|
|
2328
|
-
to:
|
|
2329
|
-
insert:
|
|
3383
|
+
to: g.state.doc.length,
|
|
3384
|
+
insert: _
|
|
2330
3385
|
}
|
|
2331
3386
|
});
|
|
2332
|
-
return
|
|
2333
|
-
}, [
|
|
2334
|
-
key: "Enter",
|
|
2335
|
-
run: (y) => {
|
|
2336
|
-
const S = y.state.selection.main, {
|
|
2337
|
-
from: b,
|
|
2338
|
-
to: _
|
|
2339
|
-
} = S, j = y.state.doc.lineAt(b);
|
|
2340
|
-
if (b === _ && b === j.to) {
|
|
2341
|
-
const l = y.state.update({
|
|
2342
|
-
changes: {
|
|
2343
|
-
from: b,
|
|
2344
|
-
to: _,
|
|
2345
|
-
insert: `
|
|
2346
|
-
`
|
|
2347
|
-
},
|
|
2348
|
-
selection: {
|
|
2349
|
-
anchor: b + 1
|
|
2350
|
-
}
|
|
2351
|
-
});
|
|
2352
|
-
return y.dispatch(l), !0;
|
|
2353
|
-
}
|
|
2354
|
-
return !1;
|
|
2355
|
-
}
|
|
2356
|
-
}, {
|
|
3387
|
+
return g.dispatch($), !0;
|
|
3388
|
+
}, [y]), v = ht(() => we.of([{
|
|
2357
3389
|
key: "Alt-f",
|
|
2358
3390
|
mac: "Mod-Alt-f",
|
|
2359
|
-
run: () =>
|
|
2360
|
-
}]), [
|
|
3391
|
+
run: () => C()
|
|
3392
|
+
}]), [C]), R = se((g) => {
|
|
2361
3393
|
if (n) {
|
|
2362
|
-
const S =
|
|
2363
|
-
|
|
3394
|
+
const S = f(g.value);
|
|
3395
|
+
l.current = S, n(g);
|
|
2364
3396
|
}
|
|
2365
|
-
}, [n,
|
|
2366
|
-
|
|
2367
|
-
|
|
3397
|
+
}, [n, f]), m = ht(() => [Ur(), to(), Xn(), Qr.highest(v), ...o], [v, o]), x = se((g) => {
|
|
3398
|
+
h.current = g, a && r && setTimeout(() => {
|
|
3399
|
+
C();
|
|
2368
3400
|
}, 0);
|
|
2369
|
-
}, [
|
|
2370
|
-
return /* @__PURE__ */
|
|
2371
|
-
}
|
|
3401
|
+
}, [a, r, C]);
|
|
3402
|
+
return /* @__PURE__ */ wt(or, { ref: t, value: r, showLineNumbers: i, onChange: R, extensions: m, onEditorViewCreated: x, ...c });
|
|
3403
|
+
}, ds = rt(Ji);
|
|
2372
3404
|
export {
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
|
|
2379
|
-
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
|
|
3405
|
+
fs as Editor,
|
|
3406
|
+
or as GenericEditor,
|
|
3407
|
+
ds as JSONEditor,
|
|
3408
|
+
hs as SQLEditor,
|
|
3409
|
+
Ui as applyChinese,
|
|
3410
|
+
Lr as blocksToEditorData,
|
|
3411
|
+
zi as chineseLanguageExtension,
|
|
3412
|
+
wn as closeSearchPanel,
|
|
3413
|
+
as as commonExtensions,
|
|
3414
|
+
ui as createAutocompletionExtension,
|
|
3415
|
+
Yr as createEnglishSearchExtension,
|
|
3416
|
+
ls as createHighlightOnlyExtension,
|
|
3417
|
+
fi as createKeymapExtension,
|
|
3418
|
+
ss as createLintExtension,
|
|
3419
|
+
qr as createSearchExtension,
|
|
3420
|
+
us as customSearchKeymap,
|
|
3421
|
+
pi as darkTheme,
|
|
3422
|
+
bi as getCurrentReadOnlyRanges,
|
|
3423
|
+
ci as getLanguageExtension,
|
|
3424
|
+
mi as getThemeExtension,
|
|
3425
|
+
er as highlightSelectionMatches,
|
|
3426
|
+
li as isSupportedLanguage,
|
|
3427
|
+
Fr as lightTheme,
|
|
3428
|
+
Rn as openSearchPanel,
|
|
3429
|
+
gi as readOnlyRanges,
|
|
3430
|
+
bn as search,
|
|
3431
|
+
_n as searchKeymap,
|
|
3432
|
+
cs as searchTranslationsZhCN,
|
|
3433
|
+
ye as updateReadOnlyRanges
|
|
2390
3434
|
};
|