@sddsjs/design-system-builder-cli 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/LICENSE +4 -0
  2. package/README.md +969 -2
  3. package/bin/dsbuilder.js +2 -0
  4. package/dist/kotlin/Kotlin-Immutable-Collections-kotlinx-collections-immutable.js +3170 -0
  5. package/dist/kotlin/Stately-stately-concurrency.js +32 -0
  6. package/dist/kotlin/Stately-stately-concurrent-collections.js +302 -0
  7. package/dist/kotlin/Stately-stately-strict.js +12 -0
  8. package/dist/kotlin/clikt-clikt-mordant.js +304 -0
  9. package/dist/kotlin/clikt-clikt.js +6960 -0
  10. package/dist/kotlin/colormath-root-colormath.js +1653 -0
  11. package/dist/kotlin/design-system-builder-frontend-analytics-metrica.js +1026 -0
  12. package/dist/kotlin/design-system-builder-frontend-cli.js +10690 -0
  13. package/dist/kotlin/design-system-builder-frontend-core-analytics.js +128 -0
  14. package/dist/kotlin/design-system-builder-frontend-core-application.js +3634 -0
  15. package/dist/kotlin/design-system-builder-frontend-core-auth.js +1772 -0
  16. package/dist/kotlin/design-system-builder-frontend-core-domain.js +501 -0
  17. package/dist/kotlin/design-system-builder-frontend-core-network.js +3318 -0
  18. package/dist/kotlin/design-system-builder-frontend-core-platform.js +972 -0
  19. package/dist/kotlin/design-system-builder-frontend-core-process.js +236 -0
  20. package/dist/kotlin/design-system-builder-frontend-core-workspace.js +1058 -0
  21. package/dist/kotlin/design-system-builder-frontend-feature-auth.js +1664 -0
  22. package/dist/kotlin/design-system-builder-frontend-feature-components.js +24819 -0
  23. package/dist/kotlin/design-system-builder-frontend-feature-docs.js +7625 -0
  24. package/dist/kotlin/design-system-builder-frontend-feature-ds.js +2219 -0
  25. package/dist/kotlin/design-system-builder-frontend-feature-init.js +318 -0
  26. package/dist/kotlin/design-system-builder-frontend-feature-projects.js +624 -0
  27. package/dist/kotlin/design-system-builder-frontend-feature-status.js +984 -0
  28. package/dist/kotlin/design-system-builder-frontend-feature-theme.js +10456 -0
  29. package/dist/kotlin/design-system-builder-frontend-feature-toolchain.js +586 -0
  30. package/dist/kotlin/design-system-builder-frontend-mcp-server-core.js +6878 -0
  31. package/dist/kotlin/design-system-builder-frontend-platform-android.js +451 -0
  32. package/dist/kotlin/design-system-builder-frontend-platform-ios.js +1858 -0
  33. package/dist/kotlin/design-system-builder-frontend-platform-web.js +1555 -0
  34. package/dist/kotlin/design-system-builder-frontend-runtime-node.js +1763 -0
  35. package/dist/kotlin/kotlin-kotlin-stdlib.js +17881 -0
  36. package/dist/kotlin/kotlin-logging.js +440 -0
  37. package/dist/kotlin/kotlin-sdk-kotlin-sdk-core.js +20228 -0
  38. package/dist/kotlin/kotlin-sdk-kotlin-sdk-server.js +2771 -0
  39. package/dist/kotlin/kotlin_org_jetbrains_kotlin_kotlin_dom_api_compat.js +8 -0
  40. package/dist/kotlin/kotlinx-atomicfu.js +252 -0
  41. package/dist/kotlin/kotlinx-coroutines-core.js +10822 -0
  42. package/dist/kotlin/kotlinx-io-kotlinx-io-bytestring.js +203 -0
  43. package/dist/kotlin/kotlinx-io-kotlinx-io-core.js +2032 -0
  44. package/dist/kotlin/kotlinx-serialization-kotlinx-serialization-core.js +6171 -0
  45. package/dist/kotlin/kotlinx-serialization-kotlinx-serialization-json.js +5690 -0
  46. package/dist/kotlin/ktor-ktor-client-core.js +8382 -0
  47. package/dist/kotlin/ktor-ktor-events.js +80 -0
  48. package/dist/kotlin/ktor-ktor-http-cio.js +2252 -0
  49. package/dist/kotlin/ktor-ktor-http.js +3320 -0
  50. package/dist/kotlin/ktor-ktor-io.js +3328 -0
  51. package/dist/kotlin/ktor-ktor-serialization.js +8 -0
  52. package/dist/kotlin/ktor-ktor-server-core.js +12 -0
  53. package/dist/kotlin/ktor-ktor-server-sse.js +8 -0
  54. package/dist/kotlin/ktor-ktor-server-websockets.js +8 -0
  55. package/dist/kotlin/ktor-ktor-sse.js +8 -0
  56. package/dist/kotlin/ktor-ktor-utils.js +2524 -0
  57. package/dist/kotlin/ktor-ktor-websocket-serialization.js +8 -0
  58. package/dist/kotlin/ktor-ktor-websockets.js +433 -0
  59. package/dist/kotlin/mordant-mordant-omnibus.js +8 -0
  60. package/dist/kotlin/mordant-mordant.js +12111 -0
  61. package/dist/kotlin/okio-parent-okio.js +2335 -0
  62. package/dist/kotlin/projects-core-koin-core.js +1285 -0
  63. package/package.json +26 -5
@@ -0,0 +1,3320 @@
1
+ (function (_, kotlin_kotlin, kotlin_io_ktor_ktor_io, kotlin_io_ktor_ktor_utils, kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core) {
2
+ 'use strict';
3
+ //region block: imports
4
+ var imul = Math.imul;
5
+ var VOID = kotlin_kotlin.$_$.c;
6
+ var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.g1;
7
+ var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.m;
8
+ var encode = kotlin_io_ktor_ktor_io.$_$.r;
9
+ var Unit_instance = kotlin_kotlin.$_$.r5;
10
+ var Exception = kotlin_kotlin.$_$.mk;
11
+ var Exception_init_$Init$ = kotlin_kotlin.$_$.p1;
12
+ var captureStack = kotlin_kotlin.$_$.ad;
13
+ var protoOf = kotlin_kotlin.$_$.te;
14
+ var initMetadataForClass = kotlin_kotlin.$_$.qd;
15
+ var takeWhile = kotlin_io_ktor_ktor_io.$_$.a1;
16
+ var charArray = kotlin_kotlin.$_$.cd;
17
+ var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.w2;
18
+ var concatToString = kotlin_kotlin.$_$.pg;
19
+ var charCodeAt = kotlin_kotlin.$_$.dd;
20
+ var substring = kotlin_kotlin.$_$.ri;
21
+ var toString = kotlin_kotlin.$_$.we;
22
+ var Char__plus_impl_qi7pgj = kotlin_kotlin.$_$.a3;
23
+ var Char__minus_impl_a2frrh = kotlin_kotlin.$_$.z2;
24
+ var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.f1;
25
+ var charSequenceGet = kotlin_kotlin.$_$.ed;
26
+ var charSequenceLength = kotlin_kotlin.$_$.fd;
27
+ var charSequenceSubSequence = kotlin_kotlin.$_$.gd;
28
+ var toString_0 = kotlin_kotlin.$_$.d3;
29
+ var toByte = kotlin_kotlin.$_$.ue;
30
+ var decodeToString = kotlin_kotlin.$_$.ug;
31
+ var Char__minus_impl_a2frrh_0 = kotlin_kotlin.$_$.y2;
32
+ var Char = kotlin_kotlin.$_$.ek;
33
+ var toByteArray = kotlin_io_ktor_ktor_io.$_$.b1;
34
+ var numberToChar = kotlin_kotlin.$_$.pe;
35
+ var isSurrogate = kotlin_kotlin.$_$.mh;
36
+ var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.c3;
37
+ var canRead = kotlin_io_ktor_ktor_io.$_$.x;
38
+ var Char__rangeTo_impl_tkncvp = kotlin_kotlin.$_$.b3;
39
+ var plus = kotlin_kotlin.$_$.s9;
40
+ var plus_0 = kotlin_kotlin.$_$.t9;
41
+ var collectionSizeOrDefault = kotlin_kotlin.$_$.y6;
42
+ var ArrayList_init_$Create$ = kotlin_kotlin.$_$.l;
43
+ var toSet = kotlin_kotlin.$_$.sa;
44
+ var setOf = kotlin_kotlin.$_$.z9;
45
+ var plus_1 = kotlin_kotlin.$_$.q9;
46
+ var listOf = kotlin_kotlin.$_$.f9;
47
+ var last = kotlin_kotlin.$_$.z8;
48
+ var initMetadataForCompanion = kotlin_kotlin.$_$.rd;
49
+ var emptyList = kotlin_kotlin.$_$.y7;
50
+ var plus_2 = kotlin_kotlin.$_$.u9;
51
+ var equals = kotlin_kotlin.$_$.jd;
52
+ var getStringHashCode = kotlin_kotlin.$_$.od;
53
+ var hashCode = kotlin_kotlin.$_$.pd;
54
+ var startsWith = kotlin_kotlin.$_$.gi;
55
+ var objectCreate = kotlin_kotlin.$_$.se;
56
+ var equals_0 = kotlin_kotlin.$_$.bh;
57
+ var Collection = kotlin_kotlin.$_$.a6;
58
+ var isInterface = kotlin_kotlin.$_$.fe;
59
+ var isBlank = kotlin_kotlin.$_$.gh;
60
+ var indexOf = kotlin_kotlin.$_$.fh;
61
+ var THROW_CCE = kotlin_kotlin.$_$.wk;
62
+ var isCharSequence = kotlin_kotlin.$_$.be;
63
+ var trim = kotlin_kotlin.$_$.uj;
64
+ var substring_0 = kotlin_kotlin.$_$.qi;
65
+ var contains = kotlin_kotlin.$_$.sg;
66
+ var initMetadataForObject = kotlin_kotlin.$_$.wd;
67
+ var startsWith_0 = kotlin_kotlin.$_$.ii;
68
+ var forName = kotlin_io_ktor_ktor_io.$_$.s;
69
+ var IllegalArgumentException = kotlin_kotlin.$_$.nk;
70
+ var get_name = kotlin_io_ktor_ktor_io.$_$.t;
71
+ var get_lastIndex = kotlin_kotlin.$_$.v8;
72
+ var first = kotlin_kotlin.$_$.ch;
73
+ var last_0 = kotlin_kotlin.$_$.sh;
74
+ var get_lastIndex_0 = kotlin_kotlin.$_$.ph;
75
+ var StringValuesBuilderImpl = kotlin_io_ktor_ktor_utils.$_$.r;
76
+ var listOf_0 = kotlin_kotlin.$_$.e9;
77
+ var emptySet = kotlin_kotlin.$_$.a8;
78
+ var get = kotlin_io_ktor_ktor_utils.$_$.q;
79
+ var forEach = kotlin_io_ktor_ktor_utils.$_$.p;
80
+ var StringValues = kotlin_io_ktor_ktor_utils.$_$.u;
81
+ var StringValuesImpl = kotlin_io_ktor_ktor_utils.$_$.s;
82
+ var emptyMap = kotlin_kotlin.$_$.z7;
83
+ var StringValuesSingleImpl = kotlin_io_ktor_ktor_utils.$_$.t;
84
+ var toDoubleOrNull = kotlin_kotlin.$_$.wi;
85
+ var LazyThreadSafetyMode_NONE_getInstance = kotlin_kotlin.$_$.g;
86
+ var lazy = kotlin_kotlin.$_$.tl;
87
+ var to = kotlin_kotlin.$_$.cm;
88
+ var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.m;
89
+ var asList = kotlin_kotlin.$_$.r6;
90
+ var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.x2;
91
+ var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.u1;
92
+ var toLong = kotlin_kotlin.$_$.dj;
93
+ var mapCapacity = kotlin_kotlin.$_$.g9;
94
+ var coerceAtLeast = kotlin_kotlin.$_$.df;
95
+ var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.u;
96
+ var Comparable = kotlin_kotlin.$_$.gk;
97
+ var addAll = kotlin_kotlin.$_$.o6;
98
+ var joinTo = kotlin_kotlin.$_$.s8;
99
+ var toString_1 = kotlin_kotlin.$_$.bm;
100
+ var initMetadataForInterface = kotlin_kotlin.$_$.ud;
101
+ var isWhitespace = kotlin_kotlin.$_$.oh;
102
+ var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.v1;
103
+ var startsWith_1 = kotlin_kotlin.$_$.hi;
104
+ var charArrayOf = kotlin_kotlin.$_$.bd;
105
+ var split = kotlin_kotlin.$_$.ei;
106
+ var toMutableList = kotlin_kotlin.$_$.qa;
107
+ var first_0 = kotlin_kotlin.$_$.g8;
108
+ var joinToString = kotlin_kotlin.$_$.r8;
109
+ var toCharArray = kotlin_io_ktor_ktor_utils.$_$.y;
110
+ var indexOfAny = kotlin_kotlin.$_$.dh;
111
+ var dropLast = kotlin_kotlin.$_$.u7;
112
+ var IllegalStateException = kotlin_kotlin.$_$.ok;
113
+ var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.c2;
114
+ var indexOf_0 = kotlin_kotlin.$_$.eh;
115
+ var toInt = kotlin_kotlin.$_$.aj;
116
+ var toLowerCasePreservingASCIIRules = kotlin_io_ktor_ktor_utils.$_$.z;
117
+ var isLowerCase = kotlin_io_ktor_ktor_utils.$_$.w;
118
+ var appendAll = kotlin_io_ktor_ktor_utils.$_$.v;
119
+ var lazy_0 = kotlin_kotlin.$_$.ul;
120
+ var KProperty1 = kotlin_kotlin.$_$.vf;
121
+ var getPropertyCallableRef = kotlin_kotlin.$_$.nd;
122
+ var getKClassFromExpression = kotlin_kotlin.$_$.pf;
123
+ var STRING_getInstance = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.g;
124
+ var PrimitiveSerialDescriptor = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.c1;
125
+ var KSerializer = kotlin_org_jetbrains_kotlinx_kotlinx_serialization_core.$_$.k2;
126
+ var fromInt = kotlin_kotlin.$_$.lc;
127
+ var take = kotlin_kotlin.$_$.si;
128
+ var PlatformUtils_getInstance = kotlin_io_ktor_ktor_utils.$_$.a;
129
+ //endregion
130
+ //region block: pre-declaration
131
+ initMetadataForClass(URLDecodeException, 'URLDecodeException', VOID, Exception);
132
+ initMetadataForCompanion(Companion);
133
+ initMetadataForClass(HeaderValueWithParameters, 'HeaderValueWithParameters');
134
+ initMetadataForClass(ContentDisposition, 'ContentDisposition', VOID, HeaderValueWithParameters);
135
+ initMetadataForCompanion(Companion_0);
136
+ initMetadataForObject(Application, 'Application');
137
+ initMetadataForObject(MultiPart, 'MultiPart');
138
+ initMetadataForObject(Text, 'Text');
139
+ initMetadataForClass(ContentType, 'ContentType', VOID, HeaderValueWithParameters);
140
+ initMetadataForClass(BadContentTypeFormatException, 'BadContentTypeFormatException', VOID, Exception);
141
+ initMetadataForCompanion(Companion_1);
142
+ initMetadataForCompanion(Companion_2);
143
+ initMetadataForClass(HeadersBuilder, 'HeadersBuilder', HeadersBuilder, StringValuesBuilderImpl);
144
+ initMetadataForObject(EmptyHeaders, 'EmptyHeaders', VOID, VOID, [StringValues]);
145
+ initMetadataForClass(HeadersImpl, 'HeadersImpl', HeadersImpl, StringValuesImpl, [StringValues, StringValuesImpl]);
146
+ initMetadataForClass(HeadersSingleImpl, 'HeadersSingleImpl', VOID, StringValuesSingleImpl, [StringValues, StringValuesSingleImpl]);
147
+ initMetadataForClass(HeaderValueParam, 'HeaderValueParam');
148
+ initMetadataForClass(HeaderValue, 'HeaderValue');
149
+ initMetadataForObject(HttpHeaders, 'HttpHeaders');
150
+ initMetadataForClass(UnsafeHeaderException, 'UnsafeHeaderException', VOID, IllegalArgumentException);
151
+ initMetadataForClass(IllegalHeaderNameException, 'IllegalHeaderNameException', VOID, IllegalArgumentException);
152
+ initMetadataForClass(IllegalHeaderValueException, 'IllegalHeaderValueException', VOID, IllegalArgumentException);
153
+ initMetadataForCompanion(Companion_3);
154
+ initMetadataForClass(HttpMethod, 'HttpMethod');
155
+ initMetadataForCompanion(Companion_4);
156
+ initMetadataForClass(HttpProtocolVersion, 'HttpProtocolVersion');
157
+ initMetadataForCompanion(Companion_5);
158
+ initMetadataForClass(HttpStatusCode, 'HttpStatusCode', VOID, VOID, [Comparable]);
159
+ initMetadataForCompanion(Companion_6);
160
+ initMetadataForInterface(Parameters, 'Parameters', VOID, VOID, [StringValues]);
161
+ initMetadataForObject(EmptyParameters, 'EmptyParameters', VOID, VOID, [Parameters]);
162
+ initMetadataForClass(ParametersBuilderImpl, 'ParametersBuilderImpl', ParametersBuilderImpl, StringValuesBuilderImpl);
163
+ initMetadataForClass(ParametersImpl, 'ParametersImpl', ParametersImpl, StringValuesImpl, [Parameters, StringValuesImpl]);
164
+ initMetadataForCompanion(Companion_7);
165
+ initMetadataForClass(URLBuilder, 'URLBuilder', URLBuilder);
166
+ initMetadataForClass(URLParserException, 'URLParserException', VOID, IllegalStateException);
167
+ initMetadataForCompanion(Companion_8);
168
+ initMetadataForClass(URLProtocol, 'URLProtocol');
169
+ initMetadataForCompanion(Companion_9);
170
+ initMetadataForClass(Url_0, 'Url', VOID, VOID, VOID, VOID, VOID, {0: UrlSerializer_getInstance});
171
+ initMetadataForObject(UrlSerializer, 'UrlSerializer', VOID, VOID, [KSerializer]);
172
+ initMetadataForClass(UrlDecodedParametersBuilder, 'UrlDecodedParametersBuilder');
173
+ initMetadataForInterface(MultiPartData, 'MultiPartData', VOID, VOID, VOID, [0]);
174
+ initMetadataForClass(PartData, 'PartData');
175
+ initMetadataForClass(FormItem, 'FormItem', VOID, PartData);
176
+ initMetadataForClass(FileItem, 'FileItem', VOID, PartData);
177
+ initMetadataForClass(BinaryItem, 'BinaryItem', VOID, PartData);
178
+ initMetadataForClass(BinaryChannelItem, 'BinaryChannelItem', VOID, PartData);
179
+ initMetadataForClass(OutgoingContent, 'OutgoingContent');
180
+ initMetadataForClass(NoContent, 'NoContent', VOID, OutgoingContent);
181
+ initMetadataForClass(ReadChannelContent, 'ReadChannelContent', VOID, OutgoingContent);
182
+ initMetadataForClass(WriteChannelContent, 'WriteChannelContent', VOID, OutgoingContent, VOID, [1]);
183
+ initMetadataForClass(ByteArrayContent, 'ByteArrayContent', VOID, OutgoingContent);
184
+ initMetadataForClass(ProtocolUpgrade, 'ProtocolUpgrade', VOID, OutgoingContent, VOID, [4]);
185
+ initMetadataForClass(ContentWrapper, 'ContentWrapper', VOID, OutgoingContent);
186
+ initMetadataForObject(NullBody, 'NullBody');
187
+ initMetadataForClass(TextContent, 'TextContent', VOID, ByteArrayContent);
188
+ //endregion
189
+ function get_URL_ALPHABET() {
190
+ _init_properties_Codecs_kt__fudxxf();
191
+ return URL_ALPHABET;
192
+ }
193
+ var URL_ALPHABET;
194
+ function get_URL_ALPHABET_CHARS() {
195
+ _init_properties_Codecs_kt__fudxxf();
196
+ return URL_ALPHABET_CHARS;
197
+ }
198
+ var URL_ALPHABET_CHARS;
199
+ function get_HEX_ALPHABET() {
200
+ _init_properties_Codecs_kt__fudxxf();
201
+ return HEX_ALPHABET;
202
+ }
203
+ var HEX_ALPHABET;
204
+ function get_URL_PROTOCOL_PART() {
205
+ _init_properties_Codecs_kt__fudxxf();
206
+ return URL_PROTOCOL_PART;
207
+ }
208
+ var URL_PROTOCOL_PART;
209
+ function get_VALID_PATH_PART() {
210
+ _init_properties_Codecs_kt__fudxxf();
211
+ return VALID_PATH_PART;
212
+ }
213
+ var VALID_PATH_PART;
214
+ function get_ATTRIBUTE_CHARACTERS() {
215
+ _init_properties_Codecs_kt__fudxxf();
216
+ return ATTRIBUTE_CHARACTERS;
217
+ }
218
+ var ATTRIBUTE_CHARACTERS;
219
+ function get_SPECIAL_SYMBOLS() {
220
+ _init_properties_Codecs_kt__fudxxf();
221
+ return SPECIAL_SYMBOLS;
222
+ }
223
+ var SPECIAL_SYMBOLS;
224
+ function encodeURLParameter(_this__u8e3s4, spaceToPlus) {
225
+ spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus;
226
+ _init_properties_Codecs_kt__fudxxf();
227
+ // Inline function 'kotlin.text.buildString' call
228
+ // Inline function 'kotlin.apply' call
229
+ var this_0 = StringBuilder_init_$Create$();
230
+ var content = encode(Charsets_getInstance().j1z_1.n1z(), _this__u8e3s4);
231
+ forEach_0(content, encodeURLParameter$lambda(this_0, spaceToPlus));
232
+ return this_0.toString();
233
+ }
234
+ function URLDecodeException(message) {
235
+ Exception_init_$Init$(message, this);
236
+ captureStack(this, URLDecodeException);
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().j1z_1 : charset;
242
+ _init_properties_Codecs_kt__fudxxf();
243
+ return decodeScan(_this__u8e3s4, start, end, false, charset);
244
+ }
245
+ function forEach_0(_this__u8e3s4, block) {
246
+ _init_properties_Codecs_kt__fudxxf();
247
+ takeWhile(_this__u8e3s4, forEach$lambda(block));
248
+ }
249
+ function percentEncode(_this__u8e3s4) {
250
+ _init_properties_Codecs_kt__fudxxf();
251
+ var code = _this__u8e3s4 & 255;
252
+ var array = charArray(3);
253
+ array[0] = _Char___init__impl__6a9atx(37);
254
+ array[1] = hexDigitToChar(code >> 4);
255
+ array[2] = hexDigitToChar(code & 15);
256
+ return concatToString(array);
257
+ }
258
+ function decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset) {
259
+ _init_properties_Codecs_kt__fudxxf();
260
+ var inductionVariable = start;
261
+ if (inductionVariable < end)
262
+ do {
263
+ var index = inductionVariable;
264
+ inductionVariable = inductionVariable + 1 | 0;
265
+ var ch = charCodeAt(_this__u8e3s4, index);
266
+ if (ch === _Char___init__impl__6a9atx(37) || (plusIsSpace && ch === _Char___init__impl__6a9atx(43))) {
267
+ return decodeImpl(_this__u8e3s4, start, end, index, plusIsSpace, charset);
268
+ }
269
+ }
270
+ while (inductionVariable < end);
271
+ return start === 0 && end === _this__u8e3s4.length ? toString(_this__u8e3s4) : substring(_this__u8e3s4, start, end);
272
+ }
273
+ function hexDigitToChar(digit) {
274
+ _init_properties_Codecs_kt__fudxxf();
275
+ 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);
276
+ }
277
+ function decodeImpl(_this__u8e3s4, start, end, prefixEnd, plusIsSpace, charset) {
278
+ _init_properties_Codecs_kt__fudxxf();
279
+ var length = end - start | 0;
280
+ var sbSize = length > 255 ? length / 3 | 0 : length;
281
+ var sb = StringBuilder_init_$Create$_0(sbSize);
282
+ if (prefixEnd > start) {
283
+ sb.pc(_this__u8e3s4, start, prefixEnd);
284
+ }
285
+ var index = prefixEnd;
286
+ var bytes = null;
287
+ while (index < end) {
288
+ var c = charSequenceGet(_this__u8e3s4, index);
289
+ if (plusIsSpace && c === _Char___init__impl__6a9atx(43)) {
290
+ sb.a8(_Char___init__impl__6a9atx(32));
291
+ index = index + 1 | 0;
292
+ } else if (c === _Char___init__impl__6a9atx(37)) {
293
+ if (bytes == null) {
294
+ bytes = new Int8Array((end - index | 0) / 3 | 0);
295
+ }
296
+ var count = 0;
297
+ while (index < end && charSequenceGet(_this__u8e3s4, index) === _Char___init__impl__6a9atx(37)) {
298
+ if ((index + 2 | 0) >= end) {
299
+ // Inline function 'kotlin.text.substring' call
300
+ var startIndex = index;
301
+ var endIndex = charSequenceLength(_this__u8e3s4);
302
+ var tmp$ret$0 = toString(charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex));
303
+ throw new URLDecodeException('Incomplete trailing HEX escape: ' + tmp$ret$0 + ', in ' + toString(_this__u8e3s4) + ' at ' + index);
304
+ }
305
+ var digit1 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 1 | 0));
306
+ var digit2 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 2 | 0));
307
+ if (digit1 === -1 || digit2 === -1) {
308
+ 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);
309
+ }
310
+ var tmp = bytes;
311
+ var _unary__edvuaz = count;
312
+ count = _unary__edvuaz + 1 | 0;
313
+ tmp[_unary__edvuaz] = toByte(imul(digit1, 16) + digit2 | 0);
314
+ index = index + 3 | 0;
315
+ }
316
+ sb.z7(decodeToString(bytes, 0, 0 + count | 0));
317
+ } else {
318
+ sb.a8(c);
319
+ index = index + 1 | 0;
320
+ }
321
+ }
322
+ return sb.toString();
323
+ }
324
+ function charToHexDigit(c2) {
325
+ _init_properties_Codecs_kt__fudxxf();
326
+ 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;
327
+ }
328
+ function percentEncode_0(_this__u8e3s4, allowedSet) {
329
+ _init_properties_Codecs_kt__fudxxf();
330
+ // Inline function 'kotlin.text.count' call
331
+ var count = 0;
332
+ var inductionVariable = 0;
333
+ while (inductionVariable < charSequenceLength(_this__u8e3s4)) {
334
+ var element = charSequenceGet(_this__u8e3s4, inductionVariable);
335
+ inductionVariable = inductionVariable + 1 | 0;
336
+ if (!allowedSet.t(new Char(element))) {
337
+ count = count + 1 | 0;
338
+ }
339
+ }
340
+ var encodedCount = count;
341
+ if (encodedCount === 0)
342
+ return _this__u8e3s4;
343
+ var content = toByteArray(_this__u8e3s4, Charsets_getInstance().j1z_1);
344
+ var rawCount = _this__u8e3s4.length - encodedCount | 0;
345
+ var resultSize = rawCount + imul(content.length - rawCount | 0, 3) | 0;
346
+ var result = charArray(resultSize);
347
+ var writeIndex = 0;
348
+ // Inline function 'kotlin.collections.forEach' call
349
+ var inductionVariable_0 = 0;
350
+ var last = content.length;
351
+ while (inductionVariable_0 < last) {
352
+ var element_0 = content[inductionVariable_0];
353
+ inductionVariable_0 = inductionVariable_0 + 1 | 0;
354
+ var char = numberToChar(element_0);
355
+ if (allowedSet.t(new Char(char))) {
356
+ var _unary__edvuaz = writeIndex;
357
+ writeIndex = _unary__edvuaz + 1 | 0;
358
+ result[_unary__edvuaz] = char;
359
+ } else {
360
+ var code = element_0 & 255;
361
+ var _unary__edvuaz_0 = writeIndex;
362
+ writeIndex = _unary__edvuaz_0 + 1 | 0;
363
+ result[_unary__edvuaz_0] = _Char___init__impl__6a9atx(37);
364
+ var _unary__edvuaz_1 = writeIndex;
365
+ writeIndex = _unary__edvuaz_1 + 1 | 0;
366
+ result[_unary__edvuaz_1] = hexDigitToChar(code >> 4);
367
+ var _unary__edvuaz_2 = writeIndex;
368
+ writeIndex = _unary__edvuaz_2 + 1 | 0;
369
+ result[_unary__edvuaz_2] = hexDigitToChar(code & 15);
370
+ }
371
+ }
372
+ return concatToString(result);
373
+ }
374
+ function decodeURLQueryComponent(_this__u8e3s4, start, end, plusIsSpace, charset) {
375
+ start = start === VOID ? 0 : start;
376
+ end = end === VOID ? _this__u8e3s4.length : end;
377
+ plusIsSpace = plusIsSpace === VOID ? false : plusIsSpace;
378
+ charset = charset === VOID ? Charsets_getInstance().j1z_1 : charset;
379
+ _init_properties_Codecs_kt__fudxxf();
380
+ return decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset);
381
+ }
382
+ function encodeURLQueryComponent(_this__u8e3s4, encodeFull, spaceToPlus, charset) {
383
+ encodeFull = encodeFull === VOID ? false : encodeFull;
384
+ spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus;
385
+ charset = charset === VOID ? Charsets_getInstance().j1z_1 : charset;
386
+ _init_properties_Codecs_kt__fudxxf();
387
+ // Inline function 'kotlin.text.buildString' call
388
+ // Inline function 'kotlin.apply' call
389
+ var this_0 = StringBuilder_init_$Create$();
390
+ var content = encode(charset.n1z(), _this__u8e3s4);
391
+ forEach_0(content, encodeURLQueryComponent$lambda(spaceToPlus, this_0, encodeFull));
392
+ return this_0.toString();
393
+ }
394
+ function encodeURLPathPart(_this__u8e3s4) {
395
+ _init_properties_Codecs_kt__fudxxf();
396
+ return encodeURLPath(_this__u8e3s4, true);
397
+ }
398
+ function encodeURLParameterValue(_this__u8e3s4) {
399
+ _init_properties_Codecs_kt__fudxxf();
400
+ return encodeURLParameter(_this__u8e3s4, true);
401
+ }
402
+ function encodeURLPath(_this__u8e3s4, encodeSlash, encodeEncoded) {
403
+ encodeSlash = encodeSlash === VOID ? false : encodeSlash;
404
+ encodeEncoded = encodeEncoded === VOID ? true : encodeEncoded;
405
+ _init_properties_Codecs_kt__fudxxf();
406
+ // Inline function 'kotlin.text.buildString' call
407
+ // Inline function 'kotlin.apply' call
408
+ var this_0 = StringBuilder_init_$Create$();
409
+ var charset = Charsets_getInstance().j1z_1;
410
+ var index = 0;
411
+ $l$loop_0: while (index < _this__u8e3s4.length) {
412
+ var current = charCodeAt(_this__u8e3s4, index);
413
+ if (!encodeSlash && current === _Char___init__impl__6a9atx(47) || get_URL_ALPHABET_CHARS().t(new Char(current)) || get_VALID_PATH_PART().t(new Char(current))) {
414
+ this_0.a8(current);
415
+ index = index + 1 | 0;
416
+ continue $l$loop_0;
417
+ }
418
+ if (!encodeEncoded && current === _Char___init__impl__6a9atx(37) && (index + 2 | 0) < _this__u8e3s4.length && get_HEX_ALPHABET().t(new Char(charCodeAt(_this__u8e3s4, index + 1 | 0))) && get_HEX_ALPHABET().t(new Char(charCodeAt(_this__u8e3s4, index + 2 | 0)))) {
419
+ this_0.a8(current);
420
+ this_0.a8(charCodeAt(_this__u8e3s4, index + 1 | 0));
421
+ this_0.a8(charCodeAt(_this__u8e3s4, index + 2 | 0));
422
+ index = index + 3 | 0;
423
+ continue $l$loop_0;
424
+ }
425
+ var symbolSize = isSurrogate(current) ? 2 : 1;
426
+ var tmp = encode(charset.n1z(), _this__u8e3s4, index, index + symbolSize | 0);
427
+ forEach_0(tmp, encodeURLPath$lambda(this_0));
428
+ index = index + symbolSize | 0;
429
+ }
430
+ return this_0.toString();
431
+ }
432
+ function encodeURLParameter$lambda($$this$buildString, $spaceToPlus) {
433
+ return function (it) {
434
+ if (get_URL_ALPHABET().t(it) || get_SPECIAL_SYMBOLS().t(it))
435
+ $$this$buildString.a8(numberToChar(it));
436
+ else {
437
+ var tmp;
438
+ if ($spaceToPlus) {
439
+ var tmp_0 = it;
440
+ // Inline function 'kotlin.code' call
441
+ var this_0 = _Char___init__impl__6a9atx(32);
442
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
443
+ tmp = tmp_0 === toByte(tmp$ret$0);
444
+ } else {
445
+ tmp = false;
446
+ }
447
+ if (tmp)
448
+ $$this$buildString.a8(_Char___init__impl__6a9atx(43));
449
+ else {
450
+ $$this$buildString.z7(percentEncode(it));
451
+ }
452
+ }
453
+ return Unit_instance;
454
+ };
455
+ }
456
+ function forEach$lambda($block) {
457
+ return function (buffer) {
458
+ while (canRead(buffer)) {
459
+ $block(buffer.ns());
460
+ }
461
+ return true;
462
+ };
463
+ }
464
+ function encodeURLQueryComponent$lambda($spaceToPlus, $$this$buildString, $encodeFull) {
465
+ return function (it) {
466
+ var tmp = it;
467
+ // Inline function 'kotlin.code' call
468
+ var this_0 = _Char___init__impl__6a9atx(32);
469
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
470
+ if (tmp === toByte(tmp$ret$0))
471
+ if ($spaceToPlus)
472
+ $$this$buildString.a8(_Char___init__impl__6a9atx(43));
473
+ else
474
+ $$this$buildString.z7('%20');
475
+ else {
476
+ if (get_URL_ALPHABET().t(it) || (!$encodeFull && get_URL_PROTOCOL_PART().t(it)))
477
+ $$this$buildString.a8(numberToChar(it));
478
+ else {
479
+ $$this$buildString.z7(percentEncode(it));
480
+ }
481
+ }
482
+ return Unit_instance;
483
+ };
484
+ }
485
+ function encodeURLPath$lambda($$this$buildString) {
486
+ return function (it) {
487
+ $$this$buildString.z7(percentEncode(it));
488
+ return Unit_instance;
489
+ };
490
+ }
491
+ var properties_initialized_Codecs_kt_hkj9s1;
492
+ function _init_properties_Codecs_kt__fudxxf() {
493
+ if (!properties_initialized_Codecs_kt_hkj9s1) {
494
+ properties_initialized_Codecs_kt_hkj9s1 = true;
495
+ // Inline function 'kotlin.collections.map' call
496
+ 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)));
497
+ // Inline function 'kotlin.collections.mapTo' call
498
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
499
+ var _iterator__ex2g4s = this_0.l();
500
+ while (_iterator__ex2g4s.m()) {
501
+ var item = _iterator__ex2g4s.n();
502
+ // Inline function 'kotlin.code' call
503
+ var this_1 = item.l1_1;
504
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_1);
505
+ var tmp$ret$1 = toByte(tmp$ret$0);
506
+ destination.j(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 _iterator__ex2g4s_0 = this_2.l();
516
+ while (_iterator__ex2g4s_0.m()) {
517
+ var item_0 = _iterator__ex2g4s_0.n();
518
+ // Inline function 'kotlin.code' call
519
+ var this_3 = item_0.l1_1;
520
+ var tmp$ret$0_0 = Char__toInt_impl_vasixd(this_3);
521
+ var tmp$ret$1_0 = toByte(tmp$ret$0_0);
522
+ destination_0.j(tmp$ret$1_0);
523
+ }
524
+ URL_PROTOCOL_PART = destination_0;
525
+ 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))]);
526
+ 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))]));
527
+ // Inline function 'kotlin.collections.map' call
528
+ 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))]);
529
+ // Inline function 'kotlin.collections.mapTo' call
530
+ var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_4, 10));
531
+ var _iterator__ex2g4s_1 = this_4.l();
532
+ while (_iterator__ex2g4s_1.m()) {
533
+ var item_1 = _iterator__ex2g4s_1.n();
534
+ // Inline function 'kotlin.code' call
535
+ var this_5 = item_1.l1_1;
536
+ var tmp$ret$0_1 = Char__toInt_impl_vasixd(this_5);
537
+ var tmp$ret$1_1 = toByte(tmp$ret$0_1);
538
+ destination_1.j(tmp$ret$1_1);
539
+ }
540
+ SPECIAL_SYMBOLS = destination_1;
541
+ }
542
+ }
543
+ function Companion() {
544
+ Companion_instance = this;
545
+ this.n2r_1 = new ContentDisposition('file');
546
+ this.o2r_1 = new ContentDisposition('mixed');
547
+ this.p2r_1 = new ContentDisposition('attachment');
548
+ this.q2r_1 = new ContentDisposition('inline');
549
+ }
550
+ protoOf(Companion).tp = function (value) {
551
+ // Inline function 'io.ktor.http.Companion.parse' call
552
+ var headerValue = last(parseHeaderValue(value));
553
+ var tmp0 = headerValue.r2r_1;
554
+ var p = headerValue.s2r_1;
555
+ return new ContentDisposition(tmp0, p);
556
+ };
557
+ var Companion_instance;
558
+ function Companion_getInstance() {
559
+ if (Companion_instance == null)
560
+ new Companion();
561
+ return Companion_instance;
562
+ }
563
+ function ContentDisposition(disposition, parameters) {
564
+ Companion_getInstance();
565
+ parameters = parameters === VOID ? emptyList() : parameters;
566
+ HeaderValueWithParameters.call(this, disposition, parameters);
567
+ }
568
+ protoOf(ContentDisposition).w2r = function () {
569
+ return this.x2r_1;
570
+ };
571
+ protoOf(ContentDisposition).z2r = function (key, value, encodeValue) {
572
+ var tmp;
573
+ if (encodeValue) {
574
+ tmp = encodeContentDispositionAttribute(key, value);
575
+ } else {
576
+ tmp = value;
577
+ }
578
+ var encodedValue = tmp;
579
+ return new ContentDisposition(this.w2r(), plus_2(this.y2r_1, HeaderValueParam_init_$Create$(key, encodedValue)));
580
+ };
581
+ protoOf(ContentDisposition).a2s = function (key, value, encodeValue, $super) {
582
+ encodeValue = encodeValue === VOID ? true : encodeValue;
583
+ return $super === VOID ? this.z2r(key, value, encodeValue) : $super.z2r.call(this, key, value, encodeValue);
584
+ };
585
+ protoOf(ContentDisposition).equals = function (other) {
586
+ var tmp;
587
+ var tmp_0;
588
+ if (other instanceof ContentDisposition) {
589
+ tmp_0 = this.w2r() === other.w2r();
590
+ } else {
591
+ tmp_0 = false;
592
+ }
593
+ if (tmp_0) {
594
+ tmp = equals(this.y2r_1, other.y2r_1);
595
+ } else {
596
+ tmp = false;
597
+ }
598
+ return tmp;
599
+ };
600
+ protoOf(ContentDisposition).hashCode = function () {
601
+ return imul(getStringHashCode(this.w2r()), 31) + hashCode(this.y2r_1) | 0;
602
+ };
603
+ function encodeContentDispositionAttribute(key, value) {
604
+ if (!(key === 'filename*'))
605
+ return value;
606
+ if (startsWith(value, "utf-8''", true))
607
+ return value;
608
+ var tmp$ret$1;
609
+ $l$block: {
610
+ // Inline function 'kotlin.text.all' call
611
+ var inductionVariable = 0;
612
+ while (inductionVariable < charSequenceLength(value)) {
613
+ var element = charSequenceGet(value, inductionVariable);
614
+ inductionVariable = inductionVariable + 1 | 0;
615
+ if (!get_ATTRIBUTE_CHARACTERS().t(new Char(element))) {
616
+ tmp$ret$1 = false;
617
+ break $l$block;
618
+ }
619
+ }
620
+ tmp$ret$1 = true;
621
+ }
622
+ if (tmp$ret$1)
623
+ return value;
624
+ var encodedValue = percentEncode_0(value, get_ATTRIBUTE_CHARACTERS());
625
+ return "utf-8''" + encodedValue;
626
+ }
627
+ function ContentType_init_$Init$(contentType, contentSubtype, parameters, $this) {
628
+ parameters = parameters === VOID ? emptyList() : parameters;
629
+ ContentType.call($this, contentType, contentSubtype, contentType + '/' + contentSubtype, parameters);
630
+ return $this;
631
+ }
632
+ function ContentType_init_$Create$(contentType, contentSubtype, parameters) {
633
+ return ContentType_init_$Init$(contentType, contentSubtype, parameters, objectCreate(protoOf(ContentType)));
634
+ }
635
+ function hasParameter($this, name, value) {
636
+ var tmp;
637
+ switch ($this.y2r_1.o()) {
638
+ case 0:
639
+ tmp = false;
640
+ break;
641
+ case 1:
642
+ // Inline function 'kotlin.let' call
643
+
644
+ var it = $this.y2r_1.p(0);
645
+ tmp = (equals_0(it.c2s_1, name, true) && equals_0(it.d2s_1, value, true));
646
+ break;
647
+ default:
648
+ var tmp0 = $this.y2r_1;
649
+ var tmp$ret$2;
650
+ $l$block_0: {
651
+ // Inline function 'kotlin.collections.any' call
652
+ var tmp_0;
653
+ if (isInterface(tmp0, Collection)) {
654
+ tmp_0 = tmp0.r();
655
+ } else {
656
+ tmp_0 = false;
657
+ }
658
+ if (tmp_0) {
659
+ tmp$ret$2 = false;
660
+ break $l$block_0;
661
+ }
662
+ var _iterator__ex2g4s = tmp0.l();
663
+ while (_iterator__ex2g4s.m()) {
664
+ var element = _iterator__ex2g4s.n();
665
+ if (equals_0(element.c2s_1, name, true) && equals_0(element.d2s_1, value, true)) {
666
+ tmp$ret$2 = true;
667
+ break $l$block_0;
668
+ }
669
+ }
670
+ tmp$ret$2 = false;
671
+ }
672
+
673
+ tmp = tmp$ret$2;
674
+ break;
675
+ }
676
+ return tmp;
677
+ }
678
+ function Companion_0() {
679
+ Companion_instance_0 = this;
680
+ this.f2s_1 = ContentType_init_$Create$('*', '*');
681
+ }
682
+ protoOf(Companion_0).tp = function (value) {
683
+ if (isBlank(value))
684
+ return this.f2s_1;
685
+ // Inline function 'io.ktor.http.Companion.parse' call
686
+ var headerValue = last(parseHeaderValue(value));
687
+ var tmp0 = headerValue.r2r_1;
688
+ var parameters = headerValue.s2r_1;
689
+ var slash = indexOf(tmp0, _Char___init__impl__6a9atx(47));
690
+ if (slash === -1) {
691
+ // Inline function 'kotlin.text.trim' call
692
+ if (toString(trim(isCharSequence(tmp0) ? tmp0 : THROW_CCE())) === '*')
693
+ return Companion_getInstance_0().f2s_1;
694
+ throw new BadContentTypeFormatException(value);
695
+ }
696
+ // Inline function 'kotlin.text.trim' call
697
+ var this_0 = substring(tmp0, 0, slash);
698
+ var type = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
699
+ // Inline function 'kotlin.text.isEmpty' call
700
+ if (charSequenceLength(type) === 0) {
701
+ throw new BadContentTypeFormatException(value);
702
+ }
703
+ // Inline function 'kotlin.text.trim' call
704
+ var this_1 = substring_0(tmp0, slash + 1 | 0);
705
+ var subtype = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE()));
706
+ if (contains(type, _Char___init__impl__6a9atx(32)) || contains(subtype, _Char___init__impl__6a9atx(32))) {
707
+ throw new BadContentTypeFormatException(value);
708
+ }
709
+ var tmp;
710
+ // Inline function 'kotlin.text.isEmpty' call
711
+ if (charSequenceLength(subtype) === 0) {
712
+ tmp = true;
713
+ } else {
714
+ tmp = contains(subtype, _Char___init__impl__6a9atx(47));
715
+ }
716
+ if (tmp) {
717
+ throw new BadContentTypeFormatException(value);
718
+ }
719
+ return ContentType_init_$Create$(type, subtype, parameters);
720
+ };
721
+ var Companion_instance_0;
722
+ function Companion_getInstance_0() {
723
+ if (Companion_instance_0 == null)
724
+ new Companion_0();
725
+ return Companion_instance_0;
726
+ }
727
+ function Application() {
728
+ Application_instance = this;
729
+ this.g2s_1 = 'application';
730
+ this.h2s_1 = ContentType_init_$Create$('application', '*');
731
+ this.i2s_1 = ContentType_init_$Create$('application', 'atom+xml');
732
+ this.j2s_1 = ContentType_init_$Create$('application', 'cbor');
733
+ this.k2s_1 = ContentType_init_$Create$('application', 'json');
734
+ this.l2s_1 = ContentType_init_$Create$('application', 'hal+json');
735
+ this.m2s_1 = ContentType_init_$Create$('application', 'javascript');
736
+ this.n2s_1 = ContentType_init_$Create$('application', 'octet-stream');
737
+ this.o2s_1 = ContentType_init_$Create$('application', 'rss+xml');
738
+ this.p2s_1 = ContentType_init_$Create$('application', 'soap+xml');
739
+ this.q2s_1 = ContentType_init_$Create$('application', 'xml');
740
+ this.r2s_1 = ContentType_init_$Create$('application', 'xml-dtd');
741
+ this.s2s_1 = ContentType_init_$Create$('application', 'yaml');
742
+ this.t2s_1 = ContentType_init_$Create$('application', 'zip');
743
+ this.u2s_1 = ContentType_init_$Create$('application', 'gzip');
744
+ this.v2s_1 = ContentType_init_$Create$('application', 'x-www-form-urlencoded');
745
+ this.w2s_1 = ContentType_init_$Create$('application', 'pdf');
746
+ this.x2s_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.spreadsheetml.sheet');
747
+ this.y2s_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.wordprocessingml.document');
748
+ this.z2s_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.presentationml.presentation');
749
+ this.a2t_1 = ContentType_init_$Create$('application', 'protobuf');
750
+ this.b2t_1 = ContentType_init_$Create$('application', 'wasm');
751
+ this.c2t_1 = ContentType_init_$Create$('application', 'problem+json');
752
+ this.d2t_1 = ContentType_init_$Create$('application', 'problem+xml');
753
+ }
754
+ var Application_instance;
755
+ function Application_getInstance() {
756
+ if (Application_instance == null)
757
+ new Application();
758
+ return Application_instance;
759
+ }
760
+ function MultiPart() {
761
+ MultiPart_instance = this;
762
+ this.e2t_1 = 'multipart';
763
+ this.f2t_1 = ContentType_init_$Create$('multipart', '*');
764
+ this.g2t_1 = ContentType_init_$Create$('multipart', 'mixed');
765
+ this.h2t_1 = ContentType_init_$Create$('multipart', 'alternative');
766
+ this.i2t_1 = ContentType_init_$Create$('multipart', 'related');
767
+ this.j2t_1 = ContentType_init_$Create$('multipart', 'form-data');
768
+ this.k2t_1 = ContentType_init_$Create$('multipart', 'signed');
769
+ this.l2t_1 = ContentType_init_$Create$('multipart', 'encrypted');
770
+ this.m2t_1 = ContentType_init_$Create$('multipart', 'byteranges');
771
+ }
772
+ protoOf(MultiPart).n2t = function (contentType) {
773
+ return startsWith_0(contentType, 'multipart/', true);
774
+ };
775
+ var MultiPart_instance;
776
+ function MultiPart_getInstance() {
777
+ if (MultiPart_instance == null)
778
+ new MultiPart();
779
+ return MultiPart_instance;
780
+ }
781
+ function Text() {
782
+ Text_instance = this;
783
+ this.o2t_1 = 'text';
784
+ this.p2t_1 = ContentType_init_$Create$('text', '*');
785
+ this.q2t_1 = ContentType_init_$Create$('text', 'plain');
786
+ this.r2t_1 = ContentType_init_$Create$('text', 'css');
787
+ this.s2t_1 = ContentType_init_$Create$('text', 'csv');
788
+ this.t2t_1 = ContentType_init_$Create$('text', 'html');
789
+ this.u2t_1 = ContentType_init_$Create$('text', 'javascript');
790
+ this.v2t_1 = ContentType_init_$Create$('text', 'vcard');
791
+ this.w2t_1 = ContentType_init_$Create$('text', 'xml');
792
+ this.x2t_1 = ContentType_init_$Create$('text', 'event-stream');
793
+ }
794
+ var Text_instance;
795
+ function Text_getInstance() {
796
+ if (Text_instance == null)
797
+ new Text();
798
+ return Text_instance;
799
+ }
800
+ function ContentType(contentType, contentSubtype, existingContent, parameters) {
801
+ Companion_getInstance_0();
802
+ parameters = parameters === VOID ? emptyList() : parameters;
803
+ HeaderValueWithParameters.call(this, existingContent, parameters);
804
+ this.a2u_1 = contentType;
805
+ this.b2u_1 = contentSubtype;
806
+ }
807
+ protoOf(ContentType).c2u = function (name, value) {
808
+ if (hasParameter(this, name, value))
809
+ return this;
810
+ return new ContentType(this.a2u_1, this.b2u_1, this.x2r_1, plus_2(this.y2r_1, HeaderValueParam_init_$Create$(name, value)));
811
+ };
812
+ protoOf(ContentType).d2u = function (pattern) {
813
+ if (!(pattern.a2u_1 === '*') && !equals_0(pattern.a2u_1, this.a2u_1, true)) {
814
+ return false;
815
+ }
816
+ if (!(pattern.b2u_1 === '*') && !equals_0(pattern.b2u_1, this.b2u_1, true)) {
817
+ return false;
818
+ }
819
+ var _iterator__ex2g4s = pattern.y2r_1.l();
820
+ while (_iterator__ex2g4s.m()) {
821
+ var _destruct__k2r9zo = _iterator__ex2g4s.n();
822
+ var patternName = _destruct__k2r9zo.ah();
823
+ var patternValue = _destruct__k2r9zo.bh();
824
+ var tmp;
825
+ if (patternName === '*') {
826
+ var tmp_0;
827
+ if (patternValue === '*') {
828
+ tmp_0 = true;
829
+ } else {
830
+ var tmp0 = this.y2r_1;
831
+ var tmp$ret$0;
832
+ $l$block_0: {
833
+ // Inline function 'kotlin.collections.any' call
834
+ var tmp_1;
835
+ if (isInterface(tmp0, Collection)) {
836
+ tmp_1 = tmp0.r();
837
+ } else {
838
+ tmp_1 = false;
839
+ }
840
+ if (tmp_1) {
841
+ tmp$ret$0 = false;
842
+ break $l$block_0;
843
+ }
844
+ var _iterator__ex2g4s_0 = tmp0.l();
845
+ while (_iterator__ex2g4s_0.m()) {
846
+ var element = _iterator__ex2g4s_0.n();
847
+ if (equals_0(element.d2s_1, patternValue, true)) {
848
+ tmp$ret$0 = true;
849
+ break $l$block_0;
850
+ }
851
+ }
852
+ tmp$ret$0 = false;
853
+ }
854
+ tmp_0 = tmp$ret$0;
855
+ }
856
+ tmp = tmp_0;
857
+ } else {
858
+ var value = this.b2s(patternName);
859
+ tmp = patternValue === '*' ? !(value == null) : equals_0(value, patternValue, true);
860
+ }
861
+ var matches = tmp;
862
+ if (!matches) {
863
+ return false;
864
+ }
865
+ }
866
+ return true;
867
+ };
868
+ protoOf(ContentType).equals = function (other) {
869
+ var tmp;
870
+ var tmp_0;
871
+ var tmp_1;
872
+ if (other instanceof ContentType) {
873
+ tmp_1 = equals_0(this.a2u_1, other.a2u_1, true);
874
+ } else {
875
+ tmp_1 = false;
876
+ }
877
+ if (tmp_1) {
878
+ tmp_0 = equals_0(this.b2u_1, other.b2u_1, true);
879
+ } else {
880
+ tmp_0 = false;
881
+ }
882
+ if (tmp_0) {
883
+ tmp = equals(this.y2r_1, other.y2r_1);
884
+ } else {
885
+ tmp = false;
886
+ }
887
+ return tmp;
888
+ };
889
+ protoOf(ContentType).hashCode = function () {
890
+ // Inline function 'kotlin.text.lowercase' call
891
+ // Inline function 'kotlin.js.asDynamic' call
892
+ var tmp$ret$1 = this.a2u_1.toLowerCase();
893
+ var result = getStringHashCode(tmp$ret$1);
894
+ var tmp = result;
895
+ var tmp_0 = imul(31, result);
896
+ // Inline function 'kotlin.text.lowercase' call
897
+ // Inline function 'kotlin.js.asDynamic' call
898
+ var tmp$ret$3 = this.b2u_1.toLowerCase();
899
+ result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0;
900
+ result = result + imul(31, hashCode(this.y2r_1)) | 0;
901
+ return result;
902
+ };
903
+ function charset(_this__u8e3s4) {
904
+ var tmp0_safe_receiver = _this__u8e3s4.b2s('charset');
905
+ var tmp;
906
+ if (tmp0_safe_receiver == null) {
907
+ tmp = null;
908
+ } else {
909
+ // Inline function 'kotlin.let' call
910
+ var tmp_0;
911
+ try {
912
+ tmp_0 = forName(Charsets_getInstance(), tmp0_safe_receiver);
913
+ } catch ($p) {
914
+ var tmp_1;
915
+ if ($p instanceof IllegalArgumentException) {
916
+ var exception = $p;
917
+ tmp_1 = null;
918
+ } else {
919
+ throw $p;
920
+ }
921
+ tmp_0 = tmp_1;
922
+ }
923
+ tmp = tmp_0;
924
+ }
925
+ return tmp;
926
+ }
927
+ function withCharset(_this__u8e3s4, charset) {
928
+ return _this__u8e3s4.c2u('charset', get_name(charset));
929
+ }
930
+ function BadContentTypeFormatException(value) {
931
+ Exception_init_$Init$('Bad Content-Type format: ' + value, this);
932
+ captureStack(this, BadContentTypeFormatException);
933
+ }
934
+ function get_HeaderFieldValueSeparators() {
935
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
936
+ return HeaderFieldValueSeparators;
937
+ }
938
+ var HeaderFieldValueSeparators;
939
+ function Companion_1() {
940
+ }
941
+ var Companion_instance_1;
942
+ function Companion_getInstance_1() {
943
+ return Companion_instance_1;
944
+ }
945
+ function HeaderValueWithParameters(content, parameters) {
946
+ parameters = parameters === VOID ? emptyList() : parameters;
947
+ this.x2r_1 = content;
948
+ this.y2r_1 = parameters;
949
+ }
950
+ protoOf(HeaderValueWithParameters).b2s = function (name) {
951
+ var inductionVariable = 0;
952
+ var last = get_lastIndex(this.y2r_1);
953
+ if (inductionVariable <= last)
954
+ do {
955
+ var index = inductionVariable;
956
+ inductionVariable = inductionVariable + 1 | 0;
957
+ var parameter = this.y2r_1.p(index);
958
+ if (equals_0(parameter.c2s_1, name, true)) {
959
+ return parameter.d2s_1;
960
+ }
961
+ }
962
+ while (!(index === last));
963
+ return null;
964
+ };
965
+ protoOf(HeaderValueWithParameters).toString = function () {
966
+ var tmp;
967
+ if (this.y2r_1.r()) {
968
+ tmp = this.x2r_1;
969
+ } else {
970
+ var tmp_0 = this.x2r_1.length;
971
+ // Inline function 'kotlin.collections.sumOf' call
972
+ var sum = 0;
973
+ var _iterator__ex2g4s = this.y2r_1.l();
974
+ while (_iterator__ex2g4s.m()) {
975
+ var element = _iterator__ex2g4s.n();
976
+ var tmp_1 = sum;
977
+ sum = tmp_1 + ((element.c2s_1.length + element.d2s_1.length | 0) + 3 | 0) | 0;
978
+ }
979
+ var size = tmp_0 + sum | 0;
980
+ // Inline function 'kotlin.apply' call
981
+ var this_0 = StringBuilder_init_$Create$_0(size);
982
+ this_0.z7(this.x2r_1);
983
+ var inductionVariable = 0;
984
+ var last = get_lastIndex(this.y2r_1);
985
+ if (inductionVariable <= last)
986
+ do {
987
+ var index = inductionVariable;
988
+ inductionVariable = inductionVariable + 1 | 0;
989
+ var element_0 = this.y2r_1.p(index);
990
+ this_0.z7('; ');
991
+ this_0.z7(element_0.c2s_1);
992
+ this_0.z7('=');
993
+ // Inline function 'io.ktor.http.escapeIfNeededTo' call
994
+ var this_1 = element_0.d2s_1;
995
+ if (needQuotes(this_1))
996
+ this_0.z7(quote(this_1));
997
+ else
998
+ this_0.z7(this_1);
999
+ }
1000
+ while (!(index === last));
1001
+ tmp = this_0.toString();
1002
+ }
1003
+ return tmp;
1004
+ };
1005
+ function needQuotes(_this__u8e3s4) {
1006
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
1007
+ // Inline function 'kotlin.text.isEmpty' call
1008
+ if (charSequenceLength(_this__u8e3s4) === 0)
1009
+ return true;
1010
+ if (isQuoted(_this__u8e3s4))
1011
+ return false;
1012
+ var inductionVariable = 0;
1013
+ var last = _this__u8e3s4.length;
1014
+ while (inductionVariable < last) {
1015
+ var element = charCodeAt(_this__u8e3s4, inductionVariable);
1016
+ inductionVariable = inductionVariable + 1 | 0;
1017
+ if (get_HeaderFieldValueSeparators().t(new Char(element)))
1018
+ return true;
1019
+ }
1020
+ return false;
1021
+ }
1022
+ function quote(_this__u8e3s4) {
1023
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
1024
+ // Inline function 'kotlin.text.buildString' call
1025
+ // Inline function 'kotlin.apply' call
1026
+ var this_0 = StringBuilder_init_$Create$();
1027
+ quoteTo(_this__u8e3s4, this_0);
1028
+ return this_0.toString();
1029
+ }
1030
+ function isQuoted(_this__u8e3s4) {
1031
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
1032
+ if (_this__u8e3s4.length < 2) {
1033
+ return false;
1034
+ }
1035
+ if (!(first(_this__u8e3s4) === _Char___init__impl__6a9atx(34)) || !(last_0(_this__u8e3s4) === _Char___init__impl__6a9atx(34))) {
1036
+ return false;
1037
+ }
1038
+ var startIndex = 1;
1039
+ $l$loop: do {
1040
+ var index = indexOf(_this__u8e3s4, _Char___init__impl__6a9atx(34), startIndex);
1041
+ if (index === get_lastIndex_0(_this__u8e3s4)) {
1042
+ break $l$loop;
1043
+ }
1044
+ var slashesCount = 0;
1045
+ var slashIndex = index - 1 | 0;
1046
+ while (charCodeAt(_this__u8e3s4, slashIndex) === _Char___init__impl__6a9atx(92)) {
1047
+ slashesCount = slashesCount + 1 | 0;
1048
+ slashIndex = slashIndex - 1 | 0;
1049
+ }
1050
+ if ((slashesCount % 2 | 0) === 0) {
1051
+ return false;
1052
+ }
1053
+ startIndex = index + 1 | 0;
1054
+ }
1055
+ while (startIndex < _this__u8e3s4.length);
1056
+ return true;
1057
+ }
1058
+ function quoteTo(_this__u8e3s4, out) {
1059
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
1060
+ out.z7('"');
1061
+ var inductionVariable = 0;
1062
+ var last = _this__u8e3s4.length;
1063
+ while (inductionVariable < last) {
1064
+ var element = charCodeAt(_this__u8e3s4, inductionVariable);
1065
+ inductionVariable = inductionVariable + 1 | 0;
1066
+ var ch = element;
1067
+ if (ch === _Char___init__impl__6a9atx(92))
1068
+ out.z7('\\\\');
1069
+ else if (ch === _Char___init__impl__6a9atx(10))
1070
+ out.z7('\\n');
1071
+ else if (ch === _Char___init__impl__6a9atx(13))
1072
+ out.z7('\\r');
1073
+ else if (ch === _Char___init__impl__6a9atx(9))
1074
+ out.z7('\\t');
1075
+ else if (ch === _Char___init__impl__6a9atx(34))
1076
+ out.z7('\\"');
1077
+ else
1078
+ out.a8(ch);
1079
+ }
1080
+ out.z7('"');
1081
+ }
1082
+ function escapeIfNeeded(_this__u8e3s4) {
1083
+ _init_properties_HeaderValueWithParameters_kt__z6luvy();
1084
+ return needQuotes(_this__u8e3s4) ? quote(_this__u8e3s4) : _this__u8e3s4;
1085
+ }
1086
+ var properties_initialized_HeaderValueWithParameters_kt_yu5xg;
1087
+ function _init_properties_HeaderValueWithParameters_kt__z6luvy() {
1088
+ if (!properties_initialized_HeaderValueWithParameters_kt_yu5xg) {
1089
+ properties_initialized_HeaderValueWithParameters_kt_yu5xg = true;
1090
+ 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))]);
1091
+ }
1092
+ }
1093
+ function Companion_2() {
1094
+ Companion_instance_2 = this;
1095
+ this.e2u_1 = EmptyHeaders_instance;
1096
+ }
1097
+ var Companion_instance_2;
1098
+ function Companion_getInstance_2() {
1099
+ if (Companion_instance_2 == null)
1100
+ new Companion_2();
1101
+ return Companion_instance_2;
1102
+ }
1103
+ function HeadersBuilder(size) {
1104
+ size = size === VOID ? 8 : size;
1105
+ StringValuesBuilderImpl.call(this, true, size);
1106
+ }
1107
+ protoOf(HeadersBuilder).h2u = function () {
1108
+ return new HeadersImpl(this.k2n_1);
1109
+ };
1110
+ protoOf(HeadersBuilder).l2n = function (name) {
1111
+ protoOf(StringValuesBuilderImpl).l2n.call(this, name);
1112
+ HttpHeaders_getInstance().f2y(name);
1113
+ };
1114
+ protoOf(HeadersBuilder).n2n = function (value) {
1115
+ protoOf(StringValuesBuilderImpl).n2n.call(this, value);
1116
+ HttpHeaders_getInstance().g2y(value);
1117
+ };
1118
+ function headersOf(name, value) {
1119
+ return new HeadersSingleImpl(name, listOf_0(value));
1120
+ }
1121
+ function EmptyHeaders() {
1122
+ }
1123
+ protoOf(EmptyHeaders).f2n = function () {
1124
+ return true;
1125
+ };
1126
+ protoOf(EmptyHeaders).g2n = function (name) {
1127
+ return null;
1128
+ };
1129
+ protoOf(EmptyHeaders).h2n = function () {
1130
+ return emptySet();
1131
+ };
1132
+ protoOf(EmptyHeaders).d2n = function () {
1133
+ return emptySet();
1134
+ };
1135
+ protoOf(EmptyHeaders).r = function () {
1136
+ return true;
1137
+ };
1138
+ protoOf(EmptyHeaders).toString = function () {
1139
+ return 'Headers ' + toString(this.d2n());
1140
+ };
1141
+ var EmptyHeaders_instance;
1142
+ function EmptyHeaders_getInstance() {
1143
+ return EmptyHeaders_instance;
1144
+ }
1145
+ function HeadersImpl(values) {
1146
+ values = values === VOID ? emptyMap() : values;
1147
+ StringValuesImpl.call(this, true, values);
1148
+ }
1149
+ protoOf(HeadersImpl).toString = function () {
1150
+ return 'Headers ' + toString(this.d2n());
1151
+ };
1152
+ function HeadersSingleImpl(name, values) {
1153
+ StringValuesSingleImpl.call(this, true, name, values);
1154
+ }
1155
+ protoOf(HeadersSingleImpl).toString = function () {
1156
+ return 'Headers ' + toString(this.d2n());
1157
+ };
1158
+ function HeaderValueParam_init_$Init$(name, value, $this) {
1159
+ HeaderValueParam.call($this, name, value, false);
1160
+ return $this;
1161
+ }
1162
+ function HeaderValueParam_init_$Create$(name, value) {
1163
+ return HeaderValueParam_init_$Init$(name, value, objectCreate(protoOf(HeaderValueParam)));
1164
+ }
1165
+ function HeaderValueParam(name, value, escapeValue) {
1166
+ this.c2s_1 = name;
1167
+ this.d2s_1 = value;
1168
+ this.e2s_1 = escapeValue;
1169
+ }
1170
+ protoOf(HeaderValueParam).equals = function (other) {
1171
+ var tmp;
1172
+ var tmp_0;
1173
+ if (other instanceof HeaderValueParam) {
1174
+ tmp_0 = equals_0(other.c2s_1, this.c2s_1, true);
1175
+ } else {
1176
+ tmp_0 = false;
1177
+ }
1178
+ if (tmp_0) {
1179
+ tmp = equals_0(other.d2s_1, this.d2s_1, true);
1180
+ } else {
1181
+ tmp = false;
1182
+ }
1183
+ return tmp;
1184
+ };
1185
+ protoOf(HeaderValueParam).hashCode = function () {
1186
+ // Inline function 'kotlin.text.lowercase' call
1187
+ // Inline function 'kotlin.js.asDynamic' call
1188
+ var tmp$ret$1 = this.c2s_1.toLowerCase();
1189
+ var result = getStringHashCode(tmp$ret$1);
1190
+ var tmp = result;
1191
+ var tmp_0 = imul(31, result);
1192
+ // Inline function 'kotlin.text.lowercase' call
1193
+ // Inline function 'kotlin.js.asDynamic' call
1194
+ var tmp$ret$3 = this.d2s_1.toLowerCase();
1195
+ result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0;
1196
+ return result;
1197
+ };
1198
+ protoOf(HeaderValueParam).ah = function () {
1199
+ return this.c2s_1;
1200
+ };
1201
+ protoOf(HeaderValueParam).bh = function () {
1202
+ return this.d2s_1;
1203
+ };
1204
+ protoOf(HeaderValueParam).toString = function () {
1205
+ return 'HeaderValueParam(name=' + this.c2s_1 + ', value=' + this.d2s_1 + ', escapeValue=' + this.e2s_1 + ')';
1206
+ };
1207
+ function HeaderValue(value, params) {
1208
+ params = params === VOID ? emptyList() : params;
1209
+ this.r2r_1 = value;
1210
+ this.s2r_1 = params;
1211
+ var tmp = this;
1212
+ var tmp0 = this.s2r_1;
1213
+ var tmp$ret$1;
1214
+ $l$block: {
1215
+ // Inline function 'kotlin.collections.firstOrNull' call
1216
+ var _iterator__ex2g4s = tmp0.l();
1217
+ while (_iterator__ex2g4s.m()) {
1218
+ var element = _iterator__ex2g4s.n();
1219
+ if (element.c2s_1 === 'q') {
1220
+ tmp$ret$1 = element;
1221
+ break $l$block;
1222
+ }
1223
+ }
1224
+ tmp$ret$1 = null;
1225
+ }
1226
+ var tmp0_safe_receiver = tmp$ret$1;
1227
+ var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.d2s_1;
1228
+ var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : toDoubleOrNull(tmp1_safe_receiver);
1229
+ var tmp_0;
1230
+ if (tmp2_safe_receiver == null) {
1231
+ tmp_0 = null;
1232
+ } else {
1233
+ // Inline function 'kotlin.takeIf' call
1234
+ var tmp_1;
1235
+ if (0.0 <= tmp2_safe_receiver ? tmp2_safe_receiver <= 1.0 : false) {
1236
+ tmp_1 = tmp2_safe_receiver;
1237
+ } else {
1238
+ tmp_1 = null;
1239
+ }
1240
+ tmp_0 = tmp_1;
1241
+ }
1242
+ var tmp3_elvis_lhs = tmp_0;
1243
+ tmp.t2r_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs;
1244
+ }
1245
+ protoOf(HeaderValue).toString = function () {
1246
+ return 'HeaderValue(value=' + this.r2r_1 + ', params=' + toString(this.s2r_1) + ')';
1247
+ };
1248
+ protoOf(HeaderValue).hashCode = function () {
1249
+ var result = getStringHashCode(this.r2r_1);
1250
+ result = imul(result, 31) + hashCode(this.s2r_1) | 0;
1251
+ return result;
1252
+ };
1253
+ protoOf(HeaderValue).equals = function (other) {
1254
+ if (this === other)
1255
+ return true;
1256
+ if (!(other instanceof HeaderValue))
1257
+ return false;
1258
+ var tmp0_other_with_cast = other instanceof HeaderValue ? other : THROW_CCE();
1259
+ if (!(this.r2r_1 === tmp0_other_with_cast.r2r_1))
1260
+ return false;
1261
+ if (!equals(this.s2r_1, tmp0_other_with_cast.s2r_1))
1262
+ return false;
1263
+ return true;
1264
+ };
1265
+ function parseHeaderValue(text) {
1266
+ return parseHeaderValue_0(text, false);
1267
+ }
1268
+ function parseHeaderValue_0(text, parametersOnly) {
1269
+ if (text == null) {
1270
+ return emptyList();
1271
+ }
1272
+ var position = 0;
1273
+ var tmp = LazyThreadSafetyMode_NONE_getInstance();
1274
+ var items = lazy(tmp, parseHeaderValue$lambda);
1275
+ while (position <= get_lastIndex_0(text)) {
1276
+ position = parseHeaderValueItem(text, position, items, parametersOnly);
1277
+ }
1278
+ return valueOrEmpty(items);
1279
+ }
1280
+ function parseHeaderValueItem(text, start, items, parametersOnly) {
1281
+ var position = start;
1282
+ var tmp = LazyThreadSafetyMode_NONE_getInstance();
1283
+ var parameters = lazy(tmp, parseHeaderValueItem$lambda);
1284
+ var valueEnd = parametersOnly ? position : null;
1285
+ while (position <= get_lastIndex_0(text)) {
1286
+ var tmp0_subject = charCodeAt(text, position);
1287
+ if (tmp0_subject === _Char___init__impl__6a9atx(44)) {
1288
+ var tmp_0 = items.y();
1289
+ var tmp1_elvis_lhs = valueEnd;
1290
+ tmp_0.j(new HeaderValue(subtrim(text, start, tmp1_elvis_lhs == null ? position : tmp1_elvis_lhs), valueOrEmpty(parameters)));
1291
+ return position + 1 | 0;
1292
+ } else if (tmp0_subject === _Char___init__impl__6a9atx(59)) {
1293
+ if (valueEnd == null)
1294
+ valueEnd = position;
1295
+ position = parseHeaderValueParameter(text, position + 1 | 0, parameters);
1296
+ } else {
1297
+ var tmp_1;
1298
+ if (parametersOnly) {
1299
+ tmp_1 = parseHeaderValueParameter(text, position, parameters);
1300
+ } else {
1301
+ tmp_1 = position + 1 | 0;
1302
+ }
1303
+ position = tmp_1;
1304
+ }
1305
+ }
1306
+ var tmp_2 = items.y();
1307
+ var tmp2_elvis_lhs = valueEnd;
1308
+ tmp_2.j(new HeaderValue(subtrim(text, start, tmp2_elvis_lhs == null ? position : tmp2_elvis_lhs), valueOrEmpty(parameters)));
1309
+ return position;
1310
+ }
1311
+ function valueOrEmpty(_this__u8e3s4) {
1312
+ return _this__u8e3s4.mp() ? _this__u8e3s4.y() : emptyList();
1313
+ }
1314
+ function subtrim(_this__u8e3s4, start, end) {
1315
+ // Inline function 'kotlin.text.trim' call
1316
+ var this_0 = substring(_this__u8e3s4, start, end);
1317
+ return toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE()));
1318
+ }
1319
+ function parseHeaderValueParameter(text, start, parameters) {
1320
+ var position = start;
1321
+ while (position <= get_lastIndex_0(text)) {
1322
+ var tmp0_subject = charCodeAt(text, position);
1323
+ if (tmp0_subject === _Char___init__impl__6a9atx(61)) {
1324
+ var _destruct__k2r9zo = parseHeaderValueParameterValue(text, position + 1 | 0);
1325
+ var paramEnd = _destruct__k2r9zo.ah();
1326
+ var paramValue = _destruct__k2r9zo.bh();
1327
+ parseHeaderValueParameter$addParam(parameters, text, start, position, paramValue);
1328
+ return paramEnd;
1329
+ } else if (tmp0_subject === _Char___init__impl__6a9atx(59) || tmp0_subject === _Char___init__impl__6a9atx(44)) {
1330
+ parseHeaderValueParameter$addParam(parameters, text, start, position, '');
1331
+ return position;
1332
+ } else {
1333
+ position = position + 1 | 0;
1334
+ }
1335
+ }
1336
+ parseHeaderValueParameter$addParam(parameters, text, start, position, '');
1337
+ return position;
1338
+ }
1339
+ function parseHeaderValueParameterValue(value, start) {
1340
+ if (value.length === start) {
1341
+ return to(start, '');
1342
+ }
1343
+ var position = start;
1344
+ if (charCodeAt(value, start) === _Char___init__impl__6a9atx(34)) {
1345
+ return parseHeaderValueParameterValueQuoted(value, position + 1 | 0);
1346
+ }
1347
+ while (position <= get_lastIndex_0(value)) {
1348
+ var tmp0_subject = charCodeAt(value, position);
1349
+ if (tmp0_subject === _Char___init__impl__6a9atx(59) || tmp0_subject === _Char___init__impl__6a9atx(44))
1350
+ return to(position, subtrim(value, start, position));
1351
+ else {
1352
+ position = position + 1 | 0;
1353
+ }
1354
+ }
1355
+ return to(position, subtrim(value, start, position));
1356
+ }
1357
+ function parseHeaderValueParameterValueQuoted(value, start) {
1358
+ var position = start;
1359
+ var builder = StringBuilder_init_$Create$();
1360
+ loop: while (position <= get_lastIndex_0(value)) {
1361
+ var currentChar = charCodeAt(value, position);
1362
+ if (currentChar === _Char___init__impl__6a9atx(34) && nextIsDelimiterOrEnd(value, position)) {
1363
+ return to(position + 1 | 0, builder.toString());
1364
+ } else if (currentChar === _Char___init__impl__6a9atx(92) && position < (get_lastIndex_0(value) - 2 | 0)) {
1365
+ builder.a8(charCodeAt(value, position + 1 | 0));
1366
+ position = position + 2 | 0;
1367
+ continue loop;
1368
+ }
1369
+ builder.a8(currentChar);
1370
+ position = position + 1 | 0;
1371
+ }
1372
+ var tmp = position;
1373
+ var tmp0 = _Char___init__impl__6a9atx(34);
1374
+ // Inline function 'kotlin.text.plus' call
1375
+ var other = builder.toString();
1376
+ var tmp$ret$0 = toString_0(tmp0) + other;
1377
+ return to(tmp, tmp$ret$0);
1378
+ }
1379
+ function nextIsDelimiterOrEnd(_this__u8e3s4, start) {
1380
+ var position = start + 1 | 0;
1381
+ loop: while (position < _this__u8e3s4.length && charCodeAt(_this__u8e3s4, position) === _Char___init__impl__6a9atx(32)) {
1382
+ position = position + 1 | 0;
1383
+ }
1384
+ return position === _this__u8e3s4.length || charCodeAt(_this__u8e3s4, position) === _Char___init__impl__6a9atx(59) || charCodeAt(_this__u8e3s4, position) === _Char___init__impl__6a9atx(44);
1385
+ }
1386
+ function parseHeaderValueParameter$addParam($parameters, text, start, end, value) {
1387
+ var name = subtrim(text, start, end);
1388
+ // Inline function 'kotlin.text.isEmpty' call
1389
+ if (charSequenceLength(name) === 0) {
1390
+ return Unit_instance;
1391
+ }
1392
+ $parameters.y().j(HeaderValueParam_init_$Create$(name, value));
1393
+ }
1394
+ function parseHeaderValue$lambda() {
1395
+ // Inline function 'kotlin.collections.arrayListOf' call
1396
+ return ArrayList_init_$Create$_0();
1397
+ }
1398
+ function parseHeaderValueItem$lambda() {
1399
+ // Inline function 'kotlin.collections.arrayListOf' call
1400
+ return ArrayList_init_$Create$_0();
1401
+ }
1402
+ function HttpHeaders() {
1403
+ HttpHeaders_instance = this;
1404
+ this.i2u_1 = 'Accept';
1405
+ this.j2u_1 = 'Accept-Charset';
1406
+ this.k2u_1 = 'Accept-Encoding';
1407
+ this.l2u_1 = 'Accept-Language';
1408
+ this.m2u_1 = 'Accept-Ranges';
1409
+ this.n2u_1 = 'Age';
1410
+ this.o2u_1 = 'Allow';
1411
+ this.p2u_1 = 'ALPN';
1412
+ this.q2u_1 = 'Authentication-Info';
1413
+ this.r2u_1 = 'Authorization';
1414
+ this.s2u_1 = 'Cache-Control';
1415
+ this.t2u_1 = 'Connection';
1416
+ this.u2u_1 = 'Content-Disposition';
1417
+ this.v2u_1 = 'Content-Encoding';
1418
+ this.w2u_1 = 'Content-Language';
1419
+ this.x2u_1 = 'Content-Length';
1420
+ this.y2u_1 = 'Content-Location';
1421
+ this.z2u_1 = 'Content-Range';
1422
+ this.a2v_1 = 'Content-Type';
1423
+ this.b2v_1 = 'Cookie';
1424
+ this.c2v_1 = 'DASL';
1425
+ this.d2v_1 = 'Date';
1426
+ this.e2v_1 = 'DAV';
1427
+ this.f2v_1 = 'Depth';
1428
+ this.g2v_1 = 'Destination';
1429
+ this.h2v_1 = 'ETag';
1430
+ this.i2v_1 = 'Expect';
1431
+ this.j2v_1 = 'Expires';
1432
+ this.k2v_1 = 'From';
1433
+ this.l2v_1 = 'Forwarded';
1434
+ this.m2v_1 = 'Host';
1435
+ this.n2v_1 = 'HTTP2-Settings';
1436
+ this.o2v_1 = 'If';
1437
+ this.p2v_1 = 'If-Match';
1438
+ this.q2v_1 = 'If-Modified-Since';
1439
+ this.r2v_1 = 'If-None-Match';
1440
+ this.s2v_1 = 'If-Range';
1441
+ this.t2v_1 = 'If-Schedule-Tag-Match';
1442
+ this.u2v_1 = 'If-Unmodified-Since';
1443
+ this.v2v_1 = 'Last-Modified';
1444
+ this.w2v_1 = 'Location';
1445
+ this.x2v_1 = 'Lock-Token';
1446
+ this.y2v_1 = 'Link';
1447
+ this.z2v_1 = 'Max-Forwards';
1448
+ this.a2w_1 = 'MIME-Version';
1449
+ this.b2w_1 = 'Ordering-Type';
1450
+ this.c2w_1 = 'Origin';
1451
+ this.d2w_1 = 'Overwrite';
1452
+ this.e2w_1 = 'Position';
1453
+ this.f2w_1 = 'Pragma';
1454
+ this.g2w_1 = 'Prefer';
1455
+ this.h2w_1 = 'Preference-Applied';
1456
+ this.i2w_1 = 'Proxy-Authenticate';
1457
+ this.j2w_1 = 'Proxy-Authentication-Info';
1458
+ this.k2w_1 = 'Proxy-Authorization';
1459
+ this.l2w_1 = 'Public-Key-Pins';
1460
+ this.m2w_1 = 'Public-Key-Pins-Report-Only';
1461
+ this.n2w_1 = 'Range';
1462
+ this.o2w_1 = 'Referer';
1463
+ this.p2w_1 = 'Retry-After';
1464
+ this.q2w_1 = 'Schedule-Reply';
1465
+ this.r2w_1 = 'Schedule-Tag';
1466
+ this.s2w_1 = 'Sec-WebSocket-Accept';
1467
+ this.t2w_1 = 'Sec-WebSocket-Extensions';
1468
+ this.u2w_1 = 'Sec-WebSocket-Key';
1469
+ this.v2w_1 = 'Sec-WebSocket-Protocol';
1470
+ this.w2w_1 = 'Sec-WebSocket-Version';
1471
+ this.x2w_1 = 'Server';
1472
+ this.y2w_1 = 'Set-Cookie';
1473
+ this.z2w_1 = 'SLUG';
1474
+ this.a2x_1 = 'Strict-Transport-Security';
1475
+ this.b2x_1 = 'TE';
1476
+ this.c2x_1 = 'Timeout';
1477
+ this.d2x_1 = 'Trailer';
1478
+ this.e2x_1 = 'Transfer-Encoding';
1479
+ this.f2x_1 = 'Upgrade';
1480
+ this.g2x_1 = 'User-Agent';
1481
+ this.h2x_1 = 'Vary';
1482
+ this.i2x_1 = 'Via';
1483
+ this.j2x_1 = 'Warning';
1484
+ this.k2x_1 = 'WWW-Authenticate';
1485
+ this.l2x_1 = 'Access-Control-Allow-Origin';
1486
+ this.m2x_1 = 'Access-Control-Allow-Methods';
1487
+ this.n2x_1 = 'Access-Control-Allow-Credentials';
1488
+ this.o2x_1 = 'Access-Control-Allow-Headers';
1489
+ this.p2x_1 = 'Access-Control-Request-Method';
1490
+ this.q2x_1 = 'Access-Control-Request-Headers';
1491
+ this.r2x_1 = 'Access-Control-Expose-Headers';
1492
+ this.s2x_1 = 'Access-Control-Max-Age';
1493
+ this.t2x_1 = 'X-Http-Method-Override';
1494
+ this.u2x_1 = 'X-Forwarded-Host';
1495
+ this.v2x_1 = 'X-Forwarded-Server';
1496
+ this.w2x_1 = 'X-Forwarded-Proto';
1497
+ this.x2x_1 = 'X-Forwarded-For';
1498
+ this.y2x_1 = 'X-Forwarded-Port';
1499
+ this.z2x_1 = 'X-Request-ID';
1500
+ this.a2y_1 = 'X-Correlation-ID';
1501
+ this.b2y_1 = 'X-Total-Count';
1502
+ this.c2y_1 = 'Last-Event-ID';
1503
+ var tmp = this;
1504
+ // Inline function 'kotlin.arrayOf' call
1505
+ // Inline function 'kotlin.js.unsafeCast' call
1506
+ // Inline function 'kotlin.js.asDynamic' call
1507
+ tmp.d2y_1 = [this.e2x_1, this.f2x_1];
1508
+ this.e2y_1 = asList(this.d2y_1);
1509
+ }
1510
+ protoOf(HttpHeaders).f2y = function (name) {
1511
+ // Inline function 'kotlin.text.forEachIndexed' call
1512
+ var index = 0;
1513
+ var inductionVariable = 0;
1514
+ while (inductionVariable < charSequenceLength(name)) {
1515
+ var item = charSequenceGet(name, inductionVariable);
1516
+ inductionVariable = inductionVariable + 1 | 0;
1517
+ var _unary__edvuaz = index;
1518
+ index = _unary__edvuaz + 1 | 0;
1519
+ if (Char__compareTo_impl_ypi4mb(item, _Char___init__impl__6a9atx(32)) <= 0 || isDelimiter(item)) {
1520
+ throw new IllegalHeaderNameException(name, _unary__edvuaz);
1521
+ }
1522
+ }
1523
+ };
1524
+ protoOf(HttpHeaders).g2y = function (value) {
1525
+ // Inline function 'kotlin.text.forEachIndexed' call
1526
+ var index = 0;
1527
+ var inductionVariable = 0;
1528
+ while (inductionVariable < charSequenceLength(value)) {
1529
+ var item = charSequenceGet(value, inductionVariable);
1530
+ inductionVariable = inductionVariable + 1 | 0;
1531
+ var _unary__edvuaz = index;
1532
+ index = _unary__edvuaz + 1 | 0;
1533
+ if (Char__compareTo_impl_ypi4mb(item, _Char___init__impl__6a9atx(32)) < 0 && !(item === _Char___init__impl__6a9atx(9))) {
1534
+ throw new IllegalHeaderValueException(value, _unary__edvuaz);
1535
+ }
1536
+ }
1537
+ };
1538
+ var HttpHeaders_instance;
1539
+ function HttpHeaders_getInstance() {
1540
+ if (HttpHeaders_instance == null)
1541
+ new HttpHeaders();
1542
+ return HttpHeaders_instance;
1543
+ }
1544
+ function UnsafeHeaderException(header) {
1545
+ IllegalArgumentException_init_$Init$('Header(s) ' + header + ' are controlled by the engine and ' + 'cannot be set explicitly', this);
1546
+ captureStack(this, UnsafeHeaderException);
1547
+ }
1548
+ function isDelimiter(ch) {
1549
+ return contains('"(),/:;<=>?@[\\]{}', ch);
1550
+ }
1551
+ function IllegalHeaderNameException(headerName, position) {
1552
+ var tmp = "Header name '" + headerName + "' contains illegal character '" + toString_0(charCodeAt(headerName, position)) + "'";
1553
+ // Inline function 'kotlin.code' call
1554
+ var this_0 = charCodeAt(headerName, position);
1555
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
1556
+ IllegalArgumentException_init_$Init$(tmp + (' (code ' + (tmp$ret$0 & 255) + ')'), this);
1557
+ captureStack(this, IllegalHeaderNameException);
1558
+ this.h2y_1 = headerName;
1559
+ this.i2y_1 = position;
1560
+ }
1561
+ function IllegalHeaderValueException(headerValue, position) {
1562
+ var tmp = "Header value '" + headerValue + "' contains illegal character '" + toString_0(charCodeAt(headerValue, position)) + "'";
1563
+ // Inline function 'kotlin.code' call
1564
+ var this_0 = charCodeAt(headerValue, position);
1565
+ var tmp$ret$0 = Char__toInt_impl_vasixd(this_0);
1566
+ IllegalArgumentException_init_$Init$(tmp + (' (code ' + (tmp$ret$0 & 255) + ')'), this);
1567
+ captureStack(this, IllegalHeaderValueException);
1568
+ this.j2y_1 = headerValue;
1569
+ this.k2y_1 = position;
1570
+ }
1571
+ function contentLength(_this__u8e3s4) {
1572
+ var tmp0_safe_receiver = _this__u8e3s4.l2y().xd(HttpHeaders_getInstance().x2u_1);
1573
+ return tmp0_safe_receiver == null ? null : toLong(tmp0_safe_receiver);
1574
+ }
1575
+ function charset_0(_this__u8e3s4) {
1576
+ var tmp0_safe_receiver = contentType_1(_this__u8e3s4);
1577
+ return tmp0_safe_receiver == null ? null : charset(tmp0_safe_receiver);
1578
+ }
1579
+ function contentType(_this__u8e3s4) {
1580
+ var tmp0_safe_receiver = _this__u8e3s4.l2y().xd(HttpHeaders_getInstance().a2v_1);
1581
+ var tmp;
1582
+ if (tmp0_safe_receiver == null) {
1583
+ tmp = null;
1584
+ } else {
1585
+ // Inline function 'kotlin.let' call
1586
+ tmp = Companion_getInstance_0().tp(tmp0_safe_receiver);
1587
+ }
1588
+ return tmp;
1589
+ }
1590
+ function contentType_0(_this__u8e3s4, type) {
1591
+ return _this__u8e3s4.l2y().m2n(HttpHeaders_getInstance().a2v_1, type.toString());
1592
+ }
1593
+ function contentType_1(_this__u8e3s4) {
1594
+ var tmp0_safe_receiver = _this__u8e3s4.l2y().xd(HttpHeaders_getInstance().a2v_1);
1595
+ var tmp;
1596
+ if (tmp0_safe_receiver == null) {
1597
+ tmp = null;
1598
+ } else {
1599
+ // Inline function 'kotlin.let' call
1600
+ tmp = Companion_getInstance_0().tp(tmp0_safe_receiver);
1601
+ }
1602
+ return tmp;
1603
+ }
1604
+ function get_REQUESTS_WITHOUT_BODY() {
1605
+ _init_properties_HttpMethod_kt__cbus5z();
1606
+ return REQUESTS_WITHOUT_BODY;
1607
+ }
1608
+ var REQUESTS_WITHOUT_BODY;
1609
+ function Companion_3() {
1610
+ Companion_instance_3 = this;
1611
+ this.m2y_1 = new HttpMethod('GET');
1612
+ this.n2y_1 = new HttpMethod('POST');
1613
+ this.o2y_1 = new HttpMethod('PUT');
1614
+ this.p2y_1 = new HttpMethod('PATCH');
1615
+ this.q2y_1 = new HttpMethod('DELETE');
1616
+ this.r2y_1 = new HttpMethod('HEAD');
1617
+ this.s2y_1 = new HttpMethod('OPTIONS');
1618
+ this.t2y_1 = listOf([this.m2y_1, this.n2y_1, this.o2y_1, this.p2y_1, this.q2y_1, this.r2y_1, this.s2y_1]);
1619
+ }
1620
+ protoOf(Companion_3).tp = function (method) {
1621
+ return method === this.m2y_1.u2y_1 ? this.m2y_1 : method === this.n2y_1.u2y_1 ? this.n2y_1 : method === this.o2y_1.u2y_1 ? this.o2y_1 : method === this.p2y_1.u2y_1 ? this.p2y_1 : method === this.q2y_1.u2y_1 ? this.q2y_1 : method === this.r2y_1.u2y_1 ? this.r2y_1 : method === this.s2y_1.u2y_1 ? this.s2y_1 : new HttpMethod(method);
1622
+ };
1623
+ var Companion_instance_3;
1624
+ function Companion_getInstance_3() {
1625
+ if (Companion_instance_3 == null)
1626
+ new Companion_3();
1627
+ return Companion_instance_3;
1628
+ }
1629
+ function HttpMethod(value) {
1630
+ Companion_getInstance_3();
1631
+ this.u2y_1 = value;
1632
+ }
1633
+ protoOf(HttpMethod).toString = function () {
1634
+ return this.u2y_1;
1635
+ };
1636
+ protoOf(HttpMethod).hashCode = function () {
1637
+ return getStringHashCode(this.u2y_1);
1638
+ };
1639
+ protoOf(HttpMethod).equals = function (other) {
1640
+ if (this === other)
1641
+ return true;
1642
+ if (!(other instanceof HttpMethod))
1643
+ return false;
1644
+ var tmp0_other_with_cast = other instanceof HttpMethod ? other : THROW_CCE();
1645
+ if (!(this.u2y_1 === tmp0_other_with_cast.u2y_1))
1646
+ return false;
1647
+ return true;
1648
+ };
1649
+ function get_supportsRequestBody(_this__u8e3s4) {
1650
+ _init_properties_HttpMethod_kt__cbus5z();
1651
+ return !get_REQUESTS_WITHOUT_BODY().t(_this__u8e3s4);
1652
+ }
1653
+ var properties_initialized_HttpMethod_kt_ogor3f;
1654
+ function _init_properties_HttpMethod_kt__cbus5z() {
1655
+ if (!properties_initialized_HttpMethod_kt_ogor3f) {
1656
+ properties_initialized_HttpMethod_kt_ogor3f = true;
1657
+ REQUESTS_WITHOUT_BODY = setOf([Companion_getInstance_3().m2y_1, Companion_getInstance_3().r2y_1, Companion_getInstance_3().s2y_1, new HttpMethod('TRACE')]);
1658
+ }
1659
+ }
1660
+ function Companion_4() {
1661
+ Companion_instance_4 = this;
1662
+ this.v2y_1 = new HttpProtocolVersion('HTTP', 3, 0);
1663
+ this.w2y_1 = new HttpProtocolVersion('HTTP', 2, 0);
1664
+ this.x2y_1 = new HttpProtocolVersion('HTTP', 1, 1);
1665
+ this.y2y_1 = new HttpProtocolVersion('HTTP', 1, 0);
1666
+ this.z2y_1 = new HttpProtocolVersion('SPDY', 3, 0);
1667
+ this.a2z_1 = new HttpProtocolVersion('QUIC', 1, 0);
1668
+ }
1669
+ var Companion_instance_4;
1670
+ function Companion_getInstance_4() {
1671
+ if (Companion_instance_4 == null)
1672
+ new Companion_4();
1673
+ return Companion_instance_4;
1674
+ }
1675
+ function HttpProtocolVersion(name, major, minor) {
1676
+ Companion_getInstance_4();
1677
+ this.b2z_1 = name;
1678
+ this.c2z_1 = major;
1679
+ this.d2z_1 = minor;
1680
+ }
1681
+ protoOf(HttpProtocolVersion).toString = function () {
1682
+ return this.b2z_1 + '/' + this.c2z_1 + '.' + this.d2z_1;
1683
+ };
1684
+ protoOf(HttpProtocolVersion).hashCode = function () {
1685
+ var result = getStringHashCode(this.b2z_1);
1686
+ result = imul(result, 31) + this.c2z_1 | 0;
1687
+ result = imul(result, 31) + this.d2z_1 | 0;
1688
+ return result;
1689
+ };
1690
+ protoOf(HttpProtocolVersion).equals = function (other) {
1691
+ if (this === other)
1692
+ return true;
1693
+ if (!(other instanceof HttpProtocolVersion))
1694
+ return false;
1695
+ var tmp0_other_with_cast = other instanceof HttpProtocolVersion ? other : THROW_CCE();
1696
+ if (!(this.b2z_1 === tmp0_other_with_cast.b2z_1))
1697
+ return false;
1698
+ if (!(this.c2z_1 === tmp0_other_with_cast.c2z_1))
1699
+ return false;
1700
+ if (!(this.d2z_1 === tmp0_other_with_cast.d2z_1))
1701
+ return false;
1702
+ return true;
1703
+ };
1704
+ function Companion_5() {
1705
+ Companion_instance_5 = this;
1706
+ this.e2z_1 = new HttpStatusCode(100, 'Continue');
1707
+ this.f2z_1 = new HttpStatusCode(101, 'Switching Protocols');
1708
+ this.g2z_1 = new HttpStatusCode(102, 'Processing');
1709
+ this.h2z_1 = new HttpStatusCode(200, 'OK');
1710
+ this.i2z_1 = new HttpStatusCode(201, 'Created');
1711
+ this.j2z_1 = new HttpStatusCode(202, 'Accepted');
1712
+ this.k2z_1 = new HttpStatusCode(203, 'Non-Authoritative Information');
1713
+ this.l2z_1 = new HttpStatusCode(204, 'No Content');
1714
+ this.m2z_1 = new HttpStatusCode(205, 'Reset Content');
1715
+ this.n2z_1 = new HttpStatusCode(206, 'Partial Content');
1716
+ this.o2z_1 = new HttpStatusCode(207, 'Multi-Status');
1717
+ this.p2z_1 = new HttpStatusCode(300, 'Multiple Choices');
1718
+ this.q2z_1 = new HttpStatusCode(301, 'Moved Permanently');
1719
+ this.r2z_1 = new HttpStatusCode(302, 'Found');
1720
+ this.s2z_1 = new HttpStatusCode(303, 'See Other');
1721
+ this.t2z_1 = new HttpStatusCode(304, 'Not Modified');
1722
+ this.u2z_1 = new HttpStatusCode(305, 'Use Proxy');
1723
+ this.v2z_1 = new HttpStatusCode(306, 'Switch Proxy');
1724
+ this.w2z_1 = new HttpStatusCode(307, 'Temporary Redirect');
1725
+ this.x2z_1 = new HttpStatusCode(308, 'Permanent Redirect');
1726
+ this.y2z_1 = new HttpStatusCode(400, 'Bad Request');
1727
+ this.z2z_1 = new HttpStatusCode(401, 'Unauthorized');
1728
+ this.a30_1 = new HttpStatusCode(402, 'Payment Required');
1729
+ this.b30_1 = new HttpStatusCode(403, 'Forbidden');
1730
+ this.c30_1 = new HttpStatusCode(404, 'Not Found');
1731
+ this.d30_1 = new HttpStatusCode(405, 'Method Not Allowed');
1732
+ this.e30_1 = new HttpStatusCode(406, 'Not Acceptable');
1733
+ this.f30_1 = new HttpStatusCode(407, 'Proxy Authentication Required');
1734
+ this.g30_1 = new HttpStatusCode(408, 'Request Timeout');
1735
+ this.h30_1 = new HttpStatusCode(409, 'Conflict');
1736
+ this.i30_1 = new HttpStatusCode(410, 'Gone');
1737
+ this.j30_1 = new HttpStatusCode(411, 'Length Required');
1738
+ this.k30_1 = new HttpStatusCode(412, 'Precondition Failed');
1739
+ this.l30_1 = new HttpStatusCode(413, 'Payload Too Large');
1740
+ this.m30_1 = new HttpStatusCode(414, 'Request-URI Too Long');
1741
+ this.n30_1 = new HttpStatusCode(415, 'Unsupported Media Type');
1742
+ this.o30_1 = new HttpStatusCode(416, 'Requested Range Not Satisfiable');
1743
+ this.p30_1 = new HttpStatusCode(417, 'Expectation Failed');
1744
+ this.q30_1 = new HttpStatusCode(422, 'Unprocessable Entity');
1745
+ this.r30_1 = new HttpStatusCode(423, 'Locked');
1746
+ this.s30_1 = new HttpStatusCode(424, 'Failed Dependency');
1747
+ this.t30_1 = new HttpStatusCode(425, 'Too Early');
1748
+ this.u30_1 = new HttpStatusCode(426, 'Upgrade Required');
1749
+ this.v30_1 = new HttpStatusCode(429, 'Too Many Requests');
1750
+ this.w30_1 = new HttpStatusCode(431, 'Request Header Fields Too Large');
1751
+ this.x30_1 = new HttpStatusCode(500, 'Internal Server Error');
1752
+ this.y30_1 = new HttpStatusCode(501, 'Not Implemented');
1753
+ this.z30_1 = new HttpStatusCode(502, 'Bad Gateway');
1754
+ this.a31_1 = new HttpStatusCode(503, 'Service Unavailable');
1755
+ this.b31_1 = new HttpStatusCode(504, 'Gateway Timeout');
1756
+ this.c31_1 = new HttpStatusCode(505, 'HTTP Version Not Supported');
1757
+ this.d31_1 = new HttpStatusCode(506, 'Variant Also Negotiates');
1758
+ this.e31_1 = new HttpStatusCode(507, 'Insufficient Storage');
1759
+ this.f31_1 = allStatusCodes();
1760
+ var tmp = this;
1761
+ // Inline function 'kotlin.collections.associateBy' call
1762
+ var this_0 = this.f31_1;
1763
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
1764
+ // Inline function 'kotlin.collections.associateByTo' call
1765
+ var destination = LinkedHashMap_init_$Create$(capacity);
1766
+ var _iterator__ex2g4s = this_0.l();
1767
+ while (_iterator__ex2g4s.m()) {
1768
+ var element = _iterator__ex2g4s.n();
1769
+ var tmp$ret$0 = element.h31_1;
1770
+ destination.f2(tmp$ret$0, element);
1771
+ }
1772
+ tmp.g31_1 = destination;
1773
+ }
1774
+ var Companion_instance_5;
1775
+ function Companion_getInstance_5() {
1776
+ if (Companion_instance_5 == null)
1777
+ new Companion_5();
1778
+ return Companion_instance_5;
1779
+ }
1780
+ function HttpStatusCode(value, description) {
1781
+ Companion_getInstance_5();
1782
+ this.h31_1 = value;
1783
+ this.i31_1 = description;
1784
+ }
1785
+ protoOf(HttpStatusCode).toString = function () {
1786
+ return '' + this.h31_1 + ' ' + this.i31_1;
1787
+ };
1788
+ protoOf(HttpStatusCode).equals = function (other) {
1789
+ var tmp;
1790
+ if (other instanceof HttpStatusCode) {
1791
+ tmp = other.h31_1 === this.h31_1;
1792
+ } else {
1793
+ tmp = false;
1794
+ }
1795
+ return tmp;
1796
+ };
1797
+ protoOf(HttpStatusCode).hashCode = function () {
1798
+ return this.h31_1;
1799
+ };
1800
+ protoOf(HttpStatusCode).j31 = function (other) {
1801
+ return this.h31_1 - other.h31_1 | 0;
1802
+ };
1803
+ protoOf(HttpStatusCode).d = function (other) {
1804
+ return this.j31(other instanceof HttpStatusCode ? other : THROW_CCE());
1805
+ };
1806
+ function allStatusCodes() {
1807
+ return listOf([Companion_getInstance_5().e2z_1, Companion_getInstance_5().f2z_1, Companion_getInstance_5().g2z_1, Companion_getInstance_5().h2z_1, Companion_getInstance_5().i2z_1, Companion_getInstance_5().j2z_1, Companion_getInstance_5().k2z_1, Companion_getInstance_5().l2z_1, Companion_getInstance_5().m2z_1, Companion_getInstance_5().n2z_1, Companion_getInstance_5().o2z_1, Companion_getInstance_5().p2z_1, Companion_getInstance_5().q2z_1, Companion_getInstance_5().r2z_1, Companion_getInstance_5().s2z_1, Companion_getInstance_5().t2z_1, Companion_getInstance_5().u2z_1, Companion_getInstance_5().v2z_1, Companion_getInstance_5().w2z_1, Companion_getInstance_5().x2z_1, Companion_getInstance_5().y2z_1, Companion_getInstance_5().z2z_1, Companion_getInstance_5().a30_1, Companion_getInstance_5().b30_1, Companion_getInstance_5().c30_1, Companion_getInstance_5().d30_1, Companion_getInstance_5().e30_1, Companion_getInstance_5().f30_1, Companion_getInstance_5().g30_1, Companion_getInstance_5().h30_1, Companion_getInstance_5().i30_1, Companion_getInstance_5().j30_1, Companion_getInstance_5().k30_1, Companion_getInstance_5().l30_1, Companion_getInstance_5().m30_1, Companion_getInstance_5().n30_1, Companion_getInstance_5().o30_1, Companion_getInstance_5().p30_1, Companion_getInstance_5().q30_1, Companion_getInstance_5().r30_1, Companion_getInstance_5().s30_1, Companion_getInstance_5().t30_1, Companion_getInstance_5().u30_1, Companion_getInstance_5().v30_1, Companion_getInstance_5().w30_1, Companion_getInstance_5().x30_1, Companion_getInstance_5().y30_1, Companion_getInstance_5().z30_1, Companion_getInstance_5().a31_1, Companion_getInstance_5().b31_1, Companion_getInstance_5().c31_1, Companion_getInstance_5().d31_1, Companion_getInstance_5().e31_1]);
1808
+ }
1809
+ function isSuccess(_this__u8e3s4) {
1810
+ var containsArg = _this__u8e3s4.h31_1;
1811
+ return 200 <= containsArg ? containsArg < 300 : false;
1812
+ }
1813
+ function formUrlEncode(_this__u8e3s4) {
1814
+ // Inline function 'kotlin.collections.flatMap' call
1815
+ var tmp0 = _this__u8e3s4.d2n();
1816
+ // Inline function 'kotlin.collections.flatMapTo' call
1817
+ var destination = ArrayList_init_$Create$_0();
1818
+ var _iterator__ex2g4s = tmp0.l();
1819
+ while (_iterator__ex2g4s.m()) {
1820
+ var element = _iterator__ex2g4s.n();
1821
+ // Inline function 'kotlin.collections.map' call
1822
+ var this_0 = element.y();
1823
+ // Inline function 'kotlin.collections.mapTo' call
1824
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
1825
+ var _iterator__ex2g4s_0 = this_0.l();
1826
+ while (_iterator__ex2g4s_0.m()) {
1827
+ var item = _iterator__ex2g4s_0.n();
1828
+ var tmp$ret$0 = to(element.x(), item);
1829
+ destination_0.j(tmp$ret$0);
1830
+ }
1831
+ var list = destination_0;
1832
+ addAll(destination, list);
1833
+ }
1834
+ return formUrlEncode_0(destination);
1835
+ }
1836
+ function formUrlEncode_0(_this__u8e3s4) {
1837
+ // Inline function 'kotlin.text.buildString' call
1838
+ // Inline function 'kotlin.apply' call
1839
+ var this_0 = StringBuilder_init_$Create$();
1840
+ formUrlEncodeTo(_this__u8e3s4, this_0);
1841
+ return this_0.toString();
1842
+ }
1843
+ function formUrlEncodeTo(_this__u8e3s4, out) {
1844
+ joinTo(_this__u8e3s4, out, '&', VOID, VOID, VOID, VOID, formUrlEncodeTo$lambda);
1845
+ }
1846
+ function formUrlEncodeTo$lambda(it) {
1847
+ var key = encodeURLParameter(it.gh_1, true);
1848
+ var tmp;
1849
+ if (it.hh_1 == null) {
1850
+ tmp = key;
1851
+ } else {
1852
+ var value = encodeURLParameterValue(toString_1(it.hh_1));
1853
+ tmp = key + '=' + value;
1854
+ }
1855
+ return tmp;
1856
+ }
1857
+ function Companion_6() {
1858
+ Companion_instance_6 = this;
1859
+ this.k31_1 = EmptyParameters_instance;
1860
+ }
1861
+ var Companion_instance_6;
1862
+ function Companion_getInstance_6() {
1863
+ if (Companion_instance_6 == null)
1864
+ new Companion_6();
1865
+ return Companion_instance_6;
1866
+ }
1867
+ function Parameters() {
1868
+ }
1869
+ function ParametersBuilder(size) {
1870
+ size = size === VOID ? 8 : size;
1871
+ return new ParametersBuilderImpl(size);
1872
+ }
1873
+ function EmptyParameters() {
1874
+ }
1875
+ protoOf(EmptyParameters).f2n = function () {
1876
+ return true;
1877
+ };
1878
+ protoOf(EmptyParameters).g2n = function (name) {
1879
+ return null;
1880
+ };
1881
+ protoOf(EmptyParameters).h2n = function () {
1882
+ return emptySet();
1883
+ };
1884
+ protoOf(EmptyParameters).d2n = function () {
1885
+ return emptySet();
1886
+ };
1887
+ protoOf(EmptyParameters).r = function () {
1888
+ return true;
1889
+ };
1890
+ protoOf(EmptyParameters).toString = function () {
1891
+ return 'Parameters ' + toString(this.d2n());
1892
+ };
1893
+ protoOf(EmptyParameters).equals = function (other) {
1894
+ var tmp;
1895
+ if (!(other == null) ? isInterface(other, Parameters) : false) {
1896
+ tmp = other.r();
1897
+ } else {
1898
+ tmp = false;
1899
+ }
1900
+ return tmp;
1901
+ };
1902
+ var EmptyParameters_instance;
1903
+ function EmptyParameters_getInstance() {
1904
+ return EmptyParameters_instance;
1905
+ }
1906
+ function ParametersBuilderImpl(size) {
1907
+ size = size === VOID ? 8 : size;
1908
+ StringValuesBuilderImpl.call(this, true, size);
1909
+ }
1910
+ protoOf(ParametersBuilderImpl).h2u = function () {
1911
+ return new ParametersImpl(this.k2n_1);
1912
+ };
1913
+ function ParametersImpl(values) {
1914
+ values = values === VOID ? emptyMap() : values;
1915
+ StringValuesImpl.call(this, true, values);
1916
+ }
1917
+ protoOf(ParametersImpl).toString = function () {
1918
+ return 'Parameters ' + toString(this.d2n());
1919
+ };
1920
+ function parseQueryString(query, startIndex, limit, decode) {
1921
+ startIndex = startIndex === VOID ? 0 : startIndex;
1922
+ limit = limit === VOID ? 1000 : limit;
1923
+ decode = decode === VOID ? true : decode;
1924
+ var tmp;
1925
+ if (startIndex > get_lastIndex_0(query)) {
1926
+ tmp = Companion_getInstance_6().k31_1;
1927
+ } else {
1928
+ // Inline function 'io.ktor.http.Companion.build' call
1929
+ Companion_getInstance_6();
1930
+ // Inline function 'kotlin.apply' call
1931
+ var this_0 = ParametersBuilder();
1932
+ parse(this_0, query, startIndex, limit, decode);
1933
+ tmp = this_0.h2u();
1934
+ }
1935
+ return tmp;
1936
+ }
1937
+ function parse(_this__u8e3s4, query, startIndex, limit, decode) {
1938
+ var count = 0;
1939
+ var nameIndex = startIndex;
1940
+ var equalIndex = -1;
1941
+ var inductionVariable = startIndex;
1942
+ var last = get_lastIndex_0(query);
1943
+ if (inductionVariable <= last)
1944
+ do {
1945
+ var index = inductionVariable;
1946
+ inductionVariable = inductionVariable + 1 | 0;
1947
+ if (count === limit) {
1948
+ return Unit_instance;
1949
+ }
1950
+ var tmp0_subject = charCodeAt(query, index);
1951
+ if (tmp0_subject === _Char___init__impl__6a9atx(38)) {
1952
+ appendParam(_this__u8e3s4, query, nameIndex, equalIndex, index, decode);
1953
+ nameIndex = index + 1 | 0;
1954
+ equalIndex = -1;
1955
+ count = count + 1 | 0;
1956
+ } else if (tmp0_subject === _Char___init__impl__6a9atx(61)) {
1957
+ if (equalIndex === -1) {
1958
+ equalIndex = index;
1959
+ }
1960
+ }
1961
+ }
1962
+ while (!(index === last));
1963
+ if (count === limit) {
1964
+ return Unit_instance;
1965
+ }
1966
+ appendParam(_this__u8e3s4, query, nameIndex, equalIndex, query.length, decode);
1967
+ }
1968
+ function appendParam(_this__u8e3s4, query, nameIndex, equalIndex, endIndex, decode) {
1969
+ if (equalIndex === -1) {
1970
+ var spaceNameIndex = trimStart(nameIndex, endIndex, query);
1971
+ var spaceEndIndex = trimEnd(spaceNameIndex, endIndex, query);
1972
+ if (spaceEndIndex > spaceNameIndex) {
1973
+ var name = decode ? decodeURLQueryComponent(query, spaceNameIndex, spaceEndIndex) : substring(query, spaceNameIndex, spaceEndIndex);
1974
+ _this__u8e3s4.e2n(name, emptyList());
1975
+ }
1976
+ return Unit_instance;
1977
+ }
1978
+ var spaceNameIndex_0 = trimStart(nameIndex, equalIndex, query);
1979
+ var spaceEqualIndex = trimEnd(spaceNameIndex_0, equalIndex, query);
1980
+ if (spaceEqualIndex > spaceNameIndex_0) {
1981
+ var name_0 = decode ? decodeURLQueryComponent(query, spaceNameIndex_0, spaceEqualIndex) : substring(query, spaceNameIndex_0, spaceEqualIndex);
1982
+ var spaceValueIndex = trimStart(equalIndex + 1 | 0, endIndex, query);
1983
+ var spaceEndIndex_0 = trimEnd(spaceValueIndex, endIndex, query);
1984
+ var value = decode ? decodeURLQueryComponent(query, spaceValueIndex, spaceEndIndex_0, true) : substring(query, spaceValueIndex, spaceEndIndex_0);
1985
+ _this__u8e3s4.o2n(name_0, value);
1986
+ }
1987
+ }
1988
+ function trimStart(start, end, query) {
1989
+ var spaceIndex = start;
1990
+ while (spaceIndex < end && isWhitespace(charSequenceGet(query, spaceIndex))) {
1991
+ spaceIndex = spaceIndex + 1 | 0;
1992
+ }
1993
+ return spaceIndex;
1994
+ }
1995
+ function trimEnd(start, end, text) {
1996
+ var spaceIndex = end;
1997
+ while (spaceIndex > start && isWhitespace(charSequenceGet(text, spaceIndex - 1 | 0))) {
1998
+ spaceIndex = spaceIndex - 1 | 0;
1999
+ }
2000
+ return spaceIndex;
2001
+ }
2002
+ function applyOrigin($this) {
2003
+ var tmp;
2004
+ // Inline function 'kotlin.text.isNotEmpty' call
2005
+ var this_0 = $this.n31_1;
2006
+ if (charSequenceLength(this_0) > 0) {
2007
+ tmp = true;
2008
+ } else {
2009
+ tmp = $this.z31().x31_1 === 'file';
2010
+ }
2011
+ if (tmp)
2012
+ return Unit_instance;
2013
+ $this.n31_1 = Companion_getInstance_7().t32_1.a32_1;
2014
+ if ($this.q31_1 == null)
2015
+ $this.q31_1 = Companion_getInstance_7().t32_1.l32_1;
2016
+ if ($this.p31_1 === 0) {
2017
+ $this.v32(Companion_getInstance_7().t32_1.b32_1);
2018
+ }
2019
+ }
2020
+ function Companion_7() {
2021
+ Companion_instance_7 = this;
2022
+ this.t32_1 = Url(get_origin(this));
2023
+ this.u32_1 = 256;
2024
+ }
2025
+ var Companion_instance_7;
2026
+ function Companion_getInstance_7() {
2027
+ if (Companion_instance_7 == null)
2028
+ new Companion_7();
2029
+ return Companion_instance_7;
2030
+ }
2031
+ function URLBuilder(protocol, host, port, user, password, pathSegments, parameters, fragment, trailingQuery) {
2032
+ Companion_getInstance_7();
2033
+ protocol = protocol === VOID ? null : protocol;
2034
+ host = host === VOID ? '' : host;
2035
+ port = port === VOID ? 0 : port;
2036
+ user = user === VOID ? null : user;
2037
+ password = password === VOID ? null : password;
2038
+ pathSegments = pathSegments === VOID ? emptyList() : pathSegments;
2039
+ parameters = parameters === VOID ? Companion_getInstance_6().k31_1 : parameters;
2040
+ fragment = fragment === VOID ? '' : fragment;
2041
+ trailingQuery = trailingQuery === VOID ? false : trailingQuery;
2042
+ this.n31_1 = host;
2043
+ this.o31_1 = trailingQuery;
2044
+ this.p31_1 = port;
2045
+ this.q31_1 = protocol;
2046
+ var tmp = this;
2047
+ tmp.r31_1 = user == null ? null : encodeURLParameter(user);
2048
+ var tmp_0 = this;
2049
+ tmp_0.s31_1 = password == null ? null : encodeURLParameter(password);
2050
+ this.t31_1 = encodeURLQueryComponent(fragment);
2051
+ var tmp_1 = this;
2052
+ // Inline function 'kotlin.collections.map' call
2053
+ // Inline function 'kotlin.collections.mapTo' call
2054
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(pathSegments, 10));
2055
+ var _iterator__ex2g4s = pathSegments.l();
2056
+ while (_iterator__ex2g4s.m()) {
2057
+ var item = _iterator__ex2g4s.n();
2058
+ var tmp$ret$0 = encodeURLPathPart(item);
2059
+ destination.j(tmp$ret$0);
2060
+ }
2061
+ tmp_1.u31_1 = destination;
2062
+ this.v31_1 = encodeParameters(parameters);
2063
+ this.w31_1 = new UrlDecodedParametersBuilder(this.v31_1);
2064
+ }
2065
+ protoOf(URLBuilder).v32 = function (value) {
2066
+ // Inline function 'kotlin.require' call
2067
+ if (!(0 <= value ? value <= 65535 : false)) {
2068
+ var message = 'Port must be between 0 and 65535, or 0 if not set. Provided: ' + value;
2069
+ throw IllegalArgumentException_init_$Create$(toString(message));
2070
+ }
2071
+ this.p31_1 = value;
2072
+ };
2073
+ protoOf(URLBuilder).w32 = function (value) {
2074
+ this.q31_1 = value;
2075
+ };
2076
+ protoOf(URLBuilder).z31 = function () {
2077
+ var tmp0_elvis_lhs = this.q31_1;
2078
+ return tmp0_elvis_lhs == null ? Companion_getInstance_8().x32_1 : tmp0_elvis_lhs;
2079
+ };
2080
+ protoOf(URLBuilder).d33 = function (value) {
2081
+ var tmp = this;
2082
+ tmp.r31_1 = value == null ? null : encodeURLParameter(value);
2083
+ };
2084
+ protoOf(URLBuilder).e33 = function () {
2085
+ var tmp0_safe_receiver = this.r31_1;
2086
+ return tmp0_safe_receiver == null ? null : decodeURLPart(tmp0_safe_receiver);
2087
+ };
2088
+ protoOf(URLBuilder).f33 = function () {
2089
+ var tmp0_safe_receiver = this.s31_1;
2090
+ return tmp0_safe_receiver == null ? null : decodeURLPart(tmp0_safe_receiver);
2091
+ };
2092
+ protoOf(URLBuilder).g33 = function () {
2093
+ return decodeURLQueryComponent(this.t31_1);
2094
+ };
2095
+ protoOf(URLBuilder).h33 = function () {
2096
+ // Inline function 'kotlin.collections.map' call
2097
+ var this_0 = this.u31_1;
2098
+ // Inline function 'kotlin.collections.mapTo' call
2099
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
2100
+ var _iterator__ex2g4s = this_0.l();
2101
+ while (_iterator__ex2g4s.m()) {
2102
+ var item = _iterator__ex2g4s.n();
2103
+ var tmp$ret$0 = decodeURLPart(item);
2104
+ destination.j(tmp$ret$0);
2105
+ }
2106
+ return destination;
2107
+ };
2108
+ protoOf(URLBuilder).i33 = function (value) {
2109
+ this.v31_1 = value;
2110
+ this.w31_1 = new UrlDecodedParametersBuilder(value);
2111
+ };
2112
+ protoOf(URLBuilder).j33 = function () {
2113
+ applyOrigin(this);
2114
+ return appendTo(this, StringBuilder_init_$Create$_0(256)).toString();
2115
+ };
2116
+ protoOf(URLBuilder).toString = function () {
2117
+ return appendTo(this, StringBuilder_init_$Create$_0(256)).toString();
2118
+ };
2119
+ protoOf(URLBuilder).h2u = function () {
2120
+ applyOrigin(this);
2121
+ return new Url_0(this.q31_1, this.n31_1, this.p31_1, this.h33(), this.w31_1.h2u(), this.g33(), this.e33(), this.f33(), this.o31_1, this.j33());
2122
+ };
2123
+ function get_authority(_this__u8e3s4) {
2124
+ // Inline function 'kotlin.text.buildString' call
2125
+ // Inline function 'kotlin.apply' call
2126
+ var this_0 = StringBuilder_init_$Create$();
2127
+ this_0.z7(get_encodedUserAndPassword(_this__u8e3s4));
2128
+ this_0.z7(_this__u8e3s4.n31_1);
2129
+ if (!(_this__u8e3s4.p31_1 === 0) && !(_this__u8e3s4.p31_1 === _this__u8e3s4.z31().y31_1)) {
2130
+ this_0.z7(':');
2131
+ this_0.z7(_this__u8e3s4.p31_1.toString());
2132
+ }
2133
+ return this_0.toString();
2134
+ }
2135
+ function appendTo(_this__u8e3s4, out) {
2136
+ out.k(_this__u8e3s4.z31().x31_1);
2137
+ switch (_this__u8e3s4.z31().x31_1) {
2138
+ case 'file':
2139
+ appendFile(out, _this__u8e3s4.n31_1, get_encodedPath(_this__u8e3s4));
2140
+ return out;
2141
+ case 'mailto':
2142
+ appendMailto(out, get_encodedUserAndPassword(_this__u8e3s4), _this__u8e3s4.n31_1);
2143
+ return out;
2144
+ case 'about':
2145
+ appendPayload(out, _this__u8e3s4.n31_1);
2146
+ return out;
2147
+ case 'tel':
2148
+ appendPayload(out, _this__u8e3s4.n31_1);
2149
+ return out;
2150
+ case 'data':
2151
+ appendPayload(out, _this__u8e3s4.n31_1);
2152
+ return out;
2153
+ }
2154
+ out.k('://');
2155
+ out.k(get_authority(_this__u8e3s4));
2156
+ appendUrlFullPath(out, get_encodedPath(_this__u8e3s4), _this__u8e3s4.v31_1, _this__u8e3s4.o31_1);
2157
+ // Inline function 'kotlin.text.isNotEmpty' call
2158
+ var this_0 = _this__u8e3s4.t31_1;
2159
+ if (charSequenceLength(this_0) > 0) {
2160
+ out.a8(_Char___init__impl__6a9atx(35));
2161
+ out.k(_this__u8e3s4.t31_1);
2162
+ }
2163
+ return out;
2164
+ }
2165
+ function get_encodedUserAndPassword(_this__u8e3s4) {
2166
+ // Inline function 'kotlin.text.buildString' call
2167
+ // Inline function 'kotlin.apply' call
2168
+ var this_0 = StringBuilder_init_$Create$();
2169
+ appendUserAndPassword(this_0, _this__u8e3s4.r31_1, _this__u8e3s4.s31_1);
2170
+ return this_0.toString();
2171
+ }
2172
+ function appendFile(_this__u8e3s4, host, encodedPath) {
2173
+ _this__u8e3s4.k('://');
2174
+ _this__u8e3s4.k(host);
2175
+ if (!startsWith_1(encodedPath, _Char___init__impl__6a9atx(47))) {
2176
+ _this__u8e3s4.a8(_Char___init__impl__6a9atx(47));
2177
+ }
2178
+ _this__u8e3s4.k(encodedPath);
2179
+ }
2180
+ function set_encodedPath(_this__u8e3s4, value) {
2181
+ _this__u8e3s4.u31_1 = isBlank(value) ? emptyList() : value === '/' ? get_ROOT_PATH() : toMutableList(split(value, charArrayOf([_Char___init__impl__6a9atx(47)])));
2182
+ }
2183
+ function get_encodedPath(_this__u8e3s4) {
2184
+ return joinPath(_this__u8e3s4.u31_1);
2185
+ }
2186
+ function appendMailto(_this__u8e3s4, encodedUser, host) {
2187
+ _this__u8e3s4.k(':');
2188
+ _this__u8e3s4.k(encodedUser);
2189
+ _this__u8e3s4.k(host);
2190
+ }
2191
+ function appendPayload(_this__u8e3s4, host) {
2192
+ _this__u8e3s4.k(':');
2193
+ _this__u8e3s4.k(host);
2194
+ }
2195
+ function joinPath(_this__u8e3s4) {
2196
+ if (_this__u8e3s4.r())
2197
+ return '';
2198
+ if (_this__u8e3s4.o() === 1) {
2199
+ // Inline function 'kotlin.text.isEmpty' call
2200
+ var this_0 = first_0(_this__u8e3s4);
2201
+ if (charSequenceLength(this_0) === 0)
2202
+ return '/';
2203
+ return first_0(_this__u8e3s4);
2204
+ }
2205
+ return joinToString(_this__u8e3s4, '/');
2206
+ }
2207
+ function get_ROOT_PATH() {
2208
+ _init_properties_URLParser_kt__sf11to();
2209
+ return ROOT_PATH;
2210
+ }
2211
+ var ROOT_PATH;
2212
+ function takeFrom(_this__u8e3s4, urlString) {
2213
+ _init_properties_URLParser_kt__sf11to();
2214
+ if (isBlank(urlString))
2215
+ return _this__u8e3s4;
2216
+ var tmp;
2217
+ try {
2218
+ tmp = takeFromUnsafe(_this__u8e3s4, urlString);
2219
+ } catch ($p) {
2220
+ var tmp_0;
2221
+ if ($p instanceof Error) {
2222
+ var cause = $p;
2223
+ throw new URLParserException(urlString, cause);
2224
+ } else {
2225
+ throw $p;
2226
+ }
2227
+ }
2228
+ return tmp;
2229
+ }
2230
+ function takeFromUnsafe(_this__u8e3s4, urlString) {
2231
+ _init_properties_URLParser_kt__sf11to();
2232
+ var tmp$ret$1;
2233
+ $l$block: {
2234
+ // Inline function 'kotlin.text.indexOfFirst' call
2235
+ var inductionVariable = 0;
2236
+ var last = charSequenceLength(urlString) - 1 | 0;
2237
+ if (inductionVariable <= last)
2238
+ do {
2239
+ var index = inductionVariable;
2240
+ inductionVariable = inductionVariable + 1 | 0;
2241
+ var it = charSequenceGet(urlString, index);
2242
+ if (!isWhitespace(it)) {
2243
+ tmp$ret$1 = index;
2244
+ break $l$block;
2245
+ }
2246
+ }
2247
+ while (inductionVariable <= last);
2248
+ tmp$ret$1 = -1;
2249
+ }
2250
+ var startIndex = tmp$ret$1;
2251
+ var tmp$ret$3;
2252
+ $l$block_0: {
2253
+ // Inline function 'kotlin.text.indexOfLast' call
2254
+ var inductionVariable_0 = charSequenceLength(urlString) - 1 | 0;
2255
+ if (0 <= inductionVariable_0)
2256
+ do {
2257
+ var index_0 = inductionVariable_0;
2258
+ inductionVariable_0 = inductionVariable_0 + -1 | 0;
2259
+ var it_0 = charSequenceGet(urlString, index_0);
2260
+ if (!isWhitespace(it_0)) {
2261
+ tmp$ret$3 = index_0;
2262
+ break $l$block_0;
2263
+ }
2264
+ }
2265
+ while (0 <= inductionVariable_0);
2266
+ tmp$ret$3 = -1;
2267
+ }
2268
+ var endIndex = tmp$ret$3 + 1 | 0;
2269
+ var schemeLength = findScheme(urlString, startIndex, endIndex);
2270
+ if (schemeLength > 0) {
2271
+ var scheme = substring(urlString, startIndex, startIndex + schemeLength | 0);
2272
+ _this__u8e3s4.w32(Companion_getInstance_8().k33(scheme));
2273
+ startIndex = startIndex + (schemeLength + 1 | 0) | 0;
2274
+ }
2275
+ if (_this__u8e3s4.z31().x31_1 === 'data') {
2276
+ _this__u8e3s4.n31_1 = substring(urlString, startIndex, endIndex);
2277
+ return _this__u8e3s4;
2278
+ }
2279
+ var slashCount = count(urlString, startIndex, endIndex, _Char___init__impl__6a9atx(47));
2280
+ startIndex = startIndex + slashCount | 0;
2281
+ if (_this__u8e3s4.z31().x31_1 === 'file') {
2282
+ parseFile(_this__u8e3s4, urlString, startIndex, endIndex, slashCount);
2283
+ return _this__u8e3s4;
2284
+ }
2285
+ if (_this__u8e3s4.z31().x31_1 === 'mailto') {
2286
+ // Inline function 'kotlin.require' call
2287
+ // Inline function 'kotlin.require' call
2288
+ if (!(slashCount === 0)) {
2289
+ var message = 'Failed requirement.';
2290
+ throw IllegalArgumentException_init_$Create$(toString(message));
2291
+ }
2292
+ parseMailto(_this__u8e3s4, urlString, startIndex, endIndex);
2293
+ return _this__u8e3s4;
2294
+ }
2295
+ if (_this__u8e3s4.z31().x31_1 === 'about') {
2296
+ // Inline function 'kotlin.require' call
2297
+ // Inline function 'kotlin.require' call
2298
+ if (!(slashCount === 0)) {
2299
+ var message_0 = 'Failed requirement.';
2300
+ throw IllegalArgumentException_init_$Create$(toString(message_0));
2301
+ }
2302
+ _this__u8e3s4.n31_1 = substring(urlString, startIndex, endIndex);
2303
+ return _this__u8e3s4;
2304
+ }
2305
+ if (_this__u8e3s4.z31().x31_1 === 'tel') {
2306
+ // Inline function 'kotlin.require' call
2307
+ // Inline function 'kotlin.require' call
2308
+ if (!(slashCount === 0)) {
2309
+ var message_1 = 'Failed requirement.';
2310
+ throw IllegalArgumentException_init_$Create$(toString(message_1));
2311
+ }
2312
+ _this__u8e3s4.n31_1 = substring(urlString, startIndex, endIndex);
2313
+ return _this__u8e3s4;
2314
+ }
2315
+ if (slashCount >= 2) {
2316
+ loop: while (true) {
2317
+ // Inline function 'kotlin.takeIf' call
2318
+ var this_0 = indexOfAny(urlString, toCharArray('@/\\?#'), startIndex);
2319
+ var tmp;
2320
+ if (this_0 > 0) {
2321
+ tmp = this_0;
2322
+ } else {
2323
+ tmp = null;
2324
+ }
2325
+ var tmp0_elvis_lhs = tmp;
2326
+ var delimiter = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
2327
+ if (delimiter < endIndex && charCodeAt(urlString, delimiter) === _Char___init__impl__6a9atx(64)) {
2328
+ var passwordIndex = indexOfColonInHostPort(urlString, startIndex, delimiter);
2329
+ if (!(passwordIndex === -1)) {
2330
+ _this__u8e3s4.r31_1 = substring(urlString, startIndex, passwordIndex);
2331
+ _this__u8e3s4.s31_1 = substring(urlString, passwordIndex + 1 | 0, delimiter);
2332
+ } else {
2333
+ _this__u8e3s4.r31_1 = substring(urlString, startIndex, delimiter);
2334
+ }
2335
+ startIndex = delimiter + 1 | 0;
2336
+ } else {
2337
+ fillHost(_this__u8e3s4, urlString, startIndex, delimiter);
2338
+ startIndex = delimiter;
2339
+ break loop;
2340
+ }
2341
+ }
2342
+ }
2343
+ if (startIndex >= endIndex) {
2344
+ _this__u8e3s4.u31_1 = charCodeAt(urlString, endIndex - 1 | 0) === _Char___init__impl__6a9atx(47) ? get_ROOT_PATH() : emptyList();
2345
+ return _this__u8e3s4;
2346
+ }
2347
+ var tmp_0 = _this__u8e3s4;
2348
+ var tmp_1;
2349
+ if (slashCount === 0) {
2350
+ tmp_1 = dropLast(_this__u8e3s4.u31_1, 1);
2351
+ } else {
2352
+ tmp_1 = emptyList();
2353
+ }
2354
+ tmp_0.u31_1 = tmp_1;
2355
+ // Inline function 'kotlin.takeIf' call
2356
+ var this_1 = indexOfAny(urlString, toCharArray('?#'), startIndex);
2357
+ var tmp_2;
2358
+ if (this_1 > 0) {
2359
+ tmp_2 = this_1;
2360
+ } else {
2361
+ tmp_2 = null;
2362
+ }
2363
+ var tmp1_elvis_lhs = tmp_2;
2364
+ var pathEnd = tmp1_elvis_lhs == null ? endIndex : tmp1_elvis_lhs;
2365
+ if (pathEnd > startIndex) {
2366
+ var rawPath = substring(urlString, startIndex, pathEnd);
2367
+ var tmp_3;
2368
+ var tmp_4;
2369
+ if (_this__u8e3s4.u31_1.o() === 1) {
2370
+ // Inline function 'kotlin.text.isEmpty' call
2371
+ var this_2 = first_0(_this__u8e3s4.u31_1);
2372
+ tmp_4 = charSequenceLength(this_2) === 0;
2373
+ } else {
2374
+ tmp_4 = false;
2375
+ }
2376
+ if (tmp_4) {
2377
+ tmp_3 = emptyList();
2378
+ } else {
2379
+ tmp_3 = _this__u8e3s4.u31_1;
2380
+ }
2381
+ var basePath = tmp_3;
2382
+ var rawChunks = rawPath === '/' ? get_ROOT_PATH() : split(rawPath, charArrayOf([_Char___init__impl__6a9atx(47)]));
2383
+ var relativePath = plus_0(slashCount === 1 ? get_ROOT_PATH() : emptyList(), rawChunks);
2384
+ _this__u8e3s4.u31_1 = plus_0(basePath, relativePath);
2385
+ startIndex = pathEnd;
2386
+ }
2387
+ if (startIndex < endIndex && charCodeAt(urlString, startIndex) === _Char___init__impl__6a9atx(63)) {
2388
+ startIndex = parseQuery(_this__u8e3s4, urlString, startIndex, endIndex);
2389
+ }
2390
+ parseFragment(_this__u8e3s4, urlString, startIndex, endIndex);
2391
+ return _this__u8e3s4;
2392
+ }
2393
+ function URLParserException(urlString, cause) {
2394
+ IllegalStateException_init_$Init$('Fail to parse url: ' + urlString, cause, this);
2395
+ captureStack(this, URLParserException);
2396
+ }
2397
+ function findScheme(urlString, startIndex, endIndex) {
2398
+ _init_properties_URLParser_kt__sf11to();
2399
+ var current = startIndex;
2400
+ var incorrectSchemePosition = -1;
2401
+ var firstChar = charCodeAt(urlString, current);
2402
+ 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)) {
2403
+ incorrectSchemePosition = current;
2404
+ }
2405
+ while (current < endIndex) {
2406
+ var char = charCodeAt(urlString, current);
2407
+ if (char === _Char___init__impl__6a9atx(58)) {
2408
+ if (!(incorrectSchemePosition === -1)) {
2409
+ throw IllegalArgumentException_init_$Create$('Illegal character in scheme at position ' + incorrectSchemePosition);
2410
+ }
2411
+ return current - startIndex | 0;
2412
+ }
2413
+ if (char === _Char___init__impl__6a9atx(47) || char === _Char___init__impl__6a9atx(63) || char === _Char___init__impl__6a9atx(35))
2414
+ return -1;
2415
+ 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))) {
2416
+ incorrectSchemePosition = current;
2417
+ }
2418
+ current = current + 1 | 0;
2419
+ }
2420
+ return -1;
2421
+ }
2422
+ function count(urlString, startIndex, endIndex, char) {
2423
+ _init_properties_URLParser_kt__sf11to();
2424
+ var result = 0;
2425
+ $l$loop: while ((startIndex + result | 0) < endIndex && charCodeAt(urlString, startIndex + result | 0) === char) {
2426
+ result = result + 1 | 0;
2427
+ }
2428
+ return result;
2429
+ }
2430
+ function parseFile(_this__u8e3s4, urlString, startIndex, endIndex, slashCount) {
2431
+ _init_properties_URLParser_kt__sf11to();
2432
+ switch (slashCount) {
2433
+ case 1:
2434
+ _this__u8e3s4.n31_1 = '';
2435
+ set_encodedPath(_this__u8e3s4, substring(urlString, startIndex, endIndex));
2436
+ break;
2437
+ case 2:
2438
+ var nextSlash = indexOf(urlString, _Char___init__impl__6a9atx(47), startIndex);
2439
+ if (nextSlash === -1 || nextSlash === endIndex) {
2440
+ _this__u8e3s4.n31_1 = substring(urlString, startIndex, endIndex);
2441
+ return Unit_instance;
2442
+ }
2443
+
2444
+ _this__u8e3s4.n31_1 = substring(urlString, startIndex, nextSlash);
2445
+ set_encodedPath(_this__u8e3s4, substring(urlString, nextSlash, endIndex));
2446
+ break;
2447
+ case 3:
2448
+ _this__u8e3s4.n31_1 = '';
2449
+ set_encodedPath(_this__u8e3s4, '/' + substring(urlString, startIndex, endIndex));
2450
+ break;
2451
+ default:
2452
+ throw IllegalArgumentException_init_$Create$('Invalid file url: ' + urlString);
2453
+ }
2454
+ }
2455
+ function parseMailto(_this__u8e3s4, urlString, startIndex, endIndex) {
2456
+ _init_properties_URLParser_kt__sf11to();
2457
+ var delimiter = indexOf_0(urlString, '@', startIndex);
2458
+ if (delimiter === -1) {
2459
+ throw IllegalArgumentException_init_$Create$('Invalid mailto url: ' + urlString + ", it should contain '@'.");
2460
+ }
2461
+ _this__u8e3s4.d33(decodeURLPart(substring(urlString, startIndex, delimiter)));
2462
+ _this__u8e3s4.n31_1 = substring(urlString, delimiter + 1 | 0, endIndex);
2463
+ }
2464
+ function indexOfColonInHostPort(_this__u8e3s4, startIndex, endIndex) {
2465
+ _init_properties_URLParser_kt__sf11to();
2466
+ var skip = false;
2467
+ var inductionVariable = startIndex;
2468
+ if (inductionVariable < endIndex)
2469
+ do {
2470
+ var index = inductionVariable;
2471
+ inductionVariable = inductionVariable + 1 | 0;
2472
+ var tmp0_subject = charCodeAt(_this__u8e3s4, index);
2473
+ if (tmp0_subject === _Char___init__impl__6a9atx(91))
2474
+ skip = true;
2475
+ else if (tmp0_subject === _Char___init__impl__6a9atx(93))
2476
+ skip = false;
2477
+ else if (tmp0_subject === _Char___init__impl__6a9atx(58))
2478
+ if (!skip)
2479
+ return index;
2480
+ }
2481
+ while (inductionVariable < endIndex);
2482
+ return -1;
2483
+ }
2484
+ function fillHost(_this__u8e3s4, urlString, startIndex, endIndex) {
2485
+ _init_properties_URLParser_kt__sf11to();
2486
+ // Inline function 'kotlin.takeIf' call
2487
+ var this_0 = indexOfColonInHostPort(urlString, startIndex, endIndex);
2488
+ var tmp;
2489
+ if (this_0 > 0) {
2490
+ tmp = this_0;
2491
+ } else {
2492
+ tmp = null;
2493
+ }
2494
+ var tmp0_elvis_lhs = tmp;
2495
+ var colonIndex = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
2496
+ _this__u8e3s4.n31_1 = substring(urlString, startIndex, colonIndex);
2497
+ var tmp_0;
2498
+ if ((colonIndex + 1 | 0) < endIndex) {
2499
+ tmp_0 = toInt(substring(urlString, colonIndex + 1 | 0, endIndex));
2500
+ } else {
2501
+ tmp_0 = 0;
2502
+ }
2503
+ _this__u8e3s4.v32(tmp_0);
2504
+ }
2505
+ function parseQuery(_this__u8e3s4, urlString, startIndex, endIndex) {
2506
+ _init_properties_URLParser_kt__sf11to();
2507
+ if ((startIndex + 1 | 0) === endIndex) {
2508
+ _this__u8e3s4.o31_1 = true;
2509
+ return endIndex;
2510
+ }
2511
+ // Inline function 'kotlin.takeIf' call
2512
+ var this_0 = indexOf(urlString, _Char___init__impl__6a9atx(35), startIndex + 1 | 0);
2513
+ var tmp;
2514
+ if (this_0 > 0) {
2515
+ tmp = this_0;
2516
+ } else {
2517
+ tmp = null;
2518
+ }
2519
+ var tmp0_elvis_lhs = tmp;
2520
+ var fragmentStart = tmp0_elvis_lhs == null ? endIndex : tmp0_elvis_lhs;
2521
+ var rawParameters = parseQueryString(substring(urlString, startIndex + 1 | 0, fragmentStart), VOID, VOID, false);
2522
+ rawParameters.i2n(parseQuery$lambda(_this__u8e3s4));
2523
+ return fragmentStart;
2524
+ }
2525
+ function parseFragment(_this__u8e3s4, urlString, startIndex, endIndex) {
2526
+ _init_properties_URLParser_kt__sf11to();
2527
+ if (startIndex < endIndex && charCodeAt(urlString, startIndex) === _Char___init__impl__6a9atx(35)) {
2528
+ _this__u8e3s4.t31_1 = substring(urlString, startIndex + 1 | 0, endIndex);
2529
+ }
2530
+ }
2531
+ function parseQuery$lambda($this_parseQuery) {
2532
+ return function (key, values) {
2533
+ $this_parseQuery.v31_1.e2n(key, values);
2534
+ return Unit_instance;
2535
+ };
2536
+ }
2537
+ var properties_initialized_URLParser_kt_hd1g6a;
2538
+ function _init_properties_URLParser_kt__sf11to() {
2539
+ if (!properties_initialized_URLParser_kt_hd1g6a) {
2540
+ properties_initialized_URLParser_kt_hd1g6a = true;
2541
+ ROOT_PATH = listOf_0('');
2542
+ }
2543
+ }
2544
+ function Companion_8() {
2545
+ Companion_instance_8 = this;
2546
+ this.x32_1 = new URLProtocol('http', 80);
2547
+ this.y32_1 = new URLProtocol('https', 443);
2548
+ this.z32_1 = new URLProtocol('ws', 80);
2549
+ this.a33_1 = new URLProtocol('wss', 443);
2550
+ this.b33_1 = new URLProtocol('socks', 1080);
2551
+ var tmp = this;
2552
+ // Inline function 'kotlin.collections.associateBy' call
2553
+ var this_0 = listOf([this.x32_1, this.y32_1, this.z32_1, this.a33_1, this.b33_1]);
2554
+ var capacity = coerceAtLeast(mapCapacity(collectionSizeOrDefault(this_0, 10)), 16);
2555
+ // Inline function 'kotlin.collections.associateByTo' call
2556
+ var destination = LinkedHashMap_init_$Create$(capacity);
2557
+ var _iterator__ex2g4s = this_0.l();
2558
+ while (_iterator__ex2g4s.m()) {
2559
+ var element = _iterator__ex2g4s.n();
2560
+ var tmp$ret$0 = element.x31_1;
2561
+ destination.f2(tmp$ret$0, element);
2562
+ }
2563
+ tmp.c33_1 = destination;
2564
+ }
2565
+ protoOf(Companion_8).k33 = function (name) {
2566
+ // Inline function 'kotlin.let' call
2567
+ var it = toLowerCasePreservingASCIIRules(name);
2568
+ var tmp0_elvis_lhs = Companion_getInstance_8().c33_1.c2(it);
2569
+ return tmp0_elvis_lhs == null ? new URLProtocol(it, 0) : tmp0_elvis_lhs;
2570
+ };
2571
+ var Companion_instance_8;
2572
+ function Companion_getInstance_8() {
2573
+ if (Companion_instance_8 == null)
2574
+ new Companion_8();
2575
+ return Companion_instance_8;
2576
+ }
2577
+ function URLProtocol(name, defaultPort) {
2578
+ Companion_getInstance_8();
2579
+ this.x31_1 = name;
2580
+ this.y31_1 = defaultPort;
2581
+ var tmp0 = this.x31_1;
2582
+ var tmp$ret$1;
2583
+ $l$block: {
2584
+ // Inline function 'kotlin.text.all' call
2585
+ var inductionVariable = 0;
2586
+ while (inductionVariable < charSequenceLength(tmp0)) {
2587
+ var element = charSequenceGet(tmp0, inductionVariable);
2588
+ inductionVariable = inductionVariable + 1 | 0;
2589
+ if (!isLowerCase(element)) {
2590
+ tmp$ret$1 = false;
2591
+ break $l$block;
2592
+ }
2593
+ }
2594
+ tmp$ret$1 = true;
2595
+ }
2596
+ // Inline function 'kotlin.require' call
2597
+ if (!tmp$ret$1) {
2598
+ var message = 'All characters should be lower case';
2599
+ throw IllegalArgumentException_init_$Create$(toString(message));
2600
+ }
2601
+ }
2602
+ protoOf(URLProtocol).toString = function () {
2603
+ return 'URLProtocol(name=' + this.x31_1 + ', defaultPort=' + this.y31_1 + ')';
2604
+ };
2605
+ protoOf(URLProtocol).hashCode = function () {
2606
+ var result = getStringHashCode(this.x31_1);
2607
+ result = imul(result, 31) + this.y31_1 | 0;
2608
+ return result;
2609
+ };
2610
+ protoOf(URLProtocol).equals = function (other) {
2611
+ if (this === other)
2612
+ return true;
2613
+ if (!(other instanceof URLProtocol))
2614
+ return false;
2615
+ var tmp0_other_with_cast = other instanceof URLProtocol ? other : THROW_CCE();
2616
+ if (!(this.x31_1 === tmp0_other_with_cast.x31_1))
2617
+ return false;
2618
+ if (!(this.y31_1 === tmp0_other_with_cast.y31_1))
2619
+ return false;
2620
+ return true;
2621
+ };
2622
+ function isSecure(_this__u8e3s4) {
2623
+ return _this__u8e3s4.x31_1 === 'https' || _this__u8e3s4.x31_1 === 'wss';
2624
+ }
2625
+ function takeFrom_0(_this__u8e3s4, url) {
2626
+ _this__u8e3s4.q31_1 = url.q31_1;
2627
+ _this__u8e3s4.n31_1 = url.n31_1;
2628
+ _this__u8e3s4.v32(url.p31_1);
2629
+ _this__u8e3s4.u31_1 = url.u31_1;
2630
+ _this__u8e3s4.r31_1 = url.r31_1;
2631
+ _this__u8e3s4.s31_1 = url.s31_1;
2632
+ // Inline function 'kotlin.apply' call
2633
+ var this_0 = ParametersBuilder();
2634
+ appendAll(this_0, url.v31_1);
2635
+ _this__u8e3s4.i33(this_0);
2636
+ _this__u8e3s4.t31_1 = url.t31_1;
2637
+ _this__u8e3s4.o31_1 = url.o31_1;
2638
+ return _this__u8e3s4;
2639
+ }
2640
+ function Url(urlString) {
2641
+ return URLBuilder_0(urlString).h2u();
2642
+ }
2643
+ function appendUrlFullPath(_this__u8e3s4, encodedPath, encodedQueryParameters, trailingQuery) {
2644
+ var tmp;
2645
+ // Inline function 'kotlin.text.isNotBlank' call
2646
+ if (!isBlank(encodedPath)) {
2647
+ tmp = !startsWith(encodedPath, '/');
2648
+ } else {
2649
+ tmp = false;
2650
+ }
2651
+ if (tmp) {
2652
+ _this__u8e3s4.a8(_Char___init__impl__6a9atx(47));
2653
+ }
2654
+ _this__u8e3s4.k(encodedPath);
2655
+ if (!encodedQueryParameters.r() || trailingQuery) {
2656
+ _this__u8e3s4.k('?');
2657
+ }
2658
+ // Inline function 'kotlin.collections.flatMap' call
2659
+ var tmp0 = encodedQueryParameters.d2n();
2660
+ // Inline function 'kotlin.collections.flatMapTo' call
2661
+ var destination = ArrayList_init_$Create$_0();
2662
+ var _iterator__ex2g4s = tmp0.l();
2663
+ while (_iterator__ex2g4s.m()) {
2664
+ var element = _iterator__ex2g4s.n();
2665
+ // Inline function 'kotlin.collections.component1' call
2666
+ var key = element.x();
2667
+ // Inline function 'kotlin.collections.component2' call
2668
+ var value = element.y();
2669
+ var tmp_0;
2670
+ if (value.r()) {
2671
+ tmp_0 = listOf_0(to(key, null));
2672
+ } else {
2673
+ // Inline function 'kotlin.collections.map' call
2674
+ // Inline function 'kotlin.collections.mapTo' call
2675
+ var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(value, 10));
2676
+ var _iterator__ex2g4s_0 = value.l();
2677
+ while (_iterator__ex2g4s_0.m()) {
2678
+ var item = _iterator__ex2g4s_0.n();
2679
+ var tmp$ret$3 = to(key, item);
2680
+ destination_0.j(tmp$ret$3);
2681
+ }
2682
+ tmp_0 = destination_0;
2683
+ }
2684
+ var list = tmp_0;
2685
+ addAll(destination, list);
2686
+ }
2687
+ var tmp_1 = destination;
2688
+ joinTo(tmp_1, _this__u8e3s4, '&', VOID, VOID, VOID, VOID, appendUrlFullPath$lambda);
2689
+ }
2690
+ function appendUserAndPassword(_this__u8e3s4, encodedUser, encodedPassword) {
2691
+ if (encodedUser == null) {
2692
+ return Unit_instance;
2693
+ }
2694
+ _this__u8e3s4.z7(encodedUser);
2695
+ if (!(encodedPassword == null)) {
2696
+ _this__u8e3s4.a8(_Char___init__impl__6a9atx(58));
2697
+ _this__u8e3s4.z7(encodedPassword);
2698
+ }
2699
+ _this__u8e3s4.z7('@');
2700
+ }
2701
+ function URLBuilder_0(urlString) {
2702
+ return takeFrom(new URLBuilder(), urlString);
2703
+ }
2704
+ function get_hostWithPortIfSpecified(_this__u8e3s4) {
2705
+ var tmp0_subject = _this__u8e3s4.b32_1;
2706
+ return tmp0_subject === 0 || tmp0_subject === _this__u8e3s4.m32_1.y31_1 ? _this__u8e3s4.a32_1 : get_hostWithPort(_this__u8e3s4);
2707
+ }
2708
+ function get_hostWithPort(_this__u8e3s4) {
2709
+ return _this__u8e3s4.a32_1 + ':' + _this__u8e3s4.l33();
2710
+ }
2711
+ function appendUrlFullPath$lambda(it) {
2712
+ var key = it.gh_1;
2713
+ var tmp;
2714
+ if (it.hh_1 == null) {
2715
+ tmp = key;
2716
+ } else {
2717
+ var value = toString_1(it.hh_1);
2718
+ tmp = key + '=' + value;
2719
+ }
2720
+ return tmp;
2721
+ }
2722
+ function Companion_9() {
2723
+ }
2724
+ var Companion_instance_9;
2725
+ function Companion_getInstance_9() {
2726
+ return Companion_instance_9;
2727
+ }
2728
+ function Url$segments$delegate$lambda($pathSegments) {
2729
+ return function () {
2730
+ var tmp;
2731
+ if ($pathSegments.r()) {
2732
+ return emptyList();
2733
+ }
2734
+ var tmp_0;
2735
+ var tmp_1;
2736
+ // Inline function 'kotlin.text.isEmpty' call
2737
+ var this_0 = first_0($pathSegments);
2738
+ if (charSequenceLength(this_0) === 0) {
2739
+ tmp_1 = $pathSegments.o() > 1;
2740
+ } else {
2741
+ tmp_1 = false;
2742
+ }
2743
+ if (tmp_1) {
2744
+ tmp_0 = 1;
2745
+ } else {
2746
+ tmp_0 = 0;
2747
+ }
2748
+ var start = tmp_0;
2749
+ var tmp_2;
2750
+ // Inline function 'kotlin.text.isEmpty' call
2751
+ var this_1 = last($pathSegments);
2752
+ if (charSequenceLength(this_1) === 0) {
2753
+ tmp_2 = get_lastIndex($pathSegments);
2754
+ } else {
2755
+ tmp_2 = get_lastIndex($pathSegments) + 1 | 0;
2756
+ }
2757
+ var end = tmp_2;
2758
+ return $pathSegments.z1(start, end);
2759
+ };
2760
+ }
2761
+ function Url$encodedPath$delegate$lambda($pathSegments, this$0) {
2762
+ return function () {
2763
+ var tmp;
2764
+ if ($pathSegments.r()) {
2765
+ return '';
2766
+ }
2767
+ var pathStartIndex = indexOf(this$0.h32_1, _Char___init__impl__6a9atx(47), this$0.m32_1.x31_1.length + 3 | 0);
2768
+ var tmp_0;
2769
+ if (pathStartIndex === -1) {
2770
+ return '';
2771
+ }
2772
+ // Inline function 'kotlin.charArrayOf' call
2773
+ var tmp$ret$0 = charArrayOf([_Char___init__impl__6a9atx(63), _Char___init__impl__6a9atx(35)]);
2774
+ var pathEndIndex = indexOfAny(this$0.h32_1, tmp$ret$0, pathStartIndex);
2775
+ var tmp_1;
2776
+ if (pathEndIndex === -1) {
2777
+ return substring_0(this$0.h32_1, pathStartIndex);
2778
+ }
2779
+ return substring(this$0.h32_1, pathStartIndex, pathEndIndex);
2780
+ };
2781
+ }
2782
+ function Url$encodedQuery$delegate$lambda(this$0) {
2783
+ return function () {
2784
+ var queryStart = indexOf(this$0.h32_1, _Char___init__impl__6a9atx(63)) + 1 | 0;
2785
+ var tmp;
2786
+ if (queryStart === 0) {
2787
+ return '';
2788
+ }
2789
+ var queryEnd = indexOf(this$0.h32_1, _Char___init__impl__6a9atx(35), queryStart);
2790
+ var tmp_0;
2791
+ if (queryEnd === -1) {
2792
+ return substring_0(this$0.h32_1, queryStart);
2793
+ }
2794
+ return substring(this$0.h32_1, queryStart, queryEnd);
2795
+ };
2796
+ }
2797
+ function Url$encodedPathAndQuery$delegate$lambda(this$0) {
2798
+ return function () {
2799
+ var pathStart = indexOf(this$0.h32_1, _Char___init__impl__6a9atx(47), this$0.m32_1.x31_1.length + 3 | 0);
2800
+ var tmp;
2801
+ if (pathStart === -1) {
2802
+ return '';
2803
+ }
2804
+ var queryEnd = indexOf(this$0.h32_1, _Char___init__impl__6a9atx(35), pathStart);
2805
+ var tmp_0;
2806
+ if (queryEnd === -1) {
2807
+ return substring_0(this$0.h32_1, pathStart);
2808
+ }
2809
+ return substring(this$0.h32_1, pathStart, queryEnd);
2810
+ };
2811
+ }
2812
+ function Url$encodedUser$delegate$lambda(this$0) {
2813
+ return function () {
2814
+ var tmp;
2815
+ if (this$0.e32_1 == null) {
2816
+ return null;
2817
+ }
2818
+ var tmp_0;
2819
+ // Inline function 'kotlin.text.isEmpty' call
2820
+ var this_0 = this$0.e32_1;
2821
+ if (charSequenceLength(this_0) === 0) {
2822
+ return '';
2823
+ }
2824
+ var usernameStart = this$0.m32_1.x31_1.length + 3 | 0;
2825
+ // Inline function 'kotlin.charArrayOf' call
2826
+ var tmp$ret$1 = charArrayOf([_Char___init__impl__6a9atx(58), _Char___init__impl__6a9atx(64)]);
2827
+ var usernameEnd = indexOfAny(this$0.h32_1, tmp$ret$1, usernameStart);
2828
+ return substring(this$0.h32_1, usernameStart, usernameEnd);
2829
+ };
2830
+ }
2831
+ function Url$_get_encodedUser_$ref_3lb9bi() {
2832
+ return function (p0) {
2833
+ return p0.m33();
2834
+ };
2835
+ }
2836
+ function Url$encodedPassword$delegate$lambda(this$0) {
2837
+ return function () {
2838
+ var tmp;
2839
+ if (this$0.f32_1 == null) {
2840
+ return null;
2841
+ }
2842
+ var tmp_0;
2843
+ // Inline function 'kotlin.text.isEmpty' call
2844
+ var this_0 = this$0.f32_1;
2845
+ if (charSequenceLength(this_0) === 0) {
2846
+ return '';
2847
+ }
2848
+ var passwordStart = indexOf(this$0.h32_1, _Char___init__impl__6a9atx(58), this$0.m32_1.x31_1.length + 3 | 0) + 1 | 0;
2849
+ var passwordEnd = indexOf(this$0.h32_1, _Char___init__impl__6a9atx(64));
2850
+ return substring(this$0.h32_1, passwordStart, passwordEnd);
2851
+ };
2852
+ }
2853
+ function Url$_get_encodedPassword_$ref_25ixc2() {
2854
+ return function (p0) {
2855
+ return p0.n33();
2856
+ };
2857
+ }
2858
+ function Url$encodedFragment$delegate$lambda(this$0) {
2859
+ return function () {
2860
+ var fragmentStart = indexOf(this$0.h32_1, _Char___init__impl__6a9atx(35)) + 1 | 0;
2861
+ var tmp;
2862
+ if (fragmentStart === 0) {
2863
+ return '';
2864
+ }
2865
+ return substring_0(this$0.h32_1, fragmentStart);
2866
+ };
2867
+ }
2868
+ function Url_0(protocol, host, specifiedPort, pathSegments, parameters, fragment, user, password, trailingQuery, urlString) {
2869
+ this.a32_1 = host;
2870
+ this.b32_1 = specifiedPort;
2871
+ this.c32_1 = parameters;
2872
+ this.d32_1 = fragment;
2873
+ this.e32_1 = user;
2874
+ this.f32_1 = password;
2875
+ this.g32_1 = trailingQuery;
2876
+ this.h32_1 = urlString;
2877
+ var containsArg = this.b32_1;
2878
+ // Inline function 'kotlin.require' call
2879
+ if (!(0 <= containsArg ? containsArg <= 65535 : false)) {
2880
+ var message = 'Port must be between 0 and 65535, or 0 if not set. Provided: ' + this.b32_1;
2881
+ throw IllegalArgumentException_init_$Create$(toString(message));
2882
+ }
2883
+ this.i32_1 = pathSegments;
2884
+ this.j32_1 = pathSegments;
2885
+ var tmp = this;
2886
+ tmp.k32_1 = lazy_0(Url$segments$delegate$lambda(pathSegments));
2887
+ this.l32_1 = protocol;
2888
+ var tmp_0 = this;
2889
+ var tmp0_elvis_lhs = this.l32_1;
2890
+ tmp_0.m32_1 = tmp0_elvis_lhs == null ? Companion_getInstance_8().x32_1 : tmp0_elvis_lhs;
2891
+ var tmp_1 = this;
2892
+ tmp_1.n32_1 = lazy_0(Url$encodedPath$delegate$lambda(pathSegments, this));
2893
+ var tmp_2 = this;
2894
+ tmp_2.o32_1 = lazy_0(Url$encodedQuery$delegate$lambda(this));
2895
+ var tmp_3 = this;
2896
+ tmp_3.p32_1 = lazy_0(Url$encodedPathAndQuery$delegate$lambda(this));
2897
+ var tmp_4 = this;
2898
+ tmp_4.q32_1 = lazy_0(Url$encodedUser$delegate$lambda(this));
2899
+ var tmp_5 = this;
2900
+ tmp_5.r32_1 = lazy_0(Url$encodedPassword$delegate$lambda(this));
2901
+ var tmp_6 = this;
2902
+ tmp_6.s32_1 = lazy_0(Url$encodedFragment$delegate$lambda(this));
2903
+ }
2904
+ protoOf(Url_0).l33 = function () {
2905
+ // Inline function 'kotlin.takeUnless' call
2906
+ var this_0 = this.b32_1;
2907
+ var tmp;
2908
+ if (!(this_0 === 0)) {
2909
+ tmp = this_0;
2910
+ } else {
2911
+ tmp = null;
2912
+ }
2913
+ var tmp0_elvis_lhs = tmp;
2914
+ return tmp0_elvis_lhs == null ? this.m32_1.y31_1 : tmp0_elvis_lhs;
2915
+ };
2916
+ protoOf(Url_0).m33 = function () {
2917
+ var tmp0 = this.q32_1;
2918
+ var tmp = KProperty1;
2919
+ // Inline function 'kotlin.getValue' call
2920
+ getPropertyCallableRef('encodedUser', 1, tmp, Url$_get_encodedUser_$ref_3lb9bi(), null);
2921
+ return tmp0.y();
2922
+ };
2923
+ protoOf(Url_0).n33 = function () {
2924
+ var tmp0 = this.r32_1;
2925
+ var tmp = KProperty1;
2926
+ // Inline function 'kotlin.getValue' call
2927
+ getPropertyCallableRef('encodedPassword', 1, tmp, Url$_get_encodedPassword_$ref_25ixc2(), null);
2928
+ return tmp0.y();
2929
+ };
2930
+ protoOf(Url_0).toString = function () {
2931
+ return this.h32_1;
2932
+ };
2933
+ protoOf(Url_0).equals = function (other) {
2934
+ if (this === other)
2935
+ return true;
2936
+ if (other == null || !getKClassFromExpression(this).equals(getKClassFromExpression(other)))
2937
+ return false;
2938
+ if (!(other instanceof Url_0))
2939
+ THROW_CCE();
2940
+ return this.h32_1 === other.h32_1;
2941
+ };
2942
+ protoOf(Url_0).hashCode = function () {
2943
+ return getStringHashCode(this.h32_1);
2944
+ };
2945
+ function get_authority_0(_this__u8e3s4) {
2946
+ // Inline function 'kotlin.text.buildString' call
2947
+ // Inline function 'kotlin.apply' call
2948
+ var this_0 = StringBuilder_init_$Create$();
2949
+ this_0.z7(get_encodedUserAndPassword_0(_this__u8e3s4));
2950
+ this_0.z7(get_hostWithPortIfSpecified(_this__u8e3s4));
2951
+ return this_0.toString();
2952
+ }
2953
+ function UrlSerializer() {
2954
+ UrlSerializer_instance = this;
2955
+ this.o33_1 = PrimitiveSerialDescriptor('io.ktor.http.Url', STRING_getInstance());
2956
+ }
2957
+ protoOf(UrlSerializer).l20 = function () {
2958
+ return this.o33_1;
2959
+ };
2960
+ protoOf(UrlSerializer).n20 = function (decoder) {
2961
+ return Url(decoder.n23());
2962
+ };
2963
+ protoOf(UrlSerializer).p33 = function (encoder, value) {
2964
+ encoder.w24(value.toString());
2965
+ };
2966
+ protoOf(UrlSerializer).m20 = function (encoder, value) {
2967
+ return this.p33(encoder, value instanceof Url_0 ? value : THROW_CCE());
2968
+ };
2969
+ var UrlSerializer_instance;
2970
+ function UrlSerializer_getInstance() {
2971
+ if (UrlSerializer_instance == null)
2972
+ new UrlSerializer();
2973
+ return UrlSerializer_instance;
2974
+ }
2975
+ function get_encodedUserAndPassword_0(_this__u8e3s4) {
2976
+ // Inline function 'kotlin.text.buildString' call
2977
+ // Inline function 'kotlin.apply' call
2978
+ var this_0 = StringBuilder_init_$Create$();
2979
+ appendUserAndPassword(this_0, _this__u8e3s4.m33(), _this__u8e3s4.n33());
2980
+ return this_0.toString();
2981
+ }
2982
+ function UrlDecodedParametersBuilder(encodedParametersBuilder) {
2983
+ this.q33_1 = encodedParametersBuilder;
2984
+ this.r33_1 = this.q33_1.f2n();
2985
+ }
2986
+ protoOf(UrlDecodedParametersBuilder).h2u = function () {
2987
+ return decodeParameters(this.q33_1);
2988
+ };
2989
+ protoOf(UrlDecodedParametersBuilder).f2n = function () {
2990
+ return this.r33_1;
2991
+ };
2992
+ protoOf(UrlDecodedParametersBuilder).g2n = function (name) {
2993
+ var tmp0_safe_receiver = this.q33_1.g2n(encodeURLParameter(name));
2994
+ var tmp;
2995
+ if (tmp0_safe_receiver == null) {
2996
+ tmp = null;
2997
+ } else {
2998
+ // Inline function 'kotlin.collections.map' call
2999
+ // Inline function 'kotlin.collections.mapTo' call
3000
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(tmp0_safe_receiver, 10));
3001
+ var _iterator__ex2g4s = tmp0_safe_receiver.l();
3002
+ while (_iterator__ex2g4s.m()) {
3003
+ var item = _iterator__ex2g4s.n();
3004
+ var tmp$ret$0 = decodeURLQueryComponent(item, VOID, VOID, true);
3005
+ destination.j(tmp$ret$0);
3006
+ }
3007
+ tmp = destination;
3008
+ }
3009
+ return tmp;
3010
+ };
3011
+ protoOf(UrlDecodedParametersBuilder).h2n = function () {
3012
+ // Inline function 'kotlin.collections.map' call
3013
+ var this_0 = this.q33_1.h2n();
3014
+ // Inline function 'kotlin.collections.mapTo' call
3015
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10));
3016
+ var _iterator__ex2g4s = this_0.l();
3017
+ while (_iterator__ex2g4s.m()) {
3018
+ var item = _iterator__ex2g4s.n();
3019
+ var tmp$ret$0 = decodeURLQueryComponent(item);
3020
+ destination.j(tmp$ret$0);
3021
+ }
3022
+ return toSet(destination);
3023
+ };
3024
+ protoOf(UrlDecodedParametersBuilder).r = function () {
3025
+ return this.q33_1.r();
3026
+ };
3027
+ protoOf(UrlDecodedParametersBuilder).d2n = function () {
3028
+ return decodeParameters(this.q33_1).d2n();
3029
+ };
3030
+ protoOf(UrlDecodedParametersBuilder).o2n = function (name, value) {
3031
+ return this.q33_1.o2n(encodeURLParameter(name), encodeURLParameterValue(value));
3032
+ };
3033
+ protoOf(UrlDecodedParametersBuilder).p2n = function (stringValues) {
3034
+ return appendAllEncoded(this.q33_1, stringValues);
3035
+ };
3036
+ protoOf(UrlDecodedParametersBuilder).e2n = function (name, values) {
3037
+ var tmp = encodeURLParameter(name);
3038
+ // Inline function 'kotlin.collections.map' call
3039
+ // Inline function 'kotlin.collections.mapTo' call
3040
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
3041
+ var _iterator__ex2g4s = values.l();
3042
+ while (_iterator__ex2g4s.m()) {
3043
+ var item = _iterator__ex2g4s.n();
3044
+ var tmp$ret$0 = encodeURLParameterValue(item);
3045
+ destination.j(tmp$ret$0);
3046
+ }
3047
+ return this.q33_1.e2n(tmp, destination);
3048
+ };
3049
+ protoOf(UrlDecodedParametersBuilder).i2 = function () {
3050
+ return this.q33_1.i2();
3051
+ };
3052
+ function encodeParameters(parameters) {
3053
+ // Inline function 'kotlin.apply' call
3054
+ var this_0 = ParametersBuilder();
3055
+ appendAllEncoded(this_0, parameters);
3056
+ return this_0;
3057
+ }
3058
+ function decodeParameters(parameters) {
3059
+ // Inline function 'kotlin.apply' call
3060
+ var this_0 = ParametersBuilder();
3061
+ appendAllDecoded(this_0, parameters);
3062
+ return this_0.h2u();
3063
+ }
3064
+ function appendAllEncoded(_this__u8e3s4, parameters) {
3065
+ // Inline function 'kotlin.collections.forEach' call
3066
+ var _iterator__ex2g4s = parameters.h2n().l();
3067
+ while (_iterator__ex2g4s.m()) {
3068
+ var element = _iterator__ex2g4s.n();
3069
+ var tmp0_elvis_lhs = parameters.g2n(element);
3070
+ var values = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
3071
+ var tmp = encodeURLParameter(element);
3072
+ // Inline function 'kotlin.collections.map' call
3073
+ // Inline function 'kotlin.collections.mapTo' call
3074
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
3075
+ var _iterator__ex2g4s_0 = values.l();
3076
+ while (_iterator__ex2g4s_0.m()) {
3077
+ var item = _iterator__ex2g4s_0.n();
3078
+ var tmp$ret$0 = encodeURLParameterValue(item);
3079
+ destination.j(tmp$ret$0);
3080
+ }
3081
+ _this__u8e3s4.e2n(tmp, destination);
3082
+ }
3083
+ }
3084
+ function appendAllDecoded(_this__u8e3s4, parameters) {
3085
+ // Inline function 'kotlin.collections.forEach' call
3086
+ var _iterator__ex2g4s = parameters.h2n().l();
3087
+ while (_iterator__ex2g4s.m()) {
3088
+ var element = _iterator__ex2g4s.n();
3089
+ var tmp0_elvis_lhs = parameters.g2n(element);
3090
+ var values = tmp0_elvis_lhs == null ? emptyList() : tmp0_elvis_lhs;
3091
+ var tmp = decodeURLQueryComponent(element);
3092
+ // Inline function 'kotlin.collections.map' call
3093
+ // Inline function 'kotlin.collections.mapTo' call
3094
+ var destination = ArrayList_init_$Create$(collectionSizeOrDefault(values, 10));
3095
+ var _iterator__ex2g4s_0 = values.l();
3096
+ while (_iterator__ex2g4s_0.m()) {
3097
+ var item = _iterator__ex2g4s_0.n();
3098
+ var tmp$ret$0 = decodeURLQueryComponent(item, VOID, VOID, true);
3099
+ destination.j(tmp$ret$0);
3100
+ }
3101
+ _this__u8e3s4.e2n(tmp, destination);
3102
+ }
3103
+ }
3104
+ function MultiPartData() {
3105
+ }
3106
+ function PartData$BinaryChannelItem$_init_$lambda_77jc0t() {
3107
+ return Unit_instance;
3108
+ }
3109
+ function FormItem(value, dispose, partHeaders) {
3110
+ PartData.call(this, dispose, partHeaders);
3111
+ this.w33_1 = value;
3112
+ }
3113
+ function FileItem() {
3114
+ }
3115
+ function BinaryItem(provider, dispose, partHeaders) {
3116
+ PartData.call(this, dispose, partHeaders);
3117
+ this.b34_1 = provider;
3118
+ }
3119
+ function BinaryChannelItem(provider, partHeaders) {
3120
+ PartData.call(this, PartData$BinaryChannelItem$_init_$lambda_77jc0t, partHeaders);
3121
+ this.g34_1 = provider;
3122
+ }
3123
+ function PartData$contentDisposition$delegate$lambda(this$0) {
3124
+ return function () {
3125
+ var tmp0_safe_receiver = this$0.i34_1.xd(HttpHeaders_getInstance().u2u_1);
3126
+ var tmp;
3127
+ if (tmp0_safe_receiver == null) {
3128
+ tmp = null;
3129
+ } else {
3130
+ // Inline function 'kotlin.let' call
3131
+ tmp = Companion_getInstance().tp(tmp0_safe_receiver);
3132
+ }
3133
+ return tmp;
3134
+ };
3135
+ }
3136
+ function PartData$contentType$delegate$lambda(this$0) {
3137
+ return function () {
3138
+ var tmp0_safe_receiver = this$0.i34_1.xd(HttpHeaders_getInstance().a2v_1);
3139
+ var tmp;
3140
+ if (tmp0_safe_receiver == null) {
3141
+ tmp = null;
3142
+ } else {
3143
+ // Inline function 'kotlin.let' call
3144
+ tmp = Companion_getInstance_0().tp(tmp0_safe_receiver);
3145
+ }
3146
+ return tmp;
3147
+ };
3148
+ }
3149
+ function PartData(dispose, headers) {
3150
+ this.h34_1 = dispose;
3151
+ this.i34_1 = headers;
3152
+ var tmp = this;
3153
+ var tmp_0 = LazyThreadSafetyMode_NONE_getInstance();
3154
+ tmp.j34_1 = lazy(tmp_0, PartData$contentDisposition$delegate$lambda(this));
3155
+ var tmp_1 = this;
3156
+ var tmp_2 = LazyThreadSafetyMode_NONE_getInstance();
3157
+ tmp_1.k34_1 = lazy(tmp_2, PartData$contentType$delegate$lambda(this));
3158
+ }
3159
+ function NoContent() {
3160
+ OutgoingContent.call(this);
3161
+ }
3162
+ function ReadChannelContent() {
3163
+ OutgoingContent.call(this);
3164
+ }
3165
+ function WriteChannelContent() {
3166
+ OutgoingContent.call(this);
3167
+ }
3168
+ function ByteArrayContent() {
3169
+ OutgoingContent.call(this);
3170
+ }
3171
+ function ProtocolUpgrade() {
3172
+ }
3173
+ function ContentWrapper() {
3174
+ }
3175
+ protoOf(ContentWrapper).w34 = function () {
3176
+ return this.v34_1;
3177
+ };
3178
+ function OutgoingContent() {
3179
+ this.l34_1 = null;
3180
+ }
3181
+ protoOf(OutgoingContent).m34 = function () {
3182
+ return null;
3183
+ };
3184
+ protoOf(OutgoingContent).n34 = function () {
3185
+ return null;
3186
+ };
3187
+ protoOf(OutgoingContent).l2y = function () {
3188
+ return Companion_getInstance_2().e2u_1;
3189
+ };
3190
+ function NullBody() {
3191
+ }
3192
+ var NullBody_instance;
3193
+ function NullBody_getInstance() {
3194
+ return NullBody_instance;
3195
+ }
3196
+ function isEmpty(_this__u8e3s4) {
3197
+ var tmp;
3198
+ if (_this__u8e3s4 instanceof NoContent) {
3199
+ tmp = true;
3200
+ } else {
3201
+ if (_this__u8e3s4 instanceof ContentWrapper) {
3202
+ tmp = isEmpty(_this__u8e3s4.w34());
3203
+ } else {
3204
+ tmp = false;
3205
+ }
3206
+ }
3207
+ return tmp;
3208
+ }
3209
+ function TextContent(text, contentType, status) {
3210
+ status = status === VOID ? null : status;
3211
+ ByteArrayContent.call(this);
3212
+ this.y34_1 = text;
3213
+ this.z34_1 = contentType;
3214
+ this.a35_1 = status;
3215
+ var tmp = this;
3216
+ var tmp0_elvis_lhs = charset(this.z34_1);
3217
+ tmp.b35_1 = toByteArray(this.y34_1, tmp0_elvis_lhs == null ? Charsets_getInstance().j1z_1 : tmp0_elvis_lhs);
3218
+ }
3219
+ protoOf(TextContent).m34 = function () {
3220
+ return this.z34_1;
3221
+ };
3222
+ protoOf(TextContent).n34 = function () {
3223
+ return fromInt(this.b35_1.length);
3224
+ };
3225
+ protoOf(TextContent).t34 = function () {
3226
+ return this.b35_1;
3227
+ };
3228
+ protoOf(TextContent).toString = function () {
3229
+ return 'TextContent[' + this.z34_1.toString() + '] "' + take(this.y34_1, 30) + '"';
3230
+ };
3231
+ function get_origin(_this__u8e3s4) {
3232
+ return PlatformUtils_getInstance().v2m_1 ? locationOrigin() : 'http://localhost';
3233
+ }
3234
+ function locationOrigin() {
3235
+ return function () {
3236
+ var tmpLocation = null;
3237
+ if (typeof window !== 'undefined') {
3238
+ tmpLocation = window.location;
3239
+ } else if (typeof self !== 'undefined') {
3240
+ tmpLocation = self.location;
3241
+ }
3242
+ var origin = '';
3243
+ if (tmpLocation) {
3244
+ origin = tmpLocation.origin;
3245
+ }
3246
+ return origin && origin != 'null' ? origin : 'http://localhost';
3247
+ }();
3248
+ }
3249
+ //region block: post-declaration
3250
+ protoOf(EmptyHeaders).xd = get;
3251
+ protoOf(EmptyHeaders).i2n = forEach;
3252
+ protoOf(EmptyParameters).xd = get;
3253
+ protoOf(EmptyParameters).i2n = forEach;
3254
+ //endregion
3255
+ //region block: init
3256
+ Companion_instance_1 = new Companion_1();
3257
+ EmptyHeaders_instance = new EmptyHeaders();
3258
+ EmptyParameters_instance = new EmptyParameters();
3259
+ Companion_instance_9 = new Companion_9();
3260
+ NullBody_instance = new NullBody();
3261
+ //endregion
3262
+ //region block: exports
3263
+ _.$_$ = _.$_$ || {};
3264
+ _.$_$.a = NullBody_instance;
3265
+ _.$_$.b = Companion_getInstance;
3266
+ _.$_$.c = Application_getInstance;
3267
+ _.$_$.d = Companion_getInstance_0;
3268
+ _.$_$.e = MultiPart_getInstance;
3269
+ _.$_$.f = Text_getInstance;
3270
+ _.$_$.g = Companion_getInstance_2;
3271
+ _.$_$.h = HttpHeaders_getInstance;
3272
+ _.$_$.i = Companion_getInstance_3;
3273
+ _.$_$.j = Companion_getInstance_4;
3274
+ _.$_$.k = Companion_getInstance_5;
3275
+ _.$_$.l = Companion_getInstance_6;
3276
+ _.$_$.m = Companion_getInstance_8;
3277
+ _.$_$.n = MultiPartData;
3278
+ _.$_$.o = NullBody;
3279
+ _.$_$.p = ByteArrayContent;
3280
+ _.$_$.q = ContentWrapper;
3281
+ _.$_$.r = NoContent;
3282
+ _.$_$.s = ProtocolUpgrade;
3283
+ _.$_$.t = ReadChannelContent;
3284
+ _.$_$.u = WriteChannelContent;
3285
+ _.$_$.v = OutgoingContent;
3286
+ _.$_$.w = BinaryChannelItem;
3287
+ _.$_$.x = BinaryItem;
3288
+ _.$_$.y = FileItem;
3289
+ _.$_$.z = FormItem;
3290
+ _.$_$.a1 = TextContent;
3291
+ _.$_$.b1 = isEmpty;
3292
+ _.$_$.c1 = HeadersBuilder;
3293
+ _.$_$.d1 = HttpStatusCode;
3294
+ _.$_$.e1 = ParametersBuilder;
3295
+ _.$_$.f1 = URLBuilder;
3296
+ _.$_$.g1 = UnsafeHeaderException;
3297
+ _.$_$.h1 = Url;
3298
+ _.$_$.i1 = get_authority;
3299
+ _.$_$.j1 = get_authority_0;
3300
+ _.$_$.k1 = charset_0;
3301
+ _.$_$.l1 = charset;
3302
+ _.$_$.m1 = contentLength;
3303
+ _.$_$.n1 = contentType;
3304
+ _.$_$.o1 = contentType_0;
3305
+ _.$_$.p1 = decodeURLPart;
3306
+ _.$_$.q1 = encodeURLParameter;
3307
+ _.$_$.r1 = escapeIfNeeded;
3308
+ _.$_$.s1 = formUrlEncode;
3309
+ _.$_$.t1 = headersOf;
3310
+ _.$_$.u1 = isSecure;
3311
+ _.$_$.v1 = isSuccess;
3312
+ _.$_$.w1 = get_supportsRequestBody;
3313
+ _.$_$.x1 = takeFrom_0;
3314
+ _.$_$.y1 = takeFrom;
3315
+ _.$_$.z1 = withCharset;
3316
+ //endregion
3317
+ return _;
3318
+ }(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-io.js'), require('./ktor-ktor-utils.js'), require('./kotlinx-serialization-kotlinx-serialization-core.js')));
3319
+
3320
+ //# sourceMappingURL=ktor-ktor-http.js.map