Live Football Updates v1.0版本的 MD5 值为:95609b5a5bec0a5f5a0b6e8e4d8f1cba
以下内容为反编译后的 w.java 源代码,内容仅作参考
package d7;
import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.content.res.Resources;
import android.net.Uri;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.text.TextUtils;
import android.text.format.DateUtils;
import android.util.TypedValue;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.CookieManager;
import android.webkit.DownloadListener;
import android.webkit.URLUtil;
import android.webkit.WebResourceRequest;
import android.webkit.WebResourceResponse;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import android.widget.LinearLayout;
import androidx.appcompat.widget.g2;
import com.applive.app.ui.activities.DeepLinkActivity;
import com.google.gson.Gson;
import com.ironsource.q2;
import com.millingoupdate.app.R;
import java.io.ByteArrayInputStream;
import java.io.InputStream;
import java.io.StringReader;
import java.lang.ref.WeakReference;
import java.net.URL;
import java.net.URLDecoder;
import java.text.Bidi;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
@SuppressLint({"SetJavaScriptEnabled"})
public class w extends c7.a {
public static final int f21556e1 = 0;
public String R0;
public String S0;
public String U0;
public String f21561d1;
public WebView f21562e0;
public a f0;
public int f21563g0;
public int f21564h0;
public int f21565i0;
public LinearLayout f21566j0;
public LinearLayout f21567k0;
public Bundle f21568l0;
public String f21570n0;
public String f21571o0;
public long f21572p0;
public String f21573q0;
public final x6.t f21559c0 = new x6.t(1, this);
public final v d0 = new DownloadListener() {
@Override
public final void onDownloadStart(String str, String str2, String str3, String str4, long j4) {
int i = w.f21556e1;
w wVar = w.this;
wVar.getClass();
try {
if (!TextUtils.isEmpty(str)) {
i7.l.d(wVar.d0(), str);
}
} catch (Exception unused) {
}
}
};
public String f21569m0 = null;
public String T0 = "";
public String V0 = "";
public String W0 = "";
public String X0 = "";
public String Y0 = "";
public String Z0 = "";
public String f21557a1 = "";
public String f21558b1 = "";
public String f21560c1 = "";
public class a extends f7.d {
public a(View view, ViewGroup viewGroup) {
super(view, viewGroup);
}
@Override
public final void onProgressChanged(WebView webView, int i) {
}
}
public static class b extends WebViewClient {
public final WeakReference<w> f21574a;
public b(w wVar) {
this.f21574a = new WeakReference<>(wVar);
}
@Override
public final void onLoadResource(WebView webView, String str) {
String str2;
w wVar = this.f21574a.get();
if (wVar != null && wVar.G() && !wVar.f24144m) {
try {
if (str.contains("youtube.com")) {
String decode = URLDecoder.decode(str, "UTF-8");
if (decode.contains("youtube.com/get_video_info")) {
int indexOf = decode.indexOf("video_id=") + 9;
str2 = String.format("https://youtu.be/%s", decode.substring(indexOf, decode.indexOf(q2.i.f20139c, indexOf)));
try {
wVar.u0();
Bundle bundle = new Bundle();
bundle.putString("b_url", str2);
i7.l.B(wVar.d0(), bundle);
} catch (Exception unused) {
wVar.u0();
wVar.v0(str2);
super.onLoadResource(webView, str);
}
}
}
} catch (Exception unused2) {
str2 = str;
}
}
super.onLoadResource(webView, str);
}
@Override
public final WebResourceResponse shouldInterceptRequest(WebView webView, WebResourceRequest webResourceRequest) {
boolean z10;
List<String> list;
boolean z11;
List<String> list2;
List<String> list3;
WebResourceResponse webResourceResponse;
List<String> list4;
List<String> list5;
List<String> list6;
w wVar = this.f21574a.get();
if (wVar != null && wVar.G() && !wVar.f24144m) {
try {
ByteArrayInputStream byteArrayInputStream = new ByteArrayInputStream("".getBytes());
String uri = webResourceRequest.getUrl().toString();
int i = x6.a.U;
o6.d t02 = wVar.t0();
boolean z12 = true;
if (t02 != null) {
z10 = true;
} else {
z10 = false;
}
if (z10 && (list6 = t02.f27700z) != null && !list6.isEmpty()) {
list = t02.f27700z;
} else {
list = null;
}
String y02 = x6.a.y0(list);
if (!TextUtils.isEmpty(y02) && i7.l.H(uri, y02)) {
try {
InputStream open = wVar.f0().getAssets().open("empty.png");
byte[] bArr = new byte[open.available()];
open.read(bArr);
open.close();
return new WebResourceResponse("image/png", "UTF-8", new ByteArrayInputStream(bArr));
} catch (Exception unused) {
webResourceResponse = new WebResourceResponse("text/plain", "UTF-8", byteArrayInputStream);
}
} else {
o6.d t03 = wVar.t0();
if (t03 != null) {
z11 = true;
} else {
z11 = false;
}
if (z11 && (list5 = t03.f27699y) != null && !list5.isEmpty()) {
list2 = t03.f27699y;
} else {
list2 = null;
}
String y03 = x6.a.y0(list2);
if (!TextUtils.isEmpty(y03) && i7.l.H(uri, y03)) {
webResourceResponse = new WebResourceResponse("text/plain", "UTF-8", byteArrayInputStream);
} else {
String y10 = i7.u.y();
if (!TextUtils.isEmpty(y10) && i7.l.H(uri, y10)) {
webResourceResponse = new WebResourceResponse("text/plain", "UTF-8", byteArrayInputStream);
} else {
o6.d t04 = wVar.t0();
if (t04 == null) {
z12 = false;
}
if (z12 && (list4 = t04.f27698x) != null && !list4.isEmpty()) {
list3 = t04.f27698x;
} else {
list3 = null;
}
String y04 = x6.a.y0(list3);
if (TextUtils.isEmpty(y04) || i7.l.H(uri, y04)) {
return null;
}
webResourceResponse = new WebResourceResponse("text/plain", "UTF-8", byteArrayInputStream);
}
}
}
return webResourceResponse;
} catch (Exception unused2) {
return null;
}
}
return super.shouldInterceptRequest(webView, webResourceRequest);
}
@Override
public final boolean shouldOverrideUrlLoading(WebView webView, WebResourceRequest webResourceRequest) {
String str;
String str2;
boolean z10;
Intent intent;
String str3;
List<String> list;
List<String> list2;
?? r22;
String str4;
?? r23;
boolean H;
g6.d dVar;
String h10;
w wVar = this.f21574a.get();
if (wVar != null && wVar.G() && !wVar.f24144m) {
String uri = webResourceRequest.getUrl().toString();
?? r14 = "android.intent.action.VIEW";
String str5 = "";
try {
str = new URL(uri).getHost();
} catch (Exception unused) {
str = "";
}
int i = 65536;
i = 65536;
i = 65536;
i = 65536;
try {
h10 = i7.u.h();
} catch (Exception unused2) {
}
if (!uri.startsWith("intent:") && !i7.l.H(str, h10)) {
if (uri.startsWith(wVar.B(R.string.scheme_my_app))) {
DeepLinkActivity.A = true;
Intent intent2 = new Intent("android.intent.action.VIEW");
intent2.addCategory("android.intent.category.BROWSABLE");
intent2.setData(Uri.parse(uri));
intent2.setPackage("com.millingoupdate.app");
intent2.setFlags(65536);
wVar.n0(intent2);
str = str;
uri = uri;
r14 = r14;
return true;
}
boolean z11 = false;
if (!str.contains("youtube.com") && !str.contains("youtu.be") && !str.contains("youtube-nocookie.com")) {
boolean startsWith = uri.startsWith("vnd.youtube:");
str2 = uri;
}
String j4 = pa.w.j(uri);
boolean startsWith2 = uri.startsWith("vnd.youtube:");
String str6 = uri;
if (startsWith2) {
j4 = uri.replace("vnd.youtube:", str5);
str6 = String.format("https://youtu.be/%s", j4);
}
str2 = str6;
if (!TextUtils.isEmpty(j4)) {
str2 = str6;
if (j4.trim().length() == 11) {
Bundle bundle = new Bundle();
str5 = "b_url";
bundle.putString("b_url", str6);
i1.v d0 = wVar.d0();
i7.l.B(d0, bundle);
str = str;
i = i;
uri = d0;
r14 = bundle;
return true;
}
}
if (str.contains("instagram.com") || str.contains("twitter.com") || str2.startsWith("whatsapp://") || str2.startsWith("mailto:")) {
if (ae.d.d().c("is_open_in_external_app")) {
Intent intent3 = new Intent((String) r14, Uri.parse(str2));
if (str.contains("instagram.com")) {
intent3.setPackage("com.instagram.android");
boolean b10 = i7.l.b(wVar.d0(), intent3);
str3 = str;
intent = intent3;
z10 = b10;
if (!b10) {
intent3.setPackage("com.instagram.lite");
str3 = str;
intent = intent3;
z10 = "com.instagram.lite";
}
} else if (str.contains("twitter.com")) {
intent3.setPackage("com.twitter.android");
boolean b11 = i7.l.b(wVar.d0(), intent3);
str3 = str;
intent = intent3;
z10 = b11;
if (!b11) {
intent3.setPackage("com.twitter.android.lite");
str3 = str;
intent = intent3;
z10 = "com.twitter.android.lite";
}
} else if (str2.startsWith("whatsapp://")) {
intent3.setPackage("com.whatsapp");
boolean b12 = i7.l.b(wVar.d0(), intent3);
str3 = str;
intent = intent3;
z10 = b12;
if (!b12) {
intent3.setPackage("com.whatsapp.w4b");
str3 = str;
intent = intent3;
z10 = "com.whatsapp.w4b";
}
} else {
boolean startsWith3 = str2.startsWith("mailto:");
str3 = str;
intent = intent3;
z10 = startsWith3;
if (startsWith3) {
?? parse = Uri.parse("mailto:");
Intent intent4 = new Intent("android.intent.action.SENDTO", (Uri) parse);
str3 = parse;
intent = intent4;
z10 = "android.intent.action.SENDTO";
}
}
intent.setFlags(i);
wVar.n0(intent);
str = str3;
i = i;
uri = str2;
r14 = z10;
return true;
}
}
o6.d t02 = wVar.t0();
if (t02 != null) {
list = 1;
} else {
list = null;
}
?? r42 = 0;
i = 0;
r42 = 0;
r42 = 0;
List<String> list3 = list;
if (list != null) {
List<String> list4 = t02.B;
list3 = list4;
if (list4 != null) {
?? isEmpty = list4.isEmpty();
list3 = isEmpty;
if (isEmpty == 0) {
list2 = t02.B;
r22 = isEmpty;
if (list2 != null && (r22 = list2.isEmpty()) == 0) {
com.google.gson.d dVar2 = new com.google.gson.d();
dVar2.f17807j = true;
r22 = dVar2.a();
dVar = new g6.d();
dVar.f23261a = new ArrayList();
for (String str7 : list2) {
if (!TextUtils.isEmpty(str7)) {
dVar.f23261a.add(str7);
}
}
if (!dVar.f23261a.isEmpty()) {
str4 = r22.g(dVar);
r23 = r22;
H = i7.l.H(str2, str4);
if (H) {
wVar.v0(str2);
str = r23;
uri = str2;
r14 = H;
} else {
o6.d t03 = wVar.t0();
if (t03 != null) {
z11 = true;
}
if (z11 && (r23 = t03.A) != 0 && (r23 = r23.isEmpty()) == 0) {
r42 = t03.A;
}
if (r42 != 0 && !r42.isEmpty()) {
com.google.gson.d dVar3 = new com.google.gson.d();
dVar3.f17807j = true;
Gson a10 = dVar3.a();
r23 = new g6.d();
r23.f23261a = new ArrayList();
for (String str8 : r42) {
if (!TextUtils.isEmpty(str8)) {
r23.f23261a.add(str8);
}
}
r42 = r23.f23261a.isEmpty();
if (r42 == 0) {
str5 = a10.g(r23);
}
}
boolean H2 = i7.l.H(str2, str5);
str = r23;
i = r42;
uri = str2;
r14 = H2;
if (!H2) {
wVar.v0(str2);
str = r23;
i = r42;
uri = str2;
r14 = H2;
}
}
return true;
}
}
str4 = str5;
r23 = r22;
H = i7.l.H(str2, str4);
if (H) {
}
return true;
}
}
}
list2 = null;
r22 = list3;
if (list2 != null) {
com.google.gson.d dVar22 = new com.google.gson.d();
dVar22.f17807j = true;
r22 = dVar22.a();
dVar = new g6.d();
dVar.f23261a = new ArrayList();
while (r14.hasNext()) {
}
if (!dVar.f23261a.isEmpty()) {
}
}
str4 = str5;
r23 = r22;
H = i7.l.H(str2, str4);
if (H) {
}
return true;
}
DeepLinkActivity.A = true;
Intent parseUri = Intent.parseUri(uri, 1);
parseUri.setFlags(65536);
wVar.n0(parseUri);
str = str;
uri = uri;
r14 = r14;
return true;
}
return super.shouldOverrideUrlLoading(webView, webResourceRequest);
}
}
@Override
public final void M(Bundle bundle) {
super.M(bundle);
if (!this.D) {
this.D = true;
if (G() && !H()) {
this.t.K();
}
}
}
@Override
public final View N(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
Bundle bundle2;
View inflate = layoutInflater.inflate(R.layout.frag_entry_detail, viewGroup, false);
if (bundle != null) {
this.f21568l0 = bundle.getBundle("key_bundle");
this.V0 = bundle.getString("mBgHexColor", "");
this.W0 = bundle.getString("mTextHexColor", "");
this.X0 = bundle.getString("mHeaderHexColor", "");
this.Y0 = bundle.getString("mSubHeaderHexColor", "");
this.Z0 = bundle.getString("mFeedTitleHexColor", "");
this.f21557a1 = bundle.getString("mLinkHexColor", "");
this.f21558b1 = bundle.getString("mButtonHexColor", "");
this.f21560c1 = bundle.getString("mBtnBorderHexColor", "");
}
if (this.f21568l0 == null && (bundle2 = this.f24139g) != null) {
this.f21568l0 = bundle2;
}
Bundle bundle3 = this.f21568l0;
if (bundle3 != null) {
this.f21569m0 = bundle3.getString("post_id");
this.f21570n0 = this.f21568l0.getString(q2.h.D0);
this.f21571o0 = this.f21568l0.getString("date");
this.f21572p0 = this.f21568l0.getLong("date_millis");
this.f21573q0 = this.f21568l0.getString("content");
this.f21561d1 = this.f21568l0.getString("stream_data");
this.R0 = this.f21568l0.getString("thumb");
this.S0 = this.f21568l0.getString("b_url");
}
this.f21562e0 = (WebView) inflate.findViewById(R.id.detailWebView);
this.f21566j0 = (LinearLayout) inflate.findViewById(R.id.footerLayout);
this.f21567k0 = (LinearLayout) inflate.findViewById(R.id.socialButtonsContainer);
inflate.findViewById(R.id.divider).setVisibility(8);
CookieManager.getInstance().setAcceptCookie(true);
CookieManager.getInstance().setAcceptThirdPartyCookies(this.f21562e0, true);
WebSettings settings = this.f21562e0.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDomStorageEnabled(true);
settings.setBuiltInZoomControls(false);
settings.setDisplayZoomControls(false);
settings.setSaveFormData(false);
settings.setMediaPlaybackRequiresUserGesture(ae.d.d().c("is_media_require_user_gesture"));
this.f21562e0.setHapticFeedbackEnabled(false);
WebView.setWebContentsDebuggingEnabled(false);
a aVar = new a(d0().findViewById(R.id.nonVideoFullscreenLayout), (ViewGroup) d0().findViewById(R.id.videoFullscreenLayout));
this.f0 = aVar;
aVar.f22676f = new androidx.lifecycle.n(6, this);
this.f21562e0.setWebChromeClient(aVar);
this.f21562e0.setWebViewClient(new b(this));
return inflate;
}
@Override
public final void P() {
i7.t.W(f0(), this.f21559c0);
this.F = true;
}
@Override
public final void Q() {
try {
WebView webView = this.f21562e0;
if (webView != null) {
webView.loadUrl("about:blank");
this.f21562e0.setWebChromeClient(null);
this.f21562e0.removeAllViews();
this.f21562e0.destroy();
this.f21562e0 = null;
}
} catch (Exception unused) {
}
this.F = true;
}
@Override
public final boolean S(MenuItem menuItem) {
if (menuItem.getItemId() == R.id.menu_refresh) {
u0();
return true;
} else if (menuItem.getItemId() == R.id.menu_share) {
String str = this.f21569m0;
String str2 = this.f21570n0;
String str3 = this.S0;
c7.l x02 = c7.l.x0(i7.l.g(str, str2, str3, this.R0, str3, B(R.string.scheme_my_app)));
x02.t0(v(), x02.f24155y);
return true;
} else if (menuItem.getItemId() == R.id.menu_open_in_browser) {
v0(this.S0);
return true;
} else {
return false;
}
}
@Override
public final void U(Menu menu) {
MenuItem findItem = menu.findItem(R.id.menu_toggle_bookmark);
if (findItem != null) {
findItem.setVisible(false);
}
}
@Override
public final void V() {
super.V();
i7.t.l(f0(), this.f21559c0);
WebView webView = this.f21562e0;
if (webView != null) {
webView.setOnCreateContextMenuListener(this);
this.f21562e0.setDownloadListener(this.d0);
}
}
@Override
public final void W(Bundle bundle) {
bundle.putBundle("key_bundle", this.f21568l0);
bundle.putString("mBgHexColor", this.V0);
bundle.putString("mTextHexColor", this.W0);
bundle.putString("mHeaderHexColor", this.X0);
bundle.putString("mSubHeaderHexColor", this.Y0);
bundle.putString("mFeedTitleHexColor", this.Z0);
bundle.putString("mLinkHexColor", this.f21557a1);
bundle.putString("mButtonHexColor", this.f21558b1);
bundle.putString("mBtnBorderHexColor", this.f21560c1);
}
@Override
public final void Y() {
this.F = true;
WebView webView = this.f21562e0;
if (webView != null) {
webView.setOnCreateContextMenuListener(null);
this.f21562e0.setDownloadListener(null);
}
}
@Override
public final void Z(Bundle bundle, View view) {
TypedValue typedValue = new TypedValue();
Resources.Theme theme = f0().getTheme();
theme.resolveAttribute(R.attr.entryDetailBackground, typedValue, true);
int i = typedValue.data;
this.V0 = String.format("#%06X", Integer.valueOf(i & 16777215));
this.f21562e0.setBackgroundColor(i);
theme.resolveAttribute(R.attr.entryDetailColor, typedValue, true);
this.W0 = String.format("#%06X", Integer.valueOf(typedValue.data & 16777215));
theme.resolveAttribute(R.attr.entryDetailHeaderColor, typedValue, true);
this.X0 = String.format("#%06X", Integer.valueOf(typedValue.data & 16777215));
theme.resolveAttribute(R.attr.entryDetailSubHeaderColor, typedValue, true);
this.Y0 = String.format("#%06X", Integer.valueOf(typedValue.data & 16777215));
theme.resolveAttribute(R.attr.entryDetailFeedTitleColor, typedValue, true);
this.Z0 = String.format("#%06X", Integer.valueOf(typedValue.data & 16777215));
theme.resolveAttribute(R.attr.entryDetailLinkColor, typedValue, true);
this.f21557a1 = String.format("#%06X", Integer.valueOf(typedValue.data & 16777215));
theme.resolveAttribute(R.attr.entryDetailButtonColor, typedValue, true);
this.f21558b1 = String.format("#%06X", Integer.valueOf(typedValue.data & 16777215));
theme.resolveAttribute(R.attr.entryDetailButtonBorderColor, typedValue, true);
this.f21560c1 = String.format("#%06X", Integer.valueOf(typedValue.data & 16777215));
u0();
}
@Override
public final void onCreateContextMenu(ContextMenu contextMenu, View view, ContextMenu.ContextMenuInfo contextMenuInfo) {
WebView webView;
super.onCreateContextMenu(contextMenu, view, contextMenuInfo);
try {
if (view.getId() != R.id.detailWebView || (webView = this.f21562e0) == null) {
return;
}
WebView.HitTestResult hitTestResult = webView.getHitTestResult();
if (hitTestResult.getExtra() == null) {
return;
}
final String trim = hitTestResult.getExtra().trim();
if (!TextUtils.isEmpty(trim) && !trim.startsWith("file:///") && !trim.startsWith("comments://") && !trim.startsWith(this.T0)) {
if (hitTestResult.getType() == 5 || hitTestResult.getType() == 8) {
contextMenu.add(0, 1, 0, B(R.string.browse_open_in_browser)).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
int i = w.f21556e1;
w wVar = w.this;
wVar.getClass();
String str = trim;
if (!TextUtils.isEmpty(str)) {
i7.l.d(wVar.d0(), str);
return false;
}
return false;
}
});
contextMenu.add(0, 2, 0, B(R.string.save)).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
int i = w.f21556e1;
w wVar = w.this;
wVar.getClass();
String str = trim;
if (!TextUtils.isEmpty(str)) {
i7.l.d(wVar.d0(), str);
return false;
}
return false;
}
});
contextMenu.add(0, 3, 0, B(R.string.share)).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public final boolean onMenuItemClick(MenuItem menuItem) {
String str;
String str2;
String str3;
String str4 = trim;
int i = w.f21556e1;
w wVar = w.this;
wVar.getClass();
String str5 = "";
if (!TextUtils.isEmpty(str4)) {
try {
if (!str4.equals(wVar.S0)) {
str3 = "";
} else {
str = wVar.f21570n0;
try {
str3 = wVar.R0;
str5 = str;
} catch (Exception unused) {
str2 = "";
c7.l x02 = c7.l.x0(i7.l.g(null, str, str4, str2, str4, wVar.B(R.string.scheme_my_app)));
x02.t0(wVar.v(), x02.f24155y);
return false;
}
}
str2 = str3;
str = str5;
} catch (Exception unused2) {
str = "";
}
c7.l x022 = c7.l.x0(i7.l.g(null, str, str4, str2, str4, wVar.B(R.string.scheme_my_app)));
x022.t0(wVar.v(), x022.f24155y);
return false;
}
return false;
}
});
}
}
} catch (Exception unused) {
}
}
public final o6.d t0() {
try {
if (!TextUtils.isEmpty(this.f21561d1)) {
return (o6.d) new Gson().b(o6.d.class, this.f21561d1);
}
return null;
} catch (Exception unused) {
return null;
}
}
public final void u0() {
String o10;
g6.d dVar;
List<String> list;
g6.d dVar2;
List<String> list2;
boolean z10;
String str;
StringBuilder sb = new StringBuilder("body {background:");
sb.append(this.V0);
sb.append("!important;color:");
this.U0 = b0.c.o(sb, this.W0, "!important;}");
StringBuilder sb2 = new StringBuilder();
sb2.append(this.U0);
sb2.append(".header_x a,h1,h2,h3,h4,h5,h6{color:");
this.U0 = b0.c.o(sb2, this.X0, "!important;}");
StringBuilder sb3 = new StringBuilder();
sb3.append(this.U0);
sb3.append(".subheader_x{color:");
this.U0 = b0.c.o(sb3, this.Y0, "!important;}");
StringBuilder sb4 = new StringBuilder();
sb4.append(this.U0);
sb4.append(".subheader_x #feedTitle{color:");
this.U0 = b0.c.o(sb4, this.Z0, "!important;}");
StringBuilder sb5 = new StringBuilder();
sb5.append(this.U0);
sb5.append(".content_x a{color:");
sb5.append(this.W0);
sb5.append(";text-decoration: underline;text-decoration-color:");
this.U0 = b0.c.o(sb5, this.f21557a1, ";}");
StringBuilder sb6 = new StringBuilder();
sb6.append(this.U0);
sb6.append(".buttonVisitWeb{border-color:");
sb6.append(this.f21560c1);
sb6.append(";color:");
this.U0 = b0.c.o(sb6, this.f21558b1, "!important;}");
Context f0 = f0();
int parseInt = Integer.parseInt(f0.getSharedPreferences(androidx.preference.e.a(f0), 0).getString("entry_detail_font_size", "2"));
if (parseInt != 0) {
if (parseInt != 1) {
if (parseInt != 3) {
if (parseInt != 4) {
if (i7.l.w(f0())) {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:26px;}");
} else {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:18px;}");
}
} else if (i7.l.w(f0())) {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:30px;}");
} else {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:24px;}");
}
} else if (i7.l.w(f0())) {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:28px;}");
} else {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:20px;}");
}
} else if (i7.l.w(f0())) {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:24px;}");
} else {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:16px;}");
}
} else if (i7.l.w(f0())) {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:22px;}");
} else {
this.U0 = b0.c.o(new StringBuilder(), this.U0, "body{font-size:14px;}");
}
if (TextUtils.isEmpty(this.U0.trim())) {
this.U0 = "";
}
try {
URL url = new URL(this.S0);
o6.d t02 = t0();
if (t02 != null) {
z10 = true;
} else {
z10 = false;
}
if (!z10 || TextUtils.isEmpty(t02.f27697w)) {
str = "";
} else {
str = i7.l.m(null, t02.f27697w);
}
if (!TextUtils.isEmpty(str) && (URLUtil.isHttpsUrl(str) || URLUtil.isHttpUrl(str))) {
url = new URL(str);
}
this.T0 = url.getProtocol() + "://" + url.getHost();
} catch (Exception unused) {
}
try {
long j4 = this.f21572p0;
if (j4 != 0) {
CharSequence relativeTimeSpanString = DateUtils.getRelativeTimeSpanString(j4, System.currentTimeMillis(), 1000L);
if (!TextUtils.isEmpty(relativeTimeSpanString)) {
this.f21571o0 = relativeTimeSpanString.toString();
}
} else {
String d10 = i7.p.d(this.f21571o0);
if (!TextUtils.isEmpty(d10)) {
this.f21571o0 = d10;
}
}
} catch (Exception unused2) {
}
if (TextUtils.isEmpty(this.f21571o0)) {
o10 = "";
} else {
o10 = b0.c.o(new StringBuilder("<span id=\"entryDate\">"), this.f21571o0, "</span>");
}
this.f21571o0 = o10;
String format = String.format("%s", o10);
String B = B(R.string.browse_visit_website);
if (ae.d.d().c("is_check_rtl")) {
try {
dk.b bVar = new dk.b();
Bidi bidi = new Bidi(bVar.f(new StringReader(this.f21573q0 + this.f21570n0), "", new dk.f(bVar)).q0().n0(), -2);
if (bidi.isRightToLeft() || (bidi.isMixed() && !bidi.baseIsLeftToRight())) {
this.U0 += "body{direction:rtl;text-align:right;unicode-bidi:normal;}";
this.f21562e0.setLayoutDirection(1);
}
} catch (Exception unused3) {
}
}
this.U0 = b0.c.o(new StringBuilder(), this.U0, ".bodywrap_x #visitWeb{display:none !important;}");
if (ae.d.d().c("is_content_img_shadowed")) {
this.U0 = b0.c.o(new StringBuilder(), this.U0, ".content_x img{border-radius:3px !important;}");
this.U0 = b0.c.o(new StringBuilder(), this.U0, ".content_x img{box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24) !important;}");
}
String replace = this.f21573q0.replace("<br>", "");
this.f21573q0 = replace;
String str2 = this.f21570n0;
String str3 = this.S0;
StringBuilder h10 = b2.p.h("<!doctype html><html><head><meta charset=\"UTF-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, user-scalable=no\"><link rel=\"stylesheet\" type=\"text/css\" href=\"file:///android_asset/style.css\"><style type=\"text/css\">", b0.c.n("@font-face{font-family:'Lato Bold';src:url('file:///android_asset/font/lato_bold.ttf')}@font-face{font-family:'Roboto Regular';src:url('file:///android_asset/font/roboto_regular.ttf')}", this.U0), "</style></head><body><div class=\"bodywrap_x\"><div class=\"header_x\"><a href=\"#\">", str2, "</a></div><div class=\"divider_x\"></div><div class=\"subheader_x\">");
h10.append(format);
h10.append("</div><div class=\"divider_x\"></div><div class=\"content_x\">");
h10.append(replace);
h10.append("</div><div class=\"divider_x\"></div><div id=\"visitWeb\"><a href=\"");
h10.append(str3);
h10.append("\" class=\"buttonVisitWeb\">");
h10.append(B);
h10.append("</a></div></div></body></html>");
ck.f b10 = dk.f.a().b(h10.toString(), "");
if (!TextUtils.isEmpty(this.R0)) {
b10.q0().i0("img[src*=" + this.R0 + q2.i.f20142e).d();
}
String f10 = ae.d.d().f("image_src_contains_json");
if (!TextUtils.isEmpty(f10) && (dVar2 = (g6.d) new Gson().b(g6.d.class, f10)) != null && (list2 = dVar2.f23261a) != null && !list2.isEmpty()) {
for (String str4 : dVar2.f23261a) {
if (!str4.equalsIgnoreCase("file:///")) {
b10.q0().i0("img[src*=" + str4 + q2.i.f20142e).d();
}
}
}
String f11 = ae.d.d().f("image_src_ends_with_json");
if (!TextUtils.isEmpty(f11) && (dVar = (g6.d) new Gson().b(g6.d.class, f11)) != null && (list = dVar.f23261a) != null && !list.isEmpty()) {
Iterator<String> it = dVar.f23261a.iterator();
while (it.hasNext()) {
b10.q0().i0("img[src$=" + it.next() + q2.i.f20142e).d();
}
}
if (i7.l.u(f0())) {
Iterator<ck.o> it2 = b10.q0().i0("blockquote[class*=\"twitter\"]").iterator();
while (it2.hasNext()) {
it2.next().e("data-theme", "dark");
}
}
String c02 = b10.c0();
WebView webView = this.f21562e0;
if (webView != null) {
webView.loadDataWithBaseURL(this.T0, c02, "text/html", "UTF-8", null);
}
if (G() && !this.f24144m) {
Handler handler = new Handler(Looper.getMainLooper());
g2 g2Var = new g2(15, this);
long e10 = ae.d.d().e("app_footer_delay_millis");
if (e10 < 1) {
e10 = 2000;
}
handler.postDelayed(g2Var, e10);
}
}
public final void v0(String str) {
if (ae.d.d().c("is_use_custom_webview")) {
Bundle bundle = new Bundle();
bundle.putString("b_url", str);
i7.l.h(d0(), bundle);
return;
}
i7.l.d(d0(), str);
}
}