(function (_, kotlin_kotlin, kotlin_io_ktor_ktor_utils, kotlin_io_ktor_ktor_client_core, kotlin_io_ktor_ktor_http, kotlin_io_ktor_ktor_serialization, kotlin_io_ktor_ktor_io) {
  'use strict';
  //region block: imports
  var protoOf = kotlin_kotlin.$_$.uc;
  var classMeta = kotlin_kotlin.$_$.jb;
  var setMetadataFor = kotlin_kotlin.$_$.vc;
  var VOID = kotlin_kotlin.$_$.f;
  var CoroutineImpl = kotlin_kotlin.$_$.ta;
  var Unit_instance = kotlin_kotlin.$_$.m5;
  var THROW_CCE = kotlin_kotlin.$_$.fi;
  var PipelineContext = kotlin_io_ktor_ktor_utils.$_$.g;
  var get_COROUTINE_SUSPENDED = kotlin_kotlin.$_$.fa;
  var HttpResponseContainer = kotlin_io_ktor_ktor_client_core.$_$.p;
  var contentType = kotlin_io_ktor_ktor_http.$_$.h1;
  var suitableCharset = kotlin_io_ktor_ktor_serialization.$_$.f;
  var plus = kotlin_kotlin.$_$.t8;
  var toMutableSet = kotlin_kotlin.$_$.x9;
  var ArrayList_init_$Create$ = kotlin_kotlin.$_$.m;
  var Application_getInstance = kotlin_io_ktor_ktor_http.$_$.b;
  var register$default = kotlin_io_ktor_ktor_serialization.$_$.b;
  var Configuration = kotlin_io_ktor_ktor_serialization.$_$.c;
  var AttributeKey = kotlin_io_ktor_ktor_utils.$_$.l;
  var Phases_getInstance = kotlin_io_ktor_ktor_client_core.$_$.d;
  var Phases_getInstance_0 = kotlin_io_ktor_ktor_client_core.$_$.e;
  var HttpClientPlugin = kotlin_io_ktor_ktor_client_core.$_$.g;
  var objectMeta = kotlin_kotlin.$_$.tc;
  var toString = kotlin_kotlin.$_$.zc;
  var HttpHeaders_getInstance = kotlin_io_ktor_ktor_http.$_$.g;
  var accept = kotlin_io_ktor_ktor_client_core.$_$.l;
  var Collection = kotlin_kotlin.$_$.p5;
  var isInterface = kotlin_kotlin.$_$.ec;
  var OutgoingContent = kotlin_io_ktor_ktor_http.$_$.q;
  var getKClassFromExpression = kotlin_kotlin.$_$.d;
  var contentType_0 = kotlin_io_ktor_ktor_http.$_$.f1;
  var EmptyContent_getInstance = kotlin_io_ktor_ktor_client_core.$_$.f;
  var Unit = kotlin_kotlin.$_$.ri;
  var charset = kotlin_io_ktor_ktor_http.$_$.d1;
  var Charsets_getInstance = kotlin_io_ktor_ktor_io.$_$.i;
  var ensureNotNull = kotlin_kotlin.$_$.yi;
  var NullBody_instance = kotlin_io_ktor_ktor_http.$_$.a;
  var equals = kotlin_kotlin.$_$.mb;
  var joinToString = kotlin_kotlin.$_$.z7;
  var ByteReadChannel = kotlin_io_ktor_ktor_io.$_$.n1;
  var collectionSizeOrDefault = kotlin_kotlin.$_$.n6;
  var ArrayList_init_$Create$_0 = kotlin_kotlin.$_$.l;
  var deserialize = kotlin_io_ktor_ktor_serialization.$_$.a;
  var Exception = kotlin_kotlin.$_$.uh;
  var Exception_init_$Init$ = kotlin_kotlin.$_$.m1;
  var captureStack = kotlin_kotlin.$_$.db;
  var KtorSimpleLogger = kotlin_io_ktor_ktor_utils.$_$.f;
  var PrimitiveClasses_getInstance = kotlin_kotlin.$_$.c5;
  var HttpStatusCode = kotlin_io_ktor_ktor_http.$_$.x;
  var getKClass = kotlin_kotlin.$_$.e;
  var setOf = kotlin_kotlin.$_$.i9;
  var endsWith = kotlin_kotlin.$_$.ve;
  var startsWith = kotlin_kotlin.$_$.yf;
  var LinkedHashSet_init_$Create$ = kotlin_kotlin.$_$.x;
  //endregion
  //region block: pre-declaration
  setMetadataFor(ConverterRegistration, 'ConverterRegistration', classMeta);
  setMetadataFor(ContentNegotiation$Config$defaultMatcher$1, VOID, classMeta);
  setMetadataFor(ContentNegotiation$Plugin$install$slambda, 'ContentNegotiation$Plugin$install$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(ContentNegotiation$Plugin$install$slambda_1, 'ContentNegotiation$Plugin$install$slambda', classMeta, CoroutineImpl, VOID, VOID, VOID, VOID, [2]);
  setMetadataFor(Config, 'Config', classMeta, VOID, [Configuration], Config);
  setMetadataFor(Plugin, 'Plugin', objectMeta, VOID, [HttpClientPlugin]);
  setMetadataFor($convertRequestCOROUTINE$0, '$convertRequestCOROUTINE$0', classMeta, CoroutineImpl);
  setMetadataFor($convertResponseCOROUTINE$1, '$convertResponseCOROUTINE$1', classMeta, CoroutineImpl);
  setMetadataFor(ContentNegotiation, 'ContentNegotiation', classMeta, VOID, VOID, VOID, VOID, VOID, [2, 5]);
  setMetadataFor(ContentConverterException, 'ContentConverterException', classMeta, Exception);
  setMetadataFor(JsonContentTypeMatcher, 'JsonContentTypeMatcher', objectMeta);
  //endregion
  function get_LOGGER() {
    _init_properties_ContentNegotiation_kt__o183go();
    return LOGGER;
  }
  var LOGGER;
  function get_DefaultCommonIgnoredTypes() {
    _init_properties_ContentNegotiation_kt__o183go();
    return DefaultCommonIgnoredTypes;
  }
  var DefaultCommonIgnoredTypes;
  function ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher) {
    this.j56_1 = converter;
    this.k56_1 = contentTypeToSend;
    this.l56_1 = contentTypeMatcher;
  }
  function defaultMatcher($this, pattern) {
    return new ContentNegotiation$Config$defaultMatcher$1(pattern);
  }
  function ContentNegotiation$Config$defaultMatcher$1($pattern) {
    this.m56_1 = $pattern;
  }
  protoOf(ContentNegotiation$Config$defaultMatcher$1).n56 = function (contentType) {
    return contentType.e2w(this.m56_1);
  };
  function ContentNegotiation$Plugin$install$slambda($plugin, resultContinuation) {
    this.w56_1 = $plugin;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentNegotiation$Plugin$install$slambda).g3b = function ($this$intercept, it, $completion) {
    var tmp = this.h3b($this$intercept, it, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentNegotiation$Plugin$install$slambda).um = function (p1, p2, $completion) {
    var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
    return this.g3b(tmp, !(p2 == null) ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ContentNegotiation$Plugin$install$slambda).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.hd_1 = 1;
            suspendResult = this.w56_1.d57(this.x56_1.q2s_1, this.x56_1.t2r(), this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.z56_1 = suspendResult;
            var tmp_0 = this;
            var tmp_1;
            if (this.z56_1 == null) {
              return Unit_instance;
            } else {
              tmp_1 = this.z56_1;
            }

            tmp_0.a57_1 = tmp_1;
            this.hd_1 = 2;
            suspendResult = this.x56_1.u2r(this.a57_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentNegotiation$Plugin$install$slambda).h3b = function ($this$intercept, it, completion) {
    var i = new ContentNegotiation$Plugin$install$slambda(this.w56_1, completion);
    i.x56_1 = $this$intercept;
    i.y56_1 = it;
    return i;
  };
  function ContentNegotiation$Plugin$install$slambda_0($plugin, resultContinuation) {
    var i = new ContentNegotiation$Plugin$install$slambda($plugin, resultContinuation);
    var l = function ($this$intercept, it, $completion) {
      return i.g3b($this$intercept, it, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function ContentNegotiation$Plugin$install$slambda_1($plugin, resultContinuation) {
    this.m57_1 = $plugin;
    CoroutineImpl.call(this, resultContinuation);
  }
  protoOf(ContentNegotiation$Plugin$install$slambda_1).a3c = function ($this$intercept, _name_for_destructuring_parameter_0__wldtmu, $completion) {
    var tmp = this.b3c($this$intercept, _name_for_destructuring_parameter_0__wldtmu, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentNegotiation$Plugin$install$slambda_1).um = function (p1, p2, $completion) {
    var tmp = p1 instanceof PipelineContext ? p1 : THROW_CCE();
    return this.a3c(tmp, p2 instanceof HttpResponseContainer ? p2 : THROW_CCE(), $completion);
  };
  protoOf(ContentNegotiation$Plugin$install$slambda_1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 3;
            this.p57_1 = this.o57_1.y6();
            this.q57_1 = this.o57_1.z6();
            var tmp_0 = this;
            var tmp0_elvis_lhs = contentType(this.n57_1.q2s_1.n3b());
            var tmp_1;
            if (tmp0_elvis_lhs == null) {
              this.n57_1;
              get_LOGGER().l2t('Response doesn\'t have "Content-Type" header, skipping ContentNegotiation plugin');
              return Unit_instance;
            } else {
              tmp_1 = tmp0_elvis_lhs;
            }

            tmp_0.r57_1 = tmp_1;
            this.s57_1 = suitableCharset(this.n57_1.q2s_1.w3e().l30());
            this.hd_1 = 1;
            suspendResult = this.m57_1.w57(this.n57_1.q2s_1.w3e().z3e(), this.p57_1, this.q57_1, this.r57_1, this.s57_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            this.t57_1 = suspendResult;
            var tmp_2 = this;
            var tmp_3;
            if (this.t57_1 == null) {
              return Unit_instance;
            } else {
              tmp_3 = this.t57_1;
            }

            tmp_2.u57_1 = tmp_3;
            this.v57_1 = new HttpResponseContainer(this.p57_1, this.u57_1);
            this.hd_1 = 2;
            suspendResult = this.n57_1.u2r(this.v57_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 2:
            return Unit_instance;
          case 3:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 3) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  protoOf(ContentNegotiation$Plugin$install$slambda_1).b3c = function ($this$intercept, _name_for_destructuring_parameter_0__wldtmu, completion) {
    var i = new ContentNegotiation$Plugin$install$slambda_1(this.m57_1, completion);
    i.n57_1 = $this$intercept;
    i.o57_1 = _name_for_destructuring_parameter_0__wldtmu;
    return i;
  };
  function ContentNegotiation$Plugin$install$slambda_2($plugin, resultContinuation) {
    var i = new ContentNegotiation$Plugin$install$slambda_1($plugin, resultContinuation);
    var l = function ($this$intercept, _name_for_destructuring_parameter_0__wldtmu, $completion) {
      return i.a3c($this$intercept, _name_for_destructuring_parameter_0__wldtmu, $completion);
    };
    l.$arity = 2;
    return l;
  }
  function Config() {
    this.x57_1 = toMutableSet(plus(get_DefaultIgnoredTypes(), get_DefaultCommonIgnoredTypes()));
    var tmp = this;
    // Inline function 'kotlin.collections.mutableListOf' call
    tmp.y57_1 = ArrayList_init_$Create$();
  }
  protoOf(Config).t37 = function (contentType, converter, configuration) {
    var matcher = contentType.equals(Application_getInstance().p2u_1) ? JsonContentTypeMatcher_instance : defaultMatcher(this, contentType);
    this.z57(contentType, converter, matcher, configuration);
  };
  protoOf(Config).z57 = function (contentTypeToSend, converter, contentTypeMatcher, configuration) {
    // Inline function 'kotlin.apply' call
    // Inline function 'kotlin.contracts.contract' call
    configuration(converter);
    var registration = new ConverterRegistration(converter, contentTypeToSend, contentTypeMatcher);
    this.y57_1.i1(registration);
  };
  function Plugin() {
    Plugin_instance = this;
    this.a58_1 = new AttributeKey('ContentNegotiation');
  }
  protoOf(Plugin).s2 = function () {
    return this.a58_1;
  };
  protoOf(Plugin).b58 = function (block) {
    // Inline function 'kotlin.apply' call
    var this_0 = new Config();
    // Inline function 'kotlin.contracts.contract' call
    block(this_0);
    var config = this_0;
    return new ContentNegotiation(config.y57_1, config.x57_1);
  };
  protoOf(Plugin).r3d = function (block) {
    return this.b58(block);
  };
  protoOf(Plugin).c58 = function (plugin, scope) {
    var tmp = Phases_getInstance().m3j_1;
    scope.m3a_1.u2s(tmp, ContentNegotiation$Plugin$install$slambda_0(plugin, null));
    var tmp_0 = Phases_getInstance_0().m3d_1;
    scope.n3a_1.u2s(tmp_0, ContentNegotiation$Plugin$install$slambda_2(plugin, null));
  };
  protoOf(Plugin).s3d = function (plugin, scope) {
    return this.c58(plugin instanceof ContentNegotiation ? plugin : THROW_CCE(), scope);
  };
  var Plugin_instance;
  function Plugin_getInstance() {
    if (Plugin_instance == null)
      new Plugin();
    return Plugin_instance;
  }
  function ContentNegotiation$convertRequest$lambda(it) {
    return toString(it.j56_1);
  }
  function $convertRequestCOROUTINE$0(_this__u8e3s4, request, body, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.l58_1 = _this__u8e3s4;
    this.m58_1 = request;
    this.n58_1 = body;
  }
  protoOf($convertRequestCOROUTINE$0).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 7;
            var tmp0_iterator = this.l58_1.b57_1.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              l$ret$1: do {
                get_LOGGER().l2t('Adding Accept=' + element.k56_1.a2w_1 + ' header for ' + this.m58_1.m3c_1);
                if (this.m58_1.o3c_1.z2p(HttpHeaders_getInstance().i2w_1, element.k56_1.toString())) {
                  break l$ret$1;
                }
                accept(this.m58_1, element.k56_1);
              }
               while (false);
            }

            var tmp_0;
            var tmp_1 = this.n58_1;
            if (tmp_1 instanceof OutgoingContent) {
              tmp_0 = true;
            } else {
              var tmp$ret$2;
              l$ret$3: do {
                var this_0 = this.l58_1.c57_1;
                var tmp_2;
                if (isInterface(this_0, Collection)) {
                  tmp_2 = this_0.c1();
                } else {
                  tmp_2 = false;
                }
                if (tmp_2) {
                  tmp$ret$2 = false;
                  break l$ret$3;
                }
                var tmp0_iterator_0 = this_0.w();
                while (tmp0_iterator_0.f()) {
                  var element_0 = tmp0_iterator_0.e();
                  if (element_0.g7(this.n58_1)) {
                    tmp$ret$2 = true;
                    break l$ret$3;
                  }
                }
                tmp$ret$2 = false;
              }
               while (false);
              tmp_0 = tmp$ret$2;
            }

            if (tmp_0) {
              get_LOGGER().l2t('Body type ' + getKClassFromExpression(this.n58_1) + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.m58_1.m3c_1 + '.'));
              return null;
            }

            var tmp_3 = this;
            var tmp0_elvis_lhs = contentType_0(this.m58_1);
            var tmp_4;
            if (tmp0_elvis_lhs == null) {
              this.l58_1;
              get_LOGGER().l2t("Request doesn't have Content-Type header. Skipping ContentNegotiation for " + this.m58_1.m3c_1 + '.');
              return null;
            } else {
              tmp_4 = tmp0_elvis_lhs;
            }

            tmp_3.o58_1 = tmp_4;
            var tmp_5 = this.n58_1;
            if (tmp_5 instanceof Unit) {
              get_LOGGER().l2t('Sending empty body for ' + this.m58_1.m3c_1);
              this.m58_1.o3c_1.e2q(HttpHeaders_getInstance().a2x_1);
              return EmptyContent_getInstance();
            }

            var tmp_6 = this;
            var this_1 = this.l58_1.b57_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator_1 = this_1.w();
            while (tmp0_iterator_1.f()) {
              var element_1 = tmp0_iterator_1.e();
              if (element_1.l56_1.n56(this.o58_1)) {
                destination.i1(element_1);
              }
            }

            var tmp_7;
            if (!destination.c1()) {
              tmp_7 = destination;
            } else {
              tmp_7 = null;
            }

            var tmp1_elvis_lhs = tmp_7;
            var tmp_8;
            if (tmp1_elvis_lhs == null) {
              this.l58_1;
              get_LOGGER().l2t('None of the registered converters match request Content-Type=' + this.o58_1 + '. ' + ('Skipping ContentNegotiation for ' + this.m58_1.m3c_1 + '.'));
              return null;
            } else {
              tmp_8 = tmp1_elvis_lhs;
            }

            tmp_6.p58_1 = tmp_8;
            if (this.m58_1.r3y() == null) {
              get_LOGGER().l2t('Request has unknown body type. Skipping ContentNegotiation for ' + this.m58_1.m3c_1 + '.');
              return null;
            }

            this.m58_1.o3c_1.e2q(HttpHeaders_getInstance().a2x_1);
            this.hd_1 = 1;
            continue $sm;
          case 1:
            var tmp_9 = this;
            tmp_9.r58_1 = this.p58_1;
            this.s58_1 = this.r58_1.w();
            this.hd_1 = 2;
            continue $sm;
          case 2:
            if (!this.s58_1.f()) {
              this.hd_1 = 5;
              continue $sm;
            }

            this.t58_1 = this.s58_1.e();
            var tmp_10 = this;
            tmp_10.u58_1 = this.t58_1;
            this.hd_1 = 3;
            var tmp0_elvis_lhs_0 = charset(this.o58_1);
            var tmp_11 = tmp0_elvis_lhs_0 == null ? Charsets_getInstance().u2j_1 : tmp0_elvis_lhs_0;
            var tmp_12 = ensureNotNull(this.m58_1.r3y());
            var this_2 = this.n58_1;
            var tmp_13;
            if (!equals(this_2, NullBody_instance)) {
              tmp_13 = this_2;
            } else {
              tmp_13 = null;
            }

            suspendResult = this.u58_1.j56_1.w37(this.o58_1, tmp_11, tmp_12, tmp_13, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 3:
            var result = suspendResult;
            if (!(result == null)) {
              get_LOGGER().l2t('Converted request body using ' + this.u58_1.j56_1 + ' for ' + this.m58_1.m3c_1);
            }

            var result_0 = result;
            if (!(result_0 == null)) {
              this.q58_1 = result_0;
              this.hd_1 = 6;
              continue $sm;
            } else {
              this.hd_1 = 4;
              continue $sm;
            }

          case 4:
            this.hd_1 = 2;
            continue $sm;
          case 5:
            this.q58_1 = null;
            if (false) {
              this.hd_1 = 1;
              continue $sm;
            }

            this.hd_1 = 6;
            continue $sm;
          case 6:
            var tmp2_elvis_lhs = this.q58_1;
            var tmp_14;
            if (tmp2_elvis_lhs == null) {
              var tmp_15 = "Can't convert " + toString(this.n58_1) + ' with contentType ' + this.o58_1 + ' using converters ';
              throw new ContentConverterException(tmp_15 + joinToString(this.p58_1, VOID, VOID, VOID, VOID, VOID, ContentNegotiation$convertRequest$lambda));
            } else {
              tmp_14 = tmp2_elvis_lhs;
            }

            var serializedContent = tmp_14;
            return serializedContent;
          case 7:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 7) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function $convertResponseCOROUTINE$1(_this__u8e3s4, requestUrl, info, body, responseContentType, charset, resultContinuation) {
    CoroutineImpl.call(this, resultContinuation);
    this.d59_1 = _this__u8e3s4;
    this.e59_1 = requestUrl;
    this.f59_1 = info;
    this.g59_1 = body;
    this.h59_1 = responseContentType;
    this.i59_1 = charset;
  }
  protoOf($convertResponseCOROUTINE$1).ud = function () {
    var suspendResult = this.jd_1;
    $sm: do
      try {
        var tmp = this.hd_1;
        switch (tmp) {
          case 0:
            this.id_1 = 2;
            var tmp_0 = this.g59_1;
            if (!isInterface(tmp_0, ByteReadChannel)) {
              get_LOGGER().l2t('Response body is already transformed. Skipping ContentNegotiation for ' + this.e59_1 + '.');
              return null;
            }

            if (this.d59_1.c57_1.a1(this.f59_1.g2t_1)) {
              get_LOGGER().l2t('Response body type ' + this.f59_1.g2t_1 + ' is in ignored types. ' + ('Skipping ContentNegotiation for ' + this.e59_1 + '.'));
              return null;
            }

            var tmp_1 = this;
            var this_0 = this.d59_1.b57_1;
            var destination = ArrayList_init_$Create$();
            var tmp0_iterator = this_0.w();
            while (tmp0_iterator.f()) {
              var element = tmp0_iterator.e();
              if (element.l56_1.n56(this.h59_1)) {
                destination.i1(element);
              }
            }

            var destination_0 = ArrayList_init_$Create$_0(collectionSizeOrDefault(destination, 10));
            var tmp0_iterator_0 = destination.w();
            while (tmp0_iterator_0.f()) {
              var item = tmp0_iterator_0.e();
              destination_0.i1(item.j56_1);
            }

            var tmp_2;
            if (!destination_0.c1()) {
              tmp_2 = destination_0;
            } else {
              tmp_2 = null;
            }

            var tmp0_elvis_lhs = tmp_2;
            var tmp_3;
            if (tmp0_elvis_lhs == null) {
              this.d59_1;
              get_LOGGER().l2t('None of the registered converters match response with Content-Type=' + this.h59_1 + '. ' + ('Skipping ContentNegotiation for ' + this.e59_1 + '.'));
              return null;
            } else {
              tmp_3 = tmp0_elvis_lhs;
            }

            tmp_1.j59_1 = tmp_3;
            this.hd_1 = 1;
            suspendResult = deserialize(this.j59_1, this.g59_1, this.f59_1, this.i59_1, this);
            if (suspendResult === get_COROUTINE_SUSPENDED()) {
              return suspendResult;
            }

            continue $sm;
          case 1:
            var result = suspendResult;
            if (!isInterface(result, ByteReadChannel)) {
              get_LOGGER().l2t('Response body was converted to ' + getKClassFromExpression(result) + ' for ' + this.e59_1 + '.');
            }

            return result;
          case 2:
            throw this.kd_1;
        }
      } catch ($p) {
        var e = $p;
        if (this.id_1 === 2) {
          throw e;
        } else {
          this.hd_1 = this.id_1;
          this.kd_1 = e;
        }
      }
     while (true);
  };
  function ContentNegotiation(registrations, ignoredTypes) {
    Plugin_getInstance();
    this.b57_1 = registrations;
    this.c57_1 = ignoredTypes;
  }
  protoOf(ContentNegotiation).d57 = function (request, body, $completion) {
    var tmp = new $convertRequestCOROUTINE$0(this, request, body, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  protoOf(ContentNegotiation).w57 = function (requestUrl, info, body, responseContentType, charset, $completion) {
    var tmp = new $convertResponseCOROUTINE$1(this, requestUrl, info, body, responseContentType, charset, $completion);
    tmp.jd_1 = Unit_instance;
    tmp.kd_1 = null;
    return tmp.ud();
  };
  function ContentConverterException(message) {
    Exception_init_$Init$(message, this);
    captureStack(this, ContentConverterException);
  }
  var properties_initialized_ContentNegotiation_kt_1ayduy;
  function _init_properties_ContentNegotiation_kt__o183go() {
    if (!properties_initialized_ContentNegotiation_kt_1ayduy) {
      properties_initialized_ContentNegotiation_kt_1ayduy = true;
      LOGGER = KtorSimpleLogger('io.ktor.client.plugins.contentnegotiation.ContentNegotiation');
      DefaultCommonIgnoredTypes = setOf([PrimitiveClasses_getInstance().k8(), PrimitiveClasses_getInstance().g8(), getKClass(HttpStatusCode), getKClass(ByteReadChannel), getKClass(OutgoingContent)]);
    }
  }
  function JsonContentTypeMatcher() {
  }
  protoOf(JsonContentTypeMatcher).n56 = function (contentType) {
    if (contentType.e2w(Application_getInstance().p2u_1)) {
      return true;
    }
    var value = contentType.d2w().toString();
    return startsWith(value, 'application/') ? endsWith(value, '+json') : false;
  };
  var JsonContentTypeMatcher_instance;
  function JsonContentTypeMatcher_getInstance() {
    return JsonContentTypeMatcher_instance;
  }
  function get_DefaultIgnoredTypes() {
    _init_properties_DefaultIgnoredTypesJs_kt__rjtdk1();
    return DefaultIgnoredTypes;
  }
  var DefaultIgnoredTypes;
  var properties_initialized_DefaultIgnoredTypesJs_kt_65g2xt;
  function _init_properties_DefaultIgnoredTypesJs_kt__rjtdk1() {
    if (!properties_initialized_DefaultIgnoredTypesJs_kt_65g2xt) {
      properties_initialized_DefaultIgnoredTypesJs_kt_65g2xt = true;
      // Inline function 'kotlin.collections.mutableSetOf' call
      DefaultIgnoredTypes = LinkedHashSet_init_$Create$();
    }
  }
  //region block: post-declaration
  protoOf(Config).u37 = register$default;
  //endregion
  //region block: init
  JsonContentTypeMatcher_instance = new JsonContentTypeMatcher();
  //endregion
  //region block: exports
  _.$_$ = _.$_$ || {};
  _.$_$.a = Plugin_getInstance;
  //endregion
  return _;
}(module.exports, require('./kotlin-kotlin-stdlib.js'), require('./ktor-ktor-utils.js'), require('./ktor-ktor-client-core.js'), require('./ktor-ktor-http.js'), require('./ktor-ktor-serialization.js'), require('./ktor-ktor-io.js')));

//# sourceMappingURL=ktor-ktor-client-content-negotiation.js.map
