@gsc-basic/components 1.0.1

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 (231) hide show
  1. package/dist/es/_virtual/_plugin-vue_export-helper.js +9 -0
  2. package/dist/es/index.js +35 -0
  3. package/dist/es/node_modules/@codemirror/autocomplete/dist/index.js +1371 -0
  4. package/dist/es/node_modules/@codemirror/commands/dist/index.js +838 -0
  5. package/dist/es/node_modules/@codemirror/lang-java/dist/index.js +38 -0
  6. package/dist/es/node_modules/@codemirror/lang-javascript/dist/index.js +300 -0
  7. package/dist/es/node_modules/@codemirror/lang-json/dist/index.js +48 -0
  8. package/dist/es/node_modules/@codemirror/lang-python/dist/index.js +399 -0
  9. package/dist/es/node_modules/@codemirror/lang-sql/dist/index.js +497 -0
  10. package/dist/es/node_modules/@codemirror/lang-xml/dist/index.js +216 -0
  11. package/dist/es/node_modules/@codemirror/lang-yaml/dist/index.js +51 -0
  12. package/dist/es/node_modules/@codemirror/language/dist/index.js +1299 -0
  13. package/dist/es/node_modules/@codemirror/lint/dist/index.js +649 -0
  14. package/dist/es/node_modules/@codemirror/search/dist/index.js +872 -0
  15. package/dist/es/node_modules/@codemirror/state/dist/index.js +2639 -0
  16. package/dist/es/node_modules/@codemirror/theme-one-dark/dist/index.js +132 -0
  17. package/dist/es/node_modules/@codemirror/view/dist/index.js +7280 -0
  18. package/dist/es/node_modules/@lezer/common/dist/index.js +1430 -0
  19. package/dist/es/node_modules/@lezer/highlight/dist/index.js +637 -0
  20. package/dist/es/node_modules/@lezer/java/dist/index.js +62 -0
  21. package/dist/es/node_modules/@lezer/javascript/dist/index.js +161 -0
  22. package/dist/es/node_modules/@lezer/json/dist/index.js +34 -0
  23. package/dist/es/node_modules/@lezer/lr/dist/index.js +1307 -0
  24. package/dist/es/node_modules/@lezer/python/dist/index.js +221 -0
  25. package/dist/es/node_modules/@lezer/xml/dist/index.js +100 -0
  26. package/dist/es/node_modules/@lezer/yaml/dist/index.js +274 -0
  27. package/dist/es/node_modules/@marijn/find-cluster-break/src/index.js +69 -0
  28. package/dist/es/node_modules/@vueuse/core/dist/index.js +125 -0
  29. package/dist/es/node_modules/@vueuse/shared/dist/index.js +55 -0
  30. package/dist/es/node_modules/codemirror/dist/index.js +40 -0
  31. package/dist/es/node_modules/crelt/index.js +27 -0
  32. package/dist/es/node_modules/lodash-es/_Hash.js +20 -0
  33. package/dist/es/node_modules/lodash-es/_ListCache.js +20 -0
  34. package/dist/es/node_modules/lodash-es/_Map.js +6 -0
  35. package/dist/es/node_modules/lodash-es/_MapCache.js +20 -0
  36. package/dist/es/node_modules/lodash-es/_Symbol.js +5 -0
  37. package/dist/es/node_modules/lodash-es/_arrayMap.js +8 -0
  38. package/dist/es/node_modules/lodash-es/_assocIndexOf.js +10 -0
  39. package/dist/es/node_modules/lodash-es/_baseGet.js +11 -0
  40. package/dist/es/node_modules/lodash-es/_baseGetTag.js +10 -0
  41. package/dist/es/node_modules/lodash-es/_baseIsNative.js +16 -0
  42. package/dist/es/node_modules/lodash-es/_baseToString.js +18 -0
  43. package/dist/es/node_modules/lodash-es/_castPath.js +10 -0
  44. package/dist/es/node_modules/lodash-es/_coreJsData.js +5 -0
  45. package/dist/es/node_modules/lodash-es/_freeGlobal.js +4 -0
  46. package/dist/es/node_modules/lodash-es/_getMapData.js +8 -0
  47. package/dist/es/node_modules/lodash-es/_getNative.js +9 -0
  48. package/dist/es/node_modules/lodash-es/_getRawTag.js +15 -0
  49. package/dist/es/node_modules/lodash-es/_getValue.js +6 -0
  50. package/dist/es/node_modules/lodash-es/_hashClear.js +7 -0
  51. package/dist/es/node_modules/lodash-es/_hashDelete.js +7 -0
  52. package/dist/es/node_modules/lodash-es/_hashGet.js +13 -0
  53. package/dist/es/node_modules/lodash-es/_hashHas.js +9 -0
  54. package/dist/es/node_modules/lodash-es/_hashSet.js +9 -0
  55. package/dist/es/node_modules/lodash-es/_isKey.js +12 -0
  56. package/dist/es/node_modules/lodash-es/_isKeyable.js +7 -0
  57. package/dist/es/node_modules/lodash-es/_isMasked.js +11 -0
  58. package/dist/es/node_modules/lodash-es/_listCacheClear.js +6 -0
  59. package/dist/es/node_modules/lodash-es/_listCacheDelete.js +12 -0
  60. package/dist/es/node_modules/lodash-es/_listCacheGet.js +8 -0
  61. package/dist/es/node_modules/lodash-es/_listCacheHas.js +7 -0
  62. package/dist/es/node_modules/lodash-es/_listCacheSet.js +8 -0
  63. package/dist/es/node_modules/lodash-es/_mapCacheClear.js +13 -0
  64. package/dist/es/node_modules/lodash-es/_mapCacheDelete.js +8 -0
  65. package/dist/es/node_modules/lodash-es/_mapCacheGet.js +7 -0
  66. package/dist/es/node_modules/lodash-es/_mapCacheHas.js +7 -0
  67. package/dist/es/node_modules/lodash-es/_mapCacheSet.js +8 -0
  68. package/dist/es/node_modules/lodash-es/_memoizeCapped.js +11 -0
  69. package/dist/es/node_modules/lodash-es/_nativeCreate.js +5 -0
  70. package/dist/es/node_modules/lodash-es/_objectToString.js +7 -0
  71. package/dist/es/node_modules/lodash-es/_root.js +5 -0
  72. package/dist/es/node_modules/lodash-es/_stringToPath.js +10 -0
  73. package/dist/es/node_modules/lodash-es/_toKey.js +10 -0
  74. package/dist/es/node_modules/lodash-es/_toSource.js +17 -0
  75. package/dist/es/node_modules/lodash-es/eq.js +6 -0
  76. package/dist/es/node_modules/lodash-es/get.js +8 -0
  77. package/dist/es/node_modules/lodash-es/isArray.js +4 -0
  78. package/dist/es/node_modules/lodash-es/isFunction.js +12 -0
  79. package/dist/es/node_modules/lodash-es/isNil.js +6 -0
  80. package/dist/es/node_modules/lodash-es/isObject.js +7 -0
  81. package/dist/es/node_modules/lodash-es/isObjectLike.js +6 -0
  82. package/dist/es/node_modules/lodash-es/isString.js +10 -0
  83. package/dist/es/node_modules/lodash-es/isSymbol.js +9 -0
  84. package/dist/es/node_modules/lodash-es/memoize.js +18 -0
  85. package/dist/es/node_modules/lodash-es/toString.js +7 -0
  86. package/dist/es/node_modules/style-mod/src/style-mod.js +109 -0
  87. package/dist/es/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +132 -0
  88. package/dist/es/node_modules/w3c-keyname/index.js +93 -0
  89. package/dist/es/src/CodeEditor/index.js +6 -0
  90. package/dist/es/src/CodeEditor/src/index.css +1 -0
  91. package/dist/es/src/CodeEditor/src/index.vue.js +128 -0
  92. package/dist/es/src/CodeEditor/src/index2.css +1 -0
  93. package/dist/es/src/ConfigProvider/index.js +7 -0
  94. package/dist/es/src/ConfigProvider/src/configProvider.js +14 -0
  95. package/dist/es/src/ConfigProvider/src/configProviderProps.js +22 -0
  96. package/dist/es/src/ConfigProvider/src/constants.js +9 -0
  97. package/dist/es/src/ConfigProvider/src/useGlobalConfig.js +45 -0
  98. package/dist/es/src/ScaleScreen/index.js +6 -0
  99. package/dist/es/src/ScaleScreen/src/index.css +1 -0
  100. package/dist/es/src/ScaleScreen/src/index.vue.js +115 -0
  101. package/dist/es/src/ScaleScreen/src/index2.css +1 -0
  102. package/dist/es/src/VideoBackground/index.js +6 -0
  103. package/dist/es/src/VideoBackground/src/helper.js +29 -0
  104. package/dist/es/src/VideoBackground/src/index.css +1 -0
  105. package/dist/es/src/VideoBackground/src/index.vue.js +108 -0
  106. package/dist/es/src/VideoBackground/src/index2.css +1 -0
  107. package/dist/es/src/VideoBackground/src/index3.css +1 -0
  108. package/dist/es/src/VideoBackground/src/videoBackground.js +31 -0
  109. package/dist/es/src/hooks/useLocale.js +24 -0
  110. package/dist/es/src/hooks/useNamespace.js +8 -0
  111. package/dist/es/src/index.js +28 -0
  112. package/dist/es/src/locale/lang/en-US.js +32 -0
  113. package/dist/es/src/locale/lang/ja-JP.js +32 -0
  114. package/dist/es/src/locale/lang/zh-CN.js +32 -0
  115. package/dist/es/src/styles/tokens.css +1 -0
  116. package/dist/lib/_virtual/_plugin-vue_export-helper.js +1 -0
  117. package/dist/lib/index.js +1 -0
  118. package/dist/lib/node_modules/@codemirror/autocomplete/dist/index.js +1 -0
  119. package/dist/lib/node_modules/@codemirror/commands/dist/index.js +1 -0
  120. package/dist/lib/node_modules/@codemirror/lang-java/dist/index.js +1 -0
  121. package/dist/lib/node_modules/@codemirror/lang-javascript/dist/index.js +13 -0
  122. package/dist/lib/node_modules/@codemirror/lang-json/dist/index.js +1 -0
  123. package/dist/lib/node_modules/@codemirror/lang-python/dist/index.js +3 -0
  124. package/dist/lib/node_modules/@codemirror/lang-sql/dist/index.js +2 -0
  125. package/dist/lib/node_modules/@codemirror/lang-xml/dist/index.js +1 -0
  126. package/dist/lib/node_modules/@codemirror/lang-yaml/dist/index.js +1 -0
  127. package/dist/lib/node_modules/@codemirror/language/dist/index.js +1 -0
  128. package/dist/lib/node_modules/@codemirror/lint/dist/index.js +1 -0
  129. package/dist/lib/node_modules/@codemirror/search/dist/index.js +2 -0
  130. package/dist/lib/node_modules/@codemirror/state/dist/index.js +5 -0
  131. package/dist/lib/node_modules/@codemirror/theme-one-dark/dist/index.js +1 -0
  132. package/dist/lib/node_modules/@codemirror/view/dist/index.js +5 -0
  133. package/dist/lib/node_modules/@lezer/common/dist/index.js +1 -0
  134. package/dist/lib/node_modules/@lezer/highlight/dist/index.js +1 -0
  135. package/dist/lib/node_modules/@lezer/java/dist/index.js +1 -0
  136. package/dist/lib/node_modules/@lezer/javascript/dist/index.js +1 -0
  137. package/dist/lib/node_modules/@lezer/json/dist/index.js +1 -0
  138. package/dist/lib/node_modules/@lezer/lr/dist/index.js +1 -0
  139. package/dist/lib/node_modules/@lezer/python/dist/index.js +1 -0
  140. package/dist/lib/node_modules/@lezer/xml/dist/index.js +1 -0
  141. package/dist/lib/node_modules/@lezer/yaml/dist/index.js +1 -0
  142. package/dist/lib/node_modules/@marijn/find-cluster-break/src/index.js +1 -0
  143. package/dist/lib/node_modules/@vueuse/core/dist/index.js +1 -0
  144. package/dist/lib/node_modules/@vueuse/shared/dist/index.js +1 -0
  145. package/dist/lib/node_modules/codemirror/dist/index.js +1 -0
  146. package/dist/lib/node_modules/crelt/index.js +1 -0
  147. package/dist/lib/node_modules/lodash-es/_Hash.js +1 -0
  148. package/dist/lib/node_modules/lodash-es/_ListCache.js +1 -0
  149. package/dist/lib/node_modules/lodash-es/_Map.js +1 -0
  150. package/dist/lib/node_modules/lodash-es/_MapCache.js +1 -0
  151. package/dist/lib/node_modules/lodash-es/_Symbol.js +1 -0
  152. package/dist/lib/node_modules/lodash-es/_arrayMap.js +1 -0
  153. package/dist/lib/node_modules/lodash-es/_assocIndexOf.js +1 -0
  154. package/dist/lib/node_modules/lodash-es/_baseGet.js +1 -0
  155. package/dist/lib/node_modules/lodash-es/_baseGetTag.js +1 -0
  156. package/dist/lib/node_modules/lodash-es/_baseIsNative.js +1 -0
  157. package/dist/lib/node_modules/lodash-es/_baseToString.js +1 -0
  158. package/dist/lib/node_modules/lodash-es/_castPath.js +1 -0
  159. package/dist/lib/node_modules/lodash-es/_coreJsData.js +1 -0
  160. package/dist/lib/node_modules/lodash-es/_freeGlobal.js +1 -0
  161. package/dist/lib/node_modules/lodash-es/_getMapData.js +1 -0
  162. package/dist/lib/node_modules/lodash-es/_getNative.js +1 -0
  163. package/dist/lib/node_modules/lodash-es/_getRawTag.js +1 -0
  164. package/dist/lib/node_modules/lodash-es/_getValue.js +1 -0
  165. package/dist/lib/node_modules/lodash-es/_hashClear.js +1 -0
  166. package/dist/lib/node_modules/lodash-es/_hashDelete.js +1 -0
  167. package/dist/lib/node_modules/lodash-es/_hashGet.js +1 -0
  168. package/dist/lib/node_modules/lodash-es/_hashHas.js +1 -0
  169. package/dist/lib/node_modules/lodash-es/_hashSet.js +1 -0
  170. package/dist/lib/node_modules/lodash-es/_isKey.js +1 -0
  171. package/dist/lib/node_modules/lodash-es/_isKeyable.js +1 -0
  172. package/dist/lib/node_modules/lodash-es/_isMasked.js +1 -0
  173. package/dist/lib/node_modules/lodash-es/_listCacheClear.js +1 -0
  174. package/dist/lib/node_modules/lodash-es/_listCacheDelete.js +1 -0
  175. package/dist/lib/node_modules/lodash-es/_listCacheGet.js +1 -0
  176. package/dist/lib/node_modules/lodash-es/_listCacheHas.js +1 -0
  177. package/dist/lib/node_modules/lodash-es/_listCacheSet.js +1 -0
  178. package/dist/lib/node_modules/lodash-es/_mapCacheClear.js +1 -0
  179. package/dist/lib/node_modules/lodash-es/_mapCacheDelete.js +1 -0
  180. package/dist/lib/node_modules/lodash-es/_mapCacheGet.js +1 -0
  181. package/dist/lib/node_modules/lodash-es/_mapCacheHas.js +1 -0
  182. package/dist/lib/node_modules/lodash-es/_mapCacheSet.js +1 -0
  183. package/dist/lib/node_modules/lodash-es/_memoizeCapped.js +1 -0
  184. package/dist/lib/node_modules/lodash-es/_nativeCreate.js +1 -0
  185. package/dist/lib/node_modules/lodash-es/_objectToString.js +1 -0
  186. package/dist/lib/node_modules/lodash-es/_root.js +1 -0
  187. package/dist/lib/node_modules/lodash-es/_stringToPath.js +1 -0
  188. package/dist/lib/node_modules/lodash-es/_toKey.js +1 -0
  189. package/dist/lib/node_modules/lodash-es/_toSource.js +1 -0
  190. package/dist/lib/node_modules/lodash-es/eq.js +1 -0
  191. package/dist/lib/node_modules/lodash-es/get.js +1 -0
  192. package/dist/lib/node_modules/lodash-es/isArray.js +1 -0
  193. package/dist/lib/node_modules/lodash-es/isFunction.js +1 -0
  194. package/dist/lib/node_modules/lodash-es/isNil.js +1 -0
  195. package/dist/lib/node_modules/lodash-es/isObject.js +1 -0
  196. package/dist/lib/node_modules/lodash-es/isObjectLike.js +1 -0
  197. package/dist/lib/node_modules/lodash-es/isString.js +1 -0
  198. package/dist/lib/node_modules/lodash-es/isSymbol.js +1 -0
  199. package/dist/lib/node_modules/lodash-es/memoize.js +1 -0
  200. package/dist/lib/node_modules/lodash-es/toString.js +1 -0
  201. package/dist/lib/node_modules/style-mod/src/style-mod.js +3 -0
  202. package/dist/lib/node_modules/vue-codemirror/dist/vue-codemirror.esm.js +1 -0
  203. package/dist/lib/node_modules/w3c-keyname/index.js +1 -0
  204. package/dist/lib/src/CodeEditor/index.js +1 -0
  205. package/dist/lib/src/CodeEditor/src/index.css +1 -0
  206. package/dist/lib/src/CodeEditor/src/index.vue.js +1 -0
  207. package/dist/lib/src/CodeEditor/src/index2.css +1 -0
  208. package/dist/lib/src/ConfigProvider/index.js +1 -0
  209. package/dist/lib/src/ConfigProvider/src/configProvider.js +1 -0
  210. package/dist/lib/src/ConfigProvider/src/configProviderProps.js +1 -0
  211. package/dist/lib/src/ConfigProvider/src/constants.js +1 -0
  212. package/dist/lib/src/ConfigProvider/src/useGlobalConfig.js +1 -0
  213. package/dist/lib/src/ScaleScreen/index.js +1 -0
  214. package/dist/lib/src/ScaleScreen/src/index.css +1 -0
  215. package/dist/lib/src/ScaleScreen/src/index.vue.js +1 -0
  216. package/dist/lib/src/ScaleScreen/src/index2.css +1 -0
  217. package/dist/lib/src/VideoBackground/index.js +1 -0
  218. package/dist/lib/src/VideoBackground/src/helper.js +1 -0
  219. package/dist/lib/src/VideoBackground/src/index.css +1 -0
  220. package/dist/lib/src/VideoBackground/src/index.vue.js +1 -0
  221. package/dist/lib/src/VideoBackground/src/index2.css +1 -0
  222. package/dist/lib/src/VideoBackground/src/index3.css +1 -0
  223. package/dist/lib/src/VideoBackground/src/videoBackground.js +1 -0
  224. package/dist/lib/src/hooks/useLocale.js +1 -0
  225. package/dist/lib/src/hooks/useNamespace.js +1 -0
  226. package/dist/lib/src/index.js +1 -0
  227. package/dist/lib/src/locale/lang/en-US.js +1 -0
  228. package/dist/lib/src/locale/lang/ja-JP.js +1 -0
  229. package/dist/lib/src/locale/lang/zh-CN.js +1 -0
  230. package/dist/lib/src/styles/tokens.css +1 -0
  231. package/package.json +71 -0
@@ -0,0 +1,399 @@
1
+ import { parser as h } from "../../../@lezer/python/dist/index.js";
2
+ import { LanguageSupport as S, LRLanguage as I, indentNodeProp as v, foldNodeProp as C, delimitedIndent as m, foldInside as k, syntaxTree as $ } from "../../language/dist/index.js";
3
+ import { NodeWeakMap as A, IterMode as F } from "../../../@lezer/common/dist/index.js";
4
+ import { ifNotIn as w, completeFromList as N, snippetCompletion as l } from "../../autocomplete/dist/index.js";
5
+ const c = /* @__PURE__ */ new A(), E = /* @__PURE__ */ new Set([
6
+ "Script",
7
+ "Body",
8
+ "FunctionDefinition",
9
+ "ClassDefinition",
10
+ "LambdaExpression",
11
+ "ForStatement",
12
+ "MatchClause"
13
+ ]);
14
+ function p(e) {
15
+ return (r, t, n) => {
16
+ if (n)
17
+ return !1;
18
+ let o = r.node.getChild("VariableName");
19
+ return o && t(o, e), !0;
20
+ };
21
+ }
22
+ const B = {
23
+ FunctionDefinition: /* @__PURE__ */ p("function"),
24
+ ClassDefinition: /* @__PURE__ */ p("class"),
25
+ ForStatement(e, r, t) {
26
+ if (t) {
27
+ for (let n = e.node.firstChild; n; n = n.nextSibling)
28
+ if (n.name == "VariableName")
29
+ r(n, "variable");
30
+ else if (n.name == "in")
31
+ break;
32
+ }
33
+ },
34
+ ImportStatement(e, r) {
35
+ var t, n;
36
+ let { node: o } = e, a = ((t = o.firstChild) === null || t === void 0 ? void 0 : t.name) == "from";
37
+ for (let i = o.getChild("import"); i; i = i.nextSibling)
38
+ i.name == "VariableName" && ((n = i.nextSibling) === null || n === void 0 ? void 0 : n.name) != "as" && r(i, a ? "variable" : "namespace");
39
+ },
40
+ AssignStatement(e, r) {
41
+ for (let t = e.node.firstChild; t; t = t.nextSibling)
42
+ if (t.name == "VariableName")
43
+ r(t, "variable");
44
+ else if (t.name == ":" || t.name == "AssignOp")
45
+ break;
46
+ },
47
+ ParamList(e, r) {
48
+ for (let t = null, n = e.node.firstChild; n; n = n.nextSibling)
49
+ n.name == "VariableName" && (!t || !/\*|AssignOp/.test(t.name)) && r(n, "variable"), t = n;
50
+ },
51
+ CapturePattern: /* @__PURE__ */ p("variable"),
52
+ AsPattern: /* @__PURE__ */ p("variable"),
53
+ __proto__: null
54
+ };
55
+ function y(e, r) {
56
+ let t = c.get(r);
57
+ if (t)
58
+ return t;
59
+ let n = [], o = !0;
60
+ function a(i, s) {
61
+ let _ = e.sliceString(i.from, i.to);
62
+ n.push({ label: _, type: s });
63
+ }
64
+ return r.cursor(F.IncludeAnonymous).iterate((i) => {
65
+ if (i.name) {
66
+ let s = B[i.name];
67
+ if (s && s(i, a, o) || !o && E.has(i.name))
68
+ return !1;
69
+ o = !1;
70
+ } else if (i.to - i.from > 8192) {
71
+ for (let s of y(e, i.node))
72
+ n.push(s);
73
+ return !1;
74
+ }
75
+ }), c.set(r, n), n;
76
+ }
77
+ const b = /^[\w\xa1-\uffff][\w\d\xa1-\uffff]*$/, g = ["String", "FormatString", "Comment", "PropertyName"];
78
+ function x(e) {
79
+ let r = $(e.state).resolveInner(e.pos, -1);
80
+ if (g.indexOf(r.name) > -1)
81
+ return null;
82
+ let t = r.name == "VariableName" || r.to - r.from < 20 && b.test(e.state.sliceDoc(r.from, r.to));
83
+ if (!t && !e.explicit)
84
+ return null;
85
+ let n = [];
86
+ for (let o = r; o; o = o.parent)
87
+ E.has(o.name) && (n = n.concat(y(e.state.doc, o)));
88
+ return {
89
+ options: n,
90
+ from: t ? r.from : e.pos,
91
+ validFor: b
92
+ };
93
+ }
94
+ const D = /* @__PURE__ */ [
95
+ "__annotations__",
96
+ "__builtins__",
97
+ "__debug__",
98
+ "__doc__",
99
+ "__import__",
100
+ "__name__",
101
+ "__loader__",
102
+ "__package__",
103
+ "__spec__",
104
+ "False",
105
+ "None",
106
+ "True"
107
+ ].map((e) => ({ label: e, type: "constant" })).concat(/* @__PURE__ */ [
108
+ "ArithmeticError",
109
+ "AssertionError",
110
+ "AttributeError",
111
+ "BaseException",
112
+ "BlockingIOError",
113
+ "BrokenPipeError",
114
+ "BufferError",
115
+ "BytesWarning",
116
+ "ChildProcessError",
117
+ "ConnectionAbortedError",
118
+ "ConnectionError",
119
+ "ConnectionRefusedError",
120
+ "ConnectionResetError",
121
+ "DeprecationWarning",
122
+ "EOFError",
123
+ "Ellipsis",
124
+ "EncodingWarning",
125
+ "EnvironmentError",
126
+ "Exception",
127
+ "FileExistsError",
128
+ "FileNotFoundError",
129
+ "FloatingPointError",
130
+ "FutureWarning",
131
+ "GeneratorExit",
132
+ "IOError",
133
+ "ImportError",
134
+ "ImportWarning",
135
+ "IndentationError",
136
+ "IndexError",
137
+ "InterruptedError",
138
+ "IsADirectoryError",
139
+ "KeyError",
140
+ "KeyboardInterrupt",
141
+ "LookupError",
142
+ "MemoryError",
143
+ "ModuleNotFoundError",
144
+ "NameError",
145
+ "NotADirectoryError",
146
+ "NotImplemented",
147
+ "NotImplementedError",
148
+ "OSError",
149
+ "OverflowError",
150
+ "PendingDeprecationWarning",
151
+ "PermissionError",
152
+ "ProcessLookupError",
153
+ "RecursionError",
154
+ "ReferenceError",
155
+ "ResourceWarning",
156
+ "RuntimeError",
157
+ "RuntimeWarning",
158
+ "StopAsyncIteration",
159
+ "StopIteration",
160
+ "SyntaxError",
161
+ "SyntaxWarning",
162
+ "SystemError",
163
+ "SystemExit",
164
+ "TabError",
165
+ "TimeoutError",
166
+ "TypeError",
167
+ "UnboundLocalError",
168
+ "UnicodeDecodeError",
169
+ "UnicodeEncodeError",
170
+ "UnicodeError",
171
+ "UnicodeTranslateError",
172
+ "UnicodeWarning",
173
+ "UserWarning",
174
+ "ValueError",
175
+ "Warning",
176
+ "ZeroDivisionError"
177
+ ].map((e) => ({ label: e, type: "type" }))).concat(/* @__PURE__ */ [
178
+ "bool",
179
+ "bytearray",
180
+ "bytes",
181
+ "classmethod",
182
+ "complex",
183
+ "float",
184
+ "frozenset",
185
+ "int",
186
+ "list",
187
+ "map",
188
+ "memoryview",
189
+ "object",
190
+ "range",
191
+ "set",
192
+ "staticmethod",
193
+ "str",
194
+ "super",
195
+ "tuple",
196
+ "type"
197
+ ].map((e) => ({ label: e, type: "class" }))).concat(/* @__PURE__ */ [
198
+ "abs",
199
+ "aiter",
200
+ "all",
201
+ "anext",
202
+ "any",
203
+ "ascii",
204
+ "bin",
205
+ "breakpoint",
206
+ "callable",
207
+ "chr",
208
+ "compile",
209
+ "delattr",
210
+ "dict",
211
+ "dir",
212
+ "divmod",
213
+ "enumerate",
214
+ "eval",
215
+ "exec",
216
+ "exit",
217
+ "filter",
218
+ "format",
219
+ "getattr",
220
+ "globals",
221
+ "hasattr",
222
+ "hash",
223
+ "help",
224
+ "hex",
225
+ "id",
226
+ "input",
227
+ "isinstance",
228
+ "issubclass",
229
+ "iter",
230
+ "len",
231
+ "license",
232
+ "locals",
233
+ "max",
234
+ "min",
235
+ "next",
236
+ "oct",
237
+ "open",
238
+ "ord",
239
+ "pow",
240
+ "print",
241
+ "property",
242
+ "quit",
243
+ "repr",
244
+ "reversed",
245
+ "round",
246
+ "setattr",
247
+ "slice",
248
+ "sorted",
249
+ "sum",
250
+ "vars",
251
+ "zip"
252
+ ].map((e) => ({ label: e, type: "function" }))), P = [
253
+ /* @__PURE__ */ l("def ${name}(${params}):\n ${}", {
254
+ label: "def",
255
+ detail: "function",
256
+ type: "keyword"
257
+ }),
258
+ /* @__PURE__ */ l("for ${name} in ${collection}:\n ${}", {
259
+ label: "for",
260
+ detail: "loop",
261
+ type: "keyword"
262
+ }),
263
+ /* @__PURE__ */ l("while ${}:\n ${}", {
264
+ label: "while",
265
+ detail: "loop",
266
+ type: "keyword"
267
+ }),
268
+ /* @__PURE__ */ l("try:\n ${}\nexcept ${error}:\n ${}", {
269
+ label: "try",
270
+ detail: "/ except block",
271
+ type: "keyword"
272
+ }),
273
+ /* @__PURE__ */ l(`if \${}:
274
+
275
+ `, {
276
+ label: "if",
277
+ detail: "block",
278
+ type: "keyword"
279
+ }),
280
+ /* @__PURE__ */ l("if ${}:\n ${}\nelse:\n ${}", {
281
+ label: "if",
282
+ detail: "/ else block",
283
+ type: "keyword"
284
+ }),
285
+ /* @__PURE__ */ l("class ${name}:\n def __init__(self, ${params}):\n ${}", {
286
+ label: "class",
287
+ detail: "definition",
288
+ type: "keyword"
289
+ }),
290
+ /* @__PURE__ */ l("import ${module}", {
291
+ label: "import",
292
+ detail: "statement",
293
+ type: "keyword"
294
+ }),
295
+ /* @__PURE__ */ l("from ${module} import ${names}", {
296
+ label: "from",
297
+ detail: "import",
298
+ type: "keyword"
299
+ })
300
+ ], W = /* @__PURE__ */ w(g, /* @__PURE__ */ N(/* @__PURE__ */ D.concat(P)));
301
+ function d(e) {
302
+ let { node: r, pos: t } = e, n = e.lineIndent(t, -1), o = null;
303
+ for (; ; ) {
304
+ let a = r.childBefore(t);
305
+ if (a)
306
+ if (a.name == "Comment")
307
+ t = a.from;
308
+ else if (a.name == "Body" || a.name == "MatchBody")
309
+ e.baseIndentFor(a) + e.unit <= n && (o = a), r = a;
310
+ else if (a.name == "MatchClause")
311
+ r = a;
312
+ else if (a.type.is("Statement"))
313
+ r = a;
314
+ else
315
+ break;
316
+ else break;
317
+ }
318
+ return o;
319
+ }
320
+ function f(e, r) {
321
+ let t = e.baseIndentFor(r), n = e.lineAt(e.pos, -1), o = n.from + n.text.length;
322
+ return /^\s*($|#)/.test(n.text) && e.node.to < o + 100 && !/\S/.test(e.state.sliceDoc(o, e.node.to)) && e.lineIndent(e.pos, -1) <= t || /^\s*(else:|elif |except |finally:|case\s+[^=:]+:)/.test(e.textAfter) && e.lineIndent(e.pos, -1) > t ? null : t + e.unit;
323
+ }
324
+ const u = /* @__PURE__ */ I.define({
325
+ name: "python",
326
+ parser: /* @__PURE__ */ h.configure({
327
+ props: [
328
+ /* @__PURE__ */ v.add({
329
+ Body: (e) => {
330
+ var r;
331
+ let t = /^\s*(#|$)/.test(e.textAfter) && d(e) || e.node;
332
+ return (r = f(e, t)) !== null && r !== void 0 ? r : e.continue();
333
+ },
334
+ MatchBody: (e) => {
335
+ var r;
336
+ let t = d(e);
337
+ return (r = f(e, t || e.node)) !== null && r !== void 0 ? r : e.continue();
338
+ },
339
+ IfStatement: (e) => /^\s*(else:|elif )/.test(e.textAfter) ? e.baseIndent : e.continue(),
340
+ "ForStatement WhileStatement": (e) => /^\s*else:/.test(e.textAfter) ? e.baseIndent : e.continue(),
341
+ TryStatement: (e) => /^\s*(except[ :]|finally:|else:)/.test(e.textAfter) ? e.baseIndent : e.continue(),
342
+ MatchStatement: (e) => /^\s*case /.test(e.textAfter) ? e.baseIndent + e.unit : e.continue(),
343
+ "TupleExpression ComprehensionExpression ParamList ArgList ParenthesizedExpression": /* @__PURE__ */ m({ closing: ")" }),
344
+ "DictionaryExpression DictionaryComprehensionExpression SetExpression SetComprehensionExpression": /* @__PURE__ */ m({ closing: "}" }),
345
+ "ArrayExpression ArrayComprehensionExpression": /* @__PURE__ */ m({ closing: "]" }),
346
+ MemberExpression: (e) => e.baseIndent + e.unit,
347
+ "String FormatString": () => null,
348
+ Script: (e) => {
349
+ var r;
350
+ let t = d(e);
351
+ return (r = t && f(e, t)) !== null && r !== void 0 ? r : e.continue();
352
+ }
353
+ }),
354
+ /* @__PURE__ */ C.add({
355
+ "ArrayExpression DictionaryExpression SetExpression TupleExpression": k,
356
+ Body: (e, r) => ({ from: e.from + 1, to: e.to - (e.to == r.doc.length ? 0 : 1) }),
357
+ "String FormatString": (e, r) => ({ from: r.doc.lineAt(e.from).to, to: e.to })
358
+ })
359
+ ]
360
+ }),
361
+ languageData: {
362
+ closeBrackets: {
363
+ brackets: ["(", "[", "{", "'", '"', "'''", '"""'],
364
+ stringPrefixes: [
365
+ "f",
366
+ "fr",
367
+ "rf",
368
+ "r",
369
+ "u",
370
+ "b",
371
+ "br",
372
+ "rb",
373
+ "F",
374
+ "FR",
375
+ "RF",
376
+ "R",
377
+ "U",
378
+ "B",
379
+ "BR",
380
+ "RB"
381
+ ]
382
+ },
383
+ commentTokens: { line: "#" },
384
+ // Indent logic logic are triggered upon below input patterns
385
+ indentOnInput: /^\s*([\}\]\)]|else:|elif |except |finally:|case\s+[^:]*:?)$/
386
+ }
387
+ });
388
+ function O() {
389
+ return new S(u, [
390
+ u.data.of({ autocomplete: x }),
391
+ u.data.of({ autocomplete: W })
392
+ ]);
393
+ }
394
+ export {
395
+ W as globalCompletion,
396
+ x as localCompletionSource,
397
+ O as python,
398
+ u as pythonLanguage
399
+ };