@doordeck/doordeck-headless-sdk 0.71.0 → 0.73.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/README.md +14 -14
- package/kotlin/Kotlin-DateTime-library-kotlinx-datetime.js +1343 -1343
- package/kotlin/KotlinMultiplatformLibsodium-multiplatform-crypto-libsodium-bindings.js +35 -35
- package/kotlin/MultiplatformSettings-multiplatform-settings.js +9 -9
- package/kotlin/doordeck-sdk.d.ts +463 -489
- package/kotlin/doordeck-sdk.js +28975 -28999
- package/kotlin/kotlin-kotlin-stdlib.js +2288 -2789
- package/kotlin/kotlin-kotlinx-atomicfu-runtime.js +6 -0
- package/kotlin/kotlinx-atomicfu.js +19 -19
- package/kotlin/kotlinx-coroutines-core.js +2189 -2805
- package/kotlin/kotlinx-io-kotlinx-io-bytestring.js +2 -198
- package/kotlin/kotlinx-io-kotlinx-io-core.js +463 -536
- package/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +1939 -1939
- package/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +1684 -1733
- package/kotlin/ktor-ktor-client-ktor-client-core.js +3074 -3401
- package/kotlin/ktor-ktor-client-ktor-client-js.js +6 -0
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-auth.js +438 -540
- package/kotlin/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.js +271 -372
- package/kotlin/ktor-ktor-http.js +906 -1012
- package/kotlin/ktor-ktor-io.js +880 -1782
- package/kotlin/ktor-ktor-shared-ktor-events.js +13 -13
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.js +8 -8
- package/kotlin/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.js +282 -282
- package/kotlin/ktor-ktor-shared-ktor-serialization.js +137 -137
- package/kotlin/ktor-ktor-shared-ktor-websockets.js +57 -57
- package/kotlin/ktor-ktor-utils.js +668 -758
- package/package.json +2 -2
- package/kotlin/ktor-ktor-http-ktor-http-cio.js +0 -2009
|
@@ -1,68 +1,61 @@
|
|
|
1
1
|
(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_serialization, kotlin_io_ktor_ktor_io, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_utils) {
|
|
2
2
|
'use strict';
|
|
3
3
|
//region block: imports
|
|
4
|
-
var protoOf = kotlin_kotlin.$_$.
|
|
5
|
-
var initMetadataForClass = kotlin_kotlin.$_$.
|
|
6
|
-
var plus = kotlin_kotlin.$_$.
|
|
7
|
-
var toMutableSet = kotlin_kotlin.$_$.
|
|
4
|
+
var protoOf = kotlin_kotlin.$_$.jb;
|
|
5
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ja;
|
|
6
|
+
var plus = kotlin_kotlin.$_$.s7;
|
|
7
|
+
var toMutableSet = kotlin_kotlin.$_$.o8;
|
|
8
8
|
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.p;
|
|
9
9
|
var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
|
|
10
10
|
var register$default = kotlin_io_ktor_ktor_serialization.$_$.b;
|
|
11
|
-
var Unit_instance = kotlin_kotlin.$_$.
|
|
11
|
+
var Unit_instance = kotlin_kotlin.$_$.g5;
|
|
12
12
|
var Configuration = kotlin_io_ktor_ktor_serialization.$_$.c;
|
|
13
13
|
var VOID = kotlin_kotlin.$_$.h;
|
|
14
|
-
var Exception = kotlin_kotlin.$_$.
|
|
15
|
-
var Exception_init_$Init$ = kotlin_kotlin.$_$.
|
|
16
|
-
var captureStack = kotlin_kotlin.$_$.
|
|
17
|
-
var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.
|
|
18
|
-
var CoroutineImpl = kotlin_kotlin.$_$.
|
|
19
|
-
var THROW_CCE = kotlin_kotlin.$_$.
|
|
14
|
+
var Exception = kotlin_kotlin.$_$.me;
|
|
15
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.n1;
|
|
16
|
+
var captureStack = kotlin_kotlin.$_$.t9;
|
|
17
|
+
var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.h;
|
|
18
|
+
var CoroutineImpl = kotlin_kotlin.$_$.l9;
|
|
19
|
+
var THROW_CCE = kotlin_kotlin.$_$.ve;
|
|
20
20
|
var TransformRequestBodyContext = kotlin_io_ktor_ktor_client_core.$_$.g;
|
|
21
21
|
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.s;
|
|
22
|
-
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.
|
|
23
|
-
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.
|
|
24
|
-
var initMetadataForLambda = kotlin_kotlin.$_$.
|
|
22
|
+
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.k;
|
|
23
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.v8;
|
|
24
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.oa;
|
|
25
25
|
var TransformResponseBodyContext = kotlin_io_ktor_ktor_client_core.$_$.h;
|
|
26
26
|
var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.y;
|
|
27
|
-
var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.
|
|
28
|
-
var isInterface = kotlin_kotlin.$_$.
|
|
29
|
-
var contentType = kotlin_io_ktor_ktor_http.$_$.
|
|
27
|
+
var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.d1;
|
|
28
|
+
var isInterface = kotlin_kotlin.$_$.ya;
|
|
29
|
+
var contentType = kotlin_io_ktor_ktor_http.$_$.i1;
|
|
30
30
|
var get_request = kotlin_io_ktor_ktor_client_core.$_$.a1;
|
|
31
31
|
var suitableCharset = kotlin_io_ktor_ktor_serialization.$_$.f;
|
|
32
|
-
var toString = kotlin_kotlin.$_$.
|
|
33
|
-
var
|
|
34
|
-
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
|
|
35
|
-
var emptyList = kotlin_kotlin.$_$.y6;
|
|
36
|
-
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.c;
|
|
32
|
+
var toString = kotlin_kotlin.$_$.nb;
|
|
33
|
+
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.e;
|
|
37
34
|
var accept = kotlin_io_ktor_ktor_client_core.$_$.u;
|
|
38
|
-
var
|
|
35
|
+
var Collection = kotlin_kotlin.$_$.i5;
|
|
36
|
+
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.t;
|
|
39
37
|
var getKClassFromExpression = kotlin_kotlin.$_$.e;
|
|
40
|
-
var contentType_0 = kotlin_io_ktor_ktor_http.$_$.
|
|
38
|
+
var contentType_0 = kotlin_io_ktor_ktor_http.$_$.h1;
|
|
41
39
|
var EmptyContent_getInstance = kotlin_io_ktor_ktor_client_core.$_$.d;
|
|
42
|
-
var Unit = kotlin_kotlin.$_$.
|
|
43
|
-
var charset = kotlin_io_ktor_ktor_http.$_$.
|
|
44
|
-
var ensureNotNull = kotlin_kotlin.$_$.
|
|
40
|
+
var Unit = kotlin_kotlin.$_$.gf;
|
|
41
|
+
var charset = kotlin_io_ktor_ktor_http.$_$.f1;
|
|
42
|
+
var ensureNotNull = kotlin_kotlin.$_$.mf;
|
|
45
43
|
var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
|
|
46
|
-
var equals = kotlin_kotlin.$_$.
|
|
47
|
-
var joinToString = kotlin_kotlin.$_$.
|
|
48
|
-
var initMetadataForCoroutine = kotlin_kotlin.$_$.
|
|
49
|
-
var collectionSizeOrDefault = kotlin_kotlin.$_$.
|
|
44
|
+
var equals = kotlin_kotlin.$_$.ba;
|
|
45
|
+
var joinToString = kotlin_kotlin.$_$.h7;
|
|
46
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.la;
|
|
47
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.b6;
|
|
50
48
|
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.o;
|
|
51
49
|
var deserialize = kotlin_io_ktor_ktor_serialization.$_$.a;
|
|
52
50
|
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.g;
|
|
53
|
-
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.
|
|
54
|
-
var HttpStatusCode = kotlin_io_ktor_ktor_http.$_$.
|
|
51
|
+
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.w4;
|
|
52
|
+
var HttpStatusCode = kotlin_io_ktor_ktor_http.$_$.w;
|
|
55
53
|
var getKClass = kotlin_kotlin.$_$.f;
|
|
56
|
-
var setOf = kotlin_kotlin.$_$.
|
|
57
|
-
var KtList = kotlin_kotlin.$_$.q5;
|
|
58
|
-
var ContentType = kotlin_io_ktor_ktor_http.$_$.y;
|
|
59
|
-
var arrayOf = kotlin_kotlin.$_$.zf;
|
|
60
|
-
var createKType = kotlin_kotlin.$_$.c;
|
|
61
|
-
var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
|
|
62
|
-
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.n;
|
|
54
|
+
var setOf = kotlin_kotlin.$_$.b8;
|
|
63
55
|
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.i;
|
|
64
|
-
var
|
|
65
|
-
var
|
|
56
|
+
var startsWith = kotlin_kotlin.$_$.ed;
|
|
57
|
+
var endsWith = kotlin_kotlin.$_$.kc;
|
|
58
|
+
var initMetadataForObject = kotlin_kotlin.$_$.pa;
|
|
66
59
|
var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.a1;
|
|
67
60
|
//endregion
|
|
68
61
|
//region block: pre-declaration
|
|
@@ -86,46 +79,40 @@
|
|
|
86
79
|
return DefaultCommonIgnoredTypes;
|
|
87
80
|
}
|
|
88
81
|
var DefaultCommonIgnoredTypes;
|
|
89
|
-
function get_ExcludedContentTypes() {
|
|
90
|
-
_init_properties_ContentNegotiation_kt__o183go();
|
|
91
|
-
return ExcludedContentTypes;
|
|
92
|
-
}
|
|
93
|
-
var ExcludedContentTypes;
|
|
94
82
|
function get_ContentNegotiation() {
|
|
95
83
|
_init_properties_ContentNegotiation_kt__o183go();
|
|
96
84
|
return ContentNegotiation;
|
|
97
85
|
}
|
|
98
86
|
var ContentNegotiation;
|
|
99
87
|
function ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher) {
|
|
100
|
-
this.
|
|
101
|
-
this.
|
|
102
|
-
this.
|
|
88
|
+
this.t47_1 = converter;
|
|
89
|
+
this.u47_1 = contentTypeToSend;
|
|
90
|
+
this.v47_1 = contentTypeMatcher;
|
|
103
91
|
}
|
|
104
92
|
function defaultMatcher($this, pattern) {
|
|
105
93
|
return new ContentNegotiationConfig$defaultMatcher$1(pattern);
|
|
106
94
|
}
|
|
107
95
|
function ContentNegotiationConfig$defaultMatcher$1($pattern) {
|
|
108
|
-
this.
|
|
96
|
+
this.w47_1 = $pattern;
|
|
109
97
|
}
|
|
110
|
-
protoOf(ContentNegotiationConfig$defaultMatcher$1).
|
|
111
|
-
return contentType.
|
|
98
|
+
protoOf(ContentNegotiationConfig$defaultMatcher$1).x47 = function (contentType) {
|
|
99
|
+
return contentType.x2e(this.w47_1);
|
|
112
100
|
};
|
|
113
101
|
function ContentNegotiationConfig() {
|
|
114
|
-
this.
|
|
102
|
+
this.y47_1 = toMutableSet(plus(get_DefaultIgnoredTypes(), get_DefaultCommonIgnoredTypes()));
|
|
115
103
|
var tmp = this;
|
|
116
104
|
// Inline function 'kotlin.collections.mutableListOf' call
|
|
117
|
-
tmp.
|
|
118
|
-
this.f4n_1 = null;
|
|
105
|
+
tmp.z47_1 = ArrayList_init_$Create$();
|
|
119
106
|
}
|
|
120
|
-
protoOf(ContentNegotiationConfig).
|
|
121
|
-
var matcher = contentType.
|
|
122
|
-
this.
|
|
107
|
+
protoOf(ContentNegotiationConfig).e2r = function (contentType, converter, configuration) {
|
|
108
|
+
var matcher = contentType.equals(Application_getInstance().p2d_1) ? JsonContentTypeMatcher_instance : defaultMatcher(this, contentType);
|
|
109
|
+
this.a48(contentType, converter, matcher, configuration);
|
|
123
110
|
};
|
|
124
|
-
protoOf(ContentNegotiationConfig).
|
|
111
|
+
protoOf(ContentNegotiationConfig).a48 = function (contentTypeToSend, converter, contentTypeMatcher, configuration) {
|
|
125
112
|
// Inline function 'kotlin.apply' call
|
|
126
113
|
configuration(converter);
|
|
127
114
|
var registration = new ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher);
|
|
128
|
-
this.
|
|
115
|
+
this.z47_1.k(registration);
|
|
129
116
|
};
|
|
130
117
|
function ContentConverterException(message) {
|
|
131
118
|
Exception_init_$Init$(message, this);
|
|
@@ -140,53 +127,53 @@
|
|
|
140
127
|
}
|
|
141
128
|
function ContentNegotiation$lambda($this$createClientPlugin) {
|
|
142
129
|
_init_properties_ContentNegotiation_kt__o183go();
|
|
143
|
-
var registrations = $this$createClientPlugin.
|
|
144
|
-
var ignoredTypes = $this$createClientPlugin.
|
|
145
|
-
$this$createClientPlugin.
|
|
146
|
-
$this$createClientPlugin.
|
|
130
|
+
var registrations = $this$createClientPlugin.y33_1.z47_1;
|
|
131
|
+
var ignoredTypes = $this$createClientPlugin.y33_1.y47_1;
|
|
132
|
+
$this$createClientPlugin.x3m(ContentNegotiation$lambda$slambda_0(registrations, ignoredTypes, $this$createClientPlugin, null));
|
|
133
|
+
$this$createClientPlugin.c3f(ContentNegotiation$lambda$slambda_2(ignoredTypes, registrations, $this$createClientPlugin, null));
|
|
147
134
|
return Unit_instance;
|
|
148
135
|
}
|
|
149
|
-
function invoke$convertRequest(registrations, $this_createClientPlugin,
|
|
150
|
-
var tmp = new $invoke$convertRequestCOROUTINE$0(registrations, $this_createClientPlugin,
|
|
151
|
-
tmp.
|
|
152
|
-
tmp.
|
|
153
|
-
return tmp.
|
|
136
|
+
function invoke$convertRequest(registrations, ignoredTypes, $this_createClientPlugin, request, body, $completion) {
|
|
137
|
+
var tmp = new $invoke$convertRequestCOROUTINE$0(registrations, ignoredTypes, $this_createClientPlugin, request, body, $completion);
|
|
138
|
+
tmp.f9_1 = Unit_instance;
|
|
139
|
+
tmp.g9_1 = null;
|
|
140
|
+
return tmp.l9();
|
|
154
141
|
}
|
|
155
142
|
function invoke$convertResponse(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion) {
|
|
156
|
-
charset = charset === VOID ? Charsets_getInstance().
|
|
143
|
+
charset = charset === VOID ? Charsets_getInstance().g1l_1 : charset;
|
|
157
144
|
var tmp = new $invoke$convertResponseCOROUTINE$1(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion);
|
|
158
|
-
tmp.
|
|
159
|
-
tmp.
|
|
160
|
-
return tmp.
|
|
145
|
+
tmp.f9_1 = Unit_instance;
|
|
146
|
+
tmp.g9_1 = null;
|
|
147
|
+
return tmp.l9();
|
|
161
148
|
}
|
|
162
|
-
function ContentNegotiation$lambda$slambda($registrations, $
|
|
163
|
-
this.
|
|
164
|
-
this.
|
|
165
|
-
this.
|
|
149
|
+
function ContentNegotiation$lambda$slambda($registrations, $ignoredTypes, $this_createClientPlugin, resultContinuation) {
|
|
150
|
+
this.w49_1 = $registrations;
|
|
151
|
+
this.x49_1 = $ignoredTypes;
|
|
152
|
+
this.y49_1 = $this_createClientPlugin;
|
|
166
153
|
CoroutineImpl.call(this, resultContinuation);
|
|
167
154
|
}
|
|
168
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
169
|
-
var tmp = this.
|
|
170
|
-
tmp.
|
|
171
|
-
tmp.
|
|
172
|
-
return tmp.
|
|
155
|
+
protoOf(ContentNegotiation$lambda$slambda).d4a = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
|
|
156
|
+
var tmp = this.e4a($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
|
|
157
|
+
tmp.f9_1 = Unit_instance;
|
|
158
|
+
tmp.g9_1 = null;
|
|
159
|
+
return tmp.l9();
|
|
173
160
|
};
|
|
174
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
161
|
+
protoOf(ContentNegotiation$lambda$slambda).h3g = function (p1, p2, p3, p4, $completion) {
|
|
175
162
|
var tmp = p1 instanceof TransformRequestBodyContext ? p1 : THROW_CCE();
|
|
176
163
|
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
177
164
|
var tmp_1 = !(p3 == null) ? p3 : THROW_CCE();
|
|
178
|
-
return this.
|
|
165
|
+
return this.d4a(tmp, tmp_0, tmp_1, (p4 == null ? true : p4 instanceof TypeInfo) ? p4 : THROW_CCE(), $completion);
|
|
179
166
|
};
|
|
180
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
181
|
-
var suspendResult = this.
|
|
167
|
+
protoOf(ContentNegotiation$lambda$slambda).l9 = function () {
|
|
168
|
+
var suspendResult = this.f9_1;
|
|
182
169
|
$sm: do
|
|
183
170
|
try {
|
|
184
|
-
var tmp = this.
|
|
171
|
+
var tmp = this.d9_1;
|
|
185
172
|
switch (tmp) {
|
|
186
173
|
case 0:
|
|
187
|
-
this.
|
|
188
|
-
this.
|
|
189
|
-
suspendResult = invoke$convertRequest(this.
|
|
174
|
+
this.e9_1 = 2;
|
|
175
|
+
this.d9_1 = 1;
|
|
176
|
+
suspendResult = invoke$convertRequest(this.w49_1, this.x49_1, this.y49_1, this.a4a_1, this.b4a_1, this);
|
|
190
177
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
191
178
|
return suspendResult;
|
|
192
179
|
}
|
|
@@ -195,63 +182,63 @@
|
|
|
195
182
|
case 1:
|
|
196
183
|
return suspendResult;
|
|
197
184
|
case 2:
|
|
198
|
-
throw this.
|
|
185
|
+
throw this.g9_1;
|
|
199
186
|
}
|
|
200
187
|
} catch ($p) {
|
|
201
188
|
var e = $p;
|
|
202
|
-
if (this.
|
|
189
|
+
if (this.e9_1 === 2) {
|
|
203
190
|
throw e;
|
|
204
191
|
} else {
|
|
205
|
-
this.
|
|
206
|
-
this.
|
|
192
|
+
this.d9_1 = this.e9_1;
|
|
193
|
+
this.g9_1 = e;
|
|
207
194
|
}
|
|
208
195
|
}
|
|
209
196
|
while (true);
|
|
210
197
|
};
|
|
211
|
-
protoOf(ContentNegotiation$lambda$slambda).
|
|
212
|
-
var i = new ContentNegotiation$lambda$slambda(this.
|
|
213
|
-
i.
|
|
214
|
-
i.
|
|
215
|
-
i.
|
|
216
|
-
i.
|
|
198
|
+
protoOf(ContentNegotiation$lambda$slambda).e4a = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, completion) {
|
|
199
|
+
var i = new ContentNegotiation$lambda$slambda(this.w49_1, this.x49_1, this.y49_1, completion);
|
|
200
|
+
i.z49_1 = $this$transformRequestBody;
|
|
201
|
+
i.a4a_1 = request;
|
|
202
|
+
i.b4a_1 = body;
|
|
203
|
+
i.c4a_1 = _unused_var__etf5q3;
|
|
217
204
|
return i;
|
|
218
205
|
};
|
|
219
|
-
function ContentNegotiation$lambda$slambda_0($registrations, $
|
|
220
|
-
var i = new ContentNegotiation$lambda$slambda($registrations, $
|
|
206
|
+
function ContentNegotiation$lambda$slambda_0($registrations, $ignoredTypes, $this_createClientPlugin, resultContinuation) {
|
|
207
|
+
var i = new ContentNegotiation$lambda$slambda($registrations, $ignoredTypes, $this_createClientPlugin, resultContinuation);
|
|
221
208
|
var l = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
|
|
222
|
-
return i.
|
|
209
|
+
return i.d4a($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
|
|
223
210
|
};
|
|
224
211
|
l.$arity = 4;
|
|
225
212
|
return l;
|
|
226
213
|
}
|
|
227
214
|
function ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
|
|
228
|
-
this.
|
|
229
|
-
this.
|
|
230
|
-
this.
|
|
215
|
+
this.n4a_1 = $ignoredTypes;
|
|
216
|
+
this.o4a_1 = $registrations;
|
|
217
|
+
this.p4a_1 = $this_createClientPlugin;
|
|
231
218
|
CoroutineImpl.call(this, resultContinuation);
|
|
232
219
|
}
|
|
233
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
234
|
-
var tmp = this.
|
|
235
|
-
tmp.
|
|
236
|
-
tmp.
|
|
237
|
-
return tmp.
|
|
220
|
+
protoOf(ContentNegotiation$lambda$slambda_1).f3g = function ($this$transformResponseBody, response, body, info, $completion) {
|
|
221
|
+
var tmp = this.g3g($this$transformResponseBody, response, body, info, $completion);
|
|
222
|
+
tmp.f9_1 = Unit_instance;
|
|
223
|
+
tmp.g9_1 = null;
|
|
224
|
+
return tmp.l9();
|
|
238
225
|
};
|
|
239
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
226
|
+
protoOf(ContentNegotiation$lambda$slambda_1).h3g = function (p1, p2, p3, p4, $completion) {
|
|
240
227
|
var tmp = p1 instanceof TransformResponseBodyContext ? p1 : THROW_CCE();
|
|
241
228
|
var tmp_0 = p2 instanceof HttpResponse ? p2 : THROW_CCE();
|
|
242
229
|
var tmp_1 = (!(p3 == null) ? isInterface(p3, ByteReadChannel) : false) ? p3 : THROW_CCE();
|
|
243
|
-
return this.
|
|
230
|
+
return this.f3g(tmp, tmp_0, tmp_1, p4 instanceof TypeInfo ? p4 : THROW_CCE(), $completion);
|
|
244
231
|
};
|
|
245
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
246
|
-
var suspendResult = this.
|
|
232
|
+
protoOf(ContentNegotiation$lambda$slambda_1).l9 = function () {
|
|
233
|
+
var suspendResult = this.f9_1;
|
|
247
234
|
$sm: do
|
|
248
235
|
try {
|
|
249
|
-
var tmp = this.
|
|
236
|
+
var tmp = this.d9_1;
|
|
250
237
|
switch (tmp) {
|
|
251
238
|
case 0:
|
|
252
|
-
this.
|
|
239
|
+
this.e9_1 = 2;
|
|
253
240
|
var tmp_0 = this;
|
|
254
|
-
var tmp0_elvis_lhs = contentType(this.
|
|
241
|
+
var tmp0_elvis_lhs = contentType(this.r4a_1);
|
|
255
242
|
var tmp_1;
|
|
256
243
|
if (tmp0_elvis_lhs == null) {
|
|
257
244
|
return null;
|
|
@@ -259,10 +246,10 @@
|
|
|
259
246
|
tmp_1 = tmp0_elvis_lhs;
|
|
260
247
|
}
|
|
261
248
|
|
|
262
|
-
tmp_0.
|
|
263
|
-
this.
|
|
264
|
-
this.
|
|
265
|
-
suspendResult = invoke$convertResponse(this.
|
|
249
|
+
tmp_0.u4a_1 = tmp_1;
|
|
250
|
+
this.v4a_1 = suitableCharset(get_request(this.r4a_1).g2j());
|
|
251
|
+
this.d9_1 = 1;
|
|
252
|
+
suspendResult = invoke$convertResponse(this.n4a_1, this.o4a_1, this.p4a_1, get_request(this.r4a_1).y2x(), this.t4a_1, this.s4a_1, this.u4a_1, this.v4a_1, this);
|
|
266
253
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
267
254
|
return suspendResult;
|
|
268
255
|
}
|
|
@@ -271,258 +258,191 @@
|
|
|
271
258
|
case 1:
|
|
272
259
|
return suspendResult;
|
|
273
260
|
case 2:
|
|
274
|
-
throw this.
|
|
261
|
+
throw this.g9_1;
|
|
275
262
|
}
|
|
276
263
|
} catch ($p) {
|
|
277
264
|
var e = $p;
|
|
278
|
-
if (this.
|
|
265
|
+
if (this.e9_1 === 2) {
|
|
279
266
|
throw e;
|
|
280
267
|
} else {
|
|
281
|
-
this.
|
|
282
|
-
this.
|
|
268
|
+
this.d9_1 = this.e9_1;
|
|
269
|
+
this.g9_1 = e;
|
|
283
270
|
}
|
|
284
271
|
}
|
|
285
272
|
while (true);
|
|
286
273
|
};
|
|
287
|
-
protoOf(ContentNegotiation$lambda$slambda_1).
|
|
288
|
-
var i = new ContentNegotiation$lambda$slambda_1(this.
|
|
289
|
-
i.
|
|
290
|
-
i.
|
|
291
|
-
i.
|
|
292
|
-
i.
|
|
274
|
+
protoOf(ContentNegotiation$lambda$slambda_1).g3g = function ($this$transformResponseBody, response, body, info, completion) {
|
|
275
|
+
var i = new ContentNegotiation$lambda$slambda_1(this.n4a_1, this.o4a_1, this.p4a_1, completion);
|
|
276
|
+
i.q4a_1 = $this$transformResponseBody;
|
|
277
|
+
i.r4a_1 = response;
|
|
278
|
+
i.s4a_1 = body;
|
|
279
|
+
i.t4a_1 = info;
|
|
293
280
|
return i;
|
|
294
281
|
};
|
|
295
282
|
function ContentNegotiation$lambda$slambda_2($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
|
|
296
283
|
var i = new ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation);
|
|
297
284
|
var l = function ($this$transformResponseBody, response, body, info, $completion) {
|
|
298
|
-
return i.
|
|
285
|
+
return i.f3g($this$transformResponseBody, response, body, info, $completion);
|
|
299
286
|
};
|
|
300
287
|
l.$arity = 4;
|
|
301
288
|
return l;
|
|
302
289
|
}
|
|
303
290
|
function ContentNegotiation$lambda$convertRequest$lambda(it) {
|
|
304
291
|
_init_properties_ContentNegotiation_kt__o183go();
|
|
305
|
-
return toString(it.
|
|
292
|
+
return toString(it.t47_1);
|
|
306
293
|
}
|
|
307
|
-
function $invoke$convertRequestCOROUTINE$0(registrations, $this_createClientPlugin,
|
|
294
|
+
function $invoke$convertRequestCOROUTINE$0(registrations, ignoredTypes, $this_createClientPlugin, request, body, resultContinuation) {
|
|
308
295
|
CoroutineImpl.call(this, resultContinuation);
|
|
309
|
-
this.
|
|
310
|
-
this.
|
|
311
|
-
this.
|
|
312
|
-
this.
|
|
313
|
-
this.
|
|
296
|
+
this.j48_1 = registrations;
|
|
297
|
+
this.k48_1 = ignoredTypes;
|
|
298
|
+
this.l48_1 = $this_createClientPlugin;
|
|
299
|
+
this.m48_1 = request;
|
|
300
|
+
this.n48_1 = body;
|
|
314
301
|
}
|
|
315
|
-
protoOf($invoke$convertRequestCOROUTINE$0).
|
|
316
|
-
var suspendResult = this.
|
|
302
|
+
protoOf($invoke$convertRequestCOROUTINE$0).l9 = function () {
|
|
303
|
+
var suspendResult = this.f9_1;
|
|
317
304
|
$sm: do
|
|
318
305
|
try {
|
|
319
|
-
var tmp = this.
|
|
306
|
+
var tmp = this.d9_1;
|
|
320
307
|
switch (tmp) {
|
|
321
308
|
case 0:
|
|
322
|
-
this.
|
|
323
|
-
var
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
while (_iterator__ex2g4s.q()) {
|
|
331
|
-
var element = _iterator__ex2g4s.r();
|
|
332
|
-
var tmp$ret$0;
|
|
333
|
-
l$ret$1: do {
|
|
334
|
-
var tmp_2;
|
|
335
|
-
if (isInterface(excluded, Collection)) {
|
|
336
|
-
tmp_2 = excluded.h();
|
|
337
|
-
} else {
|
|
338
|
-
tmp_2 = false;
|
|
339
|
-
}
|
|
340
|
-
if (tmp_2) {
|
|
341
|
-
tmp$ret$0 = true;
|
|
342
|
-
break l$ret$1;
|
|
343
|
-
}
|
|
344
|
-
var _iterator__ex2g4s_0 = excluded.p();
|
|
345
|
-
while (_iterator__ex2g4s_0.q()) {
|
|
346
|
-
var element_0 = _iterator__ex2g4s_0.r();
|
|
347
|
-
if (element.z4m_1.k2n(element_0)) {
|
|
348
|
-
tmp$ret$0 = false;
|
|
349
|
-
break l$ret$1;
|
|
350
|
-
}
|
|
351
|
-
}
|
|
352
|
-
tmp$ret$0 = true;
|
|
353
|
-
}
|
|
354
|
-
while (false);
|
|
355
|
-
if (tmp$ret$0) {
|
|
356
|
-
destination.k(element);
|
|
309
|
+
this.e9_1 = 7;
|
|
310
|
+
var _iterator__ex2g4s = this.j48_1.p();
|
|
311
|
+
while (_iterator__ex2g4s.q()) {
|
|
312
|
+
var element = _iterator__ex2g4s.r();
|
|
313
|
+
l$ret$1: do {
|
|
314
|
+
get_LOGGER().c2d('Adding Accept=' + element.u47_1.t2e_1 + ' header for ' + this.m48_1.m2v_1.toString());
|
|
315
|
+
if (this.m48_1.o2v_1.y28(HttpHeaders_getInstance().d2f_1, element.u47_1.toString())) {
|
|
316
|
+
break l$ret$1;
|
|
357
317
|
}
|
|
318
|
+
accept(this.m48_1, element.u47_1);
|
|
358
319
|
}
|
|
359
|
-
|
|
360
|
-
} else {
|
|
361
|
-
tmp_1 = this.p4n_1;
|
|
320
|
+
while (false);
|
|
362
321
|
}
|
|
363
322
|
|
|
364
|
-
tmp_0
|
|
365
|
-
var
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
var element_1 = _iterator__ex2g4s_1.r();
|
|
371
|
-
var tmp0_0 = this.v4n_1;
|
|
323
|
+
var tmp_0;
|
|
324
|
+
var tmp_1 = this.n48_1;
|
|
325
|
+
if (tmp_1 instanceof OutgoingContent) {
|
|
326
|
+
tmp_0 = true;
|
|
327
|
+
} else {
|
|
328
|
+
var tmp2 = this.k48_1;
|
|
372
329
|
var tmp$ret$2;
|
|
373
330
|
l$ret$3: do {
|
|
374
|
-
var
|
|
375
|
-
if (isInterface(
|
|
376
|
-
|
|
331
|
+
var tmp_2;
|
|
332
|
+
if (isInterface(tmp2, Collection)) {
|
|
333
|
+
tmp_2 = tmp2.h();
|
|
377
334
|
} else {
|
|
378
|
-
|
|
335
|
+
tmp_2 = false;
|
|
379
336
|
}
|
|
380
|
-
if (
|
|
381
|
-
tmp$ret$2 =
|
|
337
|
+
if (tmp_2) {
|
|
338
|
+
tmp$ret$2 = false;
|
|
382
339
|
break l$ret$3;
|
|
383
340
|
}
|
|
384
|
-
var
|
|
385
|
-
while (
|
|
386
|
-
var
|
|
387
|
-
if (
|
|
388
|
-
tmp$ret$2 =
|
|
341
|
+
var _iterator__ex2g4s_0 = tmp2.p();
|
|
342
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
343
|
+
var element_0 = _iterator__ex2g4s_0.r();
|
|
344
|
+
if (element_0.eb(this.n48_1)) {
|
|
345
|
+
tmp$ret$2 = true;
|
|
389
346
|
break l$ret$3;
|
|
390
347
|
}
|
|
391
348
|
}
|
|
392
|
-
tmp$ret$2 =
|
|
393
|
-
}
|
|
394
|
-
while (false);
|
|
395
|
-
if (tmp$ret$2) {
|
|
396
|
-
var qValue = this.q4n_1.r3h_1.f4n_1;
|
|
397
|
-
var contentTypeToSend = qValue == null ? element_1.z4m_1 : element_1.z4m_1.i2n('q', qValue.toString());
|
|
398
|
-
get_LOGGER().c2l('Adding Accept=' + contentTypeToSend.toString() + ' header for ' + this.s4n_1.h39_1.toString());
|
|
399
|
-
accept(this.s4n_1, contentTypeToSend);
|
|
400
|
-
}
|
|
401
|
-
}
|
|
402
|
-
|
|
403
|
-
var tmp_5;
|
|
404
|
-
var tmp_6 = this.t4n_1;
|
|
405
|
-
if (tmp_6 instanceof OutgoingContent) {
|
|
406
|
-
tmp_5 = true;
|
|
407
|
-
} else {
|
|
408
|
-
var tmp5 = this.r4n_1;
|
|
409
|
-
var tmp$ret$4;
|
|
410
|
-
l$ret$5: do {
|
|
411
|
-
var tmp_7;
|
|
412
|
-
if (isInterface(tmp5, Collection)) {
|
|
413
|
-
tmp_7 = tmp5.h();
|
|
414
|
-
} else {
|
|
415
|
-
tmp_7 = false;
|
|
416
|
-
}
|
|
417
|
-
if (tmp_7) {
|
|
418
|
-
tmp$ret$4 = false;
|
|
419
|
-
break l$ret$5;
|
|
420
|
-
}
|
|
421
|
-
var _iterator__ex2g4s_3 = tmp5.p();
|
|
422
|
-
while (_iterator__ex2g4s_3.q()) {
|
|
423
|
-
var element_3 = _iterator__ex2g4s_3.r();
|
|
424
|
-
if (element_3.lb(this.t4n_1)) {
|
|
425
|
-
tmp$ret$4 = true;
|
|
426
|
-
break l$ret$5;
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
tmp$ret$4 = false;
|
|
349
|
+
tmp$ret$2 = false;
|
|
430
350
|
}
|
|
431
351
|
while (false);
|
|
432
|
-
|
|
352
|
+
tmp_0 = tmp$ret$2;
|
|
433
353
|
}
|
|
434
354
|
|
|
435
|
-
if (
|
|
436
|
-
get_LOGGER().
|
|
355
|
+
if (tmp_0) {
|
|
356
|
+
get_LOGGER().c2d('Body type ' + toString(getKClassFromExpression(this.n48_1)) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.m48_1.m2v_1.toString() + '.'));
|
|
437
357
|
return null;
|
|
438
358
|
}
|
|
439
359
|
|
|
440
|
-
var
|
|
441
|
-
var
|
|
442
|
-
var
|
|
443
|
-
if (
|
|
444
|
-
this.
|
|
445
|
-
get_LOGGER().
|
|
360
|
+
var tmp_3 = this;
|
|
361
|
+
var tmp0_elvis_lhs = contentType_0(this.m48_1);
|
|
362
|
+
var tmp_4;
|
|
363
|
+
if (tmp0_elvis_lhs == null) {
|
|
364
|
+
this.l48_1;
|
|
365
|
+
get_LOGGER().c2d("Request doesn't have Content-Type header. Skipping ContentNegotiation for " + this.m48_1.m2v_1.toString() + '.');
|
|
446
366
|
return null;
|
|
447
367
|
} else {
|
|
448
|
-
|
|
368
|
+
tmp_4 = tmp0_elvis_lhs;
|
|
449
369
|
}
|
|
450
370
|
|
|
451
|
-
|
|
452
|
-
var
|
|
453
|
-
if (
|
|
454
|
-
get_LOGGER().
|
|
455
|
-
this.
|
|
371
|
+
tmp_3.o48_1 = tmp_4;
|
|
372
|
+
var tmp_5 = this.n48_1;
|
|
373
|
+
if (tmp_5 instanceof Unit) {
|
|
374
|
+
get_LOGGER().c2d('Sending empty body for ' + this.m48_1.m2v_1.toString());
|
|
375
|
+
this.m48_1.o2v_1.e29(HttpHeaders_getInstance().v2f_1);
|
|
456
376
|
return EmptyContent_getInstance();
|
|
457
377
|
}
|
|
458
378
|
|
|
459
|
-
var
|
|
460
|
-
var
|
|
461
|
-
var
|
|
462
|
-
var
|
|
463
|
-
while (
|
|
464
|
-
var
|
|
465
|
-
if (
|
|
466
|
-
|
|
379
|
+
var tmp_6 = this;
|
|
380
|
+
var tmp0 = this.j48_1;
|
|
381
|
+
var destination = ArrayList_init_$Create$();
|
|
382
|
+
var _iterator__ex2g4s_1 = tmp0.p();
|
|
383
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
384
|
+
var element_1 = _iterator__ex2g4s_1.r();
|
|
385
|
+
if (element_1.v47_1.x47(this.o48_1)) {
|
|
386
|
+
destination.k(element_1);
|
|
467
387
|
}
|
|
468
388
|
}
|
|
469
389
|
|
|
470
|
-
var
|
|
471
|
-
if (!
|
|
472
|
-
|
|
390
|
+
var tmp_7;
|
|
391
|
+
if (!destination.h()) {
|
|
392
|
+
tmp_7 = destination;
|
|
473
393
|
} else {
|
|
474
|
-
|
|
394
|
+
tmp_7 = null;
|
|
475
395
|
}
|
|
476
396
|
|
|
477
|
-
var tmp1_elvis_lhs =
|
|
478
|
-
var
|
|
397
|
+
var tmp1_elvis_lhs = tmp_7;
|
|
398
|
+
var tmp_8;
|
|
479
399
|
if (tmp1_elvis_lhs == null) {
|
|
480
|
-
this.
|
|
481
|
-
get_LOGGER().
|
|
400
|
+
this.l48_1;
|
|
401
|
+
get_LOGGER().c2d('None of the registered converters match request Content-Type=' + this.o48_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.m48_1.m2v_1.toString() + '.'));
|
|
482
402
|
return null;
|
|
483
403
|
} else {
|
|
484
|
-
|
|
404
|
+
tmp_8 = tmp1_elvis_lhs;
|
|
485
405
|
}
|
|
486
406
|
|
|
487
|
-
|
|
488
|
-
if (this.
|
|
489
|
-
get_LOGGER().
|
|
407
|
+
tmp_6.p48_1 = tmp_8;
|
|
408
|
+
if (this.m48_1.g3p() == null) {
|
|
409
|
+
get_LOGGER().c2d('Request has unknown body type. Skipping ContentNegotiation for ' + this.m48_1.m2v_1.toString() + '.');
|
|
490
410
|
return null;
|
|
491
411
|
}
|
|
492
412
|
|
|
493
|
-
this.
|
|
494
|
-
var
|
|
495
|
-
|
|
496
|
-
this.
|
|
413
|
+
this.m48_1.o2v_1.e29(HttpHeaders_getInstance().v2f_1);
|
|
414
|
+
var tmp_9 = this;
|
|
415
|
+
tmp_9.q48_1 = this.p48_1;
|
|
416
|
+
this.d9_1 = 1;
|
|
497
417
|
continue $sm;
|
|
498
418
|
case 1:
|
|
499
|
-
this.
|
|
500
|
-
this.
|
|
501
|
-
this.
|
|
419
|
+
this.s48_1 = this.q48_1;
|
|
420
|
+
this.t48_1 = this.s48_1.p();
|
|
421
|
+
this.d9_1 = 2;
|
|
502
422
|
continue $sm;
|
|
503
423
|
case 2:
|
|
504
|
-
if (!this.
|
|
505
|
-
this.
|
|
424
|
+
if (!this.t48_1.q()) {
|
|
425
|
+
this.d9_1 = 5;
|
|
506
426
|
continue $sm;
|
|
507
427
|
}
|
|
508
428
|
|
|
509
|
-
this.
|
|
510
|
-
var
|
|
511
|
-
|
|
512
|
-
this.
|
|
513
|
-
this.
|
|
514
|
-
var
|
|
515
|
-
var
|
|
516
|
-
var
|
|
517
|
-
var this_0 = this.
|
|
518
|
-
var
|
|
429
|
+
this.u48_1 = this.t48_1.r();
|
|
430
|
+
var tmp_10 = this;
|
|
431
|
+
tmp_10.v48_1 = this.u48_1;
|
|
432
|
+
this.w48_1 = this.v48_1;
|
|
433
|
+
this.d9_1 = 3;
|
|
434
|
+
var tmp0_elvis_lhs_0 = charset(this.o48_1);
|
|
435
|
+
var tmp_11 = tmp0_elvis_lhs_0 == null ? Charsets_getInstance().g1l_1 : tmp0_elvis_lhs_0;
|
|
436
|
+
var tmp_12 = ensureNotNull(this.m48_1.g3p());
|
|
437
|
+
var this_0 = this.n48_1;
|
|
438
|
+
var tmp_13;
|
|
519
439
|
if (!equals(this_0, NullBody_instance)) {
|
|
520
|
-
|
|
440
|
+
tmp_13 = this_0;
|
|
521
441
|
} else {
|
|
522
|
-
|
|
442
|
+
tmp_13 = null;
|
|
523
443
|
}
|
|
524
444
|
|
|
525
|
-
suspendResult = this.
|
|
445
|
+
suspendResult = this.w48_1.t47_1.w4a(this.o48_1, tmp_11, tmp_12, tmp_13, this);
|
|
526
446
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
527
447
|
return suspendResult;
|
|
528
448
|
}
|
|
@@ -531,94 +451,94 @@
|
|
|
531
451
|
case 3:
|
|
532
452
|
var result = suspendResult;
|
|
533
453
|
if (!(result == null)) {
|
|
534
|
-
get_LOGGER().
|
|
454
|
+
get_LOGGER().c2d('Converted request body using ' + toString(this.w48_1.t47_1) + ' for ' + this.m48_1.m2v_1.toString());
|
|
535
455
|
}
|
|
536
456
|
|
|
537
457
|
var result_0 = result;
|
|
538
458
|
if (!(result_0 == null)) {
|
|
539
|
-
this.
|
|
540
|
-
this.
|
|
459
|
+
this.r48_1 = result_0;
|
|
460
|
+
this.d9_1 = 6;
|
|
541
461
|
continue $sm;
|
|
542
462
|
} else {
|
|
543
|
-
this.
|
|
463
|
+
this.d9_1 = 4;
|
|
544
464
|
continue $sm;
|
|
545
465
|
}
|
|
546
466
|
|
|
547
467
|
case 4:
|
|
548
|
-
this.
|
|
468
|
+
this.d9_1 = 2;
|
|
549
469
|
continue $sm;
|
|
550
470
|
case 5:
|
|
551
|
-
this.
|
|
471
|
+
this.r48_1 = null;
|
|
552
472
|
if (false) {
|
|
553
|
-
this.
|
|
473
|
+
this.d9_1 = 1;
|
|
554
474
|
continue $sm;
|
|
555
475
|
}
|
|
556
476
|
|
|
557
|
-
this.
|
|
477
|
+
this.d9_1 = 6;
|
|
558
478
|
continue $sm;
|
|
559
479
|
case 6:
|
|
560
|
-
var tmp2_elvis_lhs = this.
|
|
561
|
-
var
|
|
480
|
+
var tmp2_elvis_lhs = this.r48_1;
|
|
481
|
+
var tmp_14;
|
|
562
482
|
if (tmp2_elvis_lhs == null) {
|
|
563
|
-
var
|
|
564
|
-
throw new ContentConverterException(
|
|
483
|
+
var tmp_15 = "Can't convert " + toString(this.n48_1) + ' with contentType ' + this.o48_1.toString() + ' using converters ';
|
|
484
|
+
throw new ContentConverterException(tmp_15 + joinToString(this.p48_1, VOID, VOID, VOID, VOID, VOID, ContentNegotiation$lambda$convertRequest$lambda));
|
|
565
485
|
} else {
|
|
566
|
-
|
|
486
|
+
tmp_14 = tmp2_elvis_lhs;
|
|
567
487
|
}
|
|
568
488
|
|
|
569
|
-
var serializedContent =
|
|
489
|
+
var serializedContent = tmp_14;
|
|
570
490
|
return serializedContent;
|
|
571
491
|
case 7:
|
|
572
|
-
throw this.
|
|
492
|
+
throw this.g9_1;
|
|
573
493
|
}
|
|
574
494
|
} catch ($p) {
|
|
575
495
|
var e = $p;
|
|
576
|
-
if (this.
|
|
496
|
+
if (this.e9_1 === 7) {
|
|
577
497
|
throw e;
|
|
578
498
|
} else {
|
|
579
|
-
this.
|
|
580
|
-
this.
|
|
499
|
+
this.d9_1 = this.e9_1;
|
|
500
|
+
this.g9_1 = e;
|
|
581
501
|
}
|
|
582
502
|
}
|
|
583
503
|
while (true);
|
|
584
504
|
};
|
|
585
505
|
function $invoke$convertResponseCOROUTINE$1(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, resultContinuation) {
|
|
586
506
|
CoroutineImpl.call(this, resultContinuation);
|
|
587
|
-
this.
|
|
588
|
-
this.
|
|
589
|
-
this.
|
|
590
|
-
this.
|
|
591
|
-
this.
|
|
592
|
-
this.
|
|
593
|
-
this.
|
|
594
|
-
this.
|
|
507
|
+
this.f49_1 = ignoredTypes;
|
|
508
|
+
this.g49_1 = registrations;
|
|
509
|
+
this.h49_1 = $this_createClientPlugin;
|
|
510
|
+
this.i49_1 = requestUrl;
|
|
511
|
+
this.j49_1 = info;
|
|
512
|
+
this.k49_1 = body;
|
|
513
|
+
this.l49_1 = responseContentType;
|
|
514
|
+
this.m49_1 = charset;
|
|
595
515
|
}
|
|
596
|
-
protoOf($invoke$convertResponseCOROUTINE$1).
|
|
597
|
-
var suspendResult = this.
|
|
516
|
+
protoOf($invoke$convertResponseCOROUTINE$1).l9 = function () {
|
|
517
|
+
var suspendResult = this.f9_1;
|
|
598
518
|
$sm: do
|
|
599
519
|
try {
|
|
600
|
-
var tmp = this.
|
|
520
|
+
var tmp = this.d9_1;
|
|
601
521
|
switch (tmp) {
|
|
602
522
|
case 0:
|
|
603
|
-
this.
|
|
604
|
-
var tmp_0 = this.
|
|
523
|
+
this.e9_1 = 2;
|
|
524
|
+
var tmp_0 = this.k49_1;
|
|
605
525
|
if (!isInterface(tmp_0, ByteReadChannel)) {
|
|
606
|
-
get_LOGGER().
|
|
526
|
+
get_LOGGER().c2d('Response body is already transformed. Skipping ContentNegotiation for ' + this.i49_1.toString() + '.');
|
|
607
527
|
return null;
|
|
608
528
|
}
|
|
609
529
|
|
|
610
|
-
if (this.
|
|
611
|
-
get_LOGGER().
|
|
530
|
+
if (this.f49_1.x1(this.j49_1.q2c_1)) {
|
|
531
|
+
get_LOGGER().c2d('Response body type ' + toString(this.j49_1.q2c_1) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.i49_1.toString() + '.'));
|
|
612
532
|
return null;
|
|
613
533
|
}
|
|
614
534
|
|
|
615
535
|
var tmp_1 = this;
|
|
616
|
-
var tmp0 = this.
|
|
536
|
+
var tmp0 = this.g49_1;
|
|
617
537
|
var destination = ArrayList_init_$Create$();
|
|
618
538
|
var _iterator__ex2g4s = tmp0.p();
|
|
619
539
|
while (_iterator__ex2g4s.q()) {
|
|
620
540
|
var element = _iterator__ex2g4s.r();
|
|
621
|
-
if (element.
|
|
541
|
+
if (element.v47_1.x47(this.l49_1)) {
|
|
622
542
|
destination.k(element);
|
|
623
543
|
}
|
|
624
544
|
}
|
|
@@ -627,7 +547,7 @@
|
|
|
627
547
|
var _iterator__ex2g4s_0 = destination.p();
|
|
628
548
|
while (_iterator__ex2g4s_0.q()) {
|
|
629
549
|
var item = _iterator__ex2g4s_0.r();
|
|
630
|
-
destination_0.k(item.
|
|
550
|
+
destination_0.k(item.t47_1);
|
|
631
551
|
}
|
|
632
552
|
|
|
633
553
|
var tmp_2;
|
|
@@ -640,16 +560,16 @@
|
|
|
640
560
|
var tmp0_elvis_lhs = tmp_2;
|
|
641
561
|
var tmp_3;
|
|
642
562
|
if (tmp0_elvis_lhs == null) {
|
|
643
|
-
this.
|
|
644
|
-
get_LOGGER().
|
|
563
|
+
this.h49_1;
|
|
564
|
+
get_LOGGER().c2d('None of the registered converters match response with Content-Type=' + this.l49_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.i49_1.toString() + '.'));
|
|
645
565
|
return null;
|
|
646
566
|
} else {
|
|
647
567
|
tmp_3 = tmp0_elvis_lhs;
|
|
648
568
|
}
|
|
649
569
|
|
|
650
|
-
tmp_1.
|
|
651
|
-
this.
|
|
652
|
-
suspendResult = deserialize(this.
|
|
570
|
+
tmp_1.n49_1 = tmp_3;
|
|
571
|
+
this.d9_1 = 1;
|
|
572
|
+
suspendResult = deserialize(this.n49_1, this.k49_1, this.j49_1, this.m49_1, this);
|
|
653
573
|
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
654
574
|
return suspendResult;
|
|
655
575
|
}
|
|
@@ -658,20 +578,20 @@
|
|
|
658
578
|
case 1:
|
|
659
579
|
var result = suspendResult;
|
|
660
580
|
if (!isInterface(result, ByteReadChannel)) {
|
|
661
|
-
get_LOGGER().
|
|
581
|
+
get_LOGGER().c2d('Response body was converted to ' + toString(getKClassFromExpression(result)) + ' for ' + this.i49_1.toString() + '.');
|
|
662
582
|
}
|
|
663
583
|
|
|
664
584
|
return result;
|
|
665
585
|
case 2:
|
|
666
|
-
throw this.
|
|
586
|
+
throw this.g9_1;
|
|
667
587
|
}
|
|
668
588
|
} catch ($p) {
|
|
669
589
|
var e = $p;
|
|
670
|
-
if (this.
|
|
590
|
+
if (this.e9_1 === 2) {
|
|
671
591
|
throw e;
|
|
672
592
|
} else {
|
|
673
|
-
this.
|
|
674
|
-
this.
|
|
593
|
+
this.d9_1 = this.e9_1;
|
|
594
|
+
this.g9_1 = e;
|
|
675
595
|
}
|
|
676
596
|
}
|
|
677
597
|
while (true);
|
|
@@ -681,40 +601,19 @@
|
|
|
681
601
|
if (!properties_initialized_ContentNegotiation_kt_1ayduy) {
|
|
682
602
|
properties_initialized_ContentNegotiation_kt_1ayduy = true;
|
|
683
603
|
LOGGER = KtorSimpleLogger('io.ktor.client.plugins.contentnegotiation.ContentNegotiation');
|
|
684
|
-
DefaultCommonIgnoredTypes = setOf([PrimitiveClasses_getInstance().
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
688
|
-
var tmp = getKClass(KtList);
|
|
689
|
-
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
690
|
-
var tmp_0;
|
|
691
|
-
try {
|
|
692
|
-
tmp_0 = createKType(getKClass(KtList), arrayOf([createInvariantKTypeProjection(createKType(getKClass(ContentType), arrayOf([]), false))]), false);
|
|
693
|
-
} catch ($p) {
|
|
694
|
-
var tmp_1;
|
|
695
|
-
if ($p instanceof Error) {
|
|
696
|
-
var _unused_var__etf5q3 = $p;
|
|
697
|
-
tmp_1 = null;
|
|
698
|
-
} else {
|
|
699
|
-
throw $p;
|
|
700
|
-
}
|
|
701
|
-
tmp_0 = tmp_1;
|
|
702
|
-
}
|
|
703
|
-
var tmp$ret$0 = tmp_0;
|
|
704
|
-
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
705
|
-
ExcludedContentTypes = new AttributeKey(name, tmp$ret$1);
|
|
706
|
-
var tmp_2 = ContentNegotiationConfig$_init_$ref_1ne3ob();
|
|
707
|
-
ContentNegotiation = createClientPlugin('ContentNegotiation', tmp_2, ContentNegotiation$lambda);
|
|
604
|
+
DefaultCommonIgnoredTypes = setOf([PrimitiveClasses_getInstance().nc(), PrimitiveClasses_getInstance().jc(), getKClass(HttpStatusCode), getKClass(ByteReadChannel), getKClass(OutgoingContent)]);
|
|
605
|
+
var tmp = ContentNegotiationConfig$_init_$ref_1ne3ob();
|
|
606
|
+
ContentNegotiation = createClientPlugin('ContentNegotiation', tmp, ContentNegotiation$lambda);
|
|
708
607
|
}
|
|
709
608
|
}
|
|
710
609
|
function JsonContentTypeMatcher() {
|
|
711
610
|
}
|
|
712
|
-
protoOf(JsonContentTypeMatcher).
|
|
713
|
-
if (contentType.
|
|
611
|
+
protoOf(JsonContentTypeMatcher).x47 = function (contentType) {
|
|
612
|
+
if (contentType.x2e(Application_getInstance().p2d_1)) {
|
|
714
613
|
return true;
|
|
715
614
|
}
|
|
716
|
-
var value = contentType.
|
|
717
|
-
return
|
|
615
|
+
var value = contentType.w2e().toString();
|
|
616
|
+
return startsWith(value, 'application/', true) && endsWith(value, '+json', true);
|
|
718
617
|
};
|
|
719
618
|
var JsonContentTypeMatcher_instance;
|
|
720
619
|
function JsonContentTypeMatcher_getInstance() {
|
|
@@ -734,7 +633,7 @@
|
|
|
734
633
|
}
|
|
735
634
|
}
|
|
736
635
|
//region block: post-declaration
|
|
737
|
-
protoOf(ContentNegotiationConfig).
|
|
636
|
+
protoOf(ContentNegotiationConfig).f2r = register$default;
|
|
738
637
|
//endregion
|
|
739
638
|
//region block: init
|
|
740
639
|
JsonContentTypeMatcher_instance = new JsonContentTypeMatcher();
|