ghost 5.67.0 → 5.68.0

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 (182) hide show
  1. package/components/tryghost-adapter-cache-memory-ttl-5.68.0.tgz +0 -0
  2. package/components/tryghost-adapter-cache-redis-5.68.0.tgz +0 -0
  3. package/components/{tryghost-adapter-manager-5.67.0.tgz → tryghost-adapter-manager-5.68.0.tgz} +0 -0
  4. package/components/tryghost-announcement-bar-settings-5.68.0.tgz +0 -0
  5. package/components/tryghost-api-framework-5.68.0.tgz +0 -0
  6. package/components/tryghost-api-version-compatibility-service-5.68.0.tgz +0 -0
  7. package/components/tryghost-audience-feedback-5.68.0.tgz +0 -0
  8. package/components/tryghost-bookshelf-repository-5.68.0.tgz +0 -0
  9. package/components/tryghost-bootstrap-socket-5.68.0.tgz +0 -0
  10. package/components/tryghost-collections-5.68.0.tgz +0 -0
  11. package/components/tryghost-constants-5.68.0.tgz +0 -0
  12. package/components/tryghost-custom-theme-settings-service-5.68.0.tgz +0 -0
  13. package/components/{tryghost-data-generator-5.67.0.tgz → tryghost-data-generator-5.68.0.tgz} +0 -0
  14. package/components/tryghost-domain-events-5.68.0.tgz +0 -0
  15. package/components/tryghost-donations-5.68.0.tgz +0 -0
  16. package/components/tryghost-dynamic-routing-events-5.68.0.tgz +0 -0
  17. package/components/tryghost-email-analytics-provider-mailgun-5.68.0.tgz +0 -0
  18. package/components/tryghost-email-analytics-service-5.68.0.tgz +0 -0
  19. package/components/tryghost-email-content-generator-5.68.0.tgz +0 -0
  20. package/components/tryghost-email-events-5.68.0.tgz +0 -0
  21. package/components/{tryghost-email-service-5.67.0.tgz → tryghost-email-service-5.68.0.tgz} +0 -0
  22. package/components/tryghost-email-suppression-list-5.68.0.tgz +0 -0
  23. package/components/tryghost-event-aware-cache-wrapper-5.68.0.tgz +0 -0
  24. package/components/tryghost-express-dynamic-redirects-5.68.0.tgz +0 -0
  25. package/components/tryghost-external-media-inliner-5.68.0.tgz +0 -0
  26. package/components/tryghost-extract-api-key-5.68.0.tgz +0 -0
  27. package/components/tryghost-html-to-plaintext-5.68.0.tgz +0 -0
  28. package/components/tryghost-i18n-5.68.0.tgz +0 -0
  29. package/components/tryghost-importer-handler-content-files-5.68.0.tgz +0 -0
  30. package/components/tryghost-importer-revue-5.68.0.tgz +0 -0
  31. package/components/tryghost-in-memory-repository-5.68.0.tgz +0 -0
  32. package/components/{tryghost-job-manager-5.67.0.tgz → tryghost-job-manager-5.68.0.tgz} +0 -0
  33. package/components/tryghost-link-redirects-5.68.0.tgz +0 -0
  34. package/components/tryghost-link-replacer-5.68.0.tgz +0 -0
  35. package/components/tryghost-link-tracking-5.68.0.tgz +0 -0
  36. package/components/tryghost-magic-link-5.68.0.tgz +0 -0
  37. package/components/tryghost-mail-events-5.68.0.tgz +0 -0
  38. package/components/tryghost-mailgun-client-5.68.0.tgz +0 -0
  39. package/components/tryghost-member-attribution-5.68.0.tgz +0 -0
  40. package/components/tryghost-member-events-5.68.0.tgz +0 -0
  41. package/components/{tryghost-members-api-5.67.0.tgz → tryghost-members-api-5.68.0.tgz} +0 -0
  42. package/components/tryghost-members-csv-5.68.0.tgz +0 -0
  43. package/components/{tryghost-members-events-service-5.67.0.tgz → tryghost-members-events-service-5.68.0.tgz} +0 -0
  44. package/components/tryghost-members-importer-5.68.0.tgz +0 -0
  45. package/components/{tryghost-members-offers-5.67.0.tgz → tryghost-members-offers-5.68.0.tgz} +0 -0
  46. package/components/tryghost-members-payments-5.68.0.tgz +0 -0
  47. package/components/tryghost-members-ssr-5.68.0.tgz +0 -0
  48. package/components/{tryghost-members-stripe-service-5.67.0.tgz → tryghost-members-stripe-service-5.68.0.tgz} +0 -0
  49. package/components/tryghost-mentions-email-report-5.68.0.tgz +0 -0
  50. package/components/tryghost-milestones-5.68.0.tgz +0 -0
  51. package/components/tryghost-minifier-5.68.0.tgz +0 -0
  52. package/components/tryghost-model-to-domain-event-interceptor-5.68.0.tgz +0 -0
  53. package/components/tryghost-mw-api-version-mismatch-5.68.0.tgz +0 -0
  54. package/components/tryghost-mw-cache-control-5.68.0.tgz +0 -0
  55. package/components/tryghost-mw-error-handler-5.68.0.tgz +0 -0
  56. package/components/tryghost-mw-session-from-token-5.68.0.tgz +0 -0
  57. package/components/tryghost-mw-update-user-last-seen-5.68.0.tgz +0 -0
  58. package/components/tryghost-mw-version-match-5.68.0.tgz +0 -0
  59. package/components/tryghost-mw-vhost-5.68.0.tgz +0 -0
  60. package/components/tryghost-nql-filter-expansions-5.68.0.tgz +0 -0
  61. package/components/tryghost-oembed-service-5.68.0.tgz +0 -0
  62. package/components/tryghost-package-json-5.68.0.tgz +0 -0
  63. package/components/tryghost-post-events-5.68.0.tgz +0 -0
  64. package/components/tryghost-post-revisions-5.68.0.tgz +0 -0
  65. package/components/tryghost-posts-service-5.68.0.tgz +0 -0
  66. package/components/tryghost-recommendations-5.68.0.tgz +0 -0
  67. package/components/tryghost-referrers-5.68.0.tgz +0 -0
  68. package/components/tryghost-security-5.68.0.tgz +0 -0
  69. package/components/tryghost-session-service-5.68.0.tgz +0 -0
  70. package/components/tryghost-settings-path-manager-5.68.0.tgz +0 -0
  71. package/components/tryghost-slack-notifications-5.68.0.tgz +0 -0
  72. package/components/tryghost-staff-service-5.68.0.tgz +0 -0
  73. package/components/tryghost-stats-service-5.68.0.tgz +0 -0
  74. package/components/tryghost-tiers-5.68.0.tgz +0 -0
  75. package/components/{tryghost-update-check-service-5.67.0.tgz → tryghost-update-check-service-5.68.0.tgz} +0 -0
  76. package/components/tryghost-verification-trigger-5.68.0.tgz +0 -0
  77. package/components/tryghost-version-notifications-data-service-5.68.0.tgz +0 -0
  78. package/components/tryghost-webmentions-5.68.0.tgz +0 -0
  79. package/core/built/admin/assets/admin-x-settings/{CodeEditorView-1643e910.mjs → CodeEditorView-73bd35b1.mjs} +294 -292
  80. package/core/built/admin/assets/admin-x-settings/admin-x-settings.js +2 -2
  81. package/core/built/admin/assets/admin-x-settings/{index-b4c2ef5b.mjs → index-b8520e93.mjs} +4625 -4515
  82. package/core/built/admin/assets/admin-x-settings/{limit-service-c343d244.mjs → limit-service-cc4a15e2.mjs} +2 -2
  83. package/core/built/admin/assets/admin-x-settings/{modals-8b0aeacd.mjs → modals-fc330da9.mjs} +6904 -6781
  84. package/core/built/admin/assets/{chunk.143.da2301d9edb6ad0b5496.js → chunk.143.5770521695d411ee098e.js} +5 -5
  85. package/core/built/admin/assets/{chunk.178.efec05ab07e1e216d657.js → chunk.178.717d4af1747380378833.js} +4 -4
  86. package/core/built/admin/assets/{chunk.940.b09a2c2049ed9c373dd0.js → chunk.940.f55d8073f4fd2738aa11.js} +3 -3
  87. package/core/built/admin/assets/ghost-04f331b095bb184b7ee00f43f65466e4.css +1 -0
  88. package/core/built/admin/assets/ghost-dark-9744221e76ff089f6176ad97379c9599.css +1 -0
  89. package/core/built/admin/assets/{ghost-193c98abe66483968da753e54917e87a.js → ghost-fb0f793a8d8d9df304bc501fbcad01e4.js} +182 -181
  90. package/core/built/admin/assets/koenig-lexical/Koenig-editor-1.png +0 -0
  91. package/core/built/admin/assets/koenig-lexical/Koenig-editor-2.png +0 -0
  92. package/core/built/admin/assets/koenig-lexical/assets/fonts/Inter.ttf +0 -0
  93. package/core/built/admin/assets/koenig-lexical/index.css +6 -0
  94. package/core/built/admin/assets/koenig-lexical/koenig-lexical.js +128903 -0
  95. package/core/built/admin/assets/koenig-lexical/koenig-lexical.umd.js +1442 -0
  96. package/core/built/admin/index.html +5 -5
  97. package/core/frontend/helpers/recommendations.js +1 -1
  98. package/core/frontend/helpers/tpl/recommendations.hbs +3 -5
  99. package/core/server/GhostServer.js +9 -0
  100. package/core/server/api/endpoints/incoming-recommendations.js +20 -0
  101. package/core/server/api/endpoints/index.js +4 -0
  102. package/core/server/api/endpoints/posts-public.js +3 -2
  103. package/core/server/api/endpoints/utils/serializers/output/config.js +0 -1
  104. package/core/server/models/product.js +1 -1
  105. package/core/server/services/recommendations/RecommendationServiceWrapper.js +10 -0
  106. package/core/server/web/api/endpoints/admin/routes.js +3 -0
  107. package/core/shared/config/defaults.json +0 -4
  108. package/core/shared/labs.js +3 -3
  109. package/package.json +156 -156
  110. package/yarn.lock +113 -108
  111. package/components/tryghost-adapter-cache-memory-ttl-5.67.0.tgz +0 -0
  112. package/components/tryghost-adapter-cache-redis-5.67.0.tgz +0 -0
  113. package/components/tryghost-announcement-bar-settings-5.67.0.tgz +0 -0
  114. package/components/tryghost-api-framework-5.67.0.tgz +0 -0
  115. package/components/tryghost-api-version-compatibility-service-5.67.0.tgz +0 -0
  116. package/components/tryghost-audience-feedback-5.67.0.tgz +0 -0
  117. package/components/tryghost-bookshelf-repository-5.67.0.tgz +0 -0
  118. package/components/tryghost-bootstrap-socket-5.67.0.tgz +0 -0
  119. package/components/tryghost-collections-5.67.0.tgz +0 -0
  120. package/components/tryghost-constants-5.67.0.tgz +0 -0
  121. package/components/tryghost-custom-theme-settings-service-5.67.0.tgz +0 -0
  122. package/components/tryghost-domain-events-5.67.0.tgz +0 -0
  123. package/components/tryghost-donations-5.67.0.tgz +0 -0
  124. package/components/tryghost-dynamic-routing-events-5.67.0.tgz +0 -0
  125. package/components/tryghost-email-analytics-provider-mailgun-5.67.0.tgz +0 -0
  126. package/components/tryghost-email-analytics-service-5.67.0.tgz +0 -0
  127. package/components/tryghost-email-content-generator-5.67.0.tgz +0 -0
  128. package/components/tryghost-email-events-5.67.0.tgz +0 -0
  129. package/components/tryghost-email-suppression-list-5.67.0.tgz +0 -0
  130. package/components/tryghost-event-aware-cache-wrapper-5.67.0.tgz +0 -0
  131. package/components/tryghost-express-dynamic-redirects-5.67.0.tgz +0 -0
  132. package/components/tryghost-external-media-inliner-5.67.0.tgz +0 -0
  133. package/components/tryghost-extract-api-key-5.67.0.tgz +0 -0
  134. package/components/tryghost-html-to-plaintext-5.67.0.tgz +0 -0
  135. package/components/tryghost-i18n-5.67.0.tgz +0 -0
  136. package/components/tryghost-importer-handler-content-files-5.67.0.tgz +0 -0
  137. package/components/tryghost-importer-revue-5.67.0.tgz +0 -0
  138. package/components/tryghost-in-memory-repository-5.67.0.tgz +0 -0
  139. package/components/tryghost-link-redirects-5.67.0.tgz +0 -0
  140. package/components/tryghost-link-replacer-5.67.0.tgz +0 -0
  141. package/components/tryghost-link-tracking-5.67.0.tgz +0 -0
  142. package/components/tryghost-magic-link-5.67.0.tgz +0 -0
  143. package/components/tryghost-mail-events-5.67.0.tgz +0 -0
  144. package/components/tryghost-mailgun-client-5.67.0.tgz +0 -0
  145. package/components/tryghost-member-attribution-5.67.0.tgz +0 -0
  146. package/components/tryghost-member-events-5.67.0.tgz +0 -0
  147. package/components/tryghost-members-csv-5.67.0.tgz +0 -0
  148. package/components/tryghost-members-importer-5.67.0.tgz +0 -0
  149. package/components/tryghost-members-payments-5.67.0.tgz +0 -0
  150. package/components/tryghost-members-ssr-5.67.0.tgz +0 -0
  151. package/components/tryghost-mentions-email-report-5.67.0.tgz +0 -0
  152. package/components/tryghost-milestones-5.67.0.tgz +0 -0
  153. package/components/tryghost-minifier-5.67.0.tgz +0 -0
  154. package/components/tryghost-model-to-domain-event-interceptor-5.67.0.tgz +0 -0
  155. package/components/tryghost-mw-api-version-mismatch-5.67.0.tgz +0 -0
  156. package/components/tryghost-mw-cache-control-5.67.0.tgz +0 -0
  157. package/components/tryghost-mw-error-handler-5.67.0.tgz +0 -0
  158. package/components/tryghost-mw-session-from-token-5.67.0.tgz +0 -0
  159. package/components/tryghost-mw-update-user-last-seen-5.67.0.tgz +0 -0
  160. package/components/tryghost-mw-version-match-5.67.0.tgz +0 -0
  161. package/components/tryghost-mw-vhost-5.67.0.tgz +0 -0
  162. package/components/tryghost-nql-filter-expansions-5.67.0.tgz +0 -0
  163. package/components/tryghost-oembed-service-5.67.0.tgz +0 -0
  164. package/components/tryghost-package-json-5.67.0.tgz +0 -0
  165. package/components/tryghost-post-events-5.67.0.tgz +0 -0
  166. package/components/tryghost-post-revisions-5.67.0.tgz +0 -0
  167. package/components/tryghost-posts-service-5.67.0.tgz +0 -0
  168. package/components/tryghost-recommendations-5.67.0.tgz +0 -0
  169. package/components/tryghost-referrers-5.67.0.tgz +0 -0
  170. package/components/tryghost-security-5.67.0.tgz +0 -0
  171. package/components/tryghost-session-service-5.67.0.tgz +0 -0
  172. package/components/tryghost-settings-path-manager-5.67.0.tgz +0 -0
  173. package/components/tryghost-slack-notifications-5.67.0.tgz +0 -0
  174. package/components/tryghost-staff-service-5.67.0.tgz +0 -0
  175. package/components/tryghost-stats-service-5.67.0.tgz +0 -0
  176. package/components/tryghost-tiers-5.67.0.tgz +0 -0
  177. package/components/tryghost-verification-trigger-5.67.0.tgz +0 -0
  178. package/components/tryghost-version-notifications-data-service-5.67.0.tgz +0 -0
  179. package/components/tryghost-webmentions-5.67.0.tgz +0 -0
  180. package/core/built/admin/assets/ghost-9e454659c8c0896ed10336b640d1b1eb.css +0 -1
  181. package/core/built/admin/assets/ghost-dark-1d24186396fe74946c926faa9faa247b.css +0 -1
  182. /package/core/built/admin/assets/{chunk.940.b09a2c2049ed9c373dd0.js.LICENSE.txt → chunk.940.f55d8073f4fd2738aa11.js.LICENSE.txt} +0 -0
@@ -1,8 +1,8 @@
1
- import { b as ke, d as W, a_ as wt, bA as qn, C as Rt, bB as Hn, j as P, bC as Vn, E as zn, y as Un, P as $n, J as Gn, H as Kn, G as Jn } from "./index-b4c2ef5b.mjs";
2
- import { E as p, F as ue, v as Ee, S as we, o as d, w as qe, C as _n, x as jn, y as Tt, z as Ot, A as Se, B as It, G as Pt, H as Wt, J as $e, K as Xe, M as w, O as Z, g as et, b as Ge, Q as Qn, R as ee, V as Ft, U as y, W as Yn, X as Zn, Y as ae, Z as M, _ as Xn, $ as er, a0 as tt, a1 as ce, a2 as tr, a3 as nr, a4 as rr, a5 as or, a6 as ir, a7 as sr, a8 as lr, a9 as ar, aa as cr, ab as hr, ac as ur, ad as fr, ae as dr, af as mr, ag as Nt, ah as gr, ai as pr, aj as yr, ak as xr, al as kr, am as br, an as qt, ao as Sr, ap as Cr, t as f, aq as vr } from "./index-9cc1df42.mjs";
1
+ import { b as ke, d as F, b1 as wt, bI as qn, D as Rt, bJ as Hn, j as W, bK as Vn, G as zn, z as Un, X as $n, K as Gn, H as Kn, I as Jn } from "./index-b8520e93.mjs";
2
+ import { E as p, F as fe, v as Ee, S as we, o as d, w as qe, C as _n, x as jn, y as Tt, z as It, A as Se, B as Ot, G as Pt, H as Wt, J as $e, K as Ze, M as w, O as Y, g as et, b as Ge, Q as Qn, R as ee, V as Ft, U as y, W as Xn, X as Yn, Y as ce, Z as L, _ as Zn, $ as er, a0 as tt, a1 as he, a2 as tr, a3 as nr, a4 as rr, a5 as or, a6 as ir, a7 as sr, a8 as lr, a9 as ar, aa as cr, ab as hr, ac as ur, ad as fr, ae as dr, af as mr, ag as Nt, ah as gr, ai as pr, aj as yr, ak as xr, al as kr, am as br, an as qt, ao as Sr, ap as Cr, t as f, aq as vr } from "./index-9cc1df42.mjs";
3
3
  const Ar = (t) => {
4
4
  let { state: e } = t, r = e.doc.lineAt(e.selection.main.from), n = rt(t.state, r.from);
5
- return n.line ? Mr(t) : n.block ? Br(t) : !1;
5
+ return n.line ? Mr(t) : n.block ? Dr(t) : !1;
6
6
  };
7
7
  function nt(t, e) {
8
8
  return ({ state: r, dispatch: n }) => {
@@ -20,7 +20,7 @@ const Mr = /* @__PURE__ */ nt(
20
20
  Ht,
21
21
  0
22
22
  /* CommentOption.Toggle */
23
- ), Br = /* @__PURE__ */ nt(
23
+ ), Dr = /* @__PURE__ */ nt(
24
24
  (t, e) => Ht(t, e, Er(e)),
25
25
  0
26
26
  /* CommentOption.Toggle */
@@ -29,25 +29,25 @@ function rt(t, e) {
29
29
  let r = t.languageDataAt("commentTokens", e);
30
30
  return r.length ? r[0] : {};
31
31
  }
32
- const le = 50;
33
- function Dr(t, { open: e, close: r }, n, o) {
34
- let i = t.sliceDoc(n - le, n), s = t.sliceDoc(o, o + le), l = /\s*$/.exec(i)[0].length, a = /^\s*/.exec(s)[0].length, c = i.length - l;
32
+ const ae = 50;
33
+ function Br(t, { open: e, close: r }, n, o) {
34
+ let i = t.sliceDoc(n - ae, n), s = t.sliceDoc(o, o + ae), l = /\s*$/.exec(i)[0].length, a = /^\s*/.exec(s)[0].length, c = i.length - l;
35
35
  if (i.slice(c - e.length, c) == e && s.slice(a, a + r.length) == r)
36
36
  return {
37
37
  open: { pos: n - l, margin: l && 1 },
38
38
  close: { pos: o + a, margin: a && 1 }
39
39
  };
40
40
  let h, u;
41
- o - n <= 2 * le ? h = u = t.sliceDoc(n, o) : (h = t.sliceDoc(n, n + le), u = t.sliceDoc(o - le, o));
42
- let m = /^\s*/.exec(h)[0].length, x = /\s*$/.exec(u)[0].length, S = u.length - x - r.length;
43
- return h.slice(m, m + e.length) == e && u.slice(S, S + r.length) == r ? {
41
+ o - n <= 2 * ae ? h = u = t.sliceDoc(n, o) : (h = t.sliceDoc(n, n + ae), u = t.sliceDoc(o - ae, o));
42
+ let m = /^\s*/.exec(h)[0].length, x = /\s*$/.exec(u)[0].length, b = u.length - x - r.length;
43
+ return h.slice(m, m + e.length) == e && u.slice(b, b + r.length) == r ? {
44
44
  open: {
45
45
  pos: n + m + e.length,
46
46
  margin: /\s/.test(h.charAt(m + e.length)) ? 1 : 0
47
47
  },
48
48
  close: {
49
49
  pos: o - x - r.length,
50
- margin: /\s/.test(u.charAt(S - 1)) ? 1 : 0
50
+ margin: /\s/.test(u.charAt(b - 1)) ? 1 : 0
51
51
  }
52
52
  } : null;
53
53
  }
@@ -63,7 +63,7 @@ function Ht(t, e, r = e.selection.ranges) {
63
63
  let n = r.map((i) => rt(e, i.from).block);
64
64
  if (!n.every((i) => i))
65
65
  return null;
66
- let o = r.map((i, s) => Dr(e, n[s], i.from, i.to));
66
+ let o = r.map((i, s) => Br(e, n[s], i.from, i.to));
67
67
  if (t != 2 && !o.every((i) => i))
68
68
  return { changes: e.changes(r.map((i, s) => o[s] ? [] : [{ from: i.from, insert: n[s].open + " " }, { from: i.to, insert: " " + n[s].close }])) };
69
69
  if (t != 1 && o.some((i) => i)) {
@@ -86,8 +86,8 @@ function wr(t, e, r = e.selection.ranges) {
86
86
  let u = e.doc.lineAt(h);
87
87
  if (u.from > o && (i == s || s > u.from)) {
88
88
  o = u.from;
89
- let m = /^\s*/.exec(u.text)[0].length, x = m == u.length, S = u.text.slice(m, m + c.length) == c ? m : -1;
90
- m < u.text.length && m < a && (a = m), n.push({ line: u, comment: S, token: c, indent: m, empty: x, single: !1 });
89
+ let m = /^\s*/.exec(u.text)[0].length, x = m == u.length, b = u.text.slice(m, m + c.length) == c ? m : -1;
90
+ m < u.text.length && m < a && (a = m), n.push({ line: u, comment: b, token: c, indent: m, empty: x, single: !1 });
91
91
  }
92
92
  h = u.to + 1;
93
93
  }
@@ -114,7 +114,7 @@ function wr(t, e, r = e.selection.ranges) {
114
114
  }
115
115
  return null;
116
116
  }
117
- const Ke = /* @__PURE__ */ Xe.define(), Rr = /* @__PURE__ */ Xe.define(), Tr = /* @__PURE__ */ ue.define(), Vt = /* @__PURE__ */ ue.define({
117
+ const Ke = /* @__PURE__ */ Ze.define(), Rr = /* @__PURE__ */ Ze.define(), Tr = /* @__PURE__ */ fe.define(), Vt = /* @__PURE__ */ fe.define({
118
118
  combine(t) {
119
119
  return Ee(t, {
120
120
  minDepth: 100,
@@ -127,19 +127,19 @@ const Ke = /* @__PURE__ */ Xe.define(), Rr = /* @__PURE__ */ Xe.define(), Tr = /
127
127
  });
128
128
  }
129
129
  });
130
- function Or(t) {
130
+ function Ir(t) {
131
131
  let e = 0;
132
132
  return t.iterChangedRanges((r, n) => e = n), e;
133
133
  }
134
134
  const zt = /* @__PURE__ */ we.define({
135
135
  create() {
136
- return T.empty;
136
+ return I.empty;
137
137
  },
138
138
  update(t, e) {
139
139
  let r = e.state.facet(Vt), n = e.annotation(Ke);
140
140
  if (n) {
141
- let a = e.docChanged ? d.single(Or(e.changes)) : void 0, c = C.fromTransaction(e, a), h = n.side, u = h == 0 ? t.undone : t.done;
142
- return c ? u = Ce(u, u.length, r.minDepth, c) : u = Gt(u, e.startState.selection), new T(h == 0 ? n.rest : u, h == 0 ? u : n.rest);
141
+ let a = e.docChanged ? d.single(Ir(e.changes)) : void 0, c = C.fromTransaction(e, a), h = n.side, u = h == 0 ? t.undone : t.done;
142
+ return c ? u = Ce(u, u.length, r.minDepth, c) : u = Gt(u, e.startState.selection), new I(h == 0 ? n.rest : u, h == 0 ? u : n.rest);
143
143
  }
144
144
  let o = e.annotation(Rr);
145
145
  if ((o == "full" || o == "before") && (t = t.isolate()), e.annotation(qe.addToHistory) === !1)
@@ -151,10 +151,10 @@ const zt = /* @__PURE__ */ we.define({
151
151
  return { done: t.done.map((e) => e.toJSON()), undone: t.undone.map((e) => e.toJSON()) };
152
152
  },
153
153
  fromJSON(t) {
154
- return new T(t.done.map(C.fromJSON), t.undone.map(C.fromJSON));
154
+ return new I(t.done.map(C.fromJSON), t.undone.map(C.fromJSON));
155
155
  }
156
156
  });
157
- function Ir(t = {}) {
157
+ function Or(t = {}) {
158
158
  return [
159
159
  zt,
160
160
  Vt.of(t),
@@ -201,15 +201,15 @@ class C {
201
201
  // transaction needs to be converted to an item. Returns null when
202
202
  // there are no changes or effects in the transaction.
203
203
  static fromTransaction(e, r) {
204
- let n = L;
204
+ let n = D;
205
205
  for (let o of e.startState.facet(Tr)) {
206
206
  let i = o(e);
207
207
  i.length && (n = n.concat(i));
208
208
  }
209
- return !n.length && e.changes.empty ? null : new C(e.changes.invert(e.startState.doc), n, void 0, r || e.startState.selection, L);
209
+ return !n.length && e.changes.empty ? null : new C(e.changes.invert(e.startState.doc), n, void 0, r || e.startState.selection, D);
210
210
  }
211
211
  static selection(e) {
212
- return new C(void 0, L, void 0, void 0, e);
212
+ return new C(void 0, D, void 0, void 0, e);
213
213
  }
214
214
  }
215
215
  function Ce(t, e, r, n) {
@@ -231,7 +231,7 @@ function Nr(t, e) {
231
231
  function $t(t, e) {
232
232
  return t.length ? e.length ? t.concat(e) : t : e;
233
233
  }
234
- const L = [], qr = 200;
234
+ const D = [], qr = 200;
235
235
  function Gt(t, e) {
236
236
  if (t.length) {
237
237
  let r = t[t.length - 1], n = r.selectionsAfter.slice(Math.max(0, r.selectionsAfter.length - qr));
@@ -246,7 +246,7 @@ function Hr(t) {
246
246
  function He(t, e) {
247
247
  if (!t.length)
248
248
  return t;
249
- let r = t.length, n = L;
249
+ let r = t.length, n = D;
250
250
  for (; r; ) {
251
251
  let o = Vr(t[r - 1], e, n);
252
252
  if (o.changes && !o.changes.empty || o.effects.length) {
@@ -255,34 +255,34 @@ function He(t, e) {
255
255
  } else
256
256
  e = o.mapped, r--, n = o.selectionsAfter;
257
257
  }
258
- return n.length ? [C.selection(n)] : L;
258
+ return n.length ? [C.selection(n)] : D;
259
259
  }
260
260
  function Vr(t, e, r) {
261
- let n = $t(t.selectionsAfter.length ? t.selectionsAfter.map((l) => l.map(e)) : L, r);
261
+ let n = $t(t.selectionsAfter.length ? t.selectionsAfter.map((l) => l.map(e)) : D, r);
262
262
  if (!t.changes)
263
263
  return C.selection(n);
264
264
  let o = t.changes.map(e), i = e.mapDesc(t.changes, !0), s = t.mapped ? t.mapped.composeDesc(i) : i;
265
265
  return new C(o, w.mapEffects(t.effects, e), s, t.startSelection.map(i), n);
266
266
  }
267
267
  const zr = /^(input\.type|delete)($|\.)/;
268
- class T {
268
+ class I {
269
269
  constructor(e, r, n = 0, o = void 0) {
270
270
  this.done = e, this.undone = r, this.prevTime = n, this.prevUserEvent = o;
271
271
  }
272
272
  isolate() {
273
- return this.prevTime ? new T(this.done, this.undone) : this;
273
+ return this.prevTime ? new I(this.done, this.undone) : this;
274
274
  }
275
275
  addChanges(e, r, n, o, i) {
276
276
  let s = this.done, l = s[s.length - 1];
277
277
  return l && l.changes && !l.changes.empty && e.changes && (!n || zr.test(n)) && (!l.selectionsAfter.length && r - this.prevTime < o.newGroupDelay && o.joinToEvent(i, Fr(l.changes, e.changes)) || // For compose (but not compose.start) events, always join with previous event
278
- n == "input.type.compose") ? s = Ce(s, s.length - 1, o.minDepth, new C(e.changes.compose(l.changes), $t(e.effects, l.effects), l.mapped, l.startSelection, L)) : s = Ce(s, s.length, o.minDepth, e), new T(s, L, r, n);
278
+ n == "input.type.compose") ? s = Ce(s, s.length - 1, o.minDepth, new C(e.changes.compose(l.changes), $t(e.effects, l.effects), l.mapped, l.startSelection, D)) : s = Ce(s, s.length, o.minDepth, e), new I(s, D, r, n);
279
279
  }
280
280
  addSelection(e, r, n, o) {
281
- let i = this.done.length ? this.done[this.done.length - 1].selectionsAfter : L;
282
- return i.length > 0 && r - this.prevTime < o && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && Nr(i[i.length - 1], e) ? this : new T(Gt(this.done, e), this.undone, r, n);
281
+ let i = this.done.length ? this.done[this.done.length - 1].selectionsAfter : D;
282
+ return i.length > 0 && r - this.prevTime < o && n == this.prevUserEvent && n && /^select($|\.)/.test(n) && Nr(i[i.length - 1], e) ? this : new I(Gt(this.done, e), this.undone, r, n);
283
283
  }
284
284
  addMapping(e) {
285
- return new T(He(this.done, e), He(this.undone, e), this.prevTime, this.prevUserEvent);
285
+ return new I(He(this.done, e), He(this.undone, e), this.prevTime, this.prevUserEvent);
286
286
  }
287
287
  pop(e, r, n) {
288
288
  let o = e == 0 ? this.done : this.undone;
@@ -297,7 +297,7 @@ class T {
297
297
  scrollIntoView: !0
298
298
  });
299
299
  if (i.changes) {
300
- let s = o.length == 1 ? L : o.slice(0, o.length - 1);
300
+ let s = o.length == 1 ? D : o.slice(0, o.length - 1);
301
301
  return i.mapped && (s = He(s, i.mapped)), r.update({
302
302
  changes: i.changes,
303
303
  selection: i.startSelection,
@@ -311,7 +311,7 @@ class T {
311
311
  return null;
312
312
  }
313
313
  }
314
- T.empty = /* @__PURE__ */ new T(L, L);
314
+ I.empty = /* @__PURE__ */ new I(D, D);
315
315
  const Ur = [
316
316
  { key: "Mod-z", run: Ut, preventDefault: !0 },
317
317
  { key: "Mod-y", mac: "Mod-Shift-z", run: Je, preventDefault: !0 },
@@ -335,21 +335,21 @@ function Te(t, e) {
335
335
  function Kt(t, e) {
336
336
  return R(t, (r) => r.empty ? t.moveByChar(r, e) : Te(r, e));
337
337
  }
338
- function b(t) {
338
+ function S(t) {
339
339
  return t.textDirectionAt(t.state.selection.main.head) == Qn.LTR;
340
340
  }
341
- const Jt = (t) => Kt(t, !b(t)), _t = (t) => Kt(t, b(t));
341
+ const Jt = (t) => Kt(t, !S(t)), _t = (t) => Kt(t, S(t));
342
342
  function jt(t, e) {
343
343
  return R(t, (r) => r.empty ? t.moveByGroup(r, e) : Te(r, e));
344
344
  }
345
- const $r = (t) => jt(t, !b(t)), Gr = (t) => jt(t, b(t));
345
+ const $r = (t) => jt(t, !S(t)), Gr = (t) => jt(t, S(t));
346
346
  function Kr(t, e, r) {
347
347
  if (e.type.prop(r))
348
348
  return !0;
349
349
  let n = e.to - e.from;
350
350
  return n && (n > 2 || /[^\s,.;:]/.test(t.sliceDoc(e.from, e.to))) || e.firstChild;
351
351
  }
352
- function Oe(t, e, r) {
352
+ function Ie(t, e, r) {
353
353
  let n = et(t).resolveInner(e.head), o = r ? Ge.closedBy : Ge.openedBy;
354
354
  for (let a = e.head; ; ) {
355
355
  let c = r ? n.childAfter(a) : n.childBefore(a);
@@ -358,9 +358,9 @@ function Oe(t, e, r) {
358
358
  Kr(t, c, o) ? n = c : a = r ? c.to : c.from;
359
359
  }
360
360
  let i = n.type.prop(o), s, l;
361
- return i && (s = r ? Z(t, n.from, 1) : Z(t, n.to, -1)) && s.matched ? l = r ? s.end.to : s.end.from : l = r ? n.to : n.from, d.cursor(l, r ? -1 : 1);
361
+ return i && (s = r ? Y(t, n.from, 1) : Y(t, n.to, -1)) && s.matched ? l = r ? s.end.to : s.end.from : l = r ? n.to : n.from, d.cursor(l, r ? -1 : 1);
362
362
  }
363
- const Jr = (t) => R(t, (e) => Oe(t.state, e, !b(t))), _r = (t) => R(t, (e) => Oe(t.state, e, b(t)));
363
+ const Jr = (t) => R(t, (e) => Ie(t.state, e, !S(t))), _r = (t) => R(t, (e) => Ie(t.state, e, S(t)));
364
364
  function Qt(t, e) {
365
365
  return R(t, (r) => {
366
366
  if (!r.empty)
@@ -369,8 +369,8 @@ function Qt(t, e) {
369
369
  return n.head != r.head ? n : t.moveToLineBoundary(r, e);
370
370
  });
371
371
  }
372
- const Yt = (t) => Qt(t, !1), Zt = (t) => Qt(t, !0);
373
- function Xt(t) {
372
+ const Xt = (t) => Qt(t, !1), Yt = (t) => Qt(t, !0);
373
+ function Zt(t) {
374
374
  let e = t.scrollDOM.clientHeight < t.scrollDOM.scrollHeight - 2, r = 0, n = 0, o;
375
375
  if (e) {
376
376
  for (let i of t.state.facet(p.scrollMargins)) {
@@ -388,7 +388,7 @@ function Xt(t) {
388
388
  };
389
389
  }
390
390
  function en(t, e) {
391
- let r = Xt(t), { state: n } = t, o = re(n.selection, (s) => s.empty ? t.moveVertically(s, e, r.height) : Te(s, e));
391
+ let r = Zt(t), { state: n } = t, o = re(n.selection, (s) => s.empty ? t.moveVertically(s, e, r.height) : Te(s, e));
392
392
  if (o.eq(n.selection))
393
393
  return !1;
394
394
  let i;
@@ -399,7 +399,7 @@ function en(t, e) {
399
399
  return t.dispatch(O(n, o), { effects: i }), !0;
400
400
  }
401
401
  const ht = (t) => en(t, !1), _e = (t) => en(t, !0);
402
- function N(t, e, r) {
402
+ function q(t, e, r) {
403
403
  let n = t.lineBlockAt(e.head), o = t.moveToLineBoundary(e, r);
404
404
  if (o.head == e.head && o.head != (r ? n.to : n.from) && (o = t.moveToLineBoundary(e, r, !1)), !r && o.head == n.from && n.length) {
405
405
  let i = /^\s*/.exec(t.state.sliceDoc(n.from, Math.min(n.from + 100, n.to)))[0].length;
@@ -407,10 +407,10 @@ function N(t, e, r) {
407
407
  }
408
408
  return o;
409
409
  }
410
- const jr = (t) => R(t, (e) => N(t, e, !0)), Qr = (t) => R(t, (e) => N(t, e, !1)), Yr = (t) => R(t, (e) => N(t, e, !b(t))), Zr = (t) => R(t, (e) => N(t, e, b(t))), Xr = (t) => R(t, (e) => d.cursor(t.lineBlockAt(e.head).from, 1)), eo = (t) => R(t, (e) => d.cursor(t.lineBlockAt(e.head).to, -1));
410
+ const jr = (t) => R(t, (e) => q(t, e, !0)), Qr = (t) => R(t, (e) => q(t, e, !1)), Xr = (t) => R(t, (e) => q(t, e, !S(t))), Yr = (t) => R(t, (e) => q(t, e, S(t))), Zr = (t) => R(t, (e) => d.cursor(t.lineBlockAt(e.head).from, 1)), eo = (t) => R(t, (e) => d.cursor(t.lineBlockAt(e.head).to, -1));
411
411
  function to(t, e, r) {
412
412
  let n = !1, o = re(t.selection, (i) => {
413
- let s = Z(t, i.head, -1) || Z(t, i.head, 1) || i.head > 0 && Z(t, i.head - 1, 1) || i.head < t.doc.length && Z(t, i.head + 1, -1);
413
+ let s = Y(t, i.head, -1) || Y(t, i.head, 1) || i.head > 0 && Y(t, i.head - 1, 1) || i.head < t.doc.length && Y(t, i.head + 1, -1);
414
414
  if (!s || !s.end)
415
415
  return i;
416
416
  n = !0;
@@ -430,19 +430,19 @@ function B(t, e) {
430
430
  function tn(t, e) {
431
431
  return B(t, (r) => t.moveByChar(r, e));
432
432
  }
433
- const nn = (t) => tn(t, !b(t)), rn = (t) => tn(t, b(t));
433
+ const nn = (t) => tn(t, !S(t)), rn = (t) => tn(t, S(t));
434
434
  function on(t, e) {
435
435
  return B(t, (r) => t.moveByGroup(r, e));
436
436
  }
437
- const ro = (t) => on(t, !b(t)), oo = (t) => on(t, b(t)), io = (t) => B(t, (e) => Oe(t.state, e, !b(t))), so = (t) => B(t, (e) => Oe(t.state, e, b(t)));
437
+ const ro = (t) => on(t, !S(t)), oo = (t) => on(t, S(t)), io = (t) => B(t, (e) => Ie(t.state, e, !S(t))), so = (t) => B(t, (e) => Ie(t.state, e, S(t)));
438
438
  function sn(t, e) {
439
439
  return B(t, (r) => t.moveVertically(r, e));
440
440
  }
441
441
  const ln = (t) => sn(t, !1), an = (t) => sn(t, !0);
442
442
  function cn(t, e) {
443
- return B(t, (r) => t.moveVertically(r, e, Xt(t).height));
443
+ return B(t, (r) => t.moveVertically(r, e, Zt(t).height));
444
444
  }
445
- const ut = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => B(t, (e) => N(t, e, !0)), ao = (t) => B(t, (e) => N(t, e, !1)), co = (t) => B(t, (e) => N(t, e, !b(t))), ho = (t) => B(t, (e) => N(t, e, b(t))), uo = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).from)), fo = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).to)), dt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: 0 })), !0), mt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: t.doc.length })), !0), gt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: t.selection.main.anchor, head: 0 })), !0), pt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), mo = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), go = ({ state: t, dispatch: e }) => {
445
+ const ut = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => B(t, (e) => q(t, e, !0)), ao = (t) => B(t, (e) => q(t, e, !1)), co = (t) => B(t, (e) => q(t, e, !S(t))), ho = (t) => B(t, (e) => q(t, e, S(t))), uo = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).from)), fo = (t) => B(t, (e) => d.cursor(t.lineBlockAt(e.head).to)), dt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: 0 })), !0), mt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: t.doc.length })), !0), gt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: t.selection.main.anchor, head: 0 })), !0), pt = ({ state: t, dispatch: e }) => (e(O(t, { anchor: t.selection.main.anchor, head: t.doc.length })), !0), mo = ({ state: t, dispatch: e }) => (e(t.update({ selection: { anchor: 0, head: t.doc.length }, userEvent: "select" })), !0), go = ({ state: t, dispatch: e }) => {
446
446
  let r = Pe(t).map(({ from: n, to: o }) => d.range(n, Math.min(o + 1, t.doc.length)));
447
447
  return e(t.update({ selection: d.create(r), userEvent: "select" })), !0;
448
448
  }, po = ({ state: t, dispatch: e }) => {
@@ -458,7 +458,7 @@ const ut = (t) => cn(t, !1), ft = (t) => cn(t, !0), lo = (t) => B(t, (e) => N(t,
458
458
  let r = t.selection, n = null;
459
459
  return r.ranges.length > 1 ? n = d.create([r.main]) : r.main.empty || (n = d.create([d.cursor(r.main.head)])), n ? (e(O(t, n)), !0) : !1;
460
460
  };
461
- function Ie(t, e) {
461
+ function Oe(t, e) {
462
462
  if (t.state.readOnly)
463
463
  return !1;
464
464
  let r = "delete.selection", { state: n } = t, o = n.changeByRange((i) => {
@@ -484,7 +484,7 @@ function ge(t, e, r) {
484
484
  });
485
485
  return e;
486
486
  }
487
- const hn = (t, e) => Ie(t, (r) => {
487
+ const hn = (t, e) => Oe(t, (r) => {
488
488
  let { state: n } = t, o = n.doc.lineAt(r), i, s;
489
489
  if (!e && r > o.from && r < o.from + 200 && !/[^ \t]/.test(i = o.text.slice(0, r - o.from))) {
490
490
  if (i[i.length - 1] == " ")
@@ -496,7 +496,7 @@ const hn = (t, e) => Ie(t, (r) => {
496
496
  } else
497
497
  s = ee(o.text, r - o.from, e, e) + o.from, s == r && o.number != (e ? n.doc.lines : 1) && (s += e ? 1 : -1);
498
498
  return s;
499
- }), je = (t) => hn(t, !1), un = (t) => hn(t, !0), fn = (t, e) => Ie(t, (r) => {
499
+ }), je = (t) => hn(t, !1), un = (t) => hn(t, !0), fn = (t, e) => Oe(t, (r) => {
500
500
  let n = r, { state: o } = t, i = o.doc.lineAt(n), s = o.charCategorizer(n);
501
501
  for (let l = null; ; ) {
502
502
  if (n == (e ? i.to : i.from)) {
@@ -509,17 +509,17 @@ const hn = (t, e) => Ie(t, (r) => {
509
509
  (c != " " || n != r) && (l = h), n = a;
510
510
  }
511
511
  return n;
512
- }), dn = (t) => fn(t, !1), xo = (t) => fn(t, !0), mn = (t) => Ie(t, (e) => {
512
+ }), dn = (t) => fn(t, !1), xo = (t) => fn(t, !0), mn = (t) => Oe(t, (e) => {
513
513
  let r = t.lineBlockAt(e).to;
514
514
  return e < r ? r : Math.min(t.state.doc.length, e + 1);
515
- }), ko = (t) => Ie(t, (e) => {
515
+ }), ko = (t) => Oe(t, (e) => {
516
516
  let r = t.lineBlockAt(e).from;
517
517
  return e > r ? r : Math.max(0, e - 1);
518
518
  }), bo = ({ state: t, dispatch: e }) => {
519
519
  if (t.readOnly)
520
520
  return !1;
521
521
  let r = t.changeByRange((n) => ({
522
- changes: { from: n.from, to: n.to, insert: It.of(["", ""]) },
522
+ changes: { from: n.from, to: n.to, insert: Ot.of(["", ""]) },
523
523
  range: d.cursor(n.from)
524
524
  }));
525
525
  return e(t.update(r, { scrollIntoView: !0, userEvent: "input" })), !0;
@@ -590,27 +590,27 @@ const Ao = ({ state: t, dispatch: e }) => pn(t, e, !1), Mo = ({ state: t, dispat
590
590
  let { state: e } = t, r = e.changes(Pe(e).map(({ from: o, to: i }) => (o > 0 ? o-- : i < e.doc.length && i++, { from: o, to: i }))), n = re(e.selection, (o) => t.moveVertically(o, !0)).map(r);
591
591
  return t.dispatch({ changes: r, selection: n, scrollIntoView: !0, userEvent: "delete.line" }), !0;
592
592
  };
593
- function Bo(t, e) {
593
+ function Do(t, e) {
594
594
  if (/\(\)|\[\]|\{\}/.test(t.sliceDoc(e - 1, e + 1)))
595
595
  return { from: e, to: e };
596
596
  let r = et(t).resolveInner(e), n = r.childBefore(e), o = r.childAfter(e), i;
597
597
  return n && o && n.to <= e && o.from >= e && (i = n.type.prop(Ge.closedBy)) && i.indexOf(o.name) > -1 && t.doc.lineAt(n.to).from == t.doc.lineAt(o.from).from ? { from: n.to, to: o.from } : null;
598
598
  }
599
- const Do = /* @__PURE__ */ yn(!1), Eo = /* @__PURE__ */ yn(!0);
599
+ const Bo = /* @__PURE__ */ yn(!1), Eo = /* @__PURE__ */ yn(!0);
600
600
  function yn(t) {
601
601
  return ({ state: e, dispatch: r }) => {
602
602
  if (e.readOnly)
603
603
  return !1;
604
604
  let n = e.changeByRange((o) => {
605
- let { from: i, to: s } = o, l = e.doc.lineAt(i), a = !t && i == s && Bo(e, i);
605
+ let { from: i, to: s } = o, l = e.doc.lineAt(i), a = !t && i == s && Do(e, i);
606
606
  t && (i = s = (s <= l.to ? l : e.doc.lineAt(s)).to);
607
- let c = new Tt(e, { simulateBreak: i, simulateDoubleBreak: !!a }), h = Ot(c, i);
607
+ let c = new Tt(e, { simulateBreak: i, simulateDoubleBreak: !!a }), h = It(c, i);
608
608
  for (h == null && (h = /^\s*/.exec(e.doc.lineAt(i).text)[0].length); s < l.to && /\s/.test(l.text[s - l.from]); )
609
609
  s++;
610
610
  a ? { from: i, to: s } = a : i > l.from && i < l.from + 100 && !/\S/.test(l.text.slice(0, i)) && (i = l.from);
611
611
  let u = ["", Se(e, h)];
612
612
  return a && u.push(Se(e, c.lineIndent(l.from, -1))), {
613
- changes: { from: i, to: s, insert: It.of(u) },
613
+ changes: { from: i, to: s, insert: Ot.of(u) },
614
614
  range: d.cursor(i + 1 + u[1].length)
615
615
  };
616
616
  });
@@ -639,7 +639,7 @@ const wo = ({ state: t, dispatch: e }) => {
639
639
  let s = r[i];
640
640
  return s ?? -1;
641
641
  } }), o = ot(t, (i, s, l) => {
642
- let a = Ot(n, i.from);
642
+ let a = It(n, i.from);
643
643
  if (a == null)
644
644
  return;
645
645
  /\S/.test(i.text) || (a = 0);
@@ -660,9 +660,9 @@ const wo = ({ state: t, dispatch: e }) => {
660
660
  }), { userEvent: "delete.dedent" })), !0), Ro = [
661
661
  { key: "Ctrl-b", run: Jt, shift: nn, preventDefault: !0 },
662
662
  { key: "Ctrl-f", run: _t, shift: rn },
663
- { key: "Ctrl-p", run: Yt, shift: ln },
664
- { key: "Ctrl-n", run: Zt, shift: an },
665
- { key: "Ctrl-a", run: Xr, shift: uo },
663
+ { key: "Ctrl-p", run: Xt, shift: ln },
664
+ { key: "Ctrl-n", run: Yt, shift: an },
665
+ { key: "Ctrl-a", run: Zr, shift: uo },
666
666
  { key: "Ctrl-e", run: eo, shift: fo },
667
667
  { key: "Ctrl-d", run: un },
668
668
  { key: "Ctrl-h", run: je },
@@ -674,14 +674,14 @@ const wo = ({ state: t, dispatch: e }) => {
674
674
  ], To = /* @__PURE__ */ [
675
675
  { key: "ArrowLeft", run: Jt, shift: nn, preventDefault: !0 },
676
676
  { key: "Mod-ArrowLeft", mac: "Alt-ArrowLeft", run: $r, shift: ro, preventDefault: !0 },
677
- { mac: "Cmd-ArrowLeft", run: Yr, shift: co, preventDefault: !0 },
677
+ { mac: "Cmd-ArrowLeft", run: Xr, shift: co, preventDefault: !0 },
678
678
  { key: "ArrowRight", run: _t, shift: rn, preventDefault: !0 },
679
679
  { key: "Mod-ArrowRight", mac: "Alt-ArrowRight", run: Gr, shift: oo, preventDefault: !0 },
680
- { mac: "Cmd-ArrowRight", run: Zr, shift: ho, preventDefault: !0 },
681
- { key: "ArrowUp", run: Yt, shift: ln, preventDefault: !0 },
680
+ { mac: "Cmd-ArrowRight", run: Yr, shift: ho, preventDefault: !0 },
681
+ { key: "ArrowUp", run: Xt, shift: ln, preventDefault: !0 },
682
682
  { mac: "Cmd-ArrowUp", run: dt, shift: gt },
683
683
  { mac: "Ctrl-ArrowUp", run: ht, shift: ut },
684
- { key: "ArrowDown", run: Zt, shift: an, preventDefault: !0 },
684
+ { key: "ArrowDown", run: Yt, shift: an, preventDefault: !0 },
685
685
  { mac: "Cmd-ArrowDown", run: mt, shift: pt },
686
686
  { mac: "Ctrl-ArrowDown", run: _e, shift: ft },
687
687
  { key: "PageUp", run: ht, shift: ut },
@@ -690,7 +690,7 @@ const wo = ({ state: t, dispatch: e }) => {
690
690
  { key: "Mod-Home", run: dt, shift: gt },
691
691
  { key: "End", run: jr, shift: lo, preventDefault: !0 },
692
692
  { key: "Mod-End", run: mt, shift: pt },
693
- { key: "Enter", run: Do },
693
+ { key: "Enter", run: Bo },
694
694
  { key: "Mod-a", run: mo },
695
695
  { key: "Backspace", run: je, shift: je },
696
696
  { key: "Delete", run: un },
@@ -698,7 +698,7 @@ const wo = ({ state: t, dispatch: e }) => {
698
698
  { key: "Mod-Delete", mac: "Alt-Delete", run: xo },
699
699
  { mac: "Mod-Backspace", run: ko },
700
700
  { mac: "Mod-Delete", run: mn }
701
- ].concat(/* @__PURE__ */ Ro.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), Oo = /* @__PURE__ */ [
701
+ ].concat(/* @__PURE__ */ Ro.map((t) => ({ mac: t.key, run: t.run, shift: t.shift }))), Io = /* @__PURE__ */ [
702
702
  { key: "Alt-ArrowLeft", mac: "Ctrl-ArrowLeft", run: Jr, shift: io },
703
703
  { key: "Alt-ArrowRight", mac: "Ctrl-ArrowRight", run: _r, shift: so },
704
704
  { key: "Alt-ArrowUp", run: Co },
@@ -716,7 +716,7 @@ const wo = ({ state: t, dispatch: e }) => {
716
716
  { key: "Shift-Mod-\\", run: no },
717
717
  { key: "Mod-/", run: Ar },
718
718
  { key: "Alt-A", run: Lr }
719
- ].concat(To), Io = { key: "Tab", run: xn, shift: kn };
719
+ ].concat(To), Oo = { key: "Tab", run: xn, shift: kn };
720
720
  function g() {
721
721
  var t = arguments[0];
722
722
  typeof t == "string" && (t = document.createElement(t));
@@ -769,7 +769,7 @@ class te {
769
769
  return -1;
770
770
  this.bufferPos = 0, this.buffer = this.iter.value;
771
771
  }
772
- return Yn(this.buffer, this.bufferPos);
772
+ return Xn(this.buffer, this.bufferPos);
773
773
  }
774
774
  /**
775
775
  Look for the next match. Updates the iterator's
@@ -793,7 +793,7 @@ class te {
793
793
  if (e < 0)
794
794
  return this.done = !0, this;
795
795
  let r = er(e), n = this.bufferStart + this.bufferPos;
796
- this.bufferPos += Zn(e);
796
+ this.bufferPos += Yn(e);
797
797
  let o = this.normalize(r);
798
798
  for (let i = 0, s = n; ; i++) {
799
799
  let l = o.charCodeAt(i), a = this.match(l, s);
@@ -858,7 +858,7 @@ class Cn {
858
858
  }
859
859
  }
860
860
  const Ve = /* @__PURE__ */ new WeakMap();
861
- class X {
861
+ class Z {
862
862
  constructor(e, r) {
863
863
  this.from = e, this.text = r;
864
864
  }
@@ -868,18 +868,18 @@ class X {
868
868
  static get(e, r, n) {
869
869
  let o = Ve.get(e);
870
870
  if (!o || o.from >= n || o.to <= r) {
871
- let l = new X(r, e.sliceString(r, n));
871
+ let l = new Z(r, e.sliceString(r, n));
872
872
  return Ve.set(e, l), l;
873
873
  }
874
874
  if (o.from == r && o.to == n)
875
875
  return o;
876
876
  let { text: i, from: s } = o;
877
- return s > r && (i = e.sliceString(r, s) + i, s = r), o.to < n && (i += e.sliceString(o.to, n)), Ve.set(e, new X(s, i)), new X(r, i.slice(r - s, n - s));
877
+ return s > r && (i = e.sliceString(r, s) + i, s = r), o.to < n && (i += e.sliceString(o.to, n)), Ve.set(e, new Z(s, i)), new Z(r, i.slice(r - s, n - s));
878
878
  }
879
879
  }
880
880
  class vn {
881
881
  constructor(e, r, n, o, i) {
882
- this.text = e, this.to = i, this.done = !1, this.value = Sn, this.matchPos = ve(e, o), this.re = new RegExp(r, it + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = X.get(e, o, this.chunkEnd(
882
+ this.text = e, this.to = i, this.done = !1, this.value = Sn, this.matchPos = ve(e, o), this.re = new RegExp(r, it + (n != null && n.ignoreCase ? "i" : "")), this.test = n == null ? void 0 : n.test, this.flat = Z.get(e, o, this.chunkEnd(
883
883
  o + 5e3
884
884
  /* Base */
885
885
  ));
@@ -897,7 +897,7 @@ class vn {
897
897
  }
898
898
  if (this.flat.to == this.to)
899
899
  return this.done = !0, this;
900
- this.flat = X.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
900
+ this.flat = Z.get(this.text, this.flat.from, this.chunkEnd(this.flat.from + this.flat.text.length * 2));
901
901
  }
902
902
  }
903
903
  }
@@ -935,14 +935,14 @@ function Qe(t) {
935
935
  return;
936
936
  let { state: i } = t, s = i.doc.lineAt(i.selection.main.head), [, l, a, c, h] = o, u = c ? +c.slice(1) : 0, m = a ? +a : s.number;
937
937
  if (a && h) {
938
- let D = m / 100;
939
- l && (D = D * (l == "-" ? -1 : 1) + s.number / i.doc.lines), m = Math.round(i.doc.lines * D);
938
+ let T = m / 100;
939
+ l && (T = T * (l == "-" ? -1 : 1) + s.number / i.doc.lines), m = Math.round(i.doc.lines * T);
940
940
  } else
941
941
  a && l && (m = m * (l == "-" ? -1 : 1) + s.number);
942
- let x = i.doc.line(Math.max(1, Math.min(i.doc.lines, m))), S = d.cursor(x.from + Math.max(0, Math.min(u, x.length)));
942
+ let x = i.doc.line(Math.max(1, Math.min(i.doc.lines, m))), b = d.cursor(x.from + Math.max(0, Math.min(u, x.length)));
943
943
  t.dispatch({
944
- effects: [Ae.of(!1), p.scrollIntoView(S.from, { y: "center" })],
945
- selection: S
944
+ effects: [Ae.of(!1), p.scrollIntoView(b.from, { y: "center" })],
945
+ selection: b
946
946
  }), t.focus();
947
947
  }
948
948
  return { dom: r };
@@ -958,10 +958,10 @@ const Ae = /* @__PURE__ */ w.define(), xt = /* @__PURE__ */ we.define({
958
958
  },
959
959
  provide: (t) => tt.from(t, (e) => e ? Qe : null)
960
960
  }), Wo = (t) => {
961
- let e = ae(t, Qe);
961
+ let e = ce(t, Qe);
962
962
  if (!e) {
963
963
  let r = [Ae.of(!0)];
964
- t.state.field(xt, !1) == null && r.push(w.appendConfig.of([xt, Fo])), t.dispatch({ effects: r }), e = ae(t, Qe);
964
+ t.state.field(xt, !1) == null && r.push(w.appendConfig.of([xt, Fo])), t.dispatch({ effects: r }), e = ce(t, Qe);
965
965
  }
966
966
  return e && e.dom.querySelector("input").focus(), !0;
967
967
  }, Fo = /* @__PURE__ */ p.baseTheme({
@@ -974,7 +974,7 @@ const Ae = /* @__PURE__ */ w.define(), xt = /* @__PURE__ */ we.define({
974
974
  minSelectionLength: 1,
975
975
  maxMatches: 100,
976
976
  wholeWords: !1
977
- }, An = /* @__PURE__ */ ue.define({
977
+ }, An = /* @__PURE__ */ fe.define({
978
978
  combine(t) {
979
979
  return Ee(t, No, {
980
980
  highlightWordAroundCursor: (e, r) => e || r,
@@ -989,10 +989,10 @@ function qo(t) {
989
989
  }
990
990
  const Ho = /* @__PURE__ */ y.mark({ class: "cm-selectionMatch" }), Vo = /* @__PURE__ */ y.mark({ class: "cm-selectionMatch cm-selectionMatch-main" });
991
991
  function kt(t, e, r, n) {
992
- return (r == 0 || t(e.sliceDoc(r - 1, r)) != M.Word) && (n == e.doc.length || t(e.sliceDoc(n, n + 1)) != M.Word);
992
+ return (r == 0 || t(e.sliceDoc(r - 1, r)) != L.Word) && (n == e.doc.length || t(e.sliceDoc(n, n + 1)) != L.Word);
993
993
  }
994
994
  function zo(t, e, r, n) {
995
- return t(e.sliceDoc(r, r + 1)) == M.Word && t(e.sliceDoc(n - 1, n)) == M.Word;
995
+ return t(e.sliceDoc(r, r + 1)) == L.Word && t(e.sliceDoc(n - 1, n)) == L.Word;
996
996
  }
997
997
  const Uo = /* @__PURE__ */ Ft.fromClass(class {
998
998
  constructor(t) {
@@ -1073,7 +1073,7 @@ const Jo = ({ state: t, dispatch: e }) => {
1073
1073
  selection: t.selection.addRange(d.range(o.from, o.to), !1),
1074
1074
  effects: p.scrollIntoView(o.to)
1075
1075
  })), !0) : !1;
1076
- }, oe = /* @__PURE__ */ ue.define({
1076
+ }, oe = /* @__PURE__ */ fe.define({
1077
1077
  combine(t) {
1078
1078
  return Ee(t, {
1079
1079
  top: !1,
@@ -1110,15 +1110,15 @@ class Mn {
1110
1110
  @internal
1111
1111
  */
1112
1112
  create() {
1113
- return this.regexp ? new Yo(this) : new jo(this);
1113
+ return this.regexp ? new Xo(this) : new jo(this);
1114
1114
  }
1115
1115
  /**
1116
1116
  Get a search cursor for this query, searching through the given
1117
1117
  range in the given state.
1118
1118
  */
1119
1119
  getCursor(e, r = 0, n) {
1120
- let o = e.doc ? e : ce.create({ doc: e });
1121
- return n == null && (n = o.doc.length), this.regexp ? Y(this, o, r, n) : Q(this, o, r, n);
1120
+ let o = e.doc ? e : he.create({ doc: e });
1121
+ return n == null && (n = o.doc.length), this.regexp ? X(this, o, r, n) : Q(this, o, r, n);
1122
1122
  }
1123
1123
  }
1124
1124
  class Ln {
@@ -1130,7 +1130,7 @@ function Q(t, e, r, n) {
1130
1130
  return new te(e.doc, t.unquoted, r, n, t.caseSensitive ? void 0 : (o) => o.toLowerCase(), t.wholeWord ? _o(e.doc, e.charCategorizer(e.selection.main.head)) : void 0);
1131
1131
  }
1132
1132
  function _o(t, e) {
1133
- return (r, n, o, i) => ((i > r || i + o.length < n) && (i = Math.max(0, r - 2), o = t.sliceString(i, Math.min(t.length, n + 2))), (e(Me(o, r - i)) != M.Word || e(Le(o, r - i)) != M.Word) && (e(Le(o, n - i)) != M.Word || e(Me(o, n - i)) != M.Word));
1133
+ return (r, n, o, i) => ((i > r || i + o.length < n) && (i = Math.max(0, r - 2), o = t.sliceString(i, Math.min(t.length, n + 2))), (e(Me(o, r - i)) != L.Word || e(Le(o, r - i)) != L.Word) && (e(Le(o, n - i)) != L.Word || e(Me(o, n - i)) != L.Word));
1134
1134
  }
1135
1135
  class jo extends Ln {
1136
1136
  constructor(e) {
@@ -1175,7 +1175,7 @@ class jo extends Ln {
1175
1175
  o(i.value.from, i.value.to);
1176
1176
  }
1177
1177
  }
1178
- function Y(t, e, r, n) {
1178
+ function X(t, e, r, n) {
1179
1179
  return new Cn(e.doc, t.search, {
1180
1180
  ignoreCase: !t.caseSensitive,
1181
1181
  test: t.wholeWord ? Qo(e.charCategorizer(e.selection.main.head)) : void 0
@@ -1188,12 +1188,12 @@ function Le(t, e) {
1188
1188
  return t.slice(e, ee(t, e));
1189
1189
  }
1190
1190
  function Qo(t) {
1191
- return (e, r, n) => !n[0].length || (t(Me(n.input, n.index)) != M.Word || t(Le(n.input, n.index)) != M.Word) && (t(Le(n.input, n.index + n[0].length)) != M.Word || t(Me(n.input, n.index + n[0].length)) != M.Word);
1191
+ return (e, r, n) => !n[0].length || (t(Me(n.input, n.index)) != L.Word || t(Le(n.input, n.index)) != L.Word) && (t(Le(n.input, n.index + n[0].length)) != L.Word || t(Me(n.input, n.index + n[0].length)) != L.Word);
1192
1192
  }
1193
- class Yo extends Ln {
1193
+ class Xo extends Ln {
1194
1194
  nextMatch(e, r, n) {
1195
- let o = Y(this.spec, e, n, e.doc.length).next();
1196
- return o.done && (o = Y(this.spec, e, 0, r).next()), o.done ? null : o.value;
1195
+ let o = X(this.spec, e, n, e.doc.length).next();
1196
+ return o.done && (o = X(this.spec, e, 0, r).next()), o.done ? null : o.value;
1197
1197
  }
1198
1198
  prevMatchInRange(e, r, n) {
1199
1199
  for (let o = 1; ; o++) {
@@ -1201,7 +1201,7 @@ class Yo extends Ln {
1201
1201
  r,
1202
1202
  n - o * 1e4
1203
1203
  /* ChunkSize */
1204
- ), s = Y(this.spec, e, i, n), l = null;
1204
+ ), s = X(this.spec, e, i, n), l = null;
1205
1205
  for (; !s.next().done; )
1206
1206
  l = s.value;
1207
1207
  if (l && (i == r || l.from > i + 10))
@@ -1217,7 +1217,7 @@ class Yo extends Ln {
1217
1217
  return this.spec.unquote(this.spec.replace.replace(/\$([$&\d+])/g, (r, n) => n == "$" ? "$" : n == "&" ? e.match[0] : n != "0" && +n < e.match.length ? e.match[n] : r));
1218
1218
  }
1219
1219
  matchAll(e, r) {
1220
- let n = Y(this.spec, e, 0, e.doc.length), o = [];
1220
+ let n = X(this.spec, e, 0, e.doc.length), o = [];
1221
1221
  for (; !n.next().done; ) {
1222
1222
  if (o.length >= r)
1223
1223
  return null;
@@ -1226,7 +1226,7 @@ class Yo extends Ln {
1226
1226
  return o;
1227
1227
  }
1228
1228
  highlight(e, r, n, o) {
1229
- let i = Y(this.spec, e, Math.max(
1229
+ let i = X(this.spec, e, Math.max(
1230
1230
  0,
1231
1231
  r - 250
1232
1232
  /* HighlightMargin */
@@ -1235,13 +1235,13 @@ class Yo extends Ln {
1235
1235
  o(i.value.from, i.value.to);
1236
1236
  }
1237
1237
  }
1238
- const he = /* @__PURE__ */ w.define(), st = /* @__PURE__ */ w.define(), F = /* @__PURE__ */ we.define({
1238
+ const ue = /* @__PURE__ */ w.define(), st = /* @__PURE__ */ w.define(), N = /* @__PURE__ */ we.define({
1239
1239
  create(t) {
1240
- return new ze(Ye(t).create(), null);
1240
+ return new ze(Xe(t).create(), null);
1241
1241
  },
1242
1242
  update(t, e) {
1243
1243
  for (let r of e.effects)
1244
- r.is(he) ? t = new ze(r.value.create(), t.panel) : r.is(st) && (t = new ze(t.query, r.value ? lt : null));
1244
+ r.is(ue) ? t = new ze(r.value.create(), t.panel) : r.is(st) && (t = new ze(t.query, r.value ? lt : null));
1245
1245
  return t;
1246
1246
  },
1247
1247
  provide: (t) => tt.from(t, (e) => e.panel)
@@ -1251,13 +1251,13 @@ class ze {
1251
1251
  this.query = e, this.panel = r;
1252
1252
  }
1253
1253
  }
1254
- const Zo = /* @__PURE__ */ y.mark({ class: "cm-searchMatch" }), Xo = /* @__PURE__ */ y.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), ei = /* @__PURE__ */ Ft.fromClass(class {
1254
+ const Yo = /* @__PURE__ */ y.mark({ class: "cm-searchMatch" }), Zo = /* @__PURE__ */ y.mark({ class: "cm-searchMatch cm-searchMatch-selected" }), ei = /* @__PURE__ */ Ft.fromClass(class {
1255
1255
  constructor(t) {
1256
- this.view = t, this.decorations = this.highlight(t.state.field(F));
1256
+ this.view = t, this.decorations = this.highlight(t.state.field(N));
1257
1257
  }
1258
1258
  update(t) {
1259
- let e = t.state.field(F);
1260
- (e != t.startState.field(F) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
1259
+ let e = t.state.field(N);
1260
+ (e != t.startState.field(N) || t.docChanged || t.selectionSet || t.viewportChanged) && (this.decorations = this.highlight(e));
1261
1261
  }
1262
1262
  highlight({ query: t, panel: e }) {
1263
1263
  if (!e || !t.spec.valid)
@@ -1269,7 +1269,7 @@ const Zo = /* @__PURE__ */ y.mark({ class: "cm-searchMatch" }), Xo = /* @__PURE_
1269
1269
  a = i[++o].to;
1270
1270
  t.highlight(r.state, l, a, (c, h) => {
1271
1271
  let u = r.state.selection.ranges.some((m) => m.from == c && m.to == h);
1272
- n.add(c, h, u ? Xo : Zo);
1272
+ n.add(c, h, u ? Zo : Yo);
1273
1273
  });
1274
1274
  }
1275
1275
  return n.finish();
@@ -1277,13 +1277,13 @@ const Zo = /* @__PURE__ */ y.mark({ class: "cm-searchMatch" }), Xo = /* @__PURE_
1277
1277
  }, {
1278
1278
  decorations: (t) => t.decorations
1279
1279
  });
1280
- function fe(t) {
1280
+ function de(t) {
1281
1281
  return (e) => {
1282
- let r = e.state.field(F, !1);
1282
+ let r = e.state.field(N, !1);
1283
1283
  return r && r.query.spec.valid ? t(e, r) : En(e);
1284
1284
  };
1285
1285
  }
1286
- const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1286
+ const De = /* @__PURE__ */ de((t, { query: e }) => {
1287
1287
  let { to: r } = t.state.selection.main, n = e.nextMatch(t.state, r, r);
1288
1288
  if (!n)
1289
1289
  return !1;
@@ -1292,8 +1292,8 @@ const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1292
1292
  selection: o,
1293
1293
  effects: [at(t, n), i.scrollToMatch(o.main, t)],
1294
1294
  userEvent: "select.search"
1295
- }), Dn(t), !0;
1296
- }), De = /* @__PURE__ */ fe((t, { query: e }) => {
1295
+ }), Bn(t), !0;
1296
+ }), Be = /* @__PURE__ */ de((t, { query: e }) => {
1297
1297
  let { state: r } = t, { from: n } = r.selection.main, o = e.prevMatch(r, n, n);
1298
1298
  if (!o)
1299
1299
  return !1;
@@ -1302,8 +1302,8 @@ const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1302
1302
  selection: i,
1303
1303
  effects: [at(t, o), s.scrollToMatch(i.main, t)],
1304
1304
  userEvent: "select.search"
1305
- }), Dn(t), !0;
1306
- }), ti = /* @__PURE__ */ fe((t, { query: e }) => {
1305
+ }), Bn(t), !0;
1306
+ }), ti = /* @__PURE__ */ de((t, { query: e }) => {
1307
1307
  let r = e.matchAll(t.state, 1e3);
1308
1308
  return !r || !r.length ? !1 : (t.dispatch({
1309
1309
  selection: d.create(r.map((n) => d.range(n.from, n.to))),
@@ -1323,7 +1323,7 @@ const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1323
1323
  selection: d.create(i, s),
1324
1324
  userEvent: "select.search.matches"
1325
1325
  })), !0;
1326
- }, bt = /* @__PURE__ */ fe((t, { query: e }) => {
1326
+ }, bt = /* @__PURE__ */ de((t, { query: e }) => {
1327
1327
  let { state: r } = t, { from: n, to: o } = r.selection.main;
1328
1328
  if (r.readOnly)
1329
1329
  return !1;
@@ -1341,7 +1341,7 @@ const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1341
1341
  effects: c,
1342
1342
  userEvent: "input.replace"
1343
1343
  }), !0;
1344
- }), ri = /* @__PURE__ */ fe((t, { query: e }) => {
1344
+ }), ri = /* @__PURE__ */ de((t, { query: e }) => {
1345
1345
  if (t.state.readOnly)
1346
1346
  return !1;
1347
1347
  let r = e.matchAll(t.state, 1e9).map((o) => {
@@ -1360,7 +1360,7 @@ const Be = /* @__PURE__ */ fe((t, { query: e }) => {
1360
1360
  function lt(t) {
1361
1361
  return t.state.facet(oe).createPanel(t);
1362
1362
  }
1363
- function Ye(t, e) {
1363
+ function Xe(t, e) {
1364
1364
  var r, n, o, i, s;
1365
1365
  let l = t.selection.main, a = l.empty || l.to > l.from + 100 ? "" : t.sliceDoc(l.from, l.to);
1366
1366
  if (e && !a)
@@ -1374,38 +1374,38 @@ function Ye(t, e) {
1374
1374
  wholeWord: (s = e == null ? void 0 : e.wholeWord) !== null && s !== void 0 ? s : c.wholeWord
1375
1375
  });
1376
1376
  }
1377
- function Bn(t) {
1378
- let e = ae(t, lt);
1377
+ function Dn(t) {
1378
+ let e = ce(t, lt);
1379
1379
  return e && e.dom.querySelector("[main-field]");
1380
1380
  }
1381
- function Dn(t) {
1382
- let e = Bn(t);
1381
+ function Bn(t) {
1382
+ let e = Dn(t);
1383
1383
  e && e == t.root.activeElement && e.select();
1384
1384
  }
1385
1385
  const En = (t) => {
1386
- let e = t.state.field(F, !1);
1386
+ let e = t.state.field(N, !1);
1387
1387
  if (e && e.panel) {
1388
- let r = Bn(t);
1388
+ let r = Dn(t);
1389
1389
  if (r && r != t.root.activeElement) {
1390
- let n = Ye(t.state, e.query.spec);
1391
- n.valid && t.dispatch({ effects: he.of(n) }), r.focus(), r.select();
1390
+ let n = Xe(t.state, e.query.spec);
1391
+ n.valid && t.dispatch({ effects: ue.of(n) }), r.focus(), r.select();
1392
1392
  }
1393
1393
  } else
1394
1394
  t.dispatch({ effects: [
1395
1395
  st.of(!0),
1396
- e ? he.of(Ye(t.state, e.query.spec)) : w.appendConfig.of(li)
1396
+ e ? ue.of(Xe(t.state, e.query.spec)) : w.appendConfig.of(li)
1397
1397
  ] });
1398
1398
  return !0;
1399
1399
  }, wn = (t) => {
1400
- let e = t.state.field(F, !1);
1400
+ let e = t.state.field(N, !1);
1401
1401
  if (!e || !e.panel)
1402
1402
  return !1;
1403
- let r = ae(t, lt);
1403
+ let r = ce(t, lt);
1404
1404
  return r && r.dom.contains(t.root.activeElement) && t.focus(), t.dispatch({ effects: st.of(!1) }), !0;
1405
1405
  }, oi = [
1406
1406
  { key: "Mod-f", run: En, scope: "editor search-panel" },
1407
- { key: "F3", run: Be, shift: De, scope: "editor search-panel", preventDefault: !0 },
1408
- { key: "Mod-g", run: Be, shift: De, scope: "editor search-panel", preventDefault: !0 },
1407
+ { key: "F3", run: De, shift: Be, scope: "editor search-panel", preventDefault: !0 },
1408
+ { key: "Mod-g", run: De, shift: Be, scope: "editor search-panel", preventDefault: !0 },
1409
1409
  { key: "Escape", run: wn, scope: "editor search-panel" },
1410
1410
  { key: "Mod-Shift-l", run: ni },
1411
1411
  { key: "Alt-g", run: Wo },
@@ -1414,11 +1414,11 @@ const En = (t) => {
1414
1414
  class ii {
1415
1415
  constructor(e) {
1416
1416
  this.view = e;
1417
- let r = this.query = e.state.field(F).query.spec;
1417
+ let r = this.query = e.state.field(N).query.spec;
1418
1418
  this.commit = this.commit.bind(this), this.searchField = g("input", {
1419
1419
  value: r.search,
1420
- placeholder: v(e, "Find"),
1421
- "aria-label": v(e, "Find"),
1420
+ placeholder: A(e, "Find"),
1421
+ "aria-label": A(e, "Find"),
1422
1422
  class: "cm-textfield",
1423
1423
  name: "search",
1424
1424
  form: "",
@@ -1427,8 +1427,8 @@ class ii {
1427
1427
  onkeyup: this.commit
1428
1428
  }), this.replaceField = g("input", {
1429
1429
  value: r.replace,
1430
- placeholder: v(e, "Replace"),
1431
- "aria-label": v(e, "Replace"),
1430
+ placeholder: A(e, "Replace"),
1431
+ "aria-label": A(e, "Replace"),
1432
1432
  class: "cm-textfield",
1433
1433
  name: "replace",
1434
1434
  form: "",
@@ -1458,22 +1458,22 @@ class ii {
1458
1458
  }
1459
1459
  this.dom = g("div", { onkeydown: (o) => this.keydown(o), class: "cm-search" }, [
1460
1460
  this.searchField,
1461
- n("next", () => Be(e), [v(e, "next")]),
1462
- n("prev", () => De(e), [v(e, "previous")]),
1463
- n("select", () => ti(e), [v(e, "all")]),
1464
- g("label", null, [this.caseField, v(e, "match case")]),
1465
- g("label", null, [this.reField, v(e, "regexp")]),
1466
- g("label", null, [this.wordField, v(e, "by word")]),
1461
+ n("next", () => De(e), [A(e, "next")]),
1462
+ n("prev", () => Be(e), [A(e, "previous")]),
1463
+ n("select", () => ti(e), [A(e, "all")]),
1464
+ g("label", null, [this.caseField, A(e, "match case")]),
1465
+ g("label", null, [this.reField, A(e, "regexp")]),
1466
+ g("label", null, [this.wordField, A(e, "by word")]),
1467
1467
  ...e.state.readOnly ? [] : [
1468
1468
  g("br"),
1469
1469
  this.replaceField,
1470
- n("replace", () => bt(e), [v(e, "replace")]),
1471
- n("replaceAll", () => ri(e), [v(e, "replace all")])
1470
+ n("replace", () => bt(e), [A(e, "replace")]),
1471
+ n("replaceAll", () => ri(e), [A(e, "replace all")])
1472
1472
  ],
1473
1473
  g("button", {
1474
1474
  name: "close",
1475
1475
  onclick: () => wn(e),
1476
- "aria-label": v(e, "close"),
1476
+ "aria-label": A(e, "close"),
1477
1477
  type: "button"
1478
1478
  }, ["×"])
1479
1479
  ]);
@@ -1486,15 +1486,15 @@ class ii {
1486
1486
  wholeWord: this.wordField.checked,
1487
1487
  replace: this.replaceField.value
1488
1488
  });
1489
- e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: he.of(e) }));
1489
+ e.eq(this.query) || (this.query = e, this.view.dispatch({ effects: ue.of(e) }));
1490
1490
  }
1491
1491
  keydown(e) {
1492
- nr(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? De : Be)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), bt(this.view));
1492
+ nr(this.view, e, "search-panel") ? e.preventDefault() : e.keyCode == 13 && e.target == this.searchField ? (e.preventDefault(), (e.shiftKey ? Be : De)(this.view)) : e.keyCode == 13 && e.target == this.replaceField && (e.preventDefault(), bt(this.view));
1493
1493
  }
1494
1494
  update(e) {
1495
1495
  for (let r of e.transactions)
1496
1496
  for (let n of r.effects)
1497
- n.is(he) && !n.value.eq(this.query) && this.setQuery(n.value);
1497
+ n.is(ue) && !n.value.eq(this.query) && this.setQuery(n.value);
1498
1498
  }
1499
1499
  setQuery(e) {
1500
1500
  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;
@@ -1509,7 +1509,7 @@ class ii {
1509
1509
  return this.view.state.facet(oe).top;
1510
1510
  }
1511
1511
  }
1512
- function v(t, e) {
1512
+ function A(t, e) {
1513
1513
  return t.state.phrase(e);
1514
1514
  }
1515
1515
  const pe = 30, ye = /[\s\.,:;?!]/;
@@ -1561,8 +1561,8 @@ const si = /* @__PURE__ */ p.baseTheme({
1561
1561
  "&light .cm-searchMatch-selected": { backgroundColor: "#ff6a0054" },
1562
1562
  "&dark .cm-searchMatch-selected": { backgroundColor: "#ff00ff8a" }
1563
1563
  }), li = [
1564
- F,
1565
- /* @__PURE__ */ Xn.lowest(ei),
1564
+ N,
1565
+ /* @__PURE__ */ Zn.lowest(ei),
1566
1566
  si
1567
1567
  ];
1568
1568
  class ai {
@@ -1570,12 +1570,12 @@ class ai {
1570
1570
  this.from = e, this.to = r, this.diagnostic = n;
1571
1571
  }
1572
1572
  }
1573
- class V {
1573
+ class U {
1574
1574
  constructor(e, r, n) {
1575
1575
  this.diagnostics = e, this.panel = r, this.selected = n;
1576
1576
  }
1577
1577
  static init(e, r, n) {
1578
- let o = e, i = n.facet(On).markerFilter;
1578
+ let o = e, i = n.facet(In).markerFilter;
1579
1579
  i && (o = i(o));
1580
1580
  let s = y.set(o.map((l) => l.from == l.to || l.from == l.to - 1 && n.doc.lineAt(l.from).to == l.from ? y.widget({
1581
1581
  widget: new yi(l),
@@ -1584,7 +1584,7 @@ class V {
1584
1584
  attributes: { class: "cm-lintRange cm-lintRange-" + l.severity + (l.markClass ? " " + l.markClass : "") },
1585
1585
  diagnostic: l
1586
1586
  }).range(l.from, l.to)), !0);
1587
- return new V(s, r, ne(s));
1587
+ return new U(s, r, ne(s));
1588
1588
  }
1589
1589
  }
1590
1590
  function ne(t, e = null, r = 0) {
@@ -1599,11 +1599,11 @@ function ci(t, e) {
1599
1599
  return !!(t.effects.some((n) => n.is(Rn)) || t.changes.touchesRange(r.from, r.to));
1600
1600
  }
1601
1601
  function hi(t, e) {
1602
- return t.field(A, !1) ? e : e.concat(w.appendConfig.of(bi));
1602
+ return t.field(M, !1) ? e : e.concat(w.appendConfig.of(bi));
1603
1603
  }
1604
- const Rn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /* @__PURE__ */ w.define(), A = /* @__PURE__ */ we.define({
1604
+ const Rn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /* @__PURE__ */ w.define(), M = /* @__PURE__ */ we.define({
1605
1605
  create() {
1606
- return new V(y.none, null, null);
1606
+ return new U(y.none, null, null);
1607
1607
  },
1608
1608
  update(t, e) {
1609
1609
  if (e.docChanged) {
@@ -1612,10 +1612,10 @@ const Rn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /*
1612
1612
  let o = e.changes.mapPos(t.selected.from, 1);
1613
1613
  n = ne(r, t.selected.diagnostic, o) || ne(r, null, o);
1614
1614
  }
1615
- t = new V(r, t.panel, n);
1615
+ t = new U(r, t.panel, n);
1616
1616
  }
1617
1617
  for (let r of e.effects)
1618
- r.is(Rn) ? t = V.init(r.value, t.panel, e.state) : r.is(ct) ? t = new V(t.diagnostics, r.value ? We.open : null, t.selected) : r.is(Tn) && (t = new V(t.diagnostics, t.panel, r.value));
1618
+ r.is(Rn) ? t = U.init(r.value, t.panel, e.state) : r.is(ct) ? t = new U(t.diagnostics, r.value ? We.open : null, t.selected) : r.is(Tn) && (t = new U(t.diagnostics, t.panel, r.value));
1619
1619
  return t;
1620
1620
  },
1621
1621
  provide: (t) => [
@@ -1624,11 +1624,11 @@ const Rn = /* @__PURE__ */ w.define(), ct = /* @__PURE__ */ w.define(), Tn = /*
1624
1624
  ]
1625
1625
  }), ui = /* @__PURE__ */ y.mark({ class: "cm-lintRange cm-lintRange-active" });
1626
1626
  function fi(t, e, r) {
1627
- let { diagnostics: n } = t.state.field(A), o = [], i = 2e8, s = 0;
1627
+ let { diagnostics: n } = t.state.field(M), o = [], i = 2e8, s = 0;
1628
1628
  n.between(e - (r < 0 ? 1 : 0), e + (r > 0 ? 1 : 0), (a, c, { spec: h }) => {
1629
1629
  e >= a && e <= c && (a == c || (e > a || r > 0) && (e < c || r < 0)) && (o.push(h.diagnostic), i = Math.min(a, i), s = Math.max(c, s));
1630
1630
  });
1631
- let l = t.state.facet(On).tooltipFilter;
1631
+ let l = t.state.facet(In).tooltipFilter;
1632
1632
  return l && (o = l(o)), o.length ? {
1633
1633
  pos: i,
1634
1634
  end: s,
@@ -1642,15 +1642,15 @@ function di(t, e) {
1642
1642
  return g("ul", { class: "cm-tooltip-lint" }, e.map((r) => Pn(t, r, !1)));
1643
1643
  }
1644
1644
  const mi = (t) => {
1645
- let e = t.state.field(A, !1);
1645
+ let e = t.state.field(M, !1);
1646
1646
  (!e || !e.panel) && t.dispatch({ effects: hi(t.state, [ct.of(!0)]) });
1647
- let r = ae(t, We.open);
1647
+ let r = ce(t, We.open);
1648
1648
  return r && r.dom.querySelector(".cm-panel-lint ul").focus(), !0;
1649
1649
  }, St = (t) => {
1650
- let e = t.state.field(A, !1);
1650
+ let e = t.state.field(M, !1);
1651
1651
  return !e || !e.panel ? !1 : (t.dispatch({ effects: ct.of(!1) }), !0);
1652
1652
  }, gi = (t) => {
1653
- let e = t.state.field(A, !1);
1653
+ let e = t.state.field(M, !1);
1654
1654
  if (!e)
1655
1655
  return !1;
1656
1656
  let r = t.state.selection.main, n = e.diagnostics.iter(r.to + 1);
@@ -1658,7 +1658,7 @@ const mi = (t) => {
1658
1658
  }, pi = [
1659
1659
  { key: "Mod-Shift-m", run: mi, preventDefault: !0 },
1660
1660
  { key: "F8", run: gi }
1661
- ], On = /* @__PURE__ */ ue.define({
1661
+ ], In = /* @__PURE__ */ fe.define({
1662
1662
  combine(t) {
1663
1663
  return Object.assign({ sources: t.map((e) => e.source) }, Ee(t.map((e) => e.config), {
1664
1664
  delay: 750,
@@ -1670,7 +1670,7 @@ const mi = (t) => {
1670
1670
  }));
1671
1671
  }
1672
1672
  });
1673
- function In(t) {
1673
+ function On(t) {
1674
1674
  let e = [];
1675
1675
  if (t)
1676
1676
  e:
@@ -1688,13 +1688,13 @@ function In(t) {
1688
1688
  }
1689
1689
  function Pn(t, e, r) {
1690
1690
  var n;
1691
- let o = r ? In(e.actions) : [];
1691
+ let o = r ? On(e.actions) : [];
1692
1692
  return g("li", { class: "cm-diagnostic cm-diagnostic-" + e.severity }, g("span", { class: "cm-diagnosticText" }, e.renderMessage ? e.renderMessage() : e.message), (n = e.actions) === null || n === void 0 ? void 0 : n.map((i, s) => {
1693
1693
  let l = !1, a = (m) => {
1694
1694
  if (m.preventDefault(), l)
1695
1695
  return;
1696
1696
  l = !0;
1697
- let x = ne(t.state.field(A).diagnostics, e);
1697
+ let x = ne(t.state.field(M).diagnostics, e);
1698
1698
  x && i.apply(t, x.from, x.to);
1699
1699
  }, { name: c } = i, h = o[s] ? c.indexOf(o[s]) : -1, u = h < 0 ? c : [
1700
1700
  c.slice(0, h),
@@ -1743,10 +1743,10 @@ class We {
1743
1743
  else if (o.keyCode == 13)
1744
1744
  this.view.focus();
1745
1745
  else if (o.keyCode >= 65 && o.keyCode <= 90 && this.selectedIndex >= 0) {
1746
- let { diagnostic: i } = this.items[this.selectedIndex], s = In(i.actions);
1746
+ let { diagnostic: i } = this.items[this.selectedIndex], s = On(i.actions);
1747
1747
  for (let l = 0; l < s.length; l++)
1748
1748
  if (s[l].toUpperCase().charCodeAt(0) == o.keyCode) {
1749
- let a = ne(this.view.state.field(A).diagnostics, i);
1749
+ let a = ne(this.view.state.field(M).diagnostics, i);
1750
1750
  a && i.actions[l].apply(e, a.from, a.to);
1751
1751
  }
1752
1752
  } else
@@ -1770,7 +1770,7 @@ class We {
1770
1770
  }, "×")), this.update();
1771
1771
  }
1772
1772
  get selectedIndex() {
1773
- let e = this.view.state.field(A).selected;
1773
+ let e = this.view.state.field(M).selected;
1774
1774
  if (!e)
1775
1775
  return -1;
1776
1776
  for (let r = 0; r < this.items.length; r++)
@@ -1779,7 +1779,7 @@ class We {
1779
1779
  return -1;
1780
1780
  }
1781
1781
  update() {
1782
- let { diagnostics: e, selected: r } = this.view.state.field(A), n = 0, o = !1, i = null;
1782
+ let { diagnostics: e, selected: r } = this.view.state.field(M), n = 0, o = !1, i = null;
1783
1783
  for (e.between(0, this.view.state.doc.length, (s, l, { spec: a }) => {
1784
1784
  let c = -1, h;
1785
1785
  for (let u = n; u < this.items.length; u++)
@@ -1822,7 +1822,7 @@ class We {
1822
1822
  moveSelection(e) {
1823
1823
  if (this.selectedIndex < 0)
1824
1824
  return;
1825
- let r = this.view.state.field(A), n = ne(r.diagnostics, this.items[e].diagnostic);
1825
+ let r = this.view.state.field(M), n = ne(r.diagnostics, this.items[e].diagnostic);
1826
1826
  n && this.view.dispatch({
1827
1827
  selection: { anchor: n.from, head: n.to },
1828
1828
  scrollIntoView: !0,
@@ -1930,9 +1930,9 @@ const ki = /* @__PURE__ */ p.baseTheme({
1930
1930
  }
1931
1931
  }
1932
1932
  }), bi = [
1933
- A,
1934
- /* @__PURE__ */ p.decorations.compute([A], (t) => {
1935
- let { selected: e, panel: r } = t.field(A);
1933
+ M,
1934
+ /* @__PURE__ */ p.decorations.compute([M], (t) => {
1935
+ let { selected: e, panel: r } = t.field(M);
1936
1936
  return !e || !r || e.from == e.to ? y.none : y.set([
1937
1937
  ui.range(e.from, e.to)
1938
1938
  ]);
@@ -1945,23 +1945,23 @@ var vt = function(e) {
1945
1945
  var {
1946
1946
  crosshairCursor: r = !1
1947
1947
  } = e, n = [];
1948
- e.closeBracketsKeymap !== !1 && (n = n.concat(ir)), e.defaultKeymap !== !1 && (n = n.concat(Oo)), e.searchKeymap !== !1 && (n = n.concat(oi)), e.historyKeymap !== !1 && (n = n.concat(Ur)), e.foldKeymap !== !1 && (n = n.concat(sr)), e.completionKeymap !== !1 && (n = n.concat(lr)), e.lintKeymap !== !1 && (n = n.concat(pi));
1948
+ e.closeBracketsKeymap !== !1 && (n = n.concat(ir)), e.defaultKeymap !== !1 && (n = n.concat(Io)), e.searchKeymap !== !1 && (n = n.concat(oi)), e.historyKeymap !== !1 && (n = n.concat(Ur)), e.foldKeymap !== !1 && (n = n.concat(sr)), e.completionKeymap !== !1 && (n = n.concat(lr)), e.lintKeymap !== !1 && (n = n.concat(pi));
1949
1949
  var o = [];
1950
- return e.lineNumbers !== !1 && o.push(ar()), e.highlightActiveLineGutter !== !1 && o.push(cr()), e.highlightSpecialChars !== !1 && o.push(hr()), e.history !== !1 && o.push(Ir()), e.foldGutter !== !1 && o.push(ur()), e.drawSelection !== !1 && o.push(fr()), e.dropCursor !== !1 && o.push(dr()), e.allowMultipleSelections !== !1 && o.push(ce.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && o.push(mr()), e.syntaxHighlighting !== !1 && o.push(Nt(Sr, {
1950
+ return e.lineNumbers !== !1 && o.push(ar()), e.highlightActiveLineGutter !== !1 && o.push(cr()), e.highlightSpecialChars !== !1 && o.push(hr()), e.history !== !1 && o.push(Or()), e.foldGutter !== !1 && o.push(ur()), e.drawSelection !== !1 && o.push(fr()), e.dropCursor !== !1 && o.push(dr()), e.allowMultipleSelections !== !1 && o.push(he.allowMultipleSelections.of(!0)), e.indentOnInput !== !1 && o.push(mr()), e.syntaxHighlighting !== !1 && o.push(Nt(Sr, {
1951
1951
  fallback: !0
1952
1952
  })), e.bracketMatching !== !1 && o.push(gr()), e.closeBrackets !== !1 && o.push(pr()), e.autocompletion !== !1 && o.push(yr()), e.rectangularSelection !== !1 && o.push(xr()), r !== !1 && o.push(kr()), e.highlightActiveLine !== !1 && o.push(br()), e.highlightSelectionMatches !== !1 && o.push(qo()), e.tabSize && typeof e.tabSize == "number" && o.push(Pt.of(" ".repeat(e.tabSize))), o.concat([qt.of(n.flat())]).filter(Boolean);
1953
1953
  };
1954
- const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb2bf", Ze = "#7d8799", Ai = "#61afef", Mi = "#98c379", Mt = "#d19a66", Li = "#c678dd", Bi = "#21252b", Lt = "#2c313a", Bt = "#282c34", Ue = "#353a42", Di = "#3E4451", Dt = "#528bff", Ei = /* @__PURE__ */ p.theme({
1954
+ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb2bf", Ye = "#7d8799", Ai = "#61afef", Mi = "#98c379", Mt = "#d19a66", Li = "#c678dd", Di = "#21252b", Lt = "#2c313a", Dt = "#282c34", Ue = "#353a42", Bi = "#3E4451", Bt = "#528bff", Ei = /* @__PURE__ */ p.theme({
1955
1955
  "&": {
1956
1956
  color: be,
1957
- backgroundColor: Bt
1957
+ backgroundColor: Dt
1958
1958
  },
1959
1959
  ".cm-content": {
1960
- caretColor: Dt
1960
+ caretColor: Bt
1961
1961
  },
1962
- ".cm-cursor, .cm-dropCursor": { borderLeftColor: Dt },
1963
- "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Di },
1964
- ".cm-panels": { backgroundColor: Bi, color: be },
1962
+ ".cm-cursor, .cm-dropCursor": { borderLeftColor: Bt },
1963
+ "&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection": { backgroundColor: Bi },
1964
+ ".cm-panels": { backgroundColor: Di, color: be },
1965
1965
  ".cm-panels.cm-panels-top": { borderBottom: "2px solid black" },
1966
1966
  ".cm-panels.cm-panels-bottom": { borderTop: "2px solid black" },
1967
1967
  ".cm-searchMatch": {
@@ -1977,8 +1977,8 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
1977
1977
  backgroundColor: "#bad0f847"
1978
1978
  },
1979
1979
  ".cm-gutters": {
1980
- backgroundColor: Bt,
1981
- color: Ze,
1980
+ backgroundColor: Dt,
1981
+ color: Ye,
1982
1982
  border: "none"
1983
1983
  },
1984
1984
  ".cm-activeLineGutter": {
@@ -2038,7 +2038,7 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
2038
2038
  },
2039
2039
  {
2040
2040
  tag: [f.meta, f.comment],
2041
- color: Ze
2041
+ color: Ye
2042
2042
  },
2043
2043
  {
2044
2044
  tag: f.strong,
@@ -2054,7 +2054,7 @@ const Si = "#e5c07b", At = "#e06c75", Ci = "#56b6c2", vi = "#ffffff", be = "#abb
2054
2054
  },
2055
2055
  {
2056
2056
  tag: f.link,
2057
- color: Ze,
2057
+ color: Ye,
2058
2058
  textDecoration: "underline"
2059
2059
  },
2060
2060
  {
@@ -2081,7 +2081,7 @@ var Ti = p.theme({
2081
2081
  }
2082
2082
  }, {
2083
2083
  dark: !1
2084
- }), Oi = function(e) {
2084
+ }), Ii = function(e) {
2085
2085
  e === void 0 && (e = {});
2086
2086
  var {
2087
2087
  indentWithTab: r = !0,
@@ -2091,7 +2091,7 @@ var Ti = p.theme({
2091
2091
  placeholder: s = "",
2092
2092
  basicSetup: l = !0
2093
2093
  } = e, a = [];
2094
- switch (r && a.unshift(qt.of([Io])), l && (typeof l == "boolean" ? a.unshift(vt()) : a.unshift(vt(l))), s && a.unshift(vr(s)), i) {
2094
+ switch (r && a.unshift(qt.of([Oo])), l && (typeof l == "boolean" ? a.unshift(vt()) : a.unshift(vt(l))), s && a.unshift(vr(s)), i) {
2095
2095
  case "light":
2096
2096
  a.push(Ti);
2097
2097
  break;
@@ -2104,8 +2104,8 @@ var Ti = p.theme({
2104
2104
  a.push(i);
2105
2105
  break;
2106
2106
  }
2107
- return n === !1 && a.push(p.editable.of(!1)), o && a.push(ce.readOnly.of(!0)), [...a];
2108
- }, Ii = (t) => ({
2107
+ return n === !1 && a.push(p.editable.of(!1)), o && a.push(he.readOnly.of(!0)), [...a];
2108
+ }, Oi = (t) => ({
2109
2109
  line: t.state.doc.lineAt(t.state.selection.main.from),
2110
2110
  lineCount: t.state.doc.lines,
2111
2111
  lineBreak: t.state.lineBreak,
@@ -2118,7 +2118,7 @@ var Ti = p.theme({
2118
2118
  selectionCode: t.state.sliceDoc(t.state.selection.main.from, t.state.selection.main.to),
2119
2119
  selections: t.state.selection.ranges.map((e) => t.state.sliceDoc(e.from, e.to)),
2120
2120
  selectedText: t.state.selection.ranges.some((e) => !e.empty)
2121
- }), Et = Xe.define(), Pi = [];
2121
+ }), Et = Ze.define(), Pi = [];
2122
2122
  function Wi(t) {
2123
2123
  var {
2124
2124
  value: e,
@@ -2134,23 +2134,23 @@ function Wi(t) {
2134
2134
  minHeight: u = null,
2135
2135
  maxHeight: m = null,
2136
2136
  width: x = null,
2137
- minWidth: S = null,
2138
- maxWidth: D = null,
2139
- placeholder: z = "",
2140
- editable: q = !0,
2141
- readOnly: U = !1,
2142
- indentWithTab: $ = !0,
2143
- basicSetup: G = !0,
2144
- root: K,
2145
- initialState: H
2146
- } = t, [J, de] = ke(), [k, I] = ke(), [_, j] = ke(), Fe = p.theme({
2137
+ minWidth: b = null,
2138
+ maxWidth: T = null,
2139
+ placeholder: $ = "",
2140
+ editable: H = !0,
2141
+ readOnly: G = !1,
2142
+ indentWithTab: V = !0,
2143
+ basicSetup: K = !0,
2144
+ root: ie,
2145
+ initialState: z
2146
+ } = t, [v, J] = ke(), [k, P] = ke(), [_, j] = ke(), Fe = p.theme({
2147
2147
  "&": {
2148
2148
  height: h,
2149
2149
  minHeight: u,
2150
2150
  maxHeight: m,
2151
2151
  width: x,
2152
- minWidth: S,
2153
- maxWidth: D
2152
+ minWidth: b,
2153
+ maxWidth: T
2154
2154
  },
2155
2155
  "& .cm-scroller": {
2156
2156
  height: "100% !important"
@@ -2159,46 +2159,46 @@ function Wi(t) {
2159
2159
  if (E.docChanged && typeof n == "function" && // Fix echoing of the remote changes:
2160
2160
  // If transaction is market as remote we don't have to call `onChange` handler again
2161
2161
  !E.transactions.some((Nn) => Nn.annotation(Et))) {
2162
- var se = E.state.doc, me = se.toString();
2162
+ var le = E.state.doc, me = le.toString();
2163
2163
  n(me, E);
2164
2164
  }
2165
- o && o(Ii(E));
2166
- }), Fn = Oi({
2165
+ o && o(Oi(E));
2166
+ }), Fn = Ii({
2167
2167
  theme: c,
2168
- editable: q,
2169
- readOnly: U,
2170
- placeholder: z,
2171
- indentWithTab: $,
2172
- basicSetup: G
2173
- }), ie = [Ne, Fe, ...Fn];
2174
- return s && typeof s == "function" && ie.push(p.updateListener.of(s)), ie = ie.concat(l), W(() => {
2175
- if (J && !_) {
2168
+ editable: H,
2169
+ readOnly: G,
2170
+ placeholder: $,
2171
+ indentWithTab: V,
2172
+ basicSetup: K
2173
+ }), se = [Ne, Fe, ...Fn];
2174
+ return s && typeof s == "function" && se.push(p.updateListener.of(s)), se = se.concat(l), F(() => {
2175
+ if (v && !_) {
2176
2176
  var E = {
2177
2177
  doc: e,
2178
2178
  selection: r,
2179
- extensions: ie
2180
- }, se = H ? ce.fromJSON(H.json, E, H.fields) : ce.create(E);
2181
- if (j(se), !k) {
2179
+ extensions: se
2180
+ }, le = z ? he.fromJSON(z.json, E, z.fields) : he.create(E);
2181
+ if (j(le), !k) {
2182
2182
  var me = new p({
2183
- state: se,
2184
- parent: J,
2185
- root: K
2183
+ state: le,
2184
+ parent: v,
2185
+ root: ie
2186
2186
  });
2187
- I(me), i && i(me, se);
2187
+ P(me), i && i(me, le);
2188
2188
  }
2189
2189
  }
2190
2190
  return () => {
2191
- k && (j(void 0), I(void 0));
2191
+ k && (j(void 0), P(void 0));
2192
2192
  };
2193
- }, [J, _]), W(() => de(t.container), [t.container]), W(() => () => {
2194
- k && (k.destroy(), I(void 0));
2195
- }, [k]), W(() => {
2193
+ }, [v, _]), F(() => J(t.container), [t.container]), F(() => () => {
2194
+ k && (k.destroy(), P(void 0));
2195
+ }, [k]), F(() => {
2196
2196
  a && k && k.focus();
2197
- }, [a, k]), W(() => {
2197
+ }, [a, k]), F(() => {
2198
2198
  k && k.dispatch({
2199
- effects: w.reconfigure.of(ie)
2199
+ effects: w.reconfigure.of(se)
2200
2200
  });
2201
- }, [c, l, h, u, m, x, S, D, z, q, U, $, G, n, s]), W(() => {
2201
+ }, [c, l, h, u, m, x, b, T, $, H, G, V, K, n, s]), F(() => {
2202
2202
  if (e !== void 0) {
2203
2203
  var E = k ? k.state.doc.toString() : "";
2204
2204
  k && e !== E && k.dispatch({
@@ -2214,9 +2214,9 @@ function Wi(t) {
2214
2214
  state: _,
2215
2215
  setState: j,
2216
2216
  view: k,
2217
- setView: I,
2218
- container: J,
2219
- setContainer: de
2217
+ setView: P,
2218
+ container: v,
2219
+ setContainer: J
2220
2220
  };
2221
2221
  }
2222
2222
  var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatistics", "onCreateEditor", "onUpdate", "autoFocus", "theme", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "basicSetup", "placeholder", "indentWithTab", "editable", "readOnly", "root", "initialState"], Wn = /* @__PURE__ */ wt((t, e) => {
@@ -2233,55 +2233,55 @@ var Fi = ["className", "value", "selection", "extensions", "onChange", "onStatis
2233
2233
  theme: u = "light",
2234
2234
  height: m,
2235
2235
  minHeight: x,
2236
- maxHeight: S,
2237
- width: D,
2238
- minWidth: z,
2239
- maxWidth: q,
2240
- basicSetup: U,
2241
- placeholder: $,
2242
- indentWithTab: G,
2243
- editable: K,
2244
- readOnly: H,
2245
- root: J,
2246
- initialState: de
2247
- } = t, k = qn(t, Fi), I = Rt(null), {
2236
+ maxHeight: b,
2237
+ width: T,
2238
+ minWidth: $,
2239
+ maxWidth: H,
2240
+ basicSetup: G,
2241
+ placeholder: V,
2242
+ indentWithTab: K,
2243
+ editable: ie,
2244
+ readOnly: z,
2245
+ root: v,
2246
+ initialState: J
2247
+ } = t, k = qn(t, Fi), P = Rt(null), {
2248
2248
  state: _,
2249
2249
  view: j,
2250
2250
  container: Fe
2251
2251
  } = Wi({
2252
- container: I.current,
2253
- root: J,
2252
+ container: P.current,
2253
+ root: v,
2254
2254
  value: n,
2255
2255
  autoFocus: h,
2256
2256
  theme: u,
2257
2257
  height: m,
2258
2258
  minHeight: x,
2259
- maxHeight: S,
2260
- width: D,
2261
- minWidth: z,
2262
- maxWidth: q,
2263
- basicSetup: U,
2264
- placeholder: $,
2265
- indentWithTab: G,
2266
- editable: K,
2267
- readOnly: H,
2259
+ maxHeight: b,
2260
+ width: T,
2261
+ minWidth: $,
2262
+ maxWidth: H,
2263
+ basicSetup: G,
2264
+ placeholder: V,
2265
+ indentWithTab: K,
2266
+ editable: ie,
2267
+ readOnly: z,
2268
2268
  selection: o,
2269
2269
  onChange: s,
2270
2270
  onStatistics: l,
2271
2271
  onCreateEditor: a,
2272
2272
  onUpdate: c,
2273
2273
  extensions: i,
2274
- initialState: de
2274
+ initialState: J
2275
2275
  });
2276
2276
  if (Hn(e, () => ({
2277
- editor: I.current,
2277
+ editor: P.current,
2278
2278
  state: _,
2279
2279
  view: j
2280
- }), [I, Fe, _, j]), typeof n != "string")
2280
+ }), [P, Fe, _, j]), typeof n != "string")
2281
2281
  throw new Error("value must be typeof string but got " + typeof n);
2282
2282
  var Ne = typeof u == "string" ? "cm-theme-" + u : "cm-theme";
2283
- return /* @__PURE__ */ P.jsx("div", Vn({
2284
- ref: I,
2283
+ return /* @__PURE__ */ W.jsx("div", Vn({
2284
+ ref: P,
2285
2285
  className: "" + Ne + (r ? " " + r : "")
2286
2286
  }, k));
2287
2287
  });
@@ -2302,52 +2302,54 @@ const Ni = p.theme({
2302
2302
  clearBg: s = !0,
2303
2303
  extensions: l,
2304
2304
  onChange: a,
2305
- ...c
2306
- }, h) {
2307
- const u = zn(), m = Rt(null), [x, S] = ke(100), [D, z] = Un.useState(null), { setFocusState: q } = $n(), U = () => {
2308
- q(!0);
2309
- }, $ = () => {
2310
- q(!1);
2305
+ onFocus: c,
2306
+ onBlur: h,
2307
+ ...u
2308
+ }, m) {
2309
+ const x = zn(), b = Rt(null), [T, $] = ke(100), [H, G] = Un.useState(null), { setFocusState: V } = $n(), K = (v) => {
2310
+ c == null || c(v), V(!0);
2311
+ }, ie = (v) => {
2312
+ h == null || h(v), V(!1);
2311
2313
  };
2312
- W(() => {
2313
- Promise.all(l).then(z);
2314
- }, [l]), W(() => {
2315
- const K = new ResizeObserver(([H]) => {
2316
- S(H.contentRect.width);
2314
+ F(() => {
2315
+ Promise.all(l).then(G);
2316
+ }, [l]), F(() => {
2317
+ const v = new ResizeObserver(([J]) => {
2318
+ $(J.contentRect.width);
2317
2319
  });
2318
- return K.observe(m.current), () => K.disconnect();
2320
+ return v.observe(b.current), () => v.disconnect();
2319
2321
  }, []);
2320
- let G = Gn(
2322
+ let z = Gn(
2321
2323
  "peer order-2 w-full max-w-full overflow-hidden rounded-sm border",
2322
2324
  s ? "bg-transparent" : "bg-grey-75",
2323
2325
  o ? "border-red" : "border-grey-500 hover:border-grey-700 focus:border-grey-800",
2324
2326
  e && "mt-2",
2325
2327
  n === "full" && "h-full"
2326
2328
  );
2327
- return /* @__PURE__ */ P.jsxs(P.Fragment, { children: [
2328
- /* @__PURE__ */ P.jsx("div", { ref: m }),
2329
- D && /* @__PURE__ */ P.jsxs("div", { className: n === "full" ? "h-full" : "", style: { width: x }, children: [
2330
- /* @__PURE__ */ P.jsx(
2329
+ return /* @__PURE__ */ W.jsxs(W.Fragment, { children: [
2330
+ /* @__PURE__ */ W.jsx("div", { ref: b }),
2331
+ H && /* @__PURE__ */ W.jsxs("div", { className: n === "full" ? "h-full" : "", style: { width: T }, children: [
2332
+ /* @__PURE__ */ W.jsx(
2331
2333
  Wn,
2332
2334
  {
2333
- ref: h,
2334
- className: G,
2335
- extensions: D,
2335
+ ref: m,
2336
+ className: z,
2337
+ extensions: H,
2336
2338
  height: n === "full" ? "100%" : n,
2337
2339
  theme: Ni,
2338
2340
  value: r,
2339
- onBlur: $,
2341
+ onBlur: ie,
2340
2342
  onChange: a,
2341
- onFocus: U,
2342
- ...c
2343
+ onFocus: K,
2344
+ ...u
2343
2345
  }
2344
2346
  ),
2345
- e && /* @__PURE__ */ P.jsx(Kn, { className: "order-1 !text-grey-700 peer-focus:!text-black", htmlFor: u, useLabelTag: !0, children: e }),
2346
- i && /* @__PURE__ */ P.jsx(Jn, { className: "order-3", color: o ? "red" : "", children: i })
2347
+ e && /* @__PURE__ */ W.jsx(Kn, { className: "order-1 !text-grey-700 peer-focus:!text-black", htmlFor: x, useLabelTag: !0, children: e }),
2348
+ i && /* @__PURE__ */ W.jsx(Jn, { className: "order-3", color: o ? "red" : "", children: i })
2347
2349
  ] })
2348
2350
  ] });
2349
2351
  });
2350
2352
  export {
2351
2353
  Vi as default
2352
2354
  };
2353
- //# sourceMappingURL=CodeEditorView-1643e910.mjs.map
2355
+ //# sourceMappingURL=CodeEditorView-73bd35b1.mjs.map