@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,7 +1,7 @@
1
1
  import { r as e } from "./rolldown-runtime-Cb76FRpK.js";
2
- import { Ct as t, Et as n, G as r, Gt as i, H as a, Ht as o, I as s, Kt as c, Lt as l, M as u, O as d, R as f, St as p, T as m, Ut as h, V as g, Vt as _, _ as ee, c as te, d as ne, j as re, l as ie, qt as ae, st as oe, u as se, w as ce } from "./dist-BmS-ZGjl.js";
3
- import { t as le } from "./dist-OUle2RT7.js";
4
- import { n as ue, r as de } from "./dist-D7mrh5sO.js";
2
+ import { Bt as t, D as n, Ht as r, L as i, M as a, Nt as o, O as s, P as c, R as l, Rt as u, St as d, Ut as f, V as p, Wt as m, a as h, b as ee, i as te, o as g, p as ne, rt as re, s as ie, vt as _, w as ae, x as oe, yt as se, zt as ce } from "./dist-CYeqK4Xw.js";
3
+ import { t as le } from "./dist-BX1mn8na.js";
4
+ import { n as ue, r as de } from "./dist-7cRjf--y.js";
5
5
  //#region ../node_modules/.pnpm/@lezer+markdown@1.7.2/node_modules/@lezer/markdown/dist/index.js
6
6
  var fe = class e {
7
7
  static create(t, n, r, i, a) {
@@ -9,14 +9,14 @@ var fe = class e {
9
9
  return new e(t, n, r, o, a, [], []);
10
10
  }
11
11
  constructor(e, t, n, r, i, a, o) {
12
- this.type = e, this.value = t, this.from = n, this.hash = r, this.end = i, this.children = a, this.positions = o, this.hashProp = [[_.contextHash, r]];
12
+ this.type = e, this.value = t, this.from = n, this.hash = r, this.end = i, this.children = a, this.positions = o, this.hashProp = [[u.contextHash, r]];
13
13
  }
14
14
  addChild(e, t) {
15
- e.prop(_.contextHash) != this.hash && (e = new c(e.type, e.children, e.positions, e.length, this.hashProp)), this.children.push(e), this.positions.push(t);
15
+ e.prop(u.contextHash) != this.hash && (e = new f(e.type, e.children, e.positions, e.length, this.hashProp)), this.children.push(e), this.positions.push(t);
16
16
  }
17
- toTree(e, t = this.end) {
18
- let n = this.children.length - 1;
19
- return n >= 0 && (t = Math.max(t, this.positions[n] + this.children[n].length + this.from)), new c(e.types[this.type], this.children, this.positions, t - this.from).balance({ makeTree: (e, t, n) => new c(h.none, e, t, n, this.hashProp) });
17
+ toTree(e, n = this.end) {
18
+ let r = this.children.length - 1;
19
+ return r >= 0 && (n = Math.max(n, this.positions[r] + this.children[r].length + this.from)), new f(e.types[this.type], this.children, this.positions, n - this.from).balance({ makeTree: (e, n, r) => new f(t.none, e, n, r, this.hashProp) });
20
20
  }
21
21
  }, v;
22
22
  (function(e) {
@@ -465,7 +465,7 @@ var Ee = class {
465
465
  this.startContext(this.parser.getNodeType(e), t, n);
466
466
  }
467
467
  addNode(e, t, n) {
468
- typeof e == "number" && (e = new c(this.parser.nodeSet.types[e], I, I, (n ?? this.prevLineEnd()) - t)), this.block.addChild(e, t - this.block.from);
468
+ typeof e == "number" && (e = new f(this.parser.nodeSet.types[e], I, I, (n ?? this.prevLineEnd()) - t)), this.block.addChild(e, t - this.block.from);
469
469
  }
470
470
  addElement(e) {
471
471
  this.block.addChild(e.toTree(this.parser.nodeSet), e.from - this.block.from);
@@ -497,21 +497,21 @@ var Ee = class {
497
497
  }
498
498
  };
499
499
  function M(e, t, n, r, i) {
500
- let a = e[t].to, o = [], s = [], l = n.from + r;
501
- function u(n, i) {
500
+ let a = e[t].to, o = [], s = [], c = n.from + r;
501
+ function l(n, i) {
502
502
  for (; i ? n >= a : n > a;) {
503
503
  let i = e[t + 1].from - a;
504
504
  r += i, n += i, t++, a = e[t].to;
505
505
  }
506
506
  }
507
- for (let c = n.firstChild; c; c = c.nextSibling) {
508
- u(c.from + r, !0);
509
- let n = c.from + r, d, f = i.get(c.tree);
510
- f ? d = f : c.to + r > a ? (d = M(e, t, c, r, i), u(c.to + r, !1)) : d = c.toTree(), o.push(d), s.push(n - l);
507
+ for (let u = n.firstChild; u; u = u.nextSibling) {
508
+ l(u.from + r, !0);
509
+ let n = u.from + r, d, f = i.get(u.tree);
510
+ f ? d = f : u.to + r > a ? (d = M(e, t, u, r, i), l(u.to + r, !1)) : d = u.toTree(), o.push(d), s.push(n - c);
511
511
  }
512
- return u(n.to + r, !1), new c(n.type, o, s, n.to + r - l, n.tree ? n.tree.propValues : void 0);
512
+ return l(n.to + r, !1), new f(n.type, o, s, n.to + r - c, n.tree ? n.tree.propValues : void 0);
513
513
  }
514
- var Ae = class e extends i {
514
+ var Ae = class e extends r {
515
515
  constructor(e, t, n, r, i, a, o, s, c) {
516
516
  super(), this.nodeSet = e, this.blockParsers = t, this.leafBlockParsers = n, this.blockNames = r, this.endLeafBlock = i, this.skipContextMarkup = a, this.inlineParsers = o, this.inlineNames = s, this.wrappers = c, this.nodeTypes = Object.create(null);
517
517
  for (let t of e.types) this.nodeTypes[t.name] = t.id;
@@ -521,52 +521,52 @@ var Ae = class e extends i {
521
521
  for (let i of this.wrappers) r = i(r, e, t, n);
522
522
  return r;
523
523
  }
524
- configure(t) {
525
- let n = P(t);
526
- if (!n) return this;
527
- let { nodeSet: r, skipContextMarkup: i } = this, a = this.blockParsers.slice(), s = this.leafBlockParsers.slice(), c = this.blockNames.slice(), l = this.inlineParsers.slice(), u = this.inlineNames.slice(), d = this.endLeafBlock.slice(), p = this.wrappers;
528
- if (N(n.defineNodes)) {
529
- i = Object.assign({}, i);
530
- let e = r.types.slice(), t;
531
- for (let r of n.defineNodes) {
532
- let { name: n, block: a, composite: o, style: s } = typeof r == "string" ? { name: r } : r;
533
- if (e.some((e) => e.name == n)) continue;
534
- o && (i[e.length] = (e, t, n) => o(t, n, e.value));
535
- let c = e.length, l = o ? ["Block", "BlockContext"] : a ? c >= v.ATXHeading1 && c <= v.SetextHeading2 ? [
524
+ configure(n) {
525
+ let r = P(n);
526
+ if (!r) return this;
527
+ let { nodeSet: a, skipContextMarkup: o } = this, s = this.blockParsers.slice(), l = this.leafBlockParsers.slice(), d = this.blockNames.slice(), f = this.inlineParsers.slice(), p = this.inlineNames.slice(), m = this.endLeafBlock.slice(), h = this.wrappers;
528
+ if (N(r.defineNodes)) {
529
+ o = Object.assign({}, o);
530
+ let e = a.types.slice(), n;
531
+ for (let i of r.defineNodes) {
532
+ let { name: r, block: a, composite: s, style: l } = typeof i == "string" ? { name: i } : i;
533
+ if (e.some((e) => e.name == r)) continue;
534
+ s && (o[e.length] = (e, t, n) => s(t, n, e.value));
535
+ let d = e.length, f = s ? ["Block", "BlockContext"] : a ? d >= v.ATXHeading1 && d <= v.SetextHeading2 ? [
536
536
  "Block",
537
537
  "LeafBlock",
538
538
  "Heading"
539
539
  ] : ["Block", "LeafBlock"] : void 0;
540
- e.push(h.define({
541
- id: c,
542
- name: n,
543
- props: l && [[_.group, l]]
544
- })), s && (t ||= {}, Array.isArray(s) || s instanceof f ? t[n] = s : Object.assign(t, s));
540
+ e.push(t.define({
541
+ id: d,
542
+ name: r,
543
+ props: f && [[u.group, f]]
544
+ })), l && (n ||= {}, Array.isArray(l) || l instanceof c ? n[r] = l : Object.assign(n, l));
545
545
  }
546
- r = new o(e), t && (r = r.extend(g(t)));
546
+ a = new ce(e), n && (a = a.extend(i(n)));
547
547
  }
548
- if (N(n.props) && (r = r.extend(...n.props)), N(n.remove)) for (let e of n.remove) {
548
+ if (N(r.props) && (a = a.extend(...r.props)), N(r.remove)) for (let e of r.remove) {
549
549
  let t = this.blockNames.indexOf(e), n = this.inlineNames.indexOf(e);
550
- t > -1 && (a[t] = s[t] = void 0), n > -1 && (l[n] = void 0);
550
+ t > -1 && (s[t] = l[t] = void 0), n > -1 && (f[n] = void 0);
551
551
  }
552
- if (N(n.parseBlock)) for (let e of n.parseBlock) {
553
- let t = c.indexOf(e.name);
554
- if (t > -1) a[t] = e.parse, s[t] = e.leaf;
552
+ if (N(r.parseBlock)) for (let e of r.parseBlock) {
553
+ let t = d.indexOf(e.name);
554
+ if (t > -1) s[t] = e.parse, l[t] = e.leaf;
555
555
  else {
556
- let t = e.before ? F(c, e.before) : e.after ? F(c, e.after) + 1 : c.length - 1;
557
- a.splice(t, 0, e.parse), s.splice(t, 0, e.leaf), c.splice(t, 0, e.name);
556
+ let t = e.before ? F(d, e.before) : e.after ? F(d, e.after) + 1 : d.length - 1;
557
+ s.splice(t, 0, e.parse), l.splice(t, 0, e.leaf), d.splice(t, 0, e.name);
558
558
  }
559
- e.endLeaf && d.push(e.endLeaf);
559
+ e.endLeaf && m.push(e.endLeaf);
560
560
  }
561
- if (N(n.parseInline)) for (let e of n.parseInline) {
562
- let t = u.indexOf(e.name);
563
- if (t > -1) l[t] = e.parse;
561
+ if (N(r.parseInline)) for (let e of r.parseInline) {
562
+ let t = p.indexOf(e.name);
563
+ if (t > -1) f[t] = e.parse;
564
564
  else {
565
- let t = e.before ? F(u, e.before) : e.after ? F(u, e.after) + 1 : u.length - 1;
566
- l.splice(t, 0, e.parse), u.splice(t, 0, e.name);
565
+ let t = e.before ? F(p, e.before) : e.after ? F(p, e.after) + 1 : p.length - 1;
566
+ f.splice(t, 0, e.parse), p.splice(t, 0, e.name);
567
567
  }
568
568
  }
569
- return n.wrap && (p = p.concat(n.wrap)), new e(r, a, s, c, d, i, l, u, p);
569
+ return r.wrap && (h = h.concat(r.wrap)), new e(a, s, l, d, m, o, f, p, h);
570
570
  }
571
571
  getNodeType(e) {
572
572
  let t = this.nodeTypes[e];
@@ -614,12 +614,12 @@ function F(e, t) {
614
614
  if (n < 0) throw RangeError(`Position specified relative to unknown parser ${t}`);
615
615
  return n;
616
616
  }
617
- var je = [h.none];
618
- for (let e = 1, t; t = v[e]; e++) je[e] = h.define({
617
+ var je = [t.none];
618
+ for (let e = 1, n; n = v[e]; e++) je[e] = t.define({
619
619
  id: e,
620
- name: t,
621
- props: e >= v.Escape ? [] : [[_.group, e in ge ? ["Block", "BlockContext"] : ["Block", "LeafBlock"]]],
622
- top: t == "Document"
620
+ name: n,
621
+ props: e >= v.Escape ? [] : [[u.group, e in ge ? ["Block", "BlockContext"] : ["Block", "LeafBlock"]]],
622
+ top: n == "Document"
623
623
  });
624
624
  var I = [], Me = class {
625
625
  constructor(e) {
@@ -633,7 +633,7 @@ var I = [], Me = class {
633
633
  return this;
634
634
  }
635
635
  finish(e, t) {
636
- return c.build({
636
+ return f.build({
637
637
  buffer: this.content,
638
638
  nodeSet: this.nodeSet,
639
639
  reused: this.nodes,
@@ -951,10 +951,10 @@ var Ve = [
951
951
  }
952
952
  matches(e) {
953
953
  let t = this.cursor.tree;
954
- return t && t.prop(_.contextHash) == e;
954
+ return t && t.prop(u.contextHash) == e;
955
955
  }
956
956
  takeNodes(e) {
957
- let t = this.cursor, n = this.fragment.offset, r = this.fragmentEnd - +!!this.fragment.openEnd, i = e.absoluteLineStart, a = i, o = e.block.children.length, s = a, l = o;
957
+ let t = this.cursor, n = this.fragment.offset, r = this.fragmentEnd - +!!this.fragment.openEnd, i = e.absoluteLineStart, a = i, o = e.block.children.length, s = a, c = o;
958
958
  for (;;) {
959
959
  if (t.to - n > r) {
960
960
  if (t.type.isAnonymous && t.firstChild()) continue;
@@ -963,10 +963,10 @@ var Ve = [
963
963
  let i = Ue(t.from - n, e.ranges);
964
964
  if (t.to - n <= e.ranges[e.rangeI].to) e.addNode(t.tree, i);
965
965
  else {
966
- let n = new c(e.parser.nodeSet.types[v.Paragraph], [], [], 0, e.block.hashProp);
966
+ let n = new f(e.parser.nodeSet.types[v.Paragraph], [], [], 0, e.block.hashProp);
967
967
  e.reusePlaceholders.set(n, t.tree), e.addNode(n, i);
968
968
  }
969
- if (t.type.is("Block") && (Ve.indexOf(t.type.id) < 0 ? (a = t.to - n, o = e.block.children.length) : (a = s, o = l), s = t.to - n, l = e.block.children.length), !t.nextSibling()) break;
969
+ if (t.type.is("Block") && (Ve.indexOf(t.type.id) < 0 ? (a = t.to - n, o = e.block.children.length) : (a = s, o = c), s = t.to - n, c = e.block.children.length), !t.nextSibling()) break;
970
970
  }
971
971
  for (; e.block.children.length > o;) e.block.children.pop(), e.block.positions.pop();
972
972
  return a - i;
@@ -980,30 +980,30 @@ function Ue(e, t) {
980
980
  }
981
981
  return n;
982
982
  }
983
- var We = g({
984
- "Blockquote/...": a.quote,
985
- HorizontalRule: a.contentSeparator,
986
- "ATXHeading1/... SetextHeading1/...": a.heading1,
987
- "ATXHeading2/... SetextHeading2/...": a.heading2,
988
- "ATXHeading3/...": a.heading3,
989
- "ATXHeading4/...": a.heading4,
990
- "ATXHeading5/...": a.heading5,
991
- "ATXHeading6/...": a.heading6,
992
- "Comment CommentBlock": a.comment,
993
- Escape: a.escape,
994
- Entity: a.character,
995
- "Emphasis/...": a.emphasis,
996
- "StrongEmphasis/...": a.strong,
997
- "Link/... Image/...": a.link,
998
- "OrderedList/... BulletList/...": a.list,
999
- "BlockQuote/...": a.quote,
1000
- "InlineCode CodeText": a.monospace,
1001
- "URL Autolink": a.url,
1002
- "HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark": a.processingInstruction,
1003
- "CodeInfo LinkLabel": a.labelName,
1004
- LinkTitle: a.string,
1005
- Paragraph: a.content
1006
- }), Ge = new Ae(new o(je).extend(We), Object.keys(k).map((e) => k[e]), Object.keys(k).map((e) => j[e]), Object.keys(k), De, ge, Object.keys(U).map((e) => U[e]), Object.keys(U), []);
983
+ var We = i({
984
+ "Blockquote/...": l.quote,
985
+ HorizontalRule: l.contentSeparator,
986
+ "ATXHeading1/... SetextHeading1/...": l.heading1,
987
+ "ATXHeading2/... SetextHeading2/...": l.heading2,
988
+ "ATXHeading3/...": l.heading3,
989
+ "ATXHeading4/...": l.heading4,
990
+ "ATXHeading5/...": l.heading5,
991
+ "ATXHeading6/...": l.heading6,
992
+ "Comment CommentBlock": l.comment,
993
+ Escape: l.escape,
994
+ Entity: l.character,
995
+ "Emphasis/...": l.emphasis,
996
+ "StrongEmphasis/...": l.strong,
997
+ "Link/... Image/...": l.link,
998
+ "OrderedList/... BulletList/...": l.list,
999
+ "BlockQuote/...": l.quote,
1000
+ "InlineCode CodeText": l.monospace,
1001
+ "URL Autolink": l.url,
1002
+ "HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark": l.processingInstruction,
1003
+ "CodeInfo LinkLabel": l.labelName,
1004
+ LinkTitle: l.string,
1005
+ Paragraph: l.content
1006
+ }), Ge = new Ae(new ce(je).extend(We), Object.keys(k).map((e) => k[e]), Object.keys(k).map((e) => j[e]), Object.keys(k), De, ge, Object.keys(U).map((e) => U[e]), Object.keys(U), []);
1007
1007
  function Ke(e, t, n) {
1008
1008
  let r = [];
1009
1009
  for (let i = e.firstChild, a = t;; i = i.nextSibling) {
@@ -1018,7 +1018,7 @@ function Ke(e, t, n) {
1018
1018
  }
1019
1019
  function qe(e) {
1020
1020
  let { codeParser: t, htmlParser: n } = e;
1021
- return { wrap: ae((e, r) => {
1021
+ return { wrap: m((e, r) => {
1022
1022
  let i = e.type.id;
1023
1023
  if (t && (i == v.CodeBlock || i == v.FencedCode)) {
1024
1024
  let n = "";
@@ -1045,10 +1045,10 @@ var Je = {
1045
1045
  }, Ye = {
1046
1046
  defineNodes: [{
1047
1047
  name: "Strikethrough",
1048
- style: { "Strikethrough/...": a.strikethrough }
1048
+ style: { "Strikethrough/...": l.strikethrough }
1049
1049
  }, {
1050
1050
  name: "StrikethroughMark",
1051
- style: a.processingInstruction
1051
+ style: l.processingInstruction
1052
1052
  }],
1053
1053
  parseInline: [{
1054
1054
  name: "Strikethrough",
@@ -1107,16 +1107,16 @@ var Ze = /^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/, Qe = class {
1107
1107
  },
1108
1108
  {
1109
1109
  name: "TableHeader",
1110
- style: { "TableHeader/...": a.heading }
1110
+ style: { "TableHeader/...": l.heading }
1111
1111
  },
1112
1112
  "TableRow",
1113
1113
  {
1114
1114
  name: "TableCell",
1115
- style: a.content
1115
+ style: l.content
1116
1116
  },
1117
1117
  {
1118
1118
  name: "TableDelimiter",
1119
- style: a.processingInstruction
1119
+ style: l.processingInstruction
1120
1120
  }
1121
1121
  ],
1122
1122
  parseBlock: [{
@@ -1142,10 +1142,10 @@ var Ze = /^[>\s]*\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/, Qe = class {
1142
1142
  defineNodes: [{
1143
1143
  name: "Task",
1144
1144
  block: !0,
1145
- style: a.list
1145
+ style: l.list
1146
1146
  }, {
1147
1147
  name: "TaskMarker",
1148
- style: a.atom
1148
+ style: l.atom
1149
1149
  }],
1150
1150
  parseBlock: [{
1151
1151
  name: "TaskList",
@@ -1210,10 +1210,10 @@ function dt(e, t, n) {
1210
1210
  var ft = {
1211
1211
  defineNodes: [{
1212
1212
  name: "Superscript",
1213
- style: a.special(a.content)
1213
+ style: l.special(l.content)
1214
1214
  }, {
1215
1215
  name: "SuperscriptMark",
1216
- style: a.processingInstruction
1216
+ style: l.processingInstruction
1217
1217
  }],
1218
1218
  parseInline: [{
1219
1219
  name: "Superscript",
@@ -1222,10 +1222,10 @@ var ft = {
1222
1222
  }, pt = {
1223
1223
  defineNodes: [{
1224
1224
  name: "Subscript",
1225
- style: a.special(a.content)
1225
+ style: l.special(l.content)
1226
1226
  }, {
1227
1227
  name: "SubscriptMark",
1228
- style: a.processingInstruction
1228
+ style: l.processingInstruction
1229
1229
  }],
1230
1230
  parseInline: [{
1231
1231
  name: "Subscript",
@@ -1234,7 +1234,7 @@ var ft = {
1234
1234
  }, mt = {
1235
1235
  defineNodes: [{
1236
1236
  name: "Emoji",
1237
- style: a.character
1237
+ style: l.character
1238
1238
  }],
1239
1239
  parseInline: [{
1240
1240
  name: "Emoji",
@@ -1252,17 +1252,17 @@ var ft = {
1252
1252
  markdownKeymap: () => Nt,
1253
1253
  markdownLanguage: () => Y,
1254
1254
  pasteURLAsLink: () => zt
1255
- }), gt = /*@__PURE__*/ ee({ commentTokens: { block: {
1255
+ }), gt = /*@__PURE__*/ ne({ commentTokens: { block: {
1256
1256
  open: "<!--",
1257
1257
  close: "-->"
1258
- } } }), _t = /*@__PURE__*/ new _(), vt = /*@__PURE__*/ Ge.configure({ props: [
1259
- /*@__PURE__*/ ce.add((e) => !e.is("Block") || e.is("Document") || q(e) != null || yt(e) ? void 0 : (e, t) => ({
1258
+ } } }), _t = /*@__PURE__*/ new u(), vt = /*@__PURE__*/ Ge.configure({ props: [
1259
+ /*@__PURE__*/ ee.add((e) => !e.is("Block") || e.is("Document") || q(e) != null || yt(e) ? void 0 : (e, t) => ({
1260
1260
  from: t.doc.lineAt(e.from).to,
1261
1261
  to: e.to
1262
1262
  })),
1263
1263
  /*@__PURE__*/ _t.add(q),
1264
- /*@__PURE__*/ d.add({ Document: () => null }),
1265
- /*@__PURE__*/ u.add({ Document: gt })
1264
+ /*@__PURE__*/ ae.add({ Document: () => null }),
1265
+ /*@__PURE__*/ s.add({ Document: gt })
1266
1266
  ] });
1267
1267
  function q(e) {
1268
1268
  let t = /^(?:ATX|Setext)Heading(\d)$/.exec(e.name);
@@ -1280,8 +1280,8 @@ function bt(e, t) {
1280
1280
  }
1281
1281
  return n.to;
1282
1282
  }
1283
- var xt = /*@__PURE__*/ m.of((e, t, n) => {
1284
- for (let r = s(e).resolveInner(n, -1); r && !(r.from < t); r = r.parent) {
1283
+ var xt = /*@__PURE__*/ oe.of((e, t, n) => {
1284
+ for (let r = a(e).resolveInner(n, -1); r && !(r.from < t); r = r.parent) {
1285
1285
  let e = r.type.prop(_t);
1286
1286
  if (e == null) continue;
1287
1287
  let t = bt(r, e);
@@ -1300,7 +1300,7 @@ var St = /*@__PURE__*/ J(vt), Y = /*@__PURE__*/ J(/* @__PURE__ */ vt.configure([
1300
1300
  pt,
1301
1301
  ft,
1302
1302
  mt,
1303
- { props: [/*@__PURE__*/ ce.add({ Table: (e, t) => ({
1303
+ { props: [/*@__PURE__*/ ee.add({ Table: (e, t) => ({
1304
1304
  from: t.doc.lineAt(e.from).to,
1305
1305
  to: e.to
1306
1306
  }) })] }
@@ -1309,7 +1309,7 @@ function Ct(e, t) {
1309
1309
  return (n) => {
1310
1310
  if (n && e) {
1311
1311
  let t = null;
1312
- if (n = /\S*/.exec(n)[0], t = typeof e == "function" ? e(n) : ie.matchLanguageName(e, n, !0), t instanceof ie) return t.support ? t.support.language.parser : ne.getSkippingParser(t.load());
1312
+ if (n = /\S*/.exec(n)[0], t = typeof e == "function" ? e(n) : h.matchLanguageName(e, n, !0), t instanceof h) return t.support ? t.support.language.parser : ie.getSkippingParser(t.load());
1313
1313
  if (t) return t.parser;
1314
1314
  }
1315
1315
  return t ? t.parser : null;
@@ -1377,57 +1377,57 @@ function Z(e, t, n, r = 0) {
1377
1377
  }
1378
1378
  }
1379
1379
  function Q(e, t) {
1380
- let n = /^[ \t]*/.exec(e)[0].length;
1381
- if (!n || t.facet(re) != " ") return e;
1382
- let r = l(e, 4, n), i = "";
1383
- for (let e = r; e > 0;) e >= 4 ? (i += " ", e -= 4) : (i += " ", e--);
1384
- return i + e.slice(n);
1380
+ let r = /^[ \t]*/.exec(e)[0].length;
1381
+ if (!r || t.facet(n) != " ") return e;
1382
+ let i = o(e, 4, r), a = "";
1383
+ for (let e = i; e > 0;) e >= 4 ? (a += " ", e -= 4) : (a += " ", e--);
1384
+ return a + e.slice(r);
1385
1385
  }
1386
1386
  var Et = (e = {}) => ({ state: t, dispatch: n }) => {
1387
- let r = s(t), { doc: i } = t, a = null, o = t.changeByRange((n) => {
1388
- if (!n.empty || !Y.isActiveAt(t, n.from, -1) && !Y.isActiveAt(t, n.from, 1)) return a = { range: n };
1389
- let o = n.from, s = i.lineAt(o), c = wt(r.resolveInner(o, -1), i);
1390
- for (; c.length && c[c.length - 1].from > o - s.from;) c.pop();
1391
- if (!c.length) return a = { range: n };
1392
- let u = c[c.length - 1];
1393
- if (u.to - u.spaceAfter.length > o - s.from) return a = { range: n };
1394
- let d = o >= u.to - u.spaceAfter.length && !/\S/.test(s.text.slice(u.to));
1387
+ let r = a(t), { doc: i } = t, s = null, c = t.changeByRange((n) => {
1388
+ if (!n.empty || !Y.isActiveAt(t, n.from, -1) && !Y.isActiveAt(t, n.from, 1)) return s = { range: n };
1389
+ let a = n.from, c = i.lineAt(a), l = wt(r.resolveInner(a, -1), i);
1390
+ for (; l.length && l[l.length - 1].from > a - c.from;) l.pop();
1391
+ if (!l.length) return s = { range: n };
1392
+ let u = l[l.length - 1];
1393
+ if (u.to - u.spaceAfter.length > a - c.from) return s = { range: n };
1394
+ let d = a >= u.to - u.spaceAfter.length && !/\S/.test(c.text.slice(u.to));
1395
1395
  if (u.item && d) {
1396
- if (u.item.from < s.from && !/^[\s>]*$/.test(s.text.slice(0, u.to))) return a = { range: n };
1397
- let r = u.node.firstChild, l = u.node.getChild("ListItem", "ListItem");
1398
- if (r.to >= o || l && l.to < o || s.from > 0 && !/[^\s>]/.test(i.lineAt(s.from - 1).text) || e.nonTightLists === !1) {
1399
- let e = c.length > 1 ? c[c.length - 2] : null, t, n = "";
1400
- e && e.item ? (t = s.from + e.from, n = e.marker(i, 1)) : t = s.from + (e ? e.to : 0);
1396
+ if (u.item.from < c.from && !/^[\s>]*$/.test(c.text.slice(0, u.to))) return s = { range: n };
1397
+ let r = u.node.firstChild, o = u.node.getChild("ListItem", "ListItem");
1398
+ if (r.to >= a || o && o.to < a || c.from > 0 && !/[^\s>]/.test(i.lineAt(c.from - 1).text) || e.nonTightLists === !1) {
1399
+ let e = l.length > 1 ? l[l.length - 2] : null, t, n = "";
1400
+ e && e.item ? (t = c.from + e.from, n = e.marker(i, 1)) : t = c.from + (e ? e.to : 0);
1401
1401
  let r = [{
1402
1402
  from: t,
1403
- to: o,
1403
+ to: a,
1404
1404
  insert: n
1405
1405
  }];
1406
1406
  return u.node.name == "OrderedList" && Z(u.item, i, r, -2), e && e.node.name == "OrderedList" && Z(e.item, i, r), {
1407
- range: p.cursor(t + n.length),
1407
+ range: _.cursor(t + n.length),
1408
1408
  changes: r
1409
1409
  };
1410
1410
  }
1411
1411
  {
1412
- let e = At(c, t, s);
1412
+ let e = At(l, t, c);
1413
1413
  return {
1414
- range: p.cursor(o + e.length + 1),
1414
+ range: _.cursor(a + e.length + 1),
1415
1415
  changes: {
1416
- from: s.from,
1416
+ from: c.from,
1417
1417
  insert: e + t.lineBreak
1418
1418
  }
1419
1419
  };
1420
1420
  }
1421
1421
  }
1422
- if (u.node.name == "Blockquote" && d && s.from) {
1423
- let e = i.lineAt(s.from - 1), r = />\s*$/.exec(e.text);
1422
+ if (u.node.name == "Blockquote" && d && c.from) {
1423
+ let e = i.lineAt(c.from - 1), r = />\s*$/.exec(e.text);
1424
1424
  if (r && r.index == u.from) {
1425
1425
  let i = t.changes([{
1426
1426
  from: e.from + r.index,
1427
1427
  to: e.to
1428
1428
  }, {
1429
- from: s.from + u.from,
1430
- to: s.to
1429
+ from: c.from + u.from,
1430
+ to: c.to
1431
1431
  }]);
1432
1432
  return {
1433
1433
  range: n.map(i),
@@ -1437,20 +1437,20 @@ var Et = (e = {}) => ({ state: t, dispatch: n }) => {
1437
1437
  }
1438
1438
  let f = [];
1439
1439
  u.node.name == "OrderedList" && Z(u.item, i, f);
1440
- let m = u.item && u.item.from < s.from, h = "";
1441
- if (!m || /^[\s\d.)\-+*>]*/.exec(s.text)[0].length >= u.to) for (let e = 0, t = c.length - 1; e <= t; e++) h += e == t && !m ? c[e].marker(i, 1) : c[e].blank(e < t ? l(s.text, 4, c[e + 1].from) - h.length : null);
1442
- let g = o;
1443
- for (; g > s.from && /\s/.test(s.text.charAt(g - s.from - 1));) g--;
1444
- return h = Q(h, t), kt(u.node, t.doc) && (h = At(c, t, s) + t.lineBreak + h), f.push({
1445
- from: g,
1446
- to: o,
1447
- insert: t.lineBreak + h
1440
+ let p = u.item && u.item.from < c.from, m = "";
1441
+ if (!p || /^[\s\d.)\-+*>]*/.exec(c.text)[0].length >= u.to) for (let e = 0, t = l.length - 1; e <= t; e++) m += e == t && !p ? l[e].marker(i, 1) : l[e].blank(e < t ? o(c.text, 4, l[e + 1].from) - m.length : null);
1442
+ let h = a;
1443
+ for (; h > c.from && /\s/.test(c.text.charAt(h - c.from - 1));) h--;
1444
+ return m = Q(m, t), kt(u.node, t.doc) && (m = At(l, t, c) + t.lineBreak + m), f.push({
1445
+ from: h,
1446
+ to: a,
1447
+ insert: t.lineBreak + m
1448
1448
  }), {
1449
- range: p.cursor(g + h.length + 1),
1449
+ range: _.cursor(h + m.length + 1),
1450
1450
  changes: f
1451
1451
  };
1452
1452
  });
1453
- return !a && (n(t.update(o, {
1453
+ return !s && (n(t.update(c, {
1454
1454
  scrollIntoView: !0,
1455
1455
  userEvent: "input"
1456
1456
  })), !0);
@@ -1467,7 +1467,7 @@ function kt(e, t) {
1467
1467
  }
1468
1468
  function At(e, t, n) {
1469
1469
  let r = "";
1470
- for (let t = 0, i = e.length - 2; t <= i; t++) r += e[t].blank(t < i ? l(n.text, 4, e[t + 1].from) - r.length : null, t < i);
1470
+ for (let t = 0, i = e.length - 2; t <= i; t++) r += e[t].blank(t < i ? o(n.text, 4, e[t + 1].from) - r.length : null, t < i);
1471
1471
  return Q(r, t);
1472
1472
  }
1473
1473
  function jt(e, t) {
@@ -1479,14 +1479,14 @@ function jt(e, t) {
1479
1479
  return n;
1480
1480
  }
1481
1481
  var Mt = ({ state: e, dispatch: t }) => {
1482
- let n = s(e), r = null, i = e.changeByRange((t) => {
1482
+ let n = a(e), r = null, i = e.changeByRange((t) => {
1483
1483
  let i = t.from, { doc: a } = e;
1484
1484
  if (t.empty && Y.isActiveAt(e, t.from)) {
1485
1485
  let t = a.lineAt(i), r = wt(jt(n, i), a);
1486
1486
  if (r.length) {
1487
1487
  let n = r[r.length - 1], a = n.to - n.spaceAfter.length + +!!n.spaceAfter;
1488
1488
  if (i - t.from > a && !/\S/.test(t.text.slice(a, i - t.from))) return {
1489
- range: p.cursor(t.from + a),
1489
+ range: _.cursor(t.from + a),
1490
1490
  changes: {
1491
1491
  from: t.from + a,
1492
1492
  to: i
@@ -1495,9 +1495,9 @@ var Mt = ({ state: e, dispatch: t }) => {
1495
1495
  if (i - t.from == a && (n.item && t.from <= n.item.from || /^[\s>]*$/.test(t.text.slice(0, n.to)))) {
1496
1496
  let r = t.from + n.from;
1497
1497
  if (n.item && n.node.from < n.item.from && /\S/.test(t.text.slice(n.from, n.to))) {
1498
- let i = n.blank(l(t.text, 4, n.to) - l(t.text, 4, n.from));
1498
+ let i = n.blank(o(t.text, 4, n.to) - o(t.text, 4, n.from));
1499
1499
  return r == t.from && (i = Q(i, e)), {
1500
- range: p.cursor(r + i.length),
1500
+ range: _.cursor(r + i.length),
1501
1501
  changes: {
1502
1502
  from: r,
1503
1503
  to: t.from + n.to,
@@ -1506,7 +1506,7 @@ var Mt = ({ state: e, dispatch: t }) => {
1506
1506
  };
1507
1507
  }
1508
1508
  if (r < i) return {
1509
- range: p.cursor(r),
1509
+ range: _.cursor(r),
1510
1510
  changes: {
1511
1511
  from: r,
1512
1512
  to: i
@@ -1529,22 +1529,22 @@ var Mt = ({ state: e, dispatch: t }) => {
1529
1529
  run: Mt
1530
1530
  }], Pt = /*@__PURE__*/ ue({ matchClosingTags: !1 });
1531
1531
  function Ft(e = {}) {
1532
- let { codeLanguages: t, defaultCodeLanguage: r, addKeymap: i = !0, base: { parser: a } = St, completeHTMLTags: o = !0, pasteURLAsLink: s = !0, htmlTagLanguage: c = Pt } = e;
1533
- if (!(a instanceof Ae)) throw RangeError("Base parser provided to `markdown` should be a Markdown parser");
1534
- let l = e.extensions ? [e.extensions] : [], u = [c.support, xt], d;
1535
- s && u.push(zt), r instanceof se ? (u.push(r.support), d = r.language) : r && (d = r);
1536
- let f = t || d ? Ct(t, d) : void 0;
1537
- l.push(qe({
1532
+ let { codeLanguages: t, defaultCodeLanguage: n, addKeymap: r = !0, base: { parser: i } = St, completeHTMLTags: a = !0, pasteURLAsLink: o = !0, htmlTagLanguage: s = Pt } = e;
1533
+ if (!(i instanceof Ae)) throw RangeError("Base parser provided to `markdown` should be a Markdown parser");
1534
+ let c = e.extensions ? [e.extensions] : [], l = [s.support, xt], u;
1535
+ o && l.push(zt), n instanceof g ? (l.push(n.support), u = n.language) : n && (u = n);
1536
+ let f = t || u ? Ct(t, u) : void 0;
1537
+ c.push(qe({
1538
1538
  codeParser: f,
1539
- htmlParser: c.language.parser
1540
- })), i && u.push(n.high(oe.of(Nt)));
1541
- let p = J(a.configure(l));
1542
- return o && u.push(p.data.of({ autocomplete: It })), new se(p, u);
1539
+ htmlParser: s.language.parser
1540
+ })), r && l.push(d.high(re.of(Nt)));
1541
+ let p = J(i.configure(c));
1542
+ return a && l.push(p.data.of({ autocomplete: It })), new g(p, l);
1543
1543
  }
1544
1544
  function It(e) {
1545
1545
  let { state: t, pos: n } = e, r = /<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(n - 25, n));
1546
1546
  if (!r) return null;
1547
- let i = s(t).resolveInner(n, -1);
1547
+ let i = a(t).resolveInner(n, -1);
1548
1548
  for (; i && !i.type.isTop;) {
1549
1549
  if (i.name == "CodeBlock" || i.name == "FencedCode" || i.name == "ProcessingInstructionBlock" || i.name == "CommentBlock" || i.name == "Link" || i.name == "Image") return null;
1550
1550
  i = i.parent;
@@ -1559,25 +1559,25 @@ function It(e) {
1559
1559
  var $ = null;
1560
1560
  function Lt() {
1561
1561
  if ($) return $;
1562
- let e = de(new le(t.create({ extensions: Pt }), 0, !0));
1562
+ let e = de(new le(se.create({ extensions: Pt }), 0, !0));
1563
1563
  return $ = e ? e.options : [];
1564
1564
  }
1565
- var Rt = /code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i, zt = /*@__PURE__*/ r.domEventHandlers({ paste: (e, t) => {
1565
+ var Rt = /code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i, zt = /*@__PURE__*/ p.domEventHandlers({ paste: (e, t) => {
1566
1566
  let { main: n } = t.state.selection;
1567
1567
  if (n.empty) return !1;
1568
1568
  let r = e.clipboardData?.getData("text/plain");
1569
1569
  if (!r || !/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r) || (/^www\./.test(r) && (r = "https://" + r), !Y.isActiveAt(t.state, n.from, 1))) return !1;
1570
- let i = s(t.state), a = !1;
1570
+ let i = a(t.state), o = !1;
1571
1571
  return i.iterate({
1572
1572
  from: n.from,
1573
1573
  to: n.to,
1574
1574
  enter: (e) => {
1575
- (e.from > n.from || Rt.test(e.name)) && (a = !0);
1575
+ (e.from > n.from || Rt.test(e.name)) && (o = !0);
1576
1576
  },
1577
1577
  leave: (e) => {
1578
- e.to < n.to && (a = !0);
1578
+ e.to < n.to && (o = !0);
1579
1579
  }
1580
- }), !a && (t.dispatch({
1580
+ }), !o && (t.dispatch({
1581
1581
  changes: [{
1582
1582
  from: n.from,
1583
1583
  insert: "["