git-rest-wrapper
Version:
A "universal" / normalized API wrapper for common git hosting services.
1,299 lines (1,296 loc) • 214 kB
JavaScript
(function(root, factory) {
if (typeof define === 'function' && define.amd)
define(['exports', 'kotlin', 'ktor-ktor-io-jsLegacy', 'kotlinx-coroutines-core'], factory);
else if (typeof exports === 'object')
factory(module.exports, require('kotlin'), require('ktor-ktor-io-jsLegacy'), require('kotlinx-coroutines-core'));
else {
if (typeof kotlin === 'undefined') {
throw new Error("Error loading module 'ktor-ktor-utils-jsLegacy'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'ktor-ktor-utils-jsLegacy'.");
}
if (typeof this['ktor-ktor-io-jsLegacy'] === 'undefined') {
throw new Error("Error loading module 'ktor-ktor-utils-jsLegacy'. Its dependency 'ktor-ktor-io-jsLegacy' was not found. Please, check whether 'ktor-ktor-io-jsLegacy' is loaded prior to 'ktor-ktor-utils-jsLegacy'.");
}
if (typeof this['kotlinx-coroutines-core'] === 'undefined') {
throw new Error("Error loading module 'ktor-ktor-utils-jsLegacy'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'ktor-ktor-utils-jsLegacy'.");
}
if (false) {
}
root['ktor-ktor-utils-jsLegacy'] = factory(typeof this['ktor-ktor-utils-jsLegacy'] === 'undefined' ? {} : this['ktor-ktor-utils-jsLegacy'], kotlin, this['ktor-ktor-io-jsLegacy'], this['kotlinx-coroutines-core']);
}
}(this, function(_, Kotlin, $module$ktor_ktor_io_jsLegacy, $module$kotlinx_coroutines_core) {
'use strict';
var $$importsForInline$$ = _.$$importsForInline$$ || (_.$$importsForInline$$ = {});
var Kind_CLASS = Kotlin.Kind.CLASS;
var Annotation = Kotlin.kotlin.Annotation;
var Any = Object;
var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$;
var Kind_INTERFACE = Kotlin.Kind.INTERFACE;
var toChar = Kotlin.toChar;
var indexOf = Kotlin.kotlin.text.indexOf_8eortd$;
var writeText = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.writeText_t153jy$;
var writeFully = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.writeFully_i6snlg$;
var readAvailable = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.readAvailable_ja303r$;
var charsets = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.charsets;
var String_0 = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.String_xge8xe$;
var unboxChar = Kotlin.unboxChar;
var readBytes = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.readBytes_7wsnj1$;
var toByte = Kotlin.toByte;
var readText = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.readText_1lnizf$;
var until = Kotlin.kotlin.ranges.until_dqglrj$;
var BytePacketBuilder = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.BytePacketBuilder_za3lpa$;
var Throwable = Error;
var StringBuilder_init = Kotlin.kotlin.text.StringBuilder_init;
var get_lastIndex = Kotlin.kotlin.text.get_lastIndex_gw00vp$;
var toBoxedChar = Kotlin.toBoxedChar;
var L4096 = Kotlin.Long.fromInt(4096);
var ByteChannel = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.ByteChannel_6taknv$;
var readRemaining = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.readRemaining_b56lbm$;
var Unit = Kotlin.kotlin.Unit;
var COROUTINE_SUSPENDED = Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED;
var CoroutineImpl = Kotlin.kotlin.coroutines.CoroutineImpl;
var async = $module$kotlinx_coroutines_core.kotlinx.coroutines.async_pda6u4$;
var listOf = Kotlin.kotlin.collections.listOf_i5x0yv$;
var awaitAll = $module$kotlinx_coroutines_core.kotlinx.coroutines.awaitAll_60afti$;
var close = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.close_x5qia6$;
var launch = $module$kotlinx_coroutines_core.kotlinx.coroutines.launch_s496o7$;
var to = Kotlin.kotlin.to_ujzrz7$;
var coroutines = $module$kotlinx_coroutines_core.kotlinx.coroutines;
var readRemaining_0 = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.readRemaining_3dmw3p$;
var readBytes_0 = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.core.readBytes_xc9h3n$;
var toShort = Kotlin.toShort;
var equals = Kotlin.equals;
var hashCode = Kotlin.hashCode;
var MutableMap = Kotlin.kotlin.collections.MutableMap;
var ensureNotNull = Kotlin.ensureNotNull;
var Map$Entry = Kotlin.kotlin.collections.Map.Entry;
var MutableMap$MutableEntry = Kotlin.kotlin.collections.MutableMap.MutableEntry;
var LinkedHashMap_init = Kotlin.kotlin.collections.LinkedHashMap_init_q3lmfv$;
var MutableSet = Kotlin.kotlin.collections.MutableSet;
var addAll = Kotlin.kotlin.collections.addAll_ipc267$;
var Map = Kotlin.kotlin.collections.Map;
var throwCCE = Kotlin.throwCCE;
var charArray = Kotlin.charArray;
var repeat = Kotlin.kotlin.text.repeat_94bcnn$;
var toString = Kotlin.toString;
var println = Kotlin.kotlin.io.println_s8jyv4$;
var println_0 = Kotlin.kotlin.io.println;
var SupervisorJob = $module$kotlinx_coroutines_core.kotlinx.coroutines.SupervisorJob_5dx9e$;
var AbstractCoroutineContextElement = Kotlin.kotlin.coroutines.AbstractCoroutineContextElement;
var CoroutineExceptionHandler = $module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineExceptionHandler;
var concatToString = Kotlin.kotlin.text.concatToString_355ntz$;
var toInt = Kotlin.kotlin.text.toInt_6ic1pp$;
var encodeToByteArray = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.charsets.encodeToByteArray_fj4osb$;
var MutableIterator = Kotlin.kotlin.collections.MutableIterator;
var Set = Kotlin.kotlin.collections.Set;
var collectionSizeOrDefault = Kotlin.kotlin.collections.collectionSizeOrDefault_ba2ldo$;
var ArrayList_init = Kotlin.kotlin.collections.ArrayList_init_ww73n8$;
var Kind_OBJECT = Kotlin.Kind.OBJECT;
var toList = Kotlin.kotlin.collections.toList_us0mfu$;
var defineInlineFunction = Kotlin.defineInlineFunction;
var UnsupportedOperationException_init = Kotlin.kotlin.UnsupportedOperationException_init_pdl1vj$;
var L0 = Kotlin.Long.ZERO;
var coerceAtLeast = Kotlin.kotlin.ranges.coerceAtLeast_2p08ub$;
var wrapFunction = Kotlin.wrapFunction;
var firstOrNull = Kotlin.kotlin.collections.firstOrNull_2p1efm$;
var equals_0 = Kotlin.kotlin.text.equals_igcy3c$;
var setOf = Kotlin.kotlin.collections.setOf_mh5how$;
var emptyMap = Kotlin.kotlin.collections.emptyMap_q3lmfv$;
var toMap = Kotlin.kotlin.collections.toMap_abgq59$;
var lazy = Kotlin.kotlin.lazy_klfg04$;
var Collection = Kotlin.kotlin.collections.Collection;
var toSet = Kotlin.kotlin.collections.toSet_7wnvza$;
var emptySet = Kotlin.kotlin.collections.emptySet_287e2$;
var LinkedHashMap_init_0 = Kotlin.kotlin.collections.LinkedHashMap_init_bwtc7$;
var asList = Kotlin.kotlin.collections.asList_us0mfu$;
var toMap_0 = Kotlin.kotlin.collections.toMap_6hr0sd$;
var listOf_0 = Kotlin.kotlin.collections.listOf_mh5how$;
var single = Kotlin.kotlin.collections.single_7wnvza$;
var toList_0 = Kotlin.kotlin.collections.toList_7wnvza$;
var ArrayList_init_0 = Kotlin.kotlin.collections.ArrayList_init_287e2$;
var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init_pdl1vj$;
var CharRange = Kotlin.kotlin.ranges.CharRange;
var StringBuilder_init_0 = Kotlin.kotlin.text.StringBuilder_init_za3lpa$;
var get_indices = Kotlin.kotlin.text.get_indices_gw00vp$;
var IOException = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.errors.IOException;
var addAll_0 = Kotlin.kotlin.collections.addAll_ye1y7v$;
var MutableCollection = Kotlin.kotlin.collections.MutableCollection;
var PropertyMetadata = Kotlin.PropertyMetadata;
var List = Kotlin.kotlin.collections.List;
var NoSuchElementException_init = Kotlin.kotlin.NoSuchElementException_init;
var MutableListIterator = Kotlin.kotlin.collections.MutableListIterator;
var IndexOutOfBoundsException_init = Kotlin.kotlin.IndexOutOfBoundsException_init;
var makeShared = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.makeShared_s8jyvk$;
var MutableList = Kotlin.kotlin.collections.MutableList;
var ReadWriteProperty = Kotlin.kotlin.properties.ReadWriteProperty;
var checkIndexOverflow = Kotlin.kotlin.collections.checkIndexOverflow_za3lpa$;
var AbstractMutableList = Kotlin.kotlin.collections.AbstractMutableList;
var Math_0 = Math;
var UnsupportedOperationException_init_0 = Kotlin.kotlin.UnsupportedOperationException_init;
var MutableIterable = Kotlin.kotlin.collections.MutableIterable;
var asReversed = Kotlin.kotlin.collections.asReversed_2p1efm$;
var ListIterator = Kotlin.kotlin.collections.ListIterator;
var atomicArrayOfNulls;
var Enum = Kotlin.kotlin.Enum;
var throwISE = Kotlin.throwISE;
var Comparable = Kotlin.kotlin.Comparable;
var toInt_0 = Kotlin.kotlin.text.toInt_pdl1vz$;
var throwUPAE = Kotlin.throwUPAE;
var IllegalStateException = Kotlin.kotlin.IllegalStateException;
var iterator = Kotlin.kotlin.text.iterator_gw00vp$;
var ArrayList = Kotlin.kotlin.collections.ArrayList;
var get_lastIndex_0 = Kotlin.kotlin.collections.get_lastIndex_55thoc$;
var emptyList = Kotlin.kotlin.collections.emptyList_287e2$;
var last = Kotlin.kotlin.collections.last_2p1efm$;
var CoroutineScope = $module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineScope;
var recoverStackTrace = $module$kotlinx_coroutines_core.kotlinx.coroutines.internal.recoverStackTrace_ak2v6d$;
var getKClass = Kotlin.getKClass;
var getCallableRef = Kotlin.getCallableRef;
var coroutines_0 = Kotlin.kotlin.coroutines;
var Continuation = Kotlin.kotlin.coroutines.Continuation;
var Result = Kotlin.kotlin.Result;
var getOrNull = Kotlin.kotlin.collections.getOrNull_yzln2o$;
var preventFreeze = $module$ktor_ktor_io_jsLegacy.io.ktor.utils.io.preventFreeze_s8jyvk$;
var createFailure = Kotlin.kotlin.createFailure_tcv7n7$;
var asDeferred = $module$kotlinx_coroutines_core.kotlinx.coroutines.asDeferred_t11jrl$;
var primitiveArrayConcat = Kotlin.primitiveArrayConcat;
var isNaN_0 = Kotlin.kotlin.isNaN_yrwdxr$;
var IllegalArgumentException_init_0 = Kotlin.kotlin.IllegalArgumentException_init;
var IllegalArgumentException = Kotlin.kotlin.IllegalArgumentException;
ChannelIOException.prototype = Object.create(IOException.prototype);
ChannelIOException.prototype.constructor = ChannelIOException;
ChannelWriteException.prototype = Object.create(ChannelIOException.prototype);
ChannelWriteException.prototype.constructor = ChannelWriteException;
ChannelReadException.prototype = Object.create(ChannelIOException.prototype);
ChannelReadException.prototype.constructor = ChannelReadException;
ConcurrentListSlice.prototype = Object.create(AbstractMutableList.prototype);
ConcurrentListSlice.prototype.constructor = ConcurrentListSlice;
WeekDay.prototype = Object.create(Enum.prototype);
WeekDay.prototype.constructor = WeekDay;
Month.prototype = Object.create(Enum.prototype);
Month.prototype.constructor = Month;
InvalidDateStringException.prototype = Object.create(IllegalStateException.prototype);
InvalidDateStringException.prototype.constructor = InvalidDateStringException;
InvalidPhaseException.prototype = Object.create(Throwable.prototype);
InvalidPhaseException.prototype.constructor = InvalidPhaseException;
PipelinePhaseRelation$After.prototype = Object.create(PipelinePhaseRelation.prototype);
PipelinePhaseRelation$After.prototype.constructor = PipelinePhaseRelation$After;
PipelinePhaseRelation$Before.prototype = Object.create(PipelinePhaseRelation.prototype);
PipelinePhaseRelation$Before.prototype.constructor = PipelinePhaseRelation$Before;
PipelinePhaseRelation$Last.prototype = Object.create(PipelinePhaseRelation.prototype);
PipelinePhaseRelation$Last.prototype.constructor = PipelinePhaseRelation$Last;
InvalidTimestampException.prototype = Object.create(IllegalStateException.prototype);
InvalidTimestampException.prototype.constructor = InvalidTimestampException;
UnresolvedAddressException.prototype = Object.create(IllegalArgumentException.prototype);
UnresolvedAddressException.prototype.constructor = UnresolvedAddressException;
function InternalAPI() {
}
InternalAPI.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'InternalAPI',
interfaces: [Annotation]};
function KtorExperimentalAPI() {
}
KtorExperimentalAPI.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'KtorExperimentalAPI',
interfaces: [Annotation]};
function AttributeKey(name) {
this.name = name;
}
AttributeKey.prototype.toString = function() {
return this.name.length === 0 ? Any.prototype.toString.call(this) : 'AttributeKey: ' + this.name;
};
AttributeKey.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'AttributeKey',
interfaces: []};
function Attributes() {
}
Attributes.prototype.get_yzaw86$ = function(key) {
var tmp$;
tmp$ = this.getOrNull_yzaw86$(key);
if (tmp$ == null) {
throw IllegalStateException_init('No instance for key ' + key);
}
return tmp$;
};
Attributes.prototype.take_yzaw86$ = function(key) {
var $receiver = this.get_yzaw86$(key);
this.remove_yzaw86$(key);
return $receiver;
};
Attributes.prototype.takeOrNull_yzaw86$ = function(key) {
var $receiver = this.getOrNull_yzaw86$(key);
this.remove_yzaw86$(key);
return $receiver;
};
Attributes.$metadata$ = {
kind: Kind_INTERFACE,
simpleName: 'Attributes',
interfaces: []};
var BASE64_ALPHABET;
var BASE64_MASK;
var BASE64_PAD;
var BASE64_INVERSE_ALPHABET;
function encodeBase64($receiver) {
var buildPacket$result;
var builder = BytePacketBuilder(0);
try {
writeText(builder, $receiver);
buildPacket$result = builder.build();
} catch (t) {
if (Kotlin.isType(t, Throwable)) {
builder.release();
throw t;
} else
throw t;
}
return encodeBase64_1(buildPacket$result);
}
function encodeBase64_0($receiver) {
var buildPacket$result;
var builder = BytePacketBuilder(0);
try {
writeFully(builder, $receiver);
buildPacket$result = builder.build();
} catch (t) {
if (Kotlin.isType(t, Throwable)) {
builder.release();
throw t;
} else
throw t;
}
return encodeBase64_1(buildPacket$result);
}
function encodeBase64_1($receiver) {
var $receiver_0 = StringBuilder_init();
var data = new Int8Array(3);
while ($receiver.remaining.toNumber() > 0) {
var read = readAvailable($receiver, data);
clearFrom(data, read);
var padSize = ((data.length - read | 0) * 8 | 0) / 6 | 0;
var chunk = (data[0] & 255) << 16 | (data[1] & 255) << 8 | data[2] & 255;
for (var index = data.length; index >= padSize; index--) {
var char = chunk >> (6 * index | 0) & 63;
$receiver_0.append_s8itvh$(toBase64(char));
}
for (var index_0 = 0; index_0 < padSize; index_0++) {
$receiver_0.append_s8itvh$(BASE64_PAD);
}
}
return $receiver_0.toString();
}
function decodeBase64String($receiver) {
return String_0(decodeBase64Bytes($receiver), void 0, void 0, charsets.Charsets.UTF_8);
}
function decodeBase64Bytes($receiver) {
var buildPacket$result;
var builder = BytePacketBuilder(0);
try {
var dropLastWhile$result;
dropLastWhile$break:
do {
for (var index = get_lastIndex($receiver); index >= 0; index--) {
if (!(unboxChar(toBoxedChar($receiver.charCodeAt(index))) === BASE64_PAD)) {
dropLastWhile$result = $receiver.substring(0, index + 1 | 0);
break dropLastWhile$break;
}
}
dropLastWhile$result = '';
} while (false);
writeText(builder, dropLastWhile$result);
buildPacket$result = builder.build();
} catch (t) {
if (Kotlin.isType(t, Throwable)) {
builder.release();
throw t;
} else
throw t;
}
return readBytes(decodeBase64Bytes_0(buildPacket$result));
}
function decodeBase64Bytes_0($receiver) {
var buildPacket$result;
var builder = BytePacketBuilder(0);
try {
var tmp$, tmp$_0;
var data = new Int8Array(4);
while ($receiver.remaining.toNumber() > 0) {
var read = readAvailable($receiver, data);
var tmp$_1, tmp$_0_0;
var index = 0;
var accumulator = 0;
for (tmp$_1 = 0; tmp$_1 !== data.length; ++tmp$_1) {
var element = data[tmp$_1];
var index_0 = (tmp$_0_0 = index , index = tmp$_0_0 + 1 | 0 , tmp$_0_0);
accumulator = accumulator | fromBase64(element) << ((3 - index_0 | 0) * 6 | 0);
}
var chunk = accumulator;
tmp$ = data.length - 2 | 0;
tmp$_0 = data.length - read | 0;
for (var index_1 = tmp$; index_1 >= tmp$_0; index_1--) {
var origin = chunk >> (8 * index_1 | 0) & 255;
builder.writeByte_s8j3t7$(toByte(origin));
}
}
buildPacket$result = builder.build();
} catch (t) {
if (Kotlin.isType(t, Throwable)) {
builder.release();
throw t;
} else
throw t;
}
return buildPacket$result;
}
function decodeBase64($receiver) {
return decodeBase64String($receiver);
}
function decodeBase64_0($receiver) {
return readText(decodeBase64Bytes_0($receiver));
}
function clearFrom($receiver, from) {
var tmp$;
tmp$ = until(from, $receiver.length).iterator();
while (tmp$.hasNext()) {
var element = tmp$.next();
$receiver[element] = 0;
}
}
function toBase64($receiver) {
return BASE64_ALPHABET.charCodeAt($receiver);
}
function fromBase64($receiver) {
return toByte(toByte(BASE64_INVERSE_ALPHABET[$receiver & 255]) & BASE64_MASK);
}
var CHUNK_BUFFER_SIZE;
function Coroutine$split$lambda$lambda$lambda(closure$first_0, closure$chunk_0, $receiver_0, controller, continuation_0) {
CoroutineImpl.call(this, continuation_0);
this.$controller = controller;
this.exceptionState_0 = 1;
this.local$closure$first = closure$first_0;
this.local$closure$chunk = closure$chunk_0;
}
Coroutine$split$lambda$lambda$lambda.$metadata$ = {
kind: Kotlin.Kind.CLASS,
simpleName: null,
interfaces: [CoroutineImpl]};
Coroutine$split$lambda$lambda$lambda.prototype = Object.create(CoroutineImpl.prototype);
Coroutine$split$lambda$lambda$lambda.prototype.constructor = Coroutine$split$lambda$lambda$lambda;
Coroutine$split$lambda$lambda$lambda.prototype.doResume = function() {
do try {
switch (this.state_0) {
case 0:
this.state_0 = 2;
this.result_0 = this.local$closure$first.writePacket_3uq2w4$(this.local$closure$chunk.copy(), this);
if (this.result_0 === COROUTINE_SUSPENDED)
return COROUTINE_SUSPENDED;
continue;
case 1:
throw this.exception_0;
case 2:
return this.result_0;
default:
this.state_0 = 1;
throw new Error('State Machine Unreachable execution');
}
} catch (e) {
if (this.state_0 === 1) {
this.exceptionState_0 = this.state_0;
throw e;
} else {
this.state_0 = this.exceptionState_0;
this.exception_0 = e;
}
} while (true);
};
function split$lambda$lambda$lambda(closure$first_0, closure$chunk_0) {
return function($receiver_0, continuation_0, suspended) {
var instance = new Coroutine$split$lambda$lambda$lambda(closure$first_0, closure$chunk_0, $receiver_0, this, continuation_0);
if (suspended)
return instance;
else
return instance.doResume(null);
};
}
function Coroutine$split$lambda$lambda$lambda_0(closure$second_0, closure$chunk_0, $receiver_0, controller, continuation_0) {
CoroutineImpl.call(this, continuation_0);
this.$controller = controller;
this.exceptionState_0 = 1;
this.local$closure$second = closure$second_0;
this.local$closure$chunk = closure$chunk_0;
}
Coroutine$split$lambda$lambda$lambda_0.$metadata$ = {
kind: Kotlin.Kind.CLASS,
simpleName: null,
interfaces: [CoroutineImpl]};
Coroutine$split$lambda$lambda$lambda_0.prototype = Object.create(CoroutineImpl.prototype);
Coroutine$split$lambda$lambda$lambda_0.prototype.constructor = Coroutine$split$lambda$lambda$lambda_0;
Coroutine$split$lambda$lambda$lambda_0.prototype.doResume = function() {
do try {
switch (this.state_0) {
case 0:
this.state_0 = 2;
this.result_0 = this.local$closure$second.writePacket_3uq2w4$(this.local$closure$chunk.copy(), this);
if (this.result_0 === COROUTINE_SUSPENDED)
return COROUTINE_SUSPENDED;
continue;
case 1:
throw this.exception_0;
case 2:
return this.result_0;
default:
this.state_0 = 1;
throw new Error('State Machine Unreachable execution');
}
} catch (e) {
if (this.state_0 === 1) {
this.exceptionState_0 = this.state_0;
throw e;
} else {
this.state_0 = this.exceptionState_0;
this.exception_0 = e;
}
} while (true);
};
function split$lambda$lambda$lambda_0(closure$second_0, closure$chunk_0) {
return function($receiver_0, continuation_0, suspended) {
var instance = new Coroutine$split$lambda$lambda$lambda_0(closure$second_0, closure$chunk_0, $receiver_0, this, continuation_0);
if (suspended)
return instance;
else
return instance.doResume(null);
};
}
function Coroutine$split$lambda(this$split_0, closure$first_0, closure$second_0, $receiver_0, controller, continuation_0) {
CoroutineImpl.call(this, continuation_0);
this.$controller = controller;
this.exceptionState_0 = 13;
this.local$this$split = this$split_0;
this.local$closure$first = closure$first_0;
this.local$closure$second = closure$second_0;
this.local$$receiver = void 0;
this.local$$receiver_0 = $receiver_0;
}
Coroutine$split$lambda.$metadata$ = {
kind: Kotlin.Kind.CLASS,
simpleName: null,
interfaces: [CoroutineImpl]};
Coroutine$split$lambda.prototype = Object.create(CoroutineImpl.prototype);
Coroutine$split$lambda.prototype.constructor = Coroutine$split$lambda;
Coroutine$split$lambda.prototype.doResume = function() {
do try {
switch (this.state_0) {
case 0:
this.exceptionState_0 = 8;
this.state_0 = 1;
continue;
case 1:
if (this.local$this$split.isClosedForRead) {
this.state_0 = 7;
continue;
}
this.state_0 = 2;
this.result_0 = readRemaining(this.local$this$split, CHUNK_BUFFER_SIZE, this);
if (this.result_0 === COROUTINE_SUSPENDED)
return COROUTINE_SUSPENDED;
continue;
case 2:
this.local$$receiver = this.result_0;
var tmp$;
this.exceptionState_0 = 5;
var closure$first = this.local$closure$first;
var closure$second = this.local$closure$second;
this.state_0 = 3;
this.result_0 = awaitAll(listOf([async(this.local$$receiver_0, void 0, void 0, split$lambda$lambda$lambda(closure$first, this.local$$receiver)), async(this.local$$receiver_0, void 0, void 0, split$lambda$lambda$lambda_0(closure$second, this.local$$receiver))]), this);
if (this.result_0 === COROUTINE_SUSPENDED)
return COROUTINE_SUSPENDED;
continue;
case 3:
tmp$ = this.result_0;
this.exceptionState_0 = 8;
this.finallyPath_0 = [4];
this.state_0 = 6;
continue;
case 4:
this.state_0 = 1;
continue;
case 5:
this.finallyPath_0 = [8];
this.state_0 = 6;
continue;
case 6:
this.exceptionState_0 = 8;
this.local$$receiver.close();
this.state_0 = this.finallyPath_0.shift();
continue;
case 7:
this.exceptionState_0 = 13;
this.finallyPath_0 = [12];
this.state_0 = 11;
continue;
case 8:
this.finallyPath_0 = [13];
this.exceptionState_0 = 11;
var cause = this.exception_0;
if (Kotlin.isType(cause, Throwable)) {
this.local$this$split.cancel_dbl4no$(cause);
this.local$closure$first.cancel_dbl4no$(cause);
this.exceptionState_0 = 13;
this.finallyPath_0 = [9];
this.state_0 = 11;
this.$returnValue = this.local$closure$second.cancel_dbl4no$(cause);
continue;
} else {
throw cause;
}
case 9:
return this.$returnValue;
case 10:
this.finallyPath_0 = [12];
this.state_0 = 11;
continue;
case 11:
this.exceptionState_0 = 13;
close(this.local$closure$first);
close(this.local$closure$second);
this.state_0 = this.finallyPath_0.shift();
continue;
case 12:
return Unit;
case 13:
throw this.exception_0;
default:
this.state_0 = 13;
throw new Error('State Machine Unreachable execution');
}
} catch (e) {
if (this.state_0 === 13) {
this.exceptionState_0 = this.state_0;
throw e;
} else {
this.state_0 = this.exceptionState_0;
this.exception_0 = e;
}
} while (true);
};
function split$lambda(this$split_0, closure$first_0, closure$second_0) {
return function($receiver_0, continuation_0, suspended) {
var instance = new Coroutine$split$lambda(this$split_0, closure$first_0, closure$second_0, $receiver_0, this, continuation_0);
if (suspended)
return instance;
else
return instance.doResume(null);
};
}
function split($receiver, coroutineScope) {
var first = ByteChannel(true);
var second = ByteChannel(true);
launch(coroutineScope, void 0, void 0, split$lambda($receiver, first, second));
return to(first, second);
}
function Coroutine$copyToBoth$lambda(this$copyToBoth_0, closure$first_0, closure$second_0, $receiver_0, controller, continuation_0) {
CoroutineImpl.call(this, continuation_0);
this.$controller = controller;
this.exceptionState_0 = 19;
this.local$this$copyToBoth = this$copyToBoth_0;
this.local$closure$first = closure$first_0;
this.local$closure$second = closure$second_0;
this.local$$receiver = void 0;
this.local$closure$first_0 = void 0;
this.local$closure$second_0 = void 0;
this.local$this$copyToBoth_0 = void 0;
this.local$block$result = void 0;
}
Coroutine$copyToBoth$lambda.$metadata$ = {
kind: Kotlin.Kind.CLASS,
simpleName: null,
interfaces: [CoroutineImpl]};
Coroutine$copyToBoth$lambda.prototype = Object.create(CoroutineImpl.prototype);
Coroutine$copyToBoth$lambda.prototype.constructor = Coroutine$copyToBoth$lambda;
Coroutine$copyToBoth$lambda.prototype.doResume = function() {
do try {
switch (this.state_0) {
case 0:
this.exceptionState_0 = 14;
this.state_0 = 1;
continue;
case 1:
if (this.local$this$copyToBoth.isClosedForRead || (this.local$closure$first.isClosedForWrite && this.local$closure$second.isClosedForWrite)) {
this.state_0 = 13;
continue;
}
this.state_0 = 2;
this.result_0 = readRemaining(this.local$this$copyToBoth, CHUNK_BUFFER_SIZE, this);
if (this.result_0 === COROUTINE_SUSPENDED)
return COROUTINE_SUSPENDED;
continue;
case 2:
this.local$$receiver = this.result_0;
var tmp$;
this.exceptionState_0 = 11;
this.local$closure$first_0 = this.local$closure$first;
this.local$closure$second_0 = this.local$closure$second;
this.local$this$copyToBoth_0 = this.local$this$copyToBoth;
this.state_0 = 3;
continue;
case 3:
this.exceptionState_0 = 6;
this.state_0 = 4;
this.result_0 = this.local$closure$first_0.writePacket_3uq2w4$(this.local$$receiver.copy(), this);
if (this.result_0 === COROUTINE_SUSPENDED)
return COROUTINE_SUSPENDED;
continue;
case 4:
this.state_0 = 5;
this.result_0 = this.local$closure$second_0.writePacket_3uq2w4$(this.local$$receiver.copy(), this);
if (this.result_0 === COROUTINE_SUSPENDED)
return COROUTINE_SUSPENDED;
continue;
case 5:
this.local$block$result = this.result_0;
this.exceptionState_0 = 11;
this.state_0 = 8;
continue;
case 6:
this.exceptionState_0 = 11;
var cause_0 = this.exception_0;
if (Kotlin.isType(cause_0, Throwable)) {
this.local$this$copyToBoth_0.cancel_dbl4no$(cause_0);
this.local$closure$first_0.close_dbl4no$(cause_0);
this.local$block$result = this.local$closure$second_0.close_dbl4no$(cause_0);
this.exceptionState_0 = 6;
this.state_0 = 9;
continue;
} else {
throw cause_0;
}
case 7:
this.state_0 = 8;
continue;
case 8:
if (!false) {
this.state_0 = 9;
continue;
}
this.state_0 = 3;
continue;
case 9:
tmp$ = this.local$block$result;
this.exceptionState_0 = 14;
this.finallyPath_0 = [10];
this.state_0 = 12;
continue;
case 10:
this.state_0 = 1;
continue;
case 11:
this.finallyPath_0 = [14];
this.state_0 = 12;
continue;
case 12:
this.exceptionState_0 = 14;
this.local$$receiver.close();
this.state_0 = this.finallyPath_0.shift();
continue;
case 13:
this.exceptionState_0 = 19;
this.finallyPath_0 = [18];
this.state_0 = 17;
continue;
case 14:
this.finallyPath_0 = [19];
this.exceptionState_0 = 17;
var cause = this.exception_0;
if (Kotlin.isType(cause, Throwable)) {
this.local$closure$first.close_dbl4no$(cause);
this.exceptionState_0 = 19;
this.finallyPath_0 = [15];
this.state_0 = 17;
this.$returnValue = this.local$closure$second.close_dbl4no$(cause);
continue;
} else {
throw cause;
}
case 15:
return this.$returnValue;
case 16:
this.finallyPath_0 = [18];
this.state_0 = 17;
continue;
case 17:
this.exceptionState_0 = 19;
close(this.local$closure$first);
close(this.local$closure$second);
this.state_0 = this.finallyPath_0.shift();
continue;
case 18:
return Unit;
case 19:
throw this.exception_0;
default:
this.state_0 = 19;
throw new Error('State Machine Unreachable execution');
}
} catch (e) {
if (this.state_0 === 19) {
this.exceptionState_0 = this.state_0;
throw e;
} else {
this.state_0 = this.exceptionState_0;
this.exception_0 = e;
}
} while (true);
};
function copyToBoth$lambda(this$copyToBoth_0, closure$first_0, closure$second_0) {
return function($receiver_0, continuation_0, suspended) {
var instance = new Coroutine$copyToBoth$lambda(this$copyToBoth_0, closure$first_0, closure$second_0, $receiver_0, this, continuation_0);
if (suspended)
return instance;
else
return instance.doResume(null);
};
}
function copyToBoth($receiver, first, second) {
launch(coroutines.GlobalScope, coroutines.Dispatchers.Unconfined, void 0, copyToBoth$lambda($receiver, first, second));
}
function Coroutine$toByteArray($receiver_0, continuation_0) {
CoroutineImpl.call(this, continuation_0);
this.exceptionState_0 = 1;
this.local$$receiver = $receiver_0;
}
Coroutine$toByteArray.$metadata$ = {
kind: Kotlin.Kind.CLASS,
simpleName: null,
interfaces: [CoroutineImpl]};
Coroutine$toByteArray.prototype = Object.create(CoroutineImpl.prototype);
Coroutine$toByteArray.prototype.constructor = Coroutine$toByteArray;
Coroutine$toByteArray.prototype.doResume = function() {
do try {
switch (this.state_0) {
case 0:
this.state_0 = 2;
this.result_0 = readRemaining_0(this.local$$receiver, this);
if (this.result_0 === COROUTINE_SUSPENDED)
return COROUTINE_SUSPENDED;
continue;
case 1:
throw this.exception_0;
case 2:
return readBytes_0(this.result_0);
default:
this.state_0 = 1;
throw new Error('State Machine Unreachable execution');
}
} catch (e) {
if (this.state_0 === 1) {
this.exceptionState_0 = this.state_0;
throw e;
} else {
this.state_0 = this.exceptionState_0;
this.exception_0 = e;
}
} while (true);
};
function toByteArray($receiver_0, continuation_0, suspended) {
var instance = new Coroutine$toByteArray($receiver_0, continuation_0);
if (suspended)
return instance;
else
return instance.doResume(null);
}
function readShort($receiver, offset) {
var result = ($receiver[offset] & 255) << 8 | $receiver[offset + 1 | 0] & 255;
return toShort(result);
}
function CaseInsensitiveMap() {
this.delegate_0 = LinkedHashMap_init();
}
Object.defineProperty(CaseInsensitiveMap.prototype, 'size', {
configurable: true,
get: function() {
return this.delegate_0.size;
}});
CaseInsensitiveMap.prototype.containsKey_11rb$ = function(key) {
return this.delegate_0.containsKey_11rb$(new CaseInsensitiveString(key));
};
CaseInsensitiveMap.prototype.containsValue_11rc$ = function(value) {
return this.delegate_0.containsValue_11rc$(value);
};
CaseInsensitiveMap.prototype.get_11rb$ = function(key) {
return this.delegate_0.get_11rb$(caseInsensitive(key));
};
CaseInsensitiveMap.prototype.isEmpty = function() {
return this.delegate_0.isEmpty();
};
CaseInsensitiveMap.prototype.clear = function() {
this.delegate_0.clear();
};
CaseInsensitiveMap.prototype.put_xwzc9p$ = function(key, value) {
return this.delegate_0.put_xwzc9p$(caseInsensitive(key), value);
};
CaseInsensitiveMap.prototype.putAll_a2k3zr$ = function(from) {
var tmp$;
tmp$ = from.entries.iterator();
while (tmp$.hasNext()) {
var element = tmp$.next();
var key = element.key;
var value = element.value;
this.put_xwzc9p$(key, value);
}
};
CaseInsensitiveMap.prototype.remove_11rb$ = function(key) {
return this.delegate_0.remove_11rb$(caseInsensitive(key));
};
function CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda($receiver) {
return $receiver.content;
}
function CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda_0($receiver) {
return caseInsensitive($receiver);
}
Object.defineProperty(CaseInsensitiveMap.prototype, 'keys', {
configurable: true,
get: function() {
return new DelegatingMutableSet(this.delegate_0.keys, CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda, CaseInsensitiveMap$get_CaseInsensitiveMap$keys$lambda_0);
}});
function CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda($receiver) {
return new Entry($receiver.key.content, $receiver.value);
}
function CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda_0($receiver) {
return new Entry(caseInsensitive($receiver.key), $receiver.value);
}
Object.defineProperty(CaseInsensitiveMap.prototype, 'entries', {
configurable: true,
get: function() {
return new DelegatingMutableSet(this.delegate_0.entries, CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda, CaseInsensitiveMap$get_CaseInsensitiveMap$entries$lambda_0);
}});
Object.defineProperty(CaseInsensitiveMap.prototype, 'values', {
configurable: true,
get: function() {
return this.delegate_0.values;
}});
CaseInsensitiveMap.prototype.equals = function(other) {
if (other == null || !Kotlin.isType(other, CaseInsensitiveMap))
return false;
return equals(other.delegate_0, this.delegate_0);
};
CaseInsensitiveMap.prototype.hashCode = function() {
return hashCode(this.delegate_0);
};
CaseInsensitiveMap.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'CaseInsensitiveMap',
interfaces: [MutableMap]};
function Entry(key, value) {
this.key_3iz5qv$_0 = key;
this.value_p1xw47$_0 = value;
}
Object.defineProperty(Entry.prototype, 'key', {
get: function() {
return this.key_3iz5qv$_0;
}});
Object.defineProperty(Entry.prototype, 'value', {
get: function() {
return this.value_p1xw47$_0;
},
set: function(value) {
this.value_p1xw47$_0 = value;
}});
Entry.prototype.setValue_11rc$ = function(newValue) {
this.value = newValue;
return this.value;
};
Entry.prototype.hashCode = function() {
return 527 + hashCode(ensureNotNull(this.key)) + hashCode(ensureNotNull(this.value)) | 0;
};
Entry.prototype.equals = function(other) {
if (other == null || !Kotlin.isType(other, Map$Entry))
return false;
return equals(other.key, this.key) && equals(other.value, this.value);
};
Entry.prototype.toString = function() {
return this.key.toString() + '=' + this.value;
};
Entry.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'Entry',
interfaces: [MutableMap$MutableEntry]};
function CaseInsensitiveSet() {
this.backingMap_0 = new CaseInsensitiveMap();
}
CaseInsensitiveSet.prototype.add_11rb$ = function(element) {
var $receiver = this.backingMap_0;
var tmp$;
if ((Kotlin.isType(tmp$ = $receiver, Map) ? tmp$ : throwCCE()).containsKey_11rb$(element)) {
return false;
}
this.backingMap_0.put_xwzc9p$(element, true);
return true;
};
Object.defineProperty(CaseInsensitiveSet.prototype, 'size', {
configurable: true,
get: function() {
return this.backingMap_0.size;
}});
CaseInsensitiveSet.prototype.remove_11rb$ = function(element) {
return this.backingMap_0.remove_11rb$(element) === true;
};
CaseInsensitiveSet.prototype.addAll_brywnq$ = function(elements) {
var tmp$;
var added = false;
tmp$ = elements.iterator();
while (tmp$.hasNext()) {
var element = tmp$.next();
if (this.add_11rb$(element)) {
added = true;
}
}
return added;
};
CaseInsensitiveSet.prototype.clear = function() {
this.backingMap_0.clear();
};
CaseInsensitiveSet.prototype.removeAll_brywnq$ = function(elements) {
return this.backingMap_0.keys.removeAll_brywnq$(elements);
};
CaseInsensitiveSet.prototype.retainAll_brywnq$ = function(elements) {
return this.backingMap_0.keys.retainAll_brywnq$(elements);
};
CaseInsensitiveSet.prototype.contains_11rb$ = function(element) {
var $receiver = this.backingMap_0;
var tmp$;
return (Kotlin.isType(tmp$ = $receiver, Map) ? tmp$ : throwCCE()).containsKey_11rb$(element);
};
CaseInsensitiveSet.prototype.containsAll_brywnq$ = function(elements) {
return this.backingMap_0.keys.containsAll_brywnq$(elements);
};
CaseInsensitiveSet.prototype.isEmpty = function() {
return this.backingMap_0.isEmpty();
};
CaseInsensitiveSet.prototype.iterator = function() {
return this.backingMap_0.keys.iterator();
};
CaseInsensitiveSet.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'CaseInsensitiveSet',
interfaces: [MutableSet]};
function CaseInsensitiveSet_init(initial, $this) {
$this = $this || Object.create(CaseInsensitiveSet.prototype);
CaseInsensitiveSet.call($this);
addAll($this, initial);
return $this;
}
function isLowerCase($receiver) {
return toChar(String.fromCharCode($receiver | 0).toLowerCase().charCodeAt(0)) === $receiver;
}
function toCharArray($receiver) {
var tmp$;
var array = charArray($receiver.length, null);
tmp$ = array.length - 1 | 0;
for (var i = 0; i <= tmp$; i++) {
var value = unboxChar(toBoxedChar($receiver.charCodeAt(i)));
array[i] = value;
}
return array;
}
function caseInsensitiveMap() {
return new CaseInsensitiveMap();
}
CoroutineExceptionHandler$ObjectLiteral.prototype = Object.create(AbstractCoroutineContextElement.prototype);
CoroutineExceptionHandler$ObjectLiteral.prototype.constructor = CoroutineExceptionHandler$ObjectLiteral;
function CoroutineExceptionHandler$ObjectLiteral(closure$handler, key) {
this.closure$handler = closure$handler;
AbstractCoroutineContextElement.call(this, key);
}
CoroutineExceptionHandler$ObjectLiteral.prototype.handleException_1ur55u$ = function(context, exception) {
this.closure$handler(context, exception);
};
CoroutineExceptionHandler$ObjectLiteral.$metadata$ = {
kind: Kind_CLASS,
interfaces: [CoroutineExceptionHandler, AbstractCoroutineContextElement]};
function printDebugTree($receiver, offset) {
if (offset === void 0)
offset = 0;
println(repeat(' ', offset) + toString($receiver));
var tmp$;
tmp$ = $receiver.children.iterator();
while (tmp$.hasNext()) {
var element = tmp$.next();
printDebugTree(element, offset + 2 | 0);
}
if (offset === 0)
println_0();
}
function SilentSupervisor$lambda(f, f_0) {
return Unit;
}
function SilentSupervisor(parent) {
if (parent === void 0)
parent = null;
return SupervisorJob(parent).plus_1fupul$(new CoroutineExceptionHandler$ObjectLiteral(SilentSupervisor$lambda, CoroutineExceptionHandler.Key));
}
var digits;
function hex(bytes) {
var tmp$, tmp$_0;
var result = Kotlin.charArray(bytes.length * 2 | 0);
var resultIndex = 0;
var digits_0 = digits;
for (var index = 0; index < bytes.length; index++) {
var b = bytes[index] & 255;
result[tmp$ = resultIndex , resultIndex = tmp$ + 1 | 0 , tmp$] = digits_0[b >> 4];
result[tmp$_0 = resultIndex , resultIndex = tmp$_0 + 1 | 0 , tmp$_0] = digits_0[b & 15];
}
return concatToString(result);
}
function hex_0(s) {
var result = new Int8Array(s.length / 2 | 0);
for (var idx = 0; idx < result.length; idx++) {
var srcIdx = idx * 2 | 0;
var high = toInt(String.fromCharCode(s.charCodeAt(srcIdx)), 16) << 4;
var low = toInt(String.fromCharCode(s.charCodeAt(srcIdx + 1 | 0)), 16);
result[idx] = toByte(high | low);
}
return result;
}
function generateNonce(size) {
var buildPacket$result;
var builder = BytePacketBuilder(0);
try {
while (builder.size < size) {
writeText(builder, generateNonce_0());
}
buildPacket$result = builder.build();
} catch (t) {
if (Kotlin.isType(t, Throwable)) {
builder.release();
throw t;
} else
throw t;
}
return readBytes_0(buildPacket$result, size);
}
function Digest() {
}
Digest.$metadata$ = {
kind: Kind_INTERFACE,
simpleName: 'Digest',
interfaces: []};
function build($receiver, bytes, continuation) {
$receiver.plusAssign_fqrh44$(bytes);
return $receiver.build(continuation);
}
function build_0($receiver, string, charset, continuation) {
if (charset === void 0)
charset = charsets.Charsets.UTF_8;
$receiver.plusAssign_fqrh44$(encodeToByteArray(charset.newEncoder(), string, 0, string.length));
return $receiver.build(continuation);
}
function DelegatingMutableSet(delegate, convertTo, convert) {
this.delegate_0 = delegate;
this.convertTo_0 = convertTo;
this.convert_0 = convert;
this.size_uukmxx$_0 = this.delegate_0.size;
}
DelegatingMutableSet.prototype.convert_9xhtru$ = function($receiver) {
var destination = ArrayList_init(collectionSizeOrDefault($receiver, 10));
var tmp$;
tmp$ = $receiver.iterator();
while (tmp$.hasNext()) {
var item = tmp$.next();
destination.add_11rb$(this.convert_0(item));
}
return destination;
};
DelegatingMutableSet.prototype.convertTo_9xhuij$ = function($receiver) {
var destination = ArrayList_init(collectionSizeOrDefault($receiver, 10));
var tmp$;
tmp$ = $receiver.iterator();
while (tmp$.hasNext()) {
var item = tmp$.next();
destination.add_11rb$(this.convertTo_0(item));
}
return destination;
};
Object.defineProperty(DelegatingMutableSet.prototype, 'size', {
configurable: true,
get: function() {
return this.size_uukmxx$_0;
}});
DelegatingMutableSet.prototype.add_11rb$ = function(element) {
return this.delegate_0.add_11rb$(this.convert_0(element));
};
DelegatingMutableSet.prototype.addAll_brywnq$ = function(elements) {
return this.delegate_0.addAll_brywnq$(this.convert_9xhtru$(elements));
};
DelegatingMutableSet.prototype.clear = function() {
this.delegate_0.clear();
};
DelegatingMutableSet.prototype.remove_11rb$ = function(element) {
return this.delegate_0.remove_11rb$(this.convert_0(element));
};
DelegatingMutableSet.prototype.removeAll_brywnq$ = function(elements) {
return this.delegate_0.removeAll_brywnq$(this.convert_9xhtru$(elements));
};
DelegatingMutableSet.prototype.retainAll_brywnq$ = function(elements) {
return this.delegate_0.retainAll_brywnq$(this.convert_9xhtru$(elements));
};
DelegatingMutableSet.prototype.contains_11rb$ = function(element) {
return this.delegate_0.contains_11rb$(this.convert_0(element));
};
DelegatingMutableSet.prototype.containsAll_brywnq$ = function(elements) {
return this.delegate_0.containsAll_brywnq$(this.convert_9xhtru$(elements));
};
DelegatingMutableSet.prototype.isEmpty = function() {
return this.delegate_0.isEmpty();
};
function DelegatingMutableSet$iterator$ObjectLiteral(this$DelegatingMutableSet) {
this.this$DelegatingMutableSet = this$DelegatingMutableSet;
this.delegateIterator = this$DelegatingMutableSet.delegate_0.iterator();
}
DelegatingMutableSet$iterator$ObjectLiteral.prototype.hasNext = function() {
return this.delegateIterator.hasNext();
};
DelegatingMutableSet$iterator$ObjectLiteral.prototype.next = function() {
return this.this$DelegatingMutableSet.convertTo_0(this.delegateIterator.next());
};
DelegatingMutableSet$iterator$ObjectLiteral.prototype.remove = function() {
this.delegateIterator.remove();
};
DelegatingMutableSet$iterator$ObjectLiteral.$metadata$ = {
kind: Kind_CLASS,
interfaces: [MutableIterator]};
DelegatingMutableSet.prototype.iterator = function() {
return new DelegatingMutableSet$iterator$ObjectLiteral(this);
};
DelegatingMutableSet.prototype.hashCode = function() {
return hashCode(this.delegate_0);
};
DelegatingMutableSet.prototype.equals = function(other) {
if (other == null || !Kotlin.isType(other, Set))
return false;
var elements = this.convertTo_9xhuij$(this.delegate_0);
var tmp$ = other.containsAll_brywnq$(elements);
if (tmp$) {
tmp$ = elements.containsAll_brywnq$(other);
}
return tmp$;
};
DelegatingMutableSet.prototype.toString = function() {
return this.convertTo_9xhuij$(this.delegate_0).toString();
};
DelegatingMutableSet.$metadata$ = {
kind: Kind_CLASS,
simpleName: 'DelegatingMutableSet',
interfaces: [MutableSet]};
function Identity() {
Identity_instance = this;
}
Identity.prototype.encode_40pv3p$ = function($receiver, source) {
return source;
};
Identity.prototype.decode_40pv3p$ = function($receiver, source) {
return source;
};
Identity.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'Identity',
interfaces: [Encoder]};
var Identity_instance = null;
function Identity_getInstance() {
if (Identity_instance === null) {
new Identity();
}
return Identity_instance;
}
function Encoder() {
}
Encoder.$metadata$ = {
kind: Kind_INTERFACE,
simpleName: 'Encoder',
interfaces: []};
function Hash() {
Hash_instance = this;
}
Hash.prototype.combine_jiburq$ = function(objects) {
return hashCode(toList(objects));
};
Hash.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'Hash',
interfaces: []};
var Hash_instance = null;
function Hash_getInstance() {
if (Hash_instance === null) {
new Hash();
}
return Hash_instance;
}
var withLock = defineInlineFunction('ktor-ktor-utils-jsLegacy.io.ktor.util.withLock_mfy7iq$', function($receiver, block) {
try {
$receiver.lock();
return block();
} finally {
$receiver.unlock();
}
});
function NonceManager() {
}
NonceManager.$metadata$ = {
kind: Kind_INTERFACE,
simpleName: 'NonceManager',
interfaces: []};
function GenerateOnlyNonceManager() {
GenerateOnlyNonceManager_instance = this;
}
GenerateOnlyNonceManager.prototype.newNonce = function(continuation) {
return generateNonce_0();
};
GenerateOnlyNonceManager.prototype.verifyNonce_61zpoe$ = function(nonce, continuation) {
return true;
};
GenerateOnlyNonceManager.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'GenerateOnlyNonceManager',
interfaces: [NonceManager]};
var GenerateOnlyNonceManager_instance = null;
function GenerateOnlyNonceManager_getInstance() {
if (GenerateOnlyNonceManager_instance === null) {
new GenerateOnlyNonceManager();
}
return GenerateOnlyNonceManager_instance;
}
function AlwaysFailNonceManager() {
AlwaysFailNonceManager_instance = this;
}
AlwaysFailNonceManager.prototype.newNonce = function(continuation) {
throw UnsupportedOperationException_init('This manager should never be used');
};
AlwaysFailNonceManager.prototype.verifyNonce_61zpoe$ = function(nonce, continuation) {
throw UnsupportedOperationException_init('This manager should never be used');
};
AlwaysFailNonceManager.$metadata$ = {
kind: Kind_OBJECT,
simpleName: 'AlwaysFailNonceManager',
interfaces: [NonceManager]};
var AlwaysFailNonceManager_instance = null;
function AlwaysFailNonceManager_getInstance() {
if (AlwaysFailNonceManager_instance === null) {
new AlwaysFailNonceManager();
}
return AlwaysFailNonceManager_instance;
}
function get_length($receiver) {
return coerceAtLeast($receiver.endInclusive.subtract($receiver.start).add(Kotlin.Long.fromInt(1)), L0);
}
function contains($receiver, other) {
return other.start.compareTo_11rb$($receiver.start) >= 0 && other.endInclusive.compareTo_11rb$($receiver.endInclusive) <= 0;
}
function StringValues() {
StringValues$Companion_getInstance();
}
function StringValues$Companion() {
StringValues$Companion_instance = this;
this.Empty = new StringValuesImpl();
}
StringValues$Companion.prototype.build_o7hlrk$ = defineInlineFunction('ktor-ktor-utils-jsLegacy.io.ktor.util.StringValues.Companion.build_o7hlrk$', wrapFunction(function() {
var StringValuesBuilder_init = _.io.ktor.util.S