package o;

import com.google.android.gms.common.internal.Objects;
import java.util.regex.Pattern;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* renamed from: o.ag0, reason: case insensitive filesystem */
/* loaded from: classes.dex */
public final class C0735ag0 {
    public static final Pattern d = Pattern.compile("[a-zA-Z0-9-_.~%]{1,900}");
    public final String a;
    public final String b;
    public final String c;

    public C0735ag0(String str, String str2) {
        String strSubstring = (str2 == null || !str2.startsWith("/topics/")) ? str2 : str2.substring(8);
        if (strSubstring == null || !d.matcher(strSubstring).matches()) {
            throw new IllegalArgumentException(AbstractC2462sn.j("Invalid topic name: ", strSubstring, " does not match the allowed format [a-zA-Z0-9-_.~%]{1,900}."));
        }
        this.a = strSubstring;
        this.b = str;
        this.c = str + "!" + str2;
    }

    public final boolean equals(Object obj) {
        if (!(obj instanceof C0735ag0)) {
            return false;
        }
        C0735ag0 c0735ag0 = (C0735ag0) obj;
        return this.a.equals(c0735ag0.a) && this.b.equals(c0735ag0.b);
    }

    public final int hashCode() {
        return Objects.hashCode(this.b, this.a);
    }
}
