导航菜单

页面标题

页面副标题

Empower MX v1.29.4.340 - CustomerSheetActivity.java 源代码

正在查看: Empower MX v1.29.4.340 应用的 CustomerSheetActivity.java JAVA 源代码文件

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


package com.stripe.android.customersheet;

import Gf.M;
import Gf.p;
import Gf.s;
import Rf.N;
import android.content.Intent;
import android.os.Bundle;
import androidx.activity.ComponentActivity;
import androidx.core.view.n0;
import androidx.lifecycle.e0;
import androidx.lifecycle.f0;
import androidx.lifecycle.g0;
import com.stripe.android.customersheet.c;
import com.stripe.android.customersheet.d;
import com.stripe.android.customersheet.e;
import com.stripe.android.customersheet.j;
import fa.n;
import k0.l0;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import q8.AbstractC2854a;
import s0.O;
import s0.o;
import s0.q;
import s0.z1;
import sf.l;
import sf.m;
import sf.t;

@Metadata(d1 = {"\u0000F\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0000\u0018\u00002\u00020\u0001B\u0007¢\u0006\u0004\b\u0002\u0010\u0003J\u0017\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0002¢\u0006\u0004\b\u0007\u0010\bJ\u0019\u0010\u000b\u001a\u00020\u00062\b\u0010\n\u001a\u0004\u0018\u00010\tH\u0014¢\u0006\u0004\b\u000b\u0010\fJ\u000f\u0010\r\u001a\u00020\u0006H\u0016¢\u0006\u0004\b\r\u0010\u0003R\u001d\u0010\u0013\u001a\u0004\u0018\u00010\u000e8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u000f\u0010\u0010\u001a\u0004\b\u0011\u0010\u0012R.\u0010\u001d\u001a\b\u0012\u0004\u0012\u00020\u00150\u00148\u0000@\u0000X\u0081\u000e¢\u0006\u0018\n\u0004\b\u0016\u0010\u0017\u0012\u0004\b\u001c\u0010\u0003\u001a\u0004\b\u0018\u0010\u0019\"\u0004\b\u001a\u0010\u001bR\u001b\u0010\"\u001a\u00020\u001e8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u001f\u0010\u0010\u001a\u0004\b \u0010!¨\u0006%²\u0006\f\u0010$\u001a\u00020#8\nX\u008a\u0084\u0002²\u0006\u000e\u0010\u0005\u001a\u0004\u0018\u00010\u00048\nX\u008a\u0084\u0002"}, d2 = {"Lcom/stripe/android/customersheet/CustomerSheetActivity;", "Landroidx/appcompat/app/c;", "<init>", "()V", "Lcom/stripe/android/customersheet/j;", "result", "", "z1", "(Lcom/stripe/android/customersheet/j;)V", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "(Landroid/os/Bundle;)V", "finish", "Lcom/stripe/android/customersheet/c;", "b0", "Lsf/l;", "A1", "()Lcom/stripe/android/customersheet/c;", "args", "Lkotlin/Function0;", "Landroidx/lifecycle/f0$c;", "c0", "Lkotlin/jvm/functions/Function0;", "C1", "()Lkotlin/jvm/functions/Function0;", "setViewModelFactoryProducer$paymentsheet_release", "(Lkotlin/jvm/functions/Function0;)V", "getViewModelFactoryProducer$paymentsheet_release$annotations", "viewModelFactoryProducer", "Lcom/stripe/android/customersheet/e;", "d0", "B1", "()Lcom/stripe/android/customersheet/e;", "viewModel", "Lcom/stripe/android/customersheet/f;", "viewState", "paymentsheet_release"}, k = 1, mv = {1, 9, 0}, xi = 48)
public final class CustomerSheetActivity extends androidx.appcompat.app.c {

    private final l args = m.a(new a());

    private Function0 viewModelFactoryProducer = new f();

    private final l viewModel = new e0(M.b(com.stripe.android.customersheet.e.class), new c(this), new e(), new d(null, this));

    static final class a extends s implements Function0 {
        a() {
            super(0);
        }

        public final com.stripe.android.customersheet.c invoke() {
            c.a aVar = com.stripe.android.customersheet.c.i;
            Intent intent = CustomerSheetActivity.this.getIntent();
            Intrinsics.checkNotNullExpressionValue(intent, "getIntent(...)");
            return aVar.a(intent);
        }
    }

    static final class b extends s implements Function2 {

        static final class a extends s implements Function2 {
            final CustomerSheetActivity d;

            static final class C0295a extends kotlin.coroutines.jvm.internal.m implements Function2 {
                final CustomerSheetActivity F;
                Object d;
                Object e;
                int i;
                final z1 v;
                final ja.g w;

                C0295a(z1 z1Var, ja.g gVar, CustomerSheetActivity customerSheetActivity, vf.b bVar) {
                    super(2, bVar);
                    this.v = z1Var;
                    this.w = gVar;
                    this.F = customerSheetActivity;
                }

                public final vf.b create(Object obj, vf.b bVar) {
                    return new C0295a(this.v, this.w, this.F, bVar);
                }

                public final Object invoke(N n, vf.b bVar) {
                    return create(n, bVar).invokeSuspend(Unit.a);
                }

                public final Object invokeSuspend(Object obj) {
                    j jVar;
                    CustomerSheetActivity customerSheetActivity;
                    Object f = wf.b.f();
                    int i = this.i;
                    if (i == 0) {
                        t.b(obj);
                        j g = a.g(this.v);
                        if (g != null) {
                            ja.g gVar = this.w;
                            CustomerSheetActivity customerSheetActivity2 = this.F;
                            this.d = customerSheetActivity2;
                            this.e = g;
                            this.i = 1;
                            if (gVar.c(this) == f) {
                                return f;
                            }
                            jVar = g;
                            customerSheetActivity = customerSheetActivity2;
                        }
                        return Unit.a;
                    }
                    if (i != 1) {
                        throw new IllegalStateException("call to 'resume' before 'invoke' with coroutine");
                    }
                    jVar = (j) this.e;
                    customerSheetActivity = (CustomerSheetActivity) this.d;
                    t.b(obj);
                    customerSheetActivity.z1(jVar);
                    return Unit.a;
                }
            }

            static final class C0296b extends s implements Function0 {
                final CustomerSheetActivity d;

                C0296b(CustomerSheetActivity customerSheetActivity) {
                    super(0);
                    this.d = customerSheetActivity;
                }

                public final void a() {
                    this.d.B1().U(d.c.a);
                }

                public Object invoke() {
                    a();
                    return Unit.a;
                }
            }

            static final class c extends s implements Function0 {
                final CustomerSheetActivity d;

                c(CustomerSheetActivity customerSheetActivity) {
                    super(0);
                    this.d = customerSheetActivity;
                }

                public final void a() {
                    this.d.B1().U(d.h.a);
                }

                public Object invoke() {
                    a();
                    return Unit.a;
                }
            }

            static final class d extends s implements Function2 {
                final CustomerSheetActivity d;
                final z1 e;

                class C0297a extends p implements Function1 {
                    C0297a(Object obj) {
                        super(1, obj, com.stripe.android.customersheet.e.class, "handleViewAction", "handleViewAction(Lcom/stripe/android/customersheet/CustomerSheetViewAction;)V", 0);
                    }

                    public Object invoke(Object obj) {
                        u((com.stripe.android.customersheet.d) obj);
                        return Unit.a;
                    }

                    public final void u(com.stripe.android.customersheet.d dVar) {
                        Intrinsics.checkNotNullParameter(dVar, "p0");
                        ((com.stripe.android.customersheet.e) ((Gf.f) this).e).U(dVar);
                    }
                }

                class C0298b extends p implements Function1 {
                    C0298b(Object obj) {
                        super(1, obj, com.stripe.android.customersheet.e.class, "providePaymentMethodName", "providePaymentMethodName(Ljava/lang/String;)Ljava/lang/String;", 0);
                    }

                    public final String invoke(String str) {
                        return ((com.stripe.android.customersheet.e) ((Gf.f) this).e).n0(str);
                    }
                }

                d(CustomerSheetActivity customerSheetActivity, z1 z1Var) {
                    super(2);
                    this.d = customerSheetActivity;
                    this.e = z1Var;
                }

                public final void a(s0.l lVar, int i) {
                    if ((i & 11) == 2 && lVar.w()) {
                        lVar.F();
                        return;
                    }
                    if (o.H()) {
                        o.Q(1927642793, i, -1, "com.stripe.android.customersheet.CustomerSheetActivity.onCreate.<anonymous>.<anonymous>.<anonymous> (CustomerSheetActivity.kt:97)");
                    }
                    D8.a.b(a.f(this.e), false, null, new C0297a(this.d.B1()), new C0298b(this.d.B1()), lVar, 8, 6);
                    if (o.H()) {
                        o.P();
                    }
                }

                public Object invoke(Object obj, Object obj2) {
                    a((s0.l) obj, ((Number) obj2).intValue());
                    return Unit.a;
                }
            }

            static final class e extends s implements Function1 {
                final CustomerSheetActivity d;

                e(CustomerSheetActivity customerSheetActivity) {
                    super(1);
                    this.d = customerSheetActivity;
                }

                public final Boolean invoke(l0 l0Var) {
                    Intrinsics.checkNotNullParameter(l0Var, "it");
                    return Boolean.valueOf(l0Var == l0.d ? this.d.B1().J() : true);
                }
            }

            a(CustomerSheetActivity customerSheetActivity) {
                super(2);
                this.d = customerSheetActivity;
            }

            public static final com.stripe.android.customersheet.f f(z1 z1Var) {
                return (com.stripe.android.customersheet.f) z1Var.getValue();
            }

            public static final j g(z1 z1Var) {
                return (j) z1Var.getValue();
            }

            public final void d(s0.l lVar, int i) {
                if ((i & 11) == 2 && lVar.w()) {
                    lVar.F();
                    return;
                }
                if (o.H()) {
                    o.Q(-295136510, i, -1, "com.stripe.android.customersheet.CustomerSheetActivity.onCreate.<anonymous>.<anonymous> (CustomerSheetActivity.kt:69)");
                }
                ja.g b = ja.h.b((l0) null, new e(this.d), lVar, 0, 1);
                z1 a = ra.g.a(this.d.B1().R(), lVar, 8);
                z1 a2 = ra.g.a(this.d.B1().Q(), lVar, 8);
                O.f(g(a2), new C0295a(a2, b, this.d, null), lVar, 72);
                e.d.a(false, new C0296b(this.d), lVar, 0, 1);
                AbstractC2854a.a(b, null, new c(this.d), A0.c.b(lVar, 1927642793, true, new d(this.d, a)), lVar, ja.g.e | 3072, 2);
                if (o.H()) {
                    o.P();
                }
            }

            public Object invoke(Object obj, Object obj2) {
                d((s0.l) obj, ((Number) obj2).intValue());
                return Unit.a;
            }
        }

        b() {
            super(2);
        }

        public final void a(s0.l lVar, int i) {
            if ((i & 11) == 2 && lVar.w()) {
                lVar.F();
                return;
            }
            if (o.H()) {
                o.Q(602239828, i, -1, "com.stripe.android.customersheet.CustomerSheetActivity.onCreate.<anonymous> (CustomerSheetActivity.kt:68)");
            }
            fa.m.a((fa.h) null, (fa.j) null, (n) null, A0.c.b(lVar, -295136510, true, new a(CustomerSheetActivity.this)), lVar, 3072, 7);
            if (o.H()) {
                o.P();
            }
        }

        public Object invoke(Object obj, Object obj2) {
            a((s0.l) obj, ((Number) obj2).intValue());
            return Unit.a;
        }
    }

    public static final class c extends s implements Function0 {
        final ComponentActivity d;

        public c(ComponentActivity componentActivity) {
            super(0);
            this.d = componentActivity;
        }

        public final g0 invoke() {
            return this.d.H();
        }
    }

    public static final class d extends s implements Function0 {
        final Function0 d;
        final ComponentActivity e;

        public d(Function0 function0, ComponentActivity componentActivity) {
            super(0);
            this.d = function0;
            this.e = componentActivity;
        }

        public final n2.a invoke() {
            n2.a aVar;
            Function0 function0 = this.d;
            return (function0 == null || (aVar = (n2.a) function0.invoke()) == null) ? this.e.A() : aVar;
        }
    }

    static final class e extends s implements Function0 {
        e() {
            super(0);
        }

        public final f0.c invoke() {
            return (f0.c) CustomerSheetActivity.this.getViewModelFactoryProducer().invoke();
        }
    }

    static final class f extends s implements Function0 {
        f() {
            super(0);
        }

        public final e.C1456b invoke() {
            com.stripe.android.customersheet.c A1 = CustomerSheetActivity.this.A1();
            Intrinsics.f(A1);
            return new e.C1456b(A1);
        }
    }

    public final com.stripe.android.customersheet.c A1() {
        return (com.stripe.android.customersheet.c) this.args.getValue();
    }

    public final com.stripe.android.customersheet.e B1() {
        return (com.stripe.android.customersheet.e) this.viewModel.getValue();
    }

    public final void z1(j result) {
        setResult(-1, new Intent().putExtras(result.a()));
        finish();
    }

    public final Function0 getViewModelFactoryProducer() {
        return this.viewModelFactoryProducer;
    }

    public void finish() {
        super/*android.app.Activity*/.finish();
        ra.c.a(this);
    }

    protected void onCreate(Bundle savedInstanceState) {
        super/*androidx.fragment.app.i*/.onCreate(savedInstanceState);
        n0.b(getWindow(), false);
        if (A1() == null) {
            z1(new j.c(new IllegalStateException("No CustomerSheetContract.Args provided")));
        } else {
            B1().o0(this, this);
            e.e.b(this, (q) null, A0.c.c(602239828, true, new b()), 1, (Object) null);
        }
    }
}