正在查看: Moneyman v2.316.0.0 应用的 s.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Moneyman v2.316.0.0 应用的 s.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.freshchat.consumer.sdk.l;
import B.AbstractC0151g;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import com.exponea.sdk.services.inappcontentblock.ContentBlockCarouselViewController;
import com.freshchat.consumer.sdk.R;
import com.freshchat.consumer.sdk.beans.FAQ;
import com.freshchat.consumer.sdk.beans.reqres.FAQFetchResponse;
import com.freshchat.consumer.sdk.service.Status;
import com.freshchat.consumer.sdk.service.e.h;
import com.freshchat.consumer.sdk.util.aj;
import com.freshchat.consumer.sdk.util.ba;
import com.freshchat.consumer.sdk.util.db;
import com.freshchat.consumer.sdk.util.ds;
import java.util.regex.Pattern;
public class s extends a {
private Status Aa;
private final com.freshchat.consumer.sdk.b.d Bl;
private String f19063b;
private String f19064c;
private String f19065d;
private FAQ f19066e;
private String f19067f;
private final String f19068h;
private String f19069s;
private final String f19070t;
private final String f19071u;
private boolean f19072y;
private String f19073z;
public s(Context context) {
super(context);
this.f19069s = "HL_ARTICLE_TITLE";
String t7 = AbstractC0151g.t(new StringBuilder("<head><link rel=\"stylesheet\" type=\"text/css\" href=\"file:///android_res/raw/normalize.css\"/><script src='file:///freshchat_assets/freshchat_hacks.js'></script><title>"), this.f19069s, "</title></head>");
this.f19070t = t7;
this.f19071u = Z.l.p("<!DOCTYPE html>\t<html>", t7, "<body onload='correctIframe()'> <bdi>");
this.f19068h = "</bdi></body></html>";
this.Bl = new com.freshchat.consumer.sdk.b.d(a());
}
private void e(Status status) {
this.Aa = status;
}
private boolean lY() {
FAQ faq = this.f19066e;
if (faq == null) {
return false;
}
return this.Bl.b(this.f19064c, this.f19063b, faq.getLastUpdatedAt());
}
private boolean lZ() {
FAQ faq = this.f19066e;
if (faq == null) {
return false;
}
return this.Bl.a(this.f19064c, this.f19063b, faq.getLastUpdatedAt());
}
public String P() {
return a().getString(R.string.freshchat_no_articles_found);
}
public void a(h.a aVar) {
com.freshchat.consumer.sdk.util.b.a(a(), this.f19064c, this.f19063b, aVar, this.f19066e.getLanguage(), this.f19066e.getLastUpdatedAt());
this.f19073z = this.f19063b;
b(aVar);
}
public void b(h.a aVar) {
ba.a(a(), this.f19064c, this.f19065d, this.f19063b, this.f19067f, aVar == h.a.THUMBS_UP);
}
public boolean g(Bundle bundle) {
return (bundle == null || !bundle.containsKey("article_id") || ds.c(bundle.getString("article_id")) || !bundle.containsKey("category_id") || ds.c(bundle.getString("category_id"))) ? false : true;
}
@Override
public void h(Intent intent) {
super.h(intent);
if (intent.hasExtra("article_id")) {
this.f19063b = intent.getStringExtra("article_id");
}
if (intent.hasExtra("category_id")) {
this.f19064c = intent.getStringExtra("category_id");
}
if (intent.hasExtra("EXTRA_FAQ_VIEW_TITLE")) {
this.f19067f = intent.getStringExtra("EXTRA_FAQ_VIEW_TITLE");
}
if (intent.hasExtra("category_name")) {
this.f19065d = intent.getStringExtra("category_name");
}
if (intent.hasExtra("LAUNCHED_FROM_CONVERSATION")) {
this.f19072y = intent.getBooleanExtra("LAUNCHED_FROM_CONVERSATION", false);
}
}
public boolean i(Bundle bundle) {
com.freshchat.consumer.sdk.service.e.i iVar;
if (bundle == null || (iVar = (com.freshchat.consumer.sdk.service.e.i) bundle.getParcelable("RESPONSE")) == null) {
return false;
}
return Status.SUCCESS.equals(iVar.getStatus());
}
@Override
public void kF() {
this.f19066e = null;
}
@Override
public Status kG() {
if (db.cm(a())) {
com.freshchat.consumer.sdk.util.b.g(a(), this.f19063b, this.f19064c);
e(Status.INIT_LOADING);
} else {
e(Status.NO_INTERNET);
}
return this.Aa;
}
public Status kP() {
if (db.cm(a()) && this.Aa == Status.NO_INTERNET) {
kG();
e(Status.INIT_LOADING);
}
return this.Aa;
}
public Status kS() {
return kG();
}
public String kT() {
return ds.c(this.f19065d) ? a().getString(R.string.freshchat_activity_title_article_detail) : this.f19065d;
}
public String kX() {
String str;
if (this.f19066e == null) {
return null;
}
StringBuilder sb = new StringBuilder();
String replaceAll = this.f19066e.getContent().replaceAll("src=\"//", "src=\"http://").replaceAll("value=\"//", "value=\"http://");
Pattern compile = Pattern.compile("<\\s*(img|iframe).*?src\\s*=[ '\"]+http[s]?:\\/\\/.*?>");
if (db.cm(a()) || !compile.matcher(replaceAll).find()) {
str = ContentBlockCarouselViewController.EMPTY_PLACEHOLDER_ID;
} else {
str = "<div class='offline-article-message'>" + a().getString(R.string.freshchat_faq_rich_media_content_cannot_be_displayed) + "</div>";
}
sb.append(this.f19071u);
sb.append("<div class=\"article-title\";><h3 >");
sb.append(this.f19066e.getTitle());
sb.append("</h3></div>");
sb.append(str);
sb.append("<div class=\"article-body\">");
String t7 = AbstractC0151g.t(sb, replaceAll, "</div></bdi></body></html>");
return !ds.c(this.f19066e.getCategoryName()) ? t7.replace(this.f19069s, this.f19066e.getCategoryName()) : t7;
}
public void lX() {
ba.a(a(), this.f19064c, this.f19065d, this.f19063b, this.f19067f, this.f19036B);
}
public boolean ma() {
String str = this.f19073z;
if (str == null || !str.equals(this.f19063b)) {
return !lY();
}
return false;
}
public boolean mb() {
if (e()) {
return lZ();
}
return false;
}
public boolean mc() {
return this.f19072y;
}
public Status h(Bundle bundle) {
try {
} catch (Exception e4) {
e(Status.ERROR);
aj.a(e4);
}
if (bundle != null) {
FAQFetchResponse fAQFetchResponse = (FAQFetchResponse) bundle.getParcelable("RESPONSE");
if (fAQFetchResponse != null) {
this.f19066e = fAQFetchResponse.getFaq();
e(fAQFetchResponse.getStatus());
return this.Aa;
}
throw new IllegalArgumentException("faqFetchResponse cannot be null in FAQDetailViewModel::processResponse()");
}
throw new IllegalArgumentException("bundle cannot be null in FAQDetailViewModel::processResponse()");
}
}