UNPKG

git-rest-wrapper

Version:

A "universal" / normalized API wrapper for common git hosting services.

1,321 lines (1,317 loc) 847 kB
(function(root, factory) { if (typeof define === 'function' && define.amd) define(['exports', 'kotlin', 'kotlinx-coroutines-core'], factory); else if (typeof exports === 'object') factory(module.exports, require('kotlin'), require('kotlinx-coroutines-core')); else { if (typeof kotlin === 'undefined') { throw new Error("Error loading module 'ktor-ktor-io-jsLegacy'. Its dependency 'kotlin' was not found. Please, check whether 'kotlin' is loaded prior to 'ktor-ktor-io-jsLegacy'."); } if (false) { } if (typeof this['kotlinx-coroutines-core'] === 'undefined') { throw new Error("Error loading module 'ktor-ktor-io-jsLegacy'. Its dependency 'kotlinx-coroutines-core' was not found. Please, check whether 'kotlinx-coroutines-core' is loaded prior to 'ktor-ktor-io-jsLegacy'."); } root['ktor-ktor-io-jsLegacy'] = factory(typeof this['ktor-ktor-io-jsLegacy'] === 'undefined' ? {} : this['ktor-ktor-io-jsLegacy'], kotlin, this['kotlinx-coroutines-core']); } }(this, function(_, Kotlin, $module$kotlinx_coroutines_core) { 'use strict'; var $$importsForInline$$ = _.$$importsForInline$$ || (_.$$importsForInline$$ = {}); var Kind_INTERFACE = Kotlin.Kind.INTERFACE; var COROUTINE_SUSPENDED = Kotlin.kotlin.coroutines.intrinsics.COROUTINE_SUSPENDED; var CoroutineImpl = Kotlin.kotlin.coroutines.CoroutineImpl; var Long$Companion$MAX_VALUE = Kotlin.Long.MAX_VALUE; var L4088 = Kotlin.Long.fromInt(4088); var ensureNotNull = Kotlin.ensureNotNull; var Unit = Kotlin.kotlin.Unit; var throwCCE = Kotlin.throwCCE; var Kind_CLASS = Kotlin.Kind.CLASS; var L0 = Kotlin.Long.ZERO; var equals = Kotlin.equals; var toByte = Kotlin.toByte; var StringBuilder_init = Kotlin.kotlin.text.StringBuilder_init; var CancellationException_init = $module$kotlinx_coroutines_core.kotlinx.coroutines.CancellationException_init_pdl1vj$; var coerceAtMost = Kotlin.kotlin.ranges.coerceAtMost_2p08ub$; var Any = Object; var Math_0 = Math; var IllegalArgumentException_init = Kotlin.kotlin.IllegalArgumentException_init_pdl1vj$; var defineInlineFunction = Kotlin.defineInlineFunction; var wrapFunction = Kotlin.wrapFunction; var toShort = Kotlin.toShort; var CancellationException = $module$kotlinx_coroutines_core.kotlinx.coroutines.CancellationException; var Throwable = Error; var Job = $module$kotlinx_coroutines_core.kotlinx.coroutines.Job; var CoroutineScope = $module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineScope; var coroutines = Kotlin.kotlin.coroutines; var coroutines_0 = $module$kotlinx_coroutines_core.kotlinx.coroutines; var newCoroutineContext = $module$kotlinx_coroutines_core.kotlinx.coroutines.newCoroutineContext_7n4184$; var CoroutineScope_0 = $module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineScope_1fupul$; var CoroutineDispatcher = $module$kotlinx_coroutines_core.kotlinx.coroutines.CoroutineDispatcher; var launch = $module$kotlinx_coroutines_core.kotlinx.coroutines.launch_s496o7$; var coerceAtMost_0 = Kotlin.kotlin.ranges.coerceAtMost_dqglrj$; var IllegalStateException_init = Kotlin.kotlin.IllegalStateException_init_pdl1vj$; var UnsupportedOperationException_init = Kotlin.kotlin.UnsupportedOperationException_init_pdl1vj$; var UShort_init = Kotlin.kotlin.UShort; var UInt_init = Kotlin.kotlin.UInt; var ULong_init = Kotlin.kotlin.ULong; var L16 = Kotlin.Long.fromInt(16); var StringBuilder_init_0 = Kotlin.kotlin.text.StringBuilder_init_za3lpa$; var UnsupportedOperationException_init_0 = Kotlin.kotlin.UnsupportedOperationException_init; var Appendable = Kotlin.kotlin.text.Appendable; var coerceAtLeast = Kotlin.kotlin.ranges.coerceAtLeast_dqglrj$; var unboxChar = Kotlin.unboxChar; var Kind_OBJECT = Kotlin.Kind.OBJECT; var toChar = Kotlin.toChar; var toBoxedChar = Kotlin.toBoxedChar; var Exception_init = Kotlin.kotlin.Exception_init_pdl1vj$; var Exception = Kotlin.kotlin.Exception; var UByte_init = Kotlin.kotlin.UByte; var L4294967295 = new Kotlin.Long(-1, 0); var Annotation = Kotlin.kotlin.Annotation; var L_1 = Kotlin.Long.NEG_ONE; var until = Kotlin.kotlin.ranges.until_ebnic$; var toRawBits = Kotlin.floatToRawBits; var toRawBits_0 = Kotlin.doubleToRawBits; var contains = Kotlin.kotlin.text.contains_sgbm27$; var coerceAtLeast_0 = Kotlin.kotlin.ranges.coerceAtLeast_2p08ub$; var copyOf = Kotlin.kotlin.collections.copyOf_mrm5p$; var L2147483647 = Kotlin.Long.fromInt(2147483647); var PropertyMetadata = Kotlin.PropertyMetadata; var ReadWriteProperty = Kotlin.kotlin.properties.ReadWriteProperty; var IndexOutOfBoundsException = Kotlin.kotlin.IndexOutOfBoundsException; var CharSequence = Kotlin.kotlin.CharSequence; var isLowSurrogate = Kotlin.kotlin.text.isLowSurrogate_myv2d0$; var isHighSurrogate = Kotlin.kotlin.text.isHighSurrogate_myv2d0$; var Error_init = Kotlin.kotlin.Error_init_pdl1vj$; var NotImplementedError_init = Kotlin.kotlin.NotImplementedError; var Job_0 = $module$kotlinx_coroutines_core.kotlinx.coroutines.Job_5dx9e$; var toString = Kotlin.toString; var hashCode = Kotlin.hashCode; var L1 = Kotlin.Long.ONE; var lazy = Kotlin.kotlin.lazy_klfg04$; var Result = Kotlin.kotlin.Result; var intercepted = Kotlin.kotlin.coroutines.intrinsics.intercepted_f9mg25$; var SafeContinuation_init = Kotlin.kotlin.coroutines.SafeContinuation_init_wj8d80$; var println = Kotlin.kotlin.io.println_s8jyv4$; var replace = Kotlin.kotlin.text.replace_r2fvfm$; var Int8Array_init = Int8Array; var ReadOnlyProperty = Kotlin.kotlin.properties.ReadOnlyProperty; var Enum = Kotlin.kotlin.Enum; var throwISE = Kotlin.throwISE; var IndexOutOfBoundsException_init = Kotlin.kotlin.IndexOutOfBoundsException_init; ClosedWriteChannelException.prototype = Object.create(CancellationException.prototype); ClosedWriteChannelException.prototype.constructor = ClosedWriteChannelException; MalformedInputException.prototype = Object.create(Throwable.prototype); MalformedInputException.prototype.constructor = MalformedInputException; TooLongLineException.prototype = Object.create(MalformedInputException.prototype); TooLongLineException.prototype.constructor = TooLongLineException; InsufficientSpaceException.prototype = Object.create(Exception.prototype); InsufficientSpaceException.prototype.constructor = InsufficientSpaceException; DefaultBufferPool.prototype = Object.create(DefaultPool.prototype); DefaultBufferPool.prototype.constructor = DefaultBufferPool; EmptyBufferPoolImpl.prototype = Object.create(NoPoolImpl.prototype); EmptyBufferPoolImpl.prototype.constructor = EmptyBufferPoolImpl; BufferLimitExceededException.prototype = Object.create(Exception.prototype); BufferLimitExceededException.prototype.constructor = BufferLimitExceededException; BytePacketBuilderBase.prototype = Object.create(AbstractOutput.prototype); BytePacketBuilderBase.prototype.constructor = BytePacketBuilderBase; BytePacketBuilderPlatformBase.prototype = Object.create(BytePacketBuilderBase.prototype); BytePacketBuilderPlatformBase.prototype.constructor = BytePacketBuilderPlatformBase; BytePacketBuilder.prototype = Object.create(BytePacketBuilderPlatformBase.prototype); BytePacketBuilder.prototype.constructor = BytePacketBuilder; ByteReadPacketBase.prototype = Object.create(AbstractInput.prototype); ByteReadPacketBase.prototype.constructor = ByteReadPacketBase; ByteReadPacketPlatformBase.prototype = Object.create(ByteReadPacketBase.prototype); ByteReadPacketPlatformBase.prototype.constructor = ByteReadPacketPlatformBase; ByteReadPacket.prototype = Object.create(ByteReadPacketPlatformBase.prototype); ByteReadPacket.prototype.constructor = ByteReadPacket; ChunkBuffer$Companion$NoPool$ObjectLiteral.prototype = Object.create(NoPoolImpl.prototype); ChunkBuffer$Companion$NoPool$ObjectLiteral.prototype.constructor = ChunkBuffer$Companion$NoPool$ObjectLiteral; ChunkBuffer$Companion$NoPoolManuallyManaged$ObjectLiteral.prototype = Object.create(NoPoolImpl.prototype); ChunkBuffer$Companion$NoPoolManuallyManaged$ObjectLiteral.prototype.constructor = ChunkBuffer$Companion$NoPoolManuallyManaged$ObjectLiteral; ChunkBuffer.prototype = Object.create(Buffer.prototype); ChunkBuffer.prototype.constructor = ChunkBuffer; MalformedUTF8InputException.prototype = Object.create(Exception.prototype); MalformedUTF8InputException.prototype.constructor = MalformedUTF8InputException; ByteChannelJS.prototype = Object.create(ByteChannelSequentialBase.prototype); ByteChannelJS.prototype.constructor = ByteChannelJS; CharsetEncoderImpl.prototype = Object.create(CharsetEncoder.prototype); CharsetEncoderImpl.prototype.constructor = CharsetEncoderImpl; CharsetDecoderImpl.prototype = Object.create(CharsetDecoder.prototype); CharsetDecoderImpl.prototype.constructor = CharsetDecoderImpl; CharsetImpl.prototype = Object.create(Charset.prototype); CharsetImpl.prototype.constructor = CharsetImpl; ByteOrder.prototype = Object.create(Enum.prototype); ByteOrder.prototype.constructor = ByteOrder; ByteReadPacket$ObjectLiteral.prototype = Object.create(SingleInstancePool.prototype); ByteReadPacket$ObjectLiteral.prototype.constructor = ByteReadPacket$ObjectLiteral; IoBuffer$Companion$Pool$ObjectLiteral.prototype = Object.create(DefaultPool.prototype); IoBuffer$Companion$Pool$ObjectLiteral.prototype.constructor = IoBuffer$Companion$Pool$ObjectLiteral; IoBuffer$Companion$NoPool$ObjectLiteral.prototype = Object.create(NoPoolImpl.prototype); IoBuffer$Companion$NoPool$ObjectLiteral.prototype.constructor = IoBuffer$Companion$NoPool$ObjectLiteral; IoBuffer.prototype = Object.create(ChunkBuffer.prototype); IoBuffer.prototype.constructor = IoBuffer; IOException.prototype = Object.create(Exception.prototype); IOException.prototype.constructor = IOException; EOFException.prototype = Object.create(IOException.prototype); EOFException.prototype.constructor = EOFException; function ByteChannel() { } ByteChannel.$metadata$ = { kind: Kind_INTERFACE, simpleName: 'ByteChannel', interfaces: [ByteWriteChannel, ByteReadChannel_4]}; function ByteReadChannel(content) { return ByteReadChannel_2(content, 0, content.length); } function ByteReadChannel_0(content, offset) { return ByteReadChannel_2(content, offset, content.length); } function ByteReadChannel_1(text, charset) { if (charset === void 0) charset = Charsets_getInstance().UTF_8; return ByteReadChannel(encodeToByteArray(charset.newEncoder(), text, 0, text.length)); } function get_EmptyByteReadChannel() { return ByteReadChannel$Companion_getInstance().Empty; } require$ObjectLiteral.prototype = Object.create(RequireFailureCapture.prototype); require$ObjectLiteral.prototype.constructor = require$ObjectLiteral; function require$ObjectLiteral(closure$message) { this.closure$message = closure$message; RequireFailureCapture.call(this); } require$ObjectLiteral.prototype.doFail = function() { throw IllegalArgumentException_init(this.closure$message()); }; require$ObjectLiteral.$metadata$ = { kind: Kind_CLASS, interfaces: [RequireFailureCapture]}; function joinTo($receiver, dst, closeOnEnd, continuation) { return joinToImpl($receiver, dst, closeOnEnd, continuation); } function copyTo($receiver, dst, limit, continuation) { if (limit === void 0) limit = Long$Companion$MAX_VALUE; return copyToSequentialImpl($receiver, dst, limit, continuation); } var EXPECTED_CAPACITY; function ByteChannelSequentialBase(initial, autoFlush, pool) { if (pool === void 0) pool = ChunkBuffer$Companion_getInstance().Pool; this.autoFlush_tqevpj$_0 = autoFlush; this.state_9883ul$_0 = new ByteChannelSequentialBaseSharedState(); this.writable = new BytePacketBuilder(0, pool); this.readable = ByteReadPacket_init(initial, pool); this.slot_2l2jew$_0 = new AwaitingSlot(); this.flushMutex_pw64cr$_0 = new Any(); this.flushBuffer_1r7aq2$_0 = BytePacketBuilder_0(); } Object.defineProperty(ByteChannelSequentialBase.prototype, 'autoFlush', { get: function() { return this.autoFlush_tqevpj$_0; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'closed', { configurable: true, get: function() { return this.state_9883ul$_0.closed; }, set: function(value) { this.state_9883ul$_0.closed = value; }}); ByteChannelSequentialBase.prototype.totalPending_82umvh$_0 = function() { return this.availableForRead + this.writable.size | 0; }; Object.defineProperty(ByteChannelSequentialBase.prototype, 'flushSize_sv6emv$_0', { configurable: true, get: function() { return this.flushBuffer_1r7aq2$_0.size; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'availableForRead', { configurable: true, get: function() { return this.flushSize_sv6emv$_0 + this.readable.remaining.toInt() | 0; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'availableForWrite', { configurable: true, get: function() { var b = 4088 - (this.availableForRead + this.writable.size | 0) | 0; return Math_0.max(0, b); }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'readByteOrder', { configurable: true, get: function() { return this.state_9883ul$_0.readByteOrder; }, set: function(value) { this.state_9883ul$_0.readByteOrder = value; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'writeByteOrder', { configurable: true, get: function() { return this.state_9883ul$_0.writeByteOrder; }, set: function(value) { this.state_9883ul$_0.writeByteOrder = value; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'isClosedForRead', { configurable: true, get: function() { var tmp$ = this.closed; if (tmp$) { tmp$ = this.readable.endOfInput; } return tmp$ && this.flushSize_sv6emv$_0 === 0 && this.writable.isEmpty; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'isClosedForWrite', { configurable: true, get: function() { return this.closed; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, '_totalBytesRead_mx8dwu$_0', { configurable: true, get: function() { return this.state_9883ul$_0.totalBytesRead; }, set: function(value) { this.state_9883ul$_0.totalBytesRead = value; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'totalBytesRead', { configurable: true, get: function() { return this.state_9883ul$_0.totalBytesRead; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, '_totalBytesWritten_s86f3f$_0', { configurable: true, get: function() { return this.state_9883ul$_0.totalBytesWritten; }, set: function(value) { this.state_9883ul$_0.totalBytesWritten = value; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'totalBytesWritten', { configurable: true, get: function() { return this.state_9883ul$_0.totalBytesWritten; }}); Object.defineProperty(ByteChannelSequentialBase.prototype, 'closedCause', { configurable: true, get: function() { return this.state_9883ul$_0.closedCause; }, set: function(value) { this.state_9883ul$_0.closedCause = value; }}); function Coroutine$awaitAtLeastNBytesAvailableForWrite_kcn2v3$($this, count_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$count = count_0; } Coroutine$awaitAtLeastNBytesAvailableForWrite_kcn2v3$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$awaitAtLeastNBytesAvailableForWrite_kcn2v3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$awaitAtLeastNBytesAvailableForWrite_kcn2v3$.prototype.constructor = Coroutine$awaitAtLeastNBytesAvailableForWrite_kcn2v3$; Coroutine$awaitAtLeastNBytesAvailableForWrite_kcn2v3$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (this.$this.availableForWrite >= this.local$count || this.$this.closed) { this.state_0 = 4; continue; } this.state_0 = 3; this.result_0 = this.$this.slot_2l2jew$_0.sleep(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return; 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); }; ByteChannelSequentialBase.prototype.awaitAtLeastNBytesAvailableForWrite_kcn2v3$ = function(count_0, continuation_0, suspended) { var instance = new Coroutine$awaitAtLeastNBytesAvailableForWrite_kcn2v3$(this, count_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$awaitAtLeastNBytesAvailableForRead_kcn2v3$($this, count_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$count = count_0; } Coroutine$awaitAtLeastNBytesAvailableForRead_kcn2v3$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$awaitAtLeastNBytesAvailableForRead_kcn2v3$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$awaitAtLeastNBytesAvailableForRead_kcn2v3$.prototype.constructor = Coroutine$awaitAtLeastNBytesAvailableForRead_kcn2v3$; Coroutine$awaitAtLeastNBytesAvailableForRead_kcn2v3$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (this.$this.availableForRead >= this.local$count || this.$this.closed) { this.state_0 = 4; continue; } this.state_0 = 3; this.result_0 = this.$this.slot_2l2jew$_0.sleep(this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: this.state_0 = 2; continue; case 4: return; 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); }; ByteChannelSequentialBase.prototype.awaitAtLeastNBytesAvailableForRead_kcn2v3$ = function(count_0, continuation_0, suspended) { var instance = new Coroutine$awaitAtLeastNBytesAvailableForRead_kcn2v3$(this, count_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ByteChannelSequentialBase.prototype.flush = function() { if (this.writable.isNotEmpty) { this.flushWrittenBytes_2bgxqi$_0(); this.slot_2l2jew$_0.resume(); } }; ByteChannelSequentialBase.prototype.flushWrittenBytes_2bgxqi$_0 = function() { var buffer = ensureNotNull(this.writable.stealAll_8be2vx$()); this.flushBuffer_1r7aq2$_0.writeChunkBuffer_pvnryh$(buffer); }; ByteChannelSequentialBase.prototype.prepareFlushedBytes_ibricf$_0 = function() { unsafeAppend(this.readable, this.flushBuffer_1r7aq2$_0); }; ByteChannelSequentialBase.prototype.ensureNotClosed_ozgwi5$_0 = function() { var tmp$; if (this.closed) { throw (tmp$ = this.closedCause) != null ? tmp$ : new ClosedWriteChannelException('Channel is already closed'); } }; ByteChannelSequentialBase.prototype.ensureNotFailed_7bddlw$_0 = function() { var tmp$; if ((tmp$ = this.closedCause) != null) { throw tmp$; } }; ByteChannelSequentialBase.prototype.ensureNotFailed_2bmfsh$_0 = function(closeable) { var tmp$; if ((tmp$ = this.closedCause) != null) { closeable.release(); throw tmp$; } }; function Coroutine$writeByte_s8j3t7$($this, b_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$b = b_0; } Coroutine$writeByte_s8j3t7$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeByte_s8j3t7$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeByte_s8j3t7$.prototype.constructor = Coroutine$writeByte_s8j3t7$; Coroutine$writeByte_s8j3t7$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: this.$this.writable.writeByte_s8j3t7$(this.local$b); this.$this.afterWrite_za3lpa$(1); return; 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); }; ByteChannelSequentialBase.prototype.writeByte_s8j3t7$ = function(b_0, continuation_0, suspended) { var instance = new Coroutine$writeByte_s8j3t7$(this, b_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ByteChannelSequentialBase.prototype.reverseWrite_hkpayy$_0 = function(value, reversed) { var tmp$; if (this.writeByteOrder === ByteOrder$BIG_ENDIAN_getInstance()) { tmp$ = value(); } else { tmp$ = reversed(); } return tmp$; }; function Coroutine$writeShort_mq22fl$($this, s_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$s = s_0; } Coroutine$writeShort_mq22fl$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeShort_mq22fl$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeShort_mq22fl$.prototype.constructor = Coroutine$writeShort_mq22fl$; Coroutine$writeShort_mq22fl$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(2, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var tmp$ = this.$this.writable; var tmp$_0; if (this.$this.writeByteOrder === ByteOrder$BIG_ENDIAN_getInstance()) { tmp$_0 = this.local$s; } else { tmp$_0 = reverseByteOrder_2(this.local$s); } writeShort_5(tmp$, tmp$_0); this.$this.afterWrite_za3lpa$(2); return; 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); }; ByteChannelSequentialBase.prototype.writeShort_mq22fl$ = function(s_0, continuation_0, suspended) { var instance = new Coroutine$writeShort_mq22fl$(this, s_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeInt_za3lpa$($this, i_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$i = i_0; } Coroutine$writeInt_za3lpa$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeInt_za3lpa$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeInt_za3lpa$.prototype.constructor = Coroutine$writeInt_za3lpa$; Coroutine$writeInt_za3lpa$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(4, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var tmp$ = this.$this.writable; var tmp$_0; if (this.$this.writeByteOrder === ByteOrder$BIG_ENDIAN_getInstance()) { tmp$_0 = this.local$i; } else { tmp$_0 = reverseByteOrder_3(this.local$i); } writeInt_5(tmp$, tmp$_0); this.$this.afterWrite_za3lpa$(4); return; 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); }; ByteChannelSequentialBase.prototype.writeInt_za3lpa$ = function(i_0, continuation_0, suspended) { var instance = new Coroutine$writeInt_za3lpa$(this, i_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeLong_s8cxhz$($this, l_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$l = l_0; } Coroutine$writeLong_s8cxhz$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeLong_s8cxhz$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeLong_s8cxhz$.prototype.constructor = Coroutine$writeLong_s8cxhz$; Coroutine$writeLong_s8cxhz$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(8, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var tmp$ = this.$this.writable; var tmp$_0; if (this.$this.writeByteOrder === ByteOrder$BIG_ENDIAN_getInstance()) { tmp$_0 = this.local$l; } else { tmp$_0 = reverseByteOrder_4(this.local$l); } writeLong_3(tmp$, tmp$_0); this.$this.afterWrite_za3lpa$(8); return; 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); }; ByteChannelSequentialBase.prototype.writeLong_s8cxhz$ = function(l_0, continuation_0, suspended) { var instance = new Coroutine$writeLong_s8cxhz$(this, l_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeFloat_mx4ult$($this, f_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$f = f_0; } Coroutine$writeFloat_mx4ult$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeFloat_mx4ult$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeFloat_mx4ult$.prototype.constructor = Coroutine$writeFloat_mx4ult$; Coroutine$writeFloat_mx4ult$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(4, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var tmp$ = this.$this.writable; var tmp$_0; if (this.$this.writeByteOrder === ByteOrder$BIG_ENDIAN_getInstance()) { tmp$_0 = this.local$f; } else { tmp$_0 = reverseByteOrder_5(this.local$f); } writeFloat_3(tmp$, tmp$_0); this.$this.afterWrite_za3lpa$(4); return; 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); }; ByteChannelSequentialBase.prototype.writeFloat_mx4ult$ = function(f_0, continuation_0, suspended) { var instance = new Coroutine$writeFloat_mx4ult$(this, f_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeDouble_14dthe$($this, d_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$d = d_0; } Coroutine$writeDouble_14dthe$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeDouble_14dthe$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeDouble_14dthe$.prototype.constructor = Coroutine$writeDouble_14dthe$; Coroutine$writeDouble_14dthe$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(8, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var tmp$ = this.$this.writable; var tmp$_0; if (this.$this.writeByteOrder === ByteOrder$BIG_ENDIAN_getInstance()) { tmp$_0 = this.local$d; } else { tmp$_0 = reverseByteOrder_6(this.local$d); } writeDouble_3(tmp$, tmp$_0); this.$this.afterWrite_za3lpa$(8); return; 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); }; ByteChannelSequentialBase.prototype.writeDouble_14dthe$ = function(d_0, continuation_0, suspended) { var instance = new Coroutine$writeDouble_14dthe$(this, d_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writePacket_3uq2w4$($this, packet_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$packet = packet_0; } Coroutine$writePacket_3uq2w4$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writePacket_3uq2w4$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writePacket_3uq2w4$.prototype.constructor = Coroutine$writePacket_3uq2w4$; Coroutine$writePacket_3uq2w4$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var size = this.local$packet.remaining.toInt(); this.$this.writable.writePacket_3uq2w4$(this.local$packet); this.$this.afterWrite_za3lpa$(size); return; 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); }; ByteChannelSequentialBase.prototype.writePacket_3uq2w4$ = function(packet_0, continuation_0, suspended) { var instance = new Coroutine$writePacket_3uq2w4$(this, packet_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeFully_99qa0s$($this, src_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$src = src_0; } Coroutine$writeFully_99qa0s$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeFully_99qa0s$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeFully_99qa0s$.prototype.constructor = Coroutine$writeFully_99qa0s$; Coroutine$writeFully_99qa0s$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: var tmp$; this.state_0 = 2; this.result_0 = this.$this.writeFully_b4g5fm$(Kotlin.isType(tmp$ = this.local$src, Buffer) ? tmp$ : throwCCE(), this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; 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); }; ByteChannelSequentialBase.prototype.writeFully_99qa0s$ = function(src_0, continuation_0, suspended) { var instance = new Coroutine$writeFully_99qa0s$(this, src_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeFully_b4g5fm$($this, src_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$src = src_0; } Coroutine$writeFully_b4g5fm$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeFully_b4g5fm$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeFully_b4g5fm$.prototype.constructor = Coroutine$writeFully_b4g5fm$; Coroutine$writeFully_b4g5fm$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.state_0 = 2; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: var count = this.local$src.writePosition - this.local$src.readPosition | 0; writeFully_20(this.$this.writable, this.local$src); this.$this.afterWrite_za3lpa$(count); return; 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); }; ByteChannelSequentialBase.prototype.writeFully_b4g5fm$ = function(src_0, continuation_0, suspended) { var instance = new Coroutine$writeFully_b4g5fm$(this, src_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeFully_mj6st8$($this, src_0, offset_0, length_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$currentIndex = void 0; this.local$endIndex = void 0; this.local$src = src_0; this.local$offset = offset_0; this.local$length = length_0; } Coroutine$writeFully_mj6st8$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeFully_mj6st8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeFully_mj6st8$.prototype.constructor = Coroutine$writeFully_mj6st8$; Coroutine$writeFully_mj6st8$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.local$currentIndex = this.local$offset; this.local$endIndex = this.local$offset + this.local$length | 0; this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (this.local$currentIndex >= this.local$endIndex) { this.state_0 = 4; continue; } this.state_0 = 3; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: var a = this.$this.availableForWrite; var b = this.local$endIndex - this.local$currentIndex | 0; var bytesCount = Math_0.min(a, b); writeFully_13(this.$this.writable, this.local$src, this.local$currentIndex, bytesCount); this.local$currentIndex = this.local$currentIndex + bytesCount | 0; this.$this.afterWrite_za3lpa$(bytesCount); this.state_0 = 2; continue; case 4: return; 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); }; ByteChannelSequentialBase.prototype.writeFully_mj6st8$ = function(src_0, offset_0, length_0, continuation_0, suspended) { var instance = new Coroutine$writeFully_mj6st8$(this, src_0, offset_0, length_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeFully_9etqdk$($this, memory_0, startIndex_0, endIndex_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$currentIndex = void 0; this.local$memory = memory_0; this.local$startIndex = startIndex_0; this.local$endIndex = endIndex_0; } Coroutine$writeFully_9etqdk$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeFully_9etqdk$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeFully_9etqdk$.prototype.constructor = Coroutine$writeFully_9etqdk$; Coroutine$writeFully_9etqdk$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.local$currentIndex = this.local$startIndex; this.state_0 = 2; continue; case 1: throw this.exception_0; case 2: if (this.local$currentIndex >= this.local$endIndex) { this.state_0 = 4; continue; } this.state_0 = 3; this.result_0 = this.$this.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(1, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 3: var a = this.$this.availableForWrite; var b = this.local$endIndex - this.local$currentIndex | 0; var bytesCount = Math_0.min(a, b); writeFully_21(this.$this.writable, this.local$memory, this.local$currentIndex, bytesCount); this.local$currentIndex = this.local$currentIndex + bytesCount | 0; this.$this.afterWrite_za3lpa$(bytesCount); this.state_0 = 2; continue; case 4: return; 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); }; ByteChannelSequentialBase.prototype.writeFully_9etqdk$ = function(memory_0, startIndex_0, endIndex_0, continuation_0, suspended) { var instance = new Coroutine$writeFully_9etqdk$(this, memory_0, startIndex_0, endIndex_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeAvailable_99qa0s$($this, src_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$tmp$ = void 0; this.local$srcRemaining = void 0; this.local$src = src_0; } Coroutine$writeAvailable_99qa0s$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeAvailable_99qa0s$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeAvailable_99qa0s$.prototype.constructor = Coroutine$writeAvailable_99qa0s$; Coroutine$writeAvailable_99qa0s$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: this.local$srcRemaining = this.local$src.writePosition - this.local$src.readPosition | 0; if (this.local$srcRemaining === 0) { return 0; } else { this.state_0 = 2; continue; } case 1: throw this.exception_0; case 2: var b = this.$this.availableForWrite; var size = Math_0.min(this.local$srcRemaining, b); if (size === 0) { this.state_0 = 3; this.result_0 = this.$this.writeAvailableSuspend_5fukw0$_0(this.local$src, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { writeFully_20(this.$this.writable, this.local$src, size); this.$this.afterWrite_za3lpa$(size); this.local$tmp$ = size; this.state_0 = 4; continue; } case 3: this.local$tmp$ = this.result_0; this.state_0 = 4; continue; case 4: return this.local$tmp$; 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); }; ByteChannelSequentialBase.prototype.writeAvailable_99qa0s$ = function(src_0, continuation_0, suspended) { var instance = new Coroutine$writeAvailable_99qa0s$(this, src_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeAvailable_mj6st8$($this, src_0, offset_0, length_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$tmp$ = void 0; this.local$src = src_0; this.local$offset = offset_0; this.local$length = length_0; } Coroutine$writeAvailable_mj6st8$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeAvailable_mj6st8$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeAvailable_mj6st8$.prototype.constructor = Coroutine$writeAvailable_mj6st8$; Coroutine$writeAvailable_mj6st8$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: if (this.local$length === 0) { return 0; } else { this.state_0 = 2; continue; } case 1: throw this.exception_0; case 2: var b = this.$this.availableForWrite; var size = Math_0.min(this.local$length, b); if (size === 0) { this.state_0 = 3; this.result_0 = this.$this.writeAvailableSuspend_1zn44g$_0(this.local$src, this.local$offset, this.local$length, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { writeFully_13(this.$this.writable, this.local$src, this.local$offset, size); this.$this.afterWrite_za3lpa$(size); this.local$tmp$ = size; this.state_0 = 4; continue; } case 3: this.local$tmp$ = this.result_0; this.state_0 = 4; continue; case 4: return this.local$tmp$; 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); }; ByteChannelSequentialBase.prototype.writeAvailable_mj6st8$ = function(src_0, offset_0, length_0, continuation_0, suspended) { var instance = new Coroutine$writeAvailable_mj6st8$(this, src_0, offset_0, length_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function Coroutine$writeSuspendSession_8dv01$($this, visitor_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$visitor = visitor_0; } Coroutine$writeSuspendSession_8dv01$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$writeSuspendSession_8dv01$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$writeSuspendSession_8dv01$.prototype.constructor = Coroutine$writeSuspendSession_8dv01$; Coroutine$writeSuspendSession_8dv01$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: var session = this.$this.beginWriteSession(); this.state_0 = 2; this.result_0 = this.local$visitor(session, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; case 1: throw this.exception_0; case 2: return; 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); }; ByteChannelSequentialBase.prototype.writeSuspendSession_8dv01$ = function(visitor_0, continuation_0, suspended) { var instance = new Coroutine$writeSuspendSession_8dv01$(this, visitor_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; function ByteChannelSequentialBase$beginWriteSession$ObjectLiteral(this$ByteChannelSequentialBase) { this.this$ByteChannelSequentialBase = this$ByteChannelSequentialBase; } ByteChannelSequentialBase$beginWriteSession$ObjectLiteral.prototype.request_za3lpa$ = function(min) { var tmp$; if (this.this$ByteChannelSequentialBase.availableForWrite === 0) return null; return Kotlin.isType(tmp$ = this.this$ByteChannelSequentialBase.writable.prepareWriteHead_za3lpa$(min), IoBuffer) ? tmp$ : throwCCE(); }; ByteChannelSequentialBase$beginWriteSession$ObjectLiteral.prototype.written_za3lpa$ = function(n) { this.this$ByteChannelSequentialBase.writable.afterHeadWrite(); this.this$ByteChannelSequentialBase.afterWrite_za3lpa$(n); }; ByteChannelSequentialBase$beginWriteSession$ObjectLiteral.prototype.flush = function() { this.this$ByteChannelSequentialBase.flush(); }; function Coroutine$tryAwait_za3lpa$($this, n_0, continuation_0) { CoroutineImpl.call(this, continuation_0); this.exceptionState_0 = 1; this.$this = $this; this.local$n = n_0; } Coroutine$tryAwait_za3lpa$.$metadata$ = { kind: Kotlin.Kind.CLASS, simpleName: null, interfaces: [CoroutineImpl]}; Coroutine$tryAwait_za3lpa$.prototype = Object.create(CoroutineImpl.prototype); Coroutine$tryAwait_za3lpa$.prototype.constructor = Coroutine$tryAwait_za3lpa$; Coroutine$tryAwait_za3lpa$.prototype.doResume = function() { do try { switch (this.state_0) { case 0: if (this.$this.this$ByteChannelSequentialBase.availableForWrite < this.local$n) { this.state_0 = 2; this.result_0 = this.$this.this$ByteChannelSequentialBase.awaitAtLeastNBytesAvailableForWrite_kcn2v3$(this.local$n, this); if (this.result_0 === COROUTINE_SUSPENDED) return COROUTINE_SUSPENDED; continue; } else { this.state_0 = 3; continue; } case 1: throw this.exception_0; case 2: this.state_0 = 3; continue; case 3: return; 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); }; ByteChannelSequentialBase$beginWriteSession$ObjectLiteral.prototype.tryAwait_za3lpa$ = function(n_0, continuation_0, suspended) { var instance = new Coroutine$tryAwait_za3lpa$(this, n_0, continuation_0); if (suspended) return instance; else return instance.doResume(null); }; ByteChannelSequentialBase$beginWriteSession$ObjectLiteral.$meta