导航菜单

页面标题

页面副标题

Bhakti v5.4.0 - p.java 源代码

正在查看: Bhakti v5.4.0 应用的 p.java JAVA 源代码文件

本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。


package Ai;

import Ea.e;
import Hc.d;
import L7.n;
import L8.C;
import L8.TR.mFebmnlLGfLZT;
import L8.a0;
import L8.d0;
import L8.j;
import L8.o0;
import L8.z;
import a5.C0034c;
import android.app.Application;
import android.content.Context;
import android.graphics.Bitmap;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.ParcelFileDescriptor;
import android.os.SystemClock;
import android.text.TextUtils;
import android.util.Base64;
import android.util.Log;
import android.util.Pair;
import androidx.appcompat.widget.W0;
import com.bumptech.glide.Glide;
import com.bumptech.glide.q;
import com.google.firebase.components.ComponentRegistrar;
import com.google.firebase.perf.network.FirebasePerfUrlConnection;
import com.vlv.aravali.KukuFMApplication;
import com.vlv.aravali.network.rx.RxEvent$NetworkConnectivity;
import g8.C0058e;
import h5.c0;
import in.juspay.hyperinteg.ds.vJudY;
import java.io.FilterOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import kotlin.Unit;
import kotlin.collections.u;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import kp.C0106b;
import m3.k;
import nf.F;
import okhttp3.HttpUrl;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import p8.A;
import p8.D;
import p8.E;
import p8.G;
import p8.H;
import p8.I;
import p8.K;
import p8.M;
import p8.N;
import p8.P;
import p8.U;
import p8.b;
import p8.t;
import q8.C0114A;
import q8.i;
import qg.e0;
import yd.c;
import zc.C0121b;

public final class p implements C9.a, e, d, K4.e, a5.d, f7.g, n {
    public final int a;

    public p(int i) {
        this.a = i;
    }

    public static void E() {
        synchronized (q8.m.c()) {
            if (q8.m.b() != null) {
                return;
            }
            ScheduledThreadPoolExecutor scheduledThreadPoolExecutor = new ScheduledThreadPoolExecutor(1);
            if (!Q8.a.b(q8.m.class)) {
                try {
                    q8.m.d = scheduledThreadPoolExecutor;
                } catch (Throwable th2) {
                    Q8.a.a(q8.m.class, th2);
                }
            }
            Unit unit = Unit.a;
            d0 d0Var = new d0(4);
            ScheduledThreadPoolExecutor b = q8.m.b();
            if (b == null) {
                throw new IllegalStateException("Required value was null.");
            }
            b.scheduleAtFixedRate(d0Var, 0L, 86400L, TimeUnit.SECONDS);
        }
    }

    public static boolean F(Object obj) {
        return (obj instanceof Bitmap) || (obj instanceof byte[]) || (obj instanceof Uri) || (obj instanceof ParcelFileDescriptor) || (obj instanceof H);
    }

    public static boolean G(Object obj) {
        return (obj instanceof String) || (obj instanceof Boolean) || (obj instanceof Number) || (obj instanceof Date);
    }

    public static void H(N behavior, String tag, String string) {
        Intrinsics.checkNotNullParameter(behavior, "behavior");
        Intrinsics.checkNotNullParameter(tag, "tag");
        Intrinsics.checkNotNullParameter(string, "string");
        J(behavior, tag, string);
    }

    public static void I(N behavior, String tag, String format, Object... args) {
        Intrinsics.checkNotNullParameter(behavior, "behavior");
        Intrinsics.checkNotNullParameter(tag, "tag");
        Intrinsics.checkNotNullParameter(format, "format");
        Intrinsics.checkNotNullParameter(args, "args");
        A.i(behavior);
    }

    public static void J(N behavior, String tag, String string) {
        Intrinsics.checkNotNullParameter(behavior, "behavior");
        Intrinsics.checkNotNullParameter(tag, "tag");
        Intrinsics.checkNotNullParameter(string, "string");
        A.i(behavior);
    }

    public static I L(b bVar, String str, E e) {
        return new I(bVar, str, null, null, e);
    }

    public static I M(b bVar, String str, JSONObject jSONObject, E e) {
        I i = new I(bVar, str, null, M.POST, e);
        i.c = jSONObject;
        return i;
    }

    public static sq.l N(byte[] bArr) {
        sq.l lVar = sq.l.d;
        Intrinsics.checkNotNullParameter(bArr, "<this>");
        Intrinsics.checkNotNullParameter(bArr, "<this>");
        int length = bArr.length;
        sq.b.c(bArr.length, 0, length);
        return new sq.l(u.m(0, bArr, length));
    }

    public static void O(boolean z) {
        C0106b c0106b = nl.a.a;
        nl.a.b(new RxEvent$NetworkConnectivity(z));
    }

    public static void P(int i, Throwable th2, e0 logData, Function0 message, int i2) {
        c cVar = mf.h.c;
        if ((i2 & 1) != 0) {
            i = 5;
        }
        if ((i2 & 2) != 0) {
            th2 = null;
        }
        if ((i2 & 4) != 0) {
            logData = new Je.l(24);
        }
        Intrinsics.checkNotNullParameter(logData, "logData");
        Intrinsics.checkNotNullParameter(message, "message");
        c cVar2 = mf.h.c;
        cVar2.getClass();
        Intrinsics.checkNotNullParameter(logData, "logData");
        Intrinsics.checkNotNullParameter(message, "message");
        try {
            Iterator it = cVar2.a.iterator();
            while (it.hasNext()) {
                mf.e eVar = (mf.e) it.next();
                if (eVar.b(i)) {
                    eVar.a(i, HttpUrl.FRAGMENT_ENCODE_SET, (String) message.invoke(), (List) logData.invoke(), th2);
                }
            }
        } catch (Throwable unused) {
        }
    }

    public static void Q(org.json.JSONObject r7, java.lang.String r8, p8.G r9) {
        throw new UnsupportedOperationException("Method not decompiled: Ai.p.Q(org.json.JSONObject, java.lang.String, p8.G):void");
    }

    public static void R(String str, Object obj, G g, boolean z) {
        Class<?> cls = obj.getClass();
        if (!JSONObject.class.isAssignableFrom(cls)) {
            if (JSONArray.class.isAssignableFrom(cls)) {
                JSONArray jSONArray = (JSONArray) obj;
                int length = jSONArray.length();
                for (int i = 0; i < length; i++) {
                    String h = j.e.h(new Object[]{str, Integer.valueOf(i)}, 2, Locale.ROOT, "%s[%d]", "format(locale, format, *args)");
                    Object opt = jSONArray.opt(i);
                    Intrinsics.checkNotNullExpressionValue(opt, "jsonArray.opt(i)");
                    R(h, opt, g, z);
                }
                return;
            }
            if (String.class.isAssignableFrom(cls) || Number.class.isAssignableFrom(cls) || Boolean.class.isAssignableFrom(cls)) {
                g.a(str, obj.toString());
                return;
            }
            if (!Date.class.isAssignableFrom(cls)) {
                String str2 = I.f229j;
                A a = A.a;
                return;
            } else {
                String format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US).format((Date) obj);
                Intrinsics.checkNotNullExpressionValue(format, "iso8601DateFormat.format(date)");
                g.a(str, format);
                return;
            }
        }
        JSONObject jSONObject = (JSONObject) obj;
        if (z) {
            Iterator<String> keys = jSONObject.keys();
            while (keys.hasNext()) {
                String next = keys.next();
                String u2 = o.u(new Object[]{str, next}, 2, "%s[%s]", "format(format, *args)");
                Object opt2 = jSONObject.opt(next);
                Intrinsics.checkNotNullExpressionValue(opt2, "jsonObject.opt(propertyName)");
                R(u2, opt2, g, z);
            }
            return;
        }
        if (jSONObject.has("id")) {
            String optString = jSONObject.optString("id");
            Intrinsics.checkNotNullExpressionValue(optString, "jsonObject.optString(\"id\")");
            R(str, optString, g, z);
        } else if (jSONObject.has("url")) {
            String optString2 = jSONObject.optString("url");
            Intrinsics.checkNotNullExpressionValue(optString2, "jsonObject.optString(\"url\")");
            R(str, optString2, g, z);
        } else if (jSONObject.has("fbsdk:create_object")) {
            String jSONObject2 = jSONObject.toString();
            Intrinsics.checkNotNullExpressionValue(jSONObject2, "jsonObject.toString()");
            R(str, jSONObject2, g, z);
        }
    }

    public static void T(K k, a0 a0Var, int i, URL url, FilterOutputStream filterOutputStream, boolean z) {
        String b;
        char c = 0;
        W0 w0 = new W0(filterOutputStream, a0Var, z);
        ?? r7 = 1;
        if (i == 1) {
            I i2 = (I) k.c.get(0);
            HashMap hashMap = new HashMap();
            for (String key : i2.d.keySet()) {
                Object obj = i2.d.get(key);
                if (F(obj)) {
                    Intrinsics.checkNotNullExpressionValue(key, "key");
                    hashMap.put(key, new D(i2, obj));
                }
            }
            Intrinsics.checkNotNullParameter("  Parameters:\n", "string");
            a0Var.c();
            Bundle bundle = i2.d;
            for (String key2 : bundle.keySet()) {
                Object obj2 = bundle.get(key2);
                if (G(obj2)) {
                    Intrinsics.checkNotNullExpressionValue(key2, "key");
                    w0.j(key2, obj2, i2);
                }
            }
            Intrinsics.checkNotNullParameter("  Attachments:\n", "string");
            a0Var.c();
            X(hashMap, w0);
            JSONObject jSONObject = i2.c;
            if (jSONObject != null) {
                String path = url.getPath();
                Intrinsics.checkNotNullExpressionValue(path, "url.path");
                Q(jSONObject, path, w0);
                return;
            }
            return;
        }
        k.getClass();
        Iterator it = k.iterator();
        while (true) {
            if (it.hasNext()) {
                b bVar = ((I) it.next()).a;
                if (bVar != null) {
                    b = bVar.h;
                    break;
                }
            } else {
                String str = I.f229j;
                b = A.b();
                break;
            }
        }
        if (b.length() == 0) {
            throw new t("App ID was not specified at the request or Settings.");
        }
        w0.a("batch_app_id", b);
        HashMap hashMap2 = new HashMap();
        ?? jSONArray = new JSONArray();
        Iterator it2 = k.iterator();
        while (it2.hasNext()) {
            ?? r11 = (I) it2.next();
            r11.getClass();
            JSONObject jSONObject2 = new JSONObject();
            String h = r11.h(j.d());
            r11.a();
            Uri parse = Uri.parse(r11.b(h, r7));
            String path2 = parse.getPath();
            String query = parse.getQuery();
            Object[] objArr = new Object[2];
            objArr[c] = path2;
            objArr[r7] = query;
            String u2 = o.u(objArr, 2, "%s?%s", "format(format, *args)");
            jSONObject2.put("relative_url", u2);
            jSONObject2.put("method", r11.h);
            b bVar2 = r11.a;
            if (bVar2 != null) {
                a0.d.U(bVar2.e);
            }
            ArrayList arrayList = new ArrayList();
            Iterator<String> it3 = r11.d.keySet().iterator();
            while (true) {
                boolean hasNext = it3.hasNext();
                String str2 = I.f229j;
                if (!hasNext) {
                    break;
                }
                Object obj3 = r11.d.get(it3.next());
                if (F(obj3)) {
                    String h2 = j.e.h(new Object[]{"file", Integer.valueOf(hashMap2.size())}, 2, Locale.ROOT, "%s%d", "format(locale, format, *args)");
                    arrayList.add(h2);
                    hashMap2.put(h2, new D((I) r11, obj3));
                    it2 = it2;
                    it3 = it3;
                    c = 0;
                    r7 = 1;
                } else {
                    c = 0;
                    r7 = 1;
                }
            }
            char c3 = c;
            boolean z2 = r7;
            Iterator it4 = it2;
            if (!arrayList.isEmpty()) {
                jSONObject2.put("attached_files", TextUtils.join(",", arrayList));
            }
            JSONObject jSONObject3 = r11.c;
            if (jSONObject3 != null) {
                ArrayList arrayList2 = new ArrayList();
                Q(jSONObject3, u2, new Zp.c(arrayList2));
                jSONObject2.put("body", TextUtils.join("&", arrayList2));
            }
            jSONArray.put(jSONObject2);
            it2 = it4;
            c = c3;
            r7 = z2;
        }
        w0.l((JSONArray) jSONArray, k);
        Intrinsics.checkNotNullParameter("  Attachments:\n", "string");
        a0Var.c();
        X(hashMap2, w0);
    }

    public static void W(K requests, ArrayList responses) {
        Intrinsics.checkNotNullParameter(requests, "requests");
        Intrinsics.checkNotNullParameter(responses, "responses");
        int size = requests.c.size();
        ArrayList arrayList = new ArrayList();
        for (int i = 0; i < size; i++) {
            I i2 = (I) requests.c.get(i);
            if (i2.g != null) {
                arrayList.add(new Pair(i2.g, responses.get(i)));
            }
        }
        if (arrayList.size() > 0) {
            Runnable kVar = new k(4, arrayList, requests);
            Handler handler = requests.a;
            if (handler != null) {
                handler.post(kVar);
            } else {
                kVar.run();
            }
        }
    }

    public static void X(HashMap hashMap, W0 w0) {
        for (Map.Entry entry : hashMap.entrySet()) {
            String str = I.f229j;
            if (F(((D) entry.getValue()).b())) {
                w0.j((String) entry.getKey(), ((D) entry.getValue()).b(), ((D) entry.getValue()).a());
            }
        }
    }

    public static void Y(java.net.HttpURLConnection r12, p8.K r13) {
        throw new UnsupportedOperationException("Method not decompiled: Ai.p.Y(java.net.HttpURLConnection, p8.K):void");
    }

    public static HttpURLConnection Z(K requests) {
        Intrinsics.checkNotNullParameter(requests, "requests");
        Intrinsics.checkNotNullParameter(requests, "requests");
        Iterator<E> it = requests.iterator();
        while (it.hasNext()) {
            I i = (I) it.next();
            if (M.GET == i.h && o0.X(i.d.getString("fields"))) {
                p pVar = a0.d;
                N n = N.DEVELOPER_ERRORS;
                StringBuilder sb = new StringBuilder("GET requests for /");
                String str = i.b;
                if (str == null) {
                    str = HttpUrl.FRAGMENT_ENCODE_SET;
                }
                sb.append(str);
                sb.append(" should contain an explicit \"fields\" parameter.");
                J(n, "Request", sb.toString());
            }
        }
        try {
            HttpURLConnection httpURLConnection = null;
            try {
                httpURLConnection = r(requests.c.size() == 1 ? new URL(((I) requests.c.get(0)).g()) : new URL(j.d()));
                Y(httpURLConnection, requests);
                return httpURLConnection;
            } catch (IOException e) {
                o0.A(httpURLConnection);
                throw new t("could not construct request body", e);
            } catch (JSONException e2) {
                o0.A(httpURLConnection);
                throw new t("could not construct request body", e2);
            }
        } catch (MalformedURLException e3) {
            throw new t("could not construct URL for request", e3);
        }
    }

    public static final void j(q8.e appEvent, q8.b accessTokenAppId) {
        String str = q8.m.c;
        S6.A a = i.a;
        if (!Q8.a.b(i.class)) {
            try {
                Intrinsics.checkNotNullParameter(accessTokenAppId, "accessTokenAppId");
                Intrinsics.checkNotNullParameter(appEvent, "appEvent");
                i.b.execute(new Ac.a(10, accessTokenAppId, appEvent));
            } catch (Throwable th2) {
                Q8.a.a(i.class, th2);
            }
        }
        if (C.b(z.OnDevicePostInstallEventProcessing) && E8.b.a()) {
            E8.b.b(accessTokenAppId.a, appEvent);
        }
        if (C.b(z.GPSARATriggers)) {
            x8.b.a.d(accessTokenAppId.a, appEvent);
        }
        if (C.b(z.GPSPACAProcessing)) {
            y8.b.a.c(accessTokenAppId.a, appEvent);
        }
        if (appEvent.c) {
            return;
        }
        boolean z = false;
        if (!Q8.a.b(q8.m.class)) {
            try {
                z = q8.m.h;
            } catch (Throwable th3) {
                Q8.a.a(q8.m.class, th3);
            }
        }
        if (z) {
            return;
        }
        if (!Intrinsics.c(appEvent.e, "fb_mobile_activate_app")) {
            p pVar = a0.d;
            H(N.APP_EVENTS, "AppEvents", "Warning: Please call AppEventsLogger.activateApp(...)from the long-lived activity's onResume() methodbefore logging other app events.");
        } else {
            if (Q8.a.b(q8.m.class)) {
                return;
            }
            try {
                q8.m.h = true;
            } catch (Throwable th4) {
                Q8.a.a(q8.m.class, th4);
            }
        }
    }

    public static final String k(Object obj) {
        String str = I.f229j;
        if (obj instanceof String) {
            return (String) obj;
        }
        if ((obj instanceof Boolean) || (obj instanceof Number)) {
            return obj.toString();
        }
        if (!(obj instanceof Date)) {
            throw new IllegalArgumentException("Unsupported parameter type.");
        }
        String format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ", Locale.US).format((Date) obj);
        Intrinsics.checkNotNullExpressionValue(format, "iso8601DateFormat.format(value)");
        return format;
    }

    public static void m(Application context, String applicationId) {
        Intrinsics.checkNotNullParameter(context, "application");
        if (!A.p.get()) {
            throw new t("The Facebook sdk must be initialized before calling activateApp");
        }
        if (!q8.c.c) {
            String str = q8.m.c;
            if (q8.m.b() == null) {
                E();
            }
            ScheduledThreadPoolExecutor b = q8.m.b();
            if (b == null) {
                throw new IllegalStateException("Required value was null.");
            }
            b.execute(new d0(2));
        }
        C0114A c0114a = C0114A.a;
        if (!Q8.a.b(C0114A.class)) {
            try {
                if (!C0114A.c.get()) {
                    C0114A.a.b();
                }
            } catch (Throwable th2) {
                Q8.a.a(C0114A.class, th2);
            }
        }
        if (applicationId == null) {
            applicationId = A.b();
        }
        if (!Q8.a.b(A.class)) {
            try {
                Intrinsics.checkNotNullParameter(context, "context");
                Intrinsics.checkNotNullParameter(applicationId, "applicationId");
                Context applicationContext = context.getApplicationContext();
                if (applicationContext != null) {
                    if (!L8.E.b("app_events_killswitch", A.b(), false)) {
                        A.d().execute(new Ac.a(9, applicationContext, applicationId));
                    }
                    if (C.b(z.OnDeviceEventProcessing) && E8.b.a()) {
                        E8.b.c(applicationId);
                    }
                }
            } catch (Throwable th3) {
                Q8.a.a(A.class, th3);
            }
        }
        C8.d.c(context, applicationId);
        if (C.b(z.GPSPACAProcessing)) {
            y8.b.a.b(applicationId);
        }
    }

    public static kotlin.Pair n(Bundle bundle, q8.t tVar, boolean z) {
        String str = C8.k.d() ? "1" : "0";
        Map map = q8.t.b;
        q8.u uVar = q8.u.IAPParameters;
        kotlin.Pair c = kotlin.jvm.internal.N.c(uVar, "is_implicit_purchase_logging_enabled", str, bundle, tVar);
        Object q = kotlin.jvm.internal.N.q(uVar, "fb_iap_product_id", bundle, tVar);
        String str2 = q instanceof String ? (String) q : null;
        if (!z) {
            if ((bundle != null ? bundle.getString("fb_content_id") : null) == null && str2 != null) {
                kotlin.Pair c3 = kotlin.jvm.internal.N.c(uVar, "fb_content_id", str2, bundle, tVar);
                c = kotlin.jvm.internal.N.c(uVar, "android_dynamic_ads_content_id", "client_manual", (Bundle) c3.a, (q8.t) c3.b);
            }
        }
        kotlin.Pair c4 = kotlin.jvm.internal.N.c(uVar, "is_autolog_app_events_enabled", U.c() ? "1" : "0", (Bundle) c.a, (q8.t) c.b);
        return new kotlin.Pair((Bundle) c4.a, (q8.t) c4.b);
    }

    public static q o(Glide glide, f7.g gVar, f7.n nVar, Context context) {
        return new q(glide, gVar, nVar, new f7.t(4), glide.f, context);
    }

    public static JSONObject p(Hg.e request) {
        Intrinsics.checkNotNullParameter(request, "request");
        JSONObject k = request.b().k();
        if (k == null) {
            k = new JSONObject();
        }
        c0 m3 = request.b().m();
        JSONObject value = new JSONObject();
        String t2 = m3.t();
        Intrinsics.checkNotNullParameter("bid", "key");
        value.put("bid", t2);
        String H = m3.H();
        Intrinsics.checkNotNullParameter("request_time", "key");
        value.put("request_time", H);
        nf.l B3 = m3.B();
        JSONObject value2 = new JSONObject();
        boolean z = !B3.a;
        Intrinsics.checkNotNullParameter("e_t_p", "key");
        value2.put("e_t_p", z);
        Intrinsics.checkNotNullParameter("dev_pref", "key");
        Intrinsics.checkNotNullParameter(value2, "value");
        value.put("dev_pref", value2);
        if (!m3.C().isEmpty()) {
            JSONArray value3 = Yf.e.s(m3.C());
            Intrinsics.checkNotNullParameter("integrations", "key");
            Intrinsics.checkNotNullParameter(value3, "value");
            value.put("integrations", value3);
        }
        Intrinsics.checkNotNullParameter("meta", "key");
        Intrinsics.checkNotNullParameter(value, "value");
        k.put("meta", value);
        JSONObject value4 = request.b().l();
        Intrinsics.checkNotNullParameter("query_params", "key");
        Intrinsics.checkNotNullParameter(value4, "value");
        k.put("query_params", value4);
        return k;
    }

    public static JSONObject q(uf.h request) {
        Intrinsics.checkNotNullParameter(request, "request");
        JSONObject jSONObject = new JSONObject();
        JSONObject value = (JSONObject) request.i.b.b;
        Intrinsics.checkNotNullParameter("query_params", "key");
        Intrinsics.checkNotNullParameter(value, "value");
        jSONObject.put("query_params", value);
        ArrayList arrayList = request.f232j;
        if (!arrayList.isEmpty()) {
            JSONObject value2 = new JSONObject();
            JSONArray value3 = Yf.e.s(arrayList);
            Intrinsics.checkNotNullParameter("integrations", "key");
            Intrinsics.checkNotNullParameter(value3, "value");
            value2.put("integrations", value3);
            Intrinsics.checkNotNullParameter("meta", "key");
            Intrinsics.checkNotNullParameter(value2, "value");
            jSONObject.put("meta", value2);
        }
        return jSONObject;
    }

    public static HttpURLConnection r(URL url) {
        URLConnection uRLConnection = (URLConnection) FirebasePerfUrlConnection.instrument(url.openConnection());
        Intrinsics.f(uRLConnection, "null cannot be cast to non-null type java.net.HttpURLConnection");
        HttpURLConnection httpURLConnection = (HttpURLConnection) uRLConnection;
        if (I.l == null) {
            I.l = o.u(new Object[]{mFebmnlLGfLZT.hmQsRRHePxt, "18.0.3"}, 2, "%s.%s", "format(format, *args)");
        }
        httpURLConnection.setRequestProperty("User-Agent", I.l);
        httpURLConnection.setRequestProperty("Accept-Language", Locale.getDefault().toString());
        httpURLConnection.setChunkedStreamingMode(0);
        return httpURLConnection;
    }

    public static sq.l s(String str) {
        Intrinsics.checkNotNullParameter(str, "<this>");
        byte[] a = sq.a.a(str);
        if (a != null) {
            return new sq.l(a);
        }
        return null;
    }

    public static sq.l t(String str) {
        Intrinsics.checkNotNullParameter(str, "<this>");
        if (str.length() % 2 != 0) {
            throw new IllegalArgumentException("Unexpected hex string: ".concat(str).toString());
        }
        int length = str.length() / 2;
        byte[] bArr = new byte[length];
        for (int i = 0; i < length; i++) {
            int i2 = i * 2;
            bArr[i] = (byte) (tq.b.a(str.charAt(i2 + 1)) + (tq.b.a(str.charAt(i2)) << 4));
        }
        return new sq.l(bArr);
    }

    public static Nc.d u(io.sentry.hints.i iVar) {
        return new Nc.d(System.currentTimeMillis() + 3600000, new Nc.c(8), new Nc.b(0, true, false, false), 10.0d, 1.2d, 60);
    }

    public static void v(String appId) {
        Intrinsics.checkNotNullParameter(appId, "appId");
        new JSONObject();
        Intrinsics.checkNotNullParameter(appId, "appId");
        JSONObject requestBody = new JSONObject();
        Intrinsics.checkNotNullParameter("app_key", "key");
        requestBody.put("app_key", appId);
        Intrinsics.checkNotNullParameter("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuejZIFAZj58pWiERt2wmXqdJEJ9Vs3x0ipfO8rncfnUF5OtP1pk0biHuSHi2PWtFd25gmvVlGA8tydOn/eUGsB0Sw8vtTe7/TD+jbz0afS9cqRKAwatVEV7dEdxpYREeyXLb83sXAvfTqnv+C8OyEieWKopbL+3oALMg/4t5QebB90jOaPavFbWyBPpSwDjdI2eMZP82ZQr6Micx3aTKvTCp89Tz5ZqfyUqH6E9ybaneATFMM4gno174+fz1IjJ8G0k/p55/OM+lNFDspfH2qBdnmdZU4IPqd0IcicG5Z1fDeRvhLi6XAto2WSiRoC8wYrvOCkdZLa+DOQErQVph5wIDAQAB", "encryptionKey");
        Intrinsics.checkNotNullParameter(requestBody, "requestBody");
        String str = Nf.a.a;
        qf.a aVar = qf.a.RSA;
        byte[] decode = Base64.decode("MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuejZIFAZj58pWiERt2wmXqdJEJ9Vs3x0ipfO8rncfnUF5OtP1pk0biHuSHi2PWtFd25gmvVlGA8tydOn/eUGsB0Sw8vtTe7/TD+jbz0afS9cqRKAwatVEV7dEdxpYREeyXLb83sXAvfTqnv+C8OyEieWKopbL+3oALMg/4t5QebB90jOaPavFbWyBPpSwDjdI2eMZP82ZQr6Micx3aTKvTCp89Tz5ZqfyUqH6E9ybaneATFMM4gno174+fz1IjJ8G0k/p55/OM+lNFDspfH2qBdnmdZU4IPqd0IcicG5Z1fDeRvhLi6XAto2WSiRoC8wYrvOCkdZLa+DOQErQVph5wIDAQAB", 0);
        Intrinsics.checkNotNullExpressionValue(decode, "decode(...)");
        String jSONObject = requestBody.toString();
        Intrinsics.checkNotNullExpressionValue(jSONObject, "toString(...)");
        Nf.a.b(aVar, decode, jSONObject);
        throw null;
    }

    public static sq.l w(String str) {
        Intrinsics.checkNotNullParameter(str, "<this>");
        sq.l lVar = new sq.l(uq.a.f(str));
        lVar.c = str;
        return lVar;
    }

    public static ArrayList x(K requests) {
        Exception exc;
        HttpURLConnection httpURLConnection;
        ArrayList arrayList;
        Intrinsics.checkNotNullParameter(requests, "requests");
        q8.g.v(requests);
        HttpURLConnection httpURLConnection2 = null;
        try {
            httpURLConnection = Z(requests);
            exc = null;
        } catch (Exception e) {
            exc = e;
            httpURLConnection = null;
        } catch (Throwable th2) {
            th = th2;
            o0.A(httpURLConnection2);
            throw th;
        }
        try {
            if (httpURLConnection != null) {
                arrayList = y(httpURLConnection, requests);
            } else {
                ArrayList r = android.support.v4.media.session.h.r(requests.c, (HttpURLConnection) null, new t(exc));
                W(requests, r);
                arrayList = r;
            }
            o0.A(httpURLConnection);
            return arrayList;
        } catch (Throwable th3) {
            th = th3;
            httpURLConnection2 = httpURLConnection;
            o0.A(httpURLConnection2);
            throw th;
        }
    }

    public static ArrayList y(HttpURLConnection connection, K requests) {
        ArrayList r;
        Intrinsics.checkNotNullParameter(connection, "connection");
        Intrinsics.checkNotNullParameter(requests, "requests");
        Intrinsics.checkNotNullParameter(connection, "connection");
        Intrinsics.checkNotNullParameter(requests, "requests");
        InputStream inputStream = null;
        try {
            try {
            } catch (t e) {
                p pVar = a0.d;
                I(N.REQUESTS, "Response", "Response <Error>: %s", e);
                r = android.support.v4.media.session.h.r(requests, connection, e);
            } catch (Exception e2) {
                p pVar2 = a0.d;
                I(N.REQUESTS, "Response", "Response <Error>: %s", e2);
                r = android.support.v4.media.session.h.r(requests, connection, new t(e2));
            }
            if (!A.h()) {
                Log.e("p8.L", "GraphRequest can't be used when Facebook SDK isn't fully initialized");
                throw new t("GraphRequest can't be used when Facebook SDK isn't fully initialized");
            }
            inputStream = connection.getResponseCode() >= 400 ? connection.getErrorStream() : connection.getInputStream();
            r = android.support.v4.media.session.h.u(inputStream, connection, requests);
            o0.s(inputStream);
            o0.A(connection);
            int size = requests.c.size();
            if (size != r.size()) {
                throw new t(j.e.h(new Object[]{Integer.valueOf(r.size()), Integer.valueOf(size)}, 2, Locale.US, "Received %d responses while expecting %d", "format(locale, format, *args)"));
            }
            W(requests, r);
            p8.e C2 = p8.e.f.C();
            b bVar = C2.c;
            if (bVar != null) {
                long time = new Date().getTime();
                if (bVar.f.canExtendToken() && time - C2.e.getTime() > 3600000 && time - bVar.g.getTime() > 86400000) {
                    if (Intrinsics.c(Looper.getMainLooper(), Looper.myLooper())) {
                        C2.a();
                    } else {
                        new Handler(Looper.getMainLooper()).post(new io.sentry.cache.e(C2, 12));
                    }
                }
            }
            return r;
        } catch (Throwable th2) {
            o0.s(null);
            throw th2;
        }
    }

    public static q8.k z() {
        q8.k kVar;
        synchronized (q8.m.c()) {
            kVar = null;
            if (!Q8.a.b(q8.m.class)) {
                try {
                    kVar = q8.m.e;
                } catch (Throwable th2) {
                    Q8.a.a(q8.m.class, th2);
                }
            }
        }
        return kVar;
    }

    public C8.i A() {
        throw new UnsupportedOperationException("Method not decompiled: Ai.p.A():C8.i");
    }

    public synchronized KukuFMApplication B() {
        KukuFMApplication kukuFMApplication;
        kukuFMApplication = KukuFMApplication.H;
        if (kukuFMApplication == null) {
            kukuFMApplication = new KukuFMApplication();
        }
        return kukuFMApplication;
    }

    public p8.e C() {
        p8.e eVar;
        p8.e eVar2 = p8.e.g;
        if (eVar2 != null) {
            return eVar2;
        }
        synchronized (this) {
            eVar = p8.e.g;
            if (eVar == null) {
                Y2.c a = Y2.c.a(A.a());
                Intrinsics.checkNotNullExpressionValue(a, "getInstance(applicationContext)");
                p8.e eVar3 = new p8.e(a, new Tf.d(2));
                p8.e.g = eVar3;
                eVar = eVar3;
            }
        }
        return eVar;
    }

    public synchronized P D() {
        P p;
        try {
            if (P.e == null) {
                Y2.c a = Y2.c.a(A.a());
                Intrinsics.checkNotNullExpressionValue(a, "getInstance(applicationContext)");
                P.e = new P(a, new Tf.d(3));
            }
            p = P.e;
            if (p == null) {
                Intrinsics.m("instance");
                throw null;
            }
        } catch (Throwable th2) {
            throw th2;
        }
        return p;
    }

    public List S(ComponentRegistrar componentRegistrar) {
        ArrayList arrayList = new ArrayList();
        for (C0121b c0121b : componentRegistrar.getComponents()) {
            String str = c0121b.a;
            if (str != null) {
                Ad.e eVar = new Ad.e(2, str, c0121b);
                c0121b = new C0121b(str, c0121b.b, c0121b.c, c0121b.d, c0121b.e, eVar, c0121b.g);
            }
            arrayList.add(c0121b);
        }
        return arrayList;
    }

    public synchronized void U(String accessToken) {
        Intrinsics.checkNotNullParameter(accessToken, "accessToken");
        A.i(N.INCLUDE_ACCESS_TOKENS);
        V(accessToken);
    }

    public synchronized void V(String original) {
        Intrinsics.checkNotNullParameter(original, "original");
        Intrinsics.checkNotNullParameter("ACCESS_TOKEN_REMOVED", "replace");
        a0.e.put(original, "ACCESS_TOKEN_REMOVED");
    }

    public void a() {
    }

    public void b(f7.i iVar) {
    }

    public a5.e c(C0034c configuration) {
        Intrinsics.checkNotNullParameter(configuration, "configuration");
        return new b5.i(configuration.a, configuration.b, configuration.c, configuration.d, configuration.e);
    }

    public String d() {
        return null;
    }

    public void e(int i, Serializable serializable) {
        String str;
        switch (i) {
            case 1:
                str = "RESULT_INSTALL_SUCCESS";
                break;
            case 2:
                str = "RESULT_ALREADY_INSTALLED";
                break;
            case 3:
                str = "RESULT_UNSUPPORTED_ART_VERSION";
                break;
            case 4:
                str = "RESULT_NOT_WRITABLE";
                break;
            case 5:
                str = "RESULT_DESIRED_FORMAT_UNSUPPORTED";
                break;
            case 6:
                str = "RESULT_BASELINE_PROFILE_NOT_FOUND";
                break;
            case 7:
                str = "RESULT_IO_EXCEPTION";
                break;
            case 8:
                str = "RESULT_PARSE_EXCEPTION";
                break;
            case 9:
            default:
                str = HttpUrl.FRAGMENT_ENCODE_SET;
                break;
            case xd.A.TIME_TO_RESPONSE_COMPLETED_US_FIELD_NUMBER:
                str = "RESULT_INSTALL_SKIP_FILE_SUCCESS";
                break;
            case xd.A.NETWORK_CLIENT_ERROR_REASON_FIELD_NUMBER:
                str = "RESULT_DELETE_SKIP_FILE_SUCCESS";
                break;
        }
        if (i == 6 || i == 7 || i == 8) {
            Log.e("ProfileInstaller", str, (Throwable) serializable);
        } else {
            Log.d("ProfileInstaller", str);
        }
    }

    public Ea.d f(Context context, String str, Ea.c cVar) {
        switch (this.a) {
            case 4:
                Ea.d dVar = new Ea.d();
                int b = cVar.b(context, str, true);
                dVar.b = b;
                if (b != 0) {
                    dVar.c = 1;
                } else {
                    int c = cVar.c(context, str);
                    dVar.a = c;
                    if (c != 0) {
                        dVar.c = -1;
                    }
                }
                return dVar;
            default:
                Ea.d dVar2 = new Ea.d();
                dVar2.a = cVar.c(context, str);
                int i = 1;
                int b2 = cVar.b(context, str, true);
                dVar2.b = b2;
                int i2 = dVar2.a;
                if (i2 == 0) {
                    i2 = 0;
                    if (b2 == 0) {
                        i = 0;
                        dVar2.c = i;
                        return dVar2;
                    }
                }
                if (i2 >= b2) {
                    i = -1;
                }
                dVar2.c = i;
                return dVar2;
        }
    }

    public long g() {
        return SystemClock.elapsedRealtime();
    }

    public void h(String str, long j2) {
    }

    public void i(f7.i iVar) {
        iVar.l();
    }

    public void l() {
        Log.d("ProfileInstaller", "DIAGNOSTIC_PROFILE_IS_COMPRESSED");
    }

    public void onAdded(Object obj) {
        i8.c element = (i8.c) obj;
        Intrinsics.checkNotNullParameter(element, "element");
        C0058e.f215m = true;
    }

    public void onRemoved(Object obj) {
    }

    public JSONObject K(F sdkInstance, Hg.e logRequest) {
        String str;
        JSONObject jSONObject;
        String str2 = "sdkInstance";
        Intrinsics.checkNotNullParameter(sdkInstance, "sdkInstance");
        Intrinsics.checkNotNullParameter(logRequest, "logRequest");
        JSONObject jSONObject2 = new JSONObject();
        JSONObject value = (JSONObject) ((uf.g) logRequest).b.b;
        if (logRequest.e() != null) {
            value.put("session-id", logRequest.e());
        }
        Intrinsics.checkNotNullParameter("query_params", "key");
        Intrinsics.checkNotNullParameter(value, "value");
        jSONObject2.put("query_params", value);
        JSONArray value2 = new JSONArray();
        for (tf.e log : logRequest.c()) {
            Intrinsics.checkNotNullParameter(sdkInstance, str2);
            Intrinsics.checkNotNullParameter(log, "log");
            try {
                JSONObject value3 = new JSONObject();
                String c = log.b().c();
                Intrinsics.checkNotNullParameter("msg", "key");
                value3.put("msg", c);
                JSONArray value4 = new JSONArray();
                for (tf.d dVar : log.b().b()) {
                    try {
                        str = str2;
                    } catch (JSONException unused) {
                        str = str2;
                    }
                    try {
                        try {
                            value4.put(new JSONObject().put(dVar.a(), new JSONObject(dVar.b())));
                        } catch (JSONException unused2) {
                            try {
                                value4.put(new JSONObject().put(dVar.a(), new JSONArray(dVar.b())));
                            } catch (JSONException e) {
                                mf.h.a(sdkInstance.d, 1, e, null, new If.c(this, 0), 4);
                                value4.put(new JSONObject().put(dVar.a(), dVar.b()));
                            }
                            str2 = str;
                        }
                        str2 = str;
                    } catch (Throwable th2) {
                        th = th2;
                        mf.h.a(sdkInstance.d, 1, th, null, new If.c(this, 1), 4);
                        jSONObject = null;
                        if (jSONObject != null) {
                            value2.put(jSONObject);
                        }
                        str2 = str;
                    }
                }
                str = str2;
                if (value4.length() != 0) {
                    Intrinsics.checkNotNullParameter("object_data", "key");
                    Intrinsics.checkNotNullParameter(value4, "value");
                    value3.put("object_data", value4);
                }
                String a = log.b().a();
                if (a != null && !StringsKt.H(a)) {
                    String a2 = log.b().a();
                    Intrinsics.checkNotNullParameter("trace", "key");
                    value3.put("trace", a2);
                }
                jSONObject = new JSONObject();
                String a3 = log.a();
                Intrinsics.checkNotNullParameter("log_type", "key");
                jSONObject.put("log_type", a3);
                String c3 = log.c();
                Intrinsics.checkNotNullParameter("sent_time", "key");
                jSONObject.put("sent_time", c3);
                Intrinsics.checkNotNullParameter("lake_fields", "key");
                Intrinsics.checkNotNullParameter(value3, "value");
                jSONObject.put("lake_fields", value3);
            } catch (Throwable th3) {
                th = th3;
                str = str2;
            }
            if (jSONObject != null && jSONObject.length() != 0) {
                value2.put(jSONObject);
            }
            str2 = str;
        }
        String key = vJudY.uOfXxZXYL;
        Intrinsics.checkNotNullParameter(key, "key");
        Intrinsics.checkNotNullParameter(value2, "value");
        jSONObject2.put(key, value2);
        return jSONObject2;
    }
}