导航菜单

页面标题

页面副标题

Oolka v2.4.42 - MainActivity.java 源代码

正在查看: Oolka v2.4.42 应用的 MainActivity.java JAVA 源代码文件

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


package co.hyperverge.hyperkyc.ui;

import android.app.Application;
import android.os.Build;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import co.hyperverge.hyperkyc.BuildConfig;
import co.hyperverge.hyperkyc.core.hv.models.HSRemoteConfig;
import co.hyperverge.hyperkyc.core.hv.models.HSUIConfig;
import co.hyperverge.hyperkyc.data.models.KycCountry;
import co.hyperverge.hyperkyc.data.models.Properties;
import co.hyperverge.hyperkyc.data.models.SessionRecordingConfig;
import co.hyperverge.hyperkyc.data.models.WorkflowConfig;
import co.hyperverge.hyperkyc.data.models.result.HyperKycError;
import co.hyperverge.hyperkyc.data.models.result.HyperKycStatus;
import co.hyperverge.hyperkyc.data.models.state.TransactionStateResponse;
import co.hyperverge.hyperkyc.databinding.HkActivityMainBinding;
import co.hyperverge.hyperkyc.hvsessionrecorder.HVSessionRecorder;
import co.hyperverge.hyperkyc.ui.models.WorkflowUIState;
import co.hyperverge.hyperkyc.ui.viewmodels.MainVM;
import co.hyperverge.hyperkyc.utils.extensions.ActivityExtsKt;
import co.hyperverge.hyperkyc.utils.extensions.CoreExtsKt;
import co.hyperverge.hyperkyc.utils.extensions.LogExtsKt;
import co.hyperverge.hyperlogger.HyperLogger;
import com.google.android.material.button.MaterialButton;
import com.google.android.material.textview.MaterialTextView;
import com.google.gson.Gson;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CancellationException;
import java.util.regex.Matcher;
import kotlin.LazyKt;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.collections.ArraysKt;
import kotlin.collections.CollectionsKt;
import kotlin.collections.MapsKt;
import kotlin.coroutines.Continuation;
import kotlin.coroutines.CoroutineContext;
import kotlin.g;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.SourceDebugExtension;
import kotlin.text.StringsKt;
import kotlinx.coroutines.BuildersKt;
import kotlinx.coroutines.i0;
import kotlinx.coroutines.j0;
import kotlinx.coroutines.p1;
import org.jetbrains.annotations.NotNull;

@Metadata
@SourceDebugExtension({"SMAP\nMainActivity.kt\nKotlin\n*S Kotlin\n*F\n+ 1 MainActivity.kt\nco/hyperverge/hyperkyc/ui/MainActivity\n+ 2 LogExts.kt\nco/hyperverge/hyperkyc/utils/extensions/LogExtsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n+ 4 _Collections.kt\nkotlin/collections/CollectionsKt___CollectionsKt\n+ 5 _Maps.kt\nkotlin/collections/MapsKt___MapsKt\n*L\n1#1,1205:1\n14#2:1206\n28#2,10:1207\n62#2,12:1217\n40#2,12:1230\n62#2,12:1242\n52#2:1254\n50#2,6:1255\n14#2:1261\n28#2,10:1262\n62#2,12:1272\n40#2,12:1285\n62#2,12:1297\n52#2:1309\n50#2,6:1310\n14#2:1316\n28#2,10:1317\n62#2,12:1327\n40#2,12:1340\n62#2,12:1352\n52#2:1364\n50#2,6:1365\n14#2:1371\n28#2,10:1372\n62#2,12:1382\n40#2,12:1395\n62#2,12:1407\n52#2:1419\n50#2,6:1420\n14#2:1426\n28#2,10:1427\n62#2,12:1437\n40#2,12:1450\n62#2,12:1462\n52#2:1474\n50#2,6:1475\n14#2:1481\n28#2,10:1482\n62#2,12:1492\n40#2,12:1505\n62#2,12:1517\n52#2:1529\n50#2,6:1530\n14#2:1536\n28#2,10:1537\n62#2,12:1547\n40#2,12:1560\n62#2,12:1572\n52#2:1584\n50#2,6:1585\n14#2:1591\n28#2,10:1592\n62#2,12:1602\n40#2,12:1615\n62#2,12:1627\n52#2:1639\n50#2,6:1640\n14#2:1646\n28#2,10:1647\n62#2,12:1657\n40#2,12:1670\n62#2,12:1682\n52#2:1694\n50#2,6:1695\n14#2:1701\n28#2,10:1702\n62#2,12:1712\n40#2,12:1725\n62#2,12:1737\n52#2:1749\n50#2,6:1750\n14#2:1756\n28#2,10:1757\n62#2,12:1767\n40#2,12:1780\n62#2,12:1792\n52#2:1804\n50#2,6:1805\n14#2:1817\n28#2,10:1818\n62#2,12:1828\n40#2,12:1841\n62#2,12:1853\n52#2:1865\n50#2,6:1866\n14#2:1873\n28#2,10:1874\n62#2,12:1884\n40#2,12:1897\n62#2,12:1909\n52#2:1921\n50#2,6:1922\n14#2:1928\n28#2,10:1929\n62#2,12:1939\n40#2,12:1952\n62#2,12:1964\n52#2:1976\n50#2,6:1977\n15#2:1983\n28#2,10:1984\n62#2,12:1994\n40#2,12:2007\n62#2,12:2019\n52#2:2031\n50#2,6:2032\n15#2:2038\n28#2,10:2039\n62#2,12:2049\n40#2,12:2062\n62#2,12:2074\n52#2:2086\n50#2,6:2087\n14#2:2093\n28#2,10:2094\n62#2,12:2104\n40#2,12:2117\n62#2,12:2129\n52#2:2141\n50#2,6:2142\n14#2:2148\n28#2,10:2149\n62#2,12:2159\n40#2,12:2172\n62#2,12:2184\n52#2:2196\n50#2,6:2197\n14#2:2203\n28#2,10:2204\n62#2,12:2214\n40#2,12:2227\n62#2,12:2239\n52#2:2251\n50#2,6:2252\n14#2:2258\n28#2,10:2259\n62#2,12:2269\n40#2,12:2282\n62#2,12:2294\n52#2:2306\n50#2,6:2307\n14#2:2313\n28#2,10:2314\n62#2,12:2324\n40#2,12:2337\n62#2,12:2349\n52#2:2361\n50#2,6:2362\n14#2:2368\n28#2,10:2369\n62#2,12:2379\n40#2,12:2392\n62#2,12:2404\n52#2:2416\n50#2,6:2417\n14#2:2423\n28#2,10:2424\n62#2,12:2434\n40#2,12:2447\n62#2,12:2459\n52#2:2471\n50#2,6:2472\n23#2,15:2478\n62#2,12:2493\n40#2,12:2506\n62#2,12:2518\n52#2:2530\n50#2,6:2531\n15#2:2537\n28#2,10:2538\n62#2,12:2548\n40#2,12:2561\n62#2,12:2573\n52#2:2585\n50#2,6:2586\n26#2,12:2592\n62#2,12:2604\n40#2,12:2617\n62#2,12:2629\n52#2:2641\n50#2,6:2642\n14#2:2664\n28#2,10:2665\n62#2,12:2675\n40#2,12:2688\n62#2,12:2700\n52#2:2712\n50#2,6:2713\n1#3:1229\n1#3:1284\n1#3:1339\n1#3:1394\n1#3:1449\n1#3:1504\n1#3:1559\n1#3:1614\n1#3:1669\n1#3:1724\n1#3:1779\n1#3:1815\n1#3:1840\n1#3:1872\n1#3:1896\n1#3:1951\n1#3:2006\n1#3:2061\n1#3:2116\n1#3:2171\n1#3:2226\n1#3:2281\n1#3:2336\n1#3:2391\n1#3:2446\n1#3:2505\n1#3:2560\n1#3:2616\n1#3:2658\n1#3:2687\n766#4:1811\n857#4,2:1812\n1603#4,9:2648\n1855#4:2657\n1856#4:2659\n1612#4:2660\n1789#4,3:2661\n215#5:1814\n216#5:1816\n*S KotlinDebug\n*F\n+ 1 MainActivity.kt\nco/hyperverge/hyperkyc/ui/MainActivity\n*L\n91#1:1206\n91#1:1207,10\n91#1:1217,12\n91#1:1230,12\n91#1:1242,12\n91#1:1254\n91#1:1255,6\n114#1:1261\n114#1:1262,10\n114#1:1272,12\n114#1:1285,12\n114#1:1297,12\n114#1:1309\n114#1:1310,6\n129#1:1316\n129#1:1317,10\n129#1:1327,12\n129#1:1340,12\n129#1:1352,12\n129#1:1364\n129#1:1365,6\n152#1:1371\n152#1:1372,10\n152#1:1382,12\n152#1:1395,12\n152#1:1407,12\n152#1:1419\n152#1:1420,6\n346#1:1426\n346#1:1427,10\n346#1:1437,12\n346#1:1450,12\n346#1:1462,12\n346#1:1474\n346#1:1475,6\n382#1:1481\n382#1:1482,10\n382#1:1492,12\n382#1:1505,12\n382#1:1517,12\n382#1:1529\n382#1:1530,6\n415#1:1536\n415#1:1537,10\n415#1:1547,12\n415#1:1560,12\n415#1:1572,12\n415#1:1584\n415#1:1585,6\n451#1:1591\n451#1:1592,10\n451#1:1602,12\n451#1:1615,12\n451#1:1627,12\n451#1:1639\n451#1:1640,6\n484#1:1646\n484#1:1647,10\n484#1:1657,12\n484#1:1670,12\n484#1:1682,12\n484#1:1694\n484#1:1695,6\n517#1:1701\n517#1:1702,10\n517#1:1712,12\n517#1:1725,12\n517#1:1737,12\n517#1:1749\n517#1:1750,6\n550#1:1756\n550#1:1757,10\n550#1:1767,12\n550#1:1780,12\n550#1:1792,12\n550#1:1804\n550#1:1805,6\n607#1:1817\n607#1:1818,10\n607#1:1828,12\n607#1:1841,12\n607#1:1853,12\n607#1:1865\n607#1:1866,6\n620#1:1873\n620#1:1874,10\n620#1:1884,12\n620#1:1897,12\n620#1:1909,12\n620#1:1921\n620#1:1922,6\n701#1:1928\n701#1:1929,10\n701#1:1939,12\n701#1:1952,12\n701#1:1964,12\n701#1:1976\n701#1:1977,6\n703#1:1983\n703#1:1984,10\n703#1:1994,12\n703#1:2007,12\n703#1:2019,12\n703#1:2031\n703#1:2032,6\n707#1:2038\n707#1:2039,10\n707#1:2049,12\n707#1:2062,12\n707#1:2074,12\n707#1:2086\n707#1:2087,6\n721#1:2093\n721#1:2094,10\n721#1:2104,12\n721#1:2117,12\n721#1:2129,12\n721#1:2141\n721#1:2142,6\n732#1:2148\n732#1:2149,10\n732#1:2159,12\n732#1:2172,12\n732#1:2184,12\n732#1:2196\n732#1:2197,6\n761#1:2203\n761#1:2204,10\n761#1:2214,12\n761#1:2227,12\n761#1:2239,12\n761#1:2251\n761#1:2252,6\n777#1:2258\n777#1:2259,10\n777#1:2269,12\n777#1:2282,12\n777#1:2294,12\n777#1:2306\n777#1:2307,6\n1130#1:2313\n1130#1:2314,10\n1130#1:2324,12\n1130#1:2337,12\n1130#1:2349,12\n1130#1:2361\n1130#1:2362,6\n1157#1:2368\n1157#1:2369,10\n1157#1:2379,12\n1157#1:2392,12\n1157#1:2404,12\n1157#1:2416\n1157#1:2417,6\n1172#1:2423\n1172#1:2424,10\n1172#1:2434,12\n1172#1:2447,12\n1172#1:2459,12\n1172#1:2471\n1172#1:2472,6\n1175#1:2478,15\n1175#1:2493,12\n1175#1:2506,12\n1175#1:2518,12\n1175#1:2530\n1175#1:2531,6\n1188#1:2537\n1188#1:2538,10\n1188#1:2548,12\n1188#1:2561,12\n1188#1:2573,12\n1188#1:2585\n1188#1:2586,6\n1199#1:2592,12\n1199#1:2604,12\n1199#1:2617,12\n1199#1:2629,12\n1199#1:2641\n1199#1:2642,6\n552#1:2664\n552#1:2665,10\n552#1:2675,12\n552#1:2688,12\n552#1:2700,12\n552#1:2712\n552#1:2713,6\n91#1:1229\n114#1:1284\n129#1:1339\n152#1:1394\n346#1:1449\n382#1:1504\n415#1:1559\n451#1:1614\n484#1:1669\n517#1:1724\n550#1:1779\n607#1:1840\n620#1:1896\n701#1:1951\n703#1:2006\n707#1:2061\n721#1:2116\n732#1:2171\n761#1:2226\n777#1:2281\n1130#1:2336\n1157#1:2391\n1172#1:2446\n1175#1:2505\n1188#1:2560\n1199#1:2616\n528#1:2658\n552#1:2687\n563#1:1811\n563#1:1812,2\n528#1:2648,9\n528#1:2657\n528#1:2659\n528#1:2660\n529#1:2661,3\n569#1:1814\n569#1:1816\n*E\n"})
public final class MainActivity extends BaseActivity {
    private boolean isActivityRecreated;
    private p1 loadingUIStateCollectJob;
    private HSUIConfig uiColorConfigData;

    @NotNull
    private String hvFacePreviewContentDescription = "hvFacePreview";

    @NotNull
    private final kotlin.e binding$delegate = LazyKt.lazy(new Function0<HkActivityMainBinding>() {
        {
            super(0);
        }

        @NotNull
        public final HkActivityMainBinding m75invoke() {
            return HkActivityMainBinding.inflate(MainActivity.this.getLayoutInflater());
        }
    });

    public final void flowForwardOrFinish() {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        sb.append("flowForwardOrFinish() called");
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str, "packageName");
                if (StringsKt.contains$default(str, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str2 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    Log.println(3, str2, "flowForwardOrFinish() called ");
                }
            }
        }
        getMainVM().flowForward();
    }

    public final HkActivityMainBinding getBinding() {
        return (HkActivityMainBinding) this.binding$delegate.getValue();
    }

    public final Gson getGson() {
        return getMainVM().getGson();
    }

    public final java.lang.Object initHyperSnap(kotlin.coroutines.Continuation<? super kotlin.Unit> r17) {
        throw new UnsupportedOperationException("Method not decompiled: co.hyperverge.hyperkyc.ui.MainActivity.initHyperSnap(kotlin.coroutines.Continuation):java.lang.Object");
    }

    private final void initViews() {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        sb.append("initViews() called");
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str, "packageName");
                if (StringsKt.contains$default(str, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str2 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    Log.println(3, str2, "initViews() called ");
                }
            }
        }
        getBinding().btnRetry.setOnClickListener(new View.OnClickListener() {
            @Override
            public final void onClick(View view) {
                MainActivity.initViews$lambda$5$lambda$4(MainActivity.this, view);
            }
        });
    }

    public static final void initViews$lambda$5$lambda$4(MainActivity mainActivity, View view) {
        Intrinsics.checkNotNullParameter(mainActivity, "this$0");
        BuildersKt.launch$default(androidx.lifecycle.o.a(mainActivity), (CoroutineContext) null, (j0) null, new MainActivity$initViews$2$1$1(mainActivity, null), 3, (Object) null);
    }

    public final Object loadCountries(Continuation<? super List<KycCountry>> continuation) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        kotlin.coroutines.g gVar = new kotlin.coroutines.g(kotlin.coroutines.intrinsics.b.c(continuation));
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "loadCountries() called with: continuation = " + gVar;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "loadCountries() called with: continuation = " + gVar;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        BuildersKt.launch$default(androidx.lifecycle.o.a(this), (CoroutineContext) null, (j0) null, new MainActivity$loadCountries$2$2$1(this, getBinding(), gVar, null), 3, (Object) null);
        Object a = gVar.a();
        if (a == kotlin.coroutines.intrinsics.b.d()) {
            kotlin.coroutines.jvm.internal.h.c(continuation);
        }
        return a;
    }

    public final Object loadRemoteConfig(Continuation<? super HSRemoteConfig> continuation) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        kotlin.coroutines.g gVar = new kotlin.coroutines.g(kotlin.coroutines.intrinsics.b.c(continuation));
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "loadRemoteConfig() called with: continuation = " + gVar;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "loadRemoteConfig() called with: continuation = " + gVar;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        BuildersKt.launch$default(androidx.lifecycle.o.a(this), (CoroutineContext) null, (j0) null, new MainActivity$loadRemoteConfig$2$2$1(this, getBinding(), gVar, null), 3, (Object) null);
        Object a = gVar.a();
        if (a == kotlin.coroutines.intrinsics.b.d()) {
            kotlin.coroutines.jvm.internal.h.c(continuation);
        }
        return a;
    }

    public final Object loadTextConfigs(Continuation<? super Map<String, ? extends Map<String, ? extends Object>>> continuation) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        kotlin.coroutines.g gVar = new kotlin.coroutines.g(kotlin.coroutines.intrinsics.b.c(continuation));
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "loadTextConfigs() called with: continuation = " + gVar;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "loadTextConfigs() called with: continuation = " + gVar;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        BuildersKt.launch$default(androidx.lifecycle.o.a(this), (CoroutineContext) null, (j0) null, new MainActivity$loadTextConfigs$2$2$1(this, getBinding(), gVar, null), 3, (Object) null);
        Object a = gVar.a();
        if (a == kotlin.coroutines.intrinsics.b.d()) {
            kotlin.coroutines.jvm.internal.h.c(continuation);
        }
        return a;
    }

    public final Object loadTransactionState(Continuation<? super TransactionStateResponse> continuation) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        kotlin.coroutines.g gVar = new kotlin.coroutines.g(kotlin.coroutines.intrinsics.b.c(continuation));
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "loadTransactionState() called with: continuation = " + gVar;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "loadTransactionState() called with: continuation = " + gVar;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        androidx.lifecycle.o.a(this).b(new MainActivity$loadTransactionState$2$2$1(this, getBinding(), gVar, null));
        Object a = gVar.a();
        if (a == kotlin.coroutines.intrinsics.b.d()) {
            kotlin.coroutines.jvm.internal.h.c(continuation);
        }
        return a;
    }

    public final Object loadUIConfigs(Continuation<? super HSUIConfig> continuation) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        kotlin.coroutines.g gVar = new kotlin.coroutines.g(kotlin.coroutines.intrinsics.b.c(continuation));
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "loadUIConfigs() called with: continuation = " + gVar;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "loadUIConfigs() called with: continuation = " + gVar;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        BuildersKt.launch$default(androidx.lifecycle.o.a(this), (CoroutineContext) null, (j0) null, new MainActivity$loadUIConfigs$2$2$1(this, getBinding(), gVar, null), 3, (Object) null);
        Object a = gVar.a();
        if (a == kotlin.coroutines.intrinsics.b.d()) {
            kotlin.coroutines.jvm.internal.h.c(continuation);
        }
        return a;
    }

    private final void observeFinishWithResultState() {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        sb.append("observeFinishWithResultState() called");
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str, "packageName");
                if (StringsKt.contains$default(str, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str2 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    Log.println(3, str2, "observeFinishWithResultState() called ");
                }
            }
        }
        BuildersKt.launch$default(androidx.lifecycle.o.a(this), (CoroutineContext) null, (j0) null, new MainActivity$observeFinishWithResultState$2(this, null), 3, (Object) null);
    }

    private final void observeUiState() {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        sb.append("observeUiState() called");
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str, "packageName");
                if (StringsKt.contains$default(str, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str2 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    Log.println(3, str2, "observeUiState() called ");
                }
            }
        }
        BuildersKt.launch$default(androidx.lifecycle.o.a(this), (CoroutineContext) null, (j0) null, new MainActivity$observeUiState$2(this, null), 3, (Object) null);
    }

    public final void processHVBridgeError(java.lang.String r25, java.lang.Throwable r26, java.lang.Integer r27, java.lang.String r28) {
        throw new UnsupportedOperationException("Method not decompiled: co.hyperverge.hyperkyc.ui.MainActivity.processHVBridgeError(java.lang.String, java.lang.Throwable, java.lang.Integer, java.lang.String):void");
    }

    public static void processHVBridgeError$default(MainActivity mainActivity, String str, Throwable th, Integer num, String str2, int i, Object obj) {
        if ((i & 4) != 0) {
            num = null;
        }
        if ((i & 8) != 0) {
            str2 = null;
        }
        mainActivity.processHVBridgeError(str, th, num, str2);
    }

    private final void showRetry(final boolean z, Integer num, String str) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str2 = "showRetry() called with: show = " + z + ", retryTitleRes = " + num + ", retryError = " + str;
        if (str2 == null) {
            str2 = "null ";
        }
        sb.append(str2);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str3 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str3, "packageName");
                if (StringsKt.contains$default(str3, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str4 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str4);
                    if (matcher2.find()) {
                        str4 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str4, "replaceAll(\"\")");
                    }
                    if (str4.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str4 = str4.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str4, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str5 = "showRetry() called with: show = " + z + ", retryTitleRes = " + num + ", retryError = " + str;
                    if (str5 == null) {
                        str5 = "null ";
                    }
                    sb2.append(str5);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str4, sb2.toString());
                }
            }
        }
        HkActivityMainBinding binding = getBinding();
        if (num != null) {
            binding.tvRetryTitle.setText(num.intValue());
        }
        if (str != null) {
            binding.tvRetryTitle.append('\n' + str);
        }
        MaterialTextView materialTextView = binding.tvRetryTitle;
        Intrinsics.checkNotNullExpressionValue(materialTextView, "tvRetryTitle");
        MaterialButton materialButton = binding.btnRetry;
        Intrinsics.checkNotNullExpressionValue(materialButton, "btnRetry");
        CoreExtsKt.withViews(new View[]{materialTextView, materialButton}, new Function1<View, Unit>() {
            {
                super(1);
            }

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

            public final void invoke(@NotNull View view) {
                Intrinsics.checkNotNullParameter(view, "$this$withViews");
                view.setVisibility(z ? 0 : 8);
            }
        });
    }

    public static void showRetry$default(MainActivity mainActivity, boolean z, Integer num, String str, int i, Object obj) {
        if ((i & 2) != 0) {
            num = null;
        }
        if ((i & 4) != 0) {
            str = null;
        }
        mainActivity.showRetry(z, num, str);
    }

    public final java.lang.Object m71startApiFlowgIAlus(co.hyperverge.hyperkyc.ui.models.WorkflowUIState.ApiCall r5, kotlin.coroutines.Continuation<? super kotlin.g<okhttp3.Response>> r6) {
        throw new UnsupportedOperationException("Method not decompiled: co.hyperverge.hyperkyc.ui.MainActivity.m71startApiFlowgIAlus(co.hyperverge.hyperkyc.ui.models.WorkflowUIState$ApiCall, kotlin.coroutines.Continuation):java.lang.Object");
    }

    public final java.lang.Object m72startBarcodeFlowgIAlus(co.hyperverge.hyperkyc.ui.models.WorkflowUIState.BarcodeCapture r5, kotlin.coroutines.Continuation<? super kotlin.g<kotlin.Unit>> r6) {
        throw new UnsupportedOperationException("Method not decompiled: co.hyperverge.hyperkyc.ui.MainActivity.m72startBarcodeFlowgIAlus(co.hyperverge.hyperkyc.ui.models.WorkflowUIState$BarcodeCapture, kotlin.coroutines.Continuation):java.lang.Object");
    }

    public final java.lang.Object m73startDocFlowgIAlus(co.hyperverge.hyperkyc.ui.models.WorkflowUIState.DocCapture r5, kotlin.coroutines.Continuation<? super kotlin.g<kotlin.Unit>> r6) {
        throw new UnsupportedOperationException("Method not decompiled: co.hyperverge.hyperkyc.ui.MainActivity.m73startDocFlowgIAlus(co.hyperverge.hyperkyc.ui.models.WorkflowUIState$DocCapture, kotlin.coroutines.Continuation):java.lang.Object");
    }

    public final java.lang.Object m74startFaceFlowgIAlus(co.hyperverge.hyperkyc.ui.models.WorkflowUIState.FaceCapture r5, kotlin.coroutines.Continuation<? super kotlin.g<kotlin.Unit>> r6) {
        throw new UnsupportedOperationException("Method not decompiled: co.hyperverge.hyperkyc.ui.MainActivity.m74startFaceFlowgIAlus(co.hyperverge.hyperkyc.ui.models.WorkflowUIState$FaceCapture, kotlin.coroutines.Continuation):java.lang.Object");
    }

    public final void startSessionFlow(WorkflowUIState.StartSessionRecording startSessionRecording) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "startSessionFlow() called with: startSessionFlowUiState = " + startSessionRecording;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "startSessionFlow() called with: startSessionFlowUiState = " + startSessionRecording;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        boolean recordAudio = startSessionRecording.getRecordAudio();
        boolean showConsentScreen = startSessionRecording.getShowConsentScreen();
        boolean uploadSession = startSessionRecording.getUploadSession();
        String uploadUrl = startSessionRecording.getUploadUrl();
        String stopModuleId = startSessionRecording.getStopModuleId();
        Map<String, Object> textConfigs = startSessionRecording.getTextConfigs();
        Map map = textConfigs != null ? MapsKt.toMap(textConfigs) : null;
        Map map2 = map instanceof Map ? map : null;
        ActivityExtsKt.replaceContent$default(this, new SessionConsentFragment(new SessionRecordingConfig(recordAudio, showConsentScreen, uploadSession, uploadUrl, stopModuleId, map2 == null ? MapsKt.emptyMap() : map2)), null, false, 0, 14, null);
    }

    public final void startVideoStatementFlow(WorkflowUIState.VideoStatement videoStatement) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        Map emptyMap;
        Map emptyMap2;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "startVideoStatementFlow() called with: videoStatementFlow = " + videoStatement;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "startVideoStatementFlow() called with: videoStatementFlow = " + videoStatement;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        long currentTimeMillis = System.currentTimeMillis();
        if (videoStatement.getVsConfig().getShowInstruction()) {
            VideoStatementInstructionFragment videoStatementInstructionFragment = new VideoStatementInstructionFragment(videoStatement);
            Pair[] pairArr = new Pair[2];
            Map<String, Object> textConfigs = videoStatement.getTextConfigs();
            if (textConfigs == null || (emptyMap2 = MapsKt.toMap(textConfigs)) == null) {
                emptyMap2 = MapsKt.emptyMap();
            }
            pairArr[0] = kotlin.k.a("textConfigs", emptyMap2);
            pairArr[1] = kotlin.k.a("startTimestamp", Long.valueOf(currentTimeMillis));
            ActivityExtsKt.replaceContent$default(this, videoStatementInstructionFragment, androidx.core.os.d.a(pairArr), false, 0, 12, null);
            return;
        }
        VideoStatementFragment videoStatementFragment = new VideoStatementFragment(videoStatement);
        Pair[] pairArr2 = new Pair[2];
        Map<String, Object> textConfigs2 = videoStatement.getTextConfigs();
        if (textConfigs2 == null || (emptyMap = MapsKt.toMap(textConfigs2)) == null) {
            emptyMap = MapsKt.emptyMap();
        }
        pairArr2[0] = kotlin.k.a("textConfigs", emptyMap);
        pairArr2[1] = kotlin.k.a("startTimestamp", Long.valueOf(currentTimeMillis));
        ActivityExtsKt.replaceContent$default(this, videoStatementFragment, androidx.core.os.d.a(pairArr2), false, 0, 12, null);
    }

    public final void startVideoStatementV2Flow(WorkflowUIState.VideoStatementV2 videoStatementV2) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        Map emptyMap;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "startVideoStatementV2Flow() called with: videoStatementV2Flow = " + videoStatementV2;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "startVideoStatementV2Flow() called with: videoStatementV2Flow = " + videoStatementV2;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        VideoStatementV2Fragment videoStatementV2Fragment = new VideoStatementV2Fragment(videoStatementV2);
        Pair[] pairArr = new Pair[1];
        Map<String, Object> textConfigs = videoStatementV2.getTextConfigs();
        if (textConfigs == null || (emptyMap = MapsKt.toMap(textConfigs)) == null) {
            emptyMap = MapsKt.emptyMap();
        }
        pairArr[0] = kotlin.k.a("textConfigs", emptyMap);
        ActivityExtsKt.replaceContent$default(this, videoStatementV2Fragment, androidx.core.os.d.a(pairArr), false, 0, 12, null);
    }

    public final Object startWorkflow(Continuation<? super Unit> continuation) {
        Object f = i0.f(new MainActivity$startWorkflow$2(this, null), continuation);
        return f == kotlin.coroutines.intrinsics.b.d() ? f : Unit.a;
    }

    public final void stopSessionFlow(WorkflowUIState.StopSessionRecording stopSessionRecording) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        Map emptyMap;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "stopSessionFlow() called with: stopSessionFlowUiState = " + stopSessionRecording;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "stopSessionFlow() called with: stopSessionFlowUiState = " + stopSessionRecording;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        HVSessionRecorder.Companion companion2 = HVSessionRecorder.Companion;
        String uploadUrl$hyperkyc_release = companion2.getInstance().getUploadUrl$hyperkyc_release();
        String filePath$hyperkyc_release = companion2.getInstance().getFilePath$hyperkyc_release();
        if (!stopSessionRecording.getShowRecordingReview()) {
            if (companion2.getInstance().getShouldUpload$hyperkyc_release()) {
                BaseActivity.finishSessionUpload$default(this, stopSessionRecording, getMainVM().getCurrentModuleId$hyperkyc_release(), uploadUrl$hyperkyc_release, filePath$hyperkyc_release, null, 16, null);
                return;
            } else {
                addSessionRecordingVideoUriToResult(stopSessionRecording, filePath$hyperkyc_release, "yes");
                companion2.getInstance().stop$hyperkyc_release(new Function1<File, Unit>() {
                    {
                        super(1);
                    }

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

                    public final void invoke(File file) {
                        MainActivity.this.getMainVM().flowForward();
                    }
                });
                return;
            }
        }
        SessionReviewFragment sessionReviewFragment = new SessionReviewFragment(stopSessionRecording);
        Pair[] pairArr = new Pair[3];
        Map<String, Object> textConfigs = stopSessionRecording.getTextConfigs();
        if (textConfigs == null || (emptyMap = MapsKt.toMap(textConfigs)) == null) {
            emptyMap = MapsKt.emptyMap();
        }
        pairArr[0] = kotlin.k.a("textConfigs", emptyMap);
        pairArr[1] = kotlin.k.a("uploadUrl", uploadUrl$hyperkyc_release);
        pairArr[2] = kotlin.k.a("filePath", filePath$hyperkyc_release);
        ActivityExtsKt.replaceContent$default(this, sessionReviewFragment, androidx.core.os.d.a(pairArr), false, 0, 12, null);
    }

    public static void updateEndState$hyperkyc_release$default(MainActivity mainActivity, boolean z, Boolean bool, boolean z2, Function0 function0, int i, Object obj) {
        if ((i & 2) != 0) {
            bool = null;
        }
        if ((i & 4) != 0) {
            z2 = false;
        }
        if ((i & 8) != 0) {
            function0 = new Function0<Unit>() {
                public final void m79invoke() {
                }

                public Object invoke() {
                    m79invoke();
                    return Unit.a;
                }
            };
        }
        mainActivity.updateEndState$hyperkyc_release(z, bool, z2, function0);
    }

    private final void updateStepTitle() {
    }

    public final boolean validateInputs(co.hyperverge.hyperkyc.data.models.WorkflowConfig r22) {
        throw new UnsupportedOperationException("Method not decompiled: co.hyperverge.hyperkyc.ui.MainActivity.validateInputs(co.hyperverge.hyperkyc.data.models.WorkflowConfig):boolean");
    }

    private static final void validateInputs$finishWithError(MainActivity mainActivity, String str) {
        String canonicalName;
        Object b;
        String className;
        String substringAfterLast$default;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        String str2 = "N/A";
        if (stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) {
            canonicalName = mainActivity != 0 ? MainActivity.class.getCanonicalName() : null;
            if (canonicalName == null) {
                canonicalName = "N/A";
            }
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str3 = "finishWithError() called with: errorMsg = " + str;
        if (str3 == null) {
            str3 = "null ";
        }
        sb.append(str3);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str4 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str4, "packageName");
                if (StringsKt.contains$default(str4, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    if (stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (substringAfterLast$default = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) {
                        String canonicalName2 = mainActivity != 0 ? MainActivity.class.getCanonicalName() : null;
                        if (canonicalName2 != null) {
                            str2 = canonicalName2;
                        }
                    } else {
                        str2 = substringAfterLast$default;
                    }
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str2);
                    if (matcher2.find()) {
                        str2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str2, "replaceAll(\"\")");
                    }
                    if (str2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str2 = str2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str5 = "finishWithError() called with: errorMsg = " + str;
                    if (str5 == null) {
                        str5 = "null ";
                    }
                    sb2.append(str5);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str2, sb2.toString());
                }
            }
        }
        if (mainActivity.isFinishing()) {
            return;
        }
        BaseActivity.finishWithResult$default(mainActivity, HyperKycStatus.ERROR, null, Integer.valueOf(HyperKycError.SDK_INPUT_ERROR), str, false, false, 16, null);
    }

    public final boolean validateSdkVersion(WorkflowConfig workflowConfig) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        HashMap<String, Properties.SDKVersion> sdkVersions;
        Properties.SDKVersion sDKVersion;
        String className2;
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "validateSdkVersion() called with: config = " + workflowConfig;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "validateSdkVersion() called with: config = " + workflowConfig;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        Properties properties = workflowConfig.getProperties();
        if (properties != null && (sdkVersions = properties.getSdkVersions()) != null && (sDKVersion = sdkVersions.get(Properties.SDK_VERSION_MOBILE_KEY)) != null) {
            int validateSdkVersion$lambda$24$toIntVersion = validateSdkVersion$lambda$24$toIntVersion(sDKVersion.getMinimum());
            int validateSdkVersion$lambda$24$toIntVersion2 = validateSdkVersion$lambda$24$toIntVersion(sDKVersion.getMaximum());
            int validateSdkVersion$lambda$24$toIntVersion3 = validateSdkVersion$lambda$24$toIntVersion(BuildConfig.HYPERKYC_VERSION_NAME);
            if (!(validateSdkVersion$lambda$24$toIntVersion <= validateSdkVersion$lambda$24$toIntVersion3 && validateSdkVersion$lambda$24$toIntVersion3 <= validateSdkVersion$lambda$24$toIntVersion2)) {
                BaseActivity.finishWithResult$default(this, HyperKycStatus.ERROR, null, Integer.valueOf(HyperKycError.SDK_VERSION_ERROR), "workflow " + getHyperKycConfig().getWorkflowId$hyperkyc_release() + " does not support the current SDK version - 0.19.0, please use SDK from " + sDKVersion.getMinimum() + " to " + sDKVersion.getMaximum(), false, false, 50, null);
                return false;
            }
        }
        return true;
    }

    private static final int validateSdkVersion$lambda$24$toIntVersion(String str) {
        int i = 0;
        List take = CollectionsKt.take(StringsKt.split$default(str, new char[]{'.'}, false, 0, 6, (Object) null), 2);
        ArrayList arrayList = new ArrayList();
        Iterator it = take.iterator();
        while (it.hasNext()) {
            Integer intOrNull = StringsKt.toIntOrNull((String) it.next());
            if (intOrNull != null) {
                arrayList.add(intOrNull);
            }
        }
        Iterator it2 = arrayList.iterator();
        while (it2.hasNext()) {
            i = (i * 1000) + ((Number) it2.next()).intValue();
        }
        return i;
    }

    public void onBackPressed() {
        throw new UnsupportedOperationException("Method not decompiled: co.hyperverge.hyperkyc.ui.MainActivity.onBackPressed():void");
    }

    public void onCreate(Bundle bundle) {
        String canonicalName;
        Object b;
        String canonicalName2;
        String className;
        String className2;
        super/*androidx.fragment.app.FragmentActivity*/.onCreate(bundle);
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "onCreate() called with: savedInstanceState = " + bundle;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (!CoreExtsKt.isRelease()) {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    String str3 = ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) ? "N/A" : canonicalName2;
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(str3);
                    if (matcher2.find()) {
                        str3 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(str3, "replaceAll(\"\")");
                    }
                    if (str3.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        str3 = str3.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(str3, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str4 = "onCreate() called with: savedInstanceState = " + bundle;
                    if (str4 == null) {
                        str4 = "null ";
                    }
                    sb2.append(str4);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, str3, sb2.toString());
                }
            }
        }
        setContentView(getBinding().getRoot());
        getWindow().getDecorView().getRootView().setTag(this.hvFacePreviewContentDescription);
        if (bundle != null) {
            getMainVM().getHsStateHandler$hyperkyc_release().setActivityRecreated(true);
        }
        BuildersKt.launch$default(androidx.lifecycle.o.a(this), (CoroutineContext) null, (j0) null, new MainActivity$onCreate$2(this, null), 3, (Object) null);
        initViews();
        observeUiState();
        observeFinishWithResultState();
    }

    public void onSaveInstanceState(@NotNull Bundle bundle) {
        Intrinsics.checkNotNullParameter(bundle, "outState");
        if (!getMainVM().isCountryModule$hyperkyc_release()) {
            MainVM.saveStateLocally$hyperkyc_release$default(getMainVM(), true, null, false, 6, null);
        }
        super/*androidx.activity.ComponentActivity*/.onSaveInstanceState(bundle);
    }

    public final void updateEndState$hyperkyc_release(boolean z, Boolean bool, boolean z2, @NotNull Function0<Unit> function0) {
        String canonicalName;
        Object b;
        MainActivity mainActivity;
        String canonicalName2;
        String className;
        String className2;
        Intrinsics.checkNotNullParameter(function0, "onFailAction");
        HyperLogger.Level level = HyperLogger.Level.DEBUG;
        HyperLogger companion = HyperLogger.Companion.getInstance();
        StringBuilder sb = new StringBuilder();
        StackTraceElement[] stackTrace = new Throwable().getStackTrace();
        Intrinsics.checkNotNullExpressionValue(stackTrace, "Throwable().stackTrace");
        StackTraceElement stackTraceElement = (StackTraceElement) ArraysKt.firstOrNull(stackTrace);
        if ((stackTraceElement == null || (className2 = stackTraceElement.getClassName()) == null || (canonicalName = StringsKt.substringAfterLast$default(className2, '.', (String) null, 2, (Object) null)) == null) && (canonicalName = MainActivity.class.getCanonicalName()) == null) {
            canonicalName = "N/A";
        }
        Matcher matcher = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName);
        if (matcher.find()) {
            canonicalName = matcher.replaceAll("");
            Intrinsics.checkNotNullExpressionValue(canonicalName, "replaceAll(\"\")");
        }
        if (canonicalName.length() > 23 && Build.VERSION.SDK_INT < 26) {
            canonicalName = canonicalName.substring(0, 23);
            Intrinsics.checkNotNullExpressionValue(canonicalName, "this as java.lang.String…ing(startIndex, endIndex)");
        }
        sb.append(canonicalName);
        sb.append(" - ");
        String str = "updateEndState() called with: isLoading = " + z + ", isSuccess = " + bool + ", isAPISuccess = " + z2 + ", onFailAction = " + function0;
        if (str == null) {
            str = "null ";
        }
        sb.append(str);
        sb.append(' ');
        sb.append("");
        companion.log(level, sb.toString());
        if (CoreExtsKt.isRelease()) {
            mainActivity = this;
        } else {
            try {
                g.a aVar = kotlin.g.b;
                Object invoke = Class.forName("android.app.AppGlobals").getMethod("getInitialApplication", new Class[0]).invoke(null, new Object[0]);
                Intrinsics.checkNotNull(invoke, "null cannot be cast to non-null type android.app.Application");
                b = kotlin.g.b(((Application) invoke).getPackageName());
            } catch (Throwable th) {
                g.a aVar2 = kotlin.g.b;
                b = kotlin.g.b(kotlin.h.a(th));
            }
            if (kotlin.g.f(b)) {
                b = "";
            }
            String str2 = (String) b;
            if (CoreExtsKt.isDebug()) {
                Intrinsics.checkNotNullExpressionValue(str2, "packageName");
                if (StringsKt.contains$default(str2, "co.hyperverge", false, 2, (Object) null)) {
                    StackTraceElement[] stackTrace2 = new Throwable().getStackTrace();
                    Intrinsics.checkNotNullExpressionValue(stackTrace2, "Throwable().stackTrace");
                    StackTraceElement stackTraceElement2 = (StackTraceElement) ArraysKt.firstOrNull(stackTrace2);
                    if ((stackTraceElement2 == null || (className = stackTraceElement2.getClassName()) == null || (canonicalName2 = StringsKt.substringAfterLast$default(className, '.', (String) null, 2, (Object) null)) == null) && (canonicalName2 = MainActivity.class.getCanonicalName()) == null) {
                        canonicalName2 = "N/A";
                    }
                    Matcher matcher2 = LogExtsKt.ANON_CLASS_PATTERN.matcher(canonicalName2);
                    if (matcher2.find()) {
                        canonicalName2 = matcher2.replaceAll("");
                        Intrinsics.checkNotNullExpressionValue(canonicalName2, "replaceAll(\"\")");
                    }
                    if (canonicalName2.length() > 23 && Build.VERSION.SDK_INT < 26) {
                        canonicalName2 = canonicalName2.substring(0, 23);
                        Intrinsics.checkNotNullExpressionValue(canonicalName2, "this as java.lang.String…ing(startIndex, endIndex)");
                    }
                    StringBuilder sb2 = new StringBuilder();
                    String str3 = "updateEndState() called with: isLoading = " + z + ", isSuccess = " + bool + ", isAPISuccess = " + z2 + ", onFailAction = " + function0;
                    if (str3 == null) {
                        str3 = "null ";
                    }
                    sb2.append(str3);
                    sb2.append(' ');
                    sb2.append("");
                    Log.println(3, canonicalName2, sb2.toString());
                    mainActivity = this;
                }
            }
            mainActivity = this;
        }
        p1 p1Var = mainActivity.loadingUIStateCollectJob;
        if (p1Var != null) {
            p1.a.a(p1Var, (CancellationException) null, 1, (Object) null);
        }
        mainActivity.loadingUIStateCollectJob = androidx.lifecycle.o.a(this).b(new MainActivity$updateEndState$3(z, this, bool, z2, function0, null));
    }
}