导航菜单

页面标题

页面副标题

BodyTech v7.6.4 - GooglePayLauncherViewModel.java 源代码

正在查看: BodyTech v7.6.4 应用的 GooglePayLauncherViewModel.java JAVA 源代码文件

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


package com.stripe.android.googlepaylauncher;

import android.app.Application;
import android.content.Intent;
import androidx.annotation.VisibleForTesting;
import androidx.compose.runtime.internal.StabilityInferred;
import androidx.lifecycle.SavedStateHandle;
import androidx.lifecycle.SavedStateHandleSupport;
import androidx.lifecycle.ViewModel;
import androidx.lifecycle.ViewModelKt;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.n;
import androidx.lifecycle.viewmodel.CreationExtras;
import com.google.android.gms.tasks.Task;
import com.newrelic.agent.android.instrumentation.Instrumented;
import com.stripe.android.GooglePayJsonFactory;
import com.stripe.android.StripePaymentController;
import com.stripe.android.core.networking.AnalyticsRequestExecutor;
import com.stripe.android.core.networking.e;
import com.stripe.android.googlepaylauncher.GooglePayLauncher;
import com.stripe.android.googlepaylauncher.h;
import com.stripe.android.model.PaymentIntent;
import com.stripe.android.model.PaymentMethodCreateParams;
import com.stripe.android.model.SetupIntent;
import com.stripe.android.model.StripeIntent;
import com.stripe.android.networking.PaymentAnalyticsRequestFactory;
import com.stripe.android.networking.StripeApiRepository;
import com.stripe.android.o;
import com.stripe.android.p;
import com.stripe.android.payments.core.analytics.ErrorReporter;
import java.util.Set;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.Unit;
import kotlin.collections.o0;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.coroutines.jvm.internal.SuspendLambda;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.r;
import kotlin.reflect.KClass;
import kotlinx.coroutines.BuildersKt__Builders_commonKt;
import kotlinx.coroutines.CoroutineScope;
import kotlinx.coroutines.Dispatchers;
import kotlinx.coroutines.flow.FlowKt;
import kotlinx.coroutines.flow.MutableSharedFlow;
import kotlinx.coroutines.flow.SharedFlow;
import kotlinx.coroutines.flow.SharedFlowKt;
import kotlinx.coroutines.scheduling.WorkQueueKt;

@StabilityInferred(parameters = 0)
@Metadata(d1 = {"\u0000Ä\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\t\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0011\b\u0000\u0018\u0000 %2\u00020\u0001:\u0002)_BW\u0012\u0006\u0010+\u001a\u00020(\u0012\u0006\u0010/\u001a\u00020,\u0012\u0006\u0010\u000e\u001a\u00020\r\u0012\u0006\u00105\u001a\u000202\u0012\u0006\u00109\u001a\u000206\u0012\u0006\u0010=\u001a\u00020:\u0012\u0006\u0010A\u001a\u00020>\u0012\u0006\u0010D\u001a\u00020B\u0012\u0006\u0010G\u001a\u00020E\u0012\u0006\u0010J\u001a\u00020H¢\u0006\u0004\b]\u0010^J\"\u0010\u0005\u001a\u000e\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00040\u00030\u0002H\u0082@ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0005\u0010\u0006J\u000e\u0010\n\u001a\u00020\t2\u0006\u0010\b\u001a\u00020\u0007J\u0010\u0010\f\u001a\u00020\u000bH\u0087@¢\u0006\u0004\b\f\u0010\u0006J$\u0010\u0010\u001a\b\u0012\u0004\u0012\u00020\u000f0\u00022\u0006\u0010\u000e\u001a\u00020\rH\u0087@ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0010\u0010\u0011J7\u0010\u0019\u001a\u00020\u00182\u0006\u0010\u0013\u001a\u00020\u00122\u0006\u0010\u0014\u001a\u00020\u000f2\n\b\u0002\u0010\u0016\u001a\u0004\u0018\u00010\u00152\n\b\u0002\u0010\u0017\u001a\u0004\u0018\u00010\u000fH\u0001¢\u0006\u0004\b\u0019\u0010\u001aJ\u0016\u0010\u001f\u001a\u00020\t2\u0006\u0010\u001c\u001a\u00020\u001b2\u0006\u0010\u001e\u001a\u00020\u001dJ\u0016\u0010$\u001a\u00020\t2\u0006\u0010!\u001a\u00020 2\u0006\u0010#\u001a\u00020\"J \u0010%\u001a\u00020\u00072\u0006\u0010!\u001a\u00020 2\u0006\u0010#\u001a\u00020\"H\u0081@¢\u0006\u0004\b%\u0010&J\u0006\u0010'\u001a\u00020\tR\u0014\u0010+\u001a\u00020(8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b)\u0010*R\u0014\u0010/\u001a\u00020,8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b-\u0010.R\u0014\u0010\u000e\u001a\u00020\r8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b0\u00101R\u0014\u00105\u001a\u0002028\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b3\u00104R\u0014\u00109\u001a\u0002068\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b7\u00108R\u0014\u0010=\u001a\u00020:8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b;\u0010<R\u0014\u0010A\u001a\u00020>8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b?\u0010@R\u0014\u0010D\u001a\u00020B8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u001f\u0010CR\u0014\u0010G\u001a\u00020E8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0010\u0010FR\u0014\u0010J\u001a\u00020H8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0019\u0010IR\u001c\u0010N\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00070K8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bL\u0010MR\"\u0010T\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00070O8\u0000X\u0080\u0004¢\u0006\f\n\u0004\bP\u0010Q\u001a\u0004\bR\u0010SR\"\u0010U\u001a\u0010\u0012\f\u0012\n\u0012\u0004\u0012\u00020\u0004\u0018\u00010\u00030K8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\bR\u0010MR%\u0010W\u001a\u0010\u0012\f\u0012\n\u0012\u0004\u0012\u00020\u0004\u0018\u00010\u00030O8\u0006¢\u0006\f\n\u0004\bV\u0010Q\u001a\u0004\bP\u0010SR$\u0010\\\u001a\u00020\u000b2\u0006\u0010X\u001a\u00020\u000b8B@BX\u0082\u000e¢\u0006\f\u001a\u0004\bV\u0010Y\"\u0004\bZ\u0010[\u0082\u0002\u000b\n\u0002\b!\n\u0005\b¡\u001e0\u0001¨\u0006`"}, d2 = {"Lcom/stripe/android/googlepaylauncher/GooglePayLauncherViewModel;", "Landroidx/lifecycle/ViewModel;", "Lkotlin/Result;", "Lcom/google/android/gms/tasks/Task;", "Lfb/i;", "s", "(Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "Lcom/stripe/android/googlepaylauncher/GooglePayLauncher$d;", "result", "", "u", "", "p", "Lcom/stripe/android/googlepaylauncher/h$a;", "args", "", "i", "(Lcom/stripe/android/googlepaylauncher/h$a;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "Lcom/stripe/android/model/StripeIntent;", "stripeIntent", "currencyCode", "", "amount", "label", "Lcom/stripe/android/GooglePayJsonFactory$TransactionInfo;", "j", "(Lcom/stripe/android/model/StripeIntent;Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;)Lcom/stripe/android/GooglePayJsonFactory$TransactionInfo;", "Lcom/stripe/android/view/i;", "host", "Lcom/stripe/android/model/PaymentMethodCreateParams;", "params", "h", "", "requestCode", "Landroid/content/Intent;", "data", "r", "o", "(ILandroid/content/Intent;Lkotlin/coroutines/Continuation;)Ljava/lang/Object;", "q", "Lfb/m;", "a", "Lfb/m;", "paymentsClient", "Lcom/stripe/android/core/networking/e$c;", "b", "Lcom/stripe/android/core/networking/e$c;", "requestOptions", "c", "Lcom/stripe/android/googlepaylauncher/h$a;", "Lcom/stripe/android/networking/m;", "d", "Lcom/stripe/android/networking/m;", "stripeRepository", "Lcom/stripe/android/p;", "e", "Lcom/stripe/android/p;", "paymentController", "Lcom/stripe/android/GooglePayJsonFactory;", "f", "Lcom/stripe/android/GooglePayJsonFactory;", "googlePayJsonFactory", "Lcom/stripe/android/googlepaylauncher/l;", "g", "Lcom/stripe/android/googlepaylauncher/l;", "googlePayRepository", "Landroidx/lifecycle/SavedStateHandle;", "Landroidx/lifecycle/SavedStateHandle;", "savedStateHandle", "Lcom/stripe/android/payments/core/analytics/ErrorReporter;", "Lcom/stripe/android/payments/core/analytics/ErrorReporter;", "errorReporter", "Lkotlin/coroutines/CoroutineContext;", "Lkotlin/coroutines/CoroutineContext;", "workContext", "Lkotlinx/coroutines/flow/MutableSharedFlow;", "k", "Lkotlinx/coroutines/flow/MutableSharedFlow;", "_googleResult", "Lkotlinx/coroutines/flow/SharedFlow;", "l", "Lkotlinx/coroutines/flow/SharedFlow;", "m", "()Lkotlinx/coroutines/flow/SharedFlow;", "googlePayResult", "_googlePayLaunchTask", "n", "googlePayLaunchTask", "value", "()Z", "t", "(Z)V", "hasLaunched", "<init>", "(Lfb/m;Lcom/stripe/android/core/networking/e$c;Lcom/stripe/android/googlepaylauncher/h$a;Lcom/stripe/android/networking/m;Lcom/stripe/android/p;Lcom/stripe/android/GooglePayJsonFactory;Lcom/stripe/android/googlepaylauncher/l;Landroidx/lifecycle/SavedStateHandle;Lcom/stripe/android/payments/core/analytics/ErrorReporter;Lkotlin/coroutines/CoroutineContext;)V", "Factory", "payments-core_release"}, k = 1, mv = {1, 9, 0})
@Instrumented
public final class GooglePayLauncherViewModel extends ViewModel {
    public static final int p = 8;

    private final fb.m paymentsClient;

    private final e.Options requestOptions;

    private final h.a args;

    private final com.stripe.android.networking.m stripeRepository;

    private final p paymentController;

    private final GooglePayJsonFactory googlePayJsonFactory;

    private final l googlePayRepository;

    private final SavedStateHandle savedStateHandle;

    private final ErrorReporter errorReporter;

    private final CoroutineContext workContext;

    private final MutableSharedFlow<GooglePayLauncher.d> _googleResult;

    private final SharedFlow<GooglePayLauncher.d> googlePayResult;

    private final MutableSharedFlow<Task<fb.i>> _googlePayLaunchTask;

    private final SharedFlow<Task<fb.i>> googlePayLaunchTask;

    @Metadata(d1 = {"\u0000\n\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\u0010\u0002\u001a\u00020\u0001*\u00020\u0000H\u008a@"}, d2 = {"Lkotlinx/coroutines/CoroutineScope;", "", "<anonymous>"}, k = WorkQueueKt.STEAL_ANY, mv = {1, 9, 0})
    @kotlin.coroutines.jvm.internal.c(c = "com.stripe.android.googlepaylauncher.GooglePayLauncherViewModel$1", f = "GooglePayLauncherViewModel.kt", l = {75, 77}, m = "invokeSuspend")
    static final class AnonymousClass1 extends SuspendLambda implements Function2<CoroutineScope, Continuation<? super Unit>, Object> {
        int label;

        AnonymousClass1(Continuation<? super AnonymousClass1> continuation) {
            super(2, continuation);
        }

        @Override
        public final Continuation<Unit> create(Object obj, Continuation<?> continuation) {
            return GooglePayLauncherViewModel.this.new AnonymousClass1(continuation);
        }

        @Override
        public final java.lang.Object invokeSuspend(java.lang.Object r5) {
            throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.googlepaylauncher.GooglePayLauncherViewModel.AnonymousClass1.invokeSuspend(java.lang.Object):java.lang.Object");
        }

        @Override
        public final Object invoke(CoroutineScope coroutineScope, Continuation<? super Unit> continuation) {
            return ((AnonymousClass1) create(coroutineScope, continuation)).invokeSuspend(Unit.a);
        }
    }

    @StabilityInferred(parameters = 0)
    @Metadata(d1 = {"\u00004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0000\u0018\u00002\u00020\u0001B#\u0012\u0006\u0010\r\u001a\u00020\n\u0012\b\b\u0002\u0010\u0011\u001a\u00020\u000e\u0012\b\b\u0002\u0010\u0015\u001a\u00020\u0012¢\u0006\u0004\b\u0016\u0010\u0017J/\u0010\b\u001a\u00028\u0000\"\b\b\u0000\u0010\u0003*\u00020\u00022\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00028\u00000\u00042\u0006\u0010\u0007\u001a\u00020\u0006H\u0016¢\u0006\u0004\b\b\u0010\tR\u0014\u0010\r\u001a\u00020\n8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000b\u0010\fR\u0014\u0010\u0011\u001a\u00020\u000e8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000f\u0010\u0010R\u0014\u0010\u0015\u001a\u00020\u00128\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0013\u0010\u0014¨\u0006\u0018"}, d2 = {"Lcom/stripe/android/googlepaylauncher/GooglePayLauncherViewModel$Factory;", "Landroidx/lifecycle/ViewModelProvider$Factory;", "Landroidx/lifecycle/ViewModel;", "T", "Ljava/lang/Class;", "modelClass", "Landroidx/lifecycle/viewmodel/CreationExtras;", "extras", "create", "(Ljava/lang/Class;Landroidx/lifecycle/viewmodel/CreationExtras;)Landroidx/lifecycle/ViewModel;", "Lcom/stripe/android/googlepaylauncher/h$a;", "a", "Lcom/stripe/android/googlepaylauncher/h$a;", "args", "", "b", "Z", "enableLogging", "Lkotlin/coroutines/CoroutineContext;", "c", "Lkotlin/coroutines/CoroutineContext;", "workContext", "<init>", "(Lcom/stripe/android/googlepaylauncher/h$a;ZLkotlin/coroutines/CoroutineContext;)V", "payments-core_release"}, k = 1, mv = {1, 9, 0})
    public static final class Factory implements ViewModelProvider.Factory {

        private final h.a args;

        private final boolean enableLogging;

        private final CoroutineContext workContext;

        public Factory(h.a args, boolean z, CoroutineContext workContext) {
            r.i(args, "args");
            r.i(workContext, "workContext");
            this.args = args;
            this.enableLogging = z;
            this.workContext = workContext;
        }

        public ViewModel create(Class cls) {
            return n.a(this, cls);
        }

        public Factory(h.a aVar, boolean z, CoroutineContext coroutineContext, int i, DefaultConstructorMarker defaultConstructorMarker) {
            this(aVar, (i & 2) != 0 ? false : z, (i & 4) != 0 ? Dispatchers.getIO() : coroutineContext);
        }

        public ViewModel create(KClass kClass, CreationExtras creationExtras) {
            return n.c(this, kClass, creationExtras);
        }

        public <T extends ViewModel> T create(Class<T> modelClass, CreationExtras extras) {
            Set d;
            r.i(modelClass, "modelClass");
            r.i(extras, "extras");
            Application a = sh.b.a(extras);
            GooglePayEnvironment environment = this.args.getConfig().getEnvironment();
            lh.d a2 = lh.d.INSTANCE.a(this.enableLogging);
            o a3 = o.e.a(a);
            final String e = a3.e();
            String g = a3.g();
            d = o0.d("GooglePayLauncher");
            com.stripe.android.h hVar = null;
            StripeApiRepository stripeApiRepository = new StripeApiRepository(a, new Function0<String>() {
                {
                    super(0);
                }

                @Override
                public final String invoke() {
                    return e;
                }
            }, null, a2, this.workContext, d, null, null, hVar, hVar, new PaymentAnalyticsRequestFactory(a, e, (Set<String>) d), hVar, hVar, null, null, 31684, null);
            return new GooglePayLauncherViewModel(new c(a).a(environment), new e.Options(e, g, null, 4, null), this.args, stripeApiRepository, new StripePaymentController(a, new Function0<String>() {
                {
                    super(0);
                }

                @Override
                public final String invoke() {
                    return e;
                }
            }, stripeApiRepository, this.enableLogging, this.workContext, (AnalyticsRequestExecutor) null, (PaymentAnalyticsRequestFactory) null, (com.stripe.android.networking.a) null, (CoroutineContext) null, 480, (DefaultConstructorMarker) null), new GooglePayJsonFactory(new com.stripe.android.j(e, g), this.args.getConfig().o()), new DefaultGooglePayRepository(a, this.args.getConfig().getEnvironment(), a.a(this.args.getConfig().getBillingAddressConfig()), this.args.getConfig().getExistingPaymentMethodRequired(), this.args.getConfig().getAllowCreditCards(), null, a2, 32, null), SavedStateHandleSupport.createSavedStateHandle(extras), ErrorReporter.Companion.b(ErrorReporter.INSTANCE, a, null, 2, null), this.workContext);
        }
    }

    @Metadata(k = WorkQueueKt.STEAL_ANY, mv = {1, 9, 0}, xi = 48)
    public class b {
        public static final int[] a;

        static {
            int[] iArr = new int[GooglePayLauncher.BillingAddressConfig.Format.values().length];
            try {
                iArr[GooglePayLauncher.BillingAddressConfig.Format.c.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                iArr[GooglePayLauncher.BillingAddressConfig.Format.d.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            a = iArr;
        }
    }

    public GooglePayLauncherViewModel(fb.m paymentsClient, e.Options requestOptions, h.a args, com.stripe.android.networking.m stripeRepository, p paymentController, GooglePayJsonFactory googlePayJsonFactory, l googlePayRepository, SavedStateHandle savedStateHandle, ErrorReporter errorReporter, CoroutineContext workContext) {
        r.i(paymentsClient, "paymentsClient");
        r.i(requestOptions, "requestOptions");
        r.i(args, "args");
        r.i(stripeRepository, "stripeRepository");
        r.i(paymentController, "paymentController");
        r.i(googlePayJsonFactory, "googlePayJsonFactory");
        r.i(googlePayRepository, "googlePayRepository");
        r.i(savedStateHandle, "savedStateHandle");
        r.i(errorReporter, "errorReporter");
        r.i(workContext, "workContext");
        this.paymentsClient = paymentsClient;
        this.requestOptions = requestOptions;
        this.args = args;
        this.stripeRepository = stripeRepository;
        this.paymentController = paymentController;
        this.googlePayJsonFactory = googlePayJsonFactory;
        this.googlePayRepository = googlePayRepository;
        this.savedStateHandle = savedStateHandle;
        this.errorReporter = errorReporter;
        this.workContext = workContext;
        MutableSharedFlow<GooglePayLauncher.d> MutableSharedFlow$default = SharedFlowKt.MutableSharedFlow$default(1, 0, null, 6, null);
        this._googleResult = MutableSharedFlow$default;
        this.googlePayResult = FlowKt.asSharedFlow(MutableSharedFlow$default);
        MutableSharedFlow<Task<fb.i>> MutableSharedFlow$default2 = SharedFlowKt.MutableSharedFlow$default(1, 0, null, 6, null);
        this._googlePayLaunchTask = MutableSharedFlow$default2;
        this.googlePayLaunchTask = FlowKt.asSharedFlow(MutableSharedFlow$default2);
        BuildersKt__Builders_commonKt.launch$default(ViewModelKt.getViewModelScope(this), workContext, null, new AnonymousClass1(null), 2, null);
    }

    public static GooglePayJsonFactory.TransactionInfo k(GooglePayLauncherViewModel googlePayLauncherViewModel, StripeIntent stripeIntent, String str, Long l, String str2, int i, Object obj) {
        if ((i & 4) != 0) {
            l = null;
        }
        if ((i & 8) != 0) {
            str2 = null;
        }
        return googlePayLauncherViewModel.j(stripeIntent, str, l, str2);
    }

    public final boolean n() {
        return r.d(this.savedStateHandle.get("has_launched"), Boolean.TRUE);
    }

    public final java.lang.Object s(kotlin.coroutines.Continuation<? super kotlin.Result<? extends com.google.android.gms.tasks.Task<fb.i>>> r8) {
        throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.googlepaylauncher.GooglePayLauncherViewModel.s(kotlin.coroutines.Continuation):java.lang.Object");
    }

    private final void t(boolean z) {
        this.savedStateHandle.set("has_launched", Boolean.valueOf(z));
    }

    public final void h(com.stripe.android.view.i host, PaymentMethodCreateParams params) {
        r.i(host, "host");
        r.i(params, "params");
        BuildersKt__Builders_commonKt.launch$default(ViewModelKt.getViewModelScope(this), this.workContext, null, new GooglePayLauncherViewModel$confirmStripeIntent$1(this, params, host, null), 2, null);
    }

    @androidx.annotation.VisibleForTesting
    public final java.lang.Object i(com.stripe.android.googlepaylauncher.h.a r23, kotlin.coroutines.Continuation<? super kotlin.Result<java.lang.String>> r24) {
        throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.googlepaylauncher.GooglePayLauncherViewModel.i(com.stripe.android.googlepaylauncher.h$a, kotlin.coroutines.Continuation):java.lang.Object");
    }

    @VisibleForTesting
    public final GooglePayJsonFactory.TransactionInfo j(StripeIntent stripeIntent, String currencyCode, Long amount, String label) {
        r.i(stripeIntent, "stripeIntent");
        r.i(currencyCode, "currencyCode");
        if (stripeIntent instanceof PaymentIntent) {
            return new GooglePayJsonFactory.TransactionInfo(currencyCode, GooglePayJsonFactory.TransactionInfo.TotalPriceStatus.e, this.args.getConfig().getMerchantCountryCode(), stripeIntent.getId(), ((PaymentIntent) stripeIntent).getAmount(), (String) null, GooglePayJsonFactory.TransactionInfo.CheckoutOption.d);
        }
        if (stripeIntent instanceof SetupIntent) {
            return new GooglePayJsonFactory.TransactionInfo(currencyCode, GooglePayJsonFactory.TransactionInfo.TotalPriceStatus.d, this.args.getConfig().getMerchantCountryCode(), stripeIntent.getId(), Long.valueOf(amount != null ? amount.longValue() : 0L), label, GooglePayJsonFactory.TransactionInfo.CheckoutOption.c);
        }
        throw new NoWhenBranchMatchedException();
    }

    public final SharedFlow<Task<fb.i>> l() {
        return this.googlePayLaunchTask;
    }

    public final SharedFlow<GooglePayLauncher.d> m() {
        return this.googlePayResult;
    }

    @androidx.annotation.VisibleForTesting
    public final java.lang.Object o(int r6, android.content.Intent r7, kotlin.coroutines.Continuation<? super com.stripe.android.googlepaylauncher.GooglePayLauncher.d> r8) {
        throw new UnsupportedOperationException("Method not decompiled: com.stripe.android.googlepaylauncher.GooglePayLauncherViewModel.o(int, android.content.Intent, kotlin.coroutines.Continuation):java.lang.Object");
    }

    @VisibleForTesting
    public final Object p(Continuation<? super Boolean> continuation) {
        return FlowKt.first(this.googlePayRepository.isReady(), continuation);
    }

    public final void q() {
        t(true);
        this._googlePayLaunchTask.tryEmit(null);
    }

    public final void r(int requestCode, Intent data) {
        r.i(data, "data");
        BuildersKt__Builders_commonKt.launch$default(ViewModelKt.getViewModelScope(this), this.workContext, null, new GooglePayLauncherViewModel$onConfirmResult$1(this, requestCode, data, null), 2, null);
    }

    public final void u(GooglePayLauncher.d result) {
        r.i(result, "result");
        this._googleResult.tryEmit(result);
    }
}