导航菜单

页面标题

页面副标题

Crafto v9.3.3 - FinancialConnectionsSheetActivity.java 源代码

正在查看: Crafto v9.3.3 应用的 FinancialConnectionsSheetActivity.java JAVA 源代码文件

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


package com.stripe.android.financialconnections;

import Hk.k;
import Uk.n;
import Uk.p;
import Uk.q;
import W3.d;
import al.m;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import androidx.activity.ComponentActivity;
import androidx.activity.result.ActivityResult;
import androidx.appcompat.app.AppCompatActivity;
import androidx.fragment.app.Fragment;
import androidx.lifecycle.I;
import androidx.lifecycle.u;
import androidx.lifecycle.v0;
import androidx.lifecycle.x0;
import com.stripe.android.financialconnections.FinancialConnectionsSheetViewEffect;
import com.stripe.android.financialconnections.launcher.FinancialConnectionsSheetActivityResult;
import com.stripe.android.financialconnections.presentation.CreateBrowserIntentForUrl;
import dl.u0;
import i.c;
import j.g;
import java.io.Serializable;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.functions.Function3;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.Reflection;
import n5.F;
import n5.G;
import n5.J;
import n5.O;
import n5.Q;
import n5.T;
import n5.V;
import n5.Z;
import n5.a0;
import n5.b;
import n5.c0;
import n5.f0;
import n5.g0;
import n5.h;
import n5.i0;
import n5.o;
import n5.r;
import n5.v;
import org.jetbrains.annotations.NotNull;
import y2.a;
import y2.f;

@Metadata
public final class FinancialConnectionsSheetActivity extends AppCompatActivity implements F {

    @NotNull
    private final c<Intent> startForResult;

    @NotNull
    private final k viewModel$delegate;

    public FinancialConnectionsSheetActivity() {
        super(R.layout.activity_financialconnections_sheet);
        final al.c orCreateKotlinClass = Reflection.getOrCreateKotlinClass(FinancialConnectionsSheetViewModel.class);
        this.viewModel$delegate = new i0(this, (FinancialConnectionsSheetActivity$special$$inlined$viewModel$default$1) new Function0<FinancialConnectionsSheetViewModel>() {
            {
                super(0);
            }

            @NotNull
            public final FinancialConnectionsSheetViewModel invoke() {
                c0 c0Var;
                Class a = Tk.a.a(orCreateKotlinClass);
                ComponentActivity componentActivity = this;
                Bundle extras = componentActivity.getIntent().getExtras();
                Object obj = extras == null ? null : extras.get("mavericks:arg");
                d savedStateRegistry = componentActivity.getSavedStateRegistry();
                Intrinsics.checkNotNullExpressionValue(savedStateRegistry, "class ActivityViewModelC…y,\n) : ViewModelContext()");
                g0 aVar = new n5.a(componentActivity, obj, componentActivity, savedStateRegistry);
                String name = Tk.a.a(orCreateKotlinClass).getName();
                Intrinsics.checkNotNullExpressionValue(name, "viewModelClass.java.name");
                Z z = new Z();
                Intrinsics.checkNotNullParameter(a, "viewModelClass");
                Intrinsics.checkNotNullParameter(FinancialConnectionsSheetState.class, "stateClass");
                Intrinsics.checkNotNullParameter(aVar, "viewModelContext");
                Intrinsics.checkNotNullParameter(name, "key");
                Intrinsics.checkNotNullParameter(z, "initialStateFactory");
                d dVar = ((n5.a) aVar).d;
                if (!dVar.d) {
                    throw new IllegalStateException("You can only access a view model after super.onCreate of your activity/fragment has been called.".toString());
                }
                Bundle a2 = dVar.a(name);
                u uVar = ((n5.a) aVar).c;
                if (a2 == null) {
                    c0Var = null;
                } else {
                    Object obj2 = a2.get("mvrx:saved_args");
                    Bundle bundle = a2.getBundle("mvrx:saved_instance_state");
                    Serializable serializable = a2.getSerializable("mvrx:saved_viewmodel_class");
                    Class cls = serializable instanceof Class ? (Class) serializable : null;
                    Serializable serializable2 = a2.getSerializable("mvrx:saved_state_class");
                    Class cls2 = serializable2 instanceof Class ? (Class) serializable2 : null;
                    if (bundle == null) {
                        throw new IllegalArgumentException("State was not saved prior to restoring!".toString());
                    }
                    if (cls == null) {
                        throw new IllegalArgumentException("ViewModel class was not properly saved prior to restoring!".toString());
                    }
                    if (cls2 == null) {
                        throw new IllegalArgumentException("State class was not properly saved prior to restoring!".toString());
                    }
                    ComponentActivity componentActivity2 = ((n5.a) aVar).a;
                    Intrinsics.checkNotNullParameter(componentActivity2, "activity");
                    Intrinsics.checkNotNullParameter(uVar, "owner");
                    Intrinsics.checkNotNullParameter(dVar, "savedStateRegistry");
                    c0Var = new c0(new n5.a(componentActivity2, obj2, uVar, dVar), cls, cls2, new T(bundle));
                }
                if (c0Var != null) {
                    aVar = c0Var.a;
                }
                g0 g0Var = aVar;
                r rVar = new r(a, g0Var, name, c0Var, false, z);
                Intrinsics.checkNotNullParameter(uVar, "owner");
                Intrinsics.checkNotNullParameter(rVar, "factory");
                x0 viewModelStore = uVar.getViewModelStore();
                Intrinsics.checkNotNullParameter(uVar, "owner");
                y2.a defaultViewModelCreationExtras = uVar instanceof u ? uVar.getDefaultViewModelCreationExtras() : a.a.b;
                Intrinsics.checkNotNullParameter(viewModelStore, "store");
                Intrinsics.checkNotNullParameter(rVar, "factory");
                Intrinsics.checkNotNullParameter(defaultViewModelCreationExtras, "defaultCreationExtras");
                f fVar = new f(viewModelStore, rVar, defaultViewModelCreationExtras);
                Intrinsics.checkNotNullParameter(name, "key");
                Intrinsics.checkNotNullParameter(V.class, "modelClass");
                Intrinsics.checkNotNullParameter(V.class, "<this>");
                V a3 = fVar.a(Reflection.getOrCreateKotlinClass(V.class), name);
                try {
                    dVar.c(name, new Q(a3, g0Var, c0Var, a));
                } catch (IllegalArgumentException unused) {
                }
                return a3.a;
            }
        });
        c<Intent> registerForActivityResult = registerForActivityResult(new g(), new a(this));
        Intrinsics.checkNotNullExpressionValue(registerForActivityResult, "registerForActivityResul….onActivityResult()\n    }");
        this.startForResult = registerForActivityResult;
    }

    public final void finishWithResult(FinancialConnectionsSheetActivityResult financialConnectionsSheetActivityResult) {
        setResult(-1, new Intent().putExtras(financialConnectionsSheetActivityResult.toBundle()));
        finish();
    }

    public static final void m88startForResult$lambda0(FinancialConnectionsSheetActivity financialConnectionsSheetActivity, ActivityResult activityResult) {
        Intrinsics.checkNotNullParameter(financialConnectionsSheetActivity, "this$0");
        financialConnectionsSheetActivity.getViewModel().onActivityResult$financial_connections_release();
    }

    @NotNull
    public <T> u0 collectLatest(@NotNull gl.f<? extends T> fVar, @NotNull h hVar, @NotNull Function2<? super T, ? super Kk.c<? super Unit>, ? extends Object> function2) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(fVar, "receiver");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(function2, "action");
        G mavericksViewInternalViewModel = getMavericksViewInternalViewModel();
        return o.a(fVar, getSubscriptionLifecycleOwner(), mavericksViewInternalViewModel.a, mavericksViewInternalViewModel.b, hVar, function2);
    }

    @NotNull
    public G getMavericksViewInternalViewModel() {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(this, "owner");
        x0 viewModelStore = getViewModelStore();
        Intrinsics.checkNotNullParameter(this, "owner");
        v0.b defaultViewModelProviderFactory = getDefaultViewModelProviderFactory();
        Intrinsics.checkNotNullParameter(this, "owner");
        y2.a defaultViewModelCreationExtras = getDefaultViewModelCreationExtras();
        Intrinsics.checkNotNullParameter(viewModelStore, "store");
        Intrinsics.checkNotNullParameter(defaultViewModelProviderFactory, "factory");
        Intrinsics.checkNotNullParameter(defaultViewModelCreationExtras, "defaultCreationExtras");
        f fVar = new f(viewModelStore, defaultViewModelProviderFactory, defaultViewModelCreationExtras);
        Intrinsics.checkNotNullParameter(G.class, "modelClass");
        al.c c = Tk.a.c(G.class);
        Intrinsics.checkNotNullParameter(c, "modelClass");
        Intrinsics.checkNotNullParameter(c, "modelClass");
        String a = A2.g.a(c);
        if (a == null) {
            throw new IllegalArgumentException("Local and anonymous classes can not be ViewModels".toString());
        }
        G a2 = fVar.a(c, "androidx.lifecycle.ViewModelProvider.DefaultKey:".concat(a));
        Intrinsics.checkNotNullExpressionValue(a2, "ViewModelProvider(this).…nalViewModel::class.java)");
        return a2;
    }

    @NotNull
    public String getMvrxViewId() {
        Intrinsics.checkNotNullParameter(this, "this");
        return getMavericksViewInternalViewModel().c;
    }

    @NotNull
    public I getSubscriptionLifecycleOwner() {
        Intrinsics.checkNotNullParameter(this, "this");
        try {
            Fragment fragment = this instanceof Fragment ? (Fragment) this : null;
            if (fragment != null) {
                I viewLifecycleOwner = fragment.getViewLifecycleOwner();
                if (viewLifecycleOwner != null) {
                    return viewLifecycleOwner;
                }
            }
        } catch (IllegalStateException unused) {
        }
        return this;
    }

    @NotNull
    public final FinancialConnectionsSheetViewModel getViewModel() {
        return (FinancialConnectionsSheetViewModel) this.viewModel$delegate.getValue();
    }

    public void invalidate() {
        FinancialConnectionsSheetViewModel viewModel = getViewModel();
        Function1<FinancialConnectionsSheetState, Unit> function1 = new Function1<FinancialConnectionsSheetState, Unit>() {
            {
                super(1);
            }

            public final Unit invoke(@NotNull FinancialConnectionsSheetState financialConnectionsSheetState) {
                c cVar;
                Intrinsics.checkNotNullParameter(financialConnectionsSheetState, "state");
                FinancialConnectionsSheetViewEffect viewEffect = financialConnectionsSheetState.getViewEffect();
                if (viewEffect == null) {
                    return null;
                }
                ?? r0 = FinancialConnectionsSheetActivity.this;
                if (viewEffect instanceof FinancialConnectionsSheetViewEffect.OpenAuthFlowWithUrl) {
                    cVar = ((FinancialConnectionsSheetActivity) r0).startForResult;
                    CreateBrowserIntentForUrl createBrowserIntentForUrl = CreateBrowserIntentForUrl.INSTANCE;
                    Uri parse = Uri.parse(((FinancialConnectionsSheetViewEffect.OpenAuthFlowWithUrl) viewEffect).getUrl());
                    Intrinsics.checkNotNullExpressionValue(parse, "parse(viewEffect.url)");
                    cVar.launch(createBrowserIntentForUrl.invoke(r0, parse));
                } else if (viewEffect instanceof FinancialConnectionsSheetViewEffect.FinishWithResult) {
                    r0.finishWithResult(((FinancialConnectionsSheetViewEffect.FinishWithResult) viewEffect).getResult());
                }
                r0.getViewModel().onViewEffectLaunched();
                return Unit.a;
            }
        };
        Intrinsics.checkNotNullParameter(viewModel, "viewModel1");
        Intrinsics.checkNotNullParameter(function1, "block");
        function1.invoke(viewModel.getState$mvrx_release());
    }

    @NotNull
    public <S extends v, T> u0 onAsync(@NotNull J<S> j, @NotNull m<S, ? extends b<? extends T>> mVar, @NotNull h hVar, Function2<? super Throwable, ? super Kk.c<? super Unit>, ? extends Object> function2, Function2<? super T, ? super Kk.c<? super Unit>, ? extends Object> function22) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(j, "receiver");
        Intrinsics.checkNotNullParameter(mVar, "asyncProp");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        return O.h(j, getSubscriptionLifecycleOwner(), mVar, hVar, function2, function22);
    }

    public void onBackPressed() {
        super/*androidx.activity.ComponentActivity*/.onBackPressed();
        finishWithResult(FinancialConnectionsSheetActivityResult.Canceled.INSTANCE);
    }

    public void onCreate(Bundle bundle) {
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
        onEach(getViewModel(), a0.a, new FinancialConnectionsSheetActivity$onCreate$1(this, null));
        if (bundle != null) {
            getViewModel().onActivityRecreated();
        }
    }

    @NotNull
    public <S extends v, A, B, C, D, E, F, G> u0 onEach(@NotNull J<S> j, @NotNull m<S, ? extends A> mVar, @NotNull m<S, ? extends B> mVar2, @NotNull m<S, ? extends C> mVar3, @NotNull m<S, ? extends D> mVar4, @NotNull m<S, ? extends E> mVar5, @NotNull m<S, ? extends F> mVar6, @NotNull m<S, ? extends G> mVar7, @NotNull h hVar, @NotNull Uk.r<? super A, ? super B, ? super C, ? super D, ? super E, ? super F, ? super G, ? super Kk.c<? super Unit>, ? extends Object> rVar) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(j, "receiver");
        Intrinsics.checkNotNullParameter(mVar, "prop1");
        Intrinsics.checkNotNullParameter(mVar2, "prop2");
        Intrinsics.checkNotNullParameter(mVar3, "prop3");
        Intrinsics.checkNotNullParameter(mVar4, "prop4");
        Intrinsics.checkNotNullParameter(mVar5, "prop5");
        Intrinsics.checkNotNullParameter(mVar6, "prop6");
        Intrinsics.checkNotNullParameter(mVar7, "prop7");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(rVar, "action");
        return O.g(j, getSubscriptionLifecycleOwner(), mVar, mVar2, mVar3, mVar4, mVar5, mVar6, mVar7, hVar, rVar);
    }

    public void onNewIntent(Intent intent) {
        super/*androidx.activity.ComponentActivity*/.onNewIntent(intent);
        getViewModel().handleOnNewIntent$financial_connections_release(intent);
    }

    public void onResume() {
        super/*androidx.fragment.app.FragmentActivity*/.onResume();
        getViewModel().onResume$financial_connections_release();
    }

    public void postInvalidate() {
        Intrinsics.checkNotNullParameter(this, "this");
        if (n5.I.a.add(Integer.valueOf(System.identityHashCode(this)))) {
            Handler handler = n5.I.b;
            handler.sendMessage(Message.obtain(handler, System.identityHashCode(this), this));
        }
    }

    @NotNull
    public f0 uniqueOnly(String str) {
        Intrinsics.checkNotNullParameter(this, "this");
        String[] strArr = {getMvrxViewId(), Reflection.getOrCreateKotlinClass(f0.class).getSimpleName(), str};
        Intrinsics.checkNotNullParameter(strArr, "elements");
        return new f0(CollectionsKt.J(kotlin.collections.o.t(strArr), "_", (String) null, (String) null, (Function1) null, 62));
    }

    @NotNull
    public <S extends v, A, B, C, D, E, F> u0 onEach(@NotNull J<S> j, @NotNull m<S, ? extends A> mVar, @NotNull m<S, ? extends B> mVar2, @NotNull m<S, ? extends C> mVar3, @NotNull m<S, ? extends D> mVar4, @NotNull m<S, ? extends E> mVar5, @NotNull m<S, ? extends F> mVar6, @NotNull h hVar, @NotNull q<? super A, ? super B, ? super C, ? super D, ? super E, ? super F, ? super Kk.c<? super Unit>, ? extends Object> qVar) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(j, "receiver");
        Intrinsics.checkNotNullParameter(mVar, "prop1");
        Intrinsics.checkNotNullParameter(mVar2, "prop2");
        Intrinsics.checkNotNullParameter(mVar3, "prop3");
        Intrinsics.checkNotNullParameter(mVar4, "prop4");
        Intrinsics.checkNotNullParameter(mVar5, "prop5");
        Intrinsics.checkNotNullParameter(mVar6, "prop6");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(qVar, "action");
        return O.f(j, getSubscriptionLifecycleOwner(), mVar, mVar2, mVar3, mVar4, mVar5, mVar6, hVar, qVar);
    }

    @NotNull
    public <S extends v, A, B, C, D, E> u0 onEach(@NotNull J<S> j, @NotNull m<S, ? extends A> mVar, @NotNull m<S, ? extends B> mVar2, @NotNull m<S, ? extends C> mVar3, @NotNull m<S, ? extends D> mVar4, @NotNull m<S, ? extends E> mVar5, @NotNull h hVar, @NotNull p<? super A, ? super B, ? super C, ? super D, ? super E, ? super Kk.c<? super Unit>, ? extends Object> pVar) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(j, "receiver");
        Intrinsics.checkNotNullParameter(mVar, "prop1");
        Intrinsics.checkNotNullParameter(mVar2, "prop2");
        Intrinsics.checkNotNullParameter(mVar3, "prop3");
        Intrinsics.checkNotNullParameter(mVar4, "prop4");
        Intrinsics.checkNotNullParameter(mVar5, "prop5");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(pVar, "action");
        return O.e(j, getSubscriptionLifecycleOwner(), mVar, mVar2, mVar3, mVar4, mVar5, hVar, pVar);
    }

    @NotNull
    public <S extends v, A, B, C, D> u0 onEach(@NotNull J<S> j, @NotNull m<S, ? extends A> mVar, @NotNull m<S, ? extends B> mVar2, @NotNull m<S, ? extends C> mVar3, @NotNull m<S, ? extends D> mVar4, @NotNull h hVar, @NotNull Uk.o<? super A, ? super B, ? super C, ? super D, ? super Kk.c<? super Unit>, ? extends Object> oVar) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(j, "receiver");
        Intrinsics.checkNotNullParameter(mVar, "prop1");
        Intrinsics.checkNotNullParameter(mVar2, "prop2");
        Intrinsics.checkNotNullParameter(mVar3, "prop3");
        Intrinsics.checkNotNullParameter(mVar4, "prop4");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(oVar, "action");
        return O.d(j, getSubscriptionLifecycleOwner(), mVar, mVar2, mVar3, mVar4, hVar, oVar);
    }

    @NotNull
    public <S extends v, A, B, C> u0 onEach(@NotNull J<S> j, @NotNull m<S, ? extends A> mVar, @NotNull m<S, ? extends B> mVar2, @NotNull m<S, ? extends C> mVar3, @NotNull h hVar, @NotNull n<? super A, ? super B, ? super C, ? super Kk.c<? super Unit>, ? extends Object> nVar) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(j, "receiver");
        Intrinsics.checkNotNullParameter(mVar, "prop1");
        Intrinsics.checkNotNullParameter(mVar2, "prop2");
        Intrinsics.checkNotNullParameter(mVar3, "prop3");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(nVar, "action");
        return O.c(j, getSubscriptionLifecycleOwner(), mVar, mVar2, mVar3, hVar, nVar);
    }

    @NotNull
    public <S extends v, A, B> u0 onEach(@NotNull J<S> j, @NotNull m<S, ? extends A> mVar, @NotNull m<S, ? extends B> mVar2, @NotNull h hVar, @NotNull Function3<? super A, ? super B, ? super Kk.c<? super Unit>, ? extends Object> function3) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(j, "receiver");
        Intrinsics.checkNotNullParameter(mVar, "prop1");
        Intrinsics.checkNotNullParameter(mVar2, "prop2");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(function3, "action");
        return O.b(j, getSubscriptionLifecycleOwner(), mVar, mVar2, hVar, function3);
    }

    @NotNull
    public <S extends v, A> u0 onEach(@NotNull J<S> j, @NotNull m<S, ? extends A> mVar, @NotNull h hVar, @NotNull Function2<? super A, ? super Kk.c<? super Unit>, ? extends Object> function2) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(j, "receiver");
        Intrinsics.checkNotNullParameter(mVar, "prop1");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(function2, "action");
        return O.a(j, getSubscriptionLifecycleOwner(), mVar, hVar, function2);
    }

    @NotNull
    public <S extends v> u0 onEach(@NotNull J<S> j, @NotNull h hVar, @NotNull Function2<? super S, ? super Kk.c<? super Unit>, ? extends Object> function2) {
        Intrinsics.checkNotNullParameter(this, "this");
        Intrinsics.checkNotNullParameter(j, "receiver");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(function2, "action");
        I subscriptionLifecycleOwner = getSubscriptionLifecycleOwner();
        Intrinsics.checkNotNullParameter(j, "<this>");
        Intrinsics.checkNotNullParameter(hVar, "deliveryMode");
        Intrinsics.checkNotNullParameter(function2, "action");
        return j.resolveSubscription$mvrx_release(j.getStateFlow(), subscriptionLifecycleOwner, hVar, function2);
    }
}