Idle Egg Factory v2.1.5版本的 MD5 值为:7d2ba6677008ca521af0101bb927d72a
以下内容为反编译后的 l.java 源代码,内容仅作参考
package com.ironsource.mediationsdk.utils;
import android.content.Context;
import android.text.TextUtils;
import com.ironsource.mediationsdk.InitConfig;
import com.ironsource.mediationsdk.adunit.data.DataKeys;
import com.ironsource.mediationsdk.logger.IronSourceLogger;
import com.ironsource.mediationsdk.logger.IronSourceLoggerManager;
import com.ironsource.mediationsdk.model.ApplicationAuctionSettings;
import com.ironsource.mediationsdk.model.ApplicationExternalSettings;
import com.ironsource.mediationsdk.model.InterstitialPlacement;
import com.ironsource.mediationsdk.model.NetworkSettings;
import com.ironsource.mediationsdk.model.Placement;
import com.ironsource.mediationsdk.model.m;
import com.ironsource.mediationsdk.model.q;
import com.ironsource.mediationsdk.model.r;
import com.safedk.android.analytics.events.CrashEvent;
import com.tapjoy.TapjoyConstants;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class l {
private final String A;
private final String B;
private final String C;
private final String D;
private final String E;
private final String F;
private final String G;
private final String H;
private final String I;
private final String J;
private final String K;
private final String L;
private final String M;
private final String N;
private final String O;
private final String P;
private final String Q;
private final String R;
private final String S;
private final String T;
private final String U;
private final String V;
private final String W;
private final String X;
private final String Y;
private final String Z;
public com.ironsource.mediationsdk.model.o f5453a;
private final String aA;
private final String aB;
private final String aC;
private final String aD;
private final String aE;
private final String aF;
private final String aG;
private final String aH;
private final String aI;
private final String aJ;
private final String aK;
private final String aL;
private final String aM;
private final String aN;
private final String aO;
private final String aP;
private final String aQ;
private final String aR;
private final String aS;
private final String aT;
private final String aU;
private final String aV;
private final String aW;
private final String aX;
private final String aY;
private final String aZ;
private final String aa;
private final String ab;
private final String ac;
private final String ad;
private final String ae;
private final String af;
private final String ag;
private final String ah;
private final String ai;
private final String aj;
private final String ak;
private final String al;
private final String am;
private final String an;
private final String ao;
private final String ap;
private final String aq;
private final String ar;
private final String as;
private final String at;
private final String au;
private final String av;
private final String aw;
private final String ax;
private final String ay;
private final String az;
public com.ironsource.mediationsdk.model.p b;
private final String ba;
private final String bb;
private final String bc;
private final String bd;
private final String be;
private final String bf;
private final String bg;
private final String bh;
private final String bi;
private final String bj;
private final String bk;
private final String bl;
private final String bm;
private final String bn;
private final String bo;
private final String bp;
private final String bq;
private final String br;
private final String bs;
private final String bt;
private final String bu;
private final String bv;
private String bw;
private String bx;
private Context by;
public com.ironsource.mediationsdk.model.i c;
public JSONObject d;
public int e;
private final String f;
private final int g;
private final int h;
private final int i;
private final int j;
private final int k;
private final int l;
private final int m;
private final int n;
private final int o;
private final int p;
private final int q;
private final long r;
private final int s;
private final boolean t;
private final int u;
private final int v;
private final int w;
private final int x;
private final String y;
private final String z;
public static final class a {
public static final int f5454a = 1;
public static final int b = 2;
public static final int c = 3;
private static final int[] d = {1, 2, 3};
}
public l(Context context, String str, String str2, String str3) {
this.f = "error";
this.g = 3;
this.h = 2;
this.i = 60;
this.j = 10000;
this.k = 5000;
this.l = 300;
this.m = 3;
this.n = 3;
this.o = 3;
this.p = 2;
this.q = 15;
this.r = 10000L;
this.s = 0;
this.t = false;
this.u = com.safedk.android.analytics.brandsafety.l.c;
this.v = -1;
this.w = 5000;
this.x = 1;
this.y = "providerOrder";
this.z = "providerSettings";
this.A = TapjoyConstants.PREF_SERVER_PROVIDED_CONFIGURATIONS;
this.B = IronSourceConstants.EVENTS_GENERIC_PARAMS;
this.C = "adUnits";
this.D = "providerLoadName";
this.E = "application";
this.F = "rewardedVideo";
this.G = IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE;
this.H = "offerwall";
this.I = "banner";
this.J = "integration";
this.K = "loggers";
this.L = "segment";
this.M = CrashEvent.f;
this.N = "crashReporter";
this.O = "token";
this.P = "external";
this.Q = "mediationTypes";
this.R = "providerDefaultInstance";
this.S = "settings";
this.T = "maxNumOfAdaptersToLoadOnStart";
this.U = "advancedLoading";
this.V = "adapterTimeOutInSeconds";
this.W = "atim";
this.X = "bannerInterval";
this.Y = "isOneFlow";
this.Z = "loadRVInterval";
this.aa = "expiredDurationInMinutes";
this.ab = "server";
this.ac = "publisher";
this.ad = "console";
this.ae = "sendUltraEvents";
this.af = "sendEventsToggle";
this.ag = "eventsCompression";
this.ah = "serverEventsURL";
this.ai = "serverEventsType";
this.aj = "backupThreshold";
this.ak = "maxNumberOfEvents";
this.al = "maxEventsPerBatch";
this.am = "optOut";
this.an = "optIn";
this.ao = "triggerEvents";
this.ap = "nonConnectivityEvents";
this.aq = "pixel";
this.ar = "pixelEventsUrl";
this.as = "pixelEventsEnabled";
this.at = "placements";
this.au = "placementId";
this.av = "placementName";
this.aw = "delivery";
this.ax = "isDefault";
this.ay = "capping";
this.az = "pacing";
this.aA = "enabled";
this.aB = "maxImpressions";
this.aC = "numOfSeconds";
this.aD = "unit";
this.aE = "virtualItemName";
this.aF = "virtualItemCount";
this.aG = "backFill";
this.aH = "premium";
this.aI = "uuidEnabled";
this.aJ = "abt";
this.aK = "delayLoadFailure";
this.aL = "keysToInclude";
this.aM = "reporterURL";
this.aN = "reporterKeyword";
this.aO = "includeANR";
this.aP = "timeout";
this.aQ = "setIgnoreDebugger";
this.aR = "adSourceName";
this.aS = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
this.aT = "mpis";
this.aU = "auction";
this.aV = "auctionData";
this.aW = "auctioneerURL";
this.aX = "extAuctioneerURL";
this.aY = IronSourceConstants.EVENTS_PROGRAMMATIC;
this.aZ = "objectPerWaterfall";
this.ba = "minTimeBeforeFirstAuction";
this.bb = "timeToWaitBeforeAuction";
this.bc = "timeToWaitBeforeLoad";
this.bd = "auctionRetryInterval";
this.be = "isAuctionOnShowStart";
this.bf = "isLoadWhileShow";
this.bg = IronSourceConstants.AUCTION_TRIALS;
this.bh = "auctionTimeout";
this.bi = "auctionSavedHistory";
this.bj = "disableLoadWhileShowSupportFor";
this.bk = "timeToDeleteOldWaterfallAfterAuction";
this.bl = "compressAuctionRequest";
this.bm = "compressAuctionResponse";
this.bn = "encryptionVersion";
this.bo = "shouldSendBannerBURLFromImpression";
this.bp = "optInKeys";
this.bq = "tokenGenericParams";
this.br = "oneToken";
this.bs = "compressToken";
this.bt = "isExternalArmEventsEnabled";
this.bu = "externalArmEventsUrl";
this.bv = "compressExternalToken";
this.e = a.f5454a;
this.by = context;
try {
this.d = TextUtils.isEmpty(str3) ? new JSONObject() : new JSONObject(str3);
h();
i();
g();
this.bw = TextUtils.isEmpty(str) ? "" : str;
this.bx = TextUtils.isEmpty(str2) ? "" : str2;
} catch (JSONException e) {
e.printStackTrace();
e();
}
}
public l(l lVar) {
this.f = "error";
this.g = 3;
this.h = 2;
this.i = 60;
this.j = 10000;
this.k = 5000;
this.l = 300;
this.m = 3;
this.n = 3;
this.o = 3;
this.p = 2;
this.q = 15;
this.r = 10000L;
this.s = 0;
this.t = false;
this.u = com.safedk.android.analytics.brandsafety.l.c;
this.v = -1;
this.w = 5000;
this.x = 1;
this.y = "providerOrder";
this.z = "providerSettings";
this.A = TapjoyConstants.PREF_SERVER_PROVIDED_CONFIGURATIONS;
this.B = IronSourceConstants.EVENTS_GENERIC_PARAMS;
this.C = "adUnits";
this.D = "providerLoadName";
this.E = "application";
this.F = "rewardedVideo";
this.G = IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE;
this.H = "offerwall";
this.I = "banner";
this.J = "integration";
this.K = "loggers";
this.L = "segment";
this.M = CrashEvent.f;
this.N = "crashReporter";
this.O = "token";
this.P = "external";
this.Q = "mediationTypes";
this.R = "providerDefaultInstance";
this.S = "settings";
this.T = "maxNumOfAdaptersToLoadOnStart";
this.U = "advancedLoading";
this.V = "adapterTimeOutInSeconds";
this.W = "atim";
this.X = "bannerInterval";
this.Y = "isOneFlow";
this.Z = "loadRVInterval";
this.aa = "expiredDurationInMinutes";
this.ab = "server";
this.ac = "publisher";
this.ad = "console";
this.ae = "sendUltraEvents";
this.af = "sendEventsToggle";
this.ag = "eventsCompression";
this.ah = "serverEventsURL";
this.ai = "serverEventsType";
this.aj = "backupThreshold";
this.ak = "maxNumberOfEvents";
this.al = "maxEventsPerBatch";
this.am = "optOut";
this.an = "optIn";
this.ao = "triggerEvents";
this.ap = "nonConnectivityEvents";
this.aq = "pixel";
this.ar = "pixelEventsUrl";
this.as = "pixelEventsEnabled";
this.at = "placements";
this.au = "placementId";
this.av = "placementName";
this.aw = "delivery";
this.ax = "isDefault";
this.ay = "capping";
this.az = "pacing";
this.aA = "enabled";
this.aB = "maxImpressions";
this.aC = "numOfSeconds";
this.aD = "unit";
this.aE = "virtualItemName";
this.aF = "virtualItemCount";
this.aG = "backFill";
this.aH = "premium";
this.aI = "uuidEnabled";
this.aJ = "abt";
this.aK = "delayLoadFailure";
this.aL = "keysToInclude";
this.aM = "reporterURL";
this.aN = "reporterKeyword";
this.aO = "includeANR";
this.aP = "timeout";
this.aQ = "setIgnoreDebugger";
this.aR = "adSourceName";
this.aS = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
this.aT = "mpis";
this.aU = "auction";
this.aV = "auctionData";
this.aW = "auctioneerURL";
this.aX = "extAuctioneerURL";
this.aY = IronSourceConstants.EVENTS_PROGRAMMATIC;
this.aZ = "objectPerWaterfall";
this.ba = "minTimeBeforeFirstAuction";
this.bb = "timeToWaitBeforeAuction";
this.bc = "timeToWaitBeforeLoad";
this.bd = "auctionRetryInterval";
this.be = "isAuctionOnShowStart";
this.bf = "isLoadWhileShow";
this.bg = IronSourceConstants.AUCTION_TRIALS;
this.bh = "auctionTimeout";
this.bi = "auctionSavedHistory";
this.bj = "disableLoadWhileShowSupportFor";
this.bk = "timeToDeleteOldWaterfallAfterAuction";
this.bl = "compressAuctionRequest";
this.bm = "compressAuctionResponse";
this.bn = "encryptionVersion";
this.bo = "shouldSendBannerBURLFromImpression";
this.bp = "optInKeys";
this.bq = "tokenGenericParams";
this.br = "oneToken";
this.bs = "compressToken";
this.bt = "isExternalArmEventsEnabled";
this.bu = "externalArmEventsUrl";
this.bv = "compressExternalToken";
this.e = a.f5454a;
try {
this.by = lVar.by;
this.d = new JSONObject(lVar.d.toString());
this.bw = lVar.bw;
this.bx = lVar.bx;
this.f5453a = lVar.f5453a;
this.b = lVar.b;
this.c = lVar.c;
this.e = lVar.e;
} catch (Exception unused) {
e();
}
}
private static int a(JSONObject jSONObject, JSONObject jSONObject2, String str, int i) {
int i2 = 0;
if (jSONObject.has(str)) {
i2 = jSONObject.optInt(str, 0);
} else if (jSONObject2.has(str)) {
i2 = jSONObject2.optInt(str, 0);
}
return i2 == 0 ? i : i2;
}
private static com.ironsource.mediationsdk.model.m a(JSONObject jSONObject) {
com.ironsource.mediationsdk.model.n nVar = null;
if (jSONObject == null) {
return null;
}
m.a aVar = new m.a();
aVar.f5381a = jSONObject.optBoolean("delivery", true);
JSONObject optJSONObject = jSONObject.optJSONObject("capping");
if (optJSONObject != null) {
String optString = optJSONObject.optString("unit");
if (!TextUtils.isEmpty(optString)) {
if (com.ironsource.mediationsdk.model.n.PER_DAY.toString().equals(optString)) {
nVar = com.ironsource.mediationsdk.model.n.PER_DAY;
} else if (com.ironsource.mediationsdk.model.n.PER_HOUR.toString().equals(optString)) {
nVar = com.ironsource.mediationsdk.model.n.PER_HOUR;
}
}
int optInt = optJSONObject.optInt("maxImpressions", 0);
aVar.a(optJSONObject.optBoolean("enabled", false) && optInt > 0, nVar, optInt);
}
JSONObject optJSONObject2 = jSONObject.optJSONObject("pacing");
if (optJSONObject2 != null) {
int optInt2 = optJSONObject2.optInt("numOfSeconds", 0);
aVar.a(optJSONObject2.optBoolean("enabled", false) && optInt2 > 0, optInt2);
}
return aVar.a();
}
private static int[] a(JSONObject jSONObject, String str) {
JSONArray optJSONArray = jSONObject.optJSONArray(str);
if (optJSONArray == null) {
return null;
}
int[] iArr = new int[optJSONArray.length()];
for (int i = 0; i < optJSONArray.length(); i++) {
iArr[i] = optJSONArray.optInt(i);
}
return iArr;
}
private static JSONObject b(JSONObject jSONObject, String str) {
if (jSONObject != null) {
return jSONObject.optJSONObject(str);
}
return null;
}
private void e() {
this.d = new JSONObject();
this.bw = "";
this.bx = "";
this.f5453a = new com.ironsource.mediationsdk.model.o();
this.b = com.ironsource.mediationsdk.model.p.a();
this.c = new com.ironsource.mediationsdk.model.i();
}
private boolean f() {
JSONObject b;
JSONArray optJSONArray;
JSONObject b2 = b(this.d, "providerOrder");
JSONArray names = b2.names();
if (names == null) {
return true;
}
JSONObject b3 = b(b(this.d, TapjoyConstants.PREF_SERVER_PROVIDED_CONFIGURATIONS), "adUnits");
for (int i = 0; i < names.length(); i++) {
String optString = names.optString(i);
JSONArray optJSONArray2 = b2.optJSONArray(optString);
if (optJSONArray2 != null && optJSONArray2.length() != 0 && (b = b(b3, optString)) != null && ((optJSONArray = b.optJSONArray("placements")) == null || optJSONArray.length() == 0)) {
return false;
}
}
return true;
}
private void g() {
try {
JSONObject b = b(this.d, "providerOrder");
JSONArray optJSONArray = b.optJSONArray("rewardedVideo");
JSONArray optJSONArray2 = b.optJSONArray(IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE);
JSONArray optJSONArray3 = b.optJSONArray("banner");
this.f5453a = new com.ironsource.mediationsdk.model.o();
if (optJSONArray != null && this.c != null && this.c.f5376a != null) {
String str = this.c.f5376a.f;
String str2 = this.c.f5376a.g;
for (int i = 0; i < optJSONArray.length(); i++) {
String optString = optJSONArray.optString(i);
if (optString.equals(str)) {
this.f5453a.b = str;
} else {
if (optString.equals(str2)) {
this.f5453a.c = str2;
}
com.ironsource.mediationsdk.model.o oVar = this.f5453a;
if (!TextUtils.isEmpty(optString)) {
oVar.f5383a.add(optString);
}
NetworkSettings a2 = com.ironsource.mediationsdk.model.p.a().a(optString);
if (a2 != null) {
a2.setRewardedVideoPriority(i);
}
}
}
}
if (optJSONArray2 != null && this.c != null && this.c.b != null) {
String str3 = this.c.b.g;
String str4 = this.c.b.h;
for (int i2 = 0; i2 < optJSONArray2.length(); i2++) {
String optString2 = optJSONArray2.optString(i2);
if (optString2.equals(str3)) {
this.f5453a.f = str3;
} else {
if (optString2.equals(str4)) {
this.f5453a.g = str4;
}
com.ironsource.mediationsdk.model.o oVar2 = this.f5453a;
if (!TextUtils.isEmpty(optString2)) {
oVar2.d.add(optString2);
}
NetworkSettings a3 = com.ironsource.mediationsdk.model.p.a().a(optString2);
if (a3 != null) {
a3.setInterstitialPriority(i2);
}
}
}
}
if (optJSONArray3 != null) {
for (int i3 = 0; i3 < optJSONArray3.length(); i3++) {
String optString3 = optJSONArray3.optString(i3);
com.ironsource.mediationsdk.model.o oVar3 = this.f5453a;
if (!TextUtils.isEmpty(optString3)) {
oVar3.e.add(optString3);
}
NetworkSettings a4 = com.ironsource.mediationsdk.model.p.a().a(optString3);
if (a4 != null) {
a4.setBannerPriority(i3);
}
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
private void h() {
String str;
JSONObject jSONObject;
boolean z;
NetworkSettings networkSettings;
com.ironsource.mediationsdk.model.p pVar;
String str2 = "Mediation";
try {
this.b = com.ironsource.mediationsdk.model.p.a();
JSONObject b = b(this.d, "providerSettings");
Iterator<String> keys = b.keys();
while (keys.hasNext()) {
String next = keys.next();
JSONObject optJSONObject = b.optJSONObject(next);
if (optJSONObject != null) {
boolean optBoolean = optJSONObject.optBoolean("mpis", false);
String optString = optJSONObject.optString(IronSourceConstants.EVENTS_SUB_PROVIDER_ID, "0");
String optString2 = optJSONObject.optString("adSourceName", null);
String optString3 = optJSONObject.optString("providerLoadName", next);
String optString4 = optJSONObject.optString("providerDefaultInstance", optString3);
JSONObject b2 = b(optJSONObject, "adUnits");
JSONObject b3 = b(optJSONObject, "application");
JSONObject b4 = b(b2, "rewardedVideo");
JSONObject b5 = b(b2, IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE);
JSONObject b6 = b(b2, "banner");
JSONObject mergeJsons = IronSourceUtils.mergeJsons(b4, b3);
JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(b5, b3);
JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(b6, b3);
if (this.b.b(next)) {
NetworkSettings a2 = this.b.a(next);
JSONObject rewardedVideoSettings = a2.getRewardedVideoSettings();
JSONObject interstitialSettings = a2.getInterstitialSettings();
JSONObject bannerSettings = a2.getBannerSettings();
a2.setRewardedVideoSettings(IronSourceUtils.mergeJsons(rewardedVideoSettings, mergeJsons));
a2.setInterstitialSettings(IronSourceUtils.mergeJsons(interstitialSettings, mergeJsons2));
a2.setBannerSettings(IronSourceUtils.mergeJsons(bannerSettings, mergeJsons3));
a2.setIsMultipleInstances(optBoolean);
a2.setSubProviderId(optString);
a2.setAdSourceNameForEvents(optString2);
} else {
String lowerCase = optString3.toLowerCase(Locale.ENGLISH);
if (this.b.b(str2)) {
jSONObject = b;
if (IronSourceConstants.SUPERSONIC_CONFIG_NAME.toLowerCase(Locale.ENGLISH).equals(lowerCase) || IronSourceConstants.IRONSOURCE_CONFIG_NAME.toLowerCase(Locale.ENGLISH).equals(lowerCase)) {
z = true;
if (z) {
str = str2;
networkSettings = new NetworkSettings(next, optString3, optString4, b3, mergeJsons, mergeJsons2, mergeJsons3);
networkSettings.setIsMultipleInstances(optBoolean);
networkSettings.setSubProviderId(optString);
networkSettings.setAdSourceNameForEvents(optString2);
pVar = this.b;
} else {
NetworkSettings a3 = this.b.a(str2);
JSONObject rewardedVideoSettings2 = a3.getRewardedVideoSettings();
JSONObject interstitialSettings2 = a3.getInterstitialSettings();
JSONObject bannerSettings2 = a3.getBannerSettings();
str = str2;
networkSettings = new NetworkSettings(next, optString3, optString4, b3, IronSourceUtils.mergeJsons(new JSONObject(rewardedVideoSettings2.toString()), mergeJsons), IronSourceUtils.mergeJsons(new JSONObject(interstitialSettings2.toString()), mergeJsons2), IronSourceUtils.mergeJsons(new JSONObject(bannerSettings2.toString()), mergeJsons3));
networkSettings.setIsMultipleInstances(optBoolean);
networkSettings.setSubProviderId(optString);
networkSettings.setAdSourceNameForEvents(optString2);
pVar = this.b;
}
pVar.a(networkSettings);
}
} else {
jSONObject = b;
}
z = false;
if (z) {
}
pVar.a(networkSettings);
}
} else {
str = str2;
jSONObject = b;
}
str2 = str;
b = jSONObject;
}
this.b.b();
} catch (Exception e) {
e.printStackTrace();
}
}
private void i() {
JSONObject jSONObject;
JSONObject jSONObject2;
String str;
String str2;
int i;
boolean z;
String str3;
String str4;
int[] iArr;
int[] iArr2;
int[] iArr3;
int[] iArr4;
String str5;
String str6;
String str7;
String str8;
c cVar;
l lVar;
q qVar;
Placement placement;
String str9;
String str10;
String str11;
String str12;
JSONObject jSONObject3;
com.ironsource.mediationsdk.model.j jVar;
String str13;
String str14;
JSONObject jSONObject4;
String str15;
String str16;
JSONObject jSONObject5;
com.ironsource.mediationsdk.model.g gVar;
String str17;
String str18;
com.ironsource.mediationsdk.model.k kVar;
boolean z2;
r rVar;
JSONObject b;
int[] iArr5;
int[] iArr6;
int[] iArr7;
int[] iArr8;
com.ironsource.mediationsdk.model.l lVar2;
boolean z3;
boolean z4;
boolean optBoolean;
JSONArray optJSONArray;
int[] iArr9;
JSONArray optJSONArray2;
int[] iArr10;
JSONArray optJSONArray3;
int[] iArr11;
JSONArray optJSONArray4;
int[] iArr12;
JSONObject jSONObject6;
c cVar2;
JSONObject jSONObject7;
JSONArray jSONArray;
String str19;
com.ironsource.mediationsdk.model.h hVar;
int i2;
boolean z5;
int[] iArr13;
int[] iArr14;
int[] iArr15;
int[] iArr16;
JSONObject jSONObject8;
c cVar3;
JSONArray jSONArray2;
JSONObject jSONObject9;
String str20;
InterstitialPlacement interstitialPlacement;
try {
JSONObject b2 = b(this.d, TapjoyConstants.PREF_SERVER_PROVIDED_CONFIGURATIONS);
JSONObject b3 = b(b2, "adUnits");
JSONObject b4 = b(b2, "application");
JSONObject b5 = b(b3, "rewardedVideo");
JSONObject b6 = b(b3, IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE);
JSONObject b7 = b(b3, "offerwall");
JSONObject b8 = b(b3, "banner");
JSONObject b9 = b(b4, CrashEvent.f);
JSONObject b10 = b(b4, "loggers");
JSONObject b11 = b(b4, "token");
JSONObject b12 = b(b4, "segment");
JSONObject b13 = b(b4, "auction");
JSONObject b14 = b(b4, "crashReporter");
JSONObject b15 = b(b4, "settings");
JSONObject b16 = b(b4, "external");
JSONObject b17 = b(b9, "pixel");
if (b4 != null) {
jSONObject = b12;
jSONObject2 = b14;
IronSourceUtils.saveBooleanToSharedPrefs(this.by, "uuidEnabled", b4.optBoolean("uuidEnabled", true));
} else {
jSONObject = b12;
jSONObject2 = b14;
}
if (b9 != null) {
String optString = b9.optString("abt");
if (!TextUtils.isEmpty(optString)) {
com.ironsource.mediationsdk.events.d.d().p = optString;
com.ironsource.mediationsdk.events.h.d().p = optString;
}
}
JSONObject jSONObject10 = b13;
String str21 = "triggerEvents";
String str22 = "";
String str23 = "optIn";
if (b5 != null) {
try {
JSONArray optJSONArray5 = b5.optJSONArray("placements");
str = "placements";
JSONObject b18 = b(b5, CrashEvent.f);
str2 = CrashEvent.f;
JSONArray jSONArray3 = optJSONArray5;
int a2 = a(b5, b4, "maxNumOfAdaptersToLoadOnStart", 2);
int a3 = a(b5, b4, "advancedLoading", 0);
if (a3 > 0) {
i = a3;
z = true;
} else {
i = a2;
z = false;
}
int a4 = a(b5, b4, "adapterTimeOutInSeconds", 60);
int a5 = a(b5, b4, "loadRVInterval", 300);
int a6 = a(b5, b4, "expiredDurationInMinutes", -1);
int a7 = a(b5, b4, "delayLoadFailure", 3);
JSONObject mergeJsons = IronSourceUtils.mergeJsons(b18, b9);
boolean optBoolean2 = mergeJsons.optBoolean("sendUltraEvents", false);
boolean optBoolean3 = mergeJsons.optBoolean("sendEventsToggle", false);
boolean optBoolean4 = mergeJsons.optBoolean("eventsCompression", false);
String optString2 = mergeJsons.optString("serverEventsURL", "");
String optString3 = mergeJsons.optString("serverEventsType", "");
int optInt = mergeJsons.optInt("backupThreshold", -1);
int optInt2 = mergeJsons.optInt("maxNumberOfEvents", -1);
int optInt3 = mergeJsons.optInt("maxEventsPerBatch", 5000);
JSONArray optJSONArray6 = mergeJsons.optJSONArray("optOut");
if (optJSONArray6 != null) {
int[] iArr17 = new int[optJSONArray6.length()];
str3 = "optOut";
str4 = "maxEventsPerBatch";
for (int i3 = 0; i3 < optJSONArray6.length(); i3++) {
iArr17[i3] = optJSONArray6.optInt(i3);
}
iArr = iArr17;
} else {
str3 = "optOut";
str4 = "maxEventsPerBatch";
iArr = null;
}
JSONArray optJSONArray7 = mergeJsons.optJSONArray(str23);
if (optJSONArray7 != null) {
int[] iArr18 = new int[optJSONArray7.length()];
str23 = str23;
for (int i4 = 0; i4 < optJSONArray7.length(); i4++) {
iArr18[i4] = optJSONArray7.optInt(i4);
}
iArr2 = iArr18;
} else {
str23 = str23;
iArr2 = null;
}
JSONArray optJSONArray8 = mergeJsons.optJSONArray(str21);
if (optJSONArray8 != null) {
int[] iArr19 = new int[optJSONArray8.length()];
str21 = str21;
for (int i5 = 0; i5 < optJSONArray8.length(); i5++) {
iArr19[i5] = optJSONArray8.optInt(i5);
}
iArr3 = iArr19;
} else {
str21 = str21;
iArr3 = null;
}
JSONArray optJSONArray9 = mergeJsons.optJSONArray("nonConnectivityEvents");
if (optJSONArray9 != null) {
int[] iArr20 = new int[optJSONArray9.length()];
for (int i6 = 0; i6 < optJSONArray9.length(); i6++) {
iArr20[i6] = optJSONArray9.optInt(i6);
}
iArr4 = iArr20;
} else {
iArr4 = null;
}
com.ironsource.mediationsdk.model.d dVar = new com.ironsource.mediationsdk.model.d(optBoolean2, optBoolean3, optBoolean4, optString2, optString3, optInt, optInt2, optInt3, iArr, iArr2, iArr3, iArr4);
if (jSONObject10 != null) {
JSONObject b19 = b(jSONObject10, "rewardedVideo");
String optString4 = jSONObject10.optString("auctionData", "");
String optString5 = jSONObject10.optString("auctioneerURL", "");
String optString6 = jSONObject10.optString("extAuctioneerURL", "");
int optInt4 = jSONObject10.optInt(IronSourceConstants.AUCTION_TRIALS, 2);
long optLong = jSONObject10.optLong("auctionTimeout", 10000L);
int optInt5 = jSONObject10.optInt("auctionSavedHistory", 15);
boolean optBoolean5 = jSONObject10.optBoolean("compressAuctionRequest", false);
boolean optBoolean6 = jSONObject10.optBoolean("compressAuctionResponse", false);
int optInt6 = jSONObject10.optInt("encryptionVersion", 1);
jSONObject10 = jSONObject10;
str8 = "maxNumberOfEvents";
str7 = "backupThreshold";
str5 = "serverEventsType";
str6 = "serverEventsURL";
c cVar4 = new c(optString4, optString5, optString6, optInt4, optInt5, optLong, b19.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), b19.optInt("minTimeBeforeFirstAuction", 2000), b19.optInt("auctionRetryInterval", com.safedk.android.analytics.brandsafety.l.c), b19.optInt("timeToWaitBeforeAuction", 5000), b19.optInt("timeToWaitBeforeLoad", 50), b19.optBoolean("isAuctionOnShowStart", false), b19.optBoolean("isLoadWhileShow", false), b19.optInt("timeToDeleteOldWaterfallAfterAuction", com.safedk.android.analytics.brandsafety.l.c), optBoolean5, optBoolean6, b19.optBoolean("objectPerWaterfall", false), optInt6, false);
JSONArray optJSONArray10 = b19.optJSONArray("disableLoadWhileShowSupportFor");
if (optJSONArray10 != null) {
for (int i7 = 0; i7 < optJSONArray10.length(); i7++) {
String optString7 = optJSONArray10.optString(i7);
if (!TextUtils.isEmpty(optString7)) {
cVar4.p.add(optString7);
}
}
}
cVar = cVar4;
} else {
str5 = "serverEventsType";
str6 = "serverEventsURL";
str7 = "backupThreshold";
str8 = "maxNumberOfEvents";
cVar = new c();
}
q qVar2 = new q(i, z, a4, a5, a6, dVar, cVar, a7);
if (jSONArray3 != null) {
int i8 = 0;
while (i8 < jSONArray3.length()) {
JSONArray jSONArray4 = jSONArray3;
JSONObject optJSONObject = jSONArray4.optJSONObject(i8);
if (optJSONObject != null) {
int optInt7 = optJSONObject.optInt("placementId", -1);
String optString8 = optJSONObject.optString("placementName", "");
boolean optBoolean7 = optJSONObject.optBoolean("isDefault", false);
String optString9 = optJSONObject.optString("virtualItemName", "");
int optInt8 = optJSONObject.optInt("virtualItemCount", -1);
com.ironsource.mediationsdk.model.m a8 = a(optJSONObject);
if (optInt7 >= 0 && !TextUtils.isEmpty(optString8) && !TextUtils.isEmpty(optString9) && optInt8 > 0) {
placement = new Placement(optInt7, optString8, optBoolean7, optString9, optInt8, a8);
if (a8 != null) {
try {
k.a(this.by, placement);
} catch (Exception e) {
e = e;
e.printStackTrace();
return;
}
}
if (placement != null && placement != null) {
qVar2.f5385a.add(placement);
if (qVar2.k != null && placement.getPlacementId() != 0) {
}
qVar2.k = placement;
}
i8++;
jSONArray3 = jSONArray4;
}
}
placement = null;
if (placement != null) {
qVar2.f5385a.add(placement);
if (qVar2.k != null) {
}
qVar2.k = placement;
}
i8++;
jSONArray3 = jSONArray4;
}
}
lVar = this;
String optString10 = b5.optString("backFill");
if (!TextUtils.isEmpty(optString10)) {
qVar2.f = optString10;
}
String optString11 = b5.optString("premium");
if (!TextUtils.isEmpty(optString11)) {
qVar2.g = optString11;
}
qVar = qVar2;
} catch (Exception e2) {
e = e2;
e.printStackTrace();
return;
}
} else {
str3 = "optOut";
str2 = CrashEvent.f;
str6 = "serverEventsURL";
str7 = "backupThreshold";
str = "placements";
str4 = "maxEventsPerBatch";
str8 = "maxNumberOfEvents";
str5 = "serverEventsType";
lVar = this;
qVar = null;
}
if (b6 != null) {
str10 = str;
JSONArray optJSONArray11 = b6.optJSONArray(str10);
str11 = str2;
JSONObject b20 = b(b6, str11);
int a9 = a(b6, b4, "maxNumOfAdaptersToLoadOnStart", 2);
int a10 = a(b6, b4, "advancedLoading", 0);
if (a10 > 0) {
i2 = a10;
z5 = true;
} else {
i2 = a9;
z5 = false;
}
int a11 = a(b6, b4, "adapterTimeOutInSeconds", 60);
int a12 = a(b6, b4, "delayLoadFailure", 3);
JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(b20, b9);
boolean optBoolean8 = mergeJsons2.optBoolean("sendEventsToggle", false);
boolean optBoolean9 = mergeJsons2.optBoolean("eventsCompression", false);
String str24 = str6;
String optString12 = mergeJsons2.optString(str24, "");
String optString13 = mergeJsons2.optString(str5, "");
String str25 = str7;
int optInt9 = mergeJsons2.optInt(str25, -1);
str7 = str25;
String str26 = str8;
int optInt10 = mergeJsons2.optInt(str26, -1);
str8 = str26;
String str27 = str4;
int optInt11 = mergeJsons2.optInt(str27, 5000);
str4 = str27;
String str28 = str3;
JSONArray optJSONArray12 = mergeJsons2.optJSONArray(str28);
if (optJSONArray12 != null) {
str3 = str28;
int[] iArr21 = new int[optJSONArray12.length()];
str6 = str24;
str9 = str5;
for (int i9 = 0; i9 < optJSONArray12.length(); i9++) {
iArr21[i9] = optJSONArray12.optInt(i9);
}
iArr13 = iArr21;
} else {
str6 = str24;
str9 = str5;
str3 = str28;
iArr13 = null;
}
String str29 = str23;
JSONArray optJSONArray13 = mergeJsons2.optJSONArray(str29);
if (optJSONArray13 != null) {
int[] iArr22 = new int[optJSONArray13.length()];
str23 = str29;
for (int i10 = 0; i10 < optJSONArray13.length(); i10++) {
iArr22[i10] = optJSONArray13.optInt(i10);
}
iArr14 = iArr22;
} else {
str23 = str29;
iArr14 = null;
}
String str30 = str21;
JSONArray optJSONArray14 = mergeJsons2.optJSONArray(str30);
if (optJSONArray14 != null) {
int[] iArr23 = new int[optJSONArray14.length()];
str21 = str30;
for (int i11 = 0; i11 < optJSONArray14.length(); i11++) {
iArr23[i11] = optJSONArray14.optInt(i11);
}
iArr15 = iArr23;
} else {
str21 = str30;
iArr15 = null;
}
JSONArray optJSONArray15 = mergeJsons2.optJSONArray("nonConnectivityEvents");
if (optJSONArray15 != null) {
int[] iArr24 = new int[optJSONArray15.length()];
for (int i12 = 0; i12 < optJSONArray15.length(); i12++) {
iArr24[i12] = optJSONArray15.optInt(i12);
}
iArr16 = iArr24;
} else {
iArr16 = null;
}
com.ironsource.mediationsdk.model.d dVar2 = new com.ironsource.mediationsdk.model.d(false, optBoolean8, optBoolean9, optString12, optString13, optInt9, optInt10, optInt11, iArr13, iArr14, iArr15, iArr16);
if (jSONObject10 != null) {
jSONObject8 = jSONObject10;
JSONObject b21 = b(jSONObject8, IronSourceConstants.AD_UNIT_IS_MEDIATION_STATE);
cVar3 = new c(jSONObject8.optString("auctionData", ""), jSONObject8.optString("auctioneerURL", ""), jSONObject8.optString("extAuctioneerURL", ""), jSONObject8.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject8.optInt("auctionSavedHistory", 15), jSONObject8.optLong("auctionTimeout", 10000L), b21.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), b21.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, true, 0, jSONObject8.optBoolean("compressAuctionRequest", false), jSONObject8.optBoolean("compressAuctionResponse", false), b21.optBoolean("objectPerWaterfall", false), jSONObject8.optInt("encryptionVersion", 1), false);
} else {
jSONObject8 = jSONObject10;
cVar3 = new c();
}
com.ironsource.mediationsdk.model.j jVar2 = new com.ironsource.mediationsdk.model.j(i2, z5, a11, dVar2, cVar3, a12);
if (optJSONArray11 != null) {
int i13 = 0;
while (i13 < optJSONArray11.length()) {
JSONObject optJSONObject2 = optJSONArray11.optJSONObject(i13);
if (optJSONObject2 != null) {
jSONArray2 = optJSONArray11;
int optInt12 = optJSONObject2.optInt("placementId", -1);
String optString14 = optJSONObject2.optString("placementName", str22);
jSONObject9 = jSONObject8;
str20 = str22;
boolean optBoolean10 = optJSONObject2.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.m a13 = a(optJSONObject2);
if (optInt12 >= 0 && !TextUtils.isEmpty(optString14)) {
interstitialPlacement = new InterstitialPlacement(optInt12, optString14, optBoolean10, a13);
if (a13 != null) {
k.a(lVar.by, interstitialPlacement);
}
if (interstitialPlacement != null && interstitialPlacement != null) {
jVar2.f5377a.add(interstitialPlacement);
if (jVar2.j != null && interstitialPlacement.getPlacementId() != 0) {
}
jVar2.j = interstitialPlacement;
}
i13++;
optJSONArray11 = jSONArray2;
jSONObject8 = jSONObject9;
str22 = str20;
}
} else {
jSONArray2 = optJSONArray11;
jSONObject9 = jSONObject8;
str20 = str22;
}
interstitialPlacement = null;
if (interstitialPlacement != null) {
jVar2.f5377a.add(interstitialPlacement);
if (jVar2.j != null) {
}
jVar2.j = interstitialPlacement;
}
i13++;
optJSONArray11 = jSONArray2;
jSONObject8 = jSONObject9;
str22 = str20;
}
}
jSONObject3 = jSONObject8;
str12 = str22;
String optString15 = b6.optString("backFill");
if (!TextUtils.isEmpty(optString15)) {
jVar2.g = optString15;
}
String optString16 = b6.optString("premium");
if (!TextUtils.isEmpty(optString16)) {
jVar2.h = optString16;
}
jVar = jVar2;
} else {
str9 = str5;
str10 = str;
str11 = str2;
str12 = "";
jSONObject3 = jSONObject10;
jVar = null;
}
if (b8 != null) {
JSONArray optJSONArray16 = b8.optJSONArray(str10);
JSONObject b22 = b(b8, str11);
int a14 = a(b8, b4, "maxNumOfAdaptersToLoadOnStart", 1);
long optLong2 = b8.has("atim") ? b8.optLong("atim", 0L) : b4.has("atim") ? b4.optLong("atim", 0L) : 0L;
long j = optLong2 == 0 ? 10000L : optLong2;
int a15 = a(b8, b4, "delayLoadFailure", 3);
int a16 = a(b8, b4, "bannerInterval", 60);
if (b8.has("isOneFlow")) {
z3 = false;
optBoolean = b8.optBoolean("isOneFlow", false);
} else {
z3 = false;
if (b4.has("isOneFlow")) {
optBoolean = b4.optBoolean("isOneFlow", false);
} else {
z4 = false;
JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(b22, b9);
boolean optBoolean11 = mergeJsons3.optBoolean("sendEventsToggle", z3);
boolean optBoolean12 = mergeJsons3.optBoolean("eventsCompression", z3);
str15 = str12;
str16 = str6;
String optString17 = mergeJsons3.optString(str16, str15);
str14 = str9;
String optString18 = mergeJsons3.optString(str14, str15);
String str31 = str7;
int optInt13 = mergeJsons3.optInt(str31, -1);
String str32 = str8;
int optInt14 = mergeJsons3.optInt(str32, -1);
jSONObject5 = b4;
String str33 = str4;
int optInt15 = mergeJsons3.optInt(str33, 5000);
str13 = str10;
String str34 = str3;
optJSONArray = mergeJsons3.optJSONArray(str34);
if (optJSONArray == null) {
str3 = str34;
int[] iArr25 = new int[optJSONArray.length()];
str4 = str33;
str8 = str32;
for (int i14 = 0; i14 < optJSONArray.length(); i14++) {
iArr25[i14] = optJSONArray.optInt(i14);
}
iArr9 = iArr25;
} else {
str3 = str34;
str4 = str33;
str8 = str32;
iArr9 = null;
}
String str35 = str23;
optJSONArray2 = mergeJsons3.optJSONArray(str35);
if (optJSONArray2 == null) {
int[] iArr26 = new int[optJSONArray2.length()];
str23 = str35;
for (int i15 = 0; i15 < optJSONArray2.length(); i15++) {
iArr26[i15] = optJSONArray2.optInt(i15);
}
iArr10 = iArr26;
} else {
str23 = str35;
iArr10 = null;
}
String str36 = str21;
optJSONArray3 = mergeJsons3.optJSONArray(str36);
if (optJSONArray3 == null) {
int[] iArr27 = new int[optJSONArray3.length()];
str21 = str36;
for (int i16 = 0; i16 < optJSONArray3.length(); i16++) {
iArr27[i16] = optJSONArray3.optInt(i16);
}
iArr11 = iArr27;
} else {
str21 = str36;
iArr11 = null;
}
optJSONArray4 = mergeJsons3.optJSONArray("nonConnectivityEvents");
if (optJSONArray4 == null) {
int[] iArr28 = new int[optJSONArray4.length()];
for (int i17 = 0; i17 < optJSONArray4.length(); i17++) {
iArr28[i17] = optJSONArray4.optInt(i17);
}
iArr12 = iArr28;
} else {
iArr12 = null;
}
com.ironsource.mediationsdk.model.d dVar3 = new com.ironsource.mediationsdk.model.d(false, optBoolean11, optBoolean12, optString17, optString18, optInt13, optInt14, optInt15, iArr9, iArr10, iArr11, iArr12);
if (jSONObject3 == null) {
jSONObject6 = jSONObject3;
JSONObject b23 = b(jSONObject6, "banner");
cVar2 = b23 != null ? new c(jSONObject6.optString("auctionData", str15), jSONObject6.optString("auctioneerURL", str15), jSONObject6.optString("extAuctioneerURL", str15), jSONObject6.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject6.optInt("auctionSavedHistory", 15), jSONObject6.optLong("auctionTimeout", 10000L), b23.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), b23.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, true, 0, jSONObject6.optBoolean("compressAuctionRequest", false), jSONObject6.optBoolean("compressAuctionResponse", false), false, jSONObject6.optInt("encryptionVersion", 1), b23.optBoolean("shouldSendBannerBURLFromImpression", true)) : new c();
} else {
jSONObject6 = jSONObject3;
cVar2 = new c();
}
com.ironsource.mediationsdk.model.g gVar2 = new com.ironsource.mediationsdk.model.g(a14, j, dVar3, a16, cVar2, a15, z4);
if (optJSONArray16 != null) {
int i18 = 0;
while (i18 < optJSONArray16.length()) {
JSONObject optJSONObject3 = optJSONArray16.optJSONObject(i18);
if (optJSONObject3 != null) {
jSONArray = optJSONArray16;
int optInt16 = optJSONObject3.optInt("placementId", -1);
String optString19 = optJSONObject3.optString("placementName", str15);
jSONObject7 = jSONObject6;
str19 = str31;
boolean optBoolean13 = optJSONObject3.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.m a17 = a(optJSONObject3);
if (optInt16 >= 0 && !TextUtils.isEmpty(optString19)) {
hVar = new com.ironsource.mediationsdk.model.h(optInt16, optString19, optBoolean13, a17);
if (a17 != null) {
k.a(lVar.by, hVar);
}
if (hVar != null && hVar != null) {
gVar2.c.add(hVar);
if (gVar2.d != null && hVar.getPlacementId() != 0) {
}
gVar2.d = hVar;
}
i18++;
optJSONArray16 = jSONArray;
jSONObject6 = jSONObject7;
str31 = str19;
}
} else {
jSONObject7 = jSONObject6;
jSONArray = optJSONArray16;
str19 = str31;
}
hVar = null;
if (hVar != null) {
gVar2.c.add(hVar);
if (gVar2.d != null) {
}
gVar2.d = hVar;
}
i18++;
optJSONArray16 = jSONArray;
jSONObject6 = jSONObject7;
str31 = str19;
}
}
jSONObject4 = jSONObject6;
str7 = str31;
gVar = gVar2;
}
}
z4 = optBoolean;
JSONObject mergeJsons32 = IronSourceUtils.mergeJsons(b22, b9);
boolean optBoolean112 = mergeJsons32.optBoolean("sendEventsToggle", z3);
boolean optBoolean122 = mergeJsons32.optBoolean("eventsCompression", z3);
str15 = str12;
str16 = str6;
String optString172 = mergeJsons32.optString(str16, str15);
str14 = str9;
String optString182 = mergeJsons32.optString(str14, str15);
String str312 = str7;
int optInt132 = mergeJsons32.optInt(str312, -1);
String str322 = str8;
int optInt142 = mergeJsons32.optInt(str322, -1);
jSONObject5 = b4;
String str332 = str4;
int optInt152 = mergeJsons32.optInt(str332, 5000);
str13 = str10;
String str342 = str3;
optJSONArray = mergeJsons32.optJSONArray(str342);
if (optJSONArray == null) {
}
String str352 = str23;
optJSONArray2 = mergeJsons32.optJSONArray(str352);
if (optJSONArray2 == null) {
}
String str362 = str21;
optJSONArray3 = mergeJsons32.optJSONArray(str362);
if (optJSONArray3 == null) {
}
optJSONArray4 = mergeJsons32.optJSONArray("nonConnectivityEvents");
if (optJSONArray4 == null) {
}
com.ironsource.mediationsdk.model.d dVar32 = new com.ironsource.mediationsdk.model.d(false, optBoolean112, optBoolean122, optString172, optString182, optInt132, optInt142, optInt152, iArr9, iArr10, iArr11, iArr12);
if (jSONObject3 == null) {
}
com.ironsource.mediationsdk.model.g gVar22 = new com.ironsource.mediationsdk.model.g(a14, j, dVar32, a16, cVar2, a15, z4);
if (optJSONArray16 != null) {
}
jSONObject4 = jSONObject6;
str7 = str312;
gVar = gVar22;
} else {
str13 = str10;
str14 = str9;
jSONObject4 = jSONObject3;
str15 = str12;
str16 = str6;
jSONObject5 = b4;
gVar = null;
}
if (b7 != null) {
JSONObject mergeJsons4 = IronSourceUtils.mergeJsons(b(b7, str11), b9);
boolean optBoolean14 = mergeJsons4.optBoolean("sendEventsToggle", false);
boolean optBoolean15 = mergeJsons4.optBoolean("eventsCompression", false);
String optString20 = mergeJsons4.optString(str16, str15);
String optString21 = mergeJsons4.optString(str14, str15);
int optInt17 = mergeJsons4.optInt(str7, -1);
int optInt18 = mergeJsons4.optInt(str8, -1);
int optInt19 = mergeJsons4.optInt(str4, 5000);
str18 = str3;
JSONArray optJSONArray17 = mergeJsons4.optJSONArray(str18);
if (optJSONArray17 != null) {
int[] iArr29 = new int[optJSONArray17.length()];
for (int i19 = 0; i19 < optJSONArray17.length(); i19++) {
iArr29[i19] = optJSONArray17.optInt(i19);
}
iArr5 = iArr29;
} else {
iArr5 = null;
}
str17 = str23;
JSONArray optJSONArray18 = mergeJsons4.optJSONArray(str17);
if (optJSONArray18 != null) {
int[] iArr30 = new int[optJSONArray18.length()];
for (int i20 = 0; i20 < optJSONArray18.length(); i20++) {
iArr30[i20] = optJSONArray18.optInt(i20);
}
iArr6 = iArr30;
} else {
iArr6 = null;
}
JSONArray optJSONArray19 = mergeJsons4.optJSONArray(str21);
if (optJSONArray19 != null) {
int[] iArr31 = new int[optJSONArray19.length()];
for (int i21 = 0; i21 < optJSONArray19.length(); i21++) {
iArr31[i21] = optJSONArray19.optInt(i21);
}
iArr7 = iArr31;
} else {
iArr7 = null;
}
JSONArray optJSONArray20 = mergeJsons4.optJSONArray("nonConnectivityEvents");
if (optJSONArray20 != null) {
int[] iArr32 = new int[optJSONArray20.length()];
for (int i22 = 0; i22 < optJSONArray20.length(); i22++) {
iArr32[i22] = optJSONArray20.optInt(i22);
}
iArr8 = iArr32;
} else {
iArr8 = null;
}
com.ironsource.mediationsdk.model.k kVar2 = new com.ironsource.mediationsdk.model.k(new com.ironsource.mediationsdk.model.d(false, optBoolean14, optBoolean15, optString20, optString21, optInt17, optInt18, optInt19, iArr5, iArr6, iArr7, iArr8));
kVar2.d = b7;
JSONArray optJSONArray21 = b7.optJSONArray(str13);
if (optJSONArray21 != null) {
for (int i23 = 0; i23 < optJSONArray21.length(); i23++) {
JSONObject optJSONObject4 = optJSONArray21.optJSONObject(i23);
if (optJSONObject4 != null) {
int optInt20 = optJSONObject4.optInt("placementId", -1);
String optString22 = optJSONObject4.optString("placementName", str15);
boolean optBoolean16 = optJSONObject4.optBoolean("isDefault", false);
if (optInt20 >= 0 && !TextUtils.isEmpty(optString22)) {
lVar2 = new com.ironsource.mediationsdk.model.l(optInt20, optString22, optBoolean16);
if (lVar2 != null && lVar2 != null) {
kVar2.f5378a.add(lVar2);
if (kVar2.b != null && lVar2.f5379a != 0) {
}
kVar2.b = lVar2;
}
}
}
lVar2 = null;
if (lVar2 != null) {
kVar2.f5378a.add(lVar2);
if (kVar2.b != null) {
}
kVar2.b = lVar2;
}
}
}
kVar = kVar2;
} else {
str17 = str23;
str18 = str3;
kVar = null;
}
p pVar = new p();
if (b11 != null) {
JSONArray optJSONArray22 = b11.optJSONArray("optInKeys");
if (optJSONArray22 != null) {
for (int i24 = 0; i24 < optJSONArray22.length(); i24++) {
String optString23 = optJSONArray22.optString(i24);
if (!TextUtils.isEmpty(optString23)) {
pVar.f5459a.add(optString23);
}
}
}
JSONObject optJSONObject5 = b11.optJSONObject("tokenGenericParams");
if (optJSONObject5 != null) {
pVar.c = optJSONObject5;
}
pVar.d = b11.optBoolean("oneToken", false);
pVar.e = b11.optBoolean("compressToken", true);
}
PixelSettings pixelSettings = new PixelSettings();
if (b17 != null) {
String optString24 = b17.optString("pixelEventsUrl", "https://outcome-ssp.supersonicads.com/mediation?adUnit=3");
z2 = b17.optBoolean("pixelEventsEnabled", true);
pixelSettings.a(optString24);
} else {
z2 = true;
}
pixelSettings.a(z2);
if (z2) {
pixelSettings.a(a(b9, str18));
pixelSettings.b(a(b9, str17));
pixelSettings.b(b9.optBoolean("eventsCompression", false));
}
com.ironsource.mediationsdk.model.f fVar = new com.ironsource.mediationsdk.model.f(b10.optInt("server", 3), b10.optInt("publisher", 3), b10.optInt("console", 3));
com.ironsource.mediationsdk.model.c cVar5 = new com.ironsource.mediationsdk.model.c();
if (jSONObject2 != null) {
JSONObject jSONObject11 = jSONObject2;
cVar5.f5371a = jSONObject11.optBoolean("enabled", false);
cVar5.c = jSONObject11.optString("reporterURL", str15);
cVar5.d = jSONObject11.optString("reporterKeyword", str15);
cVar5.e = jSONObject11.optBoolean("includeANR", false);
cVar5.f = jSONObject11.optInt("timeout", 5000);
cVar5.g = jSONObject11.optBoolean("setIgnoreDebugger", false);
JSONArray optJSONArray23 = jSONObject11.optJSONArray("keysToInclude");
if (optJSONArray23 != null) {
for (int i25 = 0; i25 < optJSONArray23.length(); i25++) {
String optString25 = optJSONArray23.optString(i25);
if (!TextUtils.isEmpty(optString25)) {
cVar5.b.add(optString25);
}
}
}
}
if (jSONObject != null) {
JSONObject jSONObject12 = jSONObject;
rVar = new r(jSONObject12.optString("name", str15), jSONObject12.optString("id", "-1"), jSONObject12.optJSONObject("custom"));
} else {
rVar = null;
}
ApplicationGeneralSettings applicationGeneralSettings = b15 != null ? new ApplicationGeneralSettings(b15.optBoolean("isExternalArmEventsEnabled", true), b15.optString("externalArmEventsUrl", "https://outcome-arm-ext-med-ext.sonic-us.supersonicads.com/aemData"), b15.optBoolean("sid", true), b15.optBoolean("radvid", false)) : new ApplicationGeneralSettings();
ApplicationExternalSettings applicationExternalSettings = new ApplicationExternalSettings();
if (b16 != null) {
JSONObject optJSONObject6 = b16.optJSONObject("mediationTypes");
Map hashMap = new HashMap();
if (optJSONObject6 != null) {
hashMap = IronSourceUtils.parseJsonToStringMap(optJSONObject6);
}
b16.optBoolean("compressExternalToken", false);
applicationExternalSettings = new ApplicationExternalSettings(hashMap);
}
lVar.c = new com.ironsource.mediationsdk.model.i(qVar, jVar, kVar, gVar, new com.ironsource.sdk.g.d(fVar, rVar, pVar, jSONObject5.optBoolean("integration", false), cVar5, applicationGeneralSettings, applicationExternalSettings, pixelSettings, jSONObject4 != null ? new ApplicationAuctionSettings(jSONObject4.optString("auctionData")) : new ApplicationAuctionSettings()));
JSONObject b24 = b(b9, IronSourceConstants.EVENTS_GENERIC_PARAMS);
if (b24 != null && (b = b(b24, str11)) != null) {
b24.remove(str11);
Map<String, String> parseJsonToStringMap = IronSourceUtils.parseJsonToStringMap(b);
com.ironsource.mediationsdk.events.h.d().b(parseJsonToStringMap);
com.ironsource.mediationsdk.events.d.d().b(parseJsonToStringMap);
}
if (b24 != null) {
Map<String, String> parseJsonToStringMap2 = IronSourceUtils.parseJsonToStringMap(b24);
com.ironsource.mediationsdk.events.h.d().a(parseJsonToStringMap2);
com.ironsource.mediationsdk.events.d.d().a(parseJsonToStringMap2);
}
} catch (Exception e3) {
e = e3;
}
}
public final InitConfig a() {
return new InitConfig(this.bw, this.bx);
}
public final boolean b() {
return (((((this.d != null) && !this.d.has("error")) && this.f5453a != null) && this.b != null) && this.c != null) && f();
}
public final String c() {
try {
return this.f5453a.b;
} catch (Exception e) {
IronSourceLoggerManager.getLogger().logException(IronSourceLogger.IronSourceTag.INTERNAL, "getRVBackFillProvider", e);
return null;
}
}
public final String d() {
try {
return this.f5453a.c;
} catch (Exception e) {
IronSourceLoggerManager.getLogger().logException(IronSourceLogger.IronSourceTag.INTERNAL, "getRVPremiumProvider", e);
return null;
}
}
public final String toString() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("appKey", this.bw);
jSONObject.put(DataKeys.USER_ID, this.bx);
jSONObject.put("response", this.d);
} catch (JSONException e) {
e.printStackTrace();
}
return jSONObject.toString();
}
}