package ඓ.ῲ.K.ᕣ.ᨨ;

import com.bumptech.glide.load.engine.GlideException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import ඓ.ῲ.K.ᕣ.C1121;
import ඓ.ῲ.K.ᕣ.ᨨ.C1025;
import ඓ.ῲ.K.ᕣ.㿎.AbstractC1130;
import ඓ.K.K.K.C1293;
import ῲ.ᨨ.㳳.C1841;
import ῲ.ᨨ.㿎.AbstractC1871;

/* renamed from: ඓ.ῲ.K.ᕣ.ᨨ.㗽  reason: contains not printable characters */
/* compiled from: LoadPath */
public class C1007<Data, ResourceType, Transcode> {

    /* renamed from: ʬ  reason: contains not printable characters */
    public final String f4407;

    /* renamed from: ῲ  reason: contains not printable characters */
    public final List<? extends C1025<Data, ResourceType, Transcode>> f4408;

    /* renamed from: K  reason: contains not printable characters */
    public final AbstractC1871<List<Throwable>> f4409;

    public C1007(Class<Data> cls, Class<ResourceType> cls2, Class<Transcode> cls3, List<C1025<Data, ResourceType, Transcode>> list, AbstractC1871<List<Throwable>> r5) {
        this.f4409 = r5;
        if (!list.isEmpty()) {
            this.f4408 = list;
            StringBuilder r4 = C1293.m3416("Failed LoadPath{");
            r4.append(cls.getSimpleName());
            r4.append("->");
            r4.append(cls2.getSimpleName());
            r4.append("->");
            r4.append(cls3.getSimpleName());
            r4.append("}");
            this.f4407 = r4.toString();
            return;
        }
        throw new IllegalArgumentException("Must not be empty.");
    }

    public String toString() {
        StringBuilder r0 = C1293.m3416("LoadPath{decodePaths=");
        r0.append(Arrays.toString(this.f4408.toArray()));
        r0.append('}');
        return r0.toString();
    }

    /* renamed from: K  reason: contains not printable characters */
    public AbstractC1027<Transcode> m2813(AbstractC1130<Data> r13, C1121 r14, int i, int i2, C1025.AbstractC1026<ResourceType> k) throws GlideException {
        List<Throwable> r0 = this.f4409.m4835();
        C1841.m4783(r0, "Argument must not be null");
        List<Throwable> list = r0;
        try {
            int size = this.f4408.size();
            AbstractC1027<Transcode> r5 = null;
            for (int i3 = 0; i3 < size; i3++) {
                try {
                    r5 = ((C1025) this.f4408.get(i3)).m2840(r13, i, i2, r14, k);
                } catch (GlideException e) {
                    list.add(e);
                }
                if (r5 != null) {
                    break;
                }
            }
            if (r5 != null) {
                return r5;
            }
            throw new GlideException(this.f4407, new ArrayList(list));
        } finally {
            this.f4409.m4836(list);
        }
    }
}
