@marimo-team/islands 0.25.3-dev209 → 0.25.3-dev210

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 (140) hide show
  1. package/dist/{ConnectedDataExplorerComponent-ApTYh0V3.js → ConnectedDataExplorerComponent-D6RHJV8D.js} +114 -112
  2. package/dist/{ErrorBoundary-B1QlXN-y.js → ErrorBoundary-VruaQLnK.js} +10 -10
  3. package/dist/{abnfDiagram-VCTEODGH-uo9xhZY0.js → abnfDiagram-VCTEODGH-0q7Lbmii.js} +2 -2
  4. package/dist/{any-language-editor-BVFHDDQ3.js → any-language-editor-jGaR0EAo.js} +5 -5
  5. package/dist/{architectureDiagram-5GKGNRK7-Hz6eyeOD.js → architectureDiagram-5GKGNRK7-1PydKPmE.js} +1 -1
  6. package/dist/{button-BQRdqQi1.js → button-B6RjDKJx.js} +54 -51
  7. package/dist/{capabilities-C2QUNRXi.js → capabilities-CkVzWJEX.js} +1 -1
  8. package/dist/{chat-ui-BTA1I5i1.js → chat-ui-B5pH_aXk.js} +414 -413
  9. package/dist/{check-C9Mp9eCK.js → check-Z_vtI3OL.js} +1 -1
  10. package/dist/{chunk-IMKFNOWR-DBM2i23k.js → chunk-IMKFNOWR-DEzZZ1Zc.js} +1 -1
  11. package/dist/{chunk-SHT3W25Y-L8KQLLBy.js → chunk-SHT3W25Y-CuHj-hnn.js} +1 -1
  12. package/dist/{chunk-SVP7TREG-BOUJKJEP.js → chunk-SVP7TREG-BPiZK2bA.js} +1 -1
  13. package/dist/{chunk-TICWLB2K-DY3CzFjX.js → chunk-TICWLB2K-DF6XcIjM.js} +1 -1
  14. package/dist/{classDiagram-ZZMXUADV-s9iwW-q4.js → classDiagram-ZZMXUADV-CMdR-cP4.js} +2 -2
  15. package/dist/{classDiagram-v2-VYDZK3BY-2GI5CjGB.js → classDiagram-v2-VYDZK3BY-DRvc3_7Y.js} +2 -2
  16. package/dist/{code-visibility-CCGlDSq4.js → code-visibility-BdFhHfIC.js} +28 -28
  17. package/dist/{common-C1PmVtVW.js → common-Ce1SgsX1.js} +8034 -8027
  18. package/dist/{toDate-BZZ64K_m.js → config-DbjzjwxX.js} +98 -164
  19. package/dist/{copy-icon-De584pZ4.js → copy-icon-CG57cxwb.js} +3 -3
  20. package/dist/createReducer-DePYJ0F3.js +63 -0
  21. package/dist/{cynefinDiagram-5FMLGOSQ-DOxnhBK2.js → cynefinDiagram-5FMLGOSQ-BkBjEY9l.js} +1 -1
  22. package/dist/{dagre-GXQ25YYZ-D1AhEfpM.js → dagre-GXQ25YYZ-D-HEaW4I.js} +1 -1
  23. package/dist/{data-grid-overlay-editor-B3KXkZvo.js → data-grid-overlay-editor-Bps1p6jQ.js} +1 -1
  24. package/dist/{diagram-S7CK7UJ4-DV_GebF_.js → diagram-S7CK7UJ4-Bn-oF-rB.js} +1 -1
  25. package/dist/{diagram-UQ7AKVKN-6dNzGFfD.js → diagram-UQ7AKVKN-BpzzXWBj.js} +1 -1
  26. package/dist/{diagram-VX7I27RA-DUh9jsfi.js → diagram-VX7I27RA-COOtvfBP.js} +1 -1
  27. package/dist/{diagram-Z3DM3KII-Cug-qcQ8.js → diagram-Z3DM3KII-K5cXvbrl.js} +1 -1
  28. package/dist/{dialog-DVRfQuhD.js → dialog-DsZ49mmU.js} +26 -26
  29. package/dist/{dist-BJtmSgcE.js → dist-11T5wq3_.js} +41 -40
  30. package/dist/{dist-B1M0bGO3.js → dist-17ugwGZc.js} +59 -58
  31. package/dist/{dist-D7mrh5sO.js → dist-7cRjf--y.js} +135 -134
  32. package/dist/{dist-Ck_C32ye.js → dist-B8pkfkzc.js} +31 -30
  33. package/dist/{dist-Ba2VIn1K.js → dist-B9UoM_wq.js} +54 -53
  34. package/dist/{dist-KN80qWCP.js → dist-BGuMTs1i.js} +118 -117
  35. package/dist/{dist-T5rh6JvL.js → dist-BHW11fni.js} +18 -17
  36. package/dist/dist-BLY4m1Wi.js +850 -0
  37. package/dist/{dist-Bj4bmwUm.js → dist-BNlcVoxs.js} +31 -30
  38. package/dist/{dist-BA13RJj5.js → dist-BQYe5Bju.js} +47 -46
  39. package/dist/{dist-OUle2RT7.js → dist-BX1mn8na.js} +297 -297
  40. package/dist/{dist-CTi5FTiV.js → dist-Bh0PTKUW.js} +108 -107
  41. package/dist/{dist-D9Q3xjiP.js → dist-CKaXK92p.js} +56 -55
  42. package/dist/{dist-DYXM73-k.js → dist-CLhwfhpJ.js} +58 -57
  43. package/dist/{dist-BmS-ZGjl.js → dist-CYeqK4Xw.js} +1854 -2702
  44. package/dist/{dist-D1fnFp1J.js → dist-Cxlp3WH6.js} +16 -15
  45. package/dist/{dist-DVVwOfrD.js → dist-DSJPGj42.js} +64 -63
  46. package/dist/{dist-Bzogh7CW.js → dist-DU9ICsWZ.js} +93 -92
  47. package/dist/{dist-DjeybPOb.js → dist-DWv0ALBi.js} +47 -46
  48. package/dist/{dist-D3x9__Fu.js → dist-DiBpWEsB.js} +39 -38
  49. package/dist/{dist-DtGn9N4h.js → dist-DiLFTlnl.js} +165 -165
  50. package/dist/{dist-DTv9KkpW.js → dist-cVDV5IuI.js} +26 -25
  51. package/dist/{dist-DP60Ubh8.js → dist-fRfaOoq8.js} +44 -43
  52. package/dist/{dist-O0qFpEJh.js → dist-gTTI-9Px.js} +66 -65
  53. package/dist/{dropdown-menu-dlEm41Bt.js → dropdown-menu-CSNdPSnS.js} +2886 -1529
  54. package/dist/{ebnfDiagram-PWID7BFC-d5LKx7Vb.js → ebnfDiagram-PWID7BFC-BI1ZmjVm.js} +2 -2
  55. package/dist/{erDiagram-RLTQ6QDP-BwvlkcID.js → erDiagram-RLTQ6QDP-BtWjj9xy.js} +1 -1
  56. package/dist/{error-banner-DxJ3s8YO.js → error-banner-IsonnvA0.js} +47 -46
  57. package/dist/error-entries-CRPfxMqm.js +2505 -0
  58. package/dist/{esm-Bbw_Njjx.js → esm-BgKjMvWw.js} +389 -388
  59. package/dist/{esm-mDQNEFe_.js → esm-CHjVSexr.js} +305 -306
  60. package/dist/{feedback-button-UsovT9sL.js → feedback-button-2ycmR9GG.js} +112 -112
  61. package/dist/{flowDiagram-HODETNUW-CJcSoFer.js → flowDiagram-HODETNUW-DQvZh96A.js} +2 -2
  62. package/dist/{formats-Ry7c-aIV.js → formats-BK4VefeF.js} +6 -6
  63. package/dist/{glide-data-editor-CRd8kBSp.js → glide-data-editor-Buj2OZjL.js} +99 -99
  64. package/dist/{glide-utils-D98laidb.js → glide-utils-CQddGpa-.js} +3 -3
  65. package/dist/{globals-BDWrOstF.js → globals-B-14fUeb.js} +3 -3
  66. package/dist/{error-entries-CVUHA5r_.js → html-to-image-CgAnxFi8.js} +26314 -25474
  67. package/dist/{infoDiagram-27XIBGKW-Cezgppw3.js → infoDiagram-27XIBGKW-BdAObnc_.js} +1 -1
  68. package/dist/{ishikawaDiagram-5VMMS53U-BahZQwJz.js → ishikawaDiagram-5VMMS53U-DP-jE8dw.js} +1 -1
  69. package/dist/{kanban-definition-UXKFOSKX-Cvfn_Obm.js → kanban-definition-UXKFOSKX-BkMgPjfm.js} +1 -1
  70. package/dist/{loader-DOVB0Syl.js → loader-BisjOLiW.js} +1 -1
  71. package/dist/main.js +2996 -2992
  72. package/dist/{mermaid-BrdwbArF.js → mermaid-B-OFqheA.js} +36 -36
  73. package/dist/{mindmap-definition-YA3MSWOX-uB4B2d-J.js → mindmap-definition-YA3MSWOX-Du7toAZX.js} +1 -1
  74. package/dist/{number-overlay-editor-Bp9a4z5Q.js → number-overlay-editor-ZVFcJ7_u.js} +1 -1
  75. package/dist/{dist-CThPVKaP.js → objectWithoutPropertiesLoose-ai5NUqGa.js} +1139 -1120
  76. package/dist/{pegDiagram-XKGWAZYB-CYaIwAmH.js → pegDiagram-XKGWAZYB-CX_729j0.js} +2 -2
  77. package/dist/{pieDiagram-E7YTZNPT-BJ1oUxVv.js → pieDiagram-E7YTZNPT-dtTFJcVI.js} +1 -1
  78. package/dist/{process-output-SjJxB1wh.js → process-output-Bmev5azU.js} +5 -5
  79. package/dist/{railroadDiagram-O6MQD6OU-BqKSaBux.js → railroadDiagram-O6MQD6OU-Dsc2Cf4c.js} +2 -2
  80. package/dist/{requirementDiagram-BXWQKSXE-DwFhgDhH.js → requirementDiagram-BXWQKSXE-D3g0c60I.js} +1 -1
  81. package/dist/{reveal-component-ov3pS-oO.js → reveal-component-BWz1KjWe.js} +725 -725
  82. package/dist/schemas-CdscWNy_.js +4747 -0
  83. package/dist/select-BSxlITBo.js +1200 -0
  84. package/dist/{sequenceDiagram-WJ2MYXX4-L7ENjfKF.js → sequenceDiagram-WJ2MYXX4-w1pWbIpk.js} +1 -1
  85. package/dist/{spec-BcJ9ncAY.js → spec-Dq8RNplp.js} +4 -4
  86. package/dist/{stateDiagram-D77RDMKH-CVf88u-p.js → stateDiagram-D77RDMKH-BCv7kP4H.js} +2 -2
  87. package/dist/{stateDiagram-v2-MP3YSRHH-DvpkQ1V6.js → stateDiagram-v2-MP3YSRHH-D1cTOt0x.js} +2 -2
  88. package/dist/static-state-BldGd99T.js +72 -0
  89. package/dist/strings-BGW-fXVJ.js +507 -0
  90. package/dist/{swimlanes-42K2YHIH-DIuFHbVE.js → swimlanes-42K2YHIH-DNO6jDnd.js} +1 -1
  91. package/dist/{swimlanesDiagram-VR7AAH4N-CAqHAziW.js → swimlanesDiagram-VR7AAH4N-CkSWsxYJ.js} +2 -2
  92. package/dist/{swiper-component-BVfnhbnt.js → swiper-component-Dir1o8ml.js} +2 -2
  93. package/dist/{timeline-definition-24CTP7MA-xO4EQqBm.js → timeline-definition-24CTP7MA-DQvqGFM9.js} +1 -1
  94. package/dist/toast-BWIPi3aF.js +491 -0
  95. package/dist/{tooltip-s4zZxwKe.js → tooltip-C3UnvsRe.js} +58 -58
  96. package/dist/use-restore-focus-BWO0z1lo.js +1672 -0
  97. package/dist/{useAsyncData-Dqw22wZQ.js → useAsyncData-DsZMvNXn.js} +1 -1
  98. package/dist/{useDateFormatter-D3Tkfzej.js → useDateFormatter-ChB4eyim.js} +2 -2
  99. package/dist/{useDeepCompareMemoize-D3gozcjJ.js → useDeepCompareMemoize-KMBBux8C.js} +1 -1
  100. package/dist/{useIframeCapabilities-6a_yDNXp.js → useIframeCapabilities-cMNQ80CK.js} +1 -1
  101. package/dist/useLifecycle-BquH9ET-.js +112 -0
  102. package/dist/useTheme-B9C1JIy9.js +307 -0
  103. package/dist/utils-DXkj82sK.js +813 -0
  104. package/dist/{vega-component-Blvspl7v.js → vega-component-9NOEITbg.js} +55 -54
  105. package/dist/{vennDiagram-4TSXK5OY-DzCi-lRh.js → vennDiagram-4TSXK5OY-BfzXp4SH.js} +1 -1
  106. package/dist/{wardleyDiagram-VM6X3IG4-CW48xa0n.js → wardleyDiagram-VM6X3IG4-CiqEE8eq.js} +1 -1
  107. package/dist/{xychartDiagram-S5SC5T6Z-UPxGGI2B.js → xychartDiagram-S5SC5T6Z-BTIHCVOI.js} +1 -1
  108. package/package.json +1 -1
  109. package/src/components/editor/cell/__tests__/StagedAICell.test.tsx +1 -1
  110. package/src/components/editor/cell/code/cell-editor.tsx +13 -36
  111. package/src/components/editor/chrome/wrapper/__tests__/pending-ai-cells.test.tsx +1 -1
  112. package/src/components/editor/errors/__tests__/send-error-report-button.test.tsx +11 -5
  113. package/src/components/editor/notebook-cell.tsx +0 -1
  114. package/src/components/scratchpad/scratchpad.test.tsx +3 -11
  115. package/src/components/scratchpad/scratchpad.tsx +24 -22
  116. package/src/components/scratchpad/state.ts +7 -0
  117. package/src/core/ai/__tests__/staged-cells.test.ts +6 -8
  118. package/src/core/ai/staged-cells.ts +4 -2
  119. package/src/core/cells/__tests__/cells.test.ts +44 -60
  120. package/src/core/cells/__tests__/document.test.ts +1 -139
  121. package/src/core/cells/__tests__/notebook-outline.test.ts +8 -6
  122. package/src/core/cells/actions.ts +39 -0
  123. package/src/core/cells/cells.ts +15 -35
  124. package/src/core/cells/document.ts +9 -84
  125. package/src/core/codemirror/__tests__/format.test.ts +0 -34
  126. package/src/core/codemirror/cells/extensions.ts +20 -18
  127. package/src/core/codemirror/cells/state.ts +0 -5
  128. package/src/core/codemirror/format.ts +1 -19
  129. package/src/core/codemirror/misc/__tests__/paste.test.ts +3 -1
  130. package/src/core/codemirror/misc/paste.ts +1 -1
  131. package/src/core/notebook/document/__tests__/codemirror.test.ts +172 -0
  132. package/src/stories/layout/vertical/one-column.stories.tsx +26 -18
  133. package/dist/html-to-image--E3uFbJ9.js +0 -3348
  134. package/dist/label-Qvw1E97W.js +0 -281
  135. package/dist/objectWithoutPropertiesLoose-BRDcTsfB.js +0 -23
  136. package/dist/select-2KOiReNY.js +0 -1423
  137. package/dist/toast-B5t9o6s_.js +0 -1848
  138. package/dist/use-restore-focus-BgDTd2tc.js +0 -6418
  139. package/dist/useLifecycle-CaZi4wTw.js +0 -172
  140. package/dist/useTheme-TzPgWXwB.js +0 -1114
@@ -1,25 +1,24 @@
1
1
  import { a as e } from "./rolldown-runtime-Cb76FRpK.js";
2
2
  import { t } from "./react-sHtZdjeP.js";
3
3
  import { t as n } from "./jsx-runtime-3BD1kT0s.js";
4
- import { $ as r, At as i, C as a, Ct as o, Et as s, F as c, Ft as l, G as u, H as d, It as f, Ot as p, Pt as m, Q as h, Rt as g, St as _, U as v, X as ee, Z as y, _t as te, a as b, at as x, bt as S, ct as C, dt as w, et as T, ft as ne, g as E, gt as D, it as O, j as k, jt as re, k as A, mt as j, p as M, pt as ie, q as N, rt as ae, st as P, ut as oe, wt as F, x as I, zt as L } from "./dist-BmS-ZGjl.js";
5
- import { a as se, c as ce, i as le, r as R } from "./dist-OUle2RT7.js";
6
- import { a as z, c as ue, i as de, n as fe, t as B } from "./dist-CThPVKaP.js";
7
- import { n as pe, t as me } from "./objectWithoutPropertiesLoose-BRDcTsfB.js";
4
+ import { $ as r, At as i, D as a, Dt as o, Et as s, Ft as c, J as l, K as u, Mt as d, Pt as f, R as p, St as m, T as ee, U as h, V as g, X as _, Y as v, _ as y, bt as b, ct as te, et as x, f as S, ft as C, gt as w, it as ne, j as T, jt as E, l as D, lt as O, ot as k, pt as A, q as j, rt as M, st as re, t as N, tt as ie, ut as P, vt as F, wt as ae, y as I, yt as L, z as R } from "./dist-CYeqK4Xw.js";
5
+ import { c as z, d as oe, i as se, n as B, s as V, t as ce, u as le } from "./objectWithoutPropertiesLoose-ai5NUqGa.js";
6
+ import { a as ue, c as H, i as de, r as fe } from "./dist-BX1mn8na.js";
8
7
  //#region ../node_modules/.pnpm/@codemirror+search@6.7.2/node_modules/@codemirror/search/dist/index.js
9
- var V = /* @__PURE__ */ e(t()), he = typeof String.prototype.normalize == "function" ? (e) => e.normalize("NFKD") : (e) => e, H = class {
8
+ var U = /* @__PURE__ */ e(t()), pe = typeof String.prototype.normalize == "function" ? (e) => e.normalize("NFKD") : (e) => e, W = class {
10
9
  constructor(e, t, n = 0, r = e.length, i, a) {
11
10
  this.test = a, this.value = {
12
11
  from: 0,
13
12
  to: 0,
14
13
  precise: !1
15
- }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(n, r), this.bufferStart = n, this.normalize = i ? (e) => i(he(e)) : he, this.query = this.normalize(t);
14
+ }, this.done = !1, this.matches = [], this.buffer = "", this.bufferPos = 0, this.iter = e.iterRange(n, r), this.bufferStart = n, this.normalize = i ? (e) => i(pe(e)) : pe, this.query = this.normalize(t);
16
15
  }
17
16
  peek() {
18
17
  if (this.bufferPos == this.buffer.length) {
19
18
  if (this.bufferStart += this.buffer.length, this.iter.next(), this.iter.done) return -1;
20
19
  this.bufferPos = 0, this.buffer = this.iter.value;
21
20
  }
22
- return m(this.buffer, this.bufferPos);
21
+ return i(this.buffer, this.bufferPos);
23
22
  }
24
23
  next() {
25
24
  for (; this.matches.length;) this.matches.pop();
@@ -29,8 +28,8 @@ var V = /* @__PURE__ */ e(t()), he = typeof String.prototype.normalize == "funct
29
28
  for (;;) {
30
29
  let e = this.peek();
31
30
  if (e < 0) return this.done = !0, this;
32
- let t = L(e), n = this.bufferStart + this.bufferPos;
33
- this.bufferPos += l(e);
31
+ let t = c(e), n = this.bufferStart + this.bufferPos;
32
+ this.bufferPos += E(e);
34
33
  let r = this.normalize(t);
35
34
  if (r.length) for (let e = 0, i = n, a = !0;; e++) {
36
35
  let n = r.charCodeAt(e), o = this.match(n, i, a, this.bufferPos + this.bufferStart, e == r.length - 1);
@@ -61,20 +60,20 @@ var V = /* @__PURE__ */ e(t()), he = typeof String.prototype.normalize == "funct
61
60
  })), a && this.test && !this.test(a.from, a.to, this.buffer, this.bufferStart) && (a = null), a;
62
61
  }
63
62
  };
64
- typeof Symbol < "u" && (H.prototype[Symbol.iterator] = function() {
63
+ typeof Symbol < "u" && (W.prototype[Symbol.iterator] = function() {
65
64
  return this;
66
65
  });
67
- var ge = {
66
+ var me = {
68
67
  from: -1,
69
68
  to: -1,
70
69
  match: /*@__PURE__*/ /.*/.exec(""),
71
70
  precise: !0
72
- }, _e = "gm" + (/x/.unicode == null ? "" : "u"), ve = class {
71
+ }, he = "gm" + (/x/.unicode == null ? "" : "u"), ge = class {
73
72
  constructor(e, t, n, r = 0, i = e.length) {
74
- if (this.text = e, this.to = i, this.curLine = "", this.done = !1, this.value = ge, /\\[sWDnr]|\n|\r|\[\^/.test(t)) return new xe(e, t, n, r, i);
75
- this.re = new RegExp(t, _e + (n?.ignoreCase ? "i" : "")), this.test = n?.test, this.iter = e.iter();
73
+ if (this.text = e, this.to = i, this.curLine = "", this.done = !1, this.value = me, /\\[sWDnr]|\n|\r|\[\^/.test(t)) return new ye(e, t, n, r, i);
74
+ this.re = new RegExp(t, he + (n?.ignoreCase ? "i" : "")), this.test = n?.test, this.iter = e.iter();
76
75
  let a = e.lineAt(r);
77
- this.curLineStart = a.from, this.matchPos = U(e, r), this.getLine(this.curLineStart);
76
+ this.curLineStart = a.from, this.matchPos = G(e, r), this.getLine(this.curLineStart);
78
77
  }
79
78
  getLine(e) {
80
79
  this.iter.next(e), this.iter.lineBreak ? this.curLine = "" : (this.curLine = this.iter.value, this.curLineStart + this.curLine.length > this.to && (this.curLine = this.curLine.slice(0, this.to - this.curLineStart)), this.iter.next());
@@ -88,7 +87,7 @@ var ge = {
88
87
  let t = this.matchPos <= this.to && this.re.exec(this.curLine);
89
88
  if (t) {
90
89
  let n = this.curLineStart + t.index, r = n + t[0].length;
91
- if (this.matchPos = U(this.text, r + +(n == r)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < r || n > this.value.to) && (!this.test || this.test(n, r, t))) return this.value = {
90
+ if (this.matchPos = G(this.text, r + +(n == r)), n == this.curLineStart + this.curLine.length && this.nextLine(), (n < r || n > this.value.to) && (!this.test || this.test(n, r, t))) return this.value = {
92
91
  from: n,
93
92
  to: r,
94
93
  precise: !0,
@@ -99,7 +98,7 @@ var ge = {
99
98
  else return this.done = !0, this;
100
99
  }
101
100
  }
102
- }, ye = /*@__PURE__*/ new WeakMap(), be = class e {
101
+ }, _e = /*@__PURE__*/ new WeakMap(), ve = class e {
103
102
  constructor(e, t) {
104
103
  this.from = e, this.text = t;
105
104
  }
@@ -107,18 +106,18 @@ var ge = {
107
106
  return this.from + this.text.length;
108
107
  }
109
108
  static get(t, n, r) {
110
- let i = ye.get(t);
109
+ let i = _e.get(t);
111
110
  if (!i || i.from >= r || i.to <= n) {
112
111
  let i = new e(n, t.sliceString(n, r));
113
- return ye.set(t, i), i;
112
+ return _e.set(t, i), i;
114
113
  }
115
114
  if (i.from == n && i.to == r) return i;
116
115
  let { text: a, from: o } = i;
117
- return o > n && (a = t.sliceString(n, o) + a, o = n), i.to < r && (a += t.sliceString(i.to, r)), ye.set(t, new e(o, a)), new e(n, a.slice(n - o, r - o));
116
+ return o > n && (a = t.sliceString(n, o) + a, o = n), i.to < r && (a += t.sliceString(i.to, r)), _e.set(t, new e(o, a)), new e(n, a.slice(n - o, r - o));
118
117
  }
119
- }, xe = class {
118
+ }, ye = class {
120
119
  constructor(e, t, n, r, i) {
121
- this.text = e, this.to = i, this.done = !1, this.value = ge, this.matchPos = U(e, r), this.re = new RegExp(t, _e + (n?.ignoreCase ? "i" : "")), this.test = n?.test, this.flat = be.get(e, r, this.chunkEnd(r + 5e3));
120
+ this.text = e, this.to = i, this.done = !1, this.value = me, this.matchPos = G(e, r), this.re = new RegExp(t, he + (n?.ignoreCase ? "i" : "")), this.test = n?.test, this.flat = ve.get(e, r, this.chunkEnd(r + 5e3));
122
121
  }
123
122
  chunkEnd(e) {
124
123
  return e >= this.to ? this.to : this.text.lineAt(e).to;
@@ -133,87 +132,87 @@ var ge = {
133
132
  to: n,
134
133
  precise: !0,
135
134
  match: t
136
- }, this.matchPos = U(this.text, n + +(e == n)), this;
135
+ }, this.matchPos = G(this.text, n + +(e == n)), this;
137
136
  }
138
137
  if (this.flat.to == this.to) return this.done = !0, this;
139
- this.flat = be.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
138
+ this.flat = ve.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
140
139
  }
141
140
  }
142
141
  };
143
- typeof Symbol < "u" && (ve.prototype[Symbol.iterator] = xe.prototype[Symbol.iterator] = function() {
142
+ typeof Symbol < "u" && (ge.prototype[Symbol.iterator] = ye.prototype[Symbol.iterator] = function() {
144
143
  return this;
145
144
  });
146
- function Se(e) {
145
+ function be(e) {
147
146
  try {
148
- return new RegExp(e, _e), !0;
147
+ return new RegExp(e, he), !0;
149
148
  } catch {
150
149
  return !1;
151
150
  }
152
151
  }
153
- function U(e, t) {
152
+ function G(e, t) {
154
153
  if (t >= e.length) return t;
155
154
  let n = e.lineAt(t), r;
156
155
  for (; t < n.to && (r = n.text.charCodeAt(t - n.from)) >= 56320 && r < 57344;) t++;
157
156
  return t;
158
157
  }
159
- var Ce = (e) => {
160
- let t = r(e, "cm-goto-line");
158
+ var xe = (e) => {
159
+ let t = v(e, "cm-goto-line");
161
160
  if (t) {
162
161
  let e = t.dom.querySelector("input[type=text]");
163
162
  return e && e.select(), !0;
164
163
  }
165
- let { state: n } = e, i = String(n.doc.lineAt(e.state.selection.main.head).number), { close: a, result: o } = ie(e, {
164
+ let { state: n } = e, r = String(n.doc.lineAt(e.state.selection.main.head).number), { close: i, result: a } = O(e, {
166
165
  class: "cm-goto-line",
167
166
  label: n.phrase("Go to line"),
168
167
  input: {
169
168
  type: "text",
170
169
  name: "line",
171
- value: i
170
+ value: r
172
171
  },
173
172
  focus: !0,
174
173
  submitLabel: n.phrase("go")
175
174
  });
176
- return o.then((t) => {
175
+ return a.then((t) => {
177
176
  let r = t && /^([+-])?(\d+)?(:\d+)?(%)?$/.exec(t.elements.line.value);
178
177
  if (!r) {
179
- e.dispatch({ effects: a });
178
+ e.dispatch({ effects: i });
180
179
  return;
181
180
  }
182
- let i = n.doc.lineAt(n.selection.main.head), [, o, s, c, l] = r, d = c ? +c.slice(1) : 0, f = s ? +s : i.number;
181
+ let a = n.doc.lineAt(n.selection.main.head), [, o, s, c, l] = r, u = c ? +c.slice(1) : 0, d = s ? +s : a.number;
183
182
  if (s && l) {
184
- let e = f / 100;
185
- o && (e = e * (o == "-" ? -1 : 1) + i.number / n.doc.lines), f = Math.round(n.doc.lines * e);
186
- } else s && o && (f = f * (o == "-" ? -1 : 1) + i.number);
187
- let p = n.doc.line(Math.max(1, Math.min(n.doc.lines, f))), m = _.cursor(p.from + Math.max(0, Math.min(d, p.length)));
183
+ let e = d / 100;
184
+ o && (e = e * (o == "-" ? -1 : 1) + a.number / n.doc.lines), d = Math.round(n.doc.lines * e);
185
+ } else s && o && (d = d * (o == "-" ? -1 : 1) + a.number);
186
+ let f = n.doc.line(Math.max(1, Math.min(n.doc.lines, d))), p = F.cursor(f.from + Math.max(0, Math.min(u, f.length)));
188
187
  e.dispatch({
189
- effects: [a, u.scrollIntoView(m.from, { y: "center" })],
190
- selection: m
188
+ effects: [i, g.scrollIntoView(p.from, { y: "center" })],
189
+ selection: p
191
190
  });
192
191
  }), !0;
193
- }, we = {
192
+ }, Se = {
194
193
  highlightWordAroundCursor: !1,
195
194
  minSelectionLength: 1,
196
195
  maxMatches: 100,
197
196
  wholeWords: !1
198
- }, Te = /*@__PURE__*/ F.define({ combine(e) {
199
- return f(e, we, {
197
+ }, Ce = /*@__PURE__*/ b.define({ combine(e) {
198
+ return d(e, Se, {
200
199
  highlightWordAroundCursor: (e, t) => e || t,
201
200
  minSelectionLength: Math.min,
202
201
  maxMatches: Math.min
203
202
  });
204
203
  } });
205
- function Ee(e) {
206
- let t = [Me, je];
207
- return e && t.push(Te.of(e)), t;
204
+ function we(e) {
205
+ let t = [Ae, ke];
206
+ return e && t.push(Ce.of(e)), t;
208
207
  }
209
- var De = /*@__PURE__*/ v.mark({ class: "cm-selectionMatch" }), Oe = /*@__PURE__*/ v.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
210
- function ke(e, t, n, r) {
211
- return (n == 0 || e(t.sliceDoc(n - 1, n)) != S.Word) && (r == t.doc.length || e(t.sliceDoc(r, r + 1)) != S.Word);
208
+ var Te = /*@__PURE__*/ R.mark({ class: "cm-selectionMatch" }), Ee = /*@__PURE__*/ R.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
209
+ function De(e, t, n, r) {
210
+ return (n == 0 || e(t.sliceDoc(n - 1, n)) != w.Word) && (r == t.doc.length || e(t.sliceDoc(r, r + 1)) != w.Word);
212
211
  }
213
- function Ae(e, t, n, r) {
214
- return e(t.sliceDoc(n, n + 1)) == S.Word && e(t.sliceDoc(r - 1, r)) == S.Word;
212
+ function Oe(e, t, n, r) {
213
+ return e(t.sliceDoc(n, n + 1)) == w.Word && e(t.sliceDoc(r - 1, r)) == w.Word;
215
214
  }
216
- var je = /*@__PURE__*/ N.fromClass(class {
215
+ var ke = /*@__PURE__*/ h.fromClass(class {
217
216
  constructor(e) {
218
217
  this.decorations = this.getDeco(e);
219
218
  }
@@ -221,43 +220,43 @@ var je = /*@__PURE__*/ N.fromClass(class {
221
220
  (e.selectionSet || e.docChanged || e.viewportChanged) && (this.decorations = this.getDeco(e.view));
222
221
  }
223
222
  getDeco(e) {
224
- let t = e.state.facet(Te), { state: n } = e, r = n.selection;
225
- if (r.ranges.length > 1) return v.none;
223
+ let t = e.state.facet(Ce), { state: n } = e, r = n.selection;
224
+ if (r.ranges.length > 1) return R.none;
226
225
  let i = r.main, a, o = null;
227
226
  if (i.empty) {
228
- if (!t.highlightWordAroundCursor) return v.none;
227
+ if (!t.highlightWordAroundCursor) return R.none;
229
228
  let e = n.wordAt(i.head);
230
- if (!e) return v.none;
229
+ if (!e) return R.none;
231
230
  o = n.charCategorizer(i.head), a = n.sliceDoc(e.from, e.to);
232
231
  } else {
233
232
  let e = i.to - i.from;
234
- if (e < t.minSelectionLength || e > 200) return v.none;
233
+ if (e < t.minSelectionLength || e > 200) return R.none;
235
234
  if (t.wholeWords) {
236
- if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(ke(o, n, i.from, i.to) && Ae(o, n, i.from, i.to))) return v.none;
237
- } else if (a = n.sliceDoc(i.from, i.to), !a) return v.none;
235
+ if (a = n.sliceDoc(i.from, i.to), o = n.charCategorizer(i.head), !(De(o, n, i.from, i.to) && Oe(o, n, i.from, i.to))) return R.none;
236
+ } else if (a = n.sliceDoc(i.from, i.to), !a) return R.none;
238
237
  }
239
238
  let s = [];
240
239
  for (let r of e.visibleRanges) {
241
- let e = new H(n.doc, a, r.from, r.to);
240
+ let e = new W(n.doc, a, r.from, r.to);
242
241
  for (; !e.next().done;) {
243
242
  let { from: r, to: a } = e.value;
244
- if ((!o || ke(o, n, r, a)) && (i.empty && r <= i.from && a >= i.to ? s.push(Oe.range(r, a)) : (r >= i.to || a <= i.from) && s.push(De.range(r, a)), s.length > t.maxMatches)) return v.none;
243
+ if ((!o || De(o, n, r, a)) && (i.empty && r <= i.from && a >= i.to ? s.push(Ee.range(r, a)) : (r >= i.to || a <= i.from) && s.push(Te.range(r, a)), s.length > t.maxMatches)) return R.none;
245
244
  }
246
245
  }
247
- return v.set(s);
246
+ return R.set(s);
248
247
  }
249
- }, { decorations: (e) => e.decorations }), Me = /*@__PURE__*/ u.baseTheme({
248
+ }, { decorations: (e) => e.decorations }), Ae = /*@__PURE__*/ g.baseTheme({
250
249
  ".cm-selectionMatch": { backgroundColor: "#99ff7780" },
251
250
  ".cm-searchMatch .cm-selectionMatch": { backgroundColor: "transparent" }
252
- }), Ne = ({ state: e, dispatch: t }) => {
253
- let { selection: n } = e, r = _.create(n.ranges.map((t) => e.wordAt(t.head) || _.cursor(t.head)), n.mainIndex);
251
+ }), je = ({ state: e, dispatch: t }) => {
252
+ let { selection: n } = e, r = F.create(n.ranges.map((t) => e.wordAt(t.head) || F.cursor(t.head)), n.mainIndex);
254
253
  return !r.eq(n) && (t(e.update({ selection: r })), !0);
255
254
  };
256
- function Pe(e, t) {
255
+ function Me(e, t) {
257
256
  let { main: n, ranges: r } = e.selection, i = e.wordAt(n.head), a = i && i.from == n.from && i.to == n.to;
258
- for (let n = !1, i = new H(e.doc, t, r[r.length - 1].to);;) if (i.next(), i.done) {
257
+ for (let n = !1, i = new W(e.doc, t, r[r.length - 1].to);;) if (i.next(), i.done) {
259
258
  if (n) return null;
260
- i = new H(e.doc, t, 0, Math.max(0, r[r.length - 1].from - 1)), n = !0;
259
+ i = new W(e.doc, t, 0, Math.max(0, r[r.length - 1].from - 1)), n = !0;
261
260
  } else {
262
261
  if (n && r.some((e) => e.from == i.value.from)) continue;
263
262
  if (a) {
@@ -267,32 +266,32 @@ function Pe(e, t) {
267
266
  return i.value;
268
267
  }
269
268
  }
270
- var Fe = ({ state: e, dispatch: t }) => {
269
+ var Ne = ({ state: e, dispatch: t }) => {
271
270
  let { ranges: n } = e.selection;
272
- if (n.some((e) => e.from === e.to)) return Ne({
271
+ if (n.some((e) => e.from === e.to)) return je({
273
272
  state: e,
274
273
  dispatch: t
275
274
  });
276
275
  let r = e.sliceDoc(n[0].from, n[0].to);
277
276
  if (e.selection.ranges.some((t) => e.sliceDoc(t.from, t.to) != r)) return !1;
278
- let i = Pe(e, r);
277
+ let i = Me(e, r);
279
278
  return i ? (t(e.update({
280
- selection: e.selection.addRange(_.range(i.from, i.to), !1),
281
- effects: u.scrollIntoView(i.to)
279
+ selection: e.selection.addRange(F.range(i.from, i.to), !1),
280
+ effects: g.scrollIntoView(i.to)
282
281
  })), !0) : !1;
283
- }, W = /*@__PURE__*/ F.define({ combine(e) {
284
- return f(e, {
282
+ }, K = /*@__PURE__*/ b.define({ combine(e) {
283
+ return d(e, {
285
284
  top: !1,
286
285
  caseSensitive: !1,
287
286
  literal: !1,
288
287
  regexp: !1,
289
288
  wholeWord: !1,
290
289
  createPanel: (e) => new st(e),
291
- scrollToMatch: (e) => u.scrollIntoView(e)
290
+ scrollToMatch: (e) => g.scrollIntoView(e)
292
291
  });
293
- } }), Ie = class {
292
+ } }), Pe = class {
294
293
  constructor(e) {
295
- this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || Se(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord, this.test = e.test;
294
+ this.search = e.search, this.caseSensitive = !!e.caseSensitive, this.literal = !!e.literal, this.regexp = !!e.regexp, this.replace = e.replace || "", this.valid = !!this.search && (!this.regexp || be(this.search)), this.unquoted = this.unquote(this.search), this.wholeWord = !!e.wholeWord, this.test = e.test;
296
295
  }
297
296
  unquote(e) {
298
297
  return this.literal ? e : e.replace(/\\([nrt\\])/g, (e, t) => t == "n" ? "\n" : t == "r" ? "\r" : t == "t" ? " " : "\\");
@@ -301,42 +300,42 @@ var Fe = ({ state: e, dispatch: t }) => {
301
300
  return this.search == e.search && this.replace == e.replace && this.caseSensitive == e.caseSensitive && this.regexp == e.regexp && this.wholeWord == e.wholeWord && this.test == e.test;
302
301
  }
303
302
  create() {
304
- return this.regexp ? new Ue(this) : new Be(this);
303
+ return this.regexp ? new He(this) : new Re(this);
305
304
  }
306
305
  getCursor(e, t = 0, n) {
307
- let r = e.doc ? e : o.create({ doc: e });
308
- return n ??= r.doc.length, this.regexp ? K(this, r, t, n) : G(this, r, t, n);
306
+ let r = e.doc ? e : L.create({ doc: e });
307
+ return n ??= r.doc.length, this.regexp ? J(this, r, t, n) : q(this, r, t, n);
309
308
  }
310
- }, Le = class {
309
+ }, Fe = class {
311
310
  constructor(e) {
312
311
  this.spec = e;
313
312
  }
314
313
  };
315
- function Re(e, t, n) {
314
+ function Ie(e, t, n) {
316
315
  return (r, i, a, o) => n && !n(r, i, a, o) ? !1 : e(r >= o && i <= o + a.length ? a.slice(r - o, i - o) : t.doc.sliceString(r, i), t, r, i);
317
316
  }
318
- function G(e, t, n, r) {
317
+ function q(e, t, n, r) {
319
318
  let i;
320
- return e.wholeWord && (i = ze(t.doc, t.charCategorizer(t.selection.main.head))), e.test && (i = Re(e.test, t, i)), new H(t.doc, e.unquoted, n, r, e.caseSensitive ? void 0 : (e) => e.toLowerCase(), i);
319
+ return e.wholeWord && (i = Le(t.doc, t.charCategorizer(t.selection.main.head))), e.test && (i = Ie(e.test, t, i)), new W(t.doc, e.unquoted, n, r, e.caseSensitive ? void 0 : (e) => e.toLowerCase(), i);
321
320
  }
322
- function ze(e, t) {
323
- return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = e.sliceString(a, Math.min(e.length, r + 2))), (t(q(i, n - a)) != S.Word || t(J(i, n - a)) != S.Word) && (t(J(i, r - a)) != S.Word || t(q(i, r - a)) != S.Word));
321
+ function Le(e, t) {
322
+ return (n, r, i, a) => ((a > n || a + i.length < r) && (a = Math.max(0, n - 2), i = e.sliceString(a, Math.min(e.length, r + 2))), (t(Y(i, n - a)) != w.Word || t(Be(i, n - a)) != w.Word) && (t(Be(i, r - a)) != w.Word || t(Y(i, r - a)) != w.Word));
324
323
  }
325
- var Be = class extends Le {
324
+ var Re = class extends Fe {
326
325
  constructor(e) {
327
326
  super(e);
328
327
  }
329
328
  nextMatch(e, t, n) {
330
- let r = G(this.spec, e, n, e.doc.length).nextOverlapping();
329
+ let r = q(this.spec, e, n, e.doc.length).nextOverlapping();
331
330
  if (r.done) {
332
331
  let n = Math.min(e.doc.length, t + this.spec.unquoted.length);
333
- r = G(this.spec, e, 0, n).nextOverlapping();
332
+ r = q(this.spec, e, 0, n).nextOverlapping();
334
333
  }
335
334
  return r.done || r.value.from == t && r.value.to == n ? null : r.value;
336
335
  }
337
336
  prevMatchInRange(e, t, n) {
338
337
  for (let r = n;;) {
339
- let n = Math.max(t, r - 1e4 - this.spec.unquoted.length), i = G(this.spec, e, n, r), a = null;
338
+ let n = Math.max(t, r - 1e4 - this.spec.unquoted.length), i = q(this.spec, e, n, r), a = null;
340
339
  for (; !i.nextOverlapping().done;) a = i.value;
341
340
  if (a) return a;
342
341
  if (n == t) return null;
@@ -351,7 +350,7 @@ var Be = class extends Le {
351
350
  return this.spec.unquote(this.spec.replace);
352
351
  }
353
352
  matchAll(e, t) {
354
- let n = G(this.spec, e, 0, e.doc.length), r = [];
353
+ let n = q(this.spec, e, 0, e.doc.length), r = [];
355
354
  for (; !n.next().done;) {
356
355
  if (r.length >= t) return null;
357
356
  r.push(n.value);
@@ -359,37 +358,37 @@ var Be = class extends Le {
359
358
  return r;
360
359
  }
361
360
  highlight(e, t, n, r) {
362
- let i = G(this.spec, e, Math.max(0, t - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, e.doc.length));
361
+ let i = q(this.spec, e, Math.max(0, t - this.spec.unquoted.length), Math.min(n + this.spec.unquoted.length, e.doc.length));
363
362
  for (; !i.next().done;) r(i.value.from, i.value.to);
364
363
  }
365
364
  };
366
- function Ve(e, t, n) {
365
+ function ze(e, t, n) {
367
366
  return (r, i, a) => (!n || n(r, i, a)) && e(a[0], t, r, i);
368
367
  }
369
- function K(e, t, n, r) {
368
+ function J(e, t, n, r) {
370
369
  let i;
371
- return e.wholeWord && (i = He(t.charCategorizer(t.selection.main.head))), e.test && (i = Ve(e.test, t, i)), new ve(t.doc, e.search, {
370
+ return e.wholeWord && (i = Ve(t.charCategorizer(t.selection.main.head))), e.test && (i = ze(e.test, t, i)), new ge(t.doc, e.search, {
372
371
  ignoreCase: !e.caseSensitive,
373
372
  test: i
374
373
  }, n, r);
375
374
  }
376
- function q(e, t) {
377
- return e.slice(g(e, t, !1), t);
375
+ function Y(e, t) {
376
+ return e.slice(f(e, t, !1), t);
378
377
  }
379
- function J(e, t) {
380
- return e.slice(t, g(e, t));
378
+ function Be(e, t) {
379
+ return e.slice(t, f(e, t));
381
380
  }
382
- function He(e) {
383
- return (t, n, r) => !r[0].length || (e(q(r.input, r.index)) != S.Word || e(J(r.input, r.index)) != S.Word) && (e(J(r.input, r.index + r[0].length)) != S.Word || e(q(r.input, r.index + r[0].length)) != S.Word);
381
+ function Ve(e) {
382
+ return (t, n, r) => !r[0].length || (e(Y(r.input, r.index)) != w.Word || e(Be(r.input, r.index)) != w.Word) && (e(Be(r.input, r.index + r[0].length)) != w.Word || e(Y(r.input, r.index + r[0].length)) != w.Word);
384
383
  }
385
- var Ue = class extends Le {
384
+ var He = class extends Fe {
386
385
  nextMatch(e, t, n) {
387
- let r = K(this.spec, e, n, e.doc.length).next();
388
- return r.done && (r = K(this.spec, e, 0, t).next()), r.done ? null : r.value;
386
+ let r = J(this.spec, e, n, e.doc.length).next();
387
+ return r.done && (r = J(this.spec, e, 0, t).next()), r.done ? null : r.value;
389
388
  }
390
389
  prevMatchInRange(e, t, n) {
391
390
  for (let r = 1;; r++) {
392
- let i = Math.max(t, n - r * 1e4), a = K(this.spec, e, i, n), o = null;
391
+ let i = Math.max(t, n - r * 1e4), a = J(this.spec, e, i, n), o = null;
393
392
  for (; !a.next().done;) o = a.value;
394
393
  if (o && (i == t || o.from > i + 10)) return o;
395
394
  if (i == t) return null;
@@ -410,7 +409,7 @@ var Ue = class extends Le {
410
409
  });
411
410
  }
412
411
  matchAll(e, t) {
413
- let n = K(this.spec, e, 0, e.doc.length), r = [];
412
+ let n = J(this.spec, e, 0, e.doc.length), r = [];
414
413
  for (; !n.next().done;) {
415
414
  if (r.length >= t) return null;
416
415
  r.push(n.value);
@@ -418,105 +417,105 @@ var Ue = class extends Le {
418
417
  return r;
419
418
  }
420
419
  highlight(e, t, n, r) {
421
- let i = K(this.spec, e, Math.max(0, t - 250), Math.min(n + 250, e.doc.length));
420
+ let i = J(this.spec, e, Math.max(0, t - 250), Math.min(n + 250, e.doc.length));
422
421
  for (; !i.next().done;) r(i.value.from, i.value.to);
423
422
  }
424
- }, Y = /*@__PURE__*/ i.define(), We = /*@__PURE__*/ i.define(), X = /*@__PURE__*/ re.define({
423
+ }, X = /*@__PURE__*/ s.define(), Ue = /*@__PURE__*/ s.define(), Z = /*@__PURE__*/ o.define({
425
424
  create(e) {
426
- return new Ge(tt(e).create(), null);
425
+ return new We(tt(e).create(), null);
427
426
  },
428
427
  update(e, t) {
429
- for (let n of t.effects) n.is(Y) ? e = new Ge(n.value.create(), e.panel) : n.is(We) && (e = new Ge(e.query, n.value ? et : null));
428
+ for (let n of t.effects) n.is(X) ? e = new We(n.value.create(), e.panel) : n.is(Ue) && (e = new We(e.query, n.value ? et : null));
430
429
  return e;
431
430
  },
432
- provide: (e) => j.from(e, (e) => e.panel)
433
- }), Ge = class {
431
+ provide: (e) => P.from(e, (e) => e.panel)
432
+ }), We = class {
434
433
  constructor(e, t) {
435
434
  this.query = e, this.panel = t;
436
435
  }
437
- }, Ke = /*@__PURE__*/ v.mark({ class: "cm-searchMatch" }), qe = /*@__PURE__*/ v.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), Je = /*@__PURE__*/ N.fromClass(class {
436
+ }, Ge = /*@__PURE__*/ R.mark({ class: "cm-searchMatch" }), Ke = /*@__PURE__*/ R.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), qe = /*@__PURE__*/ h.fromClass(class {
438
437
  constructor(e) {
439
- this.view = e, this.decorations = this.highlight(e.state.field(X));
438
+ this.view = e, this.decorations = this.highlight(e.state.field(Z));
440
439
  }
441
440
  update(e) {
442
- let t = e.state.field(X);
443
- (t != e.startState.field(X) || e.docChanged || e.selectionSet || e.viewportChanged) && (this.decorations = this.highlight(t));
441
+ let t = e.state.field(Z);
442
+ (t != e.startState.field(Z) || e.docChanged || e.selectionSet || e.viewportChanged) && (this.decorations = this.highlight(t));
444
443
  }
445
444
  highlight({ query: e, panel: t }) {
446
- if (!t || !e.spec.valid) return v.none;
447
- let { view: n } = this, r = new p();
445
+ if (!t || !e.spec.valid) return R.none;
446
+ let { view: n } = this, r = new ae();
448
447
  for (let t = 0, i = n.visibleRanges, a = i.length; t < a; t++) {
449
448
  let { from: o, to: s } = i[t];
450
449
  for (; t < a - 1 && s > i[t + 1].from - 500;) s = i[++t].to;
451
450
  e.highlight(n.state, o, s, (e, t) => {
452
451
  let i = n.state.selection.ranges.some((n) => n.from == e && n.to == t);
453
- r.add(e, t, i ? qe : Ke);
452
+ r.add(e, t, i ? Ke : Ge);
454
453
  });
455
454
  }
456
455
  return r.finish();
457
456
  }
458
457
  }, { decorations: (e) => e.decorations });
459
- function Z(e) {
458
+ function Q(e) {
460
459
  return (t) => {
461
- let n = t.state.field(X, !1);
460
+ let n = t.state.field(Z, !1);
462
461
  return n && n.query.spec.valid ? e(t, n) : it(t);
463
462
  };
464
463
  }
465
- var Ye = /*@__PURE__*/ Z((e, { query: t }) => {
464
+ var Je = /*@__PURE__*/ Q((e, { query: t }) => {
466
465
  let { to: n } = e.state.selection.main, r = t.nextMatch(e.state, n, n);
467
466
  if (!r) return !1;
468
- let i = _.single(r.from, r.to), a = e.state.facet(W);
467
+ let i = F.single(r.from, r.to), a = e.state.facet(K);
469
468
  return e.dispatch({
470
469
  selection: i,
471
470
  effects: [ut(e, r), a.scrollToMatch(i.main, e)],
472
471
  userEvent: "select.search"
473
472
  }), rt(e), !0;
474
- }), Q = /*@__PURE__*/ Z((e, { query: t }) => {
473
+ }), Ye = /*@__PURE__*/ Q((e, { query: t }) => {
475
474
  let { state: n } = e, { from: r } = n.selection.main, i = t.prevMatch(n, r, r);
476
475
  if (!i) return !1;
477
- let a = _.single(i.from, i.to), o = e.state.facet(W);
476
+ let a = F.single(i.from, i.to), o = e.state.facet(K);
478
477
  return e.dispatch({
479
478
  selection: a,
480
479
  effects: [ut(e, i), o.scrollToMatch(a.main, e)],
481
480
  userEvent: "select.search"
482
481
  }), rt(e), !0;
483
- }), Xe = /*@__PURE__*/ Z((e, { query: t }) => {
482
+ }), Xe = /*@__PURE__*/ Q((e, { query: t }) => {
484
483
  let n = t.matchAll(e.state, 1e3);
485
484
  return !n || !n.length ? !1 : (e.dispatch({
486
- selection: _.create(n.map((e) => _.range(e.from, e.to))),
485
+ selection: F.create(n.map((e) => F.range(e.from, e.to))),
487
486
  userEvent: "select.search.matches"
488
487
  }), !0);
489
488
  }), Ze = ({ state: e, dispatch: t }) => {
490
489
  let n = e.selection;
491
490
  if (n.ranges.length > 1 || n.main.empty) return !1;
492
491
  let { from: r, to: i } = n.main, a = [], o = 0;
493
- for (let t = new H(e.doc, e.sliceDoc(r, i)); !t.next().done;) {
492
+ for (let t = new W(e.doc, e.sliceDoc(r, i)); !t.next().done;) {
494
493
  if (a.length > 1e3) return !1;
495
- t.value.from == r && (o = a.length), a.push(_.range(t.value.from, t.value.to));
494
+ t.value.from == r && (o = a.length), a.push(F.range(t.value.from, t.value.to));
496
495
  }
497
496
  return t(e.update({
498
- selection: _.create(a, o),
497
+ selection: F.create(a, o),
499
498
  userEvent: "select.search.matches"
500
499
  })), !0;
501
- }, Qe = /*@__PURE__*/ Z((e, { query: t }) => {
500
+ }, Qe = /*@__PURE__*/ Q((e, { query: t }) => {
502
501
  let { state: n } = e, { from: r, to: i } = n.selection.main;
503
502
  if (n.readOnly) return !1;
504
503
  let a = t.nextMatch(n, r, r);
505
504
  if (!a) return !1;
506
- let o = a, s = [], c, l, d = [];
505
+ let o = a, s = [], c, l, u = [];
507
506
  o.precise ? o.from == r && o.to == i && (l = n.toText(t.getReplacement(o)), s.push({
508
507
  from: o.from,
509
508
  to: o.to,
510
509
  insert: l
511
- }), o = t.nextMatch(n, o.from, o.to), d.push(u.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + "."))) : o = t.nextMatch(n, o.from, o.to);
512
- let f = e.state.changes(s);
513
- return o && (c = _.single(o.from, o.to).map(f), d.push(ut(e, o)), d.push(n.facet(W).scrollToMatch(c.main, e))), e.dispatch({
514
- changes: f,
510
+ }), o = t.nextMatch(n, o.from, o.to), u.push(g.announce.of(n.phrase("replaced match on line $", n.doc.lineAt(r).number) + "."))) : o = t.nextMatch(n, o.from, o.to);
511
+ let d = e.state.changes(s);
512
+ return o && (c = F.single(o.from, o.to).map(d), u.push(ut(e, o)), u.push(n.facet(K).scrollToMatch(c.main, e))), e.dispatch({
513
+ changes: d,
515
514
  selection: c,
516
- effects: d,
515
+ effects: u,
517
516
  userEvent: "input.replace"
518
517
  }), !0;
519
- }), $e = /*@__PURE__*/ Z((e, { query: t }) => {
518
+ }), $e = /*@__PURE__*/ Q((e, { query: t }) => {
520
519
  if (e.state.readOnly) return !1;
521
520
  let n = [];
522
521
  for (let r of t.matchAll(e.state, 1e9)) {
@@ -531,18 +530,18 @@ var Ye = /*@__PURE__*/ Z((e, { query: t }) => {
531
530
  let r = e.state.phrase("replaced $ matches", n.length) + ".";
532
531
  return e.dispatch({
533
532
  changes: n,
534
- effects: u.announce.of(r),
533
+ effects: g.announce.of(r),
535
534
  userEvent: "input.replace.all"
536
535
  }), !0;
537
536
  });
538
537
  function et(e) {
539
- return e.state.facet(W).createPanel(e);
538
+ return e.state.facet(K).createPanel(e);
540
539
  }
541
540
  function tt(e, t) {
542
541
  let n = e.selection.main, r = n.empty || n.to > n.from + 100 ? "" : e.sliceDoc(n.from, n.to);
543
542
  if (t && !r) return t;
544
- let i = e.facet(W);
545
- return new Ie({
543
+ let i = e.facet(K);
544
+ return new Pe({
546
545
  search: t?.literal ?? i.literal ? r : r.replace(/\n/g, "\\n"),
547
546
  caseSensitive: t?.caseSensitive ?? i.caseSensitive,
548
547
  literal: t?.literal ?? i.literal,
@@ -551,7 +550,7 @@ function tt(e, t) {
551
550
  });
552
551
  }
553
552
  function nt(e) {
554
- let t = T(e, et);
553
+ let t = _(e, et);
555
554
  return t && t.dom.querySelector("[main-field]");
556
555
  }
557
556
  function rt(e) {
@@ -559,20 +558,20 @@ function rt(e) {
559
558
  t && t == e.root.activeElement && t.select();
560
559
  }
561
560
  var it = (e) => {
562
- let t = e.state.field(X, !1);
561
+ let t = e.state.field(Z, !1);
563
562
  if (t && t.panel) {
564
563
  let n = nt(e);
565
564
  if (n && n != e.root.activeElement) {
566
565
  let r = tt(e.state, t.query.spec);
567
- r.valid && e.dispatch({ effects: Y.of(r) }), n.focus(), n.select();
566
+ r.valid && e.dispatch({ effects: X.of(r) }), n.focus(), n.select();
568
567
  }
569
- } else e.dispatch({ effects: [We.of(!0), t ? Y.of(tt(e.state, t.query.spec)) : i.appendConfig.of(ft)] });
568
+ } else e.dispatch({ effects: [Ue.of(!0), t ? X.of(tt(e.state, t.query.spec)) : s.appendConfig.of(ft)] });
570
569
  return !0;
571
570
  }, at = (e) => {
572
- let t = e.state.field(X, !1);
571
+ let t = e.state.field(Z, !1);
573
572
  if (!t || !t.panel) return !1;
574
- let n = T(e, et);
575
- return n && n.dom.contains(e.root.activeElement) && e.focus(), e.dispatch({ effects: We.of(!1) }), !0;
573
+ let n = _(e, et);
574
+ return n && n.dom.contains(e.root.activeElement) && e.focus(), e.dispatch({ effects: Ue.of(!1) }), !0;
576
575
  }, ot = [
577
576
  {
578
577
  key: "Mod-f",
@@ -581,15 +580,15 @@ var it = (e) => {
581
580
  },
582
581
  {
583
582
  key: "F3",
584
- run: Ye,
585
- shift: Q,
583
+ run: Je,
584
+ shift: Ye,
586
585
  scope: "editor search-panel",
587
586
  preventDefault: !0
588
587
  },
589
588
  {
590
589
  key: "Mod-g",
591
- run: Ye,
592
- shift: Q,
590
+ run: Je,
591
+ shift: Ye,
593
592
  scope: "editor search-panel",
594
593
  preventDefault: !0
595
594
  },
@@ -604,18 +603,18 @@ var it = (e) => {
604
603
  },
605
604
  {
606
605
  key: "Mod-Alt-g",
607
- run: Ce
606
+ run: xe
608
607
  },
609
608
  {
610
609
  key: "Mod-d",
611
- run: Fe,
610
+ run: Ne,
612
611
  preventDefault: !0
613
612
  }
614
613
  ], st = class {
615
614
  constructor(e) {
616
615
  this.view = e;
617
- let t = this.query = e.state.field(X).query.spec;
618
- this.commit = this.commit.bind(this), this.searchField = D("input", {
616
+ let t = this.query = e.state.field(Z).query.spec;
617
+ this.commit = this.commit.bind(this), this.searchField = C("input", {
619
618
  value: t.search,
620
619
  placeholder: $(e, "Find"),
621
620
  "aria-label": $(e, "Find"),
@@ -625,7 +624,7 @@ var it = (e) => {
625
624
  "main-field": "true",
626
625
  onchange: this.commit,
627
626
  onkeyup: this.commit
628
- }), this.replaceField = D("input", {
627
+ }), this.replaceField = C("input", {
629
628
  value: t.replace,
630
629
  placeholder: $(e, "Replace"),
631
630
  "aria-label": $(e, "Replace"),
@@ -634,19 +633,19 @@ var it = (e) => {
634
633
  form: "",
635
634
  onchange: this.commit,
636
635
  onkeyup: this.commit
637
- }), this.caseField = D("input", {
636
+ }), this.caseField = C("input", {
638
637
  type: "checkbox",
639
638
  name: "case",
640
639
  form: "",
641
640
  checked: t.caseSensitive,
642
641
  onchange: this.commit
643
- }), this.reField = D("input", {
642
+ }), this.reField = C("input", {
644
643
  type: "checkbox",
645
644
  name: "re",
646
645
  form: "",
647
646
  checked: t.regexp,
648
647
  onchange: this.commit
649
- }), this.wordField = D("input", {
648
+ }), this.wordField = C("input", {
650
649
  type: "checkbox",
651
650
  name: "word",
652
651
  form: "",
@@ -654,31 +653,31 @@ var it = (e) => {
654
653
  onchange: this.commit
655
654
  });
656
655
  function n(e, t, n) {
657
- return D("button", {
656
+ return C("button", {
658
657
  class: "cm-button",
659
658
  name: e,
660
659
  onclick: t,
661
660
  type: "button"
662
661
  }, n);
663
662
  }
664
- this.dom = D("div", {
663
+ this.dom = C("div", {
665
664
  onkeydown: (e) => this.keydown(e),
666
665
  class: "cm-search"
667
666
  }, [
668
667
  this.searchField,
669
- n("next", () => Ye(e), [$(e, "next")]),
670
- n("prev", () => Q(e), [$(e, "previous")]),
668
+ n("next", () => Je(e), [$(e, "next")]),
669
+ n("prev", () => Ye(e), [$(e, "previous")]),
671
670
  n("select", () => Xe(e), [$(e, "all")]),
672
- D("label", null, [this.caseField, $(e, "match case")]),
673
- D("label", null, [this.reField, $(e, "regexp")]),
674
- D("label", null, [this.wordField, $(e, "by word")]),
671
+ C("label", null, [this.caseField, $(e, "match case")]),
672
+ C("label", null, [this.reField, $(e, "regexp")]),
673
+ C("label", null, [this.wordField, $(e, "by word")]),
675
674
  ...e.state.readOnly ? [] : [
676
- D("br"),
675
+ C("br"),
677
676
  this.replaceField,
678
677
  n("replace", () => Qe(e), [$(e, "replace")]),
679
678
  n("replaceAll", () => $e(e), [$(e, "replace all")])
680
679
  ],
681
- D("button", {
680
+ C("button", {
682
681
  name: "close",
683
682
  onclick: () => at(e),
684
683
  "aria-label": $(e, "close"),
@@ -687,20 +686,20 @@ var it = (e) => {
687
686
  ]);
688
687
  }
689
688
  commit() {
690
- let e = new Ie({
689
+ let e = new Pe({
691
690
  search: this.searchField.value,
692
691
  caseSensitive: this.caseField.checked,
693
692
  regexp: this.reField.checked,
694
693
  wholeWord: this.wordField.checked,
695
694
  replace: this.replaceField.value
696
695
  });
697
- e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: Y.of(e) }));
696
+ e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: X.of(e) }));
698
697
  }
699
698
  keydown(e) {
700
- ne(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? Q : Ye)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), Qe(this.view));
699
+ te(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? Ye : Je)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), Qe(this.view));
701
700
  }
702
701
  update(e) {
703
- for (let t of e.transactions) for (let e of t.effects) e.is(Y) && !e.value.eq(this.query) && this.setQuery(e.value);
702
+ for (let t of e.transactions) for (let e of t.effects) e.is(X) && !e.value.eq(this.query) && this.setQuery(e.value);
704
703
  }
705
704
  setQuery(e) {
706
705
  this.query = e, this.searchField.value = e.search, this.replaceField.value = e.replace, this.caseField.checked = e.caseSensitive, this.reField.checked = e.regexp, this.wordField.checked = e.wholeWord;
@@ -712,7 +711,7 @@ var it = (e) => {
712
711
  return 80;
713
712
  }
714
713
  get top() {
715
- return this.view.state.facet(W).top;
714
+ return this.view.state.facet(K).top;
716
715
  }
717
716
  };
718
717
  function $(e, t) {
@@ -733,9 +732,9 @@ function ut(e, { from: t, to: n }) {
733
732
  break;
734
733
  }
735
734
  }
736
- return u.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${r.number}.`);
735
+ return g.announce.of(`${e.state.phrase("current match")}. ${s} ${e.state.phrase("on line")} ${r.number}.`);
737
736
  }
738
- var dt = /*@__PURE__*/ u.baseTheme({
737
+ var dt = /*@__PURE__*/ g.baseTheme({
739
738
  ".cm-panel.cm-search": {
740
739
  padding: "2px 6px 4px",
741
740
  position: "relative",
@@ -761,22 +760,22 @@ var dt = /*@__PURE__*/ u.baseTheme({
761
760
  "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
762
761
  "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
763
762
  }), ft = [
764
- X,
765
- /*@__PURE__*/ s.low(Je),
763
+ Z,
764
+ /*@__PURE__*/ m.low(qe),
766
765
  dt
767
766
  ], pt = function(e) {
768
767
  e === void 0 && (e = {});
769
- var t = e.crosshairCursor, n = t !== void 0 && t, r = [];
770
- e.closeBracketsKeymap !== !1 && (r = r.concat(se)), e.defaultKeymap !== !1 && (r = r.concat(B)), e.searchKeymap !== !1 && (r = r.concat(ot)), e.historyKeymap !== !1 && (r = r.concat(de)), e.foldKeymap !== !1 && (r = r.concat(a)), e.completionKeymap !== !1 && (r = r.concat(ce)), e.lintKeymap !== !1 && (r = r.concat(ue));
771
- var i = [];
772
- return e.lineNumbers !== !1 && i.push(C()), e.highlightActiveLineGutter !== !1 && i.push(O()), e.highlightSpecialChars !== !1 && i.push(x()), e.history !== !1 && i.push(fe()), e.foldGutter !== !1 && i.push(I()), e.drawSelection !== !1 && i.push(y()), e.dropCursor !== !1 && i.push(h()), e.allowMultipleSelections !== !1 && i.push(o.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && i.push(A()), e.syntaxHighlighting !== !1 && i.push(c(E, { fallback: !0 })), e.bracketMatching !== !1 && i.push(M()), e.closeBrackets !== !1 && i.push(le()), e.autocompletion !== !1 && i.push(R()), e.rectangularSelection !== !1 && i.push(w()), n !== !1 && i.push(ee()), e.highlightActiveLine !== !1 && i.push(ae()), e.highlightSelectionMatches !== !1 && i.push(Ee()), e.tabSize && typeof e.tabSize == "number" && i.push(k.of(" ".repeat(e.tabSize))), i.concat([P.of(r.flat())]).filter(Boolean);
768
+ var t = e.crosshairCursor, n = t !== void 0 && t, i = [];
769
+ e.closeBracketsKeymap !== !1 && (i = i.concat(ue)), e.defaultKeymap !== !1 && (i = i.concat(V)), e.searchKeymap !== !1 && (i = i.concat(ot)), e.historyKeymap !== !1 && (i = i.concat(le)), e.foldKeymap !== !1 && (i = i.concat(I)), e.completionKeymap !== !1 && (i = i.concat(H)), e.lintKeymap !== !1 && (i = i.concat(se));
770
+ var o = [];
771
+ return e.lineNumbers !== !1 && o.push(ne()), e.highlightActiveLineGutter !== !1 && o.push(x()), e.highlightSpecialChars !== !1 && o.push(ie()), e.history !== !1 && o.push(z()), e.foldGutter !== !1 && o.push(y()), e.drawSelection !== !1 && o.push(j()), e.dropCursor !== !1 && o.push(l()), e.allowMultipleSelections !== !1 && o.push(L.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && o.push(ee()), e.syntaxHighlighting !== !1 && o.push(T(S, { fallback: !0 })), e.bracketMatching !== !1 && o.push(D()), e.closeBrackets !== !1 && o.push(de()), e.autocompletion !== !1 && o.push(fe()), e.rectangularSelection !== !1 && o.push(re()), n !== !1 && o.push(u()), e.highlightActiveLine !== !1 && o.push(r()), e.highlightSelectionMatches !== !1 && o.push(we()), e.tabSize && typeof e.tabSize == "number" && o.push(a.of(" ".repeat(e.tabSize))), o.concat([M.of(i.flat())]).filter(Boolean);
773
772
  }, mt = function(e) {
774
773
  e === void 0 && (e = {});
775
774
  var t = [];
776
- e.defaultKeymap !== !1 && (t = t.concat(B)), e.historyKeymap !== !1 && (t = t.concat(de));
775
+ e.defaultKeymap !== !1 && (t = t.concat(V)), e.historyKeymap !== !1 && (t = t.concat(le));
777
776
  var n = [];
778
- return e.highlightSpecialChars !== !1 && n.push(x()), e.history !== !1 && n.push(fe()), e.drawSelection !== !1 && n.push(y()), e.syntaxHighlighting !== !1 && n.push(c(E, { fallback: !0 })), n.concat([P.of(t.flat())]).filter(Boolean);
779
- }, ht = "#e5c07b", gt = "#e06c75", _t = "#56b6c2", vt = "#ffffff", yt = "#abb2bf", bt = "#7d8799", xt = "#61afef", St = "#98c379", Ct = "#d19a66", wt = "#c678dd", Tt = "#21252b", Et = "#2c313a", Dt = "#282c34", Ot = "#353a42", kt = "#3E4451", At = "#528bff", jt = /*@__PURE__*/ u.theme({
777
+ return e.highlightSpecialChars !== !1 && n.push(ie()), e.history !== !1 && n.push(z()), e.drawSelection !== !1 && n.push(j()), e.syntaxHighlighting !== !1 && n.push(T(S, { fallback: !0 })), n.concat([M.of(t.flat())]).filter(Boolean);
778
+ }, ht = "#e5c07b", gt = "#e06c75", _t = "#56b6c2", vt = "#ffffff", yt = "#abb2bf", bt = "#7d8799", xt = "#61afef", St = "#98c379", Ct = "#d19a66", wt = "#c678dd", Tt = "#21252b", Et = "#2c313a", Dt = "#282c34", Ot = "#353a42", kt = "#3E4451", At = "#528bff", jt = /*@__PURE__*/ g.theme({
780
779
  "&": {
781
780
  color: yt,
782
781
  backgroundColor: Dt
@@ -825,122 +824,122 @@ var dt = /*@__PURE__*/ u.baseTheme({
825
824
  backgroundColor: Et,
826
825
  color: yt
827
826
  } }
828
- }, { dark: !0 }), Mt = /*@__PURE__*/ b.define([
827
+ }, { dark: !0 }), Mt = /*@__PURE__*/ N.define([
829
828
  {
830
- tag: d.keyword,
829
+ tag: p.keyword,
831
830
  color: wt
832
831
  },
833
832
  {
834
833
  tag: [
835
- d.name,
836
- d.deleted,
837
- d.character,
838
- d.propertyName,
839
- d.macroName
834
+ p.name,
835
+ p.deleted,
836
+ p.character,
837
+ p.propertyName,
838
+ p.macroName
840
839
  ],
841
840
  color: gt
842
841
  },
843
842
  {
844
- tag: [/*@__PURE__*/ d.function(d.variableName), d.labelName],
843
+ tag: [/*@__PURE__*/ p.function(p.variableName), p.labelName],
845
844
  color: xt
846
845
  },
847
846
  {
848
847
  tag: [
849
- d.color,
850
- /*@__PURE__*/ d.constant(d.name),
851
- /*@__PURE__*/ d.standard(d.name)
848
+ p.color,
849
+ /*@__PURE__*/ p.constant(p.name),
850
+ /*@__PURE__*/ p.standard(p.name)
852
851
  ],
853
852
  color: Ct
854
853
  },
855
854
  {
856
- tag: [/*@__PURE__*/ d.definition(d.name), d.separator],
855
+ tag: [/*@__PURE__*/ p.definition(p.name), p.separator],
857
856
  color: yt
858
857
  },
859
858
  {
860
859
  tag: [
861
- d.typeName,
862
- d.className,
863
- d.number,
864
- d.changed,
865
- d.annotation,
866
- d.modifier,
867
- d.self,
868
- d.namespace
860
+ p.typeName,
861
+ p.className,
862
+ p.number,
863
+ p.changed,
864
+ p.annotation,
865
+ p.modifier,
866
+ p.self,
867
+ p.namespace
869
868
  ],
870
869
  color: ht
871
870
  },
872
871
  {
873
872
  tag: [
874
- d.operator,
875
- d.operatorKeyword,
876
- d.url,
877
- d.escape,
878
- d.regexp,
879
- d.link,
880
- /*@__PURE__*/ d.special(d.string)
873
+ p.operator,
874
+ p.operatorKeyword,
875
+ p.url,
876
+ p.escape,
877
+ p.regexp,
878
+ p.link,
879
+ /*@__PURE__*/ p.special(p.string)
881
880
  ],
882
881
  color: _t
883
882
  },
884
883
  {
885
- tag: [d.meta, d.comment],
884
+ tag: [p.meta, p.comment],
886
885
  color: bt
887
886
  },
888
887
  {
889
- tag: d.strong,
888
+ tag: p.strong,
890
889
  fontWeight: "bold"
891
890
  },
892
891
  {
893
- tag: d.emphasis,
892
+ tag: p.emphasis,
894
893
  fontStyle: "italic"
895
894
  },
896
895
  {
897
- tag: d.strikethrough,
896
+ tag: p.strikethrough,
898
897
  textDecoration: "line-through"
899
898
  },
900
899
  {
901
- tag: d.link,
900
+ tag: p.link,
902
901
  color: bt,
903
902
  textDecoration: "underline"
904
903
  },
905
904
  {
906
- tag: d.heading,
905
+ tag: p.heading,
907
906
  fontWeight: "bold",
908
907
  color: gt
909
908
  },
910
909
  {
911
910
  tag: [
912
- d.atom,
913
- d.bool,
914
- /*@__PURE__*/ d.special(d.variableName)
911
+ p.atom,
912
+ p.bool,
913
+ /*@__PURE__*/ p.special(p.variableName)
915
914
  ],
916
915
  color: Ct
917
916
  },
918
917
  {
919
918
  tag: [
920
- d.processingInstruction,
921
- d.string,
922
- d.inserted
919
+ p.processingInstruction,
920
+ p.string,
921
+ p.inserted
923
922
  ],
924
923
  color: St
925
924
  },
926
925
  {
927
- tag: d.invalid,
926
+ tag: p.invalid,
928
927
  color: vt
929
928
  }
930
- ]), Nt = [jt, /*@__PURE__*/ c(Mt)], Pt = u.theme({ "&": { backgroundColor: "#fff" } }, { dark: !1 }), Ft = function(e) {
929
+ ]), Nt = [jt, /*@__PURE__*/ T(Mt)], Pt = g.theme({ "&": { backgroundColor: "#fff" } }, { dark: !1 }), Ft = function(e) {
931
930
  e === void 0 && (e = {});
932
- var t = e, n = t.indentWithTab, r = n === void 0 || n, i = t.editable, a = i === void 0 || i, s = t.readOnly, c = s !== void 0 && s, l = t.theme, d = l === void 0 ? "light" : l, f = t.placeholder, p = f === void 0 ? "" : f, m = t.basicSetup, h = m === void 0 || m, g = [];
933
- switch (r && g.unshift(P.of([z])), h && (typeof h == "boolean" ? g.unshift(pt()) : g.unshift(pt(h))), p && g.unshift(oe(p)), d) {
931
+ var t = e, n = t.indentWithTab, r = n === void 0 || n, i = t.editable, a = i === void 0 || i, o = t.readOnly, s = o !== void 0 && o, c = t.theme, l = c === void 0 ? "light" : c, u = t.placeholder, d = u === void 0 ? "" : u, f = t.basicSetup, p = f === void 0 || f, m = [];
932
+ switch (r && m.unshift(M.of([oe])), p && (typeof p == "boolean" ? m.unshift(pt()) : m.unshift(pt(p))), d && m.unshift(k(d)), l) {
934
933
  case "light":
935
- g.push(Pt);
934
+ m.push(Pt);
936
935
  break;
937
936
  case "dark":
938
- g.push(Nt);
937
+ m.push(Nt);
939
938
  break;
940
939
  case "none": break;
941
- default: g.push(d);
940
+ default: m.push(l);
942
941
  }
943
- return a === !1 && g.push(u.editable.of(!1)), c && g.push(o.readOnly.of(!0)), [...g];
942
+ return a === !1 && m.push(g.editable.of(!1)), s && m.push(L.readOnly.of(!0)), [...m];
944
943
  }, It = (e) => ({
945
944
  line: e.state.doc.lineAt(e.state.selection.main.from),
946
945
  lineCount: e.state.doc.lines,
@@ -1000,7 +999,7 @@ var dt = /*@__PURE__*/ u.baseTheme({
1000
999
  stop() {
1001
1000
  this.interval !== null && (clearInterval(this.interval), this.interval = null);
1002
1001
  }
1003
- }, zt = null, Bt = () => typeof window > "u" ? new Rt() : (zt ||= new Rt(), zt), Vt = u.theme({ "& .cm-scroller": { height: "100% !important" } }), Ht = null, Ut = null;
1002
+ }, zt = null, Bt = () => typeof window > "u" ? new Rt() : (zt ||= new Rt(), zt), Vt = g.theme({ "& .cm-scroller": { height: "100% !important" } }), Ht = null, Ut = null;
1004
1003
  function Wt(e, t, n, r, i, a) {
1005
1004
  if (!e && !t && !n && !r && !i && !a) return null;
1006
1005
  var o = JSON.stringify({
@@ -1011,7 +1010,7 @@ function Wt(e, t, n, r, i, a) {
1011
1010
  minWidth: i,
1012
1011
  maxWidth: a
1013
1012
  });
1014
- return o === Ht ? Ut : (Ht = o, Ut = u.theme({ "&": {
1013
+ return o === Ht ? Ut : (Ht = o, Ut = g.theme({ "&": {
1015
1014
  height: e,
1016
1015
  minHeight: t,
1017
1016
  maxHeight: n,
@@ -1022,77 +1021,77 @@ function Wt(e, t, n, r, i, a) {
1022
1021
  }
1023
1022
  //#endregion
1024
1023
  //#region ../node_modules/.pnpm/@uiw+react-codemirror@4.25.11_@babel+runtime@7.27.6_@codemirror+autocomplete@6.20.3_@co_49c708f5e8044c3002cd598e6281e94d/node_modules/@uiw/react-codemirror/esm/useCodeMirror.js
1025
- var Gt = te.define(), Kt = 200, qt = [];
1024
+ var Gt = A.define(), Kt = 200, qt = [];
1026
1025
  function Jt(e) {
1027
- var t = e.value, n = e.selection, r = e.onChange, a = e.onStatistics, s = e.onCreateEditor, c = e.onUpdate, l = e.extensions, d = l === void 0 ? qt : l, f = e.autoFocus, p = e.theme, m = p === void 0 ? "light" : p, h = e.height, g = h === void 0 ? null : h, _ = e.minHeight, v = _ === void 0 ? null : _, ee = e.maxHeight, y = ee === void 0 ? null : ee, te = e.width, b = te === void 0 ? null : te, x = e.minWidth, S = x === void 0 ? null : x, C = e.maxWidth, w = C === void 0 ? null : C, T = e.placeholder, ne = T === void 0 ? "" : T, E = e.editable, D = E === void 0 || E, O = e.readOnly, k = O !== void 0 && O, re = e.indentWithTab, A = re === void 0 || re, j = e.basicSetup, M = j === void 0 || j, ie = e.root, N = e.initialState, ae = (0, V.useState)(), P = ae[0], oe = ae[1], F = (0, V.useState)(), I = F[0], L = F[1], se = (0, V.useState)(), ce = se[0], le = se[1], R = (0, V.useState)(() => ({ current: null }))[0], z = (0, V.useState)(() => ({ current: null }))[0], ue = Wt(g, v, y, b, S, w), de = u.updateListener.of((e) => {
1028
- e.docChanged && typeof r == "function" && !e.transactions.some((e) => e.annotation(Gt)) && (R.current ? R.current.reset() : (R.current = new Lt(() => {
1029
- if (z.current) {
1030
- var e = z.current;
1031
- z.current = null, e();
1026
+ var t = e.value, n = e.selection, r = e.onChange, i = e.onStatistics, a = e.onCreateEditor, o = e.onUpdate, c = e.extensions, l = c === void 0 ? qt : c, u = e.autoFocus, d = e.theme, f = d === void 0 ? "light" : d, p = e.height, m = p === void 0 ? null : p, ee = e.minHeight, h = ee === void 0 ? null : ee, _ = e.maxHeight, v = _ === void 0 ? null : _, y = e.width, b = y === void 0 ? null : y, te = e.minWidth, x = te === void 0 ? null : te, S = e.maxWidth, C = S === void 0 ? null : S, w = e.placeholder, ne = w === void 0 ? "" : w, T = e.editable, E = T === void 0 || T, D = e.readOnly, O = D !== void 0 && D, k = e.indentWithTab, A = k === void 0 || k, j = e.basicSetup, M = j === void 0 || j, re = e.root, N = e.initialState, ie = (0, U.useState)(), P = ie[0], F = ie[1], ae = (0, U.useState)(), I = ae[0], R = ae[1], z = (0, U.useState)(), oe = z[0], se = z[1], B = (0, U.useState)(() => ({ current: null }))[0], V = (0, U.useState)(() => ({ current: null }))[0], ce = Wt(m, h, v, b, x, C), le = g.updateListener.of((e) => {
1027
+ e.docChanged && typeof r == "function" && !e.transactions.some((e) => e.annotation(Gt)) && (B.current ? B.current.reset() : (B.current = new Lt(() => {
1028
+ if (V.current) {
1029
+ var e = V.current;
1030
+ V.current = null, e();
1032
1031
  }
1033
- R.current = null;
1034
- }, Kt), Bt().add(R.current)), r(e.state.doc.toString(), e)), a && a(It(e));
1035
- }), fe = Ft({
1036
- theme: m,
1037
- editable: D,
1038
- readOnly: k,
1032
+ B.current = null;
1033
+ }, Kt), Bt().add(B.current)), r(e.state.doc.toString(), e)), i && i(It(e));
1034
+ }), ue = Ft({
1035
+ theme: f,
1036
+ editable: E,
1037
+ readOnly: O,
1039
1038
  placeholder: ne,
1040
1039
  indentWithTab: A,
1041
1040
  basicSetup: M
1042
- }), B = [
1043
- de,
1044
- ...ue ? [ue] : [],
1041
+ }), H = [
1042
+ le,
1043
+ ...ce ? [ce] : [],
1045
1044
  Vt,
1046
- ...fe
1045
+ ...ue
1047
1046
  ];
1048
- return c && typeof c == "function" && B.push(u.updateListener.of(c)), B = B.concat(d), (0, V.useLayoutEffect)(() => {
1049
- if (P && !ce) {
1047
+ return o && typeof o == "function" && H.push(g.updateListener.of(o)), H = H.concat(l), (0, U.useLayoutEffect)(() => {
1048
+ if (P && !oe) {
1050
1049
  var e = {
1051
1050
  doc: t,
1052
1051
  selection: n,
1053
- extensions: B
1054
- }, r = N ? o.fromJSON(N.json, e, N.fields) : o.create(e);
1055
- if (le(r), !I) {
1056
- var i = new u({
1052
+ extensions: H
1053
+ }, r = N ? L.fromJSON(N.json, e, N.fields) : L.create(e);
1054
+ if (se(r), !I) {
1055
+ var i = new g({
1057
1056
  state: r,
1058
1057
  parent: P,
1059
- root: ie
1058
+ root: re
1060
1059
  });
1061
- L(i), s && s(i, r);
1060
+ R(i), a && a(i, r);
1062
1061
  }
1063
1062
  }
1064
1063
  return () => {
1065
- I && (le(void 0), L(void 0));
1064
+ I && (se(void 0), R(void 0));
1066
1065
  };
1067
- }, [P, ce]), (0, V.useEffect)(() => {
1068
- e.container && oe(e.container);
1069
- }, [e.container]), (0, V.useEffect)(() => () => {
1070
- I && (I.destroy(), L(void 0)), R.current &&= (R.current.cancel(), null);
1071
- }, [I]), (0, V.useEffect)(() => {
1072
- f && I && I.focus();
1073
- }, [f, I]), (0, V.useEffect)(() => {
1074
- I && I.dispatch({ effects: i.reconfigure.of(B) });
1066
+ }, [P, oe]), (0, U.useEffect)(() => {
1067
+ e.container && F(e.container);
1068
+ }, [e.container]), (0, U.useEffect)(() => () => {
1069
+ I && (I.destroy(), R(void 0)), B.current &&= (B.current.cancel(), null);
1070
+ }, [I]), (0, U.useEffect)(() => {
1071
+ u && I && I.focus();
1072
+ }, [u, I]), (0, U.useEffect)(() => {
1073
+ I && I.dispatch({ effects: s.reconfigure.of(H) });
1075
1074
  }, [
1075
+ f,
1076
+ l,
1076
1077
  m,
1077
- d,
1078
- g,
1078
+ h,
1079
1079
  v,
1080
- y,
1081
1080
  b,
1082
- S,
1083
- w,
1081
+ x,
1082
+ C,
1084
1083
  ne,
1085
- D,
1086
- k,
1084
+ E,
1085
+ O,
1087
1086
  A,
1088
1087
  M,
1089
1088
  r,
1090
- c
1091
- ]), (0, V.useEffect)(() => {
1089
+ o
1090
+ ]), (0, U.useEffect)(() => {
1092
1091
  if (t !== void 0) {
1093
1092
  var e = I ? I.state.doc.toString() : "";
1094
1093
  if (I && t !== e) {
1095
- var n = R.current && !R.current.isDone, r = () => {
1094
+ var n = B.current && !B.current.isDone, r = () => {
1096
1095
  I && t !== I.state.doc.toString() && I.dispatch({
1097
1096
  changes: {
1098
1097
  from: 0,
@@ -1102,16 +1101,16 @@ function Jt(e) {
1102
1101
  annotations: [Gt.of(!0)]
1103
1102
  });
1104
1103
  };
1105
- n ? z.current = r : r();
1104
+ n ? V.current = r : r();
1106
1105
  }
1107
1106
  }
1108
1107
  }, [t, I]), {
1109
- state: ce,
1110
- setState: le,
1108
+ state: oe,
1109
+ setState: se,
1111
1110
  view: I,
1112
- setView: L,
1111
+ setView: R,
1113
1112
  container: P,
1114
- setContainer: oe
1113
+ setContainer: F
1115
1114
  };
1116
1115
  }
1117
1116
  //#endregion
@@ -1140,20 +1139,20 @@ var Yt = n(), Xt = [
1140
1139
  "readOnly",
1141
1140
  "root",
1142
1141
  "initialState"
1143
- ], Zt = /*#__PURE__*/ (0, V.forwardRef)((e, t) => {
1144
- var n = e.className, r = e.value, i = r === void 0 ? "" : r, a = e.selection, o = e.extensions, s = o === void 0 ? [] : o, c = e.onChange, l = e.onStatistics, u = e.onCreateEditor, d = e.onUpdate, f = e.autoFocus, p = e.theme, m = p === void 0 ? "light" : p, h = e.height, g = e.minHeight, _ = e.maxHeight, v = e.width, ee = e.minWidth, y = e.maxWidth, te = e.basicSetup, b = e.placeholder, x = e.indentWithTab, S = e.editable, C = e.readOnly, w = e.root, T = e.initialState, ne = me(e, Xt), E = (0, V.useRef)(null), D = Jt({
1142
+ ], Zt = /*#__PURE__*/ (0, U.forwardRef)((e, t) => {
1143
+ var n = e.className, r = e.value, i = r === void 0 ? "" : r, a = e.selection, o = e.extensions, s = o === void 0 ? [] : o, c = e.onChange, l = e.onStatistics, u = e.onCreateEditor, d = e.onUpdate, f = e.autoFocus, p = e.theme, m = p === void 0 ? "light" : p, ee = e.height, h = e.minHeight, g = e.maxHeight, _ = e.width, v = e.minWidth, y = e.maxWidth, b = e.basicSetup, te = e.placeholder, x = e.indentWithTab, S = e.editable, C = e.readOnly, w = e.root, ne = e.initialState, T = ce(e, Xt), E = (0, U.useRef)(null), D = Jt({
1145
1144
  root: w,
1146
1145
  value: i,
1147
1146
  autoFocus: f,
1148
1147
  theme: m,
1149
- height: h,
1150
- minHeight: g,
1151
- maxHeight: _,
1152
- width: v,
1153
- minWidth: ee,
1148
+ height: ee,
1149
+ minHeight: h,
1150
+ maxHeight: g,
1151
+ width: _,
1152
+ minWidth: v,
1154
1153
  maxWidth: y,
1155
- basicSetup: te,
1156
- placeholder: b,
1154
+ basicSetup: b,
1155
+ placeholder: te,
1157
1156
  indentWithTab: x,
1158
1157
  editable: S,
1159
1158
  readOnly: C,
@@ -1163,27 +1162,27 @@ var Yt = n(), Xt = [
1163
1162
  onCreateEditor: u,
1164
1163
  onUpdate: d,
1165
1164
  extensions: s,
1166
- initialState: T
1167
- }), O = D.state, k = D.view, re = D.container, A = D.setContainer;
1168
- (0, V.useImperativeHandle)(t, () => ({
1165
+ initialState: ne
1166
+ }), O = D.state, k = D.view, A = D.container, j = D.setContainer;
1167
+ (0, U.useImperativeHandle)(t, () => ({
1169
1168
  editor: E.current,
1170
1169
  state: O,
1171
1170
  view: k
1172
1171
  }), [
1173
1172
  E,
1174
- re,
1173
+ A,
1175
1174
  O,
1176
1175
  k
1177
1176
  ]);
1178
- var j = (0, V.useCallback)((e) => {
1179
- E.current = e, A(e);
1180
- }, [A]);
1177
+ var M = (0, U.useCallback)((e) => {
1178
+ E.current = e, j(e);
1179
+ }, [j]);
1181
1180
  if (typeof i != "string") throw Error("value must be typeof string but got " + typeof i);
1182
- var M = typeof m == "string" ? "cm-theme-" + m : "cm-theme";
1183
- return /*#__PURE__*/ (0, Yt.jsx)("div", pe({
1184
- ref: j,
1185
- className: "" + M + (n ? " " + n : "")
1186
- }, ne));
1181
+ var re = typeof m == "string" ? "cm-theme-" + m : "cm-theme";
1182
+ return /*#__PURE__*/ (0, Yt.jsx)("div", B({
1183
+ ref: M,
1184
+ className: "" + re + (n ? " " + n : "")
1185
+ }, T));
1187
1186
  });
1188
1187
  Zt.displayName = "CodeMirror";
1189
1188
  //#endregion