@xiuper/mpp-core 0.0.2

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 (173) hide show
  1. package/Kotlin-DateTime-library-kotlinx-datetime.js +7836 -0
  2. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -0
  3. package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +1241 -0
  4. package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js.map +1 -0
  5. package/Xiuper-mpp-codegraph.js +1471 -0
  6. package/Xiuper-mpp-codegraph.js.map +1 -0
  7. package/annotations.js +15 -0
  8. package/annotations.js.map +1 -0
  9. package/autodev-mpp-core.d.ts +1312 -0
  10. package/autodev-mpp-core.js +86483 -0
  11. package/autodev-mpp-core.js.map +1 -0
  12. package/kaml.js +3387 -0
  13. package/kaml.js.map +1 -0
  14. package/koog-agents-agents-core.js +22927 -0
  15. package/koog-agents-agents-core.js.map +1 -0
  16. package/koog-agents-agents-ext.js +15 -0
  17. package/koog-agents-agents-ext.js.map +1 -0
  18. package/koog-agents-agents-features-agents-features-event-handler.js +15 -0
  19. package/koog-agents-agents-features-agents-features-event-handler.js.map +1 -0
  20. package/koog-agents-agents-features-agents-features-memory.js +15 -0
  21. package/koog-agents-agents-features-agents-features-memory.js.map +1 -0
  22. package/koog-agents-agents-features-agents-features-opentelemetry.js +15 -0
  23. package/koog-agents-agents-features-agents-features-opentelemetry.js.map +1 -0
  24. package/koog-agents-agents-features-agents-features-snapshot.js +15 -0
  25. package/koog-agents-agents-features-agents-features-snapshot.js.map +1 -0
  26. package/koog-agents-agents-features-agents-features-tokenizer.js +15 -0
  27. package/koog-agents-agents-features-agents-features-tokenizer.js.map +1 -0
  28. package/koog-agents-agents-features-agents-features-trace.js +15 -0
  29. package/koog-agents-agents-features-agents-features-trace.js.map +1 -0
  30. package/koog-agents-agents-mcp.js +15 -0
  31. package/koog-agents-agents-mcp.js.map +1 -0
  32. package/koog-agents-agents-tools.js +322 -0
  33. package/koog-agents-agents-tools.js.map +1 -0
  34. package/koog-agents-agents-utils.js +232 -0
  35. package/koog-agents-agents-utils.js.map +1 -0
  36. package/koog-embeddings-embeddings-base.js +15 -0
  37. package/koog-embeddings-embeddings-base.js.map +1 -0
  38. package/koog-embeddings-embeddings-llm.js +15 -0
  39. package/koog-embeddings-embeddings-llm.js.map +1 -0
  40. package/koog-http-client-http-client-core.js +57 -0
  41. package/koog-http-client-http-client-core.js.map +1 -0
  42. package/koog-http-client-http-client-ktor.js +703 -0
  43. package/koog-http-client-http-client-ktor.js.map +1 -0
  44. package/koog-koog-agents.js +15 -0
  45. package/koog-koog-agents.js.map +1 -0
  46. package/koog-prompt-prompt-cache-prompt-cache-files.js +15 -0
  47. package/koog-prompt-prompt-cache-prompt-cache-files.js.map +1 -0
  48. package/koog-prompt-prompt-cache-prompt-cache-model.js +15 -0
  49. package/koog-prompt-prompt-cache-prompt-cache-model.js.map +1 -0
  50. package/koog-prompt-prompt-cache-prompt-cache-redis.js +15 -0
  51. package/koog-prompt-prompt-cache-prompt-cache-redis.js.map +1 -0
  52. package/koog-prompt-prompt-executor-prompt-executor-cached.js +15 -0
  53. package/koog-prompt-prompt-executor-prompt-executor-cached.js.map +1 -0
  54. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js +4991 -0
  55. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js.map +1 -0
  56. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js +15 -0
  57. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js.map +1 -0
  58. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js +15 -0
  59. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js.map +1 -0
  60. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js +1249 -0
  61. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js.map +1 -0
  62. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js +4675 -0
  63. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js.map +1 -0
  64. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js +15 -0
  65. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js.map +1 -0
  66. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js +2343 -0
  67. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js.map +1 -0
  68. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js +6613 -0
  69. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js.map +1 -0
  70. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js +19901 -0
  71. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js.map +1 -0
  72. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js +2313 -0
  73. package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js.map +1 -0
  74. package/koog-prompt-prompt-executor-prompt-executor-clients.js +222 -0
  75. package/koog-prompt-prompt-executor-prompt-executor-clients.js.map +1 -0
  76. package/koog-prompt-prompt-executor-prompt-executor-llms-all.js +70 -0
  77. package/koog-prompt-prompt-executor-prompt-executor-llms-all.js.map +1 -0
  78. package/koog-prompt-prompt-executor-prompt-executor-llms.js +134 -0
  79. package/koog-prompt-prompt-executor-prompt-executor-llms.js.map +1 -0
  80. package/koog-prompt-prompt-executor-prompt-executor-model.js +42 -0
  81. package/koog-prompt-prompt-executor-prompt-executor-model.js.map +1 -0
  82. package/koog-prompt-prompt-llm.js +1710 -0
  83. package/koog-prompt-prompt-llm.js.map +1 -0
  84. package/koog-prompt-prompt-markdown.js +122 -0
  85. package/koog-prompt-prompt-markdown.js.map +1 -0
  86. package/koog-prompt-prompt-model.js +5848 -0
  87. package/koog-prompt-prompt-model.js.map +1 -0
  88. package/koog-prompt-prompt-structure.js +1513 -0
  89. package/koog-prompt-prompt-structure.js.map +1 -0
  90. package/koog-prompt-prompt-tokenizer.js +15 -0
  91. package/koog-prompt-prompt-tokenizer.js.map +1 -0
  92. package/koog-prompt-prompt-xml.js +15 -0
  93. package/koog-prompt-prompt-xml.js.map +1 -0
  94. package/koog-rag-rag-base.js +15 -0
  95. package/koog-rag-rag-base.js.map +1 -0
  96. package/koog-rag-vector-storage.js +15 -0
  97. package/koog-rag-vector-storage.js.map +1 -0
  98. package/koog-utils.js +63 -0
  99. package/koog-utils.js.map +1 -0
  100. package/kotlin-kotlin-stdlib.js +18965 -0
  101. package/kotlin-kotlin-stdlib.js.map +1 -0
  102. package/kotlin-logging.js +509 -0
  103. package/kotlin-logging.js.map +1 -0
  104. package/kotlin-sdk-kotlin-sdk-client.js +1340 -0
  105. package/kotlin-sdk-kotlin-sdk-client.js.map +1 -0
  106. package/kotlin-sdk-kotlin-sdk-core.js +15195 -0
  107. package/kotlin-sdk-kotlin-sdk-core.js.map +1 -0
  108. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
  109. package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
  110. package/kotlinx-atomicfu.js +259 -0
  111. package/kotlinx-atomicfu.js.map +1 -0
  112. package/kotlinx-coroutines-core.js +13742 -0
  113. package/kotlinx-coroutines-core.js.map +1 -0
  114. package/kotlinx-io-kotlinx-io-bytestring.js +214 -0
  115. package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -0
  116. package/kotlinx-io-kotlinx-io-core.js +2892 -0
  117. package/kotlinx-io-kotlinx-io-core.js.map +1 -0
  118. package/kotlinx-serialization-kotlinx-serialization-core.js +6563 -0
  119. package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
  120. package/kotlinx-serialization-kotlinx-serialization-json-io.js +15 -0
  121. package/kotlinx-serialization-kotlinx-serialization-json-io.js.map +1 -0
  122. package/kotlinx-serialization-kotlinx-serialization-json.js +5927 -0
  123. package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
  124. package/ktor-ktor-client-content-negotiation.js +775 -0
  125. package/ktor-ktor-client-content-negotiation.js.map +1 -0
  126. package/ktor-ktor-client-core.js +11110 -0
  127. package/ktor-ktor-client-core.js.map +1 -0
  128. package/ktor-ktor-client-logging.js +15 -0
  129. package/ktor-ktor-client-logging.js.map +1 -0
  130. package/ktor-ktor-events.js +126 -0
  131. package/ktor-ktor-events.js.map +1 -0
  132. package/ktor-ktor-http-cio.js +4257 -0
  133. package/ktor-ktor-http-cio.js.map +1 -0
  134. package/ktor-ktor-http.js +3671 -0
  135. package/ktor-ktor-http.js.map +1 -0
  136. package/ktor-ktor-io.js +4114 -0
  137. package/ktor-ktor-io.js.map +1 -0
  138. package/ktor-ktor-network.js +1399 -0
  139. package/ktor-ktor-network.js.map +1 -0
  140. package/ktor-ktor-serialization-kotlinx-json.js +67 -0
  141. package/ktor-ktor-serialization-kotlinx-json.js.map +1 -0
  142. package/ktor-ktor-serialization-kotlinx.js +881 -0
  143. package/ktor-ktor-serialization-kotlinx.js.map +1 -0
  144. package/ktor-ktor-serialization.js +388 -0
  145. package/ktor-ktor-serialization.js.map +1 -0
  146. package/ktor-ktor-server-cio.js +3735 -0
  147. package/ktor-ktor-server-cio.js.map +1 -0
  148. package/ktor-ktor-server-core.js +8696 -0
  149. package/ktor-ktor-server-core.js.map +1 -0
  150. package/ktor-ktor-server-sse.js +668 -0
  151. package/ktor-ktor-server-sse.js.map +1 -0
  152. package/ktor-ktor-server-websockets.js +15 -0
  153. package/ktor-ktor-server-websockets.js.map +1 -0
  154. package/ktor-ktor-sse.js +161 -0
  155. package/ktor-ktor-sse.js.map +1 -0
  156. package/ktor-ktor-utils.js +3589 -0
  157. package/ktor-ktor-utils.js.map +1 -0
  158. package/ktor-ktor-websocket-serialization.js +15 -0
  159. package/ktor-ktor-websocket-serialization.js.map +1 -0
  160. package/ktor-ktor-websockets.js +450 -0
  161. package/ktor-ktor-websockets.js.map +1 -0
  162. package/markdown.js +5174 -0
  163. package/markdown.js.map +1 -0
  164. package/okio-parent-okio.js +2628 -0
  165. package/okio-parent-okio.js.map +1 -0
  166. package/package.json +18 -0
  167. package/snakeyaml-engine-kmp.js +7079 -0
  168. package/snakeyaml-engine-kmp.js.map +1 -0
  169. package/urlencoder-urlencoder-lib.js +322 -0
  170. package/urlencoder-urlencoder-lib.js.map +1 -0
  171. package/xiuper-mpp-core.d.ts +1312 -0
  172. package/xiuper-mpp-core.js +86483 -0
  173. package/xiuper-mpp-core.js.map +1 -0
@@ -0,0 +1,1471 @@
1
+ (function (factory) {
2
+ if (typeof define === 'function' && define.amd)
3
+ define(['exports', 'path', './kotlinx-serialization-kotlinx-serialization-core.js', './kotlin-kotlin-stdlib.js', './kotlinx-coroutines-core.js'], factory);
4
+ else if (typeof exports === 'object')
5
+ factory(module.exports, require('path'), require('./kotlinx-serialization-kotlinx-serialization-core.js'), require('./kotlin-kotlin-stdlib.js'), require('./kotlinx-coroutines-core.js'));
6
+ else {
7
+ if (typeof NodePath === 'undefined') {
8
+ throw new Error("Error loading module 'Xiuper-mpp-codegraph'. Its dependency 'path' was not found. Please, check whether 'path' is loaded prior to 'Xiuper-mpp-codegraph'.");
9
+ }
10
+ if (typeof globalThis['kotlinx-serialization-kotlinx-serialization-core'] === 'undefined') {
11
+ throw new Error("Error loading module 'Xiuper-mpp-codegraph'. Its dependency 'kotlinx-serialization-kotlinx-serialization-core' was not found. Please, check whether 'kotlinx-serialization-kotlinx-serialization-core' is loaded prior to 'Xiuper-mpp-codegraph'.");
12
+ }
13
+ if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
14
+ throw new Error("Error loading module 'Xiuper-mpp-codegraph'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'Xiuper-mpp-codegraph'.");
15
+ }
16
+ if (typeof globalThis['kotlinx-coroutines-core'] === 'undefined') {
17
+ throw new Error("Error loading module 'Xiuper-mpp-codegraph'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'Xiuper-mpp-codegraph'.");
18
+ }
19
+ globalThis['Xiuper-mpp-codegraph'] = factory(typeof globalThis['Xiuper-mpp-codegraph'] === 'undefined' ? {} : globalThis['Xiuper-mpp-codegraph'], NodePath, globalThis['kotlinx-serialization-kotlinx-serialization-core'], globalThis['kotlin-kotlin-stdlib'], globalThis['kotlinx-coroutines-core']);
20
+ }
21
+ }(function (_, NodePath, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core, kotlin_kotlin, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core) {
22
+ 'use strict';
23
+ //region block: imports
24
+ var imul = Math.imul;
25
+ var StringSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.e1;
26
+ var LinkedHashMapSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.f3;
27
+ var LazyThreadSafetyMode_PUBLICATION_getInstance = kotlin_kotlin.$_$.o;
28
+ var lazy = kotlin_kotlin.$_$.xl;
29
+ var protoOf = kotlin_kotlin.$_$.we;
30
+ var initMetadataForCompanion = kotlin_kotlin.$_$.vd;
31
+ var PluginGeneratedSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i3;
32
+ var Unit_instance = kotlin_kotlin.$_$.h6;
33
+ var emptyMap = kotlin_kotlin.$_$.n8;
34
+ var equals = kotlin_kotlin.$_$.md;
35
+ var THROW_CCE = kotlin_kotlin.$_$.zk;
36
+ var UnknownFieldException_init_$Create$ = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.h;
37
+ var IntSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;
38
+ var typeParametersSerializers = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.b3;
39
+ var GeneratedSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c3;
40
+ var initMetadataForObject = kotlin_kotlin.$_$.ae;
41
+ var VOID = kotlin_kotlin.$_$.h;
42
+ var throwMissingFieldException = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.o3;
43
+ var objectCreate = kotlin_kotlin.$_$.ve;
44
+ var toString = kotlin_kotlin.$_$.af;
45
+ var getStringHashCode = kotlin_kotlin.$_$.sd;
46
+ var hashCode = kotlin_kotlin.$_$.td;
47
+ var initMetadataForClass = kotlin_kotlin.$_$.ud;
48
+ var createSimpleEnumSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.l3;
49
+ var SerializerFactory = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.j3;
50
+ var Enum = kotlin_kotlin.$_$.mk;
51
+ var ArrayListSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.z2;
52
+ var emptyList = kotlin_kotlin.$_$.m8;
53
+ var get_nullable = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.i1;
54
+ var BooleanSerializer_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.y;
55
+ var contains = kotlin_kotlin.$_$.kg;
56
+ var lastIndexOf = kotlin_kotlin.$_$.qh;
57
+ var substring = kotlin_kotlin.$_$.vi;
58
+ var getBooleanHashCode = kotlin_kotlin.$_$.od;
59
+ var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.c1;
60
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.t;
61
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.e2;
62
+ var charSequenceLength = kotlin_kotlin.$_$.id;
63
+ var to = kotlin_kotlin.$_$.hm;
64
+ var mapOf = kotlin_kotlin.$_$.x9;
65
+ var removePrefix = kotlin_kotlin.$_$.wh;
66
+ var removeSuffix = kotlin_kotlin.$_$.xh;
67
+ var isCharSequence = kotlin_kotlin.$_$.fe;
68
+ var trim = kotlin_kotlin.$_$.yj;
69
+ var encodeToByteArray = kotlin_kotlin.$_$.rg;
70
+ var until = kotlin_kotlin.$_$.of;
71
+ var sliceArray = kotlin_kotlin.$_$.sa;
72
+ var decodeToString = kotlin_kotlin.$_$.mg;
73
+ var startsWith = kotlin_kotlin.$_$.ji;
74
+ var endsWith = kotlin_kotlin.$_$.ug;
75
+ var Regex_init_$Create$ = kotlin_kotlin.$_$.m1;
76
+ var CoroutineImpl = kotlin_kotlin.$_$.tc;
77
+ var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.g;
78
+ var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.dc;
79
+ var initMetadataForCoroutine = kotlin_kotlin.$_$.wd;
80
+ //endregion
81
+ //region block: pre-declaration
82
+ initMetadataForCompanion(Companion);
83
+ initMetadataForObject($serializer, '$serializer', VOID, VOID, [GeneratedSerializer]);
84
+ initMetadataForClass(CodeNode, 'CodeNode', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance});
85
+ initMetadataForCompanion(Companion_0, VOID, [SerializerFactory]);
86
+ initMetadataForClass(CodeElementType, 'CodeElementType', VOID, Enum, VOID, VOID, VOID, {0: Companion_getInstance_0});
87
+ initMetadataForCompanion(Companion_1);
88
+ initMetadataForObject($serializer_0, '$serializer', VOID, VOID, [GeneratedSerializer]);
89
+ initMetadataForClass(ImportInfo, 'ImportInfo', VOID, VOID, VOID, VOID, VOID, {0: $serializer_getInstance_0});
90
+ initMetadataForCompanion(Companion_2, VOID, [SerializerFactory]);
91
+ initMetadataForClass(ImportType, 'ImportType', VOID, Enum, VOID, VOID, VOID, {0: Companion_getInstance_2});
92
+ initMetadataForClass(Language, 'Language', VOID, Enum);
93
+ initMetadataForObject(CodeGraphFactory, 'CodeGraphFactory');
94
+ initMetadataForCompanion(Companion_3);
95
+ initMetadataForCoroutine($initializeCOROUTINE$, CoroutineImpl);
96
+ initMetadataForCoroutine($parseNodesCOROUTINE$, CoroutineImpl);
97
+ initMetadataForCoroutine($parseImportsCOROUTINE$, CoroutineImpl);
98
+ initMetadataForCoroutine($getOrCreateParserCOROUTINE$, CoroutineImpl);
99
+ initMetadataForClass(JsCodeParser, 'JsCodeParser', JsCodeParser, VOID, VOID, [0, 3, 2, 1]);
100
+ //endregion
101
+ function CodeNode$Companion$$childSerializers$_anonymous__o6dld1() {
102
+ return Companion_getInstance_0().q1j();
103
+ }
104
+ function CodeNode$Companion$$childSerializers$_anonymous__o6dld1_0() {
105
+ return new LinkedHashMapSerializer(StringSerializer_getInstance(), StringSerializer_getInstance());
106
+ }
107
+ function Companion() {
108
+ Companion_instance = this;
109
+ var tmp = this;
110
+ var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
111
+ var tmp_1 = lazy(tmp_0, CodeNode$Companion$$childSerializers$_anonymous__o6dld1);
112
+ var tmp_2 = LazyThreadSafetyMode_PUBLICATION_getInstance();
113
+ // Inline function 'kotlin.arrayOf' call
114
+ // Inline function 'kotlin.js.unsafeCast' call
115
+ // Inline function 'kotlin.js.asDynamic' call
116
+ tmp.r36_1 = [null, tmp_1, null, null, null, null, null, null, null, null, null, lazy(tmp_2, CodeNode$Companion$$childSerializers$_anonymous__o6dld1_0)];
117
+ }
118
+ var Companion_instance;
119
+ function Companion_getInstance() {
120
+ if (Companion_instance == null)
121
+ new Companion();
122
+ return Companion_instance;
123
+ }
124
+ function $serializer() {
125
+ $serializer_instance = this;
126
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('cc.unitmesh.codegraph.model.CodeNode', this, 12);
127
+ tmp0_serialDesc.m16('id', false);
128
+ tmp0_serialDesc.m16('type', false);
129
+ tmp0_serialDesc.m16('name', false);
130
+ tmp0_serialDesc.m16('packageName', false);
131
+ tmp0_serialDesc.m16('filePath', false);
132
+ tmp0_serialDesc.m16('startLine', false);
133
+ tmp0_serialDesc.m16('endLine', false);
134
+ tmp0_serialDesc.m16('startColumn', false);
135
+ tmp0_serialDesc.m16('endColumn', false);
136
+ tmp0_serialDesc.m16('qualifiedName', false);
137
+ tmp0_serialDesc.m16('content', false);
138
+ tmp0_serialDesc.m16('metadata', true);
139
+ this.s36_1 = tmp0_serialDesc;
140
+ }
141
+ protoOf($serializer).t36 = function (encoder, value) {
142
+ var tmp0_desc = this.s36_1;
143
+ var tmp1_output = encoder.wy(tmp0_desc);
144
+ var tmp2_cached = Companion_getInstance().r36_1;
145
+ tmp1_output.l10(tmp0_desc, 0, value.u36_1);
146
+ tmp1_output.n10(tmp0_desc, 1, tmp2_cached[1].b1(), value.v36_1);
147
+ tmp1_output.l10(tmp0_desc, 2, value.w36_1);
148
+ tmp1_output.l10(tmp0_desc, 3, value.x36_1);
149
+ tmp1_output.l10(tmp0_desc, 4, value.y36_1);
150
+ tmp1_output.g10(tmp0_desc, 5, value.z36_1);
151
+ tmp1_output.g10(tmp0_desc, 6, value.a37_1);
152
+ tmp1_output.g10(tmp0_desc, 7, value.b37_1);
153
+ tmp1_output.g10(tmp0_desc, 8, value.c37_1);
154
+ tmp1_output.l10(tmp0_desc, 9, value.d37_1);
155
+ tmp1_output.l10(tmp0_desc, 10, value.e37_1);
156
+ if (tmp1_output.t10(tmp0_desc, 11) ? true : !equals(value.f37_1, emptyMap())) {
157
+ tmp1_output.n10(tmp0_desc, 11, tmp2_cached[11].b1(), value.f37_1);
158
+ }
159
+ tmp1_output.xy(tmp0_desc);
160
+ };
161
+ protoOf($serializer).gv = function (encoder, value) {
162
+ return this.t36(encoder, value instanceof CodeNode ? value : THROW_CCE());
163
+ };
164
+ protoOf($serializer).hv = function (decoder) {
165
+ var tmp0_desc = this.s36_1;
166
+ var tmp1_flag = true;
167
+ var tmp2_index = 0;
168
+ var tmp3_bitMask0 = 0;
169
+ var tmp4_local0 = null;
170
+ var tmp5_local1 = null;
171
+ var tmp6_local2 = null;
172
+ var tmp7_local3 = null;
173
+ var tmp8_local4 = null;
174
+ var tmp9_local5 = 0;
175
+ var tmp10_local6 = 0;
176
+ var tmp11_local7 = 0;
177
+ var tmp12_local8 = 0;
178
+ var tmp13_local9 = null;
179
+ var tmp14_local10 = null;
180
+ var tmp15_local11 = null;
181
+ var tmp16_input = decoder.wy(tmp0_desc);
182
+ var tmp17_cached = Companion_getInstance().r36_1;
183
+ if (tmp16_input.mz()) {
184
+ tmp4_local0 = tmp16_input.gz(tmp0_desc, 0);
185
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
186
+ tmp5_local1 = tmp16_input.iz(tmp0_desc, 1, tmp17_cached[1].b1(), tmp5_local1);
187
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
188
+ tmp6_local2 = tmp16_input.gz(tmp0_desc, 2);
189
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
190
+ tmp7_local3 = tmp16_input.gz(tmp0_desc, 3);
191
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
192
+ tmp8_local4 = tmp16_input.gz(tmp0_desc, 4);
193
+ tmp3_bitMask0 = tmp3_bitMask0 | 16;
194
+ tmp9_local5 = tmp16_input.bz(tmp0_desc, 5);
195
+ tmp3_bitMask0 = tmp3_bitMask0 | 32;
196
+ tmp10_local6 = tmp16_input.bz(tmp0_desc, 6);
197
+ tmp3_bitMask0 = tmp3_bitMask0 | 64;
198
+ tmp11_local7 = tmp16_input.bz(tmp0_desc, 7);
199
+ tmp3_bitMask0 = tmp3_bitMask0 | 128;
200
+ tmp12_local8 = tmp16_input.bz(tmp0_desc, 8);
201
+ tmp3_bitMask0 = tmp3_bitMask0 | 256;
202
+ tmp13_local9 = tmp16_input.gz(tmp0_desc, 9);
203
+ tmp3_bitMask0 = tmp3_bitMask0 | 512;
204
+ tmp14_local10 = tmp16_input.gz(tmp0_desc, 10);
205
+ tmp3_bitMask0 = tmp3_bitMask0 | 1024;
206
+ tmp15_local11 = tmp16_input.iz(tmp0_desc, 11, tmp17_cached[11].b1(), tmp15_local11);
207
+ tmp3_bitMask0 = tmp3_bitMask0 | 2048;
208
+ } else
209
+ while (tmp1_flag) {
210
+ tmp2_index = tmp16_input.nz(tmp0_desc);
211
+ switch (tmp2_index) {
212
+ case -1:
213
+ tmp1_flag = false;
214
+ break;
215
+ case 0:
216
+ tmp4_local0 = tmp16_input.gz(tmp0_desc, 0);
217
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
218
+ break;
219
+ case 1:
220
+ tmp5_local1 = tmp16_input.iz(tmp0_desc, 1, tmp17_cached[1].b1(), tmp5_local1);
221
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
222
+ break;
223
+ case 2:
224
+ tmp6_local2 = tmp16_input.gz(tmp0_desc, 2);
225
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
226
+ break;
227
+ case 3:
228
+ tmp7_local3 = tmp16_input.gz(tmp0_desc, 3);
229
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
230
+ break;
231
+ case 4:
232
+ tmp8_local4 = tmp16_input.gz(tmp0_desc, 4);
233
+ tmp3_bitMask0 = tmp3_bitMask0 | 16;
234
+ break;
235
+ case 5:
236
+ tmp9_local5 = tmp16_input.bz(tmp0_desc, 5);
237
+ tmp3_bitMask0 = tmp3_bitMask0 | 32;
238
+ break;
239
+ case 6:
240
+ tmp10_local6 = tmp16_input.bz(tmp0_desc, 6);
241
+ tmp3_bitMask0 = tmp3_bitMask0 | 64;
242
+ break;
243
+ case 7:
244
+ tmp11_local7 = tmp16_input.bz(tmp0_desc, 7);
245
+ tmp3_bitMask0 = tmp3_bitMask0 | 128;
246
+ break;
247
+ case 8:
248
+ tmp12_local8 = tmp16_input.bz(tmp0_desc, 8);
249
+ tmp3_bitMask0 = tmp3_bitMask0 | 256;
250
+ break;
251
+ case 9:
252
+ tmp13_local9 = tmp16_input.gz(tmp0_desc, 9);
253
+ tmp3_bitMask0 = tmp3_bitMask0 | 512;
254
+ break;
255
+ case 10:
256
+ tmp14_local10 = tmp16_input.gz(tmp0_desc, 10);
257
+ tmp3_bitMask0 = tmp3_bitMask0 | 1024;
258
+ break;
259
+ case 11:
260
+ tmp15_local11 = tmp16_input.iz(tmp0_desc, 11, tmp17_cached[11].b1(), tmp15_local11);
261
+ tmp3_bitMask0 = tmp3_bitMask0 | 2048;
262
+ break;
263
+ default:
264
+ throw UnknownFieldException_init_$Create$(tmp2_index);
265
+ }
266
+ }
267
+ tmp16_input.xy(tmp0_desc);
268
+ return CodeNode_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, tmp14_local10, tmp15_local11, null);
269
+ };
270
+ protoOf($serializer).fv = function () {
271
+ return this.s36_1;
272
+ };
273
+ protoOf($serializer).d17 = function () {
274
+ var tmp0_cached = Companion_getInstance().r36_1;
275
+ // Inline function 'kotlin.arrayOf' call
276
+ // Inline function 'kotlin.js.unsafeCast' call
277
+ // Inline function 'kotlin.js.asDynamic' call
278
+ return [StringSerializer_getInstance(), tmp0_cached[1].b1(), StringSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), IntSerializer_getInstance(), IntSerializer_getInstance(), IntSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance(), StringSerializer_getInstance(), tmp0_cached[11].b1()];
279
+ };
280
+ var $serializer_instance;
281
+ function $serializer_getInstance() {
282
+ if ($serializer_instance == null)
283
+ new $serializer();
284
+ return $serializer_instance;
285
+ }
286
+ function CodeNode_init_$Init$(seen0, id, type, name, packageName, filePath, startLine, endLine, startColumn, endColumn, qualifiedName, content, metadata, serializationConstructorMarker, $this) {
287
+ if (!(2047 === (2047 & seen0))) {
288
+ throwMissingFieldException(seen0, 2047, $serializer_getInstance().s36_1);
289
+ }
290
+ $this.u36_1 = id;
291
+ $this.v36_1 = type;
292
+ $this.w36_1 = name;
293
+ $this.x36_1 = packageName;
294
+ $this.y36_1 = filePath;
295
+ $this.z36_1 = startLine;
296
+ $this.a37_1 = endLine;
297
+ $this.b37_1 = startColumn;
298
+ $this.c37_1 = endColumn;
299
+ $this.d37_1 = qualifiedName;
300
+ $this.e37_1 = content;
301
+ if (0 === (seen0 & 2048))
302
+ $this.f37_1 = emptyMap();
303
+ else
304
+ $this.f37_1 = metadata;
305
+ return $this;
306
+ }
307
+ function CodeNode_init_$Create$(seen0, id, type, name, packageName, filePath, startLine, endLine, startColumn, endColumn, qualifiedName, content, metadata, serializationConstructorMarker) {
308
+ return CodeNode_init_$Init$(seen0, id, type, name, packageName, filePath, startLine, endLine, startColumn, endColumn, qualifiedName, content, metadata, serializationConstructorMarker, objectCreate(protoOf(CodeNode)));
309
+ }
310
+ function CodeNode(id, type, name, packageName, filePath, startLine, endLine, startColumn, endColumn, qualifiedName, content, metadata) {
311
+ Companion_getInstance();
312
+ metadata = metadata === VOID ? emptyMap() : metadata;
313
+ this.u36_1 = id;
314
+ this.v36_1 = type;
315
+ this.w36_1 = name;
316
+ this.x36_1 = packageName;
317
+ this.y36_1 = filePath;
318
+ this.z36_1 = startLine;
319
+ this.a37_1 = endLine;
320
+ this.b37_1 = startColumn;
321
+ this.c37_1 = endColumn;
322
+ this.d37_1 = qualifiedName;
323
+ this.e37_1 = content;
324
+ this.f37_1 = metadata;
325
+ }
326
+ protoOf(CodeNode).toString = function () {
327
+ return 'CodeNode(id=' + this.u36_1 + ', type=' + this.v36_1.toString() + ', name=' + this.w36_1 + ', packageName=' + this.x36_1 + ', filePath=' + this.y36_1 + ', startLine=' + this.z36_1 + ', endLine=' + this.a37_1 + ', startColumn=' + this.b37_1 + ', endColumn=' + this.c37_1 + ', qualifiedName=' + this.d37_1 + ', content=' + this.e37_1 + ', metadata=' + toString(this.f37_1) + ')';
328
+ };
329
+ protoOf(CodeNode).hashCode = function () {
330
+ var result = getStringHashCode(this.u36_1);
331
+ result = imul(result, 31) + this.v36_1.hashCode() | 0;
332
+ result = imul(result, 31) + getStringHashCode(this.w36_1) | 0;
333
+ result = imul(result, 31) + getStringHashCode(this.x36_1) | 0;
334
+ result = imul(result, 31) + getStringHashCode(this.y36_1) | 0;
335
+ result = imul(result, 31) + this.z36_1 | 0;
336
+ result = imul(result, 31) + this.a37_1 | 0;
337
+ result = imul(result, 31) + this.b37_1 | 0;
338
+ result = imul(result, 31) + this.c37_1 | 0;
339
+ result = imul(result, 31) + getStringHashCode(this.d37_1) | 0;
340
+ result = imul(result, 31) + getStringHashCode(this.e37_1) | 0;
341
+ result = imul(result, 31) + hashCode(this.f37_1) | 0;
342
+ return result;
343
+ };
344
+ protoOf(CodeNode).equals = function (other) {
345
+ if (this === other)
346
+ return true;
347
+ if (!(other instanceof CodeNode))
348
+ return false;
349
+ var tmp0_other_with_cast = other instanceof CodeNode ? other : THROW_CCE();
350
+ if (!(this.u36_1 === tmp0_other_with_cast.u36_1))
351
+ return false;
352
+ if (!this.v36_1.equals(tmp0_other_with_cast.v36_1))
353
+ return false;
354
+ if (!(this.w36_1 === tmp0_other_with_cast.w36_1))
355
+ return false;
356
+ if (!(this.x36_1 === tmp0_other_with_cast.x36_1))
357
+ return false;
358
+ if (!(this.y36_1 === tmp0_other_with_cast.y36_1))
359
+ return false;
360
+ if (!(this.z36_1 === tmp0_other_with_cast.z36_1))
361
+ return false;
362
+ if (!(this.a37_1 === tmp0_other_with_cast.a37_1))
363
+ return false;
364
+ if (!(this.b37_1 === tmp0_other_with_cast.b37_1))
365
+ return false;
366
+ if (!(this.c37_1 === tmp0_other_with_cast.c37_1))
367
+ return false;
368
+ if (!(this.d37_1 === tmp0_other_with_cast.d37_1))
369
+ return false;
370
+ if (!(this.e37_1 === tmp0_other_with_cast.e37_1))
371
+ return false;
372
+ if (!equals(this.f37_1, tmp0_other_with_cast.f37_1))
373
+ return false;
374
+ return true;
375
+ };
376
+ function _get_$cachedSerializer__te6jhj($this) {
377
+ return $this.q36_1.b1();
378
+ }
379
+ function CodeElementType$Companion$_anonymous__4husme() {
380
+ return createSimpleEnumSerializer('cc.unitmesh.codegraph.model.CodeElementType', values());
381
+ }
382
+ var CodeElementType_PACKAGE_instance;
383
+ var CodeElementType_CLASS_instance;
384
+ var CodeElementType_INTERFACE_instance;
385
+ var CodeElementType_ENUM_instance;
386
+ var CodeElementType_CONSTRUCTOR_instance;
387
+ var CodeElementType_METHOD_instance;
388
+ var CodeElementType_FUNCTION_instance;
389
+ var CodeElementType_FIELD_instance;
390
+ var CodeElementType_PROPERTY_instance;
391
+ var CodeElementType_PARAMETER_instance;
392
+ var CodeElementType_VARIABLE_instance;
393
+ var CodeElementType_ANNOTATION_instance;
394
+ var CodeElementType_IMPORT_instance;
395
+ var CodeElementType_UNKNOWN_instance;
396
+ function values() {
397
+ return [CodeElementType_PACKAGE_getInstance(), CodeElementType_CLASS_getInstance(), CodeElementType_INTERFACE_getInstance(), CodeElementType_ENUM_getInstance(), CodeElementType_CONSTRUCTOR_getInstance(), CodeElementType_METHOD_getInstance(), CodeElementType_FUNCTION_getInstance(), CodeElementType_FIELD_getInstance(), CodeElementType_PROPERTY_getInstance(), CodeElementType_PARAMETER_getInstance(), CodeElementType_VARIABLE_getInstance(), CodeElementType_ANNOTATION_getInstance(), CodeElementType_IMPORT_getInstance(), CodeElementType_UNKNOWN_getInstance()];
398
+ }
399
+ function Companion_0() {
400
+ Companion_instance_0 = this;
401
+ var tmp = this;
402
+ var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
403
+ tmp.q36_1 = lazy(tmp_0, CodeElementType$Companion$_anonymous__4husme);
404
+ }
405
+ protoOf(Companion_0).q1j = function () {
406
+ return _get_$cachedSerializer__te6jhj(this);
407
+ };
408
+ protoOf(Companion_0).o17 = function (typeParamsSerializers) {
409
+ return this.q1j();
410
+ };
411
+ var Companion_instance_0;
412
+ function Companion_getInstance_0() {
413
+ CodeElementType_initEntries();
414
+ if (Companion_instance_0 == null)
415
+ new Companion_0();
416
+ return Companion_instance_0;
417
+ }
418
+ var CodeElementType_entriesInitialized;
419
+ function CodeElementType_initEntries() {
420
+ if (CodeElementType_entriesInitialized)
421
+ return Unit_instance;
422
+ CodeElementType_entriesInitialized = true;
423
+ CodeElementType_PACKAGE_instance = new CodeElementType('PACKAGE', 0);
424
+ CodeElementType_CLASS_instance = new CodeElementType('CLASS', 1);
425
+ CodeElementType_INTERFACE_instance = new CodeElementType('INTERFACE', 2);
426
+ CodeElementType_ENUM_instance = new CodeElementType('ENUM', 3);
427
+ CodeElementType_CONSTRUCTOR_instance = new CodeElementType('CONSTRUCTOR', 4);
428
+ CodeElementType_METHOD_instance = new CodeElementType('METHOD', 5);
429
+ CodeElementType_FUNCTION_instance = new CodeElementType('FUNCTION', 6);
430
+ CodeElementType_FIELD_instance = new CodeElementType('FIELD', 7);
431
+ CodeElementType_PROPERTY_instance = new CodeElementType('PROPERTY', 8);
432
+ CodeElementType_PARAMETER_instance = new CodeElementType('PARAMETER', 9);
433
+ CodeElementType_VARIABLE_instance = new CodeElementType('VARIABLE', 10);
434
+ CodeElementType_ANNOTATION_instance = new CodeElementType('ANNOTATION', 11);
435
+ CodeElementType_IMPORT_instance = new CodeElementType('IMPORT', 12);
436
+ CodeElementType_UNKNOWN_instance = new CodeElementType('UNKNOWN', 13);
437
+ Companion_getInstance_0();
438
+ }
439
+ function CodeElementType(name, ordinal) {
440
+ Enum.call(this, name, ordinal);
441
+ }
442
+ function CodeElementType_PACKAGE_getInstance() {
443
+ CodeElementType_initEntries();
444
+ return CodeElementType_PACKAGE_instance;
445
+ }
446
+ function CodeElementType_CLASS_getInstance() {
447
+ CodeElementType_initEntries();
448
+ return CodeElementType_CLASS_instance;
449
+ }
450
+ function CodeElementType_INTERFACE_getInstance() {
451
+ CodeElementType_initEntries();
452
+ return CodeElementType_INTERFACE_instance;
453
+ }
454
+ function CodeElementType_ENUM_getInstance() {
455
+ CodeElementType_initEntries();
456
+ return CodeElementType_ENUM_instance;
457
+ }
458
+ function CodeElementType_CONSTRUCTOR_getInstance() {
459
+ CodeElementType_initEntries();
460
+ return CodeElementType_CONSTRUCTOR_instance;
461
+ }
462
+ function CodeElementType_METHOD_getInstance() {
463
+ CodeElementType_initEntries();
464
+ return CodeElementType_METHOD_instance;
465
+ }
466
+ function CodeElementType_FUNCTION_getInstance() {
467
+ CodeElementType_initEntries();
468
+ return CodeElementType_FUNCTION_instance;
469
+ }
470
+ function CodeElementType_FIELD_getInstance() {
471
+ CodeElementType_initEntries();
472
+ return CodeElementType_FIELD_instance;
473
+ }
474
+ function CodeElementType_PROPERTY_getInstance() {
475
+ CodeElementType_initEntries();
476
+ return CodeElementType_PROPERTY_instance;
477
+ }
478
+ function CodeElementType_PARAMETER_getInstance() {
479
+ CodeElementType_initEntries();
480
+ return CodeElementType_PARAMETER_instance;
481
+ }
482
+ function CodeElementType_VARIABLE_getInstance() {
483
+ CodeElementType_initEntries();
484
+ return CodeElementType_VARIABLE_instance;
485
+ }
486
+ function CodeElementType_ANNOTATION_getInstance() {
487
+ CodeElementType_initEntries();
488
+ return CodeElementType_ANNOTATION_instance;
489
+ }
490
+ function CodeElementType_IMPORT_getInstance() {
491
+ CodeElementType_initEntries();
492
+ return CodeElementType_IMPORT_instance;
493
+ }
494
+ function CodeElementType_UNKNOWN_getInstance() {
495
+ CodeElementType_initEntries();
496
+ return CodeElementType_UNKNOWN_instance;
497
+ }
498
+ function ImportInfo$Companion$$childSerializers$_anonymous__itqytl() {
499
+ return Companion_getInstance_2().q1j();
500
+ }
501
+ function ImportInfo$Companion$$childSerializers$_anonymous__itqytl_0() {
502
+ return new ArrayListSerializer(StringSerializer_getInstance());
503
+ }
504
+ function Companion_1() {
505
+ Companion_instance_1 = this;
506
+ var tmp = this;
507
+ var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
508
+ var tmp_1 = lazy(tmp_0, ImportInfo$Companion$$childSerializers$_anonymous__itqytl);
509
+ var tmp_2 = LazyThreadSafetyMode_PUBLICATION_getInstance();
510
+ // Inline function 'kotlin.arrayOf' call
511
+ // Inline function 'kotlin.js.unsafeCast' call
512
+ // Inline function 'kotlin.js.asDynamic' call
513
+ tmp.h37_1 = [null, tmp_1, null, lazy(tmp_2, ImportInfo$Companion$$childSerializers$_anonymous__itqytl_0), null, null, null, null, null, null];
514
+ }
515
+ var Companion_instance_1;
516
+ function Companion_getInstance_1() {
517
+ if (Companion_instance_1 == null)
518
+ new Companion_1();
519
+ return Companion_instance_1;
520
+ }
521
+ function $serializer_0() {
522
+ $serializer_instance_0 = this;
523
+ var tmp0_serialDesc = new PluginGeneratedSerialDescriptor('cc.unitmesh.codegraph.model.ImportInfo', this, 10);
524
+ tmp0_serialDesc.m16('path', false);
525
+ tmp0_serialDesc.m16('type', false);
526
+ tmp0_serialDesc.m16('alias', true);
527
+ tmp0_serialDesc.m16('importedNames', true);
528
+ tmp0_serialDesc.m16('isWildcard', true);
529
+ tmp0_serialDesc.m16('isStatic', true);
530
+ tmp0_serialDesc.m16('filePath', false);
531
+ tmp0_serialDesc.m16('startLine', false);
532
+ tmp0_serialDesc.m16('endLine', false);
533
+ tmp0_serialDesc.m16('rawText', true);
534
+ this.i37_1 = tmp0_serialDesc;
535
+ }
536
+ protoOf($serializer_0).j37 = function (encoder, value) {
537
+ var tmp0_desc = this.i37_1;
538
+ var tmp1_output = encoder.wy(tmp0_desc);
539
+ var tmp2_cached = Companion_getInstance_1().h37_1;
540
+ tmp1_output.l10(tmp0_desc, 0, value.k37_1);
541
+ tmp1_output.n10(tmp0_desc, 1, tmp2_cached[1].b1(), value.l37_1);
542
+ if (tmp1_output.t10(tmp0_desc, 2) ? true : !(value.m37_1 == null)) {
543
+ tmp1_output.p10(tmp0_desc, 2, StringSerializer_getInstance(), value.m37_1);
544
+ }
545
+ if (tmp1_output.t10(tmp0_desc, 3) ? true : !equals(value.n37_1, emptyList())) {
546
+ tmp1_output.n10(tmp0_desc, 3, tmp2_cached[3].b1(), value.n37_1);
547
+ }
548
+ if (tmp1_output.t10(tmp0_desc, 4) ? true : !(value.o37_1 === false)) {
549
+ tmp1_output.d10(tmp0_desc, 4, value.o37_1);
550
+ }
551
+ if (tmp1_output.t10(tmp0_desc, 5) ? true : !(value.p37_1 === false)) {
552
+ tmp1_output.d10(tmp0_desc, 5, value.p37_1);
553
+ }
554
+ tmp1_output.l10(tmp0_desc, 6, value.q37_1);
555
+ tmp1_output.g10(tmp0_desc, 7, value.r37_1);
556
+ tmp1_output.g10(tmp0_desc, 8, value.s37_1);
557
+ if (tmp1_output.t10(tmp0_desc, 9) ? true : !(value.t37_1 === '')) {
558
+ tmp1_output.l10(tmp0_desc, 9, value.t37_1);
559
+ }
560
+ tmp1_output.xy(tmp0_desc);
561
+ };
562
+ protoOf($serializer_0).gv = function (encoder, value) {
563
+ return this.j37(encoder, value instanceof ImportInfo ? value : THROW_CCE());
564
+ };
565
+ protoOf($serializer_0).hv = function (decoder) {
566
+ var tmp0_desc = this.i37_1;
567
+ var tmp1_flag = true;
568
+ var tmp2_index = 0;
569
+ var tmp3_bitMask0 = 0;
570
+ var tmp4_local0 = null;
571
+ var tmp5_local1 = null;
572
+ var tmp6_local2 = null;
573
+ var tmp7_local3 = null;
574
+ var tmp8_local4 = false;
575
+ var tmp9_local5 = false;
576
+ var tmp10_local6 = null;
577
+ var tmp11_local7 = 0;
578
+ var tmp12_local8 = 0;
579
+ var tmp13_local9 = null;
580
+ var tmp14_input = decoder.wy(tmp0_desc);
581
+ var tmp15_cached = Companion_getInstance_1().h37_1;
582
+ if (tmp14_input.mz()) {
583
+ tmp4_local0 = tmp14_input.gz(tmp0_desc, 0);
584
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
585
+ tmp5_local1 = tmp14_input.iz(tmp0_desc, 1, tmp15_cached[1].b1(), tmp5_local1);
586
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
587
+ tmp6_local2 = tmp14_input.kz(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
588
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
589
+ tmp7_local3 = tmp14_input.iz(tmp0_desc, 3, tmp15_cached[3].b1(), tmp7_local3);
590
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
591
+ tmp8_local4 = tmp14_input.yy(tmp0_desc, 4);
592
+ tmp3_bitMask0 = tmp3_bitMask0 | 16;
593
+ tmp9_local5 = tmp14_input.yy(tmp0_desc, 5);
594
+ tmp3_bitMask0 = tmp3_bitMask0 | 32;
595
+ tmp10_local6 = tmp14_input.gz(tmp0_desc, 6);
596
+ tmp3_bitMask0 = tmp3_bitMask0 | 64;
597
+ tmp11_local7 = tmp14_input.bz(tmp0_desc, 7);
598
+ tmp3_bitMask0 = tmp3_bitMask0 | 128;
599
+ tmp12_local8 = tmp14_input.bz(tmp0_desc, 8);
600
+ tmp3_bitMask0 = tmp3_bitMask0 | 256;
601
+ tmp13_local9 = tmp14_input.gz(tmp0_desc, 9);
602
+ tmp3_bitMask0 = tmp3_bitMask0 | 512;
603
+ } else
604
+ while (tmp1_flag) {
605
+ tmp2_index = tmp14_input.nz(tmp0_desc);
606
+ switch (tmp2_index) {
607
+ case -1:
608
+ tmp1_flag = false;
609
+ break;
610
+ case 0:
611
+ tmp4_local0 = tmp14_input.gz(tmp0_desc, 0);
612
+ tmp3_bitMask0 = tmp3_bitMask0 | 1;
613
+ break;
614
+ case 1:
615
+ tmp5_local1 = tmp14_input.iz(tmp0_desc, 1, tmp15_cached[1].b1(), tmp5_local1);
616
+ tmp3_bitMask0 = tmp3_bitMask0 | 2;
617
+ break;
618
+ case 2:
619
+ tmp6_local2 = tmp14_input.kz(tmp0_desc, 2, StringSerializer_getInstance(), tmp6_local2);
620
+ tmp3_bitMask0 = tmp3_bitMask0 | 4;
621
+ break;
622
+ case 3:
623
+ tmp7_local3 = tmp14_input.iz(tmp0_desc, 3, tmp15_cached[3].b1(), tmp7_local3);
624
+ tmp3_bitMask0 = tmp3_bitMask0 | 8;
625
+ break;
626
+ case 4:
627
+ tmp8_local4 = tmp14_input.yy(tmp0_desc, 4);
628
+ tmp3_bitMask0 = tmp3_bitMask0 | 16;
629
+ break;
630
+ case 5:
631
+ tmp9_local5 = tmp14_input.yy(tmp0_desc, 5);
632
+ tmp3_bitMask0 = tmp3_bitMask0 | 32;
633
+ break;
634
+ case 6:
635
+ tmp10_local6 = tmp14_input.gz(tmp0_desc, 6);
636
+ tmp3_bitMask0 = tmp3_bitMask0 | 64;
637
+ break;
638
+ case 7:
639
+ tmp11_local7 = tmp14_input.bz(tmp0_desc, 7);
640
+ tmp3_bitMask0 = tmp3_bitMask0 | 128;
641
+ break;
642
+ case 8:
643
+ tmp12_local8 = tmp14_input.bz(tmp0_desc, 8);
644
+ tmp3_bitMask0 = tmp3_bitMask0 | 256;
645
+ break;
646
+ case 9:
647
+ tmp13_local9 = tmp14_input.gz(tmp0_desc, 9);
648
+ tmp3_bitMask0 = tmp3_bitMask0 | 512;
649
+ break;
650
+ default:
651
+ throw UnknownFieldException_init_$Create$(tmp2_index);
652
+ }
653
+ }
654
+ tmp14_input.xy(tmp0_desc);
655
+ return ImportInfo_init_$Create$(tmp3_bitMask0, tmp4_local0, tmp5_local1, tmp6_local2, tmp7_local3, tmp8_local4, tmp9_local5, tmp10_local6, tmp11_local7, tmp12_local8, tmp13_local9, null);
656
+ };
657
+ protoOf($serializer_0).fv = function () {
658
+ return this.i37_1;
659
+ };
660
+ protoOf($serializer_0).d17 = function () {
661
+ var tmp0_cached = Companion_getInstance_1().h37_1;
662
+ // Inline function 'kotlin.arrayOf' call
663
+ // Inline function 'kotlin.js.unsafeCast' call
664
+ // Inline function 'kotlin.js.asDynamic' call
665
+ return [StringSerializer_getInstance(), tmp0_cached[1].b1(), get_nullable(StringSerializer_getInstance()), tmp0_cached[3].b1(), BooleanSerializer_getInstance(), BooleanSerializer_getInstance(), StringSerializer_getInstance(), IntSerializer_getInstance(), IntSerializer_getInstance(), StringSerializer_getInstance()];
666
+ };
667
+ var $serializer_instance_0;
668
+ function $serializer_getInstance_0() {
669
+ if ($serializer_instance_0 == null)
670
+ new $serializer_0();
671
+ return $serializer_instance_0;
672
+ }
673
+ function ImportInfo_init_$Init$(seen0, path, type, alias, importedNames, isWildcard, isStatic, filePath, startLine, endLine, rawText, serializationConstructorMarker, $this) {
674
+ if (!(451 === (451 & seen0))) {
675
+ throwMissingFieldException(seen0, 451, $serializer_getInstance_0().i37_1);
676
+ }
677
+ $this.k37_1 = path;
678
+ $this.l37_1 = type;
679
+ if (0 === (seen0 & 4))
680
+ $this.m37_1 = null;
681
+ else
682
+ $this.m37_1 = alias;
683
+ if (0 === (seen0 & 8))
684
+ $this.n37_1 = emptyList();
685
+ else
686
+ $this.n37_1 = importedNames;
687
+ if (0 === (seen0 & 16))
688
+ $this.o37_1 = false;
689
+ else
690
+ $this.o37_1 = isWildcard;
691
+ if (0 === (seen0 & 32))
692
+ $this.p37_1 = false;
693
+ else
694
+ $this.p37_1 = isStatic;
695
+ $this.q37_1 = filePath;
696
+ $this.r37_1 = startLine;
697
+ $this.s37_1 = endLine;
698
+ if (0 === (seen0 & 512))
699
+ $this.t37_1 = '';
700
+ else
701
+ $this.t37_1 = rawText;
702
+ return $this;
703
+ }
704
+ function ImportInfo_init_$Create$(seen0, path, type, alias, importedNames, isWildcard, isStatic, filePath, startLine, endLine, rawText, serializationConstructorMarker) {
705
+ return ImportInfo_init_$Init$(seen0, path, type, alias, importedNames, isWildcard, isStatic, filePath, startLine, endLine, rawText, serializationConstructorMarker, objectCreate(protoOf(ImportInfo)));
706
+ }
707
+ function ImportInfo(path, type, alias, importedNames, isWildcard, isStatic, filePath, startLine, endLine, rawText) {
708
+ Companion_getInstance_1();
709
+ alias = alias === VOID ? null : alias;
710
+ importedNames = importedNames === VOID ? emptyList() : importedNames;
711
+ isWildcard = isWildcard === VOID ? false : isWildcard;
712
+ isStatic = isStatic === VOID ? false : isStatic;
713
+ rawText = rawText === VOID ? '' : rawText;
714
+ this.k37_1 = path;
715
+ this.l37_1 = type;
716
+ this.m37_1 = alias;
717
+ this.n37_1 = importedNames;
718
+ this.o37_1 = isWildcard;
719
+ this.p37_1 = isStatic;
720
+ this.q37_1 = filePath;
721
+ this.r37_1 = startLine;
722
+ this.s37_1 = endLine;
723
+ this.t37_1 = rawText;
724
+ }
725
+ protoOf(ImportInfo).u37 = function () {
726
+ var separator = contains(this.k37_1, '::') ? '::' : contains(this.k37_1, '/') ? '/' : '.';
727
+ var lastIndex = lastIndexOf(this.k37_1, separator);
728
+ return lastIndex >= 0 ? substring(this.k37_1, lastIndex + separator.length | 0) : this.k37_1;
729
+ };
730
+ protoOf(ImportInfo).toString = function () {
731
+ return 'ImportInfo(path=' + this.k37_1 + ', type=' + this.l37_1.toString() + ', alias=' + this.m37_1 + ', importedNames=' + toString(this.n37_1) + ', isWildcard=' + this.o37_1 + ', isStatic=' + this.p37_1 + ', filePath=' + this.q37_1 + ', startLine=' + this.r37_1 + ', endLine=' + this.s37_1 + ', rawText=' + this.t37_1 + ')';
732
+ };
733
+ protoOf(ImportInfo).hashCode = function () {
734
+ var result = getStringHashCode(this.k37_1);
735
+ result = imul(result, 31) + this.l37_1.hashCode() | 0;
736
+ result = imul(result, 31) + (this.m37_1 == null ? 0 : getStringHashCode(this.m37_1)) | 0;
737
+ result = imul(result, 31) + hashCode(this.n37_1) | 0;
738
+ result = imul(result, 31) + getBooleanHashCode(this.o37_1) | 0;
739
+ result = imul(result, 31) + getBooleanHashCode(this.p37_1) | 0;
740
+ result = imul(result, 31) + getStringHashCode(this.q37_1) | 0;
741
+ result = imul(result, 31) + this.r37_1 | 0;
742
+ result = imul(result, 31) + this.s37_1 | 0;
743
+ result = imul(result, 31) + getStringHashCode(this.t37_1) | 0;
744
+ return result;
745
+ };
746
+ protoOf(ImportInfo).equals = function (other) {
747
+ if (this === other)
748
+ return true;
749
+ if (!(other instanceof ImportInfo))
750
+ return false;
751
+ var tmp0_other_with_cast = other instanceof ImportInfo ? other : THROW_CCE();
752
+ if (!(this.k37_1 === tmp0_other_with_cast.k37_1))
753
+ return false;
754
+ if (!this.l37_1.equals(tmp0_other_with_cast.l37_1))
755
+ return false;
756
+ if (!(this.m37_1 == tmp0_other_with_cast.m37_1))
757
+ return false;
758
+ if (!equals(this.n37_1, tmp0_other_with_cast.n37_1))
759
+ return false;
760
+ if (!(this.o37_1 === tmp0_other_with_cast.o37_1))
761
+ return false;
762
+ if (!(this.p37_1 === tmp0_other_with_cast.p37_1))
763
+ return false;
764
+ if (!(this.q37_1 === tmp0_other_with_cast.q37_1))
765
+ return false;
766
+ if (!(this.r37_1 === tmp0_other_with_cast.r37_1))
767
+ return false;
768
+ if (!(this.s37_1 === tmp0_other_with_cast.s37_1))
769
+ return false;
770
+ if (!(this.t37_1 === tmp0_other_with_cast.t37_1))
771
+ return false;
772
+ return true;
773
+ };
774
+ function _get_$cachedSerializer__te6jhj_0($this) {
775
+ return $this.g37_1.b1();
776
+ }
777
+ function ImportType$Companion$_anonymous__sitmj4() {
778
+ return createSimpleEnumSerializer('cc.unitmesh.codegraph.model.ImportType', values_0());
779
+ }
780
+ var ImportType_MODULE_instance;
781
+ var ImportType_SELECTIVE_instance;
782
+ var ImportType_RELATIVE_instance;
783
+ var ImportType_PACKAGE_instance;
784
+ var ImportType_SIDE_EFFECT_instance;
785
+ var ImportType_UNKNOWN_instance;
786
+ function values_0() {
787
+ return [ImportType_MODULE_getInstance(), ImportType_SELECTIVE_getInstance(), ImportType_RELATIVE_getInstance(), ImportType_PACKAGE_getInstance(), ImportType_SIDE_EFFECT_getInstance(), ImportType_UNKNOWN_getInstance()];
788
+ }
789
+ function Companion_2() {
790
+ Companion_instance_2 = this;
791
+ var tmp = this;
792
+ var tmp_0 = LazyThreadSafetyMode_PUBLICATION_getInstance();
793
+ tmp.g37_1 = lazy(tmp_0, ImportType$Companion$_anonymous__sitmj4);
794
+ }
795
+ protoOf(Companion_2).q1j = function () {
796
+ return _get_$cachedSerializer__te6jhj_0(this);
797
+ };
798
+ protoOf(Companion_2).o17 = function (typeParamsSerializers) {
799
+ return this.q1j();
800
+ };
801
+ var Companion_instance_2;
802
+ function Companion_getInstance_2() {
803
+ ImportType_initEntries();
804
+ if (Companion_instance_2 == null)
805
+ new Companion_2();
806
+ return Companion_instance_2;
807
+ }
808
+ var ImportType_entriesInitialized;
809
+ function ImportType_initEntries() {
810
+ if (ImportType_entriesInitialized)
811
+ return Unit_instance;
812
+ ImportType_entriesInitialized = true;
813
+ ImportType_MODULE_instance = new ImportType('MODULE', 0);
814
+ ImportType_SELECTIVE_instance = new ImportType('SELECTIVE', 1);
815
+ ImportType_RELATIVE_instance = new ImportType('RELATIVE', 2);
816
+ ImportType_PACKAGE_instance = new ImportType('PACKAGE', 3);
817
+ ImportType_SIDE_EFFECT_instance = new ImportType('SIDE_EFFECT', 4);
818
+ ImportType_UNKNOWN_instance = new ImportType('UNKNOWN', 5);
819
+ Companion_getInstance_2();
820
+ }
821
+ function ImportType(name, ordinal) {
822
+ Enum.call(this, name, ordinal);
823
+ }
824
+ function ImportType_MODULE_getInstance() {
825
+ ImportType_initEntries();
826
+ return ImportType_MODULE_instance;
827
+ }
828
+ function ImportType_SELECTIVE_getInstance() {
829
+ ImportType_initEntries();
830
+ return ImportType_SELECTIVE_instance;
831
+ }
832
+ function ImportType_RELATIVE_getInstance() {
833
+ ImportType_initEntries();
834
+ return ImportType_RELATIVE_instance;
835
+ }
836
+ function ImportType_PACKAGE_getInstance() {
837
+ ImportType_initEntries();
838
+ return ImportType_PACKAGE_instance;
839
+ }
840
+ function ImportType_SIDE_EFFECT_getInstance() {
841
+ ImportType_initEntries();
842
+ return ImportType_SIDE_EFFECT_instance;
843
+ }
844
+ function ImportType_UNKNOWN_getInstance() {
845
+ ImportType_initEntries();
846
+ return ImportType_UNKNOWN_instance;
847
+ }
848
+ var Language_JAVA_instance;
849
+ var Language_KOTLIN_instance;
850
+ var Language_CSHARP_instance;
851
+ var Language_JAVASCRIPT_instance;
852
+ var Language_TYPESCRIPT_instance;
853
+ var Language_PYTHON_instance;
854
+ var Language_GO_instance;
855
+ var Language_RUST_instance;
856
+ var Language_UNKNOWN_instance;
857
+ var Language_entriesInitialized;
858
+ function Language_initEntries() {
859
+ if (Language_entriesInitialized)
860
+ return Unit_instance;
861
+ Language_entriesInitialized = true;
862
+ Language_JAVA_instance = new Language('JAVA', 0);
863
+ Language_KOTLIN_instance = new Language('KOTLIN', 1);
864
+ Language_CSHARP_instance = new Language('CSHARP', 2);
865
+ Language_JAVASCRIPT_instance = new Language('JAVASCRIPT', 3);
866
+ Language_TYPESCRIPT_instance = new Language('TYPESCRIPT', 4);
867
+ Language_PYTHON_instance = new Language('PYTHON', 5);
868
+ Language_GO_instance = new Language('GO', 6);
869
+ Language_RUST_instance = new Language('RUST', 7);
870
+ Language_UNKNOWN_instance = new Language('UNKNOWN', 8);
871
+ }
872
+ function Language(name, ordinal) {
873
+ Enum.call(this, name, ordinal);
874
+ }
875
+ function Language_JAVA_getInstance() {
876
+ Language_initEntries();
877
+ return Language_JAVA_instance;
878
+ }
879
+ function Language_KOTLIN_getInstance() {
880
+ Language_initEntries();
881
+ return Language_KOTLIN_instance;
882
+ }
883
+ function Language_CSHARP_getInstance() {
884
+ Language_initEntries();
885
+ return Language_CSHARP_instance;
886
+ }
887
+ function Language_JAVASCRIPT_getInstance() {
888
+ Language_initEntries();
889
+ return Language_JAVASCRIPT_instance;
890
+ }
891
+ function Language_TYPESCRIPT_getInstance() {
892
+ Language_initEntries();
893
+ return Language_TYPESCRIPT_instance;
894
+ }
895
+ function Language_PYTHON_getInstance() {
896
+ Language_initEntries();
897
+ return Language_PYTHON_instance;
898
+ }
899
+ function Language_GO_getInstance() {
900
+ Language_initEntries();
901
+ return Language_GO_instance;
902
+ }
903
+ function Language_RUST_getInstance() {
904
+ Language_initEntries();
905
+ return Language_RUST_instance;
906
+ }
907
+ function Language_UNKNOWN_getInstance() {
908
+ Language_initEntries();
909
+ return Language_UNKNOWN_instance;
910
+ }
911
+ function CodeGraphFactory() {
912
+ }
913
+ protoOf(CodeGraphFactory).v37 = function () {
914
+ return new JsCodeParser();
915
+ };
916
+ var CodeGraphFactory_instance;
917
+ function CodeGraphFactory_getInstance() {
918
+ return CodeGraphFactory_instance;
919
+ }
920
+ function createInitOptions($this, webTreeSitterPath) {
921
+ return {locateFile: function (scriptName, scriptDirectory) {
922
+ if (scriptName.endsWith('.wasm')) {
923
+ return webTreeSitterPath + '/' + scriptName;
924
+ }
925
+ return scriptDirectory + scriptName;
926
+ }};
927
+ }
928
+ function Companion_3() {
929
+ Companion_instance_3 = this;
930
+ this.w37_1 = false;
931
+ this.x37_1 = null;
932
+ var tmp = this;
933
+ // Inline function 'kotlin.collections.mutableMapOf' call
934
+ tmp.y37_1 = LinkedHashMap_init_$Create$();
935
+ this.z37_1 = '';
936
+ }
937
+ protoOf(Companion_3).a38 = function (TreeSitterClass) {
938
+ return new TreeSitterClass();
939
+ };
940
+ var Companion_instance_3;
941
+ function Companion_getInstance_3() {
942
+ if (Companion_instance_3 == null)
943
+ new Companion_3();
944
+ return Companion_instance_3;
945
+ }
946
+ function extractImportsFromNode($this, rootNode, sourceCode, filePath, language) {
947
+ // Inline function 'kotlin.collections.mutableListOf' call
948
+ var imports = ArrayList_init_$Create$();
949
+ extractImportsFromNode$traverse($this, sourceCode, imports, filePath, rootNode);
950
+ return imports;
951
+ }
952
+ function getOrCreateParser($this, language, $completion) {
953
+ var tmp = new $getOrCreateParserCOROUTINE$($this, language, $completion);
954
+ tmp.z9_1 = Unit_instance;
955
+ tmp.aa_1 = null;
956
+ return tmp.fa();
957
+ }
958
+ function getLanguageWasmName($this, language) {
959
+ var tmp;
960
+ switch (language.v2_1) {
961
+ case 0:
962
+ tmp = 'tree-sitter-java.wasm';
963
+ break;
964
+ case 1:
965
+ tmp = 'tree-sitter-kotlin.wasm';
966
+ break;
967
+ case 3:
968
+ tmp = 'tree-sitter-typescript.wasm';
969
+ break;
970
+ case 4:
971
+ tmp = 'tree-sitter-typescript.wasm';
972
+ break;
973
+ case 5:
974
+ tmp = 'tree-sitter-python.wasm';
975
+ break;
976
+ default:
977
+ throw IllegalArgumentException_init_$Create$('Unsupported language: ' + language.toString());
978
+ }
979
+ return tmp;
980
+ }
981
+ function buildNodesFromTreeNode($this, rootNode, sourceCode, filePath, language) {
982
+ // Inline function 'kotlin.collections.mutableListOf' call
983
+ var nodes = ArrayList_init_$Create$();
984
+ var packageName = extractPackageName($this, rootNode, sourceCode);
985
+ processNode$default($this, rootNode, sourceCode, filePath, packageName, language, nodes);
986
+ return nodes;
987
+ }
988
+ function processNode($this, node, sourceCode, filePath, packageName, language, nodes, parentName) {
989
+ var tmp = node.type;
990
+ var nodeType = (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();
991
+ switch (nodeType) {
992
+ case 'class_declaration':
993
+ case 'interface_declaration':
994
+ case 'enum_declaration':
995
+ case 'class_body':
996
+ case 'object_declaration':
997
+ var codeNode = createCodeNode($this, node, sourceCode, filePath, packageName, language, parentName);
998
+ nodes.h(codeNode);
999
+ var tmp_0 = node.childCount;
1000
+ var childCount = (!(tmp_0 == null) ? typeof tmp_0 === 'number' : false) ? tmp_0 : THROW_CCE();
1001
+ var inductionVariable = 0;
1002
+ if (inductionVariable < childCount)
1003
+ do {
1004
+ var i = inductionVariable;
1005
+ inductionVariable = inductionVariable + 1 | 0;
1006
+ var child = node.child(i);
1007
+ if (child != null) {
1008
+ processNode($this, child, sourceCode, filePath, packageName, language, nodes, codeNode.w36_1);
1009
+ }
1010
+ }
1011
+ while (inductionVariable < childCount);
1012
+ break;
1013
+ case 'constructor_declaration':
1014
+ case 'primary_constructor':
1015
+ case 'secondary_constructor':
1016
+ var codeNode_0 = createCodeNode($this, node, sourceCode, filePath, packageName, language, parentName);
1017
+ nodes.h(codeNode_0);
1018
+ break;
1019
+ case 'method_declaration':
1020
+ case 'function_declaration':
1021
+ case 'function':
1022
+ var codeNode_1 = createCodeNode($this, node, sourceCode, filePath, packageName, language, parentName);
1023
+ nodes.h(codeNode_1);
1024
+ break;
1025
+ case 'field_declaration':
1026
+ case 'property_declaration':
1027
+ case 'variable_declaration':
1028
+ var codeNode_2 = createCodeNode($this, node, sourceCode, filePath, packageName, language, parentName);
1029
+ nodes.h(codeNode_2);
1030
+ break;
1031
+ default:
1032
+ var tmp_1 = node.childCount;
1033
+ var childCount_0 = (!(tmp_1 == null) ? typeof tmp_1 === 'number' : false) ? tmp_1 : THROW_CCE();
1034
+ var inductionVariable_0 = 0;
1035
+ if (inductionVariable_0 < childCount_0)
1036
+ do {
1037
+ var i_0 = inductionVariable_0;
1038
+ inductionVariable_0 = inductionVariable_0 + 1 | 0;
1039
+ var child_0 = node.child(i_0);
1040
+ if (child_0 != null) {
1041
+ processNode($this, child_0, sourceCode, filePath, packageName, language, nodes, parentName);
1042
+ }
1043
+ }
1044
+ while (inductionVariable_0 < childCount_0);
1045
+ break;
1046
+ }
1047
+ }
1048
+ function processNode$default($this, node, sourceCode, filePath, packageName, language, nodes, parentName, $super) {
1049
+ parentName = parentName === VOID ? '' : parentName;
1050
+ return processNode($this, node, sourceCode, filePath, packageName, language, nodes, parentName);
1051
+ }
1052
+ function createCodeNode($this, node, sourceCode, filePath, packageName, language, parentName) {
1053
+ var name = extractName($this, node, sourceCode);
1054
+ var tmp = node.type;
1055
+ var type = mapNodeTypeToCodeElementType($this, (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE());
1056
+ var content = extractNodeText($this, node, sourceCode);
1057
+ var tmp_0;
1058
+ // Inline function 'kotlin.text.isNotEmpty' call
1059
+ if (charSequenceLength(parentName) > 0) {
1060
+ tmp_0 = packageName + '.' + parentName + '.' + name;
1061
+ } else {
1062
+ tmp_0 = packageName + '.' + name;
1063
+ }
1064
+ var qualifiedName = tmp_0;
1065
+ var id = getStringHashCode(qualifiedName).toString();
1066
+ var tmp_1 = node.startPosition.row;
1067
+ var tmp_2 = ((!(tmp_1 == null) ? typeof tmp_1 === 'number' : false) ? tmp_1 : THROW_CCE()) + 1 | 0;
1068
+ var tmp_3 = node.endPosition.row;
1069
+ var tmp_4 = ((!(tmp_3 == null) ? typeof tmp_3 === 'number' : false) ? tmp_3 : THROW_CCE()) + 1 | 0;
1070
+ var tmp_5 = node.startPosition.column;
1071
+ var tmp_6 = (!(tmp_5 == null) ? typeof tmp_5 === 'number' : false) ? tmp_5 : THROW_CCE();
1072
+ var tmp_7 = node.endPosition.column;
1073
+ var tmp_8 = (!(tmp_7 == null) ? typeof tmp_7 === 'number' : false) ? tmp_7 : THROW_CCE();
1074
+ var tmp_9 = to('language', language.u2_1);
1075
+ var tmp_10 = node.type;
1076
+ return new CodeNode(id, type, name, packageName, filePath, tmp_2, tmp_4, tmp_6, tmp_8, qualifiedName, content, mapOf([tmp_9, to('nodeType', (!(tmp_10 == null) ? typeof tmp_10 === 'string' : false) ? tmp_10 : THROW_CCE()), to('parent', parentName)]));
1077
+ }
1078
+ function extractPackageName($this, node, sourceCode) {
1079
+ var tmp = node.childCount;
1080
+ var childCount = (!(tmp == null) ? typeof tmp === 'number' : false) ? tmp : THROW_CCE();
1081
+ var inductionVariable = 0;
1082
+ if (inductionVariable < childCount)
1083
+ do {
1084
+ var i = inductionVariable;
1085
+ inductionVariable = inductionVariable + 1 | 0;
1086
+ var child = node.child(i);
1087
+ if (child != null && child.type == 'package_declaration') {
1088
+ // Inline function 'kotlin.text.trim' call
1089
+ var this_0 = removeSuffix(removePrefix(extractNodeText($this, child, sourceCode), 'package'), ';');
1090
+ return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
1091
+ }
1092
+ }
1093
+ while (inductionVariable < childCount);
1094
+ return '';
1095
+ }
1096
+ function extractName($this, node, sourceCode) {
1097
+ var tmp = node.type;
1098
+ var nodeType = (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();
1099
+ switch (nodeType) {
1100
+ case 'constructor_declaration':
1101
+ case 'primary_constructor':
1102
+ case 'secondary_constructor':
1103
+ return '<init>';
1104
+ }
1105
+ var tmp_0 = node.childCount;
1106
+ var childCount = (!(tmp_0 == null) ? typeof tmp_0 === 'number' : false) ? tmp_0 : THROW_CCE();
1107
+ var inductionVariable = 0;
1108
+ if (inductionVariable < childCount)
1109
+ do {
1110
+ var i = inductionVariable;
1111
+ inductionVariable = inductionVariable + 1 | 0;
1112
+ var child = node.child(i);
1113
+ if (child != null && child.type == 'identifier') {
1114
+ return extractNodeText($this, child, sourceCode);
1115
+ }
1116
+ }
1117
+ while (inductionVariable < childCount);
1118
+ return 'unknown';
1119
+ }
1120
+ function extractNodeText($this, node, sourceCode) {
1121
+ var tmp = node.startIndex;
1122
+ var startByte = (!(tmp == null) ? typeof tmp === 'number' : false) ? tmp : THROW_CCE();
1123
+ var tmp_0 = node.endIndex;
1124
+ var endByte = (!(tmp_0 == null) ? typeof tmp_0 === 'number' : false) ? tmp_0 : THROW_CCE();
1125
+ var bytes = encodeToByteArray(sourceCode);
1126
+ if (startByte < 0 || endByte > bytes.length || startByte > endByte) {
1127
+ return '';
1128
+ }
1129
+ return decodeToString(sliceArray(bytes, until(startByte, endByte)));
1130
+ }
1131
+ function mapNodeTypeToCodeElementType($this, nodeType) {
1132
+ switch (nodeType) {
1133
+ case 'class_declaration':
1134
+ case 'class_body':
1135
+ case 'object_declaration':
1136
+ return CodeElementType_CLASS_getInstance();
1137
+ case 'interface_declaration':
1138
+ return CodeElementType_INTERFACE_getInstance();
1139
+ case 'enum_declaration':
1140
+ return CodeElementType_ENUM_getInstance();
1141
+ case 'constructor_declaration':
1142
+ case 'primary_constructor':
1143
+ case 'secondary_constructor':
1144
+ return CodeElementType_CONSTRUCTOR_getInstance();
1145
+ case 'method_declaration':
1146
+ case 'function_declaration':
1147
+ case 'function':
1148
+ return CodeElementType_METHOD_getInstance();
1149
+ case 'field_declaration':
1150
+ return CodeElementType_FIELD_getInstance();
1151
+ case 'property_declaration':
1152
+ return CodeElementType_PROPERTY_getInstance();
1153
+ case 'variable_declaration':
1154
+ return CodeElementType_VARIABLE_getInstance();
1155
+ default:
1156
+ return CodeElementType_UNKNOWN_getInstance();
1157
+ }
1158
+ }
1159
+ function extractImportsFromNode$traverse(this$0, $sourceCode, imports, $filePath, node) {
1160
+ var tmp = node.type;
1161
+ var nodeType = (!(tmp == null) ? typeof tmp === 'string' : false) ? tmp : THROW_CCE();
1162
+ var tmp_0 = node.startPosition.row;
1163
+ var startLine = ((!(tmp_0 == null) ? typeof tmp_0 === 'number' : false) ? tmp_0 : THROW_CCE()) + 1 | 0;
1164
+ var tmp_1 = node.endPosition.row;
1165
+ var endLine = ((!(tmp_1 == null) ? typeof tmp_1 === 'number' : false) ? tmp_1 : THROW_CCE()) + 1 | 0;
1166
+ switch (nodeType) {
1167
+ case 'import_declaration':
1168
+ var rawText = extractNodeText(this$0, node, $sourceCode);
1169
+ // Inline function 'kotlin.text.trim' call
1170
+
1171
+ var this_0 = removeSuffix(removePrefix(rawText, 'import'), ';');
1172
+ var importText = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
1173
+ var isStatic = startsWith(importText, 'static ');
1174
+ var tmp_2;
1175
+ if (isStatic) {
1176
+ // Inline function 'kotlin.text.trim' call
1177
+ var this_1 = removePrefix(importText, 'static ');
1178
+ tmp_2 = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
1179
+ } else {
1180
+ tmp_2 = importText;
1181
+ }
1182
+
1183
+ var cleanImport = tmp_2;
1184
+ var isWildcard = endsWith(cleanImport, '.*');
1185
+ imports.h(new ImportInfo(removeSuffix(cleanImport, '.*'), ImportType_MODULE_getInstance(), null, VOID, isWildcard, isStatic, $filePath, startLine, endLine, rawText));
1186
+ break;
1187
+ case 'import_statement':
1188
+ var rawText_0 = extractNodeText(this$0, node, $sourceCode);
1189
+ var fromMatch = Regex_init_$Create$('from\\s+[\'"]([^\'"]+)[\'"]').ne(rawText_0);
1190
+ if (!(fromMatch == null)) {
1191
+ var importPath = fromMatch.nf().u(1);
1192
+ var isRelative = startsWith(importPath, '.');
1193
+ imports.h(new ImportInfo(importPath, isRelative ? ImportType_RELATIVE_getInstance() : ImportType_MODULE_getInstance(), null, VOID, contains(rawText_0, '* as'), VOID, $filePath, startLine, endLine, rawText_0));
1194
+ }
1195
+
1196
+ break;
1197
+ case 'import_from_statement':
1198
+ var rawText_1 = extractNodeText(this$0, node, $sourceCode);
1199
+ var fromMatch_0 = Regex_init_$Create$('from\\s+([\\w.]+)\\s+import').ne(rawText_1);
1200
+ var tmp2_safe_receiver = fromMatch_0 == null ? null : fromMatch_0.nf();
1201
+ var tmp3_elvis_lhs = tmp2_safe_receiver == null ? null : tmp2_safe_receiver.u(1);
1202
+ var path = tmp3_elvis_lhs == null ? '' : tmp3_elvis_lhs;
1203
+ // Inline function 'kotlin.text.isNotEmpty' call
1204
+
1205
+ if (charSequenceLength(path) > 0) {
1206
+ imports.h(new ImportInfo(path, ImportType_SELECTIVE_getInstance(), null, VOID, contains(rawText_1, '*'), VOID, $filePath, startLine, endLine, rawText_1));
1207
+ }
1208
+
1209
+ break;
1210
+ }
1211
+ var tmp_3 = node.childCount;
1212
+ var childCount = (!(tmp_3 == null) ? typeof tmp_3 === 'number' : false) ? tmp_3 : THROW_CCE();
1213
+ var inductionVariable = 0;
1214
+ if (inductionVariable < childCount)
1215
+ do {
1216
+ var i = inductionVariable;
1217
+ inductionVariable = inductionVariable + 1 | 0;
1218
+ var child = node.child(i);
1219
+ if (child != null) {
1220
+ extractImportsFromNode$traverse(this$0, $sourceCode, imports, $filePath, child);
1221
+ }
1222
+ }
1223
+ while (inductionVariable < childCount);
1224
+ }
1225
+ function $initializeCOROUTINE$(_this__u8e3s4, resultContinuation) {
1226
+ CoroutineImpl.call(this, resultContinuation);
1227
+ this.x38_1 = _this__u8e3s4;
1228
+ }
1229
+ protoOf($initializeCOROUTINE$).fa = function () {
1230
+ var suspendResult = this.z9_1;
1231
+ $sm: do
1232
+ try {
1233
+ var tmp = this.x9_1;
1234
+ switch (tmp) {
1235
+ case 0:
1236
+ this.y9_1 = 2;
1237
+ if (Companion_getInstance_3().w37_1)
1238
+ return Unit_instance;
1239
+ Companion_getInstance_3().x37_1 = require('web-tree-sitter');
1240
+ var tmp_0 = this;
1241
+ var tmp_1 = require.resolve('web-tree-sitter/tree-sitter.wasm');
1242
+ tmp_0.y38_1 = (!(tmp_1 == null) ? typeof tmp_1 === 'string' : false) ? tmp_1 : THROW_CCE();
1243
+ this.z38_1 = NodePath.dirname(this.y38_1);
1244
+ var tmp_2 = this;
1245
+ var tmp_3 = require.resolve('@unit-mesh/treesitter-artifacts/package.json');
1246
+ tmp_2.a39_1 = (!(tmp_3 == null) ? typeof tmp_3 === 'string' : false) ? tmp_3 : THROW_CCE();
1247
+ Companion_getInstance_3().z37_1 = NodePath.join(NodePath.dirname(this.a39_1), 'wasm');
1248
+ this.b39_1 = createInitOptions(Companion_getInstance_3(), this.z38_1);
1249
+ var tmp_4 = this;
1250
+ var tmp_5 = Companion_getInstance_3().x37_1.init(this.b39_1);
1251
+ tmp_4.c39_1 = tmp_5 instanceof Promise ? tmp_5 : THROW_CCE();
1252
+ this.x9_1 = 1;
1253
+ suspendResult = await_0(this.c39_1, this);
1254
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1255
+ return suspendResult;
1256
+ }
1257
+
1258
+ continue $sm;
1259
+ case 1:
1260
+ Companion_getInstance_3().w37_1 = true;
1261
+ return Unit_instance;
1262
+ case 2:
1263
+ throw this.aa_1;
1264
+ }
1265
+ } catch ($p) {
1266
+ var e = $p;
1267
+ if (this.y9_1 === 2) {
1268
+ throw e;
1269
+ } else {
1270
+ this.x9_1 = this.y9_1;
1271
+ this.aa_1 = e;
1272
+ }
1273
+ }
1274
+ while (true);
1275
+ };
1276
+ function $parseNodesCOROUTINE$(_this__u8e3s4, sourceCode, filePath, language, resultContinuation) {
1277
+ CoroutineImpl.call(this, resultContinuation);
1278
+ this.l39_1 = _this__u8e3s4;
1279
+ this.m39_1 = sourceCode;
1280
+ this.n39_1 = filePath;
1281
+ this.o39_1 = language;
1282
+ }
1283
+ protoOf($parseNodesCOROUTINE$).fa = function () {
1284
+ var suspendResult = this.z9_1;
1285
+ $sm: do
1286
+ try {
1287
+ var tmp = this.x9_1;
1288
+ switch (tmp) {
1289
+ case 0:
1290
+ this.y9_1 = 3;
1291
+ this.x9_1 = 1;
1292
+ suspendResult = this.l39_1.p39(this);
1293
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1294
+ return suspendResult;
1295
+ }
1296
+
1297
+ continue $sm;
1298
+ case 1:
1299
+ this.x9_1 = 2;
1300
+ suspendResult = getOrCreateParser(this.l39_1, this.o39_1, this);
1301
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1302
+ return suspendResult;
1303
+ }
1304
+
1305
+ continue $sm;
1306
+ case 2:
1307
+ var parser = suspendResult;
1308
+ var tree = parser.parse(this.m39_1);
1309
+ var rootNode = tree.rootNode;
1310
+ return buildNodesFromTreeNode(this.l39_1, rootNode, this.m39_1, this.n39_1, this.o39_1);
1311
+ case 3:
1312
+ throw this.aa_1;
1313
+ }
1314
+ } catch ($p) {
1315
+ var e = $p;
1316
+ if (this.y9_1 === 3) {
1317
+ throw e;
1318
+ } else {
1319
+ this.x9_1 = this.y9_1;
1320
+ this.aa_1 = e;
1321
+ }
1322
+ }
1323
+ while (true);
1324
+ };
1325
+ function $parseImportsCOROUTINE$(_this__u8e3s4, sourceCode, filePath, language, resultContinuation) {
1326
+ CoroutineImpl.call(this, resultContinuation);
1327
+ this.y39_1 = _this__u8e3s4;
1328
+ this.z39_1 = sourceCode;
1329
+ this.a3a_1 = filePath;
1330
+ this.b3a_1 = language;
1331
+ }
1332
+ protoOf($parseImportsCOROUTINE$).fa = function () {
1333
+ var suspendResult = this.z9_1;
1334
+ $sm: do
1335
+ try {
1336
+ var tmp = this.x9_1;
1337
+ switch (tmp) {
1338
+ case 0:
1339
+ this.y9_1 = 3;
1340
+ this.x9_1 = 1;
1341
+ suspendResult = this.y39_1.p39(this);
1342
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1343
+ return suspendResult;
1344
+ }
1345
+
1346
+ continue $sm;
1347
+ case 1:
1348
+ this.x9_1 = 2;
1349
+ suspendResult = getOrCreateParser(this.y39_1, this.b3a_1, this);
1350
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1351
+ return suspendResult;
1352
+ }
1353
+
1354
+ continue $sm;
1355
+ case 2:
1356
+ var parser = suspendResult;
1357
+ var tree = parser.parse(this.z39_1);
1358
+ var rootNode = tree.rootNode;
1359
+ return extractImportsFromNode(this.y39_1, rootNode, this.z39_1, this.a3a_1, this.b3a_1);
1360
+ case 3:
1361
+ throw this.aa_1;
1362
+ }
1363
+ } catch ($p) {
1364
+ var e = $p;
1365
+ if (this.y9_1 === 3) {
1366
+ throw e;
1367
+ } else {
1368
+ this.x9_1 = this.y9_1;
1369
+ this.aa_1 = e;
1370
+ }
1371
+ }
1372
+ while (true);
1373
+ };
1374
+ function $getOrCreateParserCOROUTINE$(_this__u8e3s4, language, resultContinuation) {
1375
+ CoroutineImpl.call(this, resultContinuation);
1376
+ this.j38_1 = _this__u8e3s4;
1377
+ this.k38_1 = language;
1378
+ }
1379
+ protoOf($getOrCreateParserCOROUTINE$).fa = function () {
1380
+ var suspendResult = this.z9_1;
1381
+ $sm: do
1382
+ try {
1383
+ var tmp = this.x9_1;
1384
+ switch (tmp) {
1385
+ case 0:
1386
+ this.y9_1 = 2;
1387
+ if (Companion_getInstance_3().y37_1.h2(this.k38_1)) {
1388
+ return Companion_getInstance_3().y37_1.j2(this.k38_1);
1389
+ }
1390
+
1391
+ this.l38_1 = Companion_getInstance_3().a38(Companion_getInstance_3().x37_1);
1392
+ this.m38_1 = getLanguageWasmName(this.j38_1, this.k38_1);
1393
+ this.n38_1 = NodePath.join(Companion_getInstance_3().z37_1, this.m38_1);
1394
+ var tmp_0 = this;
1395
+ var tmp_1 = Companion_getInstance_3().x37_1.Language.load(this.n38_1);
1396
+ tmp_0.o38_1 = tmp_1 instanceof Promise ? tmp_1 : THROW_CCE();
1397
+ this.x9_1 = 1;
1398
+ suspendResult = await_0(this.o38_1, this);
1399
+ if (suspendResult === get_COROUTINE_SUSPENDED()) {
1400
+ return suspendResult;
1401
+ }
1402
+
1403
+ continue $sm;
1404
+ case 1:
1405
+ var languageGrammar = suspendResult;
1406
+ this.l38_1.setLanguage(languageGrammar);
1407
+ var tmp0 = Companion_getInstance_3().y37_1;
1408
+ var tmp2 = this.k38_1;
1409
+ var value = this.l38_1;
1410
+ tmp0.r2(tmp2, value);
1411
+ return this.l38_1;
1412
+ case 2:
1413
+ throw this.aa_1;
1414
+ }
1415
+ } catch ($p) {
1416
+ var e = $p;
1417
+ if (this.y9_1 === 2) {
1418
+ throw e;
1419
+ } else {
1420
+ this.x9_1 = this.y9_1;
1421
+ this.aa_1 = e;
1422
+ }
1423
+ }
1424
+ while (true);
1425
+ };
1426
+ function JsCodeParser() {
1427
+ Companion_getInstance_3();
1428
+ }
1429
+ protoOf(JsCodeParser).p39 = function ($completion) {
1430
+ var tmp = new $initializeCOROUTINE$(this, $completion);
1431
+ tmp.z9_1 = Unit_instance;
1432
+ tmp.aa_1 = null;
1433
+ return tmp.fa();
1434
+ };
1435
+ protoOf(JsCodeParser).c3a = function (sourceCode, filePath, language, $completion) {
1436
+ var tmp = new $parseNodesCOROUTINE$(this, sourceCode, filePath, language, $completion);
1437
+ tmp.z9_1 = Unit_instance;
1438
+ tmp.aa_1 = null;
1439
+ return tmp.fa();
1440
+ };
1441
+ protoOf(JsCodeParser).d3a = function (sourceCode, filePath, language, $completion) {
1442
+ var tmp = new $parseImportsCOROUTINE$(this, sourceCode, filePath, language, $completion);
1443
+ tmp.z9_1 = Unit_instance;
1444
+ tmp.aa_1 = null;
1445
+ return tmp.fa();
1446
+ };
1447
+ //region block: post-declaration
1448
+ protoOf($serializer).e17 = typeParametersSerializers;
1449
+ protoOf($serializer_0).e17 = typeParametersSerializers;
1450
+ //endregion
1451
+ //region block: init
1452
+ CodeGraphFactory_instance = new CodeGraphFactory();
1453
+ //endregion
1454
+ //region block: exports
1455
+ _.$_$ = _.$_$ || {};
1456
+ _.$_$.a = JsCodeParser;
1457
+ _.$_$.b = Language_CSHARP_getInstance;
1458
+ _.$_$.c = Language_GO_getInstance;
1459
+ _.$_$.d = Language_JAVASCRIPT_getInstance;
1460
+ _.$_$.e = Language_JAVA_getInstance;
1461
+ _.$_$.f = Language_KOTLIN_getInstance;
1462
+ _.$_$.g = Language_PYTHON_getInstance;
1463
+ _.$_$.h = Language_RUST_getInstance;
1464
+ _.$_$.i = Language_TYPESCRIPT_getInstance;
1465
+ _.$_$.j = Language_UNKNOWN_getInstance;
1466
+ _.$_$.k = CodeGraphFactory_instance;
1467
+ //endregion
1468
+ return _;
1469
+ }));
1470
+
1471
+ //# sourceMappingURL=Xiuper-mpp-codegraph.js.map