@marimo-team/islands 0.19.10-dev9 → 0.19.11-dev0

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 (94) hide show
  1. package/dist/Plot-C9vQQj4X.js +172249 -0
  2. package/dist/{any-language-editor-CKEbZakX.js → any-language-editor-t_VsTNa-.js} +16 -16
  3. package/dist/dist-4YNZxwMI.js +8 -0
  4. package/dist/dist-7nR3r2kG.js +5 -0
  5. package/dist/{dist-CBA36Nuy.js → dist-B2-r9y-0.js} +109 -109
  6. package/dist/dist-B2gkyT3r.js +5 -0
  7. package/dist/{dist-DRtGOCCq.js → dist-B4tYJP_i.js} +2 -2
  8. package/dist/{dist-C0e1aNzV.js → dist-B5ATpkxy.js} +2 -2
  9. package/dist/dist-B8G3I6vJ.js +8 -0
  10. package/dist/{dist-DKnxaCRl.js → dist-B94MxrQS.js} +2 -2
  11. package/dist/dist-BJ96Ykfp.js +8 -0
  12. package/dist/dist-BKLIWGw4.js +5 -0
  13. package/dist/{dist-l0KayR2-.js → dist-BLwfpZD-.js} +2 -2
  14. package/dist/{dist-CzKXtzDE.js → dist-BYmtF1W6.js} +2 -2
  15. package/dist/{dist-BJUs1DAG.js → dist-BbBnU4tG.js} +1 -1
  16. package/dist/dist-Bf3ou00A.js +6 -0
  17. package/dist/{dist-CITQGRtG.js → dist-BfactX3G.js} +4 -4
  18. package/dist/{dist-DiCjkKC2.js → dist-BoAHOW2l.js} +2 -2
  19. package/dist/{dist-BsBHh4jO.js → dist-Bsv_ARko.js} +4 -4
  20. package/dist/dist-BvkKXuPm.js +5 -0
  21. package/dist/{dist-DsqQCNKw.js → dist-C2-m5aEk.js} +119 -119
  22. package/dist/dist-C6NJ3n6r.js +5 -0
  23. package/dist/{dist-yI-ah_iK.js → dist-CC9VUnXd.js} +1 -1
  24. package/dist/{dist-tdABwZK5.js → dist-CE43BRmt.js} +1 -1
  25. package/dist/{dist-COp5dkis.js → dist-CJrHMxlI.js} +31 -31
  26. package/dist/{dist-Ct5hkOvC.js → dist-CPTE45iS.js} +1 -1
  27. package/dist/{dist-C-at-5cM.js → dist-CcOGT46m.js} +27 -27
  28. package/dist/dist-CecLPYY5.js +5 -0
  29. package/dist/{dist-BSMZYwqW.js → dist-Cgf353Ki.js} +1 -1
  30. package/dist/dist-Ch0SwRzK.js +5 -0
  31. package/dist/{dist-BqYNqP5W.js → dist-CkEUrAus.js} +2 -2
  32. package/dist/{dist-D4ObdSdT.js → dist-CmZYrgd_.js} +1 -1
  33. package/dist/{dist-D1q38GZb.js → dist-Crk9ejOy.js} +4 -4
  34. package/dist/dist-D6eWHiFh.js +6 -0
  35. package/dist/dist-DCQ710Bv.js +5 -0
  36. package/dist/{dist-r6N_0WG-.js → dist-DOil6y-3.js} +4 -4
  37. package/dist/{dist-CPd_adhw.js → dist-Dc1SFk5I.js} +2 -2
  38. package/dist/dist-Dit9tk8a.js +1242 -0
  39. package/dist/{dist-B7NoEgR4.js → dist-DqJdzAYM.js} +2 -2
  40. package/dist/dist-P_pkS5f-.js +8 -0
  41. package/dist/{dist-CsjsvW0K.js → dist-T4g7Sr6e.js} +3 -3
  42. package/dist/{dist-WETuLs_C.js → dist-glA_fIK_.js} +2 -2
  43. package/dist/{dist-bRBEzJF8.js → dist-iiugPhCC.js} +1 -1
  44. package/dist/{dist-D7jHtwN8.js → dist-r8ecBV-v.js} +135 -65
  45. package/dist/{dist-BlRm4v0e.js → dist-yVJ4xE5n.js} +5 -5
  46. package/dist/{esm-QY6C-Sev.js → esm-BAS2d2Ad.js} +1421 -1454
  47. package/dist/main.js +421 -383
  48. package/package.json +11 -11
  49. package/src/components/data-table/TableActions.tsx +8 -1
  50. package/src/components/data-table/data-table.tsx +2 -0
  51. package/src/components/data-table/download-actions.tsx +6 -1
  52. package/src/components/dependency-graph/dependency-graph-tree.tsx +10 -1
  53. package/src/components/dependency-graph/dependency-graph.tsx +1 -0
  54. package/src/components/dependency-graph/elements.ts +20 -9
  55. package/src/components/dependency-graph/panels.tsx +27 -11
  56. package/src/components/dependency-graph/types.ts +1 -0
  57. package/src/components/editor/chrome/wrapper/app-chrome.tsx +3 -0
  58. package/src/components/editor/package-alert.tsx +4 -4
  59. package/src/components/editor/renderers/vertical-layout/vertical-layout.tsx +3 -5
  60. package/src/core/codemirror/misc/__tests__/paste.test.ts +18 -0
  61. package/src/core/codemirror/misc/paste.ts +14 -10
  62. package/src/core/kernel/messages.ts +1 -0
  63. package/src/core/static/static-state.ts +5 -0
  64. package/src/core/static/types.ts +2 -0
  65. package/src/core/wasm/__tests__/store.test.ts +33 -0
  66. package/src/core/wasm/bridge.ts +2 -1
  67. package/src/core/wasm/store.ts +13 -1
  68. package/src/mount.tsx +23 -1
  69. package/src/plugins/impl/DataTablePlugin.tsx +4 -0
  70. package/src/plugins/impl/anywidget/AnyWidgetPlugin.tsx +7 -5
  71. package/src/plugins/impl/anywidget/__tests__/model.test.ts +53 -0
  72. package/src/plugins/impl/anywidget/model.ts +13 -10
  73. package/src/plugins/impl/chat/ChatPlugin.tsx +2 -0
  74. package/src/plugins/impl/chat/chat-ui.tsx +10 -1
  75. package/src/plugins/impl/data-frames/DataFramePlugin.tsx +4 -0
  76. package/src/plugins/impl/plotly/Plot.tsx +2 -0
  77. package/src/plugins/impl/plotly/PlotlyPlugin.tsx +36 -0
  78. package/src/theme/ThemeProvider.tsx +2 -0
  79. package/dist/Plot-CmsrWWji.js +0 -169233
  80. package/dist/dist-BKTAAusE.js +0 -5
  81. package/dist/dist-BNXv9Wjt.js +0 -6
  82. package/dist/dist-C-tlm9eD.js +0 -6
  83. package/dist/dist-CFi_P6cs.js +0 -5
  84. package/dist/dist-CgQuqOGS.js +0 -5
  85. package/dist/dist-CgkWmw0c.js +0 -5
  86. package/dist/dist-DGkeEIsV.js +0 -8
  87. package/dist/dist-DOwZz8aI.js +0 -5
  88. package/dist/dist-DRiJGkDN.js +0 -8
  89. package/dist/dist-GR6ABeNk.js +0 -8
  90. package/dist/dist-NcujbSeH.js +0 -8
  91. package/dist/dist-g1p2PEVs.js +0 -1242
  92. package/dist/dist-pNvwCQqJ.js +0 -5
  93. package/dist/dist-wudNDAiO.js +0 -5
  94. package/dist/dist-yK8yJfz2.js +0 -5
@@ -1,5 +1,5 @@
1
- import { B as tags, G as NodeWeakMap, I as syntaxTree, O as indentNodeProp, P as sublanguageProp, S as foldInside, Tt as EditorSelection, V as IterMode, Z as EditorView, _ as defineLanguageFacet, h as continuedIndent, i as LocalTokenGroup, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, y as flatIndent, z as styleTags } from "./dist-D7jHtwN8.js";
2
- import { f as snippetCompletion, l as ifNotIn, s as completeFromList } from "./dist-g1p2PEVs.js";
1
+ import { B as tags, Et as EditorSelection, G as NodeWeakMap, I as syntaxTree, O as indentNodeProp, P as sublanguageProp, S as foldInside, V as IterMode, Z as EditorView, _ as defineLanguageFacet, h as continuedIndent, i as LocalTokenGroup, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, y as flatIndent, z as styleTags } from "./dist-r8ecBV-v.js";
2
+ import { f as snippetCompletion, l as ifNotIn, s as completeFromList } from "./dist-Dit9tk8a.js";
3
3
  var noSemi = 315, noSemiType = 316, incdec = 1, incdecPrefix = 2, questionDot = 3, JSXStartTag = 4, insertSemi = 317, spaces = 319, newline = 320, LineComment = 5, BlockComment = 6, Dialect_jsx = 0, space = [
4
4
  9,
5
5
  10,
@@ -28,52 +28,52 @@ var noSemi = 315, noSemiType = 316, incdec = 1, incdecPrefix = 2, questionDot =
28
28
  12288
29
29
  ], braceR = 125, semicolon = 59, slash = 47, star = 42, plus = 43, minus = 45, lt = 60, comma = 44, question = 63, dot = 46, bracketL = 91, trackNewline = new ContextTracker({
30
30
  start: false,
31
- shift(_, K) {
32
- return K == LineComment || K == BlockComment || K == spaces ? _ : K == newline;
31
+ shift(g, G) {
32
+ return G == LineComment || G == BlockComment || G == spaces ? g : G == newline;
33
33
  },
34
34
  strict: false
35
- }), insertSemicolon = new ExternalTokenizer((_, K) => {
36
- let { next: q } = _;
37
- (q == braceR || q == -1 || K.context) && _.acceptToken(insertSemi);
35
+ }), insertSemicolon = new ExternalTokenizer((g, G) => {
36
+ let { next: K } = g;
37
+ (K == braceR || K == -1 || G.context) && g.acceptToken(insertSemi);
38
38
  }, {
39
39
  contextual: true,
40
40
  fallback: true
41
- }), noSemicolon = new ExternalTokenizer((_, K) => {
42
- let { next: q } = _, J;
43
- space.indexOf(q) > -1 || q == slash && ((J = _.peek(1)) == slash || J == star) || q != braceR && q != semicolon && q != -1 && !K.context && _.acceptToken(noSemi);
44
- }, { contextual: true }), noSemicolonType = new ExternalTokenizer((_, K) => {
45
- _.next == bracketL && !K.context && _.acceptToken(noSemiType);
46
- }, { contextual: true }), operatorToken = new ExternalTokenizer((_, K) => {
47
- let { next: q } = _;
48
- if (q == plus || q == minus) {
49
- if (_.advance(), q == _.next) {
50
- _.advance();
51
- let q2 = !K.context && K.canShift(incdec);
52
- _.acceptToken(q2 ? incdec : incdecPrefix);
41
+ }), noSemicolon = new ExternalTokenizer((g, G) => {
42
+ let { next: K } = g, q;
43
+ space.indexOf(K) > -1 || K == slash && ((q = g.peek(1)) == slash || q == star) || K != braceR && K != semicolon && K != -1 && !G.context && g.acceptToken(noSemi);
44
+ }, { contextual: true }), noSemicolonType = new ExternalTokenizer((g, G) => {
45
+ g.next == bracketL && !G.context && g.acceptToken(noSemiType);
46
+ }, { contextual: true }), operatorToken = new ExternalTokenizer((g, G) => {
47
+ let { next: K } = g;
48
+ if (K == plus || K == minus) {
49
+ if (g.advance(), K == g.next) {
50
+ g.advance();
51
+ let K2 = !G.context && G.canShift(incdec);
52
+ g.acceptToken(K2 ? incdec : incdecPrefix);
53
53
  }
54
- } else q == question && _.peek(1) == dot && (_.advance(), _.advance(), (_.next < 48 || _.next > 57) && _.acceptToken(questionDot));
54
+ } else K == question && g.peek(1) == dot && (g.advance(), g.advance(), (g.next < 48 || g.next > 57) && g.acceptToken(questionDot));
55
55
  }, { contextual: true });
56
- function identifierChar(_, K) {
57
- return _ >= 65 && _ <= 90 || _ >= 97 && _ <= 122 || _ == 95 || _ >= 192 || !K && _ >= 48 && _ <= 57;
56
+ function identifierChar(g, G) {
57
+ return g >= 65 && g <= 90 || g >= 97 && g <= 122 || g == 95 || g >= 192 || !G && g >= 48 && g <= 57;
58
58
  }
59
- var jsx = new ExternalTokenizer((_, K) => {
60
- if (_.next != lt || !K.dialectEnabled(Dialect_jsx) || (_.advance(), _.next == slash)) return;
61
- let q = 0;
62
- for (; space.indexOf(_.next) > -1; ) _.advance(), q++;
63
- if (identifierChar(_.next, true)) {
64
- for (_.advance(), q++; identifierChar(_.next, false); ) _.advance(), q++;
65
- for (; space.indexOf(_.next) > -1; ) _.advance(), q++;
66
- if (_.next == comma) return;
67
- for (let K2 = 0; ; K2++) {
68
- if (K2 == 7) {
69
- if (!identifierChar(_.next, true)) return;
59
+ var jsx = new ExternalTokenizer((g, G) => {
60
+ if (g.next != lt || !G.dialectEnabled(Dialect_jsx) || (g.advance(), g.next == slash)) return;
61
+ let K = 0;
62
+ for (; space.indexOf(g.next) > -1; ) g.advance(), K++;
63
+ if (identifierChar(g.next, true)) {
64
+ for (g.advance(), K++; identifierChar(g.next, false); ) g.advance(), K++;
65
+ for (; space.indexOf(g.next) > -1; ) g.advance(), K++;
66
+ if (g.next == comma) return;
67
+ for (let G2 = 0; ; G2++) {
68
+ if (G2 == 7) {
69
+ if (!identifierChar(g.next, true)) return;
70
70
  break;
71
71
  }
72
- if (_.next != "extends".charCodeAt(K2)) break;
73
- _.advance(), q++;
72
+ if (g.next != "extends".charCodeAt(G2)) break;
73
+ g.advance(), K++;
74
74
  }
75
75
  }
76
- _.acceptToken(JSXStartTag, -q);
76
+ g.acceptToken(JSXStartTag, -K);
77
77
  }), jsHighlight = styleTags({
78
78
  "get set async static": tags.modifier,
79
79
  "for while do if else switch try catch finally return throw break continue default case": tags.controlKeyword,
@@ -416,15 +416,15 @@ var jsx = new ExternalTokenizer((_, K) => {
416
416
  specialized: [
417
417
  {
418
418
  term: 326,
419
- get: (_) => spec_identifier[_] || -1
419
+ get: (g) => spec_identifier[g] || -1
420
420
  },
421
421
  {
422
422
  term: 342,
423
- get: (_) => spec_word[_] || -1
423
+ get: (g) => spec_word[g] || -1
424
424
  },
425
425
  {
426
426
  term: 95,
427
- get: (_) => spec_LessThan[_] || -1
427
+ get: (g) => spec_LessThan[g] || -1
428
428
  }
429
429
  ],
430
430
  tokenPrec: 15124
@@ -509,10 +509,10 @@ var jsx = new ExternalTokenizer((_, K) => {
509
509
  "MethodDeclaration",
510
510
  "ForStatement"
511
511
  ]);
512
- function defID(_) {
513
- return (K, q) => {
514
- let J = K.node.getChild("VariableDefinition");
515
- return J && q(J, _), true;
512
+ function defID(g) {
513
+ return (G, K) => {
514
+ let q = G.node.getChild("VariableDefinition");
515
+ return q && K(q, g), true;
516
516
  };
517
517
  }
518
518
  var functionContext = ["FunctionDeclaration"], gatherCompletions = {
@@ -522,35 +522,35 @@ var functionContext = ["FunctionDeclaration"], gatherCompletions = {
522
522
  EnumDeclaration: /* @__PURE__ */ defID("constant"),
523
523
  TypeAliasDeclaration: /* @__PURE__ */ defID("type"),
524
524
  NamespaceDeclaration: /* @__PURE__ */ defID("namespace"),
525
- VariableDefinition(_, K) {
526
- _.matchContext(functionContext) || K(_, "variable");
525
+ VariableDefinition(g, G) {
526
+ g.matchContext(functionContext) || G(g, "variable");
527
527
  },
528
- TypeDefinition(_, K) {
529
- K(_, "type");
528
+ TypeDefinition(g, G) {
529
+ G(g, "type");
530
530
  },
531
531
  __proto__: null
532
532
  };
533
- function getScope(_, K) {
534
- let q = cache.get(K);
535
- if (q) return q;
536
- let J = [], Y = true;
537
- function X(K2, q2) {
538
- let Y2 = _.sliceString(K2.from, K2.to);
539
- J.push({
540
- label: Y2,
541
- type: q2
533
+ function getScope(g, G) {
534
+ let K = cache.get(G);
535
+ if (K) return K;
536
+ let q = [], J = true;
537
+ function Y(G2, K2) {
538
+ let J2 = g.sliceString(G2.from, G2.to);
539
+ q.push({
540
+ label: J2,
541
+ type: K2
542
542
  });
543
543
  }
544
- return K.cursor(IterMode.IncludeAnonymous).iterate((K2) => {
545
- if (Y) Y = false;
546
- else if (K2.name) {
547
- let _2 = gatherCompletions[K2.name];
548
- if (_2 && _2(K2, X) || ScopeNodes.has(K2.name)) return false;
549
- } else if (K2.to - K2.from > 8192) {
550
- for (let q2 of getScope(_, K2.node)) J.push(q2);
544
+ return G.cursor(IterMode.IncludeAnonymous).iterate((G2) => {
545
+ if (J) J = false;
546
+ else if (G2.name) {
547
+ let g2 = gatherCompletions[G2.name];
548
+ if (g2 && g2(G2, Y) || ScopeNodes.has(G2.name)) return false;
549
+ } else if (G2.to - G2.from > 8192) {
550
+ for (let K2 of getScope(g, G2.node)) q.push(K2);
551
551
  return false;
552
552
  }
553
- }), cache.set(K, J), J;
553
+ }), cache.set(G, q), q;
554
554
  }
555
555
  var Identifier = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, dontComplete = [
556
556
  "TemplateString",
@@ -573,16 +573,16 @@ var Identifier = /^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/, dontComplete = [
573
573
  ".",
574
574
  "?."
575
575
  ];
576
- function localCompletionSource(_) {
577
- let K = syntaxTree(_.state).resolveInner(_.pos, -1);
578
- if (dontComplete.indexOf(K.name) > -1) return null;
579
- let J = K.name == "VariableName" || K.to - K.from < 20 && Identifier.test(_.state.sliceDoc(K.from, K.to));
580
- if (!J && !_.explicit) return null;
581
- let Y = [];
582
- for (let q = K; q; q = q.parent) ScopeNodes.has(q.name) && (Y = Y.concat(getScope(_.state.doc, q)));
576
+ function localCompletionSource(g) {
577
+ let G = syntaxTree(g.state).resolveInner(g.pos, -1);
578
+ if (dontComplete.indexOf(G.name) > -1) return null;
579
+ let K = G.name == "VariableName" || G.to - G.from < 20 && Identifier.test(g.state.sliceDoc(G.from, G.to));
580
+ if (!K && !g.explicit) return null;
581
+ let J = [];
582
+ for (let K2 = G; K2; K2 = K2.parent) ScopeNodes.has(K2.name) && (J = J.concat(getScope(g.state.doc, K2)));
583
583
  return {
584
- options: Y,
585
- from: J ? K.from : _.pos,
584
+ options: J,
585
+ from: K ? G.from : g.pos,
586
586
  validFor: Identifier
587
587
  };
588
588
  }
@@ -592,31 +592,31 @@ var javascriptLanguage = /* @__PURE__ */ LRLanguage.define({
592
592
  IfStatement: /* @__PURE__ */ continuedIndent({ except: /^\s*({|else\b)/ }),
593
593
  TryStatement: /* @__PURE__ */ continuedIndent({ except: /^\s*({|catch\b|finally\b)/ }),
594
594
  LabeledStatement: flatIndent,
595
- SwitchBody: (_) => {
596
- let K = _.textAfter, q = /^\s*\}/.test(K), J = /^\s*(case|default)\b/.test(K);
597
- return _.baseIndent + (q ? 0 : J ? 1 : 2) * _.unit;
595
+ SwitchBody: (g) => {
596
+ let G = g.textAfter, K = /^\s*\}/.test(G), q = /^\s*(case|default)\b/.test(G);
597
+ return g.baseIndent + (K ? 0 : q ? 1 : 2) * g.unit;
598
598
  },
599
599
  Block: /* @__PURE__ */ delimitedIndent({ closing: "}" }),
600
- ArrowFunction: (_) => _.baseIndent + _.unit,
600
+ ArrowFunction: (g) => g.baseIndent + g.unit,
601
601
  "TemplateString BlockComment": () => null,
602
602
  "Statement Property": /* @__PURE__ */ continuedIndent({ except: /^\s*{/ }),
603
- JSXElement(_) {
604
- let K = /^\s*<\//.test(_.textAfter);
605
- return _.lineIndent(_.node.from) + (K ? 0 : _.unit);
603
+ JSXElement(g) {
604
+ let G = /^\s*<\//.test(g.textAfter);
605
+ return g.lineIndent(g.node.from) + (G ? 0 : g.unit);
606
606
  },
607
- JSXEscape(_) {
608
- let K = /\s*\}/.test(_.textAfter);
609
- return _.lineIndent(_.node.from) + (K ? 0 : _.unit);
607
+ JSXEscape(g) {
608
+ let G = /\s*\}/.test(g.textAfter);
609
+ return g.lineIndent(g.node.from) + (G ? 0 : g.unit);
610
610
  },
611
- "JSXOpenTag JSXSelfClosingTag"(_) {
612
- return _.column(_.node.from) + _.unit;
611
+ "JSXOpenTag JSXSelfClosingTag"(g) {
612
+ return g.column(g.node.from) + g.unit;
613
613
  }
614
614
  }), /* @__PURE__ */ foldNodeProp.add({
615
615
  "Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType": foldInside,
616
- BlockComment(_) {
616
+ BlockComment(g) {
617
617
  return {
618
- from: _.from + 2,
619
- to: _.to - 2
618
+ from: g.from + 2,
619
+ to: g.to - 2
620
620
  };
621
621
  }
622
622
  })] }),
@@ -640,19 +640,19 @@ var javascriptLanguage = /* @__PURE__ */ LRLanguage.define({
640
640
  wordChars: "$"
641
641
  }
642
642
  }), jsxSublanguage = {
643
- test: (_) => /^JSX/.test(_.name),
643
+ test: (g) => /^JSX/.test(g.name),
644
644
  facet: /* @__PURE__ */ defineLanguageFacet({ commentTokens: { block: {
645
645
  open: "{/*",
646
646
  close: "*/}"
647
647
  } } })
648
648
  }, typescriptLanguage = /* @__PURE__ */ javascriptLanguage.configure({ dialect: "ts" }, "typescript"), jsxLanguage = /* @__PURE__ */ javascriptLanguage.configure({
649
649
  dialect: "jsx",
650
- props: [/* @__PURE__ */ sublanguageProp.add((_) => _.isTop ? [jsxSublanguage] : void 0)]
650
+ props: [/* @__PURE__ */ sublanguageProp.add((g) => g.isTop ? [jsxSublanguage] : void 0)]
651
651
  }), tsxLanguage = /* @__PURE__ */ javascriptLanguage.configure({
652
652
  dialect: "jsx ts",
653
- props: [/* @__PURE__ */ sublanguageProp.add((_) => _.isTop ? [jsxSublanguage] : void 0)]
654
- }, "typescript"), kwCompletion = (_) => ({
655
- label: _,
653
+ props: [/* @__PURE__ */ sublanguageProp.add((g) => g.isTop ? [jsxSublanguage] : void 0)]
654
+ }, "typescript"), kwCompletion = (g) => ({
655
+ label: g,
656
656
  type: "keyword"
657
657
  }), keywords = /* @__PURE__ */ "break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(kwCompletion), typescriptKeywords = /* @__PURE__ */ keywords.concat(/* @__PURE__ */ [
658
658
  "declare",
@@ -661,54 +661,54 @@ var javascriptLanguage = /* @__PURE__ */ LRLanguage.define({
661
661
  "protected",
662
662
  "public"
663
663
  ].map(kwCompletion));
664
- function javascript(_ = {}) {
665
- let K = _.jsx ? _.typescript ? tsxLanguage : jsxLanguage : _.typescript ? typescriptLanguage : javascriptLanguage, q = _.typescript ? typescriptSnippets.concat(typescriptKeywords) : snippets.concat(keywords);
666
- return new LanguageSupport(K, [
667
- javascriptLanguage.data.of({ autocomplete: ifNotIn(dontComplete, completeFromList(q)) }),
664
+ function javascript(g = {}) {
665
+ let G = g.jsx ? g.typescript ? tsxLanguage : jsxLanguage : g.typescript ? typescriptLanguage : javascriptLanguage, K = g.typescript ? typescriptSnippets.concat(typescriptKeywords) : snippets.concat(keywords);
666
+ return new LanguageSupport(G, [
667
+ javascriptLanguage.data.of({ autocomplete: ifNotIn(dontComplete, completeFromList(K)) }),
668
668
  javascriptLanguage.data.of({ autocomplete: localCompletionSource }),
669
- _.jsx ? autoCloseTags : []
669
+ g.jsx ? autoCloseTags : []
670
670
  ]);
671
671
  }
672
- function findOpenTag(_) {
672
+ function findOpenTag(g) {
673
673
  for (; ; ) {
674
- if (_.name == "JSXOpenTag" || _.name == "JSXSelfClosingTag" || _.name == "JSXFragmentTag") return _;
675
- if (_.name == "JSXEscape" || !_.parent) return null;
676
- _ = _.parent;
674
+ if (g.name == "JSXOpenTag" || g.name == "JSXSelfClosingTag" || g.name == "JSXFragmentTag") return g;
675
+ if (g.name == "JSXEscape" || !g.parent) return null;
676
+ g = g.parent;
677
677
  }
678
678
  }
679
- function elementName(_, K, q = _.length) {
680
- for (let J = K == null ? void 0 : K.firstChild; J; J = J.nextSibling) if (J.name == "JSXIdentifier" || J.name == "JSXBuiltin" || J.name == "JSXNamespacedName" || J.name == "JSXMemberExpression") return _.sliceString(J.from, Math.min(J.to, q));
679
+ function elementName(g, G, K = g.length) {
680
+ for (let q = G == null ? void 0 : G.firstChild; q; q = q.nextSibling) if (q.name == "JSXIdentifier" || q.name == "JSXBuiltin" || q.name == "JSXNamespacedName" || q.name == "JSXMemberExpression") return g.sliceString(q.from, Math.min(q.to, K));
681
681
  return "";
682
682
  }
683
- var android = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((_, K, J, Y, X) => {
684
- if ((android ? _.composing : _.compositionStarted) || _.state.readOnly || K != J || Y != ">" && Y != "/" || !javascriptLanguage.isActiveAt(_.state, K, -1)) return false;
685
- let Z = X(), { state: Q } = Z, $ = Q.changeByRange((_2) => {
683
+ var android = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(navigator.userAgent), autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((g, K, J, Y, X) => {
684
+ if ((android ? g.composing : g.compositionStarted) || g.state.readOnly || K != J || Y != ">" && Y != "/" || !javascriptLanguage.isActiveAt(g.state, K, -1)) return false;
685
+ let Z = X(), { state: Q } = Z, $ = Q.changeByRange((g2) => {
686
686
  var _a;
687
- let { head: K2 } = _2, J2 = syntaxTree(Q).resolveInner(K2 - 1, -1), X2;
687
+ let { head: K2 } = g2, J2 = syntaxTree(Q).resolveInner(K2 - 1, -1), X2;
688
688
  if (J2.name == "JSXStartTag" && (J2 = J2.parent), !(Q.doc.sliceString(K2 - 1, K2) != Y || J2.name == "JSXAttributeValue" && J2.to > K2)) {
689
689
  if (Y == ">" && J2.name == "JSXFragmentTag") return {
690
- range: _2,
690
+ range: g2,
691
691
  changes: {
692
692
  from: K2,
693
693
  insert: "</>"
694
694
  }
695
695
  };
696
696
  if (Y == "/" && J2.name == "JSXStartCloseTag") {
697
- let _3 = J2.parent, q = _3.parent;
698
- if (q && _3.from == K2 - 2 && ((X2 = elementName(Q.doc, q.firstChild, K2)) || ((_a = q.firstChild) == null ? void 0 : _a.name) == "JSXFragmentTag")) {
699
- let _4 = `${X2}>`;
697
+ let g3 = J2.parent, q = g3.parent;
698
+ if (q && g3.from == K2 - 2 && ((X2 = elementName(Q.doc, q.firstChild, K2)) || ((_a = q.firstChild) == null ? void 0 : _a.name) == "JSXFragmentTag")) {
699
+ let g4 = `${X2}>`;
700
700
  return {
701
- range: EditorSelection.cursor(K2 + _4.length, -1),
701
+ range: EditorSelection.cursor(K2 + g4.length, -1),
702
702
  changes: {
703
703
  from: K2,
704
- insert: _4
704
+ insert: g4
705
705
  }
706
706
  };
707
707
  }
708
708
  } else if (Y == ">") {
709
- let q = findOpenTag(J2);
710
- if (q && q.name == "JSXOpenTag" && !/^\/?>|^<\//.test(Q.doc.sliceString(K2, K2 + 2)) && (X2 = elementName(Q.doc, q, K2))) return {
711
- range: _2,
709
+ let G = findOpenTag(J2);
710
+ if (G && G.name == "JSXOpenTag" && !/^\/?>|^<\//.test(Q.doc.sliceString(K2, K2 + 2)) && (X2 = elementName(Q.doc, G, K2))) return {
711
+ range: g2,
712
712
  changes: {
713
713
  from: K2,
714
714
  insert: `</${X2}>`
@@ -716,9 +716,9 @@ var android = typeof navigator == "object" && /* @__PURE__ */ /Android\b/.test(n
716
716
  };
717
717
  }
718
718
  }
719
- return { range: _2 };
719
+ return { range: g2 };
720
720
  });
721
- return $.changes.empty ? false : (_.dispatch([Z, Q.update($, {
721
+ return $.changes.empty ? false : (g.dispatch([Z, Q.update($, {
722
722
  userEvent: "input.complete",
723
723
  scrollIntoView: true
724
724
  })]), true);
@@ -0,0 +1,5 @@
1
+ import "./dist-r8ecBV-v.js";
2
+ import { i as pythonLanguage, n as localCompletionSource, r as python, t as globalCompletion } from "./dist-BLwfpZD-.js";
3
+ export {
4
+ python
5
+ };
@@ -1,4 +1,4 @@
1
- import { B as tags, O as indentNodeProp, S as foldInside, h as continuedIndent, n as ExternalTokenizer, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-D7jHtwN8.js";
1
+ import { B as tags, O as indentNodeProp, S as foldInside, h as continuedIndent, n as ExternalTokenizer, r as LRParser, s as LRLanguage, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-r8ecBV-v.js";
2
2
  var closureParamDelim = 1, tpOpen = 2, tpClose = 3, RawString = 4, Float = 5, _b = 98, _e = 101, _f = 102, _r = 114, _E = 69, Zero = 48, Dot = 46, Plus = 43, Minus = 45, Hash = 35, Quote = 34, Pipe = 124, LessThan = 60, GreaterThan = 62;
3
3
  function isNum(h) {
4
4
  return h >= 48 && h <= 57;
@@ -1,4 +1,4 @@
1
- import { B as tags, O as indentNodeProp, S as foldInside, r as LRParser, s as LRLanguage, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, z as styleTags } from "./dist-D7jHtwN8.js";
1
+ import { B as tags, O as indentNodeProp, S as foldInside, r as LRParser, s as LRLanguage, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, z as styleTags } from "./dist-r8ecBV-v.js";
2
2
  var spec_Keyword = {
3
3
  __proto__: null,
4
4
  anyref: 34,
@@ -1,6 +1,6 @@
1
- import { B as tags, I as syntaxTree, J as parseMixed, O as indentNodeProp, Tt as EditorSelection, Z as EditorView, m as bracketMatchingHandle, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-D7jHtwN8.js";
2
- import { r as cssLanguage, t as css } from "./dist-BSMZYwqW.js";
3
- import { c as typescriptLanguage, i as jsxLanguage, n as javascript, r as javascriptLanguage, s as tsxLanguage } from "./dist-DsqQCNKw.js";
1
+ import { B as tags, Et as EditorSelection, I as syntaxTree, J as parseMixed, O as indentNodeProp, Z as EditorView, m as bracketMatchingHandle, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-r8ecBV-v.js";
2
+ import { r as cssLanguage, t as css } from "./dist-Cgf353Ki.js";
3
+ import { c as typescriptLanguage, i as jsxLanguage, n as javascript, r as javascriptLanguage, s as tsxLanguage } from "./dist-C2-m5aEk.js";
4
4
  var scriptText = 54, StartCloseScriptTag = 1, styleText = 55, StartCloseStyleTag = 2, textareaText = 56, StartCloseTextareaTag = 3, EndTag = 4, SelfClosingEndTag = 5, StartTag = 6, StartScriptTag = 7, StartStyleTag = 8, StartTextareaTag = 9, StartSelfClosingTag = 10, StartCloseTag = 11, NoMatchStartCloseTag = 12, MismatchedStartCloseTag = 13, missingCloseTag = 57, IncompleteCloseTag = 14, commentContent$1 = 58, Element = 20, TagName = 22, Attribute = 23, AttributeName = 24, AttributeValue = 26, UnquotedAttributeValue = 27, ScriptText = 28, StyleText = 31, TextareaText = 34, OpenTag = 36, CloseTag = 37, Dialect_noMatch = 0, Dialect_selfClosing = 1, selfClosers$1 = {
5
5
  area: true,
6
6
  base: true,
@@ -356,16 +356,16 @@ function maybeNest(g, G, K) {
356
356
  return null;
357
357
  }
358
358
  function configureNesting(g = [], G = []) {
359
- let q = [], J = [], Y = [], X = [];
360
- for (let G2 of g) (G2.tag == "script" ? q : G2.tag == "style" ? J : G2.tag == "textarea" ? Y : X).push(G2);
359
+ let K = [], J = [], Y = [], X = [];
360
+ for (let G2 of g) (G2.tag == "script" ? K : G2.tag == "style" ? J : G2.tag == "textarea" ? Y : X).push(G2);
361
361
  let Z = G.length ? /* @__PURE__ */ Object.create(null) : null;
362
362
  for (let g2 of G) (Z[g2.name] || (Z[g2.name] = [])).push(g2);
363
363
  return parseMixed((g2, G2) => {
364
- let K = g2.type.id;
365
- if (K == ScriptText) return maybeNest(g2, G2, q);
366
- if (K == StyleText) return maybeNest(g2, G2, J);
367
- if (K == TextareaText) return maybeNest(g2, G2, Y);
368
- if (K == Element && X.length) {
364
+ let q = g2.type.id;
365
+ if (q == ScriptText) return maybeNest(g2, G2, K);
366
+ if (q == StyleText) return maybeNest(g2, G2, J);
367
+ if (q == TextareaText) return maybeNest(g2, G2, Y);
368
+ if (q == Element && X.length) {
369
369
  let K2 = g2.node, q2 = K2.firstChild, J2 = q2 && findTagName(q2, G2), Y2;
370
370
  if (J2) {
371
371
  for (let g3 of X) if (g3.tag == J2 && (!g3.attrs || g3.attrs(Y2 || (Y2 = getAttrs(q2, G2))))) {
@@ -380,7 +380,7 @@ function configureNesting(g = [], G = []) {
380
380
  }
381
381
  }
382
382
  }
383
- if (Z && K == Attribute) {
383
+ if (Z && q == Attribute) {
384
384
  let K2 = g2.node, q2;
385
385
  if (q2 = K2.firstChild) {
386
386
  let g3 = Z[G2.read(q2.from, q2.to)];
@@ -1170,14 +1170,14 @@ function completeAttrValue(g, G, K, q, J) {
1170
1170
  validFor: Z
1171
1171
  };
1172
1172
  }
1173
- function htmlCompletionFor(g, K) {
1174
- let { state: q, pos: J } = K, Y = syntaxTree(q).resolveInner(J, -1), X = Y.resolve(J);
1175
- for (let g2 = J, G; X == Y && (G = Y.childBefore(g2)); ) {
1176
- let K2 = G.lastChild;
1177
- if (!K2 || !K2.type.isError || K2.from < K2.to) break;
1178
- X = Y = G, g2 = K2.from;
1173
+ function htmlCompletionFor(g, G) {
1174
+ let { state: q, pos: J } = G, Y = syntaxTree(q).resolveInner(J, -1), X = Y.resolve(J);
1175
+ for (let g2 = J, G2; X == Y && (G2 = Y.childBefore(g2)); ) {
1176
+ let K = G2.lastChild;
1177
+ if (!K || !K.type.isError || K.from < K.to) break;
1178
+ X = Y = G2, g2 = K.from;
1179
1179
  }
1180
- return Y.name == "TagName" ? Y.parent && /CloseTag$/.test(Y.parent.name) ? completeCloseTag(q, Y, Y.from, J) : completeTag(q, g, Y, Y.from, J) : Y.name == "StartTag" ? completeTag(q, g, Y, J, J) : Y.name == "StartCloseTag" || Y.name == "IncompleteCloseTag" ? completeCloseTag(q, Y, J, J) : Y.name == "OpenTag" || Y.name == "SelfClosingTag" || Y.name == "AttributeName" ? completeAttrName(q, g, Y, Y.name == "AttributeName" ? Y.from : J, J) : Y.name == "Is" || Y.name == "AttributeValue" || Y.name == "UnquotedAttributeValue" ? completeAttrValue(q, g, Y, Y.name == "Is" ? J : Y.from, J) : K.explicit && (X.name == "Element" || X.name == "Text" || X.name == "Document") ? completeStartTag(q, g, Y, J) : null;
1180
+ return Y.name == "TagName" ? Y.parent && /CloseTag$/.test(Y.parent.name) ? completeCloseTag(q, Y, Y.from, J) : completeTag(q, g, Y, Y.from, J) : Y.name == "StartTag" ? completeTag(q, g, Y, J, J) : Y.name == "StartCloseTag" || Y.name == "IncompleteCloseTag" ? completeCloseTag(q, Y, J, J) : Y.name == "OpenTag" || Y.name == "SelfClosingTag" || Y.name == "AttributeName" ? completeAttrName(q, g, Y, Y.name == "AttributeName" ? Y.from : J, J) : Y.name == "Is" || Y.name == "AttributeValue" || Y.name == "UnquotedAttributeValue" ? completeAttrValue(q, g, Y, Y.name == "Is" ? J : Y.from, J) : G.explicit && (X.name == "Element" || X.name == "Text" || X.name == "Document") ? completeStartTag(q, g, Y, J) : null;
1181
1181
  }
1182
1182
  function htmlCompletionSource(g) {
1183
1183
  return htmlCompletionFor(Schema.default, g);
@@ -1281,31 +1281,31 @@ function html(g = {}) {
1281
1281
  css().support
1282
1282
  ]);
1283
1283
  }
1284
- var selfClosers = /* @__PURE__ */ new Set(/* @__PURE__ */ "area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")), autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((g, K, q, Y, X) => {
1285
- if (g.composing || g.state.readOnly || K != q || Y != ">" && Y != "/" || !htmlLanguage.isActiveAt(g.state, K, -1)) return false;
1284
+ var selfClosers = /* @__PURE__ */ new Set(/* @__PURE__ */ "area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")), autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((g, q, J, Y, X) => {
1285
+ if (g.composing || g.state.readOnly || q != J || Y != ">" && Y != "/" || !htmlLanguage.isActiveAt(g.state, q, -1)) return false;
1286
1286
  let Z = X(), { state: Q } = Z, $ = Q.changeByRange((g2) => {
1287
1287
  var _a, _b, _c;
1288
- let K2 = Q.doc.sliceString(g2.from - 1, g2.to) == Y, { head: q2 } = g2, X2 = syntaxTree(Q).resolveInner(q2, -1), Z2;
1289
- if (K2 && Y == ">" && X2.name == "EndTag") {
1288
+ let q2 = Q.doc.sliceString(g2.from - 1, g2.to) == Y, { head: J2 } = g2, X2 = syntaxTree(Q).resolveInner(J2, -1), Z2;
1289
+ if (q2 && Y == ">" && X2.name == "EndTag") {
1290
1290
  let G = X2.parent;
1291
- if (((_b = (_a = G.parent) == null ? void 0 : _a.lastChild) == null ? void 0 : _b.name) != "CloseTag" && (Z2 = elementName(Q.doc, G.parent, q2)) && !selfClosers.has(Z2)) return {
1291
+ if (((_b = (_a = G.parent) == null ? void 0 : _a.lastChild) == null ? void 0 : _b.name) != "CloseTag" && (Z2 = elementName(Q.doc, G.parent, J2)) && !selfClosers.has(Z2)) return {
1292
1292
  range: g2,
1293
1293
  changes: {
1294
- from: q2,
1295
- to: q2 + (Q.doc.sliceString(q2, q2 + 1) === ">" ? 1 : 0),
1294
+ from: J2,
1295
+ to: J2 + (Q.doc.sliceString(J2, J2 + 1) === ">" ? 1 : 0),
1296
1296
  insert: `</${Z2}>`
1297
1297
  }
1298
1298
  };
1299
- } else if (K2 && Y == "/" && X2.name == "IncompleteCloseTag") {
1299
+ } else if (q2 && Y == "/" && X2.name == "IncompleteCloseTag") {
1300
1300
  let g3 = X2.parent;
1301
- if (X2.from == q2 - 2 && ((_c = g3.lastChild) == null ? void 0 : _c.name) != "CloseTag" && (Z2 = elementName(Q.doc, g3, q2)) && !selfClosers.has(Z2)) {
1302
- let g4 = q2 + (Q.doc.sliceString(q2, q2 + 1) === ">" ? 1 : 0), G = `${Z2}>`;
1301
+ if (X2.from == J2 - 2 && ((_c = g3.lastChild) == null ? void 0 : _c.name) != "CloseTag" && (Z2 = elementName(Q.doc, g3, J2)) && !selfClosers.has(Z2)) {
1302
+ let g4 = J2 + (Q.doc.sliceString(J2, J2 + 1) === ">" ? 1 : 0), K = `${Z2}>`;
1303
1303
  return {
1304
- range: EditorSelection.cursor(q2 + G.length, -1),
1304
+ range: EditorSelection.cursor(J2 + K.length, -1),
1305
1305
  changes: {
1306
- from: q2,
1306
+ from: J2,
1307
1307
  to: g4,
1308
- insert: G
1308
+ insert: K
1309
1309
  }
1310
1310
  };
1311
1311
  }
@@ -1,4 +1,4 @@
1
- import { B as tags, O as indentNodeProp, S as foldInside, h as continuedIndent, r as LRParser, s as LRLanguage, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, y as flatIndent, z as styleTags } from "./dist-D7jHtwN8.js";
1
+ import { B as tags, O as indentNodeProp, S as foldInside, h as continuedIndent, r as LRParser, s as LRLanguage, u as LanguageSupport, v as delimitedIndent, w as foldNodeProp, y as flatIndent, z as styleTags } from "./dist-r8ecBV-v.js";
2
2
  var javaHighlighting = styleTags({
3
3
  null: tags.null,
4
4
  instanceof: tags.operatorKeyword,
@@ -1,4 +1,4 @@
1
- import { B as tags, I as syntaxTree, O as indentNodeProp, Tt as EditorSelection, Z as EditorView, m as bracketMatchingHandle, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-D7jHtwN8.js";
1
+ import { B as tags, Et as EditorSelection, I as syntaxTree, O as indentNodeProp, Z as EditorView, m as bracketMatchingHandle, n as ExternalTokenizer, r as LRParser, s as LRLanguage, t as ContextTracker, u as LanguageSupport, w as foldNodeProp, z as styleTags } from "./dist-r8ecBV-v.js";
2
2
  var StartTag = 1, StartCloseTag = 2, MissingCloseTag = 3, mismatchedStartCloseTag = 4, incompleteStartCloseTag = 5, commentContent$1 = 36, piContent$1 = 37, cdataContent$1 = 38, Element$1 = 11, OpenTag = 13;
3
3
  function nameChar(m) {
4
4
  return m == 45 || m == 46 || m == 58 || m >= 65 && m <= 90 || m == 95 || m >= 97 && m <= 122 || m >= 161;
@@ -141,11 +141,11 @@ function findParentElement(m) {
141
141
  for (let V = m && m.parent; V; V = V.parent) if (V.name == "Element") return V;
142
142
  return null;
143
143
  }
144
- function findLocation(m, H) {
144
+ function findLocation(m, V) {
145
145
  var _a;
146
- let U = syntaxTree(m).resolveInner(H, -1), W = null;
146
+ let U = syntaxTree(m).resolveInner(V, -1), W = null;
147
147
  for (let m2 = U; !W && m2.parent; m2 = m2.parent) (m2.name == "OpenTag" || m2.name == "CloseTag" || m2.name == "SelfClosingTag" || m2.name == "MismatchedCloseTag") && (W = m2);
148
- if (W && (W.to > H || W.lastChild.type.isError)) {
148
+ if (W && (W.to > V || W.lastChild.type.isError)) {
149
149
  let m2 = W.parent;
150
150
  if (U.name == "TagName") return W.name == "CloseTag" || W.name == "MismatchedCloseTag" ? {
151
151
  type: "closeTag",
@@ -166,33 +166,33 @@ function findLocation(m, H) {
166
166
  from: U.from,
167
167
  context: W
168
168
  };
169
- let V = U == W || U.name == "Attribute" ? U.childBefore(H) : U;
170
- return (V == null ? void 0 : V.name) == "StartTag" ? {
169
+ let H = U == W || U.name == "Attribute" ? U.childBefore(V) : U;
170
+ return (H == null ? void 0 : H.name) == "StartTag" ? {
171
171
  type: "openTag",
172
- from: H,
172
+ from: V,
173
173
  context: findParentElement(m2)
174
- } : (V == null ? void 0 : V.name) == "StartCloseTag" && V.to <= H ? {
174
+ } : (H == null ? void 0 : H.name) == "StartCloseTag" && H.to <= V ? {
175
175
  type: "closeTag",
176
- from: H,
176
+ from: V,
177
177
  context: m2
178
- } : (V == null ? void 0 : V.name) == "Is" ? {
178
+ } : (H == null ? void 0 : H.name) == "Is" ? {
179
179
  type: "attrValue",
180
- from: H,
180
+ from: V,
181
181
  context: W
182
- } : V ? {
182
+ } : H ? {
183
183
  type: "attrName",
184
- from: H,
184
+ from: V,
185
185
  context: W
186
186
  } : null;
187
187
  } else if (U.name == "StartCloseTag") return {
188
188
  type: "closeTag",
189
- from: H,
189
+ from: V,
190
190
  context: U.parent
191
191
  };
192
- for (; U.parent && U.to == H && !((_a = U.lastChild) == null ? void 0 : _a.type.isError); ) U = U.parent;
192
+ for (; U.parent && U.to == V && !((_a = U.lastChild) == null ? void 0 : _a.type.isError); ) U = U.parent;
193
193
  return U.name == "Element" || U.name == "Text" || U.name == "Document" ? {
194
194
  type: "tag",
195
- from: H,
195
+ from: V,
196
196
  context: U.name == "Element" ? U : findParentElement(U)
197
197
  } : null;
198
198
  }
@@ -334,31 +334,31 @@ function elementName(m, V, H = m.length) {
334
334
  let U = V.firstChild, W = U && U.getChild("TagName");
335
335
  return W ? m.sliceString(W.from, Math.min(W.to, H)) : "";
336
336
  }
337
- var autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((m, H, W, G, K) => {
338
- if (m.composing || m.state.readOnly || H != W || G != ">" && G != "/" || !xmlLanguage.isActiveAt(m.state, H, -1)) return false;
337
+ var autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((m, U, W, G, K) => {
338
+ if (m.composing || m.state.readOnly || U != W || G != ">" && G != "/" || !xmlLanguage.isActiveAt(m.state, U, -1)) return false;
339
339
  let q = K(), { state: J } = q, Y = J.changeByRange((m2) => {
340
340
  var _a, _b, _c;
341
- let { head: H2 } = m2, W2 = J.doc.sliceString(H2 - 1, H2) == G, K2 = syntaxTree(J).resolveInner(H2, -1), q2;
341
+ let { head: U2 } = m2, W2 = J.doc.sliceString(U2 - 1, U2) == G, K2 = syntaxTree(J).resolveInner(U2, -1), q2;
342
342
  if (W2 && G == ">" && K2.name == "EndTag") {
343
343
  let V = K2.parent;
344
- if (((_b = (_a = V.parent) == null ? void 0 : _a.lastChild) == null ? void 0 : _b.name) != "CloseTag" && (q2 = elementName(J.doc, V.parent, H2))) return {
344
+ if (((_b = (_a = V.parent) == null ? void 0 : _a.lastChild) == null ? void 0 : _b.name) != "CloseTag" && (q2 = elementName(J.doc, V.parent, U2))) return {
345
345
  range: m2,
346
346
  changes: {
347
- from: H2,
348
- to: H2 + (J.doc.sliceString(H2, H2 + 1) === ">" ? 1 : 0),
347
+ from: U2,
348
+ to: U2 + (J.doc.sliceString(U2, U2 + 1) === ">" ? 1 : 0),
349
349
  insert: `</${q2}>`
350
350
  }
351
351
  };
352
352
  } else if (W2 && G == "/" && K2.name == "StartCloseTag") {
353
353
  let m3 = K2.parent;
354
- if (K2.from == H2 - 2 && ((_c = m3.lastChild) == null ? void 0 : _c.name) != "CloseTag" && (q2 = elementName(J.doc, m3, H2))) {
355
- let m4 = H2 + (J.doc.sliceString(H2, H2 + 1) === ">" ? 1 : 0), V = `${q2}>`;
354
+ if (K2.from == U2 - 2 && ((_c = m3.lastChild) == null ? void 0 : _c.name) != "CloseTag" && (q2 = elementName(J.doc, m3, U2))) {
355
+ let m4 = U2 + (J.doc.sliceString(U2, U2 + 1) === ">" ? 1 : 0), H = `${q2}>`;
356
356
  return {
357
- range: EditorSelection.cursor(H2 + V.length, -1),
357
+ range: EditorSelection.cursor(U2 + H.length, -1),
358
358
  changes: {
359
- from: H2,
359
+ from: U2,
360
360
  to: m4,
361
- insert: V
361
+ insert: H
362
362
  }
363
363
  };
364
364
  }