claude-maestro 0.1.16

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/README.md +130 -0
  2. package/bin/maestro.mjs +45 -0
  3. package/out/main/index.js +5293 -0
  4. package/out/preload/index.js +130 -0
  5. package/out/renderer/assets/apl-fqmucPXA.js +140 -0
  6. package/out/renderer/assets/asciiarmor-DucZyvP0.js +56 -0
  7. package/out/renderer/assets/asn1-BnOEsgAm.js +144 -0
  8. package/out/renderer/assets/asterisk-QAlztEwS.js +345 -0
  9. package/out/renderer/assets/brainfuck-DZVCuF_t.js +53 -0
  10. package/out/renderer/assets/clike-xqXYL6ge.js +805 -0
  11. package/out/renderer/assets/clojure-BhXMqnxz.js +849 -0
  12. package/out/renderer/assets/cmake-BGaNd9E7.js +71 -0
  13. package/out/renderer/assets/cobol-4yqQntpt.js +120 -0
  14. package/out/renderer/assets/coffeescript-D2dXvhEc.js +308 -0
  15. package/out/renderer/assets/commonlisp-CF_VNHQR.js +130 -0
  16. package/out/renderer/assets/crystal-DyuLTqLs.js +398 -0
  17. package/out/renderer/assets/css-c-jst79C.js +1783 -0
  18. package/out/renderer/assets/cypher-Dlu_3r4V.js +121 -0
  19. package/out/renderer/assets/d-UURgV0Ux.js +179 -0
  20. package/out/renderer/assets/diff-B_Bi2Crb.js +25 -0
  21. package/out/renderer/assets/dockerfile-Bvk733Ga.js +201 -0
  22. package/out/renderer/assets/dtd-Dy74G54E.js +114 -0
  23. package/out/renderer/assets/dylan-TSb-Nfix.js +314 -0
  24. package/out/renderer/assets/ebnf-4fKAGW3a.js +140 -0
  25. package/out/renderer/assets/ecl-B59qGGVg.js +178 -0
  26. package/out/renderer/assets/eiffel-Dze7nlu3.js +134 -0
  27. package/out/renderer/assets/elm-DG7jkhNZ.js +176 -0
  28. package/out/renderer/assets/erlang-BO6gOnGA.js +674 -0
  29. package/out/renderer/assets/factor-CMxFHDqz.js +65 -0
  30. package/out/renderer/assets/fcl-CDDUNjTj.js +141 -0
  31. package/out/renderer/assets/forth-B9D2JCeE.js +116 -0
  32. package/out/renderer/assets/fortran-CAG2BFbe.js +467 -0
  33. package/out/renderer/assets/gas-d3KEcW3x.js +294 -0
  34. package/out/renderer/assets/gherkin-DhZlEZiy.js +115 -0
  35. package/out/renderer/assets/groovy-CpwJiBl7.js +223 -0
  36. package/out/renderer/assets/haskell-ySd-OUo8.js +459 -0
  37. package/out/renderer/assets/haxe-7MlzfeYV.js +514 -0
  38. package/out/renderer/assets/http-BqypyemW.js +79 -0
  39. package/out/renderer/assets/idl-4HIGJlDI.js +985 -0
  40. package/out/renderer/assets/index-2SQReYbL.js +117 -0
  41. package/out/renderer/assets/index-B4G_DF7l.js +178 -0
  42. package/out/renderer/assets/index-BJ7HHtlW.css +4015 -0
  43. package/out/renderer/assets/index-BLk1t3tc.js +151 -0
  44. package/out/renderer/assets/index-BLtm0KYA.js +157 -0
  45. package/out/renderer/assets/index-BPgGZ4iY.js +82 -0
  46. package/out/renderer/assets/index-BQE9vCdv.js +332 -0
  47. package/out/renderer/assets/index-BYr39Do3.js +61 -0
  48. package/out/renderer/assets/index-Ba0sUbhl.js +47177 -0
  49. package/out/renderer/assets/index-BewSkGJT.js +1041 -0
  50. package/out/renderer/assets/index-BnId7J8H.js +1021 -0
  51. package/out/renderer/assets/index-Btn996gP.js +406 -0
  52. package/out/renderer/assets/index-C7i4WyfA.js +311 -0
  53. package/out/renderer/assets/index-CW9SAu99.js +385 -0
  54. package/out/renderer/assets/index-CXmk7jHk.js +291 -0
  55. package/out/renderer/assets/index-CyQp9UDR.js +82 -0
  56. package/out/renderer/assets/index-Da2gJ_Wd.js +704 -0
  57. package/out/renderer/assets/index-DkFO-IXC.js +2488 -0
  58. package/out/renderer/assets/index-DqrDpNqn.js +689 -0
  59. package/out/renderer/assets/index-Dw7p19YD.js +327 -0
  60. package/out/renderer/assets/index-QPm3UFYR.js +97 -0
  61. package/out/renderer/assets/index-RGiHNShF.js +1768 -0
  62. package/out/renderer/assets/index-RgZE5T_I.js +642 -0
  63. package/out/renderer/assets/index-t8kJBumF.js +312 -0
  64. package/out/renderer/assets/javascript-C_OHM9hj.js +994 -0
  65. package/out/renderer/assets/julia-Bs6JJhYG.js +407 -0
  66. package/out/renderer/assets/livescript-DmzgM3Yt.js +296 -0
  67. package/out/renderer/assets/lua-Cvg8VrAA.js +256 -0
  68. package/out/renderer/assets/mathematica-DNLOL9PQ.js +110 -0
  69. package/out/renderer/assets/mbox-Ga7d4MMN.js +117 -0
  70. package/out/renderer/assets/mirc-Dma3B8rS.js +107 -0
  71. package/out/renderer/assets/mllike-DHn7xckP.js +334 -0
  72. package/out/renderer/assets/modelica-0d55jYY0.js +147 -0
  73. package/out/renderer/assets/mscgen-DdqZYINH.js +135 -0
  74. package/out/renderer/assets/mumps-Btr8VblO.js +93 -0
  75. package/out/renderer/assets/nginx-DTDtBDVN.js +141 -0
  76. package/out/renderer/assets/nsis-3zG7tgur.js +62 -0
  77. package/out/renderer/assets/ntriples-CvgOYMpL.js +153 -0
  78. package/out/renderer/assets/octave-DYBj3-tl.js +200 -0
  79. package/out/renderer/assets/oz-R_e8WMIi.js +231 -0
  80. package/out/renderer/assets/pascal-GD8iposT.js +105 -0
  81. package/out/renderer/assets/perl-DL9mHpoi.js +1105 -0
  82. package/out/renderer/assets/pig-C_4T4YIV.js +101 -0
  83. package/out/renderer/assets/powershell-B0suO7Vd.js +328 -0
  84. package/out/renderer/assets/properties-BR-vP1aU.js +58 -0
  85. package/out/renderer/assets/protobuf-BxgpyhoW.js +77 -0
  86. package/out/renderer/assets/pug-CTXt1f8z.js +405 -0
  87. package/out/renderer/assets/puppet-Bdao66PW.js +137 -0
  88. package/out/renderer/assets/python-CvWbmiX4.js +427 -0
  89. package/out/renderer/assets/q-CrbCVq4a.js +131 -0
  90. package/out/renderer/assets/r-V7nswm59.js +170 -0
  91. package/out/renderer/assets/rpm-C-DLY-If.js +109 -0
  92. package/out/renderer/assets/ruby-JDKLJNK0.js +330 -0
  93. package/out/renderer/assets/sas-D2UG-yhZ.js +207 -0
  94. package/out/renderer/assets/scheme-BKzrkGJD.js +222 -0
  95. package/out/renderer/assets/shell-BlsXDxCn.js +222 -0
  96. package/out/renderer/assets/sieve-CjwBwOY5.js +135 -0
  97. package/out/renderer/assets/simple-mode-DMneyfDu.js +130 -0
  98. package/out/renderer/assets/smalltalk-BOIGQuhN.js +121 -0
  99. package/out/renderer/assets/solr-CwD7U71z.js +69 -0
  100. package/out/renderer/assets/sparql-DYskk2vE.js +249 -0
  101. package/out/renderer/assets/spreadsheet-Bgtt3oLP.js +87 -0
  102. package/out/renderer/assets/sql-BSrOzCRI.js +354 -0
  103. package/out/renderer/assets/stex-B6LNC55o.js +231 -0
  104. package/out/renderer/assets/stylus-BkS-boTH.js +565 -0
  105. package/out/renderer/assets/swift-FRZi1uvB.js +291 -0
  106. package/out/renderer/assets/tcl-CUcaCdmq.js +114 -0
  107. package/out/renderer/assets/textile-BnFpjsrl.js +414 -0
  108. package/out/renderer/assets/tiddlywiki-CjprD-Qp.js +218 -0
  109. package/out/renderer/assets/tiki-DK9DOeWn.js +268 -0
  110. package/out/renderer/assets/toml-BOuWGMcf.js +76 -0
  111. package/out/renderer/assets/troff-E1bJ0PPL.js +61 -0
  112. package/out/renderer/assets/ttcn-cfg-Dc39-fIP.js +133 -0
  113. package/out/renderer/assets/ttcn-tKd4HLu4.js +192 -0
  114. package/out/renderer/assets/turtle-Dq7-1WAf.js +124 -0
  115. package/out/renderer/assets/vb-Dp90gtsv.js +196 -0
  116. package/out/renderer/assets/vbscript-CI6_mxxU.js +479 -0
  117. package/out/renderer/assets/velocity-BwIZK1TH.js +149 -0
  118. package/out/renderer/assets/verilog-DDCYnHN8.js +430 -0
  119. package/out/renderer/assets/vhdl-DCkMIyT9.js +158 -0
  120. package/out/renderer/assets/webidl-BTLTThCm.js +204 -0
  121. package/out/renderer/assets/xquery-BrBUuxMR.js +525 -0
  122. package/out/renderer/assets/yacas-b5lAVEIl.js +130 -0
  123. package/out/renderer/assets/z80-BZV19vqv.js +93 -0
  124. package/out/renderer/index.html +16 -0
  125. package/package.json +109 -0
@@ -0,0 +1,1041 @@
1
+ import { L as LRParser, E as ExternalTokenizer, C as ContextTracker } from "./index-RGiHNShF.js";
2
+ import { p as parseMixed, s as styleTags, t as tags, E as EditorView, e as syntaxTree, l as EditorSelection, a as LanguageSupport, L as LRLanguage, i as indentNodeProp, f as foldNodeProp, G as bracketMatchingHandle } from "./index-Ba0sUbhl.js";
3
+ import { cssLanguage, css } from "./index-BnId7J8H.js";
4
+ import { typescriptLanguage, jsxLanguage, tsxLanguage, javascriptLanguage, javascript } from "./index-RgZE5T_I.js";
5
+ const scriptText = 55, StartCloseScriptTag = 1, styleText = 56, StartCloseStyleTag = 2, textareaText = 57, StartCloseTextareaTag = 3, EndTag = 4, SelfClosingEndTag = 5, StartTag = 6, StartScriptTag = 7, StartStyleTag = 8, StartTextareaTag = 9, StartSelfClosingTag = 10, StartCloseTag = 11, NoMatchStartCloseTag = 12, MismatchedStartCloseTag = 13, missingCloseTag = 58, IncompleteTag = 14, IncompleteCloseTag = 15, commentContent$1 = 59, Element = 21, TagName = 23, Attribute = 24, AttributeName = 25, AttributeValue = 27, UnquotedAttributeValue = 28, ScriptText = 29, StyleText = 32, TextareaText = 35, OpenTag = 37, CloseTag = 38, Dialect_noMatch = 0, Dialect_selfClosing = 1;
6
+ const selfClosers$1 = {
7
+ area: true,
8
+ base: true,
9
+ br: true,
10
+ col: true,
11
+ command: true,
12
+ embed: true,
13
+ frame: true,
14
+ hr: true,
15
+ img: true,
16
+ input: true,
17
+ keygen: true,
18
+ link: true,
19
+ meta: true,
20
+ param: true,
21
+ source: true,
22
+ track: true,
23
+ wbr: true,
24
+ menuitem: true
25
+ };
26
+ const implicitlyClosed = {
27
+ dd: true,
28
+ li: true,
29
+ optgroup: true,
30
+ option: true,
31
+ p: true,
32
+ rp: true,
33
+ rt: true,
34
+ tbody: true,
35
+ td: true,
36
+ tfoot: true,
37
+ th: true,
38
+ tr: true
39
+ };
40
+ const closeOnOpen = {
41
+ dd: { dd: true, dt: true },
42
+ dt: { dd: true, dt: true },
43
+ li: { li: true },
44
+ option: { option: true, optgroup: true },
45
+ optgroup: { optgroup: true },
46
+ p: {
47
+ address: true,
48
+ article: true,
49
+ aside: true,
50
+ blockquote: true,
51
+ dir: true,
52
+ div: true,
53
+ dl: true,
54
+ fieldset: true,
55
+ footer: true,
56
+ form: true,
57
+ h1: true,
58
+ h2: true,
59
+ h3: true,
60
+ h4: true,
61
+ h5: true,
62
+ h6: true,
63
+ header: true,
64
+ hgroup: true,
65
+ hr: true,
66
+ menu: true,
67
+ nav: true,
68
+ ol: true,
69
+ p: true,
70
+ pre: true,
71
+ section: true,
72
+ table: true,
73
+ ul: true
74
+ },
75
+ rp: { rp: true, rt: true },
76
+ rt: { rp: true, rt: true },
77
+ tbody: { tbody: true, tfoot: true },
78
+ td: { td: true, th: true },
79
+ tfoot: { tbody: true },
80
+ th: { td: true, th: true },
81
+ thead: { tbody: true, tfoot: true },
82
+ tr: { tr: true }
83
+ };
84
+ function nameChar(ch) {
85
+ return ch == 45 || ch == 46 || ch == 58 || ch >= 65 && ch <= 90 || ch == 95 || ch >= 97 && ch <= 122 || ch >= 161;
86
+ }
87
+ let cachedName = null, cachedInput = null, cachedPos = 0;
88
+ function tagNameAfter(input, offset) {
89
+ let pos = input.pos + offset;
90
+ if (cachedPos == pos && cachedInput == input) return cachedName;
91
+ let next = input.peek(offset), name = "";
92
+ for (; ; ) {
93
+ if (!nameChar(next)) break;
94
+ name += String.fromCharCode(next);
95
+ next = input.peek(++offset);
96
+ }
97
+ cachedInput = input;
98
+ cachedPos = pos;
99
+ return cachedName = name ? name.toLowerCase() : next == question || next == bang ? void 0 : null;
100
+ }
101
+ const lessThan = 60, greaterThan = 62, slash = 47, question = 63, bang = 33, dash = 45;
102
+ function ElementContext(name, parent) {
103
+ this.name = name;
104
+ this.parent = parent;
105
+ }
106
+ const startTagTerms = [StartTag, StartSelfClosingTag, StartScriptTag, StartStyleTag, StartTextareaTag];
107
+ const elementContext = new ContextTracker({
108
+ start: null,
109
+ shift(context, term, stack, input) {
110
+ return startTagTerms.indexOf(term) > -1 ? new ElementContext(tagNameAfter(input, 1) || "", context) : context;
111
+ },
112
+ reduce(context, term) {
113
+ return term == Element && context ? context.parent : context;
114
+ },
115
+ reuse(context, node, stack, input) {
116
+ let type = node.type.id;
117
+ return type == StartTag || type == OpenTag ? new ElementContext(tagNameAfter(input, 1) || "", context) : context;
118
+ },
119
+ strict: false
120
+ });
121
+ const tagStart = new ExternalTokenizer((input, stack) => {
122
+ if (input.next != lessThan) {
123
+ if (input.next < 0 && stack.context) input.acceptToken(missingCloseTag);
124
+ return;
125
+ }
126
+ input.advance();
127
+ let close = input.next == slash;
128
+ if (close) input.advance();
129
+ let name = tagNameAfter(input, 0);
130
+ if (name === void 0) return;
131
+ if (!name) return input.acceptToken(close ? IncompleteCloseTag : IncompleteTag);
132
+ let parent = stack.context ? stack.context.name : null;
133
+ if (close) {
134
+ if (name == parent) return input.acceptToken(StartCloseTag);
135
+ if (parent && implicitlyClosed[parent]) return input.acceptToken(missingCloseTag, -2);
136
+ if (stack.dialectEnabled(Dialect_noMatch)) return input.acceptToken(NoMatchStartCloseTag);
137
+ for (let cx = stack.context; cx; cx = cx.parent) if (cx.name == name) return;
138
+ input.acceptToken(MismatchedStartCloseTag);
139
+ } else {
140
+ if (name == "script") return input.acceptToken(StartScriptTag);
141
+ if (name == "style") return input.acceptToken(StartStyleTag);
142
+ if (name == "textarea") return input.acceptToken(StartTextareaTag);
143
+ if (selfClosers$1.hasOwnProperty(name)) return input.acceptToken(StartSelfClosingTag);
144
+ if (parent && closeOnOpen[parent] && closeOnOpen[parent][name]) input.acceptToken(missingCloseTag, -1);
145
+ else input.acceptToken(StartTag);
146
+ }
147
+ }, { contextual: true });
148
+ const commentContent = new ExternalTokenizer((input) => {
149
+ for (let dashes = 0, i = 0; ; i++) {
150
+ if (input.next < 0) {
151
+ if (i) input.acceptToken(commentContent$1);
152
+ break;
153
+ }
154
+ if (input.next == dash) {
155
+ dashes++;
156
+ } else if (input.next == greaterThan && dashes >= 2) {
157
+ if (i >= 3) input.acceptToken(commentContent$1, -2);
158
+ break;
159
+ } else {
160
+ dashes = 0;
161
+ }
162
+ input.advance();
163
+ }
164
+ });
165
+ function inForeignElement(context) {
166
+ for (; context; context = context.parent)
167
+ if (context.name == "svg" || context.name == "math") return true;
168
+ return false;
169
+ }
170
+ const endTag = new ExternalTokenizer((input, stack) => {
171
+ if (input.next == slash && input.peek(1) == greaterThan) {
172
+ let selfClosing = stack.dialectEnabled(Dialect_selfClosing) || inForeignElement(stack.context);
173
+ input.acceptToken(selfClosing ? SelfClosingEndTag : EndTag, 2);
174
+ } else if (input.next == greaterThan) {
175
+ input.acceptToken(EndTag, 1);
176
+ }
177
+ });
178
+ function contentTokenizer(tag, textToken, endToken) {
179
+ let lastState = 2 + tag.length;
180
+ return new ExternalTokenizer((input) => {
181
+ for (let state = 0, matchedLen = 0, i = 0; ; i++) {
182
+ if (input.next < 0) {
183
+ if (i) input.acceptToken(textToken);
184
+ break;
185
+ }
186
+ if (state == 0 && input.next == lessThan || state == 1 && input.next == slash || state >= 2 && state < lastState && input.next == tag.charCodeAt(state - 2)) {
187
+ state++;
188
+ matchedLen++;
189
+ } else if (state == lastState && input.next == greaterThan) {
190
+ if (i > matchedLen)
191
+ input.acceptToken(textToken, -matchedLen);
192
+ else
193
+ input.acceptToken(endToken, -(matchedLen - 2));
194
+ break;
195
+ } else if ((input.next == 10 || input.next == 13) && i) {
196
+ input.acceptToken(textToken, 1);
197
+ break;
198
+ } else {
199
+ state = matchedLen = 0;
200
+ }
201
+ input.advance();
202
+ }
203
+ });
204
+ }
205
+ const scriptTokens = contentTokenizer("script", scriptText, StartCloseScriptTag);
206
+ const styleTokens = contentTokenizer("style", styleText, StartCloseStyleTag);
207
+ const textareaTokens = contentTokenizer("textarea", textareaText, StartCloseTextareaTag);
208
+ const htmlHighlighting = styleTags({
209
+ "Text RawText IncompleteTag IncompleteCloseTag": tags.content,
210
+ "StartTag StartCloseTag SelfClosingEndTag EndTag": tags.angleBracket,
211
+ TagName: tags.tagName,
212
+ "MismatchedCloseTag/TagName": [tags.tagName, tags.invalid],
213
+ AttributeName: tags.attributeName,
214
+ "AttributeValue UnquotedAttributeValue": tags.attributeValue,
215
+ Is: tags.definitionOperator,
216
+ "EntityReference CharacterReference": tags.character,
217
+ Comment: tags.blockComment,
218
+ ProcessingInst: tags.processingInstruction,
219
+ DoctypeDecl: tags.documentMeta
220
+ });
221
+ const parser = LRParser.deserialize({
222
+ version: 14,
223
+ 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.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-E7]-E7]O)qQ#tO'#CzOOO`1G.w1G.wOOOb-E7^-E7^O)vQ#tO'#C}O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%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",
226
+ 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",
227
+ maxTerm: 68,
228
+ context: elementContext,
229
+ nodeProps: [
230
+ ["closedBy", -10, 1, 2, 3, 7, 8, 9, 10, 11, 12, 13, "EndTag", 6, "EndTag SelfClosingEndTag", -4, 22, 31, 34, 37, "CloseTag"],
231
+ ["openedBy", 4, "StartTag StartCloseTag", 5, "StartTag", -4, 30, 33, 36, 38, "OpenTag"],
232
+ ["group", -10, 14, 15, 18, 19, 20, 21, 40, 41, 42, 43, "Entity", 17, "Entity TextContent", -3, 29, 32, 35, "TextContent Entity"],
233
+ ["isolate", -11, 22, 30, 31, 33, 34, 36, 37, 38, 39, 42, 43, "ltr", -3, 27, 28, 40, ""]
234
+ ],
235
+ propSources: [htmlHighlighting],
236
+ skippedNodes: [0],
237
+ repeatNodeCount: 9,
238
+ tokenData: "!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}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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",
239
+ tokenizers: [scriptTokens, styleTokens, textareaTokens, endTag, tagStart, commentContent, 0, 1, 2, 3, 4, 5],
240
+ topRules: { "Document": [0, 16] },
241
+ dialects: { noMatch: 0, selfClosing: 515 },
242
+ tokenPrec: 517
243
+ });
244
+ function getAttrs(openTag, input) {
245
+ let attrs = /* @__PURE__ */ Object.create(null);
246
+ for (let att of openTag.getChildren(Attribute)) {
247
+ let name = att.getChild(AttributeName), value = att.getChild(AttributeValue) || att.getChild(UnquotedAttributeValue);
248
+ 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);
249
+ }
250
+ return attrs;
251
+ }
252
+ function findTagName(openTag, input) {
253
+ let tagNameNode = openTag.getChild(TagName);
254
+ return tagNameNode ? input.read(tagNameNode.from, tagNameNode.to) : " ";
255
+ }
256
+ function maybeNest(node, input, tags2) {
257
+ let attrs;
258
+ for (let tag of tags2) {
259
+ if (!tag.attrs || tag.attrs(attrs || (attrs = getAttrs(node.node.parent.firstChild, input))))
260
+ return { parser: tag.parser, bracketed: true };
261
+ }
262
+ return null;
263
+ }
264
+ function configureNesting(tags2 = [], attributes = []) {
265
+ let script = [], style = [], textarea = [], other = [];
266
+ for (let tag of tags2) {
267
+ let array = tag.tag == "script" ? script : tag.tag == "style" ? style : tag.tag == "textarea" ? textarea : other;
268
+ array.push(tag);
269
+ }
270
+ let attrs = attributes.length ? /* @__PURE__ */ Object.create(null) : null;
271
+ for (let attr of attributes) (attrs[attr.name] || (attrs[attr.name] = [])).push(attr);
272
+ return parseMixed((node, input) => {
273
+ let id = node.type.id;
274
+ if (id == ScriptText) return maybeNest(node, input, script);
275
+ if (id == StyleText) return maybeNest(node, input, style);
276
+ if (id == TextareaText) return maybeNest(node, input, textarea);
277
+ if (id == Element && other.length) {
278
+ let n = node.node, open = n.firstChild, tagName = open && findTagName(open, input), attrs2;
279
+ if (tagName) for (let tag of other) {
280
+ if (tag.tag == tagName && (!tag.attrs || tag.attrs(attrs2 || (attrs2 = getAttrs(open, input))))) {
281
+ let close = n.lastChild;
282
+ let to = close.type.id == CloseTag ? close.from : n.to;
283
+ if (to > open.to)
284
+ return { parser: tag.parser, overlay: [{ from: open.to, to }] };
285
+ }
286
+ }
287
+ }
288
+ if (attrs && id == Attribute) {
289
+ let n = node.node, nameNode;
290
+ if (nameNode = n.firstChild) {
291
+ let matches = attrs[input.read(nameNode.from, nameNode.to)];
292
+ if (matches) for (let attr of matches) {
293
+ if (attr.tagName && attr.tagName != findTagName(n.parent, input)) continue;
294
+ let value = n.lastChild;
295
+ if (value.type.id == AttributeValue) {
296
+ let from = value.from + 1;
297
+ let last = value.lastChild, to = value.to - (last && last.isError ? 0 : 1);
298
+ if (to > from) return { parser: attr.parser, overlay: [{ from, to }], bracketed: true };
299
+ } else if (value.type.id == UnquotedAttributeValue) {
300
+ return { parser: attr.parser, overlay: [{ from: value.from, to: value.to }] };
301
+ }
302
+ }
303
+ }
304
+ }
305
+ return null;
306
+ });
307
+ }
308
+ const Targets = ["_blank", "_self", "_top", "_parent"];
309
+ const Charsets = ["ascii", "utf-8", "utf-16", "latin1", "latin1"];
310
+ const Methods = ["get", "post", "put", "delete"];
311
+ const Encs = ["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"];
312
+ const Bool = ["true", "false"];
313
+ const S = {};
314
+ const Tags = {
315
+ a: {
316
+ attrs: {
317
+ href: null,
318
+ ping: null,
319
+ type: null,
320
+ media: null,
321
+ target: Targets,
322
+ hreflang: null
323
+ }
324
+ },
325
+ abbr: S,
326
+ address: S,
327
+ area: {
328
+ attrs: {
329
+ alt: null,
330
+ coords: null,
331
+ href: null,
332
+ target: null,
333
+ ping: null,
334
+ media: null,
335
+ hreflang: null,
336
+ type: null,
337
+ shape: ["default", "rect", "circle", "poly"]
338
+ }
339
+ },
340
+ article: S,
341
+ aside: S,
342
+ audio: {
343
+ attrs: {
344
+ src: null,
345
+ mediagroup: null,
346
+ crossorigin: ["anonymous", "use-credentials"],
347
+ preload: ["none", "metadata", "auto"],
348
+ autoplay: ["autoplay"],
349
+ loop: ["loop"],
350
+ controls: ["controls"]
351
+ }
352
+ },
353
+ b: S,
354
+ base: { attrs: { href: null, target: Targets } },
355
+ bdi: S,
356
+ bdo: S,
357
+ blockquote: { attrs: { cite: null } },
358
+ body: S,
359
+ br: S,
360
+ button: {
361
+ attrs: {
362
+ form: null,
363
+ formaction: null,
364
+ name: null,
365
+ value: null,
366
+ autofocus: ["autofocus"],
367
+ disabled: ["autofocus"],
368
+ formenctype: Encs,
369
+ formmethod: Methods,
370
+ formnovalidate: ["novalidate"],
371
+ formtarget: Targets,
372
+ type: ["submit", "reset", "button"]
373
+ }
374
+ },
375
+ canvas: { attrs: { width: null, height: null } },
376
+ caption: S,
377
+ center: S,
378
+ cite: S,
379
+ code: S,
380
+ col: { attrs: { span: null } },
381
+ colgroup: { attrs: { span: null } },
382
+ command: {
383
+ attrs: {
384
+ type: ["command", "checkbox", "radio"],
385
+ label: null,
386
+ icon: null,
387
+ radiogroup: null,
388
+ command: null,
389
+ title: null,
390
+ disabled: ["disabled"],
391
+ checked: ["checked"]
392
+ }
393
+ },
394
+ data: { attrs: { value: null } },
395
+ datagrid: { attrs: { disabled: ["disabled"], multiple: ["multiple"] } },
396
+ datalist: { attrs: { data: null } },
397
+ dd: S,
398
+ del: { attrs: { cite: null, datetime: null } },
399
+ details: { attrs: { open: ["open"] } },
400
+ dfn: S,
401
+ div: S,
402
+ dl: S,
403
+ dt: S,
404
+ em: S,
405
+ embed: { attrs: { src: null, type: null, width: null, height: null } },
406
+ eventsource: { attrs: { src: null } },
407
+ fieldset: { attrs: { disabled: ["disabled"], form: null, name: null } },
408
+ figcaption: S,
409
+ figure: S,
410
+ footer: S,
411
+ form: {
412
+ attrs: {
413
+ action: null,
414
+ name: null,
415
+ "accept-charset": Charsets,
416
+ autocomplete: ["on", "off"],
417
+ enctype: Encs,
418
+ method: Methods,
419
+ novalidate: ["novalidate"],
420
+ target: Targets
421
+ }
422
+ },
423
+ h1: S,
424
+ h2: S,
425
+ h3: S,
426
+ h4: S,
427
+ h5: S,
428
+ h6: S,
429
+ head: {
430
+ children: ["title", "base", "link", "style", "meta", "script", "noscript", "command"]
431
+ },
432
+ header: S,
433
+ hgroup: S,
434
+ hr: S,
435
+ html: {
436
+ attrs: { manifest: null }
437
+ },
438
+ i: S,
439
+ iframe: {
440
+ attrs: {
441
+ src: null,
442
+ srcdoc: null,
443
+ name: null,
444
+ width: null,
445
+ height: null,
446
+ sandbox: ["allow-top-navigation", "allow-same-origin", "allow-forms", "allow-scripts"],
447
+ seamless: ["seamless"]
448
+ }
449
+ },
450
+ img: {
451
+ attrs: {
452
+ alt: null,
453
+ src: null,
454
+ ismap: null,
455
+ usemap: null,
456
+ width: null,
457
+ height: null,
458
+ crossorigin: ["anonymous", "use-credentials"]
459
+ }
460
+ },
461
+ input: {
462
+ attrs: {
463
+ alt: null,
464
+ dirname: null,
465
+ form: null,
466
+ formaction: null,
467
+ height: null,
468
+ list: null,
469
+ max: null,
470
+ maxlength: null,
471
+ min: null,
472
+ name: null,
473
+ pattern: null,
474
+ placeholder: null,
475
+ size: null,
476
+ src: null,
477
+ step: null,
478
+ value: null,
479
+ width: null,
480
+ accept: ["audio/*", "video/*", "image/*"],
481
+ autocomplete: ["on", "off"],
482
+ autofocus: ["autofocus"],
483
+ checked: ["checked"],
484
+ disabled: ["disabled"],
485
+ formenctype: Encs,
486
+ formmethod: Methods,
487
+ formnovalidate: ["novalidate"],
488
+ formtarget: Targets,
489
+ multiple: ["multiple"],
490
+ readonly: ["readonly"],
491
+ required: ["required"],
492
+ type: [
493
+ "hidden",
494
+ "text",
495
+ "search",
496
+ "tel",
497
+ "url",
498
+ "email",
499
+ "password",
500
+ "datetime",
501
+ "date",
502
+ "month",
503
+ "week",
504
+ "time",
505
+ "datetime-local",
506
+ "number",
507
+ "range",
508
+ "color",
509
+ "checkbox",
510
+ "radio",
511
+ "file",
512
+ "submit",
513
+ "image",
514
+ "reset",
515
+ "button"
516
+ ]
517
+ }
518
+ },
519
+ ins: { attrs: { cite: null, datetime: null } },
520
+ kbd: S,
521
+ keygen: {
522
+ attrs: {
523
+ challenge: null,
524
+ form: null,
525
+ name: null,
526
+ autofocus: ["autofocus"],
527
+ disabled: ["disabled"],
528
+ keytype: ["RSA"]
529
+ }
530
+ },
531
+ label: { attrs: { for: null, form: null } },
532
+ legend: S,
533
+ li: { attrs: { value: null } },
534
+ link: {
535
+ attrs: {
536
+ href: null,
537
+ type: null,
538
+ hreflang: null,
539
+ media: null,
540
+ sizes: ["all", "16x16", "16x16 32x32", "16x16 32x32 64x64"]
541
+ }
542
+ },
543
+ map: { attrs: { name: null } },
544
+ mark: S,
545
+ menu: { attrs: { label: null, type: ["list", "context", "toolbar"] } },
546
+ meta: {
547
+ attrs: {
548
+ content: null,
549
+ charset: Charsets,
550
+ name: ["viewport", "application-name", "author", "description", "generator", "keywords"],
551
+ "http-equiv": ["content-language", "content-type", "default-style", "refresh"]
552
+ }
553
+ },
554
+ meter: { attrs: { value: null, min: null, low: null, high: null, max: null, optimum: null } },
555
+ nav: S,
556
+ noscript: S,
557
+ object: {
558
+ attrs: {
559
+ data: null,
560
+ type: null,
561
+ name: null,
562
+ usemap: null,
563
+ form: null,
564
+ width: null,
565
+ height: null,
566
+ typemustmatch: ["typemustmatch"]
567
+ }
568
+ },
569
+ ol: {
570
+ attrs: { reversed: ["reversed"], start: null, type: ["1", "a", "A", "i", "I"] },
571
+ children: ["li", "script", "template", "ul", "ol"]
572
+ },
573
+ optgroup: { attrs: { disabled: ["disabled"], label: null } },
574
+ option: { attrs: { disabled: ["disabled"], label: null, selected: ["selected"], value: null } },
575
+ output: { attrs: { for: null, form: null, name: null } },
576
+ p: S,
577
+ param: { attrs: { name: null, value: null } },
578
+ pre: S,
579
+ progress: { attrs: { value: null, max: null } },
580
+ q: { attrs: { cite: null } },
581
+ rp: S,
582
+ rt: S,
583
+ ruby: S,
584
+ samp: S,
585
+ script: {
586
+ attrs: {
587
+ type: ["text/javascript"],
588
+ src: null,
589
+ async: ["async"],
590
+ defer: ["defer"],
591
+ charset: Charsets
592
+ }
593
+ },
594
+ section: S,
595
+ select: {
596
+ attrs: {
597
+ form: null,
598
+ name: null,
599
+ size: null,
600
+ autofocus: ["autofocus"],
601
+ disabled: ["disabled"],
602
+ multiple: ["multiple"]
603
+ }
604
+ },
605
+ slot: { attrs: { name: null } },
606
+ small: S,
607
+ source: { attrs: { src: null, type: null, media: null } },
608
+ span: S,
609
+ strong: S,
610
+ style: {
611
+ attrs: {
612
+ type: ["text/css"],
613
+ media: null,
614
+ scoped: null
615
+ }
616
+ },
617
+ sub: S,
618
+ summary: S,
619
+ sup: S,
620
+ table: S,
621
+ tbody: S,
622
+ td: { attrs: { colspan: null, rowspan: null, headers: null } },
623
+ template: S,
624
+ textarea: {
625
+ attrs: {
626
+ dirname: null,
627
+ form: null,
628
+ maxlength: null,
629
+ name: null,
630
+ placeholder: null,
631
+ rows: null,
632
+ cols: null,
633
+ autofocus: ["autofocus"],
634
+ disabled: ["disabled"],
635
+ readonly: ["readonly"],
636
+ required: ["required"],
637
+ wrap: ["soft", "hard"]
638
+ }
639
+ },
640
+ tfoot: S,
641
+ th: { attrs: { colspan: null, rowspan: null, headers: null, scope: ["row", "col", "rowgroup", "colgroup"] } },
642
+ thead: S,
643
+ time: { attrs: { datetime: null } },
644
+ title: S,
645
+ tr: S,
646
+ track: {
647
+ attrs: {
648
+ src: null,
649
+ label: null,
650
+ default: null,
651
+ kind: ["subtitles", "captions", "descriptions", "chapters", "metadata"],
652
+ srclang: null
653
+ }
654
+ },
655
+ ul: { children: ["li", "script", "template", "ul", "ol"] },
656
+ var: S,
657
+ video: {
658
+ attrs: {
659
+ src: null,
660
+ poster: null,
661
+ width: null,
662
+ height: null,
663
+ crossorigin: ["anonymous", "use-credentials"],
664
+ preload: ["auto", "metadata", "none"],
665
+ autoplay: ["autoplay"],
666
+ mediagroup: ["movie"],
667
+ muted: ["muted"],
668
+ controls: ["controls"]
669
+ }
670
+ },
671
+ wbr: S
672
+ };
673
+ const GlobalAttrs = {
674
+ accesskey: null,
675
+ class: null,
676
+ contenteditable: Bool,
677
+ contextmenu: null,
678
+ dir: ["ltr", "rtl", "auto"],
679
+ draggable: ["true", "false", "auto"],
680
+ dropzone: ["copy", "move", "link", "string:", "file:"],
681
+ hidden: ["hidden"],
682
+ id: null,
683
+ inert: ["inert"],
684
+ itemid: null,
685
+ itemprop: null,
686
+ itemref: null,
687
+ itemscope: ["itemscope"],
688
+ itemtype: null,
689
+ lang: ["ar", "bn", "de", "en-GB", "en-US", "es", "fr", "hi", "id", "ja", "pa", "pt", "ru", "tr", "zh"],
690
+ spellcheck: Bool,
691
+ autocorrect: Bool,
692
+ autocapitalize: Bool,
693
+ style: null,
694
+ tabindex: null,
695
+ title: null,
696
+ translate: ["yes", "no"],
697
+ rel: ["stylesheet", "alternate", "author", "bookmark", "help", "license", "next", "nofollow", "noreferrer", "prefetch", "prev", "search", "tag"],
698
+ role: /* @__PURE__ */ "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(" "),
699
+ "aria-activedescendant": null,
700
+ "aria-atomic": Bool,
701
+ "aria-autocomplete": ["inline", "list", "both", "none"],
702
+ "aria-busy": Bool,
703
+ "aria-checked": ["true", "false", "mixed", "undefined"],
704
+ "aria-controls": null,
705
+ "aria-describedby": null,
706
+ "aria-disabled": Bool,
707
+ "aria-dropeffect": null,
708
+ "aria-expanded": ["true", "false", "undefined"],
709
+ "aria-flowto": null,
710
+ "aria-grabbed": ["true", "false", "undefined"],
711
+ "aria-haspopup": Bool,
712
+ "aria-hidden": Bool,
713
+ "aria-invalid": ["true", "false", "grammar", "spelling"],
714
+ "aria-label": null,
715
+ "aria-labelledby": null,
716
+ "aria-level": null,
717
+ "aria-live": ["off", "polite", "assertive"],
718
+ "aria-multiline": Bool,
719
+ "aria-multiselectable": Bool,
720
+ "aria-owns": null,
721
+ "aria-posinset": null,
722
+ "aria-pressed": ["true", "false", "mixed", "undefined"],
723
+ "aria-readonly": Bool,
724
+ "aria-relevant": null,
725
+ "aria-required": Bool,
726
+ "aria-selected": ["true", "false", "undefined"],
727
+ "aria-setsize": null,
728
+ "aria-sort": ["ascending", "descending", "none", "other"],
729
+ "aria-valuemax": null,
730
+ "aria-valuemin": null,
731
+ "aria-valuenow": null,
732
+ "aria-valuetext": null
733
+ };
734
+ const eventAttributes = /* @__PURE__ */ "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);
735
+ for (let a of eventAttributes)
736
+ GlobalAttrs[a] = null;
737
+ class Schema {
738
+ constructor(extraTags, extraAttrs) {
739
+ this.tags = { ...Tags, ...extraTags };
740
+ this.globalAttrs = { ...GlobalAttrs, ...extraAttrs };
741
+ this.allTags = Object.keys(this.tags);
742
+ this.globalAttrNames = Object.keys(this.globalAttrs);
743
+ }
744
+ }
745
+ Schema.default = /* @__PURE__ */ new Schema();
746
+ function elementName(doc, tree, max = doc.length) {
747
+ if (!tree)
748
+ return "";
749
+ let tag = tree.firstChild;
750
+ let name = tag && tag.getChild("TagName");
751
+ return name ? doc.sliceString(name.from, Math.min(name.to, max)) : "";
752
+ }
753
+ function findParentElement(tree, skip = false) {
754
+ for (; tree; tree = tree.parent)
755
+ if (tree.name == "Element") {
756
+ if (skip)
757
+ skip = false;
758
+ else
759
+ return tree;
760
+ }
761
+ return null;
762
+ }
763
+ function allowedChildren(doc, tree, schema) {
764
+ let parentInfo = schema.tags[elementName(doc, findParentElement(tree))];
765
+ return (parentInfo === null || parentInfo === void 0 ? void 0 : parentInfo.children) || schema.allTags;
766
+ }
767
+ function openTags(doc, tree) {
768
+ let open = [];
769
+ for (let parent = findParentElement(tree); parent && !parent.type.isTop; parent = findParentElement(parent.parent)) {
770
+ let tagName = elementName(doc, parent);
771
+ if (tagName && parent.lastChild.name == "CloseTag")
772
+ break;
773
+ if (tagName && open.indexOf(tagName) < 0 && (tree.name == "EndTag" || tree.from >= parent.firstChild.to))
774
+ open.push(tagName);
775
+ }
776
+ return open;
777
+ }
778
+ const identifier = /^[:\-\.\w\u00b7-\uffff]*$/;
779
+ function completeTag(state, schema, tree, from, to) {
780
+ let end = /\s*>/.test(state.sliceDoc(to, to + 5)) ? "" : ">";
781
+ let parent = findParentElement(tree, tree.name == "StartTag" || tree.name == "TagName");
782
+ return {
783
+ from,
784
+ to,
785
+ options: allowedChildren(state.doc, parent, schema).map((tagName) => ({ label: tagName, type: "type" })).concat(openTags(state.doc, tree).map((tag, i) => ({
786
+ label: "/" + tag,
787
+ apply: "/" + tag + end,
788
+ type: "type",
789
+ boost: 99 - i
790
+ }))),
791
+ validFor: /^\/?[:\-\.\w\u00b7-\uffff]*$/
792
+ };
793
+ }
794
+ function completeCloseTag(state, tree, from, to) {
795
+ let end = /\s*>/.test(state.sliceDoc(to, to + 5)) ? "" : ">";
796
+ return {
797
+ from,
798
+ to,
799
+ options: openTags(state.doc, tree).map((tag, i) => ({ label: tag, apply: tag + end, type: "type", boost: 99 - i })),
800
+ validFor: identifier
801
+ };
802
+ }
803
+ function completeStartTag(state, schema, tree, pos) {
804
+ let options = [], level = 0;
805
+ for (let tagName of allowedChildren(state.doc, tree, schema))
806
+ options.push({ label: "<" + tagName, type: "type" });
807
+ for (let open of openTags(state.doc, tree))
808
+ options.push({ label: "</" + open + ">", type: "type", boost: 99 - level++ });
809
+ return { from: pos, to: pos, options, validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/ };
810
+ }
811
+ function completeAttrName(state, schema, tree, from, to) {
812
+ let elt = findParentElement(tree), info = elt ? schema.tags[elementName(state.doc, elt)] : null;
813
+ let localAttrs = info && info.attrs ? Object.keys(info.attrs) : [];
814
+ let names = info && info.globalAttrs === false ? localAttrs : localAttrs.length ? localAttrs.concat(schema.globalAttrNames) : schema.globalAttrNames;
815
+ return {
816
+ from,
817
+ to,
818
+ options: names.map((attrName) => ({ label: attrName, type: "property" })),
819
+ validFor: identifier
820
+ };
821
+ }
822
+ function completeAttrValue(state, schema, tree, from, to) {
823
+ var _a;
824
+ let nameNode = (_a = tree.parent) === null || _a === void 0 ? void 0 : _a.getChild("AttributeName");
825
+ let options = [], token = void 0;
826
+ if (nameNode) {
827
+ let attrName = state.sliceDoc(nameNode.from, nameNode.to);
828
+ let attrs = schema.globalAttrs[attrName];
829
+ if (!attrs) {
830
+ let elt = findParentElement(tree), info = elt ? schema.tags[elementName(state.doc, elt)] : null;
831
+ attrs = (info === null || info === void 0 ? void 0 : info.attrs) && info.attrs[attrName];
832
+ }
833
+ if (attrs) {
834
+ let base = state.sliceDoc(from, to).toLowerCase(), quoteStart = '"', quoteEnd = '"';
835
+ if (/^['"]/.test(base)) {
836
+ token = base[0] == '"' ? /^[^"]*$/ : /^[^']*$/;
837
+ quoteStart = "";
838
+ quoteEnd = state.sliceDoc(to, to + 1) == base[0] ? "" : base[0];
839
+ base = base.slice(1);
840
+ from++;
841
+ } else {
842
+ token = /^[^\s<>='"]*$/;
843
+ }
844
+ for (let value of attrs)
845
+ options.push({ label: value, apply: quoteStart + value + quoteEnd, type: "constant" });
846
+ }
847
+ }
848
+ return { from, to, options, validFor: token };
849
+ }
850
+ function htmlCompletionFor(schema, context) {
851
+ let { state, pos } = context, tree = syntaxTree(state).resolveInner(pos, -1), around = tree.resolve(pos);
852
+ for (let scan = pos, before; around == tree && (before = tree.childBefore(scan)); ) {
853
+ let last = before.lastChild;
854
+ if (!last || !last.type.isError || last.from < last.to)
855
+ break;
856
+ around = tree = before;
857
+ scan = last.from;
858
+ }
859
+ if (tree.name == "TagName") {
860
+ return tree.parent && /CloseTag$/.test(tree.parent.name) ? completeCloseTag(state, tree, tree.from, pos) : completeTag(state, schema, tree, tree.from, pos);
861
+ } else if (tree.name == "StartTag" || tree.name == "IncompleteTag") {
862
+ return completeTag(state, schema, tree, pos, pos);
863
+ } else if (tree.name == "StartCloseTag" || tree.name == "IncompleteCloseTag") {
864
+ return completeCloseTag(state, tree, pos, pos);
865
+ } else if (tree.name == "OpenTag" || tree.name == "SelfClosingTag" || tree.name == "AttributeName") {
866
+ return completeAttrName(state, schema, tree, tree.name == "AttributeName" ? tree.from : pos, pos);
867
+ } else if (tree.name == "Is" || tree.name == "AttributeValue" || tree.name == "UnquotedAttributeValue") {
868
+ return completeAttrValue(state, schema, tree, tree.name == "Is" ? pos : tree.from, pos);
869
+ } else if (context.explicit && (around.name == "Element" || around.name == "Text" || around.name == "Document")) {
870
+ return completeStartTag(state, schema, tree, pos);
871
+ } else {
872
+ return null;
873
+ }
874
+ }
875
+ function htmlCompletionSource(context) {
876
+ return htmlCompletionFor(Schema.default, context);
877
+ }
878
+ function htmlCompletionSourceWith(config) {
879
+ let { extraTags, extraGlobalAttributes: extraAttrs } = config;
880
+ let schema = extraAttrs || extraTags ? new Schema(extraTags, extraAttrs) : Schema.default;
881
+ return (context) => htmlCompletionFor(schema, context);
882
+ }
883
+ const jsonParser = /* @__PURE__ */ javascriptLanguage.parser.configure({ top: "SingleExpression" });
884
+ const defaultNesting = [
885
+ {
886
+ tag: "script",
887
+ attrs: (attrs) => attrs.type == "text/typescript" || attrs.lang == "ts",
888
+ parser: typescriptLanguage.parser
889
+ },
890
+ {
891
+ tag: "script",
892
+ attrs: (attrs) => attrs.type == "text/babel" || attrs.type == "text/jsx",
893
+ parser: jsxLanguage.parser
894
+ },
895
+ {
896
+ tag: "script",
897
+ attrs: (attrs) => attrs.type == "text/typescript-jsx",
898
+ parser: tsxLanguage.parser
899
+ },
900
+ {
901
+ tag: "script",
902
+ attrs(attrs) {
903
+ return /^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(attrs.type);
904
+ },
905
+ parser: jsonParser
906
+ },
907
+ {
908
+ tag: "script",
909
+ attrs(attrs) {
910
+ return !attrs.type || /^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(attrs.type);
911
+ },
912
+ parser: javascriptLanguage.parser
913
+ },
914
+ {
915
+ tag: "style",
916
+ attrs(attrs) {
917
+ return (!attrs.lang || attrs.lang == "css") && (!attrs.type || /^(text\/)?(x-)?(stylesheet|css)$/i.test(attrs.type));
918
+ },
919
+ parser: cssLanguage.parser
920
+ }
921
+ ];
922
+ const defaultAttrs = /* @__PURE__ */ [
923
+ {
924
+ name: "style",
925
+ parser: /* @__PURE__ */ cssLanguage.parser.configure({ top: "Styles" })
926
+ }
927
+ ].concat(/* @__PURE__ */ eventAttributes.map((name) => ({ name, parser: javascriptLanguage.parser })));
928
+ const htmlPlain = /* @__PURE__ */ LRLanguage.define({
929
+ name: "html",
930
+ parser: /* @__PURE__ */ parser.configure({
931
+ props: [
932
+ /* @__PURE__ */ indentNodeProp.add({
933
+ Element(context) {
934
+ let after = /^(\s*)(<\/)?/.exec(context.textAfter);
935
+ if (context.node.to <= context.pos + after[0].length)
936
+ return context.continue();
937
+ return context.lineIndent(context.node.from) + (after[2] ? 0 : context.unit);
938
+ },
939
+ "OpenTag CloseTag SelfClosingTag"(context) {
940
+ return context.column(context.node.from) + context.unit;
941
+ },
942
+ Document(context) {
943
+ if (context.pos + /\s*/.exec(context.textAfter)[0].length < context.node.to)
944
+ return context.continue();
945
+ let endElt = null, close;
946
+ for (let cur = context.node; ; ) {
947
+ let last = cur.lastChild;
948
+ if (!last || last.name != "Element" || last.to != cur.to)
949
+ break;
950
+ endElt = cur = last;
951
+ }
952
+ if (endElt && !((close = endElt.lastChild) && (close.name == "CloseTag" || close.name == "SelfClosingTag")))
953
+ return context.lineIndent(endElt.from) + context.unit;
954
+ return null;
955
+ }
956
+ }),
957
+ /* @__PURE__ */ foldNodeProp.add({
958
+ Element(node) {
959
+ let first = node.firstChild, last = node.lastChild;
960
+ if (!first || first.name != "OpenTag")
961
+ return null;
962
+ return { from: first.to, to: last.name == "CloseTag" ? last.from : node.to };
963
+ }
964
+ }),
965
+ /* @__PURE__ */ bracketMatchingHandle.add({
966
+ "OpenTag CloseTag": (node) => node.getChild("TagName")
967
+ })
968
+ ]
969
+ }),
970
+ languageData: {
971
+ commentTokens: { block: { open: "<!--", close: "-->" } },
972
+ indentOnInput: /^\s*<\/\w+\W$/,
973
+ wordChars: "-_"
974
+ }
975
+ });
976
+ const htmlLanguage = /* @__PURE__ */ htmlPlain.configure({
977
+ wrap: /* @__PURE__ */ configureNesting(defaultNesting, defaultAttrs)
978
+ });
979
+ function html(config = {}) {
980
+ let dialect = "", wrap;
981
+ if (config.matchClosingTags === false)
982
+ dialect = "noMatch";
983
+ if (config.selfClosingTags === true)
984
+ dialect = (dialect ? dialect + " " : "") + "selfClosing";
985
+ if (config.nestedLanguages && config.nestedLanguages.length || config.nestedAttributes && config.nestedAttributes.length)
986
+ wrap = configureNesting((config.nestedLanguages || []).concat(defaultNesting), (config.nestedAttributes || []).concat(defaultAttrs));
987
+ let lang = wrap ? htmlPlain.configure({ wrap, dialect }) : dialect ? htmlLanguage.configure({ dialect }) : htmlLanguage;
988
+ return new LanguageSupport(lang, [
989
+ htmlLanguage.data.of({ autocomplete: htmlCompletionSourceWith(config) }),
990
+ config.autoCloseTags !== false ? autoCloseTags : [],
991
+ javascript().support,
992
+ css().support
993
+ ]);
994
+ }
995
+ const selfClosers = /* @__PURE__ */ new Set(/* @__PURE__ */ "area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" "));
996
+ const autoCloseTags = /* @__PURE__ */ EditorView.inputHandler.of((view, from, to, text, insertTransaction) => {
997
+ if (view.composing || view.state.readOnly || from != to || text != ">" && text != "/" || !htmlLanguage.isActiveAt(view.state, from, -1))
998
+ return false;
999
+ let base = insertTransaction(), { state } = base;
1000
+ let closeTags = state.changeByRange((range) => {
1001
+ var _a, _b, _c;
1002
+ let didType = state.doc.sliceString(range.from - 1, range.to) == text;
1003
+ let { head } = range, after = syntaxTree(state).resolveInner(head, -1), name;
1004
+ if (didType && text == ">" && after.name == "EndTag") {
1005
+ let tag = after.parent;
1006
+ 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)) && !selfClosers.has(name)) {
1007
+ let to2 = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
1008
+ let insert = `</${name}>`;
1009
+ return { range, changes: { from: head, to: to2, insert } };
1010
+ }
1011
+ } else if (didType && text == "/" && after.name == "IncompleteCloseTag") {
1012
+ let tag = after.parent;
1013
+ if (after.from == head - 2 && ((_c = tag.lastChild) === null || _c === void 0 ? void 0 : _c.name) != "CloseTag" && (name = elementName(state.doc, tag, head)) && !selfClosers.has(name)) {
1014
+ let to2 = head + (state.doc.sliceString(head, head + 1) === ">" ? 1 : 0);
1015
+ let insert = `${name}>`;
1016
+ return {
1017
+ range: EditorSelection.cursor(head + insert.length, -1),
1018
+ changes: { from: head, to: to2, insert }
1019
+ };
1020
+ }
1021
+ }
1022
+ return { range };
1023
+ });
1024
+ if (closeTags.changes.empty)
1025
+ return false;
1026
+ view.dispatch([
1027
+ base,
1028
+ state.update(closeTags, {
1029
+ userEvent: "input.complete",
1030
+ scrollIntoView: true
1031
+ })
1032
+ ]);
1033
+ return true;
1034
+ });
1035
+ export {
1036
+ autoCloseTags,
1037
+ html,
1038
+ htmlCompletionSource,
1039
+ htmlCompletionSourceWith,
1040
+ htmlLanguage
1041
+ };