导航菜单

页面标题

页面副标题

Biko v2.0.23 - PopupPayload.java 源代码

正在查看: Biko v2.0.23 应用的 PopupPayload.java JAVA 源代码文件

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


package com.stripe.android.link.serialization;

import android.content.Context;
import android.os.Build;
import android.util.Base64;
import com.google.firebase.analytics.FirebaseAnalytics;
import com.stripe.android.core.injection.NamedConstantsKt;
import com.stripe.android.core.networking.AnalyticsFields;
import com.stripe.android.link.LinkConfiguration;
import com.stripe.android.model.PaymentIntent;
import com.stripe.android.model.SetupIntent;
import com.stripe.android.model.StripeIntent;
import java.util.Locale;
import java.util.Map;
import kotlin.Deprecated;
import kotlin.DeprecationLevel;
import kotlin.Metadata;
import kotlin.NoWhenBranchMatchedException;
import kotlin.ReplaceWith;
import kotlin.Unit;
import kotlin.collections.MapsKt;
import kotlin.jvm.JvmStatic;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.StringsKt;
import kotlinx.serialization.KSerializer;
import kotlinx.serialization.SerialName;
import kotlinx.serialization.Serializable;
import kotlinx.serialization.SerializationStrategy;
import kotlinx.serialization.descriptors.SerialDescriptor;
import kotlinx.serialization.encoding.CompositeEncoder;
import kotlinx.serialization.internal.LinkedHashMapSerializer;
import kotlinx.serialization.internal.PluginExceptionsKt;
import kotlinx.serialization.internal.SerializationConstructorMarker;
import kotlinx.serialization.internal.StringSerializer;
import kotlinx.serialization.json.Json;
import kotlinx.serialization.json.JsonBuilder;
import kotlinx.serialization.json.JsonKt;
import org.apache.commons.sudcompress.archivers.zip.UnixStat;

@Metadata(d1 = {"\u0000Z\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010$\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b/\n\u0002\u0010\u000b\n\u0002\b\u0005\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0006\b\u0081\b\u0018\u0000 U2\u00020\u0001:\u0005TUVWXBå\u0001\b\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0001\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0001\u0010\u0006\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0001\u0010\u0007\u001a\u0004\u0018\u00010\b\u0012\n\b\u0001\u0010\t\u001a\u0004\u0018\u00010\n\u0012\n\b\u0001\u0010\u000b\u001a\u0004\u0018\u00010\f\u0012\n\b\u0001\u0010\r\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0001\u0010\u000e\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0001\u0010\u000f\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0001\u0010\u0010\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0001\u0010\u0011\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0001\u0010\u0012\u001a\u0004\u0018\u00010\u0005\u0012\u0016\b\u0001\u0010\u0013\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0005\u0018\u00010\u0014\u0012\u0016\b\u0001\u0010\u0015\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0005\u0018\u00010\u0014\u0012\u0016\b\u0001\u0010\u0016\u001a\u0010\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u0005\u0018\u00010\u0014\u0012\b\u0010\u0017\u001a\u0004\u0018\u00010\u0018¢\u0006\u0002\u0010\u0019BQ\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0005\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\u0006\u0010\t\u001a\u00020\n\u0012\b\u0010\u000b\u001a\u0004\u0018\u00010\f\u0012\u0006\u0010\r\u001a\u00020\u0005\u0012\u0006\u0010\u000e\u001a\u00020\u0005\u0012\u0006\u0010\u000f\u001a\u00020\u0005\u0012\u0006\u0010\u0010\u001a\u00020\u0005¢\u0006\u0002\u0010\u001aJ\t\u0010=\u001a\u00020\u0005HÆ\u0003J\u000b\u0010>\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\t\u0010?\u001a\u00020\bHÆ\u0003J\t\u0010@\u001a\u00020\nHÆ\u0003J\u000b\u0010A\u001a\u0004\u0018\u00010\fHÆ\u0003J\t\u0010B\u001a\u00020\u0005HÆ\u0003J\t\u0010C\u001a\u00020\u0005HÆ\u0003J\t\u0010D\u001a\u00020\u0005HÆ\u0003J\t\u0010E\u001a\u00020\u0005HÆ\u0003Jg\u0010F\u001a\u00020\u00002\b\b\u0002\u0010\u0004\u001a\u00020\u00052\n\b\u0002\u0010\u0006\u001a\u0004\u0018\u00010\u00052\b\b\u0002\u0010\u0007\u001a\u00020\b2\b\b\u0002\u0010\t\u001a\u00020\n2\n\b\u0002\u0010\u000b\u001a\u0004\u0018\u00010\f2\b\b\u0002\u0010\r\u001a\u00020\u00052\b\b\u0002\u0010\u000e\u001a\u00020\u00052\b\b\u0002\u0010\u000f\u001a\u00020\u00052\b\b\u0002\u0010\u0010\u001a\u00020\u0005HÆ\u0001J\u0013\u0010G\u001a\u00020H2\b\u0010I\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010J\u001a\u00020\u0003HÖ\u0001J\t\u0010K\u001a\u00020\u0005HÖ\u0001J\u0006\u0010L\u001a\u00020\u0005J!\u0010M\u001a\u00020N2\u0006\u0010O\u001a\u00020\u00002\u0006\u0010P\u001a\u00020Q2\u0006\u0010R\u001a\u00020SHÇ\u0001R\u001c\u0010\r\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\u001b\u0010\u001c\u001a\u0004\b\u001d\u0010\u001eR\u001c\u0010\t\u001a\u00020\n8\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\u001f\u0010\u001c\u001a\u0004\b \u0010!R(\u0010\u0016\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\u00148\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\"\u0010\u001c\u001a\u0004\b#\u0010$R(\u0010\u0015\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\u00148\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b%\u0010\u001c\u001a\u0004\b&\u0010$R\u001c\u0010\u0012\u001a\u00020\u00058\u0006X\u0087D¢\u0006\u000e\n\u0000\u0012\u0004\b'\u0010\u001c\u001a\u0004\b(\u0010\u001eR\u001c\u0010\u000e\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b)\u0010\u001c\u001a\u0004\b*\u0010\u001eR(\u0010\u0013\u001a\u000e\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00050\u00148\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b+\u0010\u001c\u001a\u0004\b,\u0010$R\u001c\u0010\u0007\u001a\u00020\b8\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b-\u0010\u001c\u001a\u0004\b.\u0010/R\u001c\u0010\u0011\u001a\u00020\u00058\u0006X\u0087D¢\u0006\u000e\n\u0000\u0012\u0004\b0\u0010\u001c\u001a\u0004\b1\u0010\u001eR\u001e\u0010\u000b\u001a\u0004\u0018\u00010\f8\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b2\u0010\u001c\u001a\u0004\b3\u00104R\u001c\u0010\u0010\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b5\u0010\u001c\u001a\u0004\b6\u0010\u001eR\u001c\u0010\u000f\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b7\u0010\u001c\u001a\u0004\b8\u0010\u001eR\u001c\u0010\u0004\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b9\u0010\u001c\u001a\u0004\b:\u0010\u001eR\u001e\u0010\u0006\u001a\u0004\u0018\u00010\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b;\u0010\u001c\u001a\u0004\b<\u0010\u001e¨\u0006Y"}, d2 = {"Lcom/stripe/android/link/serialization/PopupPayload;", "", "seen1", "", NamedConstantsKt.PUBLISHABLE_KEY, "", "stripeAccount", "merchantInfo", "Lcom/stripe/android/link/serialization/PopupPayload$MerchantInfo;", "customerInfo", "Lcom/stripe/android/link/serialization/PopupPayload$CustomerInfo;", "paymentInfo", "Lcom/stripe/android/link/serialization/PopupPayload$PaymentInfo;", "appId", AnalyticsFields.LOCALE, "paymentUserAgent", "paymentObject", "path", "integrationType", "loggerMetadata", "", "flags", "experiments", "serializationConstructorMarker", "Lkotlinx/serialization/internal/SerializationConstructorMarker;", "(ILjava/lang/String;Ljava/lang/String;Lcom/stripe/android/link/serialization/PopupPayload$MerchantInfo;Lcom/stripe/android/link/serialization/PopupPayload$CustomerInfo;Lcom/stripe/android/link/serialization/PopupPayload$PaymentInfo;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/util/Map;Ljava/util/Map;Ljava/util/Map;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V", "(Ljava/lang/String;Ljava/lang/String;Lcom/stripe/android/link/serialization/PopupPayload$MerchantInfo;Lcom/stripe/android/link/serialization/PopupPayload$CustomerInfo;Lcom/stripe/android/link/serialization/PopupPayload$PaymentInfo;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V", "getAppId$annotations", "()V", "getAppId", "()Ljava/lang/String;", "getCustomerInfo$annotations", "getCustomerInfo", "()Lcom/stripe/android/link/serialization/PopupPayload$CustomerInfo;", "getExperiments$annotations", "getExperiments", "()Ljava/util/Map;", "getFlags$annotations", "getFlags", "getIntegrationType$annotations", "getIntegrationType", "getLocale$annotations", "getLocale", "getLoggerMetadata$annotations", "getLoggerMetadata", "getMerchantInfo$annotations", "getMerchantInfo", "()Lcom/stripe/android/link/serialization/PopupPayload$MerchantInfo;", "getPath$annotations", "getPath", "getPaymentInfo$annotations", "getPaymentInfo", "()Lcom/stripe/android/link/serialization/PopupPayload$PaymentInfo;", "getPaymentObject$annotations", "getPaymentObject", "getPaymentUserAgent$annotations", "getPaymentUserAgent", "getPublishableKey$annotations", "getPublishableKey", "getStripeAccount$annotations", "getStripeAccount", "component1", "component2", "component3", "component4", "component5", "component6", "component7", "component8", "component9", "copy", "equals", "", "other", "hashCode", "toString", "toUrl", "write$Self", "", "self", "output", "Lkotlinx/serialization/encoding/CompositeEncoder;", "serialDesc", "Lkotlinx/serialization/descriptors/SerialDescriptor;", "$serializer", "Companion", "CustomerInfo", "MerchantInfo", "PaymentInfo", "link_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
@Serializable
public final class PopupPayload {
    private static final String baseUrl = "https://checkout.link.com/#";
    private final String appId;
    private final CustomerInfo customerInfo;
    private final Map<String, String> experiments;
    private final Map<String, String> flags;
    private final String integrationType;
    private final String locale;
    private final Map<String, String> loggerMetadata;
    private final MerchantInfo merchantInfo;
    private final String path;
    private final PaymentInfo paymentInfo;
    private final String paymentObject;
    private final String paymentUserAgent;
    private final String publishableKey;
    private final String stripeAccount;

    public static final Companion INSTANCE = new Companion(null);
    private static final Json PopupPayloadJson = JsonKt.Json$default((Json) null, new Function1<JsonBuilder, Unit>() {
        public Object invoke(Object obj) {
            invoke((JsonBuilder) obj);
            return Unit.INSTANCE;
        }

        public final void invoke(JsonBuilder jsonBuilder) {
            Intrinsics.checkNotNullParameter(jsonBuilder, "$this$Json");
            jsonBuilder.setEncodeDefaults(true);
        }
    }, 1, (Object) null);
    private static final KSerializer<Object>[] $childSerializers = {null, null, null, null, null, null, null, null, null, null, null, new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE), new LinkedHashMapSerializer(StringSerializer.INSTANCE, StringSerializer.INSTANCE)};

    @SerialName("appId")
    public static void getAppId$annotations() {
    }

    @SerialName("customerInfo")
    public static void getCustomerInfo$annotations() {
    }

    @SerialName("experiments")
    public static void getExperiments$annotations() {
    }

    @SerialName("flags")
    public static void getFlags$annotations() {
    }

    @SerialName("integrationType")
    public static void getIntegrationType$annotations() {
    }

    @SerialName(AnalyticsFields.LOCALE)
    public static void getLocale$annotations() {
    }

    @SerialName("loggerMetadata")
    public static void getLoggerMetadata$annotations() {
    }

    @SerialName("merchantInfo")
    public static void getMerchantInfo$annotations() {
    }

    @SerialName("path")
    public static void getPath$annotations() {
    }

    @SerialName("paymentInfo")
    public static void getPaymentInfo$annotations() {
    }

    @SerialName("paymentObject")
    public static void getPaymentObject$annotations() {
    }

    @SerialName("paymentUserAgent")
    public static void getPaymentUserAgent$annotations() {
    }

    @SerialName(NamedConstantsKt.PUBLISHABLE_KEY)
    public static void getPublishableKey$annotations() {
    }

    @SerialName("stripeAccount")
    public static void getStripeAccount$annotations() {
    }

    public final String getPublishableKey() {
        return this.publishableKey;
    }

    public final String getStripeAccount() {
        return this.stripeAccount;
    }

    public final MerchantInfo getMerchantInfo() {
        return this.merchantInfo;
    }

    public final CustomerInfo getCustomerInfo() {
        return this.customerInfo;
    }

    public final PaymentInfo getPaymentInfo() {
        return this.paymentInfo;
    }

    public final String getAppId() {
        return this.appId;
    }

    public final String getLocale() {
        return this.locale;
    }

    public final String getPaymentUserAgent() {
        return this.paymentUserAgent;
    }

    public final String getPaymentObject() {
        return this.paymentObject;
    }

    public final PopupPayload copy(String publishableKey, String stripeAccount, MerchantInfo merchantInfo, CustomerInfo customerInfo, PaymentInfo paymentInfo, String appId, String locale, String paymentUserAgent, String paymentObject) {
        Intrinsics.checkNotNullParameter(publishableKey, NamedConstantsKt.PUBLISHABLE_KEY);
        Intrinsics.checkNotNullParameter(merchantInfo, "merchantInfo");
        Intrinsics.checkNotNullParameter(customerInfo, "customerInfo");
        Intrinsics.checkNotNullParameter(appId, "appId");
        Intrinsics.checkNotNullParameter(locale, AnalyticsFields.LOCALE);
        Intrinsics.checkNotNullParameter(paymentUserAgent, "paymentUserAgent");
        Intrinsics.checkNotNullParameter(paymentObject, "paymentObject");
        return new PopupPayload(publishableKey, stripeAccount, merchantInfo, customerInfo, paymentInfo, appId, locale, paymentUserAgent, paymentObject);
    }

    public boolean equals(Object other) {
        if (this == other) {
            return true;
        }
        if (!(other instanceof PopupPayload)) {
            return false;
        }
        PopupPayload popupPayload = (PopupPayload) other;
        return Intrinsics.areEqual(this.publishableKey, popupPayload.publishableKey) && Intrinsics.areEqual(this.stripeAccount, popupPayload.stripeAccount) && Intrinsics.areEqual(this.merchantInfo, popupPayload.merchantInfo) && Intrinsics.areEqual(this.customerInfo, popupPayload.customerInfo) && Intrinsics.areEqual(this.paymentInfo, popupPayload.paymentInfo) && Intrinsics.areEqual(this.appId, popupPayload.appId) && Intrinsics.areEqual(this.locale, popupPayload.locale) && Intrinsics.areEqual(this.paymentUserAgent, popupPayload.paymentUserAgent) && Intrinsics.areEqual(this.paymentObject, popupPayload.paymentObject);
    }

    public int hashCode() {
        int hashCode = this.publishableKey.hashCode() * 31;
        String str = this.stripeAccount;
        int hashCode2 = (((((hashCode + (str == null ? 0 : str.hashCode())) * 31) + this.merchantInfo.hashCode()) * 31) + this.customerInfo.hashCode()) * 31;
        PaymentInfo paymentInfo = this.paymentInfo;
        return ((((((((hashCode2 + (paymentInfo != null ? paymentInfo.hashCode() : 0)) * 31) + this.appId.hashCode()) * 31) + this.locale.hashCode()) * 31) + this.paymentUserAgent.hashCode()) * 31) + this.paymentObject.hashCode();
    }

    public String toString() {
        return "PopupPayload(publishableKey=" + this.publishableKey + ", stripeAccount=" + this.stripeAccount + ", merchantInfo=" + this.merchantInfo + ", customerInfo=" + this.customerInfo + ", paymentInfo=" + this.paymentInfo + ", appId=" + this.appId + ", locale=" + this.locale + ", paymentUserAgent=" + this.paymentUserAgent + ", paymentObject=" + this.paymentObject + ")";
    }

    @Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = @ReplaceWith(expression = "", imports = {}))
    public PopupPayload(int i, @SerialName("publishableKey") String str, @SerialName("stripeAccount") String str2, @SerialName("merchantInfo") MerchantInfo merchantInfo, @SerialName("customerInfo") CustomerInfo customerInfo, @SerialName("paymentInfo") PaymentInfo paymentInfo, @SerialName("appId") String str3, @SerialName("locale") String str4, @SerialName("paymentUserAgent") String str5, @SerialName("paymentObject") String str6, @SerialName("path") String str7, @SerialName("integrationType") String str8, @SerialName("loggerMetadata") Map map, @SerialName("flags") Map map2, @SerialName("experiments") Map map3, SerializationConstructorMarker serializationConstructorMarker) {
        if (511 != (i & UnixStat.DEFAULT_LINK_PERM)) {
            PluginExceptionsKt.throwMissingFieldException(i, UnixStat.DEFAULT_LINK_PERM, PopupPayload$$serializer.INSTANCE.getDescriptor());
        }
        this.publishableKey = str;
        this.stripeAccount = str2;
        this.merchantInfo = merchantInfo;
        this.customerInfo = customerInfo;
        this.paymentInfo = paymentInfo;
        this.appId = str3;
        this.locale = str4;
        this.paymentUserAgent = str5;
        this.paymentObject = str6;
        this.path = (i & 512) == 0 ? "mobile_pay" : str7;
        this.integrationType = (i & 1024) == 0 ? "mobile" : str8;
        this.loggerMetadata = (i & 2048) == 0 ? MapsKt.emptyMap() : map;
        this.flags = (i & 4096) == 0 ? MapsKt.emptyMap() : map2;
        this.experiments = (i & 8192) == 0 ? MapsKt.emptyMap() : map3;
    }

    public PopupPayload(String str, String str2, MerchantInfo merchantInfo, CustomerInfo customerInfo, PaymentInfo paymentInfo, String str3, String str4, String str5, String str6) {
        Intrinsics.checkNotNullParameter(str, NamedConstantsKt.PUBLISHABLE_KEY);
        Intrinsics.checkNotNullParameter(merchantInfo, "merchantInfo");
        Intrinsics.checkNotNullParameter(customerInfo, "customerInfo");
        Intrinsics.checkNotNullParameter(str3, "appId");
        Intrinsics.checkNotNullParameter(str4, AnalyticsFields.LOCALE);
        Intrinsics.checkNotNullParameter(str5, "paymentUserAgent");
        Intrinsics.checkNotNullParameter(str6, "paymentObject");
        this.publishableKey = str;
        this.stripeAccount = str2;
        this.merchantInfo = merchantInfo;
        this.customerInfo = customerInfo;
        this.paymentInfo = paymentInfo;
        this.appId = str3;
        this.locale = str4;
        this.paymentUserAgent = str5;
        this.paymentObject = str6;
        this.path = "mobile_pay";
        this.integrationType = "mobile";
        this.loggerMetadata = MapsKt.emptyMap();
        this.flags = MapsKt.emptyMap();
        this.experiments = MapsKt.emptyMap();
    }

    @JvmStatic
    public static final void write$Self(PopupPayload self, CompositeEncoder output, SerialDescriptor serialDesc) {
        SerializationStrategy[] serializationStrategyArr = $childSerializers;
        output.encodeStringElement(serialDesc, 0, self.publishableKey);
        output.encodeNullableSerializableElement(serialDesc, 1, StringSerializer.INSTANCE, self.stripeAccount);
        output.encodeSerializableElement(serialDesc, 2, PopupPayload$MerchantInfo$$serializer.INSTANCE, self.merchantInfo);
        output.encodeSerializableElement(serialDesc, 3, PopupPayload$CustomerInfo$$serializer.INSTANCE, self.customerInfo);
        output.encodeNullableSerializableElement(serialDesc, 4, PopupPayload$PaymentInfo$$serializer.INSTANCE, self.paymentInfo);
        output.encodeStringElement(serialDesc, 5, self.appId);
        output.encodeStringElement(serialDesc, 6, self.locale);
        output.encodeStringElement(serialDesc, 7, self.paymentUserAgent);
        output.encodeStringElement(serialDesc, 8, self.paymentObject);
        if (output.shouldEncodeElementDefault(serialDesc, 9) || !Intrinsics.areEqual(self.path, "mobile_pay")) {
            output.encodeStringElement(serialDesc, 9, self.path);
        }
        if (output.shouldEncodeElementDefault(serialDesc, 10) || !Intrinsics.areEqual(self.integrationType, "mobile")) {
            output.encodeStringElement(serialDesc, 10, self.integrationType);
        }
        if (output.shouldEncodeElementDefault(serialDesc, 11) || !Intrinsics.areEqual(self.loggerMetadata, MapsKt.emptyMap())) {
            output.encodeSerializableElement(serialDesc, 11, serializationStrategyArr[11], self.loggerMetadata);
        }
        if (output.shouldEncodeElementDefault(serialDesc, 12) || !Intrinsics.areEqual(self.flags, MapsKt.emptyMap())) {
            output.encodeSerializableElement(serialDesc, 12, serializationStrategyArr[12], self.flags);
        }
        if (output.shouldEncodeElementDefault(serialDesc, 13) || !Intrinsics.areEqual(self.experiments, MapsKt.emptyMap())) {
            output.encodeSerializableElement(serialDesc, 13, serializationStrategyArr[13], self.experiments);
        }
    }

    public final String getPublishableKey() {
        return this.publishableKey;
    }

    public final String getStripeAccount() {
        return this.stripeAccount;
    }

    public final MerchantInfo getMerchantInfo() {
        return this.merchantInfo;
    }

    public final CustomerInfo getCustomerInfo() {
        return this.customerInfo;
    }

    public final PaymentInfo getPaymentInfo() {
        return this.paymentInfo;
    }

    public final String getAppId() {
        return this.appId;
    }

    public final String getLocale() {
        return this.locale;
    }

    public final String getPaymentUserAgent() {
        return this.paymentUserAgent;
    }

    public final String getPaymentObject() {
        return this.paymentObject;
    }

    public final String getPath() {
        return this.path;
    }

    public final String getIntegrationType() {
        return this.integrationType;
    }

    public final Map<String, String> getLoggerMetadata() {
        return this.loggerMetadata;
    }

    public final Map<String, String> getFlags() {
        return this.flags;
    }

    @Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0087\b\u0018\u0000 !2\u00020\u0001:\u0002 !B1\b\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0001\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0001\u0010\u0006\u001a\u0004\u0018\u00010\u0005\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\b¢\u0006\u0002\u0010\tB\u0017\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0005¢\u0006\u0002\u0010\nJ\t\u0010\u0011\u001a\u00020\u0005HÆ\u0003J\u000b\u0010\u0012\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\u001f\u0010\u0013\u001a\u00020\u00002\b\b\u0002\u0010\u0004\u001a\u00020\u00052\n\b\u0002\u0010\u0006\u001a\u0004\u0018\u00010\u0005HÆ\u0001J\u0013\u0010\u0014\u001a\u00020\u00152\b\u0010\u0016\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0017\u001a\u00020\u0003HÖ\u0001J\t\u0010\u0018\u001a\u00020\u0005HÖ\u0001J!\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u00002\u0006\u0010\u001c\u001a\u00020\u001d2\u0006\u0010\u001e\u001a\u00020\u001fHÇ\u0001R\u001c\u0010\u0004\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\u000b\u0010\f\u001a\u0004\b\r\u0010\u000eR\u001e\u0010\u0006\u001a\u0004\u0018\u00010\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\u000f\u0010\f\u001a\u0004\b\u0010\u0010\u000e¨\u0006\""}, d2 = {"Lcom/stripe/android/link/serialization/PopupPayload$MerchantInfo;", "", "seen1", "", "businessName", "", "country", "serializationConstructorMarker", "Lkotlinx/serialization/internal/SerializationConstructorMarker;", "(ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V", "(Ljava/lang/String;Ljava/lang/String;)V", "getBusinessName$annotations", "()V", "getBusinessName", "()Ljava/lang/String;", "getCountry$annotations", "getCountry", "component1", "component2", "copy", "equals", "", "other", "hashCode", "toString", "write$Self", "", "self", "output", "Lkotlinx/serialization/encoding/CompositeEncoder;", "serialDesc", "Lkotlinx/serialization/descriptors/SerialDescriptor;", "$serializer", "Companion", "link_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    @Serializable
    public static final class MerchantInfo {
        public static final int $stable = 0;

        public static final Companion INSTANCE = new Companion(null);
        private final String businessName;
        private final String country;

        public static MerchantInfo copy$default(MerchantInfo merchantInfo, String str, String str2, int i, Object obj) {
            if ((i & 1) != 0) {
                str = merchantInfo.businessName;
            }
            if ((i & 2) != 0) {
                str2 = merchantInfo.country;
            }
            return merchantInfo.copy(str, str2);
        }

        @SerialName("businessName")
        public static void getBusinessName$annotations() {
        }

        @SerialName("country")
        public static void getCountry$annotations() {
        }

        public final String getBusinessName() {
            return this.businessName;
        }

        public final String getCountry() {
            return this.country;
        }

        public final MerchantInfo copy(String businessName, String country) {
            Intrinsics.checkNotNullParameter(businessName, "businessName");
            return new MerchantInfo(businessName, country);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof MerchantInfo)) {
                return false;
            }
            MerchantInfo merchantInfo = (MerchantInfo) other;
            return Intrinsics.areEqual(this.businessName, merchantInfo.businessName) && Intrinsics.areEqual(this.country, merchantInfo.country);
        }

        public int hashCode() {
            int hashCode = this.businessName.hashCode() * 31;
            String str = this.country;
            return hashCode + (str == null ? 0 : str.hashCode());
        }

        public String toString() {
            return "MerchantInfo(businessName=" + this.businessName + ", country=" + this.country + ")";
        }

        @Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u000f\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004HÆ\u0001¨\u0006\u0006"}, d2 = {"Lcom/stripe/android/link/serialization/PopupPayload$MerchantInfo$Companion;", "", "()V", "serializer", "Lkotlinx/serialization/KSerializer;", "Lcom/stripe/android/link/serialization/PopupPayload$MerchantInfo;", "link_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class Companion {
            public Companion(DefaultConstructorMarker defaultConstructorMarker) {
                this();
            }

            private Companion() {
            }

            public final KSerializer<MerchantInfo> serializer() {
                return PopupPayload$MerchantInfo$$serializer.INSTANCE;
            }
        }

        @Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = @ReplaceWith(expression = "", imports = {}))
        public MerchantInfo(int i, @SerialName("businessName") String str, @SerialName("country") String str2, SerializationConstructorMarker serializationConstructorMarker) {
            if (3 != (i & 3)) {
                PluginExceptionsKt.throwMissingFieldException(i, 3, PopupPayload$MerchantInfo$$serializer.INSTANCE.getDescriptor());
            }
            this.businessName = str;
            this.country = str2;
        }

        public MerchantInfo(String str, String str2) {
            Intrinsics.checkNotNullParameter(str, "businessName");
            this.businessName = str;
            this.country = str2;
        }

        @JvmStatic
        public static final void write$Self(MerchantInfo self, CompositeEncoder output, SerialDescriptor serialDesc) {
            output.encodeStringElement(serialDesc, 0, self.businessName);
            output.encodeNullableSerializableElement(serialDesc, 1, StringSerializer.INSTANCE, self.country);
        }

        public final String getBusinessName() {
            return this.businessName;
        }

        public final String getCountry() {
            return this.country;
        }
    }

    public final Map<String, String> getExperiments() {
        return this.experiments;
    }

    @Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0087\b\u0018\u0000 !2\u00020\u0001:\u0002 !B1\b\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0001\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\n\b\u0001\u0010\u0006\u001a\u0004\u0018\u00010\u0005\u0012\b\u0010\u0007\u001a\u0004\u0018\u00010\b¢\u0006\u0002\u0010\tB\u0019\u0012\b\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\b\u0010\u0006\u001a\u0004\u0018\u00010\u0005¢\u0006\u0002\u0010\nJ\u000b\u0010\u0011\u001a\u0004\u0018\u00010\u0005HÆ\u0003J\u000b\u0010\u0012\u001a\u0004\u0018\u00010\u0005HÆ\u0003J!\u0010\u0013\u001a\u00020\u00002\n\b\u0002\u0010\u0004\u001a\u0004\u0018\u00010\u00052\n\b\u0002\u0010\u0006\u001a\u0004\u0018\u00010\u0005HÆ\u0001J\u0013\u0010\u0014\u001a\u00020\u00152\b\u0010\u0016\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0017\u001a\u00020\u0003HÖ\u0001J\t\u0010\u0018\u001a\u00020\u0005HÖ\u0001J!\u0010\u0019\u001a\u00020\u001a2\u0006\u0010\u001b\u001a\u00020\u00002\u0006\u0010\u001c\u001a\u00020\u001d2\u0006\u0010\u001e\u001a\u00020\u001fHÇ\u0001R\u001e\u0010\u0006\u001a\u0004\u0018\u00010\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\u000b\u0010\f\u001a\u0004\b\r\u0010\u000eR\u001e\u0010\u0004\u001a\u0004\u0018\u00010\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\u000f\u0010\f\u001a\u0004\b\u0010\u0010\u000e¨\u0006\""}, d2 = {"Lcom/stripe/android/link/serialization/PopupPayload$CustomerInfo;", "", "seen1", "", "email", "", "country", "serializationConstructorMarker", "Lkotlinx/serialization/internal/SerializationConstructorMarker;", "(ILjava/lang/String;Ljava/lang/String;Lkotlinx/serialization/internal/SerializationConstructorMarker;)V", "(Ljava/lang/String;Ljava/lang/String;)V", "getCountry$annotations", "()V", "getCountry", "()Ljava/lang/String;", "getEmail$annotations", "getEmail", "component1", "component2", "copy", "equals", "", "other", "hashCode", "toString", "write$Self", "", "self", "output", "Lkotlinx/serialization/encoding/CompositeEncoder;", "serialDesc", "Lkotlinx/serialization/descriptors/SerialDescriptor;", "$serializer", "Companion", "link_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    @Serializable
    public static final class CustomerInfo {
        public static final int $stable = 0;

        public static final Companion INSTANCE = new Companion(null);
        private final String country;
        private final String email;

        public static CustomerInfo copy$default(CustomerInfo customerInfo, String str, String str2, int i, Object obj) {
            if ((i & 1) != 0) {
                str = customerInfo.email;
            }
            if ((i & 2) != 0) {
                str2 = customerInfo.country;
            }
            return customerInfo.copy(str, str2);
        }

        @SerialName("country")
        public static void getCountry$annotations() {
        }

        @SerialName("email")
        public static void getEmail$annotations() {
        }

        public final String getEmail() {
            return this.email;
        }

        public final String getCountry() {
            return this.country;
        }

        public final CustomerInfo copy(String email, String country) {
            return new CustomerInfo(email, country);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof CustomerInfo)) {
                return false;
            }
            CustomerInfo customerInfo = (CustomerInfo) other;
            return Intrinsics.areEqual(this.email, customerInfo.email) && Intrinsics.areEqual(this.country, customerInfo.country);
        }

        public int hashCode() {
            String str = this.email;
            int hashCode = (str == null ? 0 : str.hashCode()) * 31;
            String str2 = this.country;
            return hashCode + (str2 != null ? str2.hashCode() : 0);
        }

        public String toString() {
            return "CustomerInfo(email=" + this.email + ", country=" + this.country + ")";
        }

        @Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u000f\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004HÆ\u0001¨\u0006\u0006"}, d2 = {"Lcom/stripe/android/link/serialization/PopupPayload$CustomerInfo$Companion;", "", "()V", "serializer", "Lkotlinx/serialization/KSerializer;", "Lcom/stripe/android/link/serialization/PopupPayload$CustomerInfo;", "link_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class Companion {
            public Companion(DefaultConstructorMarker defaultConstructorMarker) {
                this();
            }

            private Companion() {
            }

            public final KSerializer<CustomerInfo> serializer() {
                return PopupPayload$CustomerInfo$$serializer.INSTANCE;
            }
        }

        @Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = @ReplaceWith(expression = "", imports = {}))
        public CustomerInfo(int i, @SerialName("email") String str, @SerialName("country") String str2, SerializationConstructorMarker serializationConstructorMarker) {
            if (3 != (i & 3)) {
                PluginExceptionsKt.throwMissingFieldException(i, 3, PopupPayload$CustomerInfo$$serializer.INSTANCE.getDescriptor());
            }
            this.email = str;
            this.country = str2;
        }

        public CustomerInfo(String str, String str2) {
            this.email = str;
            this.country = str2;
        }

        @JvmStatic
        public static final void write$Self(CustomerInfo self, CompositeEncoder output, SerialDescriptor serialDesc) {
            output.encodeNullableSerializableElement(serialDesc, 0, StringSerializer.INSTANCE, self.email);
            output.encodeNullableSerializableElement(serialDesc, 1, StringSerializer.INSTANCE, self.country);
        }

        public final String getEmail() {
            return this.email;
        }

        public final String getCountry() {
            return this.country;
        }
    }

    @Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\b\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\t\n\u0000\n\u0002\u0018\u0002\n\u0002\b\r\n\u0002\u0010\u000b\n\u0002\b\u0004\n\u0002\u0010\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\b\u0087\b\u0018\u0000 #2\u00020\u0001:\u0002\"#B/\b\u0017\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\n\b\u0001\u0010\u0004\u001a\u0004\u0018\u00010\u0005\u0012\b\b\u0001\u0010\u0006\u001a\u00020\u0007\u0012\b\u0010\b\u001a\u0004\u0018\u00010\t¢\u0006\u0002\u0010\nB\u0015\u0012\u0006\u0010\u0004\u001a\u00020\u0005\u0012\u0006\u0010\u0006\u001a\u00020\u0007¢\u0006\u0002\u0010\u000bJ\t\u0010\u0013\u001a\u00020\u0005HÆ\u0003J\t\u0010\u0014\u001a\u00020\u0007HÆ\u0003J\u001d\u0010\u0015\u001a\u00020\u00002\b\b\u0002\u0010\u0004\u001a\u00020\u00052\b\b\u0002\u0010\u0006\u001a\u00020\u0007HÆ\u0001J\u0013\u0010\u0016\u001a\u00020\u00172\b\u0010\u0018\u001a\u0004\u0018\u00010\u0001HÖ\u0003J\t\u0010\u0019\u001a\u00020\u0003HÖ\u0001J\t\u0010\u001a\u001a\u00020\u0005HÖ\u0001J!\u0010\u001b\u001a\u00020\u001c2\u0006\u0010\u001d\u001a\u00020\u00002\u0006\u0010\u001e\u001a\u00020\u001f2\u0006\u0010 \u001a\u00020!HÇ\u0001R\u001c\u0010\u0006\u001a\u00020\u00078\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\f\u0010\r\u001a\u0004\b\u000e\u0010\u000fR\u001c\u0010\u0004\u001a\u00020\u00058\u0006X\u0087\u0004¢\u0006\u000e\n\u0000\u0012\u0004\b\u0010\u0010\r\u001a\u0004\b\u0011\u0010\u0012¨\u0006$"}, d2 = {"Lcom/stripe/android/link/serialization/PopupPayload$PaymentInfo;", "", "seen1", "", FirebaseAnalytics.Param.CURRENCY, "", "amount", "", "serializationConstructorMarker", "Lkotlinx/serialization/internal/SerializationConstructorMarker;", "(ILjava/lang/String;JLkotlinx/serialization/internal/SerializationConstructorMarker;)V", "(Ljava/lang/String;J)V", "getAmount$annotations", "()V", "getAmount", "()J", "getCurrency$annotations", "getCurrency", "()Ljava/lang/String;", "component1", "component2", "copy", "equals", "", "other", "hashCode", "toString", "write$Self", "", "self", "output", "Lkotlinx/serialization/encoding/CompositeEncoder;", "serialDesc", "Lkotlinx/serialization/descriptors/SerialDescriptor;", "$serializer", "Companion", "link_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    @Serializable
    public static final class PaymentInfo {
        public static final int $stable = 0;

        public static final Companion INSTANCE = new Companion(null);
        private final long amount;
        private final String currency;

        public static PaymentInfo copy$default(PaymentInfo paymentInfo, String str, long j, int i, Object obj) {
            if ((i & 1) != 0) {
                str = paymentInfo.currency;
            }
            if ((i & 2) != 0) {
                j = paymentInfo.amount;
            }
            return paymentInfo.copy(str, j);
        }

        @SerialName("amount")
        public static void getAmount$annotations() {
        }

        @SerialName(FirebaseAnalytics.Param.CURRENCY)
        public static void getCurrency$annotations() {
        }

        public final String getCurrency() {
            return this.currency;
        }

        public final long getAmount() {
            return this.amount;
        }

        public final PaymentInfo copy(String currency, long amount) {
            Intrinsics.checkNotNullParameter(currency, FirebaseAnalytics.Param.CURRENCY);
            return new PaymentInfo(currency, amount);
        }

        public boolean equals(Object other) {
            if (this == other) {
                return true;
            }
            if (!(other instanceof PaymentInfo)) {
                return false;
            }
            PaymentInfo paymentInfo = (PaymentInfo) other;
            return Intrinsics.areEqual(this.currency, paymentInfo.currency) && this.amount == paymentInfo.amount;
        }

        public int hashCode() {
            return (this.currency.hashCode() * 31) + Long.hashCode(this.amount);
        }

        public String toString() {
            return "PaymentInfo(currency=" + this.currency + ", amount=" + this.amount + ")";
        }

        @Metadata(d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u000f\u0010\u0003\u001a\b\u0012\u0004\u0012\u00020\u00050\u0004HÆ\u0001¨\u0006\u0006"}, d2 = {"Lcom/stripe/android/link/serialization/PopupPayload$PaymentInfo$Companion;", "", "()V", "serializer", "Lkotlinx/serialization/KSerializer;", "Lcom/stripe/android/link/serialization/PopupPayload$PaymentInfo;", "link_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
        public static final class Companion {
            public Companion(DefaultConstructorMarker defaultConstructorMarker) {
                this();
            }

            private Companion() {
            }

            public final KSerializer<PaymentInfo> serializer() {
                return PopupPayload$PaymentInfo$$serializer.INSTANCE;
            }
        }

        @Deprecated(level = DeprecationLevel.HIDDEN, message = "This synthesized declaration should not be used directly", replaceWith = @ReplaceWith(expression = "", imports = {}))
        public PaymentInfo(int i, @SerialName("currency") String str, @SerialName("amount") long j, SerializationConstructorMarker serializationConstructorMarker) {
            if (3 != (i & 3)) {
                PluginExceptionsKt.throwMissingFieldException(i, 3, PopupPayload$PaymentInfo$$serializer.INSTANCE.getDescriptor());
            }
            this.currency = str;
            this.amount = j;
        }

        public PaymentInfo(String str, long j) {
            Intrinsics.checkNotNullParameter(str, FirebaseAnalytics.Param.CURRENCY);
            this.currency = str;
            this.amount = j;
        }

        @JvmStatic
        public static final void write$Self(PaymentInfo self, CompositeEncoder output, SerialDescriptor serialDesc) {
            output.encodeStringElement(serialDesc, 0, self.currency);
            output.encodeLongElement(serialDesc, 1, self.amount);
        }

        public final String getCurrency() {
            return this.currency;
        }

        public final long getAmount() {
            return this.amount;
        }
    }

    public final String toUrl() {
        return baseUrl + Base64.encodeToString(StringsKt.encodeToByteArray(PopupPayloadJson.encodeToString(INSTANCE.serializer(), this)), 2);
    }

    @Metadata(d1 = {"\u0000B\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J0\u0010\t\u001a\u00020\n2\u0006\u0010\u000b\u001a\u00020\f2\u0006\u0010\r\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00020\b2\b\u0010\u0010\u001a\u0004\u0018\u00010\b2\u0006\u0010\u0011\u001a\u00020\bJ\u000f\u0010\u0012\u001a\b\u0012\u0004\u0012\u00020\n0\u0013HÆ\u0001J\f\u0010\u0014\u001a\u00020\b*\u00020\u000eH\u0002J\f\u0010\u0015\u001a\u00020\b*\u00020\fH\u0002J\u000e\u0010\u0016\u001a\u0004\u0018\u00010\u0017*\u00020\u0018H\u0002J.\u0010\u0019\u001a\u00020\n*\u00020\f2\u0006\u0010\r\u001a\u00020\u000e2\u0006\u0010\u000f\u001a\u00020\b2\b\u0010\u0010\u001a\u0004\u0018\u00010\b2\u0006\u0010\u0011\u001a\u00020\bH\u0002R\u0011\u0010\u0003\u001a\u00020\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0005\u0010\u0006R\u000e\u0010\u0007\u001a\u00020\bX\u0082T¢\u0006\u0002\n\u0000¨\u0006\u001a"}, d2 = {"Lcom/stripe/android/link/serialization/PopupPayload$Companion;", "", "()V", "PopupPayloadJson", "Lkotlinx/serialization/json/Json;", "getPopupPayloadJson", "()Lkotlinx/serialization/json/Json;", "baseUrl", "", "create", "Lcom/stripe/android/link/serialization/PopupPayload;", "configuration", "Lcom/stripe/android/link/LinkConfiguration;", "context", "Landroid/content/Context;", NamedConstantsKt.PUBLISHABLE_KEY, "stripeAccount", "paymentUserAgent", "serializer", "Lkotlinx/serialization/KSerializer;", "currentLocale", "paymentObject", "toPaymentInfo", "Lcom/stripe/android/link/serialization/PopupPayload$PaymentInfo;", "Lcom/stripe/android/model/StripeIntent;", "toPopupPayload", "link_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
    public static final class Companion {
        public Companion(DefaultConstructorMarker defaultConstructorMarker) {
            this();
        }

        private Companion() {
        }

        public final KSerializer<PopupPayload> serializer() {
            return PopupPayload$$serializer.INSTANCE;
        }

        public final Json getPopupPayloadJson() {
            return PopupPayload.PopupPayloadJson;
        }

        public final PopupPayload create(LinkConfiguration configuration, Context context, String publishableKey, String stripeAccount, String paymentUserAgent) {
            Intrinsics.checkNotNullParameter(configuration, "configuration");
            Intrinsics.checkNotNullParameter(context, "context");
            Intrinsics.checkNotNullParameter(publishableKey, NamedConstantsKt.PUBLISHABLE_KEY);
            Intrinsics.checkNotNullParameter(paymentUserAgent, "paymentUserAgent");
            return toPopupPayload(configuration, context, publishableKey, stripeAccount, paymentUserAgent);
        }

        private final PopupPayload toPopupPayload(LinkConfiguration linkConfiguration, Context context, String str, String str2, String str3) {
            MerchantInfo merchantInfo = new MerchantInfo(linkConfiguration.getMerchantName(), linkConfiguration.getMerchantCountryCode());
            String customerEmail = linkConfiguration.getCustomerEmail();
            String customerBillingCountryCode = linkConfiguration.getCustomerBillingCountryCode();
            if (customerBillingCountryCode == null) {
                customerBillingCountryCode = linkConfiguration.getMerchantCountryCode();
            }
            CustomerInfo customerInfo = new CustomerInfo(customerEmail, customerBillingCountryCode);
            PaymentInfo paymentInfo = toPaymentInfo(linkConfiguration.getStripeIntent());
            String str4 = context.getApplicationInfo().packageName;
            Intrinsics.checkNotNullExpressionValue(str4, "context.applicationInfo.packageName");
            return new PopupPayload(str, str2, merchantInfo, customerInfo, paymentInfo, str4, currentLocale(context), str3, paymentObject(linkConfiguration));
        }

        private final String paymentObject(LinkConfiguration linkConfiguration) {
            return linkConfiguration.getPassthroughModeEnabled() ? "card_payment_method" : "link_payment_method";
        }

        private final PaymentInfo toPaymentInfo(StripeIntent stripeIntent) {
            if (stripeIntent instanceof PaymentIntent) {
                PaymentIntent paymentIntent = (PaymentIntent) stripeIntent;
                String currency = paymentIntent.getCurrency();
                Long amount = paymentIntent.getAmount();
                if (currency == null || amount == null) {
                    return null;
                }
                return new PaymentInfo(currency, amount.longValue());
            }
            if (stripeIntent instanceof SetupIntent) {
                return null;
            }
            throw new NoWhenBranchMatchedException();
        }

        private final String currentLocale(Context context) {
            Locale locale;
            if (Build.VERSION.SDK_INT >= 24) {
                locale = context.getResources().getConfiguration().getLocales().get(0);
            } else {
                locale = context.getResources().getConfiguration().locale;
            }
            String country = locale.getCountry();
            Intrinsics.checkNotNullExpressionValue(country, "if (Build.VERSION.SDK_IN…ale\n            }.country");
            return country;
        }
    }
}