@oomol-lab/open-flow 0.1.0-alpha.9 → 0.1.0-beta.10

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.
Files changed (74) hide show
  1. package/README.md +5 -1
  2. package/dist/browser/DesignerIcon-DjgOMYI5.js +2065 -0
  3. package/dist/browser/createResourceDialog-DNBueSYZ.js +505 -0
  4. package/dist/browser/{dist-n9WmBm5w.js → dist-BKuSVKCC.js} +1 -1
  5. package/dist/browser/dist-BMRLCebL.js +1893 -0
  6. package/dist/browser/{dist-DWzdGVm9.js → dist-By46o5UV.js} +74 -74
  7. package/dist/browser/dist-CP0883sY.js +4 -0
  8. package/dist/browser/{dist-B0Q2Mn0n.js → dist-Cc0y2Pli.js} +809 -810
  9. package/dist/browser/dist-CeSZ2xSM.js +444 -0
  10. package/dist/browser/{dist-Bc9TvHYl.js → dist-Dg_VXC8f.js} +134 -135
  11. package/dist/browser/{dist-DhsGR_K3.js → dist-DmuE3M0R.js} +47 -48
  12. package/dist/browser/{dist-D5mdziGP.js → dist-DpDLsYtO.js} +18 -19
  13. package/dist/browser/dist-DxahK_I8.js +2688 -0
  14. package/dist/browser/{dist-DXgEYMFx.js → dist-meg_oHVR.js} +230 -230
  15. package/dist/browser/{esm-YIGXG-Js.js → esm-yhVU_KbQ.js} +14 -15
  16. package/dist/browser/flow-authoring-module.d.ts +2 -2
  17. package/dist/browser/flow-authoring-node.d.ts +9 -4
  18. package/dist/browser/flow-authoring.d.ts +2 -1
  19. package/dist/browser/flow-authoring.js +752 -162
  20. package/dist/browser/flow-change.d.ts +122 -13
  21. package/dist/browser/flow-change.js +326 -96
  22. package/dist/browser/flow-notifications.d.ts +5 -0
  23. package/dist/browser/flowChanges-B2ttnaj9.js +12265 -0
  24. package/dist/browser/{flowRunInputEditorStore-DXOyyY7o.js → flowRunInputEditorStore-DDidwd8h.js} +1528 -783
  25. package/dist/browser/{flowWorkspace-D7-rBA1-.js → flowWorkspace-Dr8-Hut9.js} +42428 -42499
  26. package/dist/browser/getPseudoElementBounds-5LArT6Xc.js +7147 -0
  27. package/dist/browser/icons-KIOgjHpD.js +730 -0
  28. package/dist/browser/languages-DgJehE1g.js +62 -0
  29. package/dist/browser/lib-C5Ipyfps.js +7856 -0
  30. package/dist/browser/licenses.md +119 -1
  31. package/dist/browser/main-DmjVyuWr.js +76 -0
  32. package/dist/browser/{markdownContent-ColGUxHy.js → markdownContent-DUfLdnUt.js} +4811 -4795
  33. package/dist/browser/theme.css +63 -0
  34. package/dist/browser/theme.css.d.ts +1 -0
  35. package/dist/browser/typeScriptSession-_TgJ_7Oq.js +2578 -0
  36. package/dist/browser/waitNotificationInputs-BPulOxYt.js +26 -0
  37. package/dist/browser/workbench-contract.d.ts +2 -1
  38. package/dist/browser/workbench.css +1 -1
  39. package/dist/browser/workbench.d.ts +47 -1
  40. package/dist/browser/workbench.js +1524 -1768
  41. package/dist/browser/workbenchSelect-CbXrdwxW.js +1375 -0
  42. package/dist/common/connector-action.d.ts +6 -0
  43. package/dist/common/connector-action.js +37 -29
  44. package/dist/common/control-api-conformance.d.ts +1 -0
  45. package/dist/common/control-api-conformance.js +171 -51
  46. package/dist/common/control-api-errors.d.ts +28 -0
  47. package/dist/common/control-api.d.ts +80 -21
  48. package/dist/common/control-api.js +311 -131
  49. package/dist/common/flow-encoding.d.ts +2 -2
  50. package/dist/common/flow-encoding.js +28 -9
  51. package/dist/common/flow-notifications.d.ts +5 -0
  52. package/dist/common/flow-semantics.d.ts +4 -0
  53. package/dist/common/flow-semantics.js +3544 -1098
  54. package/dist/common/integration-trigger.d.ts +1 -0
  55. package/dist/common/licenses.md +1 -25
  56. package/dist/common/localization.d.ts +21 -0
  57. package/dist/common/localization.js +62 -0
  58. package/dist/common/provider-triggers.js +4 -1
  59. package/dist/common/run-events.js +2 -1
  60. package/dist/common/run-lifecycle.d.ts +17 -2
  61. package/dist/common/run-lifecycle.js +53 -2
  62. package/dist/common/runtime-contract.d.ts +1 -1
  63. package/dist/common/runtime-contract.js +27 -0
  64. package/dist/common/scheduler.d.ts +68 -7
  65. package/dist/common/scheduler.js +528 -240
  66. package/dist/index.d.ts +2 -1
  67. package/package.json +10 -1
  68. package/dist/browser/addNodeOptions-DRndy4EK.js +0 -6910
  69. package/dist/browser/createLucideIcon-CqjqCezK.js +0 -5537
  70. package/dist/browser/createResourceDialog-A64dDFCG.js +0 -467
  71. package/dist/browser/dist-CUkceEvN.js +0 -1620
  72. package/dist/browser/dist-CVtP-E2c.js +0 -1543
  73. package/dist/browser/dist-DQVavPcf.js +0 -2328
  74. package/dist/browser/field-CKGQHCIi.js +0 -312
@@ -1,19 +1,19 @@
1
- import { _ as e, a as t, c as n, f as r, g as i, h as a, i as o, l as s, m as c, p as l, s as u, t as d, u as f, v as p, w as m, y as h } from "./dist-Mecbzdl2.js";
2
- import { E as g, a as _, n as v, o as y, p as b, r as x, t as S, x as C, y as ee } from "./dist-n9WmBm5w.js";
3
- import { E as te, j as w } from "./dist-CUkceEvN.js";
1
+ import { E as e, M as t } from "./dist-DxahK_I8.js";
2
+ import { _ as n, a as r, c as i, f as a, g as o, h as s, i as c, l, m as u, p as d, s as f, t as p, u as m, v as h, w as g, y as _ } from "./dist-Mecbzdl2.js";
3
+ import { D as v, S as y, a as b, b as x, m as S, n as ee, o as te, r as C, t as w } from "./dist-BKuSVKCC.js";
4
4
  //#region ../../node_modules/.bun/@codemirror+autocomplete@6.20.3/node_modules/@codemirror/autocomplete/dist/index.js
5
5
  var T = class {
6
6
  constructor(e, t, n, r) {
7
7
  this.state = e, this.pos = t, this.explicit = n, this.view = r, this.abortListeners = [], this.abortOnDocChange = !1;
8
8
  }
9
9
  tokenBefore(e) {
10
- let t = w(this.state).resolveInner(this.pos, -1);
11
- for (; t && e.indexOf(t.name) < 0;) t = t.parent;
12
- return t ? {
13
- from: t.from,
10
+ let n = t(this.state).resolveInner(this.pos, -1);
11
+ for (; n && e.indexOf(n.name) < 0;) n = n.parent;
12
+ return n ? {
13
+ from: n.from,
14
14
  to: this.pos,
15
- text: this.state.sliceDoc(t.from, this.pos),
16
- type: t.type
15
+ text: this.state.sliceDoc(n.from, this.pos),
16
+ type: n.type
17
17
  } : null;
18
18
  }
19
19
  matchBefore(e) {
@@ -31,21 +31,21 @@ var T = class {
31
31
  e == "abort" && this.abortListeners && (this.abortListeners.push(t), n && n.onDocChange && (this.abortOnDocChange = !0));
32
32
  }
33
33
  };
34
- function ne(e) {
34
+ function E(e) {
35
35
  let t = Object.keys(e).join(""), n = /\w/.test(t);
36
36
  return n && (t = t.replace(/\w/g, "")), `[${n ? "\\w" : ""}${t.replace(/[^\w\s]/g, "\\$&")}]`;
37
37
  }
38
- function re(e) {
38
+ function ne(e) {
39
39
  let t = Object.create(null), n = Object.create(null);
40
40
  for (let { label: r } of e) {
41
41
  t[r[0]] = !0;
42
42
  for (let e = 1; e < r.length; e++) n[r[e]] = !0;
43
43
  }
44
- let r = ne(t) + ne(n) + "*$";
44
+ let r = E(t) + E(n) + "*$";
45
45
  return [RegExp("^" + r), new RegExp(r)];
46
46
  }
47
- function ie(e) {
48
- let t = e.map((e) => typeof e == "string" ? { label: e } : e), [n, r] = t.every((e) => /^\w+$/.test(e.label)) ? [/\w*$/, /\w+$/] : re(t);
47
+ function re(e) {
48
+ let t = e.map((e) => typeof e == "string" ? { label: e } : e), [n, r] = t.every((e) => /^\w+$/.test(e.label)) ? [/\w*$/, /\w+$/] : ne(t);
49
49
  return (e) => {
50
50
  let i = e.matchBefore(r);
51
51
  return i || e.explicit ? {
@@ -55,16 +55,16 @@ function ie(e) {
55
55
  } : null;
56
56
  };
57
57
  }
58
- function ae(e, t) {
59
- return (n) => {
60
- for (let t = w(n.state).resolveInner(n.pos, -1); t; t = t.parent) {
61
- if (e.indexOf(t.name) > -1) return null;
62
- if (t.type.isTop) break;
58
+ function ie(e, n) {
59
+ return (r) => {
60
+ for (let n = t(r.state).resolveInner(r.pos, -1); n; n = n.parent) {
61
+ if (e.indexOf(n.name) > -1) return null;
62
+ if (n.type.isTop) break;
63
63
  }
64
- return t(n);
64
+ return n(r);
65
65
  };
66
66
  }
67
- var E = class {
67
+ var ae = class {
68
68
  constructor(e, t, n, r) {
69
69
  this.completion = e, this.source = t, this.match = n, this.score = r;
70
70
  }
@@ -76,20 +76,20 @@ function O(e, t) {
76
76
  let { source: n } = e, r = t && n[0] != "^", i = n[n.length - 1] != "$";
77
77
  return !r && !i ? e : RegExp(`${r ? "^" : ""}(?:${n})${i ? "$" : ""}`, e.flags ?? (e.ignoreCase ? "i" : ""));
78
78
  }
79
- var k = /*@__PURE__*/ d.define();
80
- function oe(e, n, r, i) {
81
- let { main: a } = e.selection, o = r - a.from, s = i - a.from;
79
+ var k = /*@__PURE__*/ p.define();
80
+ function oe(e, t, n, i) {
81
+ let { main: a } = e.selection, o = n - a.from, s = i - a.from;
82
82
  return {
83
83
  ...e.changeByRange((c) => {
84
- if (c != a && r != i && e.sliceDoc(c.from + o, c.from + s) != e.sliceDoc(r, i)) return { range: c };
85
- let l = e.toText(n);
84
+ if (c != a && n != i && e.sliceDoc(c.from + o, c.from + s) != e.sliceDoc(n, i)) return { range: c };
85
+ let l = e.toText(t);
86
86
  return {
87
87
  changes: {
88
88
  from: c.from + o,
89
89
  to: i == a.from ? c.to : c.from + s,
90
90
  insert: l
91
91
  },
92
- range: t.cursor(c.from + o + l.length)
92
+ range: r.cursor(c.from + o + l.length)
93
93
  };
94
94
  }),
95
95
  scrollIntoView: !0,
@@ -100,60 +100,60 @@ var se = /*@__PURE__*/ new WeakMap();
100
100
  function ce(e) {
101
101
  if (!Array.isArray(e)) return e;
102
102
  let t = se.get(e);
103
- return t || se.set(e, t = ie(e)), t;
103
+ return t || se.set(e, t = re(e)), t;
104
104
  }
105
- var A = /*@__PURE__*/ l.define(), j = /*@__PURE__*/ l.define(), le = class {
106
- constructor(t) {
107
- this.pattern = t, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
108
- for (let n = 0; n < t.length;) {
109
- let r = e(t, n), i = p(r);
105
+ var A = /*@__PURE__*/ d.define(), j = /*@__PURE__*/ d.define(), le = class {
106
+ constructor(e) {
107
+ this.pattern = e, this.chars = [], this.folded = [], this.any = [], this.precise = [], this.byWord = [], this.score = 0, this.matched = [];
108
+ for (let t = 0; t < e.length;) {
109
+ let r = n(e, t), i = h(r);
110
110
  this.chars.push(r);
111
- let a = t.slice(n, n + i), o = a.toUpperCase();
112
- this.folded.push(e(o == a ? a.toLowerCase() : o, 0)), n += i;
111
+ let a = e.slice(t, t + i), o = a.toUpperCase();
112
+ this.folded.push(n(o == a ? a.toLowerCase() : o, 0)), t += i;
113
113
  }
114
- this.astral = t.length != this.chars.length;
114
+ this.astral = e.length != this.chars.length;
115
115
  }
116
116
  ret(e, t) {
117
117
  return this.score = e, this.matched = t, this;
118
118
  }
119
- match(t) {
119
+ match(e) {
120
120
  if (this.pattern.length == 0) return this.ret(-100, []);
121
- if (t.length < this.pattern.length) return null;
122
- let { chars: n, folded: r, any: i, precise: a, byWord: o } = this;
123
- if (n.length == 1) {
124
- let i = e(t, 0), a = p(i), o = a == t.length ? 0 : -100;
125
- if (i != n[0]) {
121
+ if (e.length < this.pattern.length) return null;
122
+ let { chars: t, folded: r, any: i, precise: a, byWord: o } = this;
123
+ if (t.length == 1) {
124
+ let i = n(e, 0), a = h(i), o = a == e.length ? 0 : -100;
125
+ if (i != t[0]) {
126
126
  if (i == r[0]) o += -200;
127
127
  else return null;
128
128
  }
129
129
  return this.ret(o, [0, a]);
130
130
  }
131
- let s = t.indexOf(this.pattern);
132
- if (s == 0) return this.ret(t.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
133
- let c = n.length, l = 0;
131
+ let s = e.indexOf(this.pattern);
132
+ if (s == 0) return this.ret(e.length == this.pattern.length ? 0 : -100, [0, this.pattern.length]);
133
+ let c = t.length, l = 0;
134
134
  if (s < 0) {
135
- for (let a = 0, o = Math.min(t.length, 200); a < o && l < c;) {
136
- let o = e(t, a);
137
- (o == n[l] || o == r[l]) && (i[l++] = a), a += p(o);
135
+ for (let a = 0, o = Math.min(e.length, 200); a < o && l < c;) {
136
+ let o = n(e, a);
137
+ (o == t[l] || o == r[l]) && (i[l++] = a), a += h(o);
138
138
  }
139
139
  if (l < c) return null;
140
140
  }
141
- let u = 0, d = 0, f = !1, h = 0, g = -1, _ = -1, v = /[a-z]/.test(t), y = !0;
142
- for (let i = 0, l = Math.min(t.length, 200), b = 0; i < l && d < c;) {
143
- let l = e(t, i);
144
- s < 0 && (u < c && l == n[u] && (a[u++] = i), h < c && (l == n[h] || l == r[h] ? (h == 0 && (g = i), _ = i + 1, h++) : h = 0));
145
- let x, S = l < 255 ? l >= 48 && l <= 57 || l >= 97 && l <= 122 ? 2 : +(l >= 65 && l <= 90) : (x = m(l)) == x.toLowerCase() ? x == x.toUpperCase() ? 0 : 2 : 1;
146
- (!i || S == 1 && v || b == 0 && S != 0) && (n[d] == l || r[d] == l && (f = !0) ? o[d++] = i : o.length && (y = !1)), b = S, i += p(l);
141
+ let u = 0, d = 0, f = !1, p = 0, m = -1, _ = -1, v = /[a-z]/.test(e), y = !0;
142
+ for (let i = 0, l = Math.min(e.length, 200), b = 0; i < l && d < c;) {
143
+ let l = n(e, i);
144
+ s < 0 && (u < c && l == t[u] && (a[u++] = i), p < c && (l == t[p] || l == r[p] ? (p == 0 && (m = i), _ = i + 1, p++) : p = 0));
145
+ let x, S = l < 255 ? l >= 48 && l <= 57 || l >= 97 && l <= 122 ? 2 : +(l >= 65 && l <= 90) : (x = g(l)) == x.toLowerCase() ? x == x.toUpperCase() ? 0 : 2 : 1;
146
+ (!i || S == 1 && v || b == 0 && S != 0) && (t[d] == l || r[d] == l && (f = !0) ? o[d++] = i : o.length && (y = !1)), b = S, i += h(l);
147
147
  }
148
- return d == c && o[0] == 0 && y ? this.result(-100 + (f ? -200 : 0), o, t) : h == c && g == 0 ? this.ret(-200 - t.length + (_ == t.length ? 0 : -100), [0, _]) : s > -1 ? this.ret(-700 - t.length, [s, s + this.pattern.length]) : h == c ? this.ret(-900 - t.length, [g, _]) : d == c ? this.result(-100 + (f ? -200 : 0) + -700 + (y ? 0 : -1100), o, t) : n.length == 2 ? null : this.result((i[0] ? -700 : 0) + -200 + -1100, i, t);
148
+ return d == c && o[0] == 0 && y ? this.result(-100 + (f ? -200 : 0), o, e) : p == c && m == 0 ? this.ret(-200 - e.length + (_ == e.length ? 0 : -100), [0, _]) : s > -1 ? this.ret(-700 - e.length, [s, s + this.pattern.length]) : p == c ? this.ret(-900 - e.length, [m, _]) : d == c ? this.result(-100 + (f ? -200 : 0) + -700 + (y ? 0 : -1100), o, e) : t.length == 2 ? null : this.result((i[0] ? -700 : 0) + -200 + -1100, i, e);
149
149
  }
150
- result(t, n, r) {
150
+ result(e, t, r) {
151
151
  let i = [], a = 0;
152
- for (let t of n) {
153
- let n = t + (this.astral ? p(e(r, t)) : 1);
154
- a && i[a - 1] == t ? i[a - 1] = n : (i[a++] = t, i[a++] = n);
152
+ for (let e of t) {
153
+ let t = e + (this.astral ? h(n(r, e)) : 1);
154
+ a && i[a - 1] == e ? i[a - 1] = t : (i[a++] = e, i[a++] = t);
155
155
  }
156
- return this.ret(t - r.length, i);
156
+ return this.ret(e - r.length, i);
157
157
  }
158
158
  }, ue = class {
159
159
  constructor(e) {
@@ -164,8 +164,8 @@ var A = /*@__PURE__*/ l.define(), j = /*@__PURE__*/ l.define(), le = class {
164
164
  let t = e.slice(0, this.pattern.length), n = t == this.pattern ? 0 : t.toLowerCase() == this.folded ? -200 : null;
165
165
  return n == null ? null : (this.matched = [0, t.length], this.score = n + (e.length == this.pattern.length ? 0 : -100), this);
166
166
  }
167
- }, M = /*@__PURE__*/ u.define({ combine(e) {
168
- return h(e, {
167
+ }, M = /*@__PURE__*/ f.define({ combine(e) {
168
+ return _(e, {
169
169
  activateOnTyping: !0,
170
170
  activateOnCompletion: () => !1,
171
171
  activateOnTypingDelay: 100,
@@ -198,7 +198,7 @@ function N(e, t) {
198
198
  return e ? t ? e + " " + t : e : t;
199
199
  }
200
200
  function de(e, t, n, r, i, a) {
201
- let o = e.textDirection == v.RTL, s = o, c = !1, l = "top", u, d, f = t.left - i.left, p = i.right - t.right, m = r.right - r.left, h = r.bottom - r.top;
201
+ let o = e.textDirection == ee.RTL, s = o, c = !1, l = "top", u, d, f = t.left - i.left, p = i.right - t.right, m = r.right - r.left, h = r.bottom - r.top;
202
202
  if (s && f < Math.min(m, p) ? s = !1 : !s && p < Math.min(m, f) && (s = !0), m <= (s ? f : p)) u = Math.max(i.top, Math.min(n.top, i.bottom - h)) - t.top, d = Math.min(400, s ? f : p);
203
203
  else {
204
204
  c = !0, d = Math.min(400, (o ? t.right : i.right - t.left) - 30);
@@ -211,7 +211,7 @@ function de(e, t, n, r, i, a) {
211
211
  class: "cm-completionInfo-" + (c ? o ? "left-narrow" : "right-narrow" : s ? "left" : "right")
212
212
  };
213
213
  }
214
- var P = /*@__PURE__*/ l.define();
214
+ var P = /*@__PURE__*/ d.define();
215
215
  function fe(e) {
216
216
  let t = e.addToOptions.slice();
217
217
  return e.icons && t.push({
@@ -322,7 +322,7 @@ var pe = class {
322
322
  if (!a) return;
323
323
  "then" in a ? a.then((t) => {
324
324
  t && this.view.state.field(this.stateField, !1) == e && this.addInfoPane(t, r);
325
- }).catch((e) => C(this.view.state, e, "completion info")) : (this.addInfoPane(a, r), n.setAttribute("aria-describedby", this.info.id));
325
+ }).catch((e) => y(this.view.state, e, "completion info")) : (this.addInfoPane(a, r), n.setAttribute("aria-describedby", this.info.id));
326
326
  }
327
327
  }
328
328
  addInfoPane(e, t) {
@@ -416,12 +416,12 @@ function ge(e, t) {
416
416
  }, o = t.facet(M);
417
417
  for (let r of e) if (r.hasResult()) {
418
418
  let e = r.result.getMatch;
419
- if (r.result.filter === !1) for (let t of r.result.options) a(new E(t, r.source, e ? e(t) : [], 1e9 - n.length));
419
+ if (r.result.filter === !1) for (let t of r.result.options) a(new ae(t, r.source, e ? e(t) : [], 1e9 - n.length));
420
420
  else {
421
421
  let n = t.sliceDoc(r.from, r.to), s, c = o.filterStrict ? new ue(n) : new le(n);
422
422
  for (let t of r.result.options) if (s = c.match(t.label)) {
423
423
  let n = t.displayLabel ? e ? e(t, s.matched) : [] : s.matched, o = s.score + (t.boost || 0);
424
- if (a(new E(t, r.source, n, o)), typeof t.section == "object" && t.section.rank === "dynamic") {
424
+ if (a(new ae(t, r.source, n, o)), typeof t.section == "object" && t.section.rank === "dynamic") {
425
425
  let { name: e } = t.section;
426
426
  i ||= Object.create(null), i[e] = Math.max(o, i[e] || -1e9);
427
427
  }
@@ -584,16 +584,16 @@ function Te(e, t, n, r) {
584
584
  let i = t.sliceDoc(n, r);
585
585
  return typeof e == "function" ? e(i, n, r, t) : O(e, !0).test(i);
586
586
  }
587
- var z = /*@__PURE__*/ l.define({ map(e, t) {
587
+ var z = /*@__PURE__*/ d.define({ map(e, t) {
588
588
  return e.map((e) => e.map(t));
589
- } }), B = /*@__PURE__*/ c.define({
589
+ } }), B = /*@__PURE__*/ u.define({
590
590
  create() {
591
591
  return ve.start();
592
592
  },
593
593
  update(e, t) {
594
594
  return e.update(t);
595
595
  },
596
- provide: (e) => [g.from(e, (e) => e.tooltip), x.contentAttributes.from(e, (e) => e.attrs)]
596
+ provide: (e) => [v.from(e, (e) => e.tooltip), C.contentAttributes.from(e, (e) => e.attrs)]
597
597
  });
598
598
  function V(e, t) {
599
599
  let n = t.completion.apply || t.completion.label, r = e.state.field(B).active.find((e) => e.source == t.source);
@@ -608,7 +608,7 @@ function H(e, t = "option") {
608
608
  let r = n.state.field(B, !1);
609
609
  if (!r || !r.open || r.open.disabled || Date.now() - r.open.timestamp < n.state.facet(M).interactionDelay) return !1;
610
610
  let i = 1, a;
611
- t == "page" && (a = b(n, r.open.tooltip)) && (i = Math.max(2, Math.floor(a.dom.offsetHeight / a.dom.querySelector("li").offsetHeight) - 1));
611
+ t == "page" && (a = S(n, r.open.tooltip)) && (i = Math.max(2, Math.floor(a.dom.offsetHeight / a.dom.querySelector("li").offsetHeight) - 1));
612
612
  let { length: o } = r.open.options, s = r.open.selected > -1 ? r.open.selected + i * (e ? 1 : -1) : e ? 0 : o - 1;
613
613
  return s < 0 ? s = t == "page" ? 0 : o - 1 : s >= o && (s = t == "page" ? o - 1 : 0), n.dispatch({ effects: P.of(s) }), !0;
614
614
  };
@@ -623,7 +623,7 @@ var De = (e) => {
623
623
  constructor(e, t) {
624
624
  this.active = e, this.context = t, this.time = Date.now(), this.updates = [], this.done = void 0;
625
625
  }
626
- }, Ae = 50, je = 1e3, Me = /*@__PURE__*/ _.fromClass(class {
626
+ }, Ae = 50, je = 1e3, Me = /*@__PURE__*/ b.fromClass(class {
627
627
  constructor(e) {
628
628
  this.view = e, this.debounceUpdate = -1, this.running = [], this.debounceAccept = -1, this.pendingStart = !1, this.composing = 0;
629
629
  for (let t of e.state.field(B).active) t.isPending && this.startQuery(t);
@@ -641,7 +641,7 @@ var De = (e) => {
641
641
  for (let e of n.context.abortListeners) try {
642
642
  e();
643
643
  } catch (e) {
644
- C(this.view.state, e);
644
+ y(this.view.state, e);
645
645
  }
646
646
  n.context.abortListeners = null, this.running.splice(t--, 1);
647
647
  } else n.updates.push(...e.transactions);
@@ -661,7 +661,7 @@ var De = (e) => {
661
661
  this.running.push(r), Promise.resolve(e.source(n)).then((e) => {
662
662
  r.context.aborted || (r.done = e || null, this.scheduleAccept());
663
663
  }, (e) => {
664
- this.view.dispatch({ effects: j.of(null) }), C(this.view.state, e);
664
+ this.view.dispatch({ effects: j.of(null) }), y(this.view.state, e);
665
665
  });
666
666
  }
667
667
  scheduleAccept() {
@@ -696,7 +696,7 @@ var De = (e) => {
696
696
  blur(e) {
697
697
  let t = this.view.state.field(B, !1);
698
698
  if (t && t.tooltip && this.view.state.facet(M).closeOnBlur) {
699
- let n = t.open && b(this.view, t.open.tooltip);
699
+ let n = t.open && S(this.view, t.open.tooltip);
700
700
  (!n || !n.dom.contains(e.relatedTarget)) && setTimeout(() => this.view.dispatch({ effects: j.of(null) }), 10);
701
701
  }
702
702
  },
@@ -706,12 +706,12 @@ var De = (e) => {
706
706
  compositionend() {
707
707
  this.composing == 3 && setTimeout(() => this.view.dispatch({ effects: A.of(!1) }), 20), this.composing = 0;
708
708
  }
709
- } }), Ne = typeof navigator == "object" && /*@__PURE__*/ /Win/.test(navigator.platform), Pe = /*@__PURE__*/ s.highest(/*@__PURE__*/ x.domEventHandlers({ keydown(e, t) {
709
+ } }), Ne = typeof navigator == "object" && /*@__PURE__*/ /Win/.test(navigator.platform), Pe = /*@__PURE__*/ l.highest(/*@__PURE__*/ C.domEventHandlers({ keydown(e, t) {
710
710
  let n = t.state.field(B, !1);
711
711
  if (!n || !n.open || n.open.disabled || n.open.selected < 0 || e.key.length > 1 || e.ctrlKey && !(Ne && e.altKey) || e.metaKey) return !1;
712
712
  let r = n.open.options[n.open.selected], i = n.active.find((e) => e.source == r.source), a = r.completion.commitCharacters || i.result.commitCharacters;
713
713
  return a && a.indexOf(e.key) > -1 && V(t, r), !1;
714
- } })), W = /*@__PURE__*/ x.baseTheme({
714
+ } })), W = /*@__PURE__*/ C.baseTheme({
715
715
  ".cm-tooltip.cm-tooltip-autocomplete": { "& > ul": {
716
716
  fontFamily: "monospace",
717
717
  whiteSpace: "nowrap",
@@ -817,59 +817,59 @@ var De = (e) => {
817
817
  this.field = e, this.from = t, this.to = n;
818
818
  }
819
819
  map(t) {
820
- let r = t.mapPos(this.from, -1, n.TrackDel), i = t.mapPos(this.to, 1, n.TrackDel);
821
- return r == null || i == null ? null : new e(this.field, r, i);
820
+ let n = t.mapPos(this.from, -1, i.TrackDel), r = t.mapPos(this.to, 1, i.TrackDel);
821
+ return n == null || r == null ? null : new e(this.field, n, r);
822
822
  }
823
- }, Le = class e {
823
+ }, Le = class t {
824
824
  constructor(e, t) {
825
825
  this.lines = e, this.fieldPositions = t;
826
826
  }
827
- instantiate(e, t) {
828
- let n = [], r = [t], i = e.doc.lineAt(t), a = /^\s*/.exec(i.text)[0];
829
- for (let i of this.lines) {
830
- if (n.length) {
831
- let n = a, o = /^\t*/.exec(i)[0].length;
832
- for (let t = 0; t < o; t++) n += e.facet(te);
833
- r.push(t + n.length - o), i = n + i.slice(o);
827
+ instantiate(t, n) {
828
+ let r = [], i = [n], a = t.doc.lineAt(n), o = /^\s*/.exec(a.text)[0];
829
+ for (let a of this.lines) {
830
+ if (r.length) {
831
+ let r = o, s = /^\t*/.exec(a)[0].length;
832
+ for (let n = 0; n < s; n++) r += t.facet(e);
833
+ i.push(n + r.length - s), a = r + a.slice(s);
834
834
  }
835
- n.push(i), t += i.length + 1;
835
+ r.push(a), n += a.length + 1;
836
836
  }
837
837
  return {
838
- text: n,
839
- ranges: this.fieldPositions.map((e) => new Ie(e.field, r[e.line] + e.from, r[e.line] + e.to))
838
+ text: r,
839
+ ranges: this.fieldPositions.map((e) => new Ie(e.field, i[e.line] + e.from, i[e.line] + e.to))
840
840
  };
841
841
  }
842
- static parse(t) {
842
+ static parse(e) {
843
843
  let n = [], r = [], i = [], a;
844
- for (let e of t.split(/\r\n?|\n/)) {
845
- for (; a = /[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(e);) {
846
- let t = a[1] ? +a[1] : null, o = a[2] || a[3] || "", s = -1;
847
- t === 0 && (t = 1e9);
844
+ for (let t of e.split(/\r\n?|\n/)) {
845
+ for (; a = /[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(t);) {
846
+ let e = a[1] ? +a[1] : null, o = a[2] || a[3] || "", s = -1;
847
+ e === 0 && (e = 1e9);
848
848
  let c = o.replace(/\\[{}]/g, (e) => e[1]);
849
- for (let e = 0; e < n.length; e++) (t == null ? c && n[e].name == c : n[e].seq == t) && (s = e);
849
+ for (let t = 0; t < n.length; t++) (e == null ? c && n[t].name == c : n[t].seq == e) && (s = t);
850
850
  if (s < 0) {
851
- let e = 0;
852
- for (; e < n.length && (t == null || n[e].seq != null && n[e].seq < t);) e++;
853
- n.splice(e, 0, {
854
- seq: t,
851
+ let t = 0;
852
+ for (; t < n.length && (e == null || n[t].seq != null && n[t].seq < e);) t++;
853
+ n.splice(t, 0, {
854
+ seq: e,
855
855
  name: c
856
- }), s = e;
856
+ }), s = t;
857
857
  for (let e of i) e.field >= s && e.field++;
858
858
  }
859
859
  for (let e of i) if (e.line == r.length && e.from > a.index) {
860
860
  let t = a[2] ? 3 + (a[1] || "").length : 2;
861
861
  e.from -= t, e.to -= t;
862
862
  }
863
- i.push(new Fe(s, r.length, a.index, a.index + c.length)), e = e.slice(0, a.index) + o + e.slice(a.index + a[0].length);
863
+ i.push(new Fe(s, r.length, a.index, a.index + c.length)), t = t.slice(0, a.index) + o + t.slice(a.index + a[0].length);
864
864
  }
865
- e = e.replace(/\\([{}])/g, (e, t, n) => {
865
+ t = t.replace(/\\([{}])/g, (e, t, n) => {
866
866
  for (let e of i) e.line == r.length && e.from > n && (e.from--, e.to--);
867
867
  return t;
868
- }), r.push(e);
868
+ }), r.push(t);
869
869
  }
870
- return new e(r, i);
870
+ return new t(r, i);
871
871
  }
872
- }, Re = /*@__PURE__*/ S.widget({ widget: /*@__PURE__*/ new class extends y {
872
+ }, Re = /*@__PURE__*/ w.widget({ widget: /*@__PURE__*/ new class extends te {
873
873
  toDOM() {
874
874
  let e = document.createElement("span");
875
875
  return e.className = "cm-snippetFieldPosition", e;
@@ -877,9 +877,9 @@ var De = (e) => {
877
877
  ignoreEvent() {
878
878
  return !1;
879
879
  }
880
- }() }), ze = /*@__PURE__*/ S.mark({ class: "cm-snippetField" }), G = class e {
880
+ }() }), ze = /*@__PURE__*/ w.mark({ class: "cm-snippetField" }), G = class e {
881
881
  constructor(e, t) {
882
- this.ranges = e, this.active = t, this.deco = S.set(e.map((e) => (e.from == e.to ? Re : ze).range(e.from, e.to)), !0);
882
+ this.ranges = e, this.active = t, this.deco = w.set(e.map((e) => (e.from == e.to ? Re : ze).range(e.from, e.to)), !0);
883
883
  }
884
884
  map(t) {
885
885
  let n = [];
@@ -893,9 +893,9 @@ var De = (e) => {
893
893
  selectionInsideField(e) {
894
894
  return e.ranges.every((e) => this.ranges.some((t) => t.field == this.active && t.from <= e.from && t.to >= e.to));
895
895
  }
896
- }, K = /*@__PURE__*/ l.define({ map(e, t) {
896
+ }, K = /*@__PURE__*/ d.define({ map(e, t) {
897
897
  return e && e.map(t);
898
- } }), Be = /*@__PURE__*/ l.define(), q = /*@__PURE__*/ c.define({
898
+ } }), Be = /*@__PURE__*/ d.define(), q = /*@__PURE__*/ u.define({
899
899
  create() {
900
900
  return null;
901
901
  },
@@ -906,33 +906,33 @@ var De = (e) => {
906
906
  }
907
907
  return e && t.docChanged && (e = e.map(t.changes)), e && t.selection && !e.selectionInsideField(t.selection) && (e = null), e;
908
908
  },
909
- provide: (e) => x.decorations.from(e, (e) => e ? e.deco : S.none)
909
+ provide: (e) => C.decorations.from(e, (e) => e ? e.deco : w.none)
910
910
  });
911
- function J(e, n) {
912
- return t.create(e.filter((e) => e.field == n).map((e) => t.range(e.from, e.to)));
911
+ function J(e, t) {
912
+ return r.create(e.filter((e) => e.field == t).map((e) => r.range(e.from, e.to)));
913
913
  }
914
914
  function Ve(e) {
915
915
  let t = Le.parse(e);
916
- return (e, n, r, o) => {
917
- let { text: s, ranges: c } = t.instantiate(e.state, r), { main: u } = e.state.selection, d = {
916
+ return (e, n, r, i) => {
917
+ let { text: a, ranges: c } = t.instantiate(e.state, r), { main: l } = e.state.selection, u = {
918
918
  changes: {
919
919
  from: r,
920
- to: o == u.from ? u.to : o,
921
- insert: a.of(s)
920
+ to: i == l.from ? l.to : i,
921
+ insert: s.of(a)
922
922
  },
923
923
  scrollIntoView: !0,
924
- annotations: n ? [k.of(n), i.userEvent.of("input.complete")] : void 0
924
+ annotations: n ? [k.of(n), o.userEvent.of("input.complete")] : void 0
925
925
  };
926
- if (c.length && (d.selection = J(c, 0)), c.some((e) => e.field > 0)) {
927
- let t = new G(c, 0), n = d.effects = [K.of(t)];
928
- e.state.field(q, !1) === void 0 && n.push(l.appendConfig.of([
926
+ if (c.length && (u.selection = J(c, 0)), c.some((e) => e.field > 0)) {
927
+ let t = new G(c, 0), n = u.effects = [K.of(t)];
928
+ e.state.field(q, !1) === void 0 && n.push(d.appendConfig.of([
929
929
  q,
930
930
  Ge,
931
931
  qe,
932
932
  W
933
933
  ]));
934
934
  }
935
- e.dispatch(e.state.update(d));
935
+ e.dispatch(e.state.update(u));
936
936
  };
937
937
  }
938
938
  function He(e) {
@@ -954,16 +954,16 @@ var Ue = [{
954
954
  }, {
955
955
  key: "Escape",
956
956
  run: ({ state: e, dispatch: t }) => e.field(q, !1) ? (t(e.update({ effects: K.of(null) })), !0) : !1
957
- }], We = /*@__PURE__*/ u.define({ combine(e) {
957
+ }], We = /*@__PURE__*/ f.define({ combine(e) {
958
958
  return e.length ? e[0] : Ue;
959
- } }), Ge = /*@__PURE__*/ s.highest(/*@__PURE__*/ ee.compute([We], (e) => e.facet(We)));
959
+ } }), Ge = /*@__PURE__*/ l.highest(/*@__PURE__*/ x.compute([We], (e) => e.facet(We)));
960
960
  function Ke(e, t) {
961
961
  return {
962
962
  ...t,
963
963
  apply: Ve(e)
964
964
  };
965
965
  }
966
- var qe = /*@__PURE__*/ x.domEventHandlers({ mousedown(e, t) {
966
+ var qe = /*@__PURE__*/ C.domEventHandlers({ mousedown(e, t) {
967
967
  let n = t.state.field(q, !1), r;
968
968
  if (!n || (r = t.posAtCoords({
969
969
  x: e.clientX,
@@ -985,13 +985,13 @@ var qe = /*@__PURE__*/ x.domEventHandlers({ mousedown(e, t) {
985
985
  ],
986
986
  before: ")]}:;>",
987
987
  stringPrefixes: []
988
- }, X = /*@__PURE__*/ l.define({ map(e, t) {
989
- return t.mapPos(e, -1, n.TrackAfter) ?? void 0;
990
- } }), Z = /*@__PURE__*/ new class extends r {}();
988
+ }, X = /*@__PURE__*/ d.define({ map(e, t) {
989
+ return t.mapPos(e, -1, i.TrackAfter) ?? void 0;
990
+ } }), Z = /*@__PURE__*/ new class extends a {}();
991
991
  Z.startSide = 1, Z.endSide = -1;
992
- var Je = /*@__PURE__*/ c.define({
992
+ var Q = /*@__PURE__*/ u.define({
993
993
  create() {
994
- return f.empty;
994
+ return m.empty;
995
995
  },
996
996
  update(e, t) {
997
997
  if (e = e.map(t.changes), t.selection) {
@@ -1002,90 +1002,90 @@ var Je = /*@__PURE__*/ c.define({
1002
1002
  return e;
1003
1003
  }
1004
1004
  });
1005
- function Ye() {
1006
- return [et, Je];
1005
+ function Je() {
1006
+ return [$e, Q];
1007
1007
  }
1008
- var Xe = "()[]{}<>«»»«[]{}";
1009
- function Ze(e) {
1010
- for (let t = 0; t < 16; t += 2) if (Xe.charCodeAt(t) == e) return Xe.charAt(t + 1);
1011
- return m(e < 128 ? e : e + 1);
1008
+ var Ye = "()[]{}<>«»»«[]{}";
1009
+ function Xe(e) {
1010
+ for (let t = 0; t < 16; t += 2) if (Ye.charCodeAt(t) == e) return Ye.charAt(t + 1);
1011
+ return g(e < 128 ? e : e + 1);
1012
1012
  }
1013
- function Qe(e, t) {
1013
+ function Ze(e, t) {
1014
1014
  return e.languageDataAt("closeBrackets", t)[0] || Y;
1015
1015
  }
1016
- var $e = typeof navigator == "object" && /*@__PURE__*/ /Android\b/.test(navigator.userAgent), et = /*@__PURE__*/ x.inputHandler.of((t, n, r, i) => {
1017
- if (($e ? t.composing : t.compositionStarted) || t.state.readOnly) return !1;
1018
- let a = t.state.selection.main;
1019
- if (i.length > 2 || i.length == 2 && p(e(i, 0)) == 1 || n != a.from || r != a.to) return !1;
1020
- let o = nt(t.state, i);
1021
- return o ? (t.dispatch(o), !0) : !1;
1022
- }), tt = [{
1016
+ var Qe = typeof navigator == "object" && /*@__PURE__*/ /Android\b/.test(navigator.userAgent), $e = /*@__PURE__*/ C.inputHandler.of((e, t, r, i) => {
1017
+ if ((Qe ? e.composing : e.compositionStarted) || e.state.readOnly) return !1;
1018
+ let a = e.state.selection.main;
1019
+ if (i.length > 2 || i.length == 2 && h(n(i, 0)) == 1 || t != a.from || r != a.to) return !1;
1020
+ let o = tt(e.state, i);
1021
+ return o ? (e.dispatch(o), !0) : !1;
1022
+ }), et = [{
1023
1023
  key: "Backspace",
1024
- run: ({ state: n, dispatch: r }) => {
1025
- if (n.readOnly) return !1;
1026
- let i = Qe(n, n.selection.main.head).brackets || Y.brackets, a = null, o = n.changeByRange((r) => {
1027
- if (r.empty) {
1028
- let a = rt(n.doc, r.head);
1029
- for (let o of i) if (o == a && $(n.doc, r.head) == Ze(e(o, 0))) return {
1024
+ run: ({ state: e, dispatch: t }) => {
1025
+ if (e.readOnly) return !1;
1026
+ let i = Ze(e, e.selection.main.head).brackets || Y.brackets, a = null, o = e.changeByRange((t) => {
1027
+ if (t.empty) {
1028
+ let a = rt(e.doc, t.head);
1029
+ for (let o of i) if (o == a && $(e.doc, t.head) == Xe(n(o, 0))) return {
1030
1030
  changes: {
1031
- from: r.head - o.length,
1032
- to: r.head + o.length
1031
+ from: t.head - o.length,
1032
+ to: t.head + o.length
1033
1033
  },
1034
- range: t.cursor(r.head - o.length)
1034
+ range: r.cursor(t.head - o.length)
1035
1035
  };
1036
1036
  }
1037
- return { range: a = r };
1037
+ return { range: a = t };
1038
1038
  });
1039
- return a || r(n.update(o, {
1039
+ return a || t(e.update(o, {
1040
1040
  scrollIntoView: !0,
1041
1041
  userEvent: "delete.backward"
1042
1042
  })), !a;
1043
1043
  }
1044
1044
  }];
1045
- function nt(t, n) {
1046
- let r = Qe(t, t.selection.main.head), i = r.brackets || Y.brackets;
1045
+ function tt(e, t) {
1046
+ let r = Ze(e, e.selection.main.head), i = r.brackets || Y.brackets;
1047
1047
  for (let a of i) {
1048
- let o = Ze(e(a, 0));
1049
- if (n == a) return o == a ? ot(t, a, i.indexOf(a + a + a) > -1, r) : it(t, a, o, r.before || Y.before);
1050
- if (n == o && Q(t, t.selection.main.from)) return at(t, a, o);
1048
+ let o = Xe(n(a, 0));
1049
+ if (t == a) return o == a ? ot(e, a, i.indexOf(a + a + a) > -1, r) : it(e, a, o, r.before || Y.before);
1050
+ if (t == o && nt(e, e.selection.main.from)) return at(e, a, o);
1051
1051
  }
1052
1052
  return null;
1053
1053
  }
1054
- function Q(e, t) {
1054
+ function nt(e, t) {
1055
1055
  let n = !1;
1056
- return e.field(Je).between(0, e.doc.length, (e) => {
1056
+ return e.field(Q).between(0, e.doc.length, (e) => {
1057
1057
  e == t && (n = !0);
1058
1058
  }), n;
1059
1059
  }
1060
- function $(t, n) {
1061
- let r = t.sliceString(n, n + 2);
1062
- return r.slice(0, p(e(r, 0)));
1060
+ function $(e, t) {
1061
+ let r = e.sliceString(t, t + 2);
1062
+ return r.slice(0, h(n(r, 0)));
1063
1063
  }
1064
- function rt(t, n) {
1065
- let r = t.sliceString(n - 2, n);
1066
- return p(e(r, 0)) == r.length ? r : r.slice(1);
1064
+ function rt(e, t) {
1065
+ let r = e.sliceString(t - 2, t);
1066
+ return h(n(r, 0)) == r.length ? r : r.slice(1);
1067
1067
  }
1068
- function it(e, n, r, i) {
1068
+ function it(e, t, n, i) {
1069
1069
  let a = null, o = e.changeByRange((o) => {
1070
1070
  if (!o.empty) return {
1071
1071
  changes: [{
1072
- insert: n,
1072
+ insert: t,
1073
1073
  from: o.from
1074
1074
  }, {
1075
- insert: r,
1075
+ insert: n,
1076
1076
  from: o.to
1077
1077
  }],
1078
- effects: X.of(o.to + n.length),
1079
- range: t.range(o.anchor + n.length, o.head + n.length)
1078
+ effects: X.of(o.to + t.length),
1079
+ range: r.range(o.anchor + t.length, o.head + t.length)
1080
1080
  };
1081
1081
  let s = $(e.doc, o.head);
1082
1082
  return !s || /\s/.test(s) || i.indexOf(s) > -1 ? {
1083
1083
  changes: {
1084
- insert: n + r,
1084
+ insert: t + n,
1085
1085
  from: o.head
1086
1086
  },
1087
- effects: X.of(o.head + n.length),
1088
- range: t.cursor(o.head + n.length)
1087
+ effects: X.of(o.head + t.length),
1088
+ range: r.cursor(o.head + t.length)
1089
1089
  } : { range: a = o };
1090
1090
  });
1091
1091
  return a ? null : e.update(o, {
@@ -1093,105 +1093,105 @@ function it(e, n, r, i) {
1093
1093
  userEvent: "input.type"
1094
1094
  });
1095
1095
  }
1096
- function at(e, n, r) {
1097
- let i = null, a = e.changeByRange((n) => n.empty && $(e.doc, n.head) == r ? {
1096
+ function at(e, t, n) {
1097
+ let i = null, a = e.changeByRange((t) => t.empty && $(e.doc, t.head) == n ? {
1098
1098
  changes: {
1099
- from: n.head,
1100
- to: n.head + r.length,
1101
- insert: r
1099
+ from: t.head,
1100
+ to: t.head + n.length,
1101
+ insert: n
1102
1102
  },
1103
- range: t.cursor(n.head + r.length)
1104
- } : i = { range: n });
1103
+ range: r.cursor(t.head + n.length)
1104
+ } : i = { range: t });
1105
1105
  return i ? null : e.update(a, {
1106
1106
  scrollIntoView: !0,
1107
1107
  userEvent: "input.type"
1108
1108
  });
1109
1109
  }
1110
- function ot(e, n, r, i) {
1111
- let a = i.stringPrefixes || Y.stringPrefixes, s = null, c = e.changeByRange((i) => {
1110
+ function ot(e, t, n, i) {
1111
+ let a = i.stringPrefixes || Y.stringPrefixes, o = null, s = e.changeByRange((i) => {
1112
1112
  if (!i.empty) return {
1113
1113
  changes: [{
1114
- insert: n,
1114
+ insert: t,
1115
1115
  from: i.from
1116
1116
  }, {
1117
- insert: n,
1117
+ insert: t,
1118
1118
  from: i.to
1119
1119
  }],
1120
- effects: X.of(i.to + n.length),
1121
- range: t.range(i.anchor + n.length, i.head + n.length)
1120
+ effects: X.of(i.to + t.length),
1121
+ range: r.range(i.anchor + t.length, i.head + t.length)
1122
1122
  };
1123
- let c = i.head, l = $(e.doc, c), u;
1124
- if (l == n) {
1125
- if (st(e, c)) return {
1123
+ let s = i.head, l = $(e.doc, s), u;
1124
+ if (l == t) {
1125
+ if (st(e, s)) return {
1126
1126
  changes: {
1127
- insert: n + n,
1128
- from: c
1127
+ insert: t + t,
1128
+ from: s
1129
1129
  },
1130
- effects: X.of(c + n.length),
1131
- range: t.cursor(c + n.length)
1130
+ effects: X.of(s + t.length),
1131
+ range: r.cursor(s + t.length)
1132
1132
  };
1133
- if (Q(e, c)) {
1134
- let i = r && e.sliceDoc(c, c + n.length * 3) == n + n + n ? n + n + n : n;
1133
+ if (nt(e, s)) {
1134
+ let i = n && e.sliceDoc(s, s + t.length * 3) == t + t + t ? t + t + t : t;
1135
1135
  return {
1136
1136
  changes: {
1137
- from: c,
1138
- to: c + i.length,
1137
+ from: s,
1138
+ to: s + i.length,
1139
1139
  insert: i
1140
1140
  },
1141
- range: t.cursor(c + i.length)
1141
+ range: r.cursor(s + i.length)
1142
1142
  };
1143
1143
  }
1144
- } else if (r && e.sliceDoc(c - 2 * n.length, c) == n + n && (u = lt(e, c - 2 * n.length, a)) > -1 && st(e, u)) return {
1144
+ } else if (n && e.sliceDoc(s - 2 * t.length, s) == t + t && (u = lt(e, s - 2 * t.length, a)) > -1 && st(e, u)) return {
1145
1145
  changes: {
1146
- insert: n + n + n + n,
1147
- from: c
1146
+ insert: t + t + t + t,
1147
+ from: s
1148
1148
  },
1149
- effects: X.of(c + n.length),
1150
- range: t.cursor(c + n.length)
1149
+ effects: X.of(s + t.length),
1150
+ range: r.cursor(s + t.length)
1151
1151
  };
1152
- else if (e.charCategorizer(c)(l) != o.Word && lt(e, c, a) > -1 && !ct(e, c, n, a)) return {
1152
+ else if (e.charCategorizer(s)(l) != c.Word && lt(e, s, a) > -1 && !ct(e, s, t, a)) return {
1153
1153
  changes: {
1154
- insert: n + n,
1155
- from: c
1154
+ insert: t + t,
1155
+ from: s
1156
1156
  },
1157
- effects: X.of(c + n.length),
1158
- range: t.cursor(c + n.length)
1157
+ effects: X.of(s + t.length),
1158
+ range: r.cursor(s + t.length)
1159
1159
  };
1160
- return { range: s = i };
1160
+ return { range: o = i };
1161
1161
  });
1162
- return s ? null : e.update(c, {
1162
+ return o ? null : e.update(s, {
1163
1163
  scrollIntoView: !0,
1164
1164
  userEvent: "input.type"
1165
1165
  });
1166
1166
  }
1167
- function st(e, t) {
1168
- let n = w(e).resolveInner(t + 1);
1169
- return n.parent && n.from == t;
1167
+ function st(e, n) {
1168
+ let r = t(e).resolveInner(n + 1);
1169
+ return r.parent && r.from == n;
1170
1170
  }
1171
- function ct(e, t, n, r) {
1172
- let i = w(e).resolveInner(t, -1), a = r.reduce((e, t) => Math.max(e, t.length), 0);
1173
- for (let o = 0; o < 5; o++) {
1174
- let o = e.sliceDoc(i.from, Math.min(i.to, i.from + n.length + a)), s = o.indexOf(n);
1175
- if (!s || s > -1 && r.indexOf(o.slice(0, s)) > -1) {
1176
- let t = i.firstChild;
1177
- for (; t && t.from == i.from && t.to - t.from > n.length + s;) {
1178
- if (e.sliceDoc(t.to - n.length, t.to) == n) return !1;
1171
+ function ct(e, n, r, i) {
1172
+ let a = t(e).resolveInner(n, -1), o = i.reduce((e, t) => Math.max(e, t.length), 0);
1173
+ for (let t = 0; t < 5; t++) {
1174
+ let t = e.sliceDoc(a.from, Math.min(a.to, a.from + r.length + o)), s = t.indexOf(r);
1175
+ if (!s || s > -1 && i.indexOf(t.slice(0, s)) > -1) {
1176
+ let t = a.firstChild;
1177
+ for (; t && t.from == a.from && t.to - t.from > r.length + s;) {
1178
+ if (e.sliceDoc(t.to - r.length, t.to) == r) return !1;
1179
1179
  t = t.firstChild;
1180
1180
  }
1181
1181
  return !0;
1182
1182
  }
1183
- let c = i.to == t && i.parent;
1183
+ let c = a.to == n && a.parent;
1184
1184
  if (!c) break;
1185
- i = c;
1185
+ a = c;
1186
1186
  }
1187
1187
  return !1;
1188
1188
  }
1189
1189
  function lt(e, t, n) {
1190
1190
  let r = e.charCategorizer(t);
1191
- if (r(e.sliceDoc(t - 1, t)) != o.Word) return t;
1191
+ if (r(e.sliceDoc(t - 1, t)) != c.Word) return t;
1192
1192
  for (let i of n) {
1193
1193
  let n = t - i.length;
1194
- if (e.sliceDoc(n, t) == i && r(e.sliceDoc(n - 1, n)) != o.Word) return n;
1194
+ if (e.sliceDoc(n, t) == i && r(e.sliceDoc(n - 1, n)) != c.Word) return n;
1195
1195
  }
1196
1196
  return -1;
1197
1197
  }
@@ -1242,6 +1242,6 @@ var dt = [
1242
1242
  key: "Enter",
1243
1243
  run: De
1244
1244
  }
1245
- ], ft = /*@__PURE__*/ s.highest(/*@__PURE__*/ ee.computeN([M], (e) => e.facet(M).defaultKeymap ? [dt] : []));
1245
+ ], ft = /*@__PURE__*/ l.highest(/*@__PURE__*/ x.computeN([M], (e) => e.facet(M).defaultKeymap ? [dt] : []));
1246
1246
  //#endregion
1247
- export { ie as a, Ke as c, tt as i, ut as n, dt as o, Ye as r, ae as s, T as t };
1247
+ export { re as a, oe as c, et as i, Ve as l, ut as n, dt as o, Je as r, ie as s, T as t, Ke as u };