@xiuper/mpp-core 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Kotlin-DateTime-library-kotlinx-datetime.js +7836 -0
- package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -0
- package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +1241 -0
- package/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js.map +1 -0
- package/Xiuper-mpp-codegraph.js +1471 -0
- package/Xiuper-mpp-codegraph.js.map +1 -0
- package/annotations.js +15 -0
- package/annotations.js.map +1 -0
- package/autodev-mpp-core.d.ts +1312 -0
- package/autodev-mpp-core.js +86483 -0
- package/autodev-mpp-core.js.map +1 -0
- package/kaml.js +3387 -0
- package/kaml.js.map +1 -0
- package/koog-agents-agents-core.js +22927 -0
- package/koog-agents-agents-core.js.map +1 -0
- package/koog-agents-agents-ext.js +15 -0
- package/koog-agents-agents-ext.js.map +1 -0
- package/koog-agents-agents-features-agents-features-event-handler.js +15 -0
- package/koog-agents-agents-features-agents-features-event-handler.js.map +1 -0
- package/koog-agents-agents-features-agents-features-memory.js +15 -0
- package/koog-agents-agents-features-agents-features-memory.js.map +1 -0
- package/koog-agents-agents-features-agents-features-opentelemetry.js +15 -0
- package/koog-agents-agents-features-agents-features-opentelemetry.js.map +1 -0
- package/koog-agents-agents-features-agents-features-snapshot.js +15 -0
- package/koog-agents-agents-features-agents-features-snapshot.js.map +1 -0
- package/koog-agents-agents-features-agents-features-tokenizer.js +15 -0
- package/koog-agents-agents-features-agents-features-tokenizer.js.map +1 -0
- package/koog-agents-agents-features-agents-features-trace.js +15 -0
- package/koog-agents-agents-features-agents-features-trace.js.map +1 -0
- package/koog-agents-agents-mcp.js +15 -0
- package/koog-agents-agents-mcp.js.map +1 -0
- package/koog-agents-agents-tools.js +322 -0
- package/koog-agents-agents-tools.js.map +1 -0
- package/koog-agents-agents-utils.js +232 -0
- package/koog-agents-agents-utils.js.map +1 -0
- package/koog-embeddings-embeddings-base.js +15 -0
- package/koog-embeddings-embeddings-base.js.map +1 -0
- package/koog-embeddings-embeddings-llm.js +15 -0
- package/koog-embeddings-embeddings-llm.js.map +1 -0
- package/koog-http-client-http-client-core.js +57 -0
- package/koog-http-client-http-client-core.js.map +1 -0
- package/koog-http-client-http-client-ktor.js +703 -0
- package/koog-http-client-http-client-ktor.js.map +1 -0
- package/koog-koog-agents.js +15 -0
- package/koog-koog-agents.js.map +1 -0
- package/koog-prompt-prompt-cache-prompt-cache-files.js +15 -0
- package/koog-prompt-prompt-cache-prompt-cache-files.js.map +1 -0
- package/koog-prompt-prompt-cache-prompt-cache-model.js +15 -0
- package/koog-prompt-prompt-cache-prompt-cache-model.js.map +1 -0
- package/koog-prompt-prompt-cache-prompt-cache-redis.js +15 -0
- package/koog-prompt-prompt-cache-prompt-cache-redis.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-cached.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-cached.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js +4991 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-anthropic-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-bedrock-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-dashscope-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js +1249 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-deepseek-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js +4675 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-google-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js +15 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-mistralai-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js +2343 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-ollama-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js +6613 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client-base.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js +19901 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openai-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js +2313 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients-prompt-executor-openrouter-client.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients.js +222 -0
- package/koog-prompt-prompt-executor-prompt-executor-clients.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms-all.js +70 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms-all.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms.js +134 -0
- package/koog-prompt-prompt-executor-prompt-executor-llms.js.map +1 -0
- package/koog-prompt-prompt-executor-prompt-executor-model.js +42 -0
- package/koog-prompt-prompt-executor-prompt-executor-model.js.map +1 -0
- package/koog-prompt-prompt-llm.js +1710 -0
- package/koog-prompt-prompt-llm.js.map +1 -0
- package/koog-prompt-prompt-markdown.js +122 -0
- package/koog-prompt-prompt-markdown.js.map +1 -0
- package/koog-prompt-prompt-model.js +5848 -0
- package/koog-prompt-prompt-model.js.map +1 -0
- package/koog-prompt-prompt-structure.js +1513 -0
- package/koog-prompt-prompt-structure.js.map +1 -0
- package/koog-prompt-prompt-tokenizer.js +15 -0
- package/koog-prompt-prompt-tokenizer.js.map +1 -0
- package/koog-prompt-prompt-xml.js +15 -0
- package/koog-prompt-prompt-xml.js.map +1 -0
- package/koog-rag-rag-base.js +15 -0
- package/koog-rag-rag-base.js.map +1 -0
- package/koog-rag-vector-storage.js +15 -0
- package/koog-rag-vector-storage.js.map +1 -0
- package/koog-utils.js +63 -0
- package/koog-utils.js.map +1 -0
- package/kotlin-kotlin-stdlib.js +18965 -0
- package/kotlin-kotlin-stdlib.js.map +1 -0
- package/kotlin-logging.js +509 -0
- package/kotlin-logging.js.map +1 -0
- package/kotlin-sdk-kotlin-sdk-client.js +1340 -0
- package/kotlin-sdk-kotlin-sdk-client.js.map +1 -0
- package/kotlin-sdk-kotlin-sdk-core.js +15195 -0
- package/kotlin-sdk-kotlin-sdk-core.js.map +1 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +15 -0
- package/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js.map +1 -0
- package/kotlinx-atomicfu.js +259 -0
- package/kotlinx-atomicfu.js.map +1 -0
- package/kotlinx-coroutines-core.js +13742 -0
- package/kotlinx-coroutines-core.js.map +1 -0
- package/kotlinx-io-kotlinx-io-bytestring.js +214 -0
- package/kotlinx-io-kotlinx-io-bytestring.js.map +1 -0
- package/kotlinx-io-kotlinx-io-core.js +2892 -0
- package/kotlinx-io-kotlinx-io-core.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-core.js +6563 -0
- package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.js +15 -0
- package/kotlinx-serialization-kotlinx-serialization-json-io.js.map +1 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js +5927 -0
- package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -0
- package/ktor-ktor-client-content-negotiation.js +775 -0
- package/ktor-ktor-client-content-negotiation.js.map +1 -0
- package/ktor-ktor-client-core.js +11110 -0
- package/ktor-ktor-client-core.js.map +1 -0
- package/ktor-ktor-client-logging.js +15 -0
- package/ktor-ktor-client-logging.js.map +1 -0
- package/ktor-ktor-events.js +126 -0
- package/ktor-ktor-events.js.map +1 -0
- package/ktor-ktor-http-cio.js +4257 -0
- package/ktor-ktor-http-cio.js.map +1 -0
- package/ktor-ktor-http.js +3671 -0
- package/ktor-ktor-http.js.map +1 -0
- package/ktor-ktor-io.js +4114 -0
- package/ktor-ktor-io.js.map +1 -0
- package/ktor-ktor-network.js +1399 -0
- package/ktor-ktor-network.js.map +1 -0
- package/ktor-ktor-serialization-kotlinx-json.js +67 -0
- package/ktor-ktor-serialization-kotlinx-json.js.map +1 -0
- package/ktor-ktor-serialization-kotlinx.js +881 -0
- package/ktor-ktor-serialization-kotlinx.js.map +1 -0
- package/ktor-ktor-serialization.js +388 -0
- package/ktor-ktor-serialization.js.map +1 -0
- package/ktor-ktor-server-cio.js +3735 -0
- package/ktor-ktor-server-cio.js.map +1 -0
- package/ktor-ktor-server-core.js +8696 -0
- package/ktor-ktor-server-core.js.map +1 -0
- package/ktor-ktor-server-sse.js +668 -0
- package/ktor-ktor-server-sse.js.map +1 -0
- package/ktor-ktor-server-websockets.js +15 -0
- package/ktor-ktor-server-websockets.js.map +1 -0
- package/ktor-ktor-sse.js +161 -0
- package/ktor-ktor-sse.js.map +1 -0
- package/ktor-ktor-utils.js +3589 -0
- package/ktor-ktor-utils.js.map +1 -0
- package/ktor-ktor-websocket-serialization.js +15 -0
- package/ktor-ktor-websocket-serialization.js.map +1 -0
- package/ktor-ktor-websockets.js +450 -0
- package/ktor-ktor-websockets.js.map +1 -0
- package/markdown.js +5174 -0
- package/markdown.js.map +1 -0
- package/okio-parent-okio.js +2628 -0
- package/okio-parent-okio.js.map +1 -0
- package/package.json +18 -0
- package/snakeyaml-engine-kmp.js +7079 -0
- package/snakeyaml-engine-kmp.js.map +1 -0
- package/urlencoder-urlencoder-lib.js +322 -0
- package/urlencoder-urlencoder-lib.js.map +1 -0
- package/xiuper-mpp-core.d.ts +1312 -0
- package/xiuper-mpp-core.js +86483 -0
- package/xiuper-mpp-core.js.map +1 -0
|
@@ -0,0 +1,775 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof define === 'function' && define.amd)
|
|
3
|
+
define(['exports', './kotlin-kotlin-stdlib.js', './ktor-ktor-http.js', './ktor-ktor-serialization.js', './ktor-ktor-io.js', './ktor-ktor-client-core.js', './ktor-ktor-utils.js'], factory);
|
|
4
|
+
else if (typeof exports === 'object')
|
|
5
|
+
factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-serialization.js'), require('./ktor-ktor-io.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-utils.js'));
|
|
6
|
+
else {
|
|
7
|
+
if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') {
|
|
8
|
+
throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
|
|
9
|
+
}
|
|
10
|
+
if (typeof globalThis['ktor-ktor-http'] === 'undefined') {
|
|
11
|
+
throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-http' was not found. Please, check whether 'ktor-ktor-http' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
|
|
12
|
+
}
|
|
13
|
+
if (typeof globalThis['ktor-ktor-serialization'] === 'undefined') {
|
|
14
|
+
throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-serialization' was not found. Please, check whether 'ktor-ktor-serialization' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
|
|
15
|
+
}
|
|
16
|
+
if (typeof globalThis['ktor-ktor-io'] === 'undefined') {
|
|
17
|
+
throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-io' was not found. Please, check whether 'ktor-ktor-io' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
|
|
18
|
+
}
|
|
19
|
+
if (typeof globalThis['ktor-ktor-client-core'] === 'undefined') {
|
|
20
|
+
throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-client-core' was not found. Please, check whether 'ktor-ktor-client-core' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
|
|
21
|
+
}
|
|
22
|
+
if (typeof globalThis['ktor-ktor-utils'] === 'undefined') {
|
|
23
|
+
throw new Error("Error loading module 'ktor-ktor-client-content-negotiation'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'ktor-ktor-client-content-negotiation'.");
|
|
24
|
+
}
|
|
25
|
+
globalThis['ktor-ktor-client-content-negotiation'] = factory(typeof globalThis['ktor-ktor-client-content-negotiation'] === 'undefined' ? {} : globalThis['ktor-ktor-client-content-negotiation'], globalThis['kotlin-kotlin-stdlib'], globalThis['ktor-ktor-http'], globalThis['ktor-ktor-serialization'], globalThis['ktor-ktor-io'], globalThis['ktor-ktor-client-core'], globalThis['ktor-ktor-utils']);
|
|
26
|
+
}
|
|
27
|
+
}(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) {
|
|
28
|
+
'use strict';
|
|
29
|
+
//region block: imports
|
|
30
|
+
var protoOf = kotlin_kotlin.$_$.we;
|
|
31
|
+
var initMetadataForClass = kotlin_kotlin.$_$.ud;
|
|
32
|
+
var plus = kotlin_kotlin.$_$.fa;
|
|
33
|
+
var toMutableSet = kotlin_kotlin.$_$.ob;
|
|
34
|
+
var ArrayList_init_$Create$ = kotlin_kotlin.$_$.t;
|
|
35
|
+
var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.d;
|
|
36
|
+
var register$default = kotlin_io_ktor_ktor_serialization.$_$.b;
|
|
37
|
+
var Unit_instance = kotlin_kotlin.$_$.h6;
|
|
38
|
+
var Configuration = kotlin_io_ktor_ktor_serialization.$_$.c;
|
|
39
|
+
var VOID = kotlin_kotlin.$_$.h;
|
|
40
|
+
var Exception = kotlin_kotlin.$_$.ok;
|
|
41
|
+
var Exception_init_$Init$ = kotlin_kotlin.$_$.y1;
|
|
42
|
+
var captureStack = kotlin_kotlin.$_$.dd;
|
|
43
|
+
var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.u;
|
|
44
|
+
var CoroutineImpl = kotlin_kotlin.$_$.tc;
|
|
45
|
+
var THROW_CCE = kotlin_kotlin.$_$.zk;
|
|
46
|
+
var TransformRequestBodyContext = kotlin_io_ktor_ktor_client_core.$_$.j;
|
|
47
|
+
var HttpRequestBuilder = kotlin_io_ktor_ktor_client_core.$_$.r;
|
|
48
|
+
var TypeInfo = kotlin_io_ktor_ktor_utils.$_$.c1;
|
|
49
|
+
var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.dc;
|
|
50
|
+
var initMetadataForLambda = kotlin_kotlin.$_$.zd;
|
|
51
|
+
var TransformResponseBodyContext = kotlin_io_ktor_ktor_client_core.$_$.k;
|
|
52
|
+
var HttpResponse = kotlin_io_ktor_ktor_client_core.$_$.y;
|
|
53
|
+
var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.w1;
|
|
54
|
+
var isInterface = kotlin_kotlin.$_$.je;
|
|
55
|
+
var contentType = kotlin_io_ktor_ktor_http.$_$.x1;
|
|
56
|
+
var get_request = kotlin_io_ktor_ktor_client_core.$_$.a1;
|
|
57
|
+
var suitableCharset = kotlin_io_ktor_ktor_serialization.$_$.e;
|
|
58
|
+
var toString = kotlin_kotlin.$_$.af;
|
|
59
|
+
var Collection = kotlin_kotlin.$_$.n6;
|
|
60
|
+
var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.i;
|
|
61
|
+
var emptyList = kotlin_kotlin.$_$.m8;
|
|
62
|
+
var Companion_getInstance = kotlin_io_ktor_ktor_http.$_$.e;
|
|
63
|
+
var accept = kotlin_io_ktor_ktor_client_core.$_$.s;
|
|
64
|
+
var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.x;
|
|
65
|
+
var getKClassFromExpression = kotlin_kotlin.$_$.e;
|
|
66
|
+
var contentType_0 = kotlin_io_ktor_ktor_http.$_$.v1;
|
|
67
|
+
var EmptyContent_getInstance = kotlin_io_ktor_ktor_client_core.$_$.i;
|
|
68
|
+
var Unit = kotlin_kotlin.$_$.kl;
|
|
69
|
+
var charset = kotlin_io_ktor_ktor_http.$_$.t1;
|
|
70
|
+
var ensureNotNull = kotlin_kotlin.$_$.sl;
|
|
71
|
+
var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.b;
|
|
72
|
+
var equals = kotlin_kotlin.$_$.md;
|
|
73
|
+
var joinToString = kotlin_kotlin.$_$.i9;
|
|
74
|
+
var initMetadataForCoroutine = kotlin_kotlin.$_$.wd;
|
|
75
|
+
var collectionSizeOrDefault = kotlin_kotlin.$_$.p7;
|
|
76
|
+
var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.s;
|
|
77
|
+
var deserialize = kotlin_io_ktor_ktor_serialization.$_$.a;
|
|
78
|
+
var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.s;
|
|
79
|
+
var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.t5;
|
|
80
|
+
var HttpStatusCode = kotlin_io_ktor_ktor_http.$_$.h1;
|
|
81
|
+
var getKClass = kotlin_kotlin.$_$.f;
|
|
82
|
+
var setOf = kotlin_kotlin.$_$.pa;
|
|
83
|
+
var KtList = kotlin_kotlin.$_$.s6;
|
|
84
|
+
var ContentType = kotlin_io_ktor_ktor_http.$_$.e1;
|
|
85
|
+
var arrayOf = kotlin_kotlin.$_$.nl;
|
|
86
|
+
var createKType = kotlin_kotlin.$_$.c;
|
|
87
|
+
var createInvariantKTypeProjection = kotlin_kotlin.$_$.a;
|
|
88
|
+
var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.e1;
|
|
89
|
+
var createClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.l;
|
|
90
|
+
var endsWith = kotlin_kotlin.$_$.ug;
|
|
91
|
+
var initMetadataForObject = kotlin_kotlin.$_$.ae;
|
|
92
|
+
var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.f1;
|
|
93
|
+
//endregion
|
|
94
|
+
//region block: pre-declaration
|
|
95
|
+
initMetadataForClass(ConverterRegistration, 'ConverterRegistration');
|
|
96
|
+
initMetadataForClass(ContentNegotiationConfig$defaultMatcher$1);
|
|
97
|
+
initMetadataForClass(ContentNegotiationConfig, 'ContentNegotiationConfig', ContentNegotiationConfig, VOID, [Configuration]);
|
|
98
|
+
initMetadataForClass(ContentConverterException, 'ContentConverterException', VOID, Exception);
|
|
99
|
+
initMetadataForLambda(ContentNegotiation$lambda$slambda, CoroutineImpl, VOID, [4]);
|
|
100
|
+
initMetadataForLambda(ContentNegotiation$lambda$slambda_1, CoroutineImpl, VOID, [4]);
|
|
101
|
+
initMetadataForCoroutine($invoke$convertRequestCOROUTINE$, CoroutineImpl);
|
|
102
|
+
initMetadataForCoroutine($invoke$convertResponseCOROUTINE$, CoroutineImpl);
|
|
103
|
+
initMetadataForObject(JsonContentTypeMatcher, 'JsonContentTypeMatcher');
|
|
104
|
+
//endregion
|
|
105
|
+
function get_LOGGER() {
|
|
106
|
+
_init_properties_ContentNegotiation_kt__o183go();
|
|
107
|
+
return LOGGER;
|
|
108
|
+
}
|
|
109
|
+
var LOGGER;
|
|
110
|
+
function get_DefaultCommonIgnoredTypes() {
|
|
111
|
+
_init_properties_ContentNegotiation_kt__o183go();
|
|
112
|
+
return DefaultCommonIgnoredTypes;
|
|
113
|
+
}
|
|
114
|
+
var DefaultCommonIgnoredTypes;
|
|
115
|
+
function get_ExcludedContentTypes() {
|
|
116
|
+
_init_properties_ContentNegotiation_kt__o183go();
|
|
117
|
+
return ExcludedContentTypes;
|
|
118
|
+
}
|
|
119
|
+
var ExcludedContentTypes;
|
|
120
|
+
function get_ContentNegotiation() {
|
|
121
|
+
_init_properties_ContentNegotiation_kt__o183go();
|
|
122
|
+
return ContentNegotiation;
|
|
123
|
+
}
|
|
124
|
+
var ContentNegotiation;
|
|
125
|
+
function ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher) {
|
|
126
|
+
this.b7n_1 = converter;
|
|
127
|
+
this.c7n_1 = contentTypeToSend;
|
|
128
|
+
this.d7n_1 = contentTypeMatcher;
|
|
129
|
+
}
|
|
130
|
+
function defaultMatcher($this, pattern) {
|
|
131
|
+
return new ContentNegotiationConfig$defaultMatcher$1(pattern);
|
|
132
|
+
}
|
|
133
|
+
function ContentNegotiationConfig$defaultMatcher$1($pattern) {
|
|
134
|
+
this.e7n_1 = $pattern;
|
|
135
|
+
}
|
|
136
|
+
protoOf(ContentNegotiationConfig$defaultMatcher$1).f7n = function (contentType) {
|
|
137
|
+
return contentType.b59(this.e7n_1);
|
|
138
|
+
};
|
|
139
|
+
function ContentNegotiationConfig() {
|
|
140
|
+
this.g7n_1 = toMutableSet(plus(get_DefaultIgnoredTypes(), get_DefaultCommonIgnoredTypes()));
|
|
141
|
+
var tmp = this;
|
|
142
|
+
// Inline function 'kotlin.collections.mutableListOf' call
|
|
143
|
+
tmp.h7n_1 = ArrayList_init_$Create$();
|
|
144
|
+
this.i7n_1 = null;
|
|
145
|
+
}
|
|
146
|
+
protoOf(ContentNegotiationConfig).z60 = function (contentType, converter, configuration) {
|
|
147
|
+
var matcher = contentType.b59(Application_getInstance().h57_1) ? JsonContentTypeMatcher_instance : defaultMatcher(this, contentType);
|
|
148
|
+
this.j7n(contentType, converter, matcher, configuration);
|
|
149
|
+
};
|
|
150
|
+
protoOf(ContentNegotiationConfig).j7n = function (contentTypeToSend, converter, contentTypeMatcher, configuration) {
|
|
151
|
+
// Inline function 'kotlin.apply' call
|
|
152
|
+
configuration(converter);
|
|
153
|
+
var registration = new ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher);
|
|
154
|
+
this.h7n_1.h(registration);
|
|
155
|
+
};
|
|
156
|
+
function ContentConverterException(message) {
|
|
157
|
+
Exception_init_$Init$(message, this);
|
|
158
|
+
captureStack(this, ContentConverterException);
|
|
159
|
+
}
|
|
160
|
+
function ContentNegotiationConfig$_init_$ref_1ne3ob() {
|
|
161
|
+
var l = function () {
|
|
162
|
+
return new ContentNegotiationConfig();
|
|
163
|
+
};
|
|
164
|
+
l.callableName = '<init>';
|
|
165
|
+
return l;
|
|
166
|
+
}
|
|
167
|
+
function ContentNegotiation$lambda($this$createClientPlugin) {
|
|
168
|
+
_init_properties_ContentNegotiation_kt__o183go();
|
|
169
|
+
var registrations = $this$createClientPlugin.w6e_1.h7n_1;
|
|
170
|
+
var ignoredTypes = $this$createClientPlugin.w6e_1.g7n_1;
|
|
171
|
+
$this$createClientPlugin.i6x(ContentNegotiation$lambda$slambda_0(registrations, $this$createClientPlugin, ignoredTypes, null));
|
|
172
|
+
$this$createClientPlugin.m6p(ContentNegotiation$lambda$slambda_2(ignoredTypes, registrations, $this$createClientPlugin, null));
|
|
173
|
+
return Unit_instance;
|
|
174
|
+
}
|
|
175
|
+
function invoke$convertRequest(registrations, $this_createClientPlugin, ignoredTypes, request, body, $completion) {
|
|
176
|
+
var tmp = new $invoke$convertRequestCOROUTINE$(registrations, $this_createClientPlugin, ignoredTypes, request, body, $completion);
|
|
177
|
+
tmp.z9_1 = Unit_instance;
|
|
178
|
+
tmp.aa_1 = null;
|
|
179
|
+
return tmp.fa();
|
|
180
|
+
}
|
|
181
|
+
function invoke$convertResponse(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion) {
|
|
182
|
+
charset = charset === VOID ? Charsets_getInstance().q4i_1 : charset;
|
|
183
|
+
var tmp = new $invoke$convertResponseCOROUTINE$(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, $completion);
|
|
184
|
+
tmp.z9_1 = Unit_instance;
|
|
185
|
+
tmp.aa_1 = null;
|
|
186
|
+
return tmp.fa();
|
|
187
|
+
}
|
|
188
|
+
function ContentNegotiation$lambda$slambda($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation) {
|
|
189
|
+
this.h7p_1 = $registrations;
|
|
190
|
+
this.i7p_1 = $this_createClientPlugin;
|
|
191
|
+
this.j7p_1 = $ignoredTypes;
|
|
192
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
193
|
+
}
|
|
194
|
+
protoOf(ContentNegotiation$lambda$slambda).o7p = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
|
|
195
|
+
var tmp = this.p7p($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
|
|
196
|
+
tmp.z9_1 = Unit_instance;
|
|
197
|
+
tmp.aa_1 = null;
|
|
198
|
+
return tmp.fa();
|
|
199
|
+
};
|
|
200
|
+
protoOf(ContentNegotiation$lambda$slambda).r6q = function (p1, p2, p3, p4, $completion) {
|
|
201
|
+
var tmp = p1 instanceof TransformRequestBodyContext ? p1 : THROW_CCE();
|
|
202
|
+
var tmp_0 = p2 instanceof HttpRequestBuilder ? p2 : THROW_CCE();
|
|
203
|
+
var tmp_1 = !(p3 == null) ? p3 : THROW_CCE();
|
|
204
|
+
return this.o7p(tmp, tmp_0, tmp_1, (p4 == null ? true : p4 instanceof TypeInfo) ? p4 : THROW_CCE(), $completion);
|
|
205
|
+
};
|
|
206
|
+
protoOf(ContentNegotiation$lambda$slambda).fa = function () {
|
|
207
|
+
var suspendResult = this.z9_1;
|
|
208
|
+
$sm: do
|
|
209
|
+
try {
|
|
210
|
+
var tmp = this.x9_1;
|
|
211
|
+
switch (tmp) {
|
|
212
|
+
case 0:
|
|
213
|
+
this.y9_1 = 2;
|
|
214
|
+
this.x9_1 = 1;
|
|
215
|
+
suspendResult = invoke$convertRequest(this.h7p_1, this.i7p_1, this.j7p_1, this.l7p_1, this.m7p_1, this);
|
|
216
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
217
|
+
return suspendResult;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
continue $sm;
|
|
221
|
+
case 1:
|
|
222
|
+
return suspendResult;
|
|
223
|
+
case 2:
|
|
224
|
+
throw this.aa_1;
|
|
225
|
+
}
|
|
226
|
+
} catch ($p) {
|
|
227
|
+
var e = $p;
|
|
228
|
+
if (this.y9_1 === 2) {
|
|
229
|
+
throw e;
|
|
230
|
+
} else {
|
|
231
|
+
this.x9_1 = this.y9_1;
|
|
232
|
+
this.aa_1 = e;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
while (true);
|
|
236
|
+
};
|
|
237
|
+
protoOf(ContentNegotiation$lambda$slambda).p7p = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, completion) {
|
|
238
|
+
var i = new ContentNegotiation$lambda$slambda(this.h7p_1, this.i7p_1, this.j7p_1, completion);
|
|
239
|
+
i.k7p_1 = $this$transformRequestBody;
|
|
240
|
+
i.l7p_1 = request;
|
|
241
|
+
i.m7p_1 = body;
|
|
242
|
+
i.n7p_1 = _unused_var__etf5q3;
|
|
243
|
+
return i;
|
|
244
|
+
};
|
|
245
|
+
function ContentNegotiation$lambda$slambda_0($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation) {
|
|
246
|
+
var i = new ContentNegotiation$lambda$slambda($registrations, $this_createClientPlugin, $ignoredTypes, resultContinuation);
|
|
247
|
+
var l = function ($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion) {
|
|
248
|
+
return i.o7p($this$transformRequestBody, request, body, _unused_var__etf5q3, $completion);
|
|
249
|
+
};
|
|
250
|
+
l.$arity = 4;
|
|
251
|
+
return l;
|
|
252
|
+
}
|
|
253
|
+
function ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
|
|
254
|
+
this.y7p_1 = $ignoredTypes;
|
|
255
|
+
this.z7p_1 = $registrations;
|
|
256
|
+
this.a7q_1 = $this_createClientPlugin;
|
|
257
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
258
|
+
}
|
|
259
|
+
protoOf(ContentNegotiation$lambda$slambda_1).p6q = function ($this$transformResponseBody, response, body, info, $completion) {
|
|
260
|
+
var tmp = this.q6q($this$transformResponseBody, response, body, info, $completion);
|
|
261
|
+
tmp.z9_1 = Unit_instance;
|
|
262
|
+
tmp.aa_1 = null;
|
|
263
|
+
return tmp.fa();
|
|
264
|
+
};
|
|
265
|
+
protoOf(ContentNegotiation$lambda$slambda_1).r6q = function (p1, p2, p3, p4, $completion) {
|
|
266
|
+
var tmp = p1 instanceof TransformResponseBodyContext ? p1 : THROW_CCE();
|
|
267
|
+
var tmp_0 = p2 instanceof HttpResponse ? p2 : THROW_CCE();
|
|
268
|
+
var tmp_1 = (!(p3 == null) ? isInterface(p3, ByteReadChannel) : false) ? p3 : THROW_CCE();
|
|
269
|
+
return this.p6q(tmp, tmp_0, tmp_1, p4 instanceof TypeInfo ? p4 : THROW_CCE(), $completion);
|
|
270
|
+
};
|
|
271
|
+
protoOf(ContentNegotiation$lambda$slambda_1).fa = function () {
|
|
272
|
+
var suspendResult = this.z9_1;
|
|
273
|
+
$sm: do
|
|
274
|
+
try {
|
|
275
|
+
var tmp = this.x9_1;
|
|
276
|
+
switch (tmp) {
|
|
277
|
+
case 0:
|
|
278
|
+
this.y9_1 = 2;
|
|
279
|
+
var tmp_0 = this;
|
|
280
|
+
var tmp0_elvis_lhs = contentType(this.c7q_1);
|
|
281
|
+
var tmp_1;
|
|
282
|
+
if (tmp0_elvis_lhs == null) {
|
|
283
|
+
return null;
|
|
284
|
+
} else {
|
|
285
|
+
tmp_1 = tmp0_elvis_lhs;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
tmp_0.f7q_1 = tmp_1;
|
|
289
|
+
this.g7q_1 = suitableCharset(get_request(this.c7q_1).k5d());
|
|
290
|
+
this.x9_1 = 1;
|
|
291
|
+
suspendResult = invoke$convertResponse(this.y7p_1, this.z7p_1, this.a7q_1, get_request(this.c7q_1).o67(), this.e7q_1, this.d7q_1, this.f7q_1, this.g7q_1, this);
|
|
292
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
293
|
+
return suspendResult;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
continue $sm;
|
|
297
|
+
case 1:
|
|
298
|
+
return suspendResult;
|
|
299
|
+
case 2:
|
|
300
|
+
throw this.aa_1;
|
|
301
|
+
}
|
|
302
|
+
} catch ($p) {
|
|
303
|
+
var e = $p;
|
|
304
|
+
if (this.y9_1 === 2) {
|
|
305
|
+
throw e;
|
|
306
|
+
} else {
|
|
307
|
+
this.x9_1 = this.y9_1;
|
|
308
|
+
this.aa_1 = e;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
while (true);
|
|
312
|
+
};
|
|
313
|
+
protoOf(ContentNegotiation$lambda$slambda_1).q6q = function ($this$transformResponseBody, response, body, info, completion) {
|
|
314
|
+
var i = new ContentNegotiation$lambda$slambda_1(this.y7p_1, this.z7p_1, this.a7q_1, completion);
|
|
315
|
+
i.b7q_1 = $this$transformResponseBody;
|
|
316
|
+
i.c7q_1 = response;
|
|
317
|
+
i.d7q_1 = body;
|
|
318
|
+
i.e7q_1 = info;
|
|
319
|
+
return i;
|
|
320
|
+
};
|
|
321
|
+
function ContentNegotiation$lambda$slambda_2($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation) {
|
|
322
|
+
var i = new ContentNegotiation$lambda$slambda_1($ignoredTypes, $registrations, $this_createClientPlugin, resultContinuation);
|
|
323
|
+
var l = function ($this$transformResponseBody, response, body, info, $completion) {
|
|
324
|
+
return i.p6q($this$transformResponseBody, response, body, info, $completion);
|
|
325
|
+
};
|
|
326
|
+
l.$arity = 4;
|
|
327
|
+
return l;
|
|
328
|
+
}
|
|
329
|
+
function ContentNegotiation$lambda$convertRequest$lambda(it) {
|
|
330
|
+
_init_properties_ContentNegotiation_kt__o183go();
|
|
331
|
+
return toString(it.b7n_1);
|
|
332
|
+
}
|
|
333
|
+
function $invoke$convertRequestCOROUTINE$(registrations, $this_createClientPlugin, ignoredTypes, request, body, resultContinuation) {
|
|
334
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
335
|
+
this.s7n_1 = registrations;
|
|
336
|
+
this.t7n_1 = $this_createClientPlugin;
|
|
337
|
+
this.u7n_1 = ignoredTypes;
|
|
338
|
+
this.v7n_1 = request;
|
|
339
|
+
this.w7n_1 = body;
|
|
340
|
+
}
|
|
341
|
+
protoOf($invoke$convertRequestCOROUTINE$).fa = function () {
|
|
342
|
+
var suspendResult = this.z9_1;
|
|
343
|
+
$sm: do
|
|
344
|
+
try {
|
|
345
|
+
var tmp = this.x9_1;
|
|
346
|
+
switch (tmp) {
|
|
347
|
+
case 0:
|
|
348
|
+
this.y9_1 = 7;
|
|
349
|
+
var tmp_0 = this;
|
|
350
|
+
var tmp_1;
|
|
351
|
+
if (this.v7n_1.b66_1.o4x(get_ExcludedContentTypes())) {
|
|
352
|
+
var excluded = this.v7n_1.b66_1.m4x(get_ExcludedContentTypes());
|
|
353
|
+
var tmp0 = this.s7n_1;
|
|
354
|
+
var destination = ArrayList_init_$Create$();
|
|
355
|
+
var _iterator__ex2g4s = tmp0.p();
|
|
356
|
+
while (_iterator__ex2g4s.q()) {
|
|
357
|
+
var element = _iterator__ex2g4s.r();
|
|
358
|
+
var tmp$ret$0;
|
|
359
|
+
l$ret$1: do {
|
|
360
|
+
var tmp_2;
|
|
361
|
+
if (isInterface(excluded, Collection)) {
|
|
362
|
+
tmp_2 = excluded.m();
|
|
363
|
+
} else {
|
|
364
|
+
tmp_2 = false;
|
|
365
|
+
}
|
|
366
|
+
if (tmp_2) {
|
|
367
|
+
tmp$ret$0 = true;
|
|
368
|
+
break l$ret$1;
|
|
369
|
+
}
|
|
370
|
+
var _iterator__ex2g4s_0 = excluded.p();
|
|
371
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
372
|
+
var element_0 = _iterator__ex2g4s_0.r();
|
|
373
|
+
if (element.c7n_1.b59(element_0)) {
|
|
374
|
+
tmp$ret$0 = false;
|
|
375
|
+
break l$ret$1;
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
tmp$ret$0 = true;
|
|
379
|
+
}
|
|
380
|
+
while (false);
|
|
381
|
+
if (tmp$ret$0) {
|
|
382
|
+
destination.h(element);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
385
|
+
tmp_1 = destination;
|
|
386
|
+
} else {
|
|
387
|
+
tmp_1 = this.s7n_1;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
tmp_0.x7n_1 = tmp_1;
|
|
391
|
+
var tmp_3 = this;
|
|
392
|
+
var tmp0_elvis_lhs = this.v7n_1.y65_1.b4z(HttpHeaders_getInstance().f59_1);
|
|
393
|
+
tmp_3.y7n_1 = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
|
|
394
|
+
var _iterator__ex2g4s_1 = this.x7n_1.p();
|
|
395
|
+
while (_iterator__ex2g4s_1.q()) {
|
|
396
|
+
var element_1 = _iterator__ex2g4s_1.r();
|
|
397
|
+
var tmp0_0 = this.y7n_1;
|
|
398
|
+
var tmp$ret$2;
|
|
399
|
+
l$ret$3: do {
|
|
400
|
+
var tmp_4;
|
|
401
|
+
if (isInterface(tmp0_0, Collection)) {
|
|
402
|
+
tmp_4 = tmp0_0.m();
|
|
403
|
+
} else {
|
|
404
|
+
tmp_4 = false;
|
|
405
|
+
}
|
|
406
|
+
if (tmp_4) {
|
|
407
|
+
tmp$ret$2 = true;
|
|
408
|
+
break l$ret$3;
|
|
409
|
+
}
|
|
410
|
+
var _iterator__ex2g4s_2 = tmp0_0.p();
|
|
411
|
+
while (_iterator__ex2g4s_2.q()) {
|
|
412
|
+
var element_2 = _iterator__ex2g4s_2.r();
|
|
413
|
+
if (Companion_getInstance().dt(element_2).b59(element_1.c7n_1)) {
|
|
414
|
+
tmp$ret$2 = false;
|
|
415
|
+
break l$ret$3;
|
|
416
|
+
}
|
|
417
|
+
}
|
|
418
|
+
tmp$ret$2 = true;
|
|
419
|
+
}
|
|
420
|
+
while (false);
|
|
421
|
+
if (tmp$ret$2) {
|
|
422
|
+
var qValue = this.t7n_1.w6e_1.i7n_1;
|
|
423
|
+
var contentTypeToSend = qValue == null ? element_1.c7n_1 : element_1.c7n_1.z58('q', qValue.toString());
|
|
424
|
+
get_LOGGER().h56('Adding Accept=' + contentTypeToSend.toString() + ' header for ' + this.v7n_1.w65_1.toString());
|
|
425
|
+
accept(this.v7n_1, contentTypeToSend);
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
var tmp_5;
|
|
430
|
+
var tmp_6 = this.w7n_1;
|
|
431
|
+
if (tmp_6 instanceof OutgoingContent) {
|
|
432
|
+
tmp_5 = true;
|
|
433
|
+
} else {
|
|
434
|
+
var tmp0_1 = this.u7n_1;
|
|
435
|
+
var tmp$ret$4;
|
|
436
|
+
l$ret$5: do {
|
|
437
|
+
var tmp_7;
|
|
438
|
+
if (isInterface(tmp0_1, Collection)) {
|
|
439
|
+
tmp_7 = tmp0_1.m();
|
|
440
|
+
} else {
|
|
441
|
+
tmp_7 = false;
|
|
442
|
+
}
|
|
443
|
+
if (tmp_7) {
|
|
444
|
+
tmp$ret$4 = false;
|
|
445
|
+
break l$ret$5;
|
|
446
|
+
}
|
|
447
|
+
var _iterator__ex2g4s_3 = tmp0_1.p();
|
|
448
|
+
while (_iterator__ex2g4s_3.q()) {
|
|
449
|
+
var element_3 = _iterator__ex2g4s_3.r();
|
|
450
|
+
if (element_3.ac(this.w7n_1)) {
|
|
451
|
+
tmp$ret$4 = true;
|
|
452
|
+
break l$ret$5;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
tmp$ret$4 = false;
|
|
456
|
+
}
|
|
457
|
+
while (false);
|
|
458
|
+
tmp_5 = tmp$ret$4;
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
if (tmp_5) {
|
|
462
|
+
get_LOGGER().h56('Body type ' + toString(getKClassFromExpression(this.w7n_1)) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.v7n_1.w65_1.toString() + '.'));
|
|
463
|
+
return null;
|
|
464
|
+
}
|
|
465
|
+
|
|
466
|
+
var tmp_8 = this;
|
|
467
|
+
var tmp0_elvis_lhs_0 = contentType_0(this.v7n_1);
|
|
468
|
+
var tmp_9;
|
|
469
|
+
if (tmp0_elvis_lhs_0 == null) {
|
|
470
|
+
this.t7n_1;
|
|
471
|
+
get_LOGGER().h56("Request doesn't have Content-Type header. Skipping ContentNegotiation for " + this.v7n_1.w65_1.toString() + '.');
|
|
472
|
+
return null;
|
|
473
|
+
} else {
|
|
474
|
+
tmp_9 = tmp0_elvis_lhs_0;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
tmp_8.z7n_1 = tmp_9;
|
|
478
|
+
var tmp_10 = this.w7n_1;
|
|
479
|
+
if (tmp_10 instanceof Unit) {
|
|
480
|
+
get_LOGGER().h56('Sending empty body for ' + this.v7n_1.w65_1.toString());
|
|
481
|
+
this.v7n_1.y65_1.q4z(HttpHeaders_getInstance().x59_1);
|
|
482
|
+
return EmptyContent_getInstance();
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
var tmp_11 = this;
|
|
486
|
+
var tmp0_2 = this.s7n_1;
|
|
487
|
+
var destination_0 = ArrayList_init_$Create$();
|
|
488
|
+
var _iterator__ex2g4s_4 = tmp0_2.p();
|
|
489
|
+
while (_iterator__ex2g4s_4.q()) {
|
|
490
|
+
var element_4 = _iterator__ex2g4s_4.r();
|
|
491
|
+
if (element_4.d7n_1.f7n(this.z7n_1)) {
|
|
492
|
+
destination_0.h(element_4);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
|
|
496
|
+
var tmp_12;
|
|
497
|
+
if (!destination_0.m()) {
|
|
498
|
+
tmp_12 = destination_0;
|
|
499
|
+
} else {
|
|
500
|
+
tmp_12 = null;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
var tmp1_elvis_lhs = tmp_12;
|
|
504
|
+
var tmp_13;
|
|
505
|
+
if (tmp1_elvis_lhs == null) {
|
|
506
|
+
this.t7n_1;
|
|
507
|
+
get_LOGGER().h56('None of the registered converters match request Content-Type=' + this.z7n_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.v7n_1.w65_1.toString() + '.'));
|
|
508
|
+
return null;
|
|
509
|
+
} else {
|
|
510
|
+
tmp_13 = tmp1_elvis_lhs;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
tmp_11.a7o_1 = tmp_13;
|
|
514
|
+
if (this.v7n_1.f6z() == null) {
|
|
515
|
+
get_LOGGER().h56('Request has unknown body type. Skipping ContentNegotiation for ' + this.v7n_1.w65_1.toString() + '.');
|
|
516
|
+
return null;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
this.v7n_1.y65_1.q4z(HttpHeaders_getInstance().x59_1);
|
|
520
|
+
var tmp_14 = this;
|
|
521
|
+
tmp_14.b7o_1 = this.a7o_1;
|
|
522
|
+
this.x9_1 = 1;
|
|
523
|
+
continue $sm;
|
|
524
|
+
case 1:
|
|
525
|
+
this.d7o_1 = this.b7o_1;
|
|
526
|
+
this.e7o_1 = this.d7o_1.p();
|
|
527
|
+
this.x9_1 = 2;
|
|
528
|
+
continue $sm;
|
|
529
|
+
case 2:
|
|
530
|
+
if (!this.e7o_1.q()) {
|
|
531
|
+
this.x9_1 = 5;
|
|
532
|
+
continue $sm;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
this.f7o_1 = this.e7o_1.r();
|
|
536
|
+
var tmp_15 = this;
|
|
537
|
+
tmp_15.g7o_1 = this.f7o_1;
|
|
538
|
+
this.h7o_1 = this.g7o_1;
|
|
539
|
+
this.x9_1 = 3;
|
|
540
|
+
var tmp0_elvis_lhs_1 = charset(this.z7n_1);
|
|
541
|
+
var tmp_16 = tmp0_elvis_lhs_1 == null ? Charsets_getInstance().q4i_1 : tmp0_elvis_lhs_1;
|
|
542
|
+
var tmp_17 = ensureNotNull(this.v7n_1.f6z());
|
|
543
|
+
var this_0 = this.w7n_1;
|
|
544
|
+
var tmp_18;
|
|
545
|
+
if (!equals(this_0, NullBody_instance)) {
|
|
546
|
+
tmp_18 = this_0;
|
|
547
|
+
} else {
|
|
548
|
+
tmp_18 = null;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
suspendResult = this.h7o_1.b7n_1.h7q(this.z7n_1, tmp_16, tmp_17, tmp_18, this);
|
|
552
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
553
|
+
return suspendResult;
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
continue $sm;
|
|
557
|
+
case 3:
|
|
558
|
+
var result = suspendResult;
|
|
559
|
+
if (!(result == null)) {
|
|
560
|
+
get_LOGGER().h56('Converted request body using ' + toString(this.h7o_1.b7n_1) + ' for ' + this.v7n_1.w65_1.toString());
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
var result_0 = result;
|
|
564
|
+
if (!(result_0 == null)) {
|
|
565
|
+
this.c7o_1 = result_0;
|
|
566
|
+
this.x9_1 = 6;
|
|
567
|
+
continue $sm;
|
|
568
|
+
} else {
|
|
569
|
+
this.x9_1 = 4;
|
|
570
|
+
continue $sm;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
case 4:
|
|
574
|
+
this.x9_1 = 2;
|
|
575
|
+
continue $sm;
|
|
576
|
+
case 5:
|
|
577
|
+
this.c7o_1 = null;
|
|
578
|
+
if (false) {
|
|
579
|
+
this.x9_1 = 1;
|
|
580
|
+
continue $sm;
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
this.x9_1 = 6;
|
|
584
|
+
continue $sm;
|
|
585
|
+
case 6:
|
|
586
|
+
var tmp2_elvis_lhs = this.c7o_1;
|
|
587
|
+
var tmp_19;
|
|
588
|
+
if (tmp2_elvis_lhs == null) {
|
|
589
|
+
var tmp_20 = "Can't convert " + toString(this.w7n_1) + ' with contentType ' + this.z7n_1.toString() + ' using converters ';
|
|
590
|
+
throw new ContentConverterException(tmp_20 + joinToString(this.a7o_1, VOID, VOID, VOID, VOID, VOID, ContentNegotiation$lambda$convertRequest$lambda));
|
|
591
|
+
} else {
|
|
592
|
+
tmp_19 = tmp2_elvis_lhs;
|
|
593
|
+
}
|
|
594
|
+
|
|
595
|
+
var serializedContent = tmp_19;
|
|
596
|
+
return serializedContent;
|
|
597
|
+
case 7:
|
|
598
|
+
throw this.aa_1;
|
|
599
|
+
}
|
|
600
|
+
} catch ($p) {
|
|
601
|
+
var e = $p;
|
|
602
|
+
if (this.y9_1 === 7) {
|
|
603
|
+
throw e;
|
|
604
|
+
} else {
|
|
605
|
+
this.x9_1 = this.y9_1;
|
|
606
|
+
this.aa_1 = e;
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
while (true);
|
|
610
|
+
};
|
|
611
|
+
function $invoke$convertResponseCOROUTINE$(ignoredTypes, registrations, $this_createClientPlugin, requestUrl, info, body, responseContentType, charset, resultContinuation) {
|
|
612
|
+
CoroutineImpl.call(this, resultContinuation);
|
|
613
|
+
this.q7o_1 = ignoredTypes;
|
|
614
|
+
this.r7o_1 = registrations;
|
|
615
|
+
this.s7o_1 = $this_createClientPlugin;
|
|
616
|
+
this.t7o_1 = requestUrl;
|
|
617
|
+
this.u7o_1 = info;
|
|
618
|
+
this.v7o_1 = body;
|
|
619
|
+
this.w7o_1 = responseContentType;
|
|
620
|
+
this.x7o_1 = charset;
|
|
621
|
+
}
|
|
622
|
+
protoOf($invoke$convertResponseCOROUTINE$).fa = function () {
|
|
623
|
+
var suspendResult = this.z9_1;
|
|
624
|
+
$sm: do
|
|
625
|
+
try {
|
|
626
|
+
var tmp = this.x9_1;
|
|
627
|
+
switch (tmp) {
|
|
628
|
+
case 0:
|
|
629
|
+
this.y9_1 = 2;
|
|
630
|
+
var tmp_0 = this.v7o_1;
|
|
631
|
+
if (!isInterface(tmp_0, ByteReadChannel)) {
|
|
632
|
+
get_LOGGER().h56('Response body is already transformed. Skipping ContentNegotiation for ' + this.t7o_1.toString() + '.');
|
|
633
|
+
return null;
|
|
634
|
+
}
|
|
635
|
+
|
|
636
|
+
if (this.q7o_1.w(this.u7o_1.s55_1)) {
|
|
637
|
+
get_LOGGER().h56('Response body type ' + toString(this.u7o_1.s55_1) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.t7o_1.toString() + '.'));
|
|
638
|
+
return null;
|
|
639
|
+
}
|
|
640
|
+
|
|
641
|
+
var tmp_1 = this;
|
|
642
|
+
var tmp0 = this.r7o_1;
|
|
643
|
+
var destination = ArrayList_init_$Create$();
|
|
644
|
+
var _iterator__ex2g4s = tmp0.p();
|
|
645
|
+
while (_iterator__ex2g4s.q()) {
|
|
646
|
+
var element = _iterator__ex2g4s.r();
|
|
647
|
+
if (element.d7n_1.f7n(this.w7o_1)) {
|
|
648
|
+
destination.h(element);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
|
|
653
|
+
var _iterator__ex2g4s_0 = destination.p();
|
|
654
|
+
while (_iterator__ex2g4s_0.q()) {
|
|
655
|
+
var item = _iterator__ex2g4s_0.r();
|
|
656
|
+
destination_0.h(item.b7n_1);
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
var tmp_2;
|
|
660
|
+
if (!destination_0.m()) {
|
|
661
|
+
tmp_2 = destination_0;
|
|
662
|
+
} else {
|
|
663
|
+
tmp_2 = null;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
var tmp0_elvis_lhs = tmp_2;
|
|
667
|
+
var tmp_3;
|
|
668
|
+
if (tmp0_elvis_lhs == null) {
|
|
669
|
+
this.s7o_1;
|
|
670
|
+
get_LOGGER().h56('None of the registered converters match response with Content-Type=' + this.w7o_1.toString() + '. ' + ('Skipping ContentNegotiation for ' + this.t7o_1.toString() + '.'));
|
|
671
|
+
return null;
|
|
672
|
+
} else {
|
|
673
|
+
tmp_3 = tmp0_elvis_lhs;
|
|
674
|
+
}
|
|
675
|
+
|
|
676
|
+
tmp_1.y7o_1 = tmp_3;
|
|
677
|
+
this.x9_1 = 1;
|
|
678
|
+
suspendResult = deserialize(this.y7o_1, this.v7o_1, this.u7o_1, this.x7o_1, this);
|
|
679
|
+
if (suspendResult === get_COROUTINE_SUSPENDED()) {
|
|
680
|
+
return suspendResult;
|
|
681
|
+
}
|
|
682
|
+
|
|
683
|
+
continue $sm;
|
|
684
|
+
case 1:
|
|
685
|
+
var result = suspendResult;
|
|
686
|
+
if (!isInterface(result, ByteReadChannel)) {
|
|
687
|
+
get_LOGGER().h56('Response body was converted to ' + toString(getKClassFromExpression(result)) + ' for ' + this.t7o_1.toString() + '.');
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
return result;
|
|
691
|
+
case 2:
|
|
692
|
+
throw this.aa_1;
|
|
693
|
+
}
|
|
694
|
+
} catch ($p) {
|
|
695
|
+
var e = $p;
|
|
696
|
+
if (this.y9_1 === 2) {
|
|
697
|
+
throw e;
|
|
698
|
+
} else {
|
|
699
|
+
this.x9_1 = this.y9_1;
|
|
700
|
+
this.aa_1 = e;
|
|
701
|
+
}
|
|
702
|
+
}
|
|
703
|
+
while (true);
|
|
704
|
+
};
|
|
705
|
+
var properties_initialized_ContentNegotiation_kt_1ayduy;
|
|
706
|
+
function _init_properties_ContentNegotiation_kt__o183go() {
|
|
707
|
+
if (!properties_initialized_ContentNegotiation_kt_1ayduy) {
|
|
708
|
+
properties_initialized_ContentNegotiation_kt_1ayduy = true;
|
|
709
|
+
LOGGER = KtorSimpleLogger('io.ktor.client.plugins.contentnegotiation.ContentNegotiation');
|
|
710
|
+
DefaultCommonIgnoredTypes = setOf([PrimitiveClasses_getInstance().jd(), PrimitiveClasses_getInstance().fd(), getKClass(HttpStatusCode), getKClass(ByteReadChannel), getKClass(OutgoingContent)]);
|
|
711
|
+
// Inline function 'io.ktor.util.AttributeKey' call
|
|
712
|
+
var name = 'ExcludedContentTypesAttr';
|
|
713
|
+
// Inline function 'io.ktor.util.reflect.typeInfo' call
|
|
714
|
+
var tmp = getKClass(KtList);
|
|
715
|
+
// Inline function 'io.ktor.util.reflect.typeOfOrNull' call
|
|
716
|
+
var tmp_0;
|
|
717
|
+
try {
|
|
718
|
+
tmp_0 = createKType(getKClass(KtList), arrayOf([createInvariantKTypeProjection(createKType(getKClass(ContentType), arrayOf([]), false))]), false);
|
|
719
|
+
} catch ($p) {
|
|
720
|
+
var tmp_1;
|
|
721
|
+
if ($p instanceof Error) {
|
|
722
|
+
var _unused_var__etf5q3 = $p;
|
|
723
|
+
tmp_1 = null;
|
|
724
|
+
} else {
|
|
725
|
+
throw $p;
|
|
726
|
+
}
|
|
727
|
+
tmp_0 = tmp_1;
|
|
728
|
+
}
|
|
729
|
+
var tmp$ret$0 = tmp_0;
|
|
730
|
+
var tmp$ret$1 = new TypeInfo(tmp, tmp$ret$0);
|
|
731
|
+
ExcludedContentTypes = new AttributeKey(name, tmp$ret$1);
|
|
732
|
+
var tmp_2 = ContentNegotiationConfig$_init_$ref_1ne3ob();
|
|
733
|
+
ContentNegotiation = createClientPlugin('ContentNegotiation', tmp_2, ContentNegotiation$lambda);
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
function JsonContentTypeMatcher() {
|
|
737
|
+
}
|
|
738
|
+
protoOf(JsonContentTypeMatcher).f7n = function (contentType) {
|
|
739
|
+
if (contentType.b59(Application_getInstance().h57_1)) {
|
|
740
|
+
return true;
|
|
741
|
+
}
|
|
742
|
+
var value = contentType.a59().toString();
|
|
743
|
+
return Application_getInstance().b58(value) && endsWith(value, '+json', true);
|
|
744
|
+
};
|
|
745
|
+
var JsonContentTypeMatcher_instance;
|
|
746
|
+
function JsonContentTypeMatcher_getInstance() {
|
|
747
|
+
return JsonContentTypeMatcher_instance;
|
|
748
|
+
}
|
|
749
|
+
function get_DefaultIgnoredTypes() {
|
|
750
|
+
_init_properties_DefaultIgnoredTypesJs_kt__rjtdk1();
|
|
751
|
+
return DefaultIgnoredTypes;
|
|
752
|
+
}
|
|
753
|
+
var DefaultIgnoredTypes;
|
|
754
|
+
var properties_initialized_DefaultIgnoredTypesJs_kt_65g2xt;
|
|
755
|
+
function _init_properties_DefaultIgnoredTypesJs_kt__rjtdk1() {
|
|
756
|
+
if (!properties_initialized_DefaultIgnoredTypesJs_kt_65g2xt) {
|
|
757
|
+
properties_initialized_DefaultIgnoredTypesJs_kt_65g2xt = true;
|
|
758
|
+
// Inline function 'kotlin.collections.mutableSetOf' call
|
|
759
|
+
DefaultIgnoredTypes = LinkedHashSet_init_$Create$();
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
//region block: post-declaration
|
|
763
|
+
protoOf(ContentNegotiationConfig).a61 = register$default;
|
|
764
|
+
//endregion
|
|
765
|
+
//region block: init
|
|
766
|
+
JsonContentTypeMatcher_instance = new JsonContentTypeMatcher();
|
|
767
|
+
//endregion
|
|
768
|
+
//region block: exports
|
|
769
|
+
_.$_$ = _.$_$ || {};
|
|
770
|
+
_.$_$.a = get_ContentNegotiation;
|
|
771
|
+
//endregion
|
|
772
|
+
return _;
|
|
773
|
+
}));
|
|
774
|
+
|
|
775
|
+
//# sourceMappingURL=ktor-ktor-client-content-negotiation.js.map
|