@histoire/controls 0.17.6 → 0.17.9

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 (2) hide show
  1. package/dist/index.es.js +208 -212
  2. package/package.json +5 -5
package/dist/index.es.js CHANGED
@@ -241,10 +241,10 @@ const va = {
241
241
  _: 3
242
242
  }, 8, ["title", "class", "style"]));
243
243
  }
244
- }), _a = ["value"], $a = {
244
+ }), $a = ["value"], Fa = {
245
245
  name: "HstText"
246
- }, Fa = /* @__PURE__ */ et({
247
- ...$a,
246
+ }, _a = /* @__PURE__ */ et({
247
+ ...Fa,
248
248
  props: {
249
249
  title: {},
250
250
  modelValue: {}
@@ -272,7 +272,7 @@ const va = {
272
272
  value: s.modelValue,
273
273
  class: "htw-text-inherit htw-bg-transparent htw-w-full htw-outline-none htw-px-2 htw-py-1 -htw-my-1 htw-border htw-border-solid htw-border-black/25 dark:htw-border-white/25 focus:htw-border-primary-500 dark:focus:htw-border-primary-500 htw-rounded-sm",
274
274
  onInput: r[0] || (r[0] = (o) => e("update:modelValue", o.target.value))
275
- }), null, 16, _a)
275
+ }), null, 16, $a)
276
276
  ]),
277
277
  _: 3
278
278
  }, 8, ["title", "class", "style"]));
@@ -410,8 +410,7 @@ const va = {
410
410
  _: 1
411
411
  }, 8, ["title", "class", "style"]));
412
412
  }
413
- });
414
- const Ua = ["value"], Ya = {
413
+ }), Ua = ["value"], Ya = {
415
414
  name: "HstTextarea",
416
415
  inheritAttrs: !1
417
416
  }, Qa = /* @__PURE__ */ et({
@@ -495,8 +494,7 @@ const Ua = ["value"], Ya = {
495
494
  _: 3
496
495
  }));
497
496
  }
498
- });
499
- const sc = {
497
+ }), sc = {
500
498
  name: "HstSelect"
501
499
  }, nc = /* @__PURE__ */ et({
502
500
  ...sc,
@@ -742,8 +740,7 @@ const sc = {
742
740
  ], 40, vc))), 128))
743
741
  ], 4));
744
742
  }
745
- });
746
- const Dc = { class: "-htw-my-1" }, Pc = ["id", "name", "value", "checked", "onChange"], Bc = ["for", "onKeydown"], Rc = {
743
+ }), Dc = { class: "-htw-my-1" }, Pc = ["id", "name", "value", "checked", "onChange"], Bc = ["for", "onKeydown"], Rc = {
747
744
  name: "HstRadio"
748
745
  }, Lc = /* @__PURE__ */ et({
749
746
  ...Rc,
@@ -1040,7 +1037,7 @@ class qt extends V {
1040
1037
  let o = this.children[s], l = r + o.length;
1041
1038
  if (t >= r && e <= l) {
1042
1039
  let h = o.replace(t - r, e - r, i), a = this.lines - o.lines + h.lines;
1043
- if (h.lines < a >> 5 - 1 && h.lines > a >> 5 + 1) {
1040
+ if (h.lines < a >> 4 && h.lines > a >> 6) {
1044
1041
  let c = this.children.slice();
1045
1042
  return c[s] = h, new qt(c, this.length - (e - t) + i.length);
1046
1043
  }
@@ -2219,7 +2216,7 @@ class cs {
2219
2216
  }
2220
2217
  static resolve(t, e, i) {
2221
2218
  let s = [], r = /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ new Map();
2222
- for (let u of _c(t, e, o))
2219
+ for (let u of $c(t, e, o))
2223
2220
  u instanceof Ht ? s.push(u) : (r[u.facet.id] || (r[u.facet.id] = [])).push(u);
2224
2221
  let l = /* @__PURE__ */ Object.create(null), h = [], a = [];
2225
2222
  for (let u of s)
@@ -2247,7 +2244,7 @@ class cs {
2247
2244
  return new cs(t, o, f, l, h, r);
2248
2245
  }
2249
2246
  }
2250
- function _c(n, t, e) {
2247
+ function $c(n, t, e) {
2251
2248
  let i = [[], [], [], [], []], s = /* @__PURE__ */ new Map();
2252
2249
  function r(o, l) {
2253
2250
  let h = s.get(o);
@@ -2315,10 +2312,10 @@ class ti {
2315
2312
  Define a new type of annotation.
2316
2313
  */
2317
2314
  static define() {
2318
- return new $c();
2315
+ return new Fc();
2319
2316
  }
2320
2317
  }
2321
- class $c {
2318
+ class Fc {
2322
2319
  /**
2323
2320
  Create an instance of this annotation.
2324
2321
  */
@@ -2326,7 +2323,7 @@ class $c {
2326
2323
  return new ti(this, t);
2327
2324
  }
2328
2325
  }
2329
- class Fc {
2326
+ class _c {
2330
2327
  /**
2331
2328
  @internal
2332
2329
  */
@@ -2371,7 +2368,7 @@ class z {
2371
2368
  removed.
2372
2369
  */
2373
2370
  static define(t = {}) {
2374
- return new Fc(t.map || ((e) => e));
2371
+ return new _c(t.map || ((e) => e));
2375
2372
  }
2376
2373
  /**
2377
2374
  Map an array of effects through a change set.
@@ -2955,7 +2952,7 @@ class Jn {
2955
2952
  return { mapped: i.length ? new Jn(s, r, i, l) : null, pos: o };
2956
2953
  }
2957
2954
  }
2958
- class $ {
2955
+ class F {
2959
2956
  constructor(t, e, i, s) {
2960
2957
  this.chunkPos = t, this.chunk = e, this.nextLayer = i, this.maxPoint = s;
2961
2958
  }
@@ -2963,7 +2960,7 @@ class $ {
2963
2960
  @internal
2964
2961
  */
2965
2962
  static create(t, e, i, s) {
2966
- return new $(t, e, i, s);
2963
+ return new F(t, e, i, s);
2967
2964
  }
2968
2965
  /**
2969
2966
  @internal
@@ -3003,7 +3000,7 @@ class $ {
3003
3000
  if (e.length == 0 && !o)
3004
3001
  return this;
3005
3002
  if (i && (e = e.slice().sort(dn)), this.isEmpty)
3006
- return e.length ? $.of(e) : this;
3003
+ return e.length ? F.of(e) : this;
3007
3004
  let l = new bl(this, null, -1).goto(0), h = 0, a = [], c = new Ee();
3008
3005
  for (; l.value || h < e.length; )
3009
3006
  if (h < e.length && (l.from - e[h].from || l.startSide - e[h].value.startSide) >= 0) {
@@ -3011,7 +3008,7 @@ class $ {
3011
3008
  c.addInner(f.from, f.to, f.value) || a.push(f);
3012
3009
  } else
3013
3010
  l.rangeIndex == 1 && l.chunkIndex < this.chunk.length && (h == e.length || this.chunkEnd(l.chunkIndex) < e[h].from) && (!o || s > this.chunkEnd(l.chunkIndex) || r < this.chunkPos[l.chunkIndex]) && c.addChunk(this.chunkPos[l.chunkIndex], this.chunk[l.chunkIndex]) ? l.nextChunk() : ((!o || s > l.to || r < l.from || o(l.from, l.to, l.value)) && (c.addInner(l.from, l.to, l.value) || a.push(un.create(l.from, l.to, l.value))), l.next());
3014
- return c.finishInner(this.nextLayer.isEmpty && !a.length ? $.empty : this.nextLayer.update({ add: a, filter: o, filterFrom: s, filterTo: r }));
3011
+ return c.finishInner(this.nextLayer.isEmpty && !a.length ? F.empty : this.nextLayer.update({ add: a, filter: o, filterFrom: s, filterTo: r }));
3015
3012
  }
3016
3013
  /**
3017
3014
  Map this range set through a set of changes, return the new set.
@@ -3030,7 +3027,7 @@ class $ {
3030
3027
  }
3031
3028
  }
3032
3029
  let r = this.nextLayer.map(t);
3033
- return e.length == 0 ? r : new $(i, e, r || $.empty, s);
3030
+ return e.length == 0 ? r : new F(i, e, r || F.empty, s);
3034
3031
  }
3035
3032
  /**
3036
3033
  Iterate over the ranges that touch the region `from` to `to`,
@@ -3081,7 +3078,7 @@ class $ {
3081
3078
  if they are equivalent in the given range.
3082
3079
  */
3083
3080
  static eq(t, e, i = 0, s) {
3084
- s == null && (s = 1e9 - 1);
3081
+ s == null && (s = 999999999);
3085
3082
  let r = t.filter((c) => !c.isEmpty && e.indexOf(c) < 0), o = e.filter((c) => !c.isEmpty && t.indexOf(c) < 0);
3086
3083
  if (r.length != o.length)
3087
3084
  return !1;
@@ -3131,7 +3128,7 @@ class $ {
3131
3128
  return i.finish();
3132
3129
  }
3133
3130
  }
3134
- $.empty = /* @__PURE__ */ new $([], [], null, -1);
3131
+ F.empty = /* @__PURE__ */ new F([], [], null, -1);
3135
3132
  function Yc(n) {
3136
3133
  if (n.length > 1)
3137
3134
  for (let t = n[0], e = 1; e < n.length; e++) {
@@ -3142,7 +3139,7 @@ function Yc(n) {
3142
3139
  }
3143
3140
  return n;
3144
3141
  }
3145
- $.empty.nextLayer = $.empty;
3142
+ F.empty.nextLayer = F.empty;
3146
3143
  class Ee {
3147
3144
  finishChunk(t) {
3148
3145
  this.chunks.push(new Jn(this.from, this.to, this.value, this.maxPoint)), this.chunkPos.push(this.chunkStart), this.chunkStart = -1, this.setMaxPoint = Math.max(this.setMaxPoint, this.maxPoint), this.maxPoint = -1, t && (this.from = [], this.to = [], this.value = []);
@@ -3184,7 +3181,7 @@ class Ee {
3184
3181
  used anymore after this has been called.
3185
3182
  */
3186
3183
  finish() {
3187
- return this.finishInner($.empty);
3184
+ return this.finishInner(F.empty);
3188
3185
  }
3189
3186
  /**
3190
3187
  @internal
@@ -3192,7 +3189,7 @@ class Ee {
3192
3189
  finishInner(t) {
3193
3190
  if (this.from.length && this.finishChunk(!1), this.chunks.length == 0)
3194
3191
  return t;
3195
- let e = $.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(t) : t, this.setMaxPoint);
3192
+ let e = F.create(this.chunkPos, this.chunks, this.nextLayer ? this.nextLayer.finishInner(t) : t, this.setMaxPoint);
3196
3193
  return this.from = null, e;
3197
3194
  }
3198
3195
  }
@@ -3636,8 +3633,8 @@ for (var lt = 1; lt <= 24; lt++)
3636
3633
  ye[lt + 111] = "F" + lt;
3637
3634
  for (var lt = 65; lt <= 90; lt++)
3638
3635
  ye[lt] = String.fromCharCode(lt + 32), yi[lt] = String.fromCharCode(lt);
3639
- for (var _s in ye)
3640
- yi.hasOwnProperty(_s) || (yi[_s] = ye[_s]);
3636
+ for (var $s in ye)
3637
+ yi.hasOwnProperty($s) || (yi[$s] = ye[$s]);
3641
3638
  function tf(n) {
3642
3639
  var t = Xc && n.metaKey && n.shiftKey && !n.ctrlKey && !n.altKey || Zc && n.shiftKey && n.key && n.key.length == 1 || n.key == "Unidentified", e = !t && n.key || (n.shiftKey ? yi : ye)[n.keyCode] || n.key || "Unidentified";
3643
3640
  return e == "Esc" && (e = "Escape"), e == "Del" && (e = "Delete"), e == "Left" && (e = "ArrowLeft"), e == "Up" && (e = "ArrowUp"), e == "Right" && (e = "ArrowRight"), e == "Down" && (e = "ArrowDown"), e;
@@ -3792,21 +3789,21 @@ class of {
3792
3789
  this.anchorNode = t, this.anchorOffset = e, this.focusNode = i, this.focusOffset = s;
3793
3790
  }
3794
3791
  }
3795
- let Fe = null;
3792
+ let _e = null;
3796
3793
  function kl(n) {
3797
3794
  if (n.setActive)
3798
3795
  return n.setActive();
3799
- if (Fe)
3800
- return n.focus(Fe);
3796
+ if (_e)
3797
+ return n.focus(_e);
3801
3798
  let t = [];
3802
3799
  for (let e = n; e && (t.push(e, e.scrollTop, e.scrollLeft), e != e.ownerDocument); e = e.parentNode)
3803
3800
  ;
3804
- if (n.focus(Fe == null ? {
3801
+ if (n.focus(_e == null ? {
3805
3802
  get preventScroll() {
3806
- return Fe = { preventScroll: !0 }, !0;
3803
+ return _e = { preventScroll: !0 }, !0;
3807
3804
  }
3808
- } : void 0), !Fe) {
3809
- Fe = !1;
3805
+ } : void 0), !_e) {
3806
+ _e = !1;
3810
3807
  for (let e = 0; e < t.length; ) {
3811
3808
  let i = t[e++], s = t[e++], r = t[e++];
3812
3809
  i.scrollTop != s && (i.scrollTop = s), i.scrollLeft != r && (i.scrollLeft = r);
@@ -4087,7 +4084,7 @@ function Al(n, t, e, i, s, r) {
4087
4084
  n.length += f, Cl(n, a, c, l, h, i, 0, s, r);
4088
4085
  }
4089
4086
  let vt = typeof navigator < "u" ? navigator : { userAgent: "", vendor: "", platform: "" }, yn = typeof document < "u" ? document : { documentElement: { style: {} } };
4090
- const bn = /* @__PURE__ */ /Edge\/(\d+)/.exec(vt.userAgent), Ol = /* @__PURE__ */ /MSIE \d/.test(vt.userAgent), kn = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(vt.userAgent), Ps = !!(Ol || kn || bn), Lr = !Ps && /* @__PURE__ */ /gecko\/(\d+)/i.test(vt.userAgent), $s = !Ps && /* @__PURE__ */ /Chrome\/(\d+)/.exec(vt.userAgent), Er = "webkitFontSmoothing" in yn.documentElement.style, Ml = !Ps && /* @__PURE__ */ /Apple Computer/.test(vt.vendor), Nr = Ml && (/* @__PURE__ */ /Mobile\/\w+/.test(vt.userAgent) || vt.maxTouchPoints > 2);
4087
+ const bn = /* @__PURE__ */ /Edge\/(\d+)/.exec(vt.userAgent), Ol = /* @__PURE__ */ /MSIE \d/.test(vt.userAgent), kn = /* @__PURE__ */ /Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(vt.userAgent), Ps = !!(Ol || kn || bn), Lr = !Ps && /* @__PURE__ */ /gecko\/(\d+)/i.test(vt.userAgent), Fs = !Ps && /* @__PURE__ */ /Chrome\/(\d+)/.exec(vt.userAgent), Er = "webkitFontSmoothing" in yn.documentElement.style, Ml = !Ps && /* @__PURE__ */ /Apple Computer/.test(vt.vendor), Nr = Ml && (/* @__PURE__ */ /Mobile\/\w+/.test(vt.userAgent) || vt.maxTouchPoints > 2);
4091
4088
  var C = {
4092
4089
  mac: Nr || /* @__PURE__ */ /Mac/.test(vt.platform),
4093
4090
  windows: /* @__PURE__ */ /Win/.test(vt.platform),
@@ -4096,8 +4093,8 @@ var C = {
4096
4093
  ie_version: Ol ? yn.documentMode || 6 : kn ? +kn[1] : bn ? +bn[1] : 0,
4097
4094
  gecko: Lr,
4098
4095
  gecko_version: Lr ? +(/* @__PURE__ */ /Firefox\/(\d+)/.exec(vt.userAgent) || [0, 0])[1] : 0,
4099
- chrome: !!$s,
4100
- chrome_version: $s ? +$s[1] : 0,
4096
+ chrome: !!Fs,
4097
+ chrome_version: Fs ? +Fs[1] : 0,
4101
4098
  ios: Nr,
4102
4099
  android: /* @__PURE__ */ /Android\b/.test(vt.userAgent),
4103
4100
  webkit: Er,
@@ -4687,7 +4684,7 @@ class N extends Qe {
4687
4684
  pass `true` for `sort` to make the library sort them for you.
4688
4685
  */
4689
4686
  static set(t, e = !1) {
4690
- return $.of(t, e);
4687
+ return F.of(t, e);
4691
4688
  }
4692
4689
  /**
4693
4690
  @internal
@@ -4696,7 +4693,7 @@ class N extends Qe {
4696
4693
  return this.widget ? this.widget.estimatedHeight > -1 : !1;
4697
4694
  }
4698
4695
  }
4699
- N.none = $.empty;
4696
+ N.none = F.empty;
4700
4697
  class Mi extends N {
4701
4698
  constructor(t) {
4702
4699
  let { start: e, end: i } = Bl(t);
@@ -4829,7 +4826,7 @@ class gi {
4829
4826
  }
4830
4827
  static build(t, e, i, s, r) {
4831
4828
  let o = new gi(t, e, i, r);
4832
- return o.openEnd = $.spans(s, e, i, o), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o;
4829
+ return o.openEnd = F.spans(s, e, i, o), o.openStart < 0 && (o.openStart = o.openEnd), o.finish(o.openEnd), o;
4833
4830
  }
4834
4831
  }
4835
4832
  function Ni(n, t) {
@@ -4904,7 +4901,7 @@ class yt {
4904
4901
  return yt.define((i) => new t(i), e);
4905
4902
  }
4906
4903
  }
4907
- class Fs {
4904
+ class _s {
4908
4905
  constructor(t) {
4909
4906
  this.spec = t, this.mustUpdate = null, this.value = null;
4910
4907
  }
@@ -4945,13 +4942,13 @@ class Fs {
4945
4942
  this.spec = this.value = null;
4946
4943
  }
4947
4944
  }
4948
- const _l = /* @__PURE__ */ O.define(), er = /* @__PURE__ */ O.define(), xi = /* @__PURE__ */ O.define(), ir = /* @__PURE__ */ O.define(), $l = /* @__PURE__ */ O.define();
4945
+ const $l = /* @__PURE__ */ O.define(), er = /* @__PURE__ */ O.define(), xi = /* @__PURE__ */ O.define(), ir = /* @__PURE__ */ O.define(), Fl = /* @__PURE__ */ O.define();
4949
4946
  function Hr(n, t, e) {
4950
- let i = n.state.facet($l);
4947
+ let i = n.state.facet(Fl);
4951
4948
  if (!i.length)
4952
4949
  return i;
4953
4950
  let s = i.map((o) => o instanceof Function ? o(n) : o), r = [];
4954
- return $.spans(s, t, e, {
4951
+ return F.spans(s, t, e, {
4955
4952
  point() {
4956
4953
  },
4957
4954
  span(o, l, h, a) {
@@ -4969,10 +4966,10 @@ function Hr(n, t, e) {
4969
4966
  }
4970
4967
  }), r;
4971
4968
  }
4972
- const Fl = /* @__PURE__ */ O.define();
4969
+ const _l = /* @__PURE__ */ O.define();
4973
4970
  function zl(n) {
4974
4971
  let t = 0, e = 0, i = 0, s = 0;
4975
- for (let r of n.state.facet(Fl)) {
4972
+ for (let r of n.state.facet(_l)) {
4976
4973
  let o = r(n);
4977
4974
  o && (o.left != null && (t = Math.max(t, o.left)), o.right != null && (e = Math.max(e, o.right)), o.top != null && (i = Math.max(i, o.top)), o.bottom != null && (s = Math.max(s, o.bottom)));
4978
4975
  }
@@ -5087,7 +5084,7 @@ function jl(n) {
5087
5084
  t.push(1 << +n[e]);
5088
5085
  return t;
5089
5086
  }
5090
- const mf = /* @__PURE__ */ jl("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), wf = /* @__PURE__ */ jl("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), An = /* @__PURE__ */ Object.create(null), Ft = [];
5087
+ const mf = /* @__PURE__ */ jl("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"), wf = /* @__PURE__ */ jl("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"), An = /* @__PURE__ */ Object.create(null), _t = [];
5091
5088
  for (let n of ["()", "[]", "{}"]) {
5092
5089
  let t = /* @__PURE__ */ n.charCodeAt(0), e = /* @__PURE__ */ n.charCodeAt(1);
5093
5090
  An[t] = e, An[e] = -t;
@@ -5143,28 +5140,28 @@ function Kl(n, t) {
5143
5140
  }
5144
5141
  return !0;
5145
5142
  }
5146
- const F = [];
5143
+ const _ = [];
5147
5144
  function kf(n, t, e, i, s) {
5148
5145
  for (let r = 0; r <= i.length; r++) {
5149
5146
  let o = r ? i[r - 1].to : t, l = r < i.length ? i[r].from : e, h = r ? 256 : s;
5150
5147
  for (let a = o, c = h, f = h; a < l; a++) {
5151
5148
  let u = yf(n.charCodeAt(a));
5152
- u == 512 ? u = c : u == 8 && f == 4 && (u = 16), F[a] = u == 4 ? 2 : u, u & 7 && (f = u), c = u;
5149
+ u == 512 ? u = c : u == 8 && f == 4 && (u = 16), _[a] = u == 4 ? 2 : u, u & 7 && (f = u), c = u;
5153
5150
  }
5154
5151
  for (let a = o, c = h, f = h; a < l; a++) {
5155
- let u = F[a];
5152
+ let u = _[a];
5156
5153
  if (u == 128)
5157
- a < l - 1 && c == F[a + 1] && c & 24 ? u = F[a] = c : F[a] = 256;
5154
+ a < l - 1 && c == _[a + 1] && c & 24 ? u = _[a] = c : _[a] = 256;
5158
5155
  else if (u == 64) {
5159
5156
  let d = a + 1;
5160
- for (; d < l && F[d] == 64; )
5157
+ for (; d < l && _[d] == 64; )
5161
5158
  d++;
5162
- let p = a && c == 8 || d < e && F[d] == 8 ? f == 1 ? 1 : 8 : 256;
5159
+ let p = a && c == 8 || d < e && _[d] == 8 ? f == 1 ? 1 : 8 : 256;
5163
5160
  for (let m = a; m < d; m++)
5164
- F[m] = p;
5161
+ _[m] = p;
5165
5162
  a = d - 1;
5166
5163
  } else
5167
- u == 8 && f == 1 && (F[a] = 1);
5164
+ u == 8 && f == 1 && (_[a] = 1);
5168
5165
  c = u, u & 7 && (f = u);
5169
5166
  }
5170
5167
  }
@@ -5177,29 +5174,29 @@ function xf(n, t, e, i, s) {
5177
5174
  if (d = An[u = n.charCodeAt(f)])
5178
5175
  if (d < 0) {
5179
5176
  for (let m = l - 3; m >= 0; m -= 3)
5180
- if (Ft[m + 1] == -d) {
5181
- let g = Ft[m + 2], y = g & 2 ? s : g & 4 ? g & 1 ? r : s : 0;
5182
- y && (F[f] = F[Ft[m]] = y), l = m;
5177
+ if (_t[m + 1] == -d) {
5178
+ let g = _t[m + 2], y = g & 2 ? s : g & 4 ? g & 1 ? r : s : 0;
5179
+ y && (_[f] = _[_t[m]] = y), l = m;
5183
5180
  break;
5184
5181
  }
5185
5182
  } else {
5186
- if (Ft.length == 189)
5183
+ if (_t.length == 189)
5187
5184
  break;
5188
- Ft[l++] = f, Ft[l++] = u, Ft[l++] = h;
5185
+ _t[l++] = f, _t[l++] = u, _t[l++] = h;
5189
5186
  }
5190
- else if ((p = F[f]) == 2 || p == 1) {
5187
+ else if ((p = _[f]) == 2 || p == 1) {
5191
5188
  let m = p == s;
5192
5189
  h = m ? 0 : 1;
5193
5190
  for (let g = l - 3; g >= 0; g -= 3) {
5194
- let y = Ft[g + 2];
5191
+ let y = _t[g + 2];
5195
5192
  if (y & 2)
5196
5193
  break;
5197
5194
  if (m)
5198
- Ft[g + 2] |= 2;
5195
+ _t[g + 2] |= 2;
5199
5196
  else {
5200
5197
  if (y & 4)
5201
5198
  break;
5202
- Ft[g + 2] |= 4;
5199
+ _t[g + 2] |= 4;
5203
5200
  }
5204
5201
  }
5205
5202
  }
@@ -5209,7 +5206,7 @@ function vf(n, t, e, i) {
5209
5206
  for (let s = 0, r = i; s <= e.length; s++) {
5210
5207
  let o = s ? e[s - 1].to : n, l = s < e.length ? e[s].from : t;
5211
5208
  for (let h = o; h < l; ) {
5212
- let a = F[h];
5209
+ let a = _[h];
5213
5210
  if (a == 256) {
5214
5211
  let c = h + 1;
5215
5212
  for (; ; )
@@ -5217,13 +5214,13 @@ function vf(n, t, e, i) {
5217
5214
  if (s == e.length)
5218
5215
  break;
5219
5216
  c = e[s++].to, l = s < e.length ? e[s].from : t;
5220
- } else if (F[c] == 256)
5217
+ } else if (_[c] == 256)
5221
5218
  c++;
5222
5219
  else
5223
5220
  break;
5224
- let f = r == 1, u = (c < t ? F[c] : i) == 1, d = f == u ? f ? 1 : 2 : i;
5221
+ let f = r == 1, u = (c < t ? _[c] : i) == 1, d = f == u ? f ? 1 : 2 : i;
5225
5222
  for (let p = c, m = s, g = m ? e[m - 1].to : n; p > h; )
5226
- p == g && (p = e[--m].from, g = m ? e[m - 1].to : n), F[--p] = d;
5223
+ p == g && (p = e[--m].from, g = m ? e[m - 1].to : n), _[--p] = d;
5227
5224
  h = c;
5228
5225
  } else
5229
5226
  r = a, h++;
@@ -5236,7 +5233,7 @@ function On(n, t, e, i, s, r, o) {
5236
5233
  for (let h = t, a = 0; h < e; ) {
5237
5234
  let c = !0, f = !1;
5238
5235
  if (a == r.length || h < r[a].from) {
5239
- let m = F[h];
5236
+ let m = _[h];
5240
5237
  m != l && (c = !1, f = m == 16);
5241
5238
  }
5242
5239
  let u = !c && l == 1 ? [] : null, d = c ? i : i + 1, p = h;
@@ -5253,7 +5250,7 @@ function On(n, t, e, i, s, r, o) {
5253
5250
  if (y < r.length && r[y].from == g)
5254
5251
  g = r[y++].to;
5255
5252
  else {
5256
- if (F[g] == l)
5253
+ if (_[g] == l)
5257
5254
  break t;
5258
5255
  break;
5259
5256
  }
@@ -5267,7 +5264,7 @@ function On(n, t, e, i, s, r, o) {
5267
5264
  }
5268
5265
  p = m.to;
5269
5266
  } else {
5270
- if (p == e || (c ? F[p] != l : F[p] == l))
5267
+ if (p == e || (c ? _[p] != l : _[p] == l))
5271
5268
  break;
5272
5269
  p++;
5273
5270
  }
@@ -5277,7 +5274,7 @@ function On(n, t, e, i, s, r, o) {
5277
5274
  for (let h = e, a = r.length; h > t; ) {
5278
5275
  let c = !0, f = !1;
5279
5276
  if (!a || h > r[a - 1].to) {
5280
- let m = F[h - 1];
5277
+ let m = _[h - 1];
5281
5278
  m != l && (c = !1, f = m == 16);
5282
5279
  }
5283
5280
  let u = !c && l == 1 ? [] : null, d = c ? i : i + 1, p = h;
@@ -5294,7 +5291,7 @@ function On(n, t, e, i, s, r, o) {
5294
5291
  if (y && r[y - 1].to == g)
5295
5292
  g = r[--y].from;
5296
5293
  else {
5297
- if (F[g - 1] == l)
5294
+ if (_[g - 1] == l)
5298
5295
  break t;
5299
5296
  break;
5300
5297
  }
@@ -5308,7 +5305,7 @@ function On(n, t, e, i, s, r, o) {
5308
5305
  }
5309
5306
  p = m.from;
5310
5307
  } else {
5311
- if (p == t || (c ? F[p - 1] != l : F[p - 1] == l))
5308
+ if (p == t || (c ? _[p - 1] != l : _[p - 1] == l))
5312
5309
  break;
5313
5310
  p--;
5314
5311
  }
@@ -5325,8 +5322,8 @@ function Sf(n, t, e) {
5325
5322
  if (t == vi && !e.length && !bf.test(n))
5326
5323
  return ql(n.length);
5327
5324
  if (e.length)
5328
- for (; n.length > F.length; )
5329
- F[F.length] = 256;
5325
+ for (; n.length > _.length; )
5326
+ _[_.length] = 256;
5330
5327
  let i = [], s = t == vi ? 0 : 1;
5331
5328
  return Mn(n, s, s, e, 0, n.length, i), i;
5332
5329
  }
@@ -5356,7 +5353,7 @@ function Cf(n, t, e, i, s) {
5356
5353
  let f = l == (s ? t.length - 1 : 0) ? null : t[l + (s ? 1 : -1)];
5357
5354
  return !f && h.level != e ? b.cursor(s ? n.to : n.from, s ? -1 : 1, e) : f && f.level < h.level ? b.cursor(f.side(!s, e) + n.from, s ? 1 : -1, f.level) : b.cursor(c + n.from, s ? -1 : 1, h.level);
5358
5355
  }
5359
- class _r extends q {
5356
+ class $r extends q {
5360
5357
  get length() {
5361
5358
  return this.view.state.doc.length;
5362
5359
  }
@@ -5396,7 +5393,7 @@ class _r extends q {
5396
5393
  let r = [];
5397
5394
  if (this.view.viewport.from || this.view.viewport.to < this.view.state.doc.length)
5398
5395
  for (let o of this.children)
5399
- o instanceof pe && o.widget instanceof $r && r.push(o.dom);
5396
+ o instanceof pe && o.widget instanceof Fr && r.push(o.dom);
5400
5397
  s.updateGaps(r);
5401
5398
  }
5402
5399
  updateChildren(t, e, i) {
@@ -5626,7 +5623,7 @@ class _r extends q {
5626
5623
  if (o > i) {
5627
5624
  let l = (e.lineBlockAt(o).bottom - e.lineBlockAt(i).top) / this.view.scaleY;
5628
5625
  t.push(N.replace({
5629
- widget: new $r(l),
5626
+ widget: new Fr(l),
5630
5627
  block: !0,
5631
5628
  inclusive: !0,
5632
5629
  isBlockGap: !0
@@ -5675,7 +5672,7 @@ class _r extends q {
5675
5672
  function Af(n) {
5676
5673
  return n.node.nodeType == 1 && n.node.firstChild && (n.offset == 0 || n.node.childNodes[n.offset - 1].contentEditable == "false") && (n.offset == n.node.childNodes.length || n.node.childNodes[n.offset].contentEditable == "false");
5677
5674
  }
5678
- class $r extends Se {
5675
+ class Fr extends Se {
5679
5676
  constructor(t) {
5680
5677
  super(), this.height = t;
5681
5678
  }
@@ -5763,7 +5760,7 @@ let Tf = class {
5763
5760
  };
5764
5761
  function Df(n, t, e) {
5765
5762
  let i = new Tf();
5766
- return $.compare(n, t, e, i), i.changes;
5763
+ return F.compare(n, t, e, i), i.changes;
5767
5764
  }
5768
5765
  function Pf(n, t) {
5769
5766
  for (let e = n; e && e != t; e = e.assignedSlot || e.parentNode)
@@ -5808,7 +5805,7 @@ function Ef(n, t) {
5808
5805
  function zs(n, t) {
5809
5806
  return n.top < t.bottom - 1 && n.bottom > t.top + 1;
5810
5807
  }
5811
- function Fr(n, t) {
5808
+ function _r(n, t) {
5812
5809
  return t < n.top ? { top: t, left: n.left, right: n.right, bottom: n.bottom } : n;
5813
5810
  }
5814
5811
  function zr(n, t) {
@@ -5820,7 +5817,7 @@ function Tn(n, t, e) {
5820
5817
  let m = bi(p);
5821
5818
  for (let g = 0; g < m.length; g++) {
5822
5819
  let y = m[g];
5823
- s && zs(s, y) && (y = Fr(zr(y, s.bottom), s.top));
5820
+ s && zs(s, y) && (y = _r(zr(y, s.bottom), s.top));
5824
5821
  let x = Lf(t, y), S = Ef(e, y);
5825
5822
  if (x == 0 && S == 0)
5826
5823
  return p.nodeType == 3 ? Wr(p, t, e) : Tn(p, t, e);
@@ -5829,7 +5826,7 @@ function Tn(n, t, e) {
5829
5826
  let v = S ? e < y.top ? -1 : 1 : x ? t < y.left ? -1 : 1 : 0;
5830
5827
  l = !v || (v > 0 ? g < m.length - 1 : g > 0);
5831
5828
  }
5832
- x == 0 ? e > y.bottom && (!c || c.bottom < y.bottom) ? (h = p, c = y) : e < y.top && (!f || f.top > y.top) && (a = p, f = y) : c && zs(c, y) ? c = zr(c, y.bottom) : f && zs(f, y) && (f = Fr(f, y.top));
5829
+ x == 0 ? e > y.bottom && (!c || c.bottom < y.bottom) ? (h = p, c = y) : e < y.top && (!f || f.top > y.top) && (a = p, f = y) : c && zs(c, y) ? c = zr(c, y.bottom) : f && zs(f, y) && (f = _r(f, y.top));
5833
5830
  }
5834
5831
  }
5835
5832
  if (c && c.bottom >= e ? (i = h, s = c) : f && f.top <= e && (i = a, s = f), !i)
@@ -5982,14 +5979,14 @@ function Kr(n, t, e, i) {
5982
5979
  l = a;
5983
5980
  }
5984
5981
  }
5985
- function _f(n, t, e) {
5982
+ function $f(n, t, e) {
5986
5983
  let i = n.state.charCategorizer(t), s = i(e);
5987
5984
  return (r) => {
5988
5985
  let o = i(r);
5989
5986
  return s == Zt.Space && (s = o), s == o;
5990
5987
  };
5991
5988
  }
5992
- function $f(n, t, e, i) {
5989
+ function Ff(n, t, e, i) {
5993
5990
  let s = t.head, r = e ? 1 : -1;
5994
5991
  if (s == (e ? n.state.doc.length : 0))
5995
5992
  return b.cursor(s, t.assoc);
@@ -6027,7 +6024,7 @@ function Ws(n, t, e) {
6027
6024
  let i = es(n.state.facet(ir).map((s) => s(n)), e.from, t.head > e.from ? -1 : 1);
6028
6025
  return i == e.from ? e : b.cursor(i, i < e.from ? 1 : -1);
6029
6026
  }
6030
- class Ff {
6027
+ class _f {
6031
6028
  setSelectionOrigin(t) {
6032
6029
  this.lastSelectionOrigin = t, this.lastSelectionTime = Date.now();
6033
6030
  }
@@ -6926,12 +6923,12 @@ class sr {
6926
6923
  // to each other.
6927
6924
  static build(t, e, i, s) {
6928
6925
  let r = new sr(i, t);
6929
- return $.spans(e, i, s, r, 0), r.finish(i);
6926
+ return F.spans(e, i, s, r, 0), r.finish(i);
6930
6927
  }
6931
6928
  }
6932
6929
  function hu(n, t, e) {
6933
6930
  let i = new au();
6934
- return $.compare(n, t, e, i, 0), i.changes;
6931
+ return F.compare(n, t, e, i, 0), i.changes;
6935
6932
  }
6936
6933
  class au {
6937
6934
  constructor() {
@@ -7020,7 +7017,7 @@ class so {
7020
7017
  let s = i ? e.head : e.anchor;
7021
7018
  if (!t.some(({ from: r, to: o }) => s >= r && s <= o)) {
7022
7019
  let { from: r, to: o } = this.lineBlockAt(s);
7023
- t.push(new _i(r, o));
7020
+ t.push(new $i(r, o));
7024
7021
  }
7025
7022
  }
7026
7023
  this.viewports = t.sort((i, s) => i.from - s.from), this.scaler = this.heightMap.height <= 7e6 ? no : new gu(this.heightOracle, this.heightMap, this.viewports);
@@ -7084,19 +7081,19 @@ class so {
7084
7081
  return this.scaler.fromDOM(this.pixelViewport.bottom);
7085
7082
  }
7086
7083
  getViewport(t, e) {
7087
- let i = 0.5 - Math.max(-0.5, Math.min(0.5, t / 1e3 / 2)), s = this.heightMap, r = this.heightOracle, { visibleTop: o, visibleBottom: l } = this, h = new _i(s.lineAt(o - i * 1e3, j.ByHeight, r, 0, 0).from, s.lineAt(l + (1 - i) * 1e3, j.ByHeight, r, 0, 0).to);
7084
+ let i = 0.5 - Math.max(-0.5, Math.min(0.5, t / 1e3 / 2)), s = this.heightMap, r = this.heightOracle, { visibleTop: o, visibleBottom: l } = this, h = new $i(s.lineAt(o - i * 1e3, j.ByHeight, r, 0, 0).from, s.lineAt(l + (1 - i) * 1e3, j.ByHeight, r, 0, 0).to);
7088
7085
  if (e) {
7089
7086
  let { head: a } = e.range;
7090
7087
  if (a < h.from || a > h.to) {
7091
7088
  let c = Math.min(this.editorHeight, this.pixelViewport.bottom - this.pixelViewport.top), f = s.lineAt(a, j.ByPos, r, 0, 0), u;
7092
- e.y == "center" ? u = (f.top + f.bottom) / 2 - c / 2 : e.y == "start" || e.y == "nearest" && a < h.from ? u = f.top : u = f.bottom - c, h = new _i(s.lineAt(u - 1e3 / 2, j.ByHeight, r, 0, 0).from, s.lineAt(u + c + 1e3 / 2, j.ByHeight, r, 0, 0).to);
7089
+ e.y == "center" ? u = (f.top + f.bottom) / 2 - c / 2 : e.y == "start" || e.y == "nearest" && a < h.from ? u = f.top : u = f.bottom - c, h = new $i(s.lineAt(u - 1e3 / 2, j.ByHeight, r, 0, 0).from, s.lineAt(u + c + 1e3 / 2, j.ByHeight, r, 0, 0).to);
7093
7090
  }
7094
7091
  }
7095
7092
  return h;
7096
7093
  }
7097
7094
  mapViewport(t, e) {
7098
7095
  let i = e.mapPos(t.from, -1), s = e.mapPos(t.to, 1);
7099
- return new _i(this.heightMap.lineAt(i, j.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(s, j.ByPos, this.heightOracle, 0, 0).to);
7096
+ return new $i(this.heightMap.lineAt(i, j.ByPos, this.heightOracle, 0, 0).from, this.heightMap.lineAt(s, j.ByPos, this.heightOracle, 0, 0).to);
7100
7097
  }
7101
7098
  // Checks if a given viewport covers the visible part of the
7102
7099
  // document and not too much beyond that.
@@ -7163,26 +7160,26 @@ class so {
7163
7160
  if (i) {
7164
7161
  let p = s / this.heightOracle.lineLength * this.heightOracle.lineHeight, m, g;
7165
7162
  if (f != null) {
7166
- let y = Fi(c, f), x = ((this.visibleBottom - this.visibleTop) / 2 + p) / a.height;
7163
+ let y = _i(c, f), x = ((this.visibleBottom - this.visibleTop) / 2 + p) / a.height;
7167
7164
  m = y - x, g = y + x;
7168
7165
  } else
7169
7166
  m = (this.visibleTop - a.top - p) / a.height, g = (this.visibleBottom - a.top + p) / a.height;
7170
- u = $i(c, m), d = $i(c, g);
7167
+ u = Fi(c, m), d = Fi(c, g);
7171
7168
  } else {
7172
7169
  let p = c.total * this.heightOracle.charWidth, m = s * this.heightOracle.charWidth, g, y;
7173
7170
  if (f != null) {
7174
- let x = Fi(c, f), S = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + m) / p;
7171
+ let x = _i(c, f), S = ((this.pixelViewport.right - this.pixelViewport.left) / 2 + m) / p;
7175
7172
  g = x - S, y = x + S;
7176
7173
  } else
7177
7174
  g = (this.pixelViewport.left - m) / p, y = (this.pixelViewport.right + m) / p;
7178
- u = $i(c, g), d = $i(c, y);
7175
+ u = Fi(c, g), d = Fi(c, y);
7179
7176
  }
7180
7177
  u > a.from && h(a.from, u, a, c), d < a.to && h(d, a.to, a, c);
7181
7178
  }
7182
7179
  return l;
7183
7180
  }
7184
7181
  gapSize(t, e, i, s) {
7185
- let r = Fi(s, i) - Fi(s, e);
7182
+ let r = _i(s, i) - _i(s, e);
7186
7183
  return this.heightOracle.lineWrapping ? t.height * r : s.total * this.heightOracle.charWidth * r;
7187
7184
  }
7188
7185
  updateLineGaps(t) {
@@ -7192,7 +7189,7 @@ class so {
7192
7189
  let t = this.stateDeco;
7193
7190
  this.lineGaps.length && (t = t.concat(this.lineGapDeco));
7194
7191
  let e = [];
7195
- $.spans(t, this.viewport.from, this.viewport.to, {
7192
+ F.spans(t, this.viewport.from, this.viewport.to, {
7196
7193
  span(s, r) {
7197
7194
  e.push({ from: s, to: r });
7198
7195
  },
@@ -7222,14 +7219,14 @@ class so {
7222
7219
  return this.docHeight + this.paddingTop + this.paddingBottom;
7223
7220
  }
7224
7221
  }
7225
- class _i {
7222
+ class $i {
7226
7223
  constructor(t, e) {
7227
7224
  this.from = t, this.to = e;
7228
7225
  }
7229
7226
  }
7230
7227
  function du(n, t, e) {
7231
7228
  let i = [], s = n, r = 0;
7232
- return $.spans(e, n, t, {
7229
+ return F.spans(e, n, t, {
7233
7230
  span() {
7234
7231
  },
7235
7232
  point(o, l) {
@@ -7237,7 +7234,7 @@ function du(n, t, e) {
7237
7234
  }
7238
7235
  }, 20), s < t && (i.push({ from: s, to: t }), r += t - s), { total: r, ranges: i };
7239
7236
  }
7240
- function $i({ total: n, ranges: t }, e) {
7237
+ function Fi({ total: n, ranges: t }, e) {
7241
7238
  if (e <= 0)
7242
7239
  return t[0].from;
7243
7240
  if (e >= 1)
@@ -7250,7 +7247,7 @@ function $i({ total: n, ranges: t }, e) {
7250
7247
  i -= l;
7251
7248
  }
7252
7249
  }
7253
- function Fi(n, t) {
7250
+ function _i(n, t) {
7254
7251
  let e = 0;
7255
7252
  for (let { from: i, to: s } of n.ranges) {
7256
7253
  if (t <= s) {
@@ -8073,10 +8070,10 @@ class T {
8073
8070
  constructor(t = {}) {
8074
8071
  this.plugins = [], this.pluginMap = /* @__PURE__ */ new Map(), this.editorAttrs = {}, this.contentAttrs = {}, this.bidiCache = [], this.destroyed = !1, this.updateState = 2, this.measureScheduled = -1, this.measureRequests = [], this.contentDOM = document.createElement("div"), this.scrollDOM = document.createElement("div"), this.scrollDOM.tabIndex = -1, this.scrollDOM.className = "cm-scroller", this.scrollDOM.appendChild(this.contentDOM), this.announceDOM = document.createElement("div"), this.announceDOM.style.cssText = "position: fixed; top: -10000px", this.announceDOM.setAttribute("aria-live", "polite"), this.dom = document.createElement("div"), this.dom.appendChild(this.announceDOM), this.dom.appendChild(this.scrollDOM);
8075
8072
  let { dispatch: e } = t;
8076
- this.dispatchTransactions = t.dispatchTransactions || e && ((i) => i.forEach((s) => e(s, this))) || ((i) => this.update(i)), this.dispatch = this.dispatch.bind(this), this._root = t.root || lf(t.parent) || document, this.viewState = new so(t.state || H.create(t)), t.scrollTo && t.scrollTo.is(Ii) && (this.viewState.scrollTarget = t.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(hi).map((i) => new Fs(i));
8073
+ this.dispatchTransactions = t.dispatchTransactions || e && ((i) => i.forEach((s) => e(s, this))) || ((i) => this.update(i)), this.dispatch = this.dispatch.bind(this), this._root = t.root || lf(t.parent) || document, this.viewState = new so(t.state || H.create(t)), t.scrollTo && t.scrollTo.is(Ii) && (this.viewState.scrollTarget = t.scrollTo.value.clip(this.viewState.state)), this.plugins = this.state.facet(hi).map((i) => new _s(i));
8077
8074
  for (let i of this.plugins)
8078
8075
  i.update(this);
8079
- this.observer = new Au(this), this.inputState = new Ff(this), this.inputState.ensureHandlers(this.plugins), this.docView = new _r(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(), t.parent && t.parent.appendChild(this.dom);
8076
+ this.observer = new Au(this), this.inputState = new _f(this), this.inputState.ensureHandlers(this.plugins), this.docView = new $r(this), this.mountStyles(), this.updateAttrs(), this.updateState = 0, this.requestMeasure(), t.parent && t.parent.appendChild(this.dom);
8080
8077
  }
8081
8078
  dispatch(...t) {
8082
8079
  let e = t.length == 1 && t[0] instanceof ft ? t : t.length == 1 && Array.isArray(t[0]) ? t[0] : [this.state.update(...t)];
@@ -8154,10 +8151,10 @@ class T {
8154
8151
  try {
8155
8152
  for (let i of this.plugins)
8156
8153
  i.destroy(this);
8157
- this.viewState = new so(t), this.plugins = t.facet(hi).map((i) => new Fs(i)), this.pluginMap.clear();
8154
+ this.viewState = new so(t), this.plugins = t.facet(hi).map((i) => new _s(i)), this.pluginMap.clear();
8158
8155
  for (let i of this.plugins)
8159
8156
  i.update(this);
8160
- this.docView = new _r(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = [];
8157
+ this.docView = new $r(this), this.inputState.ensureHandlers(this.plugins), this.mountStyles(), this.updateAttrs(), this.bidiCache = [];
8161
8158
  } finally {
8162
8159
  this.updateState = 0;
8163
8160
  }
@@ -8170,7 +8167,7 @@ class T {
8170
8167
  for (let r of i) {
8171
8168
  let o = e.indexOf(r);
8172
8169
  if (o < 0)
8173
- s.push(new Fs(r));
8170
+ s.push(new _s(r));
8174
8171
  else {
8175
8172
  let l = this.plugins[o];
8176
8173
  l.mustUpdate = t, s.push(l);
@@ -8263,7 +8260,7 @@ class T {
8263
8260
  return Bn + " " + (this.state.facet(Pn) ? hh : lh) + " " + this.state.facet(zi);
8264
8261
  }
8265
8262
  updateAttrs() {
8266
- let t = ao(this, _l, {
8263
+ let t = ao(this, $l, {
8267
8264
  class: "cm-editor" + (this.hasFocus ? " cm-focused " : " ") + this.themeClasses
8268
8265
  }), e = {
8269
8266
  spellcheck: "false",
@@ -8431,7 +8428,7 @@ class T {
8431
8428
  non-whitespace characters.
8432
8429
  */
8433
8430
  moveByGroup(t, e) {
8434
- return Ws(this, t, Kr(this, t, e, (i) => _f(this, t.head, i)));
8431
+ return Ws(this, t, Kr(this, t, e, (i) => $f(this, t.head, i)));
8435
8432
  }
8436
8433
  /**
8437
8434
  Move to the next line boundary in the given direction. If
@@ -8457,7 +8454,7 @@ class T {
8457
8454
  used.
8458
8455
  */
8459
8456
  moveVertically(t, e, i) {
8460
- return Ws(this, t, $f(this, t, e, i));
8457
+ return Ws(this, t, Ff(this, t, e, i));
8461
8458
  }
8462
8459
  /**
8463
8460
  Find the DOM parent node and offset (child offset if `node` is
@@ -8708,12 +8705,12 @@ T.dragMovesSelection = Ll;
8708
8705
  T.clickAddsSelectionRange = Rl;
8709
8706
  T.decorations = xi;
8710
8707
  T.atomicRanges = ir;
8711
- T.bidiIsolatedRanges = $l;
8712
- T.scrollMargins = Fl;
8708
+ T.bidiIsolatedRanges = Fl;
8709
+ T.scrollMargins = _l;
8713
8710
  T.darkTheme = Pn;
8714
8711
  T.cspNonce = /* @__PURE__ */ O.define({ combine: (n) => n.length ? n[0] : "" });
8715
8712
  T.contentAttributes = er;
8716
- T.editorAttributes = _l;
8713
+ T.editorAttributes = $l;
8717
8714
  T.lineWrapping = /* @__PURE__ */ T.contentAttributes.of({ class: "cm-lineWrapping" });
8718
8715
  T.announce = /* @__PURE__ */ z.define();
8719
8716
  const Mu = 4096, ho = {};
@@ -8934,8 +8931,8 @@ class Hu {
8934
8931
  return e;
8935
8932
  }
8936
8933
  }
8937
- const Ln = /x/.unicode != null ? "gu" : "g", _u = /* @__PURE__ */ new RegExp(`[\0-\b
8938
- --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`, Ln), $u = {
8934
+ const Ln = /x/.unicode != null ? "gu" : "g", $u = /* @__PURE__ */ new RegExp(`[\0-\b
8935
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`, Ln), Fu = {
8939
8936
  0: "null",
8940
8937
  7: "bell",
8941
8938
  8: "backspace",
@@ -8959,7 +8956,7 @@ const Ln = /x/.unicode != null ? "gu" : "g", _u = /* @__PURE__ */ new RegExp(`[\
8959
8956
  65532: "object replacement"
8960
8957
  };
8961
8958
  let qs = null;
8962
- function Fu() {
8959
+ function _u() {
8963
8960
  var n;
8964
8961
  if (qs == null && typeof document < "u" && document.body) {
8965
8962
  let t = document.body.style;
@@ -8971,10 +8968,10 @@ const ss = /* @__PURE__ */ O.define({
8971
8968
  combine(n) {
8972
8969
  let t = Ds(n, {
8973
8970
  render: null,
8974
- specialChars: _u,
8971
+ specialChars: $u,
8975
8972
  addSpecialChars: null
8976
8973
  });
8977
- return (t.replaceTabs = !Fu()) && (t.specialChars = new RegExp(" |" + t.specialChars.source, Ln)), t.addSpecialChars && (t.specialChars = new RegExp(t.specialChars.source + "|" + t.addSpecialChars.source, Ln)), t;
8974
+ return (t.replaceTabs = !_u()) && (t.specialChars = new RegExp(" |" + t.specialChars.source, Ln)), t.addSpecialChars && (t.specialChars = new RegExp(t.specialChars.source + "|" + t.addSpecialChars.source, Ln)), t;
8978
8975
  }
8979
8976
  });
8980
8977
  function zu(n = {}) {
@@ -9022,7 +9019,7 @@ class qu extends Se {
9022
9019
  return t.code == this.code;
9023
9020
  }
9024
9021
  toDOM(t) {
9025
- let e = Ku(this.code), i = t.state.phrase("Control character") + " " + ($u[this.code] || "0x" + this.code.toString(16)), s = this.options.render && this.options.render(this.code, i, e);
9022
+ let e = Ku(this.code), i = t.state.phrase("Control character") + " " + (Fu[this.code] || "0x" + this.code.toString(16)), s = this.options.render && this.options.render(this.code, i, e);
9026
9023
  if (s)
9027
9024
  return s;
9028
9025
  let r = document.createElement("span");
@@ -9610,7 +9607,7 @@ const ns = /* @__PURE__ */ O.define(), ld = {
9610
9607
  class: "",
9611
9608
  renderEmptyElements: !1,
9612
9609
  elementStyle: "",
9613
- markers: () => $.empty,
9610
+ markers: () => F.empty,
9614
9611
  lineMarker: () => null,
9615
9612
  widgetMarker: () => null,
9616
9613
  lineMarkerChange: null,
@@ -9647,7 +9644,7 @@ const cd = /* @__PURE__ */ yt.fromClass(class {
9647
9644
  syncGutters(n) {
9648
9645
  let t = this.dom.nextSibling;
9649
9646
  n && this.dom.remove();
9650
- let e = $.iter(this.view.state.facet(ns), this.view.viewport.from), i = [], s = this.gutters.map((r) => new fd(r, this.view.viewport, -this.view.documentPadding.top));
9647
+ let e = F.iter(this.view.state.facet(ns), this.view.viewport.from), i = [], s = this.gutters.map((r) => new fd(r, this.view.viewport, -this.view.documentPadding.top));
9651
9648
  for (let r of this.view.viewportLineBlocks)
9652
9649
  if (i.length && (i = []), Array.isArray(r.type)) {
9653
9650
  let o = !0;
@@ -9672,7 +9669,7 @@ const cd = /* @__PURE__ */ yt.fromClass(class {
9672
9669
  n && this.view.scrollDOM.insertBefore(this.dom, t);
9673
9670
  }
9674
9671
  updateGutters(n) {
9675
- let t = n.startState.facet(rs), e = n.state.facet(rs), i = n.docChanged || n.heightChanged || n.viewportChanged || !$.eq(n.startState.facet(ns), n.state.facet(ns), n.view.viewport.from, n.view.viewport.to);
9672
+ let t = n.startState.facet(rs), e = n.state.facet(rs), i = n.docChanged || n.heightChanged || n.viewportChanged || !F.eq(n.startState.facet(ns), n.state.facet(ns), n.view.viewport.from, n.view.viewport.to);
9676
9673
  if (t == e)
9677
9674
  for (let s of this.gutters)
9678
9675
  s.update(n) && (i = !0);
@@ -9711,7 +9708,7 @@ function In(n, t, e) {
9711
9708
  }
9712
9709
  class fd {
9713
9710
  constructor(t, e, i) {
9714
- this.gutter = t, this.height = i, this.i = 0, this.cursor = $.iter(t.markers, e.from);
9711
+ this.gutter = t, this.height = i, this.i = 0, this.cursor = F.iter(t.markers, e.from);
9715
9712
  }
9716
9713
  addElement(t, e, i) {
9717
9714
  let { gutter: s } = this, r = (e.top - this.height) / t.scaleY, o = e.height / t.scaleY;
@@ -9767,7 +9764,7 @@ class bo {
9767
9764
  s != this.spacer.markers[0] && this.spacer.update(t.view, 0, 0, [s]);
9768
9765
  }
9769
9766
  let i = t.view.viewport;
9770
- return !$.eq(this.markers, e, i.from, i.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(t) : !1);
9767
+ return !F.eq(this.markers, e, i.from, i.to) || (this.config.lineMarkerChange ? this.config.lineMarkerChange(t) : !1);
9771
9768
  }
9772
9769
  destroy() {
9773
9770
  for (let t of this.elements)
@@ -9831,7 +9828,7 @@ const dd = /* @__PURE__ */ new class extends ke {
9831
9828
  let s = n.doc.lineAt(i.head).from;
9832
9829
  s > e && (e = s, t.push(dd.range(s)));
9833
9830
  }
9834
- return $.of(t);
9831
+ return F.of(t);
9835
9832
  });
9836
9833
  function gd() {
9837
9834
  return pd;
@@ -10908,7 +10905,7 @@ function lr(n) {
10908
10905
  function xd(n) {
10909
10906
  var t;
10910
10907
  let { buffer: e, nodeSet: i, maxBufferLength: s = mh, reused: r = [], minRepeatType: o = i.types.length } = n, l = Array.isArray(e) ? new or(e, e.length) : e, h = i.types, a = 0, c = 0;
10911
- function f(A, P, M, I, W, _) {
10908
+ function f(A, P, M, I, W, $) {
10912
10909
  let { id: L, start: E, end: Y, size: U } = l, gt = c;
10913
10910
  for (; U < 0; )
10914
10911
  if (l.next(), U == -1) {
@@ -10923,28 +10920,28 @@ function xd(n) {
10923
10920
  return;
10924
10921
  } else
10925
10922
  throw new RangeError(`Unrecognized record size: ${U}`);
10926
- let Ae = h[L], _e, Oe, wr = E - A;
10923
+ let Ae = h[L], $e, Oe, wr = E - A;
10927
10924
  if (Y - E <= s && (Oe = g(l.pos - P, W))) {
10928
- let Jt = new Uint16Array(Oe.size - Oe.skip), Ot = l.pos - Oe.size, $t = Jt.length;
10925
+ let Jt = new Uint16Array(Oe.size - Oe.skip), Ot = l.pos - Oe.size, Ft = Jt.length;
10929
10926
  for (; l.pos > Ot; )
10930
- $t = y(Oe.start, Jt, $t);
10931
- _e = new xe(Jt, Y - Oe.start, i), wr = Oe.start - A;
10927
+ Ft = y(Oe.start, Jt, Ft);
10928
+ $e = new xe(Jt, Y - Oe.start, i), wr = Oe.start - A;
10932
10929
  } else {
10933
10930
  let Jt = l.pos - U;
10934
10931
  l.next();
10935
- let Ot = [], $t = [], Me = L >= o ? L : -1, $e = 0, Ri = Y;
10932
+ let Ot = [], Ft = [], Me = L >= o ? L : -1, Fe = 0, Ri = Y;
10936
10933
  for (; l.pos > Jt; )
10937
- Me >= 0 && l.id == Me && l.size >= 0 ? (l.end <= Ri - s && (p(Ot, $t, E, $e, l.end, Ri, Me, gt), $e = Ot.length, Ri = l.end), l.next()) : _ > 2500 ? u(E, Jt, Ot, $t) : f(E, Jt, Ot, $t, Me, _ + 1);
10938
- if (Me >= 0 && $e > 0 && $e < Ot.length && p(Ot, $t, E, $e, E, Ri, Me, gt), Ot.reverse(), $t.reverse(), Me > -1 && $e > 0) {
10934
+ Me >= 0 && l.id == Me && l.size >= 0 ? (l.end <= Ri - s && (p(Ot, Ft, E, Fe, l.end, Ri, Me, gt), Fe = Ot.length, Ri = l.end), l.next()) : $ > 2500 ? u(E, Jt, Ot, Ft) : f(E, Jt, Ot, Ft, Me, $ + 1);
10935
+ if (Me >= 0 && Fe > 0 && Fe < Ot.length && p(Ot, Ft, E, Fe, E, Ri, Me, gt), Ot.reverse(), Ft.reverse(), Me > -1 && Fe > 0) {
10939
10936
  let yr = d(Ae);
10940
- _e = hr(Ae, Ot, $t, 0, Ot.length, 0, Y - E, yr, yr);
10937
+ $e = hr(Ae, Ot, Ft, 0, Ot.length, 0, Y - E, yr, yr);
10941
10938
  } else
10942
- _e = m(Ae, Ot, $t, Y - E, gt - Y);
10939
+ $e = m(Ae, Ot, Ft, Y - E, gt - Y);
10943
10940
  }
10944
- M.push(_e), I.push(wr);
10941
+ M.push($e), I.push(wr);
10945
10942
  }
10946
10943
  function u(A, P, M, I) {
10947
- let W = [], _ = 0, L = -1;
10944
+ let W = [], $ = 0, L = -1;
10948
10945
  for (; l.pos > P; ) {
10949
10946
  let { id: E, start: Y, end: U, size: gt } = l;
10950
10947
  if (gt > 4)
@@ -10952,11 +10949,11 @@ function xd(n) {
10952
10949
  else {
10953
10950
  if (L > -1 && Y < L)
10954
10951
  break;
10955
- L < 0 && (L = U - s), W.push(E, Y, U), _++, l.next();
10952
+ L < 0 && (L = U - s), W.push(E, Y, U), $++, l.next();
10956
10953
  }
10957
10954
  }
10958
- if (_) {
10959
- let E = new Uint16Array(_ * 4), Y = W[W.length - 2];
10955
+ if ($) {
10956
+ let E = new Uint16Array($ * 4), Y = W[W.length - 2];
10960
10957
  for (let U = W.length - 3, gt = 0; U >= 0; U -= 3)
10961
10958
  E[gt++] = W[U], E[gt++] = W[U + 1] - Y, E[gt++] = W[U + 2] - Y, E[gt++] = gt;
10962
10959
  M.push(new xe(E, W[2] - Y, i)), I.push(Y - A);
@@ -10964,45 +10961,45 @@ function xd(n) {
10964
10961
  }
10965
10962
  function d(A) {
10966
10963
  return (P, M, I) => {
10967
- let W = 0, _ = P.length - 1, L, E;
10968
- if (_ >= 0 && (L = P[_]) instanceof X) {
10969
- if (!_ && L.type == A && L.length == I)
10964
+ let W = 0, $ = P.length - 1, L, E;
10965
+ if ($ >= 0 && (L = P[$]) instanceof X) {
10966
+ if (!$ && L.type == A && L.length == I)
10970
10967
  return L;
10971
- (E = L.prop(R.lookAhead)) && (W = M[_] + L.length + E);
10968
+ (E = L.prop(R.lookAhead)) && (W = M[$] + L.length + E);
10972
10969
  }
10973
10970
  return m(A, P, M, I, W);
10974
10971
  };
10975
10972
  }
10976
- function p(A, P, M, I, W, _, L, E) {
10973
+ function p(A, P, M, I, W, $, L, E) {
10977
10974
  let Y = [], U = [];
10978
10975
  for (; A.length > I; )
10979
10976
  Y.push(A.pop()), U.push(P.pop() + M - W);
10980
- A.push(m(i.types[L], Y, U, _ - W, E - _)), P.push(W - M);
10977
+ A.push(m(i.types[L], Y, U, $ - W, E - $)), P.push(W - M);
10981
10978
  }
10982
- function m(A, P, M, I, W = 0, _) {
10979
+ function m(A, P, M, I, W = 0, $) {
10983
10980
  if (a) {
10984
10981
  let L = [R.contextHash, a];
10985
- _ = _ ? [L].concat(_) : [L];
10982
+ $ = $ ? [L].concat($) : [L];
10986
10983
  }
10987
10984
  if (W > 25) {
10988
10985
  let L = [R.lookAhead, W];
10989
- _ = _ ? [L].concat(_) : [L];
10986
+ $ = $ ? [L].concat($) : [L];
10990
10987
  }
10991
- return new X(A, P, M, I, _);
10988
+ return new X(A, P, M, I, $);
10992
10989
  }
10993
10990
  function g(A, P) {
10994
- let M = l.fork(), I = 0, W = 0, _ = 0, L = M.end - s, E = { size: 0, start: 0, skip: 0 };
10991
+ let M = l.fork(), I = 0, W = 0, $ = 0, L = M.end - s, E = { size: 0, start: 0, skip: 0 };
10995
10992
  t:
10996
10993
  for (let Y = M.pos - A; M.pos > Y; ) {
10997
10994
  let U = M.size;
10998
10995
  if (M.id == P && U >= 0) {
10999
- E.size = I, E.start = W, E.skip = _, _ += 4, I += 4, M.next();
10996
+ E.size = I, E.start = W, E.skip = $, $ += 4, I += 4, M.next();
11000
10997
  continue;
11001
10998
  }
11002
10999
  let gt = M.pos - U;
11003
11000
  if (U < 0 || gt < Y || M.start < L)
11004
11001
  break;
11005
- let Ae = M.id >= o ? 4 : 0, _e = M.start;
11002
+ let Ae = M.id >= o ? 4 : 0, $e = M.start;
11006
11003
  for (M.next(); M.pos > gt; ) {
11007
11004
  if (M.size < 0)
11008
11005
  if (M.size == -3)
@@ -11013,12 +11010,12 @@ function xd(n) {
11013
11010
  M.id >= o && (Ae += 4);
11014
11011
  M.next();
11015
11012
  }
11016
- W = _e, I += U, _ += Ae;
11013
+ W = $e, I += U, $ += Ae;
11017
11014
  }
11018
- return (P < 0 || I == A) && (E.size = I, E.start = W, E.skip = _), E.size > 4 ? E : void 0;
11015
+ return (P < 0 || I == A) && (E.size = I, E.start = W, E.skip = $), E.size > 4 ? E : void 0;
11019
11016
  }
11020
11017
  function y(A, P, M) {
11021
- let { id: I, start: W, end: _, size: L } = l;
11018
+ let { id: I, start: W, end: $, size: L } = l;
11022
11019
  if (l.next(), L >= 0 && I < o) {
11023
11020
  let E = M;
11024
11021
  if (L > 4) {
@@ -11026,7 +11023,7 @@ function xd(n) {
11026
11023
  for (; l.pos > Y; )
11027
11024
  M = y(A, P, M);
11028
11025
  }
11029
- P[--M] = E, P[--M] = _ - A, P[--M] = W - A, P[--M] = I;
11026
+ P[--M] = E, P[--M] = $ - A, P[--M] = W - A, P[--M] = I;
11030
11027
  } else
11031
11028
  L == -3 ? a = I : L == -4 && (c = I);
11032
11029
  return M;
@@ -11416,7 +11413,7 @@ function Pd(n) {
11416
11413
  t = t.next;
11417
11414
  return t || null;
11418
11415
  }
11419
- const k = Kt.define, qi = k(), le = k(), So = k(le), Co = k(le), he = k(), Gi = k(he), Ys = k(he), jt = k(), Te = k(jt), zt = k(), Wt = k(), _n = k(), ri = k(_n), Ui = k(), w = {
11416
+ const k = Kt.define, qi = k(), le = k(), So = k(le), Co = k(le), he = k(), Gi = k(he), Ys = k(he), jt = k(), Te = k(jt), zt = k(), Wt = k(), $n = k(), ri = k($n), Ui = k(), w = {
11420
11417
  /**
11421
11418
  A comment.
11422
11419
  */
@@ -11611,12 +11608,12 @@ const k = Kt.define, qi = k(), le = k(), So = k(le), Co = k(le), he = k(), Gi =
11611
11608
  /**
11612
11609
  Program or markup punctuation.
11613
11610
  */
11614
- punctuation: _n,
11611
+ punctuation: $n,
11615
11612
  /**
11616
11613
  [Punctuation](#highlight.tags.punctuation) that separates
11617
11614
  things.
11618
11615
  */
11619
- separator: k(_n),
11616
+ separator: k($n),
11620
11617
  /**
11621
11618
  Bracket-style [punctuation](#highlight.tags.punctuation).
11622
11619
  */
@@ -12155,7 +12152,7 @@ typeof requestIdleCallback < "u" && (Ch = (n) => {
12155
12152
  let t = -1, e = setTimeout(
12156
12153
  () => {
12157
12154
  t = requestIdleCallback(n, {
12158
- timeout: 500 - 100
12155
+ timeout: 400
12159
12156
  /* Work.MinPause */
12160
12157
  });
12161
12158
  },
@@ -12339,7 +12336,7 @@ function Vd(n, t, e) {
12339
12336
  }
12340
12337
  function Oh(n, t, e) {
12341
12338
  for (let i = n; i; i = i.next) {
12342
- let s = _d(i.node);
12339
+ let s = $d(i.node);
12343
12340
  if (s)
12344
12341
  return s(fr.create(t, e, i));
12345
12342
  }
@@ -12348,7 +12345,7 @@ function Oh(n, t, e) {
12348
12345
  function Hd(n) {
12349
12346
  return n.pos == n.options.simulateBreak && n.options.simulateDoubleBreak;
12350
12347
  }
12351
- function _d(n) {
12348
+ function $d(n) {
12352
12349
  let t = n.type.prop(Ah);
12353
12350
  if (t)
12354
12351
  return t;
@@ -12357,9 +12354,9 @@ function _d(n) {
12357
12354
  let s = n.lastChild, r = s && i.indexOf(s.name) > -1;
12358
12355
  return (o) => Wd(o, !0, 1, void 0, r && !Hd(o) ? s.from : void 0);
12359
12356
  }
12360
- return n.parent == null ? $d : null;
12357
+ return n.parent == null ? Fd : null;
12361
12358
  }
12362
- function $d() {
12359
+ function Fd() {
12363
12360
  return 0;
12364
12361
  }
12365
12362
  class fr extends Rs {
@@ -12406,7 +12403,7 @@ class fr extends Rs {
12406
12403
  let i = t.resolve(e.from);
12407
12404
  for (; i.parent && i.parent.from == i.from; )
12408
12405
  i = i.parent;
12409
- if (Fd(i, t))
12406
+ if (_d(i, t))
12410
12407
  break;
12411
12408
  e = this.state.doc.lineAt(i.from);
12412
12409
  }
@@ -12420,7 +12417,7 @@ class fr extends Rs {
12420
12417
  return Oh(this.context.next, this.base, this.pos);
12421
12418
  }
12422
12419
  }
12423
- function Fd(n, t) {
12420
+ function _d(n, t) {
12424
12421
  for (let e = t; e; e = e.parent)
12425
12422
  if (n == e)
12426
12423
  return !0;
@@ -12714,7 +12711,7 @@ function rp(n = {}) {
12714
12711
  class: "cm-foldGutter",
12715
12712
  markers(o) {
12716
12713
  var l;
12717
- return ((l = o.plugin(s)) === null || l === void 0 ? void 0 : l.markers) || $.empty;
12714
+ return ((l = o.plugin(s)) === null || l === void 0 ? void 0 : l.markers) || F.empty;
12718
12715
  },
12719
12716
  initialSpacer() {
12720
12717
  return new Xs(t, !1);
@@ -12782,18 +12779,18 @@ class Pi {
12782
12779
  return new Pi(t, e || {});
12783
12780
  }
12784
12781
  }
12785
- const $n = /* @__PURE__ */ O.define(), Eh = /* @__PURE__ */ O.define({
12782
+ const Fn = /* @__PURE__ */ O.define(), Eh = /* @__PURE__ */ O.define({
12786
12783
  combine(n) {
12787
12784
  return n.length ? [n[0]] : null;
12788
12785
  }
12789
12786
  });
12790
12787
  function Zs(n) {
12791
- let t = n.facet($n);
12788
+ let t = n.facet(Fn);
12792
12789
  return t.length ? t : n.facet(Eh);
12793
12790
  }
12794
12791
  function Do(n, t) {
12795
12792
  let e = [hp], i;
12796
- return n instanceof Pi && (n.module && e.push(T.styleModule.of(n.module)), i = n.themeType), t != null && t.fallback ? e.push(Eh.of(n)) : i ? e.push($n.computeN([T.darkTheme], (s) => s.facet(T.darkTheme) == (i == "dark") ? [n] : [])) : e.push($n.of(n)), e;
12793
+ return n instanceof Pi && (n.module && e.push(T.styleModule.of(n.module)), i = n.themeType), t != null && t.fallback ? e.push(Eh.of(n)) : i ? e.push(Fn.computeN([T.darkTheme], (s) => s.facet(T.darkTheme) == (i == "dark") ? [n] : [])) : e.push(Fn.of(n)), e;
12797
12794
  }
12798
12795
  class lp {
12799
12796
  constructor(t) {
@@ -12936,7 +12933,7 @@ function mp(n = {}) {
12936
12933
  return [Vh.of(n), gp];
12937
12934
  }
12938
12935
  const wp = /* @__PURE__ */ new R();
12939
- function Fn(n, t, e) {
12936
+ function _n(n, t, e) {
12940
12937
  let i = n.prop(t < 0 ? R.openedBy : R.closedBy);
12941
12938
  if (i)
12942
12939
  return i;
@@ -12954,7 +12951,7 @@ function zn(n) {
12954
12951
  function Yt(n, t, e, i = {}) {
12955
12952
  let s = i.maxScanDistance || Nh, r = i.brackets || Ih, o = At(n), l = o.resolveInner(t, e);
12956
12953
  for (let h = l; h; h = h.parent) {
12957
- let a = Fn(h.type, e, r);
12954
+ let a = _n(h.type, e, r);
12958
12955
  if (a && h.from < h.to) {
12959
12956
  let c = zn(h);
12960
12957
  if (c && (e > 0 ? t >= c.from && t < c.to : t > c.from && t <= c.to))
@@ -12971,9 +12968,9 @@ function yp(n, t, e, i, s, r, o) {
12971
12968
  if (a == 0 && r.indexOf(c.type.name) > -1 && c.from < c.to) {
12972
12969
  let f = zn(c);
12973
12970
  return { start: h, end: f ? { from: f.from, to: f.to } : void 0, matched: !0 };
12974
- } else if (Fn(c.type, e, o))
12971
+ } else if (_n(c.type, e, o))
12975
12972
  a++;
12976
- else if (Fn(c.type, -e, o)) {
12973
+ else if (_n(c.type, -e, o)) {
12977
12974
  if (a == 0) {
12978
12975
  let f = zn(c);
12979
12976
  return {
@@ -13171,22 +13168,22 @@ function ei(n, t) {
13171
13168
  function Qt(n, t) {
13172
13169
  return n.update({ selection: t, scrollIntoView: !0, userEvent: "select" });
13173
13170
  }
13174
- function _t({ state: n, dispatch: t }, e) {
13171
+ function $t({ state: n, dispatch: t }, e) {
13175
13172
  let i = ei(n.selection, e);
13176
13173
  return i.eq(n.selection) ? !1 : (t(Qt(n, i)), !0);
13177
13174
  }
13178
13175
  function Es(n, t) {
13179
13176
  return b.cursor(t ? n.to : n.from);
13180
13177
  }
13181
- function _h(n, t) {
13182
- return _t(n, (e) => e.empty ? n.moveByChar(e, t) : Es(e, t));
13178
+ function $h(n, t) {
13179
+ return $t(n, (e) => e.empty ? n.moveByChar(e, t) : Es(e, t));
13183
13180
  }
13184
13181
  function ut(n) {
13185
13182
  return n.textDirectionAt(n.state.selection.main.head) == tt.LTR;
13186
13183
  }
13187
- const $h = (n) => _h(n, !ut(n)), Fh = (n) => _h(n, ut(n));
13184
+ const Fh = (n) => $h(n, !ut(n)), _h = (n) => $h(n, ut(n));
13188
13185
  function zh(n, t) {
13189
- return _t(n, (e) => e.empty ? n.moveByGroup(e, t) : Es(e, t));
13186
+ return $t(n, (e) => e.empty ? n.moveByGroup(e, t) : Es(e, t));
13190
13187
  }
13191
13188
  const Pp = (n) => zh(n, !ut(n)), Bp = (n) => zh(n, ut(n));
13192
13189
  function Rp(n, t, e) {
@@ -13206,9 +13203,9 @@ function Ns(n, t, e) {
13206
13203
  let r = i.type.prop(s), o, l;
13207
13204
  return r && (o = e ? Yt(n, i.from, 1) : Yt(n, i.to, -1)) && o.matched ? l = e ? o.end.to : o.end.from : l = e ? i.to : i.from, b.cursor(l, e ? -1 : 1);
13208
13205
  }
13209
- const Lp = (n) => _t(n, (t) => Ns(n.state, t, !ut(n))), Ep = (n) => _t(n, (t) => Ns(n.state, t, ut(n)));
13206
+ const Lp = (n) => $t(n, (t) => Ns(n.state, t, !ut(n))), Ep = (n) => $t(n, (t) => Ns(n.state, t, ut(n)));
13210
13207
  function Wh(n, t) {
13211
- return _t(n, (e) => {
13208
+ return $t(n, (e) => {
13212
13209
  if (!e.empty)
13213
13210
  return Es(e, t);
13214
13211
  let i = n.moveVertically(e, t);
@@ -13253,8 +13250,8 @@ function Ce(n, t, e) {
13253
13250
  }
13254
13251
  return s;
13255
13252
  }
13256
- const Np = (n) => _t(n, (t) => Ce(n, t, !0)), Ip = (n) => _t(n, (t) => Ce(n, t, !1)), Vp = (n) => _t(n, (t) => Ce(n, t, !ut(n))), Hp = (n) => _t(n, (t) => Ce(n, t, ut(n))), _p = (n) => _t(n, (t) => b.cursor(n.lineBlockAt(t.head).from, 1)), $p = (n) => _t(n, (t) => b.cursor(n.lineBlockAt(t.head).to, -1));
13257
- function Fp(n, t, e) {
13253
+ const Np = (n) => $t(n, (t) => Ce(n, t, !0)), Ip = (n) => $t(n, (t) => Ce(n, t, !1)), Vp = (n) => $t(n, (t) => Ce(n, t, !ut(n))), Hp = (n) => $t(n, (t) => Ce(n, t, ut(n))), $p = (n) => $t(n, (t) => b.cursor(n.lineBlockAt(t.head).from, 1)), Fp = (n) => $t(n, (t) => b.cursor(n.lineBlockAt(t.head).to, -1));
13254
+ function _p(n, t, e) {
13258
13255
  let i = !1, s = ei(n.selection, (r) => {
13259
13256
  let o = Yt(n, r.head, -1) || Yt(n, r.head, 1) || r.head > 0 && Yt(n, r.head - 1, 1) || r.head < n.doc.length && Yt(n, r.head + 1, -1);
13260
13257
  if (!o || !o.end)
@@ -13265,7 +13262,7 @@ function Fp(n, t, e) {
13265
13262
  });
13266
13263
  return i ? (t(Qt(n, s)), !0) : !1;
13267
13264
  }
13268
- const zp = ({ state: n, dispatch: t }) => Fp(n, t, !1);
13265
+ const zp = ({ state: n, dispatch: t }) => _p(n, t, !1);
13269
13266
  function Bt(n, t) {
13270
13267
  let e = ei(n.state.selection, (i) => {
13271
13268
  let s = t(i);
@@ -13510,12 +13507,12 @@ const wg = ({ state: n, dispatch: t }) => {
13510
13507
  o++;
13511
13508
  i.push({ from: e.from + o, to: e.from + s.length, insert: l.slice(o) });
13512
13509
  }), { userEvent: "delete.dedent" })), !0), kg = [
13513
- { key: "Ctrl-b", run: $h, shift: Yh, preventDefault: !0 },
13514
- { key: "Ctrl-f", run: Fh, shift: Qh },
13510
+ { key: "Ctrl-b", run: Fh, shift: Yh, preventDefault: !0 },
13511
+ { key: "Ctrl-f", run: _h, shift: Qh },
13515
13512
  { key: "Ctrl-p", run: jh, shift: Zh },
13516
13513
  { key: "Ctrl-n", run: Kh, shift: ta },
13517
- { key: "Ctrl-a", run: _p, shift: Jp },
13518
- { key: "Ctrl-e", run: $p, shift: Xp },
13514
+ { key: "Ctrl-a", run: $p, shift: Jp },
13515
+ { key: "Ctrl-e", run: Fp, shift: Xp },
13519
13516
  { key: "Ctrl-d", run: sa },
13520
13517
  { key: "Ctrl-h", run: jn },
13521
13518
  { key: "Ctrl-k", run: ng },
@@ -13524,10 +13521,10 @@ const wg = ({ state: n, dispatch: t }) => {
13524
13521
  { key: "Ctrl-t", run: hg },
13525
13522
  { key: "Ctrl-v", run: Wn }
13526
13523
  ], xg = /* @__PURE__ */ [
13527
- { key: "ArrowLeft", run: $h, shift: Yh, preventDefault: !0 },
13524
+ { key: "ArrowLeft", run: Fh, shift: Yh, preventDefault: !0 },
13528
13525
  { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: Pp, shift: Wp, preventDefault: !0 },
13529
13526
  { mac: "Cmd-ArrowLeft", run: Vp, shift: Yp, preventDefault: !0 },
13530
- { key: "ArrowRight", run: Fh, shift: Qh, preventDefault: !0 },
13527
+ { key: "ArrowRight", run: _h, shift: Qh, preventDefault: !0 },
13531
13528
  { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: Bp, shift: jp, preventDefault: !0 },
13532
13529
  { mac: "Cmd-ArrowRight", run: Hp, shift: Qp, preventDefault: !0 },
13533
13530
  { key: "ArrowUp", run: jh, shift: Zh, preventDefault: !0 },
@@ -13588,7 +13585,7 @@ class As {
13588
13585
  */
13589
13586
  static start(t, e, i = 0) {
13590
13587
  let s = t.parser.context;
13591
- return new As(t, [], e, i, i, 0, [], 0, s ? new _o(s, s.start) : null, 0, null);
13588
+ return new As(t, [], e, i, i, 0, [], 0, s ? new $o(s, s.start) : null, 0, null);
13592
13589
  }
13593
13590
  /**
13594
13591
  The stack's current [context](#lr.ContextTracker) value, if
@@ -13918,7 +13915,7 @@ class As {
13918
13915
  }
13919
13916
  updateContext(t) {
13920
13917
  if (t != this.curContext.context) {
13921
- let e = new _o(this.curContext.tracker, t);
13918
+ let e = new $o(this.curContext.tracker, t);
13922
13919
  e.hash != this.curContext.hash && this.emitContext(), this.curContext = e;
13923
13920
  }
13924
13921
  }
@@ -13935,7 +13932,7 @@ class As {
13935
13932
  this.curContext && this.curContext.tracker.strict && this.emitContext(), this.lookAhead > 0 && this.emitLookAhead();
13936
13933
  }
13937
13934
  }
13938
- class _o {
13935
+ class $o {
13939
13936
  constructor(t, e) {
13940
13937
  this.tracker = t, this.context = e, this.hash = t.strict ? t.hash(e) : 0;
13941
13938
  }
@@ -14008,13 +14005,13 @@ class ls {
14008
14005
  this.start = -1, this.value = -1, this.end = -1, this.extended = -1, this.lookAhead = 0, this.mask = 0, this.context = 0;
14009
14006
  }
14010
14007
  }
14011
- const $o = new ls();
14008
+ const Fo = new ls();
14012
14009
  class Cg {
14013
14010
  /**
14014
14011
  @internal
14015
14012
  */
14016
14013
  constructor(t, e) {
14017
- this.input = t, this.ranges = e, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = $o, this.rangeIndex = 0, this.pos = this.chunkPos = e[0].from, this.range = e[0], this.end = e[e.length - 1].to, this.readNext();
14014
+ this.input = t, this.ranges = e, this.chunk = "", this.chunkOff = 0, this.chunk2 = "", this.chunk2Pos = 0, this.next = -1, this.token = Fo, this.rangeIndex = 0, this.pos = this.chunkPos = e[0].from, this.range = e[0], this.end = e[e.length - 1].to, this.readNext();
14018
14015
  }
14019
14016
  /**
14020
14017
  @internal
@@ -14119,7 +14116,7 @@ class Cg {
14119
14116
  @internal
14120
14117
  */
14121
14118
  reset(t, e) {
14122
- if (e ? (this.token = e, e.start = t, e.lookAhead = t + 1, e.value = e.extended = -1) : this.token = $o, this.pos != t) {
14119
+ if (e ? (this.token = e, e.start = t, e.lookAhead = t + 1, e.value = e.extended = -1) : this.token = Fo, this.pos != t) {
14123
14120
  if (this.pos = t, t == this.end)
14124
14121
  return this.setDone(), this;
14125
14122
  for (; t < this.range.from; )
@@ -14192,15 +14189,15 @@ function Ag(n, t, e, i, s, r) {
14192
14189
  break;
14193
14190
  }
14194
14191
  }
14195
- function Fo(n, t, e) {
14192
+ function _o(n, t, e) {
14196
14193
  for (let i = t, s; (s = n[i]) != 65535; i++)
14197
14194
  if (s == e)
14198
14195
  return i - t;
14199
14196
  return -1;
14200
14197
  }
14201
14198
  function Og(n, t, e, i) {
14202
- let s = Fo(e, i, t);
14203
- return s < 0 || Fo(e, i, n) < s;
14199
+ let s = _o(e, i, t);
14200
+ return s < 0 || _o(e, i, n) < s;
14204
14201
  }
14205
14202
  const kt = typeof process < "u" && process.env && /\bparse\b/.test(process.env.LOG);
14206
14203
  let en = null;
@@ -14950,8 +14947,8 @@ const ca = /* @__PURE__ */ z.define(), mr = /* @__PURE__ */ z.define(), fa = /*
14950
14947
  En.from(n, (t) => t.panel),
14951
14948
  T.decorations.from(n, (t) => t.diagnostics)
14952
14949
  ]
14953
- }), _g = /* @__PURE__ */ N.mark({ class: "cm-lintRange cm-lintRange-active" });
14954
- function $g(n, t, e) {
14950
+ }), $g = /* @__PURE__ */ N.mark({ class: "cm-lintRange cm-lintRange-active" });
14951
+ function Fg(n, t, e) {
14955
14952
  let { diagnostics: i } = n.state.field(St), s = [], r = 2e8, o = 0;
14956
14953
  i.between(t - (e < 0 ? 1 : 0), t + (e > 0 ? 1 : 0), (h, a, { spec: c }) => {
14957
14954
  t >= h && t <= a && (h == a || (t > h || e > 0) && (t < a || e < 0)) && (s.push(c.diagnostic), r = Math.min(h, r), o = Math.max(a, o));
@@ -14962,11 +14959,11 @@ function $g(n, t, e) {
14962
14959
  end: o,
14963
14960
  above: n.state.doc.lineAt(r).to < o,
14964
14961
  create() {
14965
- return { dom: Fg(n, s) };
14962
+ return { dom: _g(n, s) };
14966
14963
  }
14967
14964
  } : null;
14968
14965
  }
14969
- function Fg(n, t) {
14966
+ function _g(n, t) {
14970
14967
  return Ut("ul", { class: "cm-tooltip-lint" }, t.map((e) => pa(n, e, !1)));
14971
14968
  }
14972
14969
  const zg = (n) => {
@@ -15263,10 +15260,10 @@ const Gg = /* @__PURE__ */ T.baseTheme({
15263
15260
  /* @__PURE__ */ T.decorations.compute([St], (n) => {
15264
15261
  let { selected: t, panel: e } = n.field(St);
15265
15262
  return !t || !e || t.from == t.to ? N.none : N.set([
15266
- _g.range(t.from, t.to)
15263
+ $g.range(t.from, t.to)
15267
15264
  ]);
15268
15265
  }),
15269
- /* @__PURE__ */ nd($g, { hideOn: Vg }),
15266
+ /* @__PURE__ */ nd(Fg, { hideOn: Vg }),
15270
15267
  Gg
15271
15268
  ], Yg = "#e5c07b", Go = "#e06c75", Qg = "#56b6c2", Jg = "#ffffff", hs = "#abb2bf", Kn = "#7d8799", Xg = "#61afef", Zg = "#98c379", Uo = "#d19a66", tm = "#c678dd", em = "#21252b", Yo = "#2c313a", Qo = "#282c34", sn = "#353a42", im = "#3E4451", Jo = "#528bff", sm = /* @__PURE__ */ T.theme({
15272
15269
  "&": {
@@ -15484,8 +15481,7 @@ const rm = {
15484
15481
  _: 3
15485
15482
  }, 8, ["title", "class", "style"]));
15486
15483
  }
15487
- });
15488
- const lm = (n, t) => {
15484
+ }), lm = (n, t) => {
15489
15485
  const e = n.__vccOpts || n;
15490
15486
  for (const [i, s] of t)
15491
15487
  e[i] = s;
@@ -15558,7 +15554,7 @@ const lm = (n, t) => {
15558
15554
  _: 3
15559
15555
  }, 8, ["title", "class", "style"]));
15560
15556
  }
15561
- }), dm = Zo, pm = Da, gm = Ea, mm = Ha, wm = Fa, ym = Wa, bm = Ga, km = Qa, xm = nc, vm = dc, Sm = xc, Cm = Tc, Am = Le, Om = Lc, Mm = hm, Tm = um, Nm = {
15557
+ }), dm = Zo, pm = Da, gm = Ea, mm = Ha, wm = _a, ym = Wa, bm = Ga, km = Qa, xm = nc, vm = dc, Sm = xc, Cm = Tc, Am = Le, Om = Lc, Mm = hm, Tm = um, Nm = {
15562
15558
  HstButton: dm,
15563
15559
  HstButtonGroup: pm,
15564
15560
  HstCheckbox: gm,