@milkdown/crepe 7.3.3

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 (241) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +11 -0
  3. package/lib/apl-p0IPP13W.js +76 -0
  4. package/lib/asciiarmor-lJsBxlJJ.js +34 -0
  5. package/lib/asn1-Q9v1zIy5.js +102 -0
  6. package/lib/asterisk-foNkeTjy.js +273 -0
  7. package/lib/brainfuck-0XqyXpNS.js +35 -0
  8. package/lib/clike-ak6Z6Yhe.js +639 -0
  9. package/lib/clojure-iYO8U8Sg.js +810 -0
  10. package/lib/clsx-7d8NmkQq.js +21 -0
  11. package/lib/cmake-SVzjkxV_.js +28 -0
  12. package/lib/cobol-APHEnAOX.js +74 -0
  13. package/lib/coffeescript-KqQa0SYG.js +182 -0
  14. package/lib/commonlisp-bwqNqR5V.js +79 -0
  15. package/lib/core/crepe.d.ts +21 -0
  16. package/lib/core/crepe.d.ts.map +1 -0
  17. package/lib/core/index.d.ts +3 -0
  18. package/lib/core/index.d.ts.map +1 -0
  19. package/lib/core/slice.d.ts +12 -0
  20. package/lib/core/slice.d.ts.map +1 -0
  21. package/lib/crystal-BViWuDpA.js +217 -0
  22. package/lib/css-KHXHXfXg.js +1572 -0
  23. package/lib/cypher-XpTt4zQ3.js +69 -0
  24. package/lib/d-fLig6yqY.js +139 -0
  25. package/lib/diff-WoKGLpy6.js +18 -0
  26. package/lib/dockerfile-u6f6Vw2s.js +194 -0
  27. package/lib/dtd-SIJRUW6K.js +91 -0
  28. package/lib/dylan-4HCLhpWP.js +238 -0
  29. package/lib/ebnf-h_0lged5.js +77 -0
  30. package/lib/ecl-Lf4FF0lf.js +133 -0
  31. package/lib/eiffel-qlw8KUyf.js +112 -0
  32. package/lib/elm-QRnB3zXs.js +108 -0
  33. package/lib/erlang-fyVKb7eK.js +488 -0
  34. package/lib/factor-BEeN4upY.js +65 -0
  35. package/lib/fcl-lRek3hEb.js +106 -0
  36. package/lib/feature/block-edit/handle/component.d.ts +9 -0
  37. package/lib/feature/block-edit/handle/component.d.ts.map +1 -0
  38. package/lib/feature/block-edit/handle/index.d.ts +12 -0
  39. package/lib/feature/block-edit/handle/index.d.ts.map +1 -0
  40. package/lib/feature/block-edit/index.d.ts +3 -0
  41. package/lib/feature/block-edit/index.d.ts.map +1 -0
  42. package/lib/feature/block-edit/menu/component.d.ts +14 -0
  43. package/lib/feature/block-edit/menu/component.d.ts.map +1 -0
  44. package/lib/feature/block-edit/menu/config.d.ts +21 -0
  45. package/lib/feature/block-edit/menu/config.d.ts.map +1 -0
  46. package/lib/feature/block-edit/menu/icons.d.ts +14 -0
  47. package/lib/feature/block-edit/menu/icons.d.ts.map +1 -0
  48. package/lib/feature/block-edit/menu/index.d.ts +9 -0
  49. package/lib/feature/block-edit/menu/index.d.ts.map +1 -0
  50. package/lib/feature/code-mirror/index.d.ts +3 -0
  51. package/lib/feature/code-mirror/index.d.ts.map +1 -0
  52. package/lib/feature/gap-cursor/index.d.ts +3 -0
  53. package/lib/feature/gap-cursor/index.d.ts.map +1 -0
  54. package/lib/feature/image-block/index.d.ts +3 -0
  55. package/lib/feature/image-block/index.d.ts.map +1 -0
  56. package/lib/feature/index.d.ts +18 -0
  57. package/lib/feature/index.d.ts.map +1 -0
  58. package/lib/feature/link-tooltip/consts.d.ts +5 -0
  59. package/lib/feature/link-tooltip/consts.d.ts.map +1 -0
  60. package/lib/feature/link-tooltip/index.d.ts +3 -0
  61. package/lib/feature/link-tooltip/index.d.ts.map +1 -0
  62. package/lib/feature/list-item/consts.d.ts +2 -0
  63. package/lib/feature/list-item/consts.d.ts.map +1 -0
  64. package/lib/feature/list-item/index.d.ts +3 -0
  65. package/lib/feature/list-item/index.d.ts.map +1 -0
  66. package/lib/feature/placeholder/index.d.ts +10 -0
  67. package/lib/feature/placeholder/index.d.ts.map +1 -0
  68. package/lib/feature/shared.d.ts +3 -0
  69. package/lib/feature/shared.d.ts.map +1 -0
  70. package/lib/feature/toolbar/component.d.ts +13 -0
  71. package/lib/feature/toolbar/component.d.ts.map +1 -0
  72. package/lib/feature/toolbar/consts.d.ts +5 -0
  73. package/lib/feature/toolbar/consts.d.ts.map +1 -0
  74. package/lib/feature/toolbar/index.d.ts +3 -0
  75. package/lib/feature/toolbar/index.d.ts.map +1 -0
  76. package/lib/forth-ua2bRd8T.js +60 -0
  77. package/lib/fortran-WnF7znuN.js +443 -0
  78. package/lib/gas-wowve1o7.js +183 -0
  79. package/lib/gherkin-m7GIChu3.js +34 -0
  80. package/lib/go-th443Dhb.js +158 -0
  81. package/lib/groovy-tR4RiZnc.js +161 -0
  82. package/lib/haskell-jxVBofv5.js +375 -0
  83. package/lib/haxe-kWPI2tq3.js +390 -0
  84. package/lib/hooks-82sqkbtE.js +21 -0
  85. package/lib/http-3GIFWUlG.js +45 -0
  86. package/lib/icons-HYkfuR-O.js +50 -0
  87. package/lib/idl-PvpMZg-l.js +947 -0
  88. package/lib/index-0RbcZMbq.js +8 -0
  89. package/lib/index-4afXjFMY.js +517 -0
  90. package/lib/index-7MeyepDG.js +78 -0
  91. package/lib/index-7QgQq3x3.js +551 -0
  92. package/lib/index-7pgP6qYs.js +107 -0
  93. package/lib/index-8DvtgRVa.js +19511 -0
  94. package/lib/index-8Gg-jEP4.js +288 -0
  95. package/lib/index-8S8qcncB.js +507 -0
  96. package/lib/index-9A_GmGh4.js +1039 -0
  97. package/lib/index-EJJfYLzA.js +928 -0
  98. package/lib/index-Eg39w5kL.js +984 -0
  99. package/lib/index-FIk_7oPb.js +168 -0
  100. package/lib/index-LlbrXb_n.js +368 -0
  101. package/lib/index-MovKtgMG.js +121 -0
  102. package/lib/index-N9GtIS4X.js +64 -0
  103. package/lib/index-Pwn25-kf.js +8 -0
  104. package/lib/index-SdFSDosa.js +1295 -0
  105. package/lib/index-W5Th22-Z.js +1744 -0
  106. package/lib/index-XiXSFLmI.js +20975 -0
  107. package/lib/index-bknOViGv.js +47 -0
  108. package/lib/index-bkuIUPFS.js +275 -0
  109. package/lib/index-jPA8J9Eo.js +8 -0
  110. package/lib/index-lsG76a9s.js +552 -0
  111. package/lib/index-oTRzPo3B.js +146 -0
  112. package/lib/index-rrf6_6DC.js +317 -0
  113. package/lib/index-vJbZIHYF.js +81 -0
  114. package/lib/index-vPRh55CO.js +137 -0
  115. package/lib/index-vxy63hib.js +323 -0
  116. package/lib/index-wn1_LgCS.js +99 -0
  117. package/lib/index-xHADmDT3.js +12 -0
  118. package/lib/index-yt2EpMtv.js +141 -0
  119. package/lib/index.d.ts +4 -0
  120. package/lib/index.d.ts.map +1 -0
  121. package/lib/index.es.js +7 -0
  122. package/lib/javascript-8ZHqHagw.js +758 -0
  123. package/lib/jinja2-vsOFe0qD.js +154 -0
  124. package/lib/julia-dlp_pbN1.js +241 -0
  125. package/lib/livescript-Gf5R-LT6.js +273 -0
  126. package/lib/lua-c5Y_JsBp.js +221 -0
  127. package/lib/mathematica-iiGTGmUs.js +35 -0
  128. package/lib/mbox-ZJh86H8B.js +78 -0
  129. package/lib/meta-tAGyVRPE.js +511 -0
  130. package/lib/mirc-i0qkCa0y.js +73 -0
  131. package/lib/mllike-Dy551fZW.js +275 -0
  132. package/lib/modelica-n6tGqUT9.js +94 -0
  133. package/lib/mscgen-aKSbB7D9.js +104 -0
  134. package/lib/mumps-lNiKA6sp.js +25 -0
  135. package/lib/nginx--YmuCfDj.js +93 -0
  136. package/lib/nsis-zhS8iA09.js +62 -0
  137. package/lib/ntriples-E3jQl3MC.js +79 -0
  138. package/lib/octave-EQvkGIeG.js +144 -0
  139. package/lib/oz-W2cpqFf6.js +152 -0
  140. package/lib/pascal-lCh6ouNZ.js +79 -0
  141. package/lib/perl-PxEQBX0B.js +915 -0
  142. package/lib/pig-Y_bNcrzS.js +56 -0
  143. package/lib/powershell-GaQP-TZr.js +249 -0
  144. package/lib/properties-mbRyn54L.js +26 -0
  145. package/lib/prosemirror-noTDkx-k.js +4 -0
  146. package/lib/protobuf-8CJideyJ.js +49 -0
  147. package/lib/puppet-ABBaChNZ.js +45 -0
  148. package/lib/python-sKdHg3Ka.js +321 -0
  149. package/lib/q-_1yG40Nm.js +89 -0
  150. package/lib/r-Ziz56bHT.js +108 -0
  151. package/lib/rpm-ORjGOHaQ.js +57 -0
  152. package/lib/ruby-jlbYq0dT.js +233 -0
  153. package/lib/sas-2n7xeUuO.js +107 -0
  154. package/lib/schema-tKk3m1fu.js +62 -0
  155. package/lib/scheme-XCs-NPeU.js +126 -0
  156. package/lib/shell-0_1Um7Dq.js +184 -0
  157. package/lib/sieve-7uyJD1x1.js +73 -0
  158. package/lib/simple-mode--HIzBxba.js +95 -0
  159. package/lib/smalltalk-PEFzrlQ-.js +48 -0
  160. package/lib/solr-BLBaHahN.js +41 -0
  161. package/lib/sparql-4F9ZWf1b.js +204 -0
  162. package/lib/spreadsheet-SGSo6blj.js +49 -0
  163. package/lib/sql-tebLBzN0.js +291 -0
  164. package/lib/stex-SFJcFGOO.js +130 -0
  165. package/lib/stylus-rwwWYWFm.js +256 -0
  166. package/lib/swift-eorJ0tCv.js +238 -0
  167. package/lib/tcl-IwXMB8U4.js +82 -0
  168. package/lib/textile-ok2VyjwC.js +299 -0
  169. package/lib/theme/classic/index.d.ts +3 -0
  170. package/lib/theme/classic/index.d.ts.map +1 -0
  171. package/lib/theme/classic-dark/index.d.ts +3 -0
  172. package/lib/theme/classic-dark/index.d.ts.map +1 -0
  173. package/lib/theme/headless/index.d.ts +3 -0
  174. package/lib/theme/headless/index.d.ts.map +1 -0
  175. package/lib/theme/index.d.ts +8 -0
  176. package/lib/theme/index.d.ts.map +1 -0
  177. package/lib/theme/shared.d.ts +3 -0
  178. package/lib/theme/shared.d.ts.map +1 -0
  179. package/lib/tiddlywiki-DLhz8_pc.js +156 -0
  180. package/lib/tiki-DFAqFElY.js +183 -0
  181. package/lib/tippy.esm-MZ2vxByW.js +1813 -0
  182. package/lib/toml-ryxpTZEV.js +49 -0
  183. package/lib/tooltip-plugin-gcwyQdiT.js +119 -0
  184. package/lib/troff-ZzZyvNct.js +36 -0
  185. package/lib/ttcn-6gvkqqpW.js +136 -0
  186. package/lib/ttcn-cfg-oSu-Dq5C.js +98 -0
  187. package/lib/turtle-10ofr5au.js +87 -0
  188. package/lib/use-css-light-dom-EKWZDmbJ.js +82 -0
  189. package/lib/utils/index.d.ts +4 -0
  190. package/lib/utils/index.d.ts.map +1 -0
  191. package/lib/vb-a6n6fzrD.js +74 -0
  192. package/lib/vbscript-dgvo8jPt.js +324 -0
  193. package/lib/velocity-CBncCrwO.js +97 -0
  194. package/lib/verilog-KlcACt6C.js +271 -0
  195. package/lib/vhdl-NMd7Gf35.js +117 -0
  196. package/lib/webidl-z1UE5DN_.js +160 -0
  197. package/lib/xquery-hDt5jWTp.js +431 -0
  198. package/lib/yacas-ftgh_qwr.js +74 -0
  199. package/lib/yaml-DnNTfjXK.js +53 -0
  200. package/lib/z80-dA1PqWe1.js +62 -0
  201. package/package.json +87 -0
  202. package/src/core/crepe.ts +98 -0
  203. package/src/core/index.ts +4 -0
  204. package/src/core/slice.ts +44 -0
  205. package/src/feature/block-edit/handle/component.ts +68 -0
  206. package/src/feature/block-edit/handle/index.ts +81 -0
  207. package/src/feature/block-edit/index.ts +17 -0
  208. package/src/feature/block-edit/menu/component.ts +210 -0
  209. package/src/feature/block-edit/menu/config.ts +335 -0
  210. package/src/feature/block-edit/menu/icons.ts +171 -0
  211. package/src/feature/block-edit/menu/index.ts +113 -0
  212. package/src/feature/block-edit/style.css +126 -0
  213. package/src/feature/code-mirror/index.ts +60 -0
  214. package/src/feature/code-mirror/style.css +159 -0
  215. package/src/feature/gap-cursor/index.ts +31 -0
  216. package/src/feature/image-block/index.ts +59 -0
  217. package/src/feature/image-block/style.css +215 -0
  218. package/src/feature/index.ts +66 -0
  219. package/src/feature/link-tooltip/consts.ts +47 -0
  220. package/src/feature/link-tooltip/index.ts +22 -0
  221. package/src/feature/link-tooltip/style.css +107 -0
  222. package/src/feature/list-item/consts.ts +15 -0
  223. package/src/feature/list-item/index.ts +30 -0
  224. package/src/feature/list-item/style.css +23 -0
  225. package/src/feature/placeholder/index.ts +87 -0
  226. package/src/feature/placeholder/style.css +9 -0
  227. package/src/feature/shared.ts +4 -0
  228. package/src/feature/toolbar/component.ts +101 -0
  229. package/src/feature/toolbar/consts.ts +26 -0
  230. package/src/feature/toolbar/index.ts +92 -0
  231. package/src/feature/toolbar/style.css +37 -0
  232. package/src/index.ts +5 -0
  233. package/src/theme/classic/index.ts +12 -0
  234. package/src/theme/classic/style.css +192 -0
  235. package/src/theme/classic-dark/index.ts +12 -0
  236. package/src/theme/classic-dark/style.css +197 -0
  237. package/src/theme/headless/index.ts +9 -0
  238. package/src/theme/index.ts +26 -0
  239. package/src/theme/shared.ts +4 -0
  240. package/src/utils/index.ts +12 -0
  241. package/src/vite-env.d.ts +2 -0
@@ -0,0 +1,288 @@
1
+ import { C as Z, E as k, L as N } from "./index-SdFSDosa.js";
2
+ import { s as Y, t as $, L as A, b as I, f as j, F as U, a as z, e as q } from "./index-8DvtgRVa.js";
3
+ import "./meta-tAGyVRPE.js";
4
+ import "./icons-HYkfuR-O.js";
5
+ import "./index-XiXSFLmI.js";
6
+ import "./hooks-82sqkbtE.js";
7
+ import "./use-css-light-dom-EKWZDmbJ.js";
8
+ import "./clsx-7d8NmkQq.js";
9
+ const v = 1, D = 2, F = 3, M = 4, B = 5, J = 35, L = 36, H = 37, K = 11, ee = 13;
10
+ function te(e) {
11
+ return e == 45 || e == 46 || e == 58 || e >= 65 && e <= 90 || e == 95 || e >= 97 && e <= 122 || e >= 161;
12
+ }
13
+ function Oe(e) {
14
+ return e == 9 || e == 10 || e == 13 || e == 32;
15
+ }
16
+ let w = null, X = null, Q = 0;
17
+ function b(e, t) {
18
+ let n = e.pos + t;
19
+ if (X == e && Q == n)
20
+ return w;
21
+ for (; Oe(e.peek(t)); )
22
+ t++;
23
+ let O = "";
24
+ for (; ; ) {
25
+ let a = e.peek(t);
26
+ if (!te(a))
27
+ break;
28
+ O += String.fromCharCode(a), t++;
29
+ }
30
+ return X = e, Q = n, w = O || null;
31
+ }
32
+ function x(e, t) {
33
+ this.name = e, this.parent = t, this.hash = t ? t.hash : 0;
34
+ for (let n = 0; n < e.length; n++)
35
+ this.hash += (this.hash << 4) + e.charCodeAt(n) + (e.charCodeAt(n) << 8);
36
+ }
37
+ const ne = new Z({
38
+ start: null,
39
+ shift(e, t, n, O) {
40
+ return t == v ? new x(b(O, 1) || "", e) : e;
41
+ },
42
+ reduce(e, t) {
43
+ return t == K && e ? e.parent : e;
44
+ },
45
+ reuse(e, t, n, O) {
46
+ let a = t.type.id;
47
+ return a == v || a == ee ? new x(b(O, 1) || "", e) : e;
48
+ },
49
+ hash(e) {
50
+ return e ? e.hash : 0;
51
+ },
52
+ strict: !1
53
+ }), ae = new k((e, t) => {
54
+ if (e.next == 60) {
55
+ if (e.advance(), e.next == 47) {
56
+ e.advance();
57
+ let n = b(e, 0);
58
+ if (!n)
59
+ return e.acceptToken(B);
60
+ if (t.context && n == t.context.name)
61
+ return e.acceptToken(D);
62
+ for (let O = t.context; O; O = O.parent)
63
+ if (O.name == n)
64
+ return e.acceptToken(F, -2);
65
+ e.acceptToken(M);
66
+ } else if (e.next != 33 && e.next != 63)
67
+ return e.acceptToken(v);
68
+ }
69
+ }, { contextual: !0 });
70
+ function W(e, t) {
71
+ return new k((n) => {
72
+ let O = 0, a = t.charCodeAt(0);
73
+ e:
74
+ for (; !(n.next < 0); n.advance(), O++)
75
+ if (n.next == a) {
76
+ for (let r = 1; r < t.length; r++)
77
+ if (n.peek(r) != t.charCodeAt(r))
78
+ continue e;
79
+ break;
80
+ }
81
+ O && n.acceptToken(e);
82
+ });
83
+ }
84
+ const re = W(J, "-->"), le = W(L, "?>"), oe = W(H, "]]>"), se = Y({
85
+ Text: $.content,
86
+ "StartTag StartCloseTag EndTag SelfCloseEndTag": $.angleBracket,
87
+ TagName: $.tagName,
88
+ "MismatchedCloseTag/Tagname": [$.tagName, $.invalid],
89
+ AttributeName: $.attributeName,
90
+ AttributeValue: $.attributeValue,
91
+ Is: $.definitionOperator,
92
+ "EntityReference CharacterReference": $.character,
93
+ Comment: $.blockComment,
94
+ ProcessingInst: $.processingInstruction,
95
+ DoctypeDecl: $.documentMeta,
96
+ Cdata: $.special($.string)
97
+ }), ie = N.deserialize({
98
+ version: 14,
99
+ states: ",SOQOaOOOrOxO'#CfOzOpO'#CiO!tOaO'#CgOOOP'#Cg'#CgO!{OrO'#CrO#TOtO'#CsO#]OpO'#CtOOOP'#DS'#DSOOOP'#Cv'#CvQQOaOOOOOW'#Cw'#CwO#eOxO,59QOOOP,59Q,59QOOOO'#Cx'#CxO#mOpO,59TO#uO!bO,59TOOOP'#C{'#C{O$TOaO,59RO$[OpO'#CoOOOP,59R,59ROOOQ'#C|'#C|O$dOrO,59^OOOP,59^,59^OOOS'#C}'#C}O$lOtO,59_OOOP,59_,59_O$tOpO,59`O$|OpO,59`OOOP-E6t-E6tOOOW-E6u-E6uOOOP1G.l1G.lOOOO-E6v-E6vO%UO!bO1G.oO%UO!bO1G.oO%dOpO'#CkO%lO!bO'#CyO%zO!bO1G.oOOOP1G.o1G.oOOOP1G.w1G.wOOOP-E6y-E6yOOOP1G.m1G.mO&VOpO,59ZO&_OpO,59ZOOOQ-E6z-E6zOOOP1G.x1G.xOOOS-E6{-E6{OOOP1G.y1G.yO&gOpO1G.zO&gOpO1G.zOOOP1G.z1G.zO&oO!bO7+$ZO&}O!bO7+$ZOOOP7+$Z7+$ZOOOP7+$c7+$cO'YOpO,59VO'bOpO,59VO'jO!bO,59eOOOO-E6w-E6wO'xOpO1G.uO'xOpO1G.uOOOP1G.u1G.uO(QOpO7+$fOOOP7+$f7+$fO(YO!bO<<GuOOOP<<Gu<<GuOOOP<<G}<<G}O'bOpO1G.qO'bOpO1G.qO(eO#tO'#CnOOOO1G.q1G.qO(sOpO7+$aOOOP7+$a7+$aOOOP<<HQ<<HQOOOPAN=aAN=aOOOPAN=iAN=iO'bOpO7+$]OOOO7+$]7+$]OOOO'#Cz'#CzO({O#tO,59YOOOO,59Y,59YOOOP<<G{<<G{OOOO<<Gw<<GwOOOO-E6x-E6xOOOO1G.t1G.t",
100
+ stateData: ")Z~OPQOSVOTWOVWOWWOXWOiXOxPO}TO!PUO~OuZOw]O~O^`Oy^O~OPQOQcOSVOTWOVWOWWOXWOxPO}TO!PUO~ORdO~P!SOseO|gO~OthO!OjO~O^lOy^O~OuZOwoO~O^qOy^O~O[vO`sOdwOy^O~ORyO~P!SO^{Oy^O~OseO|}O~OthO!O!PO~O^!QOy^O~O[!SOy^O~O[!VO`sOd!WOy^O~Oa!YOy^O~Oy^O[mX`mXdmX~O[!VO`sOd!WO~O^!]Oy^O~O[!_Oy^O~O[!aOy^O~O[!cO`sOd!dOy^O~O[!cO`sOd!dO~Oa!eOy^O~Oy^Oz!gO~Oy^O[ma`madma~O[!jOy^O~O[!kOy^O~O[!lO`sOd!mO~OW!pOX!pOz!rO{!pO~O[!sOy^O~OW!pOX!pOz!vO{!pO~O",
101
+ goto: "%[wPPPPPPPPPPxxP!OP!UPP!_!iP!oxxxP!u!{#R$Z$j$p$v$|PPPP%SXWORYbXRORYb_t`qru!T!U!bQ!h!YS!o!e!fR!t!nQdRRybXSORYbQYORmYQ[PRn[Q_QQkVjp_krz!R!T!X!Z!^!`!f!i!nQr`QzcQ!RlQ!TqQ!XsQ!ZtQ!^{Q!`!QQ!f!YQ!i!]R!n!eQu`S!UqrU![u!U!bR!b!TQ!q!gR!u!qQbRRxbQfTR|fQiUR!OiSXOYTaRb",
102
+ nodeNames: "⚠ StartTag StartCloseTag MissingCloseTag StartCloseTag StartCloseTag Document Text EntityReference CharacterReference Cdata Element EndTag OpenTag TagName Attribute AttributeName Is AttributeValue CloseTag SelfCloseEndTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag DoctypeDecl",
103
+ maxTerm: 47,
104
+ context: ne,
105
+ nodeProps: [
106
+ ["closedBy", 1, "SelfCloseEndTag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S%y;'S;=`&_<%lO%yXCiV{WOr%ysv%yw#m%y#m#nDO#n;'S%y;'S;=`&_<%lO%yXDTV{WOr%ysv%yw#d%y#d#eDj#e;'S%y;'S;=`&_<%lO%yXDoV{WOr%ysv%yw#X%y#X#Y9i#Y;'S%y;'S;=`&_<%lO%yXE]T!PP{WOr%ysv%yw;'S%y;'S;=`&_<%lO%yZEuWaQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n_FhW[UVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZGXYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aGw!a;'S$n;'S;=`&e<%lO$nZHQW!OQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$nZHqYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_#P$n#P#QIa#Q;'S$n;'S;=`&e<%lO$nZIhYVP{WOr$nrs%_sv$nw!^$n!^!_%y!_!`$n!`!aJW!a;'S$n;'S;=`&e<%lO$nZJaWwQVP{WOr$nrs%_sv$nw!^$n!^!_%y!_;'S$n;'S;=`&e<%lO$n",
113
+ tokenizers: [ae, re, le, oe, 0, 1, 2, 3],
114
+ topRules: { Document: [0, 6] },
115
+ tokenPrec: 0
116
+ });
117
+ function T(e, t) {
118
+ let n = t && t.getChild("TagName");
119
+ return n ? e.sliceString(n.from, n.to) : "";
120
+ }
121
+ function _(e, t) {
122
+ let n = t && t.firstChild;
123
+ return !n || n.name != "OpenTag" ? "" : T(e, n);
124
+ }
125
+ function ye(e, t, n) {
126
+ let O = t && t.getChildren("Attribute").find((r) => r.from <= n && r.to >= n), a = O && O.getChild("AttributeName");
127
+ return a ? e.sliceString(a.from, a.to) : "";
128
+ }
129
+ function h(e) {
130
+ for (let t = e && e.parent; t; t = t.parent)
131
+ if (t.name == "Element")
132
+ return t;
133
+ return null;
134
+ }
135
+ function $e(e, t) {
136
+ var n;
137
+ let O = q(e).resolveInner(t, -1), a = null;
138
+ for (let r = O; !a && r.parent; r = r.parent)
139
+ (r.name == "OpenTag" || r.name == "CloseTag" || r.name == "SelfClosingTag" || r.name == "MismatchedCloseTag") && (a = r);
140
+ if (a && (a.to > t || a.lastChild.type.isError)) {
141
+ let r = a.parent;
142
+ if (O.name == "TagName")
143
+ return a.name == "CloseTag" || a.name == "MismatchedCloseTag" ? { type: "closeTag", from: O.from, context: r } : { type: "openTag", from: O.from, context: h(r) };
144
+ if (O.name == "AttributeName")
145
+ return { type: "attrName", from: O.from, context: a };
146
+ if (O.name == "AttributeValue")
147
+ return { type: "attrValue", from: O.from, context: a };
148
+ let i = O == a || O.name == "Attribute" ? O.childBefore(t) : O;
149
+ return (i == null ? void 0 : i.name) == "StartTag" ? { type: "openTag", from: t, context: h(r) } : (i == null ? void 0 : i.name) == "StartCloseTag" && i.to <= t ? { type: "closeTag", from: t, context: r } : (i == null ? void 0 : i.name) == "Is" ? { type: "attrValue", from: t, context: a } : i ? { type: "attrName", from: t, context: a } : null;
150
+ } else if (O.name == "StartCloseTag")
151
+ return { type: "closeTag", from: t, context: O.parent };
152
+ for (; O.parent && O.to == t && !(!((n = O.lastChild) === null || n === void 0) && n.type.isError); )
153
+ O = O.parent;
154
+ return O.name == "Element" || O.name == "Text" || O.name == "Document" ? { type: "tag", from: t, context: O.name == "Element" ? O : h(O) } : null;
155
+ }
156
+ class me {
157
+ constructor(t, n, O) {
158
+ this.attrs = n, this.attrValues = O, this.children = [], this.name = t.name, this.completion = Object.assign(Object.assign({ type: "type" }, t.completion || {}), { label: this.name }), this.openCompletion = Object.assign(Object.assign({}, this.completion), { label: "<" + this.name }), this.closeCompletion = Object.assign(Object.assign({}, this.completion), { label: "</" + this.name + ">", boost: 2 }), this.closeNameCompletion = Object.assign(Object.assign({}, this.completion), { label: this.name + ">" }), this.text = t.textContent ? t.textContent.map((a) => ({ label: a, type: "text" })) : [];
159
+ }
160
+ }
161
+ const C = /^[:\-\.\w\u00b7-\uffff]*$/;
162
+ function E(e) {
163
+ return Object.assign(Object.assign({ type: "property" }, e.completion || {}), { label: e.name });
164
+ }
165
+ function G(e) {
166
+ return typeof e == "string" ? { label: `"${e}"`, type: "constant" } : /^"/.test(e.label) ? e : Object.assign(Object.assign({}, e), { label: `"${e.label}"` });
167
+ }
168
+ function ge(e, t) {
169
+ let n = [], O = [], a = /* @__PURE__ */ Object.create(null);
170
+ for (let l of t) {
171
+ let m = E(l);
172
+ n.push(m), l.global && O.push(m), l.values && (a[l.name] = l.values.map(G));
173
+ }
174
+ let r = [], i = [], u = /* @__PURE__ */ Object.create(null);
175
+ for (let l of e) {
176
+ let m = O, o = a;
177
+ l.attributes && (m = m.concat(l.attributes.map((g) => typeof g == "string" ? n.find((f) => f.label == g) || { label: g, type: "property" } : (g.values && (o == a && (o = Object.create(o)), o[g.name] = g.values.map(G)), E(g)))));
178
+ let S = new me(l, m, o);
179
+ u[S.name] = S, r.push(S), l.top && i.push(S);
180
+ }
181
+ i.length || (i = r);
182
+ for (let l = 0; l < r.length; l++) {
183
+ let m = e[l], o = r[l];
184
+ if (m.children)
185
+ for (let S of m.children)
186
+ u[S] && o.children.push(u[S]);
187
+ else
188
+ o.children = r;
189
+ }
190
+ return (l) => {
191
+ var m;
192
+ let { doc: o } = l.state, S = $e(l.state, l.pos);
193
+ if (!S || S.type == "tag" && !l.explicit)
194
+ return null;
195
+ let { type: g, from: f, context: p } = S;
196
+ if (g == "openTag") {
197
+ let s = i, y = _(o, p);
198
+ if (y) {
199
+ let c = u[y];
200
+ s = (c == null ? void 0 : c.children) || r;
201
+ }
202
+ return {
203
+ from: f,
204
+ options: s.map((c) => c.completion),
205
+ validFor: C
206
+ };
207
+ } else if (g == "closeTag") {
208
+ let s = _(o, p);
209
+ return s ? {
210
+ from: f,
211
+ to: l.pos + (o.sliceString(l.pos, l.pos + 1) == ">" ? 1 : 0),
212
+ options: [((m = u[s]) === null || m === void 0 ? void 0 : m.closeNameCompletion) || { label: s + ">", type: "type" }],
213
+ validFor: C
214
+ } : null;
215
+ } else if (g == "attrName") {
216
+ let s = u[T(o, p)];
217
+ return {
218
+ from: f,
219
+ options: (s == null ? void 0 : s.attrs) || O,
220
+ validFor: C
221
+ };
222
+ } else if (g == "attrValue") {
223
+ let s = ye(o, p, f);
224
+ if (!s)
225
+ return null;
226
+ let y = u[T(o, p)], c = ((y == null ? void 0 : y.attrValues) || a)[s];
227
+ return !c || !c.length ? null : {
228
+ from: f,
229
+ to: l.pos + (o.sliceString(l.pos, l.pos + 1) == '"' ? 1 : 0),
230
+ options: c,
231
+ validFor: /^"[^"]*"?$/
232
+ };
233
+ } else if (g == "tag") {
234
+ let s = _(o, p), y = u[s], c = [], P = p && p.lastChild;
235
+ s && (!P || P.name != "CloseTag" || T(o, P) != s) && c.push(y ? y.closeCompletion : { label: "</" + s + ">", type: "type", boost: 2 });
236
+ let V = c.concat(((y == null ? void 0 : y.children) || (p ? r : i)).map((d) => d.openCompletion));
237
+ if (p && (y != null && y.text.length)) {
238
+ let d = p.firstChild;
239
+ d.to > l.pos - 20 && !/\S/.test(l.state.sliceDoc(d.to, l.pos)) && (V = V.concat(y.text));
240
+ }
241
+ return {
242
+ from: f,
243
+ options: V,
244
+ validFor: /^<\/?[:\-\.\w\u00b7-\uffff]*$/
245
+ };
246
+ } else
247
+ return null;
248
+ };
249
+ }
250
+ const R = /* @__PURE__ */ A.define({
251
+ name: "xml",
252
+ parser: /* @__PURE__ */ ie.configure({
253
+ props: [
254
+ /* @__PURE__ */ I.add({
255
+ Element(e) {
256
+ let t = /^\s*<\//.test(e.textAfter);
257
+ return e.lineIndent(e.node.from) + (t ? 0 : e.unit);
258
+ },
259
+ "OpenTag CloseTag SelfClosingTag"(e) {
260
+ return e.column(e.node.from) + e.unit;
261
+ }
262
+ }),
263
+ /* @__PURE__ */ j.add({
264
+ Element(e) {
265
+ let t = e.firstChild, n = e.lastChild;
266
+ return !t || t.name != "OpenTag" ? null : { from: t.to, to: n.name == "CloseTag" ? n.from : e.to };
267
+ }
268
+ }),
269
+ /* @__PURE__ */ U.add({
270
+ "OpenTag CloseTag": (e) => e.getChild("TagName")
271
+ })
272
+ ]
273
+ }),
274
+ languageData: {
275
+ commentTokens: { block: { open: "<!--", close: "-->" } },
276
+ indentOnInput: /^\s*<\/$/
277
+ }
278
+ });
279
+ function Ve(e = {}) {
280
+ return new z(R, R.data.of({
281
+ autocomplete: ge(e.elements || [], e.attributes || [])
282
+ }));
283
+ }
284
+ export {
285
+ ge as completeFromSchema,
286
+ Ve as xml,
287
+ R as xmlLanguage
288
+ };