@senyao-design-system/editor 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs ADDED
@@ -0,0 +1,2192 @@
1
+ import * as oe from "react";
2
+ import et, { forwardRef as Yt, useContext as Wt, useRef as me, useEffect as ie, useMemo as vr, useState as Nr, useCallback as ee } from "react";
3
+ import { sql as rt } from "@codemirror/lang-sql";
4
+ import { json as tt } from "@codemirror/lang-json";
5
+ import { keymap as Be, EditorView as Q, Decoration as cr, placeholder as jr } from "@codemirror/view";
6
+ import { indentWithTab as fr } from "@codemirror/commands";
7
+ import { autocompletion as Vt } from "@codemirror/autocomplete";
8
+ import { lintGutter as nt, linter as at } from "@codemirror/lint";
9
+ import { StateEffect as Ut, StateField as Gt, EditorState as ue } from "@codemirror/state";
10
+ import { syntaxHighlighting as Lr, defaultHighlightStyle as Dr } from "@codemirror/language";
11
+ var ur = { exports: {} }, Te = {};
12
+ /**
13
+ * @license React
14
+ * react-jsx-runtime.production.min.js
15
+ *
16
+ * Copyright (c) Facebook, Inc. and its affiliates.
17
+ *
18
+ * This source code is licensed under the MIT license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ */
21
+ var Yr;
22
+ function qt() {
23
+ if (Yr) return Te;
24
+ Yr = 1;
25
+ var e = et, r = Symbol.for("react.element"), n = Symbol.for("react.fragment"), a = 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 };
26
+ function s(c, d, p) {
27
+ var u, y = {}, x = null, R = null;
28
+ p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (R = d.ref);
29
+ for (u in d) a.call(d, u) && !i.hasOwnProperty(u) && (y[u] = d[u]);
30
+ if (c && c.defaultProps) for (u in d = c.defaultProps, d) y[u] === void 0 && (y[u] = d[u]);
31
+ return { $$typeof: r, type: c, key: x, ref: R, props: y, _owner: o.current };
32
+ }
33
+ return Te.Fragment = n, Te.jsx = s, Te.jsxs = s, Te;
34
+ }
35
+ var Oe = {};
36
+ /**
37
+ * @license React
38
+ * react-jsx-runtime.development.js
39
+ *
40
+ * Copyright (c) Facebook, Inc. and its affiliates.
41
+ *
42
+ * This source code is licensed under the MIT license found in the
43
+ * LICENSE file in the root directory of this source tree.
44
+ */
45
+ var Wr;
46
+ function Bt() {
47
+ return Wr || (Wr = 1, process.env.NODE_ENV !== "production" && function() {
48
+ var e = et, r = Symbol.for("react.element"), n = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), R = Symbol.for("react.offscreen"), E = Symbol.iterator, C = "@@iterator";
49
+ function j(t) {
50
+ if (t === null || typeof t != "object")
51
+ return null;
52
+ var f = E && t[E] || t[C];
53
+ return typeof f == "function" ? f : null;
54
+ }
55
+ var w = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
56
+ function S(t) {
57
+ {
58
+ for (var f = arguments.length, h = new Array(f > 1 ? f - 1 : 0), b = 1; b < f; b++)
59
+ h[b - 1] = arguments[b];
60
+ k("error", t, h);
61
+ }
62
+ }
63
+ function k(t, f, h) {
64
+ {
65
+ var b = w.ReactDebugCurrentFrame, M = b.getStackAddendum();
66
+ M !== "" && (f += "%s", h = h.concat([M]));
67
+ var N = h.map(function(T) {
68
+ return String(T);
69
+ });
70
+ N.unshift("Warning: " + f), Function.prototype.apply.call(console[t], console, N);
71
+ }
72
+ }
73
+ var L = !1, l = !1, m = !1, v = !1, P = !1, O;
74
+ O = Symbol.for("react.module.reference");
75
+ function D(t) {
76
+ return !!(typeof t == "string" || typeof t == "function" || t === a || t === i || P || t === o || t === p || t === u || v || t === R || L || l || m || typeof t == "object" && t !== null && (t.$$typeof === x || t.$$typeof === y || t.$$typeof === s || t.$$typeof === c || t.$$typeof === d || // This needs to include all possible module reference object
77
+ // types supported by any Flight configuration anywhere since
78
+ // we don't know which Flight build this will end up being used
79
+ // with.
80
+ t.$$typeof === O || t.getModuleId !== void 0));
81
+ }
82
+ function U(t, f, h) {
83
+ var b = t.displayName;
84
+ if (b)
85
+ return b;
86
+ var M = f.displayName || f.name || "";
87
+ return M !== "" ? h + "(" + M + ")" : h;
88
+ }
89
+ function X(t) {
90
+ return t.displayName || "Context";
91
+ }
92
+ function B(t) {
93
+ if (t == null)
94
+ return null;
95
+ if (typeof t.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof t == "function")
96
+ return t.displayName || t.name || null;
97
+ if (typeof t == "string")
98
+ return t;
99
+ switch (t) {
100
+ case a:
101
+ return "Fragment";
102
+ case n:
103
+ return "Portal";
104
+ case i:
105
+ return "Profiler";
106
+ case o:
107
+ return "StrictMode";
108
+ case p:
109
+ return "Suspense";
110
+ case u:
111
+ return "SuspenseList";
112
+ }
113
+ if (typeof t == "object")
114
+ switch (t.$$typeof) {
115
+ case c:
116
+ var f = t;
117
+ return X(f) + ".Consumer";
118
+ case s:
119
+ var h = t;
120
+ return X(h._context) + ".Provider";
121
+ case d:
122
+ return U(t, t.render, "ForwardRef");
123
+ case y:
124
+ var b = t.displayName || null;
125
+ return b !== null ? b : B(t.type) || "Memo";
126
+ case x: {
127
+ var M = t, N = M._payload, T = M._init;
128
+ try {
129
+ return B(T(N));
130
+ } catch {
131
+ return null;
132
+ }
133
+ }
134
+ }
135
+ return null;
136
+ }
137
+ var ae = Object.assign, se = 0, Ie, Fe, Ee, Ne, Se, je, Le;
138
+ function De() {
139
+ }
140
+ De.__reactDisabledLog = !0;
141
+ function Qe() {
142
+ {
143
+ if (se === 0) {
144
+ Ie = console.log, Fe = console.info, Ee = console.warn, Ne = console.error, Se = console.group, je = console.groupCollapsed, Le = console.groupEnd;
145
+ var t = {
146
+ configurable: !0,
147
+ enumerable: !0,
148
+ value: De,
149
+ writable: !0
150
+ };
151
+ Object.defineProperties(console, {
152
+ info: t,
153
+ log: t,
154
+ warn: t,
155
+ error: t,
156
+ group: t,
157
+ groupCollapsed: t,
158
+ groupEnd: t
159
+ });
160
+ }
161
+ se++;
162
+ }
163
+ }
164
+ function er() {
165
+ {
166
+ if (se--, se === 0) {
167
+ var t = {
168
+ configurable: !0,
169
+ enumerable: !0,
170
+ writable: !0
171
+ };
172
+ Object.defineProperties(console, {
173
+ log: ae({}, t, {
174
+ value: Ie
175
+ }),
176
+ info: ae({}, t, {
177
+ value: Fe
178
+ }),
179
+ warn: ae({}, t, {
180
+ value: Ee
181
+ }),
182
+ error: ae({}, t, {
183
+ value: Ne
184
+ }),
185
+ group: ae({}, t, {
186
+ value: Se
187
+ }),
188
+ groupCollapsed: ae({}, t, {
189
+ value: je
190
+ }),
191
+ groupEnd: ae({}, t, {
192
+ value: Le
193
+ })
194
+ });
195
+ }
196
+ se < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
197
+ }
198
+ }
199
+ var Re = w.ReactCurrentDispatcher, Ce;
200
+ function le(t, f, h) {
201
+ {
202
+ if (Ce === void 0)
203
+ try {
204
+ throw Error();
205
+ } catch (M) {
206
+ var b = M.stack.trim().match(/\n( *(at )?)/);
207
+ Ce = b && b[1] || "";
208
+ }
209
+ return `
210
+ ` + Ce + t;
211
+ }
212
+ }
213
+ var _e = !1, de;
214
+ {
215
+ var rr = typeof WeakMap == "function" ? WeakMap : Map;
216
+ de = new rr();
217
+ }
218
+ function g(t, f) {
219
+ if (!t || _e)
220
+ return "";
221
+ {
222
+ var h = de.get(t);
223
+ if (h !== void 0)
224
+ return h;
225
+ }
226
+ var b;
227
+ _e = !0;
228
+ var M = Error.prepareStackTrace;
229
+ Error.prepareStackTrace = void 0;
230
+ var N;
231
+ N = Re.current, Re.current = null, Qe();
232
+ try {
233
+ if (f) {
234
+ var T = function() {
235
+ throw Error();
236
+ };
237
+ if (Object.defineProperty(T.prototype, "props", {
238
+ set: function() {
239
+ throw Error();
240
+ }
241
+ }), typeof Reflect == "object" && Reflect.construct) {
242
+ try {
243
+ Reflect.construct(T, []);
244
+ } catch (z) {
245
+ b = z;
246
+ }
247
+ Reflect.construct(t, [], T);
248
+ } else {
249
+ try {
250
+ T.call();
251
+ } catch (z) {
252
+ b = z;
253
+ }
254
+ t.call(T.prototype);
255
+ }
256
+ } else {
257
+ try {
258
+ throw Error();
259
+ } catch (z) {
260
+ b = z;
261
+ }
262
+ t();
263
+ }
264
+ } catch (z) {
265
+ if (z && b && typeof z.stack == "string") {
266
+ for (var _ = z.stack.split(`
267
+ `), J = b.stack.split(`
268
+ `), Y = _.length - 1, W = J.length - 1; Y >= 1 && W >= 0 && _[Y] !== J[W]; )
269
+ W--;
270
+ for (; Y >= 1 && W >= 0; Y--, W--)
271
+ if (_[Y] !== J[W]) {
272
+ if (Y !== 1 || W !== 1)
273
+ do
274
+ if (Y--, W--, W < 0 || _[Y] !== J[W]) {
275
+ var Z = `
276
+ ` + _[Y].replace(" at new ", " at ");
277
+ return t.displayName && Z.includes("<anonymous>") && (Z = Z.replace("<anonymous>", t.displayName)), typeof t == "function" && de.set(t, Z), Z;
278
+ }
279
+ while (Y >= 1 && W >= 0);
280
+ break;
281
+ }
282
+ }
283
+ } finally {
284
+ _e = !1, Re.current = N, er(), Error.prepareStackTrace = M;
285
+ }
286
+ var ve = t ? t.displayName || t.name : "", fe = ve ? le(ve) : "";
287
+ return typeof t == "function" && de.set(t, fe), fe;
288
+ }
289
+ function xe(t, f, h) {
290
+ return g(t, !1);
291
+ }
292
+ function he(t) {
293
+ var f = t.prototype;
294
+ return !!(f && f.isReactComponent);
295
+ }
296
+ function ce(t, f, h) {
297
+ if (t == null)
298
+ return "";
299
+ if (typeof t == "function")
300
+ return g(t, he(t));
301
+ if (typeof t == "string")
302
+ return le(t);
303
+ switch (t) {
304
+ case p:
305
+ return le("Suspense");
306
+ case u:
307
+ return le("SuspenseList");
308
+ }
309
+ if (typeof t == "object")
310
+ switch (t.$$typeof) {
311
+ case d:
312
+ return xe(t.render);
313
+ case y:
314
+ return ce(t.type, f, h);
315
+ case x: {
316
+ var b = t, M = b._payload, N = b._init;
317
+ try {
318
+ return ce(N(M), f, h);
319
+ } catch {
320
+ }
321
+ }
322
+ }
323
+ return "";
324
+ }
325
+ var we = Object.prototype.hasOwnProperty, Rr = {}, Cr = w.ReactDebugCurrentFrame;
326
+ function Ye(t) {
327
+ if (t) {
328
+ var f = t._owner, h = ce(t.type, t._source, f ? f.type : null);
329
+ Cr.setExtraStackFrame(h);
330
+ } else
331
+ Cr.setExtraStackFrame(null);
332
+ }
333
+ function yt(t, f, h, b, M) {
334
+ {
335
+ var N = Function.call.bind(we);
336
+ for (var T in t)
337
+ if (N(t, T)) {
338
+ var _ = void 0;
339
+ try {
340
+ if (typeof t[T] != "function") {
341
+ var J = Error((b || "React class") + ": " + h + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof t[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
342
+ throw J.name = "Invariant Violation", J;
343
+ }
344
+ _ = t[T](f, T, b, h, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
345
+ } catch (Y) {
346
+ _ = Y;
347
+ }
348
+ _ && !(_ instanceof Error) && (Ye(M), 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).", b || "React class", h, T, typeof _), Ye(null)), _ instanceof Error && !(_.message in Rr) && (Rr[_.message] = !0, Ye(M), S("Failed %s type: %s", h, _.message), Ye(null));
349
+ }
350
+ }
351
+ }
352
+ var bt = Array.isArray;
353
+ function tr(t) {
354
+ return bt(t);
355
+ }
356
+ function Et(t) {
357
+ {
358
+ var f = typeof Symbol == "function" && Symbol.toStringTag, h = f && t[Symbol.toStringTag] || t.constructor.name || "Object";
359
+ return h;
360
+ }
361
+ }
362
+ function St(t) {
363
+ try {
364
+ return _r(t), !1;
365
+ } catch {
366
+ return !0;
367
+ }
368
+ }
369
+ function _r(t) {
370
+ return "" + t;
371
+ }
372
+ function xr(t) {
373
+ if (St(t))
374
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Et(t)), _r(t);
375
+ }
376
+ var wr = w.ReactCurrentOwner, Rt = {
377
+ key: !0,
378
+ ref: !0,
379
+ __self: !0,
380
+ __source: !0
381
+ }, Tr, Or;
382
+ function Ct(t) {
383
+ if (we.call(t, "ref")) {
384
+ var f = Object.getOwnPropertyDescriptor(t, "ref").get;
385
+ if (f && f.isReactWarning)
386
+ return !1;
387
+ }
388
+ return t.ref !== void 0;
389
+ }
390
+ function _t(t) {
391
+ if (we.call(t, "key")) {
392
+ var f = Object.getOwnPropertyDescriptor(t, "key").get;
393
+ if (f && f.isReactWarning)
394
+ return !1;
395
+ }
396
+ return t.key !== void 0;
397
+ }
398
+ function xt(t, f) {
399
+ typeof t.ref == "string" && wr.current;
400
+ }
401
+ function wt(t, f) {
402
+ {
403
+ var h = function() {
404
+ Tr || (Tr = !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)", f));
405
+ };
406
+ h.isReactWarning = !0, Object.defineProperty(t, "key", {
407
+ get: h,
408
+ configurable: !0
409
+ });
410
+ }
411
+ }
412
+ function Tt(t, f) {
413
+ {
414
+ var h = function() {
415
+ Or || (Or = !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)", f));
416
+ };
417
+ h.isReactWarning = !0, Object.defineProperty(t, "ref", {
418
+ get: h,
419
+ configurable: !0
420
+ });
421
+ }
422
+ }
423
+ var Ot = function(t, f, h, b, M, N, T) {
424
+ var _ = {
425
+ // This tag allows us to uniquely identify this as a React Element
426
+ $$typeof: r,
427
+ // Built-in properties that belong on the element
428
+ type: t,
429
+ key: f,
430
+ ref: h,
431
+ props: T,
432
+ // Record the component responsible for creating this element.
433
+ _owner: N
434
+ };
435
+ return _._store = {}, Object.defineProperty(_._store, "validated", {
436
+ configurable: !1,
437
+ enumerable: !1,
438
+ writable: !0,
439
+ value: !1
440
+ }), Object.defineProperty(_, "_self", {
441
+ configurable: !1,
442
+ enumerable: !1,
443
+ writable: !1,
444
+ value: b
445
+ }), Object.defineProperty(_, "_source", {
446
+ configurable: !1,
447
+ enumerable: !1,
448
+ writable: !1,
449
+ value: M
450
+ }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
451
+ };
452
+ function Pt(t, f, h, b, M) {
453
+ {
454
+ var N, T = {}, _ = null, J = null;
455
+ h !== void 0 && (xr(h), _ = "" + h), _t(f) && (xr(f.key), _ = "" + f.key), Ct(f) && (J = f.ref, xt(f, M));
456
+ for (N in f)
457
+ we.call(f, N) && !Rt.hasOwnProperty(N) && (T[N] = f[N]);
458
+ if (t && t.defaultProps) {
459
+ var Y = t.defaultProps;
460
+ for (N in Y)
461
+ T[N] === void 0 && (T[N] = Y[N]);
462
+ }
463
+ if (_ || J) {
464
+ var W = typeof t == "function" ? t.displayName || t.name || "Unknown" : t;
465
+ _ && wt(T, W), J && Tt(T, W);
466
+ }
467
+ return Ot(t, _, J, M, b, wr.current, T);
468
+ }
469
+ }
470
+ var nr = w.ReactCurrentOwner, Pr = w.ReactDebugCurrentFrame;
471
+ function pe(t) {
472
+ if (t) {
473
+ var f = t._owner, h = ce(t.type, t._source, f ? f.type : null);
474
+ Pr.setExtraStackFrame(h);
475
+ } else
476
+ Pr.setExtraStackFrame(null);
477
+ }
478
+ var ar;
479
+ ar = !1;
480
+ function or(t) {
481
+ return typeof t == "object" && t !== null && t.$$typeof === r;
482
+ }
483
+ function kr() {
484
+ {
485
+ if (nr.current) {
486
+ var t = B(nr.current.type);
487
+ if (t)
488
+ return `
489
+
490
+ Check the render method of \`` + t + "`.";
491
+ }
492
+ return "";
493
+ }
494
+ }
495
+ function kt(t) {
496
+ return "";
497
+ }
498
+ var $r = {};
499
+ function $t(t) {
500
+ {
501
+ var f = kr();
502
+ if (!f) {
503
+ var h = typeof t == "string" ? t : t.displayName || t.name;
504
+ h && (f = `
505
+
506
+ Check the top-level render call using <` + h + ">.");
507
+ }
508
+ return f;
509
+ }
510
+ }
511
+ function Ar(t, f) {
512
+ {
513
+ if (!t._store || t._store.validated || t.key != null)
514
+ return;
515
+ t._store.validated = !0;
516
+ var h = $t(f);
517
+ if ($r[h])
518
+ return;
519
+ $r[h] = !0;
520
+ var b = "";
521
+ t && t._owner && t._owner !== nr.current && (b = " It was passed a child from " + B(t._owner.type) + "."), pe(t), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', h, b), pe(null);
522
+ }
523
+ }
524
+ function Mr(t, f) {
525
+ {
526
+ if (typeof t != "object")
527
+ return;
528
+ if (tr(t))
529
+ for (var h = 0; h < t.length; h++) {
530
+ var b = t[h];
531
+ or(b) && Ar(b, f);
532
+ }
533
+ else if (or(t))
534
+ t._store && (t._store.validated = !0);
535
+ else if (t) {
536
+ var M = j(t);
537
+ if (typeof M == "function" && M !== t.entries)
538
+ for (var N = M.call(t), T; !(T = N.next()).done; )
539
+ or(T.value) && Ar(T.value, f);
540
+ }
541
+ }
542
+ }
543
+ function At(t) {
544
+ {
545
+ var f = t.type;
546
+ if (f == null || typeof f == "string")
547
+ return;
548
+ var h;
549
+ if (typeof f == "function")
550
+ h = f.propTypes;
551
+ else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
552
+ // Inner props are checked in the reconciler.
553
+ f.$$typeof === y))
554
+ h = f.propTypes;
555
+ else
556
+ return;
557
+ if (h) {
558
+ var b = B(f);
559
+ yt(h, t.props, "prop", b, t);
560
+ } else if (f.PropTypes !== void 0 && !ar) {
561
+ ar = !0;
562
+ var M = B(f);
563
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
564
+ }
565
+ typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
566
+ }
567
+ }
568
+ function Mt(t) {
569
+ {
570
+ for (var f = Object.keys(t.props), h = 0; h < f.length; h++) {
571
+ var b = f[h];
572
+ if (b !== "children" && b !== "key") {
573
+ pe(t), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", b), pe(null);
574
+ break;
575
+ }
576
+ }
577
+ t.ref !== null && (pe(t), S("Invalid attribute `ref` supplied to `React.Fragment`."), pe(null));
578
+ }
579
+ }
580
+ var Ir = {};
581
+ function Fr(t, f, h, b, M, N) {
582
+ {
583
+ var T = D(t);
584
+ if (!T) {
585
+ var _ = "";
586
+ (t === void 0 || typeof t == "object" && t !== null && Object.keys(t).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
587
+ var J = kt();
588
+ J ? _ += J : _ += kr();
589
+ var Y;
590
+ t === null ? Y = "null" : tr(t) ? Y = "array" : t !== void 0 && t.$$typeof === r ? (Y = "<" + (B(t.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : Y = typeof t, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Y, _);
591
+ }
592
+ var W = Pt(t, f, h, M, N);
593
+ if (W == null)
594
+ return W;
595
+ if (T) {
596
+ var Z = f.children;
597
+ if (Z !== void 0)
598
+ if (b)
599
+ if (tr(Z)) {
600
+ for (var ve = 0; ve < Z.length; ve++)
601
+ Mr(Z[ve], t);
602
+ Object.freeze && Object.freeze(Z);
603
+ } else
604
+ 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.");
605
+ else
606
+ Mr(Z, t);
607
+ }
608
+ if (we.call(f, "key")) {
609
+ var fe = B(t), z = Object.keys(f).filter(function(Dt) {
610
+ return Dt !== "key";
611
+ }), ir = z.length > 0 ? "{key: someKey, " + z.join(": ..., ") + ": ...}" : "{key: someKey}";
612
+ if (!Ir[fe + ir]) {
613
+ var Lt = z.length > 0 ? "{" + z.join(": ..., ") + ": ...}" : "{}";
614
+ S(`A props object containing a "key" prop is being spread into JSX:
615
+ let props = %s;
616
+ <%s {...props} />
617
+ React keys must be passed directly to JSX without using spread:
618
+ let props = %s;
619
+ <%s key={someKey} {...props} />`, ir, fe, Lt, fe), Ir[fe + ir] = !0;
620
+ }
621
+ }
622
+ return t === a ? Mt(W) : At(W), W;
623
+ }
624
+ }
625
+ function It(t, f, h) {
626
+ return Fr(t, f, h, !0);
627
+ }
628
+ function Ft(t, f, h) {
629
+ return Fr(t, f, h, !1);
630
+ }
631
+ var Nt = Ft, jt = It;
632
+ Oe.Fragment = a, Oe.jsx = Nt, Oe.jsxs = jt;
633
+ }()), Oe;
634
+ }
635
+ process.env.NODE_ENV === "production" ? ur.exports = qt() : ur.exports = Bt();
636
+ var Vr = ur.exports;
637
+ function Jt(e) {
638
+ if (e.sheet)
639
+ return e.sheet;
640
+ for (var r = 0; r < document.styleSheets.length; r++)
641
+ if (document.styleSheets[r].ownerNode === e)
642
+ return document.styleSheets[r];
643
+ }
644
+ function zt(e) {
645
+ var r = document.createElement("style");
646
+ return r.setAttribute("data-emotion", e.key), e.nonce !== void 0 && r.setAttribute("nonce", e.nonce), r.appendChild(document.createTextNode("")), r.setAttribute("data-s", ""), r;
647
+ }
648
+ var Kt = /* @__PURE__ */ function() {
649
+ function e(n) {
650
+ var a = this;
651
+ this._insertTag = function(o) {
652
+ var i;
653
+ a.tags.length === 0 ? a.insertionPoint ? i = a.insertionPoint.nextSibling : a.prepend ? i = a.container.firstChild : i = a.before : i = a.tags[a.tags.length - 1].nextSibling, a.container.insertBefore(o, i), a.tags.push(o);
654
+ }, this.isSpeedy = n.speedy === void 0 ? !0 : n.speedy, this.tags = [], this.ctr = 0, this.nonce = n.nonce, this.key = n.key, this.container = n.container, this.prepend = n.prepend, this.insertionPoint = n.insertionPoint, this.before = null;
655
+ }
656
+ var r = e.prototype;
657
+ return r.hydrate = function(a) {
658
+ a.forEach(this._insertTag);
659
+ }, r.insert = function(a) {
660
+ this.ctr % (this.isSpeedy ? 65e3 : 1) === 0 && this._insertTag(zt(this));
661
+ var o = this.tags[this.tags.length - 1];
662
+ if (this.isSpeedy) {
663
+ var i = Jt(o);
664
+ try {
665
+ i.insertRule(a, i.cssRules.length);
666
+ } catch {
667
+ }
668
+ } else
669
+ o.appendChild(document.createTextNode(a));
670
+ this.ctr++;
671
+ }, r.flush = function() {
672
+ this.tags.forEach(function(a) {
673
+ var o;
674
+ return (o = a.parentNode) == null ? void 0 : o.removeChild(a);
675
+ }), this.tags = [], this.ctr = 0;
676
+ }, e;
677
+ }(), q = "-ms-", Je = "-moz-", $ = "-webkit-", ot = "comm", mr = "rule", gr = "decl", Ht = "@import", it = "@keyframes", Xt = "@layer", Zt = Math.abs, Ke = String.fromCharCode, Qt = Object.assign;
678
+ function en(e, r) {
679
+ return G(e, 0) ^ 45 ? (((r << 2 ^ G(e, 0)) << 2 ^ G(e, 1)) << 2 ^ G(e, 2)) << 2 ^ G(e, 3) : 0;
680
+ }
681
+ function st(e) {
682
+ return e.trim();
683
+ }
684
+ function rn(e, r) {
685
+ return (e = r.exec(e)) ? e[0] : e;
686
+ }
687
+ function A(e, r, n) {
688
+ return e.replace(r, n);
689
+ }
690
+ function lr(e, r) {
691
+ return e.indexOf(r);
692
+ }
693
+ function G(e, r) {
694
+ return e.charCodeAt(r) | 0;
695
+ }
696
+ function ke(e, r, n) {
697
+ return e.slice(r, n);
698
+ }
699
+ function re(e) {
700
+ return e.length;
701
+ }
702
+ function yr(e) {
703
+ return e.length;
704
+ }
705
+ function We(e, r) {
706
+ return r.push(e), e;
707
+ }
708
+ function tn(e, r) {
709
+ return e.map(r).join("");
710
+ }
711
+ var He = 1, ye = 1, ct = 0, K = 0, V = 0, be = "";
712
+ function Xe(e, r, n, a, o, i, s) {
713
+ return { value: e, root: r, parent: n, type: a, props: o, children: i, line: He, column: ye, length: s, return: "" };
714
+ }
715
+ function Pe(e, r) {
716
+ return Qt(Xe("", null, null, "", null, null, 0), e, { length: -e.length }, r);
717
+ }
718
+ function nn() {
719
+ return V;
720
+ }
721
+ function an() {
722
+ return V = K > 0 ? G(be, --K) : 0, ye--, V === 10 && (ye = 1, He--), V;
723
+ }
724
+ function H() {
725
+ return V = K < ct ? G(be, K++) : 0, ye++, V === 10 && (ye = 1, He++), V;
726
+ }
727
+ function ne() {
728
+ return G(be, K);
729
+ }
730
+ function Ue() {
731
+ return K;
732
+ }
733
+ function Me(e, r) {
734
+ return ke(be, e, r);
735
+ }
736
+ function $e(e) {
737
+ switch (e) {
738
+ case 0:
739
+ case 9:
740
+ case 10:
741
+ case 13:
742
+ case 32:
743
+ return 5;
744
+ case 33:
745
+ case 43:
746
+ case 44:
747
+ case 47:
748
+ case 62:
749
+ case 64:
750
+ case 126:
751
+ case 59:
752
+ case 123:
753
+ case 125:
754
+ return 4;
755
+ case 58:
756
+ return 3;
757
+ case 34:
758
+ case 39:
759
+ case 40:
760
+ case 91:
761
+ return 2;
762
+ case 41:
763
+ case 93:
764
+ return 1;
765
+ }
766
+ return 0;
767
+ }
768
+ function ft(e) {
769
+ return He = ye = 1, ct = re(be = e), K = 0, [];
770
+ }
771
+ function ut(e) {
772
+ return be = "", e;
773
+ }
774
+ function Ge(e) {
775
+ return st(Me(K - 1, dr(e === 91 ? e + 2 : e === 40 ? e + 1 : e)));
776
+ }
777
+ function on(e) {
778
+ for (; (V = ne()) && V < 33; )
779
+ H();
780
+ return $e(e) > 2 || $e(V) > 3 ? "" : " ";
781
+ }
782
+ function sn(e, r) {
783
+ for (; --r && H() && !(V < 48 || V > 102 || V > 57 && V < 65 || V > 70 && V < 97); )
784
+ ;
785
+ return Me(e, Ue() + (r < 6 && ne() == 32 && H() == 32));
786
+ }
787
+ function dr(e) {
788
+ for (; H(); )
789
+ switch (V) {
790
+ case e:
791
+ return K;
792
+ case 34:
793
+ case 39:
794
+ e !== 34 && e !== 39 && dr(V);
795
+ break;
796
+ case 40:
797
+ e === 41 && dr(e);
798
+ break;
799
+ case 92:
800
+ H();
801
+ break;
802
+ }
803
+ return K;
804
+ }
805
+ function cn(e, r) {
806
+ for (; H() && e + V !== 57; )
807
+ if (e + V === 84 && ne() === 47)
808
+ break;
809
+ return "/*" + Me(r, K - 1) + "*" + Ke(e === 47 ? e : H());
810
+ }
811
+ function fn(e) {
812
+ for (; !$e(ne()); )
813
+ H();
814
+ return Me(e, K);
815
+ }
816
+ function un(e) {
817
+ return ut(qe("", null, null, null, [""], e = ft(e), 0, [0], e));
818
+ }
819
+ function qe(e, r, n, a, o, i, s, c, d) {
820
+ for (var p = 0, u = 0, y = s, x = 0, R = 0, E = 0, C = 1, j = 1, w = 1, S = 0, k = "", L = o, l = i, m = a, v = k; j; )
821
+ switch (E = S, S = H()) {
822
+ case 40:
823
+ if (E != 108 && G(v, y - 1) == 58) {
824
+ lr(v += A(Ge(S), "&", "&\f"), "&\f") != -1 && (w = -1);
825
+ break;
826
+ }
827
+ case 34:
828
+ case 39:
829
+ case 91:
830
+ v += Ge(S);
831
+ break;
832
+ case 9:
833
+ case 10:
834
+ case 13:
835
+ case 32:
836
+ v += on(E);
837
+ break;
838
+ case 92:
839
+ v += sn(Ue() - 1, 7);
840
+ continue;
841
+ case 47:
842
+ switch (ne()) {
843
+ case 42:
844
+ case 47:
845
+ We(ln(cn(H(), Ue()), r, n), d);
846
+ break;
847
+ default:
848
+ v += "/";
849
+ }
850
+ break;
851
+ case 123 * C:
852
+ c[p++] = re(v) * w;
853
+ case 125 * C:
854
+ case 59:
855
+ case 0:
856
+ switch (S) {
857
+ case 0:
858
+ case 125:
859
+ j = 0;
860
+ case 59 + u:
861
+ w == -1 && (v = A(v, /\f/g, "")), R > 0 && re(v) - y && We(R > 32 ? Gr(v + ";", a, n, y - 1) : Gr(A(v, " ", "") + ";", a, n, y - 2), d);
862
+ break;
863
+ case 59:
864
+ v += ";";
865
+ default:
866
+ if (We(m = Ur(v, r, n, p, u, o, c, k, L = [], l = [], y), i), S === 123)
867
+ if (u === 0)
868
+ qe(v, r, m, m, L, i, y, c, l);
869
+ else
870
+ switch (x === 99 && G(v, 3) === 110 ? 100 : x) {
871
+ case 100:
872
+ case 108:
873
+ case 109:
874
+ case 115:
875
+ qe(e, m, m, a && We(Ur(e, m, m, 0, 0, o, c, k, o, L = [], y), l), o, l, y, c, a ? L : l);
876
+ break;
877
+ default:
878
+ qe(v, m, m, m, [""], l, 0, c, l);
879
+ }
880
+ }
881
+ p = u = R = 0, C = w = 1, k = v = "", y = s;
882
+ break;
883
+ case 58:
884
+ y = 1 + re(v), R = E;
885
+ default:
886
+ if (C < 1) {
887
+ if (S == 123)
888
+ --C;
889
+ else if (S == 125 && C++ == 0 && an() == 125)
890
+ continue;
891
+ }
892
+ switch (v += Ke(S), S * C) {
893
+ case 38:
894
+ w = u > 0 ? 1 : (v += "\f", -1);
895
+ break;
896
+ case 44:
897
+ c[p++] = (re(v) - 1) * w, w = 1;
898
+ break;
899
+ case 64:
900
+ ne() === 45 && (v += Ge(H())), x = ne(), u = y = re(k = v += fn(Ue())), S++;
901
+ break;
902
+ case 45:
903
+ E === 45 && re(v) == 2 && (C = 0);
904
+ }
905
+ }
906
+ return i;
907
+ }
908
+ function Ur(e, r, n, a, o, i, s, c, d, p, u) {
909
+ for (var y = o - 1, x = o === 0 ? i : [""], R = yr(x), E = 0, C = 0, j = 0; E < a; ++E)
910
+ for (var w = 0, S = ke(e, y + 1, y = Zt(C = s[E])), k = e; w < R; ++w)
911
+ (k = st(C > 0 ? x[w] + " " + S : A(S, /&\f/g, x[w]))) && (d[j++] = k);
912
+ return Xe(e, r, n, o === 0 ? mr : c, d, p, u);
913
+ }
914
+ function ln(e, r, n) {
915
+ return Xe(e, r, n, ot, Ke(nn()), ke(e, 2, -2), 0);
916
+ }
917
+ function Gr(e, r, n, a) {
918
+ return Xe(e, r, n, gr, ke(e, 0, a), ke(e, a + 1, -1), a);
919
+ }
920
+ function ge(e, r) {
921
+ for (var n = "", a = yr(e), o = 0; o < a; o++)
922
+ n += r(e[o], o, e, r) || "";
923
+ return n;
924
+ }
925
+ function dn(e, r, n, a) {
926
+ switch (e.type) {
927
+ case Xt:
928
+ if (e.children.length) break;
929
+ case Ht:
930
+ case gr:
931
+ return e.return = e.return || e.value;
932
+ case ot:
933
+ return "";
934
+ case it:
935
+ return e.return = e.value + "{" + ge(e.children, a) + "}";
936
+ case mr:
937
+ e.value = e.props.join(",");
938
+ }
939
+ return re(n = ge(e.children, a)) ? e.return = e.value + "{" + n + "}" : "";
940
+ }
941
+ function hn(e) {
942
+ var r = yr(e);
943
+ return function(n, a, o, i) {
944
+ for (var s = "", c = 0; c < r; c++)
945
+ s += e[c](n, a, o, i) || "";
946
+ return s;
947
+ };
948
+ }
949
+ function pn(e) {
950
+ return function(r) {
951
+ r.root || (r = r.return) && e(r);
952
+ };
953
+ }
954
+ function vn(e) {
955
+ var r = /* @__PURE__ */ Object.create(null);
956
+ return function(n) {
957
+ return r[n] === void 0 && (r[n] = e(n)), r[n];
958
+ };
959
+ }
960
+ var mn = function(r, n, a) {
961
+ for (var o = 0, i = 0; o = i, i = ne(), o === 38 && i === 12 && (n[a] = 1), !$e(i); )
962
+ H();
963
+ return Me(r, K);
964
+ }, gn = function(r, n) {
965
+ var a = -1, o = 44;
966
+ do
967
+ switch ($e(o)) {
968
+ case 0:
969
+ o === 38 && ne() === 12 && (n[a] = 1), r[a] += mn(K - 1, n, a);
970
+ break;
971
+ case 2:
972
+ r[a] += Ge(o);
973
+ break;
974
+ case 4:
975
+ if (o === 44) {
976
+ r[++a] = ne() === 58 ? "&\f" : "", n[a] = r[a].length;
977
+ break;
978
+ }
979
+ default:
980
+ r[a] += Ke(o);
981
+ }
982
+ while (o = H());
983
+ return r;
984
+ }, yn = function(r, n) {
985
+ return ut(gn(ft(r), n));
986
+ }, qr = /* @__PURE__ */ new WeakMap(), bn = function(r) {
987
+ if (!(r.type !== "rule" || !r.parent || // positive .length indicates that this rule contains pseudo
988
+ // negative .length indicates that this rule has been already prefixed
989
+ r.length < 1)) {
990
+ for (var n = r.value, a = r.parent, o = r.column === a.column && r.line === a.line; a.type !== "rule"; )
991
+ if (a = a.parent, !a) return;
992
+ if (!(r.props.length === 1 && n.charCodeAt(0) !== 58 && !qr.get(a)) && !o) {
993
+ qr.set(r, !0);
994
+ for (var i = [], s = yn(n, i), c = a.props, d = 0, p = 0; d < s.length; d++)
995
+ for (var u = 0; u < c.length; u++, p++)
996
+ r.props[p] = i[d] ? s[d].replace(/&\f/g, c[u]) : c[u] + " " + s[d];
997
+ }
998
+ }
999
+ }, En = function(r) {
1000
+ if (r.type === "decl") {
1001
+ var n = r.value;
1002
+ // charcode for l
1003
+ n.charCodeAt(0) === 108 && // charcode for b
1004
+ n.charCodeAt(2) === 98 && (r.return = "", r.value = "");
1005
+ }
1006
+ };
1007
+ function lt(e, r) {
1008
+ switch (en(e, r)) {
1009
+ case 5103:
1010
+ return $ + "print-" + e + e;
1011
+ case 5737:
1012
+ case 4201:
1013
+ case 3177:
1014
+ case 3433:
1015
+ case 1641:
1016
+ case 4457:
1017
+ case 2921:
1018
+ case 5572:
1019
+ case 6356:
1020
+ case 5844:
1021
+ case 3191:
1022
+ case 6645:
1023
+ case 3005:
1024
+ case 6391:
1025
+ case 5879:
1026
+ case 5623:
1027
+ case 6135:
1028
+ case 4599:
1029
+ case 4855:
1030
+ case 4215:
1031
+ case 6389:
1032
+ case 5109:
1033
+ case 5365:
1034
+ case 5621:
1035
+ case 3829:
1036
+ return $ + e + e;
1037
+ case 5349:
1038
+ case 4246:
1039
+ case 4810:
1040
+ case 6968:
1041
+ case 2756:
1042
+ return $ + e + Je + e + q + e + e;
1043
+ case 6828:
1044
+ case 4268:
1045
+ return $ + e + q + e + e;
1046
+ case 6165:
1047
+ return $ + e + q + "flex-" + e + e;
1048
+ case 5187:
1049
+ return $ + e + A(e, /(\w+).+(:[^]+)/, $ + "box-$1$2" + q + "flex-$1$2") + e;
1050
+ case 5443:
1051
+ return $ + e + q + "flex-item-" + A(e, /flex-|-self/, "") + e;
1052
+ case 4675:
1053
+ return $ + e + q + "flex-line-pack" + A(e, /align-content|flex-|-self/, "") + e;
1054
+ case 5548:
1055
+ return $ + e + q + A(e, "shrink", "negative") + e;
1056
+ case 5292:
1057
+ return $ + e + q + A(e, "basis", "preferred-size") + e;
1058
+ case 6060:
1059
+ return $ + "box-" + A(e, "-grow", "") + $ + e + q + A(e, "grow", "positive") + e;
1060
+ case 4554:
1061
+ return $ + A(e, /([^-])(transform)/g, "$1" + $ + "$2") + e;
1062
+ case 6187:
1063
+ return A(A(A(e, /(zoom-|grab)/, $ + "$1"), /(image-set)/, $ + "$1"), e, "") + e;
1064
+ case 5495:
1065
+ case 3959:
1066
+ return A(e, /(image-set\([^]*)/, $ + "$1$`$1");
1067
+ case 4968:
1068
+ return A(A(e, /(.+:)(flex-)?(.*)/, $ + "box-pack:$3" + q + "flex-pack:$3"), /s.+-b[^;]+/, "justify") + $ + e + e;
1069
+ case 4095:
1070
+ case 3583:
1071
+ case 4068:
1072
+ case 2532:
1073
+ return A(e, /(.+)-inline(.+)/, $ + "$1$2") + e;
1074
+ case 8116:
1075
+ case 7059:
1076
+ case 5753:
1077
+ case 5535:
1078
+ case 5445:
1079
+ case 5701:
1080
+ case 4933:
1081
+ case 4677:
1082
+ case 5533:
1083
+ case 5789:
1084
+ case 5021:
1085
+ case 4765:
1086
+ if (re(e) - 1 - r > 6) switch (G(e, r + 1)) {
1087
+ case 109:
1088
+ if (G(e, r + 4) !== 45) break;
1089
+ case 102:
1090
+ return A(e, /(.+:)(.+)-([^]+)/, "$1" + $ + "$2-$3$1" + Je + (G(e, r + 3) == 108 ? "$3" : "$2-$3")) + e;
1091
+ case 115:
1092
+ return ~lr(e, "stretch") ? lt(A(e, "stretch", "fill-available"), r) + e : e;
1093
+ }
1094
+ break;
1095
+ case 4949:
1096
+ if (G(e, r + 1) !== 115) break;
1097
+ case 6444:
1098
+ switch (G(e, re(e) - 3 - (~lr(e, "!important") && 10))) {
1099
+ case 107:
1100
+ return A(e, ":", ":" + $) + e;
1101
+ case 101:
1102
+ return A(e, /(.+:)([^;!]+)(;|!.+)?/, "$1" + $ + (G(e, 14) === 45 ? "inline-" : "") + "box$3$1" + $ + "$2$3$1" + q + "$2box$3") + e;
1103
+ }
1104
+ break;
1105
+ case 5936:
1106
+ switch (G(e, r + 11)) {
1107
+ case 114:
1108
+ return $ + e + q + A(e, /[svh]\w+-[tblr]{2}/, "tb") + e;
1109
+ case 108:
1110
+ return $ + e + q + A(e, /[svh]\w+-[tblr]{2}/, "tb-rl") + e;
1111
+ case 45:
1112
+ return $ + e + q + A(e, /[svh]\w+-[tblr]{2}/, "lr") + e;
1113
+ }
1114
+ return $ + e + q + e + e;
1115
+ }
1116
+ return e;
1117
+ }
1118
+ var Sn = function(r, n, a, o) {
1119
+ if (r.length > -1 && !r.return) switch (r.type) {
1120
+ case gr:
1121
+ r.return = lt(r.value, r.length);
1122
+ break;
1123
+ case it:
1124
+ return ge([Pe(r, {
1125
+ value: A(r.value, "@", "@" + $)
1126
+ })], o);
1127
+ case mr:
1128
+ if (r.length) return tn(r.props, function(i) {
1129
+ switch (rn(i, /(::plac\w+|:read-\w+)/)) {
1130
+ case ":read-only":
1131
+ case ":read-write":
1132
+ return ge([Pe(r, {
1133
+ props: [A(i, /:(read-\w+)/, ":" + Je + "$1")]
1134
+ })], o);
1135
+ case "::placeholder":
1136
+ return ge([Pe(r, {
1137
+ props: [A(i, /:(plac\w+)/, ":" + $ + "input-$1")]
1138
+ }), Pe(r, {
1139
+ props: [A(i, /:(plac\w+)/, ":" + Je + "$1")]
1140
+ }), Pe(r, {
1141
+ props: [A(i, /:(plac\w+)/, q + "input-$1")]
1142
+ })], o);
1143
+ }
1144
+ return "";
1145
+ });
1146
+ }
1147
+ }, Rn = [Sn], Cn = function(r) {
1148
+ var n = r.key;
1149
+ if (n === "css") {
1150
+ var a = document.querySelectorAll("style[data-emotion]:not([data-s])");
1151
+ Array.prototype.forEach.call(a, function(C) {
1152
+ var j = C.getAttribute("data-emotion");
1153
+ j.indexOf(" ") !== -1 && (document.head.appendChild(C), C.setAttribute("data-s", ""));
1154
+ });
1155
+ }
1156
+ var o = r.stylisPlugins || Rn, i = {}, s, c = [];
1157
+ s = r.container || document.head, Array.prototype.forEach.call(
1158
+ // this means we will ignore elements which don't have a space in them which
1159
+ // means that the style elements we're looking at are only Emotion 11 server-rendered style elements
1160
+ document.querySelectorAll('style[data-emotion^="' + n + ' "]'),
1161
+ function(C) {
1162
+ for (var j = C.getAttribute("data-emotion").split(" "), w = 1; w < j.length; w++)
1163
+ i[j[w]] = !0;
1164
+ c.push(C);
1165
+ }
1166
+ );
1167
+ var d, p = [bn, En];
1168
+ {
1169
+ var u, y = [dn, pn(function(C) {
1170
+ u.insert(C);
1171
+ })], x = hn(p.concat(o, y)), R = function(j) {
1172
+ return ge(un(j), x);
1173
+ };
1174
+ d = function(j, w, S, k) {
1175
+ u = S, R(j ? j + "{" + w.styles + "}" : w.styles), k && (E.inserted[w.name] = !0);
1176
+ };
1177
+ }
1178
+ var E = {
1179
+ key: n,
1180
+ sheet: new Kt({
1181
+ key: n,
1182
+ container: s,
1183
+ nonce: r.nonce,
1184
+ speedy: r.speedy,
1185
+ prepend: r.prepend,
1186
+ insertionPoint: r.insertionPoint
1187
+ }),
1188
+ nonce: r.nonce,
1189
+ inserted: i,
1190
+ registered: {},
1191
+ insert: d
1192
+ };
1193
+ return E.sheet.hydrate(c), E;
1194
+ }, hr = { exports: {} }, I = {};
1195
+ /** @license React v16.13.1
1196
+ * react-is.production.min.js
1197
+ *
1198
+ * Copyright (c) Facebook, Inc. and its affiliates.
1199
+ *
1200
+ * This source code is licensed under the MIT license found in the
1201
+ * LICENSE file in the root directory of this source tree.
1202
+ */
1203
+ var Br;
1204
+ function _n() {
1205
+ if (Br) return I;
1206
+ Br = 1;
1207
+ var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, x = e ? Symbol.for("react.suspense_list") : 60120, R = e ? Symbol.for("react.memo") : 60115, E = e ? Symbol.for("react.lazy") : 60116, C = e ? Symbol.for("react.block") : 60121, j = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1208
+ function k(l) {
1209
+ if (typeof l == "object" && l !== null) {
1210
+ var m = l.$$typeof;
1211
+ switch (m) {
1212
+ case r:
1213
+ switch (l = l.type, l) {
1214
+ case d:
1215
+ case p:
1216
+ case a:
1217
+ case i:
1218
+ case o:
1219
+ case y:
1220
+ return l;
1221
+ default:
1222
+ switch (l = l && l.$$typeof, l) {
1223
+ case c:
1224
+ case u:
1225
+ case E:
1226
+ case R:
1227
+ case s:
1228
+ return l;
1229
+ default:
1230
+ return m;
1231
+ }
1232
+ }
1233
+ case n:
1234
+ return m;
1235
+ }
1236
+ }
1237
+ }
1238
+ function L(l) {
1239
+ return k(l) === p;
1240
+ }
1241
+ return I.AsyncMode = d, I.ConcurrentMode = p, I.ContextConsumer = c, I.ContextProvider = s, I.Element = r, I.ForwardRef = u, I.Fragment = a, I.Lazy = E, I.Memo = R, I.Portal = n, I.Profiler = i, I.StrictMode = o, I.Suspense = y, I.isAsyncMode = function(l) {
1242
+ return L(l) || k(l) === d;
1243
+ }, I.isConcurrentMode = L, I.isContextConsumer = function(l) {
1244
+ return k(l) === c;
1245
+ }, I.isContextProvider = function(l) {
1246
+ return k(l) === s;
1247
+ }, I.isElement = function(l) {
1248
+ return typeof l == "object" && l !== null && l.$$typeof === r;
1249
+ }, I.isForwardRef = function(l) {
1250
+ return k(l) === u;
1251
+ }, I.isFragment = function(l) {
1252
+ return k(l) === a;
1253
+ }, I.isLazy = function(l) {
1254
+ return k(l) === E;
1255
+ }, I.isMemo = function(l) {
1256
+ return k(l) === R;
1257
+ }, I.isPortal = function(l) {
1258
+ return k(l) === n;
1259
+ }, I.isProfiler = function(l) {
1260
+ return k(l) === i;
1261
+ }, I.isStrictMode = function(l) {
1262
+ return k(l) === o;
1263
+ }, I.isSuspense = function(l) {
1264
+ return k(l) === y;
1265
+ }, I.isValidElementType = function(l) {
1266
+ return typeof l == "string" || typeof l == "function" || l === a || l === p || l === i || l === o || l === y || l === x || typeof l == "object" && l !== null && (l.$$typeof === E || l.$$typeof === R || l.$$typeof === s || l.$$typeof === c || l.$$typeof === u || l.$$typeof === j || l.$$typeof === w || l.$$typeof === S || l.$$typeof === C);
1267
+ }, I.typeOf = k, I;
1268
+ }
1269
+ var F = {};
1270
+ /** @license React v16.13.1
1271
+ * react-is.development.js
1272
+ *
1273
+ * Copyright (c) Facebook, Inc. and its affiliates.
1274
+ *
1275
+ * This source code is licensed under the MIT license found in the
1276
+ * LICENSE file in the root directory of this source tree.
1277
+ */
1278
+ var Jr;
1279
+ function xn() {
1280
+ return Jr || (Jr = 1, process.env.NODE_ENV !== "production" && function() {
1281
+ var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, n = e ? Symbol.for("react.portal") : 60106, a = e ? Symbol.for("react.fragment") : 60107, o = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, s = e ? Symbol.for("react.provider") : 60109, c = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, p = e ? Symbol.for("react.concurrent_mode") : 60111, u = e ? Symbol.for("react.forward_ref") : 60112, y = e ? Symbol.for("react.suspense") : 60113, x = e ? Symbol.for("react.suspense_list") : 60120, R = e ? Symbol.for("react.memo") : 60115, E = e ? Symbol.for("react.lazy") : 60116, C = e ? Symbol.for("react.block") : 60121, j = e ? Symbol.for("react.fundamental") : 60117, w = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
1282
+ function k(g) {
1283
+ return typeof g == "string" || typeof g == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
1284
+ g === a || g === p || g === i || g === o || g === y || g === x || typeof g == "object" && g !== null && (g.$$typeof === E || g.$$typeof === R || g.$$typeof === s || g.$$typeof === c || g.$$typeof === u || g.$$typeof === j || g.$$typeof === w || g.$$typeof === S || g.$$typeof === C);
1285
+ }
1286
+ function L(g) {
1287
+ if (typeof g == "object" && g !== null) {
1288
+ var xe = g.$$typeof;
1289
+ switch (xe) {
1290
+ case r:
1291
+ var he = g.type;
1292
+ switch (he) {
1293
+ case d:
1294
+ case p:
1295
+ case a:
1296
+ case i:
1297
+ case o:
1298
+ case y:
1299
+ return he;
1300
+ default:
1301
+ var ce = he && he.$$typeof;
1302
+ switch (ce) {
1303
+ case c:
1304
+ case u:
1305
+ case E:
1306
+ case R:
1307
+ case s:
1308
+ return ce;
1309
+ default:
1310
+ return xe;
1311
+ }
1312
+ }
1313
+ case n:
1314
+ return xe;
1315
+ }
1316
+ }
1317
+ }
1318
+ var l = d, m = p, v = c, P = s, O = r, D = u, U = a, X = E, B = R, ae = n, se = i, Ie = o, Fe = y, Ee = !1;
1319
+ function Ne(g) {
1320
+ return Ee || (Ee = !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.")), Se(g) || L(g) === d;
1321
+ }
1322
+ function Se(g) {
1323
+ return L(g) === p;
1324
+ }
1325
+ function je(g) {
1326
+ return L(g) === c;
1327
+ }
1328
+ function Le(g) {
1329
+ return L(g) === s;
1330
+ }
1331
+ function De(g) {
1332
+ return typeof g == "object" && g !== null && g.$$typeof === r;
1333
+ }
1334
+ function Qe(g) {
1335
+ return L(g) === u;
1336
+ }
1337
+ function er(g) {
1338
+ return L(g) === a;
1339
+ }
1340
+ function Re(g) {
1341
+ return L(g) === E;
1342
+ }
1343
+ function Ce(g) {
1344
+ return L(g) === R;
1345
+ }
1346
+ function le(g) {
1347
+ return L(g) === n;
1348
+ }
1349
+ function _e(g) {
1350
+ return L(g) === i;
1351
+ }
1352
+ function de(g) {
1353
+ return L(g) === o;
1354
+ }
1355
+ function rr(g) {
1356
+ return L(g) === y;
1357
+ }
1358
+ F.AsyncMode = l, F.ConcurrentMode = m, F.ContextConsumer = v, F.ContextProvider = P, F.Element = O, F.ForwardRef = D, F.Fragment = U, F.Lazy = X, F.Memo = B, F.Portal = ae, F.Profiler = se, F.StrictMode = Ie, F.Suspense = Fe, F.isAsyncMode = Ne, F.isConcurrentMode = Se, F.isContextConsumer = je, F.isContextProvider = Le, F.isElement = De, F.isForwardRef = Qe, F.isFragment = er, F.isLazy = Re, F.isMemo = Ce, F.isPortal = le, F.isProfiler = _e, F.isStrictMode = de, F.isSuspense = rr, F.isValidElementType = k, F.typeOf = L;
1359
+ }()), F;
1360
+ }
1361
+ process.env.NODE_ENV === "production" ? hr.exports = _n() : hr.exports = xn();
1362
+ var wn = hr.exports, dt = wn, Tn = {
1363
+ $$typeof: !0,
1364
+ render: !0,
1365
+ defaultProps: !0,
1366
+ displayName: !0,
1367
+ propTypes: !0
1368
+ }, On = {
1369
+ $$typeof: !0,
1370
+ compare: !0,
1371
+ defaultProps: !0,
1372
+ displayName: !0,
1373
+ propTypes: !0,
1374
+ type: !0
1375
+ }, ht = {};
1376
+ ht[dt.ForwardRef] = Tn;
1377
+ ht[dt.Memo] = On;
1378
+ var Pn = !0;
1379
+ function kn(e, r, n) {
1380
+ var a = "";
1381
+ return n.split(" ").forEach(function(o) {
1382
+ e[o] !== void 0 ? r.push(e[o] + ";") : o && (a += o + " ");
1383
+ }), a;
1384
+ }
1385
+ var pt = function(r, n, a) {
1386
+ var o = r.key + "-" + n.name;
1387
+ // we only need to add the styles to the registered cache if the
1388
+ // class name could be used further down
1389
+ // the tree but if it's a string tag, we know it won't
1390
+ // so we don't have to add it to registered cache.
1391
+ // this improves memory usage since we can avoid storing the whole style string
1392
+ (a === !1 || // we need to always store it if we're in compat mode and
1393
+ // in node since emotion-server relies on whether a style is in
1394
+ // the registered cache to know whether a style is global or not
1395
+ // also, note that this check will be dead code eliminated in the browser
1396
+ Pn === !1) && r.registered[o] === void 0 && (r.registered[o] = n.styles);
1397
+ }, $n = function(r, n, a) {
1398
+ pt(r, n, a);
1399
+ var o = r.key + "-" + n.name;
1400
+ if (r.inserted[n.name] === void 0) {
1401
+ var i = n;
1402
+ do
1403
+ r.insert(n === i ? "." + o : "", i, r.sheet, !0), i = i.next;
1404
+ while (i !== void 0);
1405
+ }
1406
+ };
1407
+ function An(e) {
1408
+ for (var r = 0, n, a = 0, o = e.length; o >= 4; ++a, o -= 4)
1409
+ n = e.charCodeAt(a) & 255 | (e.charCodeAt(++a) & 255) << 8 | (e.charCodeAt(++a) & 255) << 16 | (e.charCodeAt(++a) & 255) << 24, n = /* Math.imul(k, m): */
1410
+ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16), n ^= /* k >>> r: */
1411
+ n >>> 24, r = /* Math.imul(k, m): */
1412
+ (n & 65535) * 1540483477 + ((n >>> 16) * 59797 << 16) ^ /* Math.imul(h, m): */
1413
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
1414
+ switch (o) {
1415
+ case 3:
1416
+ r ^= (e.charCodeAt(a + 2) & 255) << 16;
1417
+ case 2:
1418
+ r ^= (e.charCodeAt(a + 1) & 255) << 8;
1419
+ case 1:
1420
+ r ^= e.charCodeAt(a) & 255, r = /* Math.imul(h, m): */
1421
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16);
1422
+ }
1423
+ return r ^= r >>> 13, r = /* Math.imul(h, m): */
1424
+ (r & 65535) * 1540483477 + ((r >>> 16) * 59797 << 16), ((r ^ r >>> 15) >>> 0).toString(36);
1425
+ }
1426
+ var Mn = {
1427
+ animationIterationCount: 1,
1428
+ aspectRatio: 1,
1429
+ borderImageOutset: 1,
1430
+ borderImageSlice: 1,
1431
+ borderImageWidth: 1,
1432
+ boxFlex: 1,
1433
+ boxFlexGroup: 1,
1434
+ boxOrdinalGroup: 1,
1435
+ columnCount: 1,
1436
+ columns: 1,
1437
+ flex: 1,
1438
+ flexGrow: 1,
1439
+ flexPositive: 1,
1440
+ flexShrink: 1,
1441
+ flexNegative: 1,
1442
+ flexOrder: 1,
1443
+ gridRow: 1,
1444
+ gridRowEnd: 1,
1445
+ gridRowSpan: 1,
1446
+ gridRowStart: 1,
1447
+ gridColumn: 1,
1448
+ gridColumnEnd: 1,
1449
+ gridColumnSpan: 1,
1450
+ gridColumnStart: 1,
1451
+ msGridRow: 1,
1452
+ msGridRowSpan: 1,
1453
+ msGridColumn: 1,
1454
+ msGridColumnSpan: 1,
1455
+ fontWeight: 1,
1456
+ lineHeight: 1,
1457
+ opacity: 1,
1458
+ order: 1,
1459
+ orphans: 1,
1460
+ scale: 1,
1461
+ tabSize: 1,
1462
+ widows: 1,
1463
+ zIndex: 1,
1464
+ zoom: 1,
1465
+ WebkitLineClamp: 1,
1466
+ // SVG-related properties
1467
+ fillOpacity: 1,
1468
+ floodOpacity: 1,
1469
+ stopOpacity: 1,
1470
+ strokeDasharray: 1,
1471
+ strokeDashoffset: 1,
1472
+ strokeMiterlimit: 1,
1473
+ strokeOpacity: 1,
1474
+ strokeWidth: 1
1475
+ }, In = /[A-Z]|^ms/g, Fn = /_EMO_([^_]+?)_([^]*?)_EMO_/g, vt = function(r) {
1476
+ return r.charCodeAt(1) === 45;
1477
+ }, zr = function(r) {
1478
+ return r != null && typeof r != "boolean";
1479
+ }, sr = /* @__PURE__ */ vn(function(e) {
1480
+ return vt(e) ? e : e.replace(In, "-$&").toLowerCase();
1481
+ }), Kr = function(r, n) {
1482
+ switch (r) {
1483
+ case "animation":
1484
+ case "animationName":
1485
+ if (typeof n == "string")
1486
+ return n.replace(Fn, function(a, o, i) {
1487
+ return te = {
1488
+ name: o,
1489
+ styles: i,
1490
+ next: te
1491
+ }, o;
1492
+ });
1493
+ }
1494
+ return Mn[r] !== 1 && !vt(r) && typeof n == "number" && n !== 0 ? n + "px" : n;
1495
+ };
1496
+ function Ae(e, r, n) {
1497
+ if (n == null)
1498
+ return "";
1499
+ var a = n;
1500
+ if (a.__emotion_styles !== void 0)
1501
+ return a;
1502
+ switch (typeof n) {
1503
+ case "boolean":
1504
+ return "";
1505
+ case "object": {
1506
+ var o = n;
1507
+ if (o.anim === 1)
1508
+ return te = {
1509
+ name: o.name,
1510
+ styles: o.styles,
1511
+ next: te
1512
+ }, o.name;
1513
+ var i = n;
1514
+ if (i.styles !== void 0) {
1515
+ var s = i.next;
1516
+ if (s !== void 0)
1517
+ for (; s !== void 0; )
1518
+ te = {
1519
+ name: s.name,
1520
+ styles: s.styles,
1521
+ next: te
1522
+ }, s = s.next;
1523
+ var c = i.styles + ";";
1524
+ return c;
1525
+ }
1526
+ return Nn(e, r, n);
1527
+ }
1528
+ case "function": {
1529
+ if (e !== void 0) {
1530
+ var d = te, p = n(e);
1531
+ return te = d, Ae(e, r, p);
1532
+ }
1533
+ break;
1534
+ }
1535
+ }
1536
+ var u = n;
1537
+ return u;
1538
+ }
1539
+ function Nn(e, r, n) {
1540
+ var a = "";
1541
+ if (Array.isArray(n))
1542
+ for (var o = 0; o < n.length; o++)
1543
+ a += Ae(e, r, n[o]) + ";";
1544
+ else
1545
+ for (var i in n) {
1546
+ var s = n[i];
1547
+ if (typeof s != "object") {
1548
+ var c = s;
1549
+ zr(c) && (a += sr(i) + ":" + Kr(i, c) + ";");
1550
+ } else if (Array.isArray(s) && typeof s[0] == "string" && r == null)
1551
+ for (var d = 0; d < s.length; d++)
1552
+ zr(s[d]) && (a += sr(i) + ":" + Kr(i, s[d]) + ";");
1553
+ else {
1554
+ var p = Ae(e, r, s);
1555
+ switch (i) {
1556
+ case "animation":
1557
+ case "animationName": {
1558
+ a += sr(i) + ":" + p + ";";
1559
+ break;
1560
+ }
1561
+ default:
1562
+ a += i + "{" + p + "}";
1563
+ }
1564
+ }
1565
+ }
1566
+ return a;
1567
+ }
1568
+ var Hr = /label:\s*([^\s;{]+)\s*(;|$)/g, te;
1569
+ function jn(e, r, n) {
1570
+ if (e.length === 1 && typeof e[0] == "object" && e[0] !== null && e[0].styles !== void 0)
1571
+ return e[0];
1572
+ var a = !0, o = "";
1573
+ te = void 0;
1574
+ var i = e[0];
1575
+ if (i == null || i.raw === void 0)
1576
+ a = !1, o += Ae(n, r, i);
1577
+ else {
1578
+ var s = i;
1579
+ o += s[0];
1580
+ }
1581
+ for (var c = 1; c < e.length; c++)
1582
+ if (o += Ae(n, r, e[c]), a) {
1583
+ var d = i;
1584
+ o += d[c];
1585
+ }
1586
+ Hr.lastIndex = 0;
1587
+ for (var p = "", u; (u = Hr.exec(o)) !== null; )
1588
+ p += "-" + u[1];
1589
+ var y = An(o) + p;
1590
+ return {
1591
+ name: y,
1592
+ styles: o,
1593
+ next: te
1594
+ };
1595
+ }
1596
+ var Ln = function(r) {
1597
+ return r();
1598
+ }, Dn = oe.useInsertionEffect ? oe.useInsertionEffect : !1, Yn = Dn || Ln, mt = /* @__PURE__ */ oe.createContext(
1599
+ // we're doing this to avoid preconstruct's dead code elimination in this one case
1600
+ // because this module is primarily intended for the browser and node
1601
+ // but it's also required in react native and similar environments sometimes
1602
+ // and we could have a special build just for that
1603
+ // but this is much easier and the native packages
1604
+ // might use a different theme context in the future anyway
1605
+ typeof HTMLElement < "u" ? /* @__PURE__ */ Cn({
1606
+ key: "css"
1607
+ }) : null
1608
+ );
1609
+ mt.Provider;
1610
+ var Wn = function(r) {
1611
+ return /* @__PURE__ */ Yt(function(n, a) {
1612
+ var o = Wt(mt);
1613
+ return r(n, o, a);
1614
+ });
1615
+ }, Vn = /* @__PURE__ */ oe.createContext({}), br = {}.hasOwnProperty, pr = "__EMOTION_TYPE_PLEASE_DO_NOT_USE__", Un = function(r, n) {
1616
+ var a = {};
1617
+ for (var o in n)
1618
+ br.call(n, o) && (a[o] = n[o]);
1619
+ return a[pr] = r, a;
1620
+ }, Gn = function(r) {
1621
+ var n = r.cache, a = r.serialized, o = r.isStringTag;
1622
+ return pt(n, a, o), Yn(function() {
1623
+ return $n(n, a, o);
1624
+ }), null;
1625
+ }, qn = /* @__PURE__ */ Wn(function(e, r, n) {
1626
+ var a = e.css;
1627
+ typeof a == "string" && r.registered[a] !== void 0 && (a = r.registered[a]);
1628
+ var o = e[pr], i = [a], s = "";
1629
+ typeof e.className == "string" ? s = kn(r.registered, i, e.className) : e.className != null && (s = e.className + " ");
1630
+ var c = jn(i, void 0, oe.useContext(Vn));
1631
+ s += r.key + "-" + c.name;
1632
+ var d = {};
1633
+ for (var p in e)
1634
+ br.call(e, p) && p !== "css" && p !== pr && (d[p] = e[p]);
1635
+ return d.className = s, n && (d.ref = n), /* @__PURE__ */ oe.createElement(oe.Fragment, null, /* @__PURE__ */ oe.createElement(Gn, {
1636
+ cache: r,
1637
+ serialized: c,
1638
+ isStringTag: typeof o == "string"
1639
+ }), /* @__PURE__ */ oe.createElement(o, d));
1640
+ }), Bn = qn, Ze = function(r, n, a) {
1641
+ return br.call(n, "css") ? Vr.jsx(Bn, Un(r, n), a) : Vr.jsx(r, n, a);
1642
+ };
1643
+ function Jn(e) {
1644
+ switch (e.toLowerCase()) {
1645
+ case "sql":
1646
+ return rt();
1647
+ case "json":
1648
+ return tt();
1649
+ default:
1650
+ return [];
1651
+ }
1652
+ }
1653
+ function zn(e) {
1654
+ return ["sql", "json"].includes(e.toLowerCase());
1655
+ }
1656
+ function Kn(e = {}) {
1657
+ return Vt(e);
1658
+ }
1659
+ function da(e) {
1660
+ return [nt(), at(e)];
1661
+ }
1662
+ function Hn() {
1663
+ return Be.of([fr]);
1664
+ }
1665
+ const ha = [Hn(), Kn()], Xr = Q.theme({
1666
+ "&": {
1667
+ backgroundColor: "#ffffff",
1668
+ color: "#333333"
1669
+ },
1670
+ ".cm-gutters": {
1671
+ backgroundColor: "#f5f5f5",
1672
+ color: "#999999",
1673
+ border: "none"
1674
+ },
1675
+ ".cm-activeLine": {
1676
+ backgroundColor: "rgba(0, 0, 0, 0.05)"
1677
+ },
1678
+ ".cm-activeLineGutter": {
1679
+ backgroundColor: "rgba(0, 0, 0, 0.05)"
1680
+ },
1681
+ ".cm-selectionMatch": {
1682
+ backgroundColor: "rgba(0, 0, 0, 0.05)"
1683
+ },
1684
+ "&.cm-focused .cm-cursor": {
1685
+ borderLeftColor: "#333333"
1686
+ },
1687
+ "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
1688
+ backgroundColor: "rgba(0, 0, 255, 0.1)"
1689
+ }
1690
+ }), Xn = Q.theme({
1691
+ "&": {
1692
+ backgroundColor: "#1e1e1e",
1693
+ color: "#d4d4d4"
1694
+ },
1695
+ ".cm-gutters": {
1696
+ backgroundColor: "#1e1e1e",
1697
+ color: "#8a8a8a",
1698
+ border: "none"
1699
+ },
1700
+ ".cm-activeLine": {
1701
+ backgroundColor: "rgba(255, 255, 255, 0.07)"
1702
+ },
1703
+ ".cm-activeLineGutter": {
1704
+ backgroundColor: "rgba(255, 255, 255, 0.07)"
1705
+ },
1706
+ ".cm-selectionMatch": {
1707
+ backgroundColor: "rgba(255, 255, 255, 0.07)"
1708
+ },
1709
+ "&.cm-focused .cm-cursor": {
1710
+ borderLeftColor: "#d4d4d4"
1711
+ },
1712
+ "&.cm-focused .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": {
1713
+ backgroundColor: "rgba(255, 255, 255, 0.1)"
1714
+ }
1715
+ });
1716
+ function Zn(e) {
1717
+ switch (e) {
1718
+ case "light":
1719
+ return Xr;
1720
+ case "dark":
1721
+ return Xn;
1722
+ default:
1723
+ return Xr;
1724
+ }
1725
+ }
1726
+ const Zr = (e) => {
1727
+ const r = {
1728
+ value: "",
1729
+ readOnlyRanges: []
1730
+ };
1731
+ let n = 0;
1732
+ return e.forEach((a) => {
1733
+ const {
1734
+ content: o,
1735
+ editable: i
1736
+ } = a, s = n, c = s + o.length;
1737
+ r.value += o, i || r.readOnlyRanges.push({
1738
+ start: s,
1739
+ end: c
1740
+ }), n = c;
1741
+ }), r;
1742
+ }, ze = Ut.define(), Qr = Gt.define({
1743
+ create() {
1744
+ return cr.none;
1745
+ },
1746
+ update(e, r) {
1747
+ e = e.map(r.changes);
1748
+ for (const n of r.effects)
1749
+ if (n.is(ze))
1750
+ return console.log(2939), gt(n.value);
1751
+ return r.docChanged, e;
1752
+ },
1753
+ provide(e) {
1754
+ return Q.decorations.from(e);
1755
+ }
1756
+ });
1757
+ function gt(e) {
1758
+ const r = [];
1759
+ return console.log(e, 9999299), e.forEach((n) => {
1760
+ n.start < n.end && r.push(cr.mark({
1761
+ inclusive: !0,
1762
+ attributes: {
1763
+ class: "cm-readOnly",
1764
+ style: "background-color: rgba(0, 0, 0, 0.05);"
1765
+ },
1766
+ // 设置较低的优先级,确保语法高亮装饰可以覆盖
1767
+ priority: -100
1768
+ }).range(n.start, n.end));
1769
+ }), cr.set(r);
1770
+ }
1771
+ const Er = /* @__PURE__ */ new WeakMap();
1772
+ function Qn(e) {
1773
+ let r = e.map((n) => ({
1774
+ ...n
1775
+ }));
1776
+ return [
1777
+ // 添加状态字段
1778
+ Qr.init(() => gt(r)),
1779
+ // 添加按键映射,专门处理回车键
1780
+ Be.of([{
1781
+ key: "Enter",
1782
+ run: (n) => {
1783
+ const a = n.state.selection.main, {
1784
+ from: o,
1785
+ to: i
1786
+ } = a;
1787
+ if (o !== i) {
1788
+ for (const c of r)
1789
+ if (o < c.end && i > c.start)
1790
+ return !1;
1791
+ }
1792
+ let s = !1;
1793
+ for (const c of r)
1794
+ if (o > c.start && o < c.end) {
1795
+ s = !0;
1796
+ break;
1797
+ }
1798
+ return s ? !1 : (n.dispatch({
1799
+ changes: {
1800
+ from: o,
1801
+ to: i,
1802
+ insert: `
1803
+ `
1804
+ },
1805
+ selection: {
1806
+ anchor: o + 1
1807
+ }
1808
+ }), !0);
1809
+ }
1810
+ }]),
1811
+ // 添加事务过滤器,阻止只读区域的编辑
1812
+ ue.transactionFilter.of((n) => {
1813
+ if (!n.docChanged || n.isUserEvent("input.type.Enter") || n.isUserEvent("input.enter"))
1814
+ return n;
1815
+ let a = !1;
1816
+ return n.changes.iterChanges((o, i, s, c) => {
1817
+ if (!(n.newDoc.sliceString(s, c) === `
1818
+ ` && o === i)) {
1819
+ for (const u of r)
1820
+ if (o === i) {
1821
+ if (o > u.start && o < u.end) {
1822
+ a = !0;
1823
+ break;
1824
+ }
1825
+ } else if (
1826
+ // 删除或替换操作
1827
+ o < u.end && i > u.start || // 处理边界情况:删除操作正好落在只读区域的开始或结束位置
1828
+ o === u.start && i > o || i === u.end && o < i
1829
+ ) {
1830
+ a = !0;
1831
+ break;
1832
+ }
1833
+ }
1834
+ }), a ? [] : n;
1835
+ }),
1836
+ // 动态更新只读区域的装饰
1837
+ Q.updateListener.of((n) => {
1838
+ if (n.docChanged) {
1839
+ const a = ra(r, n);
1840
+ !ea(r, a) ? (r = a, Er.set(n.view, a), n.view.dispatch({
1841
+ effects: ze.of(a)
1842
+ })) : n.view.dispatch({
1843
+ effects: ze.of(a)
1844
+ });
1845
+ }
1846
+ }),
1847
+ // 添加一个延迟执行的额外更新,以确保在文档变化后能重新计算语法高亮
1848
+ Q.updateListener.of((n) => {
1849
+ n.docChanged && setTimeout(() => {
1850
+ n.view.state.field(Qr, !1) && n.view.dispatch({});
1851
+ }, 10);
1852
+ })
1853
+ ];
1854
+ }
1855
+ function ea(e, r) {
1856
+ if (e.length !== r.length)
1857
+ return !1;
1858
+ for (let n = 0; n < e.length; n++)
1859
+ if (e[n].start !== r[n].start || e[n].end !== r[n].end)
1860
+ return !1;
1861
+ return !0;
1862
+ }
1863
+ function ra(e, r) {
1864
+ var o;
1865
+ if (!r.docChanged)
1866
+ return e;
1867
+ let n = !1;
1868
+ const a = e.map((i) => {
1869
+ const s = {
1870
+ ...i
1871
+ };
1872
+ return r.changes.iterChanges((c, d, p, u) => {
1873
+ const y = u - p, x = d - c, R = y - x;
1874
+ if (c === 0 && (n = !0), c === 0 && y > 0 && i.start === 0) {
1875
+ s.start = y, s.end += R;
1876
+ return;
1877
+ }
1878
+ if (d <= i.start)
1879
+ s.start += R, s.end += R;
1880
+ else if (c >= i.start && c < i.end && d >= i.end)
1881
+ s.end = c;
1882
+ else if (!(c >= i.start && d <= i.end)) {
1883
+ if (c < i.end && d > i.end) {
1884
+ const E = i.end - c;
1885
+ s.end = c + Math.min(E, y);
1886
+ }
1887
+ }
1888
+ }), s;
1889
+ });
1890
+ if (n && a.length > 0) {
1891
+ const i = ((o = r.changes.newDoc) == null ? void 0 : o.toString()) || "";
1892
+ let s = 0;
1893
+ for (let c = 0; c < i.length && /\s/.test(i[c]); c++)
1894
+ s++;
1895
+ a[0].start === 0 && s > 0 && (a[0].start = s);
1896
+ }
1897
+ return a.filter((i) => i.start < i.end);
1898
+ }
1899
+ function ta(e) {
1900
+ return Er.get(e) || [];
1901
+ }
1902
+ function Ve(e, r) {
1903
+ const n = r.map((a) => ({
1904
+ ...a
1905
+ }));
1906
+ Er.set(e, n), e.dispatch({
1907
+ effects: ze.of(n)
1908
+ }), setTimeout(() => {
1909
+ e.dom && document.contains(e.dom) && e.dispatch({});
1910
+ }, 10);
1911
+ }
1912
+ const Sr = ({
1913
+ value: e,
1914
+ onChange: r,
1915
+ extensions: n = [],
1916
+ height: a = "300px",
1917
+ disabled: o = !1,
1918
+ className: i = "",
1919
+ style: s = {},
1920
+ placeholder: c = "",
1921
+ onEditorViewCreated: d
1922
+ }) => {
1923
+ const p = me(null), u = me();
1924
+ return ie(() => {
1925
+ if (!p.current) return;
1926
+ const y = [Be.of([fr]), Q.lineWrapping, Lr(Dr), ue.allowMultipleSelections.of(!0), c ? jr(c) : [], Q.updateListener.of((E) => {
1927
+ if (E.docChanged && r) {
1928
+ const C = {
1929
+ value: E.state.doc.toString(),
1930
+ readOnlyRanges: []
1931
+ // 基础编辑器没有只读区域逻辑,由特定编辑器实现
1932
+ };
1933
+ r(C);
1934
+ }
1935
+ })];
1936
+ o && y.push(ue.readOnly.of(!0));
1937
+ const x = ue.create({
1938
+ doc: e,
1939
+ extensions: [...y, ...n]
1940
+ }), R = new Q({
1941
+ state: x,
1942
+ parent: p.current
1943
+ });
1944
+ return u.current = R, d && d(R), () => {
1945
+ var E;
1946
+ (E = u.current) == null || E.destroy();
1947
+ };
1948
+ }, []), ie(() => {
1949
+ u.current && e !== u.current.state.doc.toString() && u.current.dispatch({
1950
+ changes: {
1951
+ from: 0,
1952
+ to: u.current.state.doc.length,
1953
+ insert: e
1954
+ }
1955
+ });
1956
+ }, [e]), ie(() => {
1957
+ if (!u.current || !p.current) return;
1958
+ const y = u.current.state.doc.toString();
1959
+ u.current.destroy();
1960
+ const x = [Be.of([fr]), Q.lineWrapping, Lr(Dr), ue.allowMultipleSelections.of(!0), c ? jr(c) : [], Q.updateListener.of((C) => {
1961
+ if (C.docChanged && r) {
1962
+ const j = {
1963
+ value: C.state.doc.toString(),
1964
+ readOnlyRanges: []
1965
+ // 基础编辑器没有只读区域逻辑,由特定编辑器实现
1966
+ };
1967
+ r(j);
1968
+ }
1969
+ })];
1970
+ o && x.push(ue.readOnly.of(!0));
1971
+ const R = ue.create({
1972
+ doc: y,
1973
+ extensions: [...x, ...n]
1974
+ }), E = new Q({
1975
+ state: R,
1976
+ parent: p.current
1977
+ });
1978
+ u.current = E, d && d(E);
1979
+ }, [o]), /* @__PURE__ */ Ze("div", { ref: p, className: `senyao-editor ${o ? "disabled" : ""} ${i}`, style: {
1980
+ height: a,
1981
+ ...s
1982
+ } });
1983
+ }, pa = ({
1984
+ value: e,
1985
+ onChange: r,
1986
+ language: n = "json",
1987
+ extensions: a = [],
1988
+ theme: o = "light",
1989
+ ...i
1990
+ }) => {
1991
+ const s = vr(() => {
1992
+ const c = zn(n) ? Jn(n) : [], d = Zn(o);
1993
+ return [c, d, ...a];
1994
+ }, [n, a, o]);
1995
+ return /* @__PURE__ */ Ze(Sr, { value: e, onChange: r, extensions: s, ...i });
1996
+ }, va = ({
1997
+ value: e,
1998
+ onChange: r,
1999
+ extensions: n = [],
2000
+ readOnlyRanges: a = [],
2001
+ manageReadOnlyRanges: o = !0,
2002
+ ...i
2003
+ }) => {
2004
+ const s = me(null), [c, d] = Nr(a), p = me(e), [u, y] = Nr(null), x = me(!1), R = me(/* @__PURE__ */ new Map());
2005
+ ie(() => {
2006
+ if (o && a.length > 0 && !u) {
2007
+ const m = [];
2008
+ let v = 0;
2009
+ for (let P = 0; P < a.length; P++) {
2010
+ const O = a[P];
2011
+ O.start > v && m.push({
2012
+ content: e.substring(v, O.start),
2013
+ editable: !0
2014
+ }), m.push({
2015
+ content: e.substring(O.start, O.end),
2016
+ editable: !1
2017
+ }), v = O.end;
2018
+ }
2019
+ v < e.length && m.push({
2020
+ content: e.substring(v),
2021
+ editable: !0
2022
+ }), y(m);
2023
+ }
2024
+ }, [o, a, e, u]), ie(() => {
2025
+ if (e) {
2026
+ const m = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], v = /* @__PURE__ */ new Map();
2027
+ m.forEach((P) => {
2028
+ const O = e.indexOf(P);
2029
+ O >= 0 && v.set(P, O);
2030
+ }), R.current = v;
2031
+ }
2032
+ }, []);
2033
+ const E = vr(() => {
2034
+ const m = [rt()];
2035
+ return c.length > 0 && m.push(Qn(c)), [...m, ...n];
2036
+ }, [n, c]), C = ee((m, v, P = 0) => {
2037
+ const O = m.indexOf(v, P);
2038
+ return O >= 0 ? O : null;
2039
+ }, []), j = ee((m, v) => {
2040
+ if (!o || !m || m.length === 0) return m;
2041
+ const P = [...m];
2042
+ let O = 0;
2043
+ for (let U = 0; U < m.length; U++) {
2044
+ const X = m[U];
2045
+ if (!X.editable) {
2046
+ const B = C(v, X.content, O);
2047
+ B !== null && (U > 0 && m[U - 1].editable && B > O && (P[U - 1] = {
2048
+ ...P[U - 1],
2049
+ content: v.substring(O, B)
2050
+ }), O = B + X.content.length);
2051
+ }
2052
+ }
2053
+ const D = m[m.length - 1];
2054
+ return D.editable && O < v.length && (P[m.length - 1] = {
2055
+ ...D,
2056
+ content: v.substring(O)
2057
+ }), P;
2058
+ }, [o, C]), w = ee((m) => {
2059
+ let v = !1;
2060
+ return R.current.forEach((P, O) => {
2061
+ const D = m.indexOf(O);
2062
+ D >= 0 && Math.abs(D - P) > 0 && (R.current.set(O, D), D > P && (P === 0 || P < 15) && (v = !0));
2063
+ }), v;
2064
+ }, []), S = ee(() => {
2065
+ if (!s.current) return;
2066
+ const m = s.current, v = m.state.doc.toString(), P = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], O = m.state.selection;
2067
+ let D = !1;
2068
+ for (const U of P) {
2069
+ const X = v.indexOf(U);
2070
+ if (X >= 0) {
2071
+ m.dispatch({
2072
+ selection: {
2073
+ anchor: X,
2074
+ head: X + U.length
2075
+ },
2076
+ scrollIntoView: !1
2077
+ }), D = !0;
2078
+ break;
2079
+ }
2080
+ }
2081
+ D && setTimeout(() => {
2082
+ m.dom && document.contains(m.dom) && m.dispatch({
2083
+ selection: O,
2084
+ scrollIntoView: !1
2085
+ });
2086
+ }, 10);
2087
+ }, []), k = ee((m) => {
2088
+ const v = m.value, P = p.current;
2089
+ P !== v && v.length > P.length && !P.startsWith(v.substring(0, 5)) && v.includes(P.substring(0, 10)) && (x.current = !0, w(v) && setTimeout(() => {
2090
+ S();
2091
+ }, 10)), p.current = v;
2092
+ const O = s.current ? ta(s.current) : c;
2093
+ if (o && u) {
2094
+ const D = j(u, v);
2095
+ y(D);
2096
+ const {
2097
+ readOnlyRanges: U
2098
+ } = Zr(D);
2099
+ d(U), s.current && Ve(s.current, U), r && r({
2100
+ value: v,
2101
+ readOnlyRanges: U
2102
+ });
2103
+ } else
2104
+ r && r({
2105
+ value: v,
2106
+ readOnlyRanges: O
2107
+ });
2108
+ }, [r, o, u, c, j, w, S]);
2109
+ ie(() => {
2110
+ !o && JSON.stringify(a) !== JSON.stringify(c) && (d(a), s.current && Ve(s.current, a));
2111
+ }, [a, c, o]), ie(() => {
2112
+ if (o && u) {
2113
+ const {
2114
+ readOnlyRanges: m
2115
+ } = Zr(u);
2116
+ JSON.stringify(m) !== JSON.stringify(c) && (d(m), s.current && Ve(s.current, m));
2117
+ }
2118
+ }, [u, c, o]), ie(() => {
2119
+ s.current && x.current && (x.current = !1, s.current.dispatch({}));
2120
+ }, [e]);
2121
+ const L = ee((m) => {
2122
+ if (s.current = m, c.length > 0 && Ve(m, c), e) {
2123
+ const v = ["SELECT", "FROM", "WHERE", "GROUP", "ORDER", "HAVING", "JOIN"], P = /* @__PURE__ */ new Map();
2124
+ v.forEach((O) => {
2125
+ const D = e.indexOf(O);
2126
+ D >= 0 && P.set(O, D);
2127
+ }), R.current = P;
2128
+ }
2129
+ }, [c, e]), l = ee((m) => {
2130
+ k(m), s.current && setTimeout(() => {
2131
+ s.current && s.current.dispatch({});
2132
+ }, 0);
2133
+ }, [k]);
2134
+ return /* @__PURE__ */ Ze(Sr, { value: e, onChange: l, extensions: E, onEditorViewCreated: L, ...i });
2135
+ }, ma = ({
2136
+ value: e,
2137
+ onChange: r,
2138
+ extensions: n = [],
2139
+ enableFormatting: a = !0,
2140
+ ...o
2141
+ }) => {
2142
+ const i = ee((p) => {
2143
+ const u = p.state.doc.toString(), y = [];
2144
+ try {
2145
+ JSON.parse(u);
2146
+ } catch (x) {
2147
+ x instanceof Error && y.push({
2148
+ from: 0,
2149
+ to: u.length,
2150
+ message: x.message,
2151
+ severity: "error"
2152
+ });
2153
+ }
2154
+ return y;
2155
+ }, []), s = ee((p) => {
2156
+ try {
2157
+ const u = JSON.parse(p);
2158
+ return JSON.stringify(u, null, 2);
2159
+ } catch {
2160
+ return p;
2161
+ }
2162
+ }, []), c = ee((p) => {
2163
+ if (a) {
2164
+ const u = s(p);
2165
+ if (u !== p) {
2166
+ r == null || r(u);
2167
+ return;
2168
+ }
2169
+ }
2170
+ r == null || r(p);
2171
+ }, [a, s, r]), d = vr(() => [tt(), nt(), at(i), ...n], [i, n]);
2172
+ return /* @__PURE__ */ Ze(Sr, { value: e, onChange: c, extensions: d, ...o });
2173
+ };
2174
+ export {
2175
+ pa as Editor,
2176
+ Sr as GenericEditor,
2177
+ ma as JSONEditor,
2178
+ va as SQLEditor,
2179
+ Zr as blocksToEditorData,
2180
+ ha as commonExtensions,
2181
+ Kn as createAutocompletionExtension,
2182
+ Hn as createKeymapExtension,
2183
+ da as createLintExtension,
2184
+ Xn as darkTheme,
2185
+ ta as getCurrentReadOnlyRanges,
2186
+ Jn as getLanguageExtension,
2187
+ Zn as getThemeExtension,
2188
+ zn as isSupportedLanguage,
2189
+ Xr as lightTheme,
2190
+ Qn as readOnlyRanges,
2191
+ Ve as updateReadOnlyRanges
2192
+ };