@icure/cardinal-sdk 2.0.0-PREVIEW-10 → 2.0.0-PREVIEW-13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/Kermit-kermit-core.mjs +42 -42
  2. package/Kermit-kermit.mjs +8 -8
  3. package/Kotlin-DateTime-library-kotlinx-datetime.mjs +3919 -3777
  4. package/KotlinBigInteger-bignum.mjs +1434 -1470
  5. package/api/AnonymousHealthcarePartyApi.d.mts +2 -2
  6. package/cardinal-sdk-ts.d.mts +338 -100
  7. package/cardinal-sdk-ts.mjs +56590 -56248
  8. package/cardinal-sdk.mjs +126945 -106218
  9. package/kerberus.mjs +381 -381
  10. package/kotlin-kotlin-stdlib.mjs +3412 -2764
  11. package/kotlinx-atomicfu.mjs +14 -14
  12. package/kotlinx-coroutines-core.mjs +2690 -2687
  13. package/kotlinx-io-kotlinx-io-bytestring.mjs +47 -47
  14. package/kotlinx-io-kotlinx-io-core.mjs +539 -539
  15. package/kotlinx-serialization-kotlinx-serialization-core.mjs +2149 -2111
  16. package/kotlinx-serialization-kotlinx-serialization-json.mjs +2047 -2029
  17. package/kryptom-lib.mjs +2065 -2081
  18. package/ktor-ktor-client-content-negotiation.mjs +217 -217
  19. package/ktor-ktor-client-core.mjs +2997 -2993
  20. package/ktor-ktor-events.mjs +8 -8
  21. package/ktor-ktor-http-cio.mjs +538 -537
  22. package/ktor-ktor-http.mjs +799 -927
  23. package/ktor-ktor-io.mjs +1079 -1079
  24. package/ktor-ktor-serialization-kotlinx-json.mjs +10 -10
  25. package/ktor-ktor-serialization-kotlinx.mjs +270 -270
  26. package/ktor-ktor-serialization.mjs +129 -129
  27. package/ktor-ktor-utils.mjs +614 -600
  28. package/ktor-ktor-websockets.mjs +751 -750
  29. package/model.d.mts +0 -1
  30. package/model.mjs +0 -1
  31. package/package.json +2 -3
  32. package/ktor-ktor-client-ktor-client-core.mjs +0 -8986
  33. package/ktor-ktor-client-ktor-client-plugins-ktor-client-content-negotiation.mjs +0 -756
  34. package/ktor-ktor-client-ktor-client-plugins-ktor-client-websockets.mjs +0 -2
  35. package/ktor-ktor-http-ktor-http-cio.mjs +0 -1996
  36. package/ktor-ktor-shared-ktor-events.mjs +0 -79
  37. package/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx-ktor-serialization-kotlinx-json.mjs +0 -44
  38. package/ktor-ktor-shared-ktor-serialization-ktor-serialization-kotlinx.mjs +0 -857
  39. package/ktor-ktor-shared-ktor-serialization.mjs +0 -371
  40. package/ktor-ktor-shared-ktor-sse.mjs +0 -2
  41. package/ktor-ktor-shared-ktor-websocket-serialization.mjs +0 -2
  42. package/ktor-ktor-shared-ktor-websockets.mjs +0 -2334
  43. package/model/UserAndHealthcareParty.d.mts +0 -7
  44. package/model/UserAndHealthcareParty.mjs +0 -6
@@ -1,857 +0,0 @@
1
- import {
2
- ArrayList_init_$Create$2qnngtk1et9r9 as ArrayList_init_$Create$,
3
- Unit_instance104q5opgivhr8 as Unit_instance,
4
- CoroutineImpl2sn3kjnwmfr10 as CoroutineImpl,
5
- protoOf180f3jzyo7rfj as protoOf,
6
- THROW_CCE2g6jy02ryeudk as THROW_CCE,
7
- get_COROUTINE_SUSPENDED3ujt3p13qm4iy as get_COROUTINE_SUSPENDED,
8
- initMetadataForLambda3af3he42mmnh as initMetadataForLambda,
9
- VOID7hggqo3abtya as VOID,
10
- initMetadataForCoroutine1i7lbatuf5bnt as initMetadataForCoroutine,
11
- toString1pkumu07cwy4m as toString,
12
- IllegalStateException_init_$Create$3ib9qa3pip8n4 as IllegalStateException_init_$Create$,
13
- isInterface3d6p8outrmvmk as isInterface,
14
- equals2au1ep9vhcato as equals,
15
- FunctionAdapter3lcrrz3moet5b as FunctionAdapter,
16
- hashCodeq5arwsb9dgti as hashCode,
17
- initMetadataForClassbxx6q50dy2s7 as initMetadataForClass,
18
- IllegalArgumentException_init_$Create$310sysrobvll9 as IllegalArgumentException_init_$Create$,
19
- getKClassFromExpression3vpejubogshaw as getKClassFromExpression,
20
- KtMap140uvy3s5zad8 as KtMap,
21
- KtSetjrjc7fhfd6b9 as KtSet,
22
- firstOrNull1gk7vzkf4h3nq as firstOrNull,
23
- StringCompanionObject_instance2odz3s3zbrixa as StringCompanionObject_instance,
24
- isArray1hxjqtqy632bc as isArray,
25
- KtList3hktaavzmj137 as KtList,
26
- filterNotNull3qfgcwmxhwfxe as filterNotNull,
27
- collectionSizeOrDefault36dulx8yinfqm as collectionSizeOrDefault,
28
- ArrayList_init_$Create$1s1wkrw82c0iw as ArrayList_init_$Create$_0,
29
- HashSet_init_$Create$1urd5csbv51lq as HashSet_init_$Create$,
30
- singleOrNullrknfaxokm1sl as singleOrNull,
31
- Collection1k04j3hzsbod0 as Collection,
32
- emptyList1g2z5xcrvp2zy as emptyList,
33
- } from './kotlin-kotlin-stdlib.mjs';
34
- import {
35
- KSerializerzf77vz1967fq as KSerializer,
36
- BinaryFormat3f3aelhmz0ro1 as BinaryFormat,
37
- StringFormat2r2ka8mzcb3mi as StringFormat,
38
- SerializationExceptioneqrdve3ts2n9 as SerializationException,
39
- serializerOrNull31x2b6nu6gruj as serializerOrNull,
40
- serializer1rka18p0rjk4x as serializer,
41
- MapSerializer11kmegt3g5c1g as MapSerializer,
42
- SetSerializert3lb0yy9iftr as SetSerializer,
43
- serializer1x79l67jvwntn as serializer_0,
44
- ListSerializer1hxuk9dx5n9du as ListSerializer,
45
- get_nullable197rfua9r7fsz as get_nullable,
46
- } from './kotlinx-serialization-kotlinx-serialization-core.mjs';
47
- import {
48
- ByteArrayContent9zol65b22hp0 as ByteArrayContent,
49
- withCharsetIfNeeded3sz33ys0x9vfx as withCharsetIfNeeded,
50
- TextContent1rb6ftlpvl1d2 as TextContent,
51
- OutgoingContent3t2ohmyam9o76 as OutgoingContent,
52
- } from './ktor-ktor-http.mjs';
53
- import {
54
- FlowCollector26clgpmzihvke as FlowCollector,
55
- asFlow3ngsnn5xpz8pw as asFlow,
56
- firstOrNull3pfaj04seehr5 as firstOrNull_0,
57
- } from './kotlinx-coroutines-core.mjs';
58
- import {
59
- readRemaining33cdmbznvdvtg as readRemaining,
60
- discard3ugntd47xyll6 as discard,
61
- readText27783kyxjxi1g as readText,
62
- } from './ktor-ktor-io.mjs';
63
- import { readByteArray1ri21h2rciakw as readByteArray } from './kotlinx-io-kotlinx-io-core.mjs';
64
- import { JsonConvertExceptiongnc5x6xwaf77 as JsonConvertException } from './ktor-ktor-shared-ktor-serialization.mjs';
65
- //region block: imports
66
- //endregion
67
- //region block: pre-declaration
68
- initMetadataForLambda(KotlinxSerializationConverter$serialize$o$collect$slambda, CoroutineImpl, VOID, [1]);
69
- initMetadataForCoroutine($collectCOROUTINE$2, CoroutineImpl);
70
- initMetadataForLambda(KotlinxSerializationConverter$deserialize$o$collect$slambda, CoroutineImpl, VOID, [1]);
71
- initMetadataForCoroutine($collectCOROUTINE$3, CoroutineImpl);
72
- initMetadataForClass(sam$kotlinx_coroutines_flow_FlowCollector$0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', VOID, VOID, [FlowCollector, FunctionAdapter], [1]);
73
- initMetadataForClass(sam$kotlinx_coroutines_flow_FlowCollector$0_0, 'sam$kotlinx_coroutines_flow_FlowCollector$0', VOID, VOID, [FlowCollector, FunctionAdapter], [1]);
74
- initMetadataForClass(KotlinxSerializationConverter$serialize$$inlined$map$1, VOID, VOID, VOID, VOID, [1]);
75
- initMetadataForLambda(KotlinxSerializationConverter$serialize$slambda, CoroutineImpl, VOID, [1]);
76
- initMetadataForClass(KotlinxSerializationConverter$deserialize$$inlined$map$1, VOID, VOID, VOID, VOID, [1]);
77
- initMetadataForLambda(KotlinxSerializationConverter$deserialize$slambda, CoroutineImpl, VOID, [1]);
78
- initMetadataForCoroutine($serializeCOROUTINE$0, CoroutineImpl);
79
- initMetadataForCoroutine($deserializeCOROUTINE$1, CoroutineImpl);
80
- initMetadataForClass(KotlinxSerializationConverter, 'KotlinxSerializationConverter', VOID, VOID, VOID, [4, 3]);
81
- //endregion
82
- function extensions(format) {
83
- // Inline function 'kotlin.collections.mapNotNull' call
84
- var tmp0 = get_providers();
85
- // Inline function 'kotlin.collections.mapNotNullTo' call
86
- var destination = ArrayList_init_$Create$();
87
- // Inline function 'kotlin.collections.forEach' call
88
- var _iterator__ex2g4s = tmp0.q();
89
- while (_iterator__ex2g4s.r()) {
90
- var element = _iterator__ex2g4s.s();
91
- var tmp0_safe_receiver = element.s4z(format);
92
- if (tmp0_safe_receiver == null)
93
- null;
94
- else {
95
- // Inline function 'kotlin.let' call
96
- destination.k(tmp0_safe_receiver);
97
- }
98
- }
99
- return destination;
100
- }
101
- function serialization(_this__u8e3s4, contentType, format) {
102
- _this__u8e3s4.j3l(contentType, new KotlinxSerializationConverter(format));
103
- }
104
- function KotlinxSerializationConverter$serialize$o$collect$slambda($$this$unsafeFlow, $contentType, $charset, $typeInfo, $value, resultContinuation) {
105
- this.b50_1 = $$this$unsafeFlow;
106
- this.c50_1 = $contentType;
107
- this.d50_1 = $charset;
108
- this.e50_1 = $typeInfo;
109
- this.f50_1 = $value;
110
- CoroutineImpl.call(this, resultContinuation);
111
- }
112
- protoOf(KotlinxSerializationConverter$serialize$o$collect$slambda).f3m = function (value, $completion) {
113
- var tmp = this.g3m(value, $completion);
114
- tmp.m9_1 = Unit_instance;
115
- tmp.n9_1 = null;
116
- return tmp.s9();
117
- };
118
- protoOf(KotlinxSerializationConverter$serialize$o$collect$slambda).ga = function (p1, $completion) {
119
- return this.f3m((p1 == null ? true : !(p1 == null)) ? p1 : THROW_CCE(), $completion);
120
- };
121
- protoOf(KotlinxSerializationConverter$serialize$o$collect$slambda).s9 = function () {
122
- var suspendResult = this.m9_1;
123
- $sm: do
124
- try {
125
- var tmp = this.k9_1;
126
- switch (tmp) {
127
- case 0:
128
- this.l9_1 = 3;
129
- var tmp_0 = this;
130
- tmp_0.h50_1 = this.b50_1;
131
- var tmp_1 = this;
132
- tmp_1.i50_1 = this.g50_1;
133
- this.j50_1 = this.h50_1;
134
- this.k50_1 = this.i50_1;
135
- var tmp_2 = this;
136
- tmp_2.l50_1 = this.k50_1;
137
- this.m50_1 = this.l50_1;
138
- this.k9_1 = 1;
139
- suspendResult = this.m50_1.r4z(this.c50_1, this.d50_1, this.e50_1, this.f50_1, this);
140
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
141
- return suspendResult;
142
- }
143
-
144
- continue $sm;
145
- case 1:
146
- this.n50_1 = suspendResult;
147
- this.k9_1 = 2;
148
- suspendResult = this.j50_1.v1c(this.n50_1, this);
149
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
150
- return suspendResult;
151
- }
152
-
153
- continue $sm;
154
- case 2:
155
- return Unit_instance;
156
- case 3:
157
- throw this.n9_1;
158
- }
159
- } catch ($p) {
160
- var e = $p;
161
- if (this.l9_1 === 3) {
162
- throw e;
163
- } else {
164
- this.k9_1 = this.l9_1;
165
- this.n9_1 = e;
166
- }
167
- }
168
- while (true);
169
- };
170
- protoOf(KotlinxSerializationConverter$serialize$o$collect$slambda).g3m = function (value, completion) {
171
- var i = new KotlinxSerializationConverter$serialize$o$collect$slambda(this.b50_1, this.c50_1, this.d50_1, this.e50_1, this.f50_1, completion);
172
- i.g50_1 = value;
173
- return i;
174
- };
175
- function KotlinxSerializationConverter$serialize$o$collect$slambda_0($$this$unsafeFlow, $contentType, $charset, $typeInfo, $value, resultContinuation) {
176
- var i = new KotlinxSerializationConverter$serialize$o$collect$slambda($$this$unsafeFlow, $contentType, $charset, $typeInfo, $value, resultContinuation);
177
- var l = function (value, $completion) {
178
- return i.f3m(value, $completion);
179
- };
180
- l.$arity = 1;
181
- return l;
182
- }
183
- function $collectCOROUTINE$2(_this__u8e3s4, collector, resultContinuation) {
184
- CoroutineImpl.call(this, resultContinuation);
185
- this.w50_1 = _this__u8e3s4;
186
- this.x50_1 = collector;
187
- }
188
- protoOf($collectCOROUTINE$2).s9 = function () {
189
- var suspendResult = this.m9_1;
190
- $sm: do
191
- try {
192
- var tmp = this.k9_1;
193
- switch (tmp) {
194
- case 0:
195
- this.l9_1 = 2;
196
- var tmp_0 = this;
197
- tmp_0.y50_1 = this.x50_1;
198
- this.z50_1 = this.y50_1;
199
- this.k9_1 = 1;
200
- var tmp_1 = KotlinxSerializationConverter$serialize$o$collect$slambda_0(this.z50_1, this.w50_1.b51_1, this.w50_1.c51_1, this.w50_1.d51_1, this.w50_1.e51_1, null);
201
- suspendResult = this.w50_1.a51_1.b1c(new sam$kotlinx_coroutines_flow_FlowCollector$0(tmp_1), this);
202
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
203
- return suspendResult;
204
- }
205
-
206
- continue $sm;
207
- case 1:
208
- return Unit_instance;
209
- case 2:
210
- throw this.n9_1;
211
- }
212
- } catch ($p) {
213
- var e = $p;
214
- if (this.l9_1 === 2) {
215
- throw e;
216
- } else {
217
- this.k9_1 = this.l9_1;
218
- this.n9_1 = e;
219
- }
220
- }
221
- while (true);
222
- };
223
- function KotlinxSerializationConverter$deserialize$o$collect$slambda($$this$unsafeFlow, $charset, $typeInfo, $content, resultContinuation) {
224
- this.n51_1 = $$this$unsafeFlow;
225
- this.o51_1 = $charset;
226
- this.p51_1 = $typeInfo;
227
- this.q51_1 = $content;
228
- CoroutineImpl.call(this, resultContinuation);
229
- }
230
- protoOf(KotlinxSerializationConverter$deserialize$o$collect$slambda).f3m = function (value, $completion) {
231
- var tmp = this.g3m(value, $completion);
232
- tmp.m9_1 = Unit_instance;
233
- tmp.n9_1 = null;
234
- return tmp.s9();
235
- };
236
- protoOf(KotlinxSerializationConverter$deserialize$o$collect$slambda).ga = function (p1, $completion) {
237
- return this.f3m((p1 == null ? true : !(p1 == null)) ? p1 : THROW_CCE(), $completion);
238
- };
239
- protoOf(KotlinxSerializationConverter$deserialize$o$collect$slambda).s9 = function () {
240
- var suspendResult = this.m9_1;
241
- $sm: do
242
- try {
243
- var tmp = this.k9_1;
244
- switch (tmp) {
245
- case 0:
246
- this.l9_1 = 3;
247
- var tmp_0 = this;
248
- tmp_0.s51_1 = this.n51_1;
249
- var tmp_1 = this;
250
- tmp_1.t51_1 = this.r51_1;
251
- this.u51_1 = this.s51_1;
252
- this.v51_1 = this.t51_1;
253
- var tmp_2 = this;
254
- tmp_2.w51_1 = this.v51_1;
255
- this.x51_1 = this.w51_1;
256
- this.k9_1 = 1;
257
- suspendResult = this.x51_1.h3m(this.o51_1, this.p51_1, this.q51_1, this);
258
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
259
- return suspendResult;
260
- }
261
-
262
- continue $sm;
263
- case 1:
264
- this.y51_1 = suspendResult;
265
- this.k9_1 = 2;
266
- suspendResult = this.u51_1.v1c(this.y51_1, this);
267
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
268
- return suspendResult;
269
- }
270
-
271
- continue $sm;
272
- case 2:
273
- return Unit_instance;
274
- case 3:
275
- throw this.n9_1;
276
- }
277
- } catch ($p) {
278
- var e = $p;
279
- if (this.l9_1 === 3) {
280
- throw e;
281
- } else {
282
- this.k9_1 = this.l9_1;
283
- this.n9_1 = e;
284
- }
285
- }
286
- while (true);
287
- };
288
- protoOf(KotlinxSerializationConverter$deserialize$o$collect$slambda).g3m = function (value, completion) {
289
- var i = new KotlinxSerializationConverter$deserialize$o$collect$slambda(this.n51_1, this.o51_1, this.p51_1, this.q51_1, completion);
290
- i.r51_1 = value;
291
- return i;
292
- };
293
- function KotlinxSerializationConverter$deserialize$o$collect$slambda_0($$this$unsafeFlow, $charset, $typeInfo, $content, resultContinuation) {
294
- var i = new KotlinxSerializationConverter$deserialize$o$collect$slambda($$this$unsafeFlow, $charset, $typeInfo, $content, resultContinuation);
295
- var l = function (value, $completion) {
296
- return i.f3m(value, $completion);
297
- };
298
- l.$arity = 1;
299
- return l;
300
- }
301
- function $collectCOROUTINE$3(_this__u8e3s4, collector, resultContinuation) {
302
- CoroutineImpl.call(this, resultContinuation);
303
- this.h52_1 = _this__u8e3s4;
304
- this.i52_1 = collector;
305
- }
306
- protoOf($collectCOROUTINE$3).s9 = function () {
307
- var suspendResult = this.m9_1;
308
- $sm: do
309
- try {
310
- var tmp = this.k9_1;
311
- switch (tmp) {
312
- case 0:
313
- this.l9_1 = 2;
314
- var tmp_0 = this;
315
- tmp_0.j52_1 = this.i52_1;
316
- this.k52_1 = this.j52_1;
317
- this.k9_1 = 1;
318
- var tmp_1 = KotlinxSerializationConverter$deserialize$o$collect$slambda_0(this.k52_1, this.h52_1.m52_1, this.h52_1.n52_1, this.h52_1.o52_1, null);
319
- suspendResult = this.h52_1.l52_1.b1c(new sam$kotlinx_coroutines_flow_FlowCollector$0_0(tmp_1), this);
320
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
321
- return suspendResult;
322
- }
323
-
324
- continue $sm;
325
- case 1:
326
- return Unit_instance;
327
- case 2:
328
- throw this.n9_1;
329
- }
330
- } catch ($p) {
331
- var e = $p;
332
- if (this.l9_1 === 2) {
333
- throw e;
334
- } else {
335
- this.k9_1 = this.l9_1;
336
- this.n9_1 = e;
337
- }
338
- }
339
- while (true);
340
- };
341
- function serializeContent($this, serializer, format, value, contentType, charset) {
342
- var tmp;
343
- if (isInterface(format, StringFormat)) {
344
- var content = format.t22(isInterface(serializer, KSerializer) ? serializer : THROW_CCE(), value);
345
- tmp = new TextContent(content, withCharsetIfNeeded(contentType, charset));
346
- } else {
347
- if (isInterface(format, BinaryFormat)) {
348
- var content_0 = format.v22(isInterface(serializer, KSerializer) ? serializer : THROW_CCE(), value);
349
- tmp = new ByteArrayContent(content_0, contentType);
350
- } else {
351
- var message = 'Unsupported format ' + toString(format);
352
- throw IllegalStateException_init_$Create$(toString(message));
353
- }
354
- }
355
- return tmp;
356
- }
357
- function sam$kotlinx_coroutines_flow_FlowCollector$0(function_0) {
358
- this.p52_1 = function_0;
359
- }
360
- protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).v1c = function (value, $completion) {
361
- return this.p52_1(value, $completion);
362
- };
363
- protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).v3 = function () {
364
- return this.p52_1;
365
- };
366
- protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).equals = function (other) {
367
- var tmp;
368
- if (!(other == null) ? isInterface(other, FlowCollector) : false) {
369
- var tmp_0;
370
- if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
371
- tmp_0 = equals(this.v3(), other.v3());
372
- } else {
373
- tmp_0 = false;
374
- }
375
- tmp = tmp_0;
376
- } else {
377
- tmp = false;
378
- }
379
- return tmp;
380
- };
381
- protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0).hashCode = function () {
382
- return hashCode(this.v3());
383
- };
384
- function sam$kotlinx_coroutines_flow_FlowCollector$0_0(function_0) {
385
- this.q52_1 = function_0;
386
- }
387
- protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).v1c = function (value, $completion) {
388
- return this.q52_1(value, $completion);
389
- };
390
- protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).v3 = function () {
391
- return this.q52_1;
392
- };
393
- protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).equals = function (other) {
394
- var tmp;
395
- if (!(other == null) ? isInterface(other, FlowCollector) : false) {
396
- var tmp_0;
397
- if (!(other == null) ? isInterface(other, FunctionAdapter) : false) {
398
- tmp_0 = equals(this.v3(), other.v3());
399
- } else {
400
- tmp_0 = false;
401
- }
402
- tmp = tmp_0;
403
- } else {
404
- tmp = false;
405
- }
406
- return tmp;
407
- };
408
- protoOf(sam$kotlinx_coroutines_flow_FlowCollector$0_0).hashCode = function () {
409
- return hashCode(this.v3());
410
- };
411
- function KotlinxSerializationConverter$serialize$$inlined$map$1($this, $contentType, $charset, $typeInfo, $value) {
412
- this.a51_1 = $this;
413
- this.b51_1 = $contentType;
414
- this.c51_1 = $charset;
415
- this.d51_1 = $typeInfo;
416
- this.e51_1 = $value;
417
- }
418
- protoOf(KotlinxSerializationConverter$serialize$$inlined$map$1).w1c = function (collector, $completion) {
419
- var tmp = new $collectCOROUTINE$2(this, collector, $completion);
420
- tmp.m9_1 = Unit_instance;
421
- tmp.n9_1 = null;
422
- return tmp.s9();
423
- };
424
- protoOf(KotlinxSerializationConverter$serialize$$inlined$map$1).b1c = function (collector, $completion) {
425
- return this.w1c(collector, $completion);
426
- };
427
- function KotlinxSerializationConverter$serialize$slambda(resultContinuation) {
428
- CoroutineImpl.call(this, resultContinuation);
429
- }
430
- protoOf(KotlinxSerializationConverter$serialize$slambda).a53 = function (it, $completion) {
431
- var tmp = this.b53(it, $completion);
432
- tmp.m9_1 = Unit_instance;
433
- tmp.n9_1 = null;
434
- return tmp.s9();
435
- };
436
- protoOf(KotlinxSerializationConverter$serialize$slambda).ga = function (p1, $completion) {
437
- return this.a53((p1 == null ? true : p1 instanceof OutgoingContent) ? p1 : THROW_CCE(), $completion);
438
- };
439
- protoOf(KotlinxSerializationConverter$serialize$slambda).s9 = function () {
440
- var suspendResult = this.m9_1;
441
- $sm: do
442
- try {
443
- var tmp = this.k9_1;
444
- if (tmp === 0) {
445
- this.l9_1 = 1;
446
- return !(this.z52_1 == null);
447
- } else if (tmp === 1) {
448
- throw this.n9_1;
449
- }
450
- } catch ($p) {
451
- var e = $p;
452
- throw e;
453
- }
454
- while (true);
455
- };
456
- protoOf(KotlinxSerializationConverter$serialize$slambda).b53 = function (it, completion) {
457
- var i = new KotlinxSerializationConverter$serialize$slambda(completion);
458
- i.z52_1 = it;
459
- return i;
460
- };
461
- function KotlinxSerializationConverter$serialize$slambda_0(resultContinuation) {
462
- var i = new KotlinxSerializationConverter$serialize$slambda(resultContinuation);
463
- var l = function (it, $completion) {
464
- return i.a53(it, $completion);
465
- };
466
- l.$arity = 1;
467
- return l;
468
- }
469
- function KotlinxSerializationConverter$deserialize$$inlined$map$1($this, $charset, $typeInfo, $content) {
470
- this.l52_1 = $this;
471
- this.m52_1 = $charset;
472
- this.n52_1 = $typeInfo;
473
- this.o52_1 = $content;
474
- }
475
- protoOf(KotlinxSerializationConverter$deserialize$$inlined$map$1).w1c = function (collector, $completion) {
476
- var tmp = new $collectCOROUTINE$3(this, collector, $completion);
477
- tmp.m9_1 = Unit_instance;
478
- tmp.n9_1 = null;
479
- return tmp.s9();
480
- };
481
- protoOf(KotlinxSerializationConverter$deserialize$$inlined$map$1).b1c = function (collector, $completion) {
482
- return this.w1c(collector, $completion);
483
- };
484
- function KotlinxSerializationConverter$deserialize$slambda($content, resultContinuation) {
485
- this.k53_1 = $content;
486
- CoroutineImpl.call(this, resultContinuation);
487
- }
488
- protoOf(KotlinxSerializationConverter$deserialize$slambda).i3n = function (it, $completion) {
489
- var tmp = this.g3m(it, $completion);
490
- tmp.m9_1 = Unit_instance;
491
- tmp.n9_1 = null;
492
- return tmp.s9();
493
- };
494
- protoOf(KotlinxSerializationConverter$deserialize$slambda).ga = function (p1, $completion) {
495
- return this.i3n((p1 == null ? true : !(p1 == null)) ? p1 : THROW_CCE(), $completion);
496
- };
497
- protoOf(KotlinxSerializationConverter$deserialize$slambda).s9 = function () {
498
- var suspendResult = this.m9_1;
499
- $sm: do
500
- try {
501
- var tmp = this.k9_1;
502
- if (tmp === 0) {
503
- this.l9_1 = 1;
504
- return !(this.l53_1 == null) || this.k53_1.z1q();
505
- } else if (tmp === 1) {
506
- throw this.n9_1;
507
- }
508
- } catch ($p) {
509
- var e = $p;
510
- throw e;
511
- }
512
- while (true);
513
- };
514
- protoOf(KotlinxSerializationConverter$deserialize$slambda).g3m = function (it, completion) {
515
- var i = new KotlinxSerializationConverter$deserialize$slambda(this.k53_1, completion);
516
- i.l53_1 = it;
517
- return i;
518
- };
519
- function KotlinxSerializationConverter$deserialize$slambda_0($content, resultContinuation) {
520
- var i = new KotlinxSerializationConverter$deserialize$slambda($content, resultContinuation);
521
- var l = function (it, $completion) {
522
- return i.i3n(it, $completion);
523
- };
524
- l.$arity = 1;
525
- return l;
526
- }
527
- function $serializeCOROUTINE$0(_this__u8e3s4, contentType, charset, typeInfo, value, resultContinuation) {
528
- CoroutineImpl.call(this, resultContinuation);
529
- this.u53_1 = _this__u8e3s4;
530
- this.v53_1 = contentType;
531
- this.w53_1 = charset;
532
- this.x53_1 = typeInfo;
533
- this.y53_1 = value;
534
- }
535
- protoOf($serializeCOROUTINE$0).s9 = function () {
536
- var suspendResult = this.m9_1;
537
- $sm: do
538
- try {
539
- var tmp = this.k9_1;
540
- switch (tmp) {
541
- case 0:
542
- this.l9_1 = 2;
543
- this.k9_1 = 1;
544
- var this_0 = asFlow(this.u53_1.a54_1);
545
- var tmp_0 = new KotlinxSerializationConverter$serialize$$inlined$map$1(this_0, this.v53_1, this.w53_1, this.x53_1, this.y53_1);
546
- suspendResult = firstOrNull_0(tmp_0, KotlinxSerializationConverter$serialize$slambda_0(null), this);
547
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
548
- return suspendResult;
549
- }
550
-
551
- continue $sm;
552
- case 1:
553
- var fromExtension = suspendResult;
554
- if (!(fromExtension == null))
555
- return fromExtension;
556
- var tmp_1;
557
- try {
558
- tmp_1 = serializerForTypeInfo(this.u53_1.z53_1.t25(), this.x53_1);
559
- } catch ($p) {
560
- var tmp_2;
561
- if ($p instanceof SerializationException) {
562
- var cause = $p;
563
- tmp_2 = guessSerializer(this.y53_1, this.u53_1.z53_1.t25());
564
- } else {
565
- throw $p;
566
- }
567
- tmp_1 = tmp_2;
568
- }
569
-
570
- var serializer = tmp_1;
571
- return serializeContent(this.u53_1, serializer, this.u53_1.z53_1, this.y53_1, this.v53_1, this.w53_1);
572
- case 2:
573
- throw this.n9_1;
574
- }
575
- } catch ($p) {
576
- var e = $p;
577
- if (this.l9_1 === 2) {
578
- throw e;
579
- } else {
580
- this.k9_1 = this.l9_1;
581
- this.n9_1 = e;
582
- }
583
- }
584
- while (true);
585
- };
586
- function $deserializeCOROUTINE$1(_this__u8e3s4, charset, typeInfo, content, resultContinuation) {
587
- CoroutineImpl.call(this, resultContinuation);
588
- this.j54_1 = _this__u8e3s4;
589
- this.k54_1 = charset;
590
- this.l54_1 = typeInfo;
591
- this.m54_1 = content;
592
- }
593
- protoOf($deserializeCOROUTINE$1).s9 = function () {
594
- var suspendResult = this.m9_1;
595
- $sm: do
596
- try {
597
- var tmp = this.k9_1;
598
- switch (tmp) {
599
- case 0:
600
- this.l9_1 = 4;
601
- this.k9_1 = 1;
602
- var this_0 = asFlow(this.j54_1.a54_1);
603
- var tmp_0 = new KotlinxSerializationConverter$deserialize$$inlined$map$1(this_0, this.k54_1, this.l54_1, this.m54_1);
604
- suspendResult = firstOrNull_0(tmp_0, KotlinxSerializationConverter$deserialize$slambda_0(this.m54_1, null), this);
605
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
606
- return suspendResult;
607
- }
608
-
609
- continue $sm;
610
- case 1:
611
- this.n54_1 = suspendResult;
612
- var tmp_1;
613
- if (!this.j54_1.a54_1.h()) {
614
- tmp_1 = !(this.n54_1 == null) || this.m54_1.z1q();
615
- } else {
616
- tmp_1 = false;
617
- }
618
-
619
- if (tmp_1)
620
- return this.n54_1;
621
- this.o54_1 = serializerForTypeInfo(this.j54_1.z53_1.t25(), this.l54_1);
622
- this.k9_1 = 2;
623
- suspendResult = readRemaining(this.m54_1, this);
624
- if (suspendResult === get_COROUTINE_SUSPENDED()) {
625
- return suspendResult;
626
- }
627
-
628
- continue $sm;
629
- case 2:
630
- var contentPacket = suspendResult;
631
- this.l9_1 = 3;
632
- var tmp0_subject = this.j54_1.z53_1;
633
- var tmp_2;
634
- if (isInterface(tmp0_subject, StringFormat)) {
635
- tmp_2 = this.j54_1.z53_1.u22(this.o54_1, readText(contentPacket, this.k54_1));
636
- } else {
637
- if (isInterface(tmp0_subject, BinaryFormat)) {
638
- tmp_2 = this.j54_1.z53_1.w22(this.o54_1, readByteArray(contentPacket));
639
- } else {
640
- discard(contentPacket);
641
- var message = 'Unsupported format ' + toString(this.j54_1.z53_1);
642
- throw IllegalStateException_init_$Create$(toString(message));
643
- }
644
- }
645
-
646
- return tmp_2;
647
- case 3:
648
- this.l9_1 = 4;
649
- var tmp_3 = this.n9_1;
650
- if (tmp_3 instanceof Error) {
651
- var cause = this.n9_1;
652
- throw new JsonConvertException('Illegal input: ' + cause.message, cause);
653
- } else {
654
- throw this.n9_1;
655
- }
656
-
657
- case 4:
658
- throw this.n9_1;
659
- }
660
- } catch ($p) {
661
- var e = $p;
662
- if (this.l9_1 === 4) {
663
- throw e;
664
- } else {
665
- this.k9_1 = this.l9_1;
666
- this.n9_1 = e;
667
- }
668
- }
669
- while (true);
670
- };
671
- function KotlinxSerializationConverter(format) {
672
- this.z53_1 = format;
673
- this.a54_1 = extensions(this.z53_1);
674
- var tmp;
675
- var tmp_0 = this.z53_1;
676
- if (isInterface(tmp_0, BinaryFormat)) {
677
- tmp = true;
678
- } else {
679
- var tmp_1 = this.z53_1;
680
- tmp = isInterface(tmp_1, StringFormat);
681
- }
682
- // Inline function 'kotlin.require' call
683
- if (!tmp) {
684
- var message = 'Only binary and string formats are supported, ' + toString(this.z53_1) + ' is not supported.';
685
- throw IllegalArgumentException_init_$Create$(toString(message));
686
- }
687
- }
688
- protoOf(KotlinxSerializationConverter).p54 = function (contentType, charset, typeInfo, value, $completion) {
689
- var tmp = new $serializeCOROUTINE$0(this, contentType, charset, typeInfo, value, $completion);
690
- tmp.m9_1 = Unit_instance;
691
- tmp.n9_1 = null;
692
- return tmp.s9();
693
- };
694
- protoOf(KotlinxSerializationConverter).r4z = function (contentType, charset, typeInfo, value, $completion) {
695
- return this.p54(contentType, charset, typeInfo, value, $completion);
696
- };
697
- protoOf(KotlinxSerializationConverter).h3m = function (charset, typeInfo, content, $completion) {
698
- var tmp = new $deserializeCOROUTINE$1(this, charset, typeInfo, content, $completion);
699
- tmp.m9_1 = Unit_instance;
700
- tmp.n9_1 = null;
701
- return tmp.s9();
702
- };
703
- function serializerForTypeInfo(_this__u8e3s4, typeInfo) {
704
- var module_0 = _this__u8e3s4;
705
- var tmp0_safe_receiver = typeInfo.o2t_1;
706
- var tmp;
707
- if (tmp0_safe_receiver == null) {
708
- tmp = null;
709
- } else {
710
- // Inline function 'kotlin.let' call
711
- var tmp_0;
712
- if (tmp0_safe_receiver.ic().h()) {
713
- tmp_0 = null;
714
- } else {
715
- tmp_0 = serializerOrNull(module_0, tmp0_safe_receiver);
716
- }
717
- tmp = tmp_0;
718
- }
719
- var tmp1_elvis_lhs = tmp;
720
- var tmp_1;
721
- if (tmp1_elvis_lhs == null) {
722
- var tmp2_safe_receiver = module_0.z22(typeInfo.n2t_1);
723
- tmp_1 = tmp2_safe_receiver == null ? null : maybeNullable(tmp2_safe_receiver, typeInfo);
724
- } else {
725
- tmp_1 = tmp1_elvis_lhs;
726
- }
727
- var tmp3_elvis_lhs = tmp_1;
728
- return tmp3_elvis_lhs == null ? maybeNullable(serializer(typeInfo.n2t_1), typeInfo) : tmp3_elvis_lhs;
729
- }
730
- function guessSerializer(value, module_0) {
731
- var tmp;
732
- if (value == null) {
733
- tmp = get_nullable(serializer_0(StringCompanionObject_instance));
734
- } else {
735
- if (!(value == null) ? isInterface(value, KtList) : false) {
736
- tmp = ListSerializer(elementSerializer(value, module_0));
737
- } else {
738
- if (!(value == null) ? isArray(value) : false) {
739
- var tmp1_safe_receiver = firstOrNull(value);
740
- var tmp_0;
741
- if (tmp1_safe_receiver == null) {
742
- tmp_0 = null;
743
- } else {
744
- // Inline function 'kotlin.let' call
745
- tmp_0 = guessSerializer(tmp1_safe_receiver, module_0);
746
- }
747
- var tmp2_elvis_lhs = tmp_0;
748
- tmp = tmp2_elvis_lhs == null ? ListSerializer(serializer_0(StringCompanionObject_instance)) : tmp2_elvis_lhs;
749
- } else {
750
- if (!(value == null) ? isInterface(value, KtSet) : false) {
751
- tmp = SetSerializer(elementSerializer(value, module_0));
752
- } else {
753
- if (!(value == null) ? isInterface(value, KtMap) : false) {
754
- var keySerializer = elementSerializer(value.q2(), module_0);
755
- var valueSerializer = elementSerializer(value.r2(), module_0);
756
- tmp = MapSerializer(keySerializer, valueSerializer);
757
- } else {
758
- var tmp3_elvis_lhs = module_0.z22(getKClassFromExpression(value));
759
- tmp = tmp3_elvis_lhs == null ? serializer(getKClassFromExpression(value)) : tmp3_elvis_lhs;
760
- }
761
- }
762
- }
763
- }
764
- }
765
- var tmp_1 = tmp;
766
- return isInterface(tmp_1, KSerializer) ? tmp_1 : THROW_CCE();
767
- }
768
- function maybeNullable(_this__u8e3s4, typeInfo) {
769
- var tmp;
770
- var tmp0_safe_receiver = typeInfo.o2t_1;
771
- if ((tmp0_safe_receiver == null ? null : tmp0_safe_receiver.jc()) === true) {
772
- tmp = get_nullable(_this__u8e3s4);
773
- } else {
774
- tmp = _this__u8e3s4;
775
- }
776
- return tmp;
777
- }
778
- function elementSerializer(_this__u8e3s4, module_0) {
779
- // Inline function 'kotlin.collections.map' call
780
- var this_0 = filterNotNull(_this__u8e3s4);
781
- // Inline function 'kotlin.collections.mapTo' call
782
- var destination = ArrayList_init_$Create$_0(collectionSizeOrDefault(this_0, 10));
783
- var _iterator__ex2g4s = this_0.q();
784
- while (_iterator__ex2g4s.r()) {
785
- var item = _iterator__ex2g4s.s();
786
- var tmp$ret$0 = guessSerializer(item, module_0);
787
- destination.k(tmp$ret$0);
788
- }
789
- // Inline function 'kotlin.collections.distinctBy' call
790
- var set = HashSet_init_$Create$();
791
- var list = ArrayList_init_$Create$();
792
- var _iterator__ex2g4s_0 = destination.q();
793
- while (_iterator__ex2g4s_0.r()) {
794
- var e = _iterator__ex2g4s_0.s();
795
- var key = e.s21().s22();
796
- if (set.k(key)) {
797
- list.k(e);
798
- }
799
- }
800
- var serializers = list;
801
- if (serializers.t() > 1) {
802
- // Inline function 'kotlin.collections.map' call
803
- // Inline function 'kotlin.collections.mapTo' call
804
- var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(serializers, 10));
805
- var _iterator__ex2g4s_1 = serializers.q();
806
- while (_iterator__ex2g4s_1.r()) {
807
- var item_0 = _iterator__ex2g4s_1.s();
808
- var tmp$ret$5 = item_0.s21().s22();
809
- destination_0.k(tmp$ret$5);
810
- }
811
- // Inline function 'kotlin.error' call
812
- var message = 'Serializing collections of different element types is not yet supported. ' + ('Selected serializers: ' + toString(destination_0));
813
- throw IllegalStateException_init_$Create$(toString(message));
814
- }
815
- var tmp0_elvis_lhs = singleOrNull(serializers);
816
- var selected = tmp0_elvis_lhs == null ? serializer_0(StringCompanionObject_instance) : tmp0_elvis_lhs;
817
- if (selected.s21().d23()) {
818
- return selected;
819
- }
820
- if (!isInterface(selected, KSerializer))
821
- THROW_CCE();
822
- var tmp$ret$8;
823
- $l$block_0: {
824
- // Inline function 'kotlin.collections.any' call
825
- var tmp;
826
- if (isInterface(_this__u8e3s4, Collection)) {
827
- tmp = _this__u8e3s4.h();
828
- } else {
829
- tmp = false;
830
- }
831
- if (tmp) {
832
- tmp$ret$8 = false;
833
- break $l$block_0;
834
- }
835
- var _iterator__ex2g4s_2 = _this__u8e3s4.q();
836
- while (_iterator__ex2g4s_2.r()) {
837
- var element = _iterator__ex2g4s_2.s();
838
- if (element == null) {
839
- tmp$ret$8 = true;
840
- break $l$block_0;
841
- }
842
- }
843
- tmp$ret$8 = false;
844
- }
845
- if (tmp$ret$8) {
846
- return get_nullable(selected);
847
- }
848
- return selected;
849
- }
850
- function get_providers() {
851
- return emptyList();
852
- }
853
- //region block: exports
854
- export {
855
- serialization as serialization1fpeds7cruos4,
856
- };
857
- //endregion