@zenwave360/workspace-mcp 1.0.0-next.0
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.
- package/LICENSE +21 -0
- package/README.md +449 -0
- package/kotlin/antlr-kotlin-antlr-kotlin-runtime.js +9497 -0
- package/kotlin/antlr-kotlin-antlr-kotlin-runtime.js.map +1 -0
- package/kotlin/dsl-kotlin.js +17039 -0
- package/kotlin/dsl-kotlin.js.map +1 -0
- package/kotlin/json-schema-ref-parser-kmp.js +2263 -0
- package/kotlin/json-schema-ref-parser-kmp.js.map +1 -0
- package/kotlin/kotlin-js-core.js +15 -0
- package/kotlin/kotlin-js-core.js.map +1 -0
- package/kotlin/kotlin-js.js +15 -0
- package/kotlin/kotlin-js.js.map +1 -0
- package/kotlin/kotlin-kotlin-stdlib.js +10565 -0
- package/kotlin/kotlin-kotlin-stdlib.js.map +1 -0
- package/kotlin/kotlin-node.js +15 -0
- package/kotlin/kotlin-node.js.map +1 -0
- package/kotlin/kotlin-plugins-js-plain-objects-runtime.js +15 -0
- package/kotlin/kotlin-plugins-js-plain-objects-runtime.js.map +1 -0
- package/kotlin/kotlin-web.js +15 -0
- package/kotlin/kotlin-web.js.map +1 -0
- package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
- package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
- package/kotlin/kotlinx-atomicfu.js +174 -0
- package/kotlin/kotlinx-atomicfu.js.map +1 -0
- package/kotlin/kotlinx-coroutines-core.js +3577 -0
- package/kotlin/kotlinx-coroutines-core.js.map +1 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +15 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +15 -0
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
- package/kotlin/okio-parent-okio.js +2510 -0
- package/kotlin/okio-parent-okio.js.map +1 -0
- package/kotlin/seskar-core.js +15 -0
- package/kotlin/seskar-core.js.map +1 -0
- package/kotlin/seskar-react.js +15 -0
- package/kotlin/seskar-react.js.map +1 -0
- package/kotlin/snakeyaml-engine-kmp.js +5842 -0
- package/kotlin/snakeyaml-engine-kmp.js.map +1 -0
- package/kotlin/urlencoder-urlencoder-lib.js +322 -0
- package/kotlin/urlencoder-urlencoder-lib.js.map +1 -0
- package/kotlin/zenwave-manifest-manifest-core.js +15 -0
- package/kotlin/zenwave-manifest-manifest-core.js.map +1 -0
- package/kotlin/zenwave-manifest-manifest-graph.js +15 -0
- package/kotlin/zenwave-manifest-manifest-graph.js.map +1 -0
- package/kotlin/zenwave-manifest-workspace-mcp.js +26 -0
- package/kotlin/zenwave-manifest-workspace-mcp.js.map +1 -0
- package/kotlin/zenwave-manifest-workspace-runtime.js +15 -0
- package/kotlin/zenwave-manifest-workspace-runtime.js.map +1 -0
- package/package.json +24 -0
|
@@ -0,0 +1,2263 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', 'node:fs', './kotlin-kotlin-stdlib.js', './snakeyaml-engine-kmp.js', './kotlinx-coroutines-core.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('node:fs'), require('./kotlin-kotlin-stdlib.js'), require('./snakeyaml-engine-kmp.js'), require('./kotlinx-coroutines-core.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof io_zenwave360_jsonrefparser_io_NodeFsModule_d06zrq === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'json-schema-ref-parser-kmp'. Its dependency 'node:fs' was not found. Please, check whether 'node:fs' is loaded prior to 'json-schema-ref-parser-kmp'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'json-schema-ref-parser-kmp'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'json-schema-ref-parser-kmp'.");
|
|
12
|
+
}
|
|
13
|
+
if (typeof globalThis['snakeyaml-engine-kmp'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'json-schema-ref-parser-kmp'. Its dependency 'snakeyaml-engine-kmp' was not found. Please, check whether 'snakeyaml-engine-kmp' is loaded prior to 'json-schema-ref-parser-kmp'.");
|
|
15
|
+
}
|
|
16
|
+
if (typeof globalThis['kotlinx-coroutines-core'] === 'undefined') {
|
|
17
|
+
throw new Error("Error loading module 'json-schema-ref-parser-kmp'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'json-schema-ref-parser-kmp'.");
|
|
18
|
+
}
|
|
19
|
+
globalThis['json-schema-ref-parser-kmp'] = factory(typeof globalThis['json-schema-ref-parser-kmp'] === 'undefined' ? {} : globalThis['json-schema-ref-parser-kmp'], io_zenwave360_jsonrefparser_io_NodeFsModule_d06zrq, globalThis['kotlin-kotlin-stdlib'], globalThis['snakeyaml-engine-kmp'], globalThis['kotlinx-coroutines-core']);
|
|
20
|
+
}
|
|
21
|
+
}(function (_, io_zenwave360_jsonrefparser_io_NodeFsModule_d06zrq, kotlin_kotlin, kotlin_it_krzeminski_snakeyaml_engine_kmp, kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core) {
|
|
22
|
+
'use strict';
|
|
23
|
+
//region block: imports
|
|
24
|
+
var imul = Math.imul;
|
|
25
|
+
var emptyList = kotlin_kotlin.$_$.i3;
|
|
26
|
+
var charSequenceLength = kotlin_kotlin.$_$.i6;
|
|
27
|
+
var startsWith = kotlin_kotlin.$_$.l8;
|
|
28
|
+
var toString = kotlin_kotlin.$_$.e7;
|
|
29
|
+
var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.x;
|
|
30
|
+
var Unit_instance = kotlin_kotlin.$_$.c2;
|
|
31
|
+
var drop = kotlin_kotlin.$_$.t7;
|
|
32
|
+
var split = kotlin_kotlin.$_$.k8;
|
|
33
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.v2;
|
|
34
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.d;
|
|
35
|
+
var replace = kotlin_kotlin.$_$.i8;
|
|
36
|
+
var protoOf = kotlin_kotlin.$_$.c7;
|
|
37
|
+
var initMetadataForCompanion = kotlin_kotlin.$_$.q6;
|
|
38
|
+
var plus = kotlin_kotlin.$_$.j4;
|
|
39
|
+
var toIntOrNull = kotlin_kotlin.$_$.w8;
|
|
40
|
+
var getOrNull = kotlin_kotlin.$_$.r3;
|
|
41
|
+
var KtList = kotlin_kotlin.$_$.h2;
|
|
42
|
+
var isInterface = kotlin_kotlin.$_$.y6;
|
|
43
|
+
var THROW_CCE = kotlin_kotlin.$_$.t9;
|
|
44
|
+
var KtMap = kotlin_kotlin.$_$.i2;
|
|
45
|
+
var joinToString = kotlin_kotlin.$_$.u3;
|
|
46
|
+
var hashCode = kotlin_kotlin.$_$.o6;
|
|
47
|
+
var equals = kotlin_kotlin.$_$.l6;
|
|
48
|
+
var initMetadataForClass = kotlin_kotlin.$_$.p6;
|
|
49
|
+
var listOf = kotlin_kotlin.$_$.z3;
|
|
50
|
+
var plus_0 = kotlin_kotlin.$_$.i4;
|
|
51
|
+
var VOID = kotlin_kotlin.$_$.a;
|
|
52
|
+
var removePrefix = kotlin_kotlin.$_$.e8;
|
|
53
|
+
var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.q1;
|
|
54
|
+
var indexOf = kotlin_kotlin.$_$.y7;
|
|
55
|
+
var replace_0 = kotlin_kotlin.$_$.j8;
|
|
56
|
+
var CoroutineImpl = kotlin_kotlin.$_$.k5;
|
|
57
|
+
var IllegalStateException_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
58
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.v4;
|
|
59
|
+
var toMutableMap = kotlin_kotlin.$_$.s4;
|
|
60
|
+
var to = kotlin_kotlin.$_$.da;
|
|
61
|
+
var mutableMapOf = kotlin_kotlin.$_$.g4;
|
|
62
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.r6;
|
|
63
|
+
var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.k;
|
|
64
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.e;
|
|
65
|
+
var Enum = kotlin_kotlin.$_$.k9;
|
|
66
|
+
var emptyMap = kotlin_kotlin.$_$.j3;
|
|
67
|
+
var toString_0 = kotlin_kotlin.$_$.ca;
|
|
68
|
+
var getBooleanHashCode = kotlin_kotlin.$_$.m6;
|
|
69
|
+
var getStringHashCode = kotlin_kotlin.$_$.n6;
|
|
70
|
+
var RuntimeException = kotlin_kotlin.$_$.s9;
|
|
71
|
+
var RuntimeException_init_$Init$ = kotlin_kotlin.$_$.k1;
|
|
72
|
+
var captureStack = kotlin_kotlin.$_$.d6;
|
|
73
|
+
var RuntimeException_init_$Init$_0 = kotlin_kotlin.$_$.m1;
|
|
74
|
+
var Compose = kotlin_it_krzeminski_snakeyaml_engine_kmp.$_$.a;
|
|
75
|
+
var KtMutableMap = kotlin_kotlin.$_$.m2;
|
|
76
|
+
var ScalarNode = kotlin_it_krzeminski_snakeyaml_engine_kmp.$_$.d;
|
|
77
|
+
var checkIndexOverflow = kotlin_kotlin.$_$.u2;
|
|
78
|
+
var toMutableList = kotlin_kotlin.$_$.r4;
|
|
79
|
+
var SequenceNode = kotlin_it_krzeminski_snakeyaml_engine_kmp.$_$.e;
|
|
80
|
+
var MappingNode = kotlin_it_krzeminski_snakeyaml_engine_kmp.$_$.c;
|
|
81
|
+
var toLongOrNull = kotlin_kotlin.$_$.z8;
|
|
82
|
+
var toDoubleOrNull = kotlin_kotlin.$_$.u8;
|
|
83
|
+
var LoadSettings = kotlin_it_krzeminski_snakeyaml_engine_kmp.$_$.b;
|
|
84
|
+
var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.m;
|
|
85
|
+
var KtMutableList = kotlin_kotlin.$_$.k2;
|
|
86
|
+
var toList = kotlin_kotlin.$_$.p4;
|
|
87
|
+
var Collection = kotlin_kotlin.$_$.g2;
|
|
88
|
+
var get_lastIndex = kotlin_kotlin.$_$.w3;
|
|
89
|
+
var noWhenBranchMatchedException = kotlin_kotlin.$_$.y9;
|
|
90
|
+
var get_indices = kotlin_kotlin.$_$.s3;
|
|
91
|
+
var Exception = kotlin_kotlin.$_$.m9;
|
|
92
|
+
var contains = kotlin_kotlin.$_$.o7;
|
|
93
|
+
var indexOf_0 = kotlin_kotlin.$_$.x7;
|
|
94
|
+
var substring = kotlin_kotlin.$_$.p8;
|
|
95
|
+
var substring_0 = kotlin_kotlin.$_$.o8;
|
|
96
|
+
var substringBeforeLast = kotlin_kotlin.$_$.m8;
|
|
97
|
+
var mapOf = kotlin_kotlin.$_$.c4;
|
|
98
|
+
var GlobalScope_instance = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.b;
|
|
99
|
+
var promise = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.d;
|
|
100
|
+
var CoroutineScope = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.c;
|
|
101
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.t6;
|
|
102
|
+
var listOf_0 = kotlin_kotlin.$_$.a4;
|
|
103
|
+
var await_0 = kotlin_org_jetbrains_kotlinx_kotlinx_coroutines_core.$_$.a;
|
|
104
|
+
var RuntimeException_init_$Create$ = kotlin_kotlin.$_$.l1;
|
|
105
|
+
var substringBefore = kotlin_kotlin.$_$.n8;
|
|
106
|
+
var Regex_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
107
|
+
//endregion
|
|
108
|
+
//region block: pre-declaration
|
|
109
|
+
initMetadataForCompanion(Companion);
|
|
110
|
+
initMetadataForClass(JsonPointer, 'JsonPointer');
|
|
111
|
+
initMetadataForCompanion(Companion_0);
|
|
112
|
+
initMetadataForCoroutine($parseCOROUTINE$, CoroutineImpl);
|
|
113
|
+
initMetadataForCoroutine($dereferenceCOROUTINE$, CoroutineImpl);
|
|
114
|
+
initMetadataForClass(RefParser, 'RefParser', VOID, VOID, VOID, [0]);
|
|
115
|
+
initMetadataForClass(InMemoryLoader, 'InMemoryLoader', VOID, VOID, VOID, [1]);
|
|
116
|
+
initMetadataForClass(AuthenticationType, 'AuthenticationType', VOID, Enum);
|
|
117
|
+
initMetadataForClass(ParsedDocument, 'ParsedDocument');
|
|
118
|
+
initMetadataForClass(ResolvedRef, 'ResolvedRef');
|
|
119
|
+
initMetadataForClass(OriginalAllOf, 'OriginalAllOf');
|
|
120
|
+
initMetadataForClass(RefParserOptions, 'RefParserOptions', RefParserOptions);
|
|
121
|
+
initMetadataForClass(OnCircular, 'OnCircular', VOID, Enum);
|
|
122
|
+
initMetadataForClass(OnMissing, 'OnMissing', VOID, Enum);
|
|
123
|
+
initMetadataForClass(CircularReferenceException, 'CircularReferenceException', VOID, RuntimeException);
|
|
124
|
+
initMetadataForClass(MissingRefException, 'MissingRefException', VOID, RuntimeException);
|
|
125
|
+
initMetadataForClass(SourceLocation, 'SourceLocation');
|
|
126
|
+
initMetadataForClass(RawDocument, 'RawDocument');
|
|
127
|
+
initMetadataForClass(ResolvingContext, 'ResolvingContext');
|
|
128
|
+
initMetadataForClass(IdentityStack, 'IdentityStack', IdentityStack);
|
|
129
|
+
initMetadataForClass(AllOfAccumulator, 'AllOfAccumulator', AllOfAccumulator);
|
|
130
|
+
initMetadataForCoroutine($resolveDocumentCOROUTINE$, CoroutineImpl);
|
|
131
|
+
initMetadataForCoroutine($resolveValueCOROUTINE$, CoroutineImpl);
|
|
132
|
+
initMetadataForCoroutine($resolveRefCOROUTINE$, CoroutineImpl);
|
|
133
|
+
initMetadataForCoroutine($loadFileCOROUTINE$, CoroutineImpl);
|
|
134
|
+
initMetadataForCompanion(Companion_1);
|
|
135
|
+
initMetadataForClass(SchemaRef, 'SchemaRef');
|
|
136
|
+
initMetadataForClass(SchemaRefFormat, 'SchemaRefFormat', VOID, Enum);
|
|
137
|
+
initMetadataForLambda(dereferenceSchema$slambda, CoroutineImpl, VOID, [1]);
|
|
138
|
+
initMetadataForLambda(dereferenceSchemaText$slambda, CoroutineImpl, VOID, [1]);
|
|
139
|
+
initMetadataForCoroutine($loadCOROUTINE$, CoroutineImpl);
|
|
140
|
+
initMetadataForClass(FetchLoader, 'FetchLoader', FetchLoader, VOID, VOID, [1]);
|
|
141
|
+
initMetadataForClass(NodeFsLoader, 'NodeFsLoader', NodeFsLoader, VOID, VOID, [1]);
|
|
142
|
+
//endregion
|
|
143
|
+
function Companion() {
|
|
144
|
+
Companion_instance = this;
|
|
145
|
+
this.j53_1 = new JsonPointer(emptyList());
|
|
146
|
+
}
|
|
147
|
+
protoOf(Companion).x46 = function (pointer) {
|
|
148
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
149
|
+
if (charSequenceLength(pointer) === 0)
|
|
150
|
+
return this.j53_1;
|
|
151
|
+
// Inline function 'kotlin.require' call
|
|
152
|
+
if (!startsWith(pointer, '/')) {
|
|
153
|
+
var message = 'JSON Pointer must start with /: ' + pointer;
|
|
154
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
155
|
+
}
|
|
156
|
+
// Inline function 'kotlin.collections.map' call
|
|
157
|
+
var this_0 = split(drop(pointer, 1), ['/']);
|
|
158
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
159
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
160
|
+
var _iterator__ex2g4s = this_0.i();
|
|
161
|
+
while (_iterator__ex2g4s.j()) {
|
|
162
|
+
var item = _iterator__ex2g4s.k();
|
|
163
|
+
var tmp$ret$3 = replace(replace(item, '~1', '/'), '~0', '~');
|
|
164
|
+
destination.h(tmp$ret$3);
|
|
165
|
+
}
|
|
166
|
+
return new JsonPointer(destination);
|
|
167
|
+
};
|
|
168
|
+
protoOf(Companion).k53 = function (fragment) {
|
|
169
|
+
var tmp;
|
|
170
|
+
var tmp_0;
|
|
171
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
172
|
+
if (charSequenceLength(fragment) === 0) {
|
|
173
|
+
tmp_0 = true;
|
|
174
|
+
} else {
|
|
175
|
+
tmp_0 = fragment === '#';
|
|
176
|
+
}
|
|
177
|
+
if (tmp_0) {
|
|
178
|
+
tmp = true;
|
|
179
|
+
} else {
|
|
180
|
+
tmp = fragment === '#/';
|
|
181
|
+
}
|
|
182
|
+
if (tmp)
|
|
183
|
+
return this.j53_1;
|
|
184
|
+
var pointer = startsWith(fragment, '#') ? drop(fragment, 1) : fragment;
|
|
185
|
+
return this.x46(pointer);
|
|
186
|
+
};
|
|
187
|
+
var Companion_instance;
|
|
188
|
+
function Companion_getInstance() {
|
|
189
|
+
if (Companion_instance == null)
|
|
190
|
+
new Companion();
|
|
191
|
+
return Companion_instance;
|
|
192
|
+
}
|
|
193
|
+
function JsonPointer(tokens) {
|
|
194
|
+
Companion_getInstance();
|
|
195
|
+
this.l53_1 = tokens;
|
|
196
|
+
}
|
|
197
|
+
protoOf(JsonPointer).m53 = function (key) {
|
|
198
|
+
return new JsonPointer(plus(this.l53_1, replace(replace(key, '~', '~0'), '/', '~1')));
|
|
199
|
+
};
|
|
200
|
+
protoOf(JsonPointer).n53 = function (index) {
|
|
201
|
+
return new JsonPointer(plus(this.l53_1, index.toString()));
|
|
202
|
+
};
|
|
203
|
+
protoOf(JsonPointer).o53 = function (document) {
|
|
204
|
+
var current = document;
|
|
205
|
+
var _iterator__ex2g4s = this.l53_1.i();
|
|
206
|
+
while (_iterator__ex2g4s.j()) {
|
|
207
|
+
var token = _iterator__ex2g4s.k();
|
|
208
|
+
var tmp0_subject = current;
|
|
209
|
+
var tmp;
|
|
210
|
+
if (!(tmp0_subject == null) ? isInterface(tmp0_subject, KtMap) : false) {
|
|
211
|
+
// Inline function 'kotlin.collections.get' call
|
|
212
|
+
var this_0 = current;
|
|
213
|
+
tmp = (isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).r1(token);
|
|
214
|
+
} else {
|
|
215
|
+
if (!(tmp0_subject == null) ? isInterface(tmp0_subject, KtList) : false) {
|
|
216
|
+
var tmp_0 = current;
|
|
217
|
+
var tmp1_elvis_lhs = toIntOrNull(token);
|
|
218
|
+
var tmp_1;
|
|
219
|
+
if (tmp1_elvis_lhs == null) {
|
|
220
|
+
return null;
|
|
221
|
+
} else {
|
|
222
|
+
tmp_1 = tmp1_elvis_lhs;
|
|
223
|
+
}
|
|
224
|
+
tmp = getOrNull(tmp_0, tmp_1);
|
|
225
|
+
} else {
|
|
226
|
+
return null;
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
current = tmp;
|
|
230
|
+
}
|
|
231
|
+
return current;
|
|
232
|
+
};
|
|
233
|
+
protoOf(JsonPointer).toString = function () {
|
|
234
|
+
return this.l53_1.l() ? '' : '/' + joinToString(this.l53_1, '/');
|
|
235
|
+
};
|
|
236
|
+
protoOf(JsonPointer).hashCode = function () {
|
|
237
|
+
return hashCode(this.l53_1);
|
|
238
|
+
};
|
|
239
|
+
protoOf(JsonPointer).equals = function (other) {
|
|
240
|
+
if (this === other)
|
|
241
|
+
return true;
|
|
242
|
+
if (!(other instanceof JsonPointer))
|
|
243
|
+
return false;
|
|
244
|
+
if (!equals(this.l53_1, other.l53_1))
|
|
245
|
+
return false;
|
|
246
|
+
return true;
|
|
247
|
+
};
|
|
248
|
+
function Companion_0() {
|
|
249
|
+
}
|
|
250
|
+
protoOf(Companion_0).p53 = function (text, baseUri, options, auth, loaders) {
|
|
251
|
+
var memLoader = new InMemoryLoader(baseUri, text);
|
|
252
|
+
var resolvedLoaders = loaders == null ? defaultLoaders(auth) : loaders;
|
|
253
|
+
return new RefParser(baseUri, options, auth, plus_0(listOf(memLoader), resolvedLoaders));
|
|
254
|
+
};
|
|
255
|
+
protoOf(Companion_0).q53 = function (text, baseUri, options, auth, loaders, $super) {
|
|
256
|
+
baseUri = baseUri === VOID ? 'memory://anonymous' : baseUri;
|
|
257
|
+
options = options === VOID ? new RefParserOptions() : options;
|
|
258
|
+
auth = auth === VOID ? emptyList() : auth;
|
|
259
|
+
loaders = loaders === VOID ? null : loaders;
|
|
260
|
+
return $super === VOID ? this.p53(text, baseUri, options, auth, loaders) : $super.p53.call(this, text, baseUri, options, auth, loaders);
|
|
261
|
+
};
|
|
262
|
+
protoOf(Companion_0).r53 = function (rawUri) {
|
|
263
|
+
if (startsWith(rawUri, 'classpath:') && !startsWith(rawUri, 'classpath:/')) {
|
|
264
|
+
return 'classpath:/' + removePrefix(rawUri, 'classpath:');
|
|
265
|
+
}
|
|
266
|
+
var colonIdx = indexOf(rawUri, _Char___init__impl__6a9atx(58));
|
|
267
|
+
if (colonIdx < 0) {
|
|
268
|
+
var normalized = replace_0(rawUri, _Char___init__impl__6a9atx(92), _Char___init__impl__6a9atx(47));
|
|
269
|
+
return startsWith(normalized, '/') ? 'file://' + normalized : 'file:///' + normalized;
|
|
270
|
+
}
|
|
271
|
+
if (colonIdx === 1) {
|
|
272
|
+
var normalized_0 = replace_0(rawUri, _Char___init__impl__6a9atx(92), _Char___init__impl__6a9atx(47));
|
|
273
|
+
return 'file:///' + normalized_0;
|
|
274
|
+
}
|
|
275
|
+
return rawUri;
|
|
276
|
+
};
|
|
277
|
+
var Companion_instance_0;
|
|
278
|
+
function Companion_getInstance_0() {
|
|
279
|
+
return Companion_instance_0;
|
|
280
|
+
}
|
|
281
|
+
function $parseCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
282
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
283
|
+
this.a54_1 = _this__u8e3s4;
|
|
284
|
+
}
|
|
285
|
+
protoOf($parseCOROUTINE$).h8 = function () {
|
|
286
|
+
var suspendResult = this.b8_1;
|
|
287
|
+
$sm: do
|
|
288
|
+
try {
|
|
289
|
+
var tmp = this.z7_1;
|
|
290
|
+
switch (tmp) {
|
|
291
|
+
case 0:
|
|
292
|
+
this.a8_1 = 2;
|
|
293
|
+
var tmp0 = this.a54_1.e54_1;
|
|
294
|
+
var tmp$ret$0;
|
|
295
|
+
l$ret$1: do {
|
|
296
|
+
var _iterator__ex2g4s = tmp0.i();
|
|
297
|
+
while (_iterator__ex2g4s.j()) {
|
|
298
|
+
var element = _iterator__ex2g4s.k();
|
|
299
|
+
if (element.n54(this.a54_1.f54_1)) {
|
|
300
|
+
tmp$ret$0 = element;
|
|
301
|
+
break l$ret$1;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
tmp$ret$0 = null;
|
|
305
|
+
}
|
|
306
|
+
while (false);
|
|
307
|
+
var tmp0_elvis_lhs = tmp$ret$0;
|
|
308
|
+
var tmp_0;
|
|
309
|
+
if (tmp0_elvis_lhs == null) {
|
|
310
|
+
throw IllegalStateException_init_$Create$('No loader available for URI: ' + this.a54_1.f54_1);
|
|
311
|
+
} else {
|
|
312
|
+
tmp_0 = tmp0_elvis_lhs;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
var loader = tmp_0;
|
|
316
|
+
this.z7_1 = 1;
|
|
317
|
+
suspendResult = loader.o54(this.a54_1.f54_1, this);
|
|
318
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
319
|
+
return suspendResult;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
continue $sm;
|
|
323
|
+
case 1:
|
|
324
|
+
var text = suspendResult;
|
|
325
|
+
var raw = parseText(text, this.a54_1.f54_1);
|
|
326
|
+
this.a54_1.g54_1 = raw.r54_1;
|
|
327
|
+
this.a54_1.h54_1 = raw.s54_1;
|
|
328
|
+
this.a54_1.i54_1 = mutableMapOf([to(raw.p54_1, toMutableMap(raw.s54_1))]);
|
|
329
|
+
this.a54_1.m54_1 = raw.q54_1;
|
|
330
|
+
return this.a54_1;
|
|
331
|
+
case 2:
|
|
332
|
+
throw this.c8_1;
|
|
333
|
+
}
|
|
334
|
+
} catch ($p) {
|
|
335
|
+
var e = $p;
|
|
336
|
+
if (this.a8_1 === 2) {
|
|
337
|
+
throw e;
|
|
338
|
+
} else {
|
|
339
|
+
this.z7_1 = this.a8_1;
|
|
340
|
+
this.c8_1 = e;
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
while (true);
|
|
344
|
+
};
|
|
345
|
+
function $dereferenceCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
346
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
347
|
+
this.b55_1 = _this__u8e3s4;
|
|
348
|
+
}
|
|
349
|
+
protoOf($dereferenceCOROUTINE$).h8 = function () {
|
|
350
|
+
var suspendResult = this.b8_1;
|
|
351
|
+
$sm: do
|
|
352
|
+
try {
|
|
353
|
+
var tmp = this.z7_1;
|
|
354
|
+
switch (tmp) {
|
|
355
|
+
case 0:
|
|
356
|
+
this.a8_1 = 4;
|
|
357
|
+
if (this.b55_1.g54_1.l() && this.b55_1.h54_1.l()) {
|
|
358
|
+
this.z7_1 = 1;
|
|
359
|
+
suspendResult = this.b55_1.d55(this);
|
|
360
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
361
|
+
return suspendResult;
|
|
362
|
+
}
|
|
363
|
+
continue $sm;
|
|
364
|
+
} else {
|
|
365
|
+
this.z7_1 = 2;
|
|
366
|
+
continue $sm;
|
|
367
|
+
}
|
|
368
|
+
|
|
369
|
+
case 1:
|
|
370
|
+
this.z7_1 = 2;
|
|
371
|
+
continue $sm;
|
|
372
|
+
case 2:
|
|
373
|
+
this.c55_1 = new ResolvingContext(this.b55_1.c54_1, this.b55_1.e54_1, this.b55_1.d54_1, this.b55_1.h54_1);
|
|
374
|
+
var raw = new RawDocument(this.b55_1.f54_1, this.b55_1.g54_1, this.b55_1.g54_1, this.b55_1.h54_1);
|
|
375
|
+
this.z7_1 = 3;
|
|
376
|
+
suspendResult = resolveDocument(raw, this.c55_1, this);
|
|
377
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
378
|
+
return suspendResult;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
continue $sm;
|
|
382
|
+
case 3:
|
|
383
|
+
var ARGUMENT = suspendResult;
|
|
384
|
+
this.b55_1.g54_1 = ARGUMENT;
|
|
385
|
+
this.b55_1.j54_1 = this.c55_1.n55_1;
|
|
386
|
+
this.b55_1.i54_1 = this.c55_1.p55_1;
|
|
387
|
+
this.b55_1.l54_1 = this.c55_1.m55_1;
|
|
388
|
+
return this.b55_1;
|
|
389
|
+
case 4:
|
|
390
|
+
throw this.c8_1;
|
|
391
|
+
}
|
|
392
|
+
} catch ($p) {
|
|
393
|
+
var e = $p;
|
|
394
|
+
if (this.a8_1 === 4) {
|
|
395
|
+
throw e;
|
|
396
|
+
} else {
|
|
397
|
+
this.z7_1 = this.a8_1;
|
|
398
|
+
this.c8_1 = e;
|
|
399
|
+
}
|
|
400
|
+
}
|
|
401
|
+
while (true);
|
|
402
|
+
};
|
|
403
|
+
function RefParser(uri, options, auth, loaders) {
|
|
404
|
+
options = options === VOID ? new RefParserOptions() : options;
|
|
405
|
+
auth = auth === VOID ? emptyList() : auth;
|
|
406
|
+
loaders = loaders === VOID ? defaultLoaders() : loaders;
|
|
407
|
+
this.b54_1 = uri;
|
|
408
|
+
this.c54_1 = options;
|
|
409
|
+
this.d54_1 = auth;
|
|
410
|
+
this.e54_1 = loaders;
|
|
411
|
+
this.f54_1 = Companion_instance_0.r53(this.b54_1);
|
|
412
|
+
var tmp = this;
|
|
413
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
414
|
+
tmp.g54_1 = LinkedHashMap_init_$Create$();
|
|
415
|
+
var tmp_0 = this;
|
|
416
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
417
|
+
tmp_0.h54_1 = LinkedHashMap_init_$Create$();
|
|
418
|
+
var tmp_1 = this;
|
|
419
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
420
|
+
tmp_1.i54_1 = LinkedHashMap_init_$Create$();
|
|
421
|
+
this.j54_1 = emptyList();
|
|
422
|
+
var tmp_2 = this;
|
|
423
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
424
|
+
tmp_2.k54_1 = ArrayList_init_$Create$_0();
|
|
425
|
+
this.l54_1 = false;
|
|
426
|
+
this.m54_1 = null;
|
|
427
|
+
}
|
|
428
|
+
protoOf(RefParser).d55 = function ($completion) {
|
|
429
|
+
var tmp = new $parseCOROUTINE$(this, $completion);
|
|
430
|
+
tmp.b8_1 = Unit_instance;
|
|
431
|
+
tmp.c8_1 = null;
|
|
432
|
+
return tmp.h8();
|
|
433
|
+
};
|
|
434
|
+
protoOf(RefParser).q55 = function ($completion) {
|
|
435
|
+
var tmp = new $dereferenceCOROUTINE$(this, $completion);
|
|
436
|
+
tmp.b8_1 = Unit_instance;
|
|
437
|
+
tmp.c8_1 = null;
|
|
438
|
+
return tmp.h8();
|
|
439
|
+
};
|
|
440
|
+
protoOf(RefParser).r55 = function ($completion) {
|
|
441
|
+
var tmp = this;
|
|
442
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
443
|
+
tmp.k54_1 = ArrayList_init_$Create$_0();
|
|
444
|
+
mergeAllOf(this.g54_1, VOID, this.k54_1);
|
|
445
|
+
return this;
|
|
446
|
+
};
|
|
447
|
+
protoOf(RefParser).s55 = function () {
|
|
448
|
+
var tmp0_elvis_lhs = this.m54_1;
|
|
449
|
+
return new ParsedDocument(tmp0_elvis_lhs == null ? this.g54_1 : tmp0_elvis_lhs, this.g54_1, this.h54_1, this.i54_1, this.j54_1, this.k54_1, this.l54_1);
|
|
450
|
+
};
|
|
451
|
+
function InMemoryLoader(uri, content) {
|
|
452
|
+
this.t55_1 = uri;
|
|
453
|
+
this.u55_1 = content;
|
|
454
|
+
}
|
|
455
|
+
protoOf(InMemoryLoader).n54 = function (uri) {
|
|
456
|
+
return uri === this.t55_1;
|
|
457
|
+
};
|
|
458
|
+
protoOf(InMemoryLoader).o54 = function (uri, $completion) {
|
|
459
|
+
return this.u55_1;
|
|
460
|
+
};
|
|
461
|
+
var AuthenticationType_QUERY_instance;
|
|
462
|
+
var AuthenticationType_HEADER_instance;
|
|
463
|
+
var AuthenticationType_entriesInitialized;
|
|
464
|
+
function AuthenticationType_initEntries() {
|
|
465
|
+
if (AuthenticationType_entriesInitialized)
|
|
466
|
+
return Unit_instance;
|
|
467
|
+
AuthenticationType_entriesInitialized = true;
|
|
468
|
+
AuthenticationType_QUERY_instance = new AuthenticationType('QUERY', 0);
|
|
469
|
+
AuthenticationType_HEADER_instance = new AuthenticationType('HEADER', 1);
|
|
470
|
+
}
|
|
471
|
+
function AuthenticationType(name, ordinal) {
|
|
472
|
+
Enum.call(this, name, ordinal);
|
|
473
|
+
}
|
|
474
|
+
function AuthenticationType_QUERY_getInstance() {
|
|
475
|
+
AuthenticationType_initEntries();
|
|
476
|
+
return AuthenticationType_QUERY_instance;
|
|
477
|
+
}
|
|
478
|
+
function AuthenticationType_HEADER_getInstance() {
|
|
479
|
+
AuthenticationType_initEntries();
|
|
480
|
+
return AuthenticationType_HEADER_instance;
|
|
481
|
+
}
|
|
482
|
+
function ParsedDocument(root, schema, locations, documentLocations, resolvedRefs, originalAllOfs, hasCircularRefs) {
|
|
483
|
+
documentLocations = documentLocations === VOID ? emptyMap() : documentLocations;
|
|
484
|
+
resolvedRefs = resolvedRefs === VOID ? emptyList() : resolvedRefs;
|
|
485
|
+
originalAllOfs = originalAllOfs === VOID ? emptyList() : originalAllOfs;
|
|
486
|
+
hasCircularRefs = hasCircularRefs === VOID ? false : hasCircularRefs;
|
|
487
|
+
this.v55_1 = root;
|
|
488
|
+
this.w55_1 = schema;
|
|
489
|
+
this.x55_1 = locations;
|
|
490
|
+
this.y55_1 = documentLocations;
|
|
491
|
+
this.z55_1 = resolvedRefs;
|
|
492
|
+
this.a56_1 = originalAllOfs;
|
|
493
|
+
this.b56_1 = hasCircularRefs;
|
|
494
|
+
}
|
|
495
|
+
protoOf(ParsedDocument).toString = function () {
|
|
496
|
+
return 'ParsedDocument(root=' + toString_0(this.v55_1) + ', schema=' + toString(this.w55_1) + ', locations=' + toString(this.x55_1) + ', documentLocations=' + toString(this.y55_1) + ', resolvedRefs=' + toString(this.z55_1) + ', originalAllOfs=' + toString(this.a56_1) + ', hasCircularRefs=' + this.b56_1 + ')';
|
|
497
|
+
};
|
|
498
|
+
protoOf(ParsedDocument).hashCode = function () {
|
|
499
|
+
var result = this.v55_1 == null ? 0 : hashCode(this.v55_1);
|
|
500
|
+
result = imul(result, 31) + hashCode(this.w55_1) | 0;
|
|
501
|
+
result = imul(result, 31) + hashCode(this.x55_1) | 0;
|
|
502
|
+
result = imul(result, 31) + hashCode(this.y55_1) | 0;
|
|
503
|
+
result = imul(result, 31) + hashCode(this.z55_1) | 0;
|
|
504
|
+
result = imul(result, 31) + hashCode(this.a56_1) | 0;
|
|
505
|
+
result = imul(result, 31) + getBooleanHashCode(this.b56_1) | 0;
|
|
506
|
+
return result;
|
|
507
|
+
};
|
|
508
|
+
protoOf(ParsedDocument).equals = function (other) {
|
|
509
|
+
if (this === other)
|
|
510
|
+
return true;
|
|
511
|
+
if (!(other instanceof ParsedDocument))
|
|
512
|
+
return false;
|
|
513
|
+
if (!equals(this.v55_1, other.v55_1))
|
|
514
|
+
return false;
|
|
515
|
+
if (!equals(this.w55_1, other.w55_1))
|
|
516
|
+
return false;
|
|
517
|
+
if (!equals(this.x55_1, other.x55_1))
|
|
518
|
+
return false;
|
|
519
|
+
if (!equals(this.y55_1, other.y55_1))
|
|
520
|
+
return false;
|
|
521
|
+
if (!equals(this.z55_1, other.z55_1))
|
|
522
|
+
return false;
|
|
523
|
+
if (!equals(this.a56_1, other.a56_1))
|
|
524
|
+
return false;
|
|
525
|
+
if (!(this.b56_1 === other.b56_1))
|
|
526
|
+
return false;
|
|
527
|
+
return true;
|
|
528
|
+
};
|
|
529
|
+
function ResolvedRef(refString, resolvedTo, replacedValue, targetUri, sourceUri, sourcePointer) {
|
|
530
|
+
replacedValue = replacedValue === VOID ? resolvedTo : replacedValue;
|
|
531
|
+
targetUri = targetUri === VOID ? null : targetUri;
|
|
532
|
+
sourceUri = sourceUri === VOID ? null : sourceUri;
|
|
533
|
+
sourcePointer = sourcePointer === VOID ? null : sourcePointer;
|
|
534
|
+
this.c56_1 = refString;
|
|
535
|
+
this.d56_1 = resolvedTo;
|
|
536
|
+
this.e56_1 = replacedValue;
|
|
537
|
+
this.f56_1 = targetUri;
|
|
538
|
+
this.g56_1 = sourceUri;
|
|
539
|
+
this.h56_1 = sourcePointer;
|
|
540
|
+
}
|
|
541
|
+
protoOf(ResolvedRef).toString = function () {
|
|
542
|
+
return 'ResolvedRef(refString=' + this.c56_1 + ', resolvedTo=' + toString_0(this.d56_1) + ', replacedValue=' + toString_0(this.e56_1) + ', targetUri=' + this.f56_1 + ', sourceUri=' + this.g56_1 + ', sourcePointer=' + this.h56_1 + ')';
|
|
543
|
+
};
|
|
544
|
+
protoOf(ResolvedRef).hashCode = function () {
|
|
545
|
+
var result = getStringHashCode(this.c56_1);
|
|
546
|
+
result = imul(result, 31) + (this.d56_1 == null ? 0 : hashCode(this.d56_1)) | 0;
|
|
547
|
+
result = imul(result, 31) + (this.e56_1 == null ? 0 : hashCode(this.e56_1)) | 0;
|
|
548
|
+
result = imul(result, 31) + (this.f56_1 == null ? 0 : getStringHashCode(this.f56_1)) | 0;
|
|
549
|
+
result = imul(result, 31) + (this.g56_1 == null ? 0 : getStringHashCode(this.g56_1)) | 0;
|
|
550
|
+
result = imul(result, 31) + (this.h56_1 == null ? 0 : getStringHashCode(this.h56_1)) | 0;
|
|
551
|
+
return result;
|
|
552
|
+
};
|
|
553
|
+
protoOf(ResolvedRef).equals = function (other) {
|
|
554
|
+
if (this === other)
|
|
555
|
+
return true;
|
|
556
|
+
if (!(other instanceof ResolvedRef))
|
|
557
|
+
return false;
|
|
558
|
+
if (!(this.c56_1 === other.c56_1))
|
|
559
|
+
return false;
|
|
560
|
+
if (!equals(this.d56_1, other.d56_1))
|
|
561
|
+
return false;
|
|
562
|
+
if (!equals(this.e56_1, other.e56_1))
|
|
563
|
+
return false;
|
|
564
|
+
if (!(this.f56_1 == other.f56_1))
|
|
565
|
+
return false;
|
|
566
|
+
if (!(this.g56_1 == other.g56_1))
|
|
567
|
+
return false;
|
|
568
|
+
if (!(this.h56_1 == other.h56_1))
|
|
569
|
+
return false;
|
|
570
|
+
return true;
|
|
571
|
+
};
|
|
572
|
+
function OriginalAllOf(mergedMap, allOfItems) {
|
|
573
|
+
this.i56_1 = mergedMap;
|
|
574
|
+
this.j56_1 = allOfItems;
|
|
575
|
+
}
|
|
576
|
+
protoOf(OriginalAllOf).toString = function () {
|
|
577
|
+
return 'OriginalAllOf(mergedMap=' + toString(this.i56_1) + ', allOfItems=' + toString(this.j56_1) + ')';
|
|
578
|
+
};
|
|
579
|
+
protoOf(OriginalAllOf).hashCode = function () {
|
|
580
|
+
var result = hashCode(this.i56_1);
|
|
581
|
+
result = imul(result, 31) + hashCode(this.j56_1) | 0;
|
|
582
|
+
return result;
|
|
583
|
+
};
|
|
584
|
+
protoOf(OriginalAllOf).equals = function (other) {
|
|
585
|
+
if (this === other)
|
|
586
|
+
return true;
|
|
587
|
+
if (!(other instanceof OriginalAllOf))
|
|
588
|
+
return false;
|
|
589
|
+
if (!equals(this.i56_1, other.i56_1))
|
|
590
|
+
return false;
|
|
591
|
+
if (!equals(this.j56_1, other.j56_1))
|
|
592
|
+
return false;
|
|
593
|
+
return true;
|
|
594
|
+
};
|
|
595
|
+
function RefParserOptions(onCircular, onMissing) {
|
|
596
|
+
onCircular = onCircular === VOID ? OnCircular_RESOLVE_getInstance() : onCircular;
|
|
597
|
+
onMissing = onMissing === VOID ? OnMissing_FAIL_getInstance() : onMissing;
|
|
598
|
+
this.k56_1 = onCircular;
|
|
599
|
+
this.l56_1 = onMissing;
|
|
600
|
+
}
|
|
601
|
+
protoOf(RefParserOptions).toString = function () {
|
|
602
|
+
return 'RefParserOptions(onCircular=' + this.k56_1.toString() + ', onMissing=' + this.l56_1.toString() + ')';
|
|
603
|
+
};
|
|
604
|
+
protoOf(RefParserOptions).hashCode = function () {
|
|
605
|
+
var result = this.k56_1.hashCode();
|
|
606
|
+
result = imul(result, 31) + this.l56_1.hashCode() | 0;
|
|
607
|
+
return result;
|
|
608
|
+
};
|
|
609
|
+
protoOf(RefParserOptions).equals = function (other) {
|
|
610
|
+
if (this === other)
|
|
611
|
+
return true;
|
|
612
|
+
if (!(other instanceof RefParserOptions))
|
|
613
|
+
return false;
|
|
614
|
+
if (!this.k56_1.equals(other.k56_1))
|
|
615
|
+
return false;
|
|
616
|
+
if (!this.l56_1.equals(other.l56_1))
|
|
617
|
+
return false;
|
|
618
|
+
return true;
|
|
619
|
+
};
|
|
620
|
+
var OnCircular_RESOLVE_instance;
|
|
621
|
+
var OnCircular_SKIP_instance;
|
|
622
|
+
var OnCircular_FAIL_instance;
|
|
623
|
+
var OnCircular_entriesInitialized;
|
|
624
|
+
function OnCircular_initEntries() {
|
|
625
|
+
if (OnCircular_entriesInitialized)
|
|
626
|
+
return Unit_instance;
|
|
627
|
+
OnCircular_entriesInitialized = true;
|
|
628
|
+
OnCircular_RESOLVE_instance = new OnCircular('RESOLVE', 0);
|
|
629
|
+
OnCircular_SKIP_instance = new OnCircular('SKIP', 1);
|
|
630
|
+
OnCircular_FAIL_instance = new OnCircular('FAIL', 2);
|
|
631
|
+
}
|
|
632
|
+
function OnCircular(name, ordinal) {
|
|
633
|
+
Enum.call(this, name, ordinal);
|
|
634
|
+
}
|
|
635
|
+
var OnMissing_FAIL_instance;
|
|
636
|
+
var OnMissing_SKIP_instance;
|
|
637
|
+
var OnMissing_entriesInitialized;
|
|
638
|
+
function OnMissing_initEntries() {
|
|
639
|
+
if (OnMissing_entriesInitialized)
|
|
640
|
+
return Unit_instance;
|
|
641
|
+
OnMissing_entriesInitialized = true;
|
|
642
|
+
OnMissing_FAIL_instance = new OnMissing('FAIL', 0);
|
|
643
|
+
OnMissing_SKIP_instance = new OnMissing('SKIP', 1);
|
|
644
|
+
}
|
|
645
|
+
function OnMissing(name, ordinal) {
|
|
646
|
+
Enum.call(this, name, ordinal);
|
|
647
|
+
}
|
|
648
|
+
function CircularReferenceException(message) {
|
|
649
|
+
RuntimeException_init_$Init$(message, this);
|
|
650
|
+
captureStack(this, CircularReferenceException);
|
|
651
|
+
}
|
|
652
|
+
function MissingRefException(message, cause) {
|
|
653
|
+
cause = cause === VOID ? null : cause;
|
|
654
|
+
RuntimeException_init_$Init$_0(message, cause, this);
|
|
655
|
+
captureStack(this, MissingRefException);
|
|
656
|
+
}
|
|
657
|
+
function OnCircular_RESOLVE_getInstance() {
|
|
658
|
+
OnCircular_initEntries();
|
|
659
|
+
return OnCircular_RESOLVE_instance;
|
|
660
|
+
}
|
|
661
|
+
function OnMissing_FAIL_getInstance() {
|
|
662
|
+
OnMissing_initEntries();
|
|
663
|
+
return OnMissing_FAIL_instance;
|
|
664
|
+
}
|
|
665
|
+
function OnMissing_SKIP_getInstance() {
|
|
666
|
+
OnMissing_initEntries();
|
|
667
|
+
return OnMissing_SKIP_instance;
|
|
668
|
+
}
|
|
669
|
+
function SourceLocation(file, line, column, endLine, endColumn) {
|
|
670
|
+
this.m56_1 = file;
|
|
671
|
+
this.n56_1 = line;
|
|
672
|
+
this.o56_1 = column;
|
|
673
|
+
this.p56_1 = endLine;
|
|
674
|
+
this.q56_1 = endColumn;
|
|
675
|
+
}
|
|
676
|
+
protoOf(SourceLocation).toString = function () {
|
|
677
|
+
return 'SourceLocation(file=' + this.m56_1 + ', line=' + this.n56_1 + ', column=' + this.o56_1 + ', endLine=' + this.p56_1 + ', endColumn=' + this.q56_1 + ')';
|
|
678
|
+
};
|
|
679
|
+
protoOf(SourceLocation).hashCode = function () {
|
|
680
|
+
var result = getStringHashCode(this.m56_1);
|
|
681
|
+
result = imul(result, 31) + this.n56_1 | 0;
|
|
682
|
+
result = imul(result, 31) + this.o56_1 | 0;
|
|
683
|
+
result = imul(result, 31) + this.p56_1 | 0;
|
|
684
|
+
result = imul(result, 31) + this.q56_1 | 0;
|
|
685
|
+
return result;
|
|
686
|
+
};
|
|
687
|
+
protoOf(SourceLocation).equals = function (other) {
|
|
688
|
+
if (this === other)
|
|
689
|
+
return true;
|
|
690
|
+
if (!(other instanceof SourceLocation))
|
|
691
|
+
return false;
|
|
692
|
+
if (!(this.m56_1 === other.m56_1))
|
|
693
|
+
return false;
|
|
694
|
+
if (!(this.n56_1 === other.n56_1))
|
|
695
|
+
return false;
|
|
696
|
+
if (!(this.o56_1 === other.o56_1))
|
|
697
|
+
return false;
|
|
698
|
+
if (!(this.p56_1 === other.p56_1))
|
|
699
|
+
return false;
|
|
700
|
+
if (!(this.q56_1 === other.q56_1))
|
|
701
|
+
return false;
|
|
702
|
+
return true;
|
|
703
|
+
};
|
|
704
|
+
function get_loadSettings() {
|
|
705
|
+
_init_properties_SchemaParser_kt__ctx6o();
|
|
706
|
+
return loadSettings;
|
|
707
|
+
}
|
|
708
|
+
var loadSettings;
|
|
709
|
+
function RawDocument(uri, root, map, locations) {
|
|
710
|
+
this.p54_1 = uri;
|
|
711
|
+
this.q54_1 = root;
|
|
712
|
+
this.r54_1 = map;
|
|
713
|
+
this.s54_1 = locations;
|
|
714
|
+
}
|
|
715
|
+
protoOf(RawDocument).toString = function () {
|
|
716
|
+
return 'RawDocument(uri=' + this.p54_1 + ', root=' + toString_0(this.q54_1) + ', map=' + toString(this.r54_1) + ', locations=' + toString(this.s54_1) + ')';
|
|
717
|
+
};
|
|
718
|
+
protoOf(RawDocument).hashCode = function () {
|
|
719
|
+
var result = getStringHashCode(this.p54_1);
|
|
720
|
+
result = imul(result, 31) + (this.q54_1 == null ? 0 : hashCode(this.q54_1)) | 0;
|
|
721
|
+
result = imul(result, 31) + hashCode(this.r54_1) | 0;
|
|
722
|
+
result = imul(result, 31) + hashCode(this.s54_1) | 0;
|
|
723
|
+
return result;
|
|
724
|
+
};
|
|
725
|
+
protoOf(RawDocument).equals = function (other) {
|
|
726
|
+
if (this === other)
|
|
727
|
+
return true;
|
|
728
|
+
if (!(other instanceof RawDocument))
|
|
729
|
+
return false;
|
|
730
|
+
if (!(this.p54_1 === other.p54_1))
|
|
731
|
+
return false;
|
|
732
|
+
if (!equals(this.q54_1, other.q54_1))
|
|
733
|
+
return false;
|
|
734
|
+
if (!equals(this.r54_1, other.r54_1))
|
|
735
|
+
return false;
|
|
736
|
+
if (!equals(this.s54_1, other.s54_1))
|
|
737
|
+
return false;
|
|
738
|
+
return true;
|
|
739
|
+
};
|
|
740
|
+
function parseText(text, fileUri) {
|
|
741
|
+
_init_properties_SchemaParser_kt__ctx6o();
|
|
742
|
+
var compose = new Compose(get_loadSettings());
|
|
743
|
+
var node = compose.k4t(text);
|
|
744
|
+
if (node == null) {
|
|
745
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
746
|
+
var tmp = LinkedHashMap_init_$Create$();
|
|
747
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
748
|
+
var tmp_0 = LinkedHashMap_init_$Create$();
|
|
749
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
750
|
+
var tmp$ret$2 = LinkedHashMap_init_$Create$();
|
|
751
|
+
return new RawDocument(fileUri, tmp, tmp_0, tmp$ret$2);
|
|
752
|
+
}
|
|
753
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
754
|
+
var locations = LinkedHashMap_init_$Create$();
|
|
755
|
+
var value = buildNode(node, Companion_getInstance().j53_1, fileUri, locations);
|
|
756
|
+
var tmp_1;
|
|
757
|
+
if (!(value == null) ? isInterface(value, KtMutableMap) : false) {
|
|
758
|
+
tmp_1 = isInterface(value, KtMutableMap) ? value : THROW_CCE();
|
|
759
|
+
} else {
|
|
760
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
761
|
+
tmp_1 = LinkedHashMap_init_$Create$();
|
|
762
|
+
}
|
|
763
|
+
var map = tmp_1;
|
|
764
|
+
return new RawDocument(fileUri, value, map, locations);
|
|
765
|
+
}
|
|
766
|
+
function buildNode(node, pointer, fileUri, locations) {
|
|
767
|
+
_init_properties_SchemaParser_kt__ctx6o();
|
|
768
|
+
var start = node.e4g_1;
|
|
769
|
+
var end = node.f4g_1;
|
|
770
|
+
if (!(start == null) && !(end == null)) {
|
|
771
|
+
var tmp2 = pointer.toString();
|
|
772
|
+
// Inline function 'kotlin.collections.set' call
|
|
773
|
+
var value = new SourceLocation(fileUri, start.e4k_1, start.f4k_1, end.e4k_1, end.f4k_1);
|
|
774
|
+
locations.v1(tmp2, value);
|
|
775
|
+
}
|
|
776
|
+
var tmp;
|
|
777
|
+
if (node instanceof MappingNode) {
|
|
778
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
779
|
+
var map = LinkedHashMap_init_$Create$();
|
|
780
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
781
|
+
var _iterator__ex2g4s = node.s4i_1.i();
|
|
782
|
+
while (_iterator__ex2g4s.j()) {
|
|
783
|
+
var element = _iterator__ex2g4s.k();
|
|
784
|
+
$l$block: {
|
|
785
|
+
var tmp_0 = element.e4l_1;
|
|
786
|
+
var tmp0_safe_receiver = tmp_0 instanceof ScalarNode ? tmp_0 : null;
|
|
787
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q4l_1;
|
|
788
|
+
var tmp_1;
|
|
789
|
+
if (tmp1_elvis_lhs == null) {
|
|
790
|
+
break $l$block;
|
|
791
|
+
} else {
|
|
792
|
+
tmp_1 = tmp1_elvis_lhs;
|
|
793
|
+
}
|
|
794
|
+
var key = tmp_1;
|
|
795
|
+
// Inline function 'kotlin.collections.set' call
|
|
796
|
+
var value_0 = buildNode(element.f4l_1, pointer.m53(key), fileUri, locations);
|
|
797
|
+
map.v1(key, value_0);
|
|
798
|
+
}
|
|
799
|
+
}
|
|
800
|
+
tmp = map;
|
|
801
|
+
} else {
|
|
802
|
+
if (node instanceof SequenceNode) {
|
|
803
|
+
// Inline function 'kotlin.collections.mapIndexed' call
|
|
804
|
+
var this_0 = node.d4m_1;
|
|
805
|
+
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
806
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
807
|
+
var index = 0;
|
|
808
|
+
var _iterator__ex2g4s_0 = this_0.i();
|
|
809
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
810
|
+
var item = _iterator__ex2g4s_0.k();
|
|
811
|
+
var _unary__edvuaz = index;
|
|
812
|
+
index = _unary__edvuaz + 1 | 0;
|
|
813
|
+
var i = checkIndexOverflow(_unary__edvuaz);
|
|
814
|
+
var tmp$ret$5 = buildNode(item, pointer.n53(i), fileUri, locations);
|
|
815
|
+
destination.h(tmp$ret$5);
|
|
816
|
+
}
|
|
817
|
+
tmp = toMutableList(destination);
|
|
818
|
+
} else {
|
|
819
|
+
if (node instanceof ScalarNode) {
|
|
820
|
+
tmp = scalarValue(node);
|
|
821
|
+
} else {
|
|
822
|
+
tmp = null;
|
|
823
|
+
}
|
|
824
|
+
}
|
|
825
|
+
}
|
|
826
|
+
return tmp;
|
|
827
|
+
}
|
|
828
|
+
function scalarValue(node) {
|
|
829
|
+
_init_properties_SchemaParser_kt__ctx6o();
|
|
830
|
+
var raw = node.q4l_1;
|
|
831
|
+
var tmp;
|
|
832
|
+
switch (node.d4g_1.e4m_1) {
|
|
833
|
+
case 'tag:yaml.org,2002:null':
|
|
834
|
+
tmp = null;
|
|
835
|
+
break;
|
|
836
|
+
case 'tag:yaml.org,2002:bool':
|
|
837
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
838
|
+
|
|
839
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
840
|
+
|
|
841
|
+
tmp = raw.toLowerCase() === 'true';
|
|
842
|
+
break;
|
|
843
|
+
case 'tag:yaml.org,2002:int':
|
|
844
|
+
var tmp1_elvis_lhs = toLongOrNull(raw);
|
|
845
|
+
var tmp2_elvis_lhs = tmp1_elvis_lhs == null ? toLongOrNull(removePrefix(raw, '+')) : tmp1_elvis_lhs;
|
|
846
|
+
tmp = tmp2_elvis_lhs == null ? raw : tmp2_elvis_lhs;
|
|
847
|
+
break;
|
|
848
|
+
case 'tag:yaml.org,2002:float':
|
|
849
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
850
|
+
|
|
851
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
852
|
+
|
|
853
|
+
var tmp_0;
|
|
854
|
+
switch (raw.toLowerCase()) {
|
|
855
|
+
case '.inf':
|
|
856
|
+
case '+.inf':
|
|
857
|
+
tmp_0 = Infinity;
|
|
858
|
+
break;
|
|
859
|
+
case '-.inf':
|
|
860
|
+
tmp_0 = -Infinity;
|
|
861
|
+
break;
|
|
862
|
+
case '.nan':
|
|
863
|
+
tmp_0 = NaN;
|
|
864
|
+
break;
|
|
865
|
+
default:
|
|
866
|
+
var tmp4_elvis_lhs = toDoubleOrNull(raw);
|
|
867
|
+
tmp_0 = tmp4_elvis_lhs == null ? raw : tmp4_elvis_lhs;
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
tmp = tmp_0;
|
|
872
|
+
break;
|
|
873
|
+
default:
|
|
874
|
+
tmp = raw;
|
|
875
|
+
break;
|
|
876
|
+
}
|
|
877
|
+
return tmp;
|
|
878
|
+
}
|
|
879
|
+
var properties_initialized_SchemaParser_kt_f24p3y;
|
|
880
|
+
function _init_properties_SchemaParser_kt__ctx6o() {
|
|
881
|
+
if (!properties_initialized_SchemaParser_kt_f24p3y) {
|
|
882
|
+
properties_initialized_SchemaParser_kt_f24p3y = true;
|
|
883
|
+
loadSettings = new LoadSettings();
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
function ResolvingContext(options, loaders, auth, locationIndex) {
|
|
887
|
+
this.e55_1 = options;
|
|
888
|
+
this.f55_1 = loaders;
|
|
889
|
+
this.g55_1 = auth;
|
|
890
|
+
this.h55_1 = locationIndex;
|
|
891
|
+
var tmp = this;
|
|
892
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
893
|
+
tmp.i55_1 = LinkedHashMap_init_$Create$();
|
|
894
|
+
var tmp_0 = this;
|
|
895
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
896
|
+
tmp_0.j55_1 = LinkedHashMap_init_$Create$();
|
|
897
|
+
var tmp_1 = this;
|
|
898
|
+
// Inline function 'kotlin.collections.mutableSetOf' call
|
|
899
|
+
tmp_1.k55_1 = LinkedHashSet_init_$Create$();
|
|
900
|
+
var tmp_2 = this;
|
|
901
|
+
// Inline function 'kotlin.collections.mutableSetOf' call
|
|
902
|
+
tmp_2.l55_1 = LinkedHashSet_init_$Create$();
|
|
903
|
+
this.m55_1 = false;
|
|
904
|
+
var tmp_3 = this;
|
|
905
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
906
|
+
tmp_3.n55_1 = ArrayList_init_$Create$_0();
|
|
907
|
+
var tmp_4 = this;
|
|
908
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
909
|
+
tmp_4.o55_1 = ArrayList_init_$Create$_0();
|
|
910
|
+
var tmp_5 = this;
|
|
911
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
912
|
+
tmp_5.p55_1 = LinkedHashMap_init_$Create$();
|
|
913
|
+
}
|
|
914
|
+
function resolveDocument(doc, ctx, $completion) {
|
|
915
|
+
var tmp = new $resolveDocumentCOROUTINE$(doc, ctx, $completion);
|
|
916
|
+
tmp.b8_1 = Unit_instance;
|
|
917
|
+
tmp.c8_1 = null;
|
|
918
|
+
return tmp.h8();
|
|
919
|
+
}
|
|
920
|
+
function mergeAllOf(value, identityStack, collector) {
|
|
921
|
+
identityStack = identityStack === VOID ? new IdentityStack() : identityStack;
|
|
922
|
+
collector = collector === VOID ? null : collector;
|
|
923
|
+
if (value == null)
|
|
924
|
+
return Unit_instance;
|
|
925
|
+
if (identityStack.c57(value))
|
|
926
|
+
return Unit_instance;
|
|
927
|
+
identityStack.d57(value);
|
|
928
|
+
try {
|
|
929
|
+
if (isInterface(value, KtMutableMap)) {
|
|
930
|
+
var map = isInterface(value, KtMutableMap) ? value : THROW_CCE();
|
|
931
|
+
var _iterator__ex2g4s = toList(map.u1()).i();
|
|
932
|
+
while (_iterator__ex2g4s.j()) {
|
|
933
|
+
var _destruct__k2r9zo = _iterator__ex2g4s.k();
|
|
934
|
+
// Inline function 'kotlin.collections.component1' call
|
|
935
|
+
var k = _destruct__k2r9zo.n1();
|
|
936
|
+
// Inline function 'kotlin.collections.component2' call
|
|
937
|
+
var v = _destruct__k2r9zo.o1();
|
|
938
|
+
if (!(k === 'allOf')) {
|
|
939
|
+
mergeAllOf(v, identityStack, collector);
|
|
940
|
+
}
|
|
941
|
+
}
|
|
942
|
+
if (map.p1('allOf')) {
|
|
943
|
+
var allOf = map.r1('allOf');
|
|
944
|
+
if (!(allOf == null) ? isInterface(allOf, KtList) : false) {
|
|
945
|
+
var acc = new AllOfAccumulator();
|
|
946
|
+
collectAllOf(acc, map);
|
|
947
|
+
var merged = acc.h57();
|
|
948
|
+
map.w1('allOf');
|
|
949
|
+
map.x1(merged);
|
|
950
|
+
if (collector == null)
|
|
951
|
+
null;
|
|
952
|
+
else
|
|
953
|
+
collector.h(new OriginalAllOf(map, toList(allOf)));
|
|
954
|
+
}
|
|
955
|
+
}
|
|
956
|
+
} else {
|
|
957
|
+
if (isInterface(value, KtMutableList)) {
|
|
958
|
+
var list = isInterface(value, KtMutableList) ? value : THROW_CCE();
|
|
959
|
+
var _iterator__ex2g4s_0 = list.i();
|
|
960
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
961
|
+
var item = _iterator__ex2g4s_0.k();
|
|
962
|
+
mergeAllOf(item, identityStack, collector);
|
|
963
|
+
}
|
|
964
|
+
}
|
|
965
|
+
}
|
|
966
|
+
}finally {
|
|
967
|
+
identityStack.i57();
|
|
968
|
+
}
|
|
969
|
+
}
|
|
970
|
+
function resolveValue(value, fileUri, pointer, ctx, $completion) {
|
|
971
|
+
var tmp = new $resolveValueCOROUTINE$(value, fileUri, pointer, ctx, $completion);
|
|
972
|
+
tmp.b8_1 = Unit_instance;
|
|
973
|
+
tmp.c8_1 = null;
|
|
974
|
+
return tmp.h8();
|
|
975
|
+
}
|
|
976
|
+
function IdentityStack() {
|
|
977
|
+
var tmp = this;
|
|
978
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
979
|
+
tmp.b57_1 = ArrayList_init_$Create$_0();
|
|
980
|
+
}
|
|
981
|
+
protoOf(IdentityStack).c57 = function (obj) {
|
|
982
|
+
var tmp0 = this.b57_1;
|
|
983
|
+
var tmp$ret$0;
|
|
984
|
+
$l$block_0: {
|
|
985
|
+
// Inline function 'kotlin.collections.any' call
|
|
986
|
+
var tmp;
|
|
987
|
+
if (isInterface(tmp0, Collection)) {
|
|
988
|
+
tmp = tmp0.l();
|
|
989
|
+
} else {
|
|
990
|
+
tmp = false;
|
|
991
|
+
}
|
|
992
|
+
if (tmp) {
|
|
993
|
+
tmp$ret$0 = false;
|
|
994
|
+
break $l$block_0;
|
|
995
|
+
}
|
|
996
|
+
var _iterator__ex2g4s = tmp0.i();
|
|
997
|
+
while (_iterator__ex2g4s.j()) {
|
|
998
|
+
var element = _iterator__ex2g4s.k();
|
|
999
|
+
if (element === obj) {
|
|
1000
|
+
tmp$ret$0 = true;
|
|
1001
|
+
break $l$block_0;
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
1004
|
+
tmp$ret$0 = false;
|
|
1005
|
+
}
|
|
1006
|
+
return tmp$ret$0;
|
|
1007
|
+
};
|
|
1008
|
+
protoOf(IdentityStack).d57 = function (obj) {
|
|
1009
|
+
this.b57_1.h(obj);
|
|
1010
|
+
};
|
|
1011
|
+
protoOf(IdentityStack).i57 = function () {
|
|
1012
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1013
|
+
if (!this.b57_1.l()) {
|
|
1014
|
+
this.b57_1.b2(get_lastIndex(this.b57_1));
|
|
1015
|
+
}
|
|
1016
|
+
};
|
|
1017
|
+
function AllOfAccumulator() {
|
|
1018
|
+
var tmp = this;
|
|
1019
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
1020
|
+
tmp.e57_1 = LinkedHashMap_init_$Create$();
|
|
1021
|
+
var tmp_0 = this;
|
|
1022
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
1023
|
+
tmp_0.f57_1 = LinkedHashMap_init_$Create$();
|
|
1024
|
+
var tmp_1 = this;
|
|
1025
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1026
|
+
tmp_1.g57_1 = ArrayList_init_$Create$_0();
|
|
1027
|
+
}
|
|
1028
|
+
protoOf(AllOfAccumulator).h57 = function () {
|
|
1029
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
1030
|
+
var result = LinkedHashMap_init_$Create$();
|
|
1031
|
+
result.x1(this.e57_1);
|
|
1032
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1033
|
+
if (!this.g57_1.l()) {
|
|
1034
|
+
var tmp2 = 'required';
|
|
1035
|
+
// Inline function 'kotlin.collections.set' call
|
|
1036
|
+
var value = this.g57_1;
|
|
1037
|
+
result.v1(tmp2, value);
|
|
1038
|
+
}
|
|
1039
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1040
|
+
if (!this.f57_1.l()) {
|
|
1041
|
+
var tmp2_0 = 'properties';
|
|
1042
|
+
// Inline function 'kotlin.collections.set' call
|
|
1043
|
+
var value_0 = this.f57_1;
|
|
1044
|
+
result.v1(tmp2_0, value_0);
|
|
1045
|
+
}
|
|
1046
|
+
return result;
|
|
1047
|
+
};
|
|
1048
|
+
function collectAllOf(acc, item) {
|
|
1049
|
+
if (item.n() === 1 && item.p1('allOf')) {
|
|
1050
|
+
var inner = item.r1('allOf');
|
|
1051
|
+
if (!(inner == null) ? isInterface(inner, KtList) : false) {
|
|
1052
|
+
var _iterator__ex2g4s = inner.i();
|
|
1053
|
+
while (_iterator__ex2g4s.j()) {
|
|
1054
|
+
var entry = _iterator__ex2g4s.k();
|
|
1055
|
+
if (!(entry == null) ? isInterface(entry, KtMap) : false) {
|
|
1056
|
+
collectAllOf(acc, isInterface(entry, KtMap) ? entry : THROW_CCE());
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
1060
|
+
return Unit_instance;
|
|
1061
|
+
}
|
|
1062
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1063
|
+
var _iterator__ex2g4s_0 = item.u1().i();
|
|
1064
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
1065
|
+
var _destruct__k2r9zo = _iterator__ex2g4s_0.k();
|
|
1066
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1067
|
+
var k = _destruct__k2r9zo.n1();
|
|
1068
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1069
|
+
var v = _destruct__k2r9zo.o1();
|
|
1070
|
+
if (k === 'allOf') {
|
|
1071
|
+
if (!(v == null) ? isInterface(v, KtList) : false) {
|
|
1072
|
+
var _iterator__ex2g4s_1 = v.i();
|
|
1073
|
+
while (_iterator__ex2g4s_1.j()) {
|
|
1074
|
+
var entry_0 = _iterator__ex2g4s_1.k();
|
|
1075
|
+
if (!(entry_0 == null) ? isInterface(entry_0, KtMap) : false) {
|
|
1076
|
+
collectAllOf(acc, isInterface(entry_0, KtMap) ? entry_0 : THROW_CCE());
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
}
|
|
1080
|
+
} else {
|
|
1081
|
+
// Inline function 'kotlin.collections.set' call
|
|
1082
|
+
acc.e57_1.v1(k, v);
|
|
1083
|
+
}
|
|
1084
|
+
}
|
|
1085
|
+
if (item.p1('properties')) {
|
|
1086
|
+
var props = item.r1('properties');
|
|
1087
|
+
if (!(props == null) ? isInterface(props, KtMap) : false) {
|
|
1088
|
+
acc.f57_1.x1(isInterface(props, KtMap) ? props : THROW_CCE());
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1091
|
+
if (item.p1('required')) {
|
|
1092
|
+
var req = item.r1('required');
|
|
1093
|
+
if (!(req == null) ? isInterface(req, KtList) : false) {
|
|
1094
|
+
acc.g57_1.s(req);
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
}
|
|
1098
|
+
function resolveRef(refMap, fileUri, pointer, ctx, $completion) {
|
|
1099
|
+
var tmp = new $resolveRefCOROUTINE$(refMap, fileUri, pointer, ctx, $completion);
|
|
1100
|
+
tmp.b8_1 = Unit_instance;
|
|
1101
|
+
tmp.c8_1 = null;
|
|
1102
|
+
return tmp.h8();
|
|
1103
|
+
}
|
|
1104
|
+
function escapeToken(key) {
|
|
1105
|
+
return replace(replace(key, '~', '~0'), '/', '~1');
|
|
1106
|
+
}
|
|
1107
|
+
function normalizePointer(pointer) {
|
|
1108
|
+
switch (pointer) {
|
|
1109
|
+
case null:
|
|
1110
|
+
case '#/':
|
|
1111
|
+
return '';
|
|
1112
|
+
default:
|
|
1113
|
+
return removePrefix(pointer, '#');
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
function mergeSiblings(refMap, resolved) {
|
|
1117
|
+
// Inline function 'kotlin.collections.filterKeys' call
|
|
1118
|
+
var result = LinkedHashMap_init_$Create$();
|
|
1119
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1120
|
+
var _iterator__ex2g4s = refMap.u1().i();
|
|
1121
|
+
while (_iterator__ex2g4s.j()) {
|
|
1122
|
+
var entry = _iterator__ex2g4s.k();
|
|
1123
|
+
if (!(entry.n1() === '$ref')) {
|
|
1124
|
+
result.v1(entry.n1(), entry.o1());
|
|
1125
|
+
}
|
|
1126
|
+
}
|
|
1127
|
+
var siblings = result;
|
|
1128
|
+
if (siblings.l())
|
|
1129
|
+
return resolved;
|
|
1130
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
1131
|
+
var merged = LinkedHashMap_init_$Create$();
|
|
1132
|
+
merged.x1(siblings);
|
|
1133
|
+
if (!(resolved == null) ? isInterface(resolved, KtMap) : false) {
|
|
1134
|
+
merged.x1(isInterface(resolved, KtMap) ? resolved : THROW_CCE());
|
|
1135
|
+
}
|
|
1136
|
+
return merged;
|
|
1137
|
+
}
|
|
1138
|
+
function loadFile(uri, ctx, $completion) {
|
|
1139
|
+
var tmp = new $loadFileCOROUTINE$(uri, ctx, $completion);
|
|
1140
|
+
tmp.b8_1 = Unit_instance;
|
|
1141
|
+
tmp.c8_1 = null;
|
|
1142
|
+
return tmp.h8();
|
|
1143
|
+
}
|
|
1144
|
+
function $resolveDocumentCOROUTINE$(doc, ctx, resultContinuation) {
|
|
1145
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1146
|
+
this.z56_1 = doc;
|
|
1147
|
+
this.a57_1 = ctx;
|
|
1148
|
+
}
|
|
1149
|
+
protoOf($resolveDocumentCOROUTINE$).h8 = function () {
|
|
1150
|
+
var suspendResult = this.b8_1;
|
|
1151
|
+
$sm: do
|
|
1152
|
+
try {
|
|
1153
|
+
var tmp = this.z7_1;
|
|
1154
|
+
switch (tmp) {
|
|
1155
|
+
case 0:
|
|
1156
|
+
this.a8_1 = 2;
|
|
1157
|
+
var tmp0 = this.a57_1.i55_1;
|
|
1158
|
+
var tmp2 = this.z56_1.p54_1;
|
|
1159
|
+
var value = this.z56_1.q54_1;
|
|
1160
|
+
tmp0.v1(tmp2, value);
|
|
1161
|
+
var tmp0_0 = this.a57_1.p55_1;
|
|
1162
|
+
var tmp2_0 = this.z56_1.p54_1;
|
|
1163
|
+
var value_0 = toMutableMap(this.z56_1.s54_1);
|
|
1164
|
+
tmp0_0.v1(tmp2_0, value_0);
|
|
1165
|
+
this.a57_1.h55_1.x1(this.z56_1.s54_1);
|
|
1166
|
+
this.z7_1 = 1;
|
|
1167
|
+
suspendResult = resolveValue(this.z56_1.q54_1, this.z56_1.p54_1, '', this.a57_1, this);
|
|
1168
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1169
|
+
return suspendResult;
|
|
1170
|
+
}
|
|
1171
|
+
|
|
1172
|
+
continue $sm;
|
|
1173
|
+
case 1:
|
|
1174
|
+
var resolvedRoot = suspendResult;
|
|
1175
|
+
var tmp0_elvis_lhs = (!(resolvedRoot == null) ? isInterface(resolvedRoot, KtMutableMap) : false) ? resolvedRoot : null;
|
|
1176
|
+
var tmp_0;
|
|
1177
|
+
if (tmp0_elvis_lhs == null) {
|
|
1178
|
+
tmp_0 = LinkedHashMap_init_$Create$();
|
|
1179
|
+
} else {
|
|
1180
|
+
tmp_0 = tmp0_elvis_lhs;
|
|
1181
|
+
}
|
|
1182
|
+
|
|
1183
|
+
return tmp_0;
|
|
1184
|
+
case 2:
|
|
1185
|
+
throw this.c8_1;
|
|
1186
|
+
}
|
|
1187
|
+
} catch ($p) {
|
|
1188
|
+
var e = $p;
|
|
1189
|
+
if (this.a8_1 === 2) {
|
|
1190
|
+
throw e;
|
|
1191
|
+
} else {
|
|
1192
|
+
this.z7_1 = this.a8_1;
|
|
1193
|
+
this.c8_1 = e;
|
|
1194
|
+
}
|
|
1195
|
+
}
|
|
1196
|
+
while (true);
|
|
1197
|
+
};
|
|
1198
|
+
function $resolveValueCOROUTINE$(value, fileUri, pointer, ctx, resultContinuation) {
|
|
1199
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1200
|
+
this.r57_1 = value;
|
|
1201
|
+
this.s57_1 = fileUri;
|
|
1202
|
+
this.t57_1 = pointer;
|
|
1203
|
+
this.u57_1 = ctx;
|
|
1204
|
+
}
|
|
1205
|
+
protoOf($resolveValueCOROUTINE$).h8 = function () {
|
|
1206
|
+
var suspendResult = this.b8_1;
|
|
1207
|
+
$sm: do
|
|
1208
|
+
try {
|
|
1209
|
+
var tmp = this.z7_1;
|
|
1210
|
+
switch (tmp) {
|
|
1211
|
+
case 0:
|
|
1212
|
+
this.a8_1 = 14;
|
|
1213
|
+
this.v57_1 = this.s57_1 + '#' + this.t57_1;
|
|
1214
|
+
if (this.u57_1.k55_1.l1(this.v57_1)) {
|
|
1215
|
+
this.u57_1.m55_1 = true;
|
|
1216
|
+
var tmp_0;
|
|
1217
|
+
switch (this.u57_1.e55_1.k56_1.e2_1) {
|
|
1218
|
+
case 2:
|
|
1219
|
+
throw new CircularReferenceException('Circular $ref at ' + this.v57_1);
|
|
1220
|
+
case 1:
|
|
1221
|
+
tmp_0 = this.r57_1;
|
|
1222
|
+
break;
|
|
1223
|
+
case 0:
|
|
1224
|
+
var tmp1_elvis_lhs = this.u57_1.j55_1.r1(this.v57_1);
|
|
1225
|
+
tmp_0 = tmp1_elvis_lhs == null ? this.r57_1 : tmp1_elvis_lhs;
|
|
1226
|
+
break;
|
|
1227
|
+
default:
|
|
1228
|
+
noWhenBranchMatchedException();
|
|
1229
|
+
break;
|
|
1230
|
+
}
|
|
1231
|
+
return tmp_0;
|
|
1232
|
+
}
|
|
1233
|
+
|
|
1234
|
+
if (this.u57_1.l55_1.l1(this.v57_1))
|
|
1235
|
+
return this.r57_1;
|
|
1236
|
+
this.u57_1.k55_1.h(this.v57_1);
|
|
1237
|
+
this.u57_1.l55_1.h(this.v57_1);
|
|
1238
|
+
this.z7_1 = 1;
|
|
1239
|
+
continue $sm;
|
|
1240
|
+
case 1:
|
|
1241
|
+
this.w57_1 = Unit_instance;
|
|
1242
|
+
this.z7_1 = 2;
|
|
1243
|
+
continue $sm;
|
|
1244
|
+
case 2:
|
|
1245
|
+
this.a8_1 = 13;
|
|
1246
|
+
var tmp_1;
|
|
1247
|
+
var tmp_2 = this.r57_1;
|
|
1248
|
+
if (!(tmp_2 == null) ? isInterface(tmp_2, KtMap) : false) {
|
|
1249
|
+
var this_0 = this.r57_1;
|
|
1250
|
+
tmp_1 = (isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).p1('$ref');
|
|
1251
|
+
} else {
|
|
1252
|
+
tmp_1 = false;
|
|
1253
|
+
}
|
|
1254
|
+
|
|
1255
|
+
if (tmp_1) {
|
|
1256
|
+
this.z7_1 = 9;
|
|
1257
|
+
var tmp_3 = this.r57_1;
|
|
1258
|
+
suspendResult = resolveRef(isInterface(tmp_3, KtMap) ? tmp_3 : THROW_CCE(), this.s57_1, this.t57_1, this.u57_1, this);
|
|
1259
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1260
|
+
return suspendResult;
|
|
1261
|
+
}
|
|
1262
|
+
continue $sm;
|
|
1263
|
+
} else {
|
|
1264
|
+
var tmp_4 = this.r57_1;
|
|
1265
|
+
if (!(tmp_4 == null) ? isInterface(tmp_4, KtMutableMap) : false) {
|
|
1266
|
+
var tmp_5 = this;
|
|
1267
|
+
var tmp_6 = this.r57_1;
|
|
1268
|
+
tmp_5.y57_1 = isInterface(tmp_6, KtMutableMap) ? tmp_6 : THROW_CCE();
|
|
1269
|
+
this.b58_1 = toList(this.y57_1.u1()).i();
|
|
1270
|
+
this.z7_1 = 6;
|
|
1271
|
+
continue $sm;
|
|
1272
|
+
} else {
|
|
1273
|
+
var tmp_7 = this.r57_1;
|
|
1274
|
+
if (!(tmp_7 == null) ? isInterface(tmp_7, KtMutableList) : false) {
|
|
1275
|
+
var tmp_8 = this;
|
|
1276
|
+
var tmp_9 = this.r57_1;
|
|
1277
|
+
tmp_8.c58_1 = isInterface(tmp_9, KtMutableList) ? tmp_9 : THROW_CCE();
|
|
1278
|
+
this.e58_1 = get_indices(this.c58_1).i();
|
|
1279
|
+
this.z7_1 = 3;
|
|
1280
|
+
continue $sm;
|
|
1281
|
+
} else {
|
|
1282
|
+
this.x57_1 = this.r57_1;
|
|
1283
|
+
this.z7_1 = 10;
|
|
1284
|
+
continue $sm;
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
}
|
|
1288
|
+
|
|
1289
|
+
case 3:
|
|
1290
|
+
if (!this.e58_1.j()) {
|
|
1291
|
+
this.z7_1 = 5;
|
|
1292
|
+
continue $sm;
|
|
1293
|
+
}
|
|
1294
|
+
|
|
1295
|
+
this.d58_1 = this.e58_1.k();
|
|
1296
|
+
this.z7_1 = 4;
|
|
1297
|
+
suspendResult = resolveValue(this.c58_1.m(this.d58_1), this.s57_1, this.t57_1 + '/' + this.d58_1, this.u57_1, this);
|
|
1298
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1299
|
+
return suspendResult;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
continue $sm;
|
|
1303
|
+
case 4:
|
|
1304
|
+
var resolved = suspendResult;
|
|
1305
|
+
if (!(resolved === this.c58_1.m(this.d58_1))) {
|
|
1306
|
+
this.c58_1.z1(this.d58_1, resolved);
|
|
1307
|
+
}
|
|
1308
|
+
|
|
1309
|
+
this.z7_1 = 3;
|
|
1310
|
+
continue $sm;
|
|
1311
|
+
case 5:
|
|
1312
|
+
this.x57_1 = this.c58_1;
|
|
1313
|
+
this.z7_1 = 10;
|
|
1314
|
+
continue $sm;
|
|
1315
|
+
case 6:
|
|
1316
|
+
if (!this.b58_1.j()) {
|
|
1317
|
+
this.z7_1 = 8;
|
|
1318
|
+
continue $sm;
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
var _destruct__k2r9zo = this.b58_1.k();
|
|
1322
|
+
var tmp_10 = this;
|
|
1323
|
+
tmp_10.z57_1 = _destruct__k2r9zo.n1();
|
|
1324
|
+
var tmp_11 = this;
|
|
1325
|
+
tmp_11.a58_1 = _destruct__k2r9zo.o1();
|
|
1326
|
+
this.z7_1 = 7;
|
|
1327
|
+
suspendResult = resolveValue(this.a58_1, this.s57_1, this.t57_1 + '/' + escapeToken(this.z57_1), this.u57_1, this);
|
|
1328
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1329
|
+
return suspendResult;
|
|
1330
|
+
}
|
|
1331
|
+
|
|
1332
|
+
continue $sm;
|
|
1333
|
+
case 7:
|
|
1334
|
+
var resolved_0 = suspendResult;
|
|
1335
|
+
if (!(resolved_0 === this.a58_1)) {
|
|
1336
|
+
var tmp0 = this.y57_1;
|
|
1337
|
+
var key = this.z57_1;
|
|
1338
|
+
tmp0.v1(key, resolved_0);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
this.z7_1 = 6;
|
|
1342
|
+
continue $sm;
|
|
1343
|
+
case 8:
|
|
1344
|
+
var tmp0_0 = this.u57_1.j55_1;
|
|
1345
|
+
var tmp2 = this.v57_1;
|
|
1346
|
+
var value = this.y57_1;
|
|
1347
|
+
tmp0_0.v1(tmp2, value);
|
|
1348
|
+
this.x57_1 = this.y57_1;
|
|
1349
|
+
this.z7_1 = 10;
|
|
1350
|
+
continue $sm;
|
|
1351
|
+
case 9:
|
|
1352
|
+
this.x57_1 = suspendResult;
|
|
1353
|
+
this.z7_1 = 10;
|
|
1354
|
+
continue $sm;
|
|
1355
|
+
case 10:
|
|
1356
|
+
this.w57_1 = this.x57_1;
|
|
1357
|
+
this.a8_1 = 14;
|
|
1358
|
+
this.z7_1 = 11;
|
|
1359
|
+
var tmp_12 = this;
|
|
1360
|
+
continue $sm;
|
|
1361
|
+
case 11:
|
|
1362
|
+
var tmp_13 = this.w57_1;
|
|
1363
|
+
this.a8_1 = 14;
|
|
1364
|
+
this.u57_1.k55_1.y2(this.v57_1);
|
|
1365
|
+
return tmp_13;
|
|
1366
|
+
case 12:
|
|
1367
|
+
this.a8_1 = 14;
|
|
1368
|
+
this.u57_1.k55_1.y2(this.v57_1);
|
|
1369
|
+
return Unit_instance;
|
|
1370
|
+
case 13:
|
|
1371
|
+
this.a8_1 = 14;
|
|
1372
|
+
var t = this.c8_1;
|
|
1373
|
+
this.u57_1.k55_1.y2(this.v57_1);
|
|
1374
|
+
throw t;
|
|
1375
|
+
case 14:
|
|
1376
|
+
throw this.c8_1;
|
|
1377
|
+
}
|
|
1378
|
+
} catch ($p) {
|
|
1379
|
+
var e = $p;
|
|
1380
|
+
if (this.a8_1 === 14) {
|
|
1381
|
+
throw e;
|
|
1382
|
+
} else {
|
|
1383
|
+
this.z7_1 = this.a8_1;
|
|
1384
|
+
this.c8_1 = e;
|
|
1385
|
+
}
|
|
1386
|
+
}
|
|
1387
|
+
while (true);
|
|
1388
|
+
};
|
|
1389
|
+
function $resolveRefCOROUTINE$(refMap, fileUri, pointer, ctx, resultContinuation) {
|
|
1390
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1391
|
+
this.n58_1 = refMap;
|
|
1392
|
+
this.o58_1 = fileUri;
|
|
1393
|
+
this.p58_1 = pointer;
|
|
1394
|
+
this.q58_1 = ctx;
|
|
1395
|
+
}
|
|
1396
|
+
protoOf($resolveRefCOROUTINE$).h8 = function () {
|
|
1397
|
+
var suspendResult = this.b8_1;
|
|
1398
|
+
$sm: do
|
|
1399
|
+
try {
|
|
1400
|
+
var tmp = this.z7_1;
|
|
1401
|
+
switch (tmp) {
|
|
1402
|
+
case 0:
|
|
1403
|
+
this.a8_1 = 5;
|
|
1404
|
+
var tmp_0 = this;
|
|
1405
|
+
var tmp_1 = this.n58_1.r1('$ref');
|
|
1406
|
+
var tmp0_elvis_lhs = (!(tmp_1 == null) ? typeof tmp_1 === 'string' : false) ? tmp_1 : null;
|
|
1407
|
+
var tmp_2;
|
|
1408
|
+
if (tmp0_elvis_lhs == null) {
|
|
1409
|
+
return this.n58_1;
|
|
1410
|
+
} else {
|
|
1411
|
+
tmp_2 = tmp0_elvis_lhs;
|
|
1412
|
+
}
|
|
1413
|
+
|
|
1414
|
+
tmp_0.s58_1 = tmp_2;
|
|
1415
|
+
this.r58_1 = Companion_instance_1.h59(this.s58_1, this.o58_1);
|
|
1416
|
+
var tmp_3 = this;
|
|
1417
|
+
var tmp1_elvis_lhs = this.r58_1.k59_1;
|
|
1418
|
+
tmp_3.v58_1 = tmp1_elvis_lhs == null ? this.o58_1 : tmp1_elvis_lhs;
|
|
1419
|
+
this.u58_1 = normalizePointer(this.r58_1.l59_1);
|
|
1420
|
+
this.t58_1 = this.v58_1 + '#' + this.u58_1;
|
|
1421
|
+
if (this.q58_1.k55_1.l1(this.t58_1)) {
|
|
1422
|
+
this.q58_1.m55_1 = true;
|
|
1423
|
+
var tmp_4;
|
|
1424
|
+
switch (this.q58_1.e55_1.k56_1.e2_1) {
|
|
1425
|
+
case 2:
|
|
1426
|
+
throw new CircularReferenceException('Circular $ref at ' + this.t58_1);
|
|
1427
|
+
case 1:
|
|
1428
|
+
tmp_4 = this.n58_1;
|
|
1429
|
+
break;
|
|
1430
|
+
case 0:
|
|
1431
|
+
var cached = this.q58_1.j55_1.r1(this.t58_1);
|
|
1432
|
+
tmp_4 = !(cached == null) ? mergeSiblings(this.n58_1, cached) : this.n58_1;
|
|
1433
|
+
break;
|
|
1434
|
+
default:
|
|
1435
|
+
noWhenBranchMatchedException();
|
|
1436
|
+
break;
|
|
1437
|
+
}
|
|
1438
|
+
return tmp_4;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
var tmp_5;
|
|
1442
|
+
if (this.r58_1.j59_1.p59()) {
|
|
1443
|
+
var tmp0 = this.q58_1.i55_1;
|
|
1444
|
+
var key = this.v58_1;
|
|
1445
|
+
tmp_5 = !(isInterface(tmp0, KtMap) ? tmp0 : THROW_CCE()).p1(key);
|
|
1446
|
+
} else {
|
|
1447
|
+
tmp_5 = false;
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
if (tmp_5) {
|
|
1451
|
+
this.z7_1 = 1;
|
|
1452
|
+
suspendResult = loadFile(this.v58_1, this.q58_1, this);
|
|
1453
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1454
|
+
return suspendResult;
|
|
1455
|
+
}
|
|
1456
|
+
continue $sm;
|
|
1457
|
+
} else {
|
|
1458
|
+
this.z7_1 = 3;
|
|
1459
|
+
continue $sm;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1462
|
+
case 1:
|
|
1463
|
+
var tmp3_elvis_lhs = suspendResult;
|
|
1464
|
+
var tmp_6;
|
|
1465
|
+
if (tmp3_elvis_lhs == null) {
|
|
1466
|
+
var tmp_7;
|
|
1467
|
+
switch (this.q58_1.e55_1.l56_1.e2_1) {
|
|
1468
|
+
case 1:
|
|
1469
|
+
tmp_7 = this.n58_1;
|
|
1470
|
+
break;
|
|
1471
|
+
case 0:
|
|
1472
|
+
throw new MissingRefException('Cannot load: ' + this.v58_1);
|
|
1473
|
+
default:
|
|
1474
|
+
noWhenBranchMatchedException();
|
|
1475
|
+
break;
|
|
1476
|
+
}
|
|
1477
|
+
return tmp_7;
|
|
1478
|
+
} else {
|
|
1479
|
+
tmp_6 = tmp3_elvis_lhs;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
var text = tmp_6;
|
|
1483
|
+
var raw = parseText(text, this.v58_1);
|
|
1484
|
+
var tmp0_0 = this.q58_1.i55_1;
|
|
1485
|
+
var tmp2 = this.v58_1;
|
|
1486
|
+
var value = raw.q54_1;
|
|
1487
|
+
tmp0_0.v1(tmp2, value);
|
|
1488
|
+
var tmp0_1 = this.q58_1.p55_1;
|
|
1489
|
+
var tmp2_0 = this.v58_1;
|
|
1490
|
+
var value_0 = toMutableMap(raw.s54_1);
|
|
1491
|
+
tmp0_1.v1(tmp2_0, value_0);
|
|
1492
|
+
var _iterator__ex2g4s = raw.s54_1.u1().i();
|
|
1493
|
+
while (_iterator__ex2g4s.j()) {
|
|
1494
|
+
var element = _iterator__ex2g4s.k();
|
|
1495
|
+
var key_0 = element.n1();
|
|
1496
|
+
var loc = element.o1();
|
|
1497
|
+
if (!this.q58_1.h55_1.p1(key_0)) {
|
|
1498
|
+
this.q58_1.h55_1.v1(key_0, loc);
|
|
1499
|
+
}
|
|
1500
|
+
}
|
|
1501
|
+
|
|
1502
|
+
this.z7_1 = 2;
|
|
1503
|
+
suspendResult = resolveValue(raw.q54_1, this.v58_1, '', this.q58_1, this);
|
|
1504
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1505
|
+
return suspendResult;
|
|
1506
|
+
}
|
|
1507
|
+
|
|
1508
|
+
continue $sm;
|
|
1509
|
+
case 2:
|
|
1510
|
+
this.z7_1 = 3;
|
|
1511
|
+
continue $sm;
|
|
1512
|
+
case 3:
|
|
1513
|
+
var tmp5_elvis_lhs = this.q58_1.i55_1.r1(this.v58_1);
|
|
1514
|
+
var tmp_8;
|
|
1515
|
+
if (tmp5_elvis_lhs == null) {
|
|
1516
|
+
var tmp_9;
|
|
1517
|
+
switch (this.q58_1.e55_1.l56_1.e2_1) {
|
|
1518
|
+
case 1:
|
|
1519
|
+
tmp_9 = this.n58_1;
|
|
1520
|
+
break;
|
|
1521
|
+
case 0:
|
|
1522
|
+
throw new MissingRefException('Document not in cache: ' + this.v58_1);
|
|
1523
|
+
default:
|
|
1524
|
+
noWhenBranchMatchedException();
|
|
1525
|
+
break;
|
|
1526
|
+
}
|
|
1527
|
+
return tmp_9;
|
|
1528
|
+
} else {
|
|
1529
|
+
tmp_8 = tmp5_elvis_lhs;
|
|
1530
|
+
}
|
|
1531
|
+
|
|
1532
|
+
var targetDoc = tmp_8;
|
|
1533
|
+
var tmp0_2 = this.q58_1.j55_1;
|
|
1534
|
+
var key_1 = this.t58_1;
|
|
1535
|
+
if ((isInterface(tmp0_2, KtMap) ? tmp0_2 : THROW_CCE()).p1(key_1)) {
|
|
1536
|
+
var cached_0 = this.q58_1.j55_1.r1(this.t58_1);
|
|
1537
|
+
var replaced = mergeSiblings(this.n58_1, cached_0);
|
|
1538
|
+
this.q58_1.n55_1.h(new ResolvedRef(this.s58_1, cached_0, replaced, this.r58_1.k59_1, this.o58_1, this.p58_1));
|
|
1539
|
+
return replaced;
|
|
1540
|
+
}
|
|
1541
|
+
|
|
1542
|
+
var tmp_10;
|
|
1543
|
+
var this_0 = this.u58_1;
|
|
1544
|
+
if (charSequenceLength(this_0) === 0) {
|
|
1545
|
+
tmp_10 = targetDoc;
|
|
1546
|
+
} else {
|
|
1547
|
+
var tmp7_elvis_lhs = Companion_getInstance().k53(this.u58_1).o53(targetDoc);
|
|
1548
|
+
var tmp_11;
|
|
1549
|
+
if (tmp7_elvis_lhs == null) {
|
|
1550
|
+
var tmp_12;
|
|
1551
|
+
switch (this.q58_1.e55_1.l56_1.e2_1) {
|
|
1552
|
+
case 1:
|
|
1553
|
+
tmp_12 = this.n58_1;
|
|
1554
|
+
break;
|
|
1555
|
+
case 0:
|
|
1556
|
+
throw new MissingRefException('Pointer ' + this.u58_1 + ' not found in ' + this.v58_1);
|
|
1557
|
+
default:
|
|
1558
|
+
noWhenBranchMatchedException();
|
|
1559
|
+
break;
|
|
1560
|
+
}
|
|
1561
|
+
return tmp_12;
|
|
1562
|
+
} else {
|
|
1563
|
+
tmp_11 = tmp7_elvis_lhs;
|
|
1564
|
+
}
|
|
1565
|
+
tmp_10 = tmp_11;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
var resolved = tmp_10;
|
|
1569
|
+
var tmp0_3 = this.q58_1.j55_1;
|
|
1570
|
+
var key_2 = this.t58_1;
|
|
1571
|
+
tmp0_3.v1(key_2, resolved);
|
|
1572
|
+
this.z7_1 = 4;
|
|
1573
|
+
suspendResult = resolveValue(resolved, this.v58_1, this.u58_1, this.q58_1, this);
|
|
1574
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1575
|
+
return suspendResult;
|
|
1576
|
+
}
|
|
1577
|
+
|
|
1578
|
+
continue $sm;
|
|
1579
|
+
case 4:
|
|
1580
|
+
var fullyResolved = suspendResult;
|
|
1581
|
+
var tmp0_4 = this.q58_1.j55_1;
|
|
1582
|
+
var key_3 = this.t58_1;
|
|
1583
|
+
tmp0_4.v1(key_3, fullyResolved);
|
|
1584
|
+
var replaced_0 = mergeSiblings(this.n58_1, fullyResolved);
|
|
1585
|
+
this.q58_1.n55_1.h(new ResolvedRef(this.s58_1, fullyResolved, replaced_0, this.r58_1.k59_1, this.o58_1, this.p58_1));
|
|
1586
|
+
return replaced_0;
|
|
1587
|
+
case 5:
|
|
1588
|
+
throw this.c8_1;
|
|
1589
|
+
}
|
|
1590
|
+
} catch ($p) {
|
|
1591
|
+
var e = $p;
|
|
1592
|
+
if (this.a8_1 === 5) {
|
|
1593
|
+
throw e;
|
|
1594
|
+
} else {
|
|
1595
|
+
this.z7_1 = this.a8_1;
|
|
1596
|
+
this.c8_1 = e;
|
|
1597
|
+
}
|
|
1598
|
+
}
|
|
1599
|
+
while (true);
|
|
1600
|
+
};
|
|
1601
|
+
function $loadFileCOROUTINE$(uri, ctx, resultContinuation) {
|
|
1602
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1603
|
+
this.e59_1 = uri;
|
|
1604
|
+
this.f59_1 = ctx;
|
|
1605
|
+
}
|
|
1606
|
+
protoOf($loadFileCOROUTINE$).h8 = function () {
|
|
1607
|
+
var suspendResult = this.b8_1;
|
|
1608
|
+
$sm: do
|
|
1609
|
+
try {
|
|
1610
|
+
var tmp = this.z7_1;
|
|
1611
|
+
switch (tmp) {
|
|
1612
|
+
case 0:
|
|
1613
|
+
this.a8_1 = 3;
|
|
1614
|
+
var tmp0 = this.f59_1.f55_1;
|
|
1615
|
+
var tmp$ret$0;
|
|
1616
|
+
l$ret$1: do {
|
|
1617
|
+
var _iterator__ex2g4s = tmp0.i();
|
|
1618
|
+
while (_iterator__ex2g4s.j()) {
|
|
1619
|
+
var element = _iterator__ex2g4s.k();
|
|
1620
|
+
if (element.n54(this.e59_1)) {
|
|
1621
|
+
tmp$ret$0 = element;
|
|
1622
|
+
break l$ret$1;
|
|
1623
|
+
}
|
|
1624
|
+
}
|
|
1625
|
+
tmp$ret$0 = null;
|
|
1626
|
+
}
|
|
1627
|
+
while (false);
|
|
1628
|
+
var tmp0_elvis_lhs = tmp$ret$0;
|
|
1629
|
+
var tmp_0;
|
|
1630
|
+
if (tmp0_elvis_lhs == null) {
|
|
1631
|
+
return null;
|
|
1632
|
+
} else {
|
|
1633
|
+
tmp_0 = tmp0_elvis_lhs;
|
|
1634
|
+
}
|
|
1635
|
+
|
|
1636
|
+
var loader = tmp_0;
|
|
1637
|
+
this.a8_1 = 2;
|
|
1638
|
+
this.z7_1 = 1;
|
|
1639
|
+
suspendResult = loader.o54(this.e59_1, this);
|
|
1640
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1641
|
+
return suspendResult;
|
|
1642
|
+
}
|
|
1643
|
+
|
|
1644
|
+
continue $sm;
|
|
1645
|
+
case 1:
|
|
1646
|
+
this.g59_1 = suspendResult;
|
|
1647
|
+
this.a8_1 = 3;
|
|
1648
|
+
this.z7_1 = 4;
|
|
1649
|
+
continue $sm;
|
|
1650
|
+
case 2:
|
|
1651
|
+
this.a8_1 = 3;
|
|
1652
|
+
var tmp_1 = this.c8_1;
|
|
1653
|
+
if (tmp_1 instanceof Exception) {
|
|
1654
|
+
var e = this.c8_1;
|
|
1655
|
+
var tmp_2 = this;
|
|
1656
|
+
var tmp_3;
|
|
1657
|
+
if (this.f59_1.e55_1.l56_1.equals(OnMissing_SKIP_getInstance())) {
|
|
1658
|
+
tmp_3 = null;
|
|
1659
|
+
} else {
|
|
1660
|
+
throw new MissingRefException('Failed to load: ' + this.e59_1, e);
|
|
1661
|
+
}
|
|
1662
|
+
tmp_2.g59_1 = tmp_3;
|
|
1663
|
+
this.z7_1 = 4;
|
|
1664
|
+
continue $sm;
|
|
1665
|
+
} else {
|
|
1666
|
+
throw this.c8_1;
|
|
1667
|
+
}
|
|
1668
|
+
|
|
1669
|
+
case 3:
|
|
1670
|
+
throw this.c8_1;
|
|
1671
|
+
case 4:
|
|
1672
|
+
this.a8_1 = 3;
|
|
1673
|
+
return this.g59_1;
|
|
1674
|
+
}
|
|
1675
|
+
} catch ($p) {
|
|
1676
|
+
var e_0 = $p;
|
|
1677
|
+
if (this.a8_1 === 3) {
|
|
1678
|
+
throw e_0;
|
|
1679
|
+
} else {
|
|
1680
|
+
this.z7_1 = this.a8_1;
|
|
1681
|
+
this.c8_1 = e_0;
|
|
1682
|
+
}
|
|
1683
|
+
}
|
|
1684
|
+
while (true);
|
|
1685
|
+
};
|
|
1686
|
+
function mungeRef($this, ref) {
|
|
1687
|
+
if (ref === '#')
|
|
1688
|
+
return '#/';
|
|
1689
|
+
if (!contains(ref, ':') && !startsWith(ref, '#') && !startsWith(ref, '/') && !contains(ref, '$') && indexOf(ref, _Char___init__impl__6a9atx(46)) > 0) {
|
|
1690
|
+
return './' + ref;
|
|
1691
|
+
}
|
|
1692
|
+
return ref;
|
|
1693
|
+
}
|
|
1694
|
+
function detectFormat($this, ref) {
|
|
1695
|
+
return startsWith(ref, 'classpath:') ? SchemaRefFormat_CLASSPATH_getInstance() : startsWith(ref, 'http://') || startsWith(ref, 'https://') ? SchemaRefFormat_URL_getInstance() : startsWith(ref, 'file://') ? SchemaRefFormat_FILE_getInstance() : startsWith(ref, '#/') || ref === '#' ? SchemaRefFormat_INTERNAL_getInstance() : SchemaRefFormat_RELATIVE_getInstance();
|
|
1696
|
+
}
|
|
1697
|
+
function normalizePath($this, path) {
|
|
1698
|
+
var absolute = startsWith(path, '/');
|
|
1699
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1700
|
+
var result = ArrayList_init_$Create$_0();
|
|
1701
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1702
|
+
var _iterator__ex2g4s = split(path, ['/']).i();
|
|
1703
|
+
while (_iterator__ex2g4s.j()) {
|
|
1704
|
+
var element = _iterator__ex2g4s.k();
|
|
1705
|
+
switch (element) {
|
|
1706
|
+
case '':
|
|
1707
|
+
case '.':
|
|
1708
|
+
break;
|
|
1709
|
+
case '..':
|
|
1710
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1711
|
+
|
|
1712
|
+
if (!result.l()) {
|
|
1713
|
+
result.b2(get_lastIndex(result));
|
|
1714
|
+
}
|
|
1715
|
+
|
|
1716
|
+
break;
|
|
1717
|
+
default:
|
|
1718
|
+
result.h(element);
|
|
1719
|
+
break;
|
|
1720
|
+
}
|
|
1721
|
+
}
|
|
1722
|
+
return absolute ? '/' + joinToString(result, '/') : joinToString(result, '/');
|
|
1723
|
+
}
|
|
1724
|
+
function Companion_1() {
|
|
1725
|
+
}
|
|
1726
|
+
protoOf(Companion_1).h59 = function (refString, baseUri) {
|
|
1727
|
+
var ref = mungeRef(this, refString);
|
|
1728
|
+
var format = detectFormat(this, ref);
|
|
1729
|
+
if (format.equals(SchemaRefFormat_INTERNAL_getInstance())) {
|
|
1730
|
+
return new SchemaRef(ref, format, null, ref, baseUri);
|
|
1731
|
+
}
|
|
1732
|
+
var hashIdx = indexOf_0(ref, '#/');
|
|
1733
|
+
var filePart;
|
|
1734
|
+
var pointer;
|
|
1735
|
+
if (hashIdx >= 0) {
|
|
1736
|
+
filePart = substring(ref, 0, hashIdx);
|
|
1737
|
+
pointer = substring_0(ref, hashIdx);
|
|
1738
|
+
} else if (ref === '#') {
|
|
1739
|
+
return new SchemaRef(ref, SchemaRefFormat_INTERNAL_getInstance(), null, '#/', baseUri);
|
|
1740
|
+
} else {
|
|
1741
|
+
filePart = ref;
|
|
1742
|
+
pointer = null;
|
|
1743
|
+
}
|
|
1744
|
+
var resolvedFileUri = format.e2_1 === 1 ? this.q59(baseUri, filePart) : filePart;
|
|
1745
|
+
return new SchemaRef(ref, format, resolvedFileUri, pointer, baseUri);
|
|
1746
|
+
};
|
|
1747
|
+
protoOf(Companion_1).q59 = function (base, relative) {
|
|
1748
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
1749
|
+
if (charSequenceLength(relative) === 0)
|
|
1750
|
+
return base;
|
|
1751
|
+
if (startsWith(relative, 'http://') || startsWith(relative, 'https://') || startsWith(relative, 'file://') || startsWith(relative, 'classpath:'))
|
|
1752
|
+
return relative;
|
|
1753
|
+
var normalizedBase = replace_0(base, _Char___init__impl__6a9atx(92), _Char___init__impl__6a9atx(47));
|
|
1754
|
+
var normalizedRel = replace_0(relative, _Char___init__impl__6a9atx(92), _Char___init__impl__6a9atx(47));
|
|
1755
|
+
if (startsWith(normalizedBase, 'classpath:')) {
|
|
1756
|
+
var basePath = removePrefix(normalizedBase, 'classpath:');
|
|
1757
|
+
var baseDir = substringBeforeLast(basePath, '/') + '/';
|
|
1758
|
+
var combinedPath = startsWith(normalizedRel, '/') ? normalizedRel : baseDir + normalizedRel;
|
|
1759
|
+
return 'classpath:' + normalizePath(this, combinedPath);
|
|
1760
|
+
}
|
|
1761
|
+
var baseDir_0 = substringBeforeLast(normalizedBase, '/') + '/';
|
|
1762
|
+
var combined = startsWith(normalizedRel, '/') ? normalizedRel : baseDir_0 + normalizedRel;
|
|
1763
|
+
var parts = split(combined, ['/']);
|
|
1764
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1765
|
+
var result = ArrayList_init_$Create$_0();
|
|
1766
|
+
var _iterator__ex2g4s = parts.i();
|
|
1767
|
+
while (_iterator__ex2g4s.j()) {
|
|
1768
|
+
var part = _iterator__ex2g4s.k();
|
|
1769
|
+
switch (part) {
|
|
1770
|
+
case '.':
|
|
1771
|
+
break;
|
|
1772
|
+
case '..':
|
|
1773
|
+
if (result.n() > 3) {
|
|
1774
|
+
result.b2(get_lastIndex(result));
|
|
1775
|
+
}
|
|
1776
|
+
|
|
1777
|
+
break;
|
|
1778
|
+
default:
|
|
1779
|
+
result.h(part);
|
|
1780
|
+
break;
|
|
1781
|
+
}
|
|
1782
|
+
}
|
|
1783
|
+
return joinToString(result, '/');
|
|
1784
|
+
};
|
|
1785
|
+
var Companion_instance_1;
|
|
1786
|
+
function Companion_getInstance_1() {
|
|
1787
|
+
return Companion_instance_1;
|
|
1788
|
+
}
|
|
1789
|
+
function SchemaRef(rawRef, format, fileUri, pointer, referencingUri) {
|
|
1790
|
+
this.i59_1 = rawRef;
|
|
1791
|
+
this.j59_1 = format;
|
|
1792
|
+
this.k59_1 = fileUri;
|
|
1793
|
+
this.l59_1 = pointer;
|
|
1794
|
+
this.m59_1 = referencingUri;
|
|
1795
|
+
}
|
|
1796
|
+
protoOf(SchemaRef).toString = function () {
|
|
1797
|
+
return 'SchemaRef(rawRef=' + this.i59_1 + ', format=' + this.j59_1.toString() + ', fileUri=' + this.k59_1 + ', pointer=' + this.l59_1 + ', referencingUri=' + this.m59_1 + ')';
|
|
1798
|
+
};
|
|
1799
|
+
protoOf(SchemaRef).hashCode = function () {
|
|
1800
|
+
var result = getStringHashCode(this.i59_1);
|
|
1801
|
+
result = imul(result, 31) + this.j59_1.hashCode() | 0;
|
|
1802
|
+
result = imul(result, 31) + (this.k59_1 == null ? 0 : getStringHashCode(this.k59_1)) | 0;
|
|
1803
|
+
result = imul(result, 31) + (this.l59_1 == null ? 0 : getStringHashCode(this.l59_1)) | 0;
|
|
1804
|
+
result = imul(result, 31) + getStringHashCode(this.m59_1) | 0;
|
|
1805
|
+
return result;
|
|
1806
|
+
};
|
|
1807
|
+
protoOf(SchemaRef).equals = function (other) {
|
|
1808
|
+
if (this === other)
|
|
1809
|
+
return true;
|
|
1810
|
+
if (!(other instanceof SchemaRef))
|
|
1811
|
+
return false;
|
|
1812
|
+
if (!(this.i59_1 === other.i59_1))
|
|
1813
|
+
return false;
|
|
1814
|
+
if (!this.j59_1.equals(other.j59_1))
|
|
1815
|
+
return false;
|
|
1816
|
+
if (!(this.k59_1 == other.k59_1))
|
|
1817
|
+
return false;
|
|
1818
|
+
if (!(this.l59_1 == other.l59_1))
|
|
1819
|
+
return false;
|
|
1820
|
+
if (!(this.m59_1 === other.m59_1))
|
|
1821
|
+
return false;
|
|
1822
|
+
return true;
|
|
1823
|
+
};
|
|
1824
|
+
var SchemaRefFormat_INTERNAL_instance;
|
|
1825
|
+
var SchemaRefFormat_RELATIVE_instance;
|
|
1826
|
+
var SchemaRefFormat_FILE_instance;
|
|
1827
|
+
var SchemaRefFormat_CLASSPATH_instance;
|
|
1828
|
+
var SchemaRefFormat_URL_instance;
|
|
1829
|
+
var SchemaRefFormat_entriesInitialized;
|
|
1830
|
+
function SchemaRefFormat_initEntries() {
|
|
1831
|
+
if (SchemaRefFormat_entriesInitialized)
|
|
1832
|
+
return Unit_instance;
|
|
1833
|
+
SchemaRefFormat_entriesInitialized = true;
|
|
1834
|
+
SchemaRefFormat_INTERNAL_instance = new SchemaRefFormat('INTERNAL', 0);
|
|
1835
|
+
SchemaRefFormat_RELATIVE_instance = new SchemaRefFormat('RELATIVE', 1);
|
|
1836
|
+
SchemaRefFormat_FILE_instance = new SchemaRefFormat('FILE', 2);
|
|
1837
|
+
SchemaRefFormat_CLASSPATH_instance = new SchemaRefFormat('CLASSPATH', 3);
|
|
1838
|
+
SchemaRefFormat_URL_instance = new SchemaRefFormat('URL', 4);
|
|
1839
|
+
}
|
|
1840
|
+
function SchemaRefFormat(name, ordinal) {
|
|
1841
|
+
Enum.call(this, name, ordinal);
|
|
1842
|
+
}
|
|
1843
|
+
protoOf(SchemaRefFormat).p59 = function () {
|
|
1844
|
+
return this.equals(SchemaRefFormat_RELATIVE_getInstance()) || this.equals(SchemaRefFormat_FILE_getInstance()) || this.equals(SchemaRefFormat_CLASSPATH_getInstance()) || this.equals(SchemaRefFormat_URL_getInstance());
|
|
1845
|
+
};
|
|
1846
|
+
function SchemaRefFormat_INTERNAL_getInstance() {
|
|
1847
|
+
SchemaRefFormat_initEntries();
|
|
1848
|
+
return SchemaRefFormat_INTERNAL_instance;
|
|
1849
|
+
}
|
|
1850
|
+
function SchemaRefFormat_RELATIVE_getInstance() {
|
|
1851
|
+
SchemaRefFormat_initEntries();
|
|
1852
|
+
return SchemaRefFormat_RELATIVE_instance;
|
|
1853
|
+
}
|
|
1854
|
+
function SchemaRefFormat_FILE_getInstance() {
|
|
1855
|
+
SchemaRefFormat_initEntries();
|
|
1856
|
+
return SchemaRefFormat_FILE_instance;
|
|
1857
|
+
}
|
|
1858
|
+
function SchemaRefFormat_CLASSPATH_getInstance() {
|
|
1859
|
+
SchemaRefFormat_initEntries();
|
|
1860
|
+
return SchemaRefFormat_CLASSPATH_instance;
|
|
1861
|
+
}
|
|
1862
|
+
function SchemaRefFormat_URL_getInstance() {
|
|
1863
|
+
SchemaRefFormat_initEntries();
|
|
1864
|
+
return SchemaRefFormat_URL_instance;
|
|
1865
|
+
}
|
|
1866
|
+
function parseSchemaText(input, baseUri) {
|
|
1867
|
+
baseUri = baseUri === VOID ? 'memory://anonymous' : baseUri;
|
|
1868
|
+
var normalizedBaseUri = Companion_instance_0.r53(baseUri);
|
|
1869
|
+
var raw = parseText(input, normalizedBaseUri);
|
|
1870
|
+
return exportParsedDocument(new ParsedDocument(raw.q54_1, raw.r54_1, raw.s54_1, mapOf(to(raw.p54_1, raw.s54_1))));
|
|
1871
|
+
}
|
|
1872
|
+
function dereferenceSchema(uri, mergeAllOf) {
|
|
1873
|
+
mergeAllOf = mergeAllOf === VOID ? false : mergeAllOf;
|
|
1874
|
+
var tmp = GlobalScope_instance;
|
|
1875
|
+
return promise(tmp, VOID, VOID, dereferenceSchema$slambda_0(uri, mergeAllOf, null));
|
|
1876
|
+
}
|
|
1877
|
+
function dereferenceSchemaText(input, baseUri, mergeAllOf) {
|
|
1878
|
+
baseUri = baseUri === VOID ? 'memory://anonymous' : baseUri;
|
|
1879
|
+
mergeAllOf = mergeAllOf === VOID ? false : mergeAllOf;
|
|
1880
|
+
var tmp = GlobalScope_instance;
|
|
1881
|
+
return promise(tmp, VOID, VOID, dereferenceSchemaText$slambda_0(input, baseUri, mergeAllOf, null));
|
|
1882
|
+
}
|
|
1883
|
+
function exportParsedDocument(document) {
|
|
1884
|
+
var result = {};
|
|
1885
|
+
result.root = convertToPlain(document.v55_1);
|
|
1886
|
+
result.schema = convertToPlain(document.w55_1);
|
|
1887
|
+
result.locations = convertToPlain(document.x55_1);
|
|
1888
|
+
result.documentLocations = convertToPlain(document.y55_1);
|
|
1889
|
+
result.resolvedRefs = exportResolvedRefs(document.z55_1);
|
|
1890
|
+
result.hasCircularRefs = document.b56_1;
|
|
1891
|
+
return result;
|
|
1892
|
+
}
|
|
1893
|
+
function exportResolvedRefs(resolvedRefs) {
|
|
1894
|
+
var result = [];
|
|
1895
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1896
|
+
var _iterator__ex2g4s = resolvedRefs.i();
|
|
1897
|
+
while (_iterator__ex2g4s.j()) {
|
|
1898
|
+
var element = _iterator__ex2g4s.k();
|
|
1899
|
+
var item = {};
|
|
1900
|
+
item.refString = element.c56_1;
|
|
1901
|
+
item.targetUri = element.f56_1;
|
|
1902
|
+
result.push(item);
|
|
1903
|
+
}
|
|
1904
|
+
return result;
|
|
1905
|
+
}
|
|
1906
|
+
function convertToPlain(value) {
|
|
1907
|
+
var tmp;
|
|
1908
|
+
if (value == null) {
|
|
1909
|
+
tmp = null;
|
|
1910
|
+
} else {
|
|
1911
|
+
if (value instanceof SourceLocation) {
|
|
1912
|
+
tmp = exportSourceLocation(value);
|
|
1913
|
+
} else {
|
|
1914
|
+
if (isInterface(value, KtMap)) {
|
|
1915
|
+
var result = {};
|
|
1916
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1917
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1918
|
+
var _iterator__ex2g4s = value.u1().i();
|
|
1919
|
+
while (_iterator__ex2g4s.j()) {
|
|
1920
|
+
var element = _iterator__ex2g4s.k();
|
|
1921
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1922
|
+
var key = element.n1();
|
|
1923
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1924
|
+
var childValue = element.o1();
|
|
1925
|
+
result[toString_0(key)] = convertToPlain(childValue);
|
|
1926
|
+
}
|
|
1927
|
+
tmp = result;
|
|
1928
|
+
} else {
|
|
1929
|
+
if (isInterface(value, Collection)) {
|
|
1930
|
+
var result_0 = [];
|
|
1931
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1932
|
+
var _iterator__ex2g4s_0 = value.i();
|
|
1933
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
1934
|
+
var element_0 = _iterator__ex2g4s_0.k();
|
|
1935
|
+
result_0.push(convertToPlain(element_0));
|
|
1936
|
+
}
|
|
1937
|
+
tmp = result_0;
|
|
1938
|
+
} else {
|
|
1939
|
+
tmp = value;
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
return tmp;
|
|
1945
|
+
}
|
|
1946
|
+
function exportSourceLocation(location) {
|
|
1947
|
+
var result = {};
|
|
1948
|
+
result.file = location.m56_1;
|
|
1949
|
+
result.line = location.n56_1;
|
|
1950
|
+
result.column = location.o56_1;
|
|
1951
|
+
result.endLine = location.p56_1;
|
|
1952
|
+
result.endColumn = location.q56_1;
|
|
1953
|
+
return result;
|
|
1954
|
+
}
|
|
1955
|
+
function dereferenceSchema$slambda($uri, $mergeAllOf, resultContinuation) {
|
|
1956
|
+
this.z59_1 = $uri;
|
|
1957
|
+
this.a5a_1 = $mergeAllOf;
|
|
1958
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1959
|
+
}
|
|
1960
|
+
protoOf(dereferenceSchema$slambda).d5a = function ($this$promise, $completion) {
|
|
1961
|
+
var tmp = this.e5a($this$promise, $completion);
|
|
1962
|
+
tmp.b8_1 = Unit_instance;
|
|
1963
|
+
tmp.c8_1 = null;
|
|
1964
|
+
return tmp.h8();
|
|
1965
|
+
};
|
|
1966
|
+
protoOf(dereferenceSchema$slambda).p8 = function (p1, $completion) {
|
|
1967
|
+
return this.d5a((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
1968
|
+
};
|
|
1969
|
+
protoOf(dereferenceSchema$slambda).h8 = function () {
|
|
1970
|
+
var suspendResult = this.b8_1;
|
|
1971
|
+
$sm: do
|
|
1972
|
+
try {
|
|
1973
|
+
var tmp = this.z7_1;
|
|
1974
|
+
switch (tmp) {
|
|
1975
|
+
case 0:
|
|
1976
|
+
this.a8_1 = 4;
|
|
1977
|
+
this.z7_1 = 1;
|
|
1978
|
+
suspendResult = (new RefParser(this.z59_1)).q55(this);
|
|
1979
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1980
|
+
return suspendResult;
|
|
1981
|
+
}
|
|
1982
|
+
|
|
1983
|
+
continue $sm;
|
|
1984
|
+
case 1:
|
|
1985
|
+
this.c5a_1 = suspendResult;
|
|
1986
|
+
if (this.a5a_1) {
|
|
1987
|
+
this.z7_1 = 2;
|
|
1988
|
+
suspendResult = this.c5a_1.r55(this);
|
|
1989
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1990
|
+
return suspendResult;
|
|
1991
|
+
}
|
|
1992
|
+
continue $sm;
|
|
1993
|
+
} else {
|
|
1994
|
+
this.z7_1 = 3;
|
|
1995
|
+
continue $sm;
|
|
1996
|
+
}
|
|
1997
|
+
|
|
1998
|
+
case 2:
|
|
1999
|
+
this.z7_1 = 3;
|
|
2000
|
+
continue $sm;
|
|
2001
|
+
case 3:
|
|
2002
|
+
return exportParsedDocument(this.c5a_1.s55());
|
|
2003
|
+
case 4:
|
|
2004
|
+
throw this.c8_1;
|
|
2005
|
+
}
|
|
2006
|
+
} catch ($p) {
|
|
2007
|
+
var e = $p;
|
|
2008
|
+
if (this.a8_1 === 4) {
|
|
2009
|
+
throw e;
|
|
2010
|
+
} else {
|
|
2011
|
+
this.z7_1 = this.a8_1;
|
|
2012
|
+
this.c8_1 = e;
|
|
2013
|
+
}
|
|
2014
|
+
}
|
|
2015
|
+
while (true);
|
|
2016
|
+
};
|
|
2017
|
+
protoOf(dereferenceSchema$slambda).e5a = function ($this$promise, completion) {
|
|
2018
|
+
var i = new dereferenceSchema$slambda(this.z59_1, this.a5a_1, completion);
|
|
2019
|
+
i.b5a_1 = $this$promise;
|
|
2020
|
+
return i;
|
|
2021
|
+
};
|
|
2022
|
+
function dereferenceSchema$slambda_0($uri, $mergeAllOf, resultContinuation) {
|
|
2023
|
+
var i = new dereferenceSchema$slambda($uri, $mergeAllOf, resultContinuation);
|
|
2024
|
+
var l = function ($this$promise, $completion) {
|
|
2025
|
+
return i.d5a($this$promise, $completion);
|
|
2026
|
+
};
|
|
2027
|
+
l.$arity = 1;
|
|
2028
|
+
return l;
|
|
2029
|
+
}
|
|
2030
|
+
function dereferenceSchemaText$slambda($input, $baseUri, $mergeAllOf, resultContinuation) {
|
|
2031
|
+
this.n5a_1 = $input;
|
|
2032
|
+
this.o5a_1 = $baseUri;
|
|
2033
|
+
this.p5a_1 = $mergeAllOf;
|
|
2034
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2035
|
+
}
|
|
2036
|
+
protoOf(dereferenceSchemaText$slambda).d5a = function ($this$promise, $completion) {
|
|
2037
|
+
var tmp = this.e5a($this$promise, $completion);
|
|
2038
|
+
tmp.b8_1 = Unit_instance;
|
|
2039
|
+
tmp.c8_1 = null;
|
|
2040
|
+
return tmp.h8();
|
|
2041
|
+
};
|
|
2042
|
+
protoOf(dereferenceSchemaText$slambda).p8 = function (p1, $completion) {
|
|
2043
|
+
return this.d5a((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2044
|
+
};
|
|
2045
|
+
protoOf(dereferenceSchemaText$slambda).h8 = function () {
|
|
2046
|
+
var suspendResult = this.b8_1;
|
|
2047
|
+
$sm: do
|
|
2048
|
+
try {
|
|
2049
|
+
var tmp = this.z7_1;
|
|
2050
|
+
switch (tmp) {
|
|
2051
|
+
case 0:
|
|
2052
|
+
this.a8_1 = 4;
|
|
2053
|
+
this.z7_1 = 1;
|
|
2054
|
+
suspendResult = Companion_instance_0.q53(this.n5a_1, this.o5a_1).q55(this);
|
|
2055
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2056
|
+
return suspendResult;
|
|
2057
|
+
}
|
|
2058
|
+
|
|
2059
|
+
continue $sm;
|
|
2060
|
+
case 1:
|
|
2061
|
+
this.r5a_1 = suspendResult;
|
|
2062
|
+
if (this.p5a_1) {
|
|
2063
|
+
this.z7_1 = 2;
|
|
2064
|
+
suspendResult = this.r5a_1.r55(this);
|
|
2065
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2066
|
+
return suspendResult;
|
|
2067
|
+
}
|
|
2068
|
+
continue $sm;
|
|
2069
|
+
} else {
|
|
2070
|
+
this.z7_1 = 3;
|
|
2071
|
+
continue $sm;
|
|
2072
|
+
}
|
|
2073
|
+
|
|
2074
|
+
case 2:
|
|
2075
|
+
this.z7_1 = 3;
|
|
2076
|
+
continue $sm;
|
|
2077
|
+
case 3:
|
|
2078
|
+
return exportParsedDocument(this.r5a_1.s55());
|
|
2079
|
+
case 4:
|
|
2080
|
+
throw this.c8_1;
|
|
2081
|
+
}
|
|
2082
|
+
} catch ($p) {
|
|
2083
|
+
var e = $p;
|
|
2084
|
+
if (this.a8_1 === 4) {
|
|
2085
|
+
throw e;
|
|
2086
|
+
} else {
|
|
2087
|
+
this.z7_1 = this.a8_1;
|
|
2088
|
+
this.c8_1 = e;
|
|
2089
|
+
}
|
|
2090
|
+
}
|
|
2091
|
+
while (true);
|
|
2092
|
+
};
|
|
2093
|
+
protoOf(dereferenceSchemaText$slambda).e5a = function ($this$promise, completion) {
|
|
2094
|
+
var i = new dereferenceSchemaText$slambda(this.n5a_1, this.o5a_1, this.p5a_1, completion);
|
|
2095
|
+
i.q5a_1 = $this$promise;
|
|
2096
|
+
return i;
|
|
2097
|
+
};
|
|
2098
|
+
function dereferenceSchemaText$slambda_0($input, $baseUri, $mergeAllOf, resultContinuation) {
|
|
2099
|
+
var i = new dereferenceSchemaText$slambda($input, $baseUri, $mergeAllOf, resultContinuation);
|
|
2100
|
+
var l = function ($this$promise, $completion) {
|
|
2101
|
+
return i.d5a($this$promise, $completion);
|
|
2102
|
+
};
|
|
2103
|
+
l.$arity = 1;
|
|
2104
|
+
return l;
|
|
2105
|
+
}
|
|
2106
|
+
function defaultLoaders(auth) {
|
|
2107
|
+
auth = auth === VOID ? emptyList() : auth;
|
|
2108
|
+
return listOf_0([new NodeFsLoader(), new FetchLoader(auth)]);
|
|
2109
|
+
}
|
|
2110
|
+
function applyQueryAuth($this, url) {
|
|
2111
|
+
// Inline function 'kotlin.collections.filter' call
|
|
2112
|
+
var tmp0 = $this.s5a_1;
|
|
2113
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
2114
|
+
var destination = ArrayList_init_$Create$_0();
|
|
2115
|
+
var _iterator__ex2g4s = tmp0.i();
|
|
2116
|
+
while (_iterator__ex2g4s.j()) {
|
|
2117
|
+
var element = _iterator__ex2g4s.k();
|
|
2118
|
+
if (element.v5a_1.equals(AuthenticationType_QUERY_getInstance()) && element.y5a(url)) {
|
|
2119
|
+
destination.h(element);
|
|
2120
|
+
}
|
|
2121
|
+
}
|
|
2122
|
+
// Inline function 'kotlin.collections.map' call
|
|
2123
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2124
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(destination, 10));
|
|
2125
|
+
var _iterator__ex2g4s_0 = destination.i();
|
|
2126
|
+
while (_iterator__ex2g4s_0.j()) {
|
|
2127
|
+
var item = _iterator__ex2g4s_0.k();
|
|
2128
|
+
var tmp$ret$3 = encode($this, item.t5a_1) + '=' + encode($this, item.u5a_1);
|
|
2129
|
+
destination_0.h(tmp$ret$3);
|
|
2130
|
+
}
|
|
2131
|
+
var params = destination_0;
|
|
2132
|
+
if (params.l())
|
|
2133
|
+
return url;
|
|
2134
|
+
var separator = contains(url, '?') ? '&' : '?';
|
|
2135
|
+
return url + separator + joinToString(params, '&');
|
|
2136
|
+
}
|
|
2137
|
+
function encode($this, value) {
|
|
2138
|
+
return encodeURIComponent(value);
|
|
2139
|
+
}
|
|
2140
|
+
function $loadCOROUTINE$(_this__u8e3s4, uri, resultContinuation) {
|
|
2141
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2142
|
+
this.h5b_1 = _this__u8e3s4;
|
|
2143
|
+
this.i5b_1 = uri;
|
|
2144
|
+
}
|
|
2145
|
+
protoOf($loadCOROUTINE$).h8 = function () {
|
|
2146
|
+
var suspendResult = this.b8_1;
|
|
2147
|
+
$sm: do
|
|
2148
|
+
try {
|
|
2149
|
+
var tmp = this.z7_1;
|
|
2150
|
+
switch (tmp) {
|
|
2151
|
+
case 0:
|
|
2152
|
+
this.a8_1 = 3;
|
|
2153
|
+
this.j5b_1 = applyQueryAuth(this.h5b_1, this.i5b_1);
|
|
2154
|
+
var headers = {};
|
|
2155
|
+
headers['Accept'] = 'application/json, application/yaml, */*';
|
|
2156
|
+
var _iterator__ex2g4s = this.h5b_1.s5a_1.i();
|
|
2157
|
+
while (_iterator__ex2g4s.j()) {
|
|
2158
|
+
var a = _iterator__ex2g4s.k();
|
|
2159
|
+
if (a.v5a_1.equals(AuthenticationType_HEADER_getInstance()) && a.y5a(this.j5b_1)) {
|
|
2160
|
+
headers[a.t5a_1] = a.u5a_1;
|
|
2161
|
+
}
|
|
2162
|
+
}
|
|
2163
|
+
|
|
2164
|
+
var init = {};
|
|
2165
|
+
init['headers'] = headers;
|
|
2166
|
+
this.z7_1 = 1;
|
|
2167
|
+
suspendResult = await_0(fetch(this.j5b_1, init), this);
|
|
2168
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2169
|
+
return suspendResult;
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
continue $sm;
|
|
2173
|
+
case 1:
|
|
2174
|
+
var response = suspendResult;
|
|
2175
|
+
var tmp_0 = response.status;
|
|
2176
|
+
var status = (!(tmp_0 == null) ? typeof tmp_0 === 'number' : false) ? tmp_0 : THROW_CCE();
|
|
2177
|
+
if (status >= 400)
|
|
2178
|
+
throw RuntimeException_init_$Create$('HTTP ' + status + ' loading: ' + this.j5b_1);
|
|
2179
|
+
this.z7_1 = 2;
|
|
2180
|
+
var tmp_1 = response.text();
|
|
2181
|
+
suspendResult = await_0(tmp_1 instanceof Promise ? tmp_1 : THROW_CCE(), this);
|
|
2182
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2183
|
+
return suspendResult;
|
|
2184
|
+
}
|
|
2185
|
+
|
|
2186
|
+
continue $sm;
|
|
2187
|
+
case 2:
|
|
2188
|
+
return suspendResult;
|
|
2189
|
+
case 3:
|
|
2190
|
+
throw this.c8_1;
|
|
2191
|
+
}
|
|
2192
|
+
} catch ($p) {
|
|
2193
|
+
var e = $p;
|
|
2194
|
+
if (this.a8_1 === 3) {
|
|
2195
|
+
throw e;
|
|
2196
|
+
} else {
|
|
2197
|
+
this.z7_1 = this.a8_1;
|
|
2198
|
+
this.c8_1 = e;
|
|
2199
|
+
}
|
|
2200
|
+
}
|
|
2201
|
+
while (true);
|
|
2202
|
+
};
|
|
2203
|
+
function FetchLoader(auth) {
|
|
2204
|
+
auth = auth === VOID ? emptyList() : auth;
|
|
2205
|
+
this.s5a_1 = auth;
|
|
2206
|
+
}
|
|
2207
|
+
protoOf(FetchLoader).n54 = function (uri) {
|
|
2208
|
+
return startsWith(uri, 'http://') || startsWith(uri, 'https://');
|
|
2209
|
+
};
|
|
2210
|
+
protoOf(FetchLoader).o54 = function (uri, $completion) {
|
|
2211
|
+
var tmp = new $loadCOROUTINE$(this, uri, $completion);
|
|
2212
|
+
tmp.b8_1 = Unit_instance;
|
|
2213
|
+
tmp.c8_1 = null;
|
|
2214
|
+
return tmp.h8();
|
|
2215
|
+
};
|
|
2216
|
+
function readUtf8File($this, filePath) {
|
|
2217
|
+
return io_zenwave360_jsonrefparser_io_NodeFsModule_d06zrq.readFileSync(filePath, 'utf8');
|
|
2218
|
+
}
|
|
2219
|
+
function NodeFsLoader() {
|
|
2220
|
+
}
|
|
2221
|
+
protoOf(NodeFsLoader).n54 = function (uri) {
|
|
2222
|
+
return startsWith(uri, 'file://') || (!contains(uri, '://') && !startsWith(uri, 'classpath:'));
|
|
2223
|
+
};
|
|
2224
|
+
protoOf(NodeFsLoader).o54 = function (uri, $completion) {
|
|
2225
|
+
var normalizedUri = substringBefore(uri, _Char___init__impl__6a9atx(35));
|
|
2226
|
+
var tmp;
|
|
2227
|
+
// Inline function 'kotlin.text.matches' call
|
|
2228
|
+
if (Regex_init_$Create$('^file:///[A-Za-z]:/.*$').cb(normalizedUri)) {
|
|
2229
|
+
tmp = removePrefix(normalizedUri, 'file:///');
|
|
2230
|
+
} else {
|
|
2231
|
+
if (startsWith(normalizedUri, 'file:///')) {
|
|
2232
|
+
tmp = removePrefix(normalizedUri, 'file://');
|
|
2233
|
+
} else {
|
|
2234
|
+
if (startsWith(normalizedUri, 'file://')) {
|
|
2235
|
+
tmp = removePrefix(normalizedUri, 'file://');
|
|
2236
|
+
} else {
|
|
2237
|
+
tmp = normalizedUri;
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
var filePath = tmp;
|
|
2242
|
+
return readUtf8File(this, filePath);
|
|
2243
|
+
};
|
|
2244
|
+
//region block: init
|
|
2245
|
+
Companion_instance_0 = new Companion_0();
|
|
2246
|
+
Companion_instance_1 = new Companion_1();
|
|
2247
|
+
//endregion
|
|
2248
|
+
//region block: exports
|
|
2249
|
+
function $jsExportAll$(_) {
|
|
2250
|
+
var $io = _.io || (_.io = {});
|
|
2251
|
+
var $io$zenwave360 = $io.zenwave360 || ($io.zenwave360 = {});
|
|
2252
|
+
var $io$zenwave360$jsonrefparser = $io$zenwave360.jsonrefparser || ($io$zenwave360.jsonrefparser = {});
|
|
2253
|
+
$io$zenwave360$jsonrefparser.parseSchemaText = parseSchemaText;
|
|
2254
|
+
$io$zenwave360$jsonrefparser.dereferenceSchema = dereferenceSchema;
|
|
2255
|
+
$io$zenwave360$jsonrefparser.dereferenceSchemaText = dereferenceSchemaText;
|
|
2256
|
+
}
|
|
2257
|
+
$jsExportAll$(_);
|
|
2258
|
+
_.$jsExportAll$ = $jsExportAll$;
|
|
2259
|
+
//endregion
|
|
2260
|
+
return _;
|
|
2261
|
+
}));
|
|
2262
|
+
|
|
2263
|
+
//# sourceMappingURL=json-schema-ref-parser-kmp.js.map
|