Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 k.java 源代码,内容仅作参考
package com.ironsource.mediationsdk.utils;
import android.content.Context;
import android.text.TextUtils;
import cloud.mindbox.mobile_sdk.models.l;
import com.ironsource.environment.StringUtils;
import com.ironsource.mediationsdk.InitConfig;
import com.ironsource.mediationsdk.adunit.data.DataKeys;
import com.ironsource.mediationsdk.model.ApplicationAuctionSettings;
import com.ironsource.mediationsdk.model.ApplicationExternalSettings;
import com.ironsource.mediationsdk.model.BannerPlacement;
import com.ironsource.mediationsdk.model.InterstitialPlacement;
import com.ironsource.mediationsdk.model.NetworkSettings;
import com.ironsource.mediationsdk.model.OfferwallPlacement;
import com.ironsource.mediationsdk.model.Placement;
import com.ironsource.mediationsdk.model.TestSuiteSettings;
import com.ironsource.mediationsdk.model.o;
import com.ironsource.mediationsdk.model.p;
import com.ironsource.mediationsdk.model.q;
import com.ironsource.mediationsdk.model.r;
import com.ironsource.mediationsdk.model.s;
import com.ironsource.mediationsdk.model.t;
import com.mbridge.msdk.MBridgeConstans;
import com.mbridge.msdk.playercommon.exoplayer2.DefaultLoadControl;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import com.my.tracker.ads.AdFormat;
import com.tapjoy.TapjoyConstants;
import com.vungle.warren.model.ReportDBAdapter;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
public final class k {
public final int A;
public final String A0;
public final String A1;
public final boolean B;
public final String B0;
public final String B1;
public final String C;
public final String C0;
public final String C1;
public final String D;
public final String D0;
public final String D1;
public final String E;
public final String E0;
public String E1;
public final String F;
public final String F0;
public String F1;
public final String G;
public final String G0;
public Context G1;
public final String H;
public final String H0;
public final String I;
public final String I0;
public final String J;
public final String J0;
public final String K;
public final String K0;
public final String L;
public final String L0;
public final String M;
public final String M0;
public final String N;
public final String N0;
public final String O;
public final String O0;
public final String P;
public final String P0;
public final String Q;
public final String Q0;
public final String R;
public final String R0;
public final String S;
public final String S0;
public final String T;
public final String T0;
public final String U;
public final String U0;
public final String V;
public final String V0;
public final String W;
public final String W0;
public final String X;
public final String X0;
public final String Y;
public final String Y0;
public final String Z;
public final String Z0;
public q f45157a;
public final String f45158a0;
public final String f45159a1;
public r f45160b;
public final String f45161b0;
public final String f45162b1;
public com.ironsource.mediationsdk.model.j f45163c;
public final String f45164c0;
public final String f45165c1;
public JSONObject f45166d;
public final String f45167d0;
public final String f45168d1;
public int f45169e;
public final String f45170e0;
public final String f45171e1;
public final String f45172f;
public final String f45173f0;
public final String f45174f1;
public final int f45175g;
public final String f45176g0;
public final String f45177g1;
public final int f45178h;
public final String f45179h0;
public final String f45180h1;
public final int f45181i;
public final String f45182i0;
public final String f45183i1;
public final int f45184j;
public final String f45185j0;
public final String f45186j1;
public final int f45187k;
public final String f45188k0;
public final String f45189k1;
public final int f45190l;
public final String f45191l0;
public final String f45192l1;
public final int f45193m;
public final String f45194m0;
public final String f45195m1;
public final int f45196n;
public final String f45197n0;
public final String f45198n1;
public final int f45199o;
public final String f45200o0;
public final String f45201o1;
public final int f45202p;
public final String f45203p0;
public final String f45204p1;
public final int f45205q;
public final String f45206q0;
public final String f45207q1;
public final int f45208r;
public final String f45209r0;
public final String f45210r1;
public final long f45211s;
public final String f45212s0;
public final String f45213s1;
public final int f45214t;
public final String f45215t0;
public final String f45216t1;
public final boolean f45217u;
public final String f45218u0;
public final String f45219u1;
public final boolean f45220v;
public final String f45221v0;
public final String f45222v1;
public final long f45223w;
public final String f45224w0;
public final String f45225w1;
public final int f45226x;
public final String f45227x0;
public final String f45228x1;
public final int f45229y;
public final String f45230y0;
public final String f45231y1;
public final int f45232z;
public final String f45233z0;
public final String f45234z1;
public static final class a {
public static final int f45235a = 1;
public static final int f45236b = 2;
public static final int f45237c = 3;
public static final int[] f45238d = {1, 2, 3};
}
public k(Context context, String str, String str2, String str3) {
this.f45172f = "error";
this.f45175g = 3;
this.f45178h = 2;
this.f45181i = 60;
this.f45184j = 10000;
this.f45187k = -1;
this.f45190l = DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS;
this.f45193m = 300;
this.f45196n = 3;
this.f45199o = 3;
this.f45202p = 3;
this.f45205q = 2;
this.f45208r = 15;
this.f45211s = 10000L;
this.f45214t = 0;
this.f45217u = false;
this.f45220v = false;
this.f45223w = 3000L;
this.f45226x = 30000;
this.f45229y = -1;
this.f45232z = DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS;
this.A = 1;
this.B = false;
this.C = "providerOrder";
this.D = "providerSettings";
this.E = TapjoyConstants.PREF_SERVER_PROVIDED_CONFIGURATIONS;
this.F = IronSourceConstants.EVENTS_GENERIC_PARAMS;
this.G = "adUnits";
this.H = "providerLoadName";
this.I = MimeTypes.BASE_TYPE_APPLICATION;
this.J = "rewardedVideo";
this.K = "interstitial";
this.L = "offerwall";
this.M = AdFormat.BANNER;
this.N = "integration";
this.O = "loggers";
this.P = l.SegmentNodeDto.SEGMENT_JSON_NAME;
this.Q = "events";
this.R = "crashReporter";
this.S = "token";
this.T = "external";
this.U = "mediationTypes";
this.V = "providerDefaultInstance";
this.W = "testSuite";
this.X = "controllerUrl";
this.Y = "settings";
this.Z = "collectBiddingDataTimeout";
this.f45158a0 = "collectBiddingDataAsyncEnabled";
this.f45161b0 = "maxNumOfAdaptersToLoadOnStart";
this.f45164c0 = "advancedLoading";
this.f45167d0 = "adapterTimeOutInSeconds";
this.f45170e0 = "atim";
this.f45173f0 = "bannerInterval";
this.f45176g0 = "isOneFlow";
this.f45179h0 = "loadRVInterval";
this.f45182i0 = "expiredDurationInMinutes";
this.f45185j0 = "server";
this.f45188k0 = "publisher";
this.f45191l0 = "console";
this.f45194m0 = "sendUltraEvents";
this.f45197n0 = "sendEventsToggle";
this.f45200o0 = "eventsCompression";
this.f45203p0 = "eventsCompressionLevel";
this.f45206q0 = "serverEventsURL";
this.f45209r0 = "serverEventsType";
this.f45212s0 = "backupThreshold";
this.f45215t0 = "maxNumberOfEvents";
this.f45218u0 = "maxEventsPerBatch";
this.f45221v0 = "optOut";
this.f45224w0 = "optIn";
this.f45227x0 = "triggerEvents";
this.f45230y0 = "nonConnectivityEvents";
this.f45233z0 = "shouldSendPublisherLogsOnUIThread";
this.A0 = "pixel";
this.B0 = "pixelEventsUrl";
this.C0 = "pixelEventsEnabled";
this.D0 = "placements";
this.E0 = ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID;
this.F0 = "placementName";
this.G0 = "delivery";
this.H0 = "isDefault";
this.I0 = "capping";
this.J0 = "pacing";
this.K0 = "enabled";
this.L0 = "maxImpressions";
this.M0 = "numOfSeconds";
this.N0 = "unit";
this.O0 = "virtualItemName";
this.P0 = "virtualItemCount";
this.Q0 = "uuidEnabled";
this.R0 = "abt";
this.S0 = "delayLoadFailure";
this.T0 = "keysToInclude";
this.U0 = "reporterURL";
this.V0 = "reporterKeyword";
this.W0 = "includeANR";
this.X0 = "timeout";
this.Y0 = "setIgnoreDebugger";
this.Z0 = "adSourceName";
this.f45159a1 = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
this.f45162b1 = "mpis";
this.f45165c1 = "auction";
this.f45168d1 = "auctionData";
this.f45171e1 = "auctioneerURL";
this.f45174f1 = "extAuctioneerURL";
this.f45177g1 = IronSourceConstants.EVENTS_PROGRAMMATIC;
this.f45180h1 = "objectPerWaterfall";
this.f45183i1 = "minTimeBeforeFirstAuction";
this.f45186j1 = "timeToWaitBeforeAuction";
this.f45189k1 = "timeToWaitBeforeLoad";
this.f45192l1 = "auctionRetryInterval";
this.f45195m1 = "isAuctionOnShowStart";
this.f45198n1 = "isLoadWhileShow";
this.f45201o1 = IronSourceConstants.AUCTION_TRIALS;
this.f45204p1 = "auctionTimeout";
this.f45207q1 = "auctionSavedHistory";
this.f45210r1 = "disableLoadWhileShowSupportFor";
this.f45213s1 = "timeToDeleteOldWaterfallAfterAuction";
this.f45216t1 = "compressAuctionRequest";
this.f45219u1 = "compressAuctionResponse";
this.f45222v1 = "encryptionVersion";
this.f45225w1 = "shouldSendBannerBURLFromImpression";
this.f45228x1 = "optInKeys";
this.f45231y1 = "tokenGenericParams";
this.f45234z1 = "oneToken";
this.A1 = "compressToken";
this.B1 = "isExternalArmEventsEnabled";
this.C1 = "externalArmEventsUrl";
this.D1 = "compressExternalToken";
this.f45169e = a.f45235a;
this.G1 = context;
try {
this.f45166d = TextUtils.isEmpty(str3) ? new JSONObject() : new JSONObject(str3);
h();
i();
g();
this.E1 = TextUtils.isEmpty(str) ? "" : str;
this.F1 = TextUtils.isEmpty(str2) ? "" : str2;
} catch (JSONException e11) {
e11.printStackTrace();
e();
}
}
public static int a(JSONObject jSONObject, JSONObject jSONObject2, String str, int i11) {
int i12 = 0;
if (jSONObject.has(str)) {
i12 = jSONObject.optInt(str, 0);
} else if (jSONObject2.has(str)) {
i12 = jSONObject2.optInt(str, 0);
}
return i12 == 0 ? i11 : i12;
}
public static com.ironsource.mediationsdk.model.o b(JSONObject jSONObject) {
p pVar = null;
if (jSONObject == null) {
return null;
}
o.a aVar = new o.a();
aVar.f44888a = jSONObject.optBoolean("delivery", true);
JSONObject optJSONObject = jSONObject.optJSONObject("capping");
if (optJSONObject != null) {
String optString = optJSONObject.optString("unit");
if (!TextUtils.isEmpty(optString)) {
p pVar2 = p.PER_DAY;
if (!pVar2.toString().equals(optString)) {
pVar2 = p.PER_HOUR;
}
pVar = pVar2;
}
int optInt = optJSONObject.optInt("maxImpressions", 0);
aVar.a(optJSONObject.optBoolean("enabled", false) && optInt > 0, pVar, 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();
}
public static int[] c(JSONObject jSONObject, String str) {
JSONArray optJSONArray = jSONObject.optJSONArray(str);
if (optJSONArray == null) {
return null;
}
int[] iArr = new int[optJSONArray.length()];
for (int i11 = 0; i11 < optJSONArray.length(); i11++) {
iArr[i11] = optJSONArray.optInt(i11);
}
return iArr;
}
public static JSONObject d(JSONObject jSONObject, String str) {
if (jSONObject != null) {
return jSONObject.optJSONObject(str);
}
return null;
}
public final void e() {
this.f45166d = new JSONObject();
this.E1 = "";
this.F1 = "";
this.f45157a = new q();
this.f45160b = r.a();
this.f45163c = new com.ironsource.mediationsdk.model.j();
}
public final boolean f() {
JSONObject d11;
JSONArray optJSONArray;
JSONObject d12 = d(this.f45166d, "providerOrder");
JSONArray names = d12.names();
if (names == null) {
return true;
}
JSONObject d13 = d(d(this.f45166d, TapjoyConstants.PREF_SERVER_PROVIDED_CONFIGURATIONS), "adUnits");
for (int i11 = 0; i11 < names.length(); i11++) {
String optString = names.optString(i11);
JSONArray optJSONArray2 = d12.optJSONArray(optString);
if (optJSONArray2 != null && optJSONArray2.length() != 0 && (d11 = d(d13, optString)) != null && ((optJSONArray = d11.optJSONArray("placements")) == null || optJSONArray.length() == 0)) {
return false;
}
}
return true;
}
public final void g() {
com.ironsource.mediationsdk.model.j jVar;
com.ironsource.mediationsdk.model.j jVar2;
try {
JSONObject d11 = d(this.f45166d, "providerOrder");
JSONArray optJSONArray = d11.optJSONArray("rewardedVideo");
JSONArray optJSONArray2 = d11.optJSONArray("interstitial");
JSONArray optJSONArray3 = d11.optJSONArray(AdFormat.BANNER);
this.f45157a = new q();
if (optJSONArray != null && (jVar2 = this.f45163c) != null && jVar2.f44862a != null) {
for (int i11 = 0; i11 < optJSONArray.length(); i11++) {
String optString = optJSONArray.optString(i11);
q qVar = this.f45157a;
if (!TextUtils.isEmpty(optString)) {
qVar.f44898a.add(optString);
}
NetworkSettings a11 = r.a().a(optString);
if (a11 != null) {
a11.setRewardedVideoPriority(i11);
}
}
}
if (optJSONArray2 != null && (jVar = this.f45163c) != null && jVar.f44863b != null) {
for (int i12 = 0; i12 < optJSONArray2.length(); i12++) {
String optString2 = optJSONArray2.optString(i12);
q qVar2 = this.f45157a;
if (!TextUtils.isEmpty(optString2)) {
qVar2.f44899b.add(optString2);
}
NetworkSettings a12 = r.a().a(optString2);
if (a12 != null) {
a12.setInterstitialPriority(i12);
}
}
}
if (optJSONArray3 != null) {
for (int i13 = 0; i13 < optJSONArray3.length(); i13++) {
String optString3 = optJSONArray3.optString(i13);
q qVar3 = this.f45157a;
if (!TextUtils.isEmpty(optString3)) {
qVar3.f44900c.add(optString3);
}
NetworkSettings a13 = r.a().a(optString3);
if (a13 != null) {
a13.setBannerPriority(i13);
}
}
}
} catch (Exception e11) {
e11.printStackTrace();
}
}
public final void h() {
String str;
JSONObject jSONObject;
boolean z11;
NetworkSettings networkSettings;
r rVar;
String str2 = "Mediation";
try {
this.f45160b = r.a();
JSONObject d11 = d(this.f45166d, "providerSettings");
Iterator<String> keys = d11.keys();
while (keys.hasNext()) {
String next = keys.next();
JSONObject optJSONObject = d11.optJSONObject(next);
if (optJSONObject != null) {
boolean optBoolean = optJSONObject.optBoolean("mpis", false);
String optString = optJSONObject.optString(IronSourceConstants.EVENTS_SUB_PROVIDER_ID, MBridgeConstans.ENDCARD_URL_TYPE_PL);
String optString2 = optJSONObject.optString("adSourceName", null);
String optString3 = optJSONObject.optString("providerLoadName", next);
String optString4 = optJSONObject.optString("providerDefaultInstance", optString3);
JSONObject d12 = d(optJSONObject, "adUnits");
JSONObject d13 = d(optJSONObject, MimeTypes.BASE_TYPE_APPLICATION);
JSONObject d14 = d(d12, "rewardedVideo");
JSONObject d15 = d(d12, "interstitial");
JSONObject d16 = d(d12, AdFormat.BANNER);
JSONObject mergeJsons = IronSourceUtils.mergeJsons(d14, d13);
JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(d15, d13);
JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(d16, d13);
if (this.f45160b.b(next)) {
NetworkSettings a11 = this.f45160b.a(next);
JSONObject rewardedVideoSettings = a11.getRewardedVideoSettings();
JSONObject interstitialSettings = a11.getInterstitialSettings();
JSONObject bannerSettings = a11.getBannerSettings();
a11.setRewardedVideoSettings(IronSourceUtils.mergeJsons(rewardedVideoSettings, mergeJsons));
a11.setInterstitialSettings(IronSourceUtils.mergeJsons(interstitialSettings, mergeJsons2));
a11.setBannerSettings(IronSourceUtils.mergeJsons(bannerSettings, mergeJsons3));
a11.setIsMultipleInstances(optBoolean);
a11.setSubProviderId(optString);
a11.setAdSourceNameForEvents(optString2);
} else {
String lowerCase = StringUtils.toLowerCase(optString3);
if (this.f45160b.b(str2) && (StringUtils.toLowerCase(IronSourceConstants.SUPERSONIC_CONFIG_NAME).equals(lowerCase) || StringUtils.toLowerCase(IronSourceConstants.IRONSOURCE_CONFIG_NAME).equals(lowerCase))) {
z11 = true;
} else {
z11 = false;
}
if (z11) {
NetworkSettings a12 = this.f45160b.a(str2);
JSONObject rewardedVideoSettings2 = a12.getRewardedVideoSettings();
JSONObject interstitialSettings2 = a12.getInterstitialSettings();
JSONObject bannerSettings2 = a12.getBannerSettings();
str = str2;
jSONObject = d11;
networkSettings = new NetworkSettings(next, optString3, optString4, d13, 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);
rVar = this.f45160b;
} else {
str = str2;
jSONObject = d11;
networkSettings = new NetworkSettings(next, optString3, optString4, d13, mergeJsons, mergeJsons2, mergeJsons3);
networkSettings.setIsMultipleInstances(optBoolean);
networkSettings.setSubProviderId(optString);
networkSettings.setAdSourceNameForEvents(optString2);
rVar = this.f45160b;
}
rVar.a(networkSettings);
}
} else {
str = str2;
jSONObject = d11;
}
str2 = str;
d11 = jSONObject;
}
this.f45160b.b();
} catch (Exception e11) {
e11.printStackTrace();
}
}
public final void i() {
Exception exc;
JSONObject jSONObject;
JSONObject jSONObject2;
String str;
String str2;
int i11;
boolean z11;
String str3;
int[] iArr;
int[] iArr2;
int[] iArr3;
int[] iArr4;
String str4;
String str5;
c cVar;
k kVar;
s sVar;
Placement placement;
String str6;
String str7;
com.ironsource.mediationsdk.model.l lVar;
JSONObject jSONObject3;
k kVar2;
String str8;
String str9;
com.ironsource.mediationsdk.model.h hVar;
String str10;
String str11;
String str12;
com.ironsource.mediationsdk.model.m mVar;
boolean z12;
t tVar;
JSONObject d11;
int[] iArr5;
int[] iArr6;
int[] iArr7;
int[] iArr8;
JSONArray jSONArray;
OfferwallPlacement offerwallPlacement;
boolean z13;
boolean z14;
boolean optBoolean;
JSONArray optJSONArray;
int[] iArr9;
JSONArray optJSONArray2;
int[] iArr10;
JSONArray optJSONArray3;
int[] iArr11;
JSONArray optJSONArray4;
int[] iArr12;
String str13;
JSONObject jSONObject4;
c cVar2;
JSONArray jSONArray2;
JSONObject jSONObject5;
String str14;
BannerPlacement bannerPlacement;
int i12;
boolean z15;
int[] iArr13;
int[] iArr14;
int[] iArr15;
int[] iArr16;
JSONObject jSONObject6;
c cVar3;
JSONObject jSONObject7;
String str15;
JSONArray jSONArray3;
InterstitialPlacement interstitialPlacement;
try {
JSONObject d12 = d(this.f45166d, TapjoyConstants.PREF_SERVER_PROVIDED_CONFIGURATIONS);
JSONObject d13 = d(d12, "adUnits");
JSONObject d14 = d(d12, MimeTypes.BASE_TYPE_APPLICATION);
JSONObject d15 = d(d13, "rewardedVideo");
JSONObject d16 = d(d13, "interstitial");
JSONObject d17 = d(d13, "offerwall");
JSONObject d18 = d(d13, AdFormat.BANNER);
JSONObject d19 = d(d14, "events");
JSONObject d21 = d(d14, "loggers");
JSONObject d22 = d(d14, "token");
JSONObject d23 = d(d14, l.SegmentNodeDto.SEGMENT_JSON_NAME);
JSONObject d24 = d(d14, "auction");
JSONObject d25 = d(d14, "crashReporter");
JSONObject d26 = d(d14, "settings");
JSONObject d27 = d(d14, "external");
JSONObject d28 = d(d19, "pixel");
if (d14 != null) {
jSONObject = d23;
jSONObject2 = d25;
IronSourceUtils.l(this.G1, "uuidEnabled", d14.optBoolean("uuidEnabled", true));
} else {
jSONObject = d23;
jSONObject2 = d25;
}
if (d19 != null) {
String optString = d19.optString("abt");
if (!TextUtils.isEmpty(optString)) {
com.ironsource.mediationsdk.events.e.d().f44613q = optString;
com.ironsource.mediationsdk.events.i.d().f44613q = optString;
}
}
String str16 = "serverEventsType";
JSONObject jSONObject8 = d24;
String str17 = "optIn";
String str18 = "optOut";
if (d15 != null) {
try {
JSONArray optJSONArray5 = d15.optJSONArray("placements");
str = "placements";
JSONObject d29 = d(d15, "events");
str2 = "events";
JSONArray jSONArray4 = optJSONArray5;
boolean optBoolean2 = d15.optBoolean("collectBiddingDataAsyncEnabled", false);
long optLong = d15.optLong("collectBiddingDataTimeout", 3000L);
int a11 = a(d15, d14, "maxNumOfAdaptersToLoadOnStart", 2);
int a12 = a(d15, d14, "advancedLoading", 0);
if (a12 > 0) {
i11 = a12;
z11 = true;
} else {
i11 = a11;
z11 = false;
}
int a13 = a(d15, d14, "adapterTimeOutInSeconds", 60);
int a14 = a(d15, d14, "loadRVInterval", 300);
int a15 = a(d15, d14, "expiredDurationInMinutes", -1);
int a16 = a(d15, d14, "delayLoadFailure", 3);
JSONObject mergeJsons = IronSourceUtils.mergeJsons(d29, d19);
boolean optBoolean3 = mergeJsons.optBoolean("sendUltraEvents", false);
boolean optBoolean4 = mergeJsons.optBoolean("sendEventsToggle", false);
boolean optBoolean5 = mergeJsons.optBoolean("eventsCompression", false);
int optInt = mergeJsons.optInt("eventsCompressionLevel", -1);
String optString2 = mergeJsons.optString("serverEventsURL", "");
String optString3 = mergeJsons.optString("serverEventsType", "");
int optInt2 = mergeJsons.optInt("backupThreshold", -1);
int optInt3 = mergeJsons.optInt("maxNumberOfEvents", -1);
int optInt4 = mergeJsons.optInt("maxEventsPerBatch", DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS);
JSONArray optJSONArray6 = mergeJsons.optJSONArray(str18);
if (optJSONArray6 != null) {
int[] iArr17 = new int[optJSONArray6.length()];
str18 = str18;
str3 = "maxEventsPerBatch";
for (int i13 = 0; i13 < optJSONArray6.length(); i13++) {
iArr17[i13] = optJSONArray6.optInt(i13);
}
iArr = iArr17;
} else {
str18 = str18;
str3 = "maxEventsPerBatch";
iArr = null;
}
JSONArray optJSONArray7 = mergeJsons.optJSONArray(str17);
if (optJSONArray7 != null) {
int[] iArr18 = new int[optJSONArray7.length()];
str17 = str17;
for (int i14 = 0; i14 < optJSONArray7.length(); i14++) {
iArr18[i14] = optJSONArray7.optInt(i14);
}
iArr2 = iArr18;
} else {
str17 = str17;
iArr2 = null;
}
JSONArray optJSONArray8 = mergeJsons.optJSONArray("triggerEvents");
if (optJSONArray8 != null) {
int[] iArr19 = new int[optJSONArray8.length()];
for (int i15 = 0; i15 < optJSONArray8.length(); i15++) {
iArr19[i15] = optJSONArray8.optInt(i15);
}
iArr3 = iArr19;
} else {
iArr3 = null;
}
JSONArray optJSONArray9 = mergeJsons.optJSONArray("nonConnectivityEvents");
if (optJSONArray9 != null) {
int[] iArr20 = new int[optJSONArray9.length()];
for (int i16 = 0; i16 < optJSONArray9.length(); i16++) {
iArr20[i16] = optJSONArray9.optInt(i16);
}
iArr4 = iArr20;
} else {
iArr4 = null;
}
com.ironsource.mediationsdk.model.e eVar = new com.ironsource.mediationsdk.model.e(optBoolean3, optBoolean4, optBoolean5, optInt, optString2, optString3, optInt2, optInt3, optInt4, iArr, iArr2, iArr3, iArr4);
if (jSONObject8 != null) {
JSONObject d31 = d(jSONObject8, "rewardedVideo");
String optString4 = jSONObject8.optString("auctionData", "");
String optString5 = jSONObject8.optString("auctioneerURL", "");
String optString6 = jSONObject8.optString("extAuctioneerURL", "");
int optInt5 = jSONObject8.optInt(IronSourceConstants.AUCTION_TRIALS, 2);
long optLong2 = jSONObject8.optLong("auctionTimeout", 10000L);
int optInt6 = jSONObject8.optInt("auctionSavedHistory", 15);
boolean optBoolean6 = jSONObject8.optBoolean("compressAuctionRequest", false);
boolean optBoolean7 = jSONObject8.optBoolean("compressAuctionResponse", false);
int optInt7 = jSONObject8.optInt("encryptionVersion", 1);
jSONObject8 = jSONObject8;
str5 = "maxNumberOfEvents";
str4 = "backupThreshold";
c cVar4 = new c(optString4, optString5, optString6, optInt5, optInt6, optLong2, d31.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), d31.optInt("minTimeBeforeFirstAuction", 2000), d31.optInt("auctionRetryInterval", 30000), d31.optInt("timeToWaitBeforeAuction", DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS), d31.optInt("timeToWaitBeforeLoad", 50), d31.optBoolean("isAuctionOnShowStart", false), d31.optBoolean("isLoadWhileShow", false), d31.optInt("timeToDeleteOldWaterfallAfterAuction", 30000), optBoolean6, optBoolean7, d31.optBoolean("objectPerWaterfall", false), optInt7, false);
JSONArray optJSONArray10 = d31.optJSONArray("disableLoadWhileShowSupportFor");
if (optJSONArray10 != null) {
for (int i17 = 0; i17 < optJSONArray10.length(); i17++) {
String optString7 = optJSONArray10.optString(i17);
if (!TextUtils.isEmpty(optString7)) {
cVar4.f45096o.add(optString7);
}
}
}
cVar = cVar4;
} else {
str4 = "backupThreshold";
str5 = "maxNumberOfEvents";
cVar = new c();
}
s sVar2 = new s(i11, z11, a13, a14, a15, eVar, cVar, a16, optBoolean2, optLong);
if (jSONArray4 != null) {
int i18 = 0;
while (i18 < jSONArray4.length()) {
JSONArray jSONArray5 = jSONArray4;
JSONObject optJSONObject = jSONArray5.optJSONObject(i18);
if (optJSONObject != null) {
int optInt8 = optJSONObject.optInt(ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID, -1);
String optString8 = optJSONObject.optString("placementName", "");
boolean optBoolean8 = optJSONObject.optBoolean("isDefault", false);
String optString9 = optJSONObject.optString("virtualItemName", "");
int optInt9 = optJSONObject.optInt("virtualItemCount", -1);
com.ironsource.mediationsdk.model.o b11 = b(optJSONObject);
if (optInt8 >= 0 && !TextUtils.isEmpty(optString8) && !TextUtils.isEmpty(optString9) && optInt9 > 0) {
placement = new Placement(optInt8, optString8, optBoolean8, optString9, optInt9, b11);
if (b11 != null) {
kVar = this;
try {
j.a(kVar.G1, placement);
} catch (Exception e11) {
exc = e11;
exc.printStackTrace();
return;
}
}
if (placement == null) {
sVar2.f44903a.add(placement);
if (sVar2.f44912j != null && !placement.isPlacementId(0)) {
}
sVar2.f44912j = placement;
}
i18++;
jSONArray4 = jSONArray5;
}
}
placement = null;
if (placement == null) {
}
i18++;
jSONArray4 = jSONArray5;
}
}
kVar = this;
sVar = sVar2;
} catch (Exception e12) {
e = e12;
exc = e;
exc.printStackTrace();
return;
}
} else {
str2 = "events";
str = "placements";
str3 = "maxEventsPerBatch";
str5 = "maxNumberOfEvents";
str4 = "backupThreshold";
kVar = this;
sVar = null;
}
if (d16 != null) {
String str19 = str;
JSONArray optJSONArray11 = d16.optJSONArray(str19);
String str20 = str2;
JSONObject d32 = d(d16, str20);
str2 = str20;
boolean optBoolean9 = d16.optBoolean("collectBiddingDataAsyncEnabled", false);
str = str19;
JSONArray jSONArray6 = optJSONArray11;
long optLong3 = d16.optLong("collectBiddingDataTimeout", 3000L);
int a17 = a(d16, d14, "maxNumOfAdaptersToLoadOnStart", 2);
int a18 = a(d16, d14, "advancedLoading", 0);
if (a18 > 0) {
i12 = a18;
z15 = true;
} else {
i12 = a17;
z15 = false;
}
int a19 = a(d16, d14, "adapterTimeOutInSeconds", 60);
int a21 = a(d16, d14, "delayLoadFailure", 3);
JSONObject mergeJsons2 = IronSourceUtils.mergeJsons(d32, d19);
boolean optBoolean10 = mergeJsons2.optBoolean("sendEventsToggle", false);
boolean optBoolean11 = mergeJsons2.optBoolean("eventsCompression", false);
int optInt10 = mergeJsons2.optInt("eventsCompressionLevel", -1);
String optString10 = mergeJsons2.optString("serverEventsURL", "");
String optString11 = mergeJsons2.optString("serverEventsType", "");
String str21 = str4;
int optInt11 = mergeJsons2.optInt(str21, -1);
String str22 = str5;
int optInt12 = mergeJsons2.optInt(str22, -1);
String str23 = str3;
int optInt13 = mergeJsons2.optInt(str23, DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS);
str3 = str23;
String str24 = str18;
JSONArray optJSONArray12 = mergeJsons2.optJSONArray(str24);
if (optJSONArray12 != null) {
str18 = str24;
int[] iArr21 = new int[optJSONArray12.length()];
str4 = str21;
str5 = str22;
for (int i19 = 0; i19 < optJSONArray12.length(); i19++) {
iArr21[i19] = optJSONArray12.optInt(i19);
}
iArr13 = iArr21;
} else {
str4 = str21;
str5 = str22;
str18 = str24;
iArr13 = null;
}
String str25 = str17;
JSONArray optJSONArray13 = mergeJsons2.optJSONArray(str25);
if (optJSONArray13 != null) {
int[] iArr22 = new int[optJSONArray13.length()];
str17 = str25;
for (int i21 = 0; i21 < optJSONArray13.length(); i21++) {
iArr22[i21] = optJSONArray13.optInt(i21);
}
iArr14 = iArr22;
} else {
str17 = str25;
iArr14 = null;
}
JSONArray optJSONArray14 = mergeJsons2.optJSONArray("triggerEvents");
if (optJSONArray14 != null) {
int[] iArr23 = new int[optJSONArray14.length()];
for (int i22 = 0; i22 < optJSONArray14.length(); i22++) {
iArr23[i22] = optJSONArray14.optInt(i22);
}
iArr15 = iArr23;
} else {
iArr15 = null;
}
JSONArray optJSONArray15 = mergeJsons2.optJSONArray("nonConnectivityEvents");
if (optJSONArray15 != null) {
int[] iArr24 = new int[optJSONArray15.length()];
for (int i23 = 0; i23 < optJSONArray15.length(); i23++) {
iArr24[i23] = optJSONArray15.optInt(i23);
}
iArr16 = iArr24;
} else {
iArr16 = null;
}
com.ironsource.mediationsdk.model.e eVar2 = new com.ironsource.mediationsdk.model.e(false, optBoolean10, optBoolean11, optInt10, optString10, optString11, optInt11, optInt12, optInt13, iArr13, iArr14, iArr15, iArr16);
if (jSONObject8 != null) {
jSONObject6 = jSONObject8;
JSONObject d33 = d(jSONObject6, "interstitial");
str7 = "eventsCompression";
cVar3 = new c(jSONObject6.optString("auctionData", ""), jSONObject6.optString("auctioneerURL", ""), jSONObject6.optString("extAuctioneerURL", ""), jSONObject6.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject6.optInt("auctionSavedHistory", 15), jSONObject6.optLong("auctionTimeout", 10000L), d33.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), d33.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, true, 0, jSONObject6.optBoolean("compressAuctionRequest", false), jSONObject6.optBoolean("compressAuctionResponse", false), d33.optBoolean("objectPerWaterfall", false), jSONObject6.optInt("encryptionVersion", 1), false);
} else {
str7 = "eventsCompression";
jSONObject6 = jSONObject8;
cVar3 = new c();
}
com.ironsource.mediationsdk.model.l lVar2 = new com.ironsource.mediationsdk.model.l(i12, z15, a19, eVar2, cVar3, a21, optBoolean9, optLong3);
if (jSONArray6 != null) {
int i24 = 0;
while (i24 < jSONArray6.length()) {
JSONArray jSONArray7 = jSONArray6;
JSONObject optJSONObject2 = jSONArray7.optJSONObject(i24);
if (optJSONObject2 != null) {
jSONArray3 = jSONArray7;
int optInt14 = optJSONObject2.optInt(ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID, -1);
String optString12 = optJSONObject2.optString("placementName", "");
jSONObject7 = jSONObject6;
str15 = str16;
boolean optBoolean12 = optJSONObject2.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.o b12 = b(optJSONObject2);
if (optInt14 >= 0 && !TextUtils.isEmpty(optString12)) {
interstitialPlacement = new InterstitialPlacement(optInt14, optString12, optBoolean12, b12);
if (b12 != null) {
j.a(kVar.G1, interstitialPlacement);
}
if (interstitialPlacement == null) {
lVar2.f44868a.add(interstitialPlacement);
if (lVar2.f44877j == null || interstitialPlacement.isPlacementId(0)) {
lVar2.f44877j = interstitialPlacement;
}
}
i24++;
jSONArray6 = jSONArray3;
jSONObject6 = jSONObject7;
str16 = str15;
}
} else {
jSONObject7 = jSONObject6;
str15 = str16;
jSONArray3 = jSONArray7;
}
interstitialPlacement = null;
if (interstitialPlacement == null) {
}
i24++;
jSONArray6 = jSONArray3;
jSONObject6 = jSONObject7;
str16 = str15;
}
}
jSONObject8 = jSONObject6;
str6 = str16;
lVar = lVar2;
} else {
str6 = "serverEventsType";
str7 = "eventsCompression";
lVar = null;
}
if (d18 != null) {
String str26 = str;
try {
JSONArray optJSONArray16 = d18.optJSONArray(str26);
String str27 = str2;
JSONObject d34 = d(d18, str27);
int a22 = a(d18, d14, "maxNumOfAdaptersToLoadOnStart", 1);
str2 = str27;
long optLong4 = d18.has("atim") ? d18.optLong("atim", 0L) : d14.has("atim") ? d14.optLong("atim", 0L) : 0L;
long j11 = optLong4 == 0 ? 10000L : optLong4;
int a23 = a(d18, d14, "delayLoadFailure", 3);
int a24 = a(d18, d14, "bannerInterval", 60);
if (d18.has("isOneFlow")) {
z13 = false;
optBoolean = d18.optBoolean("isOneFlow", false);
} else {
z13 = false;
if (d14.has("isOneFlow")) {
optBoolean = d14.optBoolean("isOneFlow", false);
} else {
z14 = false;
boolean optBoolean13 = d18.optBoolean("collectBiddingDataAsyncEnabled", z13);
str = str26;
long optLong5 = d18.optLong("collectBiddingDataTimeout", 3000L);
JSONObject mergeJsons3 = IronSourceUtils.mergeJsons(d34, d19);
boolean optBoolean14 = mergeJsons3.optBoolean("sendEventsToggle", false);
boolean optBoolean15 = mergeJsons3.optBoolean(str7, false);
int optInt15 = mergeJsons3.optInt("eventsCompressionLevel", -1);
String optString13 = mergeJsons3.optString("serverEventsURL", "");
str8 = str6;
String optString14 = mergeJsons3.optString(str8, "");
str9 = str4;
int optInt16 = mergeJsons3.optInt(str9, -1);
String str28 = str5;
int optInt17 = mergeJsons3.optInt(str28, -1);
String str29 = str3;
int optInt18 = mergeJsons3.optInt(str29, DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS);
String str30 = str18;
optJSONArray = mergeJsons3.optJSONArray(str30);
if (optJSONArray == null) {
jSONObject3 = d14;
int[] iArr25 = new int[optJSONArray.length()];
str3 = str29;
str18 = str30;
for (int i25 = 0; i25 < optJSONArray.length(); i25++) {
iArr25[i25] = optJSONArray.optInt(i25);
}
iArr9 = iArr25;
} else {
str3 = str29;
jSONObject3 = d14;
str18 = str30;
iArr9 = null;
}
String str31 = str17;
optJSONArray2 = mergeJsons3.optJSONArray(str31);
if (optJSONArray2 == null) {
int[] iArr26 = new int[optJSONArray2.length()];
str17 = str31;
for (int i26 = 0; i26 < optJSONArray2.length(); i26++) {
iArr26[i26] = optJSONArray2.optInt(i26);
}
iArr10 = iArr26;
} else {
str17 = str31;
iArr10 = null;
}
optJSONArray3 = mergeJsons3.optJSONArray("triggerEvents");
if (optJSONArray3 == null) {
int[] iArr27 = new int[optJSONArray3.length()];
for (int i27 = 0; i27 < optJSONArray3.length(); i27++) {
iArr27[i27] = optJSONArray3.optInt(i27);
}
iArr11 = iArr27;
} else {
iArr11 = null;
}
optJSONArray4 = mergeJsons3.optJSONArray("nonConnectivityEvents");
if (optJSONArray4 == null) {
int[] iArr28 = new int[optJSONArray4.length()];
for (int i28 = 0; i28 < optJSONArray4.length(); i28++) {
iArr28[i28] = optJSONArray4.optInt(i28);
}
iArr12 = iArr28;
} else {
iArr12 = null;
}
com.ironsource.mediationsdk.model.e eVar3 = new com.ironsource.mediationsdk.model.e(false, optBoolean14, optBoolean15, optInt15, optString13, optString14, optInt16, optInt17, optInt18, iArr9, iArr10, iArr11, iArr12);
if (jSONObject8 == null) {
jSONObject4 = jSONObject8;
JSONObject d35 = d(jSONObject4, AdFormat.BANNER);
if (d35 != null) {
str13 = str28;
cVar2 = new c(jSONObject4.optString("auctionData", ""), jSONObject4.optString("auctioneerURL", ""), jSONObject4.optString("extAuctioneerURL", ""), jSONObject4.optInt(IronSourceConstants.AUCTION_TRIALS, 2), jSONObject4.optInt("auctionSavedHistory", 15), jSONObject4.optLong("auctionTimeout", 10000L), d35.optBoolean(IronSourceConstants.EVENTS_PROGRAMMATIC, false), d35.optInt("minTimeBeforeFirstAuction", 2000), 0L, 0L, 0L, true, true, 0, jSONObject4.optBoolean("compressAuctionRequest", false), jSONObject4.optBoolean("compressAuctionResponse", false), d35.optBoolean("objectPerWaterfall", false), jSONObject4.optInt("encryptionVersion", 1), d35.optBoolean("shouldSendBannerBURLFromImpression", true));
} else {
str13 = str28;
cVar2 = new c();
}
} else {
str13 = str28;
jSONObject4 = jSONObject8;
cVar2 = new c();
}
com.ironsource.mediationsdk.model.h hVar2 = new com.ironsource.mediationsdk.model.h(a22, j11, eVar3, a24, cVar2, a23, z14, optBoolean13, optLong5);
if (optJSONArray16 != null) {
int i29 = 0;
while (i29 < optJSONArray16.length()) {
JSONObject optJSONObject3 = optJSONArray16.optJSONObject(i29);
if (optJSONObject3 != null) {
jSONArray2 = optJSONArray16;
int optInt19 = optJSONObject3.optInt(ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID, -1);
String optString15 = optJSONObject3.optString("placementName", "");
str14 = str13;
jSONObject5 = jSONObject4;
boolean optBoolean16 = optJSONObject3.optBoolean("isDefault", false);
com.ironsource.mediationsdk.model.o b13 = b(optJSONObject3);
if (optInt19 >= 0 && !TextUtils.isEmpty(optString15)) {
bannerPlacement = new BannerPlacement(optInt19, optString15, optBoolean16, b13);
if (b13 != null) {
try {
j.a(this.G1, bannerPlacement);
} catch (Exception e13) {
e = e13;
exc = e;
exc.printStackTrace();
return;
}
}
if (bannerPlacement == null) {
hVar2.f44854d.add(bannerPlacement);
if (hVar2.f44855e != null && !bannerPlacement.isPlacementId(0)) {
}
hVar2.f44855e = bannerPlacement;
}
i29++;
optJSONArray16 = jSONArray2;
jSONObject4 = jSONObject5;
str13 = str14;
}
} else {
jSONArray2 = optJSONArray16;
jSONObject5 = jSONObject4;
str14 = str13;
}
bannerPlacement = null;
if (bannerPlacement == null) {
}
i29++;
optJSONArray16 = jSONArray2;
jSONObject4 = jSONObject5;
str13 = str14;
}
}
kVar2 = this;
jSONObject8 = jSONObject4;
str5 = str13;
hVar = hVar2;
}
}
z14 = optBoolean;
boolean optBoolean132 = d18.optBoolean("collectBiddingDataAsyncEnabled", z13);
str = str26;
long optLong52 = d18.optLong("collectBiddingDataTimeout", 3000L);
JSONObject mergeJsons32 = IronSourceUtils.mergeJsons(d34, d19);
boolean optBoolean142 = mergeJsons32.optBoolean("sendEventsToggle", false);
boolean optBoolean152 = mergeJsons32.optBoolean(str7, false);
int optInt152 = mergeJsons32.optInt("eventsCompressionLevel", -1);
String optString132 = mergeJsons32.optString("serverEventsURL", "");
str8 = str6;
String optString142 = mergeJsons32.optString(str8, "");
str9 = str4;
int optInt162 = mergeJsons32.optInt(str9, -1);
String str282 = str5;
int optInt172 = mergeJsons32.optInt(str282, -1);
String str292 = str3;
int optInt182 = mergeJsons32.optInt(str292, DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS);
String str302 = str18;
optJSONArray = mergeJsons32.optJSONArray(str302);
if (optJSONArray == null) {
}
String str312 = str17;
optJSONArray2 = mergeJsons32.optJSONArray(str312);
if (optJSONArray2 == null) {
}
optJSONArray3 = mergeJsons32.optJSONArray("triggerEvents");
if (optJSONArray3 == null) {
}
optJSONArray4 = mergeJsons32.optJSONArray("nonConnectivityEvents");
if (optJSONArray4 == null) {
}
com.ironsource.mediationsdk.model.e eVar32 = new com.ironsource.mediationsdk.model.e(false, optBoolean142, optBoolean152, optInt152, optString132, optString142, optInt162, optInt172, optInt182, iArr9, iArr10, iArr11, iArr12);
if (jSONObject8 == null) {
}
com.ironsource.mediationsdk.model.h hVar22 = new com.ironsource.mediationsdk.model.h(a22, j11, eVar32, a24, cVar2, a23, z14, optBoolean132, optLong52);
if (optJSONArray16 != null) {
}
kVar2 = this;
jSONObject8 = jSONObject4;
str5 = str13;
hVar = hVar22;
} catch (Exception e14) {
e = e14;
exc = e;
exc.printStackTrace();
return;
}
} else {
jSONObject3 = d14;
kVar2 = kVar;
str8 = str6;
str9 = str4;
hVar = null;
}
if (d17 != null) {
str12 = str2;
JSONObject mergeJsons4 = IronSourceUtils.mergeJsons(d(d17, str12), d19);
boolean optBoolean17 = mergeJsons4.optBoolean("sendEventsToggle", false);
boolean optBoolean18 = mergeJsons4.optBoolean(str7, false);
int optInt20 = mergeJsons4.optInt("eventsCompressionLevel", -1);
String optString16 = mergeJsons4.optString("serverEventsURL", "");
String optString17 = mergeJsons4.optString(str8, "");
int optInt21 = mergeJsons4.optInt(str9, -1);
int optInt22 = mergeJsons4.optInt(str5, -1);
int optInt23 = mergeJsons4.optInt(str3, DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS);
str11 = str18;
JSONArray optJSONArray17 = mergeJsons4.optJSONArray(str11);
if (optJSONArray17 != null) {
int[] iArr29 = new int[optJSONArray17.length()];
for (int i31 = 0; i31 < optJSONArray17.length(); i31++) {
iArr29[i31] = optJSONArray17.optInt(i31);
}
iArr5 = iArr29;
} else {
iArr5 = null;
}
str10 = str17;
JSONArray optJSONArray18 = mergeJsons4.optJSONArray(str10);
if (optJSONArray18 != null) {
int[] iArr30 = new int[optJSONArray18.length()];
for (int i32 = 0; i32 < optJSONArray18.length(); i32++) {
iArr30[i32] = optJSONArray18.optInt(i32);
}
iArr6 = iArr30;
} else {
iArr6 = null;
}
JSONArray optJSONArray19 = mergeJsons4.optJSONArray("triggerEvents");
if (optJSONArray19 != null) {
int[] iArr31 = new int[optJSONArray19.length()];
for (int i33 = 0; i33 < optJSONArray19.length(); i33++) {
iArr31[i33] = optJSONArray19.optInt(i33);
}
iArr7 = iArr31;
} else {
iArr7 = null;
}
JSONArray optJSONArray20 = mergeJsons4.optJSONArray("nonConnectivityEvents");
if (optJSONArray20 != null) {
int[] iArr32 = new int[optJSONArray20.length()];
for (int i34 = 0; i34 < optJSONArray20.length(); i34++) {
iArr32[i34] = optJSONArray20.optInt(i34);
}
iArr8 = iArr32;
} else {
iArr8 = null;
}
com.ironsource.mediationsdk.model.m mVar2 = new com.ironsource.mediationsdk.model.m(new com.ironsource.mediationsdk.model.e(false, optBoolean17, optBoolean18, optInt20, optString16, optString17, optInt21, optInt22, optInt23, iArr5, iArr6, iArr7, iArr8));
mVar2.f44881d = d17;
JSONArray optJSONArray21 = d17.optJSONArray(str);
if (optJSONArray21 != null) {
int i35 = 0;
while (i35 < optJSONArray21.length()) {
JSONObject optJSONObject4 = optJSONArray21.optJSONObject(i35);
if (optJSONObject4 != null) {
int optInt24 = optJSONObject4.optInt(ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID, -1);
String optString18 = optJSONObject4.optString("placementName", "");
jSONArray = optJSONArray21;
boolean optBoolean19 = optJSONObject4.optBoolean("isDefault", false);
if (optInt24 >= 0 && !TextUtils.isEmpty(optString18)) {
offerwallPlacement = new OfferwallPlacement(optInt24, optString18, optBoolean19);
if (offerwallPlacement == null) {
mVar2.f44878a.add(offerwallPlacement);
if (mVar2.f44879b != null && !offerwallPlacement.isPlacementId(0)) {
}
mVar2.f44879b = offerwallPlacement;
}
i35++;
optJSONArray21 = jSONArray;
}
} else {
jSONArray = optJSONArray21;
}
offerwallPlacement = null;
if (offerwallPlacement == null) {
}
i35++;
optJSONArray21 = jSONArray;
}
}
mVar = mVar2;
} else {
str10 = str17;
str11 = str18;
str12 = str2;
mVar = null;
}
o oVar = new o();
if (d22 != null) {
JSONArray optJSONArray22 = d22.optJSONArray("optInKeys");
if (optJSONArray22 != null) {
for (int i36 = 0; i36 < optJSONArray22.length(); i36++) {
String optString19 = optJSONArray22.optString(i36);
if (!TextUtils.isEmpty(optString19)) {
oVar.f45250a.add(optString19);
}
}
}
JSONObject optJSONObject5 = d22.optJSONObject("tokenGenericParams");
if (optJSONObject5 != null) {
oVar.f45252c = optJSONObject5;
}
oVar.f45253d = d22.optBoolean("oneToken", false);
oVar.f45254e = d22.optBoolean("compressToken", true);
}
PixelSettings pixelSettings = new PixelSettings();
if (d28 != null) {
String optString20 = d28.optString("pixelEventsUrl", "https://outcome-ssp.supersonicads.com/mediation?adUnit=3");
z12 = d28.optBoolean("pixelEventsEnabled", true);
pixelSettings.a(optString20);
} else {
z12 = true;
}
pixelSettings.a(z12);
if (z12) {
pixelSettings.a(c(d19, str11));
pixelSettings.b(c(d19, str10));
pixelSettings.b(d19.optBoolean(str7, false));
pixelSettings.a(d19.optInt("eventsCompressionLevel", -1));
}
com.ironsource.mediationsdk.model.g gVar = new com.ironsource.mediationsdk.model.g(d21.optInt("server", 3), d21.optInt("publisher", 3), d21.optInt("console", 3), d21.optBoolean("shouldSendPublisherLogsOnUIThread", false));
com.ironsource.mediationsdk.model.d dVar = new com.ironsource.mediationsdk.model.d();
if (jSONObject2 != null) {
JSONObject jSONObject9 = jSONObject2;
dVar.f44826a = jSONObject9.optBoolean("enabled", false);
dVar.f44828c = jSONObject9.optString("reporterURL", "");
dVar.f44829d = jSONObject9.optString("reporterKeyword", "");
dVar.f44830e = jSONObject9.optBoolean("includeANR", false);
dVar.f44831f = jSONObject9.optInt("timeout", DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS);
dVar.f44832g = jSONObject9.optBoolean("setIgnoreDebugger", false);
JSONArray optJSONArray23 = jSONObject9.optJSONArray("keysToInclude");
if (optJSONArray23 != null) {
for (int i37 = 0; i37 < optJSONArray23.length(); i37++) {
String optString21 = optJSONArray23.optString(i37);
if (!TextUtils.isEmpty(optString21)) {
dVar.f44827b.add(optString21);
}
}
}
}
if (jSONObject != null) {
JSONObject jSONObject10 = jSONObject;
tVar = new t(jSONObject10.optString("name", ""), jSONObject10.optString("id", "-1"), jSONObject10.optJSONObject("custom"));
} else {
tVar = null;
}
ApplicationGeneralSettings applicationGeneralSettings = new ApplicationGeneralSettings();
if (d26 != null) {
applicationGeneralSettings = new ApplicationGeneralSettings(d26.optBoolean("isExternalArmEventsEnabled", true), d26.optString("externalArmEventsUrl", "https://outcome-arm-ext-med-ext.sonic-us.supersonicads.com/aemData"), d26.optBoolean("sid", true), d26.optBoolean("radvid", false), d26.optInt("uaeh", 0));
}
ApplicationGeneralSettings applicationGeneralSettings2 = applicationGeneralSettings;
ApplicationExternalSettings applicationExternalSettings = new ApplicationExternalSettings();
if (d27 != null) {
JSONObject optJSONObject6 = d27.optJSONObject("mediationTypes");
Map hashMap = new HashMap();
if (optJSONObject6 != null) {
hashMap = IronSourceUtils.parseJsonToStringMap(optJSONObject6);
}
d27.optBoolean("compressExternalToken", false);
applicationExternalSettings = new ApplicationExternalSettings(hashMap);
}
com.ironsource.mediationsdk.model.c cVar5 = new com.ironsource.mediationsdk.model.c(gVar, tVar, oVar, jSONObject3.optBoolean("integration", false), dVar, applicationGeneralSettings2, applicationExternalSettings, pixelSettings, jSONObject8 != null ? new ApplicationAuctionSettings(jSONObject8.optString("auctionData")) : new ApplicationAuctionSettings());
TestSuiteSettings testSuiteSettings = new TestSuiteSettings();
JSONObject d36 = d(d12, "testSuite");
if (d36 != null) {
testSuiteSettings.a(d36.optString("controllerUrl"));
}
kVar2.f45163c = new com.ironsource.mediationsdk.model.j(sVar, lVar, mVar, hVar, cVar5, testSuiteSettings);
JSONObject d37 = d(d19, IronSourceConstants.EVENTS_GENERIC_PARAMS);
if (d37 != null && (d11 = d(d37, str12)) != null) {
d37.remove(str12);
Map<String, String> parseJsonToStringMap = IronSourceUtils.parseJsonToStringMap(d11);
com.ironsource.mediationsdk.events.i.d().b(parseJsonToStringMap);
com.ironsource.mediationsdk.events.e.d().b(parseJsonToStringMap);
}
if (d37 != null) {
Map<String, String> parseJsonToStringMap2 = IronSourceUtils.parseJsonToStringMap(d37);
com.ironsource.mediationsdk.events.i.d().a(parseJsonToStringMap2);
com.ironsource.mediationsdk.events.e.d().a(parseJsonToStringMap2);
}
} catch (Exception e15) {
e = e15;
}
}
public final String toString() {
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("appKey", this.E1);
jSONObject.put(DataKeys.USER_ID, this.F1);
jSONObject.put("response", this.f45166d);
} catch (JSONException e11) {
e11.printStackTrace();
}
return jSONObject.toString();
}
public k(k kVar) {
this.f45172f = "error";
this.f45175g = 3;
this.f45178h = 2;
this.f45181i = 60;
this.f45184j = 10000;
this.f45187k = -1;
this.f45190l = DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS;
this.f45193m = 300;
this.f45196n = 3;
this.f45199o = 3;
this.f45202p = 3;
this.f45205q = 2;
this.f45208r = 15;
this.f45211s = 10000L;
this.f45214t = 0;
this.f45217u = false;
this.f45220v = false;
this.f45223w = 3000L;
this.f45226x = 30000;
this.f45229y = -1;
this.f45232z = DefaultLoadControl.DEFAULT_BUFFER_FOR_PLAYBACK_AFTER_REBUFFER_MS;
this.A = 1;
this.B = false;
this.C = "providerOrder";
this.D = "providerSettings";
this.E = TapjoyConstants.PREF_SERVER_PROVIDED_CONFIGURATIONS;
this.F = IronSourceConstants.EVENTS_GENERIC_PARAMS;
this.G = "adUnits";
this.H = "providerLoadName";
this.I = MimeTypes.BASE_TYPE_APPLICATION;
this.J = "rewardedVideo";
this.K = "interstitial";
this.L = "offerwall";
this.M = AdFormat.BANNER;
this.N = "integration";
this.O = "loggers";
this.P = l.SegmentNodeDto.SEGMENT_JSON_NAME;
this.Q = "events";
this.R = "crashReporter";
this.S = "token";
this.T = "external";
this.U = "mediationTypes";
this.V = "providerDefaultInstance";
this.W = "testSuite";
this.X = "controllerUrl";
this.Y = "settings";
this.Z = "collectBiddingDataTimeout";
this.f45158a0 = "collectBiddingDataAsyncEnabled";
this.f45161b0 = "maxNumOfAdaptersToLoadOnStart";
this.f45164c0 = "advancedLoading";
this.f45167d0 = "adapterTimeOutInSeconds";
this.f45170e0 = "atim";
this.f45173f0 = "bannerInterval";
this.f45176g0 = "isOneFlow";
this.f45179h0 = "loadRVInterval";
this.f45182i0 = "expiredDurationInMinutes";
this.f45185j0 = "server";
this.f45188k0 = "publisher";
this.f45191l0 = "console";
this.f45194m0 = "sendUltraEvents";
this.f45197n0 = "sendEventsToggle";
this.f45200o0 = "eventsCompression";
this.f45203p0 = "eventsCompressionLevel";
this.f45206q0 = "serverEventsURL";
this.f45209r0 = "serverEventsType";
this.f45212s0 = "backupThreshold";
this.f45215t0 = "maxNumberOfEvents";
this.f45218u0 = "maxEventsPerBatch";
this.f45221v0 = "optOut";
this.f45224w0 = "optIn";
this.f45227x0 = "triggerEvents";
this.f45230y0 = "nonConnectivityEvents";
this.f45233z0 = "shouldSendPublisherLogsOnUIThread";
this.A0 = "pixel";
this.B0 = "pixelEventsUrl";
this.C0 = "pixelEventsEnabled";
this.D0 = "placements";
this.E0 = ReportDBAdapter.ReportColumns.COLUMN_PLACEMENT_ID;
this.F0 = "placementName";
this.G0 = "delivery";
this.H0 = "isDefault";
this.I0 = "capping";
this.J0 = "pacing";
this.K0 = "enabled";
this.L0 = "maxImpressions";
this.M0 = "numOfSeconds";
this.N0 = "unit";
this.O0 = "virtualItemName";
this.P0 = "virtualItemCount";
this.Q0 = "uuidEnabled";
this.R0 = "abt";
this.S0 = "delayLoadFailure";
this.T0 = "keysToInclude";
this.U0 = "reporterURL";
this.V0 = "reporterKeyword";
this.W0 = "includeANR";
this.X0 = "timeout";
this.Y0 = "setIgnoreDebugger";
this.Z0 = "adSourceName";
this.f45159a1 = IronSourceConstants.EVENTS_SUB_PROVIDER_ID;
this.f45162b1 = "mpis";
this.f45165c1 = "auction";
this.f45168d1 = "auctionData";
this.f45171e1 = "auctioneerURL";
this.f45174f1 = "extAuctioneerURL";
this.f45177g1 = IronSourceConstants.EVENTS_PROGRAMMATIC;
this.f45180h1 = "objectPerWaterfall";
this.f45183i1 = "minTimeBeforeFirstAuction";
this.f45186j1 = "timeToWaitBeforeAuction";
this.f45189k1 = "timeToWaitBeforeLoad";
this.f45192l1 = "auctionRetryInterval";
this.f45195m1 = "isAuctionOnShowStart";
this.f45198n1 = "isLoadWhileShow";
this.f45201o1 = IronSourceConstants.AUCTION_TRIALS;
this.f45204p1 = "auctionTimeout";
this.f45207q1 = "auctionSavedHistory";
this.f45210r1 = "disableLoadWhileShowSupportFor";
this.f45213s1 = "timeToDeleteOldWaterfallAfterAuction";
this.f45216t1 = "compressAuctionRequest";
this.f45219u1 = "compressAuctionResponse";
this.f45222v1 = "encryptionVersion";
this.f45225w1 = "shouldSendBannerBURLFromImpression";
this.f45228x1 = "optInKeys";
this.f45231y1 = "tokenGenericParams";
this.f45234z1 = "oneToken";
this.A1 = "compressToken";
this.B1 = "isExternalArmEventsEnabled";
this.C1 = "externalArmEventsUrl";
this.D1 = "compressExternalToken";
this.f45169e = a.f45235a;
try {
this.G1 = kVar.G1;
this.f45166d = new JSONObject(kVar.f45166d.toString());
this.E1 = kVar.E1;
this.F1 = kVar.F1;
this.f45157a = kVar.f45157a;
this.f45160b = kVar.f45160b;
this.f45163c = kVar.f45163c;
this.f45169e = kVar.f45169e;
} catch (Exception unused) {
e();
}
}
public final InitConfig a() {
return new InitConfig(this.E1, this.F1);
}
public final boolean b() {
JSONObject jSONObject = this.f45166d;
return (((((jSONObject != null) && !jSONObject.has("error")) && this.f45157a != null) && this.f45160b != null) && this.f45163c != null) && f();
}
public final boolean c() {
return !TextUtils.isEmpty(this.f45163c.f44867f.getF44918a());
}
public final boolean d() {
return this.f45163c.f44866e.f44819c.f45253d;
}
}