package defpackage;

import android.os.Bundle;
import android.text.TextUtils;
import j$.util.Objects;
import java.util.HashMap;
import java.util.Map;

/* JADX INFO: renamed from: ᵼˎʽˑ, reason: contains not printable characters */
/* JADX INFO: loaded from: classes3.dex */
public final class C5280 {

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final HashMap f19935;

    public C5280(Map map) {
        HashMap map2 = new HashMap();
        this.f19935 = map2;
        map2.putAll(map);
    }

    public final boolean equals(Object obj) {
        if (obj instanceof C5280) {
            return m10874().equalsIgnoreCase(((C5280) obj).m10874());
        }
        return false;
    }

    public final int hashCode() {
        return m10874().hashCode();
    }

    public final String toString() {
        return m10874();
    }

    /* JADX INFO: renamed from: ʽˈˋ, reason: contains not printable characters */
    public final Bundle m10872() {
        int iM10873;
        HashMap map = this.f19935;
        if ("1".equals(map.get("gdprApplies")) && "1".equals(map.get("EnableAdvertiserConsentMode"))) {
            String str = "denied";
            if (map.get("Version") == null) {
                if ("1".equals(map.get("GoogleConsent")) && (iM10873 = m10873()) >= 0) {
                    String str2 = (String) map.get("PurposeConsents");
                    if (TextUtils.isEmpty(str2)) {
                        return Bundle.EMPTY;
                    }
                    Bundle bundle = new Bundle();
                    if (str2.length() > 0) {
                        bundle.putString("ad_storage", str2.charAt(0) == '1' ? "granted" : "denied");
                    }
                    if (str2.length() > 3) {
                        bundle.putString("ad_personalization", (str2.charAt(2) == '1' && str2.charAt(3) == '1') ? "granted" : "denied");
                    }
                    if (str2.length() > 6 && iM10873 >= 4) {
                        if (str2.charAt(0) == '1' && str2.charAt(6) == '1') {
                            str = "granted";
                        }
                        bundle.putString("ad_user_data", str);
                    }
                    return bundle;
                }
                return Bundle.EMPTY;
            }
            if (m10873() >= 0) {
                Bundle bundle2 = new Bundle();
                bundle2.putString("ad_storage", true != Objects.equals(map.get("AuthorizePurpose1"), "1") ? "denied" : "granted");
                bundle2.putString("ad_personalization", (Objects.equals(map.get("AuthorizePurpose3"), "1") && Objects.equals(map.get("AuthorizePurpose4"), "1")) ? "granted" : "denied");
                if (m10873() >= 4) {
                    if (Objects.equals(map.get("AuthorizePurpose1"), "1") && Objects.equals(map.get("AuthorizePurpose7"), "1")) {
                        str = "granted";
                    }
                    bundle2.putString("ad_user_data", str);
                }
                return bundle2;
            }
        }
        return Bundle.EMPTY;
    }

    /* JADX INFO: renamed from: ːˏᵟᵯ, reason: contains not printable characters */
    public final int m10873() {
        try {
            String str = (String) this.f19935.get("PolicyVersion");
            if (TextUtils.isEmpty(str)) {
                return -1;
            }
            return Integer.parseInt(str);
        } catch (NumberFormatException unused) {
            return -1;
        }
    }

    /* JADX INFO: renamed from: ᵲᵶᵳˈ, reason: contains not printable characters */
    public final String m10874() {
        StringBuilder sb = new StringBuilder();
        C2598 c2598 = AbstractC1534.f6197;
        int i = c2598.f10050;
        for (int i2 = 0; i2 < i; i2++) {
            String str = (String) c2598.get(i2);
            HashMap map = this.f19935;
            if (map.containsKey(str)) {
                if (sb.length() > 0) {
                    sb.append(";");
                }
                sb.append(str);
                sb.append("=");
                sb.append((String) map.get(str));
            }
        }
        return sb.toString();
    }
}
