UNPKG

@earth-app/shovel

Version:

Kotlin Multiplatform Web Scraping Framework

1,128 lines (1,126 loc) 127 kB
(function (factory) { if (typeof define === 'function' && define.amd) define(['exports', './kotlin-kotlin-stdlib.js', './ktor-ktor-io.js', './ktor-ktor-utils.js'], factory); else if (typeof exports === 'object') factory(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-io.js'), require('./ktor-ktor-utils.js')); else { if (typeof globalThis['kotlin-kotlin-stdlib'] === 'undefined') { throw new Error("Error loading module 'ktor-ktor-http'. Its dependency 'kotlin-kotlin-stdlib' was not found. Please, check whether 'kotlin-kotlin-stdlib' is loaded prior to 'ktor-ktor-http'."); } if (typeof globalThis['ktor-ktor-io'] === 'undefined') { throw new Error("Error loading module 'ktor-ktor-http'. Its dependency 'ktor-ktor-io' was not found. Please, check whether 'ktor-ktor-io' is loaded prior to 'ktor-ktor-http'."); } if (typeof globalThis['ktor-ktor-utils'] === 'undefined') { throw new Error("Error loading module 'ktor-ktor-http'. Its dependency 'ktor-ktor-utils' was not found. Please, check whether 'ktor-ktor-utils' is loaded prior to 'ktor-ktor-http'."); } globalThis['ktor-ktor-http'] = factory(typeof globalThis['ktor-ktor-http'] === 'undefined' ? {} : globalThis['ktor-ktor-http'], globalThis['kotlin-kotlin-stdlib'], globalThis['ktor-ktor-io'], globalThis['ktor-ktor-utils']); } }(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_io, kotlin_io_ktor_ktor_utils) { 'use strict'; //region block: imports var imul = Math.imul; var VOID = kotlin_kotlin.$_$.h; var StringBuilder_init_$Create$ = kotlin_kotlin.$_$.d1; var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.l; var encode = kotlin_io_ktor_ktor_io.$_$.q; var Unit_instance = kotlin_kotlin.$_$.a3; var takeWhile = kotlin_io_ktor_ktor_io.$_$.y; var charArray = kotlin_kotlin.$_$.u6; var _Char___init__impl__6a9atx = kotlin_kotlin.$_$.h2; var concatToString = kotlin_kotlin.$_$.s8; var charSequenceGet = kotlin_kotlin.$_$.v6; var toString = kotlin_kotlin.$_$.c8; var Char = kotlin_kotlin.$_$.ta; var isSurrogate = kotlin_kotlin.$_$.m9; var Char__plus_impl_qi7pgj = kotlin_kotlin.$_$.l2; var Char__minus_impl_a2frrh = kotlin_kotlin.$_$.k2; var StringBuilder_init_$Create$_0 = kotlin_kotlin.$_$.c1; var charSequenceLength = kotlin_kotlin.$_$.w6; var charSequenceSubSequence = kotlin_kotlin.$_$.x6; var toString_0 = kotlin_kotlin.$_$.o2; var toByte = kotlin_kotlin.$_$.z7; var decodeToString = kotlin_kotlin.$_$.x8; var Exception = kotlin_kotlin.$_$.ya; var Exception_init_$Init$ = kotlin_kotlin.$_$.j1; var captureStack = kotlin_kotlin.$_$.s6; var protoOf = kotlin_kotlin.$_$.y7; var initMetadataForClass = kotlin_kotlin.$_$.h7; var Char__minus_impl_a2frrh_0 = kotlin_kotlin.$_$.j2; var Char__toInt_impl_vasixd = kotlin_kotlin.$_$.n2; var numberToChar = kotlin_kotlin.$_$.v7; var canRead = kotlin_io_ktor_ktor_io.$_$.v; var Char__rangeTo_impl_tkncvp = kotlin_kotlin.$_$.m2; var plus = kotlin_kotlin.$_$.x4; var plus_0 = kotlin_kotlin.$_$.y4; var collectionSizeOrDefault = kotlin_kotlin.$_$.u3; var ArrayList_init_$Create$ = kotlin_kotlin.$_$.o; var toSet = kotlin_kotlin.$_$.r5; var setOf = kotlin_kotlin.$_$.d5; var plus_1 = kotlin_kotlin.$_$.w4; var listOf = kotlin_kotlin.$_$.t4; var emptyList = kotlin_kotlin.$_$.e4; var objectCreate = kotlin_kotlin.$_$.x7; var equals = kotlin_kotlin.$_$.b9; var Collection = kotlin_kotlin.$_$.c3; var isInterface = kotlin_kotlin.$_$.r7; var isBlank = kotlin_kotlin.$_$.g9; var last = kotlin_kotlin.$_$.r4; var indexOf = kotlin_kotlin.$_$.f9; var THROW_CCE = kotlin_kotlin.$_$.hb; var isCharSequence = kotlin_kotlin.$_$.p7; var trim = kotlin_kotlin.$_$.pa; var contains = kotlin_kotlin.$_$.v8; var initMetadataForCompanion = kotlin_kotlin.$_$.i7; var initMetadataForObject = kotlin_kotlin.$_$.n7; var startsWith = kotlin_kotlin.$_$.aa; var plus_2 = kotlin_kotlin.$_$.z4; var equals_0 = kotlin_kotlin.$_$.a7; var getStringHashCode = kotlin_kotlin.$_$.f7; var hashCode = kotlin_kotlin.$_$.g7; var forName = kotlin_io_ktor_ktor_io.$_$.r; var IllegalArgumentException = kotlin_kotlin.$_$.za; var get_name = kotlin_io_ktor_ktor_io.$_$.s; var get_lastIndex = kotlin_kotlin.$_$.q4; var first = kotlin_kotlin.$_$.c9; var last_0 = kotlin_kotlin.$_$.q9; var get_lastIndex_0 = kotlin_kotlin.$_$.o9; var StringValuesBuilderImpl = kotlin_io_ktor_ktor_utils.$_$.q; var emptySet = kotlin_kotlin.$_$.g4; var get = kotlin_io_ktor_ktor_utils.$_$.p; var forEach = kotlin_io_ktor_ktor_utils.$_$.o; var StringValues = kotlin_io_ktor_ktor_utils.$_$.t; var StringValuesImpl = kotlin_io_ktor_ktor_utils.$_$.r; var emptyMap = kotlin_kotlin.$_$.f4; var listOf_0 = kotlin_kotlin.$_$.s4; var StringValuesSingleImpl = kotlin_io_ktor_ktor_utils.$_$.s; var toDoubleOrNull = kotlin_kotlin.$_$.ga; var LazyThreadSafetyMode_NONE_getInstance = kotlin_kotlin.$_$.k; var lazy = kotlin_kotlin.$_$.qb; var to = kotlin_kotlin.$_$.xb; var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.p; var asList = kotlin_kotlin.$_$.q3; var Char__compareTo_impl_ypi4mb = kotlin_kotlin.$_$.i2; var IllegalArgumentException_init_$Init$ = kotlin_kotlin.$_$.n1; var toLong = kotlin_kotlin.$_$.la; var mapCapacity = kotlin_kotlin.$_$.u4; var coerceAtLeast = kotlin_kotlin.$_$.f8; var LinkedHashMap_init_$Create$ = kotlin_kotlin.$_$.t; var Comparable = kotlin_kotlin.$_$.ua; var initMetadataForInterface = kotlin_kotlin.$_$.l7; var isWhitespace = kotlin_kotlin.$_$.n9; var IllegalArgumentException_init_$Create$ = kotlin_kotlin.$_$.o1; var startsWith_0 = kotlin_kotlin.$_$.z9; var charArrayOf = kotlin_kotlin.$_$.t6; var split = kotlin_kotlin.$_$.w9; var toMutableList = kotlin_kotlin.$_$.p5; var first_0 = kotlin_kotlin.$_$.k4; var joinToString = kotlin_kotlin.$_$.n4; var toCharArray = kotlin_io_ktor_ktor_utils.$_$.x; var indexOfAny = kotlin_kotlin.$_$.d9; var dropLast = kotlin_kotlin.$_$.d4; var IllegalStateException = kotlin_kotlin.$_$.ab; var IllegalStateException_init_$Init$ = kotlin_kotlin.$_$.s1; var indexOf_0 = kotlin_kotlin.$_$.e9; var toInt = kotlin_kotlin.$_$.ia; var toLowerCasePreservingASCIIRules = kotlin_io_ktor_ktor_utils.$_$.y; var isLowerCase = kotlin_io_ktor_ktor_utils.$_$.v; var appendAll = kotlin_io_ktor_ktor_utils.$_$.u; var startsWith_1 = kotlin_kotlin.$_$.y9; var addAll = kotlin_kotlin.$_$.m3; var joinTo = kotlin_kotlin.$_$.p4; var toString_1 = kotlin_kotlin.$_$.wb; var lazy_0 = kotlin_kotlin.$_$.rb; var getKClassFromExpression = kotlin_kotlin.$_$.d; var KProperty1 = kotlin_kotlin.$_$.i8; var getPropertyCallableRef = kotlin_kotlin.$_$.e7; var toByteArray = kotlin_io_ktor_ktor_io.$_$.z; var toLong_0 = kotlin_kotlin.$_$.a8; var take = kotlin_kotlin.$_$.ea; var PlatformUtils_getInstance = kotlin_io_ktor_ktor_utils.$_$.a; //endregion //region block: pre-declaration initMetadataForClass(URLDecodeException, 'URLDecodeException', VOID, Exception); initMetadataForCompanion(Companion); initMetadataForObject(Application, 'Application'); initMetadataForObject(MultiPart, 'MultiPart'); initMetadataForObject(Text, 'Text'); initMetadataForClass(HeaderValueWithParameters, 'HeaderValueWithParameters'); initMetadataForClass(ContentType, 'ContentType', VOID, HeaderValueWithParameters); initMetadataForClass(BadContentTypeFormatException, 'BadContentTypeFormatException', VOID, Exception); initMetadataForCompanion(Companion_0); initMetadataForCompanion(Companion_1); initMetadataForClass(HeadersBuilder, 'HeadersBuilder', HeadersBuilder, StringValuesBuilderImpl); initMetadataForObject(EmptyHeaders, 'EmptyHeaders', VOID, VOID, [StringValues]); initMetadataForClass(HeadersImpl, 'HeadersImpl', HeadersImpl, StringValuesImpl, [StringValues, StringValuesImpl]); initMetadataForClass(HeadersSingleImpl, 'HeadersSingleImpl', VOID, StringValuesSingleImpl, [StringValues, StringValuesSingleImpl]); initMetadataForClass(HeaderValueParam, 'HeaderValueParam'); initMetadataForClass(HeaderValue, 'HeaderValue'); initMetadataForObject(HttpHeaders, 'HttpHeaders'); initMetadataForClass(IllegalHeaderNameException, 'IllegalHeaderNameException', VOID, IllegalArgumentException); initMetadataForClass(IllegalHeaderValueException, 'IllegalHeaderValueException', VOID, IllegalArgumentException); initMetadataForClass(UnsafeHeaderException, 'UnsafeHeaderException', VOID, IllegalArgumentException); initMetadataForCompanion(Companion_2); initMetadataForClass(HttpMethod, 'HttpMethod'); initMetadataForCompanion(Companion_3); initMetadataForClass(HttpProtocolVersion, 'HttpProtocolVersion'); initMetadataForCompanion(Companion_4); initMetadataForClass(HttpStatusCode, 'HttpStatusCode', VOID, VOID, [Comparable]); initMetadataForCompanion(Companion_5); initMetadataForInterface(Parameters, 'Parameters', VOID, VOID, [StringValues]); initMetadataForObject(EmptyParameters, 'EmptyParameters', VOID, VOID, [Parameters]); initMetadataForClass(ParametersBuilderImpl, 'ParametersBuilderImpl', ParametersBuilderImpl, StringValuesBuilderImpl); initMetadataForClass(ParametersImpl, 'ParametersImpl', ParametersImpl, StringValuesImpl, [Parameters, StringValuesImpl]); initMetadataForCompanion(Companion_6); initMetadataForClass(URLBuilder, 'URLBuilder', URLBuilder); initMetadataForClass(URLParserException, 'URLParserException', VOID, IllegalStateException); initMetadataForCompanion(Companion_7); initMetadataForClass(URLProtocol, 'URLProtocol'); initMetadataForCompanion(Companion_8); initMetadataForClass(Url_0, 'Url'); initMetadataForClass(UrlDecodedParametersBuilder, 'UrlDecodedParametersBuilder'); initMetadataForInterface(MultiPartData, 'MultiPartData', VOID, VOID, VOID, [0]); initMetadataForClass(OutgoingContent, 'OutgoingContent'); initMetadataForClass(NoContent, 'NoContent', VOID, OutgoingContent); initMetadataForClass(ReadChannelContent, 'ReadChannelContent', VOID, OutgoingContent); initMetadataForClass(WriteChannelContent, 'WriteChannelContent', VOID, OutgoingContent, VOID, [1]); initMetadataForClass(ByteArrayContent, 'ByteArrayContent', VOID, OutgoingContent); initMetadataForClass(ProtocolUpgrade, 'ProtocolUpgrade', VOID, OutgoingContent, VOID, [4]); initMetadataForClass(ContentWrapper, 'ContentWrapper', VOID, OutgoingContent); initMetadataForObject(NullBody, 'NullBody'); initMetadataForClass(TextContent, 'TextContent', VOID, ByteArrayContent); //endregion function get_URL_ALPHABET() { _init_properties_Codecs_kt__fudxxf(); return URL_ALPHABET; } var URL_ALPHABET; function get_URL_ALPHABET_CHARS() { _init_properties_Codecs_kt__fudxxf(); return URL_ALPHABET_CHARS; } var URL_ALPHABET_CHARS; function get_HEX_ALPHABET() { _init_properties_Codecs_kt__fudxxf(); return HEX_ALPHABET; } var HEX_ALPHABET; function get_URL_PROTOCOL_PART() { _init_properties_Codecs_kt__fudxxf(); return URL_PROTOCOL_PART; } var URL_PROTOCOL_PART; function get_VALID_PATH_PART() { _init_properties_Codecs_kt__fudxxf(); return VALID_PATH_PART; } var VALID_PATH_PART; var ATTRIBUTE_CHARACTERS; function get_SPECIAL_SYMBOLS() { _init_properties_Codecs_kt__fudxxf(); return SPECIAL_SYMBOLS; } var SPECIAL_SYMBOLS; function encodeURLParameter(_this__u8e3s4, spaceToPlus) { spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus; _init_properties_Codecs_kt__fudxxf(); // Inline function 'kotlin.text.buildString' call // Inline function 'kotlin.apply' call var this_0 = StringBuilder_init_$Create$(); var content = encode(Charsets_getInstance().x1l_1.a1m(), _this__u8e3s4); forEach_0(content, encodeURLParameter$lambda(this_0, spaceToPlus)); return this_0.toString(); } function decodeURLPart(_this__u8e3s4, start, end, charset) { start = start === VOID ? 0 : start; end = end === VOID ? _this__u8e3s4.length : end; charset = charset === VOID ? Charsets_getInstance().x1l_1 : charset; _init_properties_Codecs_kt__fudxxf(); return decodeScan(_this__u8e3s4, start, end, false, charset); } function encodeURLQueryComponent(_this__u8e3s4, encodeFull, spaceToPlus, charset) { encodeFull = encodeFull === VOID ? false : encodeFull; spaceToPlus = spaceToPlus === VOID ? false : spaceToPlus; charset = charset === VOID ? Charsets_getInstance().x1l_1 : charset; _init_properties_Codecs_kt__fudxxf(); // Inline function 'kotlin.text.buildString' call // Inline function 'kotlin.apply' call var this_0 = StringBuilder_init_$Create$(); var content = encode(charset.a1m(), _this__u8e3s4); forEach_0(content, encodeURLQueryComponent$lambda(spaceToPlus, this_0, encodeFull)); return this_0.toString(); } function decodeURLQueryComponent(_this__u8e3s4, start, end, plusIsSpace, charset) { start = start === VOID ? 0 : start; end = end === VOID ? _this__u8e3s4.length : end; plusIsSpace = plusIsSpace === VOID ? false : plusIsSpace; charset = charset === VOID ? Charsets_getInstance().x1l_1 : charset; _init_properties_Codecs_kt__fudxxf(); return decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset); } function encodeURLPathPart(_this__u8e3s4) { _init_properties_Codecs_kt__fudxxf(); return encodeURLPath(_this__u8e3s4, true); } function forEach_0(_this__u8e3s4, block) { _init_properties_Codecs_kt__fudxxf(); takeWhile(_this__u8e3s4, forEach$lambda(block)); } function percentEncode(_this__u8e3s4) { _init_properties_Codecs_kt__fudxxf(); var code = _this__u8e3s4 & 255; var array = charArray(3); array[0] = _Char___init__impl__6a9atx(37); array[1] = hexDigitToChar(code >> 4); array[2] = hexDigitToChar(code & 15); return concatToString(array); } function decodeScan(_this__u8e3s4, start, end, plusIsSpace, charset) { _init_properties_Codecs_kt__fudxxf(); var inductionVariable = start; if (inductionVariable < end) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; var ch = charSequenceGet(_this__u8e3s4, index); if (ch === _Char___init__impl__6a9atx(37) || (plusIsSpace && ch === _Char___init__impl__6a9atx(43))) { return decodeImpl(_this__u8e3s4, start, end, index, plusIsSpace, charset); } } while (inductionVariable < end); var tmp; if (start === 0 && end === _this__u8e3s4.length) { tmp = toString(_this__u8e3s4); } else { // Inline function 'kotlin.text.substring' call // Inline function 'kotlin.js.asDynamic' call tmp = _this__u8e3s4.substring(start, end); } return tmp; } function encodeURLPath(_this__u8e3s4, encodeSlash, encodeEncoded) { encodeSlash = encodeSlash === VOID ? false : encodeSlash; encodeEncoded = encodeEncoded === VOID ? true : encodeEncoded; _init_properties_Codecs_kt__fudxxf(); // Inline function 'kotlin.text.buildString' call // Inline function 'kotlin.apply' call var this_0 = StringBuilder_init_$Create$(); var charset = Charsets_getInstance().x1l_1; var index = 0; $l$loop_0: while (index < _this__u8e3s4.length) { var current = charSequenceGet(_this__u8e3s4, index); if (!encodeSlash && current === _Char___init__impl__6a9atx(47) || get_URL_ALPHABET_CHARS().p1(new Char(current)) || get_VALID_PATH_PART().p1(new Char(current))) { this_0.f8(current); index = index + 1 | 0; continue $l$loop_0; } if (!encodeEncoded && current === _Char___init__impl__6a9atx(37) && (index + 2 | 0) < _this__u8e3s4.length && get_HEX_ALPHABET().p1(new Char(charSequenceGet(_this__u8e3s4, index + 1 | 0))) && get_HEX_ALPHABET().p1(new Char(charSequenceGet(_this__u8e3s4, index + 2 | 0)))) { this_0.f8(current); this_0.f8(charSequenceGet(_this__u8e3s4, index + 1 | 0)); this_0.f8(charSequenceGet(_this__u8e3s4, index + 2 | 0)); index = index + 3 | 0; continue $l$loop_0; } var symbolSize = isSurrogate(current) ? 2 : 1; var tmp = encode(charset.a1m(), _this__u8e3s4, index, index + symbolSize | 0); forEach_0(tmp, encodeURLPath$lambda(this_0)); index = index + symbolSize | 0; } return this_0.toString(); } function hexDigitToChar(digit) { _init_properties_Codecs_kt__fudxxf(); 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); } function decodeImpl(_this__u8e3s4, start, end, prefixEnd, plusIsSpace, charset) { _init_properties_Codecs_kt__fudxxf(); var length = end - start | 0; var sbSize = length > 255 ? length / 3 | 0 : length; var sb = StringBuilder_init_$Create$_0(sbSize); if (prefixEnd > start) { sb.dc(_this__u8e3s4, start, prefixEnd); } var index = prefixEnd; var bytes = null; while (index < end) { var c = charSequenceGet(_this__u8e3s4, index); if (plusIsSpace && c === _Char___init__impl__6a9atx(43)) { sb.f8(_Char___init__impl__6a9atx(32)); index = index + 1 | 0; } else if (c === _Char___init__impl__6a9atx(37)) { if (bytes == null) { bytes = new Int8Array((end - index | 0) / 3 | 0); } var count = 0; while (index < end && charSequenceGet(_this__u8e3s4, index) === _Char___init__impl__6a9atx(37)) { if ((index + 2 | 0) >= end) { // Inline function 'kotlin.text.substring' call var startIndex = index; var endIndex = charSequenceLength(_this__u8e3s4); var tmp$ret$0 = toString(charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex)); throw new URLDecodeException('Incomplete trailing HEX escape: ' + tmp$ret$0 + ', in ' + toString(_this__u8e3s4) + ' at ' + index); } var digit1 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 1 | 0)); var digit2 = charToHexDigit(charSequenceGet(_this__u8e3s4, index + 2 | 0)); if (digit1 === -1 || digit2 === -1) { 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); } var tmp = bytes; var _unary__edvuaz = count; count = _unary__edvuaz + 1 | 0; tmp[_unary__edvuaz] = toByte(imul(digit1, 16) + digit2 | 0); index = index + 3 | 0; } sb.e8(decodeToString(bytes, 0, 0 + count | 0)); } else { sb.f8(c); index = index + 1 | 0; } } return sb.toString(); } function URLDecodeException(message) { Exception_init_$Init$(message, this); captureStack(this, URLDecodeException); } function charToHexDigit(c2) { _init_properties_Codecs_kt__fudxxf(); 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; } function encodeURLParameterValue(_this__u8e3s4) { _init_properties_Codecs_kt__fudxxf(); return encodeURLParameter(_this__u8e3s4, true); } function encodeURLParameter$lambda($$this$buildString, $spaceToPlus) { return function (it) { if (get_URL_ALPHABET().p1(it) || get_SPECIAL_SYMBOLS().p1(it)) $$this$buildString.f8(numberToChar(it)); else { var tmp; if ($spaceToPlus) { var tmp_0 = it; // Inline function 'kotlin.code' call var this_0 = _Char___init__impl__6a9atx(32); var tmp$ret$0 = Char__toInt_impl_vasixd(this_0); tmp = tmp_0 === toByte(tmp$ret$0); } else { tmp = false; } if (tmp) $$this$buildString.f8(_Char___init__impl__6a9atx(43)); else { $$this$buildString.e8(percentEncode(it)); } } return Unit_instance; }; } function encodeURLQueryComponent$lambda($spaceToPlus, $$this$buildString, $encodeFull) { return function (it) { var tmp = it; // Inline function 'kotlin.code' call var this_0 = _Char___init__impl__6a9atx(32); var tmp$ret$0 = Char__toInt_impl_vasixd(this_0); if (tmp === toByte(tmp$ret$0)) if ($spaceToPlus) $$this$buildString.f8(_Char___init__impl__6a9atx(43)); else $$this$buildString.e8('%20'); else { if (get_URL_ALPHABET().p1(it) || (!$encodeFull && get_URL_PROTOCOL_PART().p1(it))) $$this$buildString.f8(numberToChar(it)); else { $$this$buildString.e8(percentEncode(it)); } } return Unit_instance; }; } function forEach$lambda($block) { return function (buffer) { while (canRead(buffer)) { $block(buffer.t16()); } return true; }; } function encodeURLPath$lambda($$this$buildString) { return function (it) { $$this$buildString.e8(percentEncode(it)); return Unit_instance; }; } var properties_initialized_Codecs_kt_hkj9s1; function _init_properties_Codecs_kt__fudxxf() { if (!properties_initialized_Codecs_kt_hkj9s1) { properties_initialized_Codecs_kt_hkj9s1 = true; // Inline function 'kotlin.collections.map' call 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))); // Inline function 'kotlin.collections.mapTo' call var destination = ArrayList_init_$Create$(collectionSizeOrDefault(this_0, 10)); var _iterator__ex2g4s = this_0.g(); while (_iterator__ex2g4s.h()) { var item = _iterator__ex2g4s.i(); // Inline function 'kotlin.code' call var this_1 = item.d1_1; var tmp$ret$0 = Char__toInt_impl_vasixd(this_1); var tmp$ret$1 = toByte(tmp$ret$0); destination.e(tmp$ret$1); } URL_ALPHABET = toSet(destination); 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)))); 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)))); // Inline function 'kotlin.collections.map' call 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))]); // Inline function 'kotlin.collections.mapTo' call var destination_0 = ArrayList_init_$Create$(collectionSizeOrDefault(this_2, 10)); var _iterator__ex2g4s_0 = this_2.g(); while (_iterator__ex2g4s_0.h()) { var item_0 = _iterator__ex2g4s_0.i(); // Inline function 'kotlin.code' call var this_3 = item_0.d1_1; var tmp$ret$0_0 = Char__toInt_impl_vasixd(this_3); var tmp$ret$1_0 = toByte(tmp$ret$0_0); destination_0.e(tmp$ret$1_0); } URL_PROTOCOL_PART = destination_0; 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))]); 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))])); // Inline function 'kotlin.collections.map' call 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))]); // Inline function 'kotlin.collections.mapTo' call var destination_1 = ArrayList_init_$Create$(collectionSizeOrDefault(this_4, 10)); var _iterator__ex2g4s_1 = this_4.g(); while (_iterator__ex2g4s_1.h()) { var item_1 = _iterator__ex2g4s_1.i(); // Inline function 'kotlin.code' call var this_5 = item_1.d1_1; var tmp$ret$0_1 = Char__toInt_impl_vasixd(this_5); var tmp$ret$1_1 = toByte(tmp$ret$0_1); destination_1.e(tmp$ret$1_1); } SPECIAL_SYMBOLS = destination_1; } } function ContentType_init_$Init$(contentType, contentSubtype, parameters, $this) { parameters = parameters === VOID ? emptyList() : parameters; ContentType.call($this, contentType, contentSubtype, contentType + '/' + contentSubtype, parameters); return $this; } function ContentType_init_$Create$(contentType, contentSubtype, parameters) { return ContentType_init_$Init$(contentType, contentSubtype, parameters, objectCreate(protoOf(ContentType))); } function hasParameter($this, name, value) { var tmp; switch ($this.m1v_1.j()) { case 0: tmp = false; break; case 1: // Inline function 'kotlin.let' call var it = $this.m1v_1.o(0); tmp = (equals(it.n1v_1, name, true) && equals(it.o1v_1, value, true)); break; default: var tmp2 = $this.m1v_1; var tmp$ret$2; $l$block_0: { // Inline function 'kotlin.collections.any' call var tmp_0; if (isInterface(tmp2, Collection)) { tmp_0 = tmp2.p(); } else { tmp_0 = false; } if (tmp_0) { tmp$ret$2 = false; break $l$block_0; } var _iterator__ex2g4s = tmp2.g(); while (_iterator__ex2g4s.h()) { var element = _iterator__ex2g4s.i(); if (equals(element.n1v_1, name, true) && equals(element.o1v_1, value, true)) { tmp$ret$2 = true; break $l$block_0; } } tmp$ret$2 = false; } tmp = tmp$ret$2; break; } return tmp; } function Companion() { Companion_instance = this; this.q1v_1 = ContentType_init_$Create$('*', '*'); } protoOf(Companion).r1v = function (value) { if (isBlank(value)) return this.q1v_1; // Inline function 'io.ktor.http.Companion.parse' call var headerValue = last(parseHeaderValue(value)); var tmp2 = headerValue.s1v_1; var parameters = headerValue.t1v_1; var slash = indexOf(tmp2, _Char___init__impl__6a9atx(47)); if (slash === -1) { // Inline function 'kotlin.text.trim' call if (toString(trim(isCharSequence(tmp2) ? tmp2 : THROW_CCE())) === '*') return Companion_getInstance().q1v_1; throw new BadContentTypeFormatException(value); } // Inline function 'kotlin.text.substring' call // Inline function 'kotlin.js.asDynamic' call // Inline function 'kotlin.text.trim' call var this_0 = tmp2.substring(0, slash); var type = toString(trim(isCharSequence(this_0) ? this_0 : THROW_CCE())); // Inline function 'kotlin.text.isEmpty' call if (charSequenceLength(type) === 0) { throw new BadContentTypeFormatException(value); } // Inline function 'kotlin.text.substring' call var startIndex = slash + 1 | 0; // Inline function 'kotlin.js.asDynamic' call // Inline function 'kotlin.text.trim' call var this_1 = tmp2.substring(startIndex); var subtype = toString(trim(isCharSequence(this_1) ? this_1 : THROW_CCE())); if (contains(type, _Char___init__impl__6a9atx(32)) || contains(subtype, _Char___init__impl__6a9atx(32))) { throw new BadContentTypeFormatException(value); } var tmp; // Inline function 'kotlin.text.isEmpty' call if (charSequenceLength(subtype) === 0) { tmp = true; } else { tmp = contains(subtype, _Char___init__impl__6a9atx(47)); } if (tmp) { throw new BadContentTypeFormatException(value); } return ContentType_init_$Create$(type, subtype, parameters); }; var Companion_instance; function Companion_getInstance() { if (Companion_instance == null) new Companion(); return Companion_instance; } function Application() { Application_instance = this; this.v1v_1 = 'application'; this.w1v_1 = ContentType_init_$Create$('application', '*'); this.x1v_1 = ContentType_init_$Create$('application', 'atom+xml'); this.y1v_1 = ContentType_init_$Create$('application', 'cbor'); this.z1v_1 = ContentType_init_$Create$('application', 'json'); this.a1w_1 = ContentType_init_$Create$('application', 'hal+json'); this.b1w_1 = ContentType_init_$Create$('application', 'javascript'); this.c1w_1 = ContentType_init_$Create$('application', 'octet-stream'); this.d1w_1 = ContentType_init_$Create$('application', 'rss+xml'); this.e1w_1 = ContentType_init_$Create$('application', 'soap+xml'); this.f1w_1 = ContentType_init_$Create$('application', 'xml'); this.g1w_1 = ContentType_init_$Create$('application', 'xml-dtd'); this.h1w_1 = ContentType_init_$Create$('application', 'yaml'); this.i1w_1 = ContentType_init_$Create$('application', 'zip'); this.j1w_1 = ContentType_init_$Create$('application', 'gzip'); this.k1w_1 = ContentType_init_$Create$('application', 'x-www-form-urlencoded'); this.l1w_1 = ContentType_init_$Create$('application', 'pdf'); this.m1w_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.spreadsheetml.sheet'); this.n1w_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.wordprocessingml.document'); this.o1w_1 = ContentType_init_$Create$('application', 'vnd.openxmlformats-officedocument.presentationml.presentation'); this.p1w_1 = ContentType_init_$Create$('application', 'protobuf'); this.q1w_1 = ContentType_init_$Create$('application', 'wasm'); this.r1w_1 = ContentType_init_$Create$('application', 'problem+json'); this.s1w_1 = ContentType_init_$Create$('application', 'problem+xml'); } var Application_instance; function Application_getInstance() { if (Application_instance == null) new Application(); return Application_instance; } function MultiPart() { MultiPart_instance = this; this.t1w_1 = 'multipart'; this.u1w_1 = ContentType_init_$Create$('multipart', '*'); this.v1w_1 = ContentType_init_$Create$('multipart', 'mixed'); this.w1w_1 = ContentType_init_$Create$('multipart', 'alternative'); this.x1w_1 = ContentType_init_$Create$('multipart', 'related'); this.y1w_1 = ContentType_init_$Create$('multipart', 'form-data'); this.z1w_1 = ContentType_init_$Create$('multipart', 'signed'); this.a1x_1 = ContentType_init_$Create$('multipart', 'encrypted'); this.b1x_1 = ContentType_init_$Create$('multipart', 'byteranges'); } protoOf(MultiPart).c1x = function (contentType) { return startsWith(contentType, 'multipart/', true); }; var MultiPart_instance; function MultiPart_getInstance() { if (MultiPart_instance == null) new MultiPart(); return MultiPart_instance; } function Text() { Text_instance = this; this.d1x_1 = 'text'; this.e1x_1 = ContentType_init_$Create$('text', '*'); this.f1x_1 = ContentType_init_$Create$('text', 'plain'); this.g1x_1 = ContentType_init_$Create$('text', 'css'); this.h1x_1 = ContentType_init_$Create$('text', 'csv'); this.i1x_1 = ContentType_init_$Create$('text', 'html'); this.j1x_1 = ContentType_init_$Create$('text', 'javascript'); this.k1x_1 = ContentType_init_$Create$('text', 'vcard'); this.l1x_1 = ContentType_init_$Create$('text', 'xml'); this.m1x_1 = ContentType_init_$Create$('text', 'event-stream'); } var Text_instance; function Text_getInstance() { if (Text_instance == null) new Text(); return Text_instance; } function ContentType(contentType, contentSubtype, existingContent, parameters) { Companion_getInstance(); parameters = parameters === VOID ? emptyList() : parameters; HeaderValueWithParameters.call(this, existingContent, parameters); this.p1x_1 = contentType; this.q1x_1 = contentSubtype; } protoOf(ContentType).r1x = function (name, value) { if (hasParameter(this, name, value)) return this; return new ContentType(this.p1x_1, this.q1x_1, this.l1v_1, plus_2(this.m1v_1, HeaderValueParam_init_$Create$(name, value))); }; protoOf(ContentType).s1x = function (pattern) { if (!(pattern.p1x_1 === '*') && !equals(pattern.p1x_1, this.p1x_1, true)) { return false; } if (!(pattern.q1x_1 === '*') && !equals(pattern.q1x_1, this.q1x_1, true)) { return false; } var _iterator__ex2g4s = pattern.m1v_1.g(); while (_iterator__ex2g4s.h()) { var _destruct__k2r9zo = _iterator__ex2g4s.i(); var patternName = _destruct__k2r9zo.yf(); var patternValue = _destruct__k2r9zo.zf(); var tmp; if (patternName === '*') { var tmp_0; if (patternValue === '*') { tmp_0 = true; } else { var tmp0 = this.m1v_1; var tmp$ret$0; $l$block_0: { // Inline function 'kotlin.collections.any' call var tmp_1; if (isInterface(tmp0, Collection)) { tmp_1 = tmp0.p(); } else { tmp_1 = false; } if (tmp_1) { tmp$ret$0 = false; break $l$block_0; } var _iterator__ex2g4s_0 = tmp0.g(); while (_iterator__ex2g4s_0.h()) { var element = _iterator__ex2g4s_0.i(); if (equals(element.o1v_1, patternValue, true)) { tmp$ret$0 = true; break $l$block_0; } } tmp$ret$0 = false; } tmp_0 = tmp$ret$0; } tmp = tmp_0; } else { var value = this.t1x(patternName); tmp = patternValue === '*' ? !(value == null) : equals(value, patternValue, true); } var matches = tmp; if (!matches) { return false; } } return true; }; protoOf(ContentType).equals = function (other) { var tmp; var tmp_0; var tmp_1; if (other instanceof ContentType) { tmp_1 = equals(this.p1x_1, other.p1x_1, true); } else { tmp_1 = false; } if (tmp_1) { tmp_0 = equals(this.q1x_1, other.q1x_1, true); } else { tmp_0 = false; } if (tmp_0) { tmp = equals_0(this.m1v_1, other.m1v_1); } else { tmp = false; } return tmp; }; protoOf(ContentType).hashCode = function () { // Inline function 'kotlin.text.lowercase' call // Inline function 'kotlin.js.asDynamic' call var tmp$ret$1 = this.p1x_1.toLowerCase(); var result = getStringHashCode(tmp$ret$1); var tmp = result; var tmp_0 = imul(31, result); // Inline function 'kotlin.text.lowercase' call // Inline function 'kotlin.js.asDynamic' call var tmp$ret$3 = this.q1x_1.toLowerCase(); result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0; result = result + imul(31, hashCode(this.m1v_1)) | 0; return result; }; function BadContentTypeFormatException(value) { Exception_init_$Init$('Bad Content-Type format: ' + value, this); captureStack(this, BadContentTypeFormatException); } function charset(_this__u8e3s4) { var tmp0_safe_receiver = _this__u8e3s4.t1x('charset'); var tmp; if (tmp0_safe_receiver == null) { tmp = null; } else { // Inline function 'kotlin.let' call var tmp_0; try { tmp_0 = forName(Charsets_getInstance(), tmp0_safe_receiver); } catch ($p) { var tmp_1; if ($p instanceof IllegalArgumentException) { var exception = $p; tmp_1 = null; } else { throw $p; } tmp_0 = tmp_1; } tmp = tmp_0; } return tmp; } function withCharset(_this__u8e3s4, charset) { return _this__u8e3s4.r1x('charset', get_name(charset)); } function get_HeaderFieldValueSeparators() { _init_properties_HeaderValueWithParameters_kt__z6luvy(); return HeaderFieldValueSeparators; } var HeaderFieldValueSeparators; function Companion_0() { } var Companion_instance_0; function Companion_getInstance_0() { return Companion_instance_0; } function HeaderValueWithParameters(content, parameters) { parameters = parameters === VOID ? emptyList() : parameters; this.l1v_1 = content; this.m1v_1 = parameters; } protoOf(HeaderValueWithParameters).t1x = function (name) { var inductionVariable = 0; var last = get_lastIndex(this.m1v_1); if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; var parameter = this.m1v_1.o(index); if (equals(parameter.n1v_1, name, true)) { return parameter.o1v_1; } } while (!(index === last)); return null; }; protoOf(HeaderValueWithParameters).toString = function () { var tmp; if (this.m1v_1.p()) { tmp = this.l1v_1; } else { var tmp_0 = this.l1v_1.length; // Inline function 'kotlin.collections.sumOf' call var sum = 0; var _iterator__ex2g4s = this.m1v_1.g(); while (_iterator__ex2g4s.h()) { var element = _iterator__ex2g4s.i(); var tmp_1 = sum; sum = tmp_1 + ((element.n1v_1.length + element.o1v_1.length | 0) + 3 | 0) | 0; } var size = tmp_0 + sum | 0; // Inline function 'kotlin.apply' call var this_0 = StringBuilder_init_$Create$_0(size); this_0.e8(this.l1v_1); var inductionVariable = 0; var last = get_lastIndex(this.m1v_1); if (inductionVariable <= last) do { var index = inductionVariable; inductionVariable = inductionVariable + 1 | 0; var element_0 = this.m1v_1.o(index); this_0.e8('; '); this_0.e8(element_0.n1v_1); this_0.e8('='); // Inline function 'io.ktor.http.escapeIfNeededTo' call var this_1 = element_0.o1v_1; if (needQuotes(this_1)) this_0.e8(quote(this_1)); else this_0.e8(this_1); } while (!(index === last)); tmp = this_0.toString(); } return tmp; }; function needQuotes(_this__u8e3s4) { _init_properties_HeaderValueWithParameters_kt__z6luvy(); // Inline function 'kotlin.text.isEmpty' call if (charSequenceLength(_this__u8e3s4) === 0) return true; if (isQuoted(_this__u8e3s4)) return false; var inductionVariable = 0; var last = _this__u8e3s4.length; while (inductionVariable < last) { var element = charSequenceGet(_this__u8e3s4, inductionVariable); inductionVariable = inductionVariable + 1 | 0; if (get_HeaderFieldValueSeparators().p1(new Char(element))) return true; } return false; } function quote(_this__u8e3s4) { _init_properties_HeaderValueWithParameters_kt__z6luvy(); // Inline function 'kotlin.text.buildString' call // Inline function 'kotlin.apply' call var this_0 = StringBuilder_init_$Create$(); quoteTo(_this__u8e3s4, this_0); return this_0.toString(); } function isQuoted(_this__u8e3s4) { _init_properties_HeaderValueWithParameters_kt__z6luvy(); if (_this__u8e3s4.length < 2) { return false; } if (!(first(_this__u8e3s4) === _Char___init__impl__6a9atx(34)) || !(last_0(_this__u8e3s4) === _Char___init__impl__6a9atx(34))) { return false; } var startIndex = 1; $l$loop: do { var index = indexOf(_this__u8e3s4, _Char___init__impl__6a9atx(34), startIndex); if (index === get_lastIndex_0(_this__u8e3s4)) { break $l$loop; } var slashesCount = 0; var slashIndex = index - 1 | 0; while (charSequenceGet(_this__u8e3s4, slashIndex) === _Char___init__impl__6a9atx(92)) { slashesCount = slashesCount + 1 | 0; slashIndex = slashIndex - 1 | 0; } if ((slashesCount % 2 | 0) === 0) { return false; } startIndex = index + 1 | 0; } while (startIndex < _this__u8e3s4.length); return true; } function quoteTo(_this__u8e3s4, out) { _init_properties_HeaderValueWithParameters_kt__z6luvy(); out.e8('"'); var inductionVariable = 0; var last = _this__u8e3s4.length; while (inductionVariable < last) { var element = charSequenceGet(_this__u8e3s4, inductionVariable); inductionVariable = inductionVariable + 1 | 0; var ch = element; if (ch === _Char___init__impl__6a9atx(92)) out.e8('\\\\'); else if (ch === _Char___init__impl__6a9atx(10)) out.e8('\\n'); else if (ch === _Char___init__impl__6a9atx(13)) out.e8('\\r'); else if (ch === _Char___init__impl__6a9atx(9)) out.e8('\\t'); else if (ch === _Char___init__impl__6a9atx(34)) out.e8('\\"'); else out.f8(ch); } out.e8('"'); } var properties_initialized_HeaderValueWithParameters_kt_yu5xg; function _init_properties_HeaderValueWithParameters_kt__z6luvy() { if (!properties_initialized_HeaderValueWithParameters_kt_yu5xg) { properties_initialized_HeaderValueWithParameters_kt_yu5xg = true; 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))]); } } function Companion_1() { Companion_instance_1 = this; this.u1x_1 = EmptyHeaders_instance; } var Companion_instance_1; function Companion_getInstance_1() { if (Companion_instance_1 == null) new Companion_1(); return Companion_instance_1; } function HeadersBuilder(size) { size = size === VOID ? 8 : size; StringValuesBuilderImpl.call(this, true, size); } protoOf(HeadersBuilder).x1x = function () { return new HeadersImpl(this.l1r_1); }; protoOf(HeadersBuilder).m1r = function (name) { protoOf(StringValuesBuilderImpl).m1r.call(this, name); HttpHeaders_getInstance().u21(name); }; protoOf(HeadersBuilder).p1r = function (value) { protoOf(StringValuesBuilderImpl).p1r.call(this, value); HttpHeaders_getInstance().v21(value); }; function EmptyHeaders() { } protoOf(EmptyHeaders).f1r = function () { return true; }; protoOf(EmptyHeaders).g1r = function (name) { return null; }; protoOf(EmptyHeaders).h1r = function () { return emptySet(); }; protoOf(EmptyHeaders).i1r = function () { return emptySet(); }; protoOf(EmptyHeaders).toString = function () { return 'Headers ' + toString(this.i1r()); }; var EmptyHeaders_instance; function EmptyHeaders_getInstance() { return EmptyHeaders_instance; } function HeadersImpl(values) { values = values === VOID ? emptyMap() : values; StringValuesImpl.call(this, true, values); } protoOf(HeadersImpl).toString = function () { return 'Headers ' + toString(this.i1r()); }; function headersOf(name, value) { return new HeadersSingleImpl(name, listOf_0(value)); } function HeadersSingleImpl(name, values) { StringValuesSingleImpl.call(this, true, name, values); } protoOf(HeadersSingleImpl).toString = function () { return 'Headers ' + toString(this.i1r()); }; function HeaderValueParam_init_$Init$(name, value, $this) { HeaderValueParam.call($this, name, value, false); return $this; } function HeaderValueParam_init_$Create$(name, value) { return HeaderValueParam_init_$Init$(name, value, objectCreate(protoOf(HeaderValueParam))); } function HeaderValueParam(name, value, escapeValue) { this.n1v_1 = name; this.o1v_1 = value; this.p1v_1 = escapeValue; } protoOf(HeaderValueParam).equals = function (other) { var tmp; var tmp_0; if (other instanceof HeaderValueParam) { tmp_0 = equals(other.n1v_1, this.n1v_1, true); } else { tmp_0 = false; } if (tmp_0) { tmp = equals(other.o1v_1, this.o1v_1, true); } else { tmp = false; } return tmp; }; protoOf(HeaderValueParam).hashCode = function () { // Inline function 'kotlin.text.lowercase' call // Inline function 'kotlin.js.asDynamic' call var tmp$ret$1 = this.n1v_1.toLowerCase(); var result = getStringHashCode(tmp$ret$1); var tmp = result; var tmp_0 = imul(31, result); // Inline function 'kotlin.text.lowercase' call // Inline function 'kotlin.js.asDynamic' call var tmp$ret$3 = this.o1v_1.toLowerCase(); result = tmp + (tmp_0 + getStringHashCode(tmp$ret$3) | 0) | 0; return result; }; protoOf(HeaderValueParam).yf = function () { return this.n1v_1; }; protoOf(HeaderValueParam).zf = function () { return this.o1v_1; }; protoOf(HeaderValueParam).toString = function () { return 'HeaderValueParam(name=' + this.n1v_1 + ', value=' + this.o1v_1 + ', escapeValue=' + this.p1v_1 + ')'; }; function HeaderValue(value, params) { params = params === VOID ? emptyList() : params; this.s1v_1 = value; this.t1v_1 = params; var tmp = this; var tmp0 = this.t1v_1; var tmp$ret$1; $l$block: { // Inline function 'kotlin.collections.firstOrNull' call var _iterator__ex2g4s = tmp0.g(); while (_iterator__ex2g4s.h()) { var element = _iterator__ex2g4s.i(); if (element.n1v_1 === 'q') { tmp$ret$1 = element; break $l$block; } } tmp$ret$1 = null; } var tmp0_safe_receiver = tmp$ret$1; var tmp1_safe_receiver = tmp0_safe_receiver == null ? null : tmp0_safe_receiver.o1v_1; var tmp2_safe_receiver = tmp1_safe_receiver == null ? null : toDoubleOrNull(tmp1_safe_receiver); var tmp_0; if (tmp2_safe_receiver == null) { tmp_0 = null; } else { // Inline function 'kotlin.takeIf' call var tmp_1; if (0.0 <= tmp2_safe_receiver ? tmp2_safe_receiver <= 1.0 : false) { tmp_1 = tmp2_safe_receiver; } else { tmp_1 = null; } tmp_0 = tmp_1; } var tmp3_elvis_lhs = tmp_0; tmp.u1v_1 = tmp3_elvis_lhs == null ? 1.0 : tmp3_elvis_lhs; } protoOf(HeaderValue).toString = function () { return 'HeaderValue(value=' + this.s1v_1 + ', params=' + toString(this.t1v_1) + ')'; }; protoOf(HeaderValue).hashCode = function () { var result = getStringHashCode(this.s1v_1); result = imul(result, 31) + hashCode(this.t1v_1) | 0; return result; }; protoOf(HeaderV