game_client_logic_deb 1.8.147 → 1.8.185

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 (61) hide show
  1. package/Kosi-Kaverit-kaverit.js +80 -80
  2. package/Kosi-Kodein-kodein-di.js +651 -651
  3. package/Kosi-Kodein-kodein-di.js.map +1 -1
  4. package/Kotlin-DateTime-library-kotlinx-datetime.js +5674 -321
  5. package/Kotlin-DateTime-library-kotlinx-datetime.js.map +1 -1
  6. package/Logic_Debertz-core.js +2007 -1712
  7. package/Logic_Debertz-core.js.map +1 -1
  8. package/Logic_Debertz-engine.js +19790 -15503
  9. package/Logic_Debertz-engine.js.map +1 -1
  10. package/Logic_Debertz-game_client.d.ts +383 -93
  11. package/Logic_Debertz-game_client.js +5036 -4822
  12. package/Logic_Debertz-game_client.js.map +1 -1
  13. package/kotlin-kotlin-stdlib.js +4016 -2922
  14. package/kotlin-kotlin-stdlib.js.map +1 -1
  15. package/kotlinx-atomicfu.js +35 -35
  16. package/kotlinx-atomicfu.js.map +1 -1
  17. package/kotlinx-coroutines-core.js +3755 -2723
  18. package/kotlinx-coroutines-core.js.map +1 -1
  19. package/kotlinx-io-kotlinx-io-core.js +302 -302
  20. package/kotlinx-io-kotlinx-io-core.js.map +1 -1
  21. package/kotlinx-serialization-kotlinx-serialization-core.js +2161 -2132
  22. package/kotlinx-serialization-kotlinx-serialization-core.js.map +1 -1
  23. package/kotlinx-serialization-kotlinx-serialization-json.js +1529 -1515
  24. package/kotlinx-serialization-kotlinx-serialization-json.js.map +1 -1
  25. package/ktor-ktor-client-content-negotiation.js +713 -0
  26. package/ktor-ktor-client-content-negotiation.js.map +1 -0
  27. package/ktor-ktor-client-core.js +7207 -0
  28. package/ktor-ktor-client-core.js.map +1 -0
  29. package/ktor-ktor-client-js.js +15 -0
  30. package/ktor-ktor-client-js.js.map +1 -0
  31. package/ktor-ktor-client-logging.js +1506 -0
  32. package/ktor-ktor-client-logging.js.map +1 -0
  33. package/ktor-ktor-events.js +97 -0
  34. package/ktor-ktor-events.js.map +1 -0
  35. package/ktor-ktor-http.js +3263 -0
  36. package/ktor-ktor-http.js.map +1 -0
  37. package/ktor-ktor-io.js +6469 -0
  38. package/ktor-ktor-io.js.map +1 -0
  39. package/ktor-ktor-serialization-kotlinx-json.js +67 -0
  40. package/ktor-ktor-serialization-kotlinx-json.js.map +1 -0
  41. package/ktor-ktor-serialization-kotlinx.js +847 -0
  42. package/ktor-ktor-serialization-kotlinx.js.map +1 -0
  43. package/ktor-ktor-serialization.js +369 -0
  44. package/ktor-ktor-serialization.js.map +1 -0
  45. package/ktor-ktor-utils.js +2659 -0
  46. package/ktor-ktor-utils.js.map +1 -0
  47. package/ktor-ktor-websocket-serialization.js +15 -0
  48. package/ktor-ktor-websocket-serialization.js.map +1 -0
  49. package/ktor-ktor-websockets.js +466 -0
  50. package/ktor-ktor-websockets.js.map +1 -0
  51. package/package.json +5 -2
  52. package/raspberry-cardgame-lib-core.js +742 -560
  53. package/raspberry-cardgame-lib-core.js.map +1 -1
  54. package/raspberry-cardgame-lib-logger.js +408 -0
  55. package/raspberry-cardgame-lib-logger.js.map +1 -0
  56. package/raspberry-cardgame-lib-random.js +2756 -0
  57. package/raspberry-cardgame-lib-random.js.map +1 -0
  58. package/secure-random-secure-random.js +163 -5
  59. package/secure-random-secure-random.js.map +1 -1
  60. package/uuid.js +36 -36
  61. package/uuid.js.map +1 -1
@@ -0,0 +1,3263 @@
1
+ (function (root, factory) {
2
+ if (typeof define === 'function' && define.amd)
3
+ define(['exports', './kotlin-kotlin-stdlib.js', './ktor-ktor-io.js', './ktor-ktor-utils.js'], factory);
4
+ else if (typeof exports === 'object')
5
+ factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-io.js'), require('./ktor-ktor-utils.js'));
6
+ else {
7
+ if (typeof this['kotlin-kotlin-stdlib'] === 'undefined') {
8
+ throw new Error("Error loading module 'ktor-ktor-http'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ktor-ktor-http'.");
9
+ }
10
+ if (typeof this['ktor-ktor-io'] === 'undefined') {
11
+ throw new Error("Error loading module 'ktor-ktor-http'. Its dependency 'ktor-ktor-io' was not found. Please, check whether 'ktor-ktor-io' is loaded prior to 'ktor-ktor-http'.");
12
+ }
13
+ if (typeof this['ktor-ktor-utils'] === 'undefined') {
14
+ throw new Error("Error loading module 'ktor-ktor-http'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'ktor-ktor-http'.");
15
+ }
16
+ root['ktor-ktor-http'] = factory(typeof this['ktor-ktor-http'] === 'undefined' ? {} : this['ktor-ktor-http'], this['kotlin-kotlin-stdlib'], this['ktor-ktor-io'], this['ktor-ktor-utils']);
17
+ }
18
+ }(globalThis, function (_, kotlin_kotlin, kotlin_io_ktor_ktor_io, kotlin_io_ktor_ktor_utils) {
19
+ 'use strict';
20
+ //region block: imports
21
+ var imul = Math.imul;
22
+ var VOID = kotlin_kotlin.$_$.f;
23
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.f1;
24
+ var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.g;
25
+ var encode = kotlin_io_ktor_ktor_io.$_$.l;
26
+ var Unit_instance = kotlin_kotlin.$_$.l5;
27
+ var prepareReadFirstHead = kotlin_io_ktor_ktor_io.$_$.o;
28
+ var prepareReadNextHead = kotlin_io_ktor_ktor_io.$_$.p;
29
+ var completeReadHead = kotlin_io_ktor_ktor_io.$_$.n;
30
+ var charArray = kotlin_kotlin.$_$.za;
31
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.v2;
32
+ var concatToString = kotlin_kotlin.$_$.rd;
33
+ var charSequenceGet = kotlin_kotlin.$_$.ab;
34
+ var toString = kotlin_kotlin.$_$.sc;
35
+ var Char = kotlin_kotlin.$_$.yf;
36
+ var isSurrogate = kotlin_kotlin.$_$.ie;
37
+ var Char__plus_impl_qi7pgj = kotlin_kotlin.$_$.z2;
38
+ var Char__minus_impl_a2frrh = kotlin_kotlin.$_$.y2;
39
+ var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.e1;
40
+ var charSequenceLength = kotlin_kotlin.$_$.bb;
41
+ var charSequenceSubSequence = kotlin_kotlin.$_$.cb;
42
+ var toString_0 = kotlin_kotlin.$_$.c3;
43
+ var toByte = kotlin_kotlin.$_$.pc;
44
+ var String_0 = kotlin_io_ktor_ktor_io.$_$.u;
45
+ var Exception = kotlin_kotlin.$_$.fg;
46
+ var Exception_init_$Init$ = kotlin_kotlin.$_$.k1;
47
+ var captureStack = kotlin_kotlin.$_$.xa;
48
+ var protoOf = kotlin_kotlin.$_$.oc;
49
+ var initMetadataForClass = kotlin_kotlin.$_$.nb;
50
+ var Char__minus_impl_a2frrh_0 = kotlin_kotlin.$_$.x2;
51
+ var numberToChar = kotlin_kotlin.$_$.kc;
52
+ var Char__rangeTo_impl_tkncvp = kotlin_kotlin.$_$.a3;
53
+ var plus = kotlin_kotlin.$_$.u8;
54
+ var plus_0 = kotlin_kotlin.$_$.v8;
55
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.o6;
56
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
57
+ var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.b3;
58
+ var toSet = kotlin_kotlin.$_$.v9;
59
+ var setOf = kotlin_kotlin.$_$.c9;
60
+ var plus_1 = kotlin_kotlin.$_$.t8;
61
+ var listOf = kotlin_kotlin.$_$.m8;
62
+ var emptyList = kotlin_kotlin.$_$.j7;
63
+ var objectCreate = kotlin_kotlin.$_$.nc;
64
+ var equals = kotlin_kotlin.$_$.yd;
65
+ var Collection = kotlin_kotlin.$_$.n5;
66
+ var isInterface = kotlin_kotlin.$_$.bc;
67
+ var isBlank = kotlin_kotlin.$_$.de;
68
+ var last = kotlin_kotlin.$_$.h8;
69
+ var indexOf = kotlin_kotlin.$_$.ce;
70
+ var THROW_CCE = kotlin_kotlin.$_$.og;
71
+ var isCharSequence = kotlin_kotlin.$_$.xb;
72
+ var trim = kotlin_kotlin.$_$.sf;
73
+ var contains = kotlin_kotlin.$_$.td;
74
+ var initMetadataForCompanion = kotlin_kotlin.$_$.ob;
75
+ var initMetadataForObject = kotlin_kotlin.$_$.sb;
76
+ var plus_2 = kotlin_kotlin.$_$.w8;
77
+ var equals_0 = kotlin_kotlin.$_$.fb;
78
+ var getStringHashCode = kotlin_kotlin.$_$.lb;
79
+ var hashCode = kotlin_kotlin.$_$.mb;
80
+ var Companion_instance = kotlin_io_ktor_ktor_io.$_$.f;
81
+ var IllegalArgumentException = kotlin_kotlin.$_$.gg;
82
+ var get_name = kotlin_io_ktor_ktor_io.$_$.m;
83
+ var get_lastIndex = kotlin_kotlin.$_$.e8;
84
+ var first = kotlin_kotlin.$_$.zd;
85
+ var last_0 = kotlin_kotlin.$_$.me;
86
+ var get_lastIndex_0 = kotlin_kotlin.$_$.ke;
87
+ var StringValuesBuilderImpl = kotlin_io_ktor_ktor_utils.$_$.r;
88
+ var emptySet = kotlin_kotlin.$_$.l7;
89
+ var get = kotlin_io_ktor_ktor_utils.$_$.q;
90
+ var forEach = kotlin_io_ktor_ktor_utils.$_$.p;
91
+ var StringValues = kotlin_io_ktor_ktor_utils.$_$.t;
92
+ var StringValuesImpl = kotlin_io_ktor_ktor_utils.$_$.s;
93
+ var emptyMap = kotlin_kotlin.$_$.k7;
94
+ var toDoubleOrNull = kotlin_kotlin.$_$.ef;
95
+ var LazyThreadSafetyMode_NONE_getInstance = kotlin_kotlin.$_$.j;
96
+ var lazy = kotlin_kotlin.$_$.kh;
97
+ var to = kotlin_kotlin.$_$.sh;
98
+ var sortedWith = kotlin_kotlin.$_$.g9;
99
+ var Comparator = kotlin_kotlin.$_$.ag;
100
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.n;
101
+ var compareValues = kotlin_kotlin.$_$.aa;
102
+ var asList = kotlin_kotlin.$_$.e6;
103
+ var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.w2;
104
+ var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.q1;
105
+ var toLong = kotlin_kotlin.$_$.jf;
106
+ var mapCapacity = kotlin_kotlin.$_$.n8;
107
+ var coerceAtLeast = kotlin_kotlin.$_$.xc;
108
+ var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.v;
109
+ var Comparable = kotlin_kotlin.$_$.zf;
110
+ var initMetadataForInterface = kotlin_kotlin.$_$.qb;
111
+ var isWhitespace = kotlin_kotlin.$_$.je;
112
+ var startsWith = kotlin_kotlin.$_$.xe;
113
+ var charArrayOf = kotlin_kotlin.$_$.ya;
114
+ var split = kotlin_kotlin.$_$.ue;
115
+ var toMutableList = kotlin_kotlin.$_$.s9;
116
+ var first_0 = kotlin_kotlin.$_$.q7;
117
+ var joinToString = kotlin_kotlin.$_$.b8;
118
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.r1;
119
+ var toCharArray = kotlin_io_ktor_ktor_utils.$_$.a1;
120
+ var indexOfAny = kotlin_kotlin.$_$.ae;
121
+ var dropLast = kotlin_kotlin.$_$.h7;
122
+ var IllegalStateException = kotlin_kotlin.$_$.hg;
123
+ var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.w1;
124
+ var indexOf_0 = kotlin_kotlin.$_$.be;
125
+ var toInt = kotlin_kotlin.$_$.hf;
126
+ var listOf_0 = kotlin_kotlin.$_$.l8;
127
+ var toLowerCasePreservingASCIIRules = kotlin_io_ktor_ktor_utils.$_$.b1;
128
+ var isLowerCase = kotlin_io_ktor_ktor_utils.$_$.w;
129
+ var appendAll = kotlin_io_ktor_ktor_utils.$_$.u;
130
+ var startsWith_0 = kotlin_kotlin.$_$.we;
131
+ var addAll = kotlin_kotlin.$_$.c6;
132
+ var joinTo = kotlin_kotlin.$_$.c8;
133
+ var toString_1 = kotlin_kotlin.$_$.rh;
134
+ var lazy_0 = kotlin_kotlin.$_$.lh;
135
+ var getKClassFromExpression = kotlin_kotlin.$_$.d;
136
+ var KProperty1 = kotlin_kotlin.$_$.jd;
137
+ var getPropertyCallableRef = kotlin_kotlin.$_$.kb;
138
+ var toLong_0 = kotlin_kotlin.$_$.qc;
139
+ var encodeToByteArray = kotlin_kotlin.$_$.vd;
140
+ var encodeToByteArray_0 = kotlin_io_ktor_ktor_io.$_$.k;
141
+ var take = kotlin_kotlin.$_$.bf;
142
+ var PlatformUtils_getInstance = kotlin_io_ktor_ktor_utils.$_$.c;
143
+ var get_platform = kotlin_io_ktor_ktor_utils.$_$.x;
144
+ //endregion
145
+ //region block: pre-declaration
146
+ initMetadataForClass(URLDecodeException, 'URLDecodeException', VOID, Exception);
147
+ initMetadataForCompanion(Companion);
148
+ initMetadataForObject(Application, 'Application');
149
+ initMetadataForObject(Text, 'Text');
150
+ initMetadataForClass(HeaderValueWithParameters, 'HeaderValueWithParameters');
151
+ initMetadataForClass(ContentType, 'ContentType', VOID, HeaderValueWithParameters);
152
+ initMetadataForClass(BadContentTypeFormatException, 'BadContentTypeFormatException', VOID, Exception);
153
+ initMetadataForCompanion(Companion_0);
154
+ initMetadataForCompanion(Companion_1);
155
+ initMetadataForClass(HeadersBuilder, 'HeadersBuilder', HeadersBuilder, StringValuesBuilderImpl);
156
+ initMetadataForObject(EmptyHeaders, 'EmptyHeaders', VOID, VOID, [StringValues]);
157
+ initMetadataForClass(HeadersImpl, 'HeadersImpl', HeadersImpl, StringValuesImpl, [StringValues, StringValuesImpl]);
158
+ initMetadataForClass(HeaderValueParam, 'HeaderValueParam');
159
+ initMetadataForClass(HeaderValue, 'HeaderValue');
160
+ initMetadataForClass(sam$kotlin_Comparator$0, 'sam$kotlin_Comparator$0', VOID, VOID, [Comparator]);
161
+ initMetadataForObject(HttpHeaders, 'HttpHeaders');
162
+ initMetadataForClass(IllegalHeaderNameException, 'IllegalHeaderNameException', VOID, IllegalArgumentException);
163
+ initMetadataForClass(IllegalHeaderValueException, 'IllegalHeaderValueException', VOID, IllegalArgumentException);
164
+ initMetadataForClass(UnsafeHeaderException, 'UnsafeHeaderException', VOID, IllegalArgumentException);
165
+ initMetadataForCompanion(Companion_2);
166
+ initMetadataForClass(HttpMethod, 'HttpMethod');
167
+ initMetadataForCompanion(Companion_3);
168
+ initMetadataForClass(HttpProtocolVersion, 'HttpProtocolVersion');
169
+ initMetadataForCompanion(Companion_4);
170
+ initMetadataForClass(HttpStatusCode, 'HttpStatusCode', VOID, VOID, [Comparable]);
171
+ initMetadataForCompanion(Companion_5);
172
+ initMetadataForInterface(Parameters, 'Parameters', VOID, VOID, [StringValues]);
173
+ initMetadataForObject(EmptyParameters, 'EmptyParameters', VOID, VOID, [Parameters]);
174
+ initMetadataForClass(ParametersBuilderImpl, 'ParametersBuilderImpl', ParametersBuilderImpl, StringValuesBuilderImpl);
175
+ initMetadataForClass(ParametersImpl, 'ParametersImpl', ParametersImpl, StringValuesImpl, [Parameters, StringValuesImpl]);
176
+ initMetadataForCompanion(Companion_6);
177
+ initMetadataForClass(URLBuilder, 'URLBuilder', URLBuilder);
178
+ initMetadataForClass(URLParserException, 'URLParserException', VOID, IllegalStateException);
179
+ initMetadataForCompanion(Companion_7);
180
+ initMetadataForClass(URLProtocol, 'URLProtocol');
181
+ initMetadataForCompanion(Companion_8);
182
+ initMetadataForClass(Url_1, 'Url');
183
+ initMetadataForClass(UrlDecodedParametersBuilder, 'UrlDecodedParametersBuilder');
184
+ initMetadataForClass(OutgoingContent, 'OutgoingContent');
185
+ initMetadataForClass(ByteArrayContent_0, 'ByteArrayContent', VOID, OutgoingContent);
186
+ initMetadataForClass(ByteArrayContent, 'ByteArrayContent', VOID, ByteArrayContent_0);
187
+ initMetadataForClass(NoContent, 'NoContent', VOID, OutgoingContent);
188
+ initMetadataForClass(ReadChannelContent, 'ReadChannelContent', VOID, OutgoingContent);
189
+ initMetadataForClass(WriteChannelContent, 'WriteChannelContent', VOID, OutgoingContent, VOID, [1]);
190
+ initMetadataForClass(ProtocolUpgrade, 'ProtocolUpgrade', VOID, OutgoingContent, VOID, [4]);
191
+ initMetadataForObject(NullBody, 'NullBody');
192
+ initMetadataForClass(TextContent, 'TextContent', VOID, ByteArrayContent_0);
193
+ //endregion
194
+ function get_URL_ALPHABET() {
195
+ _init_properties_Codecs_kt__fudxxf();
196
+ return URL_ALPHABET;
197
+ }
198
+ var URL_ALPHABET;
199
+ function get_URL_ALPHABET_CHARS() {
200
+ _init_properties_Codecs_kt__fudxxf();
201
+ return URL_ALPHABET_CHARS;
202
+ }
203
+ var URL_ALPHABET_CHARS;
204
+ function get_HEX_ALPHABET() {
205
+ _init_properties_Codecs_kt__fudxxf();
206
+ return HEX_ALPHABET;
207
+ }
208
+ var HEX_ALPHABET;
209
+ function get_URL_PROTOCOL_PART() {
210
+ _init_properties_Codecs_kt__fudxxf();
211
+ return URL_PROTOCOL_PART;
212
+ }
213
+ var URL_PROTOCOL_PART;
214
+ function get_VALID_PATH_PART() {
215
+ _init_properties_Codecs_kt__fudxxf();
216
+ return VALID_PATH_PART;
217
+ }
218
+ var VALID_PATH_PART;
219
+ var ATTRIBUTE_CHARACTERS;
220
+ function get_SPECIAL_SYMBOLS() {
221
+ _init_properties_Codecs_kt__fudxxf();
222
+ return SPECIAL_SYMBOLS;
223
+ }
224
+ var SPECIAL_SYMBOLS;
225
+ function encodeURLParameter(_this__u8e3s4, spaceToPlus) {
226
+ spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus;
227
+ _init_properties_Codecs_kt__fudxxf();
228
+ // Inline function 'kotlin.text.buildString' call
229
+ // Inline function 'kotlin.contracts.contract' call
230
+ // Inline function 'kotlin.apply' call
231
+ var this_0 = StringBuilder_init_$Create$();
232
+ // Inline function 'kotlin.contracts.contract' call
233
+ // Inline function 'io.ktor.http.encodeURLParameter.<anonymous>' call
234
+ var content = encode(Charsets_getInstance().r1z_1.v1z(), _this__u8e3s4);
235
+ forEach_0(content, encodeURLParameter$lambda(this_0, spaceToPlus));
236
+ return this_0.toString();
237
+ }
238
+ function decodeURLPart(_this__u8e3s4, start, end, charset) {
239
+ start = start === VOID ? 0 : start;
240
+ end = end === VOID ? _this__u8e3s4.length : end;
241
+ charset = charset === VOID ? Charsets_getInstance().r1z_1 : charset;
242
+ _init_properties_Codecs_kt__fudxxf();
243
+ return decodeScan(_this__u8e3s4, start, end, false, charset);
244
+ }
245
+ function encodeURLQueryComponent(_this__u8e3s4, encodeFull, spaceToPlus, charset) {
246
+ encodeFull = encodeFull === VOID ? false : encodeFull;
247
+ spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus;
248
+ charset = charset === VOID ? Charsets_getInstance().r1z_1 : charset;
249
+ _init_properties_Codecs_kt__fudxxf();
250
+ // Inline function 'kotlin.text.buildString' call
251
+ // Inline function 'kotlin.contracts.contract' call
252
+ // Inline function 'kotlin.apply' call
253
+ var this_0 = StringBuilder_init_$Create$();
254
+ // Inline function 'kotlin.contracts.contract' call
255
+ // Inline function 'io.ktor.http.encodeURLQueryComponent.<anonymous>' call
256
+ var content = encode(charset.v1z(), _this__u8e3s4);
257
+ forEach_0(content, encodeURLQueryComponent$lambda(spaceToPlus, this_0, encodeFull));
258
+ return this_0.toString();
259
+ }
260
+ function decodeURLQueryComponent(_this__u8e3s4, start, end, plusIsSpace, charset) {
261
+ start = start === VOID ? 0 : start;
262
+ end = end === VOID ? _this__u8e3s4.length : end;
263
+ plusIsSpace = plusIsSpace === VOID ? false : plusIsSpace;
264
+ charset = charset === VOID ? Charsets_getInstance().r1z_1 : charset;
265
+ _init_properties_Codecs_kt__fudxxf();
266
+ return decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset);
267
+ }
268
+ function encodeURLPathPart(_this__u8e3s4) {
269
+ _init_properties_Codecs_kt__fudxxf();
270
+ return encodeURLPath(_this__u8e3s4, true);
271
+ }
272
+ function forEach_0(_this__u8e3s4, block) {
273
+ _init_properties_Codecs_kt__fudxxf();
274
+ $l$block: {
275
+ // Inline function 'io.ktor.utils.io.core.takeWhile' call
276
+ var release = true;
277
+ var tmp0_elvis_lhs = prepareReadFirstHead(_this__u8e3s4, 1);
278
+ var tmp;
279
+ if (tmp0_elvis_lhs == null) {
280
+ break $l$block;
281
+ } else {
282
+ tmp = tmp0_elvis_lhs;
283
+ }
284
+ var current = tmp;
285
+ try {
286
+ $l$loop_1: do {
287
+ // Inline function 'io.ktor.http.forEach.<anonymous>' call
288
+ var buffer = current;
289
+ $l$loop: while (true) {
290
+ // Inline function 'io.ktor.utils.io.core.canRead' call
291
+ if (!(buffer.i1o_1 > buffer.h1o_1)) {
292
+ break $l$loop;
293
+ }
294
+ block(buffer.t1w());
295
+ }
296
+ if (!true) {
297
+ break $l$loop_1;
298
+ }
299
+ release = false;
300
+ var tmp1_elvis_lhs = prepareReadNextHead(_this__u8e3s4, current);
301
+ var tmp_0;
302
+ if (tmp1_elvis_lhs == null) {
303
+ break $l$loop_1;
304
+ } else {
305
+ tmp_0 = tmp1_elvis_lhs;
306
+ }
307
+ var next = tmp_0;
308
+ current = next;
309
+ release = true;
310
+ }
311
+ while (true);
312
+ }finally {
313
+ if (release) {
314
+ completeReadHead(_this__u8e3s4, current);
315
+ }
316
+ }
317
+ }
318
+ }
319
+ function percentEncode(_this__u8e3s4) {
320
+ _init_properties_Codecs_kt__fudxxf();
321
+ var code = _this__u8e3s4 & 255;
322
+ var array = charArray(3);
323
+ array[0] = _Char___init__impl__6a9atx(37);
324
+ array[1] = hexDigitToChar(code >> 4);
325
+ array[2] = hexDigitToChar(code & 15);
326
+ return concatToString(array);
327
+ }
328
+ function decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset) {
329
+ _init_properties_Codecs_kt__fudxxf();
330
+ var inductionVariable = start;
331
+ if (inductionVariable < end)
332
+ do {
333
+ var index = inductionVariable;
334
+ inductionVariable = inductionVariable + 1 | 0;
335
+ var ch = charSequenceGet(_this__u8e3s4, index);
336
+ if (ch === _Char___init__impl__6a9atx(37) || (plusIsSpace && ch === _Char___init__impl__6a9atx(43))) {
337
+ return decodeImpl(_this__u8e3s4, start, end, index, plusIsSpace, charset);
338
+ }
339
+ }
340
+ while (inductionVariable < end);
341
+ var tmp;
342
+ if (start === 0 && end === _this__u8e3s4.length) {
343
+ tmp = toString(_this__u8e3s4);
344
+ } else {
345
+ // Inline function 'kotlin.text.substring' call
346
+ // Inline function 'kotlin.js.asDynamic' call
347
+ tmp = _this__u8e3s4.substring(start, end);
348
+ }
349
+ return tmp;
350
+ }
351
+ function encodeURLPath(_this__u8e3s4, encodeSlash) {
352
+ _init_properties_Codecs_kt__fudxxf();
353
+ // Inline function 'kotlin.text.buildString' call
354
+ // Inline function 'kotlin.contracts.contract' call
355
+ // Inline function 'kotlin.apply' call
356
+ var this_0 = StringBuilder_init_$Create$();
357
+ // Inline function 'kotlin.contracts.contract' call
358
+ // Inline function 'io.ktor.http.encodeURLPath.<anonymous>' call
359
+ var charset = Charsets_getInstance().r1z_1;
360
+ var index = 0;
361
+ $l$loop_0: while (index < _this__u8e3s4.length) {
362
+ var current = charSequenceGet(_this__u8e3s4, index);
363
+ if (!encodeSlash && current === _Char___init__impl__6a9atx(47) || get_URL_ALPHABET_CHARS().s1(new Char(current)) || get_VALID_PATH_PART().s1(new Char(current))) {
364
+ this_0.j8(current);
365
+ index = index + 1 | 0;
366
+ continue $l$loop_0;
367
+ }
368
+ if (current === _Char___init__impl__6a9atx(37) && (index + 2 | 0) < _this__u8e3s4.length && get_HEX_ALPHABET().s1(new Char(charSequenceGet(_this__u8e3s4, index + 1 | 0))) && get_HEX_ALPHABET().s1(new Char(charSequenceGet(_this__u8e3s4, index + 2 | 0)))) {
369
+ this_0.j8(current);
370
+ this_0.j8(charSequenceGet(_this__u8e3s4, index + 1 | 0));
371
+ this_0.j8(charSequenceGet(_this__u8e3s4, index + 2 | 0));
372
+ index = index + 3 | 0;
373
+ continue $l$loop_0;
374
+ }
375
+ var symbolSize = isSurrogate(current) ? 2 : 1;
376
+ var tmp = encode(charset.v1z(), _this__u8e3s4, index, index + symbolSize | 0);
377
+ forEach_0(tmp, encodeURLPath$lambda(this_0));
378
+ index = index + symbolSize | 0;
379
+ }
380
+ return this_0.toString();
381
+ }
382
+ function hexDigitToChar(digit) {
383
+ _init_properties_Codecs_kt__fudxxf();
384
+ return (0 <= digit ? digit <= 9 : false) ? Char__plus_impl_qi7pgj(_Char___init__impl__6a9atx(48), digit) : Char__minus_impl_a2frrh(Char__plus_impl_qi7pgj(_Char___init__impl__6a9atx(65), digit), 10);
385
+ }
386
+ function decodeImpl(_this__u8e3s4, start, end, prefixEnd, plusIsSpace, charset) {
387
+ _init_properties_Codecs_kt__fudxxf();
388
+ var length = end - start | 0;
389
+ var sbSize = length > 255 ? length / 3 | 0 : length;
390
+ var sb = StringBuilder_init_$Create$_0(sbSize);
391
+ if (prefixEnd > start) {
392
+ sb.ub(_this__u8e3s4, start, prefixEnd);
393
+ }
394
+ var index = prefixEnd;
395
+ var bytes = null;
396
+ while (index < end) {
397
+ var c = charSequenceGet(_this__u8e3s4, index);
398
+ if (plusIsSpace && c === _Char___init__impl__6a9atx(43)) {
399
+ sb.j8(_Char___init__impl__6a9atx(32));
400
+ index = index + 1 | 0;
401
+ } else if (c === _Char___init__impl__6a9atx(37)) {
402
+ if (bytes == null) {
403
+ bytes = new Int8Array((end - index | 0) / 3 | 0);
404
+ }
405
+ var count = 0;
406
+ while (index < end && charSequenceGet(_this__u8e3s4, index) === _Char___init__impl__6a9atx(37)) {
407
+ if ((index + 2 | 0) >= end) {
408
+ // Inline function 'kotlin.text.substring' call
409
+ var startIndex = index;
410
+ var endIndex = charSequenceLength(_this__u8e3s4);
411
+ var tmp$ret$0 = toString(charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex));
412
+ throw new URLDecodeException('Incomplete trailing HEX escape: ' + tmp$ret$0 + ', in ' + toString(_this__u8e3s4) + ' at ' + index);
413
+ }
414
+ var digit1 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 1 | 0));
415
+ var digit2 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 2 | 0));
416
+ if (digit1 === -1 || digit2 === -1) {
417
+ throw new URLDecodeException('Wrong HEX escape: %' + toString_0(charSequenceGet(_this__u8e3s4, index + 1 | 0)) + toString_0(charSequenceGet(_this__u8e3s4, index + 2 | 0)) + ', in ' + toString(_this__u8e3s4) + ', at ' + index);
418
+ }
419
+ var tmp = bytes;
420
+ var tmp1 = count;
421
+ count = tmp1 + 1 | 0;
422
+ tmp[tmp1] = toByte(imul(digit1, 16) + digit2 | 0);
423
+ index = index + 3 | 0;
424
+ }
425
+ sb.i8(String_0(bytes, 0, count, charset));
426
+ } else {
427
+ sb.j8(c);
428
+ index = index + 1 | 0;
429
+ }
430
+ }
431
+ return sb.toString();
432
+ }
433
+ function URLDecodeException(message) {
434
+ Exception_init_$Init$(message, this);
435
+ captureStack(this, URLDecodeException);
436
+ }
437
+ function charToHexDigit(c2) {
438
+ _init_properties_Codecs_kt__fudxxf();
439
+ return (_Char___init__impl__6a9atx(48) <= c2 ? c2 <= _Char___init__impl__6a9atx(57) : false) ? Char__minus_impl_a2frrh_0(c2, _Char___init__impl__6a9atx(48)) : (_Char___init__impl__6a9atx(65) <= c2 ? c2 <= _Char___init__impl__6a9atx(70) : false) ? Char__minus_impl_a2frrh_0(c2, _Char___init__impl__6a9atx(65)) + 10 | 0 : (_Char___init__impl__6a9atx(97) <= c2 ? c2 <= _Char___init__impl__6a9atx(102) : false) ? Char__minus_impl_a2frrh_0(c2, _Char___init__impl__6a9atx(97)) + 10 | 0 : -1;
440
+ }
441
+ function encodeURLParameterValue(_this__u8e3s4) {
442
+ _init_properties_Codecs_kt__fudxxf();
443
+ return encodeURLParameter(_this__u8e3s4, true);
444
+ }
445
+ function encodeURLParameter$lambda($$this$buildString, $spaceToPlus) {
446
+ return function (it) {
447
+ var tmp;
448
+ if (get_URL_ALPHABET().s1(it) || get_SPECIAL_SYMBOLS().s1(it)) {
449
+ $$this$buildString.j8(numberToChar(it));
450
+ tmp = Unit_instance;
451
+ } else if ($spaceToPlus && it === 32) {
452
+ $$this$buildString.j8(_Char___init__impl__6a9atx(43));
453
+ tmp = Unit_instance;
454
+ } else {
455
+ $$this$buildString.i8(percentEncode(it));
456
+ tmp = Unit_instance;
457
+ }
458
+ return Unit_instance;
459
+ };
460
+ }
461
+ function encodeURLQueryComponent$lambda($spaceToPlus, $$this$buildString, $encodeFull) {
462
+ return function (it) {
463
+ var tmp;
464
+ if (it === 32) {
465
+ var tmp_0;
466
+ if ($spaceToPlus) {
467
+ $$this$buildString.j8(_Char___init__impl__6a9atx(43));
468
+ tmp_0 = Unit_instance;
469
+ } else {
470
+ $$this$buildString.i8('%20');
471
+ tmp_0 = Unit_instance;
472
+ }
473
+ tmp = tmp_0;
474
+ } else if (get_URL_ALPHABET().s1(it) || (!$encodeFull && get_URL_PROTOCOL_PART().s1(it))) {
475
+ $$this$buildString.j8(numberToChar(it));
476
+ tmp = Unit_instance;
477
+ } else {
478
+ $$this$buildString.i8(percentEncode(it));
479
+ tmp = Unit_instance;
480
+ }
481
+ return Unit_instance;
482
+ };
483
+ }
484
+ function encodeURLPath$lambda($$this$buildString) {
485
+ return function (it) {
486
+ $$this$buildString.i8(percentEncode(it));
487
+ return Unit_instance;
488
+ };
489
+ }
490
+ var properties_initialized_Codecs_kt_hkj9s1;
491
+ function _init_properties_Codecs_kt__fudxxf() {
492
+ if (!properties_initialized_Codecs_kt_hkj9s1) {
493
+ properties_initialized_Codecs_kt_hkj9s1 = true;
494
+ // Inline function 'kotlin.collections.map' call
495
+ var this_0 = plus_0(plus(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(122)), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(65), _Char___init__impl__6a9atx(90))), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(57)));
496
+ // Inline function 'kotlin.collections.mapTo' call
497
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
498
+ var tmp0_iterator = this_0.j();
499
+ while (tmp0_iterator.k()) {
500
+ var item = tmp0_iterator.l();
501
+ // Inline function 'io.ktor.http.URL_ALPHABET.<anonymous>' call
502
+ // Inline function 'kotlin.code' call
503
+ var this_1 = item.g1_1;
504
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_1);
505
+ var tmp$ret$1 = toByte(tmp$ret$0);
506
+ destination.e(tmp$ret$1);
507
+ }
508
+ URL_ALPHABET = toSet(destination);
509
+ URL_ALPHABET_CHARS = toSet(plus_0(plus(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(122)), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(65), _Char___init__impl__6a9atx(90))), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(57))));
510
+ HEX_ALPHABET = toSet(plus_0(plus(Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(97), _Char___init__impl__6a9atx(102)), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(65), _Char___init__impl__6a9atx(70))), Char__rangeTo_impl_tkncvp(_Char___init__impl__6a9atx(48), _Char___init__impl__6a9atx(57))));
511
+ // Inline function 'kotlin.collections.map' call
512
+ var this_2 = setOf([new Char(_Char___init__impl__6a9atx(58)), new Char(_Char___init__impl__6a9atx(47)), new Char(_Char___init__impl__6a9atx(63)), new Char(_Char___init__impl__6a9atx(35)), new Char(_Char___init__impl__6a9atx(91)), new Char(_Char___init__impl__6a9atx(93)), new Char(_Char___init__impl__6a9atx(64)), new Char(_Char___init__impl__6a9atx(33)), new Char(_Char___init__impl__6a9atx(36)), new Char(_Char___init__impl__6a9atx(38)), new Char(_Char___init__impl__6a9atx(39)), new Char(_Char___init__impl__6a9atx(40)), new Char(_Char___init__impl__6a9atx(41)), new Char(_Char___init__impl__6a9atx(42)), new Char(_Char___init__impl__6a9atx(44)), new Char(_Char___init__impl__6a9atx(59)), new Char(_Char___init__impl__6a9atx(61)), new Char(_Char___init__impl__6a9atx(45)), new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95)), new Char(_Char___init__impl__6a9atx(126)), new Char(_Char___init__impl__6a9atx(43))]);
513
+ // Inline function 'kotlin.collections.mapTo' call
514
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10));
515
+ var tmp0_iterator_0 = this_2.j();
516
+ while (tmp0_iterator_0.k()) {
517
+ var item_0 = tmp0_iterator_0.l();
518
+ // Inline function 'io.ktor.http.URL_PROTOCOL_PART.<anonymous>' call
519
+ // Inline function 'kotlin.code' call
520
+ var this_3 = item_0.g1_1;
521
+ var tmp$ret$0_0 = Char__toInt_impl_vasixd(this_3);
522
+ var tmp$ret$1_0 = toByte(tmp$ret$0_0);
523
+ destination_0.e(tmp$ret$1_0);
524
+ }
525
+ URL_PROTOCOL_PART = destination_0;
526
+ VALID_PATH_PART = setOf([new Char(_Char___init__impl__6a9atx(58)), new Char(_Char___init__impl__6a9atx(64)), new Char(_Char___init__impl__6a9atx(33)), new Char(_Char___init__impl__6a9atx(36)), new Char(_Char___init__impl__6a9atx(38)), new Char(_Char___init__impl__6a9atx(39)), new Char(_Char___init__impl__6a9atx(40)), new Char(_Char___init__impl__6a9atx(41)), new Char(_Char___init__impl__6a9atx(42)), new Char(_Char___init__impl__6a9atx(43)), new Char(_Char___init__impl__6a9atx(44)), new Char(_Char___init__impl__6a9atx(59)), new Char(_Char___init__impl__6a9atx(61)), new Char(_Char___init__impl__6a9atx(45)), new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95)), new Char(_Char___init__impl__6a9atx(126))]);
527
+ ATTRIBUTE_CHARACTERS = plus_1(get_URL_ALPHABET_CHARS(), setOf([new Char(_Char___init__impl__6a9atx(33)), new Char(_Char___init__impl__6a9atx(35)), new Char(_Char___init__impl__6a9atx(36)), new Char(_Char___init__impl__6a9atx(38)), new Char(_Char___init__impl__6a9atx(43)), new Char(_Char___init__impl__6a9atx(45)), new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(94)), new Char(_Char___init__impl__6a9atx(95)), new Char(_Char___init__impl__6a9atx(96)), new Char(_Char___init__impl__6a9atx(124)), new Char(_Char___init__impl__6a9atx(126))]));
528
+ // Inline function 'kotlin.collections.map' call
529
+ var this_4 = listOf([new Char(_Char___init__impl__6a9atx(45)), new Char(_Char___init__impl__6a9atx(46)), new Char(_Char___init__impl__6a9atx(95)), new Char(_Char___init__impl__6a9atx(126))]);
530
+ // Inline function 'kotlin.collections.mapTo' call
531
+ var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_4, 10));
532
+ var tmp0_iterator_1 = this_4.j();
533
+ while (tmp0_iterator_1.k()) {
534
+ var item_1 = tmp0_iterator_1.l();
535
+ // Inline function 'io.ktor.http.SPECIAL_SYMBOLS.<anonymous>' call
536
+ // Inline function 'kotlin.code' call
537
+ var this_5 = item_1.g1_1;
538
+ var tmp$ret$0_1 = Char__toInt_impl_vasixd(this_5);
539
+ var tmp$ret$1_1 = toByte(tmp$ret$0_1);
540
+ destination_1.e(tmp$ret$1_1);
541
+ }
542
+ SPECIAL_SYMBOLS = destination_1;
543
+ }
544
+ }
545
+ function ContentType_init_$Init$(contentType, contentSubtype, parameters, $this) {
546
+ parameters = parameters === VOID ? emptyList() : parameters;
547
+ ContentType.call($this, contentType, contentSubtype, contentType + '/' + contentSubtype, parameters);
548
+ return $this;
549
+ }
550
+ function ContentType_init_$Create$(contentType, contentSubtype, parameters) {
551
+ return ContentType_init_$Init$(contentType, contentSubtype, parameters, objectCreate(protoOf(ContentType)));
552
+ }
553
+ function hasParameter($this, name, value) {
554
+ var tmp;
555
+ switch ($this.o2b_1.m()) {
556
+ case 0:
557
+ tmp = false;
558
+ break;
559
+ case 1:
560
+ // Inline function 'kotlin.let' call
561
+
562
+ // Inline function 'kotlin.contracts.contract' call
563
+
564
+ // Inline function 'io.ktor.http.ContentType.hasParameter.<anonymous>' call
565
+
566
+ var it = $this.o2b_1.o(0);
567
+ tmp = (equals(it.p2b_1, name, true) && equals(it.q2b_1, value, true));
568
+ break;
569
+ default:
570
+ var tmp$ret$2;
571
+ $l$block_0: {
572
+ // Inline function 'kotlin.collections.any' call
573
+ var this_0 = $this.o2b_1;
574
+ var tmp_0;
575
+ if (isInterface(this_0, Collection)) {
576
+ tmp_0 = this_0.p();
577
+ } else {
578
+ tmp_0 = false;
579
+ }
580
+ if (tmp_0) {
581
+ tmp$ret$2 = false;
582
+ break $l$block_0;
583
+ }
584
+ var tmp0_iterator = this_0.j();
585
+ while (tmp0_iterator.k()) {
586
+ var element = tmp0_iterator.l();
587
+ // Inline function 'io.ktor.http.ContentType.hasParameter.<anonymous>' call
588
+ if (equals(element.p2b_1, name, true) && equals(element.q2b_1, value, true)) {
589
+ tmp$ret$2 = true;
590
+ break $l$block_0;
591
+ }
592
+ }
593
+ tmp$ret$2 = false;
594
+ }
595
+
596
+ tmp = tmp$ret$2;
597
+ break;
598
+ }
599
+ return tmp;
600
+ }
601
+ function Companion() {
602
+ Companion_instance_0 = this;
603
+ this.s2b_1 = ContentType_init_$Create$('*', '*');
604
+ }
605
+ protoOf(Companion).t2b = function (value) {
606
+ if (isBlank(value))
607
+ return this.s2b_1;
608
+ // Inline function 'io.ktor.http.Companion.parse' call
609
+ var headerValue = last(parseHeaderValue(value));
610
+ // Inline function 'io.ktor.http.Companion.parse.<anonymous>' call
611
+ var parts = headerValue.u2b_1;
612
+ var parameters = headerValue.v2b_1;
613
+ var slash = indexOf(parts, _Char___init__impl__6a9atx(47));
614
+ if (slash === -1) {
615
+ // Inline function 'kotlin.text.trim' call
616
+ if (toString(trim(isCharSequence(parts) ? parts : THROW_CCE())) === '*')
617
+ return Companion_getInstance().s2b_1;
618
+ throw new BadContentTypeFormatException(value);
619
+ }
620
+ // Inline function 'kotlin.text.trim' call
621
+ // Inline function 'kotlin.text.substring' call
622
+ // Inline function 'kotlin.js.asDynamic' call
623
+ var this_0 = parts.substring(0, slash);
624
+ var type = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
625
+ // Inline function 'kotlin.text.isEmpty' call
626
+ if (charSequenceLength(type) === 0) {
627
+ throw new BadContentTypeFormatException(value);
628
+ }
629
+ // Inline function 'kotlin.text.trim' call
630
+ // Inline function 'kotlin.text.substring' call
631
+ var startIndex = slash + 1 | 0;
632
+ // Inline function 'kotlin.js.asDynamic' call
633
+ var this_1 = parts.substring(startIndex);
634
+ var subtype = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
635
+ if (contains(type, _Char___init__impl__6a9atx(32)) || contains(subtype, _Char___init__impl__6a9atx(32))) {
636
+ throw new BadContentTypeFormatException(value);
637
+ }
638
+ var tmp;
639
+ // Inline function 'kotlin.text.isEmpty' call
640
+ if (charSequenceLength(subtype) === 0) {
641
+ tmp = true;
642
+ } else {
643
+ tmp = contains(subtype, _Char___init__impl__6a9atx(47));
644
+ }
645
+ if (tmp) {
646
+ throw new BadContentTypeFormatException(value);
647
+ }
648
+ return ContentType_init_$Create$(type, subtype, parameters);
649
+ };
650
+ var Companion_instance_0;
651
+ function Companion_getInstance() {
652
+ if (Companion_instance_0 == null)
653
+ new Companion();
654
+ return Companion_instance_0;
655
+ }
656
+ function Application() {
657
+ Application_instance = this;
658
+ this.x2b_1 = ContentType_init_$Create$('application', '*');
659
+ this.y2b_1 = ContentType_init_$Create$('application', 'atom+xml');
660
+ this.z2b_1 = ContentType_init_$Create$('application', 'cbor');
661
+ this.a2c_1 = ContentType_init_$Create$('application', 'json');
662
+ this.b2c_1 = ContentType_init_$Create$('application', 'hal+json');
663
+ this.c2c_1 = ContentType_init_$Create$('application', 'javascript');
664
+ this.d2c_1 = ContentType_init_$Create$('application', 'octet-stream');
665
+ this.e2c_1 = ContentType_init_$Create$('application', 'rss+xml');
666
+ this.f2c_1 = ContentType_init_$Create$('application', 'xml');
667
+ this.g2c_1 = ContentType_init_$Create$('application', 'xml-dtd');
668
+ this.h2c_1 = ContentType_init_$Create$('application', 'zip');
669
+ this.i2c_1 = ContentType_init_$Create$('application', 'gzip');
670
+ this.j2c_1 = ContentType_init_$Create$('application', 'x-www-form-urlencoded');
671
+ this.k2c_1 = ContentType_init_$Create$('application', 'pdf');
672
+ this.l2c_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.spreadsheetml.sheet');
673
+ this.m2c_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.wordprocessingml.document');
674
+ this.n2c_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.presentationml.presentation');
675
+ this.o2c_1 = ContentType_init_$Create$('application', 'protobuf');
676
+ this.p2c_1 = ContentType_init_$Create$('application', 'wasm');
677
+ this.q2c_1 = ContentType_init_$Create$('application', 'problem+json');
678
+ this.r2c_1 = ContentType_init_$Create$('application', 'problem+xml');
679
+ }
680
+ var Application_instance;
681
+ function Application_getInstance() {
682
+ if (Application_instance == null)
683
+ new Application();
684
+ return Application_instance;
685
+ }
686
+ function Text() {
687
+ Text_instance = this;
688
+ this.s2c_1 = ContentType_init_$Create$('text', '*');
689
+ this.t2c_1 = ContentType_init_$Create$('text', 'plain');
690
+ this.u2c_1 = ContentType_init_$Create$('text', 'css');
691
+ this.v2c_1 = ContentType_init_$Create$('text', 'csv');
692
+ this.w2c_1 = ContentType_init_$Create$('text', 'html');
693
+ this.x2c_1 = ContentType_init_$Create$('text', 'javascript');
694
+ this.y2c_1 = ContentType_init_$Create$('text', 'vcard');
695
+ this.z2c_1 = ContentType_init_$Create$('text', 'xml');
696
+ this.a2d_1 = ContentType_init_$Create$('text', 'event-stream');
697
+ }
698
+ var Text_instance;
699
+ function Text_getInstance() {
700
+ if (Text_instance == null)
701
+ new Text();
702
+ return Text_instance;
703
+ }
704
+ function ContentType(contentType, contentSubtype, existingContent, parameters) {
705
+ Companion_getInstance();
706
+ parameters = parameters === VOID ? emptyList() : parameters;
707
+ HeaderValueWithParameters.call(this, existingContent, parameters);
708
+ this.d2d_1 = contentType;
709
+ this.e2d_1 = contentSubtype;
710
+ }
711
+ protoOf(ContentType).f2d = function (name, value) {
712
+ if (hasParameter(this, name, value))
713
+ return this;
714
+ return new ContentType(this.d2d_1, this.e2d_1, this.n2b_1, plus_2(this.o2b_1, HeaderValueParam_init_$Create$(name, value)));
715
+ };
716
+ protoOf(ContentType).g2d = function () {
717
+ return this.o2b_1.p() ? this : ContentType_init_$Create$(this.d2d_1, this.e2d_1);
718
+ };
719
+ protoOf(ContentType).h2d = function (pattern) {
720
+ if (!(pattern.d2d_1 === '*') && !equals(pattern.d2d_1, this.d2d_1, true)) {
721
+ return false;
722
+ }
723
+ if (!(pattern.e2d_1 === '*') && !equals(pattern.e2d_1, this.e2d_1, true)) {
724
+ return false;
725
+ }
726
+ var tmp0_iterator = pattern.o2b_1.j();
727
+ while (tmp0_iterator.k()) {
728
+ var tmp1_loop_parameter = tmp0_iterator.l();
729
+ var patternName = tmp1_loop_parameter.me();
730
+ var patternValue = tmp1_loop_parameter.ne();
731
+ var tmp;
732
+ if (patternName === '*') {
733
+ var tmp_0;
734
+ if (patternValue === '*') {
735
+ tmp_0 = true;
736
+ } else {
737
+ var tmp$ret$0;
738
+ $l$block_0: {
739
+ // Inline function 'kotlin.collections.any' call
740
+ var this_0 = this.o2b_1;
741
+ var tmp_1;
742
+ if (isInterface(this_0, Collection)) {
743
+ tmp_1 = this_0.p();
744
+ } else {
745
+ tmp_1 = false;
746
+ }
747
+ if (tmp_1) {
748
+ tmp$ret$0 = false;
749
+ break $l$block_0;
750
+ }
751
+ var tmp0_iterator_0 = this_0.j();
752
+ while (tmp0_iterator_0.k()) {
753
+ var element = tmp0_iterator_0.l();
754
+ // Inline function 'io.ktor.http.ContentType.match.<anonymous>' call
755
+ if (equals(element.q2b_1, patternValue, true)) {
756
+ tmp$ret$0 = true;
757
+ break $l$block_0;
758
+ }
759
+ }
760
+ tmp$ret$0 = false;
761
+ }
762
+ tmp_0 = tmp$ret$0;
763
+ }
764
+ tmp = tmp_0;
765
+ } else {
766
+ var value = this.i2d(patternName);
767
+ tmp = patternValue === '*' ? !(value == null) : equals(value, patternValue, true);
768
+ }
769
+ var matches = tmp;
770
+ if (!matches) {
771
+ return false;
772
+ }
773
+ }
774
+ return true;
775
+ };
776
+ protoOf(ContentType).equals = function (other) {
777
+ var tmp;
778
+ var tmp_0;
779
+ var tmp_1;
780
+ if (other instanceof ContentType) {
781
+ tmp_1 = equals(this.d2d_1, other.d2d_1, true);
782
+ } else {
783
+ tmp_1 = false;
784
+ }
785
+ if (tmp_1) {
786
+ tmp_0 = equals(this.e2d_1, other.e2d_1, true);
787
+ } else {
788
+ tmp_0 = false;
789
+ }
790
+ if (tmp_0) {
791
+ tmp = equals_0(this.o2b_1, other.o2b_1);
792
+ } else {
793
+ tmp = false;
794
+ }
795
+ return tmp;
796
+ };
797
+ protoOf(ContentType).hashCode = function () {
798
+ // Inline function 'kotlin.text.lowercase' call
799
+ // Inline function 'kotlin.js.asDynamic' call
800
+ var tmp$ret$1 = this.d2d_1.toLowerCase();
801
+ var result = getStringHashCode(tmp$ret$1);
802
+ var tmp = result;
803
+ var tmp_0 = imul(31, result);
804
+ // Inline function 'kotlin.text.lowercase' call
805
+ // Inline function 'kotlin.js.asDynamic' call
806
+ var tmp$ret$3 = this.e2d_1.toLowerCase();
807
+ result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0;
808
+ result = result + imul(31, hashCode(this.o2b_1)) | 0;
809
+ return result;
810
+ };
811
+ function BadContentTypeFormatException(value) {
812
+ Exception_init_$Init$('Bad Content-Type format: ' + value, this);
813
+ captureStack(this, BadContentTypeFormatException);
814
+ }
815
+ function charset(_this__u8e3s4) {
816
+ var tmp0_safe_receiver = _this__u8e3s4.i2d('charset');
817
+ var tmp;
818
+ if (tmp0_safe_receiver == null) {
819
+ tmp = null;
820
+ } else {
821
+ // Inline function 'kotlin.let' call
822
+ // Inline function 'kotlin.contracts.contract' call
823
+ // Inline function 'io.ktor.http.charset.<anonymous>' call
824
+ var tmp_0;
825
+ try {
826
+ tmp_0 = Companion_instance.s22(tmp0_safe_receiver);
827
+ } catch ($p) {
828
+ var tmp_1;
829
+ if ($p instanceof IllegalArgumentException) {
830
+ var exception = $p;
831
+ tmp_1 = null;
832
+ } else {
833
+ throw $p;
834
+ }
835
+ tmp_0 = tmp_1;
836
+ }
837
+ tmp = tmp_0;
838
+ }
839
+ return tmp;
840
+ }
841
+ function withCharset(_this__u8e3s4, charset) {
842
+ return _this__u8e3s4.f2d('charset', get_name(charset));
843
+ }
844
+ function withCharsetIfNeeded(_this__u8e3s4, charset) {
845
+ var tmp;
846
+ // Inline function 'kotlin.text.lowercase' call
847
+ // Inline function 'kotlin.js.asDynamic' call
848
+ if (!(_this__u8e3s4.d2d_1.toLowerCase() === 'text')) {
849
+ tmp = _this__u8e3s4;
850
+ } else {
851
+ tmp = _this__u8e3s4.f2d('charset', get_name(charset));
852
+ }
853
+ return tmp;
854
+ }
855
+ function get_HeaderFieldValueSeparators() {
856
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
857
+ return HeaderFieldValueSeparators;
858
+ }
859
+ var HeaderFieldValueSeparators;
860
+ function Companion_0() {
861
+ }
862
+ var Companion_instance_1;
863
+ function Companion_getInstance_0() {
864
+ return Companion_instance_1;
865
+ }
866
+ function HeaderValueWithParameters(content, parameters) {
867
+ parameters = parameters === VOID ? emptyList() : parameters;
868
+ this.n2b_1 = content;
869
+ this.o2b_1 = parameters;
870
+ }
871
+ protoOf(HeaderValueWithParameters).i2d = function (name) {
872
+ var inductionVariable = 0;
873
+ var last = get_lastIndex(this.o2b_1);
874
+ if (inductionVariable <= last)
875
+ do {
876
+ var index = inductionVariable;
877
+ inductionVariable = inductionVariable + 1 | 0;
878
+ var parameter = this.o2b_1.o(index);
879
+ if (equals(parameter.p2b_1, name, true)) {
880
+ return parameter.q2b_1;
881
+ }
882
+ }
883
+ while (!(index === last));
884
+ return null;
885
+ };
886
+ protoOf(HeaderValueWithParameters).toString = function () {
887
+ var tmp;
888
+ if (this.o2b_1.p()) {
889
+ tmp = this.n2b_1;
890
+ } else {
891
+ var tmp_0 = this.n2b_1.length;
892
+ // Inline function 'kotlin.collections.sumOf' call
893
+ var sum = 0;
894
+ var tmp0_iterator = this.o2b_1.j();
895
+ while (tmp0_iterator.k()) {
896
+ var element = tmp0_iterator.l();
897
+ var tmp_1 = sum;
898
+ // Inline function 'io.ktor.http.HeaderValueWithParameters.toString.<anonymous>' call
899
+ sum = tmp_1 + ((element.p2b_1.length + element.q2b_1.length | 0) + 3 | 0) | 0;
900
+ }
901
+ var size = tmp_0 + sum | 0;
902
+ // Inline function 'kotlin.apply' call
903
+ var this_0 = StringBuilder_init_$Create$_0(size);
904
+ // Inline function 'kotlin.contracts.contract' call
905
+ // Inline function 'io.ktor.http.HeaderValueWithParameters.toString.<anonymous>' call
906
+ this_0.i8(this.n2b_1);
907
+ var inductionVariable = 0;
908
+ var last = get_lastIndex(this.o2b_1);
909
+ if (inductionVariable <= last)
910
+ do {
911
+ var index = inductionVariable;
912
+ inductionVariable = inductionVariable + 1 | 0;
913
+ var element_0 = this.o2b_1.o(index);
914
+ this_0.i8('; ');
915
+ this_0.i8(element_0.p2b_1);
916
+ this_0.i8('=');
917
+ // Inline function 'io.ktor.http.escapeIfNeededTo' call
918
+ var this_1 = element_0.q2b_1;
919
+ if (needQuotes$accessor$vynnj(this_1)) {
920
+ this_0.i8(quote(this_1));
921
+ } else {
922
+ this_0.i8(this_1);
923
+ }
924
+ }
925
+ while (!(index === last));
926
+ tmp = this_0.toString();
927
+ }
928
+ return tmp;
929
+ };
930
+ function needQuotes(_this__u8e3s4) {
931
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
932
+ // Inline function 'kotlin.text.isEmpty' call
933
+ if (charSequenceLength(_this__u8e3s4) === 0)
934
+ return true;
935
+ if (isQuoted(_this__u8e3s4))
936
+ return false;
937
+ var inductionVariable = 0;
938
+ var last = _this__u8e3s4.length;
939
+ if (inductionVariable < last)
940
+ do {
941
+ var index = inductionVariable;
942
+ inductionVariable = inductionVariable + 1 | 0;
943
+ if (get_HeaderFieldValueSeparators().s1(new Char(charSequenceGet(_this__u8e3s4, index))))
944
+ return true;
945
+ }
946
+ while (inductionVariable < last);
947
+ return false;
948
+ }
949
+ function quote(_this__u8e3s4) {
950
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
951
+ // Inline function 'kotlin.text.buildString' call
952
+ // Inline function 'kotlin.contracts.contract' call
953
+ // Inline function 'kotlin.apply' call
954
+ var this_0 = StringBuilder_init_$Create$();
955
+ // Inline function 'kotlin.contracts.contract' call
956
+ // Inline function 'io.ktor.http.quote.<anonymous>' call
957
+ quoteTo(_this__u8e3s4, this_0);
958
+ return this_0.toString();
959
+ }
960
+ function isQuoted(_this__u8e3s4) {
961
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
962
+ if (_this__u8e3s4.length < 2) {
963
+ return false;
964
+ }
965
+ if (!(first(_this__u8e3s4) === _Char___init__impl__6a9atx(34)) || !(last_0(_this__u8e3s4) === _Char___init__impl__6a9atx(34))) {
966
+ return false;
967
+ }
968
+ var startIndex = 1;
969
+ $l$loop: do {
970
+ var index = indexOf(_this__u8e3s4, _Char___init__impl__6a9atx(34), startIndex);
971
+ if (index === get_lastIndex_0(_this__u8e3s4)) {
972
+ break $l$loop;
973
+ }
974
+ var slashesCount = 0;
975
+ var slashIndex = index - 1 | 0;
976
+ while (charSequenceGet(_this__u8e3s4, slashIndex) === _Char___init__impl__6a9atx(92)) {
977
+ slashesCount = slashesCount + 1 | 0;
978
+ slashIndex = slashIndex - 1 | 0;
979
+ }
980
+ if ((slashesCount % 2 | 0) === 0) {
981
+ return false;
982
+ }
983
+ startIndex = index + 1 | 0;
984
+ }
985
+ while (startIndex < _this__u8e3s4.length);
986
+ return true;
987
+ }
988
+ function quoteTo(_this__u8e3s4, out) {
989
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
990
+ out.i8('"');
991
+ var inductionVariable = 0;
992
+ var last = _this__u8e3s4.length;
993
+ if (inductionVariable < last)
994
+ do {
995
+ var i = inductionVariable;
996
+ inductionVariable = inductionVariable + 1 | 0;
997
+ var ch = charSequenceGet(_this__u8e3s4, i);
998
+ if (ch === _Char___init__impl__6a9atx(92)) {
999
+ out.i8('\\\\');
1000
+ } else if (ch === _Char___init__impl__6a9atx(10)) {
1001
+ out.i8('\\n');
1002
+ } else if (ch === _Char___init__impl__6a9atx(13)) {
1003
+ out.i8('\\r');
1004
+ } else if (ch === _Char___init__impl__6a9atx(9)) {
1005
+ out.i8('\\t');
1006
+ } else if (ch === _Char___init__impl__6a9atx(34)) {
1007
+ out.i8('\\"');
1008
+ } else {
1009
+ out.j8(ch);
1010
+ }
1011
+ }
1012
+ while (inductionVariable < last);
1013
+ out.i8('"');
1014
+ }
1015
+ function needQuotes$accessor$vynnj(_this__u8e3s4) {
1016
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
1017
+ return needQuotes(_this__u8e3s4);
1018
+ }
1019
+ var properties_initialized_HeaderValueWithParameters_kt_yu5xg;
1020
+ function _init_properties_HeaderValueWithParameters_kt__z6luvy() {
1021
+ if (!properties_initialized_HeaderValueWithParameters_kt_yu5xg) {
1022
+ properties_initialized_HeaderValueWithParameters_kt_yu5xg = true;
1023
+ HeaderFieldValueSeparators = setOf([new Char(_Char___init__impl__6a9atx(40)), new Char(_Char___init__impl__6a9atx(41)), new Char(_Char___init__impl__6a9atx(60)), new Char(_Char___init__impl__6a9atx(62)), new Char(_Char___init__impl__6a9atx(64)), new Char(_Char___init__impl__6a9atx(44)), new Char(_Char___init__impl__6a9atx(59)), new Char(_Char___init__impl__6a9atx(58)), new Char(_Char___init__impl__6a9atx(92)), new Char(_Char___init__impl__6a9atx(34)), new Char(_Char___init__impl__6a9atx(47)), new Char(_Char___init__impl__6a9atx(91)), new Char(_Char___init__impl__6a9atx(93)), new Char(_Char___init__impl__6a9atx(63)), new Char(_Char___init__impl__6a9atx(61)), new Char(_Char___init__impl__6a9atx(123)), new Char(_Char___init__impl__6a9atx(125)), new Char(_Char___init__impl__6a9atx(32)), new Char(_Char___init__impl__6a9atx(9)), new Char(_Char___init__impl__6a9atx(10)), new Char(_Char___init__impl__6a9atx(13))]);
1024
+ }
1025
+ }
1026
+ function Companion_1() {
1027
+ Companion_instance_2 = this;
1028
+ this.j2d_1 = EmptyHeaders_instance;
1029
+ }
1030
+ var Companion_instance_2;
1031
+ function Companion_getInstance_1() {
1032
+ if (Companion_instance_2 == null)
1033
+ new Companion_1();
1034
+ return Companion_instance_2;
1035
+ }
1036
+ function HeadersBuilder(size) {
1037
+ size = size === VOID ? 8 : size;
1038
+ StringValuesBuilderImpl.call(this, true, size);
1039
+ }
1040
+ protoOf(HeadersBuilder).l1s = function () {
1041
+ return new HeadersImpl(this.r27_1);
1042
+ };
1043
+ protoOf(HeadersBuilder).s27 = function (name) {
1044
+ protoOf(StringValuesBuilderImpl).s27.call(this, name);
1045
+ HttpHeaders_getInstance().i2h(name);
1046
+ };
1047
+ protoOf(HeadersBuilder).x27 = function (value) {
1048
+ protoOf(StringValuesBuilderImpl).x27.call(this, value);
1049
+ HttpHeaders_getInstance().j2h(value);
1050
+ };
1051
+ function EmptyHeaders() {
1052
+ }
1053
+ protoOf(EmptyHeaders).l27 = function () {
1054
+ return true;
1055
+ };
1056
+ protoOf(EmptyHeaders).m27 = function (name) {
1057
+ return null;
1058
+ };
1059
+ protoOf(EmptyHeaders).n27 = function () {
1060
+ return emptySet();
1061
+ };
1062
+ protoOf(EmptyHeaders).o27 = function () {
1063
+ return emptySet();
1064
+ };
1065
+ protoOf(EmptyHeaders).toString = function () {
1066
+ return 'Headers ' + toString(this.o27());
1067
+ };
1068
+ var EmptyHeaders_instance;
1069
+ function EmptyHeaders_getInstance() {
1070
+ return EmptyHeaders_instance;
1071
+ }
1072
+ function HeadersImpl(values) {
1073
+ values = values === VOID ? emptyMap() : values;
1074
+ StringValuesImpl.call(this, true, values);
1075
+ }
1076
+ protoOf(HeadersImpl).toString = function () {
1077
+ return 'Headers ' + toString(this.o27());
1078
+ };
1079
+ function HeaderValueParam_init_$Init$(name, value, $this) {
1080
+ HeaderValueParam.call($this, name, value, false);
1081
+ return $this;
1082
+ }
1083
+ function HeaderValueParam_init_$Create$(name, value) {
1084
+ return HeaderValueParam_init_$Init$(name, value, objectCreate(protoOf(HeaderValueParam)));
1085
+ }
1086
+ function HeaderValueParam(name, value, escapeValue) {
1087
+ this.p2b_1 = name;
1088
+ this.q2b_1 = value;
1089
+ this.r2b_1 = escapeValue;
1090
+ }
1091
+ protoOf(HeaderValueParam).equals = function (other) {
1092
+ var tmp;
1093
+ var tmp_0;
1094
+ if (other instanceof HeaderValueParam) {
1095
+ tmp_0 = equals(other.p2b_1, this.p2b_1, true);
1096
+ } else {
1097
+ tmp_0 = false;
1098
+ }
1099
+ if (tmp_0) {
1100
+ tmp = equals(other.q2b_1, this.q2b_1, true);
1101
+ } else {
1102
+ tmp = false;
1103
+ }
1104
+ return tmp;
1105
+ };
1106
+ protoOf(HeaderValueParam).hashCode = function () {
1107
+ // Inline function 'kotlin.text.lowercase' call
1108
+ // Inline function 'kotlin.js.asDynamic' call
1109
+ var tmp$ret$1 = this.p2b_1.toLowerCase();
1110
+ var result = getStringHashCode(tmp$ret$1);
1111
+ var tmp = result;
1112
+ var tmp_0 = imul(31, result);
1113
+ // Inline function 'kotlin.text.lowercase' call
1114
+ // Inline function 'kotlin.js.asDynamic' call
1115
+ var tmp$ret$3 = this.q2b_1.toLowerCase();
1116
+ result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0;
1117
+ return result;
1118
+ };
1119
+ protoOf(HeaderValueParam).me = function () {
1120
+ return this.p2b_1;
1121
+ };
1122
+ protoOf(HeaderValueParam).ne = function () {
1123
+ return this.q2b_1;
1124
+ };
1125
+ protoOf(HeaderValueParam).toString = function () {
1126
+ return 'HeaderValueParam(name=' + this.p2b_1 + ', value=' + this.q2b_1 + ', escapeValue=' + this.r2b_1 + ')';
1127
+ };
1128
+ function HeaderValue(value, params) {
1129
+ params = params === VOID ? emptyList() : params;
1130
+ this.u2b_1 = value;
1131
+ this.v2b_1 = params;
1132
+ var tmp = this;
1133
+ var tmp$ret$1;
1134
+ $l$block: {
1135
+ // Inline function 'kotlin.collections.firstOrNull' call
1136
+ var tmp0_iterator = this.v2b_1.j();
1137
+ while (tmp0_iterator.k()) {
1138
+ var element = tmp0_iterator.l();
1139
+ // Inline function 'io.ktor.http.HeaderValue.quality.<anonymous>' call
1140
+ if (element.p2b_1 === 'q') {
1141
+ tmp$ret$1 = element;
1142
+ break $l$block;
1143
+ }
1144
+ }
1145
+ tmp$ret$1 = null;
1146
+ }
1147
+ var tmp0_safe_receiver = tmp$ret$1;
1148
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.q2b_1;
1149
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : toDoubleOrNull(tmp1_safe_receiver);
1150
+ var tmp_0;
1151
+ if (tmp2_safe_receiver == null) {
1152
+ tmp_0 = null;
1153
+ } else {
1154
+ // Inline function 'kotlin.takeIf' call
1155
+ // Inline function 'kotlin.contracts.contract' call
1156
+ var tmp_1;
1157
+ // Inline function 'io.ktor.http.HeaderValue.quality.<anonymous>' call
1158
+ if (0.0 <= tmp2_safe_receiver ? tmp2_safe_receiver <= 1.0 : false) {
1159
+ tmp_1 = tmp2_safe_receiver;
1160
+ } else {
1161
+ tmp_1 = null;
1162
+ }
1163
+ tmp_0 = tmp_1;
1164
+ }
1165
+ var tmp3_elvis_lhs = tmp_0;
1166
+ tmp.w2b_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
1167
+ }
1168
+ protoOf(HeaderValue).me = function () {
1169
+ return this.u2b_1;
1170
+ };
1171
+ protoOf(HeaderValue).toString = function () {
1172
+ return 'HeaderValue(value=' + this.u2b_1 + ', params=' + toString(this.v2b_1) + ')';
1173
+ };
1174
+ protoOf(HeaderValue).hashCode = function () {
1175
+ var result = getStringHashCode(this.u2b_1);
1176
+ result = imul(result, 31) + hashCode(this.v2b_1) | 0;
1177
+ return result;
1178
+ };
1179
+ protoOf(HeaderValue).equals = function (other) {
1180
+ if (this === other)
1181
+ return true;
1182
+ if (!(other instanceof HeaderValue))
1183
+ return false;
1184
+ var tmp0_other_with_cast = other instanceof HeaderValue ? other : THROW_CCE();
1185
+ if (!(this.u2b_1 === tmp0_other_with_cast.u2b_1))
1186
+ return false;
1187
+ if (!equals_0(this.v2b_1, tmp0_other_with_cast.v2b_1))
1188
+ return false;
1189
+ return true;
1190
+ };
1191
+ function parseHeaderValue(text) {
1192
+ return parseHeaderValue_0(text, false);
1193
+ }
1194
+ function parseHeaderValue_0(text, parametersOnly) {
1195
+ if (text == null) {
1196
+ return emptyList();
1197
+ }
1198
+ var position = 0;
1199
+ var tmp = LazyThreadSafetyMode_NONE_getInstance();
1200
+ var items = lazy(tmp, parseHeaderValue$lambda);
1201
+ while (position <= get_lastIndex_0(text)) {
1202
+ position = parseHeaderValueItem(text, position, items, parametersOnly);
1203
+ }
1204
+ return valueOrEmpty(items);
1205
+ }
1206
+ function parseHeaderValueItem(text, start, items, parametersOnly) {
1207
+ var position = start;
1208
+ var tmp = LazyThreadSafetyMode_NONE_getInstance();
1209
+ var parameters = lazy(tmp, parseHeaderValueItem$lambda);
1210
+ var valueEnd = parametersOnly ? position : null;
1211
+ while (position <= get_lastIndex_0(text)) {
1212
+ var tmp0_subject = charSequenceGet(text, position);
1213
+ if (tmp0_subject === _Char___init__impl__6a9atx(44)) {
1214
+ var tmp_0 = items.u();
1215
+ var tmp1_elvis_lhs = valueEnd;
1216
+ tmp_0.e(new HeaderValue(subtrim(text, start, tmp1_elvis_lhs == null ? position : tmp1_elvis_lhs), valueOrEmpty(parameters)));
1217
+ return position + 1 | 0;
1218
+ } else if (tmp0_subject === _Char___init__impl__6a9atx(59)) {
1219
+ if (valueEnd == null)
1220
+ valueEnd = position;
1221
+ position = parseHeaderValueParameter(text, position + 1 | 0, parameters);
1222
+ } else {
1223
+ var tmp_1;
1224
+ if (parametersOnly) {
1225
+ tmp_1 = parseHeaderValueParameter(text, position, parameters);
1226
+ } else {
1227
+ tmp_1 = position + 1 | 0;
1228
+ }
1229
+ position = tmp_1;
1230
+ }
1231
+ }
1232
+ var tmp_2 = items.u();
1233
+ var tmp2_elvis_lhs = valueEnd;
1234
+ tmp_2.e(new HeaderValue(subtrim(text, start, tmp2_elvis_lhs == null ? position : tmp2_elvis_lhs), valueOrEmpty(parameters)));
1235
+ return position;
1236
+ }
1237
+ function valueOrEmpty(_this__u8e3s4) {
1238
+ return _this__u8e3s4.zi() ? _this__u8e3s4.u() : emptyList();
1239
+ }
1240
+ function subtrim(_this__u8e3s4, start, end) {
1241
+ // Inline function 'kotlin.text.trim' call
1242
+ // Inline function 'kotlin.text.substring' call
1243
+ // Inline function 'kotlin.js.asDynamic' call
1244
+ var this_0 = _this__u8e3s4.substring(start, end);
1245
+ return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
1246
+ }
1247
+ function parseHeaderValueParameter(text, start, parameters) {
1248
+ var position = start;
1249
+ while (position <= get_lastIndex_0(text)) {
1250
+ var tmp0_subject = charSequenceGet(text, position);
1251
+ if (tmp0_subject === _Char___init__impl__6a9atx(61)) {
1252
+ var tmp1_container = parseHeaderValueParameterValue(text, position + 1 | 0);
1253
+ var paramEnd = tmp1_container.me();
1254
+ var paramValue = tmp1_container.ne();
1255
+ parseHeaderValueParameter$addParam(parameters, text, start, position, paramValue);
1256
+ return paramEnd;
1257
+ } else if (tmp0_subject === _Char___init__impl__6a9atx(59) ? true : tmp0_subject === _Char___init__impl__6a9atx(44)) {
1258
+ parseHeaderValueParameter$addParam(parameters, text, start, position, '');
1259
+ return position;
1260
+ } else {
1261
+ position = position + 1 | 0;
1262
+ }
1263
+ }
1264
+ parseHeaderValueParameter$addParam(parameters, text, start, position, '');
1265
+ return position;
1266
+ }
1267
+ function parseHeaderValueParameterValue(value, start) {
1268
+ if (value.length === start) {
1269
+ return to(start, '');
1270
+ }
1271
+ var position = start;
1272
+ if (charSequenceGet(value, start) === _Char___init__impl__6a9atx(34)) {
1273
+ return parseHeaderValueParameterValueQuoted(value, position + 1 | 0);
1274
+ }
1275
+ while (position <= get_lastIndex_0(value)) {
1276
+ var tmp0_subject = charSequenceGet(value, position);
1277
+ if (tmp0_subject === _Char___init__impl__6a9atx(59) ? true : tmp0_subject === _Char___init__impl__6a9atx(44))
1278
+ return to(position, subtrim(value, start, position));
1279
+ else {
1280
+ position = position + 1 | 0;
1281
+ }
1282
+ }
1283
+ return to(position, subtrim(value, start, position));
1284
+ }
1285
+ function parseHeaderValueParameterValueQuoted(value, start) {
1286
+ var position = start;
1287
+ var builder = StringBuilder_init_$Create$();
1288
+ loop: while (position <= get_lastIndex_0(value)) {
1289
+ var currentChar = charSequenceGet(value, position);
1290
+ if (currentChar === _Char___init__impl__6a9atx(34) && nextIsSemicolonOrEnd(value, position)) {
1291
+ return to(position + 1 | 0, builder.toString());
1292
+ } else if (currentChar === _Char___init__impl__6a9atx(92) && position < (get_lastIndex_0(value) - 2 | 0)) {
1293
+ builder.j8(charSequenceGet(value, position + 1 | 0));
1294
+ position = position + 2 | 0;
1295
+ continue loop;
1296
+ }
1297
+ builder.j8(currentChar);
1298
+ position = position + 1 | 0;
1299
+ }
1300
+ var tmp = position;
1301
+ // Inline function 'kotlin.text.plus' call
1302
+ var this_0 = _Char___init__impl__6a9atx(34);
1303
+ var other = builder.toString();
1304
+ var tmp$ret$0 = toString_0(this_0) + other;
1305
+ return to(tmp, tmp$ret$0);
1306
+ }
1307
+ function nextIsSemicolonOrEnd(_this__u8e3s4, start) {
1308
+ var position = start + 1 | 0;
1309
+ loop: while (position < _this__u8e3s4.length && charSequenceGet(_this__u8e3s4, position) === _Char___init__impl__6a9atx(32)) {
1310
+ position = position + 1 | 0;
1311
+ }
1312
+ return position === _this__u8e3s4.length || charSequenceGet(_this__u8e3s4, position) === _Char___init__impl__6a9atx(59);
1313
+ }
1314
+ function parseAndSortHeader(header) {
1315
+ // Inline function 'kotlin.collections.sortedByDescending' call
1316
+ var this_0 = parseHeaderValue(header);
1317
+ // Inline function 'kotlin.comparisons.compareByDescending' call
1318
+ var tmp = parseAndSortHeader$lambda;
1319
+ var tmp$ret$0 = new sam$kotlin_Comparator$0(tmp);
1320
+ return sortedWith(this_0, tmp$ret$0);
1321
+ }
1322
+ function sam$kotlin_Comparator$0(function_0) {
1323
+ this.k2h_1 = function_0;
1324
+ }
1325
+ protoOf(sam$kotlin_Comparator$0).jc = function (a, b) {
1326
+ return this.k2h_1(a, b);
1327
+ };
1328
+ protoOf(sam$kotlin_Comparator$0).compare = function (a, b) {
1329
+ return this.jc(a, b);
1330
+ };
1331
+ function parseHeaderValueParameter$addParam($parameters, text, start, end, value) {
1332
+ var name = subtrim(text, start, end);
1333
+ // Inline function 'kotlin.text.isEmpty' call
1334
+ if (charSequenceLength(name) === 0) {
1335
+ return Unit_instance;
1336
+ }
1337
+ $parameters.u().e(HeaderValueParam_init_$Create$(name, value));
1338
+ }
1339
+ function parseHeaderValue$lambda() {
1340
+ // Inline function 'kotlin.collections.arrayListOf' call
1341
+ return ArrayList_init_$Create$_0();
1342
+ }
1343
+ function parseHeaderValueItem$lambda() {
1344
+ // Inline function 'kotlin.collections.arrayListOf' call
1345
+ return ArrayList_init_$Create$_0();
1346
+ }
1347
+ function parseAndSortHeader$lambda(a, b) {
1348
+ // Inline function 'kotlin.comparisons.compareValuesBy' call
1349
+ // Inline function 'io.ktor.http.parseAndSortHeader.<anonymous>' call
1350
+ var tmp = b.w2b_1;
1351
+ // Inline function 'io.ktor.http.parseAndSortHeader.<anonymous>' call
1352
+ var tmp$ret$1 = a.w2b_1;
1353
+ return compareValues(tmp, tmp$ret$1);
1354
+ }
1355
+ function HttpHeaders() {
1356
+ HttpHeaders_instance = this;
1357
+ this.m2d_1 = 'Accept';
1358
+ this.n2d_1 = 'Accept-Charset';
1359
+ this.o2d_1 = 'Accept-Encoding';
1360
+ this.p2d_1 = 'Accept-Language';
1361
+ this.q2d_1 = 'Accept-Ranges';
1362
+ this.r2d_1 = 'Age';
1363
+ this.s2d_1 = 'Allow';
1364
+ this.t2d_1 = 'ALPN';
1365
+ this.u2d_1 = 'Authentication-Info';
1366
+ this.v2d_1 = 'Authorization';
1367
+ this.w2d_1 = 'Cache-Control';
1368
+ this.x2d_1 = 'Connection';
1369
+ this.y2d_1 = 'Content-Disposition';
1370
+ this.z2d_1 = 'Content-Encoding';
1371
+ this.a2e_1 = 'Content-Language';
1372
+ this.b2e_1 = 'Content-Length';
1373
+ this.c2e_1 = 'Content-Location';
1374
+ this.d2e_1 = 'Content-Range';
1375
+ this.e2e_1 = 'Content-Type';
1376
+ this.f2e_1 = 'Cookie';
1377
+ this.g2e_1 = 'DASL';
1378
+ this.h2e_1 = 'Date';
1379
+ this.i2e_1 = 'DAV';
1380
+ this.j2e_1 = 'Depth';
1381
+ this.k2e_1 = 'Destination';
1382
+ this.l2e_1 = 'ETag';
1383
+ this.m2e_1 = 'Expect';
1384
+ this.n2e_1 = 'Expires';
1385
+ this.o2e_1 = 'From';
1386
+ this.p2e_1 = 'Forwarded';
1387
+ this.q2e_1 = 'Host';
1388
+ this.r2e_1 = 'HTTP2-Settings';
1389
+ this.s2e_1 = 'If';
1390
+ this.t2e_1 = 'If-Match';
1391
+ this.u2e_1 = 'If-Modified-Since';
1392
+ this.v2e_1 = 'If-None-Match';
1393
+ this.w2e_1 = 'If-Range';
1394
+ this.x2e_1 = 'If-Schedule-Tag-Match';
1395
+ this.y2e_1 = 'If-Unmodified-Since';
1396
+ this.z2e_1 = 'Last-Modified';
1397
+ this.a2f_1 = 'Location';
1398
+ this.b2f_1 = 'Lock-Token';
1399
+ this.c2f_1 = 'Link';
1400
+ this.d2f_1 = 'Max-Forwards';
1401
+ this.e2f_1 = 'MIME-Version';
1402
+ this.f2f_1 = 'Ordering-Type';
1403
+ this.g2f_1 = 'Origin';
1404
+ this.h2f_1 = 'Overwrite';
1405
+ this.i2f_1 = 'Position';
1406
+ this.j2f_1 = 'Pragma';
1407
+ this.k2f_1 = 'Prefer';
1408
+ this.l2f_1 = 'Preference-Applied';
1409
+ this.m2f_1 = 'Proxy-Authenticate';
1410
+ this.n2f_1 = 'Proxy-Authentication-Info';
1411
+ this.o2f_1 = 'Proxy-Authorization';
1412
+ this.p2f_1 = 'Public-Key-Pins';
1413
+ this.q2f_1 = 'Public-Key-Pins-Report-Only';
1414
+ this.r2f_1 = 'Range';
1415
+ this.s2f_1 = 'Referer';
1416
+ this.t2f_1 = 'Retry-After';
1417
+ this.u2f_1 = 'Schedule-Reply';
1418
+ this.v2f_1 = 'Schedule-Tag';
1419
+ this.w2f_1 = 'Sec-WebSocket-Accept';
1420
+ this.x2f_1 = 'Sec-WebSocket-Extensions';
1421
+ this.y2f_1 = 'Sec-WebSocket-Key';
1422
+ this.z2f_1 = 'Sec-WebSocket-Protocol';
1423
+ this.a2g_1 = 'Sec-WebSocket-Version';
1424
+ this.b2g_1 = 'Server';
1425
+ this.c2g_1 = 'Set-Cookie';
1426
+ this.d2g_1 = 'SLUG';
1427
+ this.e2g_1 = 'Strict-Transport-Security';
1428
+ this.f2g_1 = 'TE';
1429
+ this.g2g_1 = 'Timeout';
1430
+ this.h2g_1 = 'Trailer';
1431
+ this.i2g_1 = 'Transfer-Encoding';
1432
+ this.j2g_1 = 'Upgrade';
1433
+ this.k2g_1 = 'User-Agent';
1434
+ this.l2g_1 = 'Vary';
1435
+ this.m2g_1 = 'Via';
1436
+ this.n2g_1 = 'Warning';
1437
+ this.o2g_1 = 'WWW-Authenticate';
1438
+ this.p2g_1 = 'Access-Control-Allow-Origin';
1439
+ this.q2g_1 = 'Access-Control-Allow-Methods';
1440
+ this.r2g_1 = 'Access-Control-Allow-Credentials';
1441
+ this.s2g_1 = 'Access-Control-Allow-Headers';
1442
+ this.t2g_1 = 'Access-Control-Request-Method';
1443
+ this.u2g_1 = 'Access-Control-Request-Headers';
1444
+ this.v2g_1 = 'Access-Control-Expose-Headers';
1445
+ this.w2g_1 = 'Access-Control-Max-Age';
1446
+ this.x2g_1 = 'X-Http-Method-Override';
1447
+ this.y2g_1 = 'X-Forwarded-Host';
1448
+ this.z2g_1 = 'X-Forwarded-Server';
1449
+ this.a2h_1 = 'X-Forwarded-Proto';
1450
+ this.b2h_1 = 'X-Forwarded-For';
1451
+ this.c2h_1 = 'X-Forwarded-Port';
1452
+ this.d2h_1 = 'X-Request-ID';
1453
+ this.e2h_1 = 'X-Correlation-ID';
1454
+ this.f2h_1 = 'X-Total-Count';
1455
+ var tmp = this;
1456
+ // Inline function 'kotlin.arrayOf' call
1457
+ // Inline function 'kotlin.js.unsafeCast' call
1458
+ // Inline function 'kotlin.js.asDynamic' call
1459
+ tmp.g2h_1 = [this.i2g_1, this.j2g_1];
1460
+ this.h2h_1 = asList(this.g2h_1);
1461
+ }
1462
+ protoOf(HttpHeaders).i2h = function (name) {
1463
+ // Inline function 'kotlin.text.forEachIndexed' call
1464
+ var index = 0;
1465
+ var inductionVariable = 0;
1466
+ while (inductionVariable < charSequenceLength(name)) {
1467
+ var item = charSequenceGet(name, inductionVariable);
1468
+ inductionVariable = inductionVariable + 1 | 0;
1469
+ // Inline function 'io.ktor.http.HttpHeaders.checkHeaderName.<anonymous>' call
1470
+ var tmp1 = index;
1471
+ index = tmp1 + 1 | 0;
1472
+ if (Char__compareTo_impl_ypi4mb(item, _Char___init__impl__6a9atx(32)) <= 0 || isDelimiter(item)) {
1473
+ throw new IllegalHeaderNameException(name, tmp1);
1474
+ }
1475
+ }
1476
+ };
1477
+ protoOf(HttpHeaders).j2h = function (value) {
1478
+ // Inline function 'kotlin.text.forEachIndexed' call
1479
+ var index = 0;
1480
+ var inductionVariable = 0;
1481
+ while (inductionVariable < charSequenceLength(value)) {
1482
+ var item = charSequenceGet(value, inductionVariable);
1483
+ inductionVariable = inductionVariable + 1 | 0;
1484
+ // Inline function 'io.ktor.http.HttpHeaders.checkHeaderValue.<anonymous>' call
1485
+ var tmp1 = index;
1486
+ index = tmp1 + 1 | 0;
1487
+ if (Char__compareTo_impl_ypi4mb(item, _Char___init__impl__6a9atx(32)) < 0 && !(item === _Char___init__impl__6a9atx(9))) {
1488
+ throw new IllegalHeaderValueException(value, tmp1);
1489
+ }
1490
+ }
1491
+ };
1492
+ var HttpHeaders_instance;
1493
+ function HttpHeaders_getInstance() {
1494
+ if (HttpHeaders_instance == null)
1495
+ new HttpHeaders();
1496
+ return HttpHeaders_instance;
1497
+ }
1498
+ function isDelimiter(ch) {
1499
+ return contains('"(),/:;<=>?@[\\]{}', ch);
1500
+ }
1501
+ function IllegalHeaderNameException(headerName, position) {
1502
+ var tmp = "Header name '" + headerName + "' contains illegal character '" + toString_0(charSequenceGet(headerName, position)) + "'";
1503
+ // Inline function 'kotlin.code' call
1504
+ var this_0 = charSequenceGet(headerName, position);
1505
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
1506
+ IllegalArgumentException_init_$Init$(tmp + (' (code ' + (tmp$ret$0 & 255) + ')'), this);
1507
+ captureStack(this, IllegalHeaderNameException);
1508
+ this.l2h_1 = headerName;
1509
+ this.m2h_1 = position;
1510
+ }
1511
+ function IllegalHeaderValueException(headerValue, position) {
1512
+ var tmp = "Header value '" + headerValue + "' contains illegal character '" + toString_0(charSequenceGet(headerValue, position)) + "'";
1513
+ // Inline function 'kotlin.code' call
1514
+ var this_0 = charSequenceGet(headerValue, position);
1515
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
1516
+ IllegalArgumentException_init_$Init$(tmp + (' (code ' + (tmp$ret$0 & 255) + ')'), this);
1517
+ captureStack(this, IllegalHeaderValueException);
1518
+ this.n2h_1 = headerValue;
1519
+ this.o2h_1 = position;
1520
+ }
1521
+ function UnsafeHeaderException(header) {
1522
+ IllegalArgumentException_init_$Init$('Header(s) ' + header + ' are controlled by the engine and ' + 'cannot be set explicitly', this);
1523
+ captureStack(this, UnsafeHeaderException);
1524
+ }
1525
+ function contentType(_this__u8e3s4) {
1526
+ var tmp0_safe_receiver = _this__u8e3s4.p2h().k26(HttpHeaders_getInstance().e2e_1);
1527
+ var tmp;
1528
+ if (tmp0_safe_receiver == null) {
1529
+ tmp = null;
1530
+ } else {
1531
+ // Inline function 'kotlin.let' call
1532
+ // Inline function 'kotlin.contracts.contract' call
1533
+ // Inline function 'io.ktor.http.contentType.<anonymous>' call
1534
+ tmp = Companion_getInstance().t2b(tmp0_safe_receiver);
1535
+ }
1536
+ return tmp;
1537
+ }
1538
+ function contentLength(_this__u8e3s4) {
1539
+ var tmp0_safe_receiver = _this__u8e3s4.p2h().k26(HttpHeaders_getInstance().b2e_1);
1540
+ return tmp0_safe_receiver == null ? null : toLong(tmp0_safe_receiver);
1541
+ }
1542
+ function charset_0(_this__u8e3s4) {
1543
+ var tmp0_safe_receiver = contentType_0(_this__u8e3s4);
1544
+ return tmp0_safe_receiver == null ? null : charset(tmp0_safe_receiver);
1545
+ }
1546
+ function contentType_0(_this__u8e3s4) {
1547
+ var tmp0_safe_receiver = _this__u8e3s4.p2h().k26(HttpHeaders_getInstance().e2e_1);
1548
+ var tmp;
1549
+ if (tmp0_safe_receiver == null) {
1550
+ tmp = null;
1551
+ } else {
1552
+ // Inline function 'kotlin.let' call
1553
+ // Inline function 'kotlin.contracts.contract' call
1554
+ // Inline function 'io.ktor.http.contentType.<anonymous>' call
1555
+ tmp = Companion_getInstance().t2b(tmp0_safe_receiver);
1556
+ }
1557
+ return tmp;
1558
+ }
1559
+ function Companion_2() {
1560
+ Companion_instance_3 = this;
1561
+ this.q2h_1 = new HttpMethod('GET');
1562
+ this.r2h_1 = new HttpMethod('POST');
1563
+ this.s2h_1 = new HttpMethod('PUT');
1564
+ this.t2h_1 = new HttpMethod('PATCH');
1565
+ this.u2h_1 = new HttpMethod('DELETE');
1566
+ this.v2h_1 = new HttpMethod('HEAD');
1567
+ this.w2h_1 = new HttpMethod('OPTIONS');
1568
+ this.x2h_1 = listOf([this.q2h_1, this.r2h_1, this.s2h_1, this.t2h_1, this.u2h_1, this.v2h_1, this.w2h_1]);
1569
+ }
1570
+ var Companion_instance_3;
1571
+ function Companion_getInstance_2() {
1572
+ if (Companion_instance_3 == null)
1573
+ new Companion_2();
1574
+ return Companion_instance_3;
1575
+ }
1576
+ function HttpMethod(value) {
1577
+ Companion_getInstance_2();
1578
+ this.y2h_1 = value;
1579
+ }
1580
+ protoOf(HttpMethod).toString = function () {
1581
+ return 'HttpMethod(value=' + this.y2h_1 + ')';
1582
+ };
1583
+ protoOf(HttpMethod).hashCode = function () {
1584
+ return getStringHashCode(this.y2h_1);
1585
+ };
1586
+ protoOf(HttpMethod).equals = function (other) {
1587
+ if (this === other)
1588
+ return true;
1589
+ if (!(other instanceof HttpMethod))
1590
+ return false;
1591
+ var tmp0_other_with_cast = other instanceof HttpMethod ? other : THROW_CCE();
1592
+ if (!(this.y2h_1 === tmp0_other_with_cast.y2h_1))
1593
+ return false;
1594
+ return true;
1595
+ };
1596
+ function Companion_3() {
1597
+ Companion_instance_4 = this;
1598
+ this.z2h_1 = new HttpProtocolVersion('HTTP', 2, 0);
1599
+ this.a2i_1 = new HttpProtocolVersion('HTTP', 1, 1);
1600
+ this.b2i_1 = new HttpProtocolVersion('HTTP', 1, 0);
1601
+ this.c2i_1 = new HttpProtocolVersion('SPDY', 3, 0);
1602
+ this.d2i_1 = new HttpProtocolVersion('QUIC', 1, 0);
1603
+ }
1604
+ var Companion_instance_4;
1605
+ function Companion_getInstance_3() {
1606
+ if (Companion_instance_4 == null)
1607
+ new Companion_3();
1608
+ return Companion_instance_4;
1609
+ }
1610
+ function HttpProtocolVersion(name, major, minor) {
1611
+ Companion_getInstance_3();
1612
+ this.e2i_1 = name;
1613
+ this.f2i_1 = major;
1614
+ this.g2i_1 = minor;
1615
+ }
1616
+ protoOf(HttpProtocolVersion).toString = function () {
1617
+ return this.e2i_1 + '/' + this.f2i_1 + '.' + this.g2i_1;
1618
+ };
1619
+ protoOf(HttpProtocolVersion).hashCode = function () {
1620
+ var result = getStringHashCode(this.e2i_1);
1621
+ result = imul(result, 31) + this.f2i_1 | 0;
1622
+ result = imul(result, 31) + this.g2i_1 | 0;
1623
+ return result;
1624
+ };
1625
+ protoOf(HttpProtocolVersion).equals = function (other) {
1626
+ if (this === other)
1627
+ return true;
1628
+ if (!(other instanceof HttpProtocolVersion))
1629
+ return false;
1630
+ var tmp0_other_with_cast = other instanceof HttpProtocolVersion ? other : THROW_CCE();
1631
+ if (!(this.e2i_1 === tmp0_other_with_cast.e2i_1))
1632
+ return false;
1633
+ if (!(this.f2i_1 === tmp0_other_with_cast.f2i_1))
1634
+ return false;
1635
+ if (!(this.g2i_1 === tmp0_other_with_cast.g2i_1))
1636
+ return false;
1637
+ return true;
1638
+ };
1639
+ function Companion_4() {
1640
+ Companion_instance_5 = this;
1641
+ this.h2i_1 = new HttpStatusCode(100, 'Continue');
1642
+ this.i2i_1 = new HttpStatusCode(101, 'Switching Protocols');
1643
+ this.j2i_1 = new HttpStatusCode(102, 'Processing');
1644
+ this.k2i_1 = new HttpStatusCode(200, 'OK');
1645
+ this.l2i_1 = new HttpStatusCode(201, 'Created');
1646
+ this.m2i_1 = new HttpStatusCode(202, 'Accepted');
1647
+ this.n2i_1 = new HttpStatusCode(203, 'Non-Authoritative Information');
1648
+ this.o2i_1 = new HttpStatusCode(204, 'No Content');
1649
+ this.p2i_1 = new HttpStatusCode(205, 'Reset Content');
1650
+ this.q2i_1 = new HttpStatusCode(206, 'Partial Content');
1651
+ this.r2i_1 = new HttpStatusCode(207, 'Multi-Status');
1652
+ this.s2i_1 = new HttpStatusCode(300, 'Multiple Choices');
1653
+ this.t2i_1 = new HttpStatusCode(301, 'Moved Permanently');
1654
+ this.u2i_1 = new HttpStatusCode(302, 'Found');
1655
+ this.v2i_1 = new HttpStatusCode(303, 'See Other');
1656
+ this.w2i_1 = new HttpStatusCode(304, 'Not Modified');
1657
+ this.x2i_1 = new HttpStatusCode(305, 'Use Proxy');
1658
+ this.y2i_1 = new HttpStatusCode(306, 'Switch Proxy');
1659
+ this.z2i_1 = new HttpStatusCode(307, 'Temporary Redirect');
1660
+ this.a2j_1 = new HttpStatusCode(308, 'Permanent Redirect');
1661
+ this.b2j_1 = new HttpStatusCode(400, 'Bad Request');
1662
+ this.c2j_1 = new HttpStatusCode(401, 'Unauthorized');
1663
+ this.d2j_1 = new HttpStatusCode(402, 'Payment Required');
1664
+ this.e2j_1 = new HttpStatusCode(403, 'Forbidden');
1665
+ this.f2j_1 = new HttpStatusCode(404, 'Not Found');
1666
+ this.g2j_1 = new HttpStatusCode(405, 'Method Not Allowed');
1667
+ this.h2j_1 = new HttpStatusCode(406, 'Not Acceptable');
1668
+ this.i2j_1 = new HttpStatusCode(407, 'Proxy Authentication Required');
1669
+ this.j2j_1 = new HttpStatusCode(408, 'Request Timeout');
1670
+ this.k2j_1 = new HttpStatusCode(409, 'Conflict');
1671
+ this.l2j_1 = new HttpStatusCode(410, 'Gone');
1672
+ this.m2j_1 = new HttpStatusCode(411, 'Length Required');
1673
+ this.n2j_1 = new HttpStatusCode(412, 'Precondition Failed');
1674
+ this.o2j_1 = new HttpStatusCode(413, 'Payload Too Large');
1675
+ this.p2j_1 = new HttpStatusCode(414, 'Request-URI Too Long');
1676
+ this.q2j_1 = new HttpStatusCode(415, 'Unsupported Media Type');
1677
+ this.r2j_1 = new HttpStatusCode(416, 'Requested Range Not Satisfiable');
1678
+ this.s2j_1 = new HttpStatusCode(417, 'Expectation Failed');
1679
+ this.t2j_1 = new HttpStatusCode(422, 'Unprocessable Entity');
1680
+ this.u2j_1 = new HttpStatusCode(423, 'Locked');
1681
+ this.v2j_1 = new HttpStatusCode(424, 'Failed Dependency');
1682
+ this.w2j_1 = new HttpStatusCode(425, 'Too Early');
1683
+ this.x2j_1 = new HttpStatusCode(426, 'Upgrade Required');
1684
+ this.y2j_1 = new HttpStatusCode(429, 'Too Many Requests');
1685
+ this.z2j_1 = new HttpStatusCode(431, 'Request Header Fields Too Large');
1686
+ this.a2k_1 = new HttpStatusCode(500, 'Internal Server Error');
1687
+ this.b2k_1 = new HttpStatusCode(501, 'Not Implemented');
1688
+ this.c2k_1 = new HttpStatusCode(502, 'Bad Gateway');
1689
+ this.d2k_1 = new HttpStatusCode(503, 'Service Unavailable');
1690
+ this.e2k_1 = new HttpStatusCode(504, 'Gateway Timeout');
1691
+ this.f2k_1 = new HttpStatusCode(505, 'HTTP Version Not Supported');
1692
+ this.g2k_1 = new HttpStatusCode(506, 'Variant Also Negotiates');
1693
+ this.h2k_1 = new HttpStatusCode(507, 'Insufficient Storage');
1694
+ this.i2k_1 = allStatusCodes();
1695
+ var tmp = this;
1696
+ // Inline function 'kotlin.collections.associateBy' call
1697
+ var this_0 = this.i2k_1;
1698
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
1699
+ // Inline function 'kotlin.collections.associateByTo' call
1700
+ var destination = LinkedHashMap_init_$Create$(capacity);
1701
+ var tmp0_iterator = this_0.j();
1702
+ while (tmp0_iterator.k()) {
1703
+ var element = tmp0_iterator.l();
1704
+ // Inline function 'io.ktor.http.Companion.statusCodesMap.<anonymous>' call
1705
+ var tmp$ret$0 = element.k2k_1;
1706
+ destination.k2(tmp$ret$0, element);
1707
+ }
1708
+ tmp.j2k_1 = destination;
1709
+ }
1710
+ var Companion_instance_5;
1711
+ function Companion_getInstance_4() {
1712
+ if (Companion_instance_5 == null)
1713
+ new Companion_4();
1714
+ return Companion_instance_5;
1715
+ }
1716
+ function HttpStatusCode(value, description) {
1717
+ Companion_getInstance_4();
1718
+ this.k2k_1 = value;
1719
+ this.l2k_1 = description;
1720
+ }
1721
+ protoOf(HttpStatusCode).toString = function () {
1722
+ return '' + this.k2k_1 + ' ' + this.l2k_1;
1723
+ };
1724
+ protoOf(HttpStatusCode).equals = function (other) {
1725
+ var tmp;
1726
+ if (other instanceof HttpStatusCode) {
1727
+ tmp = other.k2k_1 === this.k2k_1;
1728
+ } else {
1729
+ tmp = false;
1730
+ }
1731
+ return tmp;
1732
+ };
1733
+ protoOf(HttpStatusCode).hashCode = function () {
1734
+ return this.k2k_1;
1735
+ };
1736
+ protoOf(HttpStatusCode).m2k = function (other) {
1737
+ return this.k2k_1 - other.k2k_1 | 0;
1738
+ };
1739
+ protoOf(HttpStatusCode).d = function (other) {
1740
+ return this.m2k(other instanceof HttpStatusCode ? other : THROW_CCE());
1741
+ };
1742
+ function allStatusCodes() {
1743
+ return listOf([Companion_getInstance_4().h2i_1, Companion_getInstance_4().i2i_1, Companion_getInstance_4().j2i_1, Companion_getInstance_4().k2i_1, Companion_getInstance_4().l2i_1, Companion_getInstance_4().m2i_1, Companion_getInstance_4().n2i_1, Companion_getInstance_4().o2i_1, Companion_getInstance_4().p2i_1, Companion_getInstance_4().q2i_1, Companion_getInstance_4().r2i_1, Companion_getInstance_4().s2i_1, Companion_getInstance_4().t2i_1, Companion_getInstance_4().u2i_1, Companion_getInstance_4().v2i_1, Companion_getInstance_4().w2i_1, Companion_getInstance_4().x2i_1, Companion_getInstance_4().y2i_1, Companion_getInstance_4().z2i_1, Companion_getInstance_4().a2j_1, Companion_getInstance_4().b2j_1, Companion_getInstance_4().c2j_1, Companion_getInstance_4().d2j_1, Companion_getInstance_4().e2j_1, Companion_getInstance_4().f2j_1, Companion_getInstance_4().g2j_1, Companion_getInstance_4().h2j_1, Companion_getInstance_4().i2j_1, Companion_getInstance_4().j2j_1, Companion_getInstance_4().k2j_1, Companion_getInstance_4().l2j_1, Companion_getInstance_4().m2j_1, Companion_getInstance_4().n2j_1, Companion_getInstance_4().o2j_1, Companion_getInstance_4().p2j_1, Companion_getInstance_4().q2j_1, Companion_getInstance_4().r2j_1, Companion_getInstance_4().s2j_1, Companion_getInstance_4().t2j_1, Companion_getInstance_4().u2j_1, Companion_getInstance_4().v2j_1, Companion_getInstance_4().w2j_1, Companion_getInstance_4().x2j_1, Companion_getInstance_4().y2j_1, Companion_getInstance_4().z2j_1, Companion_getInstance_4().a2k_1, Companion_getInstance_4().b2k_1, Companion_getInstance_4().c2k_1, Companion_getInstance_4().d2k_1, Companion_getInstance_4().e2k_1, Companion_getInstance_4().f2k_1, Companion_getInstance_4().g2k_1, Companion_getInstance_4().h2k_1]);
1744
+ }
1745
+ function Companion_5() {
1746
+ Companion_instance_6 = this;
1747
+ this.n2k_1 = EmptyParameters_instance;
1748
+ }
1749
+ var Companion_instance_6;
1750
+ function Companion_getInstance_5() {
1751
+ if (Companion_instance_6 == null)
1752
+ new Companion_5();
1753
+ return Companion_instance_6;
1754
+ }
1755
+ function Parameters() {
1756
+ }
1757
+ function ParametersBuilder(size) {
1758
+ size = size === VOID ? 8 : size;
1759
+ return new ParametersBuilderImpl(size);
1760
+ }
1761
+ function EmptyParameters() {
1762
+ }
1763
+ protoOf(EmptyParameters).l27 = function () {
1764
+ return true;
1765
+ };
1766
+ protoOf(EmptyParameters).m27 = function (name) {
1767
+ return null;
1768
+ };
1769
+ protoOf(EmptyParameters).n27 = function () {
1770
+ return emptySet();
1771
+ };
1772
+ protoOf(EmptyParameters).o27 = function () {
1773
+ return emptySet();
1774
+ };
1775
+ protoOf(EmptyParameters).p = function () {
1776
+ return true;
1777
+ };
1778
+ protoOf(EmptyParameters).toString = function () {
1779
+ return 'Parameters ' + toString(this.o27());
1780
+ };
1781
+ protoOf(EmptyParameters).equals = function (other) {
1782
+ var tmp;
1783
+ if (!(other == null) ? isInterface(other, Parameters) : false) {
1784
+ tmp = other.p();
1785
+ } else {
1786
+ tmp = false;
1787
+ }
1788
+ return tmp;
1789
+ };
1790
+ var EmptyParameters_instance;
1791
+ function EmptyParameters_getInstance() {
1792
+ return EmptyParameters_instance;
1793
+ }
1794
+ function ParametersBuilderImpl(size) {
1795
+ size = size === VOID ? 8 : size;
1796
+ StringValuesBuilderImpl.call(this, true, size);
1797
+ }
1798
+ protoOf(ParametersBuilderImpl).l1s = function () {
1799
+ return new ParametersImpl(this.r27_1);
1800
+ };
1801
+ function ParametersImpl(values) {
1802
+ values = values === VOID ? emptyMap() : values;
1803
+ StringValuesImpl.call(this, true, values);
1804
+ }
1805
+ protoOf(ParametersImpl).toString = function () {
1806
+ return 'Parameters ' + toString(this.o27());
1807
+ };
1808
+ function parseQueryString(query, startIndex, limit, decode) {
1809
+ startIndex = startIndex === VOID ? 0 : startIndex;
1810
+ limit = limit === VOID ? 1000 : limit;
1811
+ decode = decode === VOID ? true : decode;
1812
+ var tmp;
1813
+ if (startIndex > get_lastIndex_0(query)) {
1814
+ tmp = Companion_getInstance_5().n2k_1;
1815
+ } else {
1816
+ // Inline function 'io.ktor.http.Companion.build' call
1817
+ Companion_getInstance_5();
1818
+ // Inline function 'kotlin.apply' call
1819
+ var this_0 = ParametersBuilder();
1820
+ // Inline function 'kotlin.contracts.contract' call
1821
+ // Inline function 'io.ktor.http.parseQueryString.<anonymous>' call
1822
+ parse(this_0, query, startIndex, limit, decode);
1823
+ tmp = this_0.l1s();
1824
+ }
1825
+ return tmp;
1826
+ }
1827
+ function parse(_this__u8e3s4, query, startIndex, limit, decode) {
1828
+ var count = 0;
1829
+ var nameIndex = startIndex;
1830
+ var equalIndex = -1;
1831
+ var inductionVariable = startIndex;
1832
+ var last = get_lastIndex_0(query);
1833
+ if (inductionVariable <= last)
1834
+ do {
1835
+ var index = inductionVariable;
1836
+ inductionVariable = inductionVariable + 1 | 0;
1837
+ if (count === limit) {
1838
+ return Unit_instance;
1839
+ }
1840
+ var tmp1_subject = charSequenceGet(query, index);
1841
+ if (tmp1_subject === _Char___init__impl__6a9atx(38)) {
1842
+ appendParam(_this__u8e3s4, query, nameIndex, equalIndex, index, decode);
1843
+ nameIndex = index + 1 | 0;
1844
+ equalIndex = -1;
1845
+ count = count + 1 | 0;
1846
+ } else if (tmp1_subject === _Char___init__impl__6a9atx(61)) {
1847
+ if (equalIndex === -1) {
1848
+ equalIndex = index;
1849
+ }
1850
+ }
1851
+ }
1852
+ while (!(index === last));
1853
+ if (count === limit) {
1854
+ return Unit_instance;
1855
+ }
1856
+ appendParam(_this__u8e3s4, query, nameIndex, equalIndex, query.length, decode);
1857
+ }
1858
+ function appendParam(_this__u8e3s4, query, nameIndex, equalIndex, endIndex, decode) {
1859
+ if (equalIndex === -1) {
1860
+ var spaceNameIndex = trimStart(nameIndex, endIndex, query);
1861
+ var spaceEndIndex = trimEnd(spaceNameIndex, endIndex, query);
1862
+ if (spaceEndIndex > spaceNameIndex) {
1863
+ var tmp;
1864
+ if (decode) {
1865
+ tmp = decodeURLQueryComponent(query, spaceNameIndex, spaceEndIndex);
1866
+ } else {
1867
+ // Inline function 'kotlin.text.substring' call
1868
+ // Inline function 'kotlin.js.asDynamic' call
1869
+ tmp = query.substring(spaceNameIndex, spaceEndIndex);
1870
+ }
1871
+ var name = tmp;
1872
+ _this__u8e3s4.t27(name, emptyList());
1873
+ }
1874
+ return Unit_instance;
1875
+ }
1876
+ var spaceNameIndex_0 = trimStart(nameIndex, equalIndex, query);
1877
+ var spaceEqualIndex = trimEnd(spaceNameIndex_0, equalIndex, query);
1878
+ if (spaceEqualIndex > spaceNameIndex_0) {
1879
+ var tmp_0;
1880
+ if (decode) {
1881
+ tmp_0 = decodeURLQueryComponent(query, spaceNameIndex_0, spaceEqualIndex);
1882
+ } else {
1883
+ // Inline function 'kotlin.text.substring' call
1884
+ // Inline function 'kotlin.js.asDynamic' call
1885
+ tmp_0 = query.substring(spaceNameIndex_0, spaceEqualIndex);
1886
+ }
1887
+ var name_0 = tmp_0;
1888
+ var spaceValueIndex = trimStart(equalIndex + 1 | 0, endIndex, query);
1889
+ var spaceEndIndex_0 = trimEnd(spaceValueIndex, endIndex, query);
1890
+ var tmp_1;
1891
+ if (decode) {
1892
+ tmp_1 = decodeURLQueryComponent(query, spaceValueIndex, spaceEndIndex_0, true);
1893
+ } else {
1894
+ // Inline function 'kotlin.text.substring' call
1895
+ // Inline function 'kotlin.js.asDynamic' call
1896
+ tmp_1 = query.substring(spaceValueIndex, spaceEndIndex_0);
1897
+ }
1898
+ var value = tmp_1;
1899
+ _this__u8e3s4.y27(name_0, value);
1900
+ }
1901
+ }
1902
+ function trimStart(start, end, query) {
1903
+ var spaceIndex = start;
1904
+ while (spaceIndex < end && isWhitespace(charSequenceGet(query, spaceIndex))) {
1905
+ spaceIndex = spaceIndex + 1 | 0;
1906
+ }
1907
+ return spaceIndex;
1908
+ }
1909
+ function trimEnd(start, end, text) {
1910
+ var spaceIndex = end;
1911
+ while (spaceIndex > start && isWhitespace(charSequenceGet(text, spaceIndex - 1 | 0))) {
1912
+ spaceIndex = spaceIndex - 1 | 0;
1913
+ }
1914
+ return spaceIndex;
1915
+ }
1916
+ function applyOrigin($this) {
1917
+ var tmp;
1918
+ // Inline function 'kotlin.text.isNotEmpty' call
1919
+ var this_0 = $this.r2k_1;
1920
+ if (charSequenceLength(this_0) > 0) {
1921
+ tmp = true;
1922
+ } else {
1923
+ tmp = $this.q2k_1.a2l_1 === 'file';
1924
+ }
1925
+ if (tmp)
1926
+ return Unit_instance;
1927
+ $this.r2k_1 = Companion_getInstance_6().s2l_1.d2l_1;
1928
+ if ($this.q2k_1.equals(Companion_getInstance_7().t2l_1))
1929
+ $this.q2k_1 = Companion_getInstance_6().s2l_1.c2l_1;
1930
+ if ($this.s2k_1 === 0)
1931
+ $this.s2k_1 = Companion_getInstance_6().s2l_1.e2l_1;
1932
+ }
1933
+ function Companion_6() {
1934
+ Companion_instance_7 = this;
1935
+ this.s2l_1 = Url(get_origin(this));
1936
+ }
1937
+ var Companion_instance_7;
1938
+ function Companion_getInstance_6() {
1939
+ if (Companion_instance_7 == null)
1940
+ new Companion_6();
1941
+ return Companion_instance_7;
1942
+ }
1943
+ function URLBuilder(protocol, host, port, user, password, pathSegments, parameters, fragment, trailingQuery) {
1944
+ Companion_getInstance_6();
1945
+ protocol = protocol === VOID ? Companion_getInstance_7().t2l_1 : protocol;
1946
+ host = host === VOID ? '' : host;
1947
+ port = port === VOID ? 0 : port;
1948
+ user = user === VOID ? null : user;
1949
+ password = password === VOID ? null : password;
1950
+ pathSegments = pathSegments === VOID ? emptyList() : pathSegments;
1951
+ parameters = parameters === VOID ? Companion_getInstance_5().n2k_1 : parameters;
1952
+ fragment = fragment === VOID ? '' : fragment;
1953
+ trailingQuery = trailingQuery === VOID ? false : trailingQuery;
1954
+ this.q2k_1 = protocol;
1955
+ this.r2k_1 = host;
1956
+ this.s2k_1 = port;
1957
+ this.t2k_1 = trailingQuery;
1958
+ var tmp = this;
1959
+ tmp.u2k_1 = user == null ? null : encodeURLParameter(user);
1960
+ var tmp_0 = this;
1961
+ tmp_0.v2k_1 = password == null ? null : encodeURLParameter(password);
1962
+ this.w2k_1 = encodeURLQueryComponent(fragment);
1963
+ var tmp_1 = this;
1964
+ // Inline function 'kotlin.collections.map' call
1965
+ // Inline function 'kotlin.collections.mapTo' call
1966
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(pathSegments, 10));
1967
+ var tmp0_iterator = pathSegments.j();
1968
+ while (tmp0_iterator.k()) {
1969
+ var item = tmp0_iterator.l();
1970
+ // Inline function 'io.ktor.http.URLBuilder.encodedPathSegments.<anonymous>' call
1971
+ var tmp$ret$0 = encodeURLPathPart(item);
1972
+ destination.e(tmp$ret$0);
1973
+ }
1974
+ tmp_1.x2k_1 = destination;
1975
+ this.y2k_1 = encodeParameters(parameters);
1976
+ this.z2k_1 = new UrlDecodedParametersBuilder(this.y2k_1);
1977
+ }
1978
+ protoOf(URLBuilder).z2l = function (value) {
1979
+ var tmp = this;
1980
+ tmp.u2k_1 = value == null ? null : encodeURLParameter(value);
1981
+ };
1982
+ protoOf(URLBuilder).a2m = function () {
1983
+ var tmp0_safe_receiver = this.u2k_1;
1984
+ return tmp0_safe_receiver == null ? null : decodeURLPart(tmp0_safe_receiver);
1985
+ };
1986
+ protoOf(URLBuilder).b2m = function () {
1987
+ var tmp0_safe_receiver = this.v2k_1;
1988
+ return tmp0_safe_receiver == null ? null : decodeURLPart(tmp0_safe_receiver);
1989
+ };
1990
+ protoOf(URLBuilder).c2m = function () {
1991
+ return decodeURLQueryComponent(this.w2k_1);
1992
+ };
1993
+ protoOf(URLBuilder).d2m = function () {
1994
+ // Inline function 'kotlin.collections.map' call
1995
+ var this_0 = this.x2k_1;
1996
+ // Inline function 'kotlin.collections.mapTo' call
1997
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1998
+ var tmp0_iterator = this_0.j();
1999
+ while (tmp0_iterator.k()) {
2000
+ var item = tmp0_iterator.l();
2001
+ // Inline function 'io.ktor.http.URLBuilder.<get-pathSegments>.<anonymous>' call
2002
+ var tmp$ret$0 = decodeURLPart(item);
2003
+ destination.e(tmp$ret$0);
2004
+ }
2005
+ return destination;
2006
+ };
2007
+ protoOf(URLBuilder).e2m = function (value) {
2008
+ this.y2k_1 = value;
2009
+ this.z2k_1 = new UrlDecodedParametersBuilder(value);
2010
+ };
2011
+ protoOf(URLBuilder).f2m = function () {
2012
+ applyOrigin(this);
2013
+ return appendTo(this, StringBuilder_init_$Create$_0(256)).toString();
2014
+ };
2015
+ protoOf(URLBuilder).toString = function () {
2016
+ return appendTo(this, StringBuilder_init_$Create$_0(256)).toString();
2017
+ };
2018
+ protoOf(URLBuilder).l1s = function () {
2019
+ applyOrigin(this);
2020
+ return new Url_1(this.q2k_1, this.r2k_1, this.s2k_1, this.d2m(), this.z2k_1.l1s(), this.c2m(), this.a2m(), this.b2m(), this.t2k_1, this.f2m());
2021
+ };
2022
+ function get_authority(_this__u8e3s4) {
2023
+ // Inline function 'kotlin.text.buildString' call
2024
+ // Inline function 'kotlin.contracts.contract' call
2025
+ // Inline function 'kotlin.apply' call
2026
+ var this_0 = StringBuilder_init_$Create$();
2027
+ // Inline function 'kotlin.contracts.contract' call
2028
+ // Inline function 'io.ktor.http.<get-authority>.<anonymous>' call
2029
+ this_0.i8(get_encodedUserAndPassword(_this__u8e3s4));
2030
+ this_0.i8(_this__u8e3s4.r2k_1);
2031
+ if (!(_this__u8e3s4.s2k_1 === 0) && !(_this__u8e3s4.s2k_1 === _this__u8e3s4.q2k_1.b2l_1)) {
2032
+ this_0.i8(':');
2033
+ this_0.i8(_this__u8e3s4.s2k_1.toString());
2034
+ }
2035
+ return this_0.toString();
2036
+ }
2037
+ function appendTo(_this__u8e3s4, out) {
2038
+ out.f(_this__u8e3s4.q2k_1.a2l_1);
2039
+ var tmp0_subject = _this__u8e3s4.q2k_1.a2l_1;
2040
+ if (tmp0_subject === 'file') {
2041
+ appendFile(out, _this__u8e3s4.r2k_1, get_encodedPath(_this__u8e3s4));
2042
+ return out;
2043
+ } else if (tmp0_subject === 'mailto') {
2044
+ appendMailto(out, get_encodedUserAndPassword(_this__u8e3s4), _this__u8e3s4.r2k_1);
2045
+ return out;
2046
+ }
2047
+ out.f('://');
2048
+ out.f(get_authority(_this__u8e3s4));
2049
+ appendUrlFullPath(out, get_encodedPath(_this__u8e3s4), _this__u8e3s4.y2k_1, _this__u8e3s4.t2k_1);
2050
+ // Inline function 'kotlin.text.isNotEmpty' call
2051
+ var this_0 = _this__u8e3s4.w2k_1;
2052
+ if (charSequenceLength(this_0) > 0) {
2053
+ out.j8(_Char___init__impl__6a9atx(35));
2054
+ out.f(_this__u8e3s4.w2k_1);
2055
+ }
2056
+ return out;
2057
+ }
2058
+ function get_encodedUserAndPassword(_this__u8e3s4) {
2059
+ // Inline function 'kotlin.text.buildString' call
2060
+ // Inline function 'kotlin.contracts.contract' call
2061
+ // Inline function 'kotlin.apply' call
2062
+ var this_0 = StringBuilder_init_$Create$();
2063
+ // Inline function 'kotlin.contracts.contract' call
2064
+ // Inline function 'io.ktor.http.<get-encodedUserAndPassword>.<anonymous>' call
2065
+ appendUserAndPassword(this_0, _this__u8e3s4.u2k_1, _this__u8e3s4.v2k_1);
2066
+ return this_0.toString();
2067
+ }
2068
+ function appendFile(_this__u8e3s4, host, encodedPath) {
2069
+ _this__u8e3s4.f('://');
2070
+ _this__u8e3s4.f(host);
2071
+ if (!startsWith(encodedPath, _Char___init__impl__6a9atx(47))) {
2072
+ _this__u8e3s4.j8(_Char___init__impl__6a9atx(47));
2073
+ }
2074
+ _this__u8e3s4.f(encodedPath);
2075
+ }
2076
+ function set_encodedPath(_this__u8e3s4, value) {
2077
+ _this__u8e3s4.x2k_1 = isBlank(value) ? emptyList() : value === '/' ? get_ROOT_PATH() : toMutableList(split(value, charArrayOf([_Char___init__impl__6a9atx(47)])));
2078
+ }
2079
+ function get_encodedPath(_this__u8e3s4) {
2080
+ return joinPath(_this__u8e3s4.x2k_1);
2081
+ }
2082
+ function appendMailto(_this__u8e3s4, encodedUser, host) {
2083
+ _this__u8e3s4.f(':');
2084
+ _this__u8e3s4.f(encodedUser);
2085
+ _this__u8e3s4.f(host);
2086
+ }
2087
+ function joinPath(_this__u8e3s4) {
2088
+ if (_this__u8e3s4.p())
2089
+ return '';
2090
+ if (_this__u8e3s4.m() === 1) {
2091
+ // Inline function 'kotlin.text.isEmpty' call
2092
+ var this_0 = first_0(_this__u8e3s4);
2093
+ if (charSequenceLength(this_0) === 0)
2094
+ return '/';
2095
+ return first_0(_this__u8e3s4);
2096
+ }
2097
+ return joinToString(_this__u8e3s4, '/');
2098
+ }
2099
+ function get_ROOT_PATH() {
2100
+ _init_properties_URLParser_kt__sf11to();
2101
+ return ROOT_PATH;
2102
+ }
2103
+ var ROOT_PATH;
2104
+ function takeFrom(_this__u8e3s4, urlString) {
2105
+ _init_properties_URLParser_kt__sf11to();
2106
+ if (isBlank(urlString))
2107
+ return _this__u8e3s4;
2108
+ var tmp;
2109
+ try {
2110
+ tmp = takeFromUnsafe(_this__u8e3s4, urlString);
2111
+ } catch ($p) {
2112
+ var tmp_0;
2113
+ if ($p instanceof Error) {
2114
+ var cause = $p;
2115
+ throw new URLParserException(urlString, cause);
2116
+ } else {
2117
+ throw $p;
2118
+ }
2119
+ }
2120
+ return tmp;
2121
+ }
2122
+ function takeFromUnsafe(_this__u8e3s4, urlString) {
2123
+ _init_properties_URLParser_kt__sf11to();
2124
+ var tmp$ret$1;
2125
+ $l$block: {
2126
+ // Inline function 'kotlin.text.indexOfFirst' call
2127
+ var inductionVariable = 0;
2128
+ var last = charSequenceLength(urlString) - 1 | 0;
2129
+ if (inductionVariable <= last)
2130
+ do {
2131
+ var index = inductionVariable;
2132
+ inductionVariable = inductionVariable + 1 | 0;
2133
+ // Inline function 'io.ktor.http.takeFromUnsafe.<anonymous>' call
2134
+ var it = charSequenceGet(urlString, index);
2135
+ if (!isWhitespace(it)) {
2136
+ tmp$ret$1 = index;
2137
+ break $l$block;
2138
+ }
2139
+ }
2140
+ while (inductionVariable <= last);
2141
+ tmp$ret$1 = -1;
2142
+ }
2143
+ var startIndex = tmp$ret$1;
2144
+ var tmp$ret$3;
2145
+ $l$block_0: {
2146
+ // Inline function 'kotlin.text.indexOfLast' call
2147
+ var inductionVariable_0 = charSequenceLength(urlString) - 1 | 0;
2148
+ if (0 <= inductionVariable_0)
2149
+ do {
2150
+ var index_0 = inductionVariable_0;
2151
+ inductionVariable_0 = inductionVariable_0 + -1 | 0;
2152
+ // Inline function 'io.ktor.http.takeFromUnsafe.<anonymous>' call
2153
+ var it_0 = charSequenceGet(urlString, index_0);
2154
+ if (!isWhitespace(it_0)) {
2155
+ tmp$ret$3 = index_0;
2156
+ break $l$block_0;
2157
+ }
2158
+ }
2159
+ while (0 <= inductionVariable_0);
2160
+ tmp$ret$3 = -1;
2161
+ }
2162
+ var endIndex = tmp$ret$3 + 1 | 0;
2163
+ var schemeLength = findScheme(urlString, startIndex, endIndex);
2164
+ if (schemeLength > 0) {
2165
+ // Inline function 'kotlin.text.substring' call
2166
+ var startIndex_0 = startIndex;
2167
+ var endIndex_0 = startIndex + schemeLength | 0;
2168
+ // Inline function 'kotlin.js.asDynamic' call
2169
+ var scheme = urlString.substring(startIndex_0, endIndex_0);
2170
+ _this__u8e3s4.q2k_1 = Companion_getInstance_7().g2m(scheme);
2171
+ startIndex = startIndex + (schemeLength + 1 | 0) | 0;
2172
+ }
2173
+ var slashCount = count(urlString, startIndex, endIndex, _Char___init__impl__6a9atx(47));
2174
+ startIndex = startIndex + slashCount | 0;
2175
+ if (_this__u8e3s4.q2k_1.a2l_1 === 'file') {
2176
+ parseFile(_this__u8e3s4, urlString, startIndex, endIndex, slashCount);
2177
+ return _this__u8e3s4;
2178
+ }
2179
+ if (_this__u8e3s4.q2k_1.a2l_1 === 'mailto') {
2180
+ // Inline function 'kotlin.require' call
2181
+ // Inline function 'kotlin.contracts.contract' call
2182
+ // Inline function 'kotlin.require' call
2183
+ // Inline function 'kotlin.contracts.contract' call
2184
+ if (!(slashCount === 0)) {
2185
+ // Inline function 'kotlin.require.<anonymous>' call
2186
+ var message = 'Failed requirement.';
2187
+ throw IllegalArgumentException_init_$Create$(toString(message));
2188
+ }
2189
+ parseMailto(_this__u8e3s4, urlString, startIndex, endIndex);
2190
+ return _this__u8e3s4;
2191
+ }
2192
+ if (slashCount >= 2) {
2193
+ loop: while (true) {
2194
+ // Inline function 'kotlin.takeIf' call
2195
+ var this_0 = indexOfAny(urlString, toCharArray('@/\\?#'), startIndex);
2196
+ // Inline function 'kotlin.contracts.contract' call
2197
+ var tmp;
2198
+ // Inline function 'io.ktor.http.takeFromUnsafe.<anonymous>' call
2199
+ if (this_0 > 0) {
2200
+ tmp = this_0;
2201
+ } else {
2202
+ tmp = null;
2203
+ }
2204
+ var tmp0_elvis_lhs = tmp;
2205
+ var delimiter = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
2206
+ if (delimiter < endIndex && charSequenceGet(urlString, delimiter) === _Char___init__impl__6a9atx(64)) {
2207
+ var passwordIndex = indexOfColonInHostPort(urlString, startIndex, delimiter);
2208
+ if (!(passwordIndex === -1)) {
2209
+ var tmp_0 = _this__u8e3s4;
2210
+ // Inline function 'kotlin.text.substring' call
2211
+ var startIndex_1 = startIndex;
2212
+ // Inline function 'kotlin.js.asDynamic' call
2213
+ tmp_0.u2k_1 = urlString.substring(startIndex_1, passwordIndex);
2214
+ var tmp_1 = _this__u8e3s4;
2215
+ // Inline function 'kotlin.text.substring' call
2216
+ var startIndex_2 = passwordIndex + 1 | 0;
2217
+ // Inline function 'kotlin.js.asDynamic' call
2218
+ tmp_1.v2k_1 = urlString.substring(startIndex_2, delimiter);
2219
+ } else {
2220
+ var tmp_2 = _this__u8e3s4;
2221
+ // Inline function 'kotlin.text.substring' call
2222
+ var startIndex_3 = startIndex;
2223
+ // Inline function 'kotlin.js.asDynamic' call
2224
+ tmp_2.u2k_1 = urlString.substring(startIndex_3, delimiter);
2225
+ }
2226
+ startIndex = delimiter + 1 | 0;
2227
+ } else {
2228
+ fillHost(_this__u8e3s4, urlString, startIndex, delimiter);
2229
+ startIndex = delimiter;
2230
+ break loop;
2231
+ }
2232
+ }
2233
+ }
2234
+ if (startIndex >= endIndex) {
2235
+ _this__u8e3s4.x2k_1 = charSequenceGet(urlString, endIndex - 1 | 0) === _Char___init__impl__6a9atx(47) ? get_ROOT_PATH() : emptyList();
2236
+ return _this__u8e3s4;
2237
+ }
2238
+ var tmp_3 = _this__u8e3s4;
2239
+ var tmp_4;
2240
+ if (slashCount === 0) {
2241
+ tmp_4 = dropLast(_this__u8e3s4.x2k_1, 1);
2242
+ } else {
2243
+ tmp_4 = emptyList();
2244
+ }
2245
+ tmp_3.x2k_1 = tmp_4;
2246
+ // Inline function 'kotlin.takeIf' call
2247
+ var this_1 = indexOfAny(urlString, toCharArray('?#'), startIndex);
2248
+ // Inline function 'kotlin.contracts.contract' call
2249
+ var tmp_5;
2250
+ // Inline function 'io.ktor.http.takeFromUnsafe.<anonymous>' call
2251
+ if (this_1 > 0) {
2252
+ tmp_5 = this_1;
2253
+ } else {
2254
+ tmp_5 = null;
2255
+ }
2256
+ var tmp1_elvis_lhs = tmp_5;
2257
+ var pathEnd = tmp1_elvis_lhs == null ? endIndex : tmp1_elvis_lhs;
2258
+ if (pathEnd > startIndex) {
2259
+ // Inline function 'kotlin.text.substring' call
2260
+ var startIndex_4 = startIndex;
2261
+ // Inline function 'kotlin.js.asDynamic' call
2262
+ var rawPath = urlString.substring(startIndex_4, pathEnd);
2263
+ var tmp_6;
2264
+ var tmp_7;
2265
+ if (_this__u8e3s4.x2k_1.m() === 1) {
2266
+ // Inline function 'kotlin.text.isEmpty' call
2267
+ var this_2 = first_0(_this__u8e3s4.x2k_1);
2268
+ tmp_7 = charSequenceLength(this_2) === 0;
2269
+ } else {
2270
+ tmp_7 = false;
2271
+ }
2272
+ if (tmp_7) {
2273
+ tmp_6 = emptyList();
2274
+ } else {
2275
+ tmp_6 = _this__u8e3s4.x2k_1;
2276
+ }
2277
+ var basePath = tmp_6;
2278
+ var rawChunks = rawPath === '/' ? get_ROOT_PATH() : split(rawPath, charArrayOf([_Char___init__impl__6a9atx(47)]));
2279
+ var relativePath = plus_0(slashCount === 1 ? get_ROOT_PATH() : emptyList(), rawChunks);
2280
+ _this__u8e3s4.x2k_1 = plus_0(basePath, relativePath);
2281
+ startIndex = pathEnd;
2282
+ }
2283
+ if (startIndex < endIndex && charSequenceGet(urlString, startIndex) === _Char___init__impl__6a9atx(63)) {
2284
+ startIndex = parseQuery(_this__u8e3s4, urlString, startIndex, endIndex);
2285
+ }
2286
+ parseFragment(_this__u8e3s4, urlString, startIndex, endIndex);
2287
+ return _this__u8e3s4;
2288
+ }
2289
+ function URLParserException(urlString, cause) {
2290
+ IllegalStateException_init_$Init$('Fail to parse url: ' + urlString, cause, this);
2291
+ captureStack(this, URLParserException);
2292
+ }
2293
+ function findScheme(urlString, startIndex, endIndex) {
2294
+ _init_properties_URLParser_kt__sf11to();
2295
+ var current = startIndex;
2296
+ var incorrectSchemePosition = -1;
2297
+ var firstChar = charSequenceGet(urlString, current);
2298
+ if (!(_Char___init__impl__6a9atx(97) <= firstChar ? firstChar <= _Char___init__impl__6a9atx(122) : false) && !(_Char___init__impl__6a9atx(65) <= firstChar ? firstChar <= _Char___init__impl__6a9atx(90) : false)) {
2299
+ incorrectSchemePosition = current;
2300
+ }
2301
+ while (current < endIndex) {
2302
+ var char = charSequenceGet(urlString, current);
2303
+ if (char === _Char___init__impl__6a9atx(58)) {
2304
+ if (!(incorrectSchemePosition === -1)) {
2305
+ throw IllegalArgumentException_init_$Create$('Illegal character in scheme at position ' + incorrectSchemePosition);
2306
+ }
2307
+ return current - startIndex | 0;
2308
+ }
2309
+ if (char === _Char___init__impl__6a9atx(47) || char === _Char___init__impl__6a9atx(63) || char === _Char___init__impl__6a9atx(35))
2310
+ return -1;
2311
+ if (incorrectSchemePosition === -1 && !(_Char___init__impl__6a9atx(97) <= char ? char <= _Char___init__impl__6a9atx(122) : false) && !(_Char___init__impl__6a9atx(65) <= char ? char <= _Char___init__impl__6a9atx(90) : false) && !(_Char___init__impl__6a9atx(48) <= char ? char <= _Char___init__impl__6a9atx(57) : false) && !(char === _Char___init__impl__6a9atx(46)) && !(char === _Char___init__impl__6a9atx(43)) && !(char === _Char___init__impl__6a9atx(45))) {
2312
+ incorrectSchemePosition = current;
2313
+ }
2314
+ current = current + 1 | 0;
2315
+ }
2316
+ return -1;
2317
+ }
2318
+ function count(urlString, startIndex, endIndex, char) {
2319
+ _init_properties_URLParser_kt__sf11to();
2320
+ var result = 0;
2321
+ $l$loop: while ((startIndex + result | 0) < endIndex && charSequenceGet(urlString, startIndex + result | 0) === char) {
2322
+ result = result + 1 | 0;
2323
+ }
2324
+ return result;
2325
+ }
2326
+ function parseFile(_this__u8e3s4, urlString, startIndex, endIndex, slashCount) {
2327
+ _init_properties_URLParser_kt__sf11to();
2328
+ switch (slashCount) {
2329
+ case 2:
2330
+ var nextSlash = indexOf(urlString, _Char___init__impl__6a9atx(47), startIndex);
2331
+ if (nextSlash === -1 || nextSlash === endIndex) {
2332
+ var tmp = _this__u8e3s4;
2333
+ // Inline function 'kotlin.text.substring' call
2334
+ // Inline function 'kotlin.js.asDynamic' call
2335
+ tmp.r2k_1 = urlString.substring(startIndex, endIndex);
2336
+ return Unit_instance;
2337
+ }
2338
+
2339
+ var tmp_0 = _this__u8e3s4;
2340
+ // Inline function 'kotlin.text.substring' call
2341
+
2342
+ // Inline function 'kotlin.js.asDynamic' call
2343
+
2344
+ tmp_0.r2k_1 = urlString.substring(startIndex, nextSlash);
2345
+ // Inline function 'kotlin.text.substring' call
2346
+
2347
+ // Inline function 'kotlin.js.asDynamic' call
2348
+
2349
+ var tmp$ret$5 = urlString.substring(nextSlash, endIndex);
2350
+ set_encodedPath(_this__u8e3s4, tmp$ret$5);
2351
+ break;
2352
+ case 3:
2353
+ _this__u8e3s4.r2k_1 = '';
2354
+ // Inline function 'kotlin.text.substring' call
2355
+
2356
+ // Inline function 'kotlin.js.asDynamic' call
2357
+
2358
+ var tmp$ret$7 = urlString.substring(startIndex, endIndex);
2359
+ set_encodedPath(_this__u8e3s4, '/' + tmp$ret$7);
2360
+ break;
2361
+ default:
2362
+ throw IllegalArgumentException_init_$Create$('Invalid file url: ' + urlString);
2363
+ }
2364
+ }
2365
+ function parseMailto(_this__u8e3s4, urlString, startIndex, endIndex) {
2366
+ _init_properties_URLParser_kt__sf11to();
2367
+ var delimiter = indexOf_0(urlString, '@', startIndex);
2368
+ if (delimiter === -1) {
2369
+ throw IllegalArgumentException_init_$Create$('Invalid mailto url: ' + urlString + ", it should contain '@'.");
2370
+ }
2371
+ // Inline function 'kotlin.text.substring' call
2372
+ // Inline function 'kotlin.js.asDynamic' call
2373
+ var tmp$ret$1 = urlString.substring(startIndex, delimiter);
2374
+ _this__u8e3s4.z2l(decodeURLPart(tmp$ret$1));
2375
+ var tmp = _this__u8e3s4;
2376
+ // Inline function 'kotlin.text.substring' call
2377
+ var startIndex_0 = delimiter + 1 | 0;
2378
+ // Inline function 'kotlin.js.asDynamic' call
2379
+ tmp.r2k_1 = urlString.substring(startIndex_0, endIndex);
2380
+ }
2381
+ function indexOfColonInHostPort(_this__u8e3s4, startIndex, endIndex) {
2382
+ _init_properties_URLParser_kt__sf11to();
2383
+ var skip = false;
2384
+ var inductionVariable = startIndex;
2385
+ if (inductionVariable < endIndex)
2386
+ do {
2387
+ var index = inductionVariable;
2388
+ inductionVariable = inductionVariable + 1 | 0;
2389
+ var tmp1_subject = charSequenceGet(_this__u8e3s4, index);
2390
+ if (tmp1_subject === _Char___init__impl__6a9atx(91))
2391
+ skip = true;
2392
+ else if (tmp1_subject === _Char___init__impl__6a9atx(93))
2393
+ skip = false;
2394
+ else if (tmp1_subject === _Char___init__impl__6a9atx(58))
2395
+ if (!skip)
2396
+ return index;
2397
+ }
2398
+ while (inductionVariable < endIndex);
2399
+ return -1;
2400
+ }
2401
+ function fillHost(_this__u8e3s4, urlString, startIndex, endIndex) {
2402
+ _init_properties_URLParser_kt__sf11to();
2403
+ // Inline function 'kotlin.takeIf' call
2404
+ var this_0 = indexOfColonInHostPort(urlString, startIndex, endIndex);
2405
+ // Inline function 'kotlin.contracts.contract' call
2406
+ var tmp;
2407
+ // Inline function 'io.ktor.http.fillHost.<anonymous>' call
2408
+ if (this_0 > 0) {
2409
+ tmp = this_0;
2410
+ } else {
2411
+ tmp = null;
2412
+ }
2413
+ var tmp0_elvis_lhs = tmp;
2414
+ var colonIndex = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
2415
+ var tmp_0 = _this__u8e3s4;
2416
+ // Inline function 'kotlin.text.substring' call
2417
+ // Inline function 'kotlin.js.asDynamic' call
2418
+ tmp_0.r2k_1 = urlString.substring(startIndex, colonIndex);
2419
+ if ((colonIndex + 1 | 0) < endIndex) {
2420
+ var tmp_1 = _this__u8e3s4;
2421
+ // Inline function 'kotlin.text.substring' call
2422
+ var startIndex_0 = colonIndex + 1 | 0;
2423
+ // Inline function 'kotlin.js.asDynamic' call
2424
+ var tmp$ret$5 = urlString.substring(startIndex_0, endIndex);
2425
+ tmp_1.s2k_1 = toInt(tmp$ret$5);
2426
+ } else {
2427
+ _this__u8e3s4.s2k_1 = 0;
2428
+ }
2429
+ }
2430
+ function parseQuery(_this__u8e3s4, urlString, startIndex, endIndex) {
2431
+ _init_properties_URLParser_kt__sf11to();
2432
+ if ((startIndex + 1 | 0) === endIndex) {
2433
+ _this__u8e3s4.t2k_1 = true;
2434
+ return endIndex;
2435
+ }
2436
+ // Inline function 'kotlin.takeIf' call
2437
+ var this_0 = indexOf(urlString, _Char___init__impl__6a9atx(35), startIndex + 1 | 0);
2438
+ // Inline function 'kotlin.contracts.contract' call
2439
+ var tmp;
2440
+ // Inline function 'io.ktor.http.parseQuery.<anonymous>' call
2441
+ if (this_0 > 0) {
2442
+ tmp = this_0;
2443
+ } else {
2444
+ tmp = null;
2445
+ }
2446
+ var tmp0_elvis_lhs = tmp;
2447
+ var fragmentStart = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
2448
+ // Inline function 'kotlin.text.substring' call
2449
+ var startIndex_0 = startIndex + 1 | 0;
2450
+ // Inline function 'kotlin.js.asDynamic' call
2451
+ var tmp$ret$3 = urlString.substring(startIndex_0, fragmentStart);
2452
+ var rawParameters = parseQueryString(tmp$ret$3, VOID, VOID, false);
2453
+ rawParameters.p27(parseQuery$lambda(_this__u8e3s4));
2454
+ return fragmentStart;
2455
+ }
2456
+ function parseFragment(_this__u8e3s4, urlString, startIndex, endIndex) {
2457
+ _init_properties_URLParser_kt__sf11to();
2458
+ if (startIndex < endIndex && charSequenceGet(urlString, startIndex) === _Char___init__impl__6a9atx(35)) {
2459
+ var tmp = _this__u8e3s4;
2460
+ // Inline function 'kotlin.text.substring' call
2461
+ var startIndex_0 = startIndex + 1 | 0;
2462
+ // Inline function 'kotlin.js.asDynamic' call
2463
+ tmp.w2k_1 = urlString.substring(startIndex_0, endIndex);
2464
+ }
2465
+ }
2466
+ function parseQuery$lambda($this_parseQuery) {
2467
+ return function (key, values) {
2468
+ $this_parseQuery.y2k_1.t27(key, values);
2469
+ return Unit_instance;
2470
+ };
2471
+ }
2472
+ var properties_initialized_URLParser_kt_hd1g6a;
2473
+ function _init_properties_URLParser_kt__sf11to() {
2474
+ if (!properties_initialized_URLParser_kt_hd1g6a) {
2475
+ properties_initialized_URLParser_kt_hd1g6a = true;
2476
+ ROOT_PATH = listOf_0('');
2477
+ }
2478
+ }
2479
+ function isWebsocket(_this__u8e3s4) {
2480
+ return _this__u8e3s4.a2l_1 === 'ws' || _this__u8e3s4.a2l_1 === 'wss';
2481
+ }
2482
+ function Companion_7() {
2483
+ Companion_instance_8 = this;
2484
+ this.t2l_1 = new URLProtocol('http', 80);
2485
+ this.u2l_1 = new URLProtocol('https', 443);
2486
+ this.v2l_1 = new URLProtocol('ws', 80);
2487
+ this.w2l_1 = new URLProtocol('wss', 443);
2488
+ this.x2l_1 = new URLProtocol('socks', 1080);
2489
+ var tmp = this;
2490
+ // Inline function 'kotlin.collections.associateBy' call
2491
+ var this_0 = listOf([this.t2l_1, this.u2l_1, this.v2l_1, this.w2l_1, this.x2l_1]);
2492
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
2493
+ // Inline function 'kotlin.collections.associateByTo' call
2494
+ var destination = LinkedHashMap_init_$Create$(capacity);
2495
+ var tmp0_iterator = this_0.j();
2496
+ while (tmp0_iterator.k()) {
2497
+ var element = tmp0_iterator.l();
2498
+ // Inline function 'io.ktor.http.Companion.byName.<anonymous>' call
2499
+ var tmp$ret$0 = element.a2l_1;
2500
+ destination.k2(tmp$ret$0, element);
2501
+ }
2502
+ tmp.y2l_1 = destination;
2503
+ }
2504
+ protoOf(Companion_7).g2m = function (name) {
2505
+ // Inline function 'kotlin.let' call
2506
+ // Inline function 'kotlin.contracts.contract' call
2507
+ // Inline function 'io.ktor.http.Companion.createOrDefault.<anonymous>' call
2508
+ var it = toLowerCasePreservingASCIIRules(name);
2509
+ var tmp0_elvis_lhs = Companion_getInstance_7().y2l_1.h2(it);
2510
+ return tmp0_elvis_lhs == null ? new URLProtocol(it, 0) : tmp0_elvis_lhs;
2511
+ };
2512
+ var Companion_instance_8;
2513
+ function Companion_getInstance_7() {
2514
+ if (Companion_instance_8 == null)
2515
+ new Companion_7();
2516
+ return Companion_instance_8;
2517
+ }
2518
+ function URLProtocol(name, defaultPort) {
2519
+ Companion_getInstance_7();
2520
+ this.a2l_1 = name;
2521
+ this.b2l_1 = defaultPort;
2522
+ // Inline function 'kotlin.require' call
2523
+ var tmp$ret$1;
2524
+ $l$block: {
2525
+ // Inline function 'kotlin.text.all' call
2526
+ var indexedObject = this.a2l_1;
2527
+ var inductionVariable = 0;
2528
+ while (inductionVariable < charSequenceLength(indexedObject)) {
2529
+ var element = charSequenceGet(indexedObject, inductionVariable);
2530
+ inductionVariable = inductionVariable + 1 | 0;
2531
+ // Inline function 'io.ktor.http.URLProtocol.<anonymous>' call
2532
+ if (!isLowerCase(element)) {
2533
+ tmp$ret$1 = false;
2534
+ break $l$block;
2535
+ }
2536
+ }
2537
+ tmp$ret$1 = true;
2538
+ }
2539
+ // Inline function 'kotlin.contracts.contract' call
2540
+ if (!tmp$ret$1) {
2541
+ // Inline function 'io.ktor.http.URLProtocol.<anonymous>' call
2542
+ var message = 'All characters should be lower case';
2543
+ throw IllegalArgumentException_init_$Create$(toString(message));
2544
+ }
2545
+ }
2546
+ protoOf(URLProtocol).toString = function () {
2547
+ return 'URLProtocol(name=' + this.a2l_1 + ', defaultPort=' + this.b2l_1 + ')';
2548
+ };
2549
+ protoOf(URLProtocol).hashCode = function () {
2550
+ var result = getStringHashCode(this.a2l_1);
2551
+ result = imul(result, 31) + this.b2l_1 | 0;
2552
+ return result;
2553
+ };
2554
+ protoOf(URLProtocol).equals = function (other) {
2555
+ if (this === other)
2556
+ return true;
2557
+ if (!(other instanceof URLProtocol))
2558
+ return false;
2559
+ var tmp0_other_with_cast = other instanceof URLProtocol ? other : THROW_CCE();
2560
+ if (!(this.a2l_1 === tmp0_other_with_cast.a2l_1))
2561
+ return false;
2562
+ if (!(this.b2l_1 === tmp0_other_with_cast.b2l_1))
2563
+ return false;
2564
+ return true;
2565
+ };
2566
+ function isSecure(_this__u8e3s4) {
2567
+ return _this__u8e3s4.a2l_1 === 'https' || _this__u8e3s4.a2l_1 === 'wss';
2568
+ }
2569
+ function takeFrom_0(_this__u8e3s4, url) {
2570
+ _this__u8e3s4.q2k_1 = url.q2k_1;
2571
+ _this__u8e3s4.r2k_1 = url.r2k_1;
2572
+ _this__u8e3s4.s2k_1 = url.s2k_1;
2573
+ _this__u8e3s4.x2k_1 = url.x2k_1;
2574
+ _this__u8e3s4.u2k_1 = url.u2k_1;
2575
+ _this__u8e3s4.v2k_1 = url.v2k_1;
2576
+ // Inline function 'kotlin.apply' call
2577
+ var this_0 = ParametersBuilder();
2578
+ // Inline function 'kotlin.contracts.contract' call
2579
+ // Inline function 'io.ktor.http.takeFrom.<anonymous>' call
2580
+ appendAll(this_0, url.y2k_1);
2581
+ _this__u8e3s4.e2m(this_0);
2582
+ _this__u8e3s4.w2k_1 = url.w2k_1;
2583
+ _this__u8e3s4.t2k_1 = url.t2k_1;
2584
+ return _this__u8e3s4;
2585
+ }
2586
+ function Url(urlString) {
2587
+ return URLBuilder_0(urlString).l1s();
2588
+ }
2589
+ function appendUrlFullPath(_this__u8e3s4, encodedPath, encodedQueryParameters, trailingQuery) {
2590
+ var tmp;
2591
+ // Inline function 'kotlin.text.isNotBlank' call
2592
+ if (!isBlank(encodedPath)) {
2593
+ tmp = !startsWith_0(encodedPath, '/');
2594
+ } else {
2595
+ tmp = false;
2596
+ }
2597
+ if (tmp) {
2598
+ _this__u8e3s4.j8(_Char___init__impl__6a9atx(47));
2599
+ }
2600
+ _this__u8e3s4.f(encodedPath);
2601
+ if (!encodedQueryParameters.p() || trailingQuery) {
2602
+ _this__u8e3s4.f('?');
2603
+ }
2604
+ // Inline function 'kotlin.collections.flatMap' call
2605
+ // Inline function 'kotlin.collections.flatMapTo' call
2606
+ var this_0 = encodedQueryParameters.o27();
2607
+ var destination = ArrayList_init_$Create$_0();
2608
+ var tmp0_iterator = this_0.j();
2609
+ while (tmp0_iterator.k()) {
2610
+ var element = tmp0_iterator.l();
2611
+ // Inline function 'io.ktor.http.appendUrlFullPath.<anonymous>' call
2612
+ // Inline function 'kotlin.collections.component1' call
2613
+ var key = element.t();
2614
+ // Inline function 'kotlin.collections.component2' call
2615
+ var value = element.u();
2616
+ var tmp_0;
2617
+ if (value.p()) {
2618
+ tmp_0 = listOf_0(to(key, null));
2619
+ } else {
2620
+ // Inline function 'kotlin.collections.map' call
2621
+ // Inline function 'kotlin.collections.mapTo' call
2622
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(value, 10));
2623
+ var tmp0_iterator_0 = value.j();
2624
+ while (tmp0_iterator_0.k()) {
2625
+ var item = tmp0_iterator_0.l();
2626
+ // Inline function 'io.ktor.http.appendUrlFullPath.<anonymous>.<anonymous>' call
2627
+ var tmp$ret$3 = to(key, item);
2628
+ destination_0.e(tmp$ret$3);
2629
+ }
2630
+ tmp_0 = destination_0;
2631
+ }
2632
+ var list = tmp_0;
2633
+ addAll(destination, list);
2634
+ }
2635
+ var tmp_1 = destination;
2636
+ joinTo(tmp_1, _this__u8e3s4, '&', VOID, VOID, VOID, VOID, appendUrlFullPath$lambda);
2637
+ }
2638
+ function appendUserAndPassword(_this__u8e3s4, encodedUser, encodedPassword) {
2639
+ if (encodedUser == null) {
2640
+ return Unit_instance;
2641
+ }
2642
+ _this__u8e3s4.i8(encodedUser);
2643
+ if (!(encodedPassword == null)) {
2644
+ _this__u8e3s4.j8(_Char___init__impl__6a9atx(58));
2645
+ _this__u8e3s4.i8(encodedPassword);
2646
+ }
2647
+ _this__u8e3s4.i8('@');
2648
+ }
2649
+ function get_hostWithPort(_this__u8e3s4) {
2650
+ return _this__u8e3s4.d2l_1 + ':' + _this__u8e3s4.h2m();
2651
+ }
2652
+ function URLBuilder_0(urlString) {
2653
+ return takeFrom(new URLBuilder(), urlString);
2654
+ }
2655
+ function URLBuilder_1(url) {
2656
+ return takeFrom_1(new URLBuilder(), url);
2657
+ }
2658
+ function Url_0(builder) {
2659
+ return takeFrom_0(new URLBuilder(), builder).l1s();
2660
+ }
2661
+ function takeFrom_1(_this__u8e3s4, url) {
2662
+ _this__u8e3s4.q2k_1 = url.c2l_1;
2663
+ _this__u8e3s4.r2k_1 = url.d2l_1;
2664
+ _this__u8e3s4.s2k_1 = url.h2m();
2665
+ set_encodedPath(_this__u8e3s4, url.i2m());
2666
+ _this__u8e3s4.u2k_1 = url.j2m();
2667
+ _this__u8e3s4.v2k_1 = url.k2m();
2668
+ // Inline function 'kotlin.apply' call
2669
+ var this_0 = ParametersBuilder();
2670
+ // Inline function 'kotlin.contracts.contract' call
2671
+ // Inline function 'io.ktor.http.takeFrom.<anonymous>' call
2672
+ this_0.z27(parseQueryString(url.l2m(), VOID, VOID, false));
2673
+ _this__u8e3s4.e2m(this_0);
2674
+ _this__u8e3s4.w2k_1 = url.m2m();
2675
+ _this__u8e3s4.t2k_1 = url.k2l_1;
2676
+ return _this__u8e3s4;
2677
+ }
2678
+ function appendUrlFullPath$lambda(it) {
2679
+ var key = it.ke_1;
2680
+ var tmp;
2681
+ if (it.le_1 == null) {
2682
+ tmp = key;
2683
+ } else {
2684
+ var value = toString_1(it.le_1);
2685
+ tmp = key + '=' + value;
2686
+ }
2687
+ return tmp;
2688
+ }
2689
+ function Companion_8() {
2690
+ }
2691
+ var Companion_instance_9;
2692
+ function Companion_getInstance_8() {
2693
+ return Companion_instance_9;
2694
+ }
2695
+ function Url$encodedPath$delegate$lambda(this$0) {
2696
+ return function () {
2697
+ var tmp;
2698
+ if (this$0.f2l_1.p()) {
2699
+ return '';
2700
+ }
2701
+ var pathStartIndex = indexOf(this$0.l2l_1, _Char___init__impl__6a9atx(47), this$0.c2l_1.a2l_1.length + 3 | 0);
2702
+ var tmp_0;
2703
+ if (pathStartIndex === -1) {
2704
+ return '';
2705
+ }
2706
+ // Inline function 'kotlin.charArrayOf' call
2707
+ var tmp$ret$0 = charArrayOf([_Char___init__impl__6a9atx(63), _Char___init__impl__6a9atx(35)]);
2708
+ var pathEndIndex = indexOfAny(this$0.l2l_1, tmp$ret$0, pathStartIndex);
2709
+ var tmp_1;
2710
+ if (pathEndIndex === -1) {
2711
+ // Inline function 'kotlin.text.substring' call
2712
+ // Inline function 'kotlin.js.asDynamic' call
2713
+ return this$0.l2l_1.substring(pathStartIndex);
2714
+ }
2715
+ // Inline function 'kotlin.text.substring' call
2716
+ // Inline function 'kotlin.js.asDynamic' call
2717
+ return this$0.l2l_1.substring(pathStartIndex, pathEndIndex);
2718
+ };
2719
+ }
2720
+ function Url$encodedQuery$delegate$lambda(this$0) {
2721
+ return function () {
2722
+ var queryStart = indexOf(this$0.l2l_1, _Char___init__impl__6a9atx(63)) + 1 | 0;
2723
+ var tmp;
2724
+ if (queryStart === 0) {
2725
+ return '';
2726
+ }
2727
+ var queryEnd = indexOf(this$0.l2l_1, _Char___init__impl__6a9atx(35), queryStart);
2728
+ var tmp_0;
2729
+ if (queryEnd === -1) {
2730
+ // Inline function 'kotlin.text.substring' call
2731
+ // Inline function 'kotlin.js.asDynamic' call
2732
+ return this$0.l2l_1.substring(queryStart);
2733
+ }
2734
+ // Inline function 'kotlin.text.substring' call
2735
+ // Inline function 'kotlin.js.asDynamic' call
2736
+ return this$0.l2l_1.substring(queryStart, queryEnd);
2737
+ };
2738
+ }
2739
+ function Url$encodedPathAndQuery$delegate$lambda(this$0) {
2740
+ return function () {
2741
+ var pathStart = indexOf(this$0.l2l_1, _Char___init__impl__6a9atx(47), this$0.c2l_1.a2l_1.length + 3 | 0);
2742
+ var tmp;
2743
+ if (pathStart === -1) {
2744
+ return '';
2745
+ }
2746
+ var queryEnd = indexOf(this$0.l2l_1, _Char___init__impl__6a9atx(35), pathStart);
2747
+ var tmp_0;
2748
+ if (queryEnd === -1) {
2749
+ // Inline function 'kotlin.text.substring' call
2750
+ // Inline function 'kotlin.js.asDynamic' call
2751
+ return this$0.l2l_1.substring(pathStart);
2752
+ }
2753
+ // Inline function 'kotlin.text.substring' call
2754
+ // Inline function 'kotlin.js.asDynamic' call
2755
+ return this$0.l2l_1.substring(pathStart, queryEnd);
2756
+ };
2757
+ }
2758
+ function Url$encodedUser$delegate$lambda(this$0) {
2759
+ return function () {
2760
+ var tmp;
2761
+ if (this$0.i2l_1 == null) {
2762
+ return null;
2763
+ }
2764
+ var tmp_0;
2765
+ // Inline function 'kotlin.text.isEmpty' call
2766
+ var this_0 = this$0.i2l_1;
2767
+ if (charSequenceLength(this_0) === 0) {
2768
+ return '';
2769
+ }
2770
+ var usernameStart = this$0.c2l_1.a2l_1.length + 3 | 0;
2771
+ // Inline function 'kotlin.charArrayOf' call
2772
+ var tmp$ret$1 = charArrayOf([_Char___init__impl__6a9atx(58), _Char___init__impl__6a9atx(64)]);
2773
+ var usernameEnd = indexOfAny(this$0.l2l_1, tmp$ret$1, usernameStart);
2774
+ // Inline function 'kotlin.text.substring' call
2775
+ // Inline function 'kotlin.js.asDynamic' call
2776
+ return this$0.l2l_1.substring(usernameStart, usernameEnd);
2777
+ };
2778
+ }
2779
+ function Url$encodedPassword$delegate$lambda(this$0) {
2780
+ return function () {
2781
+ var tmp;
2782
+ if (this$0.j2l_1 == null) {
2783
+ return null;
2784
+ }
2785
+ var tmp_0;
2786
+ // Inline function 'kotlin.text.isEmpty' call
2787
+ var this_0 = this$0.j2l_1;
2788
+ if (charSequenceLength(this_0) === 0) {
2789
+ return '';
2790
+ }
2791
+ var passwordStart = indexOf(this$0.l2l_1, _Char___init__impl__6a9atx(58), this$0.c2l_1.a2l_1.length + 3 | 0) + 1 | 0;
2792
+ var passwordEnd = indexOf(this$0.l2l_1, _Char___init__impl__6a9atx(64));
2793
+ // Inline function 'kotlin.text.substring' call
2794
+ // Inline function 'kotlin.js.asDynamic' call
2795
+ return this$0.l2l_1.substring(passwordStart, passwordEnd);
2796
+ };
2797
+ }
2798
+ function Url$encodedFragment$delegate$lambda(this$0) {
2799
+ return function () {
2800
+ var fragmentStart = indexOf(this$0.l2l_1, _Char___init__impl__6a9atx(35)) + 1 | 0;
2801
+ var tmp;
2802
+ if (fragmentStart === 0) {
2803
+ return '';
2804
+ }
2805
+ // Inline function 'kotlin.text.substring' call
2806
+ // Inline function 'kotlin.js.asDynamic' call
2807
+ return this$0.l2l_1.substring(fragmentStart);
2808
+ };
2809
+ }
2810
+ function Url_1(protocol, host, specifiedPort, pathSegments, parameters, fragment, user, password, trailingQuery, urlString) {
2811
+ this.c2l_1 = protocol;
2812
+ this.d2l_1 = host;
2813
+ this.e2l_1 = specifiedPort;
2814
+ this.f2l_1 = pathSegments;
2815
+ this.g2l_1 = parameters;
2816
+ this.h2l_1 = fragment;
2817
+ this.i2l_1 = user;
2818
+ this.j2l_1 = password;
2819
+ this.k2l_1 = trailingQuery;
2820
+ this.l2l_1 = urlString;
2821
+ // Inline function 'kotlin.require' call
2822
+ var tmp;
2823
+ var containsArg = this.e2l_1;
2824
+ if (0 <= containsArg ? containsArg <= 65535 : false) {
2825
+ tmp = true;
2826
+ } else {
2827
+ tmp = this.e2l_1 === 0;
2828
+ }
2829
+ // Inline function 'kotlin.contracts.contract' call
2830
+ if (!tmp) {
2831
+ // Inline function 'io.ktor.http.Url.<anonymous>' call
2832
+ var message = 'port must be between 0 and 65535, or 0 if not set';
2833
+ throw IllegalArgumentException_init_$Create$(toString(message));
2834
+ }
2835
+ var tmp_0 = this;
2836
+ tmp_0.m2l_1 = lazy_0(Url$encodedPath$delegate$lambda(this));
2837
+ var tmp_1 = this;
2838
+ tmp_1.n2l_1 = lazy_0(Url$encodedQuery$delegate$lambda(this));
2839
+ var tmp_2 = this;
2840
+ tmp_2.o2l_1 = lazy_0(Url$encodedPathAndQuery$delegate$lambda(this));
2841
+ var tmp_3 = this;
2842
+ tmp_3.p2l_1 = lazy_0(Url$encodedUser$delegate$lambda(this));
2843
+ var tmp_4 = this;
2844
+ tmp_4.q2l_1 = lazy_0(Url$encodedPassword$delegate$lambda(this));
2845
+ var tmp_5 = this;
2846
+ tmp_5.r2l_1 = lazy_0(Url$encodedFragment$delegate$lambda(this));
2847
+ }
2848
+ protoOf(Url_1).h2m = function () {
2849
+ // Inline function 'kotlin.takeUnless' call
2850
+ var this_0 = this.e2l_1;
2851
+ // Inline function 'kotlin.contracts.contract' call
2852
+ var tmp;
2853
+ // Inline function 'io.ktor.http.Url.<get-port>.<anonymous>' call
2854
+ if (!(this_0 === 0)) {
2855
+ tmp = this_0;
2856
+ } else {
2857
+ tmp = null;
2858
+ }
2859
+ var tmp0_elvis_lhs = tmp;
2860
+ return tmp0_elvis_lhs == null ? this.c2l_1.b2l_1 : tmp0_elvis_lhs;
2861
+ };
2862
+ protoOf(Url_1).i2m = function () {
2863
+ // Inline function 'kotlin.getValue' call
2864
+ var this_0 = this.m2l_1;
2865
+ encodedPath$factory();
2866
+ return this_0.u();
2867
+ };
2868
+ protoOf(Url_1).l2m = function () {
2869
+ // Inline function 'kotlin.getValue' call
2870
+ var this_0 = this.n2l_1;
2871
+ encodedQuery$factory();
2872
+ return this_0.u();
2873
+ };
2874
+ protoOf(Url_1).j2m = function () {
2875
+ // Inline function 'kotlin.getValue' call
2876
+ var this_0 = this.p2l_1;
2877
+ encodedUser$factory();
2878
+ return this_0.u();
2879
+ };
2880
+ protoOf(Url_1).k2m = function () {
2881
+ // Inline function 'kotlin.getValue' call
2882
+ var this_0 = this.q2l_1;
2883
+ encodedPassword$factory();
2884
+ return this_0.u();
2885
+ };
2886
+ protoOf(Url_1).m2m = function () {
2887
+ // Inline function 'kotlin.getValue' call
2888
+ var this_0 = this.r2l_1;
2889
+ encodedFragment$factory();
2890
+ return this_0.u();
2891
+ };
2892
+ protoOf(Url_1).toString = function () {
2893
+ return this.l2l_1;
2894
+ };
2895
+ protoOf(Url_1).equals = function (other) {
2896
+ if (this === other)
2897
+ return true;
2898
+ if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
2899
+ return false;
2900
+ if (!(other instanceof Url_1))
2901
+ THROW_CCE();
2902
+ if (!(this.l2l_1 === other.l2l_1))
2903
+ return false;
2904
+ return true;
2905
+ };
2906
+ protoOf(Url_1).hashCode = function () {
2907
+ return getStringHashCode(this.l2l_1);
2908
+ };
2909
+ function get_authority_0(_this__u8e3s4) {
2910
+ // Inline function 'kotlin.text.buildString' call
2911
+ // Inline function 'kotlin.contracts.contract' call
2912
+ // Inline function 'kotlin.apply' call
2913
+ var this_0 = StringBuilder_init_$Create$();
2914
+ // Inline function 'kotlin.contracts.contract' call
2915
+ // Inline function 'io.ktor.http.<get-authority>.<anonymous>' call
2916
+ this_0.i8(get_encodedUserAndPassword_0(_this__u8e3s4));
2917
+ if (_this__u8e3s4.e2l_1 === 0 || _this__u8e3s4.e2l_1 === _this__u8e3s4.c2l_1.b2l_1) {
2918
+ this_0.i8(_this__u8e3s4.d2l_1);
2919
+ } else {
2920
+ this_0.i8(get_hostWithPort(_this__u8e3s4));
2921
+ }
2922
+ return this_0.toString();
2923
+ }
2924
+ function get_encodedUserAndPassword_0(_this__u8e3s4) {
2925
+ // Inline function 'kotlin.text.buildString' call
2926
+ // Inline function 'kotlin.contracts.contract' call
2927
+ // Inline function 'kotlin.apply' call
2928
+ var this_0 = StringBuilder_init_$Create$();
2929
+ // Inline function 'kotlin.contracts.contract' call
2930
+ // Inline function 'io.ktor.http.<get-encodedUserAndPassword>.<anonymous>' call
2931
+ appendUserAndPassword(this_0, _this__u8e3s4.j2m(), _this__u8e3s4.k2m());
2932
+ return this_0.toString();
2933
+ }
2934
+ function encodedPath$factory() {
2935
+ return getPropertyCallableRef('encodedPath', 1, KProperty1, function (receiver) {
2936
+ return receiver.i2m();
2937
+ }, null);
2938
+ }
2939
+ function encodedQuery$factory() {
2940
+ return getPropertyCallableRef('encodedQuery', 1, KProperty1, function (receiver) {
2941
+ return receiver.l2m();
2942
+ }, null);
2943
+ }
2944
+ function encodedUser$factory() {
2945
+ return getPropertyCallableRef('encodedUser', 1, KProperty1, function (receiver) {
2946
+ return receiver.j2m();
2947
+ }, null);
2948
+ }
2949
+ function encodedPassword$factory() {
2950
+ return getPropertyCallableRef('encodedPassword', 1, KProperty1, function (receiver) {
2951
+ return receiver.k2m();
2952
+ }, null);
2953
+ }
2954
+ function encodedFragment$factory() {
2955
+ return getPropertyCallableRef('encodedFragment', 1, KProperty1, function (receiver) {
2956
+ return receiver.m2m();
2957
+ }, null);
2958
+ }
2959
+ function UrlDecodedParametersBuilder(encodedParametersBuilder) {
2960
+ this.n2m_1 = encodedParametersBuilder;
2961
+ this.o2m_1 = this.n2m_1.l27();
2962
+ }
2963
+ protoOf(UrlDecodedParametersBuilder).l1s = function () {
2964
+ return decodeParameters(this.n2m_1);
2965
+ };
2966
+ protoOf(UrlDecodedParametersBuilder).l27 = function () {
2967
+ return this.o2m_1;
2968
+ };
2969
+ protoOf(UrlDecodedParametersBuilder).m27 = function (name) {
2970
+ var tmp0_safe_receiver = this.n2m_1.m27(encodeURLParameter(name));
2971
+ var tmp;
2972
+ if (tmp0_safe_receiver == null) {
2973
+ tmp = null;
2974
+ } else {
2975
+ // Inline function 'kotlin.collections.map' call
2976
+ // Inline function 'kotlin.collections.mapTo' call
2977
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_safe_receiver, 10));
2978
+ var tmp0_iterator = tmp0_safe_receiver.j();
2979
+ while (tmp0_iterator.k()) {
2980
+ var item = tmp0_iterator.l();
2981
+ // Inline function 'io.ktor.http.UrlDecodedParametersBuilder.getAll.<anonymous>' call
2982
+ var tmp$ret$0 = decodeURLQueryComponent(item, VOID, VOID, true);
2983
+ destination.e(tmp$ret$0);
2984
+ }
2985
+ tmp = destination;
2986
+ }
2987
+ return tmp;
2988
+ };
2989
+ protoOf(UrlDecodedParametersBuilder).u27 = function (name) {
2990
+ return this.n2m_1.u27(encodeURLParameter(name));
2991
+ };
2992
+ protoOf(UrlDecodedParametersBuilder).n27 = function () {
2993
+ // Inline function 'kotlin.collections.map' call
2994
+ var this_0 = this.n2m_1.n27();
2995
+ // Inline function 'kotlin.collections.mapTo' call
2996
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2997
+ var tmp0_iterator = this_0.j();
2998
+ while (tmp0_iterator.k()) {
2999
+ var item = tmp0_iterator.l();
3000
+ // Inline function 'io.ktor.http.UrlDecodedParametersBuilder.names.<anonymous>' call
3001
+ var tmp$ret$0 = decodeURLQueryComponent(item);
3002
+ destination.e(tmp$ret$0);
3003
+ }
3004
+ return toSet(destination);
3005
+ };
3006
+ protoOf(UrlDecodedParametersBuilder).p = function () {
3007
+ return this.n2m_1.p();
3008
+ };
3009
+ protoOf(UrlDecodedParametersBuilder).o27 = function () {
3010
+ return decodeParameters(this.n2m_1).o27();
3011
+ };
3012
+ protoOf(UrlDecodedParametersBuilder).y27 = function (name, value) {
3013
+ return this.n2m_1.y27(encodeURLParameter(name), encodeURLParameterValue(value));
3014
+ };
3015
+ protoOf(UrlDecodedParametersBuilder).z27 = function (stringValues) {
3016
+ return appendAllEncoded(this.n2m_1, stringValues);
3017
+ };
3018
+ protoOf(UrlDecodedParametersBuilder).t27 = function (name, values) {
3019
+ var tmp = encodeURLParameter(name);
3020
+ // Inline function 'kotlin.collections.map' call
3021
+ // Inline function 'kotlin.collections.mapTo' call
3022
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
3023
+ var tmp0_iterator = values.j();
3024
+ while (tmp0_iterator.k()) {
3025
+ var item = tmp0_iterator.l();
3026
+ // Inline function 'io.ktor.http.UrlDecodedParametersBuilder.appendAll.<anonymous>' call
3027
+ var tmp$ret$0 = encodeURLParameterValue(item);
3028
+ destination.e(tmp$ret$0);
3029
+ }
3030
+ return this.n2m_1.t27(tmp, destination);
3031
+ };
3032
+ protoOf(UrlDecodedParametersBuilder).a2 = function () {
3033
+ return this.n2m_1.a2();
3034
+ };
3035
+ function encodeParameters(parameters) {
3036
+ // Inline function 'kotlin.apply' call
3037
+ var this_0 = ParametersBuilder();
3038
+ // Inline function 'kotlin.contracts.contract' call
3039
+ // Inline function 'io.ktor.http.encodeParameters.<anonymous>' call
3040
+ appendAllEncoded(this_0, parameters);
3041
+ return this_0;
3042
+ }
3043
+ function decodeParameters(parameters) {
3044
+ // Inline function 'kotlin.apply' call
3045
+ var this_0 = ParametersBuilder();
3046
+ // Inline function 'kotlin.contracts.contract' call
3047
+ // Inline function 'io.ktor.http.decodeParameters.<anonymous>' call
3048
+ appendAllDecoded(this_0, parameters);
3049
+ return this_0.l1s();
3050
+ }
3051
+ function appendAllEncoded(_this__u8e3s4, parameters) {
3052
+ // Inline function 'kotlin.collections.forEach' call
3053
+ var tmp0_iterator = parameters.n27().j();
3054
+ while (tmp0_iterator.k()) {
3055
+ var element = tmp0_iterator.l();
3056
+ // Inline function 'io.ktor.http.appendAllEncoded.<anonymous>' call
3057
+ var tmp0_elvis_lhs = parameters.m27(element);
3058
+ var values = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
3059
+ var tmp = encodeURLParameter(element);
3060
+ // Inline function 'kotlin.collections.map' call
3061
+ // Inline function 'kotlin.collections.mapTo' call
3062
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
3063
+ var tmp0_iterator_0 = values.j();
3064
+ while (tmp0_iterator_0.k()) {
3065
+ var item = tmp0_iterator_0.l();
3066
+ // Inline function 'io.ktor.http.appendAllEncoded.<anonymous>.<anonymous>' call
3067
+ var tmp$ret$0 = encodeURLParameterValue(item);
3068
+ destination.e(tmp$ret$0);
3069
+ }
3070
+ _this__u8e3s4.t27(tmp, destination);
3071
+ }
3072
+ }
3073
+ function appendAllDecoded(_this__u8e3s4, parameters) {
3074
+ // Inline function 'kotlin.collections.forEach' call
3075
+ var tmp0_iterator = parameters.n27().j();
3076
+ while (tmp0_iterator.k()) {
3077
+ var element = tmp0_iterator.l();
3078
+ // Inline function 'io.ktor.http.appendAllDecoded.<anonymous>' call
3079
+ var tmp0_elvis_lhs = parameters.m27(element);
3080
+ var values = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
3081
+ var tmp = decodeURLQueryComponent(element);
3082
+ // Inline function 'kotlin.collections.map' call
3083
+ // Inline function 'kotlin.collections.mapTo' call
3084
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
3085
+ var tmp0_iterator_0 = values.j();
3086
+ while (tmp0_iterator_0.k()) {
3087
+ var item = tmp0_iterator_0.l();
3088
+ // Inline function 'io.ktor.http.appendAllDecoded.<anonymous>.<anonymous>' call
3089
+ var tmp$ret$0 = decodeURLQueryComponent(item, VOID, VOID, true);
3090
+ destination.e(tmp$ret$0);
3091
+ }
3092
+ _this__u8e3s4.t27(tmp, destination);
3093
+ }
3094
+ }
3095
+ function ByteArrayContent(bytes, contentType, status) {
3096
+ contentType = contentType === VOID ? null : contentType;
3097
+ status = status === VOID ? null : status;
3098
+ ByteArrayContent_0.call(this);
3099
+ this.q2m_1 = bytes;
3100
+ this.r2m_1 = contentType;
3101
+ this.s2m_1 = status;
3102
+ }
3103
+ protoOf(ByteArrayContent).t2m = function () {
3104
+ return this.r2m_1;
3105
+ };
3106
+ protoOf(ByteArrayContent).u2m = function () {
3107
+ return this.s2m_1;
3108
+ };
3109
+ protoOf(ByteArrayContent).v2m = function () {
3110
+ return toLong_0(this.q2m_1.length);
3111
+ };
3112
+ protoOf(ByteArrayContent).w2m = function () {
3113
+ return this.q2m_1;
3114
+ };
3115
+ function NoContent() {
3116
+ OutgoingContent.call(this);
3117
+ }
3118
+ function ReadChannelContent() {
3119
+ OutgoingContent.call(this);
3120
+ }
3121
+ function WriteChannelContent() {
3122
+ }
3123
+ function ByteArrayContent_0() {
3124
+ OutgoingContent.call(this);
3125
+ }
3126
+ function ProtocolUpgrade() {
3127
+ }
3128
+ function OutgoingContent() {
3129
+ this.x2m_1 = null;
3130
+ }
3131
+ protoOf(OutgoingContent).t2m = function () {
3132
+ return null;
3133
+ };
3134
+ protoOf(OutgoingContent).v2m = function () {
3135
+ return null;
3136
+ };
3137
+ protoOf(OutgoingContent).u2m = function () {
3138
+ return null;
3139
+ };
3140
+ protoOf(OutgoingContent).p2h = function () {
3141
+ return Companion_getInstance_1().j2d_1;
3142
+ };
3143
+ function NullBody() {
3144
+ }
3145
+ var NullBody_instance;
3146
+ function NullBody_getInstance() {
3147
+ return NullBody_instance;
3148
+ }
3149
+ function TextContent(text, contentType, status) {
3150
+ status = status === VOID ? null : status;
3151
+ ByteArrayContent_0.call(this);
3152
+ this.e2n_1 = text;
3153
+ this.f2n_1 = contentType;
3154
+ this.g2n_1 = status;
3155
+ var tmp = this;
3156
+ var tmp$ret$0;
3157
+ $l$block: {
3158
+ // Inline function 'io.ktor.utils.io.core.toByteArray' call
3159
+ var this_0 = this.e2n_1;
3160
+ var tmp0_elvis_lhs = charset(this.f2n_1);
3161
+ var charset_0 = tmp0_elvis_lhs == null ? Charsets_getInstance().r1z_1 : tmp0_elvis_lhs;
3162
+ if (charset_0.equals(Charsets_getInstance().r1z_1)) {
3163
+ tmp$ret$0 = encodeToByteArray(this_0);
3164
+ break $l$block;
3165
+ }
3166
+ tmp$ret$0 = encodeToByteArray_0(charset_0.v1z(), this_0, 0, this_0.length);
3167
+ }
3168
+ tmp.h2n_1 = tmp$ret$0;
3169
+ }
3170
+ protoOf(TextContent).t2m = function () {
3171
+ return this.f2n_1;
3172
+ };
3173
+ protoOf(TextContent).u2m = function () {
3174
+ return this.g2n_1;
3175
+ };
3176
+ protoOf(TextContent).v2m = function () {
3177
+ return toLong_0(this.h2n_1.length);
3178
+ };
3179
+ protoOf(TextContent).w2m = function () {
3180
+ return this.h2n_1;
3181
+ };
3182
+ protoOf(TextContent).toString = function () {
3183
+ return 'TextContent[' + this.f2n_1.toString() + '] "' + take(this.e2n_1, 30) + '"';
3184
+ };
3185
+ function get_origin(_this__u8e3s4) {
3186
+ var tmp;
3187
+ if (get_platform(PlatformUtils_getInstance()).o2_1 === 2) {
3188
+ var tmp_0 = function () {
3189
+ var tmpLocation = null;
3190
+ if (typeof window !== 'undefined') {
3191
+ tmpLocation = window.location;
3192
+ } else if (typeof self !== 'undefined') {
3193
+ tmpLocation = self.location;
3194
+ }
3195
+ var origin = '';
3196
+ if (tmpLocation) {
3197
+ origin = tmpLocation.origin;
3198
+ }
3199
+ return origin && origin != 'null' ? origin : 'http://localhost';
3200
+ }();
3201
+ tmp = (!(tmp_0 == null) ? typeof tmp_0 === 'string' : false) ? tmp_0 : THROW_CCE();
3202
+ } else {
3203
+ tmp = 'http://localhost';
3204
+ }
3205
+ return tmp;
3206
+ }
3207
+ //region block: post-declaration
3208
+ protoOf(EmptyHeaders).k26 = get;
3209
+ protoOf(EmptyHeaders).p27 = forEach;
3210
+ protoOf(EmptyParameters).p27 = forEach;
3211
+ //endregion
3212
+ //region block: init
3213
+ Companion_instance_1 = new Companion_0();
3214
+ EmptyHeaders_instance = new EmptyHeaders();
3215
+ EmptyParameters_instance = new EmptyParameters();
3216
+ Companion_instance_9 = new Companion_8();
3217
+ NullBody_instance = new NullBody();
3218
+ //endregion
3219
+ //region block: exports
3220
+ _.$_$ = _.$_$ || {};
3221
+ _.$_$.a = NullBody_instance;
3222
+ _.$_$.b = Application_getInstance;
3223
+ _.$_$.c = Text_getInstance;
3224
+ _.$_$.d = Companion_getInstance_1;
3225
+ _.$_$.e = HttpHeaders_getInstance;
3226
+ _.$_$.f = Companion_getInstance_2;
3227
+ _.$_$.g = Companion_getInstance_3;
3228
+ _.$_$.h = Companion_getInstance_4;
3229
+ _.$_$.i = Companion_getInstance_7;
3230
+ _.$_$.j = ByteArrayContent;
3231
+ _.$_$.k = ByteArrayContent_0;
3232
+ _.$_$.l = NoContent;
3233
+ _.$_$.m = ProtocolUpgrade;
3234
+ _.$_$.n = ReadChannelContent;
3235
+ _.$_$.o = WriteChannelContent;
3236
+ _.$_$.p = OutgoingContent;
3237
+ _.$_$.q = TextContent;
3238
+ _.$_$.r = HeadersBuilder;
3239
+ _.$_$.s = HttpStatusCode;
3240
+ _.$_$.t = ParametersBuilder;
3241
+ _.$_$.u = URLBuilder_1;
3242
+ _.$_$.v = URLBuilder;
3243
+ _.$_$.w = UnsafeHeaderException;
3244
+ _.$_$.x = Url_0;
3245
+ _.$_$.y = get_authority;
3246
+ _.$_$.z = get_authority_0;
3247
+ _.$_$.a1 = charset_0;
3248
+ _.$_$.b1 = charset;
3249
+ _.$_$.c1 = contentLength;
3250
+ _.$_$.d1 = contentType;
3251
+ _.$_$.e1 = contentType_0;
3252
+ _.$_$.f1 = isSecure;
3253
+ _.$_$.g1 = isWebsocket;
3254
+ _.$_$.h1 = parseAndSortHeader;
3255
+ _.$_$.i1 = takeFrom_0;
3256
+ _.$_$.j1 = takeFrom;
3257
+ _.$_$.k1 = withCharsetIfNeeded;
3258
+ _.$_$.l1 = withCharset;
3259
+ //endregion
3260
+ return _;
3261
+ }));
3262
+
3263
+ //# sourceMappingURL=ktor-ktor-http.js.map