groove-dev 0.22.7 → 0.22.9

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 (125) hide show
  1. package/node_modules/@groove-dev/daemon/src/api.js +12 -2
  2. package/node_modules/@groove-dev/daemon/src/gateways/manager.js +3 -0
  3. package/node_modules/@groove-dev/gui/dist/assets/{index-B6DQvtWt.js → index-BKZQfaOu.js} +19 -19
  4. package/node_modules/@groove-dev/gui/dist/assets/index-CDWObHaG.css +1 -0
  5. package/node_modules/@groove-dev/gui/dist/index.html +2 -2
  6. package/node_modules/@groove-dev/gui/src/components/agents/agent-feed.jsx +1 -1
  7. package/node_modules/@groove-dev/gui/src/views/agents.jsx +5 -2
  8. package/package.json +1 -1
  9. package/packages/daemon/src/api.js +12 -2
  10. package/packages/daemon/src/gateways/manager.js +3 -0
  11. package/packages/gui/dist/assets/{index-B6DQvtWt.js → index-BKZQfaOu.js} +19 -19
  12. package/packages/gui/dist/assets/index-CDWObHaG.css +1 -0
  13. package/packages/gui/dist/index.html +2 -2
  14. package/packages/gui/src/components/agents/agent-feed.jsx +1 -1
  15. package/packages/gui/src/views/agents.jsx +5 -2
  16. package/node_modules/@groove-dev/gui/dist/assets/index-DHaSTu1c.css +0 -1
  17. package/packages/gui/dist/assets/index-DHaSTu1c.css +0 -1
  18. package/packages/gui/node_modules/.vite/deps/@codemirror_autocomplete.js +0 -68
  19. package/packages/gui/node_modules/.vite/deps/@codemirror_autocomplete.js.map +0 -7
  20. package/packages/gui/node_modules/.vite/deps/@codemirror_commands.js +0 -1420
  21. package/packages/gui/node_modules/.vite/deps/@codemirror_commands.js.map +0 -7
  22. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-css.js +0 -17
  23. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-css.js.map +0 -7
  24. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js +0 -22
  25. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-html.js.map +0 -7
  26. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js +0 -34
  27. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-javascript.js.map +0 -7
  28. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-json.js +0 -101
  29. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-json.js.map +0 -7
  30. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js +0 -2534
  31. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-markdown.js.map +0 -7
  32. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js +0 -789
  33. package/packages/gui/node_modules/.vite/deps/@codemirror_lang-python.js.map +0 -7
  34. package/packages/gui/node_modules/.vite/deps/@codemirror_language.js +0 -115
  35. package/packages/gui/node_modules/.vite/deps/@codemirror_language.js.map +0 -7
  36. package/packages/gui/node_modules/.vite/deps/@codemirror_search.js +0 -1136
  37. package/packages/gui/node_modules/.vite/deps/@codemirror_search.js.map +0 -7
  38. package/packages/gui/node_modules/.vite/deps/@codemirror_state.js +0 -63
  39. package/packages/gui/node_modules/.vite/deps/@codemirror_state.js.map +0 -7
  40. package/packages/gui/node_modules/.vite/deps/@codemirror_theme-one-dark.js +0 -179
  41. package/packages/gui/node_modules/.vite/deps/@codemirror_theme-one-dark.js.map +0 -7
  42. package/packages/gui/node_modules/.vite/deps/@codemirror_view.js +0 -104
  43. package/packages/gui/node_modules/.vite/deps/@codemirror_view.js.map +0 -7
  44. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js +0 -367
  45. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-dialog.js.map +0 -7
  46. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js +0 -755
  47. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-scroll-area.js.map +0 -7
  48. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-select.js +0 -1254
  49. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-select.js.map +0 -7
  50. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js +0 -436
  51. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tabs.js.map +0 -7
  52. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js +0 -531
  53. package/packages/gui/node_modules/.vite/deps/@radix-ui_react-tooltip.js.map +0 -7
  54. package/packages/gui/node_modules/.vite/deps/@xterm_addon-fit.js +0 -46
  55. package/packages/gui/node_modules/.vite/deps/@xterm_addon-fit.js.map +0 -7
  56. package/packages/gui/node_modules/.vite/deps/@xterm_addon-web-links.js +0 -121
  57. package/packages/gui/node_modules/.vite/deps/@xterm_addon-web-links.js.map +0 -7
  58. package/packages/gui/node_modules/.vite/deps/@xterm_xterm.js +0 -9237
  59. package/packages/gui/node_modules/.vite/deps/@xterm_xterm.js.map +0 -7
  60. package/packages/gui/node_modules/.vite/deps/@xyflow_react.js +0 -9934
  61. package/packages/gui/node_modules/.vite/deps/@xyflow_react.js.map +0 -7
  62. package/packages/gui/node_modules/.vite/deps/_metadata.json +0 -265
  63. package/packages/gui/node_modules/.vite/deps/chunk-3EE34IFC.js +0 -5169
  64. package/packages/gui/node_modules/.vite/deps/chunk-3EE34IFC.js.map +0 -7
  65. package/packages/gui/node_modules/.vite/deps/chunk-3IB5EUP7.js +0 -2000
  66. package/packages/gui/node_modules/.vite/deps/chunk-3IB5EUP7.js.map +0 -7
  67. package/packages/gui/node_modules/.vite/deps/chunk-3LBP22MX.js +0 -1115
  68. package/packages/gui/node_modules/.vite/deps/chunk-3LBP22MX.js.map +0 -7
  69. package/packages/gui/node_modules/.vite/deps/chunk-3Q7HT7ZF.js +0 -701
  70. package/packages/gui/node_modules/.vite/deps/chunk-3Q7HT7ZF.js.map +0 -7
  71. package/packages/gui/node_modules/.vite/deps/chunk-44CLUOQE.js +0 -1776
  72. package/packages/gui/node_modules/.vite/deps/chunk-44CLUOQE.js.map +0 -7
  73. package/packages/gui/node_modules/.vite/deps/chunk-6DLNZUA5.js +0 -142
  74. package/packages/gui/node_modules/.vite/deps/chunk-6DLNZUA5.js.map +0 -7
  75. package/packages/gui/node_modules/.vite/deps/chunk-ACEP5X2F.js +0 -292
  76. package/packages/gui/node_modules/.vite/deps/chunk-ACEP5X2F.js.map +0 -7
  77. package/packages/gui/node_modules/.vite/deps/chunk-AZUN7XMC.js +0 -87
  78. package/packages/gui/node_modules/.vite/deps/chunk-AZUN7XMC.js.map +0 -7
  79. package/packages/gui/node_modules/.vite/deps/chunk-CDLO3JFW.js +0 -1004
  80. package/packages/gui/node_modules/.vite/deps/chunk-CDLO3JFW.js.map +0 -7
  81. package/packages/gui/node_modules/.vite/deps/chunk-HPXOV7QR.js +0 -23
  82. package/packages/gui/node_modules/.vite/deps/chunk-HPXOV7QR.js.map +0 -7
  83. package/packages/gui/node_modules/.vite/deps/chunk-HVFOBSCQ.js +0 -1062
  84. package/packages/gui/node_modules/.vite/deps/chunk-HVFOBSCQ.js.map +0 -7
  85. package/packages/gui/node_modules/.vite/deps/chunk-I2PYXDFH.js +0 -1106
  86. package/packages/gui/node_modules/.vite/deps/chunk-I2PYXDFH.js.map +0 -7
  87. package/packages/gui/node_modules/.vite/deps/chunk-JPXYHBLX.js +0 -306
  88. package/packages/gui/node_modules/.vite/deps/chunk-JPXYHBLX.js.map +0 -7
  89. package/packages/gui/node_modules/.vite/deps/chunk-JYDZ3XIW.js +0 -264
  90. package/packages/gui/node_modules/.vite/deps/chunk-JYDZ3XIW.js.map +0 -7
  91. package/packages/gui/node_modules/.vite/deps/chunk-PR4QN5HX.js +0 -42
  92. package/packages/gui/node_modules/.vite/deps/chunk-PR4QN5HX.js.map +0 -7
  93. package/packages/gui/node_modules/.vite/deps/chunk-QZQGPDRM.js +0 -2328
  94. package/packages/gui/node_modules/.vite/deps/chunk-QZQGPDRM.js.map +0 -7
  95. package/packages/gui/node_modules/.vite/deps/chunk-RE2FU7ZU.js +0 -10985
  96. package/packages/gui/node_modules/.vite/deps/chunk-RE2FU7ZU.js.map +0 -7
  97. package/packages/gui/node_modules/.vite/deps/chunk-UO4Y2XXS.js +0 -105
  98. package/packages/gui/node_modules/.vite/deps/chunk-UO4Y2XXS.js.map +0 -7
  99. package/packages/gui/node_modules/.vite/deps/chunk-VW6LO3QI.js +0 -9
  100. package/packages/gui/node_modules/.vite/deps/chunk-VW6LO3QI.js.map +0 -7
  101. package/packages/gui/node_modules/.vite/deps/chunk-YAD7VOVN.js +0 -280
  102. package/packages/gui/node_modules/.vite/deps/chunk-YAD7VOVN.js.map +0 -7
  103. package/packages/gui/node_modules/.vite/deps/chunk-YYJMNVCJ.js +0 -3459
  104. package/packages/gui/node_modules/.vite/deps/chunk-YYJMNVCJ.js.map +0 -7
  105. package/packages/gui/node_modules/.vite/deps/clsx.js +0 -22
  106. package/packages/gui/node_modules/.vite/deps/clsx.js.map +0 -7
  107. package/packages/gui/node_modules/.vite/deps/framer-motion.js +0 -12732
  108. package/packages/gui/node_modules/.vite/deps/framer-motion.js.map +0 -7
  109. package/packages/gui/node_modules/.vite/deps/lucide-react.js +0 -29653
  110. package/packages/gui/node_modules/.vite/deps/lucide-react.js.map +0 -7
  111. package/packages/gui/node_modules/.vite/deps/package.json +0 -3
  112. package/packages/gui/node_modules/.vite/deps/react-dom.js +0 -6
  113. package/packages/gui/node_modules/.vite/deps/react-dom.js.map +0 -7
  114. package/packages/gui/node_modules/.vite/deps/react-dom_client.js +0 -20217
  115. package/packages/gui/node_modules/.vite/deps/react-dom_client.js.map +0 -7
  116. package/packages/gui/node_modules/.vite/deps/react.js +0 -5
  117. package/packages/gui/node_modules/.vite/deps/react.js.map +0 -7
  118. package/packages/gui/node_modules/.vite/deps/react_jsx-dev-runtime.js +0 -278
  119. package/packages/gui/node_modules/.vite/deps/react_jsx-dev-runtime.js.map +0 -7
  120. package/packages/gui/node_modules/.vite/deps/react_jsx-runtime.js +0 -6
  121. package/packages/gui/node_modules/.vite/deps/react_jsx-runtime.js.map +0 -7
  122. package/packages/gui/node_modules/.vite/deps/tailwind-merge.js +0 -3263
  123. package/packages/gui/node_modules/.vite/deps/tailwind-merge.js.map +0 -7
  124. package/packages/gui/node_modules/.vite/deps/zustand.js +0 -56
  125. package/packages/gui/node_modules/.vite/deps/zustand.js.map +0 -7
@@ -1,1115 +0,0 @@
1
- import {
2
- css,
3
- cssLanguage
4
- } from "./chunk-HVFOBSCQ.js";
5
- import {
6
- javascript,
7
- javascriptLanguage,
8
- jsxLanguage,
9
- tsxLanguage,
10
- typescriptLanguage
11
- } from "./chunk-3Q7HT7ZF.js";
12
- import {
13
- ContextTracker,
14
- ExternalTokenizer,
15
- LRParser
16
- } from "./chunk-44CLUOQE.js";
17
- import {
18
- LRLanguage,
19
- LanguageSupport,
20
- bracketMatchingHandle,
21
- foldNodeProp,
22
- indentNodeProp,
23
- parseMixed,
24
- styleTags,
25
- syntaxTree,
26
- tags
27
- } from "./chunk-3EE34IFC.js";
28
- import {
29
- EditorView
30
- } from "./chunk-RE2FU7ZU.js";
31
- import {
32
- EditorSelection
33
- } from "./chunk-YYJMNVCJ.js";
34
-
35
- // ../../node_modules/@lezer/html/dist/index.js
36
- var scriptText = 55;
37
- var StartCloseScriptTag = 1;
38
- var styleText = 56;
39
- var StartCloseStyleTag = 2;
40
- var textareaText = 57;
41
- var StartCloseTextareaTag = 3;
42
- var EndTag = 4;
43
- var SelfClosingEndTag = 5;
44
- var StartTag = 6;
45
- var StartScriptTag = 7;
46
- var StartStyleTag = 8;
47
- var StartTextareaTag = 9;
48
- var StartSelfClosingTag = 10;
49
- var StartCloseTag = 11;
50
- var NoMatchStartCloseTag = 12;
51
- var MismatchedStartCloseTag = 13;
52
- var missingCloseTag = 58;
53
- var IncompleteTag = 14;
54
- var IncompleteCloseTag = 15;
55
- var commentContent$1 = 59;
56
- var Element = 21;
57
- var TagName = 23;
58
- var Attribute = 24;
59
- var AttributeName = 25;
60
- var AttributeValue = 27;
61
- var UnquotedAttributeValue = 28;
62
- var ScriptText = 29;
63
- var StyleText = 32;
64
- var TextareaText = 35;
65
- var OpenTag = 37;
66
- var CloseTag = 38;
67
- var Dialect_noMatch = 0;
68
- var Dialect_selfClosing = 1;
69
- var selfClosers = {
70
- area: true,
71
- base: true,
72
- br: true,
73
- col: true,
74
- command: true,
75
- embed: true,
76
- frame: true,
77
- hr: true,
78
- img: true,
79
- input: true,
80
- keygen: true,
81
- link: true,
82
- meta: true,
83
- param: true,
84
- source: true,
85
- track: true,
86
- wbr: true,
87
- menuitem: true
88
- };
89
- var implicitlyClosed = {
90
- dd: true,
91
- li: true,
92
- optgroup: true,
93
- option: true,
94
- p: true,
95
- rp: true,
96
- rt: true,
97
- tbody: true,
98
- td: true,
99
- tfoot: true,
100
- th: true,
101
- tr: true
102
- };
103
- var closeOnOpen = {
104
- dd: { dd: true, dt: true },
105
- dt: { dd: true, dt: true },
106
- li: { li: true },
107
- option: { option: true, optgroup: true },
108
- optgroup: { optgroup: true },
109
- p: {
110
- address: true,
111
- article: true,
112
- aside: true,
113
- blockquote: true,
114
- dir: true,
115
- div: true,
116
- dl: true,
117
- fieldset: true,
118
- footer: true,
119
- form: true,
120
- h1: true,
121
- h2: true,
122
- h3: true,
123
- h4: true,
124
- h5: true,
125
- h6: true,
126
- header: true,
127
- hgroup: true,
128
- hr: true,
129
- menu: true,
130
- nav: true,
131
- ol: true,
132
- p: true,
133
- pre: true,
134
- section: true,
135
- table: true,
136
- ul: true
137
- },
138
- rp: { rp: true, rt: true },
139
- rt: { rp: true, rt: true },
140
- tbody: { tbody: true, tfoot: true },
141
- td: { td: true, th: true },
142
- tfoot: { tbody: true },
143
- th: { td: true, th: true },
144
- thead: { tbody: true, tfoot: true },
145
- tr: { tr: true }
146
- };
147
- function nameChar(ch) {
148
- return ch == 45 || ch == 46 || ch == 58 || ch >= 65 && ch <= 90 || ch == 95 || ch >= 97 && ch <= 122 || ch >= 161;
149
- }
150
- var cachedName = null;
151
- var cachedInput = null;
152
- var cachedPos = 0;
153
- function tagNameAfter(input, offset) {
154
- let pos = input.pos + offset;
155
- if (cachedPos == pos && cachedInput == input) return cachedName;
156
- let next = input.peek(offset), name = "";
157
- for (; ; ) {
158
- if (!nameChar(next)) break;
159
- name += String.fromCharCode(next);
160
- next = input.peek(++offset);
161
- }
162
- cachedInput = input;
163
- cachedPos = pos;
164
- return cachedName = name ? name.toLowerCase() : next == question || next == bang ? void 0 : null;
165
- }
166
- var lessThan = 60;
167
- var greaterThan = 62;
168
- var slash = 47;
169
- var question = 63;
170
- var bang = 33;
171
- var dash = 45;
172
- function ElementContext(name, parent) {
173
- this.name = name;
174
- this.parent = parent;
175
- }
176
- var startTagTerms = [StartTag, StartSelfClosingTag, StartScriptTag, StartStyleTag, StartTextareaTag];
177
- var elementContext = new ContextTracker({
178
- start: null,
179
- shift(context, term, stack, input) {
180
- return startTagTerms.indexOf(term) > -1 ? new ElementContext(tagNameAfter(input, 1) || "", context) : context;
181
- },
182
- reduce(context, term) {
183
- return term == Element && context ? context.parent : context;
184
- },
185
- reuse(context, node, stack, input) {
186
- let type = node.type.id;
187
- return type == StartTag || type == OpenTag ? new ElementContext(tagNameAfter(input, 1) || "", context) : context;
188
- },
189
- strict: false
190
- });
191
- var tagStart = new ExternalTokenizer((input, stack) => {
192
- if (input.next != lessThan) {
193
- if (input.next < 0 && stack.context) input.acceptToken(missingCloseTag);
194
- return;
195
- }
196
- input.advance();
197
- let close = input.next == slash;
198
- if (close) input.advance();
199
- let name = tagNameAfter(input, 0);
200
- if (name === void 0) return;
201
- if (!name) return input.acceptToken(close ? IncompleteCloseTag : IncompleteTag);
202
- let parent = stack.context ? stack.context.name : null;
203
- if (close) {
204
- if (name == parent) return input.acceptToken(StartCloseTag);
205
- if (parent && implicitlyClosed[parent]) return input.acceptToken(missingCloseTag, -2);
206
- if (stack.dialectEnabled(Dialect_noMatch)) return input.acceptToken(NoMatchStartCloseTag);
207
- for (let cx = stack.context; cx; cx = cx.parent) if (cx.name == name) return;
208
- input.acceptToken(MismatchedStartCloseTag);
209
- } else {
210
- if (name == "script") return input.acceptToken(StartScriptTag);
211
- if (name == "style") return input.acceptToken(StartStyleTag);
212
- if (name == "textarea") return input.acceptToken(StartTextareaTag);
213
- if (selfClosers.hasOwnProperty(name)) return input.acceptToken(StartSelfClosingTag);
214
- if (parent && closeOnOpen[parent] && closeOnOpen[parent][name]) input.acceptToken(missingCloseTag, -1);
215
- else input.acceptToken(StartTag);
216
- }
217
- }, { contextual: true });
218
- var commentContent = new ExternalTokenizer((input) => {
219
- for (let dashes = 0, i = 0; ; i++) {
220
- if (input.next < 0) {
221
- if (i) input.acceptToken(commentContent$1);
222
- break;
223
- }
224
- if (input.next == dash) {
225
- dashes++;
226
- } else if (input.next == greaterThan && dashes >= 2) {
227
- if (i >= 3) input.acceptToken(commentContent$1, -2);
228
- break;
229
- } else {
230
- dashes = 0;
231
- }
232
- input.advance();
233
- }
234
- });
235
- function inForeignElement(context) {
236
- for (; context; context = context.parent)
237
- if (context.name == "svg" || context.name == "math") return true;
238
- return false;
239
- }
240
- var endTag = new ExternalTokenizer((input, stack) => {
241
- if (input.next == slash && input.peek(1) == greaterThan) {
242
- let selfClosing = stack.dialectEnabled(Dialect_selfClosing) || inForeignElement(stack.context);
243
- input.acceptToken(selfClosing ? SelfClosingEndTag : EndTag, 2);
244
- } else if (input.next == greaterThan) {
245
- input.acceptToken(EndTag, 1);
246
- }
247
- });
248
- function contentTokenizer(tag, textToken, endToken) {
249
- let lastState = 2 + tag.length;
250
- return new ExternalTokenizer((input) => {
251
- for (let state = 0, matchedLen = 0, i = 0; ; i++) {
252
- if (input.next < 0) {
253
- if (i) input.acceptToken(textToken);
254
- break;
255
- }
256
- if (state == 0 && input.next == lessThan || state == 1 && input.next == slash || state >= 2 && state < lastState && input.next == tag.charCodeAt(state - 2)) {
257
- state++;
258
- matchedLen++;
259
- } else if (state == lastState && input.next == greaterThan) {
260
- if (i > matchedLen)
261
- input.acceptToken(textToken, -matchedLen);
262
- else
263
- input.acceptToken(endToken, -(matchedLen - 2));
264
- break;
265
- } else if ((input.next == 10 || input.next == 13) && i) {
266
- input.acceptToken(textToken, 1);
267
- break;
268
- } else {
269
- state = matchedLen = 0;
270
- }
271
- input.advance();
272
- }
273
- });
274
- }
275
- var scriptTokens = contentTokenizer("script", scriptText, StartCloseScriptTag);
276
- var styleTokens = contentTokenizer("style", styleText, StartCloseStyleTag);
277
- var textareaTokens = contentTokenizer("textarea", textareaText, StartCloseTextareaTag);
278
- var htmlHighlighting = styleTags({
279
- "Text RawText IncompleteTag IncompleteCloseTag": tags.content,
280
- "StartTag StartCloseTag SelfClosingEndTag EndTag": tags.angleBracket,
281
- TagName: tags.tagName,
282
- "MismatchedCloseTag/TagName": [tags.tagName, tags.invalid],
283
- AttributeName: tags.attributeName,
284
- "AttributeValue UnquotedAttributeValue": tags.attributeValue,
285
- Is: tags.definitionOperator,
286
- "EntityReference CharacterReference": tags.character,
287
- Comment: tags.blockComment,
288
- ProcessingInst: tags.processingInstruction,
289
- DoctypeDecl: tags.documentMeta
290
- });
291
- var parser = LRParser.deserialize({
292
- version: 14,
293
- states: ",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G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!nO~Ol!qO!a!oO!c!pO~OS!rO~OS!sO~OS!tO~Ob!uOc!uOd!uO!a!wO!b!uO~Ob!xOc!xOd!xO!c!wO!d!xO~Ob!uOc!uOd!uO!a!{O!b!uO~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",
295
- goto: "%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",
296
- nodeNames: "⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",
297
- maxTerm: 68,
298
- context: elementContext,
299
- nodeProps: [
300
- ["closedBy", -10, 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, "EndTag", 6, "EndTag SelfClosingEndTag", -4, 22, 31, 34, 37, "CloseTag"],
301
- ["openedBy", 4, "StartTag StartCloseTag", 5, "StartTag", -4, 30, 33, 36, 38, "OpenTag"],
302
- ["group", -10, 14, 15, 18, 19, 20, 21, 40, 41, 42, 43, "Entity", 17, "Entity TextContent", -3, 29, 32, 35, "TextContent Entity"],
303
- ["isolate", -11, 22, 30, 31, 33, 34, 36, 37, 38, 39, 42, 43, "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'S(V;'S;=`(h<%lO(Vq!8YP;=`<%l!5ka!8bX!b`Or!8]rs!6Vsv!8]vw!6Vw!a!8]!a!b!8}!b;'S!8];'S;=`!:V<%lO!8]a!9SX!b`Or!8]rs!6Vsv!8]vw!6Vw!`!8]!`!a!9o!a;'S!8];'S;=`!:V<%lO!8]a!9vT!b`yPOr)esv)ew;'S)e;'S;=`)y<%lO)ea!:YP;=`<%l!8]!R!:dY!b`!dpOr!4trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",
309
- tokenizers: [scriptTokens, styleTokens, textareaTokens, endTag, tagStart, commentContent, 0, 1, 2, 3, 4, 5],
310
- topRules: { "Document": [0, 16] },
311
- dialects: { noMatch: 0, selfClosing: 515 },
312
- tokenPrec: 517
313
- });
314
- function getAttrs(openTag, input) {
315
- let attrs = /* @__PURE__ */ Object.create(null);
316
- for (let att of openTag.getChildren(Attribute)) {
317
- let name = att.getChild(AttributeName), value = att.getChild(AttributeValue) || att.getChild(UnquotedAttributeValue);
318
- if (name) attrs[input.read(name.from, name.to)] = !value ? "" : value.type.id == AttributeValue ? input.read(value.from + 1, value.to - 1) : input.read(value.from, value.to);
319
- }
320
- return attrs;
321
- }
322
- function findTagName(openTag, input) {
323
- let tagNameNode = openTag.getChild(TagName);
324
- return tagNameNode ? input.read(tagNameNode.from, tagNameNode.to) : " ";
325
- }
326
- function maybeNest(node, input, tags2) {
327
- let attrs;
328
- for (let tag of tags2) {
329
- if (!tag.attrs || tag.attrs(attrs || (attrs = getAttrs(node.node.parent.firstChild, input))))
330
- return { parser: tag.parser, bracketed: true };
331
- }
332
- return null;
333
- }
334
- function configureNesting(tags2 = [], attributes = []) {
335
- let script = [], style = [], textarea = [], other = [];
336
- for (let tag of tags2) {
337
- let array = tag.tag == "script" ? script : tag.tag == "style" ? style : tag.tag == "textarea" ? textarea : other;
338
- array.push(tag);
339
- }
340
- let attrs = attributes.length ? /* @__PURE__ */ Object.create(null) : null;
341
- for (let attr of attributes) (attrs[attr.name] || (attrs[attr.name] = [])).push(attr);
342
- return parseMixed((node, input) => {
343
- let id = node.type.id;
344
- if (id == ScriptText) return maybeNest(node, input, script);
345
- if (id == StyleText) return maybeNest(node, input, style);
346
- if (id == TextareaText) return maybeNest(node, input, textarea);
347
- if (id == Element && other.length) {
348
- let n = node.node, open = n.firstChild, tagName = open && findTagName(open, input), attrs2;
349
- if (tagName) for (let tag of other) {
350
- if (tag.tag == tagName && (!tag.attrs || tag.attrs(attrs2 || (attrs2 = getAttrs(open, input))))) {
351
- let close = n.lastChild;
352
- let to = close.type.id == CloseTag ? close.from : n.to;
353
- if (to > open.to)
354
- return { parser: tag.parser, overlay: [{ from: open.to, to }] };
355
- }
356
- }
357
- }
358
- if (attrs && id == Attribute) {
359
- let n = node.node, nameNode;
360
- if (nameNode = n.firstChild) {
361
- let matches = attrs[input.read(nameNode.from, nameNode.to)];
362
- if (matches) for (let attr of matches) {
363
- if (attr.tagName && attr.tagName != findTagName(n.parent, input)) continue;
364
- let value = n.lastChild;
365
- if (value.type.id == AttributeValue) {
366
- let from = value.from + 1;
367
- let last = value.lastChild, to = value.to - (last && last.isError ? 0 : 1);
368
- if (to > from) return { parser: attr.parser, overlay: [{ from, to }], bracketed: true };
369
- } else if (value.type.id == UnquotedAttributeValue) {
370
- return { parser: attr.parser, overlay: [{ from: value.from, to: value.to }] };
371
- }
372
- }
373
- }
374
- }
375
- return null;
376
- });
377
- }
378
-
379
- // ../../node_modules/@codemirror/lang-html/dist/index.js
380
- var Targets = ["_blank", "_self", "_top", "_parent"];
381
- var Charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"];
382
- var Methods = ["get", "post", "put", "delete"];
383
- var Encs = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"];
384
- var Bool = ["true", "false"];
385
- var S = {};
386
- var Tags = {
387
- a: {
388
- attrs: {
389
- href: null,
390
- ping: null,
391
- type: null,
392
- media: null,
393
- target: Targets,
394
- hreflang: null
395
- }
396
- },
397
- abbr: S,
398
- address: S,
399
- area: {
400
- attrs: {
401
- alt: null,
402
- coords: null,
403
- href: null,
404
- target: null,
405
- ping: null,
406
- media: null,
407
- hreflang: null,
408
- type: null,
409
- shape: ["default", "rect", "circle", "poly"]
410
- }
411
- },
412
- article: S,
413
- aside: S,
414
- audio: {
415
- attrs: {
416
- src: null,
417
- mediagroup: null,
418
- crossorigin: ["anonymous", "use-credentials"],
419
- preload: ["none", "metadata", "auto"],
420
- autoplay: ["autoplay"],
421
- loop: ["loop"],
422
- controls: ["controls"]
423
- }
424
- },
425
- b: S,
426
- base: { attrs: { href: null, target: Targets } },
427
- bdi: S,
428
- bdo: S,
429
- blockquote: { attrs: { cite: null } },
430
- body: S,
431
- br: S,
432
- button: {
433
- attrs: {
434
- form: null,
435
- formaction: null,
436
- name: null,
437
- value: null,
438
- autofocus: ["autofocus"],
439
- disabled: ["autofocus"],
440
- formenctype: Encs,
441
- formmethod: Methods,
442
- formnovalidate: ["novalidate"],
443
- formtarget: Targets,
444
- type: ["submit", "reset", "button"]
445
- }
446
- },
447
- canvas: { attrs: { width: null, height: null } },
448
- caption: S,
449
- center: S,
450
- cite: S,
451
- code: S,
452
- col: { attrs: { span: null } },
453
- colgroup: { attrs: { span: null } },
454
- command: {
455
- attrs: {
456
- type: ["command", "checkbox", "radio"],
457
- label: null,
458
- icon: null,
459
- radiogroup: null,
460
- command: null,
461
- title: null,
462
- disabled: ["disabled"],
463
- checked: ["checked"]
464
- }
465
- },
466
- data: { attrs: { value: null } },
467
- datagrid: { attrs: { disabled: ["disabled"], multiple: ["multiple"] } },
468
- datalist: { attrs: { data: null } },
469
- dd: S,
470
- del: { attrs: { cite: null, datetime: null } },
471
- details: { attrs: { open: ["open"] } },
472
- dfn: S,
473
- div: S,
474
- dl: S,
475
- dt: S,
476
- em: S,
477
- embed: { attrs: { src: null, type: null, width: null, height: null } },
478
- eventsource: { attrs: { src: null } },
479
- fieldset: { attrs: { disabled: ["disabled"], form: null, name: null } },
480
- figcaption: S,
481
- figure: S,
482
- footer: S,
483
- form: {
484
- attrs: {
485
- action: null,
486
- name: null,
487
- "accept-charset": Charsets,
488
- autocomplete: ["on", "off"],
489
- enctype: Encs,
490
- method: Methods,
491
- novalidate: ["novalidate"],
492
- target: Targets
493
- }
494
- },
495
- h1: S,
496
- h2: S,
497
- h3: S,
498
- h4: S,
499
- h5: S,
500
- h6: S,
501
- head: {
502
- children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"]
503
- },
504
- header: S,
505
- hgroup: S,
506
- hr: S,
507
- html: {
508
- attrs: { manifest: null }
509
- },
510
- i: S,
511
- iframe: {
512
- attrs: {
513
- src: null,
514
- srcdoc: null,
515
- name: null,
516
- width: null,
517
- height: null,
518
- sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"],
519
- seamless: ["seamless"]
520
- }
521
- },
522
- img: {
523
- attrs: {
524
- alt: null,
525
- src: null,
526
- ismap: null,
527
- usemap: null,
528
- width: null,
529
- height: null,
530
- crossorigin: ["anonymous", "use-credentials"]
531
- }
532
- },
533
- input: {
534
- attrs: {
535
- alt: null,
536
- dirname: null,
537
- form: null,
538
- formaction: null,
539
- height: null,
540
- list: null,
541
- max: null,
542
- maxlength: null,
543
- min: null,
544
- name: null,
545
- pattern: null,
546
- placeholder: null,
547
- size: null,
548
- src: null,
549
- step: null,
550
- value: null,
551
- width: null,
552
- accept: ["audio/*", "video/*", "image/*"],
553
- autocomplete: ["on", "off"],
554
- autofocus: ["autofocus"],
555
- checked: ["checked"],
556
- disabled: ["disabled"],
557
- formenctype: Encs,
558
- formmethod: Methods,
559
- formnovalidate: ["novalidate"],
560
- formtarget: Targets,
561
- multiple: ["multiple"],
562
- readonly: ["readonly"],
563
- required: ["required"],
564
- type: [
565
- "hidden",
566
- "text",
567
- "search",
568
- "tel",
569
- "url",
570
- "email",
571
- "password",
572
- "datetime",
573
- "date",
574
- "month",
575
- "week",
576
- "time",
577
- "datetime-local",
578
- "number",
579
- "range",
580
- "color",
581
- "checkbox",
582
- "radio",
583
- "file",
584
- "submit",
585
- "image",
586
- "reset",
587
- "button"
588
- ]
589
- }
590
- },
591
- ins: { attrs: { cite: null, datetime: null } },
592
- kbd: S,
593
- keygen: {
594
- attrs: {
595
- challenge: null,
596
- form: null,
597
- name: null,
598
- autofocus: ["autofocus"],
599
- disabled: ["disabled"],
600
- keytype: ["RSA"]
601
- }
602
- },
603
- label: { attrs: { for: null, form: null } },
604
- legend: S,
605
- li: { attrs: { value: null } },
606
- link: {
607
- attrs: {
608
- href: null,
609
- type: null,
610
- hreflang: null,
611
- media: null,
612
- sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"]
613
- }
614
- },
615
- map: { attrs: { name: null } },
616
- mark: S,
617
- menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } },
618
- meta: {
619
- attrs: {
620
- content: null,
621
- charset: Charsets,
622
- name: ["viewport", "application-name", "author", "description", "generator", "keywords"],
623
- "http-equiv": ["content-language", "content-type", "default-style", "refresh"]
624
- }
625
- },
626
- meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },
627
- nav: S,
628
- noscript: S,
629
- object: {
630
- attrs: {
631
- data: null,
632
- type: null,
633
- name: null,
634
- usemap: null,
635
- form: null,
636
- width: null,
637
- height: null,
638
- typemustmatch: ["typemustmatch"]
639
- }
640
- },
641
- ol: {
642
- attrs: { reversed: ["reversed"], start: null, type: ["1", "a", "A", "i", "I"] },
643
- children: ["li", "script", "template", "ul", "ol"]
644
- },
645
- optgroup: { attrs: { disabled: ["disabled"], label: null } },
646
- option: { attrs: { disabled: ["disabled"], label: null, selected: ["selected"], value: null } },
647
- output: { attrs: { for: null, form: null, name: null } },
648
- p: S,
649
- param: { attrs: { name: null, value: null } },
650
- pre: S,
651
- progress: { attrs: { value: null, max: null } },
652
- q: { attrs: { cite: null } },
653
- rp: S,
654
- rt: S,
655
- ruby: S,
656
- samp: S,
657
- script: {
658
- attrs: {
659
- type: ["text/javascript"],
660
- src: null,
661
- async: ["async"],
662
- defer: ["defer"],
663
- charset: Charsets
664
- }
665
- },
666
- section: S,
667
- select: {
668
- attrs: {
669
- form: null,
670
- name: null,
671
- size: null,
672
- autofocus: ["autofocus"],
673
- disabled: ["disabled"],
674
- multiple: ["multiple"]
675
- }
676
- },
677
- slot: { attrs: { name: null } },
678
- small: S,
679
- source: { attrs: { src: null, type: null, media: null } },
680
- span: S,
681
- strong: S,
682
- style: {
683
- attrs: {
684
- type: ["text/css"],
685
- media: null,
686
- scoped: null
687
- }
688
- },
689
- sub: S,
690
- summary: S,
691
- sup: S,
692
- table: S,
693
- tbody: S,
694
- td: { attrs: { colspan: null, rowspan: null, headers: null } },
695
- template: S,
696
- textarea: {
697
- attrs: {
698
- dirname: null,
699
- form: null,
700
- maxlength: null,
701
- name: null,
702
- placeholder: null,
703
- rows: null,
704
- cols: null,
705
- autofocus: ["autofocus"],
706
- disabled: ["disabled"],
707
- readonly: ["readonly"],
708
- required: ["required"],
709
- wrap: ["soft", "hard"]
710
- }
711
- },
712
- tfoot: S,
713
- th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } },
714
- thead: S,
715
- time: { attrs: { datetime: null } },
716
- title: S,
717
- tr: S,
718
- track: {
719
- attrs: {
720
- src: null,
721
- label: null,
722
- default: null,
723
- kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"],
724
- srclang: null
725
- }
726
- },
727
- ul: { children: ["li", "script", "template", "ul", "ol"] },
728
- var: S,
729
- video: {
730
- attrs: {
731
- src: null,
732
- poster: null,
733
- width: null,
734
- height: null,
735
- crossorigin: ["anonymous", "use-credentials"],
736
- preload: ["auto", "metadata", "none"],
737
- autoplay: ["autoplay"],
738
- mediagroup: ["movie"],
739
- muted: ["muted"],
740
- controls: ["controls"]
741
- }
742
- },
743
- wbr: S
744
- };
745
- var GlobalAttrs = {
746
- accesskey: null,
747
- class: null,
748
- contenteditable: Bool,
749
- contextmenu: null,
750
- dir: ["ltr", "rtl", "auto"],
751
- draggable: ["true", "false", "auto"],
752
- dropzone: ["copy", "move", "link", "string:", "file:"],
753
- hidden: ["hidden"],
754
- id: null,
755
- inert: ["inert"],
756
- itemid: null,
757
- itemprop: null,
758
- itemref: null,
759
- itemscope: ["itemscope"],
760
- itemtype: null,
761
- lang: ["ar", "bn", "de", "en-GB", "en-US", "es", "fr", "hi", "id", "ja", "pa", "pt", "ru", "tr", "zh"],
762
- spellcheck: Bool,
763
- autocorrect: Bool,
764
- autocapitalize: Bool,
765
- style: null,
766
- tabindex: null,
767
- title: null,
768
- translate: ["yes", "no"],
769
- rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"],
770
- role: "alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),
771
- "aria-activedescendant": null,
772
- "aria-atomic": Bool,
773
- "aria-autocomplete": ["inline", "list", "both", "none"],
774
- "aria-busy": Bool,
775
- "aria-checked": ["true", "false", "mixed", "undefined"],
776
- "aria-controls": null,
777
- "aria-describedby": null,
778
- "aria-disabled": Bool,
779
- "aria-dropeffect": null,
780
- "aria-expanded": ["true", "false", "undefined"],
781
- "aria-flowto": null,
782
- "aria-grabbed": ["true", "false", "undefined"],
783
- "aria-haspopup": Bool,
784
- "aria-hidden": Bool,
785
- "aria-invalid": ["true", "false", "grammar", "spelling"],
786
- "aria-label": null,
787
- "aria-labelledby": null,
788
- "aria-level": null,
789
- "aria-live": ["off", "polite", "assertive"],
790
- "aria-multiline": Bool,
791
- "aria-multiselectable": Bool,
792
- "aria-owns": null,
793
- "aria-posinset": null,
794
- "aria-pressed": ["true", "false", "mixed", "undefined"],
795
- "aria-readonly": Bool,
796
- "aria-relevant": null,
797
- "aria-required": Bool,
798
- "aria-selected": ["true", "false", "undefined"],
799
- "aria-setsize": null,
800
- "aria-sort": ["ascending", "descending", "none", "other"],
801
- "aria-valuemax": null,
802
- "aria-valuemin": null,
803
- "aria-valuenow": null,
804
- "aria-valuetext": null
805
- };
806
- var eventAttributes = "beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map((n) => "on" + n);
807
- for (let a of eventAttributes)
808
- GlobalAttrs[a] = null;
809
- var Schema = class {
810
- constructor(extraTags, extraAttrs) {
811
- this.tags = { ...Tags, ...extraTags };
812
- this.globalAttrs = { ...GlobalAttrs, ...extraAttrs };
813
- this.allTags = Object.keys(this.tags);
814
- this.globalAttrNames = Object.keys(this.globalAttrs);
815
- }
816
- };
817
- Schema.default = new Schema();
818
- function elementName(doc, tree, max = doc.length) {
819
- if (!tree)
820
- return "";
821
- let tag = tree.firstChild;
822
- let name = tag && tag.getChild("TagName");
823
- return name ? doc.sliceString(name.from, Math.min(name.to, max)) : "";
824
- }
825
- function findParentElement(tree, skip = false) {
826
- for (; tree; tree = tree.parent)
827
- if (tree.name == "Element") {
828
- if (skip)
829
- skip = false;
830
- else
831
- return tree;
832
- }
833
- return null;
834
- }
835
- function allowedChildren(doc, tree, schema) {
836
- let parentInfo = schema.tags[elementName(doc, findParentElement(tree))];
837
- return (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.children) || schema.allTags;
838
- }
839
- function openTags(doc, tree) {
840
- let open = [];
841
- for (let parent = findParentElement(tree); parent && !parent.type.isTop; parent = findParentElement(parent.parent)) {
842
- let tagName = elementName(doc, parent);
843
- if (tagName && parent.lastChild.name == "CloseTag")
844
- break;
845
- if (tagName && open.indexOf(tagName) < 0 && (tree.name == "EndTag" || tree.from >= parent.firstChild.to))
846
- open.push(tagName);
847
- }
848
- return open;
849
- }
850
- var identifier = /^[:\-\.\w\u00b7-\uffff]*$/;
851
- function completeTag(state, schema, tree, from, to) {
852
- let end = /\s*>/.test(state.sliceDoc(to, to + 5)) ? "" : ">";
853
- let parent = findParentElement(tree, tree.name == "StartTag" || tree.name == "TagName");
854
- return {
855
- from,
856
- to,
857
- options: allowedChildren(state.doc, parent, schema).map((tagName) => ({ label: tagName, type: "type" })).concat(openTags(state.doc, tree).map((tag, i) => ({
858
- label: "/" + tag,
859
- apply: "/" + tag + end,
860
- type: "type",
861
- boost: 99 - i
862
- }))),
863
- validFor: /^\/?[:\-\.\w\u00b7-\uffff]*$/
864
- };
865
- }
866
- function completeCloseTag(state, tree, from, to) {
867
- let end = /\s*>/.test(state.sliceDoc(to, to + 5)) ? "" : ">";
868
- return {
869
- from,
870
- to,
871
- options: openTags(state.doc, tree).map((tag, i) => ({ label: tag, apply: tag + end, type: "type", boost: 99 - i })),
872
- validFor: identifier
873
- };
874
- }
875
- function completeStartTag(state, schema, tree, pos) {
876
- let options = [], level = 0;
877
- for (let tagName of allowedChildren(state.doc, tree, schema))
878
- options.push({ label: "<" + tagName, type: "type" });
879
- for (let open of openTags(state.doc, tree))
880
- options.push({ label: "</" + open + ">", type: "type", boost: 99 - level++ });
881
- return { from: pos, to: pos, options, validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/ };
882
- }
883
- function completeAttrName(state, schema, tree, from, to) {
884
- let elt = findParentElement(tree), info = elt ? schema.tags[elementName(state.doc, elt)] : null;
885
- let localAttrs = info && info.attrs ? Object.keys(info.attrs) : [];
886
- let names = info && info.globalAttrs === false ? localAttrs : localAttrs.length ? localAttrs.concat(schema.globalAttrNames) : schema.globalAttrNames;
887
- return {
888
- from,
889
- to,
890
- options: names.map((attrName) => ({ label: attrName, type: "property" })),
891
- validFor: identifier
892
- };
893
- }
894
- function completeAttrValue(state, schema, tree, from, to) {
895
- var _a;
896
- let nameNode = (_a = tree.parent) === null || _a === void 0 ? void 0 : _a.getChild("AttributeName");
897
- let options = [], token = void 0;
898
- if (nameNode) {
899
- let attrName = state.sliceDoc(nameNode.from, nameNode.to);
900
- let attrs = schema.globalAttrs[attrName];
901
- if (!attrs) {
902
- let elt = findParentElement(tree), info = elt ? schema.tags[elementName(state.doc, elt)] : null;
903
- attrs = (info === null || info === void 0 ? void 0 : info.attrs) && info.attrs[attrName];
904
- }
905
- if (attrs) {
906
- let base = state.sliceDoc(from, to).toLowerCase(), quoteStart = '"', quoteEnd = '"';
907
- if (/^['"]/.test(base)) {
908
- token = base[0] == '"' ? /^[^"]*$/ : /^[^']*$/;
909
- quoteStart = "";
910
- quoteEnd = state.sliceDoc(to, to + 1) == base[0] ? "" : base[0];
911
- base = base.slice(1);
912
- from++;
913
- } else {
914
- token = /^[^\s<>='"]*$/;
915
- }
916
- for (let value of attrs)
917
- options.push({ label: value, apply: quoteStart + value + quoteEnd, type: "constant" });
918
- }
919
- }
920
- return { from, to, options, validFor: token };
921
- }
922
- function htmlCompletionFor(schema, context) {
923
- let { state, pos } = context, tree = syntaxTree(state).resolveInner(pos, -1), around = tree.resolve(pos);
924
- for (let scan = pos, before; around == tree && (before = tree.childBefore(scan)); ) {
925
- let last = before.lastChild;
926
- if (!last || !last.type.isError || last.from < last.to)
927
- break;
928
- around = tree = before;
929
- scan = last.from;
930
- }
931
- if (tree.name == "TagName") {
932
- return tree.parent && /CloseTag$/.test(tree.parent.name) ? completeCloseTag(state, tree, tree.from, pos) : completeTag(state, schema, tree, tree.from, pos);
933
- } else if (tree.name == "StartTag" || tree.name == "IncompleteTag") {
934
- return completeTag(state, schema, tree, pos, pos);
935
- } else if (tree.name == "StartCloseTag" || tree.name == "IncompleteCloseTag") {
936
- return completeCloseTag(state, tree, pos, pos);
937
- } else if (tree.name == "OpenTag" || tree.name == "SelfClosingTag" || tree.name == "AttributeName") {
938
- return completeAttrName(state, schema, tree, tree.name == "AttributeName" ? tree.from : pos, pos);
939
- } else if (tree.name == "Is" || tree.name == "AttributeValue" || tree.name == "UnquotedAttributeValue") {
940
- return completeAttrValue(state, schema, tree, tree.name == "Is" ? pos : tree.from, pos);
941
- } else if (context.explicit && (around.name == "Element" || around.name == "Text" || around.name == "Document")) {
942
- return completeStartTag(state, schema, tree, pos);
943
- } else {
944
- return null;
945
- }
946
- }
947
- function htmlCompletionSource(context) {
948
- return htmlCompletionFor(Schema.default, context);
949
- }
950
- function htmlCompletionSourceWith(config) {
951
- let { extraTags, extraGlobalAttributes: extraAttrs } = config;
952
- let schema = extraAttrs || extraTags ? new Schema(extraTags, extraAttrs) : Schema.default;
953
- return (context) => htmlCompletionFor(schema, context);
954
- }
955
- var jsonParser = javascriptLanguage.parser.configure({ top: "SingleExpression" });
956
- var defaultNesting = [
957
- {
958
- tag: "script",
959
- attrs: (attrs) => attrs.type == "text/typescript" || attrs.lang == "ts",
960
- parser: typescriptLanguage.parser
961
- },
962
- {
963
- tag: "script",
964
- attrs: (attrs) => attrs.type == "text/babel" || attrs.type == "text/jsx",
965
- parser: jsxLanguage.parser
966
- },
967
- {
968
- tag: "script",
969
- attrs: (attrs) => attrs.type == "text/typescript-jsx",
970
- parser: tsxLanguage.parser
971
- },
972
- {
973
- tag: "script",
974
- attrs(attrs) {
975
- return /^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(attrs.type);
976
- },
977
- parser: jsonParser
978
- },
979
- {
980
- tag: "script",
981
- attrs(attrs) {
982
- return !attrs.type || /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(attrs.type);
983
- },
984
- parser: javascriptLanguage.parser
985
- },
986
- {
987
- tag: "style",
988
- attrs(attrs) {
989
- return (!attrs.lang || attrs.lang == "css") && (!attrs.type || /^(text\/)?(x-)?(stylesheet|css)$/i.test(attrs.type));
990
- },
991
- parser: cssLanguage.parser
992
- }
993
- ];
994
- var defaultAttrs = [
995
- {
996
- name: "style",
997
- parser: cssLanguage.parser.configure({ top: "Styles" })
998
- }
999
- ].concat(eventAttributes.map((name) => ({ name, parser: javascriptLanguage.parser })));
1000
- var htmlPlain = LRLanguage.define({
1001
- name: "html",
1002
- parser: parser.configure({
1003
- props: [
1004
- indentNodeProp.add({
1005
- Element(context) {
1006
- let after = /^(\s*)(<\/)?/.exec(context.textAfter);
1007
- if (context.node.to <= context.pos + after[0].length)
1008
- return context.continue();
1009
- return context.lineIndent(context.node.from) + (after[2] ? 0 : context.unit);
1010
- },
1011
- "OpenTag CloseTag SelfClosingTag"(context) {
1012
- return context.column(context.node.from) + context.unit;
1013
- },
1014
- Document(context) {
1015
- if (context.pos + /\s*/.exec(context.textAfter)[0].length < context.node.to)
1016
- return context.continue();
1017
- let endElt = null, close;
1018
- for (let cur = context.node; ; ) {
1019
- let last = cur.lastChild;
1020
- if (!last || last.name != "Element" || last.to != cur.to)
1021
- break;
1022
- endElt = cur = last;
1023
- }
1024
- if (endElt && !((close = endElt.lastChild) && (close.name == "CloseTag" || close.name == "SelfClosingTag")))
1025
- return context.lineIndent(endElt.from) + context.unit;
1026
- return null;
1027
- }
1028
- }),
1029
- foldNodeProp.add({
1030
- Element(node) {
1031
- let first = node.firstChild, last = node.lastChild;
1032
- if (!first || first.name != "OpenTag")
1033
- return null;
1034
- return { from: first.to, to: last.name == "CloseTag" ? last.from : node.to };
1035
- }
1036
- }),
1037
- bracketMatchingHandle.add({
1038
- "OpenTag CloseTag": (node) => node.getChild("TagName")
1039
- })
1040
- ]
1041
- }),
1042
- languageData: {
1043
- commentTokens: { block: { open: "<!--", close: "-->" } },
1044
- indentOnInput: /^\s*<\/\w+\W$/,
1045
- wordChars: "-_"
1046
- }
1047
- });
1048
- var htmlLanguage = htmlPlain.configure({
1049
- wrap: configureNesting(defaultNesting, defaultAttrs)
1050
- });
1051
- function html(config = {}) {
1052
- let dialect = "", wrap;
1053
- if (config.matchClosingTags === false)
1054
- dialect = "noMatch";
1055
- if (config.selfClosingTags === true)
1056
- dialect = (dialect ? dialect + " " : "") + "selfClosing";
1057
- if (config.nestedLanguages && config.nestedLanguages.length || config.nestedAttributes && config.nestedAttributes.length)
1058
- wrap = configureNesting((config.nestedLanguages || []).concat(defaultNesting), (config.nestedAttributes || []).concat(defaultAttrs));
1059
- let lang = wrap ? htmlPlain.configure({ wrap, dialect }) : dialect ? htmlLanguage.configure({ dialect }) : htmlLanguage;
1060
- return new LanguageSupport(lang, [
1061
- htmlLanguage.data.of({ autocomplete: htmlCompletionSourceWith(config) }),
1062
- config.autoCloseTags !== false ? autoCloseTags : [],
1063
- javascript().support,
1064
- css().support
1065
- ]);
1066
- }
1067
- var selfClosers2 = new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));
1068
- var autoCloseTags = EditorView.inputHandler.of((view, from, to, text, insertTransaction) => {
1069
- if (view.composing || view.state.readOnly || from != to || text != ">" && text != "/" || !htmlLanguage.isActiveAt(view.state, from, -1))
1070
- return false;
1071
- let base = insertTransaction(), { state } = base;
1072
- let closeTags = state.changeByRange((range) => {
1073
- var _a, _b, _c;
1074
- let didType = state.doc.sliceString(range.from - 1, range.to) == text;
1075
- let { head } = range, after = syntaxTree(state).resolveInner(head, -1), name;
1076
- if (didType && text == ">" && after.name == "EndTag") {
1077
- let tag = after.parent;
1078
- if (((_b = (_a = tag.parent) === null || _a === void 0 ? void 0 : _a.lastChild) === null || _b === void 0 ? void 0 : _b.name) != "CloseTag" && (name = elementName(state.doc, tag.parent, head)) && !selfClosers2.has(name)) {
1079
- let to2 = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
1080
- let insert = `</${name}>`;
1081
- return { range, changes: { from: head, to: to2, insert } };
1082
- }
1083
- } else if (didType && text == "/" && after.name == "IncompleteCloseTag") {
1084
- let tag = after.parent;
1085
- if (after.from == head - 2 && ((_c = tag.lastChild) === null || _c === void 0 ? void 0 : _c.name) != "CloseTag" && (name = elementName(state.doc, tag, head)) && !selfClosers2.has(name)) {
1086
- let to2 = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
1087
- let insert = `${name}>`;
1088
- return {
1089
- range: EditorSelection.cursor(head + insert.length, -1),
1090
- changes: { from: head, to: to2, insert }
1091
- };
1092
- }
1093
- }
1094
- return { range };
1095
- });
1096
- if (closeTags.changes.empty)
1097
- return false;
1098
- view.dispatch([
1099
- base,
1100
- state.update(closeTags, {
1101
- userEvent: "input.complete",
1102
- scrollIntoView: true
1103
- })
1104
- ]);
1105
- return true;
1106
- });
1107
-
1108
- export {
1109
- htmlCompletionSource,
1110
- htmlCompletionSourceWith,
1111
- htmlLanguage,
1112
- html,
1113
- autoCloseTags
1114
- };
1115
- //# sourceMappingURL=chunk-3LBP22MX.js.map