Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9

以下内容为反编译后的 OAuthServiceImpl$handleAuthCallBack$2.java 源代码,内容仅作参考


package com.picsart.jedi.auth.thirdparty.impl;

import com.picsart.jedi.auth.thirdparty.model.OauthRequest;
import com.picsart.jedi.auth.thirdparty.model.OauthResponse;
import java.net.URLDecoder;
import java.util.ArrayList;
import java.util.Iterator;
import kotlin.Metadata;
import kotlin.Result;
import kotlin.Unit;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import myobfuscated.ik2.i;
import myobfuscated.mk2.c;
import myobfuscated.mn2.k;
import myobfuscated.ok2.d;
import myobfuscated.pn2.f0;
import myobfuscated.zg1.a;
import okhttp3.h;
import org.jetbrains.annotations.NotNull;
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001*\u00020\u0000H\u008a@"}, d2 = {"Lmyobfuscated/pn2/f0;", "Lkotlin/Result;", "Lcom/picsart/jedi/auth/thirdparty/model/OauthResponse;", "<anonymous>"}, k = 3, mv = {1, 9, 0})
@d(c = "com.picsart.jedi.auth.thirdparty.impl.OAuthServiceImpl$handleAuthCallBack$2", f = "OAuthServiceImpl.kt", l = {}, m = "invokeSuspend")
public final class OAuthServiceImpl$handleAuthCallBack$2 extends SuspendLambda implements Function2<f0, c<? super Result<? extends OauthResponse>>, Object> {
    final h $url;
    int label;
    final OAuthServiceImpl this$0;

    public OAuthServiceImpl$handleAuthCallBack$2(OAuthServiceImpl oAuthServiceImpl, h hVar, c<? super OAuthServiceImpl$handleAuthCallBack$2> cVar) {
        super(2, cVar);
        this.this$0 = oAuthServiceImpl;
        this.$url = hVar;
    }

    @Override
    @NotNull
    public final c<Unit> create(Object obj, @NotNull c<?> cVar) {
        return new OAuthServiceImpl$handleAuthCallBack$2(this.this$0, this.$url, cVar);
    }

    @Override
    public Object invoke(f0 f0Var, c<? super Result<? extends OauthResponse>> cVar) {
        return invoke2(f0Var, (c<? super Result<OauthResponse>>) cVar);
    }

    public final Object invoke2(@NotNull f0 f0Var, c<? super Result<OauthResponse>> cVar) {
        return ((OAuthServiceImpl$handleAuthCallBack$2) create(f0Var, cVar)).invokeSuspend(Unit.a);
    }

    @Override
    public final Object invokeSuspend(@NotNull Object obj) {
        Object m287constructorimpl;
        String str;
        String str2 = "";
        CoroutineSingletons coroutineSingletons = CoroutineSingletons.COROUTINE_SUSPENDED;
        if (this.label == 0) {
            i.b(obj);
            OAuthServiceImpl oAuthServiceImpl = this.this$0;
            h hVar = this.$url;
            a aVar = oAuthServiceImpl.a;
            try {
                try {
                    Object b = aVar.b("", myobfuscated.uj2.a.REQUEST_KEY_EXTRA);
                    aVar.c(myobfuscated.uj2.a.REQUEST_KEY_EXTRA);
                    str = (String) b;
                } catch (Exception e) {
                    Result.a aVar2 = Result.Companion;
                    m287constructorimpl = Result.m287constructorimpl(i.a(e));
                }
                if (!k.o(str)) {
                    OauthRequest oauthRequest = (OauthRequest) oAuthServiceImpl.b.fromJson(str, (Class<Object>) OauthRequest.class);
                    if (oAuthServiceImpl.c(hVar, oauthRequest.b())) {
                        Object b2 = aVar.b("", "key.redirect.url");
                        aVar.c("key.redirect.url");
                        CharSequence charSequence = (CharSequence) b2;
                        if (k.o(charSequence)) {
                            charSequence = null;
                        }
                        if (charSequence != null) {
                            String str3 = (String) charSequence;
                            Intrinsics.checkNotNullParameter("https://ignore", "<this>");
                            h.a aVar3 = new h.a();
                            aVar3.e(null, "https://ignore");
                            h.a f = aVar3.b().f();
                            ArrayList arrayList = new ArrayList();
                            for (Object obj2 : hVar.i()) {
                                if (!Intrinsics.c((String) obj2, oauthRequest.b())) {
                                    arrayList.add(obj2);
                                }
                            }
                            Iterator it = arrayList.iterator();
                            while (it.hasNext()) {
                                String str4 = (String) it.next();
                                f.a(str4, URLDecoder.decode(hVar.h(str4), "UTF-8"));
                            }
                            Result.a aVar4 = Result.Companion;
                            String d = oauthRequest.d();
                            String d2 = f.b().d();
                            if (d2 != null) {
                                str2 = d2;
                            }
                            m287constructorimpl = Result.m287constructorimpl(new OauthResponse(d, str3, str2));
                            aVar.clearAll();
                            return Result.m286boximpl(m287constructorimpl);
                        }
                        throw new IllegalStateException("something went wrong".toString());
                    }
                    throw new IllegalStateException("something went wrong".toString());
                }
                throw new IllegalStateException("something went wrong".toString());
            } catch (Throwable th) {
                aVar.clearAll();
                throw th;
            }
        }
        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
    }
}