package com.pichillilorenzo.flutter_inappwebview_android.webview;

import android.net.Uri;
import android.webkit.ValueCallback;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import com.bytedance.sdk.component.pglcrypt.PglCryptUtils;
import com.google.android.gms.measurement.internal.u1;
import com.pichillilorenzo.flutter_inappwebview_android.Util;
import com.pichillilorenzo.flutter_inappwebview_android.credential_database.URLProtectionSpaceContract;
import com.pichillilorenzo.flutter_inappwebview_android.in_app_browser.InAppBrowserActivity;
import com.pichillilorenzo.flutter_inappwebview_android.in_app_browser.InAppBrowserSettings;
import com.pichillilorenzo.flutter_inappwebview_android.print_job.PrintJobSettings;
import com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl;
import com.pichillilorenzo.flutter_inappwebview_android.types.ChannelDelegateImpl;
import com.pichillilorenzo.flutter_inappwebview_android.types.ClientCertChallenge;
import com.pichillilorenzo.flutter_inappwebview_android.types.ClientCertResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.ContentWorld;
import com.pichillilorenzo.flutter_inappwebview_android.types.CreateWindowAction;
import com.pichillilorenzo.flutter_inappwebview_android.types.CustomSchemeResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.DownloadStartRequest;
import com.pichillilorenzo.flutter_inappwebview_android.types.GeolocationPermissionShowPromptResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.HitTestResult;
import com.pichillilorenzo.flutter_inappwebview_android.types.HttpAuthResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.HttpAuthenticationChallenge;
import com.pichillilorenzo.flutter_inappwebview_android.types.JsAlertResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.JsBeforeUnloadResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.JsConfirmResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.JsPromptResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.NavigationAction;
import com.pichillilorenzo.flutter_inappwebview_android.types.NavigationActionPolicy;
import com.pichillilorenzo.flutter_inappwebview_android.types.PermissionResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.SafeBrowsingResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.ServerTrustAuthResponse;
import com.pichillilorenzo.flutter_inappwebview_android.types.ServerTrustChallenge;
import com.pichillilorenzo.flutter_inappwebview_android.types.SslCertificateExt;
import com.pichillilorenzo.flutter_inappwebview_android.types.SyncBaseCallbackResultImpl;
import com.pichillilorenzo.flutter_inappwebview_android.types.URLRequest;
import com.pichillilorenzo.flutter_inappwebview_android.types.UserScript;
import com.pichillilorenzo.flutter_inappwebview_android.types.WebMessageCompatExt;
import com.pichillilorenzo.flutter_inappwebview_android.types.WebMessagePortCompatExt;
import com.pichillilorenzo.flutter_inappwebview_android.types.WebResourceErrorExt;
import com.pichillilorenzo.flutter_inappwebview_android.types.WebResourceRequestExt;
import com.pichillilorenzo.flutter_inappwebview_android.types.WebResourceResponseExt;
import com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebView;
import com.pichillilorenzo.flutter_inappwebview_android.webview.in_app_webview.InAppWebViewSettings;
import com.pichillilorenzo.flutter_inappwebview_android.webview.web_message.WebMessageChannel;
import com.pichillilorenzo.flutter_inappwebview_android.webview.web_message.WebMessageListener;
import defpackage.e;
import ed.q;
import ed.t;
import ed.u;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import tv.danmaku.ijk.media.player.IjkMediaMeta;
import tv.danmaku.ijk.media.player.IjkMediaPlayer;
import xyz.stream.download.config.InnerConstant;
import z3.b0;
import z3.c0;
import z3.p;
import z3.r;

/* JADX INFO: loaded from: classes.dex */
public class WebViewChannelDelegate extends ChannelDelegateImpl {
    static final String LOG_TAG = "WebViewChannelDelegate";

    @Nullable
    private InAppWebView webView;

    /* JADX INFO: renamed from: com.pichillilorenzo.flutter_inappwebview_android.webview.WebViewChannelDelegate$8, reason: invalid class name */
    public static /* synthetic */ class AnonymousClass8 {
        static final /* synthetic */ int[] $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods;

        static {
            int[] iArr = new int[WebViewChannelDelegateMethods.values().length];
            $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods = iArr;
            try {
                iArr[WebViewChannelDelegateMethods.getUrl.ordinal()] = 1;
            } catch (NoSuchFieldError unused) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getTitle.ordinal()] = 2;
            } catch (NoSuchFieldError unused2) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getProgress.ordinal()] = 3;
            } catch (NoSuchFieldError unused3) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.loadUrl.ordinal()] = 4;
            } catch (NoSuchFieldError unused4) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.postUrl.ordinal()] = 5;
            } catch (NoSuchFieldError unused5) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.loadData.ordinal()] = 6;
            } catch (NoSuchFieldError unused6) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.loadFile.ordinal()] = 7;
            } catch (NoSuchFieldError unused7) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.evaluateJavascript.ordinal()] = 8;
            } catch (NoSuchFieldError unused8) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.injectJavascriptFileFromUrl.ordinal()] = 9;
            } catch (NoSuchFieldError unused9) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.injectCSSCode.ordinal()] = 10;
            } catch (NoSuchFieldError unused10) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.injectCSSFileFromUrl.ordinal()] = 11;
            } catch (NoSuchFieldError unused11) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.reload.ordinal()] = 12;
            } catch (NoSuchFieldError unused12) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.goBack.ordinal()] = 13;
            } catch (NoSuchFieldError unused13) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.canGoBack.ordinal()] = 14;
            } catch (NoSuchFieldError unused14) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.goForward.ordinal()] = 15;
            } catch (NoSuchFieldError unused15) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.canGoForward.ordinal()] = 16;
            } catch (NoSuchFieldError unused16) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.goBackOrForward.ordinal()] = 17;
            } catch (NoSuchFieldError unused17) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.canGoBackOrForward.ordinal()] = 18;
            } catch (NoSuchFieldError unused18) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.stopLoading.ordinal()] = 19;
            } catch (NoSuchFieldError unused19) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.isLoading.ordinal()] = 20;
            } catch (NoSuchFieldError unused20) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.takeScreenshot.ordinal()] = 21;
            } catch (NoSuchFieldError unused21) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.setSettings.ordinal()] = 22;
            } catch (NoSuchFieldError unused22) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getSettings.ordinal()] = 23;
            } catch (NoSuchFieldError unused23) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.close.ordinal()] = 24;
            } catch (NoSuchFieldError unused24) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.show.ordinal()] = 25;
            } catch (NoSuchFieldError unused25) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.hide.ordinal()] = 26;
            } catch (NoSuchFieldError unused26) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.isHidden.ordinal()] = 27;
            } catch (NoSuchFieldError unused27) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getCopyBackForwardList.ordinal()] = 28;
            } catch (NoSuchFieldError unused28) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.startSafeBrowsing.ordinal()] = 29;
            } catch (NoSuchFieldError unused29) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.clearCache.ordinal()] = 30;
            } catch (NoSuchFieldError unused30) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.clearSslPreferences.ordinal()] = 31;
            } catch (NoSuchFieldError unused31) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.findAll.ordinal()] = 32;
            } catch (NoSuchFieldError unused32) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.findNext.ordinal()] = 33;
            } catch (NoSuchFieldError unused33) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.clearMatches.ordinal()] = 34;
            } catch (NoSuchFieldError unused34) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.scrollTo.ordinal()] = 35;
            } catch (NoSuchFieldError unused35) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.scrollBy.ordinal()] = 36;
            } catch (NoSuchFieldError unused36) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.pause.ordinal()] = 37;
            } catch (NoSuchFieldError unused37) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.resume.ordinal()] = 38;
            } catch (NoSuchFieldError unused38) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.pauseTimers.ordinal()] = 39;
            } catch (NoSuchFieldError unused39) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.resumeTimers.ordinal()] = 40;
            } catch (NoSuchFieldError unused40) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.printCurrentPage.ordinal()] = 41;
            } catch (NoSuchFieldError unused41) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getContentHeight.ordinal()] = 42;
            } catch (NoSuchFieldError unused42) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getContentWidth.ordinal()] = 43;
            } catch (NoSuchFieldError unused43) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.zoomBy.ordinal()] = 44;
            } catch (NoSuchFieldError unused44) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getOriginalUrl.ordinal()] = 45;
            } catch (NoSuchFieldError unused45) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getZoomScale.ordinal()] = 46;
            } catch (NoSuchFieldError unused46) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getSelectedText.ordinal()] = 47;
            } catch (NoSuchFieldError unused47) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getHitTestResult.ordinal()] = 48;
            } catch (NoSuchFieldError unused48) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.pageDown.ordinal()] = 49;
            } catch (NoSuchFieldError unused49) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.pageUp.ordinal()] = 50;
            } catch (NoSuchFieldError unused50) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.saveWebArchive.ordinal()] = 51;
            } catch (NoSuchFieldError unused51) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.zoomIn.ordinal()] = 52;
            } catch (NoSuchFieldError unused52) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.zoomOut.ordinal()] = 53;
            } catch (NoSuchFieldError unused53) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.clearFocus.ordinal()] = 54;
            } catch (NoSuchFieldError unused54) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.setContextMenu.ordinal()] = 55;
            } catch (NoSuchFieldError unused55) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.requestFocusNodeHref.ordinal()] = 56;
            } catch (NoSuchFieldError unused56) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.requestImageRef.ordinal()] = 57;
            } catch (NoSuchFieldError unused57) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getScrollX.ordinal()] = 58;
            } catch (NoSuchFieldError unused58) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getScrollY.ordinal()] = 59;
            } catch (NoSuchFieldError unused59) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.getCertificate.ordinal()] = 60;
            } catch (NoSuchFieldError unused60) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.clearHistory.ordinal()] = 61;
            } catch (NoSuchFieldError unused61) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.addUserScript.ordinal()] = 62;
            } catch (NoSuchFieldError unused62) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.removeUserScript.ordinal()] = 63;
            } catch (NoSuchFieldError unused63) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.removeUserScriptsByGroupName.ordinal()] = 64;
            } catch (NoSuchFieldError unused64) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.removeAllUserScripts.ordinal()] = 65;
            } catch (NoSuchFieldError unused65) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.callAsyncJavaScript.ordinal()] = 66;
            } catch (NoSuchFieldError unused66) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.isSecureContext.ordinal()] = 67;
            } catch (NoSuchFieldError unused67) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.createWebMessageChannel.ordinal()] = 68;
            } catch (NoSuchFieldError unused68) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.postWebMessage.ordinal()] = 69;
            } catch (NoSuchFieldError unused69) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.addWebMessageListener.ordinal()] = 70;
            } catch (NoSuchFieldError unused70) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.canScrollVertically.ordinal()] = 71;
            } catch (NoSuchFieldError unused71) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.canScrollHorizontally.ordinal()] = 72;
            } catch (NoSuchFieldError unused72) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.isInFullscreen.ordinal()] = 73;
            } catch (NoSuchFieldError unused73) {
            }
            try {
                $SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.clearFormData.ordinal()] = 74;
            } catch (NoSuchFieldError unused74) {
            }
        }
    }

    public static class CallJsHandlerCallback extends BaseCallbackResultImpl<Object> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public Object decodeResult(@Nullable Object obj) {
            return obj;
        }
    }

    public static class CreateWindowCallback extends BaseCallbackResultImpl<Boolean> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public Boolean decodeResult(@Nullable Object obj) {
            return Boolean.valueOf((obj instanceof Boolean) && ((Boolean) obj).booleanValue());
        }
    }

    public static class FormResubmissionCallback extends BaseCallbackResultImpl<Integer> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public Integer decodeResult(@Nullable Object obj) {
            if (obj instanceof Integer) {
                return (Integer) obj;
            }
            return null;
        }
    }

    public static class GeolocationPermissionsShowPromptCallback extends BaseCallbackResultImpl<GeolocationPermissionShowPromptResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public GeolocationPermissionShowPromptResponse decodeResult(@Nullable Object obj) {
            return GeolocationPermissionShowPromptResponse.fromMap((Map) obj);
        }
    }

    public static class JsAlertCallback extends BaseCallbackResultImpl<JsAlertResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public JsAlertResponse decodeResult(@Nullable Object obj) {
            return JsAlertResponse.fromMap((Map) obj);
        }
    }

    public static class JsBeforeUnloadCallback extends BaseCallbackResultImpl<JsBeforeUnloadResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public JsBeforeUnloadResponse decodeResult(@Nullable Object obj) {
            return JsBeforeUnloadResponse.fromMap((Map) obj);
        }
    }

    public static class JsConfirmCallback extends BaseCallbackResultImpl<JsConfirmResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public JsConfirmResponse decodeResult(@Nullable Object obj) {
            return JsConfirmResponse.fromMap((Map) obj);
        }
    }

    public static class JsPromptCallback extends BaseCallbackResultImpl<JsPromptResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public JsPromptResponse decodeResult(@Nullable Object obj) {
            return JsPromptResponse.fromMap((Map) obj);
        }
    }

    public static class LoadResourceWithCustomSchemeCallback extends BaseCallbackResultImpl<CustomSchemeResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public CustomSchemeResponse decodeResult(@Nullable Object obj) {
            return CustomSchemeResponse.fromMap((Map) obj);
        }
    }

    public static class PermissionRequestCallback extends BaseCallbackResultImpl<PermissionResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public PermissionResponse decodeResult(@Nullable Object obj) {
            return PermissionResponse.fromMap((Map) obj);
        }
    }

    public static class PrintRequestCallback extends BaseCallbackResultImpl<Boolean> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public Boolean decodeResult(@Nullable Object obj) {
            return Boolean.valueOf((obj instanceof Boolean) && ((Boolean) obj).booleanValue());
        }
    }

    public static class ReceivedClientCertRequestCallback extends BaseCallbackResultImpl<ClientCertResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public ClientCertResponse decodeResult(@Nullable Object obj) {
            return ClientCertResponse.fromMap((Map) obj);
        }
    }

    public static class ReceivedHttpAuthRequestCallback extends BaseCallbackResultImpl<HttpAuthResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public HttpAuthResponse decodeResult(@Nullable Object obj) {
            return HttpAuthResponse.fromMap((Map) obj);
        }
    }

    public static class ReceivedServerTrustAuthRequestCallback extends BaseCallbackResultImpl<ServerTrustAuthResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public ServerTrustAuthResponse decodeResult(@Nullable Object obj) {
            return ServerTrustAuthResponse.fromMap((Map) obj);
        }
    }

    public static class RenderProcessResponsiveCallback extends BaseCallbackResultImpl<Integer> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public Integer decodeResult(@Nullable Object obj) {
            if (obj instanceof Integer) {
                return (Integer) obj;
            }
            return null;
        }
    }

    public static class RenderProcessUnresponsiveCallback extends BaseCallbackResultImpl<Integer> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public Integer decodeResult(@Nullable Object obj) {
            if (obj instanceof Integer) {
                return (Integer) obj;
            }
            return null;
        }
    }

    public static class SafeBrowsingHitCallback extends BaseCallbackResultImpl<SafeBrowsingResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public SafeBrowsingResponse decodeResult(@Nullable Object obj) {
            return SafeBrowsingResponse.fromMap((Map) obj);
        }
    }

    public static class ShouldInterceptRequestCallback extends BaseCallbackResultImpl<WebResourceResponseExt> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public WebResourceResponseExt decodeResult(@Nullable Object obj) {
            return WebResourceResponseExt.fromMap((Map) obj);
        }
    }

    public static class ShouldOverrideUrlLoadingCallback extends BaseCallbackResultImpl<NavigationActionPolicy> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public NavigationActionPolicy decodeResult(@Nullable Object obj) {
            return NavigationActionPolicy.fromValue(Integer.valueOf(obj instanceof Integer ? ((Integer) obj).intValue() : NavigationActionPolicy.CANCEL.rawValue()).intValue());
        }
    }

    public static class SyncLoadResourceWithCustomSchemeCallback extends SyncBaseCallbackResultImpl<CustomSchemeResponse> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public CustomSchemeResponse decodeResult(@Nullable Object obj) {
            return new LoadResourceWithCustomSchemeCallback().decodeResult(obj);
        }
    }

    public static class SyncShouldInterceptRequestCallback extends SyncBaseCallbackResultImpl<WebResourceResponseExt> {
        @Override // com.pichillilorenzo.flutter_inappwebview_android.types.BaseCallbackResultImpl, com.pichillilorenzo.flutter_inappwebview_android.types.ICallbackResult
        @Nullable
        public WebResourceResponseExt decodeResult(@Nullable Object obj) {
            return new ShouldInterceptRequestCallback().decodeResult(obj);
        }
    }

    public WebViewChannelDelegate(@NonNull InAppWebView inAppWebView, @NonNull u uVar) {
        super(uVar);
        this.webView = inAppWebView;
    }

    @Override // com.pichillilorenzo.flutter_inappwebview_android.types.ChannelDelegateImpl, com.pichillilorenzo.flutter_inappwebview_android.types.Disposable
    public void dispose() {
        super.dispose();
        this.webView = null;
    }

    public void onCallJsHandler(String str, String str2, @NonNull CallJsHandlerCallback callJsHandlerCallback) {
        u channel = getChannel();
        if (channel == null) {
            callJsHandlerCallback.defaultBehaviour(null);
        } else {
            channel.invokeMethod("onCallJsHandler", e.u("handlerName", str, "args", str2), callJsHandlerCallback);
        }
    }

    public void onCloseWindow() {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        channel.invokeMethod("onCloseWindow", new HashMap());
    }

    public void onConsoleMessage(String str, int i10) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap mapO = u1.o(PglCryptUtils.KEY_MESSAGE, str);
        mapO.put("messageLevel", Integer.valueOf(i10));
        channel.invokeMethod("onConsoleMessage", mapO);
    }

    public void onContextMenuActionItemClicked(int i10, String str) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        u1.t(i10, map, InnerConstant.Db.f36069id, i10, "androidId");
        map.put("iosId", null);
        map.put(IjkMediaMeta.IJKM_KEY_TITLE, str);
        channel.invokeMethod("onContextMenuActionItemClicked", map);
    }

    public void onCreateContextMenu(HitTestResult hitTestResult) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        channel.invokeMethod("onCreateContextMenu", hitTestResult.toMap());
    }

    public void onCreateWindow(CreateWindowAction createWindowAction, @NonNull CreateWindowCallback createWindowCallback) {
        u channel = getChannel();
        if (channel == null) {
            createWindowCallback.defaultBehaviour(null);
        } else {
            channel.invokeMethod("onCreateWindow", createWindowAction.toMap(), createWindowCallback);
        }
    }

    public void onDownloadStartRequest(DownloadStartRequest downloadStartRequest) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        channel.invokeMethod("onDownloadStartRequest", downloadStartRequest.toMap());
    }

    public void onEnterFullscreen() {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        channel.invokeMethod("onEnterFullscreen", new HashMap());
    }

    public void onExitFullscreen() {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        channel.invokeMethod("onExitFullscreen", new HashMap());
    }

    @Deprecated
    public void onFindResultReceived(int i10, int i11, boolean z10) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        u1.t(i10, map, "activeMatchOrdinal", i11, "numberOfMatches");
        map.put("isDoneCounting", Boolean.valueOf(z10));
        channel.invokeMethod("onFindResultReceived", map);
    }

    public void onFormResubmission(String str, @NonNull FormResubmissionCallback formResubmissionCallback) {
        u channel = getChannel();
        if (channel == null) {
            formResubmissionCallback.defaultBehaviour(null);
            return;
        }
        HashMap map = new HashMap();
        map.put(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str);
        channel.invokeMethod("onFormResubmission", map, formResubmissionCallback);
    }

    public void onGeolocationPermissionsHidePrompt() {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        channel.invokeMethod("onGeolocationPermissionsHidePrompt", new HashMap());
    }

    public void onGeolocationPermissionsShowPrompt(String str, @NonNull GeolocationPermissionsShowPromptCallback geolocationPermissionsShowPromptCallback) {
        u channel = getChannel();
        if (channel == null) {
            geolocationPermissionsShowPromptCallback.defaultBehaviour(null);
            return;
        }
        HashMap map = new HashMap();
        map.put("origin", str);
        channel.invokeMethod("onGeolocationPermissionsShowPrompt", map, geolocationPermissionsShowPromptCallback);
    }

    public void onHideContextMenu() {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        channel.invokeMethod("onHideContextMenu", new HashMap());
    }

    public void onJsAlert(String str, String str2, Boolean bool, @NonNull JsAlertCallback jsAlertCallback) {
        u channel = getChannel();
        if (channel == null) {
            jsAlertCallback.defaultBehaviour(null);
            return;
        }
        HashMap mapU = e.u(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str, PglCryptUtils.KEY_MESSAGE, str2);
        mapU.put("isMainFrame", bool);
        channel.invokeMethod("onJsAlert", mapU, jsAlertCallback);
    }

    public void onJsBeforeUnload(String str, String str2, @NonNull JsBeforeUnloadCallback jsBeforeUnloadCallback) {
        u channel = getChannel();
        if (channel == null) {
            jsBeforeUnloadCallback.defaultBehaviour(null);
        } else {
            channel.invokeMethod("onJsBeforeUnload", e.u(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str, PglCryptUtils.KEY_MESSAGE, str2), jsBeforeUnloadCallback);
        }
    }

    public void onJsConfirm(String str, String str2, Boolean bool, @NonNull JsConfirmCallback jsConfirmCallback) {
        u channel = getChannel();
        if (channel == null) {
            jsConfirmCallback.defaultBehaviour(null);
            return;
        }
        HashMap mapU = e.u(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str, PglCryptUtils.KEY_MESSAGE, str2);
        mapU.put("isMainFrame", bool);
        channel.invokeMethod("onJsConfirm", mapU, jsConfirmCallback);
    }

    public void onJsPrompt(String str, String str2, String str3, Boolean bool, @NonNull JsPromptCallback jsPromptCallback) {
        u channel = getChannel();
        if (channel == null) {
            jsPromptCallback.defaultBehaviour(null);
            return;
        }
        HashMap mapU = e.u(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str, PglCryptUtils.KEY_MESSAGE, str2);
        mapU.put("defaultValue", str3);
        mapU.put("isMainFrame", bool);
        channel.invokeMethod("onJsPrompt", mapU, jsPromptCallback);
    }

    public void onLoadResourceWithCustomScheme(WebResourceRequestExt webResourceRequestExt, @NonNull LoadResourceWithCustomSchemeCallback loadResourceWithCustomSchemeCallback) {
        u channel = getChannel();
        if (channel == null) {
            loadResourceWithCustomSchemeCallback.defaultBehaviour(null);
            return;
        }
        HashMap map = new HashMap();
        map.put("request", webResourceRequestExt.toMap());
        channel.invokeMethod("onLoadResourceWithCustomScheme", map, loadResourceWithCustomSchemeCallback);
    }

    public void onLoadStart(String str) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str);
        channel.invokeMethod("onLoadStart", map);
    }

    public void onLoadStop(String str) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str);
        channel.invokeMethod("onLoadStop", map);
    }

    public void onLongPressHitTestResult(HitTestResult hitTestResult) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        channel.invokeMethod("onLongPressHitTestResult", hitTestResult.toMap());
    }

    @Override // com.pichillilorenzo.flutter_inappwebview_android.types.ChannelDelegateImpl, com.pichillilorenzo.flutter_inappwebview_android.types.IChannelDelegate, ed.s
    public void onMethodCall(@NonNull q qVar, @NonNull final t tVar) {
        try {
            switch (AnonymousClass8.$SwitchMap$com$pichillilorenzo$flutter_inappwebview_android$webview$WebViewChannelDelegateMethods[WebViewChannelDelegateMethods.valueOf(qVar.f25842a).ordinal()]) {
                case 1:
                    InAppWebView inAppWebView = this.webView;
                    tVar.success(inAppWebView != null ? inAppWebView.getUrl() : null);
                    break;
                case 2:
                    InAppWebView inAppWebView2 = this.webView;
                    tVar.success(inAppWebView2 != null ? inAppWebView2.getTitle() : null);
                    break;
                case 3:
                    InAppWebView inAppWebView3 = this.webView;
                    tVar.success(inAppWebView3 != null ? Integer.valueOf(inAppWebView3.getProgress()) : null);
                    break;
                case 4:
                    if (this.webView != null) {
                        this.webView.loadUrl(URLRequest.fromMap((Map) qVar.argument("urlRequest")));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 5:
                    if (this.webView != null) {
                        this.webView.postUrl((String) qVar.argument(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL), (byte[]) qVar.argument("postData"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 6:
                    if (this.webView != null) {
                        this.webView.loadDataWithBaseURL((String) qVar.argument("baseUrl"), (String) qVar.argument("data"), (String) qVar.argument("mimeType"), (String) qVar.argument("encoding"), (String) qVar.argument("historyUrl"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 7:
                    if (this.webView != null) {
                        try {
                            this.webView.loadFile((String) qVar.argument("assetFilePath"));
                        } catch (IOException e10) {
                            e10.printStackTrace();
                            tVar.error(LOG_TAG, e10.getMessage(), null);
                        }
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 8:
                    if (this.webView != null) {
                        this.webView.evaluateJavascript((String) qVar.argument("source"), ContentWorld.fromMap((Map) qVar.argument("contentWorld")), new ValueCallback<String>() { // from class: com.pichillilorenzo.flutter_inappwebview_android.webview.WebViewChannelDelegate.1
                            @Override // android.webkit.ValueCallback
                            public void onReceiveValue(String str) {
                                tVar.success(str);
                            }
                        });
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 9:
                    if (this.webView != null) {
                        this.webView.injectJavascriptFileFromUrl((String) qVar.argument("urlFile"), (Map) qVar.argument("scriptHtmlTagAttributes"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 10:
                    if (this.webView != null) {
                        this.webView.injectCSSCode((String) qVar.argument("source"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 11:
                    if (this.webView != null) {
                        this.webView.injectCSSFileFromUrl((String) qVar.argument("urlFile"), (Map) qVar.argument("cssLinkHtmlTagAttributes"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 12:
                    InAppWebView inAppWebView4 = this.webView;
                    if (inAppWebView4 != null) {
                        inAppWebView4.reload();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 13:
                    InAppWebView inAppWebView5 = this.webView;
                    if (inAppWebView5 != null) {
                        inAppWebView5.goBack();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 14:
                    InAppWebView inAppWebView6 = this.webView;
                    tVar.success(Boolean.valueOf(inAppWebView6 != null && inAppWebView6.canGoBack()));
                    break;
                case 15:
                    InAppWebView inAppWebView7 = this.webView;
                    if (inAppWebView7 != null) {
                        inAppWebView7.goForward();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 16:
                    InAppWebView inAppWebView8 = this.webView;
                    tVar.success(Boolean.valueOf(inAppWebView8 != null && inAppWebView8.canGoForward()));
                    break;
                case 17:
                    InAppWebView inAppWebView9 = this.webView;
                    if (inAppWebView9 != null) {
                        inAppWebView9.goBackOrForward(((Integer) qVar.argument("steps")).intValue());
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 18:
                    InAppWebView inAppWebView10 = this.webView;
                    tVar.success(Boolean.valueOf(inAppWebView10 != null && inAppWebView10.canGoBackOrForward(((Integer) qVar.argument("steps")).intValue())));
                    break;
                case 19:
                    InAppWebView inAppWebView11 = this.webView;
                    if (inAppWebView11 != null) {
                        inAppWebView11.stopLoading();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 20:
                    InAppWebView inAppWebView12 = this.webView;
                    tVar.success(Boolean.valueOf(inAppWebView12 != null && inAppWebView12.isLoading()));
                    break;
                case 21:
                    if (this.webView != null) {
                        this.webView.takeScreenshot((Map) qVar.argument("screenshotConfiguration"), tVar);
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 22:
                    InAppWebView inAppWebView13 = this.webView;
                    if (inAppWebView13 != null && (inAppWebView13.getInAppBrowserDelegate() instanceof InAppBrowserActivity)) {
                        InAppBrowserActivity inAppBrowserActivity = (InAppBrowserActivity) this.webView.getInAppBrowserDelegate();
                        InAppBrowserSettings inAppBrowserSettings = new InAppBrowserSettings();
                        HashMap<String, Object> map = (HashMap) qVar.argument("settings");
                        inAppBrowserSettings.parse2((Map<String, Object>) map);
                        inAppBrowserActivity.setSettings(inAppBrowserSettings, map);
                    } else if (this.webView != null) {
                        InAppWebViewSettings inAppWebViewSettings = new InAppWebViewSettings();
                        HashMap<String, Object> map2 = (HashMap) qVar.argument("settings");
                        inAppWebViewSettings.parse2((Map<String, Object>) map2);
                        this.webView.setSettings(inAppWebViewSettings, map2);
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 23:
                    InAppWebView inAppWebView14 = this.webView;
                    if (inAppWebView14 == null || !(inAppWebView14.getInAppBrowserDelegate() instanceof InAppBrowserActivity)) {
                        InAppWebView inAppWebView15 = this.webView;
                        tVar.success(inAppWebView15 != null ? inAppWebView15.getCustomSettings() : null);
                    } else {
                        tVar.success(((InAppBrowserActivity) this.webView.getInAppBrowserDelegate()).getCustomSettings());
                    }
                    break;
                case 24:
                    InAppWebView inAppWebView16 = this.webView;
                    if (inAppWebView16 == null || !(inAppWebView16.getInAppBrowserDelegate() instanceof InAppBrowserActivity)) {
                        tVar.notImplemented();
                    } else {
                        ((InAppBrowserActivity) this.webView.getInAppBrowserDelegate()).close(tVar);
                    }
                    break;
                case 25:
                    InAppWebView inAppWebView17 = this.webView;
                    if (inAppWebView17 == null || !(inAppWebView17.getInAppBrowserDelegate() instanceof InAppBrowserActivity)) {
                        tVar.notImplemented();
                    } else {
                        ((InAppBrowserActivity) this.webView.getInAppBrowserDelegate()).show();
                        tVar.success(Boolean.TRUE);
                    }
                    break;
                case 26:
                    InAppWebView inAppWebView18 = this.webView;
                    if (inAppWebView18 == null || !(inAppWebView18.getInAppBrowserDelegate() instanceof InAppBrowserActivity)) {
                        tVar.notImplemented();
                    } else {
                        ((InAppBrowserActivity) this.webView.getInAppBrowserDelegate()).hide();
                        tVar.success(Boolean.TRUE);
                    }
                    break;
                case 27:
                    InAppWebView inAppWebView19 = this.webView;
                    if (inAppWebView19 == null || !(inAppWebView19.getInAppBrowserDelegate() instanceof InAppBrowserActivity)) {
                        tVar.notImplemented();
                    } else {
                        tVar.success(Boolean.valueOf(((InAppBrowserActivity) this.webView.getInAppBrowserDelegate()).isHidden));
                    }
                    break;
                case 28:
                    InAppWebView inAppWebView20 = this.webView;
                    tVar.success(inAppWebView20 != null ? inAppWebView20.getCopyBackForwardList() : null);
                    break;
                case 29:
                    if (this.webView == null || !c0.a("START_SAFE_BROWSING")) {
                        tVar.success(Boolean.FALSE);
                    } else {
                        b0.startSafeBrowsing(this.webView.getContext(), new ValueCallback<Boolean>() { // from class: com.pichillilorenzo.flutter_inappwebview_android.webview.WebViewChannelDelegate.2
                            @Override // android.webkit.ValueCallback
                            public void onReceiveValue(Boolean bool) {
                                tVar.success(bool);
                            }
                        });
                    }
                    break;
                case 30:
                    InAppWebView inAppWebView21 = this.webView;
                    if (inAppWebView21 != null) {
                        inAppWebView21.clearAllCache();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 31:
                    InAppWebView inAppWebView22 = this.webView;
                    if (inAppWebView22 != null) {
                        inAppWebView22.clearSslPreferences();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 32:
                    if (this.webView != null) {
                        this.webView.findAllAsync((String) qVar.argument("find"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 33:
                    if (this.webView != null) {
                        this.webView.findNext(((Boolean) qVar.argument("forward")).booleanValue());
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 34:
                    InAppWebView inAppWebView23 = this.webView;
                    if (inAppWebView23 != null) {
                        inAppWebView23.clearMatches();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 35:
                    if (this.webView != null) {
                        this.webView.scrollTo((Integer) qVar.argument("x"), (Integer) qVar.argument("y"), (Boolean) qVar.argument("animated"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 36:
                    if (this.webView != null) {
                        this.webView.scrollBy((Integer) qVar.argument("x"), (Integer) qVar.argument("y"), (Boolean) qVar.argument("animated"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 37:
                    InAppWebView inAppWebView24 = this.webView;
                    if (inAppWebView24 != null) {
                        inAppWebView24.onPause();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 38:
                    InAppWebView inAppWebView25 = this.webView;
                    if (inAppWebView25 != null) {
                        inAppWebView25.onResume();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 39:
                    InAppWebView inAppWebView26 = this.webView;
                    if (inAppWebView26 != null) {
                        inAppWebView26.pauseTimers();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 40:
                    InAppWebView inAppWebView27 = this.webView;
                    if (inAppWebView27 != null) {
                        inAppWebView27.resumeTimers();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 41:
                    if (this.webView != null) {
                        PrintJobSettings printJobSettings = new PrintJobSettings();
                        Map<String, Object> map3 = (Map) qVar.argument("settings");
                        if (map3 != null) {
                            printJobSettings.parse2(map3);
                        }
                        tVar.success(this.webView.printCurrentPage(printJobSettings));
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 42:
                    InAppWebView inAppWebView28 = this.webView;
                    if (inAppWebView28 instanceof InAppWebView) {
                        tVar.success(Integer.valueOf(inAppWebView28.getContentHeight()));
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 43:
                    InAppWebView inAppWebView29 = this.webView;
                    if (inAppWebView29 instanceof InAppWebView) {
                        inAppWebView29.getContentWidth(new ValueCallback<Integer>() { // from class: com.pichillilorenzo.flutter_inappwebview_android.webview.WebViewChannelDelegate.3
                            @Override // android.webkit.ValueCallback
                            public void onReceiveValue(@Nullable Integer num) {
                                tVar.success(num);
                            }
                        });
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 44:
                    if (this.webView != null) {
                        this.webView.zoomBy((float) ((Double) qVar.argument("zoomFactor")).doubleValue());
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 45:
                    InAppWebView inAppWebView30 = this.webView;
                    tVar.success(inAppWebView30 != null ? inAppWebView30.getOriginalUrl() : null);
                    break;
                case 46:
                    InAppWebView inAppWebView31 = this.webView;
                    if (inAppWebView31 instanceof InAppWebView) {
                        tVar.success(Float.valueOf(inAppWebView31.getZoomScale()));
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 47:
                    InAppWebView inAppWebView32 = this.webView;
                    if (inAppWebView32 instanceof InAppWebView) {
                        inAppWebView32.getSelectedText(new ValueCallback<String>() { // from class: com.pichillilorenzo.flutter_inappwebview_android.webview.WebViewChannelDelegate.4
                            @Override // android.webkit.ValueCallback
                            public void onReceiveValue(String str) {
                                tVar.success(str);
                            }
                        });
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 48:
                    InAppWebView inAppWebView33 = this.webView;
                    if (inAppWebView33 instanceof InAppWebView) {
                        tVar.success(HitTestResult.fromWebViewHitTestResult(inAppWebView33.getHitTestResult()).toMap());
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 49:
                    if (this.webView != null) {
                        tVar.success(Boolean.valueOf(this.webView.pageDown(((Boolean) qVar.argument("bottom")).booleanValue())));
                    } else {
                        tVar.success(Boolean.FALSE);
                    }
                    break;
                case 50:
                    if (this.webView != null) {
                        tVar.success(Boolean.valueOf(this.webView.pageUp(((Boolean) qVar.argument("top")).booleanValue())));
                    } else {
                        tVar.success(Boolean.FALSE);
                    }
                    break;
                case 51:
                    if (this.webView != null) {
                        this.webView.saveWebArchive((String) qVar.argument(InnerConstant.Db.filePath), ((Boolean) qVar.argument("autoname")).booleanValue(), new ValueCallback<String>() { // from class: com.pichillilorenzo.flutter_inappwebview_android.webview.WebViewChannelDelegate.5
                            @Override // android.webkit.ValueCallback
                            public void onReceiveValue(String str) {
                                tVar.success(str);
                            }
                        });
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 52:
                    InAppWebView inAppWebView34 = this.webView;
                    if (inAppWebView34 != null) {
                        tVar.success(Boolean.valueOf(inAppWebView34.zoomIn()));
                    } else {
                        tVar.success(Boolean.FALSE);
                    }
                    break;
                case 53:
                    InAppWebView inAppWebView35 = this.webView;
                    if (inAppWebView35 != null) {
                        tVar.success(Boolean.valueOf(inAppWebView35.zoomOut()));
                    } else {
                        tVar.success(Boolean.FALSE);
                    }
                    break;
                case 54:
                    InAppWebView inAppWebView36 = this.webView;
                    if (inAppWebView36 != null) {
                        inAppWebView36.clearFocus();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 55:
                    if (this.webView != null) {
                        this.webView.setContextMenu((Map) qVar.argument("contextMenu"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 56:
                    InAppWebView inAppWebView37 = this.webView;
                    if (inAppWebView37 != null) {
                        tVar.success(inAppWebView37.requestFocusNodeHref());
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 57:
                    InAppWebView inAppWebView38 = this.webView;
                    if (inAppWebView38 != null) {
                        tVar.success(inAppWebView38.requestImageRef());
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 58:
                    InAppWebView inAppWebView39 = this.webView;
                    if (inAppWebView39 != null) {
                        tVar.success(Integer.valueOf(inAppWebView39.getScrollX()));
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 59:
                    InAppWebView inAppWebView40 = this.webView;
                    if (inAppWebView40 != null) {
                        tVar.success(Integer.valueOf(inAppWebView40.getScrollY()));
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 60:
                    InAppWebView inAppWebView41 = this.webView;
                    if (inAppWebView41 != null) {
                        tVar.success(SslCertificateExt.toMap(inAppWebView41.getCertificate()));
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 61:
                    InAppWebView inAppWebView42 = this.webView;
                    if (inAppWebView42 != null) {
                        inAppWebView42.clearHistory();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 62:
                    InAppWebView inAppWebView43 = this.webView;
                    if (inAppWebView43 == null || inAppWebView43.getUserContentController() == null) {
                        tVar.success(Boolean.FALSE);
                    } else {
                        tVar.success(Boolean.valueOf(this.webView.getUserContentController().addUserOnlyScript(UserScript.fromMap((Map) qVar.argument("userScript")))));
                    }
                    break;
                case 63:
                    InAppWebView inAppWebView44 = this.webView;
                    if (inAppWebView44 == null || inAppWebView44.getUserContentController() == null) {
                        tVar.success(Boolean.FALSE);
                    } else {
                        tVar.success(Boolean.valueOf(this.webView.getUserContentController().removeUserOnlyScriptAt(((Integer) qVar.argument("index")).intValue(), UserScript.fromMap((Map) qVar.argument("userScript")).getInjectionTime())));
                    }
                    break;
                case 64:
                    InAppWebView inAppWebView45 = this.webView;
                    if (inAppWebView45 != null && inAppWebView45.getUserContentController() != null) {
                        this.webView.getUserContentController().removeUserOnlyScriptsByGroupName((String) qVar.argument("groupName"));
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 65:
                    InAppWebView inAppWebView46 = this.webView;
                    if (inAppWebView46 != null && inAppWebView46.getUserContentController() != null) {
                        this.webView.getUserContentController().removeAllUserOnlyScripts();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
                case 66:
                    if (this.webView != null) {
                        this.webView.callAsyncJavaScript((String) qVar.argument("functionBody"), (Map) qVar.argument("arguments"), ContentWorld.fromMap((Map) qVar.argument("contentWorld")), new ValueCallback<String>() { // from class: com.pichillilorenzo.flutter_inappwebview_android.webview.WebViewChannelDelegate.6
                            @Override // android.webkit.ValueCallback
                            public void onReceiveValue(String str) {
                                tVar.success(str);
                            }
                        });
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 67:
                    InAppWebView inAppWebView47 = this.webView;
                    if (inAppWebView47 != null) {
                        inAppWebView47.isSecureContext(new ValueCallback<Boolean>() { // from class: com.pichillilorenzo.flutter_inappwebview_android.webview.WebViewChannelDelegate.7
                            @Override // android.webkit.ValueCallback
                            public void onReceiveValue(Boolean bool) {
                                tVar.success(bool);
                            }
                        });
                    } else {
                        tVar.success(Boolean.FALSE);
                    }
                    break;
                case 68:
                    if (this.webView == null) {
                        tVar.success(null);
                    } else if (c0.a("CREATE_WEB_MESSAGE_CHANNEL")) {
                        tVar.success(this.webView.createCompatWebMessageChannel().toMap());
                    } else {
                        tVar.success(null);
                    }
                    break;
                case 69:
                    if (this.webView == null || !c0.a("POST_WEB_MESSAGE")) {
                        tVar.success(Boolean.TRUE);
                    } else {
                        WebMessageCompatExt webMessageCompatExtFromMap = WebMessageCompatExt.fromMap((Map) qVar.argument(PglCryptUtils.KEY_MESSAGE));
                        String str = (String) qVar.argument("targetOrigin");
                        ArrayList arrayList = new ArrayList();
                        List<WebMessagePortCompatExt> ports = webMessageCompatExtFromMap.getPorts();
                        if (ports != null) {
                            for (WebMessagePortCompatExt webMessagePortCompatExt : ports) {
                                WebMessageChannel webMessageChannel = this.webView.getWebMessageChannels().get(webMessagePortCompatExt.getWebMessageChannelId());
                                if (webMessageChannel != null && (this.webView instanceof InAppWebView)) {
                                    arrayList.add(webMessageChannel.compatPorts.get(webMessagePortCompatExt.getIndex()));
                                }
                            }
                        }
                        Object data = webMessageCompatExtFromMap.getData();
                        if (this.webView instanceof InAppWebView) {
                            try {
                                if (c0.a("WEB_MESSAGE_ARRAY_BUFFER") && data != null && webMessageCompatExtFromMap.getType() == 1) {
                                    b0.f(this.webView, new p((byte[]) data, (r[]) arrayList.toArray(new r[0])), Uri.parse(str));
                                } else {
                                    b0.f(this.webView, new p(data != null ? data.toString() : null, (r[]) arrayList.toArray(new r[0])), Uri.parse(str));
                                }
                                tVar.success(Boolean.TRUE);
                            } catch (Exception e11) {
                                tVar.error(LOG_TAG, e11.getMessage(), null);
                                return;
                            }
                        }
                    }
                    break;
                case 70:
                    if (this.webView == null) {
                        tVar.success(Boolean.TRUE);
                    } else {
                        Map map4 = (Map) qVar.argument("webMessageListener");
                        InAppWebView inAppWebView48 = this.webView;
                        WebMessageListener webMessageListenerFromMap = WebMessageListener.fromMap(inAppWebView48, inAppWebView48.getPlugin().messenger, map4);
                        if ((this.webView instanceof InAppWebView) && c0.a("WEB_MESSAGE_LISTENER")) {
                            try {
                                this.webView.addWebMessageListener(webMessageListenerFromMap);
                                tVar.success(Boolean.TRUE);
                            } catch (Exception e12) {
                                tVar.error(LOG_TAG, e12.getMessage(), null);
                                return;
                            }
                        } else {
                            tVar.success(Boolean.TRUE);
                        }
                    }
                    break;
                case 71:
                    InAppWebView inAppWebView49 = this.webView;
                    if (inAppWebView49 != null) {
                        tVar.success(Boolean.valueOf(inAppWebView49.canScrollVertically()));
                    } else {
                        tVar.success(Boolean.FALSE);
                    }
                    break;
                case 72:
                    InAppWebView inAppWebView50 = this.webView;
                    if (inAppWebView50 != null) {
                        tVar.success(Boolean.valueOf(inAppWebView50.canScrollHorizontally()));
                    } else {
                        tVar.success(Boolean.FALSE);
                    }
                    break;
                case 73:
                    InAppWebView inAppWebView51 = this.webView;
                    if (inAppWebView51 != null) {
                        tVar.success(Boolean.valueOf(inAppWebView51.isInFullscreen()));
                    } else {
                        tVar.success(Boolean.FALSE);
                    }
                    break;
                case 74:
                    InAppWebView inAppWebView52 = this.webView;
                    if (inAppWebView52 != null) {
                        inAppWebView52.clearFormData();
                    }
                    tVar.success(Boolean.TRUE);
                    break;
            }
        } catch (IllegalArgumentException unused) {
            tVar.notImplemented();
        }
    }

    public void onOverScrolled(int i10, int i11, boolean z10, boolean z11) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        u1.t(i10, map, "x", i11, "y");
        map.put("clampedX", Boolean.valueOf(z10));
        map.put("clampedY", Boolean.valueOf(z11));
        channel.invokeMethod("onOverScrolled", map);
    }

    public void onPageCommitVisible(String str) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str);
        channel.invokeMethod("onPageCommitVisible", map);
    }

    public void onPermissionRequest(String str, List<String> list, Object obj, @NonNull PermissionRequestCallback permissionRequestCallback) {
        u channel = getChannel();
        if (channel == null) {
            permissionRequestCallback.defaultBehaviour(null);
            return;
        }
        HashMap map = new HashMap();
        map.put("origin", str);
        map.put("resources", list);
        map.put("frame", obj);
        channel.invokeMethod("onPermissionRequest", map, permissionRequestCallback);
    }

    public void onPermissionRequestCanceled(String str, List<String> list) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put("origin", str);
        map.put("resources", list);
        channel.invokeMethod("onPermissionRequestCanceled", map);
    }

    public void onPrintRequest(String str, String str2, @NonNull PrintRequestCallback printRequestCallback) {
        u channel = getChannel();
        if (channel == null) {
            printRequestCallback.defaultBehaviour(null);
        } else {
            channel.invokeMethod("onPrintRequest", e.u(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str, "printJobId", str2), printRequestCallback);
        }
    }

    public void onProgressChanged(int i10) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put("progress", Integer.valueOf(i10));
        channel.invokeMethod("onProgressChanged", map);
    }

    public void onReceivedClientCertRequest(ClientCertChallenge clientCertChallenge, @NonNull ReceivedClientCertRequestCallback receivedClientCertRequestCallback) {
        u channel = getChannel();
        if (channel == null) {
            receivedClientCertRequestCallback.defaultBehaviour(null);
        } else {
            channel.invokeMethod("onReceivedClientCertRequest", clientCertChallenge.toMap(), receivedClientCertRequestCallback);
        }
    }

    public void onReceivedError(WebResourceRequestExt webResourceRequestExt, WebResourceErrorExt webResourceErrorExt) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put("request", webResourceRequestExt.toMap());
        map.put(IjkMediaPlayer.OnNativeInvokeListener.ARG_ERROR, webResourceErrorExt.toMap());
        channel.invokeMethod("onReceivedError", map);
    }

    public void onReceivedHttpAuthRequest(HttpAuthenticationChallenge httpAuthenticationChallenge, @NonNull ReceivedHttpAuthRequestCallback receivedHttpAuthRequestCallback) {
        u channel = getChannel();
        if (channel == null) {
            receivedHttpAuthRequestCallback.defaultBehaviour(null);
        } else {
            channel.invokeMethod("onReceivedHttpAuthRequest", httpAuthenticationChallenge.toMap(), receivedHttpAuthRequestCallback);
        }
    }

    public void onReceivedHttpError(WebResourceRequestExt webResourceRequestExt, WebResourceResponseExt webResourceResponseExt) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put("request", webResourceRequestExt.toMap());
        map.put("errorResponse", webResourceResponseExt.toMap());
        channel.invokeMethod("onReceivedHttpError", map);
    }

    public void onReceivedIcon(byte[] bArr) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put("icon", bArr);
        channel.invokeMethod("onReceivedIcon", map);
    }

    public void onReceivedLoginRequest(String str, String str2, String str3) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap mapU = e.u(URLProtectionSpaceContract.FeedEntry.COLUMN_NAME_REALM, str, "account", str2);
        mapU.put("args", str3);
        channel.invokeMethod("onReceivedLoginRequest", mapU);
    }

    public void onReceivedServerTrustAuthRequest(ServerTrustChallenge serverTrustChallenge, @NonNull ReceivedServerTrustAuthRequestCallback receivedServerTrustAuthRequestCallback) {
        u channel = getChannel();
        if (channel == null) {
            receivedServerTrustAuthRequestCallback.defaultBehaviour(null);
        } else {
            channel.invokeMethod("onReceivedServerTrustAuthRequest", serverTrustChallenge.toMap(), receivedServerTrustAuthRequestCallback);
        }
    }

    public void onReceivedTouchIconUrl(String str, boolean z10) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap mapO = u1.o(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str);
        mapO.put("precomposed", Boolean.valueOf(z10));
        channel.invokeMethod("onReceivedTouchIconUrl", mapO);
    }

    public void onRenderProcessGone(boolean z10, int i10) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put("didCrash", Boolean.valueOf(z10));
        map.put("rendererPriorityAtExit", Integer.valueOf(i10));
        channel.invokeMethod("onRenderProcessGone", map);
    }

    public void onRenderProcessResponsive(String str, @NonNull RenderProcessResponsiveCallback renderProcessResponsiveCallback) {
        u channel = getChannel();
        if (channel == null) {
            renderProcessResponsiveCallback.defaultBehaviour(null);
            return;
        }
        HashMap map = new HashMap();
        map.put(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str);
        channel.invokeMethod("onRenderProcessResponsive", map, renderProcessResponsiveCallback);
    }

    public void onRenderProcessUnresponsive(String str, @NonNull RenderProcessUnresponsiveCallback renderProcessUnresponsiveCallback) {
        u channel = getChannel();
        if (channel == null) {
            renderProcessUnresponsiveCallback.defaultBehaviour(null);
            return;
        }
        HashMap map = new HashMap();
        map.put(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str);
        channel.invokeMethod("onRenderProcessUnresponsive", map, renderProcessUnresponsiveCallback);
    }

    public void onRequestFocus() {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        channel.invokeMethod("onRequestFocus", new HashMap());
    }

    public void onSafeBrowsingHit(String str, int i10, @NonNull SafeBrowsingHitCallback safeBrowsingHitCallback) {
        u channel = getChannel();
        if (channel == null) {
            safeBrowsingHitCallback.defaultBehaviour(null);
            return;
        }
        HashMap mapO = u1.o(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str);
        mapO.put("threatType", Integer.valueOf(i10));
        channel.invokeMethod("onSafeBrowsingHit", mapO, safeBrowsingHitCallback);
    }

    public void onScrollChanged(int i10, int i11) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        u1.t(i10, map, "x", i11, "y");
        channel.invokeMethod("onScrollChanged", map);
    }

    public void onTitleChanged(String str) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put(IjkMediaMeta.IJKM_KEY_TITLE, str);
        channel.invokeMethod("onTitleChanged", map);
    }

    public void onUpdateVisitedHistory(String str, boolean z10) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap mapO = u1.o(IjkMediaPlayer.OnNativeInvokeListener.ARG_URL, str);
        mapO.put("isReload", Boolean.valueOf(z10));
        channel.invokeMethod("onUpdateVisitedHistory", mapO);
    }

    public void onZoomScaleChanged(float f10, float f11) {
        u channel = getChannel();
        if (channel == null) {
            return;
        }
        HashMap map = new HashMap();
        map.put("oldScale", Float.valueOf(f10));
        map.put("newScale", Float.valueOf(f11));
        channel.invokeMethod("onZoomScaleChanged", map);
    }

    public void shouldInterceptRequest(WebResourceRequestExt webResourceRequestExt, @NonNull ShouldInterceptRequestCallback shouldInterceptRequestCallback) {
        u channel = getChannel();
        if (channel == null) {
            shouldInterceptRequestCallback.defaultBehaviour(null);
        } else {
            channel.invokeMethod("shouldInterceptRequest", webResourceRequestExt.toMap(), shouldInterceptRequestCallback);
        }
    }

    public void shouldOverrideUrlLoading(NavigationAction navigationAction, @NonNull ShouldOverrideUrlLoadingCallback shouldOverrideUrlLoadingCallback) {
        u channel = getChannel();
        if (channel == null) {
            shouldOverrideUrlLoadingCallback.defaultBehaviour(null);
        } else {
            channel.invokeMethod("shouldOverrideUrlLoading", navigationAction.toMap(), shouldOverrideUrlLoadingCallback);
        }
    }

    @Nullable
    public WebResourceResponseExt shouldInterceptRequest(WebResourceRequestExt webResourceRequestExt) throws InterruptedException {
        u channel = getChannel();
        if (channel == null) {
            return null;
        }
        return (WebResourceResponseExt) Util.invokeMethodAndWaitResult(channel, "shouldInterceptRequest", webResourceRequestExt.toMap(), new SyncShouldInterceptRequestCallback());
    }

    @Nullable
    public CustomSchemeResponse onLoadResourceWithCustomScheme(WebResourceRequestExt webResourceRequestExt) throws InterruptedException {
        u channel = getChannel();
        if (channel == null) {
            return null;
        }
        HashMap map = new HashMap();
        map.put("request", webResourceRequestExt.toMap());
        return (CustomSchemeResponse) Util.invokeMethodAndWaitResult(channel, "onLoadResourceWithCustomScheme", map, new SyncLoadResourceWithCustomSchemeCallback());
    }
}
