package com.google.android.gms.internal.ads;

import android.webkit.WebResourceResponse;
import android.webkit.WebView;
import androidx.annotation.Nullable;
import java.io.File;
import java.util.Collections;
import java.util.Map;

/* JADX INFO: loaded from: classes2.dex */
public class q60 extends c60 {
    public q60(x50 x50Var, il ilVar, boolean z10, @Nullable hw0 hw0Var) {
        super(x50Var, ilVar, z10, new yx(x50Var, x50Var.zzK(), new qn(x50Var.getContext())), null, hw0Var);
    }

    /* JADX WARN: Multi-variable type inference failed */
    @Nullable
    public final WebResourceResponse zzac(WebView webView, String str, @Nullable Map map) {
        String str2;
        if (!(webView instanceof x50)) {
            q7.j.d("Tried to intercept request from a WebView that wasn't an AdWebView.");
            return null;
        }
        x50 x50Var = (x50) webView;
        p10 p10Var = this.zzb;
        if (p10Var != null) {
            ((l10) p10Var).b(str, map, 1);
        }
        int i10 = pi1.f15420d;
        if (!"mraid.js".equalsIgnoreCase(new File(str).getName())) {
            if (map == null) {
                map = Collections.emptyMap();
            }
            return zzL(str, map);
        }
        if (x50Var.zzP() != null) {
            c60 c60VarZzP = x50Var.zzP();
            synchronized (c60VarZzP.f9750c) {
                c60VarZzP.f9761k = false;
                c60VarZzP.S = true;
                b30.f9364f.execute(new mv1(c60VarZzP, 24));
            }
        }
        if (x50Var.zzN().b()) {
            str2 = (String) n7.y.f31093e.f31096c.b(ao.f8994o0);
        } else if (x50Var.y()) {
            str2 = (String) n7.y.f31093e.f31096c.b(ao.f8977n0);
        } else {
            str2 = (String) n7.y.f31093e.f31096c.b(ao.f8960m0);
        }
        p7.r0 r0Var = m7.n.C.f30464c;
        return p7.r0.zzB(x50Var.getContext(), x50Var.zzs().f32212a, str2);
    }
}
