Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45
以下内容为反编译后的 SNSMobileSDK.java 源代码,内容仅作参考
package com.sumsub.sns.core;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import androidx.fragment.app.Fragment;
import co.g0;
import com.google.android.gms.measurement.api.AppMeasurementSdk;
import com.google.android.gms.security.ProviderInstaller;
import com.sumsub.log.LoggerType;
import com.sumsub.log.c;
import com.sumsub.log.cacher.d;
import com.sumsub.log.cacher.e;
import com.sumsub.log.logger.Logger;
import com.sumsub.sentry.c0;
import com.sumsub.sentry.t;
import com.sumsub.sns.core.analytics.Screen;
import com.sumsub.sns.core.common.SNSSession;
import com.sumsub.sns.core.common.b0;
import com.sumsub.sns.core.common.d0;
import com.sumsub.sns.core.common.h;
import com.sumsub.sns.core.common.n0;
import com.sumsub.sns.core.common.q0;
import com.sumsub.sns.core.data.listener.SNSActionResultHandler;
import com.sumsub.sns.core.data.listener.SNSCompleteHandler;
import com.sumsub.sns.core.data.listener.SNSCountryPicker;
import com.sumsub.sns.core.data.listener.SNSDefaultCountryPicker;
import com.sumsub.sns.core.data.listener.SNSDefaultIconHandler;
import com.sumsub.sns.core.data.listener.SNSErrorHandler;
import com.sumsub.sns.core.data.listener.SNSEvent;
import com.sumsub.sns.core.data.listener.SNSEventHandler;
import com.sumsub.sns.core.data.listener.SNSIconHandler;
import com.sumsub.sns.core.data.listener.SNSInstructionsViewHandler;
import com.sumsub.sns.core.data.listener.SNSStateChangedHandler;
import com.sumsub.sns.core.data.listener.SNSUrlHandler;
import com.sumsub.sns.core.data.listener.TokenExpirationHandler;
import com.sumsub.sns.core.data.model.LogParams;
import com.sumsub.sns.core.data.model.SNSCompletionResult;
import com.sumsub.sns.core.data.model.SNSDocumentDefinition;
import com.sumsub.sns.core.data.model.SNSException;
import com.sumsub.sns.core.data.model.SNSInitConfig;
import com.sumsub.sns.core.data.model.SNSInvalidParametersException;
import com.sumsub.sns.core.data.model.SNSSDKState;
import com.sumsub.sns.core.data.model.SNSSupportItem;
import com.sumsub.sns.core.presentation.SNSAnalyticsScreenMapper;
import com.sumsub.sns.core.theme.SNSJsonCustomization;
import com.sumsub.sns.core.theme.SNSJsonCustomizationImpl;
import com.sumsub.sns.core.theme.SNSTheme;
import com.sumsub.sns.presentation.utils.AnalyticMapperKt;
import com.sumsub.sns.prooface.SNSProoface;
import com.sumsub.sns.videoident.presentation.SNSVideoIdentFragment;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.lang.Thread;
import java.lang.ref.WeakReference;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;
import java.util.Locale;
import java.util.Map;
import kotlin.Metadata;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.k;
import kotlin.jvm.internal.u;
import kotlin.text.v;
import kotlin.text.w;
import kr.p1;
import org.jetbrains.annotations.NotNull;
import qo.l;
import qo.p;
@Metadata(d1 = {"\u0000j\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000e\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\n\bÆ\u0002\u0018\u00002\u00020\u0001:\u0004=>?@B\t\b\u0002¢\u0006\u0004\b;\u0010<J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0010\u0010\u0006\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0010\u0010\u0007\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\b\u0010\t\u001a\u00020\bH\u0016J\u0006\u0010\n\u001a\u00020\u0004R\u0018\u0010\u000b\u001a\u0004\u0018\u00010\u00028\u0002@\u0002X\u0082\u000e¢\u0006\u0006\n\u0004\b\u000b\u0010\fR$\u0010\u000f\u001a\u00020\r2\u0006\u0010\u000e\u001a\u00020\r8\u0006@BX\u0086\u000e¢\u0006\f\n\u0004\b\u000f\u0010\u0010\u001a\u0004\b\u0011\u0010\u0012R$\u0010\u0014\u001a\u00020\u00132\u0006\u0010\u000e\u001a\u00020\u00138\u0006@BX\u0086\u000e¢\u0006\f\n\u0004\b\u0014\u0010\u0015\u001a\u0004\b\u0016\u0010\u0017R\u001a\u0010\u001c\u001a\b\u0012\u0004\u0012\u00020\u00190\u00188BX\u0082\u0004¢\u0006\u0006\u001a\u0004\b\u001a\u0010\u001bR\u0016\u0010 \u001a\u0004\u0018\u00010\u001d8\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\b\u001e\u0010\u001fR\u0014\u0010\"\u001a\u00020!8\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\b\"\u0010#R\u0014\u0010'\u001a\u00020$8\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\b%\u0010&R\u0014\u0010*\u001a\u00020\b8\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\b(\u0010)R\u0014\u0010.\u001a\u00020+8\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\b,\u0010-R\u0016\u00102\u001a\u0004\u0018\u00010/8\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\b0\u00101R\u0014\u00104\u001a\u00020\u00138\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\b3\u0010\u0017R\u0014\u00106\u001a\u00020\b8\u0016X\u0096\u0005¢\u0006\u0006\u001a\u0004\b5\u0010)R\u0013\u0010:\u001a\u0004\u0018\u0001078F¢\u0006\u0006\u001a\u0004\b8\u00109¨\u0006A"}, d2 = {"Lcom/sumsub/sns/core/SNSMobileSDK;", "", "Lcom/sumsub/sns/core/SNSMobileSDK$SDK;", "sdk", "Lco/g0;", "start", "initLogger", "initFeatures", "", "toString", "shutdown", "_sdk", "Lcom/sumsub/sns/core/SNSMobileSDK$SDK;", "Lcom/sumsub/log/logger/Logger;", "<set-?>", "logTree", "Lcom/sumsub/log/logger/Logger;", "getLogTree", "()Lcom/sumsub/log/logger/Logger;", "", "theme", "I", "getTheme", "()I", "", "Lcom/sumsub/sns/core/SNSModule;", "getModules", "()Ljava/util/List;", "modules", "Lcom/sumsub/sns/core/data/listener/SNSEventHandler;", "getEventHandler", "()Lcom/sumsub/sns/core/data/listener/SNSEventHandler;", "eventHandler", "", "isDebug", "()Z", "Ljava/util/Locale;", "getLocale", "()Ljava/util/Locale;", "locale", "getPackageName", "()Ljava/lang/String;", "packageName", "Lcom/sumsub/sns/core/data/model/SNSSDKState;", "getState", "()Lcom/sumsub/sns/core/data/model/SNSSDKState;", "state", "Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;", "getUrlHandler", "()Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;", "urlHandler", "getVersionCode", "versionCode", "getVersionName", "versionName", "Lcom/sumsub/sns/core/data/listener/SNSCompleteHandler;", "getCompleteHandler", "()Lcom/sumsub/sns/core/data/listener/SNSCompleteHandler;", "completeHandler", "<init>", "()V", "Builder", "SDK", "SNSExceptionHandler", "SNSSDK", "idensic-mobile-sdk_release"}, k = 1, mv = {1, 7, 1})
public final class SNSMobileSDK {
@NotNull
public static final SNSMobileSDK INSTANCE = new SNSMobileSDK();
private static SDK _sdk;
@NotNull
private static Logger logTree;
private static int theme;
private final b0 $$delegate_0 = b0.f36997a;
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/theme/SNSJsonCustomizationImpl;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass1 extends u implements qo.a<SNSJsonCustomizationImpl> {
public static final AnonymousClass1 INSTANCE = new AnonymousClass1();
AnonymousClass1() {
super(0);
}
@Override
@NotNull
public final SNSJsonCustomizationImpl invoke() {
return new SNSJsonCustomizationImpl();
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/listener/SNSActionResultHandler;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass10 extends u implements qo.a<SNSActionResultHandler> {
public static final AnonymousClass10 INSTANCE = new AnonymousClass10();
AnonymousClass10() {
super(0);
}
@Override
public final SNSActionResultHandler invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getActionResultHandler();
}
return null;
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/SNSModule;", AppMeasurementSdk.ConditionalUserProperty.NAME, "", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass11 extends u implements l<String, SNSModule> {
public static final AnonymousClass11 INSTANCE = new AnonymousClass11();
AnonymousClass11() {
super(1);
}
@Override
public final SNSModule invoke(@NotNull String str) {
Object obj;
List modules = SNSMobileSDK.INSTANCE.getModules();
ListIterator listIterator = modules.listIterator(modules.size());
while (true) {
if (!listIterator.hasPrevious()) {
obj = null;
break;
}
obj = listIterator.previous();
if (Intrinsics.g(((SNSModule) obj).getClass().getName(), str)) {
break;
}
}
return (SNSModule) obj;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/listener/SNSIconHandler;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass12 extends u implements qo.a<SNSIconHandler> {
public static final AnonymousClass12 INSTANCE = new AnonymousClass12();
AnonymousClass12() {
super(0);
}
@Override
@NotNull
public final SNSIconHandler invoke() {
SNSIconHandler iconHandler;
SDK sdk = SNSMobileSDK._sdk;
return (sdk == null || (iconHandler = sdk.getIconHandler()) == null) ? new SNSDefaultIconHandler() : iconHandler;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/listener/SNSCountryPicker;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass13 extends u implements qo.a<SNSCountryPicker> {
public static final AnonymousClass13 INSTANCE = new AnonymousClass13();
AnonymousClass13() {
super(0);
}
@Override
@NotNull
public final SNSCountryPicker invoke() {
SNSCountryPicker countryPicker;
SDK sdk = SNSMobileSDK._sdk;
return (sdk == null || (countryPicker = sdk.getCountryPicker()) == null) ? new SNSDefaultCountryPicker() : countryPicker;
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0003\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "", "", "Lcom/sumsub/sns/core/data/model/SNSDocumentDefinition;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass14 extends u implements qo.a<Map<String, ? extends SNSDocumentDefinition>> {
public static final AnonymousClass14 INSTANCE = new AnonymousClass14();
AnonymousClass14() {
super(0);
}
@Override
public final Map<String, ? extends SNSDocumentDefinition> invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getPreferredDocumentsDefinitions$idensic_mobile_sdk_release();
}
return null;
}
}
@Metadata(d1 = {"\u0000\n\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"<anonymous>", "", "invoke", "()Ljava/lang/Integer;"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass15 extends u implements qo.a<Integer> {
public static final AnonymousClass15 INSTANCE = new AnonymousClass15();
AnonymousClass15() {
super(0);
}
@Override
public final Integer invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getAutoCloseOnApproveTimeout();
}
return null;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass16 extends u implements qo.a<SNSUrlHandler> {
public static final AnonymousClass16 INSTANCE = new AnonymousClass16();
AnonymousClass16() {
super(0);
}
@Override
public final SNSUrlHandler invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getSnsUrlHandler();
}
return null;
}
}
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\n\u0012\u0004\u0012\u00020\u0002\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0003"}, d2 = {"<anonymous>", "", "Lcom/sumsub/sns/core/data/model/SNSSupportItem;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass17 extends u implements qo.a<List<? extends SNSSupportItem>> {
public static final AnonymousClass17 INSTANCE = new AnonymousClass17();
AnonymousClass17() {
super(0);
}
@Override
public final List<? extends SNSSupportItem> invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getSupportItems$idensic_mobile_sdk_release();
}
return null;
}
}
@Metadata(d1 = {"\u0000\u0012\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0006\u001a\u00020\u00032\u000e\u0010\u0002\u001a\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"", "Lcom/sumsub/sns/core/data/model/SNSSupportItem;", "it", "Lco/g0;", "invoke", "(Ljava/util/List;)V", "<anonymous>"}, k = 3, mv = {1, 7, 1})
static final class AnonymousClass18 extends u implements l<List<? extends SNSSupportItem>, g0> {
public static final AnonymousClass18 INSTANCE = new AnonymousClass18();
AnonymousClass18() {
super(1);
}
@Override
public g0 invoke(List<? extends SNSSupportItem> list) {
invoke2((List<SNSSupportItem>) list);
return g0.f25238a;
}
public final void invoke2(List<SNSSupportItem> list) {
SDK sdk = SNSMobileSDK._sdk;
if (sdk == null) {
return;
}
sdk.setSupportItems$idensic_mobile_sdk_release(list);
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/analytics/Screen;", "it", "Landroidx/fragment/app/Fragment;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass19 extends u implements l<Fragment, Screen> {
public static final AnonymousClass19 INSTANCE = new AnonymousClass19();
AnonymousClass19() {
super(1);
}
@Override
public final Screen invoke(@NotNull Fragment fragment) {
return AnalyticMapperKt.getScreenByFragment(fragment);
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/model/SNSInitConfig;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass2 extends u implements qo.a<SNSInitConfig> {
public static final AnonymousClass2 INSTANCE = new AnonymousClass2();
AnonymousClass2() {
super(0);
}
@Override
public final SNSInitConfig invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getConf();
}
return null;
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u00012\u0006\u0010\u0002\u001a\u00020\u0003H\n¢\u0006\u0002\b\u0004"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/analytics/Screen;", "fragment", "Landroidx/fragment/app/Fragment;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass20 extends u implements l<Fragment, Screen> {
public static final AnonymousClass20 INSTANCE = new AnonymousClass20();
AnonymousClass20() {
super(1);
}
@Override
public final Screen invoke(@NotNull Fragment fragment) {
Screen screen = Screen.VideoidentScreen;
if (fragment instanceof SNSVideoIdentFragment) {
return screen;
}
return null;
}
}
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010$\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0002\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0003"}, d2 = {"<anonymous>", "", "", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass3 extends u implements qo.a<Map<String, ? extends String>> {
public static final AnonymousClass3 INSTANCE = new AnonymousClass3();
AnonymousClass3() {
super(0);
}
@Override
public final Map<String, ? extends String> invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getSettings$idensic_mobile_sdk_release();
}
return null;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/listener/TokenExpirationHandler;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass4 extends u implements qo.a<TokenExpirationHandler> {
public static final AnonymousClass4 INSTANCE = new AnonymousClass4();
AnonymousClass4() {
super(0);
}
@Override
public final TokenExpirationHandler invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getOnTokenExpiration();
}
return null;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/listener/SNSStateChangedHandler;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass5 extends u implements qo.a<SNSStateChangedHandler> {
public static final AnonymousClass5 INSTANCE = new AnonymousClass5();
AnonymousClass5() {
super(0);
}
@Override
public final SNSStateChangedHandler invoke() {
SDK sdk = SNSMobileSDK._sdk;
SNSSDK snssdk = sdk instanceof SNSSDK ? (SNSSDK) sdk : null;
if (snssdk != null) {
return snssdk.getStateChangedHandler();
}
return null;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/listener/SNSErrorHandler;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass6 extends u implements qo.a<SNSErrorHandler> {
public static final AnonymousClass6 INSTANCE = new AnonymousClass6();
AnonymousClass6() {
super(0);
}
@Override
public final SNSErrorHandler invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getErrorHandler();
}
return null;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/listener/SNSEventHandler;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass7 extends u implements qo.a<SNSEventHandler> {
public static final AnonymousClass7 INSTANCE = new AnonymousClass7();
AnonymousClass7() {
super(0);
}
@Override
public final SNSEventHandler invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getEventHandler();
}
return null;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/theme/SNSJsonCustomization;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass8 extends u implements qo.a<SNSJsonCustomization> {
public static final AnonymousClass8 INSTANCE = new AnonymousClass8();
AnonymousClass8() {
super(0);
}
@Override
public final SNSJsonCustomization invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getCustomization();
}
return null;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u0004\u0018\u00010\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Lcom/sumsub/sns/core/data/listener/SNSInstructionsViewHandler;", "invoke"}, k = 3, mv = {1, 7, 1}, xi = 48)
static final class AnonymousClass9 extends u implements qo.a<SNSInstructionsViewHandler> {
public static final AnonymousClass9 INSTANCE = new AnonymousClass9();
AnonymousClass9() {
super(0);
}
@Override
public final SNSInstructionsViewHandler invoke() {
SDK sdk = SNSMobileSDK._sdk;
if (sdk != null) {
return sdk.getInstructionsViewHandler();
}
return null;
}
}
@Metadata(d1 = {"\u0000Ø\u0001\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010 \n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010\b\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0010$\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0004\b&\u0018\u00002\u00020\u0001B\u0013\u0012\b\u0010\u0085\u0001\u001a\u00030\u0084\u0001¢\u0006\u0006\b\u0086\u0001\u0010\u0087\u0001J\u000e\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00030\u0002H\u0002J\u0018\u0010\n\u001a\u00020\t2\u0006\u0010\u0006\u001a\u00020\u00052\u0006\u0010\b\u001a\u00020\u0007H\u0002J\b\u0010\f\u001a\u00020\u000bH\u0017J\u0017\u0010\u0010\u001a\u00020\u000b2\u0006\u0010\r\u001a\u00020\u0003H\u0000¢\u0006\u0004\b\u000e\u0010\u000fJ\u000f\u0010\u0013\u001a\u00020\u000bH\u0000¢\u0006\u0004\b\u0011\u0010\u0012R \u0010\u0016\u001a\b\u0012\u0004\u0012\u00020\u00150\u00148\u0000X\u0080\u0004¢\u0006\f\n\u0004\b\u0016\u0010\u0017\u001a\u0004\b\u0018\u0010\u0019R\u001a\u0010\u001a\u001a\u00020\u00038\u0000X\u0080\u0004¢\u0006\f\n\u0004\b\u001a\u0010\u001b\u001a\u0004\b\u001c\u0010\u001dR$\u0010\u001e\u001a\u0004\u0018\u00010\u00038\u0000@\u0000X\u0080\u000e¢\u0006\u0012\n\u0004\b\u001e\u0010\u001b\u001a\u0004\b\u001f\u0010\u001d\"\u0004\b \u0010\u000fR \u0010\"\u001a\b\u0012\u0004\u0012\u00020!0\u00028\u0000X\u0080\u0004¢\u0006\f\n\u0004\b\"\u0010#\u001a\u0004\b$\u0010%R*\u0010'\u001a\n\u0012\u0004\u0012\u00020&\u0018\u00010\u00028\u0000@\u0000X\u0080\u000e¢\u0006\u0012\n\u0004\b'\u0010#\u001a\u0004\b(\u0010%\"\u0004\b)\u0010*R\u001c\u0010,\u001a\u0004\u0018\u00010+8\u0000X\u0080\u0004¢\u0006\f\n\u0004\b,\u0010-\u001a\u0004\b.\u0010/R\u001c\u00101\u001a\u0004\u0018\u0001008\u0000X\u0080\u0004¢\u0006\f\n\u0004\b1\u00102\u001a\u0004\b3\u00104R\u001c\u00106\u001a\u0004\u0018\u0001058\u0000X\u0080\u0004¢\u0006\f\n\u0004\b6\u00107\u001a\u0004\b8\u00109R\u001c\u0010;\u001a\u0004\u0018\u00010:8\u0000X\u0080\u0004¢\u0006\f\n\u0004\b;\u0010<\u001a\u0004\b=\u0010>R\u001c\u0010@\u001a\u0004\u0018\u00010?8\u0000X\u0080\u0004¢\u0006\f\n\u0004\b@\u0010A\u001a\u0004\bB\u0010CR\u001c\u0010E\u001a\u0004\u0018\u00010D8\u0000X\u0080\u0004¢\u0006\f\n\u0004\bE\u0010F\u001a\u0004\bG\u0010HR\u001c\u0010J\u001a\u0004\u0018\u00010I8\u0000X\u0080\u0004¢\u0006\f\n\u0004\bJ\u0010K\u001a\u0004\bL\u0010MR\u001c\u0010O\u001a\u0004\u0018\u00010N8\u0000X\u0080\u0004¢\u0006\f\n\u0004\bO\u0010P\u001a\u0004\bQ\u0010RR\u001a\u0010T\u001a\u00020S8\u0000X\u0080\u0004¢\u0006\f\n\u0004\bT\u0010U\u001a\u0004\bV\u0010WR\u001a\u0010X\u001a\u00020S8\u0000X\u0080\u0004¢\u0006\f\n\u0004\bX\u0010U\u001a\u0004\bY\u0010WR\u001a\u0010[\u001a\u00020Z8\u0000X\u0080\u0004¢\u0006\f\n\u0004\b[\u0010\\\u001a\u0004\b]\u0010^R\u001a\u0010`\u001a\u00020_8\u0000X\u0080\u0004¢\u0006\f\n\u0004\b`\u0010a\u001a\u0004\bb\u0010cR\u001c\u0010e\u001a\u0004\u0018\u00010d8\u0000X\u0080\u0004¢\u0006\f\n\u0004\be\u0010f\u001a\u0004\bg\u0010hR\u001c\u0010j\u001a\u0004\u0018\u00010i8\u0000X\u0080\u0004¢\u0006\f\n\u0004\bj\u0010k\u001a\u0004\bl\u0010mR\u001c\u0010o\u001a\u0004\u0018\u00010n8\u0000X\u0080\u0004¢\u0006\f\n\u0004\bo\u0010p\u001a\u0004\bq\u0010rR(\u0010t\u001a\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u0003\u0018\u00010s8\u0000X\u0080\u0004¢\u0006\f\n\u0004\bt\u0010u\u001a\u0004\bv\u0010wR(\u0010y\u001a\u0010\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020x\u0018\u00010s8\u0000X\u0080\u0004¢\u0006\f\n\u0004\by\u0010u\u001a\u0004\bz\u0010wR\u001c\u0010{\u001a\u0004\u0018\u00010i8\u0000X\u0080\u0004¢\u0006\f\n\u0004\b{\u0010k\u001a\u0004\b|\u0010mR\u001e\u0010~\u001a\u0004\u0018\u00010}8\u0000X\u0080\u0004¢\u0006\u000e\n\u0004\b~\u0010\u007f\u001a\u0006\b\u0080\u0001\u0010\u0081\u0001R\u001b\u0010\u0082\u0001\u001a\u0004\u0018\u00010\u00078\u0002@\u0002X\u0082\u000e¢\u0006\b\n\u0006\b\u0082\u0001\u0010\u0083\u0001¨\u0006\u0088\u0001"}, d2 = {"Lcom/sumsub/sns/core/SNSMobileSDK$SDK;", "", "", "", "isParametersValid", "Landroid/content/Context;", "context", "Ljava/lang/Thread$UncaughtExceptionHandler;", "prevExceptionHandler", "Lcom/sumsub/sentry/c0;", "createSentryErrorHandler", "Lco/g0;", "launch", "apiUrl", "installUncaughtExceptionHandler$idensic_mobile_sdk_release", "(Ljava/lang/String;)V", "installUncaughtExceptionHandler", "removeUncaughtExceptionHandler$idensic_mobile_sdk_release", "()V", "removeUncaughtExceptionHandler", "Ljava/lang/ref/WeakReference;", "Landroid/app/Activity;", "weakActivity", "Ljava/lang/ref/WeakReference;", "getWeakActivity$idensic_mobile_sdk_release", "()Ljava/lang/ref/WeakReference;", "url", "Ljava/lang/String;", "getUrl$idensic_mobile_sdk_release", "()Ljava/lang/String;", "accessToken", "getAccessToken$idensic_mobile_sdk_release", "setAccessToken$idensic_mobile_sdk_release", "Lcom/sumsub/sns/core/SNSModule;", "modules", "Ljava/util/List;", "getModules$idensic_mobile_sdk_release", "()Ljava/util/List;", "Lcom/sumsub/sns/core/data/model/SNSSupportItem;", "supportItems", "getSupportItems$idensic_mobile_sdk_release", "setSupportItems$idensic_mobile_sdk_release", "(Ljava/util/List;)V", "Lcom/sumsub/sns/core/data/listener/TokenExpirationHandler;", "onTokenExpiration", "Lcom/sumsub/sns/core/data/listener/TokenExpirationHandler;", "getOnTokenExpiration$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/TokenExpirationHandler;", "Lcom/sumsub/sns/core/data/listener/SNSCompleteHandler;", "completeHandler", "Lcom/sumsub/sns/core/data/listener/SNSCompleteHandler;", "getCompleteHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSCompleteHandler;", "Lcom/sumsub/sns/core/data/listener/SNSErrorHandler;", "errorHandler", "Lcom/sumsub/sns/core/data/listener/SNSErrorHandler;", "getErrorHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSErrorHandler;", "Lcom/sumsub/sns/core/data/listener/SNSActionResultHandler;", "actionResultHandler", "Lcom/sumsub/sns/core/data/listener/SNSActionResultHandler;", "getActionResultHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSActionResultHandler;", "Lcom/sumsub/sns/core/data/listener/SNSEventHandler;", "eventHandler", "Lcom/sumsub/sns/core/data/listener/SNSEventHandler;", "getEventHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSEventHandler;", "Lcom/sumsub/sns/core/data/listener/SNSIconHandler;", "iconHandler", "Lcom/sumsub/sns/core/data/listener/SNSIconHandler;", "getIconHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSIconHandler;", "Lcom/sumsub/sns/core/data/listener/SNSInstructionsViewHandler;", "instructionsViewHandler", "Lcom/sumsub/sns/core/data/listener/SNSInstructionsViewHandler;", "getInstructionsViewHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSInstructionsViewHandler;", "Lcom/sumsub/sns/core/data/listener/SNSCountryPicker;", "countryPicker", "Lcom/sumsub/sns/core/data/listener/SNSCountryPicker;", "getCountryPicker$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSCountryPicker;", "", "isDebug", "Z", "isDebug$idensic_mobile_sdk_release", "()Z", "isAnalyticsEnabled", "isAnalyticsEnabled$idensic_mobile_sdk_release", "Lcom/sumsub/log/logger/Logger;", "logTree", "Lcom/sumsub/log/logger/Logger;", "getLogTree$idensic_mobile_sdk_release", "()Lcom/sumsub/log/logger/Logger;", "Ljava/util/Locale;", "locale", "Ljava/util/Locale;", "getLocale$idensic_mobile_sdk_release", "()Ljava/util/Locale;", "Lcom/sumsub/sns/core/data/model/SNSInitConfig;", "conf", "Lcom/sumsub/sns/core/data/model/SNSInitConfig;", "getConf$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/model/SNSInitConfig;", "", "theme", "Ljava/lang/Integer;", "getTheme$idensic_mobile_sdk_release", "()Ljava/lang/Integer;", "Lcom/sumsub/sns/core/theme/SNSJsonCustomization;", "customization", "Lcom/sumsub/sns/core/theme/SNSJsonCustomization;", "getCustomization$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/theme/SNSJsonCustomization;", "", "settings", "Ljava/util/Map;", "getSettings$idensic_mobile_sdk_release", "()Ljava/util/Map;", "Lcom/sumsub/sns/core/data/model/SNSDocumentDefinition;", "preferredDocumentsDefinitions", "getPreferredDocumentsDefinitions$idensic_mobile_sdk_release", "autoCloseOnApproveTimeout", "getAutoCloseOnApproveTimeout$idensic_mobile_sdk_release", "Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;", "snsUrlHandler", "Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;", "getSnsUrlHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;", "exceptionHandler", "Ljava/lang/Thread$UncaughtExceptionHandler;", "Lcom/sumsub/sns/core/SNSMobileSDK$Builder;", "builder", "<init>", "(Lcom/sumsub/sns/core/SNSMobileSDK$Builder;)V", "idensic-mobile-sdk_release"}, k = 1, mv = {1, 7, 1})
public static abstract class SDK {
private String accessToken;
private final SNSActionResultHandler actionResultHandler;
private final Integer autoCloseOnApproveTimeout;
private final SNSCompleteHandler completeHandler;
private final SNSInitConfig conf;
private final SNSCountryPicker countryPicker;
private final SNSJsonCustomization customization;
private final SNSErrorHandler errorHandler;
private final SNSEventHandler eventHandler;
private Thread.UncaughtExceptionHandler exceptionHandler;
private final SNSIconHandler iconHandler;
private final SNSInstructionsViewHandler instructionsViewHandler;
private final boolean isAnalyticsEnabled;
private final boolean isDebug;
@NotNull
private final Locale locale;
@NotNull
private final Logger logTree;
@NotNull
private final List<SNSModule> modules;
private final TokenExpirationHandler onTokenExpiration;
private final Map<String, SNSDocumentDefinition> preferredDocumentsDefinitions;
private final Map<String, String> settings;
private final SNSUrlHandler snsUrlHandler;
private List<SNSSupportItem> supportItems;
private final Integer theme;
@NotNull
private final String url;
@NotNull
private final WeakReference<Activity> weakActivity;
public SDK(@NotNull Builder builder) {
boolean f05;
String str;
Context context;
int i15;
Context applicationContext;
String c15;
this.weakActivity = builder.getWeakActivity$idensic_mobile_sdk_release();
f05 = w.f0(builder.getUrl(), '/', false, 2, null);
if (f05) {
str = builder.getUrl();
} else {
str = builder.getUrl() + '/';
}
this.url = str;
this.accessToken = builder.getAccessToken();
this.modules = builder.getModules$idensic_mobile_sdk_release();
this.supportItems = builder.getSupportItems$idensic_mobile_sdk_release();
this.onTokenExpiration = builder.getOnTokenExpiration();
this.completeHandler = builder.getCompleteHandler();
this.errorHandler = builder.getErrorHandler();
this.actionResultHandler = builder.getActionResultHandler();
this.eventHandler = builder.getEventHandler();
this.iconHandler = builder.getIconHandler();
this.instructionsViewHandler = builder.getInstructionsHandler();
this.countryPicker = builder.getCountryPicker();
this.isDebug = builder.getIsDebug();
this.isAnalyticsEnabled = builder.getIsAnalyticsEnabled();
this.logTree = builder.getLogTree();
this.locale = builder.getLocale();
this.conf = builder.getConf();
this.theme = builder.getTheme();
this.customization = builder.getCustomization();
this.settings = builder.getSettings$idensic_mobile_sdk_release();
this.preferredDocumentsDefinitions = builder.getPreferredDocumentsDefinitions$idensic_mobile_sdk_release();
this.autoCloseOnApproveTimeout = builder.getAutoCloseOnApproveTimeout();
this.snsUrlHandler = builder.getUrlHandler();
List<String> isParametersValid = isParametersValid();
if (!(!isParametersValid.isEmpty())) {
Activity activity = builder.getWeakActivity$idensic_mobile_sdk_release().get();
if (activity != null) {
context = activity.getApplicationContext();
} else {
context = null;
}
b0 b0Var = b0.f36997a;
String packageName = context != null ? context.getPackageName() : null;
String str2 = "<unknown>";
packageName = packageName == null ? "<unknown>" : packageName;
if (context != null && (c15 = h.c(context)) != null) {
str2 = c15;
}
if (context != null) {
i15 = h.b(context);
} else {
i15 = -1;
}
b0Var.a(packageName, str2, i15);
if (context != null && (applicationContext = context.getApplicationContext()) != null) {
ProviderInstaller.installIfNeededAsync(applicationContext, new ProviderInstaller.ProviderInstallListener() {
@Override
public void onProviderInstallFailed(int i16, Intent intent) {
Logger.d$default(com.sumsub.log.a.f35976a, c.a(this), "onProviderInstallFailed: " + i16, null, 4, null);
}
@Override
public void onProviderInstalled() {
Logger.d$default(com.sumsub.log.a.f35976a, c.a(this), "onProviderInstalled", null, 4, null);
}
});
return;
}
return;
}
throw new SNSInvalidParametersException(isParametersValid);
}
private final c0 createSentryErrorHandler(Context context, Thread.UncaughtExceptionHandler prevExceptionHandler) {
return new c0(context, new SNSMobileSDK$SDK$createSentryErrorHandler$1(context), prevExceptionHandler);
}
private final List<String> isParametersValid() {
ArrayList arrayList;
String x05;
ArrayList arrayList2 = new ArrayList();
if (this.url.length() == 0) {
arrayList2.add("Api url must be non-empty. url=" + this.url);
}
if (!d0.c(this.url)) {
arrayList2.add("Api url must be valid. url=" + this.url);
}
if (!d0.b(this.accessToken)) {
arrayList2.add("Access token must be specified");
}
List<SNSSupportItem> list = this.supportItems;
if (list != null) {
arrayList = new ArrayList();
Iterator<T> it = list.iterator();
while (it.hasNext()) {
String isValid = ((SNSSupportItem) it.next()).isValid();
if (isValid != null) {
arrayList.add(isValid);
}
}
} else {
arrayList = null;
}
ArrayList arrayList3 = arrayList;
if (arrayList3 != null && (!arrayList3.isEmpty())) {
StringBuilder sb5 = new StringBuilder();
sb5.append("Support items have invalid support items. Why are support items invalid? (");
x05 = p029do.c0.x0(arrayList3, null, null, null, 0, null, SNSMobileSDK$SDK$isParametersValid$1.INSTANCE, 31, null);
sb5.append(x05);
sb5.append(')');
arrayList2.add(sb5.toString());
}
return arrayList2;
}
public final String getAccessToken() {
return this.accessToken;
}
public final SNSActionResultHandler getActionResultHandler() {
return this.actionResultHandler;
}
public final Integer getAutoCloseOnApproveTimeout() {
return this.autoCloseOnApproveTimeout;
}
public final SNSCompleteHandler getCompleteHandler() {
return this.completeHandler;
}
public final SNSInitConfig getConf() {
return this.conf;
}
public final SNSCountryPicker getCountryPicker() {
return this.countryPicker;
}
public final SNSJsonCustomization getCustomization() {
return this.customization;
}
public final SNSErrorHandler getErrorHandler() {
return this.errorHandler;
}
public final SNSEventHandler getEventHandler() {
return this.eventHandler;
}
public final SNSIconHandler getIconHandler() {
return this.iconHandler;
}
public final SNSInstructionsViewHandler getInstructionsViewHandler() {
return this.instructionsViewHandler;
}
@NotNull
public final Locale getLocale() {
return this.locale;
}
@NotNull
public final Logger getLogTree() {
return this.logTree;
}
@NotNull
public final List<SNSModule> getModules$idensic_mobile_sdk_release() {
return this.modules;
}
public final TokenExpirationHandler getOnTokenExpiration() {
return this.onTokenExpiration;
}
public final Map<String, SNSDocumentDefinition> getPreferredDocumentsDefinitions$idensic_mobile_sdk_release() {
return this.preferredDocumentsDefinitions;
}
public final Map<String, String> getSettings$idensic_mobile_sdk_release() {
return this.settings;
}
public final SNSUrlHandler getSnsUrlHandler() {
return this.snsUrlHandler;
}
public final List<SNSSupportItem> getSupportItems$idensic_mobile_sdk_release() {
return this.supportItems;
}
public final Integer getTheme() {
return this.theme;
}
@NotNull
public final String getUrl() {
return this.url;
}
@NotNull
public final WeakReference<Activity> getWeakActivity$idensic_mobile_sdk_release() {
return this.weakActivity;
}
public final void installUncaughtExceptionHandler$idensic_mobile_sdk_release(@NotNull String apiUrl) {
Context applicationContext;
this.exceptionHandler = Thread.getDefaultUncaughtExceptionHandler();
Activity activity = this.weakActivity.get();
if (activity != null && (applicationContext = activity.getApplicationContext()) != null) {
e eVar = new e(new n0(applicationContext, apiUrl), applicationContext.getCacheDir());
eVar.a("_SNSExceptionSink");
d.f35984a.a(eVar);
Thread.setDefaultUncaughtExceptionHandler(createSentryErrorHandler(applicationContext, new SNSExceptionHandler(applicationContext, eVar, this.exceptionHandler)));
}
}
public final boolean getIsAnalyticsEnabled() {
return this.isAnalyticsEnabled;
}
public final boolean getIsDebug() {
return this.isDebug;
}
public void launch() {
}
public final void removeUncaughtExceptionHandler$idensic_mobile_sdk_release() {
Thread.setDefaultUncaughtExceptionHandler(this.exceptionHandler);
}
public final void setSupportItems$idensic_mobile_sdk_release(List<SNSSupportItem> list) {
this.supportItems = list;
}
}
@Metadata(d1 = {"\u00008\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0003\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0007\b\u0002\u0018\u00002\u00020\u0001B'\u0012\u0006\u0010\u000e\u001a\u00020\r\u0012\f\u0010\u0011\u001a\b\u0012\u0004\u0012\u00020\u00040\u0010\u0012\b\u0010\u0013\u001a\u0004\u0018\u00010\u0001¢\u0006\u0004\b\u0015\u0010\u0016J\u0012\u0010\u0005\u001a\u0004\u0018\u00010\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0002J\u0012\u0010\b\u001a\u00020\u00072\b\u0010\u0006\u001a\u0004\u0018\u00010\u0002H\u0002J\u0018\u0010\f\u001a\u00020\u000b2\u0006\u0010\n\u001a\u00020\t2\u0006\u0010\u0003\u001a\u00020\u0002H\u0016R\u0014\u0010\u000e\u001a\u00020\r8\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u000e\u0010\u000fR\u001a\u0010\u0011\u001a\b\u0012\u0004\u0012\u00020\u00040\u00108\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0011\u0010\u0012R\u0016\u0010\u0013\u001a\u0004\u0018\u00010\u00018\u0002X\u0082\u0004¢\u0006\u0006\n\u0004\b\u0013\u0010\u0014¨\u0006\u0017"}, d2 = {"Lcom/sumsub/sns/core/SNSMobileSDK$SNSExceptionHandler;", "Ljava/lang/Thread$UncaughtExceptionHandler;", "", "e", "Lcom/sumsub/sns/core/data/model/LogParams;", "prepareLogParams", "ex", "", "isSumSubException", "Ljava/lang/Thread;", "t", "Lco/g0;", "uncaughtException", "Landroid/content/Context;", "context", "Landroid/content/Context;", "Lcom/sumsub/log/cacher/c;", "sink", "Lcom/sumsub/log/cacher/c;", "previousHandler", "Ljava/lang/Thread$UncaughtExceptionHandler;", "<init>", "(Landroid/content/Context;Lcom/sumsub/log/cacher/c;Ljava/lang/Thread$UncaughtExceptionHandler;)V", "idensic-mobile-sdk_release"}, k = 1, mv = {1, 7, 1})
public static final class SNSExceptionHandler implements Thread.UncaughtExceptionHandler {
@NotNull
private final Context context;
private final Thread.UncaughtExceptionHandler previousHandler;
@NotNull
private final com.sumsub.log.cacher.c<LogParams> sink;
public SNSExceptionHandler(@NotNull Context context, @NotNull com.sumsub.log.cacher.c<LogParams> cVar, Thread.UncaughtExceptionHandler uncaughtExceptionHandler) {
this.context = context;
this.sink = cVar;
this.previousHandler = uncaughtExceptionHandler;
}
private final boolean isSumSubException(Throwable ex4) {
boolean V;
boolean z15 = false;
if (ex4 == null) {
return false;
}
StackTraceElement[] stackTrace = ex4.getStackTrace();
int length = stackTrace.length;
int i15 = 0;
while (true) {
if (i15 >= length) {
break;
}
V = v.V(stackTrace[i15].getClassName(), "com.sumsub", false, 2, null);
if (V) {
z15 = true;
break;
}
i15++;
}
if (!z15) {
return isSumSubException(ex4.getCause());
}
return z15;
}
public final LogParams prepareLogParams(Throwable e15) {
String str;
String str2;
if (!isSumSubException(e15)) {
return null;
}
StackTraceElement[] stackTrace = e15.getStackTrace();
String string = this.context.getSharedPreferences("idensic_mobile_sdk", 0).getString("applicant_id", "");
if (string == null) {
str = "";
} else {
str = string;
}
StringWriter stringWriter = new StringWriter();
e15.printStackTrace(new PrintWriter(stringWriter));
String valueOf = String.valueOf(stackTrace[0].getLineNumber());
String fileName = stackTrace[0].getFileName();
String str3 = fileName + ':' + valueOf;
String message = e15.getMessage();
if (message == null) {
str2 = "";
} else {
str2 = message;
}
return new LogParams("uncaughtException", str3, (String) null, fileName, str, str2, (String) null, stringWriter.toString(), 64, (k) null);
}
@Override
public void uncaughtException(@NotNull Thread thread, @NotNull Throwable th4) {
try {
kr.k.d(p1.f86389c, null, null, new SNSMobileSDK$SNSExceptionHandler$uncaughtException$1(this, th4, null), 3, null);
} catch (Exception unused) {
}
Thread.UncaughtExceptionHandler uncaughtExceptionHandler = this.previousHandler;
if (uncaughtExceptionHandler != null) {
uncaughtExceptionHandler.uncaughtException(thread, th4);
}
}
}
@Metadata(d1 = {"\u0000\u001e\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\u0018\u00002\u00020\u0001B\u000f\u0012\u0006\u0010\n\u001a\u00020\t¢\u0006\u0004\b\u000b\u0010\fJ\b\u0010\u0003\u001a\u00020\u0002H\u0016R\u001c\u0010\u0005\u001a\u0004\u0018\u00010\u00048\u0000X\u0080\u0004¢\u0006\f\n\u0004\b\u0005\u0010\u0006\u001a\u0004\b\u0007\u0010\b¨\u0006\r"}, d2 = {"Lcom/sumsub/sns/core/SNSMobileSDK$SNSSDK;", "Lcom/sumsub/sns/core/SNSMobileSDK$SDK;", "Lco/g0;", "launch", "Lcom/sumsub/sns/core/data/listener/SNSStateChangedHandler;", "stateChangedHandler", "Lcom/sumsub/sns/core/data/listener/SNSStateChangedHandler;", "getStateChangedHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSStateChangedHandler;", "Lcom/sumsub/sns/core/SNSMobileSDK$Builder;", "builder", "<init>", "(Lcom/sumsub/sns/core/SNSMobileSDK$Builder;)V", "idensic-mobile-sdk_release"}, k = 1, mv = {1, 7, 1})
public static final class SNSSDK extends SDK {
private final SNSStateChangedHandler stateChangedHandler;
public SNSSDK(@NotNull Builder builder) {
super(builder);
this.stateChangedHandler = builder.getStateChangedHandler();
}
public final SNSStateChangedHandler getStateChangedHandler() {
return this.stateChangedHandler;
}
@Override
public void launch() {
installUncaughtExceptionHandler$idensic_mobile_sdk_release(getUrl());
super.launch();
SNSMobileSDK.INSTANCE.start(this);
}
}
static {
SNSJsonCustomization.INSTANCE.setDefaultJsonCustomizationProvider(AnonymousClass1.INSTANCE);
b0 b0Var = b0.f36997a;
b0Var.a(AnonymousClass2.INSTANCE, AnonymousClass3.INSTANCE, AnonymousClass4.INSTANCE, AnonymousClass5.INSTANCE, AnonymousClass6.INSTANCE, AnonymousClass7.INSTANCE, AnonymousClass8.INSTANCE, AnonymousClass9.INSTANCE, AnonymousClass10.INSTANCE, AnonymousClass11.INSTANCE, AnonymousClass12.INSTANCE, AnonymousClass13.INSTANCE, AnonymousClass14.INSTANCE, AnonymousClass15.INSTANCE, AnonymousClass16.INSTANCE);
b0Var.a(AnonymousClass17.INSTANCE, AnonymousClass18.INSTANCE);
SNSAnalyticsScreenMapper sNSAnalyticsScreenMapper = SNSAnalyticsScreenMapper.INSTANCE;
sNSAnalyticsScreenMapper.addMapping(AnonymousClass19.INSTANCE);
if (com.sumsub.sns.core.analytics.b.f36910a.h() && q0.a()) {
sNSAnalyticsScreenMapper.addMapping(AnonymousClass20.INSTANCE);
}
logTree = com.sumsub.log.logger.d.f36018a;
theme = R$style.Theme_SNSCore;
}
private SNSMobileSDK() {
}
public final List<SNSModule> getModules() {
List<SNSModule> k15;
List<SNSModule> modules$idensic_mobile_sdk_release;
SDK sdk = _sdk;
if (sdk == null || (modules$idensic_mobile_sdk_release = sdk.getModules$idensic_mobile_sdk_release()) == null) {
k15 = p029do.u.k();
return k15;
}
return modules$idensic_mobile_sdk_release;
}
private final void initFeatures(SDK sdk) {
com.sumsub.ff.a.f35933a.v();
for (SNSModule sNSModule : sdk.getModules$idensic_mobile_sdk_release()) {
if (sNSModule instanceof SNSProoface) {
com.sumsub.ff.a aVar = com.sumsub.ff.a.f35933a;
SNSProoface sNSProoface = (SNSProoface) sNSModule;
com.sumsub.ff.core.a.a(aVar.h(), sNSProoface.isDebug(), null, 2, null);
com.sumsub.ff.core.a.a(aVar.i(), sNSProoface.isShowSettingsDialog(), null, 2, null);
}
if (sNSModule instanceof SNSCoreModule) {
com.sumsub.ff.a aVar2 = com.sumsub.ff.a.f35933a;
SNSCoreModule sNSCoreModule = (SNSCoreModule) sNSModule;
com.sumsub.ff.core.a.a(aVar2.g(), sNSCoreModule.isFullScreenCamera(), null, 2, null);
com.sumsub.ff.core.a.a(aVar2.p(), sNSCoreModule.isSkipGeolocationForm(), null, 2, null);
}
}
}
private final void initLogger(SDK sdk) {
com.sumsub.log.a aVar = com.sumsub.log.a.f35976a;
aVar.a(sdk.getIsDebug());
aVar.f();
if (sdk.getIsDebug()) {
if (sdk.getLogTree() instanceof com.sumsub.log.logger.d) {
aVar.a(LoggerType.LOG_CAT, sdk.getLogTree(), true);
} else {
aVar.a(LoggerType.LOG_CAT, com.sumsub.log.logger.d.f36018a, true);
aVar.a(LoggerType.SDK_CLIENT, sdk.getLogTree(), true);
}
}
}
public final void start(SDK sdk) {
int i15;
SNSErrorHandler errorHandler;
SNSJsonCustomization customization;
Activity activity = sdk.getWeakActivity$idensic_mobile_sdk_release().get();
if (activity == null) {
return;
}
initFeatures(sdk);
initLogger(sdk);
t.f36534a.a(activity.getApplicationContext());
_sdk = sdk;
b0.f36997a.a(sdk.getIsDebug(), sdk.getLocale());
logTree = sdk.getLogTree();
Integer theme2 = sdk.getTheme();
if (theme2 != null) {
i15 = theme2.intValue();
} else {
i15 = theme;
}
theme = i15;
try {
SDK sdk2 = _sdk;
if (sdk2 != null && (customization = sdk2.getCustomization()) != null) {
customization.loadResources(activity.getApplicationContext());
}
com.sumsub.sns.core.analytics.b.f36910a.a(sdk.getIsAnalyticsEnabled());
Intent intent = new Intent();
intent.setClassName(getPackageName(), "com.sumsub.sns.presentation.screen.SNSAppActivity");
String url = sdk.getUrl();
String accessToken = sdk.getAccessToken();
if (accessToken == null) {
accessToken = "";
}
intent.putExtra("sns_extra_session", new SNSSession(null, url, accessToken, getLocale(), isDebug(), getPackageName(), getVersionName(), getVersionCode(), sdk.getTheme(), 1, null));
activity.startActivity(intent);
} catch (Exception e15) {
SDK sdk3 = _sdk;
if (sdk3 != null && (errorHandler = sdk3.getErrorHandler()) != null) {
errorHandler.onError(new SNSException.Unknown(e15));
}
}
d.f35984a.b();
}
public final SNSCompleteHandler getCompleteHandler() {
SDK sdk = _sdk;
if (sdk != null) {
return sdk.getCompleteHandler();
}
return null;
}
public SNSEventHandler getEventHandler() {
return this.$$delegate_0.getEventHandler();
}
@NotNull
public Locale getLocale() {
return this.$$delegate_0.getLocale();
}
@NotNull
public String getPackageName() {
return this.$$delegate_0.getPackageName();
}
@NotNull
public SNSSDKState getState() {
return this.$$delegate_0.getState();
}
public SNSUrlHandler getUrlHandler() {
return this.$$delegate_0.getUrlHandler();
}
public int getVersionCode() {
return this.$$delegate_0.getVersionCode();
}
@NotNull
public String getVersionName() {
return this.$$delegate_0.getVersionName();
}
public boolean isDebug() {
return this.$$delegate_0.isDebug();
}
public final void shutdown() {
com.sumsub.log.a aVar = com.sumsub.log.a.f35976a;
aVar.flush();
aVar.d();
com.sumsub.sns.core.analytics.b.f36910a.j();
d.f35984a.c();
SDK sdk = _sdk;
if (sdk != null) {
sdk.removeUncaughtExceptionHandler$idensic_mobile_sdk_release();
}
_sdk = null;
}
@NotNull
public String toString() {
String str;
String x05;
String sb5;
StringBuilder sb6 = new StringBuilder();
sb6.append("SNSMobileSDK: Api Url: ");
SDK sdk = _sdk;
String str2 = null;
if (sdk != null) {
str = sdk.getUrl();
} else {
str = null;
}
sb6.append(str);
sb6.append(", Access Token: ");
SDK sdk2 = _sdk;
if (sdk2 != null) {
str2 = sdk2.getAccessToken();
}
sb6.append(str2);
sb6.append(", Modules: ");
if (getModules().isEmpty()) {
sb5 = "Empty";
} else {
StringBuilder sb7 = new StringBuilder();
sb7.append('[');
x05 = p029do.c0.x0(getModules(), null, null, null, 0, null, SNSMobileSDK$toString$1.INSTANCE, 31, null);
sb7.append(x05);
sb7.append(']');
sb5 = sb7.toString();
}
sb6.append(sb5);
sb6.append(", isDebug: ");
sb6.append(isDebug());
return sb6.toString();
}
@Metadata(d1 = {"\u0000\u0084\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\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\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\r\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0010$\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0007\n\u0002\u0018\u0002\n\u0002\b\u000b\u0018\u00002\u00020\u0001B\u001c\u0012\u0007\u0010\u009f\u0001\u001a\u00020*\u0012\b\u00100\u001a\u0004\u0018\u00010\u0002¢\u0006\u0006\b \u0001\u0010¡\u0001B\u0014\b\u0016\u0012\u0007\u0010\u009f\u0001\u001a\u00020*¢\u0006\u0006\b \u0001\u0010¢\u0001J\u001a\u0010\u0006\u001a\u00020\u00002\n\b\u0002\u0010\u0003\u001a\u0004\u0018\u00010\u00022\u0006\u0010\u0005\u001a\u00020\u0004Jî\u0001\u0010\u001a\u001a\u00020\u00002\u0016\b\u0002\u0010\n\u001a\u0010\u0012\u0004\u0012\u00020\b\u0012\u0004\u0012\u00020\t\u0018\u00010\u00072\u001c\b\u0002\u0010\r\u001a\u0016\u0012\u0004\u0012\u00020\f\u0012\u0004\u0012\u00020\f\u0012\u0004\u0012\u00020\t\u0018\u00010\u000b2\u001c\b\u0002\u0010\u000f\u001a\u0016\u0012\u0004\u0012\u00020\u000e\u0012\u0004\u0012\u00020\f\u0012\u0004\u0012\u00020\t\u0018\u00010\u000b2\u001e\b\u0002\u0010\u0011\u001a\u0018\u0012\u0004\u0012\u00020\u0002\u0012\u0006\u0012\u0004\u0018\u00010\u0002\u0012\u0004\u0012\u00020\u0010\u0018\u00010\u000b2\u0016\b\u0002\u0010\u0013\u001a\u0010\u0012\u0004\u0012\u00020\u0012\u0012\u0004\u0012\u00020\t\u0018\u00010\u00072<\b\u0002\u0010\u0017\u001a6\u0012\u0004\u0012\u00020\u0015\u0012\u0004\u0012\u00020\u0002\u0012\u0006\u0012\u0004\u0018\u00010\u0002\u0012\u0004\u0012\u00020\u0002\u0012\u0006\u0012\u0004\u0018\u00010\u0002\u0012\u0006\u0012\u0004\u0018\u00010\u0002\u0012\u0006\u0012\u0004\u0018\u00010\u0016\u0018\u00010\u00142\u001c\b\u0002\u0010\u0019\u001a\u0016\u0012\u0004\u0012\u00020\u0015\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0018\u0018\u00010\u000bJ\u0010\u0010\u001d\u001a\u00020\u00002\b\u0010\u001c\u001a\u0004\u0018\u00010\u001bJ\u0010\u0010 \u001a\u00020\u00002\b\u0010\u001f\u001a\u0004\u0018\u00010\u001eJ\u000e\u0010#\u001a\u00020\u00002\u0006\u0010\"\u001a\u00020!J\u000e\u0010&\u001a\u00020\u00002\u0006\u0010%\u001a\u00020$J\u0006\u0010(\u001a\u00020'R \u0010+\u001a\b\u0012\u0004\u0012\u00020*0)8\u0000X\u0080\u0004¢\u0006\f\n\u0004\b+\u0010,\u001a\u0004\b-\u0010.R$\u00100\u001a\u00020\u00022\u0006\u0010/\u001a\u00020\u00028\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b0\u00101\u001a\u0004\b2\u00103R(\u0010\u0003\u001a\u0004\u0018\u00010\u00022\b\u0010/\u001a\u0004\u0018\u00010\u00028\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b\u0003\u00101\u001a\u0004\b4\u00103R(\u0010\u0005\u001a\u0004\u0018\u00010\u00042\b\u0010/\u001a\u0004\u0018\u00010\u00048\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b\u0005\u00105\u001a\u0004\b6\u00107R(\u00109\u001a\u0004\u0018\u0001082\b\u0010/\u001a\u0004\u0018\u0001088\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b9\u0010:\u001a\u0004\b;\u0010<R(\u0010>\u001a\u0004\u0018\u00010=2\b\u0010/\u001a\u0004\u0018\u00010=8\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b>\u0010?\u001a\u0004\b@\u0010AR(\u0010C\u001a\u0004\u0018\u00010B2\b\u0010/\u001a\u0004\u0018\u00010B8\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\bC\u0010D\u001a\u0004\bE\u0010FR(\u0010\u001c\u001a\u0004\u0018\u00010\u001b2\b\u0010/\u001a\u0004\u0018\u00010\u001b8\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b\u001c\u0010G\u001a\u0004\bH\u0010IR(\u0010\u001f\u001a\u0004\u0018\u00010\u001e2\b\u0010/\u001a\u0004\u0018\u00010\u001e8\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b\u001f\u0010J\u001a\u0004\bK\u0010LR$\u0010N\u001a\u0004\u0018\u00010M8\u0000@\u0000X\u0080\u000e¢\u0006\u0012\n\u0004\bN\u0010O\u001a\u0004\bP\u0010Q\"\u0004\bR\u0010SR$\u0010U\u001a\u0004\u0018\u00010T8\u0000@\u0000X\u0080\u000e¢\u0006\u0012\n\u0004\bU\u0010V\u001a\u0004\bW\u0010X\"\u0004\bY\u0010ZR(\u0010\\\u001a\u0004\u0018\u00010[2\b\u0010/\u001a\u0004\u0018\u00010[8\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b\\\u0010]\u001a\u0004\b^\u0010_R$\u0010`\u001a\u00020\u00182\u0006\u0010/\u001a\u00020\u00188\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b`\u0010a\u001a\u0004\bb\u0010cR$\u0010e\u001a\u0004\u0018\u00010d8\u0000@\u0000X\u0080\u000e¢\u0006\u0012\n\u0004\be\u0010f\u001a\u0004\bg\u0010h\"\u0004\bi\u0010jR0\u0010m\u001a\b\u0012\u0004\u0012\u00020l0k2\f\u0010/\u001a\b\u0012\u0004\u0012\u00020l0k8\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\bm\u0010n\u001a\u0004\bo\u0010pR4\u0010r\u001a\n\u0012\u0004\u0012\u00020q\u0018\u00010k2\u000e\u0010/\u001a\n\u0012\u0004\u0012\u00020q\u0018\u00010k8\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\br\u0010n\u001a\u0004\bs\u0010pR$\u0010t\u001a\u00020\u00182\u0006\u0010/\u001a\u00020\u00188\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\bt\u0010a\u001a\u0004\bu\u0010cR$\u0010w\u001a\u00020v2\u0006\u0010/\u001a\u00020v8\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\bw\u0010x\u001a\u0004\by\u0010zR$\u0010\"\u001a\u00020!2\u0006\u0010/\u001a\u00020!8\u0000@BX\u0080\u000e¢\u0006\f\n\u0004\b\"\u0010{\u001a\u0004\b|\u0010}R*\u0010%\u001a\u0004\u0018\u00010~2\b\u0010/\u001a\u0004\u0018\u00010~8\u0000@BX\u0080\u000e¢\u0006\u000e\n\u0004\b%\u0010\u007f\u001a\u0006\b\u0080\u0001\u0010\u0081\u0001R,\u0010\u0083\u0001\u001a\u0005\u0018\u00010\u0082\u00018\u0000@\u0000X\u0080\u000e¢\u0006\u0018\n\u0006\b\u0083\u0001\u0010\u0084\u0001\u001a\u0006\b\u0085\u0001\u0010\u0086\u0001\"\u0006\b\u0087\u0001\u0010\u0088\u0001R8\u0010\u008a\u0001\u001a\u0011\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0002\u0018\u00010\u0089\u00018\u0000@\u0000X\u0080\u000e¢\u0006\u0018\n\u0006\b\u008a\u0001\u0010\u008b\u0001\u001a\u0006\b\u008c\u0001\u0010\u008d\u0001\"\u0006\b\u008e\u0001\u0010\u008f\u0001R9\u0010\u0091\u0001\u001a\u0012\u0012\u0004\u0012\u00020\u0002\u0012\u0005\u0012\u00030\u0090\u0001\u0018\u00010\u0089\u00018\u0000@\u0000X\u0080\u000e¢\u0006\u0018\n\u0006\b\u0091\u0001\u0010\u008b\u0001\u001a\u0006\b\u0092\u0001\u0010\u008d\u0001\"\u0006\b\u0093\u0001\u0010\u008f\u0001R*\u0010\u0094\u0001\u001a\u0004\u0018\u00010~8\u0000@\u0000X\u0080\u000e¢\u0006\u0017\n\u0005\b\u0094\u0001\u0010\u007f\u001a\u0006\b\u0095\u0001\u0010\u0081\u0001\"\u0006\b\u0096\u0001\u0010\u0097\u0001R,\u0010\u0099\u0001\u001a\u0005\u0018\u00010\u0098\u00018\u0000@\u0000X\u0080\u000e¢\u0006\u0018\n\u0006\b\u0099\u0001\u0010\u009a\u0001\u001a\u0006\b\u009b\u0001\u0010\u009c\u0001\"\u0006\b\u009d\u0001\u0010\u009e\u0001¨\u0006£\u0001"}, d2 = {"Lcom/sumsub/sns/core/SNSMobileSDK$Builder;", "", "", "accessToken", "Lcom/sumsub/sns/core/data/listener/TokenExpirationHandler;", "onTokenExpiration", "withAccessToken", "Lkotlin/Function1;", "Lcom/sumsub/sns/core/data/model/SNSException;", "Lco/g0;", "onError", "Lkotlin/Function2;", "Lcom/sumsub/sns/core/data/model/SNSSDKState;", "onStateChanged", "Lcom/sumsub/sns/core/data/model/SNSCompletionResult;", "onCompleted", "Lcom/sumsub/sns/core/SNSActionResult;", "onActionResult", "Lcom/sumsub/sns/core/data/listener/SNSEvent;", "onEvent", "Lkotlin/Function6;", "Landroid/content/Context;", "Landroid/view/View;", "onSNSInstructionsView", "", "onUrl", "withHandlers", "Lcom/sumsub/sns/core/data/listener/SNSActionResultHandler;", "actionResultHandler", "withActionResultHandler", "Lcom/sumsub/sns/core/data/listener/SNSEventHandler;", "eventHandler", "withEventHandler", "Ljava/util/Locale;", "locale", "withLocale", "Lcom/sumsub/sns/core/theme/SNSTheme;", "theme", "withTheme", "Lcom/sumsub/sns/core/SNSMobileSDK$SDK;", "build", "Ljava/lang/ref/WeakReference;", "Landroid/app/Activity;", "weakActivity", "Ljava/lang/ref/WeakReference;", "getWeakActivity$idensic_mobile_sdk_release", "()Ljava/lang/ref/WeakReference;", "<set-?>", "url", "Ljava/lang/String;", "getUrl$idensic_mobile_sdk_release", "()Ljava/lang/String;", "getAccessToken$idensic_mobile_sdk_release", "Lcom/sumsub/sns/core/data/listener/TokenExpirationHandler;", "getOnTokenExpiration$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/TokenExpirationHandler;", "Lcom/sumsub/sns/core/data/listener/SNSStateChangedHandler;", "stateChangedHandler", "Lcom/sumsub/sns/core/data/listener/SNSStateChangedHandler;", "getStateChangedHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSStateChangedHandler;", "Lcom/sumsub/sns/core/data/listener/SNSCompleteHandler;", "completeHandler", "Lcom/sumsub/sns/core/data/listener/SNSCompleteHandler;", "getCompleteHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSCompleteHandler;", "Lcom/sumsub/sns/core/data/listener/SNSErrorHandler;", "errorHandler", "Lcom/sumsub/sns/core/data/listener/SNSErrorHandler;", "getErrorHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSErrorHandler;", "Lcom/sumsub/sns/core/data/listener/SNSActionResultHandler;", "getActionResultHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSActionResultHandler;", "Lcom/sumsub/sns/core/data/listener/SNSEventHandler;", "getEventHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSEventHandler;", "Lcom/sumsub/sns/core/data/listener/SNSInstructionsViewHandler;", "instructionsHandler", "Lcom/sumsub/sns/core/data/listener/SNSInstructionsViewHandler;", "getInstructionsHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSInstructionsViewHandler;", "setInstructionsHandler$idensic_mobile_sdk_release", "(Lcom/sumsub/sns/core/data/listener/SNSInstructionsViewHandler;)V", "Lcom/sumsub/sns/core/data/listener/SNSCountryPicker;", "countryPicker", "Lcom/sumsub/sns/core/data/listener/SNSCountryPicker;", "getCountryPicker$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSCountryPicker;", "setCountryPicker$idensic_mobile_sdk_release", "(Lcom/sumsub/sns/core/data/listener/SNSCountryPicker;)V", "Lcom/sumsub/sns/core/data/model/SNSInitConfig;", "conf", "Lcom/sumsub/sns/core/data/model/SNSInitConfig;", "getConf$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/model/SNSInitConfig;", "isAnalyticsEnabled", "Z", "isAnalyticsEnabled$idensic_mobile_sdk_release", "()Z", "Lcom/sumsub/sns/core/data/listener/SNSIconHandler;", "iconHandler", "Lcom/sumsub/sns/core/data/listener/SNSIconHandler;", "getIconHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSIconHandler;", "setIconHandler$idensic_mobile_sdk_release", "(Lcom/sumsub/sns/core/data/listener/SNSIconHandler;)V", "", "Lcom/sumsub/sns/core/SNSModule;", "modules", "Ljava/util/List;", "getModules$idensic_mobile_sdk_release", "()Ljava/util/List;", "Lcom/sumsub/sns/core/data/model/SNSSupportItem;", "supportItems", "getSupportItems$idensic_mobile_sdk_release", "isDebug", "isDebug$idensic_mobile_sdk_release", "Lcom/sumsub/log/logger/Logger;", "logTree", "Lcom/sumsub/log/logger/Logger;", "getLogTree$idensic_mobile_sdk_release", "()Lcom/sumsub/log/logger/Logger;", "Ljava/util/Locale;", "getLocale$idensic_mobile_sdk_release", "()Ljava/util/Locale;", "", "Ljava/lang/Integer;", "getTheme$idensic_mobile_sdk_release", "()Ljava/lang/Integer;", "Lcom/sumsub/sns/core/theme/SNSJsonCustomization;", "customization", "Lcom/sumsub/sns/core/theme/SNSJsonCustomization;", "getCustomization$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/theme/SNSJsonCustomization;", "setCustomization$idensic_mobile_sdk_release", "(Lcom/sumsub/sns/core/theme/SNSJsonCustomization;)V", "", "settings", "Ljava/util/Map;", "getSettings$idensic_mobile_sdk_release", "()Ljava/util/Map;", "setSettings$idensic_mobile_sdk_release", "(Ljava/util/Map;)V", "Lcom/sumsub/sns/core/data/model/SNSDocumentDefinition;", "preferredDocumentsDefinitions", "getPreferredDocumentsDefinitions$idensic_mobile_sdk_release", "setPreferredDocumentsDefinitions$idensic_mobile_sdk_release", "autoCloseOnApproveTimeout", "getAutoCloseOnApproveTimeout$idensic_mobile_sdk_release", "setAutoCloseOnApproveTimeout$idensic_mobile_sdk_release", "(Ljava/lang/Integer;)V", "Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;", "urlHandler", "Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;", "getUrlHandler$idensic_mobile_sdk_release", "()Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;", "setUrlHandler$idensic_mobile_sdk_release", "(Lcom/sumsub/sns/core/data/listener/SNSUrlHandler;)V", "activity", "<init>", "(Landroid/app/Activity;Ljava/lang/String;)V", "(Landroid/app/Activity;)V", "idensic-mobile-sdk_release"}, k = 1, mv = {1, 7, 1})
public static final class Builder {
private String accessToken;
private SNSActionResultHandler actionResultHandler;
private Integer autoCloseOnApproveTimeout;
private SNSCompleteHandler completeHandler;
private SNSInitConfig conf;
private SNSCountryPicker countryPicker;
private SNSJsonCustomization customization;
private SNSErrorHandler errorHandler;
private SNSEventHandler eventHandler;
private SNSIconHandler iconHandler;
private SNSInstructionsViewHandler instructionsHandler;
private boolean isAnalyticsEnabled;
private boolean isDebug;
@NotNull
private Locale locale;
@NotNull
private Logger logTree;
@NotNull
private List<? extends SNSModule> modules;
private TokenExpirationHandler onTokenExpiration;
private Map<String, SNSDocumentDefinition> preferredDocumentsDefinitions;
private Map<String, String> settings;
private SNSStateChangedHandler stateChangedHandler;
private List<SNSSupportItem> supportItems;
private Integer theme;
@NotNull
private String url;
private SNSUrlHandler urlHandler;
@NotNull
private final WeakReference<Activity> weakActivity;
public Builder(@NotNull Activity activity, String str) {
List<? extends SNSModule> k15;
SNSMobileSDK.INSTANCE.isDebug();
this.weakActivity = new WeakReference<>(activity);
this.url = str == null ? "https://api.sumsub.com/" : str;
this.isAnalyticsEnabled = true;
this.iconHandler = new SNSDefaultIconHandler();
k15 = p029do.u.k();
this.modules = k15;
this.logTree = com.sumsub.log.logger.d.f36018a;
this.locale = h.a();
}
public static Builder withHandlers$default(Builder builder, l lVar, p pVar, p pVar2, p pVar3, l lVar2, qo.t tVar, p pVar4, int i15, Object obj) {
if ((i15 & 1) != 0) {
lVar = null;
}
if ((i15 & 2) != 0) {
pVar = null;
}
if ((i15 & 4) != 0) {
pVar2 = null;
}
if ((i15 & 8) != 0) {
pVar3 = null;
}
if ((i15 & 16) != 0) {
lVar2 = null;
}
if ((i15 & 32) != 0) {
tVar = null;
}
if ((i15 & 64) != 0) {
pVar4 = null;
}
return builder.withHandlers(lVar, pVar, pVar2, pVar3, lVar2, tVar, pVar4);
}
@NotNull
public final SDK build() throws SNSInvalidParametersException {
return new SNSSDK(this);
}
public final String getAccessToken() {
return this.accessToken;
}
public final SNSActionResultHandler getActionResultHandler() {
return this.actionResultHandler;
}
public final Integer getAutoCloseOnApproveTimeout() {
return this.autoCloseOnApproveTimeout;
}
public final SNSCompleteHandler getCompleteHandler() {
return this.completeHandler;
}
public final SNSInitConfig getConf() {
return this.conf;
}
public final SNSCountryPicker getCountryPicker() {
return this.countryPicker;
}
public final SNSJsonCustomization getCustomization() {
return this.customization;
}
public final SNSErrorHandler getErrorHandler() {
return this.errorHandler;
}
public final SNSEventHandler getEventHandler() {
return this.eventHandler;
}
public final SNSIconHandler getIconHandler() {
return this.iconHandler;
}
public final SNSInstructionsViewHandler getInstructionsHandler() {
return this.instructionsHandler;
}
@NotNull
public final Locale getLocale() {
return this.locale;
}
@NotNull
public final Logger getLogTree() {
return this.logTree;
}
@NotNull
public final List<SNSModule> getModules$idensic_mobile_sdk_release() {
return this.modules;
}
public final TokenExpirationHandler getOnTokenExpiration() {
return this.onTokenExpiration;
}
public final Map<String, SNSDocumentDefinition> getPreferredDocumentsDefinitions$idensic_mobile_sdk_release() {
return this.preferredDocumentsDefinitions;
}
public final Map<String, String> getSettings$idensic_mobile_sdk_release() {
return this.settings;
}
public final SNSStateChangedHandler getStateChangedHandler() {
return this.stateChangedHandler;
}
public final List<SNSSupportItem> getSupportItems$idensic_mobile_sdk_release() {
return this.supportItems;
}
public final Integer getTheme() {
return this.theme;
}
@NotNull
public final String getUrl() {
return this.url;
}
public final SNSUrlHandler getUrlHandler() {
return this.urlHandler;
}
@NotNull
public final WeakReference<Activity> getWeakActivity$idensic_mobile_sdk_release() {
return this.weakActivity;
}
public final boolean getIsAnalyticsEnabled() {
return this.isAnalyticsEnabled;
}
public final boolean getIsDebug() {
return this.isDebug;
}
@NotNull
public final Builder withAccessToken(String accessToken, @NotNull TokenExpirationHandler onTokenExpiration) {
this.accessToken = accessToken;
this.onTokenExpiration = onTokenExpiration;
return this;
}
@NotNull
public final Builder withActionResultHandler(SNSActionResultHandler actionResultHandler) {
this.actionResultHandler = actionResultHandler;
return this;
}
@NotNull
public final Builder withEventHandler(SNSEventHandler eventHandler) {
this.eventHandler = eventHandler;
return this;
}
@NotNull
public final Builder withHandlers(final l<? super SNSException, g0> lVar, final p<? super SNSSDKState, ? super SNSSDKState, g0> pVar, final p<? super SNSCompletionResult, ? super SNSSDKState, g0> pVar2, final p<? super String, ? super String, ? extends SNSActionResult> pVar3, final l<? super SNSEvent, g0> lVar2, final qo.t<? super Context, ? super String, ? super String, ? super String, ? super String, ? super String, ? extends View> tVar, final p<? super Context, ? super String, Boolean> pVar4) {
SNSErrorHandler sNSErrorHandler;
SNSStateChangedHandler sNSStateChangedHandler;
SNSCompleteHandler sNSCompleteHandler;
SNSActionResultHandler sNSActionResultHandler;
SNSEventHandler sNSEventHandler;
SNSInstructionsViewHandler sNSInstructionsViewHandler;
SNSUrlHandler sNSUrlHandler = null;
if (lVar != null) {
sNSErrorHandler = new SNSErrorHandler() {
@Override
public void onError(@NotNull SNSException sNSException) {
lVar.invoke(sNSException);
}
};
} else {
sNSErrorHandler = null;
}
this.errorHandler = sNSErrorHandler;
if (pVar != null) {
sNSStateChangedHandler = new SNSStateChangedHandler() {
@Override
public void onStateChanged(@NotNull SNSSDKState sNSSDKState, @NotNull SNSSDKState sNSSDKState2) {
pVar.invoke(sNSSDKState2, sNSSDKState);
}
};
} else {
sNSStateChangedHandler = null;
}
this.stateChangedHandler = sNSStateChangedHandler;
if (pVar2 != null) {
sNSCompleteHandler = new SNSCompleteHandler() {
@Override
public void onComplete(@NotNull SNSCompletionResult sNSCompletionResult, @NotNull SNSSDKState sNSSDKState) {
pVar2.invoke(sNSCompletionResult, sNSSDKState);
}
};
} else {
sNSCompleteHandler = null;
}
this.completeHandler = sNSCompleteHandler;
if (pVar3 != null) {
sNSActionResultHandler = new SNSActionResultHandler() {
@Override
@NotNull
public SNSActionResult onActionResult(@NotNull String actionId, @NotNull String actionType, String answer, boolean allowContinuing) {
return pVar3.invoke(actionId, answer);
}
};
} else {
sNSActionResultHandler = null;
}
this.actionResultHandler = sNSActionResultHandler;
if (lVar2 != null) {
sNSEventHandler = new SNSEventHandler() {
@Override
public void onEvent(@NotNull SNSEvent sNSEvent) {
lVar2.invoke(sNSEvent);
}
};
} else {
sNSEventHandler = null;
}
this.eventHandler = sNSEventHandler;
if (tVar != null) {
sNSInstructionsViewHandler = new SNSInstructionsViewHandler() {
@Override
public View onVerificationStep(@NotNull Context context, @NotNull String verificationStep, String idDocumentType, @NotNull String scene, String position, String countryCode) {
return tVar.invoke(context, verificationStep, idDocumentType, scene, position, countryCode);
}
};
} else {
sNSInstructionsViewHandler = null;
}
this.instructionsHandler = sNSInstructionsViewHandler;
if (pVar4 != null) {
sNSUrlHandler = new SNSUrlHandler() {
@Override
public boolean onUrl(@NotNull Context context, @NotNull String url) {
return pVar4.invoke(context, url).booleanValue();
}
};
}
this.urlHandler = sNSUrlHandler;
return this;
}
@NotNull
public final Builder withLocale(@NotNull Locale locale) {
this.locale = locale;
return this;
}
@NotNull
public final Builder withTheme(@NotNull SNSTheme theme) {
SNSJsonCustomization create = SNSJsonCustomization.INSTANCE.create();
create.loadTheme(theme);
this.customization = create;
return this;
}
public Builder(@NotNull Activity activity) {
this(activity, null);
}
}
}