package defpackage;

import androidx.media3.container.NalUnitUtil;
import kotlin.Metadata;

/* JADX INFO: loaded from: classes3.dex */
@Metadata(d1 = {"\u0000\u0002\n\u0000¨\u0006\u0000"}, d2 = {"kotlinx-serialization-json"}, k = 2, mv = {2, 0, 0}, xi = NalUnitUtil.H265_NAL_UNIT_TYPE_UNSPECIFIED)
public final class iz4 {
    public static final fz4 a(String str, Number number) {
        cr4.g(str, "output");
        return new fz4("Unexpected special floating-point value " + number + ". By default, non-finite floating point values are prohibited because they do not conform JSON specification. It is possible to deserialize them using 'JsonBuilder.allowSpecialFloatingPointValues = true'\nCurrent output: " + ((Object) f(-1, str)));
    }

    public static final fz4 b(bi8 bi8Var) {
        cr4.g(bi8Var, "keyDescriptor");
        return new fz4("Value of type '" + bi8Var.getC() + "' can't be used in JSON as a key in the map. It should have either primitive or enum kind, but its kind is '" + bi8Var.getB() + "'.\nUse 'allowStructuredMapKeys = true' in 'Json {}' builder to convert such maps to [key1, value1, key2, value2,...] arrays.");
    }

    public static final uy4 c(int i, String str) {
        cr4.g(str, "message");
        if (i >= 0) {
            str = "Unexpected JSON token at offset " + i + ": " + str;
        }
        cr4.g(str, "message");
        return new uy4(str);
    }

    public static final uy4 d(String str, CharSequence charSequence, int i) {
        cr4.g(str, "message");
        cr4.g(charSequence, "input");
        return c(i, str + "\nJSON input: " + ((Object) f(i, charSequence)));
    }

    public static final void e(cl clVar, String str) {
        clVar.q(clVar.a - 1, "Trailing comma before the end of JSON ".concat(str), "Trailing commas are non-complaint JSON and not allowed by default. Use 'allowTrailingCommas = true' in 'Json {}' builder to support them.");
        throw null;
    }

    public static final CharSequence f(int i, CharSequence charSequence) {
        cr4.g(charSequence, "<this>");
        if (charSequence.length() >= 200) {
            if (i != -1) {
                int i2 = i - 30;
                int i3 = i + 30;
                String str = i2 <= 0 ? "" : ".....";
                String str2 = i3 >= charSequence.length() ? "" : ".....";
                StringBuilder sbQ = vw2.q(str);
                if (i2 < 0) {
                    i2 = 0;
                }
                int length = charSequence.length();
                if (i3 > length) {
                    i3 = length;
                }
                sbQ.append(charSequence.subSequence(i2, i3).toString());
                sbQ.append(str2);
                return sbQ.toString();
            }
            int length2 = charSequence.length() - 60;
            if (length2 > 0) {
                return "....." + charSequence.subSequence(length2, charSequence.length()).toString();
            }
        }
        return charSequence;
    }

    public static final void g(cl clVar, Number number) {
        cl.r(clVar, "Unexpected special floating-point value " + number + ". By default, non-finite floating point values are prohibited because they do not conform JSON specification", 0, "It is possible to deserialize them using 'JsonBuilder.allowSpecialFloatingPointValues = true'", 2);
        throw null;
    }

    public static final String h(Number number, String str, String str2) {
        return "Unexpected special floating-point value " + number + " with key " + str + ". By default, non-finite floating point values are prohibited because they do not conform JSON specification. It is possible to deserialize them using 'JsonBuilder.allowSpecialFloatingPointValues = true'\nCurrent output: " + ((Object) f(-1, str2));
    }
}
