@gsc-basic/components 1.0.1 → 1.0.3

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 (164) hide show
  1. package/README.md +59 -0
  2. package/dist/es/index.js +48 -30
  3. package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +15 -15
  4. package/dist/es/node_modules/@codemirror/commands/dist/index.js +31 -25
  5. package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +3 -3
  6. package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +8 -8
  7. package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +1 -1
  8. package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +1 -1
  9. package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +6 -6
  10. package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +3 -3
  11. package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +1 -1
  12. package/dist/es/node_modules/@codemirror/language/dist/index.js +77 -77
  13. package/dist/es/node_modules/@codemirror/lint/dist/index.js +7 -7
  14. package/dist/es/node_modules/@codemirror/search/dist/index.js +432 -465
  15. package/dist/es/node_modules/@codemirror/state/dist/index.js +272 -268
  16. package/dist/es/node_modules/@codemirror/view/dist/index.js +1732 -1647
  17. package/dist/es/node_modules/@lezer/common/dist/index.js +191 -190
  18. package/dist/es/node_modules/@lezer/lr/dist/index.js +5 -3
  19. package/dist/es/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +178 -0
  20. package/dist/es/node_modules/@tanstack/form-core/dist/esm/EventClient.js +13 -0
  21. package/dist/es/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +406 -0
  22. package/dist/es/node_modules/@tanstack/form-core/dist/esm/FormApi.js +772 -0
  23. package/dist/es/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +55 -0
  24. package/dist/es/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +109 -0
  25. package/dist/es/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +45 -0
  26. package/dist/es/node_modules/@tanstack/form-core/dist/esm/utils.js +213 -0
  27. package/dist/es/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +29 -0
  28. package/dist/es/node_modules/@tanstack/store/dist/esm/derived.js +74 -0
  29. package/dist/es/node_modules/@tanstack/store/dist/esm/scheduler.js +79 -0
  30. package/dist/es/node_modules/@tanstack/store/dist/esm/store.js +21 -0
  31. package/dist/es/node_modules/@tanstack/store/dist/esm/types.js +6 -0
  32. package/dist/es/node_modules/@tanstack/table-core/build/lib/index.js +1885 -0
  33. package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useField.js +38 -0
  34. package/dist/es/node_modules/@tanstack/vue-form/dist/esm/useForm.js +33 -0
  35. package/dist/es/node_modules/@tanstack/vue-store/dist/esm/index.js +48 -0
  36. package/dist/es/node_modules/@tanstack/vue-table/build/lib/index.js +159 -0
  37. package/dist/es/node_modules/@vueuse/core/dist/index.js +1 -1
  38. package/dist/es/node_modules/codemirror/dist/index.js +3 -3
  39. package/dist/es/src/Button/index.js +6 -0
  40. package/dist/es/src/Button/src/Button.css +1 -0
  41. package/dist/es/src/Button/src/Button.vue.js +41 -0
  42. package/dist/es/src/Button/src/Button2.css +1 -0
  43. package/dist/es/src/CodeEditor/src/index.css +1 -1
  44. package/dist/es/src/CodeEditor/src/index.vue.js +54 -51
  45. package/dist/es/src/CodeEditor/src/index2.css +1 -1
  46. package/dist/es/src/ConfigProvider/index.js +1 -2
  47. package/dist/es/src/ConfigProvider/src/useGlobalConfig.js +9 -9
  48. package/dist/es/src/Form/index.js +6 -0
  49. package/dist/es/src/Form/src/Form.css +1 -0
  50. package/dist/es/src/Form/src/Form.vue.js +208 -0
  51. package/dist/es/src/Form/src/styles/form.css +1 -0
  52. package/dist/es/src/Grid/index.js +6 -0
  53. package/dist/es/src/Grid/src/Grid.css +1 -0
  54. package/dist/es/src/Grid/src/Grid.vue.js +180 -0
  55. package/dist/es/src/Grid/src/components/ActionBar.css +1 -0
  56. package/dist/es/src/Grid/src/components/ActionBar.vue.js +65 -0
  57. package/dist/es/src/Grid/src/components/CellEditor.css +1 -0
  58. package/dist/es/src/Grid/src/components/CellEditor.vue.js +132 -0
  59. package/dist/es/src/Grid/src/components/CellEditor2.css +1 -0
  60. package/dist/es/src/Grid/src/components/ColumnFilter.css +1 -0
  61. package/dist/es/src/Grid/src/components/ColumnFilter.vue.js +72 -0
  62. package/dist/es/src/Grid/src/components/ColumnSettings.css +1 -0
  63. package/dist/es/src/Grid/src/components/ColumnSettings.vue.js +109 -0
  64. package/dist/es/src/Grid/src/components/DataTable.css +1 -0
  65. package/dist/es/src/Grid/src/components/DataTable.vue.js +556 -0
  66. package/dist/es/src/Grid/src/components/Pager.css +1 -0
  67. package/dist/es/src/Grid/src/components/Pager.vue.js +64 -0
  68. package/dist/es/src/Grid/src/components/QueryBar.css +1 -0
  69. package/dist/es/src/Grid/src/components/QueryBar.vue.js +156 -0
  70. package/dist/es/src/Grid/src/composables/useCellEditor.js +20 -0
  71. package/dist/es/src/Grid/src/composables/useGridTable.js +213 -0
  72. package/dist/es/src/Grid/src/styles/table.css +1 -0
  73. package/dist/es/src/Overlay/index.js +61 -0
  74. package/dist/es/src/Overlay/src/Message.css +1 -0
  75. package/dist/es/src/Overlay/src/Message.vue.js +36 -0
  76. package/dist/es/src/Overlay/src/Message2.css +1 -0
  77. package/dist/es/src/Overlay/src/Modal.css +1 -0
  78. package/dist/es/src/Overlay/src/Modal.vue.js +67 -0
  79. package/dist/es/src/Overlay/src/Modal2.css +1 -0
  80. package/dist/es/src/Overlay/src/Notice.css +1 -0
  81. package/dist/es/src/Overlay/src/Notice.vue.js +37 -0
  82. package/dist/es/src/Overlay/src/Notice2.css +1 -0
  83. package/dist/es/src/ScaleScreen/src/index.vue.js +2 -2
  84. package/dist/es/src/VideoBackground/src/index.vue.js +8 -8
  85. package/dist/es/src/index.js +35 -19
  86. package/dist/es/src/locale/lang/en-US.js +40 -0
  87. package/dist/es/src/locale/lang/ja-JP.js +42 -2
  88. package/dist/es/src/locale/lang/zh-CN.js +42 -2
  89. package/dist/es/src/styles/tokens.css +1 -1
  90. package/dist/lib/index.js +1 -1
  91. package/dist/lib/node_modules/@codemirror/commands/dist/index.js +1 -1
  92. package/dist/lib/node_modules/@codemirror/language/dist/index.js +1 -1
  93. package/dist/lib/node_modules/@codemirror/search/dist/index.js +2 -2
  94. package/dist/lib/node_modules/@codemirror/state/dist/index.js +4 -4
  95. package/dist/lib/node_modules/@codemirror/view/dist/index.js +5 -5
  96. package/dist/lib/node_modules/@lezer/common/dist/index.js +1 -1
  97. package/dist/lib/node_modules/@lezer/lr/dist/index.js +1 -1
  98. package/dist/lib/node_modules/@tanstack/devtools-event-client/dist/esm/plugin.js +1 -0
  99. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/EventClient.js +1 -0
  100. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FieldApi.js +1 -0
  101. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/FormApi.js +1 -0
  102. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/ValidationLogic.js +1 -0
  103. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/metaHelper.js +1 -0
  104. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/standardSchemaValidator.js +1 -0
  105. package/dist/lib/node_modules/@tanstack/form-core/dist/esm/utils.js +1 -0
  106. package/dist/lib/node_modules/@tanstack/pacer-lite/dist/lite-throttler.js +1 -0
  107. package/dist/lib/node_modules/@tanstack/store/dist/esm/derived.js +1 -0
  108. package/dist/lib/node_modules/@tanstack/store/dist/esm/scheduler.js +1 -0
  109. package/dist/lib/node_modules/@tanstack/store/dist/esm/store.js +1 -0
  110. package/dist/lib/node_modules/@tanstack/store/dist/esm/types.js +1 -0
  111. package/dist/lib/node_modules/@tanstack/table-core/build/lib/index.js +4 -0
  112. package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useField.js +1 -0
  113. package/dist/lib/node_modules/@tanstack/vue-form/dist/esm/useForm.js +1 -0
  114. package/dist/lib/node_modules/@tanstack/vue-store/dist/esm/index.js +1 -0
  115. package/dist/lib/node_modules/@tanstack/vue-table/build/lib/index.js +1 -0
  116. package/dist/lib/src/Button/index.js +1 -0
  117. package/dist/lib/src/Button/src/Button.css +1 -0
  118. package/dist/lib/src/Button/src/Button.vue.js +1 -0
  119. package/dist/lib/src/Button/src/Button2.css +1 -0
  120. package/dist/lib/src/CodeEditor/src/index.css +1 -1
  121. package/dist/lib/src/CodeEditor/src/index.vue.js +1 -1
  122. package/dist/lib/src/CodeEditor/src/index2.css +1 -1
  123. package/dist/lib/src/ConfigProvider/index.js +1 -1
  124. package/dist/lib/src/Form/index.js +1 -0
  125. package/dist/lib/src/Form/src/Form.css +1 -0
  126. package/dist/lib/src/Form/src/Form.vue.js +1 -0
  127. package/dist/lib/src/Form/src/styles/form.css +1 -0
  128. package/dist/lib/src/Grid/index.js +1 -0
  129. package/dist/lib/src/Grid/src/Grid.css +1 -0
  130. package/dist/lib/src/Grid/src/Grid.vue.js +1 -0
  131. package/dist/lib/src/Grid/src/components/ActionBar.css +1 -0
  132. package/dist/lib/src/Grid/src/components/ActionBar.vue.js +1 -0
  133. package/dist/lib/src/Grid/src/components/CellEditor.css +1 -0
  134. package/dist/lib/src/Grid/src/components/CellEditor.vue.js +1 -0
  135. package/dist/lib/src/Grid/src/components/CellEditor2.css +1 -0
  136. package/dist/lib/src/Grid/src/components/ColumnFilter.css +1 -0
  137. package/dist/lib/src/Grid/src/components/ColumnFilter.vue.js +1 -0
  138. package/dist/lib/src/Grid/src/components/ColumnSettings.css +1 -0
  139. package/dist/lib/src/Grid/src/components/ColumnSettings.vue.js +1 -0
  140. package/dist/lib/src/Grid/src/components/DataTable.css +1 -0
  141. package/dist/lib/src/Grid/src/components/DataTable.vue.js +1 -0
  142. package/dist/lib/src/Grid/src/components/Pager.css +1 -0
  143. package/dist/lib/src/Grid/src/components/Pager.vue.js +1 -0
  144. package/dist/lib/src/Grid/src/components/QueryBar.css +1 -0
  145. package/dist/lib/src/Grid/src/components/QueryBar.vue.js +1 -0
  146. package/dist/lib/src/Grid/src/composables/useCellEditor.js +1 -0
  147. package/dist/lib/src/Grid/src/composables/useGridTable.js +1 -0
  148. package/dist/lib/src/Grid/src/styles/table.css +1 -0
  149. package/dist/lib/src/Overlay/index.js +1 -0
  150. package/dist/lib/src/Overlay/src/Message.css +1 -0
  151. package/dist/lib/src/Overlay/src/Message.vue.js +1 -0
  152. package/dist/lib/src/Overlay/src/Message2.css +1 -0
  153. package/dist/lib/src/Overlay/src/Modal.css +1 -0
  154. package/dist/lib/src/Overlay/src/Modal.vue.js +1 -0
  155. package/dist/lib/src/Overlay/src/Modal2.css +1 -0
  156. package/dist/lib/src/Overlay/src/Notice.css +1 -0
  157. package/dist/lib/src/Overlay/src/Notice.vue.js +1 -0
  158. package/dist/lib/src/Overlay/src/Notice2.css +1 -0
  159. package/dist/lib/src/index.js +1 -1
  160. package/dist/lib/src/locale/lang/en-US.js +1 -1
  161. package/dist/lib/src/locale/lang/ja-JP.js +1 -1
  162. package/dist/lib/src/locale/lang/zh-CN.js +1 -1
  163. package/dist/lib/src/styles/tokens.css +1 -1
  164. package/package.json +11 -8
@@ -1,4 +1,4 @@
1
- import { findClusterBreak as Le } from "../../../@marijn/find-cluster-break/src/index.js";
1
+ import { findClusterBreak as Ve } from "../../../@marijn/find-cluster-break/src/index.js";
2
2
  class x {
3
3
  /**
4
4
  Get the line description around the given position.
@@ -85,7 +85,7 @@ class x {
85
85
  iterator will run in reverse.
86
86
  */
87
87
  iterRange(e, t = this.length) {
88
- return new Se(this, e, t);
88
+ return new Ie(this, e, t);
89
89
  }
90
90
  /**
91
91
  Return a cursor that iterates over the given range of lines,
@@ -103,7 +103,7 @@ class x {
103
103
  let i = this.line(e).from;
104
104
  n = this.iterRange(i, Math.max(i, t == this.lines + 1 ? this.length : t <= 1 ? 0 : this.line(t - 1).to));
105
105
  }
106
- return new Ie(n);
106
+ return new Pe(n);
107
107
  }
108
108
  /**
109
109
  Return the document as a string, using newline characters to
@@ -135,7 +135,7 @@ class x {
135
135
  }
136
136
  }
137
137
  class m extends x {
138
- constructor(e, t = Ve(e)) {
138
+ constructor(e, t = Ne(e)) {
139
139
  super(), this.text = e, this.length = t;
140
140
  }
141
141
  get lines() {
@@ -148,12 +148,12 @@ class m extends x {
148
148
  for (let s = 0; ; s++) {
149
149
  let r = this.text[s], h = i + r.length;
150
150
  if ((t ? n : h) >= e)
151
- return new Ne(i, h, n, r);
151
+ return new De(i, h, n, r);
152
152
  i = h + 1, n++;
153
153
  }
154
154
  }
155
155
  decompose(e, t, n, i) {
156
- let s = e <= 0 && t >= this.length ? this : new m(we(this.text, e, t), Math.min(t, this.length) - Math.max(0, e));
156
+ let s = e <= 0 && t >= this.length ? this : new m(ve(this.text, e, t), Math.min(t, this.length) - Math.max(0, e));
157
157
  if (i & 1) {
158
158
  let r = n.pop(), h = Q(s.text, r.text.slice(), 0, s.length);
159
159
  if (h.length <= 32)
@@ -169,7 +169,7 @@ class m extends x {
169
169
  if (!(n instanceof m))
170
170
  return super.replace(e, t, n);
171
171
  [e, t] = J(this, e, t);
172
- let i = Q(this.text, Q(n.text, we(this.text, 0, e)), t), s = this.length + n.length - (t - e);
172
+ let i = Q(this.text, Q(n.text, ve(this.text, 0, e)), t), s = this.length + n.length - (t - e);
173
173
  return i.length <= 32 ? new m(i, s) : O.from(m.split(i, []), s);
174
174
  }
175
175
  sliceString(e, t = this.length, n = `
@@ -227,8 +227,8 @@ class O extends x {
227
227
  if (e >= s && t <= h) {
228
228
  let o = r.replace(e - s, t - s, n), a = this.lines - r.lines + o.lines;
229
229
  if (o.lines < a >> 4 && o.lines > a >> 6) {
230
- let f = this.children.slice();
231
- return f[i] = o, new O(f, this.length - (t - e) + n.length);
230
+ let u = this.children.slice();
231
+ return u[i] = o, new O(u, this.length - (t - e) + n.length);
232
232
  }
233
233
  return super.replace(s, h, o);
234
234
  }
@@ -265,36 +265,36 @@ class O extends x {
265
265
  }
266
266
  static from(e, t = e.reduce((n, i) => n + i.length + 1, -1)) {
267
267
  let n = 0;
268
- for (let d of e)
269
- n += d.lines;
268
+ for (let c of e)
269
+ n += c.lines;
270
270
  if (n < 32) {
271
- let d = [];
272
- for (let p of e)
273
- p.flatten(d);
274
- return new m(d, t);
271
+ let c = [];
272
+ for (let g of e)
273
+ g.flatten(c);
274
+ return new m(c, t);
275
275
  }
276
276
  let i = Math.max(
277
277
  32,
278
278
  n >> 5
279
279
  /* Tree.BranchShift */
280
- ), s = i << 1, r = i >> 1, h = [], o = 0, a = -1, f = [];
281
- function u(d) {
282
- let p;
283
- if (d.lines > s && d instanceof O)
284
- for (let E of d.children)
285
- u(E);
286
- else d.lines > r && (o > r || !o) ? (c(), h.push(d)) : d instanceof m && o && (p = f[f.length - 1]) instanceof m && d.lines + p.lines <= 32 ? (o += d.lines, a += d.length + 1, f[f.length - 1] = new m(p.text.concat(d.text), p.length + 1 + d.length)) : (o + d.lines > i && c(), o += d.lines, a += d.length + 1, f.push(d));
280
+ ), s = i << 1, r = i >> 1, h = [], o = 0, a = -1, u = [];
281
+ function f(c) {
282
+ let g;
283
+ if (c.lines > s && c instanceof O)
284
+ for (let E of c.children)
285
+ f(E);
286
+ else c.lines > r && (o > r || !o) ? (d(), h.push(c)) : c instanceof m && o && (g = u[u.length - 1]) instanceof m && c.lines + g.lines <= 32 ? (o += c.lines, a += c.length + 1, u[u.length - 1] = new m(g.text.concat(c.text), g.length + 1 + c.length)) : (o + c.lines > i && d(), o += c.lines, a += c.length + 1, u.push(c));
287
287
  }
288
- function c() {
289
- o != 0 && (h.push(f.length == 1 ? f[0] : O.from(f, a)), a = -1, o = f.length = 0);
288
+ function d() {
289
+ o != 0 && (h.push(u.length == 1 ? u[0] : O.from(u, a)), a = -1, o = u.length = 0);
290
290
  }
291
- for (let d of e)
292
- u(d);
293
- return c(), h.length == 1 ? h[0] : new O(h, t);
291
+ for (let c of e)
292
+ f(c);
293
+ return d(), h.length == 1 ? h[0] : new O(h, t);
294
294
  }
295
295
  }
296
296
  x.empty = /* @__PURE__ */ new m([""], 0);
297
- function Ve(l) {
297
+ function Ne(l) {
298
298
  let e = -1;
299
299
  for (let t of l)
300
300
  e += t.length + 1;
@@ -307,7 +307,7 @@ function Q(l, e, t = 0, n = 1e9) {
307
307
  }
308
308
  return e;
309
309
  }
310
- function we(l, e, t) {
310
+ function ve(l, e, t) {
311
311
  return Q(l, [""], e, t);
312
312
  }
313
313
  class D {
@@ -341,7 +341,7 @@ class D {
341
341
  return e < 0 && (this.nextInner(-e, -this.dir), e = this.value.length), this.nextInner(e, this.dir);
342
342
  }
343
343
  }
344
- class Se {
344
+ class Ie {
345
345
  constructor(e, t, n) {
346
346
  this.value = "", this.done = !1, this.cursor = new D(e, t > n ? -1 : 1), this.pos = t > n ? e.length : 0, this.from = Math.min(t, n), this.to = Math.max(t, n);
347
347
  }
@@ -361,7 +361,7 @@ class Se {
361
361
  return this.cursor.lineBreak && this.value != "";
362
362
  }
363
363
  }
364
- class Ie {
364
+ class Pe {
365
365
  constructor(e) {
366
366
  this.inner = e, this.afterBreak = !0, this.value = "", this.done = !1;
367
367
  }
@@ -375,10 +375,10 @@ class Ie {
375
375
  }
376
376
  typeof Symbol < "u" && (x.prototype[Symbol.iterator] = function() {
377
377
  return this.iter();
378
- }, D.prototype[Symbol.iterator] = Se.prototype[Symbol.iterator] = Ie.prototype[Symbol.iterator] = function() {
378
+ }, D.prototype[Symbol.iterator] = Ie.prototype[Symbol.iterator] = Pe.prototype[Symbol.iterator] = function() {
379
379
  return this;
380
380
  });
381
- class Ne {
381
+ class De {
382
382
  /**
383
383
  @internal
384
384
  */
@@ -396,25 +396,25 @@ function J(l, e, t) {
396
396
  return e = Math.max(0, Math.min(l.length, e)), [e, Math.max(e, Math.min(l.length, t))];
397
397
  }
398
398
  function Y(l, e, t = !0, n = !0) {
399
- return Le(l, e, t, n);
399
+ return Ve(l, e, t, n);
400
400
  }
401
- function De(l) {
401
+ function $e(l) {
402
402
  return l >= 56320 && l < 57344;
403
403
  }
404
- function $e(l) {
404
+ function ze(l) {
405
405
  return l >= 55296 && l < 56320;
406
406
  }
407
- function et(l, e) {
407
+ function tt(l, e) {
408
408
  let t = l.charCodeAt(e);
409
- if (!$e(t) || e + 1 == l.length)
409
+ if (!ze(t) || e + 1 == l.length)
410
410
  return t;
411
411
  let n = l.charCodeAt(e + 1);
412
- return De(n) ? (t - 55296 << 10) + (n - 56320) + 65536 : t;
412
+ return $e(n) ? (t - 55296 << 10) + (n - 56320) + 65536 : t;
413
413
  }
414
- function tt(l) {
414
+ function nt(l) {
415
415
  return l <= 65535 ? String.fromCharCode(l) : (l -= 65536, String.fromCharCode((l >> 10) + 55296, (l & 1023) + 56320));
416
416
  }
417
- function nt(l) {
417
+ function it(l) {
418
418
  return l < 65536 ? 1 : 2;
419
419
  }
420
420
  const se = /\r\n?|\n/;
@@ -502,7 +502,7 @@ class C {
502
502
  match the length before `other`.
503
503
  */
504
504
  composeDesc(e) {
505
- return this.empty ? e : e.empty ? this : Pe(this, e);
505
+ return this.empty ? e : e.empty ? this : Ae(this, e);
506
506
  }
507
507
  /**
508
508
  Map this description, which should start with the same document
@@ -625,7 +625,7 @@ class y extends C {
625
625
  returned value will represent the change `docA` → `docC`.
626
626
  */
627
627
  compose(e) {
628
- return this.empty ? e : e.empty ? this : Pe(this, e, !0);
628
+ return this.empty ? e : e.empty ? this : Ae(this, e, !0);
629
629
  }
630
630
  /**
631
631
  Given another change set starting in the same document, maps this
@@ -666,23 +666,23 @@ class y extends C {
666
666
  @internal
667
667
  */
668
668
  filter(e) {
669
- let t = [], n = [], i = [], s = new q(this);
669
+ let t = [], n = [], i = [], s = new z(this);
670
670
  e: for (let r = 0, h = 0; ; ) {
671
671
  let o = r == e.length ? 1e9 : e[r++];
672
672
  for (; h < o || h == o && s.len == 0; ) {
673
673
  if (s.done)
674
674
  break e;
675
- let f = Math.min(s.len, o - h);
676
- k(i, f, -1);
677
- let u = s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0;
678
- k(t, f, u), u > 0 && b(n, t, s.text), s.forward(f), h += f;
675
+ let u = Math.min(s.len, o - h);
676
+ k(i, u, -1);
677
+ let f = s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0;
678
+ k(t, u, f), f > 0 && b(n, t, s.text), s.forward(u), h += u;
679
679
  }
680
680
  let a = e[r++];
681
681
  for (; h < a; ) {
682
682
  if (s.done)
683
683
  break e;
684
- let f = Math.min(s.len, a - h);
685
- k(t, f, -1), k(i, f, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(f), h += f;
684
+ let u = Math.min(s.len, a - h);
685
+ k(t, u, -1), k(i, u, s.ins == -1 ? -1 : s.off == 0 ? s.ins : 0), s.forward(u), h += u;
686
686
  }
687
687
  }
688
688
  return {
@@ -707,29 +707,29 @@ class y extends C {
707
707
  */
708
708
  static of(e, t, n) {
709
709
  let i = [], s = [], r = 0, h = null;
710
- function o(f = !1) {
711
- if (!f && !i.length)
710
+ function o(u = !1) {
711
+ if (!u && !i.length)
712
712
  return;
713
713
  r < t && k(i, t - r, -1);
714
- let u = new y(i, s);
715
- h = h ? h.compose(u.map(h)) : u, i = [], s = [], r = 0;
714
+ let f = new y(i, s);
715
+ h = h ? h.compose(f.map(h)) : f, i = [], s = [], r = 0;
716
716
  }
717
- function a(f) {
718
- if (Array.isArray(f))
719
- for (let u of f)
720
- a(u);
721
- else if (f instanceof y) {
722
- if (f.length != t)
723
- throw new RangeError(`Mismatched change set length (got ${f.length}, expected ${t})`);
724
- o(), h = h ? h.compose(f.map(h)) : f;
717
+ function a(u) {
718
+ if (Array.isArray(u))
719
+ for (let f of u)
720
+ a(f);
721
+ else if (u instanceof y) {
722
+ if (u.length != t)
723
+ throw new RangeError(`Mismatched change set length (got ${u.length}, expected ${t})`);
724
+ o(), h = h ? h.compose(u.map(h)) : u;
725
725
  } else {
726
- let { from: u, to: c = u, insert: d } = f;
727
- if (u > c || u < 0 || c > t)
728
- throw new RangeError(`Invalid change range ${u} to ${c} (in doc of length ${t})`);
729
- let p = d ? typeof d == "string" ? x.of(d.split(n || se)) : d : x.empty, E = p.length;
730
- if (u == c && E == 0)
726
+ let { from: f, to: d = f, insert: c } = u;
727
+ if (f > d || f < 0 || d > t)
728
+ throw new RangeError(`Invalid change range ${f} to ${d} (in doc of length ${t})`);
729
+ let g = c ? typeof c == "string" ? x.of(c.split(n || se)) : c : x.empty, E = g.length;
730
+ if (f == d && E == 0)
731
731
  return;
732
- u < r && o(), u > r && k(i, u - r, -1), k(i, c - u, E), b(s, i, p), r = c;
732
+ f < r && o(), f > r && k(i, f - r, -1), k(i, d - f, E), b(s, i, g), r = d;
733
733
  }
734
734
  }
735
735
  return a(e), o(!h), h;
@@ -798,15 +798,15 @@ function re(l, e, t) {
798
798
  if (o < 0)
799
799
  i += h, s += h;
800
800
  else {
801
- let a = i, f = s, u = x.empty;
802
- for (; a += h, f += o, o && n && (u = u.append(n[r - 2 >> 1])), !(t || r == l.sections.length || l.sections[r + 1] < 0); )
801
+ let a = i, u = s, f = x.empty;
802
+ for (; a += h, u += o, o && n && (f = f.append(n[r - 2 >> 1])), !(t || r == l.sections.length || l.sections[r + 1] < 0); )
803
803
  h = l.sections[r++], o = l.sections[r++];
804
- e(i, a, s, f, u), i = a, s = f;
804
+ e(i, a, s, u, f), i = a, s = u;
805
805
  }
806
806
  }
807
807
  }
808
808
  function le(l, e, t, n = !1) {
809
- let i = [], s = n ? [] : null, r = new q(l), h = new q(e);
809
+ let i = [], s = n ? [] : null, r = new z(l), h = new z(e);
810
810
  for (let o = -1; ; ) {
811
811
  if (r.done && h.len || h.done && r.len)
812
812
  throw new Error("Mismatched change set lengths");
@@ -816,21 +816,21 @@ function le(l, e, t, n = !1) {
816
816
  } else if (h.ins >= 0 && (r.ins < 0 || o == r.i || r.off == 0 && (h.len < r.len || h.len == r.len && !t))) {
817
817
  let a = h.len;
818
818
  for (k(i, h.ins, -1); a; ) {
819
- let f = Math.min(r.len, a);
820
- r.ins >= 0 && o < r.i && r.len <= f && (k(i, 0, r.ins), s && b(s, i, r.text), o = r.i), r.forward(f), a -= f;
819
+ let u = Math.min(r.len, a);
820
+ r.ins >= 0 && o < r.i && r.len <= u && (k(i, 0, r.ins), s && b(s, i, r.text), o = r.i), r.forward(u), a -= u;
821
821
  }
822
822
  h.next();
823
823
  } else if (r.ins >= 0) {
824
- let a = 0, f = r.len;
825
- for (; f; )
824
+ let a = 0, u = r.len;
825
+ for (; u; )
826
826
  if (h.ins == -1) {
827
- let u = Math.min(f, h.len);
828
- a += u, f -= u, h.forward(u);
829
- } else if (h.ins == 0 && h.len < f)
830
- f -= h.len, h.next();
827
+ let f = Math.min(u, h.len);
828
+ a += f, u -= f, h.forward(f);
829
+ } else if (h.ins == 0 && h.len < u)
830
+ u -= h.len, h.next();
831
831
  else
832
832
  break;
833
- k(i, a, o < r.i ? r.ins : 0), s && o < r.i && b(s, i, r.text), o = r.i, r.forward(r.len - f);
833
+ k(i, a, o < r.i ? r.ins : 0), s && o < r.i && b(s, i, r.text), o = r.i, r.forward(r.len - u);
834
834
  } else {
835
835
  if (r.done && h.done)
836
836
  return s ? y.createSet(i, s) : C.create(i);
@@ -838,8 +838,8 @@ function le(l, e, t, n = !1) {
838
838
  }
839
839
  }
840
840
  }
841
- function Pe(l, e, t = !1) {
842
- let n = [], i = t ? [] : null, s = new q(l), r = new q(e);
841
+ function Ae(l, e, t = !1) {
842
+ let n = [], i = t ? [] : null, s = new z(l), r = new z(e);
843
843
  for (let h = !1; ; ) {
844
844
  if (s.done && r.done)
845
845
  return i ? y.createSet(n, i) : C.create(n);
@@ -853,15 +853,15 @@ function Pe(l, e, t = !1) {
853
853
  {
854
854
  let o = Math.min(s.len2, r.len), a = n.length;
855
855
  if (s.ins == -1) {
856
- let f = r.ins == -1 ? -1 : r.off ? 0 : r.ins;
857
- k(n, o, f, h), i && f && b(i, n, r.text);
856
+ let u = r.ins == -1 ? -1 : r.off ? 0 : r.ins;
857
+ k(n, o, u, h), i && u && b(i, n, r.text);
858
858
  } else r.ins == -1 ? (k(n, s.off ? 0 : s.len, o, h), i && b(i, n, s.textBit(o))) : (k(n, s.off ? 0 : s.len, r.off ? 0 : r.ins, h), i && !r.off && b(i, n, r.text));
859
859
  h = (s.ins > o || r.ins >= 0 && r.len > o) && (h || n.length > a), s.forward2(o), r.forward(o);
860
860
  }
861
861
  }
862
862
  }
863
863
  }
864
- class q {
864
+ class z {
865
865
  constructor(e) {
866
866
  this.set = e, this.i = 0, this.next();
867
867
  }
@@ -954,15 +954,15 @@ class B {
954
954
  */
955
955
  extend(e, t = e) {
956
956
  if (e <= this.anchor && t >= this.anchor)
957
- return g.range(e, t);
957
+ return p.range(e, t);
958
958
  let n = Math.abs(e - this.anchor) > Math.abs(t - this.anchor) ? e : t;
959
- return g.range(this.anchor, n);
959
+ return p.range(this.anchor, n);
960
960
  }
961
961
  /**
962
962
  Compare this range to another range.
963
963
  */
964
964
  eq(e, t = !1) {
965
- return this.anchor == e.anchor && this.head == e.head && (!t || !this.empty || this.assoc == e.assoc);
965
+ return this.anchor == e.anchor && this.head == e.head && this.goalColumn == e.goalColumn && (!t || !this.empty || this.assoc == e.assoc);
966
966
  }
967
967
  /**
968
968
  Return a JSON-serializable object representing the range.
@@ -977,7 +977,7 @@ class B {
977
977
  static fromJSON(e) {
978
978
  if (!e || typeof e.anchor != "number" || typeof e.head != "number")
979
979
  throw new RangeError("Invalid JSON representation for SelectionRange");
980
- return g.range(e.anchor, e.head);
980
+ return p.range(e.anchor, e.head);
981
981
  }
982
982
  /**
983
983
  @internal
@@ -986,7 +986,7 @@ class B {
986
986
  return new B(e, t, n);
987
987
  }
988
988
  }
989
- class g {
989
+ class p {
990
990
  constructor(e, t) {
991
991
  this.ranges = e, this.mainIndex = t;
992
992
  }
@@ -995,7 +995,7 @@ class g {
995
995
  position for changes.
996
996
  */
997
997
  map(e, t = -1) {
998
- return e.empty ? this : g.create(this.ranges.map((n) => n.map(e, t)), this.mainIndex);
998
+ return e.empty ? this : p.create(this.ranges.map((n) => n.map(e, t)), this.mainIndex);
999
999
  }
1000
1000
  /**
1001
1001
  Compare this selection to another selection. By default, ranges
@@ -1024,13 +1024,13 @@ class g {
1024
1024
  holding only the main range from this selection.
1025
1025
  */
1026
1026
  asSingle() {
1027
- return this.ranges.length == 1 ? this : new g([this.main], 0);
1027
+ return this.ranges.length == 1 ? this : new p([this.main], 0);
1028
1028
  }
1029
1029
  /**
1030
1030
  Extend this selection with an extra range.
1031
1031
  */
1032
1032
  addRange(e, t = !0) {
1033
- return g.create([e].concat(this.ranges), t ? 0 : this.mainIndex + 1);
1033
+ return p.create([e].concat(this.ranges), t ? 0 : this.mainIndex + 1);
1034
1034
  }
1035
1035
  /**
1036
1036
  Replace a given range with another range, and then normalize the
@@ -1038,7 +1038,7 @@ class g {
1038
1038
  */
1039
1039
  replaceRange(e, t = this.mainIndex) {
1040
1040
  let n = this.ranges.slice();
1041
- return n[t] = e, g.create(n, this.mainIndex);
1041
+ return n[t] = e, p.create(n, this.mainIndex);
1042
1042
  }
1043
1043
  /**
1044
1044
  Convert this selection to an object that can be serialized to
@@ -1053,13 +1053,13 @@ class g {
1053
1053
  static fromJSON(e) {
1054
1054
  if (!e || !Array.isArray(e.ranges) || typeof e.main != "number" || e.main >= e.ranges.length)
1055
1055
  throw new RangeError("Invalid JSON representation for EditorSelection");
1056
- return new g(e.ranges.map((t) => B.fromJSON(t)), e.main);
1056
+ return new p(e.ranges.map((t) => B.fromJSON(t)), e.main);
1057
1057
  }
1058
1058
  /**
1059
1059
  Create a selection holding a single range.
1060
1060
  */
1061
1061
  static single(e, t = e) {
1062
- return new g([g.range(e, t)], 0);
1062
+ return new p([p.range(e, t)], 0);
1063
1063
  }
1064
1064
  /**
1065
1065
  Sort and merge the given set of ranges, creating a valid
@@ -1071,10 +1071,10 @@ class g {
1071
1071
  for (let n = 0, i = 0; i < e.length; i++) {
1072
1072
  let s = e[i];
1073
1073
  if (s.empty ? s.from <= n : s.from < n)
1074
- return g.normalized(e.slice(), t);
1074
+ return p.normalized(e.slice(), t);
1075
1075
  n = s.to;
1076
1076
  }
1077
- return new g(e, t);
1077
+ return new p(e, t);
1078
1078
  }
1079
1079
  /**
1080
1080
  Create a cursor selection range at the given position. You can
@@ -1100,13 +1100,13 @@ class g {
1100
1100
  let s = e[i], r = e[i - 1];
1101
1101
  if (s.empty ? s.from <= r.to : s.from < r.to) {
1102
1102
  let h = r.from, o = Math.max(s.to, r.to);
1103
- i <= t && t--, e.splice(--i, 2, s.anchor > s.head ? g.range(o, h) : g.range(h, o));
1103
+ i <= t && t--, e.splice(--i, 2, s.anchor > s.head ? p.range(o, h) : p.range(h, o));
1104
1104
  }
1105
1105
  }
1106
- return new g(e, t);
1106
+ return new p(e, t);
1107
1107
  }
1108
1108
  }
1109
- function Ae(l, e) {
1109
+ function Ee(l, e) {
1110
1110
  for (let t of l.ranges)
1111
1111
  if (t.to > e)
1112
1112
  throw new RangeError("Selection points outside of document");
@@ -1171,35 +1171,35 @@ class X {
1171
1171
  }
1172
1172
  dynamicSlot(e) {
1173
1173
  var t;
1174
- let n = this.value, i = this.facet.compareInput, s = this.id, r = e[s] >> 1, h = this.type == 2, o = !1, a = !1, f = [];
1175
- for (let u of this.dependencies)
1176
- u == "doc" ? o = !0 : u == "selection" ? a = !0 : (((t = e[u.id]) !== null && t !== void 0 ? t : 1) & 1) == 0 && f.push(e[u.id]);
1174
+ let n = this.value, i = this.facet.compareInput, s = this.id, r = e[s] >> 1, h = this.type == 2, o = !1, a = !1, u = [];
1175
+ for (let f of this.dependencies)
1176
+ f == "doc" ? o = !0 : f == "selection" ? a = !0 : (((t = e[f.id]) !== null && t !== void 0 ? t : 1) & 1) == 0 && u.push(e[f.id]);
1177
1177
  return {
1178
- create(u) {
1179
- return u.values[r] = n(u), 1;
1178
+ create(f) {
1179
+ return f.values[r] = n(f), 1;
1180
1180
  },
1181
- update(u, c) {
1182
- if (o && c.docChanged || a && (c.docChanged || c.selection) || he(u, f)) {
1183
- let d = n(u);
1184
- if (h ? !ve(d, u.values[r], i) : !i(d, u.values[r]))
1185
- return u.values[r] = d, 1;
1181
+ update(f, d) {
1182
+ if (o && d.docChanged || a && (d.docChanged || d.selection) || he(f, u)) {
1183
+ let c = n(f);
1184
+ if (h ? !xe(c, f.values[r], i) : !i(c, f.values[r]))
1185
+ return f.values[r] = c, 1;
1186
1186
  }
1187
1187
  return 0;
1188
1188
  },
1189
- reconfigure: (u, c) => {
1190
- let d, p = c.config.address[s];
1191
- if (p != null) {
1192
- let E = j(c, p);
1193
- if (this.dependencies.every((v) => v instanceof A ? c.facet(v) === u.facet(v) : v instanceof L ? c.field(v, !1) == u.field(v, !1) : !0) || (h ? ve(d = n(u), E, i) : i(d = n(u), E)))
1194
- return u.values[r] = E, 0;
1189
+ reconfigure: (f, d) => {
1190
+ let c, g = d.config.address[s];
1191
+ if (g != null) {
1192
+ let E = j(d, g);
1193
+ if (this.dependencies.every((v) => v instanceof A ? d.facet(v) === f.facet(v) : v instanceof L ? d.field(v, !1) == f.field(v, !1) : !0) || (h ? xe(c = n(f), E, i) : i(c = n(f), E)))
1194
+ return f.values[r] = E, 0;
1195
1195
  } else
1196
- d = n(u);
1197
- return u.values[r] = d, 1;
1196
+ c = n(f);
1197
+ return f.values[r] = c, 1;
1198
1198
  }
1199
1199
  };
1200
1200
  }
1201
1201
  }
1202
- function ve(l, e, t) {
1202
+ function xe(l, e, t) {
1203
1203
  if (l.length != e.length)
1204
1204
  return !1;
1205
1205
  for (let n = 0; n < l.length; n++)
@@ -1217,13 +1217,13 @@ function qe(l, e, t) {
1217
1217
  let n = t.map((o) => l[o.id]), i = t.map((o) => o.type), s = n.filter((o) => !(o & 1)), r = l[e.id] >> 1;
1218
1218
  function h(o) {
1219
1219
  let a = [];
1220
- for (let f = 0; f < n.length; f++) {
1221
- let u = j(o, n[f]);
1222
- if (i[f] == 2)
1223
- for (let c of u)
1224
- a.push(c);
1220
+ for (let u = 0; u < n.length; u++) {
1221
+ let f = j(o, n[u]);
1222
+ if (i[u] == 2)
1223
+ for (let d of f)
1224
+ a.push(d);
1225
1225
  else
1226
- a.push(u);
1226
+ a.push(f);
1227
1227
  }
1228
1228
  return e.combine(a);
1229
1229
  }
@@ -1236,15 +1236,15 @@ function qe(l, e, t) {
1236
1236
  update(o, a) {
1237
1237
  if (!he(o, s))
1238
1238
  return 0;
1239
- let f = h(o);
1240
- return e.compare(f, o.values[r]) ? 0 : (o.values[r] = f, 1);
1239
+ let u = h(o);
1240
+ return e.compare(u, o.values[r]) ? 0 : (o.values[r] = u, 1);
1241
1241
  },
1242
1242
  reconfigure(o, a) {
1243
- let f = he(o, n), u = a.config.facets[e.id], c = a.facet(e);
1244
- if (u && !f && pe(t, u))
1245
- return o.values[r] = c, 0;
1246
- let d = h(o);
1247
- return e.compare(d, c) ? (o.values[r] = c, 0) : (o.values[r] = d, 1);
1243
+ let u = he(o, n), f = a.config.facets[e.id], d = a.facet(e);
1244
+ if (f && !u && pe(t, f))
1245
+ return o.values[r] = d, 0;
1246
+ let c = h(o);
1247
+ return e.compare(c, d) ? (o.values[r] = d, 0) : (o.values[r] = c, 1);
1248
1248
  }
1249
1249
  };
1250
1250
  }
@@ -1300,9 +1300,9 @@ class L {
1300
1300
  }
1301
1301
  const T = { lowest: 4, low: 3, default: 2, high: 1, highest: 0 };
1302
1302
  function V(l) {
1303
- return (e) => new Ee(e, l);
1303
+ return (e) => new Oe(e, l);
1304
1304
  }
1305
- const it = {
1305
+ const st = {
1306
1306
  /**
1307
1307
  The highest precedence level, for extensions that should end up
1308
1308
  near the start of the precedence ordering.
@@ -1328,7 +1328,7 @@ const it = {
1328
1328
  */
1329
1329
  lowest: /* @__PURE__ */ V(T.lowest)
1330
1330
  };
1331
- class Ee {
1331
+ class Oe {
1332
1332
  constructor(e, t) {
1333
1333
  this.inner = e, this.prec = t;
1334
1334
  }
@@ -1375,35 +1375,35 @@ class Z {
1375
1375
  }
1376
1376
  static resolve(e, t, n) {
1377
1377
  let i = [], s = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ new Map();
1378
- for (let c of ze(e, t, r))
1379
- c instanceof L ? i.push(c) : (s[c.facet.id] || (s[c.facet.id] = [])).push(c);
1378
+ for (let d of We(e, t, r))
1379
+ d instanceof L ? i.push(d) : (s[d.facet.id] || (s[d.facet.id] = [])).push(d);
1380
1380
  let h = /* @__PURE__ */ Object.create(null), o = [], a = [];
1381
- for (let c of i)
1382
- h[c.id] = a.length << 1, a.push((d) => c.slot(d));
1383
- let f = n?.config.facets;
1384
- for (let c in s) {
1385
- let d = s[c], p = d[0].facet, E = f && f[c] || [];
1386
- if (d.every(
1381
+ for (let d of i)
1382
+ h[d.id] = a.length << 1, a.push((c) => d.slot(c));
1383
+ let u = n?.config.facets;
1384
+ for (let d in s) {
1385
+ let c = s[d], g = c[0].facet, E = u && u[d] || [];
1386
+ if (c.every(
1387
1387
  (v) => v.type == 0
1388
1388
  /* Provider.Static */
1389
1389
  ))
1390
- if (h[p.id] = o.length << 1 | 1, pe(E, d))
1391
- o.push(n.facet(p));
1390
+ if (h[g.id] = o.length << 1 | 1, pe(E, c))
1391
+ o.push(n.facet(g));
1392
1392
  else {
1393
- let v = p.combine(d.map((ne) => ne.value));
1394
- o.push(n && p.compare(v, n.facet(p)) ? n.facet(p) : v);
1393
+ let v = g.combine(c.map((ne) => ne.value));
1394
+ o.push(n && g.compare(v, n.facet(g)) ? n.facet(g) : v);
1395
1395
  }
1396
1396
  else {
1397
- for (let v of d)
1397
+ for (let v of c)
1398
1398
  v.type == 0 ? (h[v.id] = o.length << 1 | 1, o.push(v.value)) : (h[v.id] = a.length << 1, a.push((ne) => v.dynamicSlot(ne)));
1399
- h[p.id] = a.length << 1, a.push((v) => qe(v, p, d));
1399
+ h[g.id] = a.length << 1, a.push((v) => qe(v, g, c));
1400
1400
  }
1401
1401
  }
1402
- let u = a.map((c) => c(h));
1403
- return new Z(e, r, u, h, o, s);
1402
+ let f = a.map((d) => d(h));
1403
+ return new Z(e, r, f, h, o, s);
1404
1404
  }
1405
1405
  }
1406
- function ze(l, e, t) {
1406
+ function We(l, e, t) {
1407
1407
  let n = [[], [], [], [], []], i = /* @__PURE__ */ new Map();
1408
1408
  function s(r, h) {
1409
1409
  let o = i.get(r);
@@ -1421,7 +1421,7 @@ function ze(l, e, t) {
1421
1421
  throw new RangeError("Duplicate use of compartment in extensions");
1422
1422
  let a = e.get(r.compartment) || r.inner;
1423
1423
  t.set(r.compartment, a), s(a, h);
1424
- } else if (r instanceof Ee)
1424
+ } else if (r instanceof Oe)
1425
1425
  s(r.inner, r.prec);
1426
1426
  else if (r instanceof L)
1427
1427
  n[h].push(r), r.provides && s(r.provides, h);
@@ -1451,13 +1451,13 @@ function $(l, e) {
1451
1451
  function j(l, e) {
1452
1452
  return e & 1 ? l.config.staticValues[e >> 1] : l.values[e >> 1];
1453
1453
  }
1454
- const Oe = /* @__PURE__ */ A.define(), ae = /* @__PURE__ */ A.define({
1454
+ const Ce = /* @__PURE__ */ A.define(), ae = /* @__PURE__ */ A.define({
1455
1455
  combine: (l) => l.some((e) => e),
1456
1456
  static: !0
1457
- }), Ce = /* @__PURE__ */ A.define({
1457
+ }), Me = /* @__PURE__ */ A.define({
1458
1458
  combine: (l) => l.length ? l[0] : void 0,
1459
1459
  static: !0
1460
- }), Me = /* @__PURE__ */ A.define(), be = /* @__PURE__ */ A.define(), Re = /* @__PURE__ */ A.define(), Te = /* @__PURE__ */ A.define({
1460
+ }), be = /* @__PURE__ */ A.define(), Re = /* @__PURE__ */ A.define(), Te = /* @__PURE__ */ A.define(), Be = /* @__PURE__ */ A.define({
1461
1461
  combine: (l) => l.length ? l[0] : !1
1462
1462
  });
1463
1463
  class U {
@@ -1471,10 +1471,10 @@ class U {
1471
1471
  Define a new type of annotation.
1472
1472
  */
1473
1473
  static define() {
1474
- return new We();
1474
+ return new Ue();
1475
1475
  }
1476
1476
  }
1477
- class We {
1477
+ class Ue {
1478
1478
  /**
1479
1479
  Create an instance of this annotation.
1480
1480
  */
@@ -1482,7 +1482,7 @@ class We {
1482
1482
  return new U(this, e);
1483
1483
  }
1484
1484
  }
1485
- class Ue {
1485
+ class Ge {
1486
1486
  /**
1487
1487
  @internal
1488
1488
  */
@@ -1527,7 +1527,7 @@ class I {
1527
1527
  removed.
1528
1528
  */
1529
1529
  static define(e = {}) {
1530
- return new Ue(e.map || ((t) => t));
1530
+ return new Ge(e.map || ((t) => t));
1531
1531
  }
1532
1532
  /**
1533
1533
  Map an array of effects through a change set.
@@ -1547,7 +1547,7 @@ I.reconfigure = /* @__PURE__ */ I.define();
1547
1547
  I.appendConfig = /* @__PURE__ */ I.define();
1548
1548
  class P {
1549
1549
  constructor(e, t, n, i, s, r) {
1550
- this.startState = e, this.changes = t, this.selection = n, this.effects = i, this.annotations = s, this.scrollIntoView = r, this._doc = null, this._state = null, n && Ae(n, t.newLength), s.some((h) => h.type == P.time) || (this.annotations = s.concat(P.time.of(Date.now())));
1550
+ this.startState = e, this.changes = t, this.selection = n, this.effects = i, this.annotations = s, this.scrollIntoView = r, this._doc = null, this._state = null, n && Ee(n, t.newLength), s.some((h) => h.type == P.time) || (this.annotations = s.concat(P.time.of(Date.now())));
1551
1551
  }
1552
1552
  /**
1553
1553
  @internal
@@ -1623,7 +1623,7 @@ P.time = /* @__PURE__ */ U.define();
1623
1623
  P.userEvent = /* @__PURE__ */ U.define();
1624
1624
  P.addToHistory = /* @__PURE__ */ U.define();
1625
1625
  P.remote = /* @__PURE__ */ U.define();
1626
- function Ge(l, e) {
1626
+ function He(l, e) {
1627
1627
  let t = [];
1628
1628
  for (let n = 0, i = 0; ; ) {
1629
1629
  let s, r;
@@ -1636,7 +1636,7 @@ function Ge(l, e) {
1636
1636
  !t.length || t[t.length - 1] < s ? t.push(s, r) : t[t.length - 1] < r && (t[t.length - 1] = r);
1637
1637
  }
1638
1638
  }
1639
- function Be(l, e, t) {
1639
+ function Fe(l, e, t) {
1640
1640
  var n;
1641
1641
  let i, s, r;
1642
1642
  return t ? (i = e.changes, s = y.empty(e.changes.length), r = l.changes.compose(e.changes)) : (i = e.changes.map(l.changes), s = l.changes.mapDesc(e.changes, !0), r = l.changes.compose(i)), {
@@ -1647,36 +1647,36 @@ function Be(l, e, t) {
1647
1647
  scrollIntoView: l.scrollIntoView || e.scrollIntoView
1648
1648
  };
1649
1649
  }
1650
- function fe(l, e, t) {
1650
+ function ue(l, e, t) {
1651
1651
  let n = e.selection, i = F(e.annotations);
1652
1652
  return e.userEvent && (i = i.concat(P.userEvent.of(e.userEvent))), {
1653
- changes: e.changes instanceof y ? e.changes : y.of(e.changes || [], t, l.facet(Ce)),
1654
- selection: n && (n instanceof g ? n : g.single(n.anchor, n.head)),
1653
+ changes: e.changes instanceof y ? e.changes : y.of(e.changes || [], t, l.facet(Me)),
1654
+ selection: n && (n instanceof p ? n : p.single(n.anchor, n.head)),
1655
1655
  effects: F(e.effects),
1656
1656
  annotations: i,
1657
1657
  scrollIntoView: !!e.scrollIntoView
1658
1658
  };
1659
1659
  }
1660
- function Fe(l, e, t) {
1661
- let n = fe(l, e.length ? e[0] : {}, l.doc.length);
1660
+ function Je(l, e, t) {
1661
+ let n = ue(l, e.length ? e[0] : {}, l.doc.length);
1662
1662
  e.length && e[0].filter === !1 && (t = !1);
1663
1663
  for (let s = 1; s < e.length; s++) {
1664
1664
  e[s].filter === !1 && (t = !1);
1665
1665
  let r = !!e[s].sequential;
1666
- n = Be(n, fe(l, e[s], r ? n.changes.newLength : l.doc.length), r);
1666
+ n = Fe(n, ue(l, e[s], r ? n.changes.newLength : l.doc.length), r);
1667
1667
  }
1668
1668
  let i = P.create(l, n.changes, n.selection, n.effects, n.annotations, n.scrollIntoView);
1669
- return Ke(t ? He(i) : i);
1669
+ return Qe(t ? Ke(i) : i);
1670
1670
  }
1671
- function He(l) {
1671
+ function Ke(l) {
1672
1672
  let e = l.startState, t = !0;
1673
- for (let i of e.facet(Me)) {
1673
+ for (let i of e.facet(be)) {
1674
1674
  let s = i(l);
1675
1675
  if (s === !1) {
1676
1676
  t = !1;
1677
1677
  break;
1678
1678
  }
1679
- Array.isArray(s) && (t = t === !0 ? s : Ge(t, s));
1679
+ Array.isArray(s) && (t = t === !0 ? s : He(t, s));
1680
1680
  }
1681
1681
  if (t !== !0) {
1682
1682
  let i, s;
@@ -1688,49 +1688,49 @@ function He(l) {
1688
1688
  }
1689
1689
  l = P.create(e, i, l.selection && l.selection.map(s), I.mapEffects(l.effects, s), l.annotations, l.scrollIntoView);
1690
1690
  }
1691
- let n = e.facet(be);
1691
+ let n = e.facet(Re);
1692
1692
  for (let i = n.length - 1; i >= 0; i--) {
1693
1693
  let s = n[i](l);
1694
- s instanceof P ? l = s : Array.isArray(s) && s.length == 1 && s[0] instanceof P ? l = s[0] : l = Fe(e, F(s), !1);
1694
+ s instanceof P ? l = s : Array.isArray(s) && s.length == 1 && s[0] instanceof P ? l = s[0] : l = Je(e, F(s), !1);
1695
1695
  }
1696
1696
  return l;
1697
1697
  }
1698
- function Ke(l) {
1699
- let e = l.startState, t = e.facet(Re), n = l;
1698
+ function Qe(l) {
1699
+ let e = l.startState, t = e.facet(Te), n = l;
1700
1700
  for (let i = t.length - 1; i >= 0; i--) {
1701
1701
  let s = t[i](l);
1702
- s && Object.keys(s).length && (n = Be(n, fe(e, s, l.changes.newLength), !0));
1702
+ s && Object.keys(s).length && (n = Fe(n, ue(e, s, l.changes.newLength), !0));
1703
1703
  }
1704
1704
  return n == l ? l : P.create(e, l.changes, l.selection, n.effects, n.annotations, n.scrollIntoView);
1705
1705
  }
1706
- const Qe = [];
1706
+ const Xe = [];
1707
1707
  function F(l) {
1708
- return l == null ? Qe : Array.isArray(l) ? l : [l];
1708
+ return l == null ? Xe : Array.isArray(l) ? l : [l];
1709
1709
  }
1710
1710
  var R = /* @__PURE__ */ (function(l) {
1711
1711
  return l[l.Word = 0] = "Word", l[l.Space = 1] = "Space", l[l.Other = 2] = "Other", l;
1712
1712
  })(R || (R = {}));
1713
- const Xe = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
1714
- let ue;
1713
+ const Ye = /[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;
1714
+ let fe;
1715
1715
  try {
1716
- ue = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
1716
+ fe = /* @__PURE__ */ new RegExp("[\\p{Alphabetic}\\p{Number}_]", "u");
1717
1717
  } catch {
1718
1718
  }
1719
- function Ye(l) {
1720
- if (ue)
1721
- return ue.test(l);
1719
+ function Ze(l) {
1720
+ if (fe)
1721
+ return fe.test(l);
1722
1722
  for (let e = 0; e < l.length; e++) {
1723
1723
  let t = l[e];
1724
- if (/\w/.test(t) || t > "€" && (t.toUpperCase() != t.toLowerCase() || Xe.test(t)))
1724
+ if (/\w/.test(t) || t > "€" && (t.toUpperCase() != t.toLowerCase() || Ye.test(t)))
1725
1725
  return !0;
1726
1726
  }
1727
1727
  return !1;
1728
1728
  }
1729
- function Ze(l) {
1729
+ function je(l) {
1730
1730
  return (e) => {
1731
1731
  if (!/\S/.test(e))
1732
1732
  return R.Space;
1733
- if (Ye(e))
1733
+ if (Ze(e))
1734
1734
  return R.Word;
1735
1735
  for (let t = 0; t < l.length; t++)
1736
1736
  if (e.indexOf(l[t]) > -1)
@@ -1770,7 +1770,7 @@ class w {
1770
1770
  specs take precedence over earlier ones.
1771
1771
  */
1772
1772
  update(...e) {
1773
- return Fe(this, e, !0);
1773
+ return Je(this, e, !0);
1774
1774
  }
1775
1775
  /**
1776
1776
  @internal
@@ -1791,7 +1791,7 @@ class w {
1791
1791
  replaceSelection(e) {
1792
1792
  return typeof e == "string" && (e = this.toText(e)), this.changeByRange((t) => ({
1793
1793
  changes: { from: t.from, to: t.to, insert: e },
1794
- range: g.cursor(t.from + e.length)
1794
+ range: p.cursor(t.from + e.length)
1795
1795
  }));
1796
1796
  }
1797
1797
  /**
@@ -1808,15 +1808,15 @@ class w {
1808
1808
  changeByRange(e) {
1809
1809
  let t = this.selection, n = e(t.ranges[0]), i = this.changes(n.changes), s = [n.range], r = F(n.effects);
1810
1810
  for (let h = 1; h < t.ranges.length; h++) {
1811
- let o = e(t.ranges[h]), a = this.changes(o.changes), f = a.map(i);
1812
- for (let c = 0; c < h; c++)
1813
- s[c] = s[c].map(f);
1814
- let u = i.mapDesc(a, !0);
1815
- s.push(o.range.map(u)), i = i.compose(f), r = I.mapEffects(r, f).concat(I.mapEffects(F(o.effects), u));
1811
+ let o = e(t.ranges[h]), a = this.changes(o.changes), u = a.map(i);
1812
+ for (let d = 0; d < h; d++)
1813
+ s[d] = s[d].map(u);
1814
+ let f = i.mapDesc(a, !0);
1815
+ s.push(o.range.map(f)), i = i.compose(u), r = I.mapEffects(r, u).concat(I.mapEffects(F(o.effects), f));
1816
1816
  }
1817
1817
  return {
1818
1818
  changes: i,
1819
- selection: g.create(s, t.mainIndex),
1819
+ selection: p.create(s, t.mainIndex),
1820
1820
  effects: r
1821
1821
  };
1822
1822
  }
@@ -1886,7 +1886,7 @@ class w {
1886
1886
  }
1887
1887
  return w.create({
1888
1888
  doc: e.doc,
1889
- selection: g.fromJSON(e.selection),
1889
+ selection: p.fromJSON(e.selection),
1890
1890
  extensions: t.extensions ? i.concat([t.extensions]) : i
1891
1891
  });
1892
1892
  }
@@ -1896,8 +1896,8 @@ class w {
1896
1896
  transactions.
1897
1897
  */
1898
1898
  static create(e = {}) {
1899
- let t = Z.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof x ? e.doc : x.of((e.doc || "").split(t.staticFacet(w.lineSeparator) || se)), i = e.selection ? e.selection instanceof g ? e.selection : g.single(e.selection.anchor, e.selection.head) : g.single(0);
1900
- return Ae(i, n.length), t.staticFacet(ae) || (i = i.asSingle()), new w(t, n, i, t.dynamicSlots.map(() => null), (s, r) => r.create(s), null);
1899
+ let t = Z.resolve(e.extensions || [], /* @__PURE__ */ new Map()), n = e.doc instanceof x ? e.doc : x.of((e.doc || "").split(t.staticFacet(w.lineSeparator) || se)), i = e.selection ? e.selection instanceof p ? e.selection : p.single(e.selection.anchor, e.selection.head) : p.single(0);
1900
+ return Ee(i, n.length), t.staticFacet(ae) || (i = i.asSingle()), new w(t, n, i, t.dynamicSlots.map(() => null), (s, r) => r.create(s), null);
1901
1901
  }
1902
1902
  /**
1903
1903
  The size (in columns) of a tab in the document, determined by
@@ -1919,7 +1919,7 @@ class w {
1919
1919
  [configured](https://codemirror.net/6/docs/ref/#state.EditorState^readOnly) to be read-only.
1920
1920
  */
1921
1921
  get readOnly() {
1922
- return this.facet(Te);
1922
+ return this.facet(Be);
1923
1923
  }
1924
1924
  /**
1925
1925
  Look up a translation for the given phrase (via the
@@ -1962,7 +1962,7 @@ class w {
1962
1962
  */
1963
1963
  languageDataAt(e, t, n = -1) {
1964
1964
  let i = [];
1965
- for (let s of this.facet(Oe))
1965
+ for (let s of this.facet(Ce))
1966
1966
  for (let r of s(this, t, n))
1967
1967
  Object.prototype.hasOwnProperty.call(r, e) && i.push(r[e]);
1968
1968
  return i;
@@ -1979,7 +1979,8 @@ class w {
1979
1979
  - Other (anything else)
1980
1980
  */
1981
1981
  charCategorizer(e) {
1982
- return Ze(this.languageDataAt("wordChars", e).join(""));
1982
+ let t = this.languageDataAt("wordChars", e);
1983
+ return je(t.length ? t[0] : "");
1983
1984
  }
1984
1985
  /**
1985
1986
  Find the word at the given position, meaning the range
@@ -2001,27 +2002,27 @@ class w {
2001
2002
  break;
2002
2003
  h = o;
2003
2004
  }
2004
- return r == h ? null : g.range(r + n, h + n);
2005
+ return r == h ? null : p.range(r + n, h + n);
2005
2006
  }
2006
2007
  }
2007
2008
  w.allowMultipleSelections = ae;
2008
2009
  w.tabSize = /* @__PURE__ */ A.define({
2009
2010
  combine: (l) => l.length ? l[0] : 4
2010
2011
  });
2011
- w.lineSeparator = Ce;
2012
- w.readOnly = Te;
2012
+ w.lineSeparator = Me;
2013
+ w.readOnly = Be;
2013
2014
  w.phrases = /* @__PURE__ */ A.define({
2014
2015
  compare(l, e) {
2015
2016
  let t = Object.keys(l), n = Object.keys(e);
2016
2017
  return t.length == n.length && t.every((i) => l[i] == e[i]);
2017
2018
  }
2018
2019
  });
2019
- w.languageData = Oe;
2020
- w.changeFilter = Me;
2021
- w.transactionFilter = be;
2022
- w.transactionExtender = Re;
2020
+ w.languageData = Ce;
2021
+ w.changeFilter = be;
2022
+ w.transactionFilter = Re;
2023
+ w.transactionExtender = Te;
2023
2024
  te.reconfigure = /* @__PURE__ */ I.define();
2024
- function st(l, e, t = {}) {
2025
+ function rt(l, e, t = {}) {
2025
2026
  let n = {};
2026
2027
  for (let i of l)
2027
2028
  for (let s of Object.keys(i)) {
@@ -2052,13 +2053,16 @@ class _ {
2052
2053
  Create a [range](https://codemirror.net/6/docs/ref/#state.Range) with this value.
2053
2054
  */
2054
2055
  range(e, t = e) {
2055
- return z.create(e, t, this);
2056
+ return q.create(e, t, this);
2056
2057
  }
2057
2058
  }
2058
2059
  _.prototype.startSide = _.prototype.endSide = 0;
2059
2060
  _.prototype.point = !1;
2060
2061
  _.prototype.mapMode = M.TrackDel;
2061
- class z {
2062
+ function me(l, e) {
2063
+ return l == e || l.constructor == e.constructor && l.eq(e);
2064
+ }
2065
+ class q {
2062
2066
  constructor(e, t, n) {
2063
2067
  this.from = e, this.to = t, this.value = n;
2064
2068
  }
@@ -2066,13 +2070,13 @@ class z {
2066
2070
  @internal
2067
2071
  */
2068
2072
  static create(e, t, n) {
2069
- return new z(e, t, n);
2073
+ return new q(e, t, n);
2070
2074
  }
2071
2075
  }
2072
2076
  function ce(l, e) {
2073
2077
  return l.from - e.from || l.value.startSide - e.value.startSide;
2074
2078
  }
2075
- class me {
2079
+ class we {
2076
2080
  constructor(e, t, n, i) {
2077
2081
  this.from = e, this.to = t, this.value = n, this.maxPoint = i;
2078
2082
  }
@@ -2100,16 +2104,16 @@ class me {
2100
2104
  map(e, t) {
2101
2105
  let n = [], i = [], s = [], r = -1, h = -1;
2102
2106
  for (let o = 0; o < this.value.length; o++) {
2103
- let a = this.value[o], f = this.from[o] + e, u = this.to[o] + e, c, d;
2104
- if (f == u) {
2105
- let p = t.mapPos(f, a.startSide, a.mapMode);
2106
- if (p == null || (c = d = p, a.startSide != a.endSide && (d = t.mapPos(f, a.endSide), d < c)))
2107
+ let a = this.value[o], u = this.from[o] + e, f = this.to[o] + e, d, c;
2108
+ if (u == f) {
2109
+ let g = t.mapPos(u, a.startSide, a.mapMode);
2110
+ if (g == null || (d = c = g, a.startSide != a.endSide && (c = t.mapPos(u, a.endSide), c < d)))
2107
2111
  continue;
2108
- } else if (c = t.mapPos(f, a.startSide), d = t.mapPos(u, a.endSide), c > d || c == d && a.startSide > 0 && a.endSide <= 0)
2112
+ } else if (d = t.mapPos(u, a.startSide), c = t.mapPos(f, a.endSide), d > c || d == c && a.startSide > 0 && a.endSide <= 0)
2109
2113
  continue;
2110
- (d - c || a.endSide - a.startSide) < 0 || (r < 0 && (r = c), a.point && (h = Math.max(h, d - c)), n.push(a), i.push(c - r), s.push(d - r));
2114
+ (c - d || a.endSide - a.startSide) < 0 || (r < 0 && (r = d), a.point && (h = Math.max(h, c - d)), n.push(a), i.push(d - r), s.push(c - r));
2111
2115
  }
2112
- return { mapped: n.length ? new me(i, s, n, h) : null, pos: r };
2116
+ return { mapped: n.length ? new we(i, s, n, h) : null, pos: r };
2113
2117
  }
2114
2118
  }
2115
2119
  class S {
@@ -2161,13 +2165,13 @@ class S {
2161
2165
  return this;
2162
2166
  if (n && (t = t.slice().sort(ce)), this.isEmpty)
2163
2167
  return t.length ? S.of(t) : this;
2164
- let h = new Je(this, null, -1).goto(0), o = 0, a = [], f = new ee();
2168
+ let h = new Le(this, null, -1).goto(0), o = 0, a = [], u = new ee();
2165
2169
  for (; h.value || o < t.length; )
2166
2170
  if (o < t.length && (h.from - t[o].from || h.startSide - t[o].value.startSide) >= 0) {
2167
- let u = t[o++];
2168
- f.addInner(u.from, u.to, u.value) || a.push(u);
2169
- } else h.rangeIndex == 1 && h.chunkIndex < this.chunk.length && (o == t.length || this.chunkEnd(h.chunkIndex) < t[o].from) && (!r || i > this.chunkEnd(h.chunkIndex) || s < this.chunkPos[h.chunkIndex]) && f.addChunk(this.chunkPos[h.chunkIndex], this.chunk[h.chunkIndex]) ? h.nextChunk() : ((!r || i > h.to || s < h.from || r(h.from, h.to, h.value)) && (f.addInner(h.from, h.to, h.value) || a.push(z.create(h.from, h.to, h.value))), h.next());
2170
- return f.finishInner(this.nextLayer.isEmpty && !a.length ? S.empty : this.nextLayer.update({ add: a, filter: r, filterFrom: i, filterTo: s }));
2171
+ let f = t[o++];
2172
+ u.addInner(f.from, f.to, f.value) || a.push(f);
2173
+ } else h.rangeIndex == 1 && h.chunkIndex < this.chunk.length && (o == t.length || this.chunkEnd(h.chunkIndex) < t[o].from) && (!r || i > this.chunkEnd(h.chunkIndex) || s < this.chunkPos[h.chunkIndex]) && u.addChunk(this.chunkPos[h.chunkIndex], this.chunk[h.chunkIndex]) ? h.nextChunk() : ((!r || i > h.to || s < h.from || r(h.from, h.to, h.value)) && (u.addInner(h.from, h.to, h.value) || a.push(q.create(h.from, h.to, h.value))), h.next());
2174
+ return u.finishInner(this.nextLayer.isEmpty && !a.length ? S.empty : this.nextLayer.update({ add: a, filter: r, filterFrom: i, filterTo: s }));
2171
2175
  }
2172
2176
  /**
2173
2177
  Map this range set through a set of changes, return the new set.
@@ -2181,8 +2185,8 @@ class S {
2181
2185
  if (a === !1)
2182
2186
  i = Math.max(i, o.maxPoint), t.push(o), n.push(e.mapPos(h));
2183
2187
  else if (a === !0) {
2184
- let { mapped: f, pos: u } = o.map(h, e);
2185
- f && (i = Math.max(i, f.maxPoint), t.push(f), n.push(u));
2188
+ let { mapped: u, pos: f } = o.map(h, e);
2189
+ u && (i = Math.max(i, u.maxPoint), t.push(u), n.push(f));
2186
2190
  }
2187
2191
  }
2188
2192
  let s = this.nextLayer.map(e);
@@ -2229,8 +2233,8 @@ class S {
2229
2233
  to notify it of possible differences.
2230
2234
  */
2231
2235
  static compare(e, t, n, i, s = -1) {
2232
- let r = e.filter((u) => u.maxPoint > 0 || !u.isEmpty && u.maxPoint >= s), h = t.filter((u) => u.maxPoint > 0 || !u.isEmpty && u.maxPoint >= s), o = xe(r, h, n), a = new N(r, o, s), f = new N(h, o, s);
2233
- n.iterGaps((u, c, d) => ye(a, u, f, c, d, i)), n.empty && n.length == 0 && ye(a, 0, f, 0, 0, i);
2236
+ let r = e.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), h = t.filter((f) => f.maxPoint > 0 || !f.isEmpty && f.maxPoint >= s), o = ye(r, h, n), a = new N(r, o, s), u = new N(h, o, s);
2237
+ n.iterGaps((f, d, c) => ke(a, f, u, d, c, i)), n.empty && n.length == 0 && ke(a, 0, u, 0, 0, i);
2234
2238
  }
2235
2239
  /**
2236
2240
  Compare the contents of two groups of range sets, returning true
@@ -2238,14 +2242,14 @@ class S {
2238
2242
  */
2239
2243
  static eq(e, t, n = 0, i) {
2240
2244
  i == null && (i = 999999999);
2241
- let s = e.filter((f) => !f.isEmpty && t.indexOf(f) < 0), r = t.filter((f) => !f.isEmpty && e.indexOf(f) < 0);
2245
+ let s = e.filter((u) => !u.isEmpty && t.indexOf(u) < 0), r = t.filter((u) => !u.isEmpty && e.indexOf(u) < 0);
2242
2246
  if (s.length != r.length)
2243
2247
  return !1;
2244
2248
  if (!s.length)
2245
2249
  return !0;
2246
- let h = xe(s, r), o = new N(s, h, 0).goto(n), a = new N(r, h, 0).goto(n);
2250
+ let h = ye(s, r), o = new N(s, h, 0).goto(n), a = new N(r, h, 0).goto(n);
2247
2251
  for (; ; ) {
2248
- if (o.to != a.to || !de(o.active, a.active) || o.point && (!a.point || !o.point.eq(a.point)))
2252
+ if (o.to != a.to || !de(o.active, a.active) || o.point && (!a.point || !me(o.point, a.point)))
2249
2253
  return !1;
2250
2254
  if (o.to > i)
2251
2255
  return !0;
@@ -2264,8 +2268,8 @@ class S {
2264
2268
  for (; ; ) {
2265
2269
  let a = Math.min(r.to, n);
2266
2270
  if (r.point) {
2267
- let f = r.activeForPoint(r.to), u = r.pointFrom < t ? f.length + 1 : r.point.startSide < 0 ? f.length : Math.min(f.length, o);
2268
- i.point(h, a, r.point, f, u, r.pointRank), o = Math.min(r.openEnd(a), f.length);
2271
+ let u = r.activeForPoint(r.to), f = r.pointFrom < t ? u.length + 1 : r.point.startSide < 0 ? u.length : Math.min(u.length, o);
2272
+ i.point(h, a, r.point, u, f, r.pointRank), o = Math.min(r.openEnd(a), u.length);
2269
2273
  } else a > h && (i.span(h, a, r.active, o), o = r.openEnd(a));
2270
2274
  if (r.to > n)
2271
2275
  return o + (r.point && r.to > n ? 1 : 0);
@@ -2281,7 +2285,7 @@ class S {
2281
2285
  */
2282
2286
  static of(e, t = !1) {
2283
2287
  let n = new ee();
2284
- for (let i of e instanceof z ? [e] : t ? je(e) : e)
2288
+ for (let i of e instanceof q ? [e] : t ? _e(e) : e)
2285
2289
  n.add(i.from, i.to, i.value);
2286
2290
  return n.finish();
2287
2291
  }
@@ -2299,7 +2303,7 @@ class S {
2299
2303
  }
2300
2304
  }
2301
2305
  S.empty = /* @__PURE__ */ new S([], [], null, -1);
2302
- function je(l) {
2306
+ function _e(l) {
2303
2307
  if (l.length > 1)
2304
2308
  for (let e = l[0], t = 1; t < l.length; t++) {
2305
2309
  let n = l[t];
@@ -2312,7 +2316,7 @@ function je(l) {
2312
2316
  S.empty.nextLayer = S.empty;
2313
2317
  class ee {
2314
2318
  finishChunk(e) {
2315
- this.chunks.push(new me(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, e && (this.from = [], this.to = [], this.value = []);
2319
+ this.chunks.push(new we(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, e && (this.from = [], this.to = [], this.value = []);
2316
2320
  }
2317
2321
  /**
2318
2322
  Create an empty builder.
@@ -2363,7 +2367,7 @@ class ee {
2363
2367
  return this.from = null, t;
2364
2368
  }
2365
2369
  }
2366
- function xe(l, e, t) {
2370
+ function ye(l, e, t) {
2367
2371
  let n = /* @__PURE__ */ new Map();
2368
2372
  for (let s of l)
2369
2373
  for (let r = 0; r < s.chunk.length; r++)
@@ -2376,7 +2380,7 @@ function xe(l, e, t) {
2376
2380
  }
2377
2381
  return i;
2378
2382
  }
2379
- class Je {
2383
+ class Le {
2380
2384
  constructor(e, t, n, i = 0) {
2381
2385
  this.layer = e, this.skip = t, this.minPoint = n, this.rank = i;
2382
2386
  }
@@ -2440,7 +2444,7 @@ class W {
2440
2444
  let i = [];
2441
2445
  for (let s = 0; s < e.length; s++)
2442
2446
  for (let r = e[s]; !r.isEmpty; r = r.nextLayer)
2443
- r.maxPoint >= n && i.push(new Je(r, t, n, s));
2447
+ r.maxPoint >= n && i.push(new Le(r, t, n, s));
2444
2448
  return i.length == 1 ? i[0] : new W(i);
2445
2449
  }
2446
2450
  get startSide() {
@@ -2493,13 +2497,13 @@ class N {
2493
2497
  this.cursor.forward(e, t);
2494
2498
  }
2495
2499
  removeActive(e) {
2496
- H(this.active, e), H(this.activeTo, e), H(this.activeRank, e), this.minActive = ke(this.active, this.activeTo);
2500
+ H(this.active, e), H(this.activeTo, e), H(this.activeRank, e), this.minActive = Se(this.active, this.activeTo);
2497
2501
  }
2498
2502
  addActive(e) {
2499
2503
  let t = 0, { value: n, to: i, rank: s } = this.cursor;
2500
2504
  for (; t < this.activeRank.length && (s - this.activeRank[t] || i - this.activeTo[t]) > 0; )
2501
2505
  t++;
2502
- K(this.active, t, n), K(this.activeTo, t, i), K(this.activeRank, t, s), e && K(e, t, this.cursor.from), this.minActive = ke(this.active, this.activeTo);
2506
+ K(this.active, t, n), K(this.activeTo, t, i), K(this.activeRank, t, s), e && K(e, t, this.cursor.from), this.minActive = Se(this.active, this.activeTo);
2503
2507
  }
2504
2508
  // After calling this, if `this.point` != null, the next range is a
2505
2509
  // point. Otherwise, it's a regular range, covered by `this.active`.
@@ -2556,21 +2560,21 @@ class N {
2556
2560
  return t;
2557
2561
  }
2558
2562
  }
2559
- function ye(l, e, t, n, i, s) {
2563
+ function ke(l, e, t, n, i, s) {
2560
2564
  l.goto(e), t.goto(n);
2561
- let r = n + i, h = n, o = n - e;
2562
- for (; ; ) {
2563
- let a = l.to + o - t.to, f = a || l.endSide - t.endSide, u = f < 0 ? l.to + o : t.to, c = Math.min(u, r);
2564
- if (l.point || t.point ? l.point && t.point && (l.point == t.point || l.point.eq(t.point)) && de(l.activeForPoint(l.to), t.activeForPoint(t.to)) || s.comparePoint(h, c, l.point, t.point) : c > h && !de(l.active, t.active) && s.compareRange(h, c, l.active, t.active), u > r)
2565
+ let r = n + i, h = n, o = n - e, a = !!s.boundChange;
2566
+ for (let u = !1; ; ) {
2567
+ let f = l.to + o - t.to, d = f || l.endSide - t.endSide, c = d < 0 ? l.to + o : t.to, g = Math.min(c, r);
2568
+ if (l.point || t.point ? (l.point && t.point && me(l.point, t.point) && de(l.activeForPoint(l.to), t.activeForPoint(t.to)) || s.comparePoint(h, g, l.point, t.point), u = !1) : (u && s.boundChange(h), g > h && !de(l.active, t.active) && s.compareRange(h, g, l.active, t.active), a && g < r && (f || l.openEnd(c) != t.openEnd(c)) && (u = !0)), c > r)
2565
2569
  break;
2566
- (a || l.openEnd != t.openEnd) && s.boundChange && s.boundChange(u), h = u, f <= 0 && l.next(), f >= 0 && t.next();
2570
+ h = c, d <= 0 && l.next(), d >= 0 && t.next();
2567
2571
  }
2568
2572
  }
2569
2573
  function de(l, e) {
2570
2574
  if (l.length != e.length)
2571
2575
  return !1;
2572
2576
  for (let t = 0; t < l.length; t++)
2573
- if (l[t] != e[t] && !l[t].eq(e[t]))
2577
+ if (l[t] != e[t] && !me(l[t], e[t]))
2574
2578
  return !1;
2575
2579
  return !0;
2576
2580
  }
@@ -2584,19 +2588,19 @@ function K(l, e, t) {
2584
2588
  l[n + 1] = l[n];
2585
2589
  l[e] = t;
2586
2590
  }
2587
- function ke(l, e) {
2591
+ function Se(l, e) {
2588
2592
  let t = -1, n = 1e9;
2589
2593
  for (let i = 0; i < e.length; i++)
2590
2594
  (e[i] - n || l[i].endSide - l[t].endSide) < 0 && (t = i, n = e[i]);
2591
2595
  return t;
2592
2596
  }
2593
- function rt(l, e, t = l.length) {
2597
+ function lt(l, e, t = l.length) {
2594
2598
  let n = 0;
2595
2599
  for (let i = 0; i < t && i < l.length; )
2596
2600
  l.charCodeAt(i) == 9 ? (n += e - n % e, i++) : (n++, i = Y(l, i));
2597
2601
  return n;
2598
2602
  }
2599
- function lt(l, e, t, n) {
2603
+ function ht(l, e, t, n) {
2600
2604
  for (let i = 0, s = 0; ; ) {
2601
2605
  if (s >= e)
2602
2606
  return i;
@@ -2608,32 +2612,32 @@ function lt(l, e, t, n) {
2608
2612
  }
2609
2613
  export {
2610
2614
  U as Annotation,
2611
- We as AnnotationType,
2615
+ Ue as AnnotationType,
2612
2616
  C as ChangeDesc,
2613
2617
  y as ChangeSet,
2614
2618
  R as CharCategory,
2615
2619
  te as Compartment,
2616
- g as EditorSelection,
2620
+ p as EditorSelection,
2617
2621
  w as EditorState,
2618
2622
  A as Facet,
2619
- Ne as Line,
2623
+ De as Line,
2620
2624
  M as MapMode,
2621
- it as Prec,
2622
- z as Range,
2625
+ st as Prec,
2626
+ q as Range,
2623
2627
  S as RangeSet,
2624
2628
  ee as RangeSetBuilder,
2625
2629
  _ as RangeValue,
2626
2630
  B as SelectionRange,
2627
2631
  I as StateEffect,
2628
- Ue as StateEffectType,
2632
+ Ge as StateEffectType,
2629
2633
  L as StateField,
2630
2634
  x as Text,
2631
2635
  P as Transaction,
2632
- et as codePointAt,
2633
- nt as codePointSize,
2634
- st as combineConfig,
2635
- rt as countColumn,
2636
+ tt as codePointAt,
2637
+ it as codePointSize,
2638
+ rt as combineConfig,
2639
+ lt as countColumn,
2636
2640
  Y as findClusterBreak,
2637
- lt as findColumn,
2638
- tt as fromCodePoint
2641
+ ht as findColumn,
2642
+ nt as fromCodePoint
2639
2643
  };