@zenwave360/json-schema-ref-parser-kmp 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 +495 -0
- package/kotlin/json-schema-ref-parser-kmp.d.mts +6 -0
- package/kotlin/json-schema-ref-parser-kmp.mjs +2471 -0
- package/kotlin/json-schema-ref-parser-kmp.mjs.map +1 -0
- package/kotlin/kotlin-kotlin-stdlib.mjs +8323 -0
- package/kotlin/kotlin-kotlin-stdlib.mjs.map +1 -0
- package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs +4 -0
- package/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.mjs.map +1 -0
- package/kotlin/kotlinx-atomicfu.mjs +162 -0
- package/kotlin/kotlinx-atomicfu.mjs.map +1 -0
- package/kotlin/kotlinx-coroutines-core.mjs +3549 -0
- package/kotlin/kotlinx-coroutines-core.mjs.map +1 -0
- package/kotlin/okio-parent-okio.mjs +2497 -0
- package/kotlin/okio-parent-okio.mjs.map +1 -0
- package/kotlin/snakeyaml-engine-kmp.mjs +5826 -0
- package/kotlin/snakeyaml-engine-kmp.mjs.map +1 -0
- package/kotlin/urlencoder-urlencoder-lib.mjs +310 -0
- package/kotlin/urlencoder-urlencoder-lib.mjs.map +1 -0
- package/package.json +37 -0
|
@@ -0,0 +1,2471 @@
|
|
|
1
|
+
import {
|
|
2
|
+
emptyList1g2z5xcrvp2zy as emptyList,
|
|
3
|
+
charSequenceLength3278n89t01tmv as charSequenceLength,
|
|
4
|
+
startsWith26w8qjqapeeq6 as startsWith,
|
|
5
|
+
toString1pkumu07cwy4m as toString,
|
|
6
|
+
IllegalArgumentException_init_$Create$3ewkh27kzt8z8 as IllegalArgumentException_init_$Create$,
|
|
7
|
+
Unit_instance1fbcbse1fwigr as Unit_instance,
|
|
8
|
+
drop336950s126lmj as drop,
|
|
9
|
+
split2bvyvnrlcifjv as split,
|
|
10
|
+
collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
|
|
11
|
+
ArrayList_init_$Create$3bxttkj3v1mea as ArrayList_init_$Create$,
|
|
12
|
+
replace3le3ie7l9k8aq as replace,
|
|
13
|
+
protoOf180f3jzyo7rfj as protoOf,
|
|
14
|
+
initMetadataForCompanion1wyw17z38v6ac as initMetadataForCompanion,
|
|
15
|
+
plus20p0vtfmu0596 as plus,
|
|
16
|
+
toIntOrNull3w2d066r9pvwm as toIntOrNull,
|
|
17
|
+
getOrNull1go7ef9ldk0df as getOrNull,
|
|
18
|
+
KtList3hktaavzmj137 as KtList,
|
|
19
|
+
isInterface3d6p8outrmvmk as isInterface,
|
|
20
|
+
THROW_CCE2g6jy02ryeudk as THROW_CCE,
|
|
21
|
+
KtMap140uvy3s5zad8 as KtMap,
|
|
22
|
+
joinToString1cxrrlmo0chqs as joinToString,
|
|
23
|
+
hashCodeq5arwsb9dgti as hashCode,
|
|
24
|
+
equals2au1ep9vhcato as equals,
|
|
25
|
+
initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
|
|
26
|
+
listOfvhqybd2zx248 as listOf,
|
|
27
|
+
plus310ted5e4i90h as plus_0,
|
|
28
|
+
VOID3gxj6tk5isa35 as VOID,
|
|
29
|
+
removePrefix279df90bhrqqg as removePrefix,
|
|
30
|
+
_Char___init__impl__6a9atx2js6krycynjoo as _Char___init__impl__6a9atx,
|
|
31
|
+
indexOf1xbs558u7wr52 as indexOf,
|
|
32
|
+
replaceqbix900hl8kl as replace_0,
|
|
33
|
+
CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
|
|
34
|
+
IllegalStateException_init_$Create$2w9444nebyjns as IllegalStateException_init_$Create$,
|
|
35
|
+
get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
|
|
36
|
+
toMutableMapr5f3w62lv8sk as toMutableMap,
|
|
37
|
+
to2cs3ny02qtbcb as to,
|
|
38
|
+
mutableMapOfk2y3zt1azl40 as mutableMapOf,
|
|
39
|
+
initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
|
|
40
|
+
LinkedHashMap_init_$Create$1f9mb1z5f3dxn as LinkedHashMap_init_$Create$,
|
|
41
|
+
ArrayList_init_$Create$149jv2ovkkvnt as ArrayList_init_$Create$_0,
|
|
42
|
+
Enum3alwj03lh1n41 as Enum,
|
|
43
|
+
emptyMapr06gerzljqtm as emptyMap,
|
|
44
|
+
toString30pk9tzaqopn as toString_0,
|
|
45
|
+
getBooleanHashCode1bbj3u6b3v0a7 as getBooleanHashCode,
|
|
46
|
+
getStringHashCode26igk1bx568vk as getStringHashCode,
|
|
47
|
+
RuntimeException1r3t0zl97011n as RuntimeException,
|
|
48
|
+
RuntimeException_init_$Init$1tdhpyy2sm4eb as RuntimeException_init_$Init$,
|
|
49
|
+
captureStack1fzi4aczwc4hg as captureStack,
|
|
50
|
+
RuntimeException_init_$Init$3m7ccek2krm3f as RuntimeException_init_$Init$_0,
|
|
51
|
+
KtMutableMap1kqeifoi36kpz as KtMutableMap,
|
|
52
|
+
checkIndexOverflow3frtmheghr0th as checkIndexOverflow,
|
|
53
|
+
toMutableList20rdgwi7d3cwi as toMutableList,
|
|
54
|
+
toLongOrNullutqivezb0wx1 as toLongOrNull,
|
|
55
|
+
toDoubleOrNullkxwozihadygj as toDoubleOrNull,
|
|
56
|
+
UnsupportedOperationException2tkumpmhredt3 as UnsupportedOperationException,
|
|
57
|
+
UnsupportedOperationException_init_$Init$gy0ruepqkvcg as UnsupportedOperationException_init_$Init$,
|
|
58
|
+
contains3ue2qo8xhmpf1 as contains,
|
|
59
|
+
initMetadataForObject1cxne3s9w65el as initMetadataForObject,
|
|
60
|
+
LinkedHashSet_init_$Create$3o6z3oewjhki9 as LinkedHashSet_init_$Create$,
|
|
61
|
+
Collection1k04j3hzsbod0 as Collection,
|
|
62
|
+
get_lastIndex1yw0x4k50k51w as get_lastIndex,
|
|
63
|
+
KtMutableList1beimitadwkna as KtMutableList,
|
|
64
|
+
toList3jhuyej2anx2q as toList,
|
|
65
|
+
noWhenBranchMatchedException2a6r7ubxgky5j as noWhenBranchMatchedException,
|
|
66
|
+
get_indices3txodfl5wuu5j as get_indices,
|
|
67
|
+
Exceptiondt2hlxn7j7vw as Exception,
|
|
68
|
+
indexOfwa4w6635jewi as indexOf_0,
|
|
69
|
+
substringiqarkczpya5m as substring,
|
|
70
|
+
substring3saq8ornu0luv as substring_0,
|
|
71
|
+
substringBeforeLast14532pi2uwutw as substringBeforeLast,
|
|
72
|
+
mapOf2zpbbmyqk8xpf as mapOf,
|
|
73
|
+
initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
|
|
74
|
+
listOf1jh22dvmctj1r as listOf_0,
|
|
75
|
+
RuntimeException_init_$Create$17ncyu0a6xfek as RuntimeException_init_$Create$,
|
|
76
|
+
substringBefore3n7kj60w69hju as substringBefore,
|
|
77
|
+
Regex_init_$Create$20u56movc9c5j as Regex_init_$Create$,
|
|
78
|
+
} from './kotlin-kotlin-stdlib.mjs';
|
|
79
|
+
import {
|
|
80
|
+
Composevpvpvvmkgfnr as Compose,
|
|
81
|
+
ScalarNodeyar1tgjx77h9 as ScalarNode,
|
|
82
|
+
SequenceNode2j3tyb9jdhysy as SequenceNode,
|
|
83
|
+
MappingNode1895175mobwig as MappingNode,
|
|
84
|
+
LoadSettings1liqg4fxtcrt0 as LoadSettings,
|
|
85
|
+
} from './snakeyaml-engine-kmp.mjs';
|
|
86
|
+
import {
|
|
87
|
+
GlobalScope_instance1sfulufhd2ijt as GlobalScope_instance,
|
|
88
|
+
promise1ky6tawqaxbt4 as promise,
|
|
89
|
+
CoroutineScopefcb5f5dwqcas as CoroutineScope,
|
|
90
|
+
await20nhgj9iqzkt as await_0,
|
|
91
|
+
} from './kotlinx-coroutines-core.mjs';
|
|
92
|
+
//region block: imports
|
|
93
|
+
var imul = Math.imul;
|
|
94
|
+
//endregion
|
|
95
|
+
//region block: pre-declaration
|
|
96
|
+
initMetadataForCompanion(Companion);
|
|
97
|
+
initMetadataForClass(JsonPointer, 'JsonPointer');
|
|
98
|
+
initMetadataForCompanion(Companion_0);
|
|
99
|
+
initMetadataForCoroutine($parseCOROUTINE$, CoroutineImpl);
|
|
100
|
+
initMetadataForCoroutine($dereferenceCOROUTINE$, CoroutineImpl);
|
|
101
|
+
initMetadataForClass(RefParser, 'RefParser', VOID, VOID, VOID, [0]);
|
|
102
|
+
initMetadataForClass(InMemoryLoader, 'InMemoryLoader', VOID, VOID, VOID, [1]);
|
|
103
|
+
initMetadataForClass(AuthenticationType, 'AuthenticationType', VOID, Enum);
|
|
104
|
+
initMetadataForClass(ParsedDocument, 'ParsedDocument');
|
|
105
|
+
initMetadataForClass(ResolvedRef, 'ResolvedRef');
|
|
106
|
+
initMetadataForClass(OriginalAllOf, 'OriginalAllOf');
|
|
107
|
+
initMetadataForClass(OnCircular, 'OnCircular', VOID, Enum);
|
|
108
|
+
initMetadataForClass(OnMissing, 'OnMissing', VOID, Enum);
|
|
109
|
+
initMetadataForClass(RefParserOptions, 'RefParserOptions', RefParserOptions);
|
|
110
|
+
initMetadataForClass(CircularReferenceException, 'CircularReferenceException', VOID, RuntimeException);
|
|
111
|
+
initMetadataForClass(MissingRefException, 'MissingRefException', VOID, RuntimeException);
|
|
112
|
+
initMetadataForClass(SourceLocation, 'SourceLocation');
|
|
113
|
+
initMetadataForClass(RawDocument, 'RawDocument');
|
|
114
|
+
initMetadataForClass(CapabilityUnavailableException, 'CapabilityUnavailableException', VOID, UnsupportedOperationException);
|
|
115
|
+
initMetadataForObject(RefParserPlatform, 'RefParserPlatform');
|
|
116
|
+
initMetadataForClass(ResolvingContext, 'ResolvingContext');
|
|
117
|
+
initMetadataForClass(IdentityStack, 'IdentityStack', IdentityStack);
|
|
118
|
+
initMetadataForClass(AllOfAccumulator, 'AllOfAccumulator', AllOfAccumulator);
|
|
119
|
+
initMetadataForCoroutine($resolveDocumentCOROUTINE$, CoroutineImpl);
|
|
120
|
+
initMetadataForCoroutine($resolveValueCOROUTINE$, CoroutineImpl);
|
|
121
|
+
initMetadataForCoroutine($resolveRefCOROUTINE$, CoroutineImpl);
|
|
122
|
+
initMetadataForCoroutine($loadFileCOROUTINE$, CoroutineImpl);
|
|
123
|
+
initMetadataForClass(SchemaRefFormat, 'SchemaRefFormat', VOID, Enum);
|
|
124
|
+
initMetadataForCompanion(Companion_1);
|
|
125
|
+
initMetadataForClass(SchemaRef, 'SchemaRef');
|
|
126
|
+
initMetadataForLambda(dereferenceSchema$slambda, CoroutineImpl, VOID, [1]);
|
|
127
|
+
initMetadataForLambda(dereferenceSchemaText$slambda, CoroutineImpl, VOID, [1]);
|
|
128
|
+
initMetadataForCoroutine($loadCOROUTINE$, CoroutineImpl);
|
|
129
|
+
initMetadataForClass(FetchLoader, 'FetchLoader', FetchLoader, VOID, VOID, [1]);
|
|
130
|
+
initMetadataForCoroutine($readUtf8FileCOROUTINE$, CoroutineImpl);
|
|
131
|
+
initMetadataForClass(NodeFsLoader, 'NodeFsLoader', NodeFsLoader, VOID, VOID, [1]);
|
|
132
|
+
initMetadataForCoroutine($nodeFsCOROUTINE$, CoroutineImpl);
|
|
133
|
+
initMetadataForCoroutine($resolveNodeFsCOROUTINE$, CoroutineImpl);
|
|
134
|
+
//endregion
|
|
135
|
+
function Companion() {
|
|
136
|
+
Companion_instance = this;
|
|
137
|
+
this.g17_1 = new JsonPointer(emptyList());
|
|
138
|
+
}
|
|
139
|
+
protoOf(Companion).h17 = function (pointer) {
|
|
140
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
141
|
+
if (charSequenceLength(pointer) === 0)
|
|
142
|
+
return this.g17_1;
|
|
143
|
+
// Inline function 'kotlin.require' call
|
|
144
|
+
if (!startsWith(pointer, '/')) {
|
|
145
|
+
var message = 'JSON Pointer must start with /: ' + pointer;
|
|
146
|
+
throw IllegalArgumentException_init_$Create$(toString(message));
|
|
147
|
+
}
|
|
148
|
+
// Inline function 'kotlin.collections.map' call
|
|
149
|
+
var this_0 = split(drop(pointer, 1), ['/']);
|
|
150
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
151
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
152
|
+
var _iterator__ex2g4s = this_0.f();
|
|
153
|
+
while (_iterator__ex2g4s.g()) {
|
|
154
|
+
var item = _iterator__ex2g4s.h();
|
|
155
|
+
var tmp$ret$3 = replace(replace(item, '~1', '/'), '~0', '~');
|
|
156
|
+
destination.d(tmp$ret$3);
|
|
157
|
+
}
|
|
158
|
+
return new JsonPointer(destination);
|
|
159
|
+
};
|
|
160
|
+
protoOf(Companion).i17 = function (fragment) {
|
|
161
|
+
var tmp;
|
|
162
|
+
var tmp_0;
|
|
163
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
164
|
+
if (charSequenceLength(fragment) === 0) {
|
|
165
|
+
tmp_0 = true;
|
|
166
|
+
} else {
|
|
167
|
+
tmp_0 = fragment === '#';
|
|
168
|
+
}
|
|
169
|
+
if (tmp_0) {
|
|
170
|
+
tmp = true;
|
|
171
|
+
} else {
|
|
172
|
+
tmp = fragment === '#/';
|
|
173
|
+
}
|
|
174
|
+
if (tmp)
|
|
175
|
+
return this.g17_1;
|
|
176
|
+
var pointer = startsWith(fragment, '#') ? drop(fragment, 1) : fragment;
|
|
177
|
+
return this.h17(pointer);
|
|
178
|
+
};
|
|
179
|
+
var Companion_instance;
|
|
180
|
+
function Companion_getInstance() {
|
|
181
|
+
if (Companion_instance == null)
|
|
182
|
+
new Companion();
|
|
183
|
+
return Companion_instance;
|
|
184
|
+
}
|
|
185
|
+
function JsonPointer(tokens) {
|
|
186
|
+
Companion_getInstance();
|
|
187
|
+
this.j17_1 = tokens;
|
|
188
|
+
}
|
|
189
|
+
protoOf(JsonPointer).k17 = function (key) {
|
|
190
|
+
return new JsonPointer(plus(this.j17_1, replace(replace(key, '~', '~0'), '/', '~1')));
|
|
191
|
+
};
|
|
192
|
+
protoOf(JsonPointer).l17 = function (index) {
|
|
193
|
+
return new JsonPointer(plus(this.j17_1, index.toString()));
|
|
194
|
+
};
|
|
195
|
+
protoOf(JsonPointer).m17 = function (document) {
|
|
196
|
+
var current = document;
|
|
197
|
+
var _iterator__ex2g4s = this.j17_1.f();
|
|
198
|
+
while (_iterator__ex2g4s.g()) {
|
|
199
|
+
var token = _iterator__ex2g4s.h();
|
|
200
|
+
var tmp0_subject = current;
|
|
201
|
+
var tmp;
|
|
202
|
+
if (!(tmp0_subject == null) ? isInterface(tmp0_subject, KtMap) : false) {
|
|
203
|
+
// Inline function 'kotlin.collections.get' call
|
|
204
|
+
var this_0 = current;
|
|
205
|
+
tmp = (isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).m1(token);
|
|
206
|
+
} else {
|
|
207
|
+
if (!(tmp0_subject == null) ? isInterface(tmp0_subject, KtList) : false) {
|
|
208
|
+
var tmp_0 = current;
|
|
209
|
+
var tmp1_elvis_lhs = toIntOrNull(token);
|
|
210
|
+
var tmp_1;
|
|
211
|
+
if (tmp1_elvis_lhs == null) {
|
|
212
|
+
return null;
|
|
213
|
+
} else {
|
|
214
|
+
tmp_1 = tmp1_elvis_lhs;
|
|
215
|
+
}
|
|
216
|
+
tmp = getOrNull(tmp_0, tmp_1);
|
|
217
|
+
} else {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
current = tmp;
|
|
222
|
+
}
|
|
223
|
+
return current;
|
|
224
|
+
};
|
|
225
|
+
protoOf(JsonPointer).toString = function () {
|
|
226
|
+
return this.j17_1.p() ? '' : '/' + joinToString(this.j17_1, '/');
|
|
227
|
+
};
|
|
228
|
+
protoOf(JsonPointer).hashCode = function () {
|
|
229
|
+
return hashCode(this.j17_1);
|
|
230
|
+
};
|
|
231
|
+
protoOf(JsonPointer).equals = function (other) {
|
|
232
|
+
if (this === other)
|
|
233
|
+
return true;
|
|
234
|
+
if (!(other instanceof JsonPointer))
|
|
235
|
+
return false;
|
|
236
|
+
if (!equals(this.j17_1, other.j17_1))
|
|
237
|
+
return false;
|
|
238
|
+
return true;
|
|
239
|
+
};
|
|
240
|
+
function Companion_0() {
|
|
241
|
+
}
|
|
242
|
+
protoOf(Companion_0).n17 = function (text, baseUri, options, auth, loaders) {
|
|
243
|
+
var memLoader = new InMemoryLoader(baseUri, text);
|
|
244
|
+
var resolvedLoaders = loaders == null ? defaultLoaders(auth) : loaders;
|
|
245
|
+
return new RefParser(baseUri, options, auth, plus_0(listOf(memLoader), resolvedLoaders));
|
|
246
|
+
};
|
|
247
|
+
protoOf(Companion_0).o17 = function (text, baseUri, options, auth, loaders, $super) {
|
|
248
|
+
baseUri = baseUri === VOID ? 'memory://anonymous' : baseUri;
|
|
249
|
+
options = options === VOID ? new RefParserOptions() : options;
|
|
250
|
+
auth = auth === VOID ? emptyList() : auth;
|
|
251
|
+
loaders = loaders === VOID ? null : loaders;
|
|
252
|
+
return $super === VOID ? this.n17(text, baseUri, options, auth, loaders) : $super.n17.call(this, text, baseUri, options, auth, loaders);
|
|
253
|
+
};
|
|
254
|
+
protoOf(Companion_0).p17 = function (rawUri) {
|
|
255
|
+
if (startsWith(rawUri, 'classpath:') && !startsWith(rawUri, 'classpath:/')) {
|
|
256
|
+
return 'classpath:/' + removePrefix(rawUri, 'classpath:');
|
|
257
|
+
}
|
|
258
|
+
var colonIdx = indexOf(rawUri, _Char___init__impl__6a9atx(58));
|
|
259
|
+
if (colonIdx < 0) {
|
|
260
|
+
var normalized = replace_0(rawUri, _Char___init__impl__6a9atx(92), _Char___init__impl__6a9atx(47));
|
|
261
|
+
return startsWith(normalized, '/') ? 'file://' + normalized : 'file:///' + normalized;
|
|
262
|
+
}
|
|
263
|
+
if (colonIdx === 1) {
|
|
264
|
+
var normalized_0 = replace_0(rawUri, _Char___init__impl__6a9atx(92), _Char___init__impl__6a9atx(47));
|
|
265
|
+
return 'file:///' + normalized_0;
|
|
266
|
+
}
|
|
267
|
+
return rawUri;
|
|
268
|
+
};
|
|
269
|
+
var Companion_instance_0;
|
|
270
|
+
function Companion_getInstance_0() {
|
|
271
|
+
return Companion_instance_0;
|
|
272
|
+
}
|
|
273
|
+
function $parseCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
274
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
275
|
+
this.y17_1 = _this__u8e3s4;
|
|
276
|
+
}
|
|
277
|
+
protoOf($parseCOROUTINE$).c7 = function () {
|
|
278
|
+
var suspendResult = this.w6_1;
|
|
279
|
+
$sm: do
|
|
280
|
+
try {
|
|
281
|
+
var tmp = this.u6_1;
|
|
282
|
+
switch (tmp) {
|
|
283
|
+
case 0:
|
|
284
|
+
this.v6_1 = 2;
|
|
285
|
+
var tmp0 = this.y17_1.c18_1;
|
|
286
|
+
var tmp$ret$0;
|
|
287
|
+
l$ret$1: do {
|
|
288
|
+
var _iterator__ex2g4s = tmp0.f();
|
|
289
|
+
while (_iterator__ex2g4s.g()) {
|
|
290
|
+
var element = _iterator__ex2g4s.h();
|
|
291
|
+
if (element.l18(this.y17_1.d18_1)) {
|
|
292
|
+
tmp$ret$0 = element;
|
|
293
|
+
break l$ret$1;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
tmp$ret$0 = null;
|
|
297
|
+
}
|
|
298
|
+
while (false);
|
|
299
|
+
var tmp0_elvis_lhs = tmp$ret$0;
|
|
300
|
+
var tmp_0;
|
|
301
|
+
if (tmp0_elvis_lhs == null) {
|
|
302
|
+
var tmp1_elvis_lhs = RefParserPlatform_instance.p18(this.y17_1.d18_1);
|
|
303
|
+
throw tmp1_elvis_lhs == null ? IllegalStateException_init_$Create$('No loader available for URI: ' + this.y17_1.d18_1) : tmp1_elvis_lhs;
|
|
304
|
+
} else {
|
|
305
|
+
tmp_0 = tmp0_elvis_lhs;
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
var loader = tmp_0;
|
|
309
|
+
this.u6_1 = 1;
|
|
310
|
+
suspendResult = loader.q18(this.y17_1.d18_1, this);
|
|
311
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
312
|
+
return suspendResult;
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
continue $sm;
|
|
316
|
+
case 1:
|
|
317
|
+
var text = suspendResult;
|
|
318
|
+
var raw = parseText(text, this.y17_1.d18_1);
|
|
319
|
+
this.y17_1.e18_1 = raw.t18_1;
|
|
320
|
+
this.y17_1.f18_1 = raw.u18_1;
|
|
321
|
+
this.y17_1.g18_1 = mutableMapOf([to(raw.r18_1, toMutableMap(raw.u18_1))]);
|
|
322
|
+
this.y17_1.k18_1 = raw.s18_1;
|
|
323
|
+
return this.y17_1;
|
|
324
|
+
case 2:
|
|
325
|
+
throw this.x6_1;
|
|
326
|
+
}
|
|
327
|
+
} catch ($p) {
|
|
328
|
+
var e = $p;
|
|
329
|
+
if (this.v6_1 === 2) {
|
|
330
|
+
throw e;
|
|
331
|
+
} else {
|
|
332
|
+
this.u6_1 = this.v6_1;
|
|
333
|
+
this.x6_1 = e;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
while (true);
|
|
337
|
+
};
|
|
338
|
+
function $dereferenceCOROUTINE$(_this__u8e3s4, resultContinuation) {
|
|
339
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
340
|
+
this.d19_1 = _this__u8e3s4;
|
|
341
|
+
}
|
|
342
|
+
protoOf($dereferenceCOROUTINE$).c7 = function () {
|
|
343
|
+
var suspendResult = this.w6_1;
|
|
344
|
+
$sm: do
|
|
345
|
+
try {
|
|
346
|
+
var tmp = this.u6_1;
|
|
347
|
+
switch (tmp) {
|
|
348
|
+
case 0:
|
|
349
|
+
this.v6_1 = 4;
|
|
350
|
+
if (this.d19_1.e18_1.p() && this.d19_1.f18_1.p()) {
|
|
351
|
+
this.u6_1 = 1;
|
|
352
|
+
suspendResult = this.d19_1.f19(this);
|
|
353
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
354
|
+
return suspendResult;
|
|
355
|
+
}
|
|
356
|
+
continue $sm;
|
|
357
|
+
} else {
|
|
358
|
+
this.u6_1 = 2;
|
|
359
|
+
continue $sm;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
case 1:
|
|
363
|
+
this.u6_1 = 2;
|
|
364
|
+
continue $sm;
|
|
365
|
+
case 2:
|
|
366
|
+
this.e19_1 = new ResolvingContext(this.d19_1.a18_1, this.d19_1.c18_1, this.d19_1.b18_1, this.d19_1.f18_1);
|
|
367
|
+
var raw = new RawDocument(this.d19_1.d18_1, this.d19_1.e18_1, this.d19_1.e18_1, this.d19_1.f18_1);
|
|
368
|
+
this.u6_1 = 3;
|
|
369
|
+
suspendResult = resolveDocument(raw, this.e19_1, this);
|
|
370
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
371
|
+
return suspendResult;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
continue $sm;
|
|
375
|
+
case 3:
|
|
376
|
+
var ARGUMENT = suspendResult;
|
|
377
|
+
this.d19_1.e18_1 = ARGUMENT;
|
|
378
|
+
this.d19_1.h18_1 = this.e19_1.p19_1;
|
|
379
|
+
this.d19_1.g18_1 = this.e19_1.r19_1;
|
|
380
|
+
this.d19_1.j18_1 = this.e19_1.o19_1;
|
|
381
|
+
return this.d19_1;
|
|
382
|
+
case 4:
|
|
383
|
+
throw this.x6_1;
|
|
384
|
+
}
|
|
385
|
+
} catch ($p) {
|
|
386
|
+
var e = $p;
|
|
387
|
+
if (this.v6_1 === 4) {
|
|
388
|
+
throw e;
|
|
389
|
+
} else {
|
|
390
|
+
this.u6_1 = this.v6_1;
|
|
391
|
+
this.x6_1 = e;
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
while (true);
|
|
395
|
+
};
|
|
396
|
+
function RefParser(uri, options, auth, loaders) {
|
|
397
|
+
options = options === VOID ? new RefParserOptions() : options;
|
|
398
|
+
auth = auth === VOID ? emptyList() : auth;
|
|
399
|
+
loaders = loaders === VOID ? defaultLoaders() : loaders;
|
|
400
|
+
this.z17_1 = uri;
|
|
401
|
+
this.a18_1 = options;
|
|
402
|
+
this.b18_1 = auth;
|
|
403
|
+
this.c18_1 = loaders;
|
|
404
|
+
this.d18_1 = Companion_instance_0.p17(this.z17_1);
|
|
405
|
+
var tmp = this;
|
|
406
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
407
|
+
tmp.e18_1 = LinkedHashMap_init_$Create$();
|
|
408
|
+
var tmp_0 = this;
|
|
409
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
410
|
+
tmp_0.f18_1 = LinkedHashMap_init_$Create$();
|
|
411
|
+
var tmp_1 = this;
|
|
412
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
413
|
+
tmp_1.g18_1 = LinkedHashMap_init_$Create$();
|
|
414
|
+
this.h18_1 = emptyList();
|
|
415
|
+
var tmp_2 = this;
|
|
416
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
417
|
+
tmp_2.i18_1 = ArrayList_init_$Create$_0();
|
|
418
|
+
this.j18_1 = false;
|
|
419
|
+
this.k18_1 = null;
|
|
420
|
+
}
|
|
421
|
+
protoOf(RefParser).f19 = function ($completion) {
|
|
422
|
+
var tmp = new $parseCOROUTINE$(this, $completion);
|
|
423
|
+
tmp.w6_1 = Unit_instance;
|
|
424
|
+
tmp.x6_1 = null;
|
|
425
|
+
return tmp.c7();
|
|
426
|
+
};
|
|
427
|
+
protoOf(RefParser).s19 = function ($completion) {
|
|
428
|
+
var tmp = new $dereferenceCOROUTINE$(this, $completion);
|
|
429
|
+
tmp.w6_1 = Unit_instance;
|
|
430
|
+
tmp.x6_1 = null;
|
|
431
|
+
return tmp.c7();
|
|
432
|
+
};
|
|
433
|
+
protoOf(RefParser).t19 = function ($completion) {
|
|
434
|
+
var tmp = this;
|
|
435
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
436
|
+
tmp.i18_1 = ArrayList_init_$Create$_0();
|
|
437
|
+
mergeAllOf(this.e18_1, VOID, this.i18_1);
|
|
438
|
+
return this;
|
|
439
|
+
};
|
|
440
|
+
protoOf(RefParser).u19 = function () {
|
|
441
|
+
var tmp0_elvis_lhs = this.k18_1;
|
|
442
|
+
return new ParsedDocument(tmp0_elvis_lhs == null ? this.e18_1 : tmp0_elvis_lhs, this.e18_1, this.f18_1, this.g18_1, this.h18_1, this.i18_1, this.j18_1);
|
|
443
|
+
};
|
|
444
|
+
function InMemoryLoader(uri, content) {
|
|
445
|
+
this.v19_1 = uri;
|
|
446
|
+
this.w19_1 = content;
|
|
447
|
+
}
|
|
448
|
+
protoOf(InMemoryLoader).l18 = function (uri) {
|
|
449
|
+
return uri === this.v19_1;
|
|
450
|
+
};
|
|
451
|
+
protoOf(InMemoryLoader).q18 = function (uri, $completion) {
|
|
452
|
+
return this.w19_1;
|
|
453
|
+
};
|
|
454
|
+
var AuthenticationType_QUERY_instance;
|
|
455
|
+
var AuthenticationType_HEADER_instance;
|
|
456
|
+
var AuthenticationType_entriesInitialized;
|
|
457
|
+
function AuthenticationType_initEntries() {
|
|
458
|
+
if (AuthenticationType_entriesInitialized)
|
|
459
|
+
return Unit_instance;
|
|
460
|
+
AuthenticationType_entriesInitialized = true;
|
|
461
|
+
AuthenticationType_QUERY_instance = new AuthenticationType('QUERY', 0);
|
|
462
|
+
AuthenticationType_HEADER_instance = new AuthenticationType('HEADER', 1);
|
|
463
|
+
}
|
|
464
|
+
function AuthenticationType(name, ordinal) {
|
|
465
|
+
Enum.call(this, name, ordinal);
|
|
466
|
+
}
|
|
467
|
+
function AuthenticationType_QUERY_getInstance() {
|
|
468
|
+
AuthenticationType_initEntries();
|
|
469
|
+
return AuthenticationType_QUERY_instance;
|
|
470
|
+
}
|
|
471
|
+
function AuthenticationType_HEADER_getInstance() {
|
|
472
|
+
AuthenticationType_initEntries();
|
|
473
|
+
return AuthenticationType_HEADER_instance;
|
|
474
|
+
}
|
|
475
|
+
function ParsedDocument(root, schema, locations, documentLocations, resolvedRefs, originalAllOfs, hasCircularRefs) {
|
|
476
|
+
documentLocations = documentLocations === VOID ? emptyMap() : documentLocations;
|
|
477
|
+
resolvedRefs = resolvedRefs === VOID ? emptyList() : resolvedRefs;
|
|
478
|
+
originalAllOfs = originalAllOfs === VOID ? emptyList() : originalAllOfs;
|
|
479
|
+
hasCircularRefs = hasCircularRefs === VOID ? false : hasCircularRefs;
|
|
480
|
+
this.x19_1 = root;
|
|
481
|
+
this.y19_1 = schema;
|
|
482
|
+
this.z19_1 = locations;
|
|
483
|
+
this.a1a_1 = documentLocations;
|
|
484
|
+
this.b1a_1 = resolvedRefs;
|
|
485
|
+
this.c1a_1 = originalAllOfs;
|
|
486
|
+
this.d1a_1 = hasCircularRefs;
|
|
487
|
+
}
|
|
488
|
+
protoOf(ParsedDocument).toString = function () {
|
|
489
|
+
return 'ParsedDocument(root=' + toString_0(this.x19_1) + ', schema=' + toString(this.y19_1) + ', locations=' + toString(this.z19_1) + ', documentLocations=' + toString(this.a1a_1) + ', resolvedRefs=' + toString(this.b1a_1) + ', originalAllOfs=' + toString(this.c1a_1) + ', hasCircularRefs=' + this.d1a_1 + ')';
|
|
490
|
+
};
|
|
491
|
+
protoOf(ParsedDocument).hashCode = function () {
|
|
492
|
+
var result = this.x19_1 == null ? 0 : hashCode(this.x19_1);
|
|
493
|
+
result = imul(result, 31) + hashCode(this.y19_1) | 0;
|
|
494
|
+
result = imul(result, 31) + hashCode(this.z19_1) | 0;
|
|
495
|
+
result = imul(result, 31) + hashCode(this.a1a_1) | 0;
|
|
496
|
+
result = imul(result, 31) + hashCode(this.b1a_1) | 0;
|
|
497
|
+
result = imul(result, 31) + hashCode(this.c1a_1) | 0;
|
|
498
|
+
result = imul(result, 31) + getBooleanHashCode(this.d1a_1) | 0;
|
|
499
|
+
return result;
|
|
500
|
+
};
|
|
501
|
+
protoOf(ParsedDocument).equals = function (other) {
|
|
502
|
+
if (this === other)
|
|
503
|
+
return true;
|
|
504
|
+
if (!(other instanceof ParsedDocument))
|
|
505
|
+
return false;
|
|
506
|
+
if (!equals(this.x19_1, other.x19_1))
|
|
507
|
+
return false;
|
|
508
|
+
if (!equals(this.y19_1, other.y19_1))
|
|
509
|
+
return false;
|
|
510
|
+
if (!equals(this.z19_1, other.z19_1))
|
|
511
|
+
return false;
|
|
512
|
+
if (!equals(this.a1a_1, other.a1a_1))
|
|
513
|
+
return false;
|
|
514
|
+
if (!equals(this.b1a_1, other.b1a_1))
|
|
515
|
+
return false;
|
|
516
|
+
if (!equals(this.c1a_1, other.c1a_1))
|
|
517
|
+
return false;
|
|
518
|
+
if (!(this.d1a_1 === other.d1a_1))
|
|
519
|
+
return false;
|
|
520
|
+
return true;
|
|
521
|
+
};
|
|
522
|
+
function ResolvedRef(refString, resolvedTo, replacedValue, targetUri, sourceUri, sourcePointer) {
|
|
523
|
+
replacedValue = replacedValue === VOID ? resolvedTo : replacedValue;
|
|
524
|
+
targetUri = targetUri === VOID ? null : targetUri;
|
|
525
|
+
sourceUri = sourceUri === VOID ? null : sourceUri;
|
|
526
|
+
sourcePointer = sourcePointer === VOID ? null : sourcePointer;
|
|
527
|
+
this.e1a_1 = refString;
|
|
528
|
+
this.f1a_1 = resolvedTo;
|
|
529
|
+
this.g1a_1 = replacedValue;
|
|
530
|
+
this.h1a_1 = targetUri;
|
|
531
|
+
this.i1a_1 = sourceUri;
|
|
532
|
+
this.j1a_1 = sourcePointer;
|
|
533
|
+
}
|
|
534
|
+
protoOf(ResolvedRef).toString = function () {
|
|
535
|
+
return 'ResolvedRef(refString=' + this.e1a_1 + ', resolvedTo=' + toString_0(this.f1a_1) + ', replacedValue=' + toString_0(this.g1a_1) + ', targetUri=' + this.h1a_1 + ', sourceUri=' + this.i1a_1 + ', sourcePointer=' + this.j1a_1 + ')';
|
|
536
|
+
};
|
|
537
|
+
protoOf(ResolvedRef).hashCode = function () {
|
|
538
|
+
var result = getStringHashCode(this.e1a_1);
|
|
539
|
+
result = imul(result, 31) + (this.f1a_1 == null ? 0 : hashCode(this.f1a_1)) | 0;
|
|
540
|
+
result = imul(result, 31) + (this.g1a_1 == null ? 0 : hashCode(this.g1a_1)) | 0;
|
|
541
|
+
result = imul(result, 31) + (this.h1a_1 == null ? 0 : getStringHashCode(this.h1a_1)) | 0;
|
|
542
|
+
result = imul(result, 31) + (this.i1a_1 == null ? 0 : getStringHashCode(this.i1a_1)) | 0;
|
|
543
|
+
result = imul(result, 31) + (this.j1a_1 == null ? 0 : getStringHashCode(this.j1a_1)) | 0;
|
|
544
|
+
return result;
|
|
545
|
+
};
|
|
546
|
+
protoOf(ResolvedRef).equals = function (other) {
|
|
547
|
+
if (this === other)
|
|
548
|
+
return true;
|
|
549
|
+
if (!(other instanceof ResolvedRef))
|
|
550
|
+
return false;
|
|
551
|
+
if (!(this.e1a_1 === other.e1a_1))
|
|
552
|
+
return false;
|
|
553
|
+
if (!equals(this.f1a_1, other.f1a_1))
|
|
554
|
+
return false;
|
|
555
|
+
if (!equals(this.g1a_1, other.g1a_1))
|
|
556
|
+
return false;
|
|
557
|
+
if (!(this.h1a_1 == other.h1a_1))
|
|
558
|
+
return false;
|
|
559
|
+
if (!(this.i1a_1 == other.i1a_1))
|
|
560
|
+
return false;
|
|
561
|
+
if (!(this.j1a_1 == other.j1a_1))
|
|
562
|
+
return false;
|
|
563
|
+
return true;
|
|
564
|
+
};
|
|
565
|
+
function OriginalAllOf(mergedMap, allOfItems) {
|
|
566
|
+
this.k1a_1 = mergedMap;
|
|
567
|
+
this.l1a_1 = allOfItems;
|
|
568
|
+
}
|
|
569
|
+
protoOf(OriginalAllOf).toString = function () {
|
|
570
|
+
return 'OriginalAllOf(mergedMap=' + toString(this.k1a_1) + ', allOfItems=' + toString(this.l1a_1) + ')';
|
|
571
|
+
};
|
|
572
|
+
protoOf(OriginalAllOf).hashCode = function () {
|
|
573
|
+
var result = hashCode(this.k1a_1);
|
|
574
|
+
result = imul(result, 31) + hashCode(this.l1a_1) | 0;
|
|
575
|
+
return result;
|
|
576
|
+
};
|
|
577
|
+
protoOf(OriginalAllOf).equals = function (other) {
|
|
578
|
+
if (this === other)
|
|
579
|
+
return true;
|
|
580
|
+
if (!(other instanceof OriginalAllOf))
|
|
581
|
+
return false;
|
|
582
|
+
if (!equals(this.k1a_1, other.k1a_1))
|
|
583
|
+
return false;
|
|
584
|
+
if (!equals(this.l1a_1, other.l1a_1))
|
|
585
|
+
return false;
|
|
586
|
+
return true;
|
|
587
|
+
};
|
|
588
|
+
var OnCircular_RESOLVE_instance;
|
|
589
|
+
var OnCircular_SKIP_instance;
|
|
590
|
+
var OnCircular_FAIL_instance;
|
|
591
|
+
var OnCircular_entriesInitialized;
|
|
592
|
+
function OnCircular_initEntries() {
|
|
593
|
+
if (OnCircular_entriesInitialized)
|
|
594
|
+
return Unit_instance;
|
|
595
|
+
OnCircular_entriesInitialized = true;
|
|
596
|
+
OnCircular_RESOLVE_instance = new OnCircular('RESOLVE', 0);
|
|
597
|
+
OnCircular_SKIP_instance = new OnCircular('SKIP', 1);
|
|
598
|
+
OnCircular_FAIL_instance = new OnCircular('FAIL', 2);
|
|
599
|
+
}
|
|
600
|
+
function OnCircular(name, ordinal) {
|
|
601
|
+
Enum.call(this, name, ordinal);
|
|
602
|
+
}
|
|
603
|
+
var OnMissing_FAIL_instance;
|
|
604
|
+
var OnMissing_SKIP_instance;
|
|
605
|
+
var OnMissing_entriesInitialized;
|
|
606
|
+
function OnMissing_initEntries() {
|
|
607
|
+
if (OnMissing_entriesInitialized)
|
|
608
|
+
return Unit_instance;
|
|
609
|
+
OnMissing_entriesInitialized = true;
|
|
610
|
+
OnMissing_FAIL_instance = new OnMissing('FAIL', 0);
|
|
611
|
+
OnMissing_SKIP_instance = new OnMissing('SKIP', 1);
|
|
612
|
+
}
|
|
613
|
+
function OnMissing(name, ordinal) {
|
|
614
|
+
Enum.call(this, name, ordinal);
|
|
615
|
+
}
|
|
616
|
+
function RefParserOptions(onCircular, onMissing) {
|
|
617
|
+
onCircular = onCircular === VOID ? OnCircular_RESOLVE_getInstance() : onCircular;
|
|
618
|
+
onMissing = onMissing === VOID ? OnMissing_FAIL_getInstance() : onMissing;
|
|
619
|
+
this.m1a_1 = onCircular;
|
|
620
|
+
this.n1a_1 = onMissing;
|
|
621
|
+
}
|
|
622
|
+
protoOf(RefParserOptions).toString = function () {
|
|
623
|
+
return 'RefParserOptions(onCircular=' + this.m1a_1.toString() + ', onMissing=' + this.n1a_1.toString() + ')';
|
|
624
|
+
};
|
|
625
|
+
protoOf(RefParserOptions).hashCode = function () {
|
|
626
|
+
var result = this.m1a_1.hashCode();
|
|
627
|
+
result = imul(result, 31) + this.n1a_1.hashCode() | 0;
|
|
628
|
+
return result;
|
|
629
|
+
};
|
|
630
|
+
protoOf(RefParserOptions).equals = function (other) {
|
|
631
|
+
if (this === other)
|
|
632
|
+
return true;
|
|
633
|
+
if (!(other instanceof RefParserOptions))
|
|
634
|
+
return false;
|
|
635
|
+
if (!this.m1a_1.equals(other.m1a_1))
|
|
636
|
+
return false;
|
|
637
|
+
if (!this.n1a_1.equals(other.n1a_1))
|
|
638
|
+
return false;
|
|
639
|
+
return true;
|
|
640
|
+
};
|
|
641
|
+
function CircularReferenceException(message) {
|
|
642
|
+
RuntimeException_init_$Init$(message, this);
|
|
643
|
+
captureStack(this, CircularReferenceException);
|
|
644
|
+
}
|
|
645
|
+
function MissingRefException(message, cause) {
|
|
646
|
+
cause = cause === VOID ? null : cause;
|
|
647
|
+
RuntimeException_init_$Init$_0(message, cause, this);
|
|
648
|
+
captureStack(this, MissingRefException);
|
|
649
|
+
}
|
|
650
|
+
function OnCircular_RESOLVE_getInstance() {
|
|
651
|
+
OnCircular_initEntries();
|
|
652
|
+
return OnCircular_RESOLVE_instance;
|
|
653
|
+
}
|
|
654
|
+
function OnMissing_FAIL_getInstance() {
|
|
655
|
+
OnMissing_initEntries();
|
|
656
|
+
return OnMissing_FAIL_instance;
|
|
657
|
+
}
|
|
658
|
+
function OnMissing_SKIP_getInstance() {
|
|
659
|
+
OnMissing_initEntries();
|
|
660
|
+
return OnMissing_SKIP_instance;
|
|
661
|
+
}
|
|
662
|
+
function SourceLocation(file, line, column, endLine, endColumn) {
|
|
663
|
+
this.o1a_1 = file;
|
|
664
|
+
this.p1a_1 = line;
|
|
665
|
+
this.q1a_1 = column;
|
|
666
|
+
this.r1a_1 = endLine;
|
|
667
|
+
this.s1a_1 = endColumn;
|
|
668
|
+
}
|
|
669
|
+
protoOf(SourceLocation).toString = function () {
|
|
670
|
+
return 'SourceLocation(file=' + this.o1a_1 + ', line=' + this.p1a_1 + ', column=' + this.q1a_1 + ', endLine=' + this.r1a_1 + ', endColumn=' + this.s1a_1 + ')';
|
|
671
|
+
};
|
|
672
|
+
protoOf(SourceLocation).hashCode = function () {
|
|
673
|
+
var result = getStringHashCode(this.o1a_1);
|
|
674
|
+
result = imul(result, 31) + this.p1a_1 | 0;
|
|
675
|
+
result = imul(result, 31) + this.q1a_1 | 0;
|
|
676
|
+
result = imul(result, 31) + this.r1a_1 | 0;
|
|
677
|
+
result = imul(result, 31) + this.s1a_1 | 0;
|
|
678
|
+
return result;
|
|
679
|
+
};
|
|
680
|
+
protoOf(SourceLocation).equals = function (other) {
|
|
681
|
+
if (this === other)
|
|
682
|
+
return true;
|
|
683
|
+
if (!(other instanceof SourceLocation))
|
|
684
|
+
return false;
|
|
685
|
+
if (!(this.o1a_1 === other.o1a_1))
|
|
686
|
+
return false;
|
|
687
|
+
if (!(this.p1a_1 === other.p1a_1))
|
|
688
|
+
return false;
|
|
689
|
+
if (!(this.q1a_1 === other.q1a_1))
|
|
690
|
+
return false;
|
|
691
|
+
if (!(this.r1a_1 === other.r1a_1))
|
|
692
|
+
return false;
|
|
693
|
+
if (!(this.s1a_1 === other.s1a_1))
|
|
694
|
+
return false;
|
|
695
|
+
return true;
|
|
696
|
+
};
|
|
697
|
+
function get_loadSettings() {
|
|
698
|
+
_init_properties_SchemaParser_kt__ctx6o();
|
|
699
|
+
return loadSettings;
|
|
700
|
+
}
|
|
701
|
+
var loadSettings;
|
|
702
|
+
function RawDocument(uri, root, map, locations) {
|
|
703
|
+
this.r18_1 = uri;
|
|
704
|
+
this.s18_1 = root;
|
|
705
|
+
this.t18_1 = map;
|
|
706
|
+
this.u18_1 = locations;
|
|
707
|
+
}
|
|
708
|
+
protoOf(RawDocument).toString = function () {
|
|
709
|
+
return 'RawDocument(uri=' + this.r18_1 + ', root=' + toString_0(this.s18_1) + ', map=' + toString(this.t18_1) + ', locations=' + toString(this.u18_1) + ')';
|
|
710
|
+
};
|
|
711
|
+
protoOf(RawDocument).hashCode = function () {
|
|
712
|
+
var result = getStringHashCode(this.r18_1);
|
|
713
|
+
result = imul(result, 31) + (this.s18_1 == null ? 0 : hashCode(this.s18_1)) | 0;
|
|
714
|
+
result = imul(result, 31) + hashCode(this.t18_1) | 0;
|
|
715
|
+
result = imul(result, 31) + hashCode(this.u18_1) | 0;
|
|
716
|
+
return result;
|
|
717
|
+
};
|
|
718
|
+
protoOf(RawDocument).equals = function (other) {
|
|
719
|
+
if (this === other)
|
|
720
|
+
return true;
|
|
721
|
+
if (!(other instanceof RawDocument))
|
|
722
|
+
return false;
|
|
723
|
+
if (!(this.r18_1 === other.r18_1))
|
|
724
|
+
return false;
|
|
725
|
+
if (!equals(this.s18_1, other.s18_1))
|
|
726
|
+
return false;
|
|
727
|
+
if (!equals(this.t18_1, other.t18_1))
|
|
728
|
+
return false;
|
|
729
|
+
if (!equals(this.u18_1, other.u18_1))
|
|
730
|
+
return false;
|
|
731
|
+
return true;
|
|
732
|
+
};
|
|
733
|
+
function parseText(text, fileUri) {
|
|
734
|
+
_init_properties_SchemaParser_kt__ctx6o();
|
|
735
|
+
var compose = new Compose(get_loadSettings());
|
|
736
|
+
var node = compose.ix(text);
|
|
737
|
+
if (node == null) {
|
|
738
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
739
|
+
var tmp = LinkedHashMap_init_$Create$();
|
|
740
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
741
|
+
var tmp_0 = LinkedHashMap_init_$Create$();
|
|
742
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
743
|
+
var tmp$ret$2 = LinkedHashMap_init_$Create$();
|
|
744
|
+
return new RawDocument(fileUri, tmp, tmp_0, tmp$ret$2);
|
|
745
|
+
}
|
|
746
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
747
|
+
var locations = LinkedHashMap_init_$Create$();
|
|
748
|
+
var value = buildNode(node, Companion_getInstance().g17_1, fileUri, locations);
|
|
749
|
+
var tmp_1;
|
|
750
|
+
if (!(value == null) ? isInterface(value, KtMutableMap) : false) {
|
|
751
|
+
tmp_1 = isInterface(value, KtMutableMap) ? value : THROW_CCE();
|
|
752
|
+
} else {
|
|
753
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
754
|
+
tmp_1 = LinkedHashMap_init_$Create$();
|
|
755
|
+
}
|
|
756
|
+
var map = tmp_1;
|
|
757
|
+
return new RawDocument(fileUri, value, map, locations);
|
|
758
|
+
}
|
|
759
|
+
function buildNode(node, pointer, fileUri, locations) {
|
|
760
|
+
_init_properties_SchemaParser_kt__ctx6o();
|
|
761
|
+
var start = node.ck_1;
|
|
762
|
+
var end = node.dk_1;
|
|
763
|
+
if (!(start == null) && !(end == null)) {
|
|
764
|
+
var tmp2 = pointer.toString();
|
|
765
|
+
// Inline function 'kotlin.collections.set' call
|
|
766
|
+
var value = new SourceLocation(fileUri, start.co_1, start.do_1, end.co_1, end.do_1);
|
|
767
|
+
locations.o1(tmp2, value);
|
|
768
|
+
}
|
|
769
|
+
var tmp;
|
|
770
|
+
if (node instanceof MappingNode) {
|
|
771
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
772
|
+
var map = LinkedHashMap_init_$Create$();
|
|
773
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
774
|
+
var _iterator__ex2g4s = node.qm_1.f();
|
|
775
|
+
while (_iterator__ex2g4s.g()) {
|
|
776
|
+
var element = _iterator__ex2g4s.h();
|
|
777
|
+
$l$block: {
|
|
778
|
+
var tmp_0 = element.cp_1;
|
|
779
|
+
var tmp0_safe_receiver = tmp_0 instanceof ScalarNode ? tmp_0 : null;
|
|
780
|
+
var tmp1_elvis_lhs = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.op_1;
|
|
781
|
+
var tmp_1;
|
|
782
|
+
if (tmp1_elvis_lhs == null) {
|
|
783
|
+
break $l$block;
|
|
784
|
+
} else {
|
|
785
|
+
tmp_1 = tmp1_elvis_lhs;
|
|
786
|
+
}
|
|
787
|
+
var key = tmp_1;
|
|
788
|
+
// Inline function 'kotlin.collections.set' call
|
|
789
|
+
var value_0 = buildNode(element.dp_1, pointer.k17(key), fileUri, locations);
|
|
790
|
+
map.o1(key, value_0);
|
|
791
|
+
}
|
|
792
|
+
}
|
|
793
|
+
tmp = map;
|
|
794
|
+
} else {
|
|
795
|
+
if (node instanceof SequenceNode) {
|
|
796
|
+
// Inline function 'kotlin.collections.mapIndexed' call
|
|
797
|
+
var this_0 = node.bq_1;
|
|
798
|
+
// Inline function 'kotlin.collections.mapIndexedTo' call
|
|
799
|
+
var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
|
|
800
|
+
var index = 0;
|
|
801
|
+
var _iterator__ex2g4s_0 = this_0.f();
|
|
802
|
+
while (_iterator__ex2g4s_0.g()) {
|
|
803
|
+
var item = _iterator__ex2g4s_0.h();
|
|
804
|
+
var _unary__edvuaz = index;
|
|
805
|
+
index = _unary__edvuaz + 1 | 0;
|
|
806
|
+
var i = checkIndexOverflow(_unary__edvuaz);
|
|
807
|
+
var tmp$ret$5 = buildNode(item, pointer.l17(i), fileUri, locations);
|
|
808
|
+
destination.d(tmp$ret$5);
|
|
809
|
+
}
|
|
810
|
+
tmp = toMutableList(destination);
|
|
811
|
+
} else {
|
|
812
|
+
if (node instanceof ScalarNode) {
|
|
813
|
+
tmp = scalarValue(node);
|
|
814
|
+
} else {
|
|
815
|
+
tmp = null;
|
|
816
|
+
}
|
|
817
|
+
}
|
|
818
|
+
}
|
|
819
|
+
return tmp;
|
|
820
|
+
}
|
|
821
|
+
function scalarValue(node) {
|
|
822
|
+
_init_properties_SchemaParser_kt__ctx6o();
|
|
823
|
+
var raw = node.op_1;
|
|
824
|
+
var tmp;
|
|
825
|
+
switch (node.bk_1.cq_1) {
|
|
826
|
+
case 'tag:yaml.org,2002:null':
|
|
827
|
+
tmp = null;
|
|
828
|
+
break;
|
|
829
|
+
case 'tag:yaml.org,2002:bool':
|
|
830
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
831
|
+
|
|
832
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
833
|
+
|
|
834
|
+
tmp = raw.toLowerCase() === 'true';
|
|
835
|
+
break;
|
|
836
|
+
case 'tag:yaml.org,2002:int':
|
|
837
|
+
var tmp1_elvis_lhs = toLongOrNull(raw);
|
|
838
|
+
var tmp2_elvis_lhs = tmp1_elvis_lhs == null ? toLongOrNull(removePrefix(raw, '+')) : tmp1_elvis_lhs;
|
|
839
|
+
tmp = tmp2_elvis_lhs == null ? raw : tmp2_elvis_lhs;
|
|
840
|
+
break;
|
|
841
|
+
case 'tag:yaml.org,2002:float':
|
|
842
|
+
// Inline function 'kotlin.text.lowercase' call
|
|
843
|
+
|
|
844
|
+
// Inline function 'kotlin.js.asDynamic' call
|
|
845
|
+
|
|
846
|
+
var tmp_0;
|
|
847
|
+
switch (raw.toLowerCase()) {
|
|
848
|
+
case '.inf':
|
|
849
|
+
case '+.inf':
|
|
850
|
+
tmp_0 = Infinity;
|
|
851
|
+
break;
|
|
852
|
+
case '-.inf':
|
|
853
|
+
tmp_0 = -Infinity;
|
|
854
|
+
break;
|
|
855
|
+
case '.nan':
|
|
856
|
+
tmp_0 = NaN;
|
|
857
|
+
break;
|
|
858
|
+
default:
|
|
859
|
+
var tmp4_elvis_lhs = toDoubleOrNull(raw);
|
|
860
|
+
tmp_0 = tmp4_elvis_lhs == null ? raw : tmp4_elvis_lhs;
|
|
861
|
+
break;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
tmp = tmp_0;
|
|
865
|
+
break;
|
|
866
|
+
default:
|
|
867
|
+
tmp = raw;
|
|
868
|
+
break;
|
|
869
|
+
}
|
|
870
|
+
return tmp;
|
|
871
|
+
}
|
|
872
|
+
var properties_initialized_SchemaParser_kt_f24p3y;
|
|
873
|
+
function _init_properties_SchemaParser_kt__ctx6o() {
|
|
874
|
+
if (!properties_initialized_SchemaParser_kt_f24p3y) {
|
|
875
|
+
properties_initialized_SchemaParser_kt_f24p3y = true;
|
|
876
|
+
loadSettings = new LoadSettings();
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
function CapabilityUnavailableException(capability, platform, message) {
|
|
880
|
+
message = message === VOID ? "Capability '" + capability + "' is not available on " + platform : message;
|
|
881
|
+
UnsupportedOperationException_init_$Init$(message, this);
|
|
882
|
+
captureStack(this, CapabilityUnavailableException);
|
|
883
|
+
this.t1a_1 = capability;
|
|
884
|
+
this.u1a_1 = platform;
|
|
885
|
+
}
|
|
886
|
+
function RefParserPlatform() {
|
|
887
|
+
this.m18_1 = 'jsonrefparser.filesystem';
|
|
888
|
+
this.n18_1 = 'jsonrefparser.classpath';
|
|
889
|
+
this.o18_1 = 'jsonrefparser.http';
|
|
890
|
+
}
|
|
891
|
+
protoOf(RefParserPlatform).v1a = function () {
|
|
892
|
+
return currentPlatformName();
|
|
893
|
+
};
|
|
894
|
+
protoOf(RefParserPlatform).w1a = function () {
|
|
895
|
+
return currentPlatformCapabilities();
|
|
896
|
+
};
|
|
897
|
+
protoOf(RefParserPlatform).x1a = function (capability) {
|
|
898
|
+
return this.w1a().g1(capability);
|
|
899
|
+
};
|
|
900
|
+
protoOf(RefParserPlatform).y1a = function (uri) {
|
|
901
|
+
return startsWith(uri, 'classpath:') ? 'jsonrefparser.classpath' : startsWith(uri, 'file:') ? 'jsonrefparser.filesystem' : startsWith(uri, 'http://') || startsWith(uri, 'https://') ? 'jsonrefparser.http' : !contains(uri, '://') ? 'jsonrefparser.filesystem' : null;
|
|
902
|
+
};
|
|
903
|
+
protoOf(RefParserPlatform).p18 = function (uri) {
|
|
904
|
+
var tmp0_elvis_lhs = this.y1a(uri);
|
|
905
|
+
var tmp;
|
|
906
|
+
if (tmp0_elvis_lhs == null) {
|
|
907
|
+
return null;
|
|
908
|
+
} else {
|
|
909
|
+
tmp = tmp0_elvis_lhs;
|
|
910
|
+
}
|
|
911
|
+
var capability = tmp;
|
|
912
|
+
return this.x1a(capability) ? null : new CapabilityUnavailableException(capability, this.v1a());
|
|
913
|
+
};
|
|
914
|
+
var RefParserPlatform_instance;
|
|
915
|
+
function RefParserPlatform_getInstance() {
|
|
916
|
+
return RefParserPlatform_instance;
|
|
917
|
+
}
|
|
918
|
+
function ResolvingContext(options, loaders, auth, locationIndex) {
|
|
919
|
+
this.g19_1 = options;
|
|
920
|
+
this.h19_1 = loaders;
|
|
921
|
+
this.i19_1 = auth;
|
|
922
|
+
this.j19_1 = locationIndex;
|
|
923
|
+
var tmp = this;
|
|
924
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
925
|
+
tmp.k19_1 = LinkedHashMap_init_$Create$();
|
|
926
|
+
var tmp_0 = this;
|
|
927
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
928
|
+
tmp_0.l19_1 = LinkedHashMap_init_$Create$();
|
|
929
|
+
var tmp_1 = this;
|
|
930
|
+
// Inline function 'kotlin.collections.mutableSetOf' call
|
|
931
|
+
tmp_1.m19_1 = LinkedHashSet_init_$Create$();
|
|
932
|
+
var tmp_2 = this;
|
|
933
|
+
// Inline function 'kotlin.collections.mutableSetOf' call
|
|
934
|
+
tmp_2.n19_1 = LinkedHashSet_init_$Create$();
|
|
935
|
+
this.o19_1 = false;
|
|
936
|
+
var tmp_3 = this;
|
|
937
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
938
|
+
tmp_3.p19_1 = ArrayList_init_$Create$_0();
|
|
939
|
+
var tmp_4 = this;
|
|
940
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
941
|
+
tmp_4.q19_1 = ArrayList_init_$Create$_0();
|
|
942
|
+
var tmp_5 = this;
|
|
943
|
+
// Inline function 'kotlin.collections.mutableMapOf' call
|
|
944
|
+
tmp_5.r19_1 = LinkedHashMap_init_$Create$();
|
|
945
|
+
}
|
|
946
|
+
function resolveDocument(doc, ctx, $completion) {
|
|
947
|
+
var tmp = new $resolveDocumentCOROUTINE$(doc, ctx, $completion);
|
|
948
|
+
tmp.w6_1 = Unit_instance;
|
|
949
|
+
tmp.x6_1 = null;
|
|
950
|
+
return tmp.c7();
|
|
951
|
+
}
|
|
952
|
+
function resolveValue(value, fileUri, pointer, ctx, $completion) {
|
|
953
|
+
var tmp = new $resolveValueCOROUTINE$(value, fileUri, pointer, ctx, $completion);
|
|
954
|
+
tmp.w6_1 = Unit_instance;
|
|
955
|
+
tmp.x6_1 = null;
|
|
956
|
+
return tmp.c7();
|
|
957
|
+
}
|
|
958
|
+
function resolveRef(refMap, fileUri, pointer, ctx, $completion) {
|
|
959
|
+
var tmp = new $resolveRefCOROUTINE$(refMap, fileUri, pointer, ctx, $completion);
|
|
960
|
+
tmp.w6_1 = Unit_instance;
|
|
961
|
+
tmp.x6_1 = null;
|
|
962
|
+
return tmp.c7();
|
|
963
|
+
}
|
|
964
|
+
function mergeSiblings(refMap, resolved) {
|
|
965
|
+
// Inline function 'kotlin.collections.filterKeys' call
|
|
966
|
+
var result = LinkedHashMap_init_$Create$();
|
|
967
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
968
|
+
var _iterator__ex2g4s = refMap.n1().f();
|
|
969
|
+
while (_iterator__ex2g4s.g()) {
|
|
970
|
+
var entry = _iterator__ex2g4s.h();
|
|
971
|
+
if (!(entry.i1() === '$ref')) {
|
|
972
|
+
result.o1(entry.i1(), entry.j1());
|
|
973
|
+
}
|
|
974
|
+
}
|
|
975
|
+
var siblings = result;
|
|
976
|
+
if (siblings.p())
|
|
977
|
+
return resolved;
|
|
978
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
979
|
+
var merged = LinkedHashMap_init_$Create$();
|
|
980
|
+
merged.q1(siblings);
|
|
981
|
+
if (!(resolved == null) ? isInterface(resolved, KtMap) : false) {
|
|
982
|
+
merged.q1(isInterface(resolved, KtMap) ? resolved : THROW_CCE());
|
|
983
|
+
}
|
|
984
|
+
return merged;
|
|
985
|
+
}
|
|
986
|
+
function IdentityStack() {
|
|
987
|
+
var tmp = this;
|
|
988
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
989
|
+
tmp.w1c_1 = ArrayList_init_$Create$_0();
|
|
990
|
+
}
|
|
991
|
+
protoOf(IdentityStack).x1c = function (obj) {
|
|
992
|
+
var tmp0 = this.w1c_1;
|
|
993
|
+
var tmp$ret$0;
|
|
994
|
+
$l$block_0: {
|
|
995
|
+
// Inline function 'kotlin.collections.any' call
|
|
996
|
+
var tmp;
|
|
997
|
+
if (isInterface(tmp0, Collection)) {
|
|
998
|
+
tmp = tmp0.p();
|
|
999
|
+
} else {
|
|
1000
|
+
tmp = false;
|
|
1001
|
+
}
|
|
1002
|
+
if (tmp) {
|
|
1003
|
+
tmp$ret$0 = false;
|
|
1004
|
+
break $l$block_0;
|
|
1005
|
+
}
|
|
1006
|
+
var _iterator__ex2g4s = tmp0.f();
|
|
1007
|
+
while (_iterator__ex2g4s.g()) {
|
|
1008
|
+
var element = _iterator__ex2g4s.h();
|
|
1009
|
+
if (element === obj) {
|
|
1010
|
+
tmp$ret$0 = true;
|
|
1011
|
+
break $l$block_0;
|
|
1012
|
+
}
|
|
1013
|
+
}
|
|
1014
|
+
tmp$ret$0 = false;
|
|
1015
|
+
}
|
|
1016
|
+
return tmp$ret$0;
|
|
1017
|
+
};
|
|
1018
|
+
protoOf(IdentityStack).y1c = function (obj) {
|
|
1019
|
+
this.w1c_1.d(obj);
|
|
1020
|
+
};
|
|
1021
|
+
protoOf(IdentityStack).z1c = function () {
|
|
1022
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1023
|
+
if (!this.w1c_1.p()) {
|
|
1024
|
+
this.w1c_1.u1(get_lastIndex(this.w1c_1));
|
|
1025
|
+
}
|
|
1026
|
+
};
|
|
1027
|
+
function mergeAllOf(value, identityStack, collector) {
|
|
1028
|
+
identityStack = identityStack === VOID ? new IdentityStack() : identityStack;
|
|
1029
|
+
collector = collector === VOID ? null : collector;
|
|
1030
|
+
if (value == null)
|
|
1031
|
+
return Unit_instance;
|
|
1032
|
+
if (identityStack.x1c(value))
|
|
1033
|
+
return Unit_instance;
|
|
1034
|
+
identityStack.y1c(value);
|
|
1035
|
+
try {
|
|
1036
|
+
if (isInterface(value, KtMutableMap)) {
|
|
1037
|
+
var map = isInterface(value, KtMutableMap) ? value : THROW_CCE();
|
|
1038
|
+
var _iterator__ex2g4s = toList(map.n1()).f();
|
|
1039
|
+
while (_iterator__ex2g4s.g()) {
|
|
1040
|
+
var _destruct__k2r9zo = _iterator__ex2g4s.h();
|
|
1041
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1042
|
+
var k = _destruct__k2r9zo.i1();
|
|
1043
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1044
|
+
var v = _destruct__k2r9zo.j1();
|
|
1045
|
+
if (!(k === 'allOf')) {
|
|
1046
|
+
mergeAllOf(v, identityStack, collector);
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
if (map.k1('allOf')) {
|
|
1050
|
+
var allOf = map.m1('allOf');
|
|
1051
|
+
if (!(allOf == null) ? isInterface(allOf, KtList) : false) {
|
|
1052
|
+
var acc = new AllOfAccumulator();
|
|
1053
|
+
collectAllOf(acc, map);
|
|
1054
|
+
var merged = acc.d1d();
|
|
1055
|
+
map.p1('allOf');
|
|
1056
|
+
map.q1(merged);
|
|
1057
|
+
if (collector == null)
|
|
1058
|
+
null;
|
|
1059
|
+
else
|
|
1060
|
+
collector.d(new OriginalAllOf(map, toList(allOf)));
|
|
1061
|
+
}
|
|
1062
|
+
}
|
|
1063
|
+
} else {
|
|
1064
|
+
if (isInterface(value, KtMutableList)) {
|
|
1065
|
+
var list = isInterface(value, KtMutableList) ? value : THROW_CCE();
|
|
1066
|
+
var _iterator__ex2g4s_0 = list.f();
|
|
1067
|
+
while (_iterator__ex2g4s_0.g()) {
|
|
1068
|
+
var item = _iterator__ex2g4s_0.h();
|
|
1069
|
+
mergeAllOf(item, identityStack, collector);
|
|
1070
|
+
}
|
|
1071
|
+
}
|
|
1072
|
+
}
|
|
1073
|
+
}finally {
|
|
1074
|
+
identityStack.z1c();
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
function AllOfAccumulator() {
|
|
1078
|
+
var tmp = this;
|
|
1079
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
1080
|
+
tmp.a1d_1 = LinkedHashMap_init_$Create$();
|
|
1081
|
+
var tmp_0 = this;
|
|
1082
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
1083
|
+
tmp_0.b1d_1 = LinkedHashMap_init_$Create$();
|
|
1084
|
+
var tmp_1 = this;
|
|
1085
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1086
|
+
tmp_1.c1d_1 = ArrayList_init_$Create$_0();
|
|
1087
|
+
}
|
|
1088
|
+
protoOf(AllOfAccumulator).d1d = function () {
|
|
1089
|
+
// Inline function 'kotlin.collections.linkedMapOf' call
|
|
1090
|
+
var result = LinkedHashMap_init_$Create$();
|
|
1091
|
+
result.q1(this.a1d_1);
|
|
1092
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1093
|
+
if (!this.c1d_1.p()) {
|
|
1094
|
+
var tmp2 = 'required';
|
|
1095
|
+
// Inline function 'kotlin.collections.set' call
|
|
1096
|
+
var value = this.c1d_1;
|
|
1097
|
+
result.o1(tmp2, value);
|
|
1098
|
+
}
|
|
1099
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1100
|
+
if (!this.b1d_1.p()) {
|
|
1101
|
+
var tmp2_0 = 'properties';
|
|
1102
|
+
// Inline function 'kotlin.collections.set' call
|
|
1103
|
+
var value_0 = this.b1d_1;
|
|
1104
|
+
result.o1(tmp2_0, value_0);
|
|
1105
|
+
}
|
|
1106
|
+
return result;
|
|
1107
|
+
};
|
|
1108
|
+
function collectAllOf(acc, item) {
|
|
1109
|
+
if (item.i() === 1 && item.k1('allOf')) {
|
|
1110
|
+
var inner = item.m1('allOf');
|
|
1111
|
+
if (!(inner == null) ? isInterface(inner, KtList) : false) {
|
|
1112
|
+
var _iterator__ex2g4s = inner.f();
|
|
1113
|
+
while (_iterator__ex2g4s.g()) {
|
|
1114
|
+
var entry = _iterator__ex2g4s.h();
|
|
1115
|
+
if (!(entry == null) ? isInterface(entry, KtMap) : false) {
|
|
1116
|
+
collectAllOf(acc, isInterface(entry, KtMap) ? entry : THROW_CCE());
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
return Unit_instance;
|
|
1121
|
+
}
|
|
1122
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1123
|
+
var _iterator__ex2g4s_0 = item.n1().f();
|
|
1124
|
+
while (_iterator__ex2g4s_0.g()) {
|
|
1125
|
+
var _destruct__k2r9zo = _iterator__ex2g4s_0.h();
|
|
1126
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1127
|
+
var k = _destruct__k2r9zo.i1();
|
|
1128
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1129
|
+
var v = _destruct__k2r9zo.j1();
|
|
1130
|
+
if (k === 'allOf') {
|
|
1131
|
+
if (!(v == null) ? isInterface(v, KtList) : false) {
|
|
1132
|
+
var _iterator__ex2g4s_1 = v.f();
|
|
1133
|
+
while (_iterator__ex2g4s_1.g()) {
|
|
1134
|
+
var entry_0 = _iterator__ex2g4s_1.h();
|
|
1135
|
+
if (!(entry_0 == null) ? isInterface(entry_0, KtMap) : false) {
|
|
1136
|
+
collectAllOf(acc, isInterface(entry_0, KtMap) ? entry_0 : THROW_CCE());
|
|
1137
|
+
}
|
|
1138
|
+
}
|
|
1139
|
+
}
|
|
1140
|
+
} else {
|
|
1141
|
+
// Inline function 'kotlin.collections.set' call
|
|
1142
|
+
acc.a1d_1.o1(k, v);
|
|
1143
|
+
}
|
|
1144
|
+
}
|
|
1145
|
+
if (item.k1('properties')) {
|
|
1146
|
+
var props = item.m1('properties');
|
|
1147
|
+
if (!(props == null) ? isInterface(props, KtMap) : false) {
|
|
1148
|
+
acc.b1d_1.q1(isInterface(props, KtMap) ? props : THROW_CCE());
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
if (item.k1('required')) {
|
|
1152
|
+
var req = item.m1('required');
|
|
1153
|
+
if (!(req == null) ? isInterface(req, KtList) : false) {
|
|
1154
|
+
acc.c1d_1.o(req);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
}
|
|
1158
|
+
function loadFile(uri, ctx, $completion) {
|
|
1159
|
+
var tmp = new $loadFileCOROUTINE$(uri, ctx, $completion);
|
|
1160
|
+
tmp.w6_1 = Unit_instance;
|
|
1161
|
+
tmp.x6_1 = null;
|
|
1162
|
+
return tmp.c7();
|
|
1163
|
+
}
|
|
1164
|
+
function escapeToken(key) {
|
|
1165
|
+
return replace(replace(key, '~', '~0'), '/', '~1');
|
|
1166
|
+
}
|
|
1167
|
+
function normalizePointer(pointer) {
|
|
1168
|
+
switch (pointer) {
|
|
1169
|
+
case null:
|
|
1170
|
+
case '#/':
|
|
1171
|
+
return '';
|
|
1172
|
+
default:
|
|
1173
|
+
return removePrefix(pointer, '#');
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
function $resolveDocumentCOROUTINE$(doc, ctx, resultContinuation) {
|
|
1177
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1178
|
+
this.h1b_1 = doc;
|
|
1179
|
+
this.i1b_1 = ctx;
|
|
1180
|
+
}
|
|
1181
|
+
protoOf($resolveDocumentCOROUTINE$).c7 = function () {
|
|
1182
|
+
var suspendResult = this.w6_1;
|
|
1183
|
+
$sm: do
|
|
1184
|
+
try {
|
|
1185
|
+
var tmp = this.u6_1;
|
|
1186
|
+
switch (tmp) {
|
|
1187
|
+
case 0:
|
|
1188
|
+
this.v6_1 = 2;
|
|
1189
|
+
var tmp0 = this.i1b_1.k19_1;
|
|
1190
|
+
var tmp2 = this.h1b_1.r18_1;
|
|
1191
|
+
var value = this.h1b_1.s18_1;
|
|
1192
|
+
tmp0.o1(tmp2, value);
|
|
1193
|
+
var tmp0_0 = this.i1b_1.r19_1;
|
|
1194
|
+
var tmp2_0 = this.h1b_1.r18_1;
|
|
1195
|
+
var value_0 = toMutableMap(this.h1b_1.u18_1);
|
|
1196
|
+
tmp0_0.o1(tmp2_0, value_0);
|
|
1197
|
+
this.i1b_1.j19_1.q1(this.h1b_1.u18_1);
|
|
1198
|
+
this.u6_1 = 1;
|
|
1199
|
+
suspendResult = resolveValue(this.h1b_1.s18_1, this.h1b_1.r18_1, '', this.i1b_1, this);
|
|
1200
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1201
|
+
return suspendResult;
|
|
1202
|
+
}
|
|
1203
|
+
|
|
1204
|
+
continue $sm;
|
|
1205
|
+
case 1:
|
|
1206
|
+
var resolvedRoot = suspendResult;
|
|
1207
|
+
var tmp0_elvis_lhs = (!(resolvedRoot == null) ? isInterface(resolvedRoot, KtMutableMap) : false) ? resolvedRoot : null;
|
|
1208
|
+
var tmp_0;
|
|
1209
|
+
if (tmp0_elvis_lhs == null) {
|
|
1210
|
+
tmp_0 = LinkedHashMap_init_$Create$();
|
|
1211
|
+
} else {
|
|
1212
|
+
tmp_0 = tmp0_elvis_lhs;
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
return tmp_0;
|
|
1216
|
+
case 2:
|
|
1217
|
+
throw this.x6_1;
|
|
1218
|
+
}
|
|
1219
|
+
} catch ($p) {
|
|
1220
|
+
var e = $p;
|
|
1221
|
+
if (this.v6_1 === 2) {
|
|
1222
|
+
throw e;
|
|
1223
|
+
} else {
|
|
1224
|
+
this.u6_1 = this.v6_1;
|
|
1225
|
+
this.x6_1 = e;
|
|
1226
|
+
}
|
|
1227
|
+
}
|
|
1228
|
+
while (true);
|
|
1229
|
+
};
|
|
1230
|
+
function $resolveValueCOROUTINE$(value, fileUri, pointer, ctx, resultContinuation) {
|
|
1231
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1232
|
+
this.r1b_1 = value;
|
|
1233
|
+
this.s1b_1 = fileUri;
|
|
1234
|
+
this.t1b_1 = pointer;
|
|
1235
|
+
this.u1b_1 = ctx;
|
|
1236
|
+
}
|
|
1237
|
+
protoOf($resolveValueCOROUTINE$).c7 = function () {
|
|
1238
|
+
var suspendResult = this.w6_1;
|
|
1239
|
+
$sm: do
|
|
1240
|
+
try {
|
|
1241
|
+
var tmp = this.u6_1;
|
|
1242
|
+
switch (tmp) {
|
|
1243
|
+
case 0:
|
|
1244
|
+
this.v6_1 = 14;
|
|
1245
|
+
this.v1b_1 = this.s1b_1 + '#' + this.t1b_1;
|
|
1246
|
+
if (this.u1b_1.m19_1.g1(this.v1b_1)) {
|
|
1247
|
+
this.u1b_1.o19_1 = true;
|
|
1248
|
+
var tmp_0;
|
|
1249
|
+
switch (this.u1b_1.g19_1.m1a_1.w1_1) {
|
|
1250
|
+
case 2:
|
|
1251
|
+
throw new CircularReferenceException('Circular $ref at ' + this.v1b_1);
|
|
1252
|
+
case 1:
|
|
1253
|
+
tmp_0 = this.r1b_1;
|
|
1254
|
+
break;
|
|
1255
|
+
case 0:
|
|
1256
|
+
var tmp1_elvis_lhs = this.u1b_1.l19_1.m1(this.v1b_1);
|
|
1257
|
+
tmp_0 = tmp1_elvis_lhs == null ? this.r1b_1 : tmp1_elvis_lhs;
|
|
1258
|
+
break;
|
|
1259
|
+
default:
|
|
1260
|
+
noWhenBranchMatchedException();
|
|
1261
|
+
break;
|
|
1262
|
+
}
|
|
1263
|
+
return tmp_0;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
if (this.u1b_1.n19_1.g1(this.v1b_1))
|
|
1267
|
+
return this.r1b_1;
|
|
1268
|
+
this.u1b_1.m19_1.d(this.v1b_1);
|
|
1269
|
+
this.u1b_1.n19_1.d(this.v1b_1);
|
|
1270
|
+
this.u6_1 = 1;
|
|
1271
|
+
continue $sm;
|
|
1272
|
+
case 1:
|
|
1273
|
+
this.w1b_1 = Unit_instance;
|
|
1274
|
+
this.u6_1 = 2;
|
|
1275
|
+
continue $sm;
|
|
1276
|
+
case 2:
|
|
1277
|
+
this.v6_1 = 13;
|
|
1278
|
+
var tmp_1;
|
|
1279
|
+
var tmp_2 = this.r1b_1;
|
|
1280
|
+
if (!(tmp_2 == null) ? isInterface(tmp_2, KtMap) : false) {
|
|
1281
|
+
var this_0 = this.r1b_1;
|
|
1282
|
+
tmp_1 = (isInterface(this_0, KtMap) ? this_0 : THROW_CCE()).k1('$ref');
|
|
1283
|
+
} else {
|
|
1284
|
+
tmp_1 = false;
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
if (tmp_1) {
|
|
1288
|
+
this.u6_1 = 9;
|
|
1289
|
+
var tmp_3 = this.r1b_1;
|
|
1290
|
+
suspendResult = resolveRef(isInterface(tmp_3, KtMap) ? tmp_3 : THROW_CCE(), this.s1b_1, this.t1b_1, this.u1b_1, this);
|
|
1291
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1292
|
+
return suspendResult;
|
|
1293
|
+
}
|
|
1294
|
+
continue $sm;
|
|
1295
|
+
} else {
|
|
1296
|
+
var tmp_4 = this.r1b_1;
|
|
1297
|
+
if (!(tmp_4 == null) ? isInterface(tmp_4, KtMutableMap) : false) {
|
|
1298
|
+
var tmp_5 = this;
|
|
1299
|
+
var tmp_6 = this.r1b_1;
|
|
1300
|
+
tmp_5.y1b_1 = isInterface(tmp_6, KtMutableMap) ? tmp_6 : THROW_CCE();
|
|
1301
|
+
this.b1c_1 = toList(this.y1b_1.n1()).f();
|
|
1302
|
+
this.u6_1 = 6;
|
|
1303
|
+
continue $sm;
|
|
1304
|
+
} else {
|
|
1305
|
+
var tmp_7 = this.r1b_1;
|
|
1306
|
+
if (!(tmp_7 == null) ? isInterface(tmp_7, KtMutableList) : false) {
|
|
1307
|
+
var tmp_8 = this;
|
|
1308
|
+
var tmp_9 = this.r1b_1;
|
|
1309
|
+
tmp_8.c1c_1 = isInterface(tmp_9, KtMutableList) ? tmp_9 : THROW_CCE();
|
|
1310
|
+
this.e1c_1 = get_indices(this.c1c_1).f();
|
|
1311
|
+
this.u6_1 = 3;
|
|
1312
|
+
continue $sm;
|
|
1313
|
+
} else {
|
|
1314
|
+
this.x1b_1 = this.r1b_1;
|
|
1315
|
+
this.u6_1 = 10;
|
|
1316
|
+
continue $sm;
|
|
1317
|
+
}
|
|
1318
|
+
}
|
|
1319
|
+
}
|
|
1320
|
+
|
|
1321
|
+
case 3:
|
|
1322
|
+
if (!this.e1c_1.g()) {
|
|
1323
|
+
this.u6_1 = 5;
|
|
1324
|
+
continue $sm;
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
this.d1c_1 = this.e1c_1.h();
|
|
1328
|
+
this.u6_1 = 4;
|
|
1329
|
+
suspendResult = resolveValue(this.c1c_1.n(this.d1c_1), this.s1b_1, this.t1b_1 + '/' + this.d1c_1, this.u1b_1, this);
|
|
1330
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1331
|
+
return suspendResult;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
1334
|
+
continue $sm;
|
|
1335
|
+
case 4:
|
|
1336
|
+
var resolved = suspendResult;
|
|
1337
|
+
if (!(resolved === this.c1c_1.n(this.d1c_1))) {
|
|
1338
|
+
this.c1c_1.t1(this.d1c_1, resolved);
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
this.u6_1 = 3;
|
|
1342
|
+
continue $sm;
|
|
1343
|
+
case 5:
|
|
1344
|
+
this.x1b_1 = this.c1c_1;
|
|
1345
|
+
this.u6_1 = 10;
|
|
1346
|
+
continue $sm;
|
|
1347
|
+
case 6:
|
|
1348
|
+
if (!this.b1c_1.g()) {
|
|
1349
|
+
this.u6_1 = 8;
|
|
1350
|
+
continue $sm;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
var _destruct__k2r9zo = this.b1c_1.h();
|
|
1354
|
+
var tmp_10 = this;
|
|
1355
|
+
tmp_10.z1b_1 = _destruct__k2r9zo.i1();
|
|
1356
|
+
var tmp_11 = this;
|
|
1357
|
+
tmp_11.a1c_1 = _destruct__k2r9zo.j1();
|
|
1358
|
+
this.u6_1 = 7;
|
|
1359
|
+
suspendResult = resolveValue(this.a1c_1, this.s1b_1, this.t1b_1 + '/' + escapeToken(this.z1b_1), this.u1b_1, this);
|
|
1360
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1361
|
+
return suspendResult;
|
|
1362
|
+
}
|
|
1363
|
+
|
|
1364
|
+
continue $sm;
|
|
1365
|
+
case 7:
|
|
1366
|
+
var resolved_0 = suspendResult;
|
|
1367
|
+
if (!(resolved_0 === this.a1c_1)) {
|
|
1368
|
+
var tmp0 = this.y1b_1;
|
|
1369
|
+
var key = this.z1b_1;
|
|
1370
|
+
tmp0.o1(key, resolved_0);
|
|
1371
|
+
}
|
|
1372
|
+
|
|
1373
|
+
this.u6_1 = 6;
|
|
1374
|
+
continue $sm;
|
|
1375
|
+
case 8:
|
|
1376
|
+
var tmp0_0 = this.u1b_1.l19_1;
|
|
1377
|
+
var tmp2 = this.v1b_1;
|
|
1378
|
+
var value = this.y1b_1;
|
|
1379
|
+
tmp0_0.o1(tmp2, value);
|
|
1380
|
+
this.x1b_1 = this.y1b_1;
|
|
1381
|
+
this.u6_1 = 10;
|
|
1382
|
+
continue $sm;
|
|
1383
|
+
case 9:
|
|
1384
|
+
this.x1b_1 = suspendResult;
|
|
1385
|
+
this.u6_1 = 10;
|
|
1386
|
+
continue $sm;
|
|
1387
|
+
case 10:
|
|
1388
|
+
this.w1b_1 = this.x1b_1;
|
|
1389
|
+
this.v6_1 = 14;
|
|
1390
|
+
this.u6_1 = 11;
|
|
1391
|
+
var tmp_12 = this;
|
|
1392
|
+
continue $sm;
|
|
1393
|
+
case 11:
|
|
1394
|
+
var tmp_13 = this.w1b_1;
|
|
1395
|
+
this.v6_1 = 14;
|
|
1396
|
+
this.u1b_1.m19_1.j2(this.v1b_1);
|
|
1397
|
+
return tmp_13;
|
|
1398
|
+
case 12:
|
|
1399
|
+
this.v6_1 = 14;
|
|
1400
|
+
this.u1b_1.m19_1.j2(this.v1b_1);
|
|
1401
|
+
return Unit_instance;
|
|
1402
|
+
case 13:
|
|
1403
|
+
this.v6_1 = 14;
|
|
1404
|
+
var t = this.x6_1;
|
|
1405
|
+
this.u1b_1.m19_1.j2(this.v1b_1);
|
|
1406
|
+
throw t;
|
|
1407
|
+
case 14:
|
|
1408
|
+
throw this.x6_1;
|
|
1409
|
+
}
|
|
1410
|
+
} catch ($p) {
|
|
1411
|
+
var e = $p;
|
|
1412
|
+
if (this.v6_1 === 14) {
|
|
1413
|
+
throw e;
|
|
1414
|
+
} else {
|
|
1415
|
+
this.u6_1 = this.v6_1;
|
|
1416
|
+
this.x6_1 = e;
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
while (true);
|
|
1420
|
+
};
|
|
1421
|
+
function $resolveRefCOROUTINE$(refMap, fileUri, pointer, ctx, resultContinuation) {
|
|
1422
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1423
|
+
this.n1c_1 = refMap;
|
|
1424
|
+
this.o1c_1 = fileUri;
|
|
1425
|
+
this.p1c_1 = pointer;
|
|
1426
|
+
this.q1c_1 = ctx;
|
|
1427
|
+
}
|
|
1428
|
+
protoOf($resolveRefCOROUTINE$).c7 = function () {
|
|
1429
|
+
var suspendResult = this.w6_1;
|
|
1430
|
+
$sm: do
|
|
1431
|
+
try {
|
|
1432
|
+
var tmp = this.u6_1;
|
|
1433
|
+
switch (tmp) {
|
|
1434
|
+
case 0:
|
|
1435
|
+
this.v6_1 = 5;
|
|
1436
|
+
var tmp_0 = this;
|
|
1437
|
+
var tmp_1 = this.n1c_1.m1('$ref');
|
|
1438
|
+
var tmp0_elvis_lhs = (!(tmp_1 == null) ? typeof tmp_1 === 'string' : false) ? tmp_1 : null;
|
|
1439
|
+
var tmp_2;
|
|
1440
|
+
if (tmp0_elvis_lhs == null) {
|
|
1441
|
+
return this.n1c_1;
|
|
1442
|
+
} else {
|
|
1443
|
+
tmp_2 = tmp0_elvis_lhs;
|
|
1444
|
+
}
|
|
1445
|
+
|
|
1446
|
+
tmp_0.s1c_1 = tmp_2;
|
|
1447
|
+
this.r1c_1 = Companion_instance_1.p1d(this.s1c_1, this.o1c_1);
|
|
1448
|
+
var tmp_3 = this;
|
|
1449
|
+
var tmp1_elvis_lhs = this.r1c_1.s1d_1;
|
|
1450
|
+
tmp_3.v1c_1 = tmp1_elvis_lhs == null ? this.o1c_1 : tmp1_elvis_lhs;
|
|
1451
|
+
this.u1c_1 = normalizePointer(this.r1c_1.t1d_1);
|
|
1452
|
+
this.t1c_1 = this.v1c_1 + '#' + this.u1c_1;
|
|
1453
|
+
if (this.q1c_1.m19_1.g1(this.t1c_1)) {
|
|
1454
|
+
this.q1c_1.o19_1 = true;
|
|
1455
|
+
var tmp_4;
|
|
1456
|
+
switch (this.q1c_1.g19_1.m1a_1.w1_1) {
|
|
1457
|
+
case 2:
|
|
1458
|
+
throw new CircularReferenceException('Circular $ref at ' + this.t1c_1);
|
|
1459
|
+
case 1:
|
|
1460
|
+
tmp_4 = this.n1c_1;
|
|
1461
|
+
break;
|
|
1462
|
+
case 0:
|
|
1463
|
+
var cached = this.q1c_1.l19_1.m1(this.t1c_1);
|
|
1464
|
+
tmp_4 = !(cached == null) ? mergeSiblings(this.n1c_1, cached) : this.n1c_1;
|
|
1465
|
+
break;
|
|
1466
|
+
default:
|
|
1467
|
+
noWhenBranchMatchedException();
|
|
1468
|
+
break;
|
|
1469
|
+
}
|
|
1470
|
+
return tmp_4;
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
var tmp_5;
|
|
1474
|
+
if (this.r1c_1.r1d_1.x1d()) {
|
|
1475
|
+
var tmp0 = this.q1c_1.k19_1;
|
|
1476
|
+
var key = this.v1c_1;
|
|
1477
|
+
tmp_5 = !(isInterface(tmp0, KtMap) ? tmp0 : THROW_CCE()).k1(key);
|
|
1478
|
+
} else {
|
|
1479
|
+
tmp_5 = false;
|
|
1480
|
+
}
|
|
1481
|
+
|
|
1482
|
+
if (tmp_5) {
|
|
1483
|
+
this.u6_1 = 1;
|
|
1484
|
+
suspendResult = loadFile(this.v1c_1, this.q1c_1, this);
|
|
1485
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1486
|
+
return suspendResult;
|
|
1487
|
+
}
|
|
1488
|
+
continue $sm;
|
|
1489
|
+
} else {
|
|
1490
|
+
this.u6_1 = 3;
|
|
1491
|
+
continue $sm;
|
|
1492
|
+
}
|
|
1493
|
+
|
|
1494
|
+
case 1:
|
|
1495
|
+
var tmp3_elvis_lhs = suspendResult;
|
|
1496
|
+
var tmp_6;
|
|
1497
|
+
if (tmp3_elvis_lhs == null) {
|
|
1498
|
+
var tmp_7;
|
|
1499
|
+
switch (this.q1c_1.g19_1.n1a_1.w1_1) {
|
|
1500
|
+
case 1:
|
|
1501
|
+
tmp_7 = this.n1c_1;
|
|
1502
|
+
break;
|
|
1503
|
+
case 0:
|
|
1504
|
+
throw new MissingRefException('Cannot load: ' + this.v1c_1);
|
|
1505
|
+
default:
|
|
1506
|
+
noWhenBranchMatchedException();
|
|
1507
|
+
break;
|
|
1508
|
+
}
|
|
1509
|
+
return tmp_7;
|
|
1510
|
+
} else {
|
|
1511
|
+
tmp_6 = tmp3_elvis_lhs;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
var text = tmp_6;
|
|
1515
|
+
var raw = parseText(text, this.v1c_1);
|
|
1516
|
+
var tmp0_0 = this.q1c_1.k19_1;
|
|
1517
|
+
var tmp2 = this.v1c_1;
|
|
1518
|
+
var value = raw.s18_1;
|
|
1519
|
+
tmp0_0.o1(tmp2, value);
|
|
1520
|
+
var tmp0_1 = this.q1c_1.r19_1;
|
|
1521
|
+
var tmp2_0 = this.v1c_1;
|
|
1522
|
+
var value_0 = toMutableMap(raw.u18_1);
|
|
1523
|
+
tmp0_1.o1(tmp2_0, value_0);
|
|
1524
|
+
var _iterator__ex2g4s = raw.u18_1.n1().f();
|
|
1525
|
+
while (_iterator__ex2g4s.g()) {
|
|
1526
|
+
var element = _iterator__ex2g4s.h();
|
|
1527
|
+
var key_0 = element.i1();
|
|
1528
|
+
var loc = element.j1();
|
|
1529
|
+
if (!this.q1c_1.j19_1.k1(key_0)) {
|
|
1530
|
+
this.q1c_1.j19_1.o1(key_0, loc);
|
|
1531
|
+
}
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
this.u6_1 = 2;
|
|
1535
|
+
suspendResult = resolveValue(raw.s18_1, this.v1c_1, '', this.q1c_1, this);
|
|
1536
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1537
|
+
return suspendResult;
|
|
1538
|
+
}
|
|
1539
|
+
|
|
1540
|
+
continue $sm;
|
|
1541
|
+
case 2:
|
|
1542
|
+
this.u6_1 = 3;
|
|
1543
|
+
continue $sm;
|
|
1544
|
+
case 3:
|
|
1545
|
+
var tmp5_elvis_lhs = this.q1c_1.k19_1.m1(this.v1c_1);
|
|
1546
|
+
var tmp_8;
|
|
1547
|
+
if (tmp5_elvis_lhs == null) {
|
|
1548
|
+
var tmp_9;
|
|
1549
|
+
switch (this.q1c_1.g19_1.n1a_1.w1_1) {
|
|
1550
|
+
case 1:
|
|
1551
|
+
tmp_9 = this.n1c_1;
|
|
1552
|
+
break;
|
|
1553
|
+
case 0:
|
|
1554
|
+
throw new MissingRefException('Document not in cache: ' + this.v1c_1);
|
|
1555
|
+
default:
|
|
1556
|
+
noWhenBranchMatchedException();
|
|
1557
|
+
break;
|
|
1558
|
+
}
|
|
1559
|
+
return tmp_9;
|
|
1560
|
+
} else {
|
|
1561
|
+
tmp_8 = tmp5_elvis_lhs;
|
|
1562
|
+
}
|
|
1563
|
+
|
|
1564
|
+
var targetDoc = tmp_8;
|
|
1565
|
+
var tmp0_2 = this.q1c_1.l19_1;
|
|
1566
|
+
var key_1 = this.t1c_1;
|
|
1567
|
+
if ((isInterface(tmp0_2, KtMap) ? tmp0_2 : THROW_CCE()).k1(key_1)) {
|
|
1568
|
+
var cached_0 = this.q1c_1.l19_1.m1(this.t1c_1);
|
|
1569
|
+
var replaced = mergeSiblings(this.n1c_1, cached_0);
|
|
1570
|
+
this.q1c_1.p19_1.d(new ResolvedRef(this.s1c_1, cached_0, replaced, this.r1c_1.s1d_1, this.o1c_1, this.p1c_1));
|
|
1571
|
+
return replaced;
|
|
1572
|
+
}
|
|
1573
|
+
|
|
1574
|
+
var tmp_10;
|
|
1575
|
+
var this_0 = this.u1c_1;
|
|
1576
|
+
if (charSequenceLength(this_0) === 0) {
|
|
1577
|
+
tmp_10 = targetDoc;
|
|
1578
|
+
} else {
|
|
1579
|
+
var tmp7_elvis_lhs = Companion_getInstance().i17(this.u1c_1).m17(targetDoc);
|
|
1580
|
+
var tmp_11;
|
|
1581
|
+
if (tmp7_elvis_lhs == null) {
|
|
1582
|
+
var tmp_12;
|
|
1583
|
+
switch (this.q1c_1.g19_1.n1a_1.w1_1) {
|
|
1584
|
+
case 1:
|
|
1585
|
+
tmp_12 = this.n1c_1;
|
|
1586
|
+
break;
|
|
1587
|
+
case 0:
|
|
1588
|
+
throw new MissingRefException('Pointer ' + this.u1c_1 + ' not found in ' + this.v1c_1);
|
|
1589
|
+
default:
|
|
1590
|
+
noWhenBranchMatchedException();
|
|
1591
|
+
break;
|
|
1592
|
+
}
|
|
1593
|
+
return tmp_12;
|
|
1594
|
+
} else {
|
|
1595
|
+
tmp_11 = tmp7_elvis_lhs;
|
|
1596
|
+
}
|
|
1597
|
+
tmp_10 = tmp_11;
|
|
1598
|
+
}
|
|
1599
|
+
|
|
1600
|
+
var resolved = tmp_10;
|
|
1601
|
+
var tmp0_3 = this.q1c_1.l19_1;
|
|
1602
|
+
var key_2 = this.t1c_1;
|
|
1603
|
+
tmp0_3.o1(key_2, resolved);
|
|
1604
|
+
this.u6_1 = 4;
|
|
1605
|
+
suspendResult = resolveValue(resolved, this.v1c_1, this.u1c_1, this.q1c_1, this);
|
|
1606
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1607
|
+
return suspendResult;
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
continue $sm;
|
|
1611
|
+
case 4:
|
|
1612
|
+
var fullyResolved = suspendResult;
|
|
1613
|
+
var tmp0_4 = this.q1c_1.l19_1;
|
|
1614
|
+
var key_3 = this.t1c_1;
|
|
1615
|
+
tmp0_4.o1(key_3, fullyResolved);
|
|
1616
|
+
var replaced_0 = mergeSiblings(this.n1c_1, fullyResolved);
|
|
1617
|
+
this.q1c_1.p19_1.d(new ResolvedRef(this.s1c_1, fullyResolved, replaced_0, this.r1c_1.s1d_1, this.o1c_1, this.p1c_1));
|
|
1618
|
+
return replaced_0;
|
|
1619
|
+
case 5:
|
|
1620
|
+
throw this.x6_1;
|
|
1621
|
+
}
|
|
1622
|
+
} catch ($p) {
|
|
1623
|
+
var e = $p;
|
|
1624
|
+
if (this.v6_1 === 5) {
|
|
1625
|
+
throw e;
|
|
1626
|
+
} else {
|
|
1627
|
+
this.u6_1 = this.v6_1;
|
|
1628
|
+
this.x6_1 = e;
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
while (true);
|
|
1632
|
+
};
|
|
1633
|
+
function $loadFileCOROUTINE$(uri, ctx, resultContinuation) {
|
|
1634
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
1635
|
+
this.m1d_1 = uri;
|
|
1636
|
+
this.n1d_1 = ctx;
|
|
1637
|
+
}
|
|
1638
|
+
protoOf($loadFileCOROUTINE$).c7 = function () {
|
|
1639
|
+
var suspendResult = this.w6_1;
|
|
1640
|
+
$sm: do
|
|
1641
|
+
try {
|
|
1642
|
+
var tmp = this.u6_1;
|
|
1643
|
+
switch (tmp) {
|
|
1644
|
+
case 0:
|
|
1645
|
+
this.v6_1 = 3;
|
|
1646
|
+
var tmp0 = this.n1d_1.h19_1;
|
|
1647
|
+
var tmp$ret$0;
|
|
1648
|
+
l$ret$1: do {
|
|
1649
|
+
var _iterator__ex2g4s = tmp0.f();
|
|
1650
|
+
while (_iterator__ex2g4s.g()) {
|
|
1651
|
+
var element = _iterator__ex2g4s.h();
|
|
1652
|
+
if (element.l18(this.m1d_1)) {
|
|
1653
|
+
tmp$ret$0 = element;
|
|
1654
|
+
break l$ret$1;
|
|
1655
|
+
}
|
|
1656
|
+
}
|
|
1657
|
+
tmp$ret$0 = null;
|
|
1658
|
+
}
|
|
1659
|
+
while (false);
|
|
1660
|
+
var loader = tmp$ret$0;
|
|
1661
|
+
if (loader == null) {
|
|
1662
|
+
var unavailable = RefParserPlatform_instance.p18(this.m1d_1);
|
|
1663
|
+
if (!(unavailable == null) && this.n1d_1.g19_1.n1a_1.equals(OnMissing_FAIL_getInstance()))
|
|
1664
|
+
throw unavailable;
|
|
1665
|
+
return null;
|
|
1666
|
+
}
|
|
1667
|
+
|
|
1668
|
+
this.v6_1 = 2;
|
|
1669
|
+
this.u6_1 = 1;
|
|
1670
|
+
suspendResult = loader.q18(this.m1d_1, this);
|
|
1671
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
1672
|
+
return suspendResult;
|
|
1673
|
+
}
|
|
1674
|
+
|
|
1675
|
+
continue $sm;
|
|
1676
|
+
case 1:
|
|
1677
|
+
this.o1d_1 = suspendResult;
|
|
1678
|
+
this.v6_1 = 3;
|
|
1679
|
+
this.u6_1 = 4;
|
|
1680
|
+
continue $sm;
|
|
1681
|
+
case 2:
|
|
1682
|
+
this.v6_1 = 3;
|
|
1683
|
+
var tmp_0 = this.x6_1;
|
|
1684
|
+
if (tmp_0 instanceof CapabilityUnavailableException) {
|
|
1685
|
+
var e = this.x6_1;
|
|
1686
|
+
var tmp_1 = this;
|
|
1687
|
+
var tmp_2;
|
|
1688
|
+
if (this.n1d_1.g19_1.n1a_1.equals(OnMissing_SKIP_getInstance())) {
|
|
1689
|
+
tmp_2 = null;
|
|
1690
|
+
} else {
|
|
1691
|
+
throw e;
|
|
1692
|
+
}
|
|
1693
|
+
tmp_1.o1d_1 = tmp_2;
|
|
1694
|
+
this.u6_1 = 4;
|
|
1695
|
+
continue $sm;
|
|
1696
|
+
} else {
|
|
1697
|
+
var tmp_3 = this.x6_1;
|
|
1698
|
+
if (tmp_3 instanceof Exception) {
|
|
1699
|
+
var e_0 = this.x6_1;
|
|
1700
|
+
var tmp_4 = this;
|
|
1701
|
+
var tmp_5;
|
|
1702
|
+
if (this.n1d_1.g19_1.n1a_1.equals(OnMissing_SKIP_getInstance())) {
|
|
1703
|
+
tmp_5 = null;
|
|
1704
|
+
} else {
|
|
1705
|
+
throw new MissingRefException('Failed to load: ' + this.m1d_1, e_0);
|
|
1706
|
+
}
|
|
1707
|
+
tmp_4.o1d_1 = tmp_5;
|
|
1708
|
+
this.u6_1 = 4;
|
|
1709
|
+
continue $sm;
|
|
1710
|
+
} else {
|
|
1711
|
+
throw this.x6_1;
|
|
1712
|
+
}
|
|
1713
|
+
}
|
|
1714
|
+
|
|
1715
|
+
case 3:
|
|
1716
|
+
throw this.x6_1;
|
|
1717
|
+
case 4:
|
|
1718
|
+
this.v6_1 = 3;
|
|
1719
|
+
return this.o1d_1;
|
|
1720
|
+
}
|
|
1721
|
+
} catch ($p) {
|
|
1722
|
+
var e_1 = $p;
|
|
1723
|
+
if (this.v6_1 === 3) {
|
|
1724
|
+
throw e_1;
|
|
1725
|
+
} else {
|
|
1726
|
+
this.u6_1 = this.v6_1;
|
|
1727
|
+
this.x6_1 = e_1;
|
|
1728
|
+
}
|
|
1729
|
+
}
|
|
1730
|
+
while (true);
|
|
1731
|
+
};
|
|
1732
|
+
var SchemaRefFormat_INTERNAL_instance;
|
|
1733
|
+
var SchemaRefFormat_RELATIVE_instance;
|
|
1734
|
+
var SchemaRefFormat_FILE_instance;
|
|
1735
|
+
var SchemaRefFormat_CLASSPATH_instance;
|
|
1736
|
+
var SchemaRefFormat_URL_instance;
|
|
1737
|
+
var SchemaRefFormat_entriesInitialized;
|
|
1738
|
+
function SchemaRefFormat_initEntries() {
|
|
1739
|
+
if (SchemaRefFormat_entriesInitialized)
|
|
1740
|
+
return Unit_instance;
|
|
1741
|
+
SchemaRefFormat_entriesInitialized = true;
|
|
1742
|
+
SchemaRefFormat_INTERNAL_instance = new SchemaRefFormat('INTERNAL', 0);
|
|
1743
|
+
SchemaRefFormat_RELATIVE_instance = new SchemaRefFormat('RELATIVE', 1);
|
|
1744
|
+
SchemaRefFormat_FILE_instance = new SchemaRefFormat('FILE', 2);
|
|
1745
|
+
SchemaRefFormat_CLASSPATH_instance = new SchemaRefFormat('CLASSPATH', 3);
|
|
1746
|
+
SchemaRefFormat_URL_instance = new SchemaRefFormat('URL', 4);
|
|
1747
|
+
}
|
|
1748
|
+
function SchemaRefFormat(name, ordinal) {
|
|
1749
|
+
Enum.call(this, name, ordinal);
|
|
1750
|
+
}
|
|
1751
|
+
protoOf(SchemaRefFormat).x1d = function () {
|
|
1752
|
+
return this.equals(SchemaRefFormat_RELATIVE_getInstance()) || this.equals(SchemaRefFormat_FILE_getInstance()) || this.equals(SchemaRefFormat_CLASSPATH_getInstance()) || this.equals(SchemaRefFormat_URL_getInstance());
|
|
1753
|
+
};
|
|
1754
|
+
function mungeRef($this, ref) {
|
|
1755
|
+
if (ref === '#')
|
|
1756
|
+
return '#/';
|
|
1757
|
+
if (!contains(ref, ':') && !startsWith(ref, '#') && !startsWith(ref, '/') && !contains(ref, '$') && indexOf(ref, _Char___init__impl__6a9atx(46)) > 0) {
|
|
1758
|
+
return './' + ref;
|
|
1759
|
+
}
|
|
1760
|
+
return ref;
|
|
1761
|
+
}
|
|
1762
|
+
function detectFormat($this, ref) {
|
|
1763
|
+
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();
|
|
1764
|
+
}
|
|
1765
|
+
function normalizePath($this, path) {
|
|
1766
|
+
var absolute = startsWith(path, '/');
|
|
1767
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1768
|
+
var result = ArrayList_init_$Create$_0();
|
|
1769
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1770
|
+
var _iterator__ex2g4s = split(path, ['/']).f();
|
|
1771
|
+
while (_iterator__ex2g4s.g()) {
|
|
1772
|
+
var element = _iterator__ex2g4s.h();
|
|
1773
|
+
switch (element) {
|
|
1774
|
+
case '':
|
|
1775
|
+
case '.':
|
|
1776
|
+
break;
|
|
1777
|
+
case '..':
|
|
1778
|
+
// Inline function 'kotlin.collections.isNotEmpty' call
|
|
1779
|
+
|
|
1780
|
+
if (!result.p()) {
|
|
1781
|
+
result.u1(get_lastIndex(result));
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
break;
|
|
1785
|
+
default:
|
|
1786
|
+
result.d(element);
|
|
1787
|
+
break;
|
|
1788
|
+
}
|
|
1789
|
+
}
|
|
1790
|
+
return absolute ? '/' + joinToString(result, '/') : joinToString(result, '/');
|
|
1791
|
+
}
|
|
1792
|
+
function Companion_1() {
|
|
1793
|
+
}
|
|
1794
|
+
protoOf(Companion_1).p1d = function (refString, baseUri) {
|
|
1795
|
+
var ref = mungeRef(this, refString);
|
|
1796
|
+
var format = detectFormat(this, ref);
|
|
1797
|
+
if (format.equals(SchemaRefFormat_INTERNAL_getInstance())) {
|
|
1798
|
+
return new SchemaRef(ref, format, null, ref, baseUri);
|
|
1799
|
+
}
|
|
1800
|
+
var hashIdx = indexOf_0(ref, '#/');
|
|
1801
|
+
var filePart;
|
|
1802
|
+
var pointer;
|
|
1803
|
+
if (hashIdx >= 0) {
|
|
1804
|
+
filePart = substring(ref, 0, hashIdx);
|
|
1805
|
+
pointer = substring_0(ref, hashIdx);
|
|
1806
|
+
} else if (ref === '#') {
|
|
1807
|
+
return new SchemaRef(ref, SchemaRefFormat_INTERNAL_getInstance(), null, '#/', baseUri);
|
|
1808
|
+
} else {
|
|
1809
|
+
filePart = ref;
|
|
1810
|
+
pointer = null;
|
|
1811
|
+
}
|
|
1812
|
+
var resolvedFileUri = format.w1_1 === 1 ? this.y1d(baseUri, filePart) : filePart;
|
|
1813
|
+
return new SchemaRef(ref, format, resolvedFileUri, pointer, baseUri);
|
|
1814
|
+
};
|
|
1815
|
+
protoOf(Companion_1).y1d = function (base, relative) {
|
|
1816
|
+
// Inline function 'kotlin.text.isEmpty' call
|
|
1817
|
+
if (charSequenceLength(relative) === 0)
|
|
1818
|
+
return base;
|
|
1819
|
+
if (startsWith(relative, 'http://') || startsWith(relative, 'https://') || startsWith(relative, 'file://') || startsWith(relative, 'classpath:'))
|
|
1820
|
+
return relative;
|
|
1821
|
+
var normalizedBase = replace_0(base, _Char___init__impl__6a9atx(92), _Char___init__impl__6a9atx(47));
|
|
1822
|
+
var normalizedRel = replace_0(relative, _Char___init__impl__6a9atx(92), _Char___init__impl__6a9atx(47));
|
|
1823
|
+
if (startsWith(normalizedBase, 'classpath:')) {
|
|
1824
|
+
var basePath = removePrefix(normalizedBase, 'classpath:');
|
|
1825
|
+
var baseDir = substringBeforeLast(basePath, '/') + '/';
|
|
1826
|
+
var combinedPath = startsWith(normalizedRel, '/') ? normalizedRel : baseDir + normalizedRel;
|
|
1827
|
+
return 'classpath:' + normalizePath(this, combinedPath);
|
|
1828
|
+
}
|
|
1829
|
+
var baseDir_0 = substringBeforeLast(normalizedBase, '/') + '/';
|
|
1830
|
+
var combined = startsWith(normalizedRel, '/') ? normalizedRel : baseDir_0 + normalizedRel;
|
|
1831
|
+
var parts = split(combined, ['/']);
|
|
1832
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
1833
|
+
var result = ArrayList_init_$Create$_0();
|
|
1834
|
+
var _iterator__ex2g4s = parts.f();
|
|
1835
|
+
while (_iterator__ex2g4s.g()) {
|
|
1836
|
+
var part = _iterator__ex2g4s.h();
|
|
1837
|
+
switch (part) {
|
|
1838
|
+
case '.':
|
|
1839
|
+
break;
|
|
1840
|
+
case '..':
|
|
1841
|
+
if (result.i() > 3) {
|
|
1842
|
+
result.u1(get_lastIndex(result));
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
break;
|
|
1846
|
+
default:
|
|
1847
|
+
result.d(part);
|
|
1848
|
+
break;
|
|
1849
|
+
}
|
|
1850
|
+
}
|
|
1851
|
+
return joinToString(result, '/');
|
|
1852
|
+
};
|
|
1853
|
+
var Companion_instance_1;
|
|
1854
|
+
function Companion_getInstance_1() {
|
|
1855
|
+
return Companion_instance_1;
|
|
1856
|
+
}
|
|
1857
|
+
function SchemaRef(rawRef, format, fileUri, pointer, referencingUri) {
|
|
1858
|
+
this.q1d_1 = rawRef;
|
|
1859
|
+
this.r1d_1 = format;
|
|
1860
|
+
this.s1d_1 = fileUri;
|
|
1861
|
+
this.t1d_1 = pointer;
|
|
1862
|
+
this.u1d_1 = referencingUri;
|
|
1863
|
+
}
|
|
1864
|
+
protoOf(SchemaRef).toString = function () {
|
|
1865
|
+
return 'SchemaRef(rawRef=' + this.q1d_1 + ', format=' + this.r1d_1.toString() + ', fileUri=' + this.s1d_1 + ', pointer=' + this.t1d_1 + ', referencingUri=' + this.u1d_1 + ')';
|
|
1866
|
+
};
|
|
1867
|
+
protoOf(SchemaRef).hashCode = function () {
|
|
1868
|
+
var result = getStringHashCode(this.q1d_1);
|
|
1869
|
+
result = imul(result, 31) + this.r1d_1.hashCode() | 0;
|
|
1870
|
+
result = imul(result, 31) + (this.s1d_1 == null ? 0 : getStringHashCode(this.s1d_1)) | 0;
|
|
1871
|
+
result = imul(result, 31) + (this.t1d_1 == null ? 0 : getStringHashCode(this.t1d_1)) | 0;
|
|
1872
|
+
result = imul(result, 31) + getStringHashCode(this.u1d_1) | 0;
|
|
1873
|
+
return result;
|
|
1874
|
+
};
|
|
1875
|
+
protoOf(SchemaRef).equals = function (other) {
|
|
1876
|
+
if (this === other)
|
|
1877
|
+
return true;
|
|
1878
|
+
if (!(other instanceof SchemaRef))
|
|
1879
|
+
return false;
|
|
1880
|
+
if (!(this.q1d_1 === other.q1d_1))
|
|
1881
|
+
return false;
|
|
1882
|
+
if (!this.r1d_1.equals(other.r1d_1))
|
|
1883
|
+
return false;
|
|
1884
|
+
if (!(this.s1d_1 == other.s1d_1))
|
|
1885
|
+
return false;
|
|
1886
|
+
if (!(this.t1d_1 == other.t1d_1))
|
|
1887
|
+
return false;
|
|
1888
|
+
if (!(this.u1d_1 === other.u1d_1))
|
|
1889
|
+
return false;
|
|
1890
|
+
return true;
|
|
1891
|
+
};
|
|
1892
|
+
function SchemaRefFormat_INTERNAL_getInstance() {
|
|
1893
|
+
SchemaRefFormat_initEntries();
|
|
1894
|
+
return SchemaRefFormat_INTERNAL_instance;
|
|
1895
|
+
}
|
|
1896
|
+
function SchemaRefFormat_RELATIVE_getInstance() {
|
|
1897
|
+
SchemaRefFormat_initEntries();
|
|
1898
|
+
return SchemaRefFormat_RELATIVE_instance;
|
|
1899
|
+
}
|
|
1900
|
+
function SchemaRefFormat_FILE_getInstance() {
|
|
1901
|
+
SchemaRefFormat_initEntries();
|
|
1902
|
+
return SchemaRefFormat_FILE_instance;
|
|
1903
|
+
}
|
|
1904
|
+
function SchemaRefFormat_CLASSPATH_getInstance() {
|
|
1905
|
+
SchemaRefFormat_initEntries();
|
|
1906
|
+
return SchemaRefFormat_CLASSPATH_instance;
|
|
1907
|
+
}
|
|
1908
|
+
function SchemaRefFormat_URL_getInstance() {
|
|
1909
|
+
SchemaRefFormat_initEntries();
|
|
1910
|
+
return SchemaRefFormat_URL_instance;
|
|
1911
|
+
}
|
|
1912
|
+
function parseSchemaText(input, baseUri) {
|
|
1913
|
+
baseUri = baseUri === VOID ? 'memory://anonymous' : baseUri;
|
|
1914
|
+
var normalizedBaseUri = Companion_instance_0.p17(baseUri);
|
|
1915
|
+
var raw = parseText(input, normalizedBaseUri);
|
|
1916
|
+
return exportParsedDocument(new ParsedDocument(raw.s18_1, raw.t18_1, raw.u18_1, mapOf(to(raw.r18_1, raw.u18_1))));
|
|
1917
|
+
}
|
|
1918
|
+
function refParserPlatform() {
|
|
1919
|
+
var result = {};
|
|
1920
|
+
result.name = RefParserPlatform_instance.v1a();
|
|
1921
|
+
var capabilities = [];
|
|
1922
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1923
|
+
var _iterator__ex2g4s = RefParserPlatform_instance.w1a().f();
|
|
1924
|
+
while (_iterator__ex2g4s.g()) {
|
|
1925
|
+
var element = _iterator__ex2g4s.h();
|
|
1926
|
+
capabilities.push(element);
|
|
1927
|
+
}
|
|
1928
|
+
result.capabilities = capabilities;
|
|
1929
|
+
return result;
|
|
1930
|
+
}
|
|
1931
|
+
function dereferenceSchema(uri, mergeAllOf) {
|
|
1932
|
+
mergeAllOf = mergeAllOf === VOID ? false : mergeAllOf;
|
|
1933
|
+
var tmp = GlobalScope_instance;
|
|
1934
|
+
return promise(tmp, VOID, VOID, dereferenceSchema$slambda_0(uri, mergeAllOf, null));
|
|
1935
|
+
}
|
|
1936
|
+
function dereferenceSchemaText(input, baseUri, mergeAllOf) {
|
|
1937
|
+
baseUri = baseUri === VOID ? 'memory://anonymous' : baseUri;
|
|
1938
|
+
mergeAllOf = mergeAllOf === VOID ? false : mergeAllOf;
|
|
1939
|
+
var tmp = GlobalScope_instance;
|
|
1940
|
+
return promise(tmp, VOID, VOID, dereferenceSchemaText$slambda_0(input, baseUri, mergeAllOf, null));
|
|
1941
|
+
}
|
|
1942
|
+
function exportParsedDocument(document) {
|
|
1943
|
+
var result = {};
|
|
1944
|
+
result.root = convertToPlain(document.x19_1);
|
|
1945
|
+
result.schema = convertToPlain(document.y19_1);
|
|
1946
|
+
result.locations = convertToPlain(document.z19_1);
|
|
1947
|
+
result.documentLocations = convertToPlain(document.a1a_1);
|
|
1948
|
+
result.resolvedRefs = exportResolvedRefs(document.b1a_1);
|
|
1949
|
+
result.hasCircularRefs = document.d1a_1;
|
|
1950
|
+
return result;
|
|
1951
|
+
}
|
|
1952
|
+
function exportResolvedRefs(resolvedRefs) {
|
|
1953
|
+
var result = [];
|
|
1954
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1955
|
+
var _iterator__ex2g4s = resolvedRefs.f();
|
|
1956
|
+
while (_iterator__ex2g4s.g()) {
|
|
1957
|
+
var element = _iterator__ex2g4s.h();
|
|
1958
|
+
var item = {};
|
|
1959
|
+
item.refString = element.e1a_1;
|
|
1960
|
+
item.targetUri = element.h1a_1;
|
|
1961
|
+
result.push(item);
|
|
1962
|
+
}
|
|
1963
|
+
return result;
|
|
1964
|
+
}
|
|
1965
|
+
function convertToPlain(value) {
|
|
1966
|
+
var tmp;
|
|
1967
|
+
if (value == null) {
|
|
1968
|
+
tmp = null;
|
|
1969
|
+
} else {
|
|
1970
|
+
if (value instanceof SourceLocation) {
|
|
1971
|
+
tmp = exportSourceLocation(value);
|
|
1972
|
+
} else {
|
|
1973
|
+
if (isInterface(value, KtMap)) {
|
|
1974
|
+
var result = {};
|
|
1975
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1976
|
+
// Inline function 'kotlin.collections.iterator' call
|
|
1977
|
+
var _iterator__ex2g4s = value.n1().f();
|
|
1978
|
+
while (_iterator__ex2g4s.g()) {
|
|
1979
|
+
var element = _iterator__ex2g4s.h();
|
|
1980
|
+
// Inline function 'kotlin.collections.component1' call
|
|
1981
|
+
var key = element.i1();
|
|
1982
|
+
// Inline function 'kotlin.collections.component2' call
|
|
1983
|
+
var childValue = element.j1();
|
|
1984
|
+
result[toString_0(key)] = convertToPlain(childValue);
|
|
1985
|
+
}
|
|
1986
|
+
tmp = result;
|
|
1987
|
+
} else {
|
|
1988
|
+
if (isInterface(value, Collection)) {
|
|
1989
|
+
var result_0 = [];
|
|
1990
|
+
// Inline function 'kotlin.collections.forEach' call
|
|
1991
|
+
var _iterator__ex2g4s_0 = value.f();
|
|
1992
|
+
while (_iterator__ex2g4s_0.g()) {
|
|
1993
|
+
var element_0 = _iterator__ex2g4s_0.h();
|
|
1994
|
+
result_0.push(convertToPlain(element_0));
|
|
1995
|
+
}
|
|
1996
|
+
tmp = result_0;
|
|
1997
|
+
} else {
|
|
1998
|
+
tmp = value;
|
|
1999
|
+
}
|
|
2000
|
+
}
|
|
2001
|
+
}
|
|
2002
|
+
}
|
|
2003
|
+
return tmp;
|
|
2004
|
+
}
|
|
2005
|
+
function exportSourceLocation(location) {
|
|
2006
|
+
var result = {};
|
|
2007
|
+
result.file = location.o1a_1;
|
|
2008
|
+
result.line = location.p1a_1;
|
|
2009
|
+
result.column = location.q1a_1;
|
|
2010
|
+
result.endLine = location.r1a_1;
|
|
2011
|
+
result.endColumn = location.s1a_1;
|
|
2012
|
+
return result;
|
|
2013
|
+
}
|
|
2014
|
+
function dereferenceSchema$slambda($uri, $mergeAllOf, resultContinuation) {
|
|
2015
|
+
this.h1e_1 = $uri;
|
|
2016
|
+
this.i1e_1 = $mergeAllOf;
|
|
2017
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2018
|
+
}
|
|
2019
|
+
protoOf(dereferenceSchema$slambda).l1e = function ($this$promise, $completion) {
|
|
2020
|
+
var tmp = this.m1e($this$promise, $completion);
|
|
2021
|
+
tmp.w6_1 = Unit_instance;
|
|
2022
|
+
tmp.x6_1 = null;
|
|
2023
|
+
return tmp.c7();
|
|
2024
|
+
};
|
|
2025
|
+
protoOf(dereferenceSchema$slambda).m7 = function (p1, $completion) {
|
|
2026
|
+
return this.l1e((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2027
|
+
};
|
|
2028
|
+
protoOf(dereferenceSchema$slambda).c7 = function () {
|
|
2029
|
+
var suspendResult = this.w6_1;
|
|
2030
|
+
$sm: do
|
|
2031
|
+
try {
|
|
2032
|
+
var tmp = this.u6_1;
|
|
2033
|
+
switch (tmp) {
|
|
2034
|
+
case 0:
|
|
2035
|
+
this.v6_1 = 4;
|
|
2036
|
+
this.u6_1 = 1;
|
|
2037
|
+
suspendResult = (new RefParser(this.h1e_1)).s19(this);
|
|
2038
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2039
|
+
return suspendResult;
|
|
2040
|
+
}
|
|
2041
|
+
|
|
2042
|
+
continue $sm;
|
|
2043
|
+
case 1:
|
|
2044
|
+
this.k1e_1 = suspendResult;
|
|
2045
|
+
if (this.i1e_1) {
|
|
2046
|
+
this.u6_1 = 2;
|
|
2047
|
+
suspendResult = this.k1e_1.t19(this);
|
|
2048
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2049
|
+
return suspendResult;
|
|
2050
|
+
}
|
|
2051
|
+
continue $sm;
|
|
2052
|
+
} else {
|
|
2053
|
+
this.u6_1 = 3;
|
|
2054
|
+
continue $sm;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
case 2:
|
|
2058
|
+
this.u6_1 = 3;
|
|
2059
|
+
continue $sm;
|
|
2060
|
+
case 3:
|
|
2061
|
+
return exportParsedDocument(this.k1e_1.u19());
|
|
2062
|
+
case 4:
|
|
2063
|
+
throw this.x6_1;
|
|
2064
|
+
}
|
|
2065
|
+
} catch ($p) {
|
|
2066
|
+
var e = $p;
|
|
2067
|
+
if (this.v6_1 === 4) {
|
|
2068
|
+
throw e;
|
|
2069
|
+
} else {
|
|
2070
|
+
this.u6_1 = this.v6_1;
|
|
2071
|
+
this.x6_1 = e;
|
|
2072
|
+
}
|
|
2073
|
+
}
|
|
2074
|
+
while (true);
|
|
2075
|
+
};
|
|
2076
|
+
protoOf(dereferenceSchema$slambda).m1e = function ($this$promise, completion) {
|
|
2077
|
+
var i = new dereferenceSchema$slambda(this.h1e_1, this.i1e_1, completion);
|
|
2078
|
+
i.j1e_1 = $this$promise;
|
|
2079
|
+
return i;
|
|
2080
|
+
};
|
|
2081
|
+
function dereferenceSchema$slambda_0($uri, $mergeAllOf, resultContinuation) {
|
|
2082
|
+
var i = new dereferenceSchema$slambda($uri, $mergeAllOf, resultContinuation);
|
|
2083
|
+
var l = function ($this$promise, $completion) {
|
|
2084
|
+
return i.l1e($this$promise, $completion);
|
|
2085
|
+
};
|
|
2086
|
+
l.$arity = 1;
|
|
2087
|
+
return l;
|
|
2088
|
+
}
|
|
2089
|
+
function dereferenceSchemaText$slambda($input, $baseUri, $mergeAllOf, resultContinuation) {
|
|
2090
|
+
this.v1e_1 = $input;
|
|
2091
|
+
this.w1e_1 = $baseUri;
|
|
2092
|
+
this.x1e_1 = $mergeAllOf;
|
|
2093
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2094
|
+
}
|
|
2095
|
+
protoOf(dereferenceSchemaText$slambda).l1e = function ($this$promise, $completion) {
|
|
2096
|
+
var tmp = this.m1e($this$promise, $completion);
|
|
2097
|
+
tmp.w6_1 = Unit_instance;
|
|
2098
|
+
tmp.x6_1 = null;
|
|
2099
|
+
return tmp.c7();
|
|
2100
|
+
};
|
|
2101
|
+
protoOf(dereferenceSchemaText$slambda).m7 = function (p1, $completion) {
|
|
2102
|
+
return this.l1e((!(p1 == null) ? isInterface(p1, CoroutineScope) : false) ? p1 : THROW_CCE(), $completion);
|
|
2103
|
+
};
|
|
2104
|
+
protoOf(dereferenceSchemaText$slambda).c7 = function () {
|
|
2105
|
+
var suspendResult = this.w6_1;
|
|
2106
|
+
$sm: do
|
|
2107
|
+
try {
|
|
2108
|
+
var tmp = this.u6_1;
|
|
2109
|
+
switch (tmp) {
|
|
2110
|
+
case 0:
|
|
2111
|
+
this.v6_1 = 4;
|
|
2112
|
+
this.u6_1 = 1;
|
|
2113
|
+
suspendResult = Companion_instance_0.o17(this.v1e_1, this.w1e_1).s19(this);
|
|
2114
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2115
|
+
return suspendResult;
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2118
|
+
continue $sm;
|
|
2119
|
+
case 1:
|
|
2120
|
+
this.z1e_1 = suspendResult;
|
|
2121
|
+
if (this.x1e_1) {
|
|
2122
|
+
this.u6_1 = 2;
|
|
2123
|
+
suspendResult = this.z1e_1.t19(this);
|
|
2124
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2125
|
+
return suspendResult;
|
|
2126
|
+
}
|
|
2127
|
+
continue $sm;
|
|
2128
|
+
} else {
|
|
2129
|
+
this.u6_1 = 3;
|
|
2130
|
+
continue $sm;
|
|
2131
|
+
}
|
|
2132
|
+
|
|
2133
|
+
case 2:
|
|
2134
|
+
this.u6_1 = 3;
|
|
2135
|
+
continue $sm;
|
|
2136
|
+
case 3:
|
|
2137
|
+
return exportParsedDocument(this.z1e_1.u19());
|
|
2138
|
+
case 4:
|
|
2139
|
+
throw this.x6_1;
|
|
2140
|
+
}
|
|
2141
|
+
} catch ($p) {
|
|
2142
|
+
var e = $p;
|
|
2143
|
+
if (this.v6_1 === 4) {
|
|
2144
|
+
throw e;
|
|
2145
|
+
} else {
|
|
2146
|
+
this.u6_1 = this.v6_1;
|
|
2147
|
+
this.x6_1 = e;
|
|
2148
|
+
}
|
|
2149
|
+
}
|
|
2150
|
+
while (true);
|
|
2151
|
+
};
|
|
2152
|
+
protoOf(dereferenceSchemaText$slambda).m1e = function ($this$promise, completion) {
|
|
2153
|
+
var i = new dereferenceSchemaText$slambda(this.v1e_1, this.w1e_1, this.x1e_1, completion);
|
|
2154
|
+
i.y1e_1 = $this$promise;
|
|
2155
|
+
return i;
|
|
2156
|
+
};
|
|
2157
|
+
function dereferenceSchemaText$slambda_0($input, $baseUri, $mergeAllOf, resultContinuation) {
|
|
2158
|
+
var i = new dereferenceSchemaText$slambda($input, $baseUri, $mergeAllOf, resultContinuation);
|
|
2159
|
+
var l = function ($this$promise, $completion) {
|
|
2160
|
+
return i.l1e($this$promise, $completion);
|
|
2161
|
+
};
|
|
2162
|
+
l.$arity = 1;
|
|
2163
|
+
return l;
|
|
2164
|
+
}
|
|
2165
|
+
function defaultLoaders(auth) {
|
|
2166
|
+
auth = auth === VOID ? emptyList() : auth;
|
|
2167
|
+
return listOf_0([new NodeFsLoader(), new FetchLoader(auth)]);
|
|
2168
|
+
}
|
|
2169
|
+
function applyQueryAuth($this, url) {
|
|
2170
|
+
// Inline function 'kotlin.collections.filter' call
|
|
2171
|
+
var tmp0 = $this.a1f_1;
|
|
2172
|
+
// Inline function 'kotlin.collections.filterTo' call
|
|
2173
|
+
var destination = ArrayList_init_$Create$_0();
|
|
2174
|
+
var _iterator__ex2g4s = tmp0.f();
|
|
2175
|
+
while (_iterator__ex2g4s.g()) {
|
|
2176
|
+
var element = _iterator__ex2g4s.h();
|
|
2177
|
+
if (element.d1f_1.equals(AuthenticationType_QUERY_getInstance()) && element.g1f(url)) {
|
|
2178
|
+
destination.d(element);
|
|
2179
|
+
}
|
|
2180
|
+
}
|
|
2181
|
+
// Inline function 'kotlin.collections.map' call
|
|
2182
|
+
// Inline function 'kotlin.collections.mapTo' call
|
|
2183
|
+
var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(destination, 10));
|
|
2184
|
+
var _iterator__ex2g4s_0 = destination.f();
|
|
2185
|
+
while (_iterator__ex2g4s_0.g()) {
|
|
2186
|
+
var item = _iterator__ex2g4s_0.h();
|
|
2187
|
+
var tmp$ret$3 = encode($this, item.b1f_1) + '=' + encode($this, item.c1f_1);
|
|
2188
|
+
destination_0.d(tmp$ret$3);
|
|
2189
|
+
}
|
|
2190
|
+
var params = destination_0;
|
|
2191
|
+
if (params.p())
|
|
2192
|
+
return url;
|
|
2193
|
+
var separator = contains(url, '?') ? '&' : '?';
|
|
2194
|
+
return url + separator + joinToString(params, '&');
|
|
2195
|
+
}
|
|
2196
|
+
function encode($this, value) {
|
|
2197
|
+
return encodeURIComponent(value);
|
|
2198
|
+
}
|
|
2199
|
+
function $loadCOROUTINE$(_this__u8e3s4, uri, resultContinuation) {
|
|
2200
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2201
|
+
this.p1f_1 = _this__u8e3s4;
|
|
2202
|
+
this.q1f_1 = uri;
|
|
2203
|
+
}
|
|
2204
|
+
protoOf($loadCOROUTINE$).c7 = function () {
|
|
2205
|
+
var suspendResult = this.w6_1;
|
|
2206
|
+
$sm: do
|
|
2207
|
+
try {
|
|
2208
|
+
var tmp = this.u6_1;
|
|
2209
|
+
switch (tmp) {
|
|
2210
|
+
case 0:
|
|
2211
|
+
this.v6_1 = 3;
|
|
2212
|
+
this.r1f_1 = applyQueryAuth(this.p1f_1, this.q1f_1);
|
|
2213
|
+
var headers = {};
|
|
2214
|
+
headers['Accept'] = 'application/json, application/yaml, */*';
|
|
2215
|
+
var _iterator__ex2g4s = this.p1f_1.a1f_1.f();
|
|
2216
|
+
while (_iterator__ex2g4s.g()) {
|
|
2217
|
+
var a = _iterator__ex2g4s.h();
|
|
2218
|
+
if (a.d1f_1.equals(AuthenticationType_HEADER_getInstance()) && a.g1f(this.r1f_1)) {
|
|
2219
|
+
headers[a.b1f_1] = a.c1f_1;
|
|
2220
|
+
}
|
|
2221
|
+
}
|
|
2222
|
+
|
|
2223
|
+
var init = {};
|
|
2224
|
+
init['headers'] = headers;
|
|
2225
|
+
this.u6_1 = 1;
|
|
2226
|
+
suspendResult = await_0(fetch(this.r1f_1, init), this);
|
|
2227
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2228
|
+
return suspendResult;
|
|
2229
|
+
}
|
|
2230
|
+
|
|
2231
|
+
continue $sm;
|
|
2232
|
+
case 1:
|
|
2233
|
+
var response = suspendResult;
|
|
2234
|
+
var tmp_0 = response.status;
|
|
2235
|
+
var status = (!(tmp_0 == null) ? typeof tmp_0 === 'number' : false) ? tmp_0 : THROW_CCE();
|
|
2236
|
+
if (status >= 400)
|
|
2237
|
+
throw RuntimeException_init_$Create$('HTTP ' + status + ' loading: ' + this.r1f_1);
|
|
2238
|
+
this.u6_1 = 2;
|
|
2239
|
+
var tmp_1 = response.text();
|
|
2240
|
+
suspendResult = await_0(tmp_1 instanceof Promise ? tmp_1 : THROW_CCE(), this);
|
|
2241
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2242
|
+
return suspendResult;
|
|
2243
|
+
}
|
|
2244
|
+
|
|
2245
|
+
continue $sm;
|
|
2246
|
+
case 2:
|
|
2247
|
+
return suspendResult;
|
|
2248
|
+
case 3:
|
|
2249
|
+
throw this.x6_1;
|
|
2250
|
+
}
|
|
2251
|
+
} catch ($p) {
|
|
2252
|
+
var e = $p;
|
|
2253
|
+
if (this.v6_1 === 3) {
|
|
2254
|
+
throw e;
|
|
2255
|
+
} else {
|
|
2256
|
+
this.u6_1 = this.v6_1;
|
|
2257
|
+
this.x6_1 = e;
|
|
2258
|
+
}
|
|
2259
|
+
}
|
|
2260
|
+
while (true);
|
|
2261
|
+
};
|
|
2262
|
+
function FetchLoader(auth) {
|
|
2263
|
+
auth = auth === VOID ? emptyList() : auth;
|
|
2264
|
+
this.a1f_1 = auth;
|
|
2265
|
+
}
|
|
2266
|
+
protoOf(FetchLoader).l18 = function (uri) {
|
|
2267
|
+
return startsWith(uri, 'http://') || startsWith(uri, 'https://');
|
|
2268
|
+
};
|
|
2269
|
+
protoOf(FetchLoader).q18 = function (uri, $completion) {
|
|
2270
|
+
var tmp = new $loadCOROUTINE$(this, uri, $completion);
|
|
2271
|
+
tmp.w6_1 = Unit_instance;
|
|
2272
|
+
tmp.x6_1 = null;
|
|
2273
|
+
return tmp.c7();
|
|
2274
|
+
};
|
|
2275
|
+
function readUtf8File($this, filePath, $completion) {
|
|
2276
|
+
var tmp = new $readUtf8FileCOROUTINE$($this, filePath, $completion);
|
|
2277
|
+
tmp.w6_1 = Unit_instance;
|
|
2278
|
+
tmp.x6_1 = null;
|
|
2279
|
+
return tmp.c7();
|
|
2280
|
+
}
|
|
2281
|
+
function $readUtf8FileCOROUTINE$(_this__u8e3s4, filePath, resultContinuation) {
|
|
2282
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2283
|
+
this.a1g_1 = _this__u8e3s4;
|
|
2284
|
+
this.b1g_1 = filePath;
|
|
2285
|
+
}
|
|
2286
|
+
protoOf($readUtf8FileCOROUTINE$).c7 = function () {
|
|
2287
|
+
var suspendResult = this.w6_1;
|
|
2288
|
+
$sm: do
|
|
2289
|
+
try {
|
|
2290
|
+
var tmp = this.u6_1;
|
|
2291
|
+
if (tmp === 0) {
|
|
2292
|
+
this.v6_1 = 1;
|
|
2293
|
+
var tmp_0 = nodeFs(this).readFileSync(this.b1g_1, 'utf8');
|
|
2294
|
+
return (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
|
|
2295
|
+
} else if (tmp === 1) {
|
|
2296
|
+
throw this.x6_1;
|
|
2297
|
+
}
|
|
2298
|
+
} catch ($p) {
|
|
2299
|
+
var e = $p;
|
|
2300
|
+
throw e;
|
|
2301
|
+
}
|
|
2302
|
+
while (true);
|
|
2303
|
+
};
|
|
2304
|
+
function NodeFsLoader() {
|
|
2305
|
+
}
|
|
2306
|
+
protoOf(NodeFsLoader).l18 = function (uri) {
|
|
2307
|
+
return startsWith(uri, 'file://') || (!contains(uri, '://') && !startsWith(uri, 'classpath:'));
|
|
2308
|
+
};
|
|
2309
|
+
protoOf(NodeFsLoader).q18 = function (uri, $completion) {
|
|
2310
|
+
var normalizedUri = substringBefore(uri, _Char___init__impl__6a9atx(35));
|
|
2311
|
+
var tmp;
|
|
2312
|
+
// Inline function 'kotlin.text.matches' call
|
|
2313
|
+
if (Regex_init_$Create$('^file:///[A-Za-z]:/.*$').w9(normalizedUri)) {
|
|
2314
|
+
tmp = removePrefix(normalizedUri, 'file:///');
|
|
2315
|
+
} else {
|
|
2316
|
+
if (startsWith(normalizedUri, 'file:///')) {
|
|
2317
|
+
tmp = removePrefix(normalizedUri, 'file://');
|
|
2318
|
+
} else {
|
|
2319
|
+
if (startsWith(normalizedUri, 'file://')) {
|
|
2320
|
+
tmp = removePrefix(normalizedUri, 'file://');
|
|
2321
|
+
} else {
|
|
2322
|
+
tmp = normalizedUri;
|
|
2323
|
+
}
|
|
2324
|
+
}
|
|
2325
|
+
}
|
|
2326
|
+
var filePath = tmp;
|
|
2327
|
+
return readUtf8File(this, filePath, $completion);
|
|
2328
|
+
};
|
|
2329
|
+
var cachedNodeFs;
|
|
2330
|
+
function isNodeRuntime() {
|
|
2331
|
+
var tmp = typeof globalThis.process === 'object' && globalThis.process !== null && typeof (globalThis.process.versions || {}).node === 'string';
|
|
2332
|
+
return (!(tmp == null) ? typeof tmp === 'boolean' : false) ? tmp : THROW_CCE();
|
|
2333
|
+
}
|
|
2334
|
+
function hasGlobalFetch() {
|
|
2335
|
+
var tmp = typeof globalThis.fetch === 'function';
|
|
2336
|
+
return (!(tmp == null) ? typeof tmp === 'boolean' : false) ? tmp : THROW_CCE();
|
|
2337
|
+
}
|
|
2338
|
+
function currentPlatformName() {
|
|
2339
|
+
return isNodeRuntime() ? 'node' : 'browser';
|
|
2340
|
+
}
|
|
2341
|
+
function currentPlatformCapabilities() {
|
|
2342
|
+
// Inline function 'kotlin.collections.buildSet' call
|
|
2343
|
+
// Inline function 'kotlin.collections.buildSetInternal' call
|
|
2344
|
+
// Inline function 'kotlin.apply' call
|
|
2345
|
+
var this_0 = LinkedHashSet_init_$Create$();
|
|
2346
|
+
if (isNodeRuntime()) {
|
|
2347
|
+
this_0.d('jsonrefparser.filesystem');
|
|
2348
|
+
}
|
|
2349
|
+
if (hasGlobalFetch()) {
|
|
2350
|
+
this_0.d('jsonrefparser.http');
|
|
2351
|
+
}
|
|
2352
|
+
return this_0.p3();
|
|
2353
|
+
}
|
|
2354
|
+
function nodeFs($completion) {
|
|
2355
|
+
var tmp = new $nodeFsCOROUTINE$($completion);
|
|
2356
|
+
tmp.w6_1 = Unit_instance;
|
|
2357
|
+
tmp.x6_1 = null;
|
|
2358
|
+
return tmp.c7();
|
|
2359
|
+
}
|
|
2360
|
+
function resolveNodeFs(preferBuiltinModule, $completion) {
|
|
2361
|
+
var tmp = new $resolveNodeFsCOROUTINE$(preferBuiltinModule, $completion);
|
|
2362
|
+
tmp.w6_1 = Unit_instance;
|
|
2363
|
+
tmp.x6_1 = null;
|
|
2364
|
+
return tmp.c7();
|
|
2365
|
+
}
|
|
2366
|
+
function $nodeFsCOROUTINE$(resultContinuation) {
|
|
2367
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2368
|
+
}
|
|
2369
|
+
protoOf($nodeFsCOROUTINE$).c7 = function () {
|
|
2370
|
+
var suspendResult = this.w6_1;
|
|
2371
|
+
$sm: do
|
|
2372
|
+
try {
|
|
2373
|
+
var tmp = this.u6_1;
|
|
2374
|
+
switch (tmp) {
|
|
2375
|
+
case 0:
|
|
2376
|
+
this.v6_1 = 3;
|
|
2377
|
+
if (cachedNodeFs == null) {
|
|
2378
|
+
this.u6_1 = 1;
|
|
2379
|
+
suspendResult = resolveNodeFs(true, this);
|
|
2380
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2381
|
+
return suspendResult;
|
|
2382
|
+
}
|
|
2383
|
+
continue $sm;
|
|
2384
|
+
} else {
|
|
2385
|
+
this.u6_1 = 2;
|
|
2386
|
+
continue $sm;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
case 1:
|
|
2390
|
+
cachedNodeFs = suspendResult;
|
|
2391
|
+
this.u6_1 = 2;
|
|
2392
|
+
continue $sm;
|
|
2393
|
+
case 2:
|
|
2394
|
+
return cachedNodeFs;
|
|
2395
|
+
case 3:
|
|
2396
|
+
throw this.x6_1;
|
|
2397
|
+
}
|
|
2398
|
+
} catch ($p) {
|
|
2399
|
+
var e = $p;
|
|
2400
|
+
if (this.v6_1 === 3) {
|
|
2401
|
+
throw e;
|
|
2402
|
+
} else {
|
|
2403
|
+
this.u6_1 = this.v6_1;
|
|
2404
|
+
this.x6_1 = e;
|
|
2405
|
+
}
|
|
2406
|
+
}
|
|
2407
|
+
while (true);
|
|
2408
|
+
};
|
|
2409
|
+
function $resolveNodeFsCOROUTINE$(preferBuiltinModule, resultContinuation) {
|
|
2410
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
2411
|
+
this.s1g_1 = preferBuiltinModule;
|
|
2412
|
+
}
|
|
2413
|
+
protoOf($resolveNodeFsCOROUTINE$).c7 = function () {
|
|
2414
|
+
var suspendResult = this.w6_1;
|
|
2415
|
+
$sm: do
|
|
2416
|
+
try {
|
|
2417
|
+
var tmp = this.u6_1;
|
|
2418
|
+
switch (tmp) {
|
|
2419
|
+
case 0:
|
|
2420
|
+
this.v6_1 = 2;
|
|
2421
|
+
if (!isNodeRuntime()) {
|
|
2422
|
+
throw new CapabilityUnavailableException('jsonrefparser.filesystem', currentPlatformName());
|
|
2423
|
+
}
|
|
2424
|
+
|
|
2425
|
+
var process = globalThis.process;
|
|
2426
|
+
if (this.s1g_1 && typeof process.getBuiltinModule === 'function') {
|
|
2427
|
+
return process.getBuiltinModule('node:fs');
|
|
2428
|
+
}
|
|
2429
|
+
|
|
2430
|
+
var dynamicImport = new Function('s', 'return import(s)');
|
|
2431
|
+
this.u6_1 = 1;
|
|
2432
|
+
var tmp_0 = dynamicImport('node:fs');
|
|
2433
|
+
suspendResult = await_0(tmp_0 instanceof Promise ? tmp_0 : THROW_CCE(), this);
|
|
2434
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
2435
|
+
return suspendResult;
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
continue $sm;
|
|
2439
|
+
case 1:
|
|
2440
|
+
var module_0 = suspendResult;
|
|
2441
|
+
return typeof module_0.readFileSync === 'function' ? module_0 : module_0.default;
|
|
2442
|
+
case 2:
|
|
2443
|
+
throw this.x6_1;
|
|
2444
|
+
}
|
|
2445
|
+
} catch ($p) {
|
|
2446
|
+
var e = $p;
|
|
2447
|
+
if (this.v6_1 === 2) {
|
|
2448
|
+
throw e;
|
|
2449
|
+
} else {
|
|
2450
|
+
this.u6_1 = this.v6_1;
|
|
2451
|
+
this.x6_1 = e;
|
|
2452
|
+
}
|
|
2453
|
+
}
|
|
2454
|
+
while (true);
|
|
2455
|
+
};
|
|
2456
|
+
//region block: init
|
|
2457
|
+
Companion_instance_0 = new Companion_0();
|
|
2458
|
+
RefParserPlatform_instance = new RefParserPlatform();
|
|
2459
|
+
Companion_instance_1 = new Companion_1();
|
|
2460
|
+
cachedNodeFs = null;
|
|
2461
|
+
//endregion
|
|
2462
|
+
//region block: exports
|
|
2463
|
+
export {
|
|
2464
|
+
parseSchemaText as parseSchemaText,
|
|
2465
|
+
refParserPlatform as refParserPlatform,
|
|
2466
|
+
dereferenceSchema as dereferenceSchema,
|
|
2467
|
+
dereferenceSchemaText as dereferenceSchemaText,
|
|
2468
|
+
};
|
|
2469
|
+
//endregion
|
|
2470
|
+
|
|
2471
|
+
//# sourceMappingURL=json-schema-ref-parser-kmp.mjs.map
|