Swiggy v4.51.1版本的 MD5 值为:5af7ec91512a0a8c1510e3f8bac20b8b
以下内容为反编译后的 CartLynxFragment.java 源代码,内容仅作参考
package in.swiggy.android.fragments;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.pm.PackageManager;
import android.content.res.Resources;
import android.graphics.Rect;
import android.net.Uri;
import android.os.Bundle;
import android.util.DisplayMetrics;
import android.view.ContextThemeWrapper;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewTreeObserver;
import android.webkit.WebChromeClient;
import android.webkit.WebResourceRequest;
import android.webkit.WebSettings;
import android.webkit.WebView;
import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.ViewDataBinding;
import androidx.fragment.app.FragmentActivity;
import com.google.gson.Gson;
import com.swiggy.lynx.webinterface.ILynxViewUpdateHandler;
import in.juspay.hyper.constants.LogSubCategory;
import in.swiggy.android.R;
import in.swiggy.android.activities.ViewCartLynxActivity;
import in.swiggy.android.analytics_sdk.event.senders.KlyticsEventSender;
import in.swiggy.android.commons.extension.KotlinExtensionsKt;
import in.swiggy.android.constants.SwiggyGTMConstants;
import in.swiggy.android.controllers.LynxController;
import in.swiggy.android.databinding.m6;
import in.swiggy.android.discoverycartkit.RecommendedCartsDriver;
import in.swiggy.android.mvvm.viewmodels.cart.CartLynxFragmentService;
import in.swiggy.android.payment.behaviour.b;
import in.swiggy.android.swiggylynx.plugin.SwiggyLynxPluginData;
import in.swiggy.android.swiggylynx.plugin.addressplugin.AddressPlugin;
import in.swiggy.android.swiggylynx.plugin.irctcplugin.IrctcPlugin;
import in.swiggy.android.swiggylynx.plugin.loginplugin.LoginPlugin;
import in.swiggy.android.swiggylynx.plugin.ozone.OzonePlugin;
import in.swiggy.android.swiggylynx.plugin.payment.amazonpayplugin.AmazonPlugin;
import in.swiggy.android.swiggylynx.plugin.payment.juspayplugin.JuspayPlugin;
import in.swiggy.android.swiggylynx.plugin.payment.juspayplugin.utility.JuspaySdkWrapper;
import in.swiggy.android.swiggylynx.plugin.payment.paymentcoreplugin.PaymentCorePlugin;
import in.swiggy.android.swiggylynx.plugin.restempathy.RestEmpathyResponsePayload;
import in.swiggy.android.swiggylynx.plugin.swiggylynxcoreplugin.SwiggyLynxCorePlugin;
import in.swiggy.android.swiggylynx.plugin.swiggylynxcoreplugin.quizprogress.QuizProgressUpdatePayload;
import in.swiggy.android.swiggylynx.ui.LynxActivity;
import in.swiggy.android.swiggylynx.ui.SwiggyLynxWebView;
import in.swiggy.android.swiggylynx.ui.m;
import in.swiggy.android.swiggylynx.utils.IllegalHostException;
import in.swiggy.android.swiggylynx.utils.f;
import in.swiggy.android.swiggylynx.webviewclient.LynxViewClient;
import in.swiggy.android.swiggylynx.webviewclient.a;
import in.swiggy.android.tejas.TejasConstants;
import in.swiggy.android.tejas.feature.irctc.IrctcDataProvider;
import in.swiggy.android.utils.q0;
import io.reactivex.processors.BehaviorProcessor;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Stack;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.MutablePropertyReference1Impl;
import okhttp3.OkHttpClient;
public final class CartLynxFragment extends dagger.android.support.e implements ILynxViewUpdateHandler, in.swiggy.android.swiggylynx.webviewclient.a, in.swiggy.android.payment.behaviour.b, in.swiggy.android.swiggylynx.ui.d {
public in.swiggy.android.commons.featureFlags.d A;
public in.swiggy.android.swiggylynx.plugin.addressSorting.b B;
public in.swiggy.android.feature.address.a C;
public RecommendedCartsDriver D;
public in.swiggy.android.commons.ozone.a E;
public in.swiggy.android.commons.ozone.b F;
public dagger.b<CartLynxFragmentService> G;
public in.swiggy.android.repositories.cart.services.i H;
public in.swiggy.android.customisationsheets.cart.b I;
private in.swiggy.android.commonsFeature.f J;
public AmazonPlugin K;
private SwiggyLynxWebView L;
private boolean M;
private LynxViewClient N;
private final kotlin.j O;
private final kotlin.j P;
private final kotlin.j Q;
private final Stack<SwiggyLynxWebView> R;
public String S;
private String T;
public Set<? extends SwiggyLynxPluginData> U;
public Map<String, String> V;
private final kotlin.properties.e W;
public Map<String, String> X;
private boolean Y;
private String Z;
public m6 c;
private ArrayList<String> c0;
public in.swiggy.android.deeplink.b d;
public in.swiggy.android.utils.c0 e;
public in.swiggy.android.commons.utils.contextservice.h f;
public SharedPreferences g;
public in.swiggy.android.repositories.interfaces.d h;
public in.swiggy.android.swiggylocation.location.j i;
public in.swiggy.android.analytics.newrelic.a j;
public in.swiggy.koordinates.compass.core.b k;
public in.swiggy.android.swiggylynx.headers.a l;
public in.swiggy.android.analytics.interfaces.c m;
public in.swiggy.android.analytics.generated.e n;
public in.swiggy.android.swiggylynx.service.a o;
public in.swiggy.android.repositories.interfaces.e p;
private final ViewTreeObserver.OnGlobalLayoutListener p0;
public KlyticsEventSender q;
public BehaviorProcessor<QuizProgressUpdatePayload> r;
public q0 s;
public in.swiggy.android.payment.services.interfaces.d t;
public in.swiggy.android.crosspollination.c u;
public in.swiggy.android.commons.utils.a v;
public OkHttpClient w;
public in.swiggy.android.swiggylynx.interfaces.a x;
public in.swiggy.android.mxn.swiggyats.a y;
public IrctcDataProvider z;
static final kotlin.reflect.l<Object>[] z0 = {kotlin.jvm.internal.r.f(new MutablePropertyReference1Impl(CartLynxFragment.class, "requestCode", "getRequestCode()I", 0))};
public static final a y0 = new a(null);
public static final int A0 = 8;
public static final class a {
public a(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final CartLynxFragment a(Bundle bundle, in.swiggy.android.commonsFeature.f navigation) {
kotlin.jvm.internal.o.k(bundle, "bundle");
kotlin.jvm.internal.o.k(navigation, "navigation");
CartLynxFragment cartLynxFragment = new CartLynxFragment();
cartLynxFragment.setArguments(bundle);
cartLynxFragment.Z2(navigation);
return cartLynxFragment;
}
private a() {
}
}
public CartLynxFragment() {
kotlin.j b;
kotlin.j b2;
kotlin.j b3;
b = kotlin.l.b(new Function0<in.swiggy.android.swiggylynx.utils.f>() {
{
super(0);
}
@Override
public final in.swiggy.android.swiggylynx.utils.f invoke() {
return new in.swiggy.android.swiggylynx.utils.f(CartLynxFragment.this.q2());
}
});
this.O = b;
b2 = kotlin.l.b(new Function0<CartLynxFragmentService>() {
{
super(0);
}
@Override
public final CartLynxFragmentService invoke() {
CartLynxFragmentService cartLynxFragmentService = new CartLynxFragmentService(CartLynxFragment.this);
CartLynxFragment.this.K1().injectMembers(cartLynxFragmentService);
return cartLynxFragmentService;
}
});
this.P = b2;
b3 = kotlin.l.b(new Function0<in.swiggy.android.mvvm.services.i>() {
{
super(0);
}
@Override
public final in.swiggy.android.mvvm.services.i invoke() {
in.swiggy.android.repositories.cart.services.h hVar;
FragmentActivity requireActivity = CartLynxFragment.this.requireActivity();
kotlin.jvm.internal.o.i(requireActivity, "null cannot be cast to non-null type in.swiggy.android.mvvm.SwiggyUIComponent");
in.swiggy.android.mvvm.l lVar = (in.swiggy.android.mvvm.l) requireActivity;
in.swiggy.android.repositories.cart.services.i L1 = CartLynxFragment.this.L1();
if (L1 instanceof in.swiggy.android.repositories.cart.services.h) {
hVar = (in.swiggy.android.repositories.cart.services.h) L1;
} else {
hVar = null;
}
return new in.swiggy.android.mvvm.services.i(lVar, hVar, CartLynxFragment.this.Y1());
}
});
this.Q = b3;
this.R = new Stack<>();
this.W = kotlin.properties.a.a.a();
this.Y = true;
this.c0 = new ArrayList<>();
this.p0 = new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public final void onGlobalLayout() {
CartLynxFragment.y2(CartLynxFragment.this);
}
};
}
private final void A1(WebView webView, String str) {
webView.evaluateJavascript("javascript:try{" + str + "}catch(error){}", null);
}
private final void A2() {
String str;
in.swiggy.android.swiggylynx.utils.f W1 = W1();
SwiggyLynxWebView swiggyLynxWebView = this.L;
if (swiggyLynxWebView != null) {
str = swiggyLynxWebView.getUrl();
} else {
str = null;
}
if (W1.h(str)) {
W1().c();
} else {
W1().g();
}
}
private final in.swiggy.android.swiggylynx.plugin.cart.d B1(String str, in.swiggy.android.feature.cart.e eVar) {
FragmentActivity activity = getActivity();
kotlin.jvm.internal.o.i(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
AppCompatActivity appCompatActivity = (AppCompatActivity) activity;
in.swiggy.android.repositories.cart.interfaces.cart.a r = L1().r();
kotlin.jvm.internal.o.i(r, "null cannot be cast to non-null type in.swiggy.android.repositories.cart.impl.Cart");
in.swiggy.android.repositories.cart.impl.a aVar = (in.swiggy.android.repositories.cart.impl.a) r;
FragmentActivity requireActivity = requireActivity();
kotlin.jvm.internal.o.i(requireActivity, "null cannot be cast to non-null type in.swiggy.android.mvvm.SwiggyUIComponent");
return new in.swiggy.android.swiggylynx.plugin.cart.d(appCompatActivity, aVar, (in.swiggy.android.mvvm.l) requireActivity, L1(), t2(), Z1(), LynxController.class, q2(), new CartLynxFragment$createCartPluginV2$1(this), t(), f2(), b2(), x2(), str, s2(), eVar, d2(), o2(), V1(), new CartLynxFragment$createCartPluginV2$2(J1()));
}
public final void B2() {
J1().x();
}
private final void D2(ArrayList<com.swiggy.lynx.plugin.a> arrayList, String str) {
HashMap k;
HashMap k2;
if (in.swiggy.android.cartkit.a.a(q2())) {
arrayList.add(B1(str, new in.swiggy.android.feature.cart.e(Q1(), I1(), g2(), C1())));
in.swiggy.android.analytics.newrelic.a f2 = f2();
k2 = kotlin.collections.j0.k(kotlin.o.a("cart_plugin_in_use", "CART_PLUGIN_V2"));
f2.b("web_cart_cart_plugin_in_use", k2);
return;
}
FragmentActivity activity = getActivity();
kotlin.jvm.internal.o.i(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
AppCompatActivity appCompatActivity = (AppCompatActivity) activity;
in.swiggy.android.repositories.cart.interfaces.cart.a r = L1().r();
kotlin.jvm.internal.o.i(r, "null cannot be cast to non-null type in.swiggy.android.repositories.cart.impl.Cart");
in.swiggy.android.repositories.cart.impl.a aVar = (in.swiggy.android.repositories.cart.impl.a) r;
FragmentActivity requireActivity = requireActivity();
kotlin.jvm.internal.o.i(requireActivity, "null cannot be cast to non-null type in.swiggy.android.mvvm.SwiggyUIComponent");
arrayList.add(new in.swiggy.android.feature.cart.c(appCompatActivity, aVar, (in.swiggy.android.mvvm.l) requireActivity, I1(), L1(), t2(), Z1(), CartLynxFragment.class, Q1(), q2(), new CartLynxFragment$initCartPlugin$plugin$1(this), t(), f2(), b2(), x2(), g2(), str, s2(), C1(), d2(), o2(), V1(), new CartLynxFragment$initCartPlugin$plugin$2(J1())));
in.swiggy.android.analytics.newrelic.a f22 = f2();
k = kotlin.collections.j0.k(kotlin.o.a("cart_plugin_in_use", "CART_PLUGIN"));
f22.b("web_cart_cart_plugin_in_use", k);
}
private final void E2(Intent intent, ArrayList<com.swiggy.lynx.plugin.a> arrayList, WebView webView) {
FragmentActivity activity = getActivity();
kotlin.jvm.internal.o.i(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
AppCompatActivity appCompatActivity = (AppCompatActivity) activity;
in.swiggy.android.deeplink.b P1 = P1();
in.swiggy.android.repositories.interfaces.d t2 = t2();
in.swiggy.koordinates.compass.core.b Z1 = Z1();
in.swiggy.android.analytics.generated.e c2 = c2();
SharedPreferences q2 = q2();
in.swiggy.android.commons.utils.contextservice.h M1 = M1();
CartLynxFragment$initCorePlugin$plugin$1 cartLynxFragment$initCorePlugin$plugin$1 = new CartLynxFragment$initCorePlugin$plugin$1(this);
CartLynxFragment$initCorePlugin$plugin$2 cartLynxFragment$initCorePlugin$plugin$2 = new CartLynxFragment$initCorePlugin$plugin$2(this);
in.swiggy.android.repositories.cart.interfaces.cart.a r = L1().r();
kotlin.jvm.internal.o.j(r, "getCart(...)");
String str = this.T;
if (str == null) {
str = "";
}
String str2 = str;
CartLynxFragment$initCorePlugin$plugin$3 cartLynxFragment$initCorePlugin$plugin$3 = new CartLynxFragment$initCorePlugin$plugin$3(this);
String s2 = s2();
io.reactivex.disposables.a t = t();
in.swiggy.android.swiggylocation.location.j u2 = u2();
in.swiggy.android.swiggylynx.service.a d2 = d2();
in.swiggy.android.repositories.interfaces.e x2 = x2();
in.swiggy.android.analytics.newrelic.a f2 = f2();
in.swiggy.android.crosspollination.c N1 = N1();
in.swiggy.android.swiggylynx.interfaces.a r2 = r2();
in.swiggy.android.commons.utils.a F1 = F1();
FragmentActivity activity2 = getActivity();
kotlin.jvm.internal.o.i(activity2, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
arrayList.add(new SwiggyLynxCorePlugin(appCompatActivity, P1, webView, t2, Z1, c2, CartLynxFragment.class, q2, M1, null, this, cartLynxFragment$initCorePlugin$plugin$1, cartLynxFragment$initCorePlugin$plugin$2, r, str2, cartLynxFragment$initCorePlugin$plugin$3, intent, s2, t, u2, "", "", "", d2, x2, f2, N1, r2, null, null, F1, androidx.lifecycle.s.a((AppCompatActivity) activity2), j2(), new CartLynxFragment$initCorePlugin$plugin$4(J1()), 805306368, 0, null));
FragmentActivity activity3 = getActivity();
kotlin.jvm.internal.o.i(activity3, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
arrayList.add(new in.swiggy.android.swiggylynx.plugin.swiggylynxcoreplugin.socialshare.b((AppCompatActivity) activity3, q2()));
FragmentActivity activity4 = getActivity();
kotlin.jvm.internal.o.i(activity4, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
AppCompatActivity appCompatActivity2 = (AppCompatActivity) activity4;
in.swiggy.koordinates.compass.core.b Z12 = Z1();
in.swiggy.android.swiggylynx.service.a d22 = d2();
FragmentActivity requireActivity = requireActivity();
kotlin.jvm.internal.o.i(requireActivity, "null cannot be cast to non-null type in.swiggy.android.mvvm.SwiggyUIComponent");
arrayList.add(new AddressPlugin(appCompatActivity2, Z12, d22, true, (in.swiggy.android.mvvm.l) requireActivity));
FragmentActivity requireActivity2 = requireActivity();
kotlin.jvm.internal.o.i(requireActivity2, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
arrayList.add(new in.swiggy.android.swiggylynx.plugin.swiggylynxcoreplugin.submitfeedback.b((AppCompatActivity) requireActivity2, P1(), LynxActivity.class, new CartLynxFragment$initCorePlugin$1(this)));
H2(arrayList);
arrayList.add(in.swiggy.android.swiggylynx.plugin.addressSorting.e.Companion.b(S1(), D1()));
FragmentActivity requireActivity3 = requireActivity();
kotlin.jvm.internal.o.i(requireActivity3, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
arrayList.add(new LoginPlugin((AppCompatActivity) requireActivity3, d2(), t(), t2(), R1()));
arrayList.add(new in.swiggy.android.swiggylynx.plugin.dynamicXPWP.a(q2(), x2()));
in.swiggy.android.commons.ozone.a j2 = j2();
in.swiggy.android.commons.ozone.b k2 = k2();
FragmentActivity requireActivity4 = requireActivity();
kotlin.jvm.internal.o.i(requireActivity4, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
arrayList.add(new OzonePlugin(j2, k2, (AppCompatActivity) requireActivity4));
arrayList.add(new in.swiggy.android.swiggylynx.plugin.quizplugin.b(n2()));
}
private final void F2(String str, ArrayList<com.swiggy.lynx.plugin.a> arrayList, io.reactivex.disposables.a aVar) {
FragmentActivity activity = getActivity();
kotlin.jvm.internal.o.i(activity, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
JuspaySdkWrapper juspaySdkWrapper = new JuspaySdkWrapper((AppCompatActivity) activity, t2(), f2(), q2());
in.swiggy.android.analytics.newrelic.a f2 = f2();
FragmentActivity requireActivity = requireActivity();
kotlin.jvm.internal.o.i(requireActivity, "null cannot be cast to non-null type in.swiggy.android.mvvm.SwiggyUIComponent");
in.swiggy.android.swiggylynx.plugin.payment.amazonpayplugin.utility.a aVar2 = new in.swiggy.android.swiggylynx.plugin.payment.amazonpayplugin.utility.a(aVar, this, f2, ViewCartLynxActivity.class, true, (in.swiggy.android.mvvm.l) requireActivity, q2());
JuspayPlugin juspayPlugin = new JuspayPlugin(q2(), juspaySdkWrapper, aVar, i2());
FragmentActivity requireActivity2 = requireActivity();
kotlin.jvm.internal.o.i(requireActivity2, "null cannot be cast to non-null type androidx.appcompat.app.AppCompatActivity");
AppCompatActivity appCompatActivity = (AppCompatActivity) requireActivity2;
in.swiggy.android.repositories.cart.interfaces.cart.a r = L1().r();
kotlin.jvm.internal.o.j(r, "getCart(...)");
PaymentCorePlugin paymentCorePlugin = new PaymentCorePlugin(appCompatActivity, str, r, aVar, c2(), q2(), f2(), this.J, new CartLynxFragment$initPaymentPlugin$paymentCorePlugin$1(this), true, P1(), this, i2(), null, null, null, s2(), t2(), V1(), 57344, null);
SharedPreferences q2 = q2();
in.swiggy.android.analytics.newrelic.a f22 = f2();
FragmentActivity requireActivity3 = requireActivity();
kotlin.jvm.internal.o.i(requireActivity3, "null cannot be cast to non-null type in.swiggy.android.mvvm.SwiggyUIComponent");
in.swiggy.android.swiggylynx.plugin.payment.upiplugin.b bVar = new in.swiggy.android.swiggylynx.plugin.payment.upiplugin.b(this, q2, f22, true, (in.swiggy.android.mvvm.l) requireActivity3, x2());
U2(new AmazonPlugin(aVar2, q2(), f2()));
in.swiggy.android.analytics.newrelic.a f23 = f2();
FragmentActivity requireActivity4 = requireActivity();
kotlin.jvm.internal.o.i(requireActivity4, "null cannot be cast to non-null type in.swiggy.android.mvvm.SwiggyUIComponent");
in.swiggy.android.swiggylynx.plugin.payment.phonepeplugin.b bVar2 = new in.swiggy.android.swiggylynx.plugin.payment.phonepeplugin.b(this, f23, true, (in.swiggy.android.mvvm.l) requireActivity4);
arrayList.add(paymentCorePlugin);
arrayList.add(bVar);
arrayList.add(juspayPlugin);
arrayList.add(E1());
arrayList.add(bVar2);
}
private final void G2(RestEmpathyResponsePayload restEmpathyResponsePayload, ArrayList<com.swiggy.lynx.plugin.a> arrayList) {
arrayList.add(new in.swiggy.android.swiggylynx.plugin.restempathy.b(restEmpathyResponsePayload));
}
private final void H2(ArrayList<com.swiggy.lynx.plugin.a> arrayList) {
com.swiggy.lynx.plugin.a b = in.swiggy.android.swiggylynx.plugin.tns.a.Companion.b(S1(), q2(), Z1(), M1());
if (b != null) {
arrayList.add(b);
}
}
private final CartLynxFragmentService J1() {
return (CartLynxFragmentService) this.P.getValue();
}
private final void J2(SwiggyLynxWebView swiggyLynxWebView) {
ViewTreeObserver viewTreeObserver;
this.R.push(swiggyLynxWebView);
this.L = swiggyLynxWebView;
if (swiggyLynxWebView != null) {
swiggyLynxWebView.setNewrelicPerformanceUtils(f2());
}
SwiggyLynxWebView swiggyLynxWebView2 = this.L;
if (swiggyLynxWebView2 != null) {
swiggyLynxWebView2.setViewUpdateHandler(this);
}
in.swiggy.android.swiggylynx.ui.m mVar = in.swiggy.android.swiggylynx.ui.m.a;
String s2 = s2();
in.swiggy.android.repositories.interfaces.d t2 = t2();
in.swiggy.android.commons.utils.contextservice.h M1 = M1();
in.swiggy.koordinates.compass.core.b Z1 = Z1();
String str = this.T;
if (str == null) {
str = "";
}
String str2 = str;
in.swiggy.android.repositories.interfaces.e x2 = x2();
SharedPreferences q2 = q2();
in.swiggy.android.repositories.cart.interfaces.cart.a r = L1().r();
kotlin.jvm.internal.o.j(r, "getCart(...)");
mVar.e(s2, t2, M1, Z1, str2, x2, q2, r, this.L, F1(), j2(), TejasConstants.ENABLE_V4_PROFILE_API_DEFAULT, TejasConstants.ENABLE_V4_PROFILE_API_DEFAULT, new CartLynxFragment$initialiseLynxWebView$1(J1()));
List<com.swiggy.lynx.plugin.a> K2 = K2();
SwiggyLynxWebView swiggyLynxWebView3 = this.L;
if (swiggyLynxWebView3 != null) {
com.swiggy.lynx.plugin.a[] aVarArr = (com.swiggy.lynx.plugin.a[]) K2.toArray(new com.swiggy.lynx.plugin.a[0]);
swiggyLynxWebView3.setPlugins((com.swiggy.lynx.plugin.a[]) Arrays.copyOf(aVarArr, aVarArr.length));
}
SwiggyLynxWebView swiggyLynxWebView4 = this.L;
if (swiggyLynxWebView4 != null) {
swiggyLynxWebView4.setWhiteListedDomains(J1().w());
}
SwiggyLynxWebView swiggyLynxWebView5 = this.L;
if (swiggyLynxWebView5 != null) {
Context applicationContext = requireContext().getApplicationContext();
kotlin.jvm.internal.o.j(applicationContext, "getApplicationContext(...)");
SharedPreferences q22 = q2();
in.swiggy.android.repositories.interfaces.e x22 = x2();
Gson g = in.swiggy.android.commons.utils.i0.g();
kotlin.jvm.internal.o.j(g, "getGson(...)");
LynxViewClient lynxViewClient = new LynxViewClient(this, applicationContext, q22, x22, g, h2(), M1(), f2());
this.N = lynxViewClient;
swiggyLynxWebView5.setWebViewClient(lynxViewClient);
}
SwiggyLynxWebView swiggyLynxWebView6 = this.L;
if (swiggyLynxWebView6 != null && (viewTreeObserver = swiggyLynxWebView6.getViewTreeObserver()) != null) {
viewTreeObserver.addOnGlobalLayoutListener(this.p0);
}
m.f.a.a(this.L, d2(), L1(), q2());
}
private final List<com.swiggy.lynx.plugin.a> K2() {
ArrayList<com.swiggy.lynx.plugin.a> arrayList = new ArrayList<>();
for (SwiggyLynxPluginData swiggyLynxPluginData : m2()) {
if (swiggyLynxPluginData instanceof SwiggyLynxPluginData.SwiggyLynxCorePluginData) {
E2(((SwiggyLynxPluginData.SwiggyLynxCorePluginData) swiggyLynxPluginData).a(), arrayList, this.L);
} else if (swiggyLynxPluginData instanceof SwiggyLynxPluginData.PaymentLynxPluginData) {
SwiggyLynxPluginData.PaymentLynxPluginData paymentLynxPluginData = (SwiggyLynxPluginData.PaymentLynxPluginData) swiggyLynxPluginData;
String a2 = paymentLynxPluginData.a();
if (a2 != null) {
this.Z = a2;
}
F2(paymentLynxPluginData.a(), arrayList, t());
} else if (swiggyLynxPluginData instanceof SwiggyLynxPluginData.EmpathyLynxPluginData) {
G2(((SwiggyLynxPluginData.EmpathyLynxPluginData) swiggyLynxPluginData).a(), arrayList);
} else if (swiggyLynxPluginData instanceof SwiggyLynxPluginData.CartLynxPluginData) {
SwiggyLynxPluginData.CartLynxPluginData cartLynxPluginData = (SwiggyLynxPluginData.CartLynxPluginData) swiggyLynxPluginData;
String a3 = cartLynxPluginData.a();
if (a3 != null) {
this.Z = a3;
}
D2(arrayList, cartLynxPluginData.a());
} else if (swiggyLynxPluginData instanceof SwiggyLynxPluginData.IrctcPluginData) {
arrayList.add(new IrctcPlugin(V1(), new CartLynxFragment$initialisePlugins$1$3(this)));
} else if (swiggyLynxPluginData instanceof SwiggyLynxPluginData.MenuListPluginData) {
arrayList.add(new in.swiggy.android.swiggylynx.plugin.menulistplugin.b(d2()));
} else if (swiggyLynxPluginData instanceof SwiggyLynxPluginData.AppScannerPluginData) {
in.swiggy.android.appscanner.a aVar = in.swiggy.android.appscanner.a.a;
PackageManager packageManager = requireActivity().getPackageManager();
kotlin.jvm.internal.o.j(packageManager, "getPackageManager(...)");
arrayList.add(aVar.a(packageManager));
}
}
return arrayList;
}
public final void L2(in.swiggy.android.swiggylynx.plugin.swiggylynxcoreplugin.c cVar) {
J1().y(cVar);
}
public final void M2() {
J1().C(getArguments());
ILynxViewUpdateHandler.DefaultImpls.a(this, s2(), T1(), false, false, false, null, null, false, 252, null);
}
public final void N2() {
J1().Q();
}
public final void Q2(String str) {
J1().B(str);
}
public final void R2(Intent intent) {
J1().D(intent);
}
private final in.swiggy.android.swiggylynx.utils.f W1() {
return (in.swiggy.android.swiggylynx.utils.f) this.O.getValue();
}
public static final void y2(CartLynxFragment this$0) {
float f;
String name;
String name2;
Resources resources;
DisplayMetrics displayMetrics;
kotlin.jvm.internal.o.k(this$0, "this$0");
SwiggyLynxWebView swiggyLynxWebView = this$0.L;
if (swiggyLynxWebView != null) {
Rect rect = new Rect();
swiggyLynxWebView.getWindowVisibleDisplayFrame(rect);
int height = swiggyLynxWebView.getHeight() - (rect.bottom - rect.top);
Context context = swiggyLynxWebView.getContext();
if (context != null && (resources = context.getResources()) != null && (displayMetrics = resources.getDisplayMetrics()) != null) {
f = displayMetrics.density;
} else {
f = 1.0f;
}
if (height > this$0.getResources().getDimensionPixelSize(R.dimen.dimen_50dp)) {
try {
SwiggyLynxWebView swiggyLynxWebView2 = this$0.L;
if (swiggyLynxWebView2 != null) {
float f2 = height / f;
this$0.A1(swiggyLynxWebView2, "keyboardStateChanged(true, " + f2 + ")");
return;
}
return;
} catch (Exception e) {
if (!CartLynxFragment.class.isAnonymousClass()) {
name2 = CartLynxFragment.class.getSimpleName();
if (name2.length() > 23) {
kotlin.jvm.internal.o.h(name2);
name2 = name2.substring(0, 23);
kotlin.jvm.internal.o.j(name2, "substring(...)");
}
kotlin.jvm.internal.o.h(name2);
} else {
name2 = CartLynxFragment.class.getName();
if (name2.length() > 23) {
kotlin.jvm.internal.o.h(name2);
name2 = name2.substring(name2.length() - 23, name2.length());
kotlin.jvm.internal.o.j(name2, "substring(...)");
}
kotlin.jvm.internal.o.h(name2);
}
in.swiggy.android.commons.utils.x.i(name2, e);
return;
}
}
try {
SwiggyLynxWebView swiggyLynxWebView3 = this$0.L;
if (swiggyLynxWebView3 != null) {
this$0.A1(swiggyLynxWebView3, "keyboardStateChanged(false, 0)");
}
} catch (Exception e2) {
if (!CartLynxFragment.class.isAnonymousClass()) {
name = CartLynxFragment.class.getSimpleName();
if (name.length() > 23) {
kotlin.jvm.internal.o.h(name);
name = name.substring(0, 23);
kotlin.jvm.internal.o.j(name, "substring(...)");
}
kotlin.jvm.internal.o.h(name);
} else {
name = CartLynxFragment.class.getName();
if (name.length() > 23) {
kotlin.jvm.internal.o.h(name);
name = name.substring(name.length() - 23, name.length());
kotlin.jvm.internal.o.j(name, "substring(...)");
}
kotlin.jvm.internal.o.h(name);
}
in.swiggy.android.commons.utils.x.i(name, e2);
}
}
}
@Override
public Context C0() {
return requireContext().getApplicationContext();
}
public final in.swiggy.android.feature.address.a C1() {
in.swiggy.android.feature.address.a aVar = this.C;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("addressEntryPoints");
return null;
}
public void C2(Context context) {
b.a.a(this, context);
}
public final in.swiggy.android.swiggylynx.plugin.addressSorting.b D1() {
in.swiggy.android.swiggylynx.plugin.addressSorting.b bVar = this.B;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.o.C("addressSortingPluginMapper");
return null;
}
@Override
public void E(boolean z) {
J1().P(z);
}
@Override
public void E0(boolean z, String title, com.swiggy.lynx.plugin.core.showheader.b bVar, Function0<Unit> backClickAction, Function0<Unit> closeClickAction) {
kotlin.jvm.internal.o.k(title, "title");
kotlin.jvm.internal.o.k(backClickAction, "backClickAction");
kotlin.jvm.internal.o.k(closeClickAction, "closeClickAction");
J1().I(z, title, bVar, backClickAction, closeClickAction);
}
public final AmazonPlugin E1() {
AmazonPlugin amazonPlugin = this.K;
if (amazonPlugin != null) {
return amazonPlugin;
}
kotlin.jvm.internal.o.C("amazonPayPlugin");
return null;
}
public final in.swiggy.android.commons.utils.a F1() {
in.swiggy.android.commons.utils.a aVar = this.v;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("appBuildDetails");
return null;
}
public final in.swiggy.android.mxn.swiggyats.a G1() {
in.swiggy.android.mxn.swiggyats.a aVar = this.y;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("atsService");
return null;
}
public final m6 H1() {
m6 m6Var = this.c;
if (m6Var != null) {
return m6Var;
}
kotlin.jvm.internal.o.C("binding");
return null;
}
public final in.swiggy.android.cartkit.interfaces.a I1() {
return (in.swiggy.android.cartkit.interfaces.a) this.Q.getValue();
}
@Override
public void K0() {
J1().g();
}
public final dagger.b<CartLynxFragmentService> K1() {
dagger.b<CartLynxFragmentService> bVar = this.G;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.o.C("cartLynxFragmentServiceMembersInjector");
return null;
}
public final in.swiggy.android.repositories.cart.services.i L1() {
in.swiggy.android.repositories.cart.services.i iVar = this.H;
if (iVar != null) {
return iVar;
}
kotlin.jvm.internal.o.C("cartService");
return null;
}
public final in.swiggy.android.commons.utils.contextservice.h M1() {
in.swiggy.android.commons.utils.contextservice.h hVar = this.f;
if (hVar != null) {
return hVar;
}
kotlin.jvm.internal.o.C("contextService");
return null;
}
@Override
public void N() {
J1().h();
}
public final in.swiggy.android.crosspollination.c N1() {
in.swiggy.android.crosspollination.c cVar = this.u;
if (cVar != null) {
return cVar;
}
kotlin.jvm.internal.o.C("crossPollinationDataManager");
return null;
}
public final SwiggyLynxWebView O1() {
return this.L;
}
public final void O2(Intent intent) {
kotlin.jvm.internal.o.k(intent, "intent");
J1().R(intent);
if (this.K != null) {
E1().onNewIntent(intent);
}
}
@Override
public void P() {
a.C0891a.c(this);
A2();
}
public final in.swiggy.android.deeplink.b P1() {
in.swiggy.android.deeplink.b bVar = this.d;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.o.C("deepLinkHandler");
return null;
}
public void P2() {
J1().g();
}
public final in.swiggy.android.utils.c0 Q1() {
in.swiggy.android.utils.c0 c0Var = this.e;
if (c0Var != null) {
return c0Var;
}
kotlin.jvm.internal.o.C("deepLinkHandlerUtil");
return null;
}
@Override
public void R0() {
a.C0891a.b(this);
}
public final in.swiggy.android.swiggylynx.headers.a R1() {
in.swiggy.android.swiggylynx.headers.a aVar = this.l;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("defaultHeaders");
return null;
}
@Override
public void S0(boolean z, WebResourceRequest webResourceRequest, com.swiggy.lynx.webinterface.d dVar) {
J1().M(z, webResourceRequest, dVar);
}
public final in.swiggy.android.commons.featureFlags.d S1() {
in.swiggy.android.commons.featureFlags.d dVar = this.A;
if (dVar != null) {
return dVar;
}
kotlin.jvm.internal.o.C("featureFlags");
return null;
}
public final void S2(boolean z) {
this.Y = z;
}
@Override
public void T0(String str, String str2, String str3, String str4) {
a.C0891a.g(this, str, str2, str3, str4);
}
public final Map<String, String> T1() {
Map<String, String> map = this.V;
if (map != null) {
return map;
}
kotlin.jvm.internal.o.C("headers");
return null;
}
public final Map<String, String> U1() {
Map<String, String> map = this.X;
if (map != null) {
return map;
}
kotlin.jvm.internal.o.C("headersFromIntent");
return null;
}
public final void U2(AmazonPlugin amazonPlugin) {
kotlin.jvm.internal.o.k(amazonPlugin, "<set-?>");
this.K = amazonPlugin;
}
public final IrctcDataProvider V1() {
IrctcDataProvider irctcDataProvider = this.z;
if (irctcDataProvider != null) {
return irctcDataProvider;
}
kotlin.jvm.internal.o.C("irctcDataProvider");
return null;
}
public final void V2(m6 m6Var) {
kotlin.jvm.internal.o.k(m6Var, "<set-?>");
this.c = m6Var;
}
public final void W2(SwiggyLynxWebView swiggyLynxWebView) {
this.L = swiggyLynxWebView;
}
public final KlyticsEventSender X1() {
KlyticsEventSender klyticsEventSender = this.q;
if (klyticsEventSender != null) {
return klyticsEventSender;
}
kotlin.jvm.internal.o.C("klyticsEventSender");
return null;
}
public final void X2(Map<String, String> map) {
kotlin.jvm.internal.o.k(map, "<set-?>");
this.V = map;
}
public final in.swiggy.android.customisationsheets.cart.b Y1() {
in.swiggy.android.customisationsheets.cart.b bVar = this.I;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.o.C("localCartService");
return null;
}
public final void Y2(Map<String, String> map) {
kotlin.jvm.internal.o.k(map, "<set-?>");
this.X = map;
}
public final in.swiggy.koordinates.compass.core.b Z1() {
in.swiggy.koordinates.compass.core.b bVar = this.k;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.o.C("locationContext");
return null;
}
public final void Z2(in.swiggy.android.commonsFeature.f fVar) {
this.J = fVar;
}
public final Stack<SwiggyLynxWebView> a2() {
return this.R;
}
public final void a3(Set<? extends SwiggyLynxPluginData> set) {
kotlin.jvm.internal.o.k(set, "<set-?>");
this.U = set;
}
@Override
@TargetApi(21)
public void b0(WebChromeClient.FileChooserParams fileChooserParams, in.swiggy.android.web.wrapper.a aVar, int i, in.swiggy.android.web.h hVar, SharedPreferences sharedPreferences) {
a.C0891a.d(this, fileChooserParams, aVar, i, hVar, sharedPreferences);
}
public final in.swiggy.android.analytics.interfaces.c b2() {
in.swiggy.android.analytics.interfaces.c cVar = this.m;
if (cVar != null) {
return cVar;
}
kotlin.jvm.internal.o.C("mSwiggyEventHandler");
return null;
}
public final void b3(ArrayList<String> arrayList) {
kotlin.jvm.internal.o.k(arrayList, "<set-?>");
this.c0 = arrayList;
}
public final in.swiggy.android.analytics.generated.e c2() {
in.swiggy.android.analytics.generated.e eVar = this.n;
if (eVar != null) {
return eVar;
}
kotlin.jvm.internal.o.C("mSwiggyEventLogger");
return null;
}
public final void c3(int i) {
this.W.b(this, z0[0], Integer.valueOf(i));
}
public final in.swiggy.android.swiggylynx.service.a d2() {
in.swiggy.android.swiggylynx.service.a aVar = this.o;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("mSwiggyLynxInterface");
return null;
}
public final void d3(String str) {
kotlin.jvm.internal.o.k(str, "<set-?>");
this.S = str;
}
@Override
public Context e1() {
return getActivity();
}
public final void e3(String str) {
this.T = str;
}
@Override
public boolean f1() {
return false;
}
public final in.swiggy.android.analytics.newrelic.a f2() {
in.swiggy.android.analytics.newrelic.a aVar = this.j;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("newrelicPerformanceUtils");
return null;
}
public final q0 g2() {
q0 q0Var = this.s;
if (q0Var != null) {
return q0Var;
}
kotlin.jvm.internal.o.C("ofoUtil");
return null;
}
public final OkHttpClient h2() {
OkHttpClient okHttpClient = this.w;
if (okHttpClient != null) {
return okHttpClient;
}
kotlin.jvm.internal.o.C("okhttp");
return null;
}
public final in.swiggy.android.payment.services.interfaces.d i2() {
in.swiggy.android.payment.services.interfaces.d dVar = this.t;
if (dVar != null) {
return dVar;
}
kotlin.jvm.internal.o.C("oneClickService");
return null;
}
@Override
public void j0(Uri uri, boolean z) {
a.C0891a.f(this, uri, z);
}
public final in.swiggy.android.commons.ozone.a j2() {
in.swiggy.android.commons.ozone.a aVar = this.E;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("ozoneStorageManager");
return null;
}
public final in.swiggy.android.commons.ozone.b k2() {
in.swiggy.android.commons.ozone.b bVar = this.F;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.o.C("ozoneTokenFetchAndRefreshManager");
return null;
}
public final String l2() {
return this.Z;
}
public final Set<SwiggyLynxPluginData> m2() {
Set set = this.U;
if (set != null) {
return set;
}
kotlin.jvm.internal.o.C("plugins");
return null;
}
public final BehaviorProcessor<QuizProgressUpdatePayload> n2() {
BehaviorProcessor<QuizProgressUpdatePayload> behaviorProcessor = this.r;
if (behaviorProcessor != null) {
return behaviorProcessor;
}
kotlin.jvm.internal.o.C("quizFeedback");
return null;
}
public final RecommendedCartsDriver o2() {
RecommendedCartsDriver recommendedCartsDriver = this.D;
if (recommendedCartsDriver != null) {
return recommendedCartsDriver;
}
kotlin.jvm.internal.o.C("recommendedCartsDriver");
return null;
}
@Override
public void onActivityResult(int i, int i2, Intent intent) {
J1().A(i, i2, intent);
super.onActivityResult(i, i2, intent);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup viewGroup, Bundle bundle) {
kotlin.jvm.internal.o.k(inflater, "inflater");
ViewDataBinding h = androidx.databinding.g.h(inflater.cloneInContext(new ContextThemeWrapper(getActivity(), (int) R.style.LynxTheme)), R.layout.fragment_cart_lynx, viewGroup, false);
kotlin.jvm.internal.o.j(h, "inflate(...)");
V2((m6) h);
return H1().C();
}
@Override
public void onDestroy() {
ViewTreeObserver viewTreeObserver;
t().dispose();
SwiggyLynxWebView swiggyLynxWebView = this.L;
if (swiggyLynxWebView != null && (viewTreeObserver = swiggyLynxWebView.getViewTreeObserver()) != null) {
viewTreeObserver.removeOnGlobalLayoutListener(this.p0);
}
SwiggyLynxWebView swiggyLynxWebView2 = this.L;
if (swiggyLynxWebView2 != null) {
swiggyLynxWebView2.h();
}
SwiggyLynxWebView swiggyLynxWebView3 = this.L;
if (swiggyLynxWebView3 != null) {
swiggyLynxWebView3.destroy();
}
LynxViewClient lynxViewClient = this.N;
if (lynxViewClient != null) {
lynxViewClient.i();
}
super.onDestroy();
}
@Override
public void onDestroyView() {
t().dispose();
super.onDestroyView();
}
@Override
public void onViewCreated(View view, Bundle bundle) {
String name;
kotlin.jvm.internal.o.k(view, "view");
super.onViewCreated(view, bundle);
try {
Context applicationContext = requireContext().getApplicationContext();
kotlin.jvm.internal.o.j(applicationContext, "getApplicationContext(...)");
C2(applicationContext);
} catch (Exception e) {
this.M = true;
if (!CartLynxFragment.class.isAnonymousClass()) {
name = CartLynxFragment.class.getSimpleName();
if (name.length() > 23) {
kotlin.jvm.internal.o.h(name);
name = name.substring(0, 23);
kotlin.jvm.internal.o.j(name, "substring(...)");
}
kotlin.jvm.internal.o.h(name);
} else {
name = CartLynxFragment.class.getName();
if (name.length() > 23) {
kotlin.jvm.internal.o.h(name);
name = name.substring(name.length() - 23, name.length());
kotlin.jvm.internal.o.j(name, "substring(...)");
}
kotlin.jvm.internal.o.h(name);
}
in.swiggy.android.commons.utils.x.i(name, e);
}
if (this.M) {
J1().N();
return;
}
Bundle arguments = getArguments();
if (arguments != null) {
J1().C(arguments);
}
W1().e(getActivity(), f.a.C0890a.a);
J2(H1().D);
ILynxViewUpdateHandler.DefaultImpls.a(this, s2(), T1(), false, false, false, null, null, false, 252, null);
J1().z();
if (r2().h(getArguments())) {
J1().G();
}
if (G1().b()) {
m.a.a.a(this.L);
}
}
public final ArrayList<String> p2() {
return this.c0;
}
public final SharedPreferences q2() {
SharedPreferences sharedPreferences = this.g;
if (sharedPreferences != null) {
return sharedPreferences;
}
kotlin.jvm.internal.o.C("sharedPreferences");
return null;
}
public final in.swiggy.android.swiggylynx.interfaces.a r2() {
in.swiggy.android.swiggylynx.interfaces.a aVar = this.x;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.o.C("stateManager");
return null;
}
public final String s2() {
String str = this.S;
if (str != null) {
return str;
}
kotlin.jvm.internal.o.C("url");
return null;
}
@Override
public io.reactivex.disposables.a t() {
return new io.reactivex.disposables.a();
}
public final in.swiggy.android.repositories.interfaces.d t2() {
in.swiggy.android.repositories.interfaces.d dVar = this.h;
if (dVar != null) {
return dVar;
}
kotlin.jvm.internal.o.C(LogSubCategory.Action.USER);
return null;
}
public final in.swiggy.android.swiggylocation.location.j u2() {
in.swiggy.android.swiggylocation.location.j jVar = this.i;
if (jVar != null) {
return jVar;
}
kotlin.jvm.internal.o.C("userLocationManager");
return null;
}
public final String v2() {
SwiggyGTMConstants swiggyGTMConstants = SwiggyGTMConstants.a;
String simpleName = CartLynxFragment.class.getSimpleName();
kotlin.jvm.internal.o.j(simpleName, "getSimpleName(...)");
return swiggyGTMConstants.c(simpleName);
}
public final String w2() {
return this.T;
}
@Override
public HashMap<String, Object> x0() {
return J1().v();
}
public final in.swiggy.android.repositories.interfaces.e x2() {
in.swiggy.android.repositories.interfaces.e eVar = this.p;
if (eVar != null) {
return eVar;
}
kotlin.jvm.internal.o.C("xpExperimentContext");
return null;
}
@Override
public void y0(String url, Map<String, String> additionalHeaders, boolean z, boolean z2, boolean z3, String str, String str2, boolean z4) {
Map<String, String> U1;
Map<String, String> o;
WebSettings webSettings;
boolean y;
String name;
kotlin.jvm.internal.o.k(url, "url");
kotlin.jvm.internal.o.k(additionalHeaders, "additionalHeaders");
if (z) {
Context applicationContext = requireContext().getApplicationContext();
kotlin.jvm.internal.o.j(applicationContext, "getApplicationContext(...)");
SwiggyLynxWebView swiggyLynxWebView = new SwiggyLynxWebView(applicationContext);
H1().K.addView(swiggyLynxWebView);
this.L = swiggyLynxWebView;
J2(swiggyLynxWebView);
if (X1().c()) {
in.swiggy.klytics.singleton.b bVar = in.swiggy.klytics.singleton.b.a;
String str3 = "";
String string = q2().getString("userAgent", "");
if (string != null) {
str3 = string;
}
bVar.k(str3);
}
}
if (this.Y) {
U1 = kotlin.collections.j0.o(U1(), R1().a());
} else {
U1 = U1();
}
X2(U1);
o = kotlin.collections.j0.o(T1(), additionalHeaders);
ArrayList<String> w = J1().w();
String a2 = com.swiggy.lynx.utils.a.a.a(url);
if (kotlin.jvm.internal.o.f(a2, "invalid")) {
if (!CartLynxFragment.class.isAnonymousClass()) {
name = CartLynxFragment.class.getSimpleName();
if (name.length() > 23) {
kotlin.jvm.internal.o.h(name);
name = name.substring(0, 23);
kotlin.jvm.internal.o.j(name, "substring(...)");
}
kotlin.jvm.internal.o.h(name);
} else {
name = CartLynxFragment.class.getName();
if (name.length() > 23) {
kotlin.jvm.internal.o.h(name);
name = name.substring(name.length() - 23, name.length());
kotlin.jvm.internal.o.j(name, "substring(...)");
}
kotlin.jvm.internal.o.h(name);
}
in.swiggy.android.commons.utils.x.i(name, new IllegalHostException(url));
}
ArrayList arrayList = new ArrayList();
Iterator<T> it = w.iterator();
while (true) {
webSettings = null;
if (!it.hasNext()) {
break;
}
Object next = it.next();
y = kotlin.text.q.y(a2, (String) next, false, 2, null);
if (y) {
arrayList.add(next);
}
}
if ((!arrayList.isEmpty()) && !kotlin.jvm.internal.o.f(a2, "invalid")) {
SwiggyLynxWebView swiggyLynxWebView2 = this.L;
if (swiggyLynxWebView2 != null) {
webSettings = swiggyLynxWebView2.getSettings();
}
if (webSettings != null) {
webSettings.setMediaPlaybackRequiresUserGesture(false);
}
SwiggyLynxWebView swiggyLynxWebView3 = this.L;
if (swiggyLynxWebView3 != null) {
swiggyLynxWebView3.l(url, SwiggyLynxWebView.Companion.a(o), z2);
}
} else {
SwiggyLynxWebView swiggyLynxWebView4 = this.L;
if (swiggyLynxWebView4 != null) {
swiggyLynxWebView4.l(url, new HashMap(), z2);
}
}
SwiggyLynxWebView swiggyLynxWebView5 = this.L;
if (swiggyLynxWebView5 != null) {
swiggyLynxWebView5.t(q2());
}
if (z3 && str2 != null) {
ILynxViewUpdateHandler.DefaultImpls.b(this, true, null, null, new Function0<Unit>() {
{
super(0);
}
@Override
public Unit invoke() {
invoke2();
return Unit.a;
}
public final void invoke2() {
if (KotlinExtensionsKt.f(Integer.valueOf(CartLynxFragment.this.H1().K.getChildCount()), 1)) {
CartLynxFragment.this.B2();
CartLynxFragment.this.H1().K.removeView(CartLynxFragment.this.a2().pop());
CartLynxFragment cartLynxFragment = CartLynxFragment.this;
cartLynxFragment.W2(cartLynxFragment.a2().peek());
}
}
}, null, 22, null);
}
E(true);
}
public final boolean z2() {
if (this.c == null) {
return false;
}
SwiggyLynxWebView swiggyLynxWebView = this.L;
if (swiggyLynxWebView == null || !swiggyLynxWebView.canGoBack()) {
if (!KotlinExtensionsKt.f(Integer.valueOf(H1().K.getChildCount()), 1)) {
return false;
}
B2();
H1().K.removeView(this.R.pop());
this.L = this.R.peek();
}
return true;
}
}