@foris/ai-agent 1.0.0 → 1.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.
@@ -1,25 +1,25 @@
1
- var j1 = Object.defineProperty;
2
- var T1 = Object.getPrototypeOf;
3
- var E1 = Reflect.get;
1
+ var jx = Object.defineProperty;
2
+ var Tx = Object.getPrototypeOf;
3
+ var Ex = Reflect.get;
4
4
  var $m = (n) => {
5
5
  throw TypeError(n);
6
6
  };
7
- var M1 = (n, e, t) => e in n ? j1(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
8
- var j = (n, e, t) => M1(n, typeof e != "symbol" ? e + "" : e, t), Ml = (n, e, t) => e.has(n) || $m("Cannot " + t);
7
+ var Mx = (n, e, t) => e in n ? jx(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
8
+ var j = (n, e, t) => Mx(n, typeof e != "symbol" ? e + "" : e, t), Ml = (n, e, t) => e.has(n) || $m("Cannot " + t);
9
9
  var Xe = (n, e, t) => (Ml(n, e, "read from private field"), t ? t.call(n) : e.get(n)), ni = (n, e, t) => e.has(n) ? $m("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(n) : e.set(n, t), Mt = (n, e, t, i) => (Ml(n, e, "write to private field"), i ? i.call(n, t) : e.set(n, t), t), Pl = (n, e, t) => (Ml(n, e, "access private method"), t);
10
- var Sm = (n, e, t) => E1(T1(n), t, e);
10
+ var Sm = (n, e, t) => Ex(Tx(n), t, e);
11
11
  import { jsxs as B, jsx as _, Fragment as Dd } from "react/jsx-runtime";
12
12
  import * as I from "react";
13
- import P1, { useState as ae, useRef as pe, useEffect as ve, useCallback as St, forwardRef as Ds, createElement as Qr, createContext as qt, useContext as Be, memo as Pi, isValidElement as zb, useLayoutEffect as Gb, useId as D1, useMemo as ka, Fragment as Vb, useInsertionEffect as Wb, Component as R1, useImperativeHandle as B1 } from "react";
14
- import { clsx as O1 } from "clsx";
15
- import { twMerge as L1 } from "tailwind-merge";
13
+ import Px, { useState as ae, useRef as pe, useEffect as ve, useCallback as St, forwardRef as Ds, createElement as Qr, createContext as qt, useContext as Be, memo as Pi, isValidElement as zb, useLayoutEffect as Gb, useId as Dx, useMemo as ka, Fragment as Vb, useInsertionEffect as Wb, Component as Rx, useImperativeHandle as Bx } from "react";
14
+ import { clsx as Ox } from "clsx";
15
+ import { twMerge as Lx } from "tailwind-merge";
16
16
  import { ApiManager as Rd, FetchApiDelegate as Bd } from "@foris/mango-core";
17
17
  import { Icon as Qo } from "@foris/avocado-icons";
18
18
  import { cva as Od } from "class-variance-authority";
19
19
  import Hb from "react-markdown";
20
20
  import "react-dom";
21
21
  function ue(...n) {
22
- return L1(O1(n));
22
+ return Lx(Ox(n));
23
23
  }
24
24
  const Ub = (n) => {
25
25
  let e = !1;
@@ -97,7 +97,7 @@ const Ub = (n) => {
97
97
  }
98
98
  }
99
99
  };
100
- }, N1 = "demo-123", I1 = (n, e, t) => {
100
+ }, Nx = "demo-123", Ix = (n, e, t) => {
101
101
  const [i, a] = ae([]), { splitChunks: s } = Ub(a), r = pe(null);
102
102
  return {
103
103
  onSubmit: async ({ params: l = {}, input: c, abortRef: u }) => {
@@ -117,7 +117,7 @@ const Ub = (n) => {
117
117
  new Bd({ headers: m })
118
118
  )), h = r.current);
119
119
  const f = {
120
- chat_id: N1,
120
+ chat_id: Nx,
121
121
  message: c,
122
122
  ...l
123
123
  }, g = await h.postStream(n, f, {
@@ -134,7 +134,7 @@ const Ub = (n) => {
134
134
  },
135
135
  messages: i
136
136
  };
137
- }, F1 = (n, e) => n === e ? !0 : !n || !e ? !1 : n.tool === e.tool && n.input === e.input && n.result === e.result, q1 = ({
137
+ }, Fx = (n, e) => n === e ? !0 : !n || !e ? !1 : n.tool === e.tool && n.input === e.input && n.result === e.result, qx = ({
138
138
  messages: n,
139
139
  isAtBottom: e,
140
140
  resetUserScrolling: t
@@ -157,7 +157,7 @@ const Ub = (n) => {
157
157
  var c, u, d, p, m, h, f, g;
158
158
  if (l.length === o.length && l.length > 0) {
159
159
  const b = l.length - 1, y = (d = (u = (c = l[b]) == null ? void 0 : c.versions) == null ? void 0 : u[0]) == null ? void 0 : d.content, k = (h = (m = (p = o[b]) == null ? void 0 : p.versions) == null ? void 0 : m[0]) == null ? void 0 : h.content, w = (f = l[b]) == null ? void 0 : f.tool, x = (g = o[b]) == null ? void 0 : g.tool;
160
- if (y !== k || !F1(w, x)) {
160
+ if (y !== k || !Fx(w, x)) {
161
161
  const C = [...l];
162
162
  return C[b] = o[b], e() && t(), C;
163
163
  }
@@ -166,7 +166,7 @@ const Ub = (n) => {
166
166
  return t(), o;
167
167
  });
168
168
  }, [n, e, t]), { processedMessages: i };
169
- }, z1 = ({
169
+ }, zx = ({
170
170
  dataSource: n,
171
171
  onSubmit: e,
172
172
  resetUserScrolling: t,
@@ -203,7 +203,7 @@ const Ub = (n) => {
203
203
  handleFooterSubmit: p,
204
204
  handleFooterKeyDown: m
205
205
  };
206
- }, G1 = (n, e = {}) => {
206
+ }, Gx = (n, e = {}) => {
207
207
  const { threshold: t = 50, delay: i = 100 } = e, a = pe(null), s = pe(null), r = pe(!1), o = pe(), l = pe(0), c = St(() => {
208
208
  if (!a.current) return !0;
209
209
  const { scrollTop: p, scrollHeight: m, clientHeight: h } = a.current;
@@ -251,19 +251,19 @@ const Ub = (n) => {
251
251
  resetUserScrolling: d,
252
252
  isAtBottom: c
253
253
  };
254
- }, V1 = "Foris Agent", W1 = "How can I help you?", H1 = "Choose a suggestion or ask me a question.", U1 = "Ask or create something...", K1 = "Foris AI may make mistakes. Verify the responses.", Z1 = {
255
- title: V1,
256
- welcomeTitle: W1,
257
- welcomeDescription: H1,
258
- placeholder: U1,
259
- disclaimer: K1
260
- }, X1 = "Foris Agent", Y1 = "¿Cómo puedo ayudarte?", J1 = "Puedes elegir una sugerencia o hacerme una pregunta.", Q1 = "Pregunta o crea algo...", ev = "Foris AI puede cometer errores. Verifica sus respuestas.", tv = {
261
- title: X1,
262
- welcomeTitle: Y1,
263
- welcomeDescription: J1,
264
- placeholder: Q1,
254
+ }, Vx = "Foris Agent", Wx = "How can I help you?", Hx = "Choose a suggestion or ask me a question.", Ux = "Ask or create something...", Kx = "Foris AI may make mistakes. Verify the responses.", Zx = {
255
+ title: Vx,
256
+ welcomeTitle: Wx,
257
+ welcomeDescription: Hx,
258
+ placeholder: Ux,
259
+ disclaimer: Kx
260
+ }, Xx = "Foris Agent", Yx = "¿Cómo puedo ayudarte?", Jx = "Puedes elegir una sugerencia o hacerme una pregunta.", Qx = "Pregunta o crea algo...", ev = "Foris AI puede cometer errores. Verifica sus respuestas.", tv = {
261
+ title: Xx,
262
+ welcomeTitle: Yx,
263
+ welcomeDescription: Jx,
264
+ placeholder: Qx,
265
265
  disclaimer: ev
266
- }, nv = "_chatPanel_9r86b_1", iv = "_chatPanel__expanded_9r86b_14", av = "_chatPanel_header_9r86b_20", sv = "_chatPanel_headerLeft_9r86b_29", rv = "_chatPanel_headerIcon_9r86b_34", ov = "_chatPanel_actions_9r86b_38", lv = "_chatPanel_actionButton_9r86b_44", cv = "_chatPanel_title_9r86b_62", uv = "_chatPanel_welcome_9r86b_70", dv = "_chatPanel_welcomeLogo_9r86b_77", pv = "_chatPanel_welcomeTitle_9r86b_82", mv = "_chatPanel_welcomeDescription_9r86b_89", hv = "_chatPanel_welcomeSuggestions_9r86b_96", fv = "_chatPanel_content_9r86b_102", gv = "_chatPanel_conversation_9r86b_108", bv = "_chatPanel_tool_9r86b_173", yv = "_chatPanel_typingIndicator_9r86b_256", kv = "_chatPanel_reasoning_9r86b_277", wv = "_chatPanel_resizer_9r86b_280", _v = "_chatPanel_footer_9r86b_296", xv = "_chatPanel_footerForm_9r86b_306", vv = "_chatPanel_footerInputWrapper_9r86b_309", Cv = "_chatPanel_footerTextarea_9r86b_320", $v = "_chatPanel_footerActions_9r86b_339", Sv = "_chatPanel_footerSendBtn_9r86b_345", Av = "_chatPanel_footerDisclaimer_9r86b_368", te = {
266
+ }, nv = "_chatPanel_1ggs8_1", iv = "_chatPanel__expanded_1ggs8_16", av = "_chatPanel_header_1ggs8_23", sv = "_chatPanel_headerLeft_1ggs8_32", rv = "_chatPanel_headerIcon_1ggs8_37", ov = "_chatPanel_actions_1ggs8_41", lv = "_chatPanel_actionButton_1ggs8_47", cv = "_chatPanel_title_1ggs8_65", uv = "_chatPanel_welcome_1ggs8_73", dv = "_chatPanel_welcomeLogo_1ggs8_80", pv = "_chatPanel_welcomeTitle_1ggs8_85", mv = "_chatPanel_welcomeDescription_1ggs8_92", hv = "_chatPanel_welcomeSuggestions_1ggs8_99", fv = "_chatPanel_content_1ggs8_105", gv = "_chatPanel_conversation_1ggs8_111", bv = "_chatPanel_tool_1ggs8_176", yv = "_chatPanel_typingIndicator_1ggs8_259", kv = "_chatPanel_reasoning_1ggs8_280", wv = "_chatPanel_resizer_1ggs8_283", _v = "_chatPanel_footer_1ggs8_299", xv = "_chatPanel_footerForm_1ggs8_309", vv = "_chatPanel_footerInputWrapper_1ggs8_312", Cv = "_chatPanel_footerTextarea_1ggs8_323", $v = "_chatPanel_footerActions_1ggs8_342", Sv = "_chatPanel_footerSendBtn_1ggs8_348", Av = "_chatPanel_footerDisclaimer_1ggs8_371", te = {
267
267
  chatPanel: nv,
268
268
  chatPanel__expanded: iv,
269
269
  chatPanel_header: av,
@@ -16525,7 +16525,7 @@ function N4(n = !0) {
16525
16525
  const e = Be(hp);
16526
16526
  if (e === null)
16527
16527
  return [!0, null];
16528
- const { isPresent: t, onExitComplete: i, register: a } = e, s = D1();
16528
+ const { isPresent: t, onExitComplete: i, register: a } = e, s = Dx();
16529
16529
  ve(() => {
16530
16530
  if (n)
16531
16531
  return a(s);
@@ -17493,7 +17493,7 @@ class ED extends Qn {
17493
17493
  }
17494
17494
  }
17495
17495
  let mc = !1;
17496
- class MD extends R1 {
17496
+ class MD extends Rx {
17497
17497
  /**
17498
17498
  * This only mounts projection nodes for components that
17499
17499
  * need measuring, we might want to do it for all components
@@ -18088,15 +18088,15 @@ const s5 = ({ className: n, ...e }) => /* @__PURE__ */ _(
18088
18088
  ...r
18089
18089
  }) => {
18090
18090
  const o = {
18091
- ...i === "es" ? tv : Z1,
18091
+ ...i === "es" ? tv : Zx,
18092
18092
  ...a
18093
- }, { onSubmit: l, messages: c } = I1(n.url, n.headers), [u, d] = ae(!1), p = pe(null), {
18093
+ }, { onSubmit: l, messages: c } = Ix(n.url, n.headers), [u, d] = ae(!1), p = pe(null), {
18094
18094
  scrollRef: m,
18095
18095
  contentRef: h,
18096
18096
  scrollToBottom: f,
18097
18097
  resetUserScrolling: g,
18098
18098
  isAtBottom: b
18099
- } = G1([c], { threshold: 50, delay: 50 }), { processedMessages: y } = q1({
18099
+ } = Gx([c], { threshold: 50, delay: 50 }), { processedMessages: y } = qx({
18100
18100
  messages: c,
18101
18101
  isAtBottom: b,
18102
18102
  resetUserScrolling: g
@@ -18108,7 +18108,7 @@ const s5 = ({ className: n, ...e }) => /* @__PURE__ */ _(
18108
18108
  handleSubmit: $,
18109
18109
  handleFooterSubmit: T,
18110
18110
  handleFooterKeyDown: E
18111
- } = z1({
18111
+ } = zx({
18112
18112
  dataSource: n,
18113
18113
  onSubmit: l,
18114
18114
  resetUserScrolling: g,
@@ -28493,12 +28493,12 @@ const Zr = /* @__PURE__ */ N.define(), Y6 = /* @__PURE__ */ N.define(), J6 = {
28493
28493
  side: "before"
28494
28494
  }, ts = /* @__PURE__ */ N.define();
28495
28495
  function Q6(n) {
28496
- return [ex(), ts.of({ ...J6, ...n })];
28496
+ return [e1(), ts.of({ ...J6, ...n })];
28497
28497
  }
28498
28498
  const Fg = /* @__PURE__ */ N.define({
28499
28499
  combine: (n) => n.some((e) => e)
28500
28500
  });
28501
- function ex(n) {
28501
+ function e1(n) {
28502
28502
  return [
28503
28503
  eO
28504
28504
  ];
@@ -28599,7 +28599,7 @@ class tO {
28599
28599
  addElement(e, t, i) {
28600
28600
  let { gutter: a } = this, s = (t.top - this.height) / e.scaleY, r = t.height / e.scaleY;
28601
28601
  if (this.i == a.elements.length) {
28602
- let o = new tx(e, r, s, i);
28602
+ let o = new t1(e, r, s, i);
28603
28603
  a.elements.push(o), a.dom.appendChild(o.dom);
28604
28604
  } else
28605
28605
  a.elements[this.i].update(e, r, s, i);
@@ -28645,7 +28645,7 @@ class zg {
28645
28645
  let o = e.lineBlockAtHeight(r - e.documentTop);
28646
28646
  t.domEventHandlers[i](e, o, a) && a.preventDefault();
28647
28647
  });
28648
- this.markers = qg(t.markers(e)), t.initialSpacer && (this.spacer = new tx(e, 0, 0, [t.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none");
28648
+ this.markers = qg(t.markers(e)), t.initialSpacer && (this.spacer = new t1(e, 0, 0, [t.initialSpacer(e)]), this.dom.appendChild(this.spacer.dom), this.spacer.dom.style.cssText += "visibility: hidden; pointer-events: none");
28649
28649
  }
28650
28650
  update(e) {
28651
28651
  let t = this.markers;
@@ -28661,7 +28661,7 @@ class zg {
28661
28661
  e.destroy();
28662
28662
  }
28663
28663
  }
28664
- class tx {
28664
+ class t1 {
28665
28665
  constructor(e, t, i, a) {
28666
28666
  this.height = -1, this.above = 0, this.markers = [], this.dom = document.createElement("div"), this.dom.className = "cm-gutterElement", this.update(e, t, i, a);
28667
28667
  }
@@ -28767,7 +28767,7 @@ const sO = /* @__PURE__ */ ts.compute([Yi], (n) => ({
28767
28767
  function rO(n = {}) {
28768
28768
  return [
28769
28769
  Yi.of(n),
28770
- ex(),
28770
+ e1(),
28771
28771
  sO
28772
28772
  ];
28773
28773
  }
@@ -28792,7 +28792,7 @@ const oO = /* @__PURE__ */ new class extends $n {
28792
28792
  function cO() {
28793
28793
  return lO;
28794
28794
  }
28795
- const nx = 1024;
28795
+ const n1 = 1024;
28796
28796
  let uO = 0;
28797
28797
  class Mc {
28798
28798
  constructor(e, t) {
@@ -29192,7 +29192,7 @@ class Xn {
29192
29192
  */
29193
29193
  findChild(e, t, i, a, s) {
29194
29194
  let { buffer: r } = this, o = -1;
29195
- for (let l = e; l != t && !(ix(s, a, r[l + 1], r[l + 2]) && (o = l, i > 0)); l = r[l + 3])
29195
+ for (let l = e; l != t && !(i1(s, a, r[l + 1], r[l + 2]) && (o = l, i > 0)); l = r[l + 3])
29196
29196
  ;
29197
29197
  return o;
29198
29198
  }
@@ -29209,7 +29209,7 @@ class Xn {
29209
29209
  return new Xn(s, r, this.set);
29210
29210
  }
29211
29211
  }
29212
- function ix(n, e, t, i) {
29212
+ function i1(n, e, t, i) {
29213
29213
  switch (n) {
29214
29214
  case -2:
29215
29215
  return t < e;
@@ -29243,7 +29243,7 @@ function Cs(n, e, t, i) {
29243
29243
  n = r;
29244
29244
  }
29245
29245
  }
29246
- class ax {
29246
+ class a1 {
29247
29247
  cursor(e = 0) {
29248
29248
  return new xd(this, e);
29249
29249
  }
@@ -29280,7 +29280,7 @@ class ax {
29280
29280
  return this.parent;
29281
29281
  }
29282
29282
  }
29283
- class jt extends ax {
29283
+ class jt extends a1 {
29284
29284
  constructor(e, t, i, a) {
29285
29285
  super(), this._tree = e, this.from = t, this.index = i, this._parent = a;
29286
29286
  }
@@ -29297,7 +29297,7 @@ class jt extends ax {
29297
29297
  for (let r = this; ; ) {
29298
29298
  for (let { children: o, positions: l } = r._tree, c = t > 0 ? o.length : -1; e != c; e += t) {
29299
29299
  let u = o[e], d = l[e] + r.from, p;
29300
- if (!(!(s & ye.EnterBracketed && u instanceof Ce && (p = ns.get(u)) && !p.overlay && p.bracketed && i >= d && i <= d + u.length) && !ix(a, i, d, d + u.length))) {
29300
+ if (!(!(s & ye.EnterBracketed && u instanceof Ce && (p = ns.get(u)) && !p.overlay && p.bracketed && i >= d && i <= d + u.length) && !i1(a, i, d, d + u.length))) {
29301
29301
  if (u instanceof Xn) {
29302
29302
  if (s & ye.ExcludeBuffers)
29303
29303
  continue;
@@ -29439,7 +29439,7 @@ class pO {
29439
29439
  this.parent = e, this.buffer = t, this.index = i, this.start = a;
29440
29440
  }
29441
29441
  }
29442
- class Fn extends ax {
29442
+ class Fn extends a1 {
29443
29443
  get name() {
29444
29444
  return this.type.name;
29445
29445
  }
@@ -29542,7 +29542,7 @@ class Fn extends ax {
29542
29542
  return this.context.buffer.childString(this.index);
29543
29543
  }
29544
29544
  }
29545
- function sx(n) {
29545
+ function s1(n) {
29546
29546
  if (!n.length)
29547
29547
  return null;
29548
29548
  let e = 0, t = n[0];
@@ -29558,7 +29558,7 @@ class mO {
29558
29558
  this.heads = e, this.node = t;
29559
29559
  }
29560
29560
  get next() {
29561
- return sx(this.heads);
29561
+ return s1(this.heads);
29562
29562
  }
29563
29563
  }
29564
29564
  function hO(n, e, t) {
@@ -29574,7 +29574,7 @@ function hO(n, e, t) {
29574
29574
  (a || (a = [i])).push(Cs(o, e, t, !1));
29575
29575
  }
29576
29576
  }
29577
- return a ? sx(a) : i;
29577
+ return a ? s1(a) : i;
29578
29578
  }
29579
29579
  class xd {
29580
29580
  /**
@@ -29879,7 +29879,7 @@ function lm(n) {
29879
29879
  }
29880
29880
  function fO(n) {
29881
29881
  var e;
29882
- let { buffer: t, nodeSet: i, maxBufferLength: a = nx, reused: s = [], minRepeatType: r = i.types.length } = n, o = Array.isArray(t) ? new om(t, t.length) : t, l = i.types, c = 0, u = 0;
29882
+ let { buffer: t, nodeSet: i, maxBufferLength: a = n1, reused: s = [], minRepeatType: r = i.types.length } = n, o = Array.isArray(t) ? new om(t, t.length) : t, l = i.types, c = 0, u = 0;
29883
29883
  function d(x, C, $, T, E, v) {
29884
29884
  let { id: D, start: M, end: z, size: q } = o, V = u, J = c;
29885
29885
  if (q < 0)
@@ -30126,7 +30126,7 @@ class Ci {
30126
30126
  return a;
30127
30127
  }
30128
30128
  }
30129
- class rx {
30129
+ class r1 {
30130
30130
  /**
30131
30131
  Start a parse, returning a [partial parse](#common.PartialParse)
30132
30132
  object. [`fragments`](#common.TreeFragment) can be passed in to
@@ -30243,7 +30243,7 @@ function wO(n) {
30243
30243
  e.push(e[i].concat(n[t]));
30244
30244
  return e.sort((t, i) => i.length - t.length);
30245
30245
  }
30246
- function ox(n) {
30246
+ function o1(n) {
30247
30247
  let e = /* @__PURE__ */ Object.create(null);
30248
30248
  for (let t in n) {
30249
30249
  let i = n[t];
@@ -30277,9 +30277,9 @@ function ox(n) {
30277
30277
  e[c] = u.sort(e[c]);
30278
30278
  }
30279
30279
  }
30280
- return lx.add(e);
30280
+ return l1.add(e);
30281
30281
  }
30282
- const lx = new Z({
30282
+ const l1 = new Z({
30283
30283
  combine(n, e) {
30284
30284
  let t, i, a;
30285
30285
  for (; n || e; ) {
@@ -30309,7 +30309,7 @@ class $s {
30309
30309
  }
30310
30310
  }
30311
30311
  $s.empty = new $s([], 2, null);
30312
- function cx(n, e) {
30312
+ function c1(n, e) {
30313
30313
  let t = /* @__PURE__ */ Object.create(null);
30314
30314
  for (let s of n)
30315
30315
  if (!Array.isArray(s.tag))
@@ -30391,7 +30391,7 @@ class vO {
30391
30391
  }
30392
30392
  }
30393
30393
  function CO(n) {
30394
- let e = n.type.prop(lx);
30394
+ let e = n.type.prop(l1);
30395
30395
  for (; e && e.context && !n.matchContext(e.context); )
30396
30396
  e = e.next;
30397
30397
  return e || null;
@@ -30766,7 +30766,7 @@ for (let n in S) {
30766
30766
  let e = S[n];
30767
30767
  e instanceof yt && (e.name = n);
30768
30768
  }
30769
- cx([
30769
+ c1([
30770
30770
  { tag: S.link, class: "tok-link" },
30771
30771
  { tag: S.heading, class: "tok-heading" },
30772
30772
  { tag: S.emphasis, class: "tok-emphasis" },
@@ -31063,7 +31063,7 @@ class No {
31063
31063
  promise resolves.
31064
31064
  */
31065
31065
  static getSkippingParser(e) {
31066
- return new class extends rx {
31066
+ return new class extends r1 {
31067
31067
  createParse(t, i, a) {
31068
31068
  let s = a[0].from, r = a[a.length - 1].to;
31069
31069
  return {
@@ -31127,7 +31127,7 @@ Lt.state = /* @__PURE__ */ Ke.define({
31127
31127
  return e.startState.facet(Yn) != e.state.facet(Yn) ? ba.init(e.state) : n.apply(e);
31128
31128
  }
31129
31129
  });
31130
- let ux = (n) => {
31130
+ let u1 = (n) => {
31131
31131
  let e = setTimeout(
31132
31132
  () => n(),
31133
31133
  500
@@ -31135,7 +31135,7 @@ let ux = (n) => {
31135
31135
  );
31136
31136
  return () => clearTimeout(e);
31137
31137
  };
31138
- typeof requestIdleCallback < "u" && (ux = (n) => {
31138
+ typeof requestIdleCallback < "u" && (u1 = (n) => {
31139
31139
  let e = -1, t = setTimeout(
31140
31140
  () => {
31141
31141
  e = requestIdleCallback(n, {
@@ -31160,7 +31160,7 @@ const Rc = typeof navigator < "u" && (!((Dc = navigator.scheduling) === null ||
31160
31160
  if (this.working)
31161
31161
  return;
31162
31162
  let { state: e } = this.view, t = e.field(Lt.state);
31163
- (t.tree != t.context.tree || !t.context.isDone(e.doc.length)) && (this.working = ux(this.work));
31163
+ (t.tree != t.context.tree || !t.context.isDone(e.doc.length)) && (this.working = u1(this.work));
31164
31164
  }
31165
31165
  work(e) {
31166
31166
  this.working = null;
@@ -31309,7 +31309,7 @@ class Cl {
31309
31309
  return this.options.simulateBreak || null;
31310
31310
  }
31311
31311
  }
31312
- const dx = /* @__PURE__ */ new Z();
31312
+ const d1 = /* @__PURE__ */ new Z();
31313
31313
  function MO(n, e, t) {
31314
31314
  let i = e.resolveStack(t), a = e.resolveInner(t, -1).resolve(t, 0).enterUnfinishedNodesBefore(t);
31315
31315
  if (a != i.node) {
@@ -31319,9 +31319,9 @@ function MO(n, e, t) {
31319
31319
  for (let r = s.length - 1; r >= 0; r--)
31320
31320
  i = { node: s[r], next: i };
31321
31321
  }
31322
- return px(i, n, t);
31322
+ return p1(i, n, t);
31323
31323
  }
31324
- function px(n, e, t) {
31324
+ function p1(n, e, t) {
31325
31325
  for (let i = n; i; i = i.next) {
31326
31326
  let a = DO(i.node);
31327
31327
  if (a)
@@ -31333,7 +31333,7 @@ function PO(n) {
31333
31333
  return n.pos == n.options.simulateBreak && n.options.simulateDoubleBreak;
31334
31334
  }
31335
31335
  function DO(n) {
31336
- let e = n.type.prop(dx);
31336
+ let e = n.type.prop(d1);
31337
31337
  if (e)
31338
31338
  return e;
31339
31339
  let t = n.firstChild, i;
@@ -31401,7 +31401,7 @@ class dm extends Cl {
31401
31401
  and return the result of that.
31402
31402
  */
31403
31403
  continue() {
31404
- return px(this.context.next, this.base, this.pos);
31404
+ return p1(this.context.next, this.base, this.pos);
31405
31405
  }
31406
31406
  }
31407
31407
  function BO(n, e) {
@@ -31467,7 +31467,7 @@ function IO() {
31467
31467
  return l.length ? [n, { changes: l, sequential: !0 }] : n;
31468
31468
  });
31469
31469
  }
31470
- const FO = /* @__PURE__ */ N.define(), mx = /* @__PURE__ */ new Z();
31470
+ const FO = /* @__PURE__ */ N.define(), m1 = /* @__PURE__ */ new Z();
31471
31471
  function qO(n) {
31472
31472
  let e = n.firstChild, t = n.lastChild;
31473
31473
  return e && e.to < t.from ? { from: e.to, to: t.type.isError ? n.to : t.from } : null;
@@ -31483,7 +31483,7 @@ function zO(n, e, t) {
31483
31483
  continue;
31484
31484
  if (s && o.from < e)
31485
31485
  break;
31486
- let l = o.type.prop(mx);
31486
+ let l = o.type.prop(m1);
31487
31487
  if (l && (o.to < i.length - 50 || i.length == n.doc.length || !GO(o))) {
31488
31488
  let c = l(o, n);
31489
31489
  c && c.from <= t && c.from >= e && c.to > t && (s = c);
@@ -31503,12 +31503,12 @@ function Fo(n, e, t) {
31503
31503
  }
31504
31504
  return zO(n, e, t);
31505
31505
  }
31506
- function hx(n, e) {
31506
+ function h1(n, e) {
31507
31507
  let t = e.mapPos(n.from, 1), i = e.mapPos(n.to, -1);
31508
31508
  return t >= i ? void 0 : { from: t, to: i };
31509
31509
  }
31510
- const $l = /* @__PURE__ */ H.define({ map: hx }), Ws = /* @__PURE__ */ H.define({ map: hx });
31511
- function fx(n) {
31510
+ const $l = /* @__PURE__ */ H.define({ map: h1 }), Ws = /* @__PURE__ */ H.define({ map: h1 });
31511
+ function f1(n) {
31512
31512
  let e = [];
31513
31513
  for (let { head: t } of n.state.selection.ranges)
31514
31514
  e.some((i) => i.from <= t && i.to >= t) || e.push(n.lineBlockAt(t));
@@ -31522,7 +31522,7 @@ const Mi = /* @__PURE__ */ Ke.define({
31522
31522
  e.isUserEvent("delete") && e.changes.iterChangedRanges((t, i) => n = Jg(n, t, i)), n = n.map(e.changes);
31523
31523
  for (let t of e.effects)
31524
31524
  if (t.is($l) && !VO(n, t.value.from, t.value.to)) {
31525
- let { preparePlaceholder: i } = e.state.facet(yx), a = i ? G.replace({ widget: new YO(i(e.state, t.value)) }) : Qg;
31525
+ let { preparePlaceholder: i } = e.state.facet(y1), a = i ? G.replace({ widget: new YO(i(e.state, t.value)) }) : Qg;
31526
31526
  n = n.update({ add: [a.range(t.value.from, t.value.to)] });
31527
31527
  } else t.is(Ws) && (n = n.update({
31528
31528
  filter: (i, a) => t.value.from != i || t.value.to != a,
@@ -31574,27 +31574,27 @@ function VO(n, e, t) {
31574
31574
  a == e && s == t && (i = !0);
31575
31575
  }), i;
31576
31576
  }
31577
- function gx(n, e) {
31578
- return n.field(Mi, !1) ? e : e.concat(H.appendConfig.of(kx()));
31577
+ function g1(n, e) {
31578
+ return n.field(Mi, !1) ? e : e.concat(H.appendConfig.of(k1()));
31579
31579
  }
31580
31580
  const WO = (n) => {
31581
- for (let e of fx(n)) {
31581
+ for (let e of f1(n)) {
31582
31582
  let t = Fo(n.state, e.from, e.to);
31583
31583
  if (t)
31584
- return n.dispatch({ effects: gx(n.state, [$l.of(t), bx(n, t)]) }), !0;
31584
+ return n.dispatch({ effects: g1(n.state, [$l.of(t), b1(n, t)]) }), !0;
31585
31585
  }
31586
31586
  return !1;
31587
31587
  }, HO = (n) => {
31588
31588
  if (!n.state.field(Mi, !1))
31589
31589
  return !1;
31590
31590
  let e = [];
31591
- for (let t of fx(n)) {
31591
+ for (let t of f1(n)) {
31592
31592
  let i = qo(n.state, t.from, t.to);
31593
- i && e.push(Ws.of(i), bx(n, i, !1));
31593
+ i && e.push(Ws.of(i), b1(n, i, !1));
31594
31594
  }
31595
31595
  return e.length && n.dispatch({ effects: e }), e.length > 0;
31596
31596
  };
31597
- function bx(n, e, t = !0) {
31597
+ function b1(n, e, t = !0) {
31598
31598
  let i = n.state.doc.lineAt(e.from).number, a = n.state.doc.lineAt(e.to).number;
31599
31599
  return O.announce.of(`${n.state.phrase(t ? "Folded lines" : "Unfolded lines")} ${i} ${n.state.phrase("to")} ${a}.`);
31600
31600
  }
@@ -31604,7 +31604,7 @@ const UO = (n) => {
31604
31604
  let a = n.lineBlockAt(i), s = Fo(e, a.from, a.to);
31605
31605
  s && t.push($l.of(s)), i = (s ? n.lineBlockAt(s.to) : a).to + 1;
31606
31606
  }
31607
- return t.length && n.dispatch({ effects: gx(n.state, t) }), !!t.length;
31607
+ return t.length && n.dispatch({ effects: g1(n.state, t) }), !!t.length;
31608
31608
  }, KO = (n) => {
31609
31609
  let e = n.state.field(Mi, !1);
31610
31610
  if (!e || !e.size)
@@ -31622,16 +31622,16 @@ const UO = (n) => {
31622
31622
  placeholderDOM: null,
31623
31623
  preparePlaceholder: null,
31624
31624
  placeholderText: "…"
31625
- }, yx = /* @__PURE__ */ N.define({
31625
+ }, y1 = /* @__PURE__ */ N.define({
31626
31626
  combine(n) {
31627
31627
  return dn(n, XO);
31628
31628
  }
31629
31629
  });
31630
- function kx(n) {
31630
+ function k1(n) {
31631
31631
  return [Mi, eL];
31632
31632
  }
31633
- function wx(n, e) {
31634
- let { state: t } = n, i = t.facet(yx), a = (r) => {
31633
+ function w1(n, e) {
31634
+ let { state: t } = n, i = t.facet(y1), a = (r) => {
31635
31635
  let o = n.lineBlockAt(n.posAtDOM(r.target)), l = qo(n.state, o.from, o.to);
31636
31636
  l && n.dispatch({ effects: Ws.of(l) }), r.preventDefault();
31637
31637
  };
@@ -31642,7 +31642,7 @@ function wx(n, e) {
31642
31642
  }
31643
31643
  const Qg = /* @__PURE__ */ G.replace({ widget: /* @__PURE__ */ new class extends pn {
31644
31644
  toDOM(n) {
31645
- return wx(n, null);
31645
+ return w1(n, null);
31646
31646
  }
31647
31647
  }() });
31648
31648
  class YO extends pn {
@@ -31653,7 +31653,7 @@ class YO extends pn {
31653
31653
  return this.value == e.value;
31654
31654
  }
31655
31655
  toDOM(e) {
31656
- return wx(e, this.value);
31656
+ return w1(e, this.value);
31657
31657
  }
31658
31658
  }
31659
31659
  const JO = {
@@ -31718,7 +31718,7 @@ function QO(n = {}) {
31718
31718
  }
31719
31719
  }
31720
31720
  }),
31721
- kx()
31721
+ k1()
31722
31722
  ];
31723
31723
  }
31724
31724
  const eL = /* @__PURE__ */ O.baseTheme({
@@ -31745,7 +31745,7 @@ class Hs {
31745
31745
  return (i || (i = /* @__PURE__ */ Object.create(null)))["." + l] = o, l;
31746
31746
  }
31747
31747
  const s = typeof t.all == "string" ? t.all : t.all ? a(t.all) : void 0, r = t.scope;
31748
- this.scope = r instanceof Lt ? (o) => o.prop(Ji) == r.data : r ? (o) => o == r : void 0, this.style = cx(e.map((o) => ({
31748
+ this.scope = r instanceof Lt ? (o) => o.prop(Ji) == r.data : r ? (o) => o == r : void 0, this.style = c1(e.map((o) => ({
31749
31749
  tag: o.tag,
31750
31750
  class: o.class || a(Object.assign({}, o, { tag: null }))
31751
31751
  })), {
@@ -31771,18 +31771,18 @@ class Hs {
31771
31771
  return new Hs(e, t || {});
31772
31772
  }
31773
31773
  }
31774
- const Cd = /* @__PURE__ */ N.define(), _x = /* @__PURE__ */ N.define({
31774
+ const Cd = /* @__PURE__ */ N.define(), _1 = /* @__PURE__ */ N.define({
31775
31775
  combine(n) {
31776
31776
  return n.length ? [n[0]] : null;
31777
31777
  }
31778
31778
  });
31779
31779
  function Oc(n) {
31780
31780
  let e = n.facet(Cd);
31781
- return e.length ? e : n.facet(_x);
31781
+ return e.length ? e : n.facet(_1);
31782
31782
  }
31783
- function xx(n, e) {
31783
+ function x1(n, e) {
31784
31784
  let t = [nL], i;
31785
- return n instanceof Hs && (n.module && t.push(O.styleModule.of(n.module)), i = n.themeType), e != null && e.fallback ? t.push(_x.of(n)) : i ? t.push(Cd.computeN([O.darkTheme], (a) => a.facet(O.darkTheme) == (i == "dark") ? [n] : [])) : t.push(Cd.of(n)), t;
31785
+ return n instanceof Hs && (n.module && t.push(O.styleModule.of(n.module)), i = n.themeType), e != null && e.fallback ? t.push(_1.of(n)) : i ? t.push(Cd.computeN([O.darkTheme], (a) => a.facet(O.darkTheme) == (i == "dark") ? [n] : [])) : t.push(Cd.of(n)), t;
31786
31786
  }
31787
31787
  class tL {
31788
31788
  constructor(e) {
@@ -31886,12 +31886,12 @@ const nL = /* @__PURE__ */ Ri.high(/* @__PURE__ */ we.fromClass(tL, {
31886
31886
  ]), aL = /* @__PURE__ */ O.baseTheme({
31887
31887
  "&.cm-focused .cm-matchingBracket": { backgroundColor: "#328c8252" },
31888
31888
  "&.cm-focused .cm-nonmatchingBracket": { backgroundColor: "#bb555544" }
31889
- }), vx = 1e4, Cx = "()[]{}", $x = /* @__PURE__ */ N.define({
31889
+ }), v1 = 1e4, C1 = "()[]{}", $1 = /* @__PURE__ */ N.define({
31890
31890
  combine(n) {
31891
31891
  return dn(n, {
31892
31892
  afterCursor: !0,
31893
- brackets: Cx,
31894
- maxScanDistance: vx,
31893
+ brackets: C1,
31894
+ maxScanDistance: v1,
31895
31895
  renderMatch: oL
31896
31896
  });
31897
31897
  }
@@ -31901,7 +31901,7 @@ function oL(n) {
31901
31901
  return e.push(t.range(n.start.from, n.start.to)), n.end && e.push(t.range(n.end.from, n.end.to)), e;
31902
31902
  }
31903
31903
  function eb(n) {
31904
- let e = [], t = n.facet($x);
31904
+ let e = [], t = n.facet($1);
31905
31905
  for (let i of n.selection.ranges) {
31906
31906
  if (!i.empty)
31907
31907
  continue;
@@ -31924,7 +31924,7 @@ const lL = /* @__PURE__ */ we.fromClass(class {
31924
31924
  aL
31925
31925
  ];
31926
31926
  function uL(n = {}) {
31927
- return [$x.of(n), cL];
31927
+ return [$1.of(n), cL];
31928
31928
  }
31929
31929
  const dL = /* @__PURE__ */ new Z();
31930
31930
  function $d(n, e, t) {
@@ -31943,7 +31943,7 @@ function Sd(n) {
31943
31943
  return e ? e(n.node) : n;
31944
31944
  }
31945
31945
  function an(n, e, t, i = {}) {
31946
- let a = i.maxScanDistance || vx, s = i.brackets || Cx, r = Ue(n), o = r.resolveInner(e, t);
31946
+ let a = i.maxScanDistance || v1, s = i.brackets || C1, r = Ue(n), o = r.resolveInner(e, t);
31947
31947
  for (let l = o; l; l = l.parent) {
31948
31948
  let c = $d(l.type, t, s);
31949
31949
  if (c && l.from < l.to) {
@@ -32041,7 +32041,7 @@ function gL(n, e) {
32041
32041
  let r = ib[a] = ct.define({
32042
32042
  id: tb.length,
32043
32043
  name: i,
32044
- props: [ox({ [i]: t })]
32044
+ props: [o1({ [i]: t })]
32045
32045
  });
32046
32046
  return tb.push(r), r.id;
32047
32047
  }
@@ -32063,11 +32063,11 @@ const yL = /* @__PURE__ */ pm(
32063
32063
  0
32064
32064
  /* CommentOption.Toggle */
32065
32065
  ), kL = /* @__PURE__ */ pm(
32066
- Sx,
32066
+ S1,
32067
32067
  0
32068
32068
  /* CommentOption.Toggle */
32069
32069
  ), wL = /* @__PURE__ */ pm(
32070
- (n, e) => Sx(n, e, xL(e)),
32070
+ (n, e) => S1(n, e, xL(e)),
32071
32071
  0
32072
32072
  /* CommentOption.Toggle */
32073
32073
  );
@@ -32107,7 +32107,7 @@ function xL(n) {
32107
32107
  }
32108
32108
  return e;
32109
32109
  }
32110
- function Sx(n, e, t = e.selection.ranges) {
32110
+ function S1(n, e, t = e.selection.ranges) {
32111
32111
  let i = t.map((s) => mm(e, s.from).block);
32112
32112
  if (!i.every((s) => s))
32113
32113
  return null;
@@ -32162,7 +32162,7 @@ function vL(n, e, t = e.selection.ranges) {
32162
32162
  }
32163
32163
  return null;
32164
32164
  }
32165
- const Ad = /* @__PURE__ */ un.define(), CL = /* @__PURE__ */ un.define(), $L = /* @__PURE__ */ N.define(), Ax = /* @__PURE__ */ N.define({
32165
+ const Ad = /* @__PURE__ */ un.define(), CL = /* @__PURE__ */ un.define(), $L = /* @__PURE__ */ N.define(), A1 = /* @__PURE__ */ N.define({
32166
32166
  combine(n) {
32167
32167
  return dn(n, {
32168
32168
  minDepth: 100,
@@ -32174,15 +32174,15 @@ const Ad = /* @__PURE__ */ un.define(), CL = /* @__PURE__ */ un.define(), $L = /
32174
32174
  joinToEvent: (e, t) => (i, a) => e(i, a) || t(i, a)
32175
32175
  });
32176
32176
  }
32177
- }), jx = /* @__PURE__ */ Ke.define({
32177
+ }), j1 = /* @__PURE__ */ Ke.define({
32178
32178
  create() {
32179
32179
  return sn.empty;
32180
32180
  },
32181
32181
  update(n, e) {
32182
- let t = e.state.facet(Ax), i = e.annotation(Ad);
32182
+ let t = e.state.facet(A1), i = e.annotation(Ad);
32183
32183
  if (i) {
32184
32184
  let l = rt.fromTransaction(e, i.selection), c = i.side, u = c == 0 ? n.undone : n.done;
32185
- return l ? u = zo(u, u.length, t.minDepth, l) : u = Mx(u, e.startState.selection), new sn(c == 0 ? i.rest : u, c == 0 ? u : i.rest);
32185
+ return l ? u = zo(u, u.length, t.minDepth, l) : u = M1(u, e.startState.selection), new sn(c == 0 ? i.rest : u, c == 0 ? u : i.rest);
32186
32186
  }
32187
32187
  let a = e.annotation(CL);
32188
32188
  if ((a == "full" || a == "before") && (n = n.isolate()), e.annotation(Me.addToHistory) === !1)
@@ -32199,11 +32199,11 @@ const Ad = /* @__PURE__ */ un.define(), CL = /* @__PURE__ */ un.define(), $L = /
32199
32199
  });
32200
32200
  function SL(n = {}) {
32201
32201
  return [
32202
- jx,
32203
- Ax.of(n),
32202
+ j1,
32203
+ A1.of(n),
32204
32204
  O.domEventHandlers({
32205
32205
  beforeinput(e, t) {
32206
- let i = e.inputType == "historyUndo" ? Tx : e.inputType == "historyRedo" ? jd : null;
32206
+ let i = e.inputType == "historyUndo" ? T1 : e.inputType == "historyRedo" ? jd : null;
32207
32207
  return i ? (e.preventDefault(), i(t)) : !1;
32208
32208
  }
32209
32209
  })
@@ -32213,14 +32213,14 @@ function Sl(n, e) {
32213
32213
  return function({ state: t, dispatch: i }) {
32214
32214
  if (!e && t.readOnly)
32215
32215
  return !1;
32216
- let a = t.field(jx, !1);
32216
+ let a = t.field(j1, !1);
32217
32217
  if (!a)
32218
32218
  return !1;
32219
32219
  let s = a.pop(n, t, e);
32220
32220
  return s ? (i(s), !0) : !1;
32221
32221
  };
32222
32222
  }
32223
- const Tx = /* @__PURE__ */ Sl(0, !1), jd = /* @__PURE__ */ Sl(1, !1), AL = /* @__PURE__ */ Sl(0, !0), jL = /* @__PURE__ */ Sl(1, !0);
32223
+ const T1 = /* @__PURE__ */ Sl(0, !1), jd = /* @__PURE__ */ Sl(1, !1), AL = /* @__PURE__ */ Sl(0, !0), jL = /* @__PURE__ */ Sl(1, !0);
32224
32224
  class rt {
32225
32225
  constructor(e, t, i, a, s) {
32226
32226
  this.changes = e, this.effects = t, this.mapped = i, this.startSelection = a, this.selectionsAfter = s;
@@ -32271,11 +32271,11 @@ function TL(n, e) {
32271
32271
  function EL(n, e) {
32272
32272
  return n.ranges.length == e.ranges.length && n.ranges.filter((t, i) => t.empty != e.ranges[i].empty).length === 0;
32273
32273
  }
32274
- function Ex(n, e) {
32274
+ function E1(n, e) {
32275
32275
  return n.length ? e.length ? n.concat(e) : n : e;
32276
32276
  }
32277
32277
  const Ct = [], ML = 200;
32278
- function Mx(n, e) {
32278
+ function M1(n, e) {
32279
32279
  if (n.length) {
32280
32280
  let t = n[n.length - 1], i = t.selectionsAfter.slice(Math.max(0, t.selectionsAfter.length - ML));
32281
32281
  return i.length && i[i.length - 1].eq(e) ? n : (i.push(e), zo(n, n.length - 1, 1e9, t.setSelAfter(i)));
@@ -32301,7 +32301,7 @@ function Nc(n, e) {
32301
32301
  return i.length ? [rt.selection(i)] : Ct;
32302
32302
  }
32303
32303
  function DL(n, e, t) {
32304
- let i = Ex(n.selectionsAfter.length ? n.selectionsAfter.map((o) => o.map(e)) : Ct, t);
32304
+ let i = E1(n.selectionsAfter.length ? n.selectionsAfter.map((o) => o.map(e)) : Ct, t);
32305
32305
  if (!n.changes)
32306
32306
  return rt.selection(i);
32307
32307
  let a = n.changes.map(e), s = e.mapDesc(n.changes, !0), r = n.mapped ? n.mapped.composeDesc(s) : s;
@@ -32318,11 +32318,11 @@ class sn {
32318
32318
  addChanges(e, t, i, a, s) {
32319
32319
  let r = this.done, o = r[r.length - 1];
32320
32320
  return o && o.changes && !o.changes.empty && e.changes && (!i || RL.test(i)) && (!o.selectionsAfter.length && t - this.prevTime < a.newGroupDelay && a.joinToEvent(s, TL(o.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
32321
- i == "input.type.compose") ? r = zo(r, r.length - 1, a.minDepth, new rt(e.changes.compose(o.changes), Ex(H.mapEffects(e.effects, o.changes), o.effects), o.mapped, o.startSelection, Ct)) : r = zo(r, r.length, a.minDepth, e), new sn(r, Ct, t, i);
32321
+ i == "input.type.compose") ? r = zo(r, r.length - 1, a.minDepth, new rt(e.changes.compose(o.changes), E1(H.mapEffects(e.effects, o.changes), o.effects), o.mapped, o.startSelection, Ct)) : r = zo(r, r.length, a.minDepth, e), new sn(r, Ct, t, i);
32322
32322
  }
32323
32323
  addSelection(e, t, i, a) {
32324
32324
  let s = this.done.length ? this.done[this.done.length - 1].selectionsAfter : Ct;
32325
- return s.length > 0 && t - this.prevTime < a && i == this.prevUserEvent && i && /^select($|\.)/.test(i) && EL(s[s.length - 1], e) ? this : new sn(Mx(this.done, e), this.undone, t, i);
32325
+ return s.length > 0 && t - this.prevTime < a && i == this.prevUserEvent && i && /^select($|\.)/.test(i) && EL(s[s.length - 1], e) ? this : new sn(M1(this.done, e), this.undone, t, i);
32326
32326
  }
32327
32327
  addMapping(e) {
32328
32328
  return new sn(Nc(this.done, e), Nc(this.undone, e), this.prevTime, this.prevUserEvent);
@@ -32356,7 +32356,7 @@ class sn {
32356
32356
  }
32357
32357
  sn.empty = /* @__PURE__ */ new sn(Ct, Ct);
32358
32358
  const BL = [
32359
- { key: "Mod-z", run: Tx, preventDefault: !0 },
32359
+ { key: "Mod-z", run: T1, preventDefault: !0 },
32360
32360
  { key: "Mod-y", mac: "Mod-Shift-z", run: jd, preventDefault: !0 },
32361
32361
  { linux: "Ctrl-Shift-z", run: jd, preventDefault: !0 },
32362
32362
  { key: "Mod-u", run: AL, preventDefault: !0 },
@@ -32375,17 +32375,17 @@ function Gt({ state: n, dispatch: e }, t) {
32375
32375
  function Al(n, e) {
32376
32376
  return A.cursor(e ? n.to : n.from);
32377
32377
  }
32378
- function Px(n, e) {
32378
+ function P1(n, e) {
32379
32379
  return Gt(n, (t) => t.empty ? n.moveByChar(t, e) : Al(t, e));
32380
32380
  }
32381
32381
  function Ze(n) {
32382
32382
  return n.textDirectionAt(n.state.selection.main.head) == oe.LTR;
32383
32383
  }
32384
- const Dx = (n) => Px(n, !Ze(n)), Rx = (n) => Px(n, Ze(n));
32385
- function Bx(n, e) {
32384
+ const D1 = (n) => P1(n, !Ze(n)), R1 = (n) => P1(n, Ze(n));
32385
+ function B1(n, e) {
32386
32386
  return Gt(n, (t) => t.empty ? n.moveByGroup(t, e) : Al(t, e));
32387
32387
  }
32388
- const OL = (n) => Bx(n, !Ze(n)), LL = (n) => Bx(n, Ze(n));
32388
+ const OL = (n) => B1(n, !Ze(n)), LL = (n) => B1(n, Ze(n));
32389
32389
  function NL(n, e, t) {
32390
32390
  if (e.type.prop(t))
32391
32391
  return !0;
@@ -32404,7 +32404,7 @@ function jl(n, e, t) {
32404
32404
  return s && (r = t ? an(n, i.from, 1) : an(n, i.to, -1)) && r.matched ? o = t ? r.end.to : r.end.from : o = t ? i.to : i.from, A.cursor(o, t ? -1 : 1);
32405
32405
  }
32406
32406
  const IL = (n) => Gt(n, (e) => jl(n.state, e, !Ze(n))), FL = (n) => Gt(n, (e) => jl(n.state, e, Ze(n)));
32407
- function Ox(n, e) {
32407
+ function O1(n, e) {
32408
32408
  return Gt(n, (t) => {
32409
32409
  if (!t.empty)
32410
32410
  return Al(t, e);
@@ -32412,8 +32412,8 @@ function Ox(n, e) {
32412
32412
  return i.head != t.head ? i : n.moveToLineBoundary(t, e);
32413
32413
  });
32414
32414
  }
32415
- const Lx = (n) => Ox(n, !1), Nx = (n) => Ox(n, !0);
32416
- function Ix(n) {
32415
+ const L1 = (n) => O1(n, !1), N1 = (n) => O1(n, !0);
32416
+ function I1(n) {
32417
32417
  let e = n.scrollDOM.clientHeight < n.scrollDOM.scrollHeight - 2, t = 0, i = 0, a;
32418
32418
  if (e) {
32419
32419
  for (let s of n.state.facet(O.scrollMargins)) {
@@ -32430,8 +32430,8 @@ function Ix(n) {
32430
32430
  height: Math.max(n.defaultLineHeight, a - 5)
32431
32431
  };
32432
32432
  }
32433
- function Fx(n, e) {
32434
- let t = Ix(n), { state: i } = n, a = ja(i.selection, (r) => r.empty ? n.moveVertically(r, e, t.height) : Al(r, e));
32433
+ function F1(n, e) {
32434
+ let t = I1(n), { state: i } = n, a = ja(i.selection, (r) => r.empty ? n.moveVertically(r, e, t.height) : Al(r, e));
32435
32435
  if (a.eq(i.selection))
32436
32436
  return !1;
32437
32437
  let s;
@@ -32441,7 +32441,7 @@ function Fx(n, e) {
32441
32441
  }
32442
32442
  return n.dispatch(zt(i, a), { effects: s }), !0;
32443
32443
  }
32444
- const ab = (n) => Fx(n, !1), Td = (n) => Fx(n, !0);
32444
+ const ab = (n) => F1(n, !1), Td = (n) => F1(n, !0);
32445
32445
  function ei(n, e, t) {
32446
32446
  let i = n.lineBlockAt(e.head), a = n.moveToLineBoundary(e, t);
32447
32447
  if (a.head == e.head && a.head != (t ? i.to : i.from) && (a = n.moveToLineBoundary(e, t, !1)), !t && a.head == i.from && i.length) {
@@ -32470,22 +32470,22 @@ function Et(n, e) {
32470
32470
  });
32471
32471
  return t.eq(n.state.selection) ? !1 : (n.dispatch(zt(n.state, t)), !0);
32472
32472
  }
32473
- function qx(n, e) {
32473
+ function q1(n, e) {
32474
32474
  return Et(n, (t) => n.moveByChar(t, e));
32475
32475
  }
32476
- const zx = (n) => qx(n, !Ze(n)), Gx = (n) => qx(n, Ze(n));
32477
- function Vx(n, e) {
32476
+ const z1 = (n) => q1(n, !Ze(n)), G1 = (n) => q1(n, Ze(n));
32477
+ function V1(n, e) {
32478
32478
  return Et(n, (t) => n.moveByGroup(t, e));
32479
32479
  }
32480
- const ZL = (n) => Vx(n, !Ze(n)), XL = (n) => Vx(n, Ze(n)), YL = (n) => Et(n, (e) => jl(n.state, e, !Ze(n))), JL = (n) => Et(n, (e) => jl(n.state, e, Ze(n)));
32481
- function Wx(n, e) {
32480
+ const ZL = (n) => V1(n, !Ze(n)), XL = (n) => V1(n, Ze(n)), YL = (n) => Et(n, (e) => jl(n.state, e, !Ze(n))), JL = (n) => Et(n, (e) => jl(n.state, e, Ze(n)));
32481
+ function W1(n, e) {
32482
32482
  return Et(n, (t) => n.moveVertically(t, e));
32483
32483
  }
32484
- const Hx = (n) => Wx(n, !1), Ux = (n) => Wx(n, !0);
32485
- function Kx(n, e) {
32486
- return Et(n, (t) => n.moveVertically(t, e, Ix(n).height));
32484
+ const H1 = (n) => W1(n, !1), U1 = (n) => W1(n, !0);
32485
+ function K1(n, e) {
32486
+ return Et(n, (t) => n.moveVertically(t, e, I1(n).height));
32487
32487
  }
32488
- const sb = (n) => Kx(n, !1), rb = (n) => Kx(n, !0), QL = (n) => Et(n, (e) => ei(n, e, !0)), eN = (n) => Et(n, (e) => ei(n, e, !1)), tN = (n) => Et(n, (e) => ei(n, e, !Ze(n))), nN = (n) => Et(n, (e) => ei(n, e, Ze(n))), iN = (n) => Et(n, (e) => A.cursor(n.lineBlockAt(e.head).from)), aN = (n) => Et(n, (e) => A.cursor(n.lineBlockAt(e.head).to)), ob = ({ state: n, dispatch: e }) => (e(zt(n, { anchor: 0 })), !0), lb = ({ state: n, dispatch: e }) => (e(zt(n, { anchor: n.doc.length })), !0), cb = ({ state: n, dispatch: e }) => (e(zt(n, { anchor: n.selection.main.anchor, head: 0 })), !0), ub = ({ state: n, dispatch: e }) => (e(zt(n, { anchor: n.selection.main.anchor, head: n.doc.length })), !0), sN = ({ state: n, dispatch: e }) => (e(n.update({ selection: { anchor: 0, head: n.doc.length }, userEvent: "select" })), !0), rN = ({ state: n, dispatch: e }) => {
32488
+ const sb = (n) => K1(n, !1), rb = (n) => K1(n, !0), QL = (n) => Et(n, (e) => ei(n, e, !0)), eN = (n) => Et(n, (e) => ei(n, e, !1)), tN = (n) => Et(n, (e) => ei(n, e, !Ze(n))), nN = (n) => Et(n, (e) => ei(n, e, Ze(n))), iN = (n) => Et(n, (e) => A.cursor(n.lineBlockAt(e.head).from)), aN = (n) => Et(n, (e) => A.cursor(n.lineBlockAt(e.head).to)), ob = ({ state: n, dispatch: e }) => (e(zt(n, { anchor: 0 })), !0), lb = ({ state: n, dispatch: e }) => (e(zt(n, { anchor: n.doc.length })), !0), cb = ({ state: n, dispatch: e }) => (e(zt(n, { anchor: n.selection.main.anchor, head: 0 })), !0), ub = ({ state: n, dispatch: e }) => (e(zt(n, { anchor: n.selection.main.anchor, head: n.doc.length })), !0), sN = ({ state: n, dispatch: e }) => (e(n.update({ selection: { anchor: 0, head: n.doc.length }, userEvent: "select" })), !0), rN = ({ state: n, dispatch: e }) => {
32489
32489
  let t = Tl(n).map(({ from: i, to: a }) => A.range(i, Math.min(a + 1, n.doc.length)));
32490
32490
  return e(n.update({ selection: A.create(t), userEvent: "select" })), !0;
32491
32491
  }, oN = ({ state: n, dispatch: e }) => {
@@ -32504,7 +32504,7 @@ const sb = (n) => Kx(n, !1), rb = (n) => Kx(n, !0), QL = (n) => Et(n, (e) => ei(
32504
32504
  });
32505
32505
  return t.eq(n.selection) ? !1 : (e(zt(n, t)), !0);
32506
32506
  };
32507
- function Zx(n, e) {
32507
+ function Z1(n, e) {
32508
32508
  let { state: t } = n, i = t.selection, a = t.selection.ranges.slice();
32509
32509
  for (let s of t.selection.ranges) {
32510
32510
  let r = t.doc.lineAt(s.head);
@@ -32523,7 +32523,7 @@ function Zx(n, e) {
32523
32523
  }
32524
32524
  return a.length == i.ranges.length ? !1 : (n.dispatch(zt(t, A.create(a, a.length - 1))), !0);
32525
32525
  }
32526
- const lN = (n) => Zx(n, !1), cN = (n) => Zx(n, !0), uN = ({ state: n, dispatch: e }) => {
32526
+ const lN = (n) => Z1(n, !1), cN = (n) => Z1(n, !0), uN = ({ state: n, dispatch: e }) => {
32527
32527
  let t = n.selection, i = null;
32528
32528
  return t.ranges.length > 1 ? i = A.create([t.main]) : t.main.empty || (i = A.create([A.cursor(t.main.head)])), i ? (e(zt(n, i)), !0) : !1;
32529
32529
  };
@@ -32553,7 +32553,7 @@ function Ar(n, e, t) {
32553
32553
  });
32554
32554
  return e;
32555
32555
  }
32556
- const Xx = (n, e, t) => Us(n, (i) => {
32556
+ const X1 = (n, e, t) => Us(n, (i) => {
32557
32557
  let a = i.from, { state: s } = n, r = s.doc.lineAt(a), o, l;
32558
32558
  if (t && !e && a > r.from && a < r.from + 200 && !/[^ \t]/.test(o = r.text.slice(0, a - r.from))) {
32559
32559
  if (o[o.length - 1] == " ")
@@ -32565,7 +32565,7 @@ const Xx = (n, e, t) => Us(n, (i) => {
32565
32565
  } else
32566
32566
  l = Ne(r.text, a - r.from, e, e) + r.from, l == a && r.number != (e ? s.doc.lines : 1) ? l += e ? 1 : -1 : !e && /[\ufe00-\ufe0f]/.test(r.text.slice(l - r.from, a - r.from)) && (l = Ne(r.text, l - r.from, !1, !1) + r.from);
32567
32567
  return l;
32568
- }), Ed = (n) => Xx(n, !1, !0), Yx = (n) => Xx(n, !0, !1), Jx = (n, e) => Us(n, (t) => {
32568
+ }), Ed = (n) => X1(n, !1, !0), Y1 = (n) => X1(n, !0, !1), J1 = (n, e) => Us(n, (t) => {
32569
32569
  let i = t.head, { state: a } = n, s = a.doc.lineAt(i), r = a.charCategorizer(i);
32570
32570
  for (let o = null; ; ) {
32571
32571
  if (i == (e ? s.to : s.from)) {
@@ -32578,7 +32578,7 @@ const Xx = (n, e, t) => Us(n, (i) => {
32578
32578
  (c != " " || i != t.head) && (o = u), i = l;
32579
32579
  }
32580
32580
  return i;
32581
- }), Qx = (n) => Jx(n, !1), dN = (n) => Jx(n, !0), pN = (n) => Us(n, (e) => {
32581
+ }), Q1 = (n) => J1(n, !1), dN = (n) => J1(n, !0), pN = (n) => Us(n, (e) => {
32582
32582
  let t = n.lineBlockAt(e.head).to;
32583
32583
  return e.head < t ? t : Math.min(n.state.doc.length, e.head + 1);
32584
32584
  }), mN = (n) => Us(n, (e) => {
@@ -32622,7 +32622,7 @@ function Tl(n) {
32622
32622
  }
32623
32623
  return e;
32624
32624
  }
32625
- function e1(n, e, t) {
32625
+ function ex(n, e, t) {
32626
32626
  if (n.readOnly)
32627
32627
  return !1;
32628
32628
  let i = [], a = [];
@@ -32647,8 +32647,8 @@ function e1(n, e, t) {
32647
32647
  userEvent: "move.line"
32648
32648
  })), !0) : !1;
32649
32649
  }
32650
- const bN = ({ state: n, dispatch: e }) => e1(n, e, !1), yN = ({ state: n, dispatch: e }) => e1(n, e, !0);
32651
- function t1(n, e, t) {
32650
+ const bN = ({ state: n, dispatch: e }) => ex(n, e, !1), yN = ({ state: n, dispatch: e }) => ex(n, e, !0);
32651
+ function tx(n, e, t) {
32652
32652
  if (n.readOnly)
32653
32653
  return !1;
32654
32654
  let i = [];
@@ -32662,7 +32662,7 @@ function t1(n, e, t) {
32662
32662
  userEvent: "input.copyline"
32663
32663
  })), !0;
32664
32664
  }
32665
- const kN = ({ state: n, dispatch: e }) => t1(n, e, !1), wN = ({ state: n, dispatch: e }) => t1(n, e, !0), _N = (n) => {
32665
+ const kN = ({ state: n, dispatch: e }) => tx(n, e, !1), wN = ({ state: n, dispatch: e }) => tx(n, e, !0), _N = (n) => {
32666
32666
  if (n.state.readOnly)
32667
32667
  return !1;
32668
32668
  let { state: e } = n, t = e.changes(Tl(e).map(({ from: a, to: s }) => (a > 0 ? a-- : s < e.doc.length && s++, { from: a, to: s }))), i = ja(e.selection, (a) => {
@@ -32681,8 +32681,8 @@ function xN(n, e) {
32681
32681
  let t = Ue(n).resolveInner(e), i = t.childBefore(e), a = t.childAfter(e), s;
32682
32682
  return i && a && i.to <= e && a.from >= e && (s = i.type.prop(Z.closedBy)) && s.indexOf(a.name) > -1 && n.doc.lineAt(i.to).from == n.doc.lineAt(a.from).from && !/\S/.test(n.sliceDoc(i.to, a.from)) ? { from: i.to, to: a.from } : null;
32683
32683
  }
32684
- const db = /* @__PURE__ */ n1(!1), vN = /* @__PURE__ */ n1(!0);
32685
- function n1(n) {
32684
+ const db = /* @__PURE__ */ nx(!1), vN = /* @__PURE__ */ nx(!0);
32685
+ function nx(n) {
32686
32686
  return ({ state: e, dispatch: t }) => {
32687
32687
  if (e.readOnly)
32688
32688
  return !1;
@@ -32732,9 +32732,9 @@ const CN = ({ state: n, dispatch: e }) => {
32732
32732
  (c != u || o.from < s.from + c.length) && (t[s.from] = l, r.push({ from: s.from, to: s.from + c.length, insert: u }));
32733
32733
  });
32734
32734
  return a.changes.empty || e(n.update(a, { userEvent: "indent" })), !0;
32735
- }, i1 = ({ state: n, dispatch: e }) => n.readOnly ? !1 : (e(n.update(hm(n, (t, i) => {
32735
+ }, ix = ({ state: n, dispatch: e }) => n.readOnly ? !1 : (e(n.update(hm(n, (t, i) => {
32736
32736
  i.push({ from: t.from, insert: n.facet(vl) });
32737
- }), { userEvent: "input.indent" })), !0), a1 = ({ state: n, dispatch: e }) => n.readOnly ? !1 : (e(n.update(hm(n, (t, i) => {
32737
+ }), { userEvent: "input.indent" })), !0), ax = ({ state: n, dispatch: e }) => n.readOnly ? !1 : (e(n.update(hm(n, (t, i) => {
32738
32738
  let a = /^\s*/.exec(t.text)[0];
32739
32739
  if (!a)
32740
32740
  return;
@@ -32743,30 +32743,30 @@ const CN = ({ state: n, dispatch: e }) => {
32743
32743
  r++;
32744
32744
  i.push({ from: t.from + r, to: t.from + a.length, insert: o.slice(r) });
32745
32745
  }), { userEvent: "delete.dedent" })), !0), $N = (n) => (n.setTabFocusMode(), !0), SN = [
32746
- { key: "Ctrl-b", run: Dx, shift: zx, preventDefault: !0 },
32747
- { key: "Ctrl-f", run: Rx, shift: Gx },
32748
- { key: "Ctrl-p", run: Lx, shift: Hx },
32749
- { key: "Ctrl-n", run: Nx, shift: Ux },
32746
+ { key: "Ctrl-b", run: D1, shift: z1, preventDefault: !0 },
32747
+ { key: "Ctrl-f", run: R1, shift: G1 },
32748
+ { key: "Ctrl-p", run: L1, shift: H1 },
32749
+ { key: "Ctrl-n", run: N1, shift: U1 },
32750
32750
  { key: "Ctrl-a", run: WL, shift: iN },
32751
32751
  { key: "Ctrl-e", run: HL, shift: aN },
32752
- { key: "Ctrl-d", run: Yx },
32752
+ { key: "Ctrl-d", run: Y1 },
32753
32753
  { key: "Ctrl-h", run: Ed },
32754
32754
  { key: "Ctrl-k", run: pN },
32755
- { key: "Ctrl-Alt-h", run: Qx },
32755
+ { key: "Ctrl-Alt-h", run: Q1 },
32756
32756
  { key: "Ctrl-o", run: fN },
32757
32757
  { key: "Ctrl-t", run: gN },
32758
32758
  { key: "Ctrl-v", run: Td }
32759
32759
  ], AN = /* @__PURE__ */ [
32760
- { key: "ArrowLeft", run: Dx, shift: zx, preventDefault: !0 },
32760
+ { key: "ArrowLeft", run: D1, shift: z1, preventDefault: !0 },
32761
32761
  { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: OL, shift: ZL, preventDefault: !0 },
32762
32762
  { mac: "Cmd-ArrowLeft", run: GL, shift: tN, preventDefault: !0 },
32763
- { key: "ArrowRight", run: Rx, shift: Gx, preventDefault: !0 },
32763
+ { key: "ArrowRight", run: R1, shift: G1, preventDefault: !0 },
32764
32764
  { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: LL, shift: XL, preventDefault: !0 },
32765
32765
  { mac: "Cmd-ArrowRight", run: VL, shift: nN, preventDefault: !0 },
32766
- { key: "ArrowUp", run: Lx, shift: Hx, preventDefault: !0 },
32766
+ { key: "ArrowUp", run: L1, shift: H1, preventDefault: !0 },
32767
32767
  { mac: "Cmd-ArrowUp", run: ob, shift: cb },
32768
32768
  { mac: "Ctrl-ArrowUp", run: ab, shift: sb },
32769
- { key: "ArrowDown", run: Nx, shift: Ux, preventDefault: !0 },
32769
+ { key: "ArrowDown", run: N1, shift: U1, preventDefault: !0 },
32770
32770
  { mac: "Cmd-ArrowDown", run: lb, shift: ub },
32771
32771
  { mac: "Ctrl-ArrowDown", run: Td, shift: rb },
32772
32772
  { key: "PageUp", run: ab, shift: sb },
@@ -32778,8 +32778,8 @@ const CN = ({ state: n, dispatch: e }) => {
32778
32778
  { key: "Enter", run: db, shift: db },
32779
32779
  { key: "Mod-a", run: sN },
32780
32780
  { key: "Backspace", run: Ed, shift: Ed, preventDefault: !0 },
32781
- { key: "Delete", run: Yx, preventDefault: !0 },
32782
- { key: "Mod-Backspace", mac: "Alt-Backspace", run: Qx, preventDefault: !0 },
32781
+ { key: "Delete", run: Y1, preventDefault: !0 },
32782
+ { key: "Mod-Backspace", mac: "Alt-Backspace", run: Q1, preventDefault: !0 },
32783
32783
  { key: "Mod-Delete", mac: "Alt-Delete", run: dN, preventDefault: !0 },
32784
32784
  { mac: "Mod-Backspace", run: mN, preventDefault: !0 },
32785
32785
  { mac: "Mod-Delete", run: hN, preventDefault: !0 }
@@ -32796,15 +32796,15 @@ const CN = ({ state: n, dispatch: e }) => {
32796
32796
  { key: "Mod-Enter", run: vN },
32797
32797
  { key: "Alt-l", mac: "Ctrl-l", run: rN },
32798
32798
  { key: "Mod-i", run: oN, preventDefault: !0 },
32799
- { key: "Mod-[", run: a1 },
32800
- { key: "Mod-]", run: i1 },
32799
+ { key: "Mod-[", run: ax },
32800
+ { key: "Mod-]", run: ix },
32801
32801
  { key: "Mod-Alt-\\", run: CN },
32802
32802
  { key: "Shift-Mod-k", run: _N },
32803
32803
  { key: "Shift-Mod-\\", run: KL },
32804
32804
  { key: "Mod-/", run: bL },
32805
32805
  { key: "Alt-A", run: kL },
32806
32806
  { key: "Ctrl-m", mac: "Shift-Alt-m", run: $N }
32807
- ].concat(AN), TN = { key: "Tab", run: i1, shift: a1 }, pb = typeof String.prototype.normalize == "function" ? (n) => n.normalize("NFKD") : (n) => n;
32807
+ ].concat(AN), TN = { key: "Tab", run: ix, shift: ax }, pb = typeof String.prototype.normalize == "function" ? (n) => n.normalize("NFKD") : (n) => n;
32808
32808
  class ya {
32809
32809
  /**
32810
32810
  Create a text cursor. The query is the search string, `from` to
@@ -32878,16 +32878,16 @@ class ya {
32878
32878
  typeof Symbol < "u" && (ya.prototype[Symbol.iterator] = function() {
32879
32879
  return this;
32880
32880
  });
32881
- const s1 = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, fm = "gm" + (/x/.unicode == null ? "" : "u");
32882
- class r1 {
32881
+ const sx = { from: -1, to: -1, match: /* @__PURE__ */ /.*/.exec("") }, fm = "gm" + (/x/.unicode == null ? "" : "u");
32882
+ class rx {
32883
32883
  /**
32884
32884
  Create a cursor that will search the given range in the given
32885
32885
  document. `query` should be the raw pattern (as you'd pass it to
32886
32886
  `new RegExp`).
32887
32887
  */
32888
32888
  constructor(e, t, i, a = 0, s = e.length) {
32889
- if (this.text = e, this.to = s, this.curLine = "", this.done = !1, this.value = s1, /\\[sWDnr]|\n|\r|\[\^/.test(t))
32890
- return new o1(e, t, i, a, s);
32889
+ if (this.text = e, this.to = s, this.curLine = "", this.done = !1, this.value = sx, /\\[sWDnr]|\n|\r|\[\^/.test(t))
32890
+ return new ox(e, t, i, a, s);
32891
32891
  this.re = new RegExp(t, fm + (i != null && i.ignoreCase ? "i" : "")), this.test = i == null ? void 0 : i.test, this.iter = e.iter();
32892
32892
  let r = e.lineAt(a);
32893
32893
  this.curLineStart = r.from, this.matchPos = Go(e, a), this.getLine(this.curLineStart);
@@ -32937,9 +32937,9 @@ class ra {
32937
32937
  return r > t && (s = e.sliceString(t, r) + s, r = t), a.to < i && (s += e.sliceString(a.to, i)), Ic.set(e, new ra(r, s)), new ra(t, s.slice(t - r, i - r));
32938
32938
  }
32939
32939
  }
32940
- class o1 {
32940
+ class ox {
32941
32941
  constructor(e, t, i, a, s) {
32942
- this.text = e, this.to = s, this.done = !1, this.value = s1, this.matchPos = Go(e, a), this.re = new RegExp(t, fm + (i != null && i.ignoreCase ? "i" : "")), this.test = i == null ? void 0 : i.test, this.flat = ra.get(e, a, this.chunkEnd(
32942
+ this.text = e, this.to = s, this.done = !1, this.value = sx, this.matchPos = Go(e, a), this.re = new RegExp(t, fm + (i != null && i.ignoreCase ? "i" : "")), this.test = i == null ? void 0 : i.test, this.flat = ra.get(e, a, this.chunkEnd(
32943
32943
  a + 5e3
32944
32944
  /* Chunk.Base */
32945
32945
  ));
@@ -32961,7 +32961,7 @@ class o1 {
32961
32961
  }
32962
32962
  }
32963
32963
  }
32964
- typeof Symbol < "u" && (r1.prototype[Symbol.iterator] = o1.prototype[Symbol.iterator] = function() {
32964
+ typeof Symbol < "u" && (rx.prototype[Symbol.iterator] = ox.prototype[Symbol.iterator] = function() {
32965
32965
  return this;
32966
32966
  });
32967
32967
  function EN(n) {
@@ -33119,7 +33119,7 @@ const zN = ({ state: n, dispatch: e }) => {
33119
33119
  });
33120
33120
  }
33121
33121
  });
33122
- class l1 {
33122
+ class lx {
33123
33123
  /**
33124
33124
  Create a query object.
33125
33125
  */
@@ -33154,7 +33154,7 @@ class l1 {
33154
33154
  return i == null && (i = a.doc.length), this.regexp ? Vi(this, a, t, i) : Gi(this, a, t, i);
33155
33155
  }
33156
33156
  }
33157
- class c1 {
33157
+ class cx {
33158
33158
  constructor(e) {
33159
33159
  this.spec = e;
33160
33160
  }
@@ -33174,7 +33174,7 @@ function Gi(n, e, t, i) {
33174
33174
  function VN(n, e) {
33175
33175
  return (t, i, a, s) => ((s > t || s + a.length < i) && (s = Math.max(0, t - 2), a = n.sliceString(s, Math.min(n.length, i + 2))), (e(Vo(a, t - s)) != ge.Word || e(Wo(a, t - s)) != ge.Word) && (e(Wo(a, i - s)) != ge.Word || e(Vo(a, i - s)) != ge.Word));
33176
33176
  }
33177
- class WN extends c1 {
33177
+ class WN extends cx {
33178
33178
  constructor(e) {
33179
33179
  super(e);
33180
33180
  }
@@ -33227,7 +33227,7 @@ function HN(n, e, t) {
33227
33227
  }
33228
33228
  function Vi(n, e, t, i) {
33229
33229
  let a;
33230
- return n.wholeWord && (a = UN(e.charCategorizer(e.selection.main.head))), n.test && (a = HN(n.test, e, a)), new r1(e.doc, n.search, { ignoreCase: !n.caseSensitive, test: a }, t, i);
33230
+ return n.wholeWord && (a = UN(e.charCategorizer(e.selection.main.head))), n.test && (a = HN(n.test, e, a)), new rx(e.doc, n.search, { ignoreCase: !n.caseSensitive, test: a }, t, i);
33231
33231
  }
33232
33232
  function Vo(n, e) {
33233
33233
  return n.slice(Ne(n, e, !1), e);
@@ -33238,7 +33238,7 @@ function Wo(n, e) {
33238
33238
  function UN(n) {
33239
33239
  return (e, t, i) => !i[0].length || (n(Vo(i.input, i.index)) != ge.Word || n(Wo(i.input, i.index)) != ge.Word) && (n(Wo(i.input, i.index + i[0].length)) != ge.Word || n(Vo(i.input, i.index + i[0].length)) != ge.Word);
33240
33240
  }
33241
- class KN extends c1 {
33241
+ class KN extends cx {
33242
33242
  nextMatch(e, t, i) {
33243
33243
  let a = Vi(this.spec, e, i, e.doc.length).next();
33244
33244
  return a.done && (a = Vi(this.spec, e, 0, t).next()), a.done ? null : a.value;
@@ -33339,7 +33339,7 @@ const ZN = /* @__PURE__ */ G.mark({ class: "cm-searchMatch" }), XN = /* @__PURE_
33339
33339
  function Ks(n) {
33340
33340
  return (e) => {
33341
33341
  let t = e.state.field(zn, !1);
33342
- return t && t.query.spec.valid ? n(e, t) : p1(e);
33342
+ return t && t.query.spec.valid ? n(e, t) : px(e);
33343
33343
  };
33344
33344
  }
33345
33345
  const Ho = /* @__PURE__ */ Ks((n, { query: e }) => {
@@ -33351,7 +33351,7 @@ const Ho = /* @__PURE__ */ Ks((n, { query: e }) => {
33351
33351
  selection: a,
33352
33352
  effects: [ym(n, i), s.scrollToMatch(a.main, n)],
33353
33353
  userEvent: "select.search"
33354
- }), d1(n), !0;
33354
+ }), dx(n), !0;
33355
33355
  }), Uo = /* @__PURE__ */ Ks((n, { query: e }) => {
33356
33356
  let { state: t } = n, { from: i } = t.selection.main, a = e.prevMatch(t, i, i);
33357
33357
  if (!a)
@@ -33361,7 +33361,7 @@ const Ho = /* @__PURE__ */ Ks((n, { query: e }) => {
33361
33361
  selection: s,
33362
33362
  effects: [ym(n, a), r.scrollToMatch(s.main, n)],
33363
33363
  userEvent: "select.search"
33364
- }), d1(n), !0;
33364
+ }), dx(n), !0;
33365
33365
  }), JN = /* @__PURE__ */ Ks((n, { query: e }) => {
33366
33366
  let t = e.matchAll(n.state, 1e3);
33367
33367
  return !t || !t.length ? !1 : (n.dispatch({
@@ -33423,7 +33423,7 @@ function Md(n, e) {
33423
33423
  if (e && !l)
33424
33424
  return e;
33425
33425
  let c = n.facet(Ta);
33426
- return new l1({
33426
+ return new lx({
33427
33427
  search: ((t = e == null ? void 0 : e.literal) !== null && t !== void 0 ? t : c.literal) ? l : l.replace(/\n/g, "\\n"),
33428
33428
  caseSensitive: (i = e == null ? void 0 : e.caseSensitive) !== null && i !== void 0 ? i : c.caseSensitive,
33429
33429
  literal: (a = e == null ? void 0 : e.literal) !== null && a !== void 0 ? a : c.literal,
@@ -33431,18 +33431,18 @@ function Md(n, e) {
33431
33431
  wholeWord: (r = e == null ? void 0 : e.wholeWord) !== null && r !== void 0 ? r : c.wholeWord
33432
33432
  });
33433
33433
  }
33434
- function u1(n) {
33434
+ function ux(n) {
33435
33435
  let e = sm(n, bm);
33436
33436
  return e && e.dom.querySelector("[main-field]");
33437
33437
  }
33438
- function d1(n) {
33439
- let e = u1(n);
33438
+ function dx(n) {
33439
+ let e = ux(n);
33440
33440
  e && e == n.root.activeElement && e.select();
33441
33441
  }
33442
- const p1 = (n) => {
33442
+ const px = (n) => {
33443
33443
  let e = n.state.field(zn, !1);
33444
33444
  if (e && e.panel) {
33445
- let t = u1(n);
33445
+ let t = ux(n);
33446
33446
  if (t && t != n.root.activeElement) {
33447
33447
  let i = Md(n.state, e.query.spec);
33448
33448
  i.valid && n.dispatch({ effects: As.of(i) }), t.focus(), t.select();
@@ -33453,17 +33453,17 @@ const p1 = (n) => {
33453
33453
  e ? As.of(Md(n.state, e.query.spec)) : H.appendConfig.of(aI)
33454
33454
  ] });
33455
33455
  return !0;
33456
- }, m1 = (n) => {
33456
+ }, mx = (n) => {
33457
33457
  let e = n.state.field(zn, !1);
33458
33458
  if (!e || !e.panel)
33459
33459
  return !1;
33460
33460
  let t = sm(n, bm);
33461
33461
  return t && t.dom.contains(n.root.activeElement) && n.focus(), n.dispatch({ effects: gm.of(!1) }), !0;
33462
33462
  }, tI = [
33463
- { key: "Mod-f", run: p1, scope: "editor search-panel" },
33463
+ { key: "Mod-f", run: px, scope: "editor search-panel" },
33464
33464
  { key: "F3", run: Ho, shift: Uo, scope: "editor search-panel", preventDefault: !0 },
33465
33465
  { key: "Mod-g", run: Ho, shift: Uo, scope: "editor search-panel", preventDefault: !0 },
33466
- { key: "Escape", run: m1, scope: "editor search-panel" },
33466
+ { key: "Escape", run: mx, scope: "editor search-panel" },
33467
33467
  { key: "Mod-Shift-l", run: QN },
33468
33468
  { key: "Mod-Alt-g", run: MN },
33469
33469
  { key: "Mod-d", run: zN, preventDefault: !0 }
@@ -33529,14 +33529,14 @@ class nI {
33529
33529
  ],
33530
33530
  ie("button", {
33531
33531
  name: "close",
33532
- onclick: () => m1(e),
33532
+ onclick: () => mx(e),
33533
33533
  "aria-label": dt(e, "close"),
33534
33534
  type: "button"
33535
33535
  }, ["×"])
33536
33536
  ]);
33537
33537
  }
33538
33538
  commit() {
33539
- let e = new l1({
33539
+ let e = new lx({
33540
33540
  search: this.searchField.value,
33541
33541
  caseSensitive: this.caseField.checked,
33542
33542
  regexp: this.reField.checked,
@@ -33622,7 +33622,7 @@ const iI = /* @__PURE__ */ O.baseTheme({
33622
33622
  /* @__PURE__ */ Ri.low(YN),
33623
33623
  iI
33624
33624
  ];
33625
- class h1 {
33625
+ class hx {
33626
33626
  /**
33627
33627
  Create a new completion context. (Mostly useful for testing
33628
33628
  completion sources—in the editor, the extension will create
@@ -33651,7 +33651,7 @@ class h1 {
33651
33651
  cursor.
33652
33652
  */
33653
33653
  matchBefore(e) {
33654
- let t = this.state.doc.lineAt(this.pos), i = Math.max(t.from, this.pos - 250), a = t.text.slice(i - t.from, this.pos - t.from), s = a.search(f1(e, !1));
33654
+ let t = this.state.doc.lineAt(this.pos), i = Math.max(t.from, this.pos - 250), a = t.text.slice(i - t.from, this.pos - t.from), s = a.search(fx(e, !1));
33655
33655
  return s < 0 ? null : { from: i + s, to: this.pos, text: a.slice(s) };
33656
33656
  }
33657
33657
  /**
@@ -33707,12 +33707,12 @@ class gb {
33707
33707
  function $i(n) {
33708
33708
  return n.selection.main.from;
33709
33709
  }
33710
- function f1(n, e) {
33710
+ function fx(n, e) {
33711
33711
  var t;
33712
33712
  let { source: i } = n, a = e && i[0] != "^", s = i[i.length - 1] != "$";
33713
33713
  return !a && !s ? n : new RegExp(`${a ? "^" : ""}(?:${i})${s ? "$" : ""}`, (t = n.flags) !== null && t !== void 0 ? t : n.ignoreCase ? "i" : "");
33714
33714
  }
33715
- const g1 = /* @__PURE__ */ un.define();
33715
+ const gx = /* @__PURE__ */ un.define();
33716
33716
  function oI(n, e, t, i) {
33717
33717
  let { main: a } = n.selection, s = t - a.from, r = i - a.from;
33718
33718
  return {
@@ -34197,9 +34197,9 @@ function wb(n, e) {
34197
34197
  return e > -1 && (t["aria-activedescendant"] = n + "-" + e), t;
34198
34198
  }
34199
34199
  const wI = [];
34200
- function b1(n, e) {
34200
+ function bx(n, e) {
34201
34201
  if (n.isUserEvent("input.complete")) {
34202
- let i = n.annotation(g1);
34202
+ let i = n.annotation(gx);
34203
34203
  if (i && e.activateOnCompletion(i))
34204
34204
  return 12;
34205
34205
  }
@@ -34217,7 +34217,7 @@ class $t {
34217
34217
  return this.state == 1;
34218
34218
  }
34219
34219
  update(e, t) {
34220
- let i = b1(e, t), a = this;
34220
+ let i = bx(e, t), a = this;
34221
34221
  (i & 8 || i & 16 && this.touches(e)) && (a = new $t(
34222
34222
  a.source,
34223
34223
  0
@@ -34272,7 +34272,7 @@ class oa extends $t {
34272
34272
  /* State.Inactive */
34273
34273
  );
34274
34274
  let l = e.changes.mapPos(this.limit);
34275
- return _I(a.validFor, e.state, s, r) ? new oa(this.source, this.explicit, l, a, s, r) : a.update && (a = a.update(a, s, r, new h1(e.state, o, !1))) ? new oa(this.source, this.explicit, l, a, a.from, (i = a.to) !== null && i !== void 0 ? i : $i(e.state)) : new $t(this.source, 1, this.explicit);
34275
+ return _I(a.validFor, e.state, s, r) ? new oa(this.source, this.explicit, l, a, s, r) : a.update && (a = a.update(a, s, r, new hx(e.state, o, !1))) ? new oa(this.source, this.explicit, l, a, a.from, (i = a.to) !== null && i !== void 0 ? i : $i(e.state)) : new $t(this.source, 1, this.explicit);
34276
34276
  }
34277
34277
  map(e) {
34278
34278
  return e.empty ? this : (this.result.map ? this.result.map(this.result, e) : this.result) ? new oa(this.source, this.explicit, e.mapPos(this.limit), this.result, e.mapPos(this.from), e.mapPos(this.to, 1)) : new $t(
@@ -34289,7 +34289,7 @@ function _I(n, e, t, i) {
34289
34289
  if (!n)
34290
34290
  return !1;
34291
34291
  let a = e.sliceDoc(t, i);
34292
- return typeof n == "function" ? n(a, t, i, e) : f1(n, !0).test(a);
34292
+ return typeof n == "function" ? n(a, t, i, e) : fx(n, !0).test(a);
34293
34293
  }
34294
34294
  const wm = /* @__PURE__ */ H.define({
34295
34295
  map(n, e) {
@@ -34312,7 +34312,7 @@ function _m(n, e) {
34312
34312
  let i = n.state.field(it).active.find((a) => a.source == e.source);
34313
34313
  return i instanceof oa ? (typeof t == "string" ? n.dispatch({
34314
34314
  ...oI(n.state, t, i.from, i.to),
34315
- annotations: g1.of(e.completion)
34315
+ annotations: gx.of(e.completion)
34316
34316
  }) : t(n, e.completion, i.from, i.to), !0) : !1;
34317
34317
  }
34318
34318
  const xI = /* @__PURE__ */ hI(it, _m);
@@ -34353,7 +34353,7 @@ const SI = 50, AI = 1e3, jI = /* @__PURE__ */ we.fromClass(class {
34353
34353
  if (!n.selectionSet && !n.docChanged && n.startState.field(it) == e)
34354
34354
  return;
34355
34355
  let i = n.transactions.some((s) => {
34356
- let r = b1(s, t);
34356
+ let r = bx(s, t);
34357
34357
  return r & 8 || (s.selection || s.docChanged) && !(r & 3);
34358
34358
  });
34359
34359
  for (let s = 0; s < this.running.length; s++) {
@@ -34383,7 +34383,7 @@ const SI = 50, AI = 1e3, jI = /* @__PURE__ */ we.fromClass(class {
34383
34383
  this.running.length && e.open && e.open.disabled && (this.debounceAccept = setTimeout(() => this.accept(), this.view.state.facet(Le).updateSyncTime));
34384
34384
  }
34385
34385
  startQuery(n) {
34386
- let { state: e } = this.view, t = $i(e), i = new h1(e, t, n.explicit, this.view), a = new $I(n, i);
34386
+ let { state: e } = this.view, t = $i(e), i = new hx(e, t, n.explicit, this.view), a = new $I(n, i);
34387
34387
  this.running.push(a), Promise.resolve(n.source(i)).then((s) => {
34388
34388
  a.context.aborted || (a.done = s || null, this.scheduleAccept());
34389
34389
  }, (s) => {
@@ -34588,7 +34588,7 @@ const SI = 50, AI = 1e3, jI = /* @__PURE__ */ we.fromClass(class {
34588
34588
  }();
34589
34589
  xm.startSide = 1;
34590
34590
  xm.endSide = -1;
34591
- const y1 = /* @__PURE__ */ Ke.define({
34591
+ const yx = /* @__PURE__ */ Ke.define({
34592
34592
  create() {
34593
34593
  return X.empty;
34594
34594
  },
@@ -34603,16 +34603,16 @@ const y1 = /* @__PURE__ */ Ke.define({
34603
34603
  }
34604
34604
  });
34605
34605
  function PI() {
34606
- return [RI, y1];
34606
+ return [RI, yx];
34607
34607
  }
34608
34608
  const Gc = "()[]{}<>«»»«[]{}";
34609
- function k1(n) {
34609
+ function kx(n) {
34610
34610
  for (let e = 0; e < Gc.length; e += 2)
34611
34611
  if (Gc.charCodeAt(e) == n)
34612
34612
  return Gc.charAt(e + 1);
34613
34613
  return qp(n < 128 ? n : n + 1);
34614
34614
  }
34615
- function w1(n, e) {
34615
+ function wx(n, e) {
34616
34616
  return n.languageDataAt("closeBrackets", e)[0] || Ts;
34617
34617
  }
34618
34618
  const DI = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), RI = /* @__PURE__ */ O.inputHandler.of((n, e, t, i) => {
@@ -34626,11 +34626,11 @@ const DI = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navi
34626
34626
  }), BI = ({ state: n, dispatch: e }) => {
34627
34627
  if (n.readOnly)
34628
34628
  return !1;
34629
- let i = w1(n, n.selection.main.head).brackets || Ts.brackets, a = null, s = n.changeByRange((r) => {
34629
+ let i = wx(n, n.selection.main.head).brackets || Ts.brackets, a = null, s = n.changeByRange((r) => {
34630
34630
  if (r.empty) {
34631
34631
  let o = NI(n.doc, r.head);
34632
34632
  for (let l of i)
34633
- if (l == o && El(n.doc, r.head) == k1(nt(l, 0)))
34633
+ if (l == o && El(n.doc, r.head) == kx(nt(l, 0)))
34634
34634
  return {
34635
34635
  changes: { from: r.head - l.length, to: r.head + l.length },
34636
34636
  range: A.cursor(r.head - l.length)
@@ -34643,19 +34643,19 @@ const DI = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navi
34643
34643
  { key: "Backspace", run: BI }
34644
34644
  ];
34645
34645
  function LI(n, e) {
34646
- let t = w1(n, n.selection.main.head), i = t.brackets || Ts.brackets;
34646
+ let t = wx(n, n.selection.main.head), i = t.brackets || Ts.brackets;
34647
34647
  for (let a of i) {
34648
- let s = k1(nt(a, 0));
34648
+ let s = kx(nt(a, 0));
34649
34649
  if (e == a)
34650
34650
  return s == a ? qI(n, a, i.indexOf(a + a + a) > -1, t) : II(n, a, s, t.before || Ts.before);
34651
- if (e == s && _1(n, n.selection.main.from))
34651
+ if (e == s && _x(n, n.selection.main.from))
34652
34652
  return FI(n, a, s);
34653
34653
  }
34654
34654
  return null;
34655
34655
  }
34656
- function _1(n, e) {
34656
+ function _x(n, e) {
34657
34657
  let t = !1;
34658
- return n.field(y1).between(0, n.doc.length, (i) => {
34658
+ return n.field(yx).between(0, n.doc.length, (i) => {
34659
34659
  i == e && (t = !0);
34660
34660
  }), t;
34661
34661
  }
@@ -34713,7 +34713,7 @@ function qI(n, e, t, i) {
34713
34713
  effects: yi.of(l + e.length),
34714
34714
  range: A.cursor(l + e.length)
34715
34715
  };
34716
- if (_1(n, l)) {
34716
+ if (_x(n, l)) {
34717
34717
  let p = t && n.sliceDoc(l, l + e.length * 3) == e + e + e ? e + e + e : e;
34718
34718
  return {
34719
34719
  changes: { from: l, to: l + p.length, insert: p },
@@ -34786,7 +34786,7 @@ function GI(n = {}) {
34786
34786
  MI
34787
34787
  ];
34788
34788
  }
34789
- const x1 = [
34789
+ const xx = [
34790
34790
  { key: "Ctrl-Space", run: zc },
34791
34791
  { mac: "Alt-`", run: zc },
34792
34792
  { mac: "Alt-i", run: zc },
@@ -34796,7 +34796,7 @@ const x1 = [
34796
34796
  { key: "PageDown", run: /* @__PURE__ */ Er(!0, "page") },
34797
34797
  { key: "PageUp", run: /* @__PURE__ */ Er(!1, "page") },
34798
34798
  { key: "Enter", run: vI }
34799
- ], VI = /* @__PURE__ */ Ri.highest(/* @__PURE__ */ _l.computeN([Le], (n) => n.facet(Le).defaultKeymap ? [x1] : []));
34799
+ ], VI = /* @__PURE__ */ Ri.highest(/* @__PURE__ */ _l.computeN([Le], (n) => n.facet(Le).defaultKeymap ? [xx] : []));
34800
34800
  class vb {
34801
34801
  constructor(e, t, i) {
34802
34802
  this.from = e, this.to = t, this.diagnostic = i;
@@ -34887,12 +34887,12 @@ function WI(n, e) {
34887
34887
  if (a != null)
34888
34888
  return a;
34889
34889
  let s = n.startState.doc.lineAt(e.pos);
34890
- return !!(n.effects.some((r) => r.is(v1)) || n.changes.touchesRange(s.from, Math.max(s.to, i)));
34890
+ return !!(n.effects.some((r) => r.is(vx)) || n.changes.touchesRange(s.from, Math.max(s.to, i)));
34891
34891
  }
34892
34892
  function HI(n, e) {
34893
34893
  return n.field(ft, !1) ? e : e.concat(H.appendConfig.of(aF));
34894
34894
  }
34895
- const v1 = /* @__PURE__ */ H.define(), vm = /* @__PURE__ */ H.define(), C1 = /* @__PURE__ */ H.define(), ft = /* @__PURE__ */ Ke.define({
34895
+ const vx = /* @__PURE__ */ H.define(), vm = /* @__PURE__ */ H.define(), Cx = /* @__PURE__ */ H.define(), ft = /* @__PURE__ */ Ke.define({
34896
34896
  create() {
34897
34897
  return new di(G.none, null, null);
34898
34898
  },
@@ -34906,10 +34906,10 @@ const v1 = /* @__PURE__ */ H.define(), vm = /* @__PURE__ */ H.define(), C1 = /*
34906
34906
  !t.size && a && e.state.facet(Es).autoPanel && (a = null), n = new di(t, a, i);
34907
34907
  }
34908
34908
  for (let t of e.effects)
34909
- if (t.is(v1)) {
34909
+ if (t.is(vx)) {
34910
34910
  let i = e.state.facet(Es).autoPanel ? t.value.length ? Ms.open : null : n.panel;
34911
34911
  n = di.init(t.value, i, e.state);
34912
- } else t.is(vm) ? n = new di(n.diagnostics, t.value ? Ms.open : null, n.selected) : t.is(C1) && (n = new di(n.diagnostics, n.panel, t.value));
34912
+ } else t.is(vm) ? n = new di(n.diagnostics, t.value ? Ms.open : null, n.selected) : t.is(Cx) && (n = new di(n.diagnostics, n.panel, t.value));
34913
34913
  return n;
34914
34914
  },
34915
34915
  provide: (n) => [
@@ -34934,7 +34934,7 @@ function KI(n, e, t) {
34934
34934
  } : null;
34935
34935
  }
34936
34936
  function ZI(n, e) {
34937
- return ie("ul", { class: "cm-tooltip-lint" }, e.map((t) => S1(n, t, !1)));
34937
+ return ie("ul", { class: "cm-tooltip-lint" }, e.map((t) => Sx(n, t, !1)));
34938
34938
  }
34939
34939
  const XI = (n) => {
34940
34940
  let e = n.state.field(ft, !1);
@@ -34977,7 +34977,7 @@ const XI = (n) => {
34977
34977
  function $b(n, e) {
34978
34978
  return n ? e ? (t, i) => e(n(t, i), i) : n : e;
34979
34979
  }
34980
- function $1(n) {
34980
+ function $x(n) {
34981
34981
  let e = [];
34982
34982
  if (n)
34983
34983
  e: for (let { name: t } of n) {
@@ -34992,9 +34992,9 @@ function $1(n) {
34992
34992
  }
34993
34993
  return e;
34994
34994
  }
34995
- function S1(n, e, t) {
34995
+ function Sx(n, e, t) {
34996
34996
  var i;
34997
- let a = t ? $1(e.actions) : [];
34997
+ let a = t ? $x(e.actions) : [];
34998
34998
  return ie("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, ie("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage(n) : e.message), (i = e.actions) === null || i === void 0 ? void 0 : i.map((s, r) => {
34999
34999
  let o = !1, l = (m) => {
35000
35000
  if (m.preventDefault(), o)
@@ -35029,7 +35029,7 @@ class QI extends pn {
35029
35029
  }
35030
35030
  class Sb {
35031
35031
  constructor(e, t) {
35032
- this.diagnostic = t, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = S1(e, t, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
35032
+ this.diagnostic = t, this.id = "item_" + Math.floor(Math.random() * 4294967295).toString(16), this.dom = Sx(e, t, !0), this.dom.id = this.id, this.dom.setAttribute("role", "option");
35033
35033
  }
35034
35034
  }
35035
35035
  class Ms {
@@ -35050,7 +35050,7 @@ class Ms {
35050
35050
  else if (a.keyCode == 13)
35051
35051
  this.view.focus();
35052
35052
  else if (a.keyCode >= 65 && a.keyCode <= 90 && this.selectedIndex >= 0) {
35053
- let { diagnostic: s } = this.items[this.selectedIndex], r = $1(s.actions);
35053
+ let { diagnostic: s } = this.items[this.selectedIndex], r = $x(s.actions);
35054
35054
  for (let o = 0; o < r.length; o++)
35055
35055
  if (r[o].toUpperCase().charCodeAt(0) == a.keyCode) {
35056
35056
  let l = Jn(this.view.state.field(ft).diagnostics, s);
@@ -35140,7 +35140,7 @@ class Ms {
35140
35140
  i && this.view.dispatch({
35141
35141
  selection: { anchor: i.from, head: i.to },
35142
35142
  scrollIntoView: !0,
35143
- effects: C1.of(i)
35143
+ effects: Cx.of(i)
35144
35144
  });
35145
35145
  }
35146
35146
  static open(e) {
@@ -35277,9 +35277,9 @@ var Ab = function(e) {
35277
35277
  var {
35278
35278
  crosshairCursor: t = !1
35279
35279
  } = e, i = [];
35280
- e.closeBracketsKeymap !== !1 && (i = i.concat(OI)), e.defaultKeymap !== !1 && (i = i.concat(jN)), e.searchKeymap !== !1 && (i = i.concat(tI)), e.historyKeymap !== !1 && (i = i.concat(BL)), e.foldKeymap !== !1 && (i = i.concat(ZO)), e.completionKeymap !== !1 && (i = i.concat(x1)), e.lintKeymap !== !1 && (i = i.concat(JI));
35280
+ e.closeBracketsKeymap !== !1 && (i = i.concat(OI)), e.defaultKeymap !== !1 && (i = i.concat(jN)), e.searchKeymap !== !1 && (i = i.concat(tI)), e.historyKeymap !== !1 && (i = i.concat(BL)), e.foldKeymap !== !1 && (i = i.concat(ZO)), e.completionKeymap !== !1 && (i = i.concat(xx)), e.lintKeymap !== !1 && (i = i.concat(JI));
35281
35281
  var a = [];
35282
- return e.lineNumbers !== !1 && a.push(rO()), e.highlightActiveLineGutter !== !1 && a.push(cO()), e.highlightSpecialChars !== !1 && a.push(x6()), e.history !== !1 && a.push(SL()), e.foldGutter !== !1 && a.push(QO()), e.drawSelection !== !1 && a.push(d6()), e.dropCursor !== !1 && a.push(g6()), e.allowMultipleSelections !== !1 && a.push(Y.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && a.push(IO()), e.syntaxHighlighting !== !1 && a.push(xx(iL, {
35282
+ return e.lineNumbers !== !1 && a.push(rO()), e.highlightActiveLineGutter !== !1 && a.push(cO()), e.highlightSpecialChars !== !1 && a.push(x6()), e.history !== !1 && a.push(SL()), e.foldGutter !== !1 && a.push(QO()), e.drawSelection !== !1 && a.push(d6()), e.dropCursor !== !1 && a.push(g6()), e.allowMultipleSelections !== !1 && a.push(Y.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && a.push(IO()), e.syntaxHighlighting !== !1 && a.push(x1(iL, {
35283
35283
  fallback: !0
35284
35284
  })), e.bracketMatching !== !1 && a.push(uL()), e.closeBrackets !== !1 && a.push(PI()), e.autocompletion !== !1 && a.push(GI()), e.rectangularSelection !== !1 && a.push(O6()), t !== !1 && a.push(I6()), e.highlightActiveLine !== !1 && a.push(j6()), e.highlightSelectionMatches !== !1 && a.push(RN()), e.tabSize && typeof e.tabSize == "number" && a.push(vl.of(" ".repeat(e.tabSize))), a.concat([_l.of(i.flat())]).filter(Boolean);
35285
35285
  };
@@ -35406,7 +35406,7 @@ const sF = "#e5c07b", jb = "#e06c75", rF = "#56b6c2", oF = "#ffffff", Yr = "#abb
35406
35406
  tag: S.invalid,
35407
35407
  color: oF
35408
35408
  }
35409
- ]), fF = [mF, /* @__PURE__ */ xx(hF)];
35409
+ ]), fF = [mF, /* @__PURE__ */ x1(hF)];
35410
35410
  var gF = O.theme({
35411
35411
  "&": {
35412
35412
  backgroundColor: "#fff"
@@ -35618,7 +35618,7 @@ function vF(n) {
35618
35618
  setContainer: T
35619
35619
  };
35620
35620
  }
35621
- var CF = ["className", "value", "selection", "extensions", "onChange", "onStatistics", "onCreateEditor", "onUpdate", "autoFocus", "theme", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "basicSetup", "placeholder", "indentWithTab", "editable", "readOnly", "root", "initialState"], A1 = /* @__PURE__ */ Ds((n, e) => {
35621
+ var CF = ["className", "value", "selection", "extensions", "onChange", "onStatistics", "onCreateEditor", "onUpdate", "autoFocus", "theme", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "basicSetup", "placeholder", "indentWithTab", "editable", "readOnly", "root", "initialState"], Ax = /* @__PURE__ */ Ds((n, e) => {
35622
35622
  var {
35623
35623
  className: t,
35624
35624
  value: i = "",
@@ -35672,7 +35672,7 @@ var CF = ["className", "value", "selection", "extensions", "onChange", "onStatis
35672
35672
  extensions: s,
35673
35673
  initialState: T
35674
35674
  });
35675
- B1(e, () => ({
35675
+ Bx(e, () => ({
35676
35676
  editor: v.current,
35677
35677
  state: D,
35678
35678
  view: M
@@ -35688,7 +35688,7 @@ var CF = ["className", "value", "selection", "extensions", "onChange", "onStatis
35688
35688
  className: "" + J + (t ? " " + t : "")
35689
35689
  }, E));
35690
35690
  });
35691
- A1.displayName = "CodeMirror";
35691
+ Ax.displayName = "CodeMirror";
35692
35692
  var Bb = {};
35693
35693
  class Xo {
35694
35694
  /**
@@ -36680,7 +36680,7 @@ class PF {
36680
36680
  return !this.disabled || this.disabled[e] == 0;
36681
36681
  }
36682
36682
  }
36683
- class Jo extends rx {
36683
+ class Jo extends r1 {
36684
36684
  /**
36685
36685
  @internal
36686
36686
  */
@@ -36720,7 +36720,7 @@ class Jo extends rx {
36720
36720
  top: i.indexOf(l) > -1,
36721
36721
  error: l == 0,
36722
36722
  skipped: e.skippedNodes && e.skippedNodes.indexOf(l) > -1
36723
- }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = nx;
36723
+ }))), e.propSources && (this.nodeSet = this.nodeSet.extend(...e.propSources)), this.strict = !1, this.bufferLength = n1;
36724
36724
  let r = Pr(e.tokenData);
36725
36725
  this.context = e.context, this.specializerSpecs = e.specialized || [], this.specialized = new Uint16Array(this.specializerSpecs.length);
36726
36726
  for (let o = 0; o < this.specializerSpecs.length; o++)
@@ -36950,7 +36950,7 @@ function qb(n) {
36950
36950
  }
36951
36951
  return n.get;
36952
36952
  }
36953
- const RF = ox({
36953
+ const RF = o1({
36954
36954
  String: S.string,
36955
36955
  Number: S.number,
36956
36956
  "True False": S.bool,
@@ -36982,11 +36982,11 @@ const RF = ox({
36982
36982
  name: "json",
36983
36983
  parser: /* @__PURE__ */ BF.configure({
36984
36984
  props: [
36985
- /* @__PURE__ */ dx.add({
36985
+ /* @__PURE__ */ d1.add({
36986
36986
  Object: /* @__PURE__ */ Yg({ except: /^\s*\}/ }),
36987
36987
  Array: /* @__PURE__ */ Yg({ except: /^\s*\]/ })
36988
36988
  }),
36989
- /* @__PURE__ */ mx.add({
36989
+ /* @__PURE__ */ m1.add({
36990
36990
  "Object Array": qO
36991
36991
  })
36992
36992
  ]
@@ -37105,7 +37105,7 @@ const qF = "_promptCodeEditor_aoopo_16", zF = "_promptCodeEditor_headerContainer
37105
37105
  "Modifica la configuración sin tocar el código..."
37106
37106
  ],
37107
37107
  [e]
37108
- ), [l, c] = P1.useState(0);
37108
+ ), [l, c] = Px.useState(0);
37109
37109
  return ve(() => {
37110
37110
  if (n != null && n.trim() || i || a) return;
37111
37111
  const u = setInterval(() => {
@@ -37265,7 +37265,7 @@ const qF = "_promptCodeEditor_aoopo_16", zF = "_promptCodeEditor_headerContainer
37265
37265
  /* @__PURE__ */ B("div", { className: de.promptCodeEditor_codeContainer, children: [
37266
37266
  r && /* @__PURE__ */ _("label", { className: de.codeBlockLabel, children: r }),
37267
37267
  /* @__PURE__ */ _(
37268
- A1,
37268
+ Ax,
37269
37269
  {
37270
37270
  value: c,
37271
37271
  className: de.promptCodeEditor_codeBlock,