package l6; import android.net.Uri; import android.text.TextUtils; import java.net.URL; import java.security.MessageDigest; import java.util.Map; /* loaded from: classes2.dex */ public class h implements e6.h { /* renamed from: b, reason: collision with root package name */ private final g f11649b; /* renamed from: c, reason: collision with root package name */ private final URL f11650c; /* renamed from: d, reason: collision with root package name */ private final String f11651d; /* renamed from: e, reason: collision with root package name */ private String f11652e; /* renamed from: f, reason: collision with root package name */ private URL f11653f; /* renamed from: g, reason: collision with root package name */ private volatile byte[] f11654g; /* renamed from: h, reason: collision with root package name */ private int f11655h; public h(String str) { this(str, g.f11648b); } private byte[] c() { if (this.f11654g == null) { this.f11654g = f().getBytes(e6.h.f9363a); } return this.f11654g; } private String d() { if (TextUtils.isEmpty(this.f11652e)) { String str = this.f11651d; if (TextUtils.isEmpty(str)) { str = ((URL) b7.j.d(this.f11650c)).toString(); } this.f11652e = Uri.encode(str, "@#&=*+-_.,:!?()/~'%;$"); } return this.f11652e; } private URL e() { if (this.f11653f == null) { this.f11653f = new URL(d()); } return this.f11653f; } @Override // e6.h public void a(MessageDigest messageDigest) { messageDigest.update(c()); } @Override // e6.h public boolean equals(Object obj) { if (!(obj instanceof h)) { return false; } h hVar = (h) obj; return f().equals(hVar.f()) && this.f11649b.equals(hVar.f11649b); } public String f() { String str = this.f11651d; return str != null ? str : ((URL) b7.j.d(this.f11650c)).toString(); } public Map g() { return this.f11649b.a(); } public URL h() { return e(); } @Override // e6.h public int hashCode() { if (this.f11655h == 0) { int hashCode = f().hashCode(); this.f11655h = hashCode; this.f11655h = (hashCode * 31) + this.f11649b.hashCode(); } return this.f11655h; } public String toString() { return f(); } public h(String str, g gVar) { this.f11650c = null; this.f11651d = b7.j.b(str); this.f11649b = (g) b7.j.d(gVar); } public h(URL url) { this(url, g.f11648b); } public h(URL url, g gVar) { this.f11650c = (URL) b7.j.d(url); this.f11651d = null; this.f11649b = (g) b7.j.d(gVar); } }