正在查看: Antivirus Cleaner v1.2.0.0 应用的 Ya.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
正在查看: Antivirus Cleaner v1.2.0.0 应用的 Ya.java JAVA 源代码文件
本页面展示 JAVA 反编译生成的源代码文件,支持语法高亮显示。 仅供安全研究与技术分析使用,严禁用于任何非法用途。请遵守相关法律法规。
package com.inmobi.media;
import android.app.Activity;
import android.content.Context;
import android.os.Build;
import android.os.Handler;
import android.os.SystemClock;
import android.util.Base64;
import android.util.SparseArray;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup;
import android.view.ViewParent;
import android.view.ViewTreeObserver;
import android.webkit.CookieManager;
import android.webkit.JsResult;
import android.webkit.WebChromeClient;
import android.webkit.WebViewClient;
import android.widget.FrameLayout;
import com.facebook.appevents.internal.ViewHierarchyConstants;
import com.facebook.internal.AnalyticsEvents;
import com.facebook.share.internal.ShareConstants;
import com.iab.omid.library.inmobi.Omid;
import com.iab.omid.library.inmobi.adsession.FriendlyObstructionPurpose;
import com.inmobi.adquality.models.AdQualityControl;
import com.inmobi.ads.WatermarkData;
import com.inmobi.ads.rendering.InMobiAdActivity;
import com.inmobi.commons.core.configs.AdConfig;
import com.inmobi.media.Ya;
import java.lang.ref.WeakReference;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import kotlin.Pair;
import kotlin.Result;
import kotlin.TuplesKt;
import kotlin.Unit;
import kotlin.collections.MapsKt;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.internal.Intrinsics;
import kotlin.text.Regex;
import kotlin.text.StringsKt;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.b9;
import org.json.mediationsdk.impressionData.ImpressionData;
import org.json.mediationsdk.utils.IronSourceConstants;
public final class Ya extends V1 implements InterfaceC0495x, InterfaceC0161a2, GestureDetector.OnGestureListener, GestureDetector.OnDoubleTapListener, L9, Aa {
public static final Ia N0 = new Ia();
public static final Ga O0 = new Ga();
public static final String P0 = Ya.class.getSimpleName();
public static final C0469v1 Q0 = new C0469v1((Object) Boolean.FALSE, (Function0) Ha.a, false, true);
public boolean A;
public Map A0;
public boolean B;
public final La B0;
public String C;
public final Xa C0;
public final AtomicBoolean D;
public String D0;
public final Object E;
public final Ra E0;
public final Object F;
public final Pa F0;
public boolean G;
public final Ja G0;
public final boolean H;
public boolean H0;
public View I;
public Z2 I0;
public WebChromeClient.CustomViewCallback J;
public final Sa J0;
public int K;
public final Ua K0;
public long L;
public final Ta L0;
public String M;
public Nd M0;
public final AtomicBoolean N;
public final C0245fb O;
public String P;
public Map Q;
public Z1 R;
public InterfaceC0495x S;
public boolean T;
public boolean U;
public Z V;
public AbstractC0352md W;
public final boolean a0;
public final byte b;
public int b0;
public final Set c;
public String c0;
public String d;
public int[] d0;
public final boolean e;
public long e0;
public String f;
public int f0;
public long g;
public final Ka g0;
public final C0185bb h;
public final Qa h0;
public final InterfaceC0239f5 i;
public int i0;
public byte j;
public int j0;
public WeakReference k;
public final Z6 k0;
public WeakReference l;
public final GestureDetector l0;
public AbstractC0170ab m;
public boolean m0;
public final Va n;
public boolean n0;
public String o;
public U3 o0;
public C0241f7 p;
public S3 p0;
public AdConfig q;
public String q0;
public boolean r;
public K9 r0;
public boolean s;
public C0354n0 s0;
public JSONObject t;
public final AtomicBoolean t0;
public JSONObject u;
public boolean u0;
public boolean v;
public I v0;
public boolean w;
public String w0;
public boolean x;
public boolean x0;
public boolean y;
public Pd y0;
public qd z;
public boolean z0;
public Ya(android.content.Context r4, byte r5, java.util.Set r6, java.lang.String r7, boolean r8, java.lang.String r9, long r10, com.inmobi.media.C0185bb r12, com.inmobi.media.InterfaceC0239f5 r13, int r14) {
throw new UnsupportedOperationException("Method not decompiled: com.inmobi.media.Ya.<init>(android.content.Context, byte, java.util.Set, java.lang.String, boolean, java.lang.String, long, com.inmobi.media.bb, com.inmobi.media.f5, int):void");
}
public static final void a(Ya ya, byte[] bArr, WatermarkData watermarkData) {
Intrinsics.checkNotNullParameter(ya, "this$0");
Intrinsics.checkNotNullParameter(bArr, "$overlayBytes");
Intrinsics.checkNotNullParameter(watermarkData, "$watermarkData");
if (ya.N.get()) {
return;
}
InterfaceC0239f5 interfaceC0239f5 = ya.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).c(str, "adding overlay to renderview");
}
Context context = ya.getContext();
Intrinsics.checkNotNullExpressionValue(context, "getContext(...)");
FrameLayout a = Ad.a(context, bArr, watermarkData.getAlpha());
Intrinsics.checkNotNullParameter(a, "overlayLayout");
Intrinsics.checkNotNullParameter(ya, "renderView");
if (ya.getParent() != null) {
ViewParent parent = ya.getParent();
Intrinsics.checkNotNull(parent, "null cannot be cast to non-null type android.view.ViewGroup");
((ViewGroup) parent).addView(a, 0);
}
ya.getViewableAd().a(a, FriendlyObstructionPurpose.NOT_VISIBLE);
ya.N.set(true);
}
private final AdConfig.MraidConfig getMraidConfig() {
AdConfig adConfig = this.q;
if (adConfig == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig = null;
}
return adConfig.getMraidConfig();
}
private final int getVisibilityTrackingMinPercentage() {
AdConfig adConfig = null;
if (Intrinsics.areEqual("audio", getAdType())) {
AdConfig adConfig2 = this.q;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
return adConfig.getViewability().getAudioImpressionMinPercentageViewed();
}
AdConfig adConfig3 = this.q;
if (adConfig3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig3;
}
return adConfig.getViewability().getWebImpressionMinPercentageViewed();
}
@Override
public final void b() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "destroyContainer "));
}
if (this.D.get()) {
return;
}
if (!this.y) {
this.y = true;
return;
}
this.D.set(true);
Pd pd = this.y0;
if (pd != null) {
pd.a();
}
Z2 z2 = this.I0;
if (z2 != null) {
z2.b();
}
this.G = true;
this.K = -1;
removeJavascriptInterface("sdkController");
C0241f7 c0241f7 = this.p;
AdConfig adConfig = null;
if (c0241f7 != null) {
S6 s6 = c0241f7.d;
if (s6 != null) {
s6.a();
}
c0241f7.d = null;
S6 s62 = c0241f7.e;
if (s62 != null) {
s62.a();
}
c0241f7.e = null;
S6 s63 = c0241f7.f;
if (s63 != null) {
s63.a();
}
c0241f7.f = null;
}
this.k.clear();
WeakReference weakReference = this.l;
if (weakReference != null) {
weakReference.clear();
}
AbstractC0352md abstractC0352md = this.W;
if (abstractC0352md != null) {
abstractC0352md.e();
}
AbstractC0352md abstractC0352md2 = this.W;
if (abstractC0352md2 != null) {
abstractC0352md2.a();
}
u();
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f52).a(str2, Wa.a(this, str2, "TAG", "stopTrackingAudioVolume "));
}
C0425s c0425s = C0425s.a;
C0425s.c(this.i, this.g0);
setFriendlyViews(null);
this.p0 = null;
this.m = null;
this.S = null;
this.V = null;
this.m0 = false;
ViewParent parent = getParent();
if (parent != null) {
((ViewGroup) parent).removeView(this);
removeAllViews();
}
AdConfig adConfig2 = this.q;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
AdConfig.OmidConfig omidConfig = adConfig.getViewability().getOmidConfig();
if (this.a0 && omidConfig.isOmidEnabled()) {
G9.a.getClass();
if (Omid.isActive()) {
new C0200cb(this, omidConfig.getWebViewRetainTime()).a();
return;
}
}
destroy();
}
public final void c(boolean z) {
C0354n0 c0354n0;
AdQualityControl adQualityControl;
Activity activity;
C0354n0 c0354n02;
AdQualityControl adQualityControl2;
qd qdVar = z ? qd.c : qd.b;
if (this.z == qdVar || this.G) {
return;
}
this.z = qdVar;
if (z) {
getListener().i(this);
}
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "fireViewableChange " + this + ' ' + z);
}
b("window.mraidview.broadcastEvent('viewableChange'," + z + ");");
C0354n0 c0354n03 = this.s0;
if (c0354n03 != null) {
qd qdVar2 = this.z;
Intrinsics.checkNotNullParameter(qdVar2, "adViewableStatus");
c0354n03.h = qdVar2;
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
StringBuilder a = AbstractC0300j6.a(str2, "TAG", "fireAQSession - ");
a.append(getAdType());
a.append(" type - sdk - ");
a.append(Build.VERSION.SDK_INT);
((C0254g5) interfaceC0239f52).a(str2, a.toString());
}
if (!Intrinsics.areEqual(getAdType(), "int") || Build.VERSION.SDK_INT < 29 || (activity = (Activity) this.k.get()) == null) {
C0354n0 c0354n04 = this.s0;
if (c0354n04 == null) {
Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
c0354n0 = null;
} else {
c0354n0 = c0354n04;
}
c0354n0.getClass();
Intrinsics.checkNotNullParameter(this, "adView");
if (!c0354n0.a()) {
c0354n0.a("session state invalid");
return;
}
c0354n0.a("session start trigger...");
c0354n0.c.set(true);
AdQualityControl adQualityControl3 = c0354n0.g;
if (adQualityControl3 == null || !adQualityControl3.getTakeScreenshot() || (adQualityControl = c0354n0.g) == null) {
return;
}
c0354n0.a(this, (long) (adQualityControl.getScreenshotDelayInSeconds() * 1000), false, (La) null);
return;
}
C0354n0 c0354n05 = this.s0;
if (c0354n05 == null) {
Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
c0354n02 = null;
} else {
c0354n02 = c0354n05;
}
c0354n02.getClass();
Intrinsics.checkNotNullParameter(activity, "activity");
if (!c0354n02.a()) {
c0354n02.a("session state invalid");
return;
}
c0354n02.a("session start trigger...");
c0354n02.c.set(true);
AdQualityControl adQualityControl4 = c0354n02.g;
if (adQualityControl4 == null || !adQualityControl4.getTakeScreenshot() || (adQualityControl2 = c0354n02.g) == null) {
return;
}
c0354n02.a(activity, (long) (adQualityControl2.getScreenshotDelayInSeconds() * 1000), false, (La) null);
}
public final void d(String str) {
C0245fb c0245fb = this.O;
if (c0245fb != null) {
c0245fb.b();
}
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f5).a(str2, Wa.a(this, str2, "TAG", "loadUrlInWebView "));
}
this.G = false;
if (this.D.get() || str == null) {
return;
}
loadUrl(str);
}
public final void e(boolean z) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "processUseCustomCloseRequest " + this + ' ' + z);
}
setUseCustomClose(z);
v();
}
@Override
public final C0375o6 f() {
C0460u6 c0460u6;
String str;
Y y;
String b;
Y y2;
String m;
Y y5;
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f5).a(str2, Wa.a(this, str2, "TAG", "initLandingPageHandler "));
}
C0390p6 c0390p6 = new C0390p6(this.e, this.f, getAdConfig().isCCTEnabled(), getAdConfig().getPartialTabsEnabled());
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "getContext(...)");
Pa pa = this.F0;
Ra ra = this.E0;
if (this.e) {
c0460u6 = null;
} else {
C0185bb c0185bb = this.h;
long l = (c0185bb == null || (y5 = c0185bb.a) == null) ? 0L : y5.l();
String impressionId = getImpressionId();
String str3 = impressionId == null ? "" : impressionId;
C0185bb c0185bb2 = this.h;
String str4 = (c0185bb2 == null || (y2 = c0185bb2.a) == null || (m = y2.m()) == null) ? "" : m;
C0185bb c0185bb3 = this.h;
String str5 = (c0185bb3 == null || (y = c0185bb3.a) == null || (b = y.b()) == null) ? "" : b;
C0185bb c0185bb4 = this.h;
c0460u6 = new C0460u6(l, str3, str4, str5, (c0185bb4 == null || (str = c0185bb4.b) == null) ? "" : str, c0185bb4 != null ? c0185bb4.e : "", c0185bb4 != null ? c0185bb4.c : "", c0185bb4 != null ? c0185bb4.g : false, this.f);
}
return new C0375o6(context, c0390p6, pa, ra, this, c0460u6, this.i);
}
public final void g() {
if (this.z0) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "fireAdFailed " + this + " - Ad is already unloaded");
return;
}
return;
}
this.n0 = true;
C0245fb c0245fb = this.O;
if (c0245fb != null) {
Map a = c0245fb.a();
long j = c0245fb.b;
ScheduledExecutorService scheduledExecutorService = Xc.a;
a.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j));
C0291ic c0291ic = C0291ic.a;
C0291ic.b("FireAdFailed", a, EnumC0351mc.a);
}
getListener().g(this);
}
@Override
public AdConfig getAdConfig() {
AdConfig adConfig = this.q;
if (adConfig != null) {
return adConfig;
}
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
return null;
}
public final Z getAdPodHandler() {
return this.V;
}
public final C0354n0 getAdQualityManager() {
C0354n0 c0354n0 = this.s0;
if (c0354n0 != null) {
return c0354n0;
}
Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
return null;
}
@Override
public String getAdType() {
return this.P;
}
public final boolean getAllowAutoRedirection() {
return this.U;
}
public final int getArea() {
return getHeight() * getWidth();
}
public final String getBeaconUrl() {
return this.w0;
}
public final Nd getCloseAssetArea() {
return this.M0;
}
public final long getConfiguredArea() {
return this.e0;
}
public Context getContainerContext() {
Activity activity = (Activity) this.k.get();
if (activity != null) {
return activity;
}
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "getContext(...)");
return context;
}
public final String getContentURL() {
return this.c0;
}
public final String getCreativeID() {
String creativeId = getCreativeId();
return creativeId == null ? "" : creativeId;
}
@Override
public String getCreativeId() {
return this.M;
}
public final String getCurrentPosition() {
JSONObject jSONObject = this.u;
String jSONObject2 = jSONObject != null ? jSONObject.toString() : null;
return jSONObject2 == null ? "" : jSONObject2;
}
public final Object getCurrentPositionMonitor() {
return this.F;
}
public final int getCurrentRenderingPodAdIndex() {
Z z = this.V;
if (z != null) {
return ((Q0) z).l(this);
}
return 0;
}
@Override
public Object getDataModel() {
return null;
}
public final String getDefaultPosition() {
JSONObject jSONObject = this.t;
String jSONObject2 = jSONObject != null ? jSONObject.toString() : null;
return jSONObject2 == null ? "" : jSONObject2;
}
public final Object getDefaultPositionMonitor() {
return this.E;
}
public final S3 getEmbeddedBrowserJSCallbacks() {
return this.p0;
}
public Map<View, FriendlyObstructionPurpose> getFriendlyViews() {
return this.Q;
}
public final Activity getFullScreenActivity() {
return (Activity) this.k.get();
}
@Override
public InterfaceC0481w getFullScreenEventsListener() {
return this.J0;
}
@Override
public String getImpressionId() {
return this.d;
}
public final byte getImpressionType() {
return this.j;
}
public final String getLandingScheme() {
return this.f;
}
public final AbstractC0170ab getListener() {
AbstractC0170ab abstractC0170ab = this.m;
if (abstractC0170ab != null) {
return abstractC0170ab;
}
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "listener getter "));
}
Ga ga = O0;
this.m = ga;
return ga;
}
@Override
public String getMarkupType() {
return this.D0;
}
public final String getMarkupTypeAdUnit() {
return this.D0;
}
public final C0241f7 getMediaProcessor() {
return this.p;
}
public final int getMinimumPixelsPainted() {
return this.f0;
}
public final String getMraidJsString() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "mraidJsString getter "));
}
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "getContext(...)");
String a = new U9(context, "mraid_js_store").a("mraid_js_string");
if (a == null) {
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).a(str2, "Returning default Mraid Js string.");
}
return "var imIsObjValid=function(a){return\"undefined\"!=typeof a&&null!=a?!0:!1},EventListeners=function(a){this.event=a;this.count=0;var b=[];this.add=function(a){b.push(a);++this.count};this.remove=function(a){var f=!1,d=this;b=b.filter(function(b){if(b=b===a)--d.count,f=!0;return!b});return f};this.removeAll=function(){b=[];this.count=0};this.broadcast=function(a){b.forEach(function(f){try{f.apply({},a)}catch(b){}})};this.toString=function(){var c=[a,\":\"];b.forEach(function(a){c.push(\"|\",String(a),\"|\")});\nreturn c.join(\"\")}},InmobiObj=function(){this.listeners=[];this.addEventListener=function(a,b){try{if(imIsObjValid(b)&&imIsObjValid(a)){var c=this.listeners;c[a]||(c[a]=new EventListeners);c[a].add(b);\"micIntensityChange\"==a&&window.imraidview.startListeningMicIntensity();\"deviceMuted\"==a&&window.imraidview.startListeningDeviceMuteEvents();\"deviceVolumeChange\"==a&&window.imraidview.startListeningDeviceVolumeChange();\"volumeChange\"==a&&window.imraidview.startListeningVolumeChange();\"headphones\"==a&&\nwindow.imraidview.startListeningHeadphonePluggedEvents();\"backButtonPressed\"==a&&window.imraidview.startListeningForBackButtonPressedEvent();\"downloadStatusChanged\"==a&&window.imraidview.registerDownloaderCallbacks()}}catch(f){this.log(f)}};this.removeEventListener=function(a,b){if(imIsObjValid(a)){var c=this.listeners;imIsObjValid(c[a])&&(imIsObjValid(b)?c[a].remove(b):c[a].removeAll());\"micIntensityChange\"==a&&0==c[a].count&&window.imraidview.stopListeningMicIntensity();\"deviceMuted\"==a&&0==c[a].count&&\nwindow.imraidview.stopListeningDeviceMuteEvents();\"deviceVolumeChange\"==a&&0==c[a].count&&window.imraidview.stopListeningDeviceVolumeChange();\"volumeChange\"==a&&0==c[a].count&&window.imraidview.stopListeningVolumeChange();\"headphones\"==a&&0==c[a].count&&window.imraidview.stopListeningHeadphonePluggedEvents();\"backButtonPressed\"==a&&0==c[a].count&&window.imraidview.stopListeningForBackButtonPressedEvent();\"downloadStatusChanged\"==a&&0==c[a].count&&window.imraidview.unregisterDownloaderCallbacks()}};\nthis.broadcastEvent=function(a){if(imIsObjValid(a)){for(var b=Array(arguments.length),c=0;c<arguments.length;c++)b[c]=arguments[c];c=b.shift();try{this.listeners[c]&&this.listeners[c].broadcast(b)}catch(f){}}};this.sendSaveContentResult=function(a){if(imIsObjValid(a)){for(var b=Array(arguments.length),c=0;c<arguments.length;c++)if(2==c){var f=arguments[c],f=JSON.parse(f);b[c]=f}else b[c]=arguments[c];f=b[1];\"success\"!=f&&(c=b[0].substring(b[0].indexOf(\"_\")+1),imraid.saveContentIDMap[c]&&delete imraid.saveContentIDMap[c]);\nwindow.imraid.broadcastEvent(b[0],b[1],b[2])}}},__im__iosNativeMessageHandler=void 0;window.webkit&&(window.webkit.messageHandlers&&window.webkit.messageHandlers.nativeMessageHandler)&&(__im__iosNativeMessageHandler=window.webkit.messageHandlers.nativeMessageHandler);\nvar __im__iosNativeCall={nativeCallInFlight:!1,nativeCallQueue:[],executeNativeCall:function(a){this.nativeCallInFlight?this.nativeCallQueue.push(a):(this.nativeCallInFlight=!0,imIsObjValid(__im__iosNativeMessageHandler)?__im__iosNativeMessageHandler.postMessage(a):window.location=a)},nativeCallComplete:function(a){0==this.nativeCallQueue.length?this.nativeCallInFlight=!1:(a=this.nativeCallQueue.shift(),imIsObjValid(__im__iosNativeMessageHandler)?__im__iosNativeMessageHandler.postMessage(a):window.location=\na)}},IOSNativeCall=function(){this.urlScheme=\"\";this.executeNativeCall=function(a){if(imIsObjValid(__im__iosNativeMessageHandler)){f={};f.command=a;f.scheme=this.urlScheme;for(var b={},c=1;c<arguments.length;c+=2)d=arguments[c+1],null!=d&&(b[arguments[c]]=\"\"+d);f.params=b}else for(var f=this.urlScheme+\"://\"+a,d,b=!0,c=1;c<arguments.length;c+=2)d=arguments[c+1],null!=d&&(b?(f+=\"?\",b=!1):f+=\"&\",f+=arguments[c]+\"=\"+escape(d));__im__iosNativeCall.executeNativeCall(f);return\"OK\"};this.nativeCallComplete=\nfunction(a){__im__iosNativeCall.nativeCallComplete(a);return\"OK\"};this.updateKV=function(a,b){this[a]=b;var c=this.broadcastMap[a];c&&this.broadcastEvent(c,b)}};\n(function(){var a=window.mraidview={};a.orientationProperties={allowOrientationChange:!0,forceOrientation:\"none\",direction:\"right\"};var b=[],c=!1;a.detectAndBlockFraud=function(f){a.isPossibleFraud()&&a.fireRedirectFraudBeacon(f);return!1};a.popupBlocked=function(f){a.firePopupBlockedBeacon(f)};a.zeroPad=function(a){var c=\"\";10>a&&(c+=\"0\");return c+a};a.supports=function(a){console.log(\"bridge: supports (MRAID)\");if(\"string\"!=typeof a)window.mraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\n\"supports\");else return\"false\"!=sdkController.supports(\"window.mraidview\",a)};a.useCustomClose=function(a){try{sdkController.useCustomClose(\"window.mraidview\",a)}catch(c){imraidview.showAlert(\"use CustomClose: \"+c)}};a.close=function(){try{sdkController.close(\"window.mraidview\")}catch(a){imraidview.showAlert(\"close: \"+a)}};a.stackCommands=function(a,d){c?b.push(a):(eval(a),d&&(c=!0))};a.setOrientationProperties=function(f){try{f?(\"undefined\"!=typeof f.allowOrientationChange&&(a.orientationProperties.allowOrientationChange=\nf.allowOrientationChange),\"undefined\"!=typeof f.forceOrientation&&(a.orientationProperties.forceOrientation=f.forceOrientation)):f=null,sdkController.setOrientationProperties(\"window.mraidview\",a.stringify(a.orientationProperties))}catch(c){imraidview.showAlert(\"setOrientationProperties: \"+c+\", props = \"+f)}};a.getOrientationProperties=function(){return{forceOrientation:a.orientationProperties.forceOrientation,allowOrientationChange:a.orientationProperties.allowOrientationChange}};a.resizeProps=null;\na.open=function(a){\"undefined\"==typeof a&&(a=null);try{sdkController.open(\"window.mraidview\",a)}catch(c){imraidview.showAlert(\"open: \"+c)}};a.getScreenSize=function(){try{return eval(\"(\"+sdkController.getScreenSize(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getScreenSize: \"+a)}};a.getMaxSize=function(){try{return eval(\"(\"+sdkController.getMaxSize(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getMaxSize: \"+a)}};a.getCurrentPosition=function(){try{return eval(\"(\"+sdkController.getCurrentPosition(\"window.mraidview\")+\n\")\")}catch(a){imraidview.showAlert(\"getCurrentPosition: \"+a)}};a.getDefaultPosition=function(){try{return eval(\"(\"+sdkController.getDefaultPosition(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getDefaultPosition: \"+a)}};a.getState=function(){try{return String(sdkController.getState(\"window.mraidview\"))}catch(a){imraidview.showAlert(\"getState: \"+a)}};a.isViewable=function(){if(imraidview.fallbackViewabilityEnabled())return imraidview.checkFallbackViewable();try{return sdkController.isViewable(\"window.mraidview\")}catch(a){imraidview.showAlert(\"isViewable: \"+\na)}};a.getPlacementType=function(){return sdkController.getPlacementType(\"window.mraidview\")};a.close=function(){try{sdkController.close(\"window.mraidview\")}catch(a){imraidview.showAlert(\"close: \"+a)}};\"function\"!=typeof String.prototype.startsWith&&(String.prototype.startsWith=function(a){return 0==this.indexOf(a)});a.playVideo=function(a){var c=\"\";null!=a&&(c=a);try{sdkController.playVideo(\"window.mraidview\",c)}catch(b){imraidview.showAlert(\"playVideo: \"+b)}};a.stringify=function(c){if(\"undefined\"===\ntypeof JSON){var b=\"\",e;if(\"undefined\"==typeof c.length)return a.stringifyArg(c);for(e=0;e<c.length;e++)0<e&&(b+=\",\"),b+=a.stringifyArg(c[e]);return b+\"]\"}return JSON.stringify(c)};a.stringifyArg=function(a){var c,b,g;b=typeof a;c=\"\";if(\"number\"===b||\"boolean\"===b)c+=args;else if(a instanceof Array)c=c+\"[\"+a+\"]\";else if(a instanceof Object){b=!0;c+=\"{\";for(g in a)null!==a[g]&&(b||(c+=\",\"),c=c+'\"'+g+'\":',b=typeof a[g],c=\"number\"===b||\"boolean\"===b?c+a[g]:\"function\"===typeof a[g]?c+'\"\"':a[g]instanceof\nObject?c+this.stringify(args[i][g]):c+'\"'+a[g]+'\"',b=!1);c+=\"}\"}else a=a.replace(/\\\\/g,\"\\\\\\\\\"),a=a.replace(/\"/g,'\\\\\"'),c=c+'\"'+a+'\"';imraidview.showAlert(\"json:\"+c);return c};getPID=function(a){var c=\"\";null!=a&&(\"undefined\"!=typeof a.id&&null!=a.id)&&(c=a.id);return c};a.storePicture=function(c){console.log(\"bridge: storePicture\");if(\"string\"!=typeof c)window.mraid.broadcastEvent(\"error\",\"storePicture method expects url as string parameter\",\"storePicture\");else{if(a.supports(\"storePicture\"))return!window.confirm(\"Do you want to download the file?\")?\n(window.mraid.broadcastEvent(\"error\",\"Store picture on \"+c+\" was cancelled by user.\",\"storePicture\"),!1):sdkController.storePicture(\"window.mraidview\",c);window.mraid.broadcastEvent(\"error\",\"Store picture on \"+c+\" was cancelled because it is unsupported in this device/app.\",\"storePicture\")}};a.fireMediaTrackingEvent=function(a,c){};a.fireMediaErrorEvent=function(a,c){};a.fireMediaTimeUpdateEvent=function(a,c,b){};a.fireMediaCloseEvent=function(a,c,b){};a.fireMediaVolumeChangeEvent=function(a,c,b){};\na.broadcastEvent=function(){window.mraid.broadcastEvent.apply(window.mraid,arguments)};a.unload=function(){try{sdkController.unload(\"window.mraidview\")}catch(a){}};a.getCurrentAppOrientation=function(){var c;switch(a.orientation){case 0:case 180:c=\"portrait\";break;case 90:case 270:c=\"landscape\";break;default:c=\"none\"}return{orientation:c,locked:!1}};a.expand=function(a){try{\"undefined\"==typeof a&&(a=null),sdkController.expand(\"window.mraidview\",a)}catch(c){imraidview.showAlert(\"executeNativeExpand: \"+\nc+\", URL = \"+a)}};a.setExpandProperties=function(c){try{c?this.props=c:c=null;if(\"undefined\"!=typeof c.lockOrientation&&null!=c.lockOrientation&&\"undefined\"!=typeof c.orientation&&null!=c.orientation){var b={};b.allowOrientationChange=!c.lockOrientation;b.forceOrientation=c.orientation;a.setOrientationProperties(b)}sdkController.setExpandProperties(\"window.mraidview\",a.stringify(c))}catch(e){imraidview.showAlert(\"executeNativesetExpandProperties: \"+e+\", props = \"+c)}};a.getExpandProperties=function(){try{return eval(\"(\"+\nsdkController.getExpandProperties(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getExpandProperties: \"+a)}};a.resizeProps=null;a.setResizeProperties=function(c){var b,e;try{b=parseInt(c.width);e=parseInt(c.height);if(isNaN(b)||isNaN(e)||1>b||1>e)throw\"Invalid\";c.width=b;c.height=e;a.resizeProps=c;sdkController.setResizeProperties(\"window.mraidview\",a.stringify(c))}catch(g){window.mraid.broadcastEvent(\"error\",\"Invalid properties.\",\"setResizeProperties\")}};a.getResizeProperties=function(){try{return eval(\"(\"+\nsdkController.getResizeProperties(\"window.mraidview\")+\")\")}catch(a){imraidview.showAlert(\"getResizeProperties: \"+a)}};a.resize=function(){if(null==a.resizeProps)window.mraid.broadcastEvent(\"error\",\"Valid resize dimensions must be provided before calling resize\",\"resize\");else try{sdkController.resize(\"window.mraidview\")}catch(c){imraidview.showAlert(\"resize called in bridge\")}}})();\n(function(){var a=window.mraid=new InmobiObj,b=window.mraidview,c=!1;b.isAdShownToUser=!1;b.onUserInteraction=function(){imraidview.onUserInteraction();c=!0};b.isPossibleFraud=function(){return a.supports(\"redirectFraudDetection\")&&(!b.isAdShownToUser||!c)};b.fireRedirectFraudBeacon=function(a){if(\"undefined\"!=typeof inmobi&&inmobi.recordEvent){var c={};c.trigger=a;c.isAdShown=b.isAdShownToUser.toString();inmobi.recordEvent(135,c)}};b.getSdkVersionInt=function(){for(var a=imraid.getSdkVersion().split(\".\"),\nc=a.length,b=\"\",g=0;g<c;g++)b+=a[g];return parseInt(b)};b.firePopupBlockedBeacon=function(a){if(\"undefined\"!=typeof inmobi&&inmobi.recordEvent){var c={};c.trigger=a;inmobi.recordEvent(136,c)}};window.onbeforeunload=function(){b.detectAndBlockFraud(\"redirect\")};a.addEventListener(\"viewableChange\",function(a){a&&!b.isAdShownToUser&&(b.isAdShownToUser=!0)});a.useCustomClose=b.useCustomClose;a.close=b.close;a.getExpandProperties=function(){if(1083<=b.getSdkVersionInt())return window.mraid.broadcastEvent(\"error\",\n\"Method not supported\",\"getExpandProperties\"),null;window.mraid.broadcastEvent(\"error\",\"MRAID getExpandProperties is deprecated\",\"getExpandProperties\");return b.getExpandProperties()};a.setExpandProperties=function(c){1083<=b.getSdkVersionInt()?window.mraid.broadcastEvent(\"error\",\"Method not supported\",\"setExpandProperties\"):(\"undefined\"!=typeof c&&(\"useCustomClose\"in c&&\"undefined\"!=typeof a.getState()&&\"expanded\"!=a.getState())&&a.useCustomClose(c.useCustomClose),window.mraid.broadcastEvent(\"error\",\n\"MRAID setExpandProperties is deprecated\",\"setExpandProperties\"),b.setExpandProperties(c))};a.getResizeProperties=function(){if(1083<=b.getSdkVersionInt())return window.mraid.broadcastEvent(\"error\",\"Method not supported\",\"getResizeProperties\"),null;window.mraid.broadcastEvent(\"error\",\"MRAID getResizeProperties is deprecated\",\"getResizeProperties\");return b.getResizeProperties()};a.setResizeProperties=function(a){1083<=b.getSdkVersionInt()?window.mraid.broadcastEvent(\"error\",\"Method not supported\",\n\"setResizeProperties\"):(window.mraid.broadcastEvent(\"error\",\"MRAID setResizeProperties is deprecated\",\"setResizeProperties\"),b.setResizeProperties(a))};a.getOrientationProperties=b.getOrientationProperties;a.setOrientationProperties=b.setOrientationProperties;a.expand=function(a){try{1083<=b.getSdkVersionInt()?window.mraid.broadcastEvent(\"error\",\"Method not supported\",\"expand\"):(window.mraid.broadcastEvent(\"error\",\"MRAID expand is deprecated\",\"expand\"),b.expand(a))}catch(c){window.mraid.broadcastEvent(\"error\",\n\"error\",\"expand\")}};a.getMaxSize=b.getMaxSize;a.getState=b.getState;a.isViewable=b.isViewable;a.createCalendarEvent=function(a){window.mraid.broadcastEvent(\"error\",\"Method not supported\",\"createCalendarEvent\")};a.open=function(c){b.detectAndBlockFraud(\"mraid.open\")||(\"string\"!=typeof c?a.broadcastEvent(\"error\",\"URL is required.\",\"open\"):b.open(c))};a.resize=function(){try{1083<=b.getSdkVersionInt()?window.mraid.broadcastEvent(\"error\",\"MRAID resize not supported\",\"resize\"):(window.mraid.broadcastEvent(\"error\",\n\"MRAID resize is deprecated\",\"resize\"),b.expand())}catch(a){window.mraid.broadcastEvent(\"error\",\"error\",\"expand\")}};a.getVersion=function(){return\"3.0\"};a.getPlacementType=b.getPlacementType;a.playVideo=function(a){b.playVideo(a)};a.getScreenSize=b.getScreenSize;a.getCurrentPosition=b.getCurrentPosition;a.getDefaultPosition=b.getDefaultPosition;a.supports=function(a){return b.supports(a)};a.storePicture=function(c){\"string\"!=typeof c?a.broadcastEvent(\"error\",\"Request must specify a valid URL\",\"storePicture\"):\nb.storePicture(c)};a.unload=function(){b.unload()};a.getCurrentAppOrientation=b.getCurrentAppOrientation;a.getLocation=function(){return null};a.getAudioVolume=b.getAudioVolume})();\n(function(){var a=window.imraidview={},b=!1;a.setOrientationProperties=function(c){try{c?(\"undefined\"!=typeof c.allowOrientationChange&&(mraidview.orientationProperties.allowOrientationChange=c.allowOrientationChange),\"undefined\"!=typeof c.forceOrientation&&(mraidview.orientationProperties.forceOrientation=c.forceOrientation),\"undefined\"!=typeof c.direction&&(mraidview.orientationProperties.direction=c.direction)):c=null,sdkController.setOrientationProperties(\"window.imraidview\",mraidview.stringify(mraidview.orientationProperties))}catch(b){a.showAlert(\"setOrientationProperties: \"+\nb+\", props = \"+c)}};a.getOrientationProperties=function(){return mraidview.orientationProperties};a.firePostStatusEvent=function(a){window.imraid.broadcastEvent(\"postStatus\",a)};a.fireMediaTrackingEvent=function(a,b){var d={};d.name=a;var e=\"inmobi_media_\"+a;\"undefined\"!=typeof b&&(null!=b&&\"\"!=b)&&(e=e+\"_\"+b);window.imraid.broadcastEvent(e,d)};a.fireMediaErrorEvent=function(a,b){var d={name:\"error\"};d.code=b;var e=\"inmobi_media_\"+d.name;\"undefined\"!=typeof a&&(null!=a&&\"\"!=a)&&(e=e+\"_\"+a);window.imraid.broadcastEvent(e,\nd)};a.fireMediaTimeUpdateEvent=function(a,b,d){var e={name:\"timeupdate\",target:{}};e.target.currentTime=b;e.target.duration=d;b=\"inmobi_media_\"+e.name;\"undefined\"!=typeof a&&(null!=a&&\"\"!=a)&&(b=b+\"_\"+a);window.imraid.broadcastEvent(b,e)};a.saveContent=function(a,b,d){window.imraid.addEventListener(\"saveContent_\"+a,d);sdkController.saveContent(\"window.imraidview\",a,b)};a.cancelSaveContent=function(a){sdkController.cancelSaveContent(\"window.imraidview\",a)};a.disableCloseRegion=function(a){sdkController.disableCloseRegion(\"window.imraidview\",\na)};a.fireGalleryImageSelectedEvent=function(a,b,d){var e=new Image;e.src=\"data:image/jpeg;base64,\"+a;e.width=b;e.height=d;window.imraid.broadcastEvent(\"galleryImageSelected\",e)};a.fireCameraPictureCatpturedEvent=function(a,b,d){var e=new Image;e.src=\"data:image/jpeg;base64,\"+a;e.width=b;e.height=d;window.imraid.broadcastEvent(\"cameraPictureCaptured\",e)};a.fireMediaCloseEvent=function(a,b,d){var e={name:\"close\"};e.viaUserInteraction=b;e.target={};e.target.currentTime=d;b=\"inmobi_media_\"+e.name;\"undefined\"!=\ntypeof a&&(null!=a&&\"\"!=a)&&(b=b+\"_\"+a);window.imraid.broadcastEvent(b,e)};a.fireMediaVolumeChangeEvent=function(a,b,d){var e={name:\"volumechange\",target:{}};e.target.volume=b;e.target.muted=d;b=\"inmobi_media_\"+e.name;\"undefined\"!=typeof a&&(null!=a&&\"\"!=a)&&(b=b+\"_\"+a);window.imraid.broadcastEvent(b,e)};a.fireDeviceMuteChangeEvent=function(a){window.imraid.broadcastEvent(\"deviceMuted\",a)};a.fireDeviceVolumeChangeEvent=function(a){window.imraid.broadcastEvent(\"deviceVolumeChange\",a)};a.fireHeadphonePluggedEvent=\nfunction(a){window.imraid.broadcastEvent(\"headphones\",a)};a.showAlert=function(a){sdkController.showAlert(\"window.imraidview\",a)};a.openExternal=function(c,b){try{600<=getSdkVersionInt()?sdkController.openExternal(\"window.imraidview\",c,b):sdkController.openExternal(\"window.imraidview\",c)}catch(d){a.showAlert(\"openExternal: \"+d)}};a.log=function(c){try{sdkController.log(\"window.imraidview\",c)}catch(b){a.showAlert(\"log: \"+b)}};a.getPlatform=function(){return\"android\"};a.asyncPing=function(c){try{sdkController.asyncPing(\"window.imraidview\",\nc)}catch(b){a.showAlert(\"asyncPing: \"+b)}};a.startListeningDeviceMuteEvents=function(){sdkController.registerDeviceMuteEventListener(\"window.imraidview\")};a.stopListeningDeviceMuteEvents=function(){sdkController.unregisterDeviceMuteEventListener(\"window.imraidview\")};a.startListeningDeviceVolumeChange=function(){sdkController.registerDeviceVolumeChangeEventListener(\"window.imraidview\")};a.stopListeningDeviceVolumeChange=function(){sdkController.unregisterDeviceVolumeChangeEventListener(\"window.imraidview\")};\na.startListeningHeadphonePluggedEvents=function(){sdkController.registerHeadphonePluggedEventListener(\"window.imraidview\")};a.stopListeningHeadphonePluggedEvents=function(){sdkController.unregisterHeadphonePluggedEventListener(\"window.imraidview\")};getSdkVersionInt=function(){for(var c=a.getSdkVersion().split(\".\"),b=c.length,d=\"\",e=0;e<b;e++)d+=c[e];return parseInt(d)};a.getSdkVersionInt=getSdkVersionInt;a.getSdkVersion=function(){return window._im_imaiview.getSdkVersion()};a.supports=function(a){console.log(\"bridge: supports (IMRAID)\");\nif(\"string\"!=typeof a)window.imraid.broadcastEvent(\"error\",\"Supports method expects string parameter\",\"supports\");else return\"false\"!=sdkController.supports(\"window.imraidview\",a)};a.postToSocial=function(c,b,d,e){window.imraid.broadcastEvent(\"error\",\"Method not supported\",\"postToSocial\");a.log(\"Method postToSocial not supported\")};a.incentCompleted=function(a){if(\"object\"!=typeof a||null==a)sdkController.incentCompleted(\"window.imraidview\",null);else try{sdkController.incentCompleted(\"window.imraidview\",\nJSON.stringify(a))}catch(b){sdkController.incentCompleted(\"window.imraidview\",null)}};a.getOrientation=function(){try{return String(sdkController.getOrientation(\"window.imraidview\"))}catch(c){a.showAlert(\"getOrientation: \"+c)}};a.acceptAction=function(c){try{sdkController.acceptAction(\"window.imraidview\",mraidview.stringify(c))}catch(b){a.showAlert(\"acceptAction: \"+b+\", params = \"+c)}};a.rejectAction=function(c){try{sdkController.rejectAction(\"window.imraidview\",mraidview.stringify(c))}catch(b){a.showAlert(\"rejectAction: \"+\nb+\", params = \"+c)}};a.updateToPassbook=function(c){window.imraid.broadcastEvent(\"error\",\"Method not supported\",\"updateToPassbook\");a.log(\"Method not supported\")};a.isDeviceMuted=function(){return\"false\"!=sdkController.isDeviceMuted(\"window.imraidview\")};a.getDeviceVolume=function(){return 603>=getSdkVersionInt()?-1:sdkController.getDeviceVolume(\"window.imraidview\")};a.isHeadPhonesPlugged=function(){return\"false\"!=sdkController.isHeadphonePlugged(\"window.imraidview\")};a.sendSaveContentResult=function(){window.imraid.sendSaveContentResult.apply(window.imraid,\narguments)};a.broadcastEvent=function(){window.imraid.broadcastEvent.apply(window.imraid,arguments)};a.disableBackButton=function(a){void 0==a||\"boolean\"!=typeof a?console.log(\"disableBackButton called with invalid params\"):sdkController.disableBackButton(\"window.imraidview\",a)};a.isBackButtonDisabled=function(){return sdkController.isBackButtonDisabled(\"window.imraidview\")};a.startListeningForBackButtonPressedEvent=function(){sdkController.registerBackButtonPressedEventListener(\"window.imraidview\")};\na.stopListeningForBackButtonPressedEvent=function(){sdkController.unregisterBackButtonPressedEventListener(\"window.imraidview\")};a.hideStatusBar=function(){};a.setOpaqueBackground=function(){};a.startDownloader=function(a,b,d){682<=getSdkVersionInt()&&sdkController.startDownloader(\"window.imraidview\",a,b,d)};a.registerDownloaderCallbacks=function(){682<=getSdkVersionInt()&&sdkController.registerDownloaderCallbacks(\"window.imraidview\")};a.unregisterDownloaderCallbacks=function(){682<=getSdkVersionInt()&&\nsdkController.unregisterDownloaderCallbacks(\"window.imraidview\")};a.getDownloadProgress=function(){return 682<=getSdkVersionInt()?sdkController.getDownloadProgress(\"window.imraidview\"):-1};a.getDownloadStatus=function(){return 682<=getSdkVersionInt()?sdkController.getDownloadStatus(\"window.imraidview\"):-1};a.fireEvent=function(a){700<=getSdkVersionInt()&&(\"fireSkip\"===a?sdkController.fireSkip(\"window.imraidview\"):\"fireComplete\"===a?sdkController.fireComplete(\"window.imraidview\"):\"showEndCard\"===a&&\nsdkController.showEndCard(\"window.imraidview\"))};a.saveBlob=function(a){700<=getSdkVersionInt()&&sdkController.saveBlob(\"window.imraidview\",a)};a.getBlob=function(a,b){700<=getSdkVersionInt()&&sdkController.getBlob(a,b)};a.setCloseEndCardTracker=function(a){700<=getSdkVersionInt()&&sdkController.setCloseEndCardTracker(\"window.imraidview\",a)};a.getRenderableAdIndexes=function(){try{if(917<=getSdkVersionInt())return sdkController.getRenderableAdIndexes(\"window.imraidview\")}catch(a){}return\"[]\"};a.getCurrentRenderingIndex=\nfunction(){try{if(917<=getSdkVersionInt())return sdkController.getCurrentRenderingIndex(\"window.imraidview\")}catch(a){}return-1};a.showAd=function(a){try{917<=getSdkVersionInt()&&sdkController.showAd(\"window.imraidview\",a)}catch(b){}};a.timeSinceShow=function(){try{if(917<=getSdkVersionInt())return sdkController.timeSinceShow(\"window.imraidview\")}catch(a){}return-1};a.getShowTimeStamp=function(){try{if(917<=getSdkVersionInt())return sdkController.getShowTimeStamp(\"window.imraidview\")}catch(a){}return-1};\na.closeAll=function(){try{917<=getSdkVersionInt()&&sdkController.closeAll(\"window.imraidview\")}catch(a){}};a.loadAd=function(a){try{917<=getSdkVersionInt()&&sdkController.loadAd(\"window.imraidview\",a)}catch(b){}};a.setAdContext=function(a){try{917<=getSdkVersionInt()&&sdkController.setAdContext(\"window.imraidview\",a)}catch(b){}};a.getAdContext=function(){try{if(917<=getSdkVersionInt())return sdkController.getAdContext(\"window.imraidview\")}catch(a){}return\"\"};a.openWithoutTracker=function(a){try{\"undefined\"==\ntypeof a&&(a=null),sdkController.openWithoutTracker(\"window.imraidview\",a)}catch(b){}};a.impressionRendered=function(){window.imraid.broadcastEvent(\"impressionRendered\")};a.customExpandInNative=function(a,b,d){try{void 0==a||\"string\"!=typeof a?console.log(\"url called with invalid params\"):void 0==b||\"number\"!=typeof b?console.log(\"screenPercentage called with invalid params\"):void 0==d||\"boolean\"!=typeof d?console.log(\"hideCloseButton called with invalid params\"):sdkController.customExpandInNative(\"window.imraidview\",\na,b,d)}catch(e){}};a.customExpand=function(b,f,d,e,g){try{void 0==d||\"number\"!=typeof d?console.log(\"screenPercentage called with invalid params\"):void 0==f||\"number\"!=typeof f?console.log(\"inputType called with invalid params\"):void 0==e||\"boolean\"!=typeof e?console.log(\"topNavBarVisible called with invalid params\"):void 0==g||\"boolean\"!=typeof g?console.log(\"bottomNavBarVisible called with invalid params\"):sdkController.customExpand(\"window.imraidview\",b,f,d,e,g)}catch(h){a.showAlert(\"executeNativeCustomExpand: \"+\nh+\", input = \"+b+\", inputType = \"+f+\", screenPercentage = \"+d+\", bottomNavBarVisible = \"+g+\", topNavBarVisible = \"+e)}};a.closeCustomExpand=function(){try{sdkController.closeCustomExpand(\"window.imraidview\")}catch(a){}};a.onGestureDetected=function(a,b){window.imraid.broadcastEvent(\"onGestureDetected\",a,b)};a.onUserLandingCompleted=function(){window.imraid.broadcastEvent(\"onUserLandingCompleted\")};a.onUserInteraction=function(){window.imraid.broadcastEvent(\"onUserInteraction\")};a.impressionFired=\nfunction(){try{sdkController.impressionFired(\"window.imraidview\")}catch(a){}};a.getMaxDeviceVolume=function(){try{return sdkController.getMaxDeviceVolume(\"window.imraidview\")}catch(a){return 15}};a.zoom=function(a){try{sdkController.zoom(\"window.imraidview\",a)}catch(b){}};a.onAudioStateChanged=function(a){try{sdkController.onAudioStateChanged(\"window.imraidview\",a)}catch(b){}};a.submitAdReport=function(a){try{sdkController.submitAdReport(\"window.imraidview\",void 0!=a.adQualityUrl?a.adQualityUrl:null,\nvoid 0!=a.enableUserAdReportScreenshot?a.enableUserAdReportScreenshot:null,void 0!=a.templateInfo?a.templateInfo:null)}catch(b){}};a.logTelemetryEvent=function(a){try{var b=void 0!=a.eventType?a.eventType:null,d=void 0!=a.payload?a.payload:null;a=null;null!=d&&(a=mraidview.stringify(d));sdkController.logTelemetryEvent(\"window.imraidview\",b,a)}catch(e){}};a.onUserAudioMuteInteraction=function(a){try{sdkController.onUserAudioMuteInteraction(\"window.imraidview\",a)}catch(b){}};a.enableFallbackViewabilityFunctionality=\nfunction(){b=!0;a.checkFallbackViewable()&&window.mraid.broadcastEvent(\"viewableChange\",!0);mraid.addEventListener(\"sizeChange\",function(){window.mraid.broadcastEvent(\"viewableChange\",a.checkFallbackViewable())})};a.checkFallbackViewable=function(){try{var b=mraidview.getCurrentPosition(),f=b.height;return 40<=b.width&&40<=f?!0:!1}catch(d){a.showAlert(\"checkFallbackViewable: \"+d)}};a.fallbackViewabilityEnabled=function(){return b};a.getSafeArea=function(){try{return JSON.parse(sdkController.getSafeArea(\"window.imraidview\"))}catch(a){return null}}})();\n(function(){var a=window.imraid=new InmobiObj,b=window.imraidview;a.getOrientation=b.getOrientation;a.setOrientationProperties=b.setOrientationProperties;a.getOrientationProperties=b.getOrientationProperties;a.saveContentIDMap={};a.saveContent=function(c,d,e){var g=arguments.length,h,k=null;if(3>g){if(\"function\"===typeof arguments[g-1])h=arguments[g-1];else return;k={reason:1}}else a.saveContentIDMap[c]&&(h=arguments[2],k={reason:11,url:arguments[1]});\"function\"!==!h&&(k?(window.imraid.addEventListener(\"saveContent_failed_\"+\nc,h),window.imraid.sendSaveContentResult(\"saveContent_failed_\"+c,\"failed\",JSON.stringify(k))):(a.removeEventListener(\"saveContent_\"+c),a.saveContentIDMap[c]=!0,b.saveContent(c,d,e)))};a.cancelSaveContent=function(a){b.cancelSaveContent(a)};a.asyncPing=function(c){\"string\"!=typeof c?a.broadcastEvent(\"error\",\"URL is required.\",\"asyncPing\"):b.asyncPing(c)};a.disableCloseRegion=b.disableCloseRegion;a.getSdkVersion=b.getSdkVersion;a.log=function(c){\"undefined\"==typeof c?a.broadcastEvent(\"error\",\"message is required.\",\n\"log\"):\"string\"==typeof c?b.log(c):b.log(JSON.stringify(c))};a.getInMobiAIVersion=function(){return\"2.0\"};a.getVendorName=function(){return\"inmobi\"};a.openExternal=function(a,c){console.log(\"openExternal is deprecated, will be removed in future version\");mraidview.detectAndBlockFraud(\"imraid.openExternal\")||b.openExternal(a,c)};a.updateToPassbook=function(c){mraidview.detectAndBlockFraud(\"imraid.updateToPassbook\")||(\"string\"!=typeof c?a.broadcastEvent(\"error\",\"Request must specify a valid URL\",\"updateToPassbook\"):\nb.updateToPassbook(c))};a.postToSocial=function(a,c,e,g){mraidview.detectAndBlockFraud(\"imraid.postToSocial\")||b.postToSocial(a,c,e,g)};a.getPlatform=b.getPlatform;a.incentCompleted=b.incentCompleted;a.loadSKStore=b.loadSKStore;a.showSKStore=function(a){mraidview.detectAndBlockFraud(\"imraid.showSKStore\")||b.showSKStore(a)};a.skoverlay=b.skoverlay;a.skoverlayWithSkan=b.skoverlayWithSkan;a.zoom=b.zoom;a.dismissSKOverlay=b.dismissSKOverlay;a.supports=function(a){return b.supports(a)};a.isDeviceMuted=\nfunction(){return!imIsObjValid(a.listeners.deviceMuted)?-1:b.isDeviceMuted()};a.isHeadPhonesPlugged=function(){return!imIsObjValid(a.listeners.headphones)?!1:b.isHeadPhonesPlugged()};a.getDeviceVolume=function(){return b.getDeviceVolume()};a.setDeviceVolume=function(a){b.setDeviceVolume(a)};a.hideStatusBar=function(){b.hideStatusBar()};a.setOpaqueBackground=function(){b.setOpaqueBackground()};a.getRenderableAdIndexes=b.getRenderableAdIndexes;a.getCurrentRenderingIndex=b.getCurrentRenderingIndex;a.showAd=\nb.showAd;a.timeSinceShow=b.timeSinceShow;a.closeAll=b.closeAll;a.loadAd=b.loadAd;a.setAdContext=b.setAdContext;a.getAdContext=b.getAdContext;a.getShowTimeStamp=b.getShowTimeStamp;a.disableBackButton=b.disableBackButton;a.isBackButtonDisabled=b.isBackButtonDisabled;a.startDownloader=b.startDownloader;a.getDownloadProgress=b.getDownloadProgress;a.getDownloadStatus=b.getDownloadStatus;a.fireEvent=b.fireEvent;a.saveBlob=b.saveBlob;a.getBlob=b.getBlob;a.setCloseEndCardTracker=b.setCloseEndCardTracker;\na.openWithoutTracker=b.openWithoutTracker;a.impressionRendered=b.impressionRendered;a.onGestureDetected=b.onGestureDetected;a.onUserLandingCompleted=b.onUserLandingCompleted;a.customExpand=b.customExpand;a.closeCustomExpand=b.closeCustomExpand;a.customExpandInNative=b.customExpandInNative;a.impressionFired=b.impressionFired;a.getImraidVersion=b.getImraidVersion;a.getMaxDeviceVolume=b.getMaxDeviceVolume;a.onAudioStateChanged=b.onAudioStateChanged;a.onUserAudioMuteInteraction=b.onUserAudioMuteInteraction;\na.submitAdReport=b.submitAdReport;a.enableFallbackViewabilityFunctionality=b.enableFallbackViewabilityFunctionality;a.logTelemetryEvent=b.logTelemetryEvent;a.getSafeArea=b.getSafeArea;a.onReceviedSKANCallback=b.onReceviedSKANCallback;a.getOpenMode=b.getOpenMode;try{a.addEventListener(\"onUserLandingCompleted\",function(){1080>b.getSdkVersionInt()&&a.broadcastEvent(\"onUserLandingInitialized\")})}catch(c){}})();\n(function(){var a=window._im_imaiview={ios:{}};window.imaiview=a;a.broadcastEvent=function(){for(var a=Array(arguments.length),c=0;c<arguments.length;c++)a[c]=arguments[c];c=a.shift();try{window.mraid.broadcastEvent(c,a)}catch(f){}};a.getPlatform=function(){return\"android\"};a.getPlatformVersion=function(){return sdkController.getPlatformVersion(\"window.imaiview\")};a.log=function(a){sdkController.log(\"window.imaiview\",a)};a.openEmbedded=function(a){sdkController.openEmbedded(\"window.imaiview\",a)};\na.openExternal=function(a,c){600<=getSdkVersionInt()?sdkController.openExternal(\"window.imaiview\",a,c):sdkController.openExternal(\"window.imaiview\",a)};a.ping=function(a,c){sdkController.ping(\"window.imaiview\",a,c)};a.pingInWebView=function(a,c){sdkController.pingInWebView(\"window.imaiview\",a,c)};a.getSdkVersion=function(){try{var a=sdkController.getSdkVersion(\"window.imaiview\");if(\"string\"==typeof a&&null!=a)return a}catch(c){return\"3.7.0\"}};a.onUserInteraction=function(a){if(\"object\"!=typeof a||\nnull==a)sdkController.onUserInteraction(\"window.imaiview\",null);else try{sdkController.onUserInteraction(\"window.imaiview\",JSON.stringify(a))}catch(c){sdkController.onUserInteraction(\"window.imaiview\",null)}};a.fireAdReady=function(){sdkController.fireAdReady(\"window.imaiview\")};a.fireAdFailed=function(){sdkController.fireAdFailed(\"window.imaiview\")};a.broadcastEvent=function(){window.imai.broadcastEvent.apply(window.imai,arguments)}})();\n(function(){var a=window._im_imaiview;window._im_imai=new InmobiObj;window._im_imai.ios=new InmobiObj;var b=window._im_imai;window.imai=window._im_imai;b.matchString=function(a,b){if(\"string\"!=typeof a||null==a||null==b)return-1;var d=-1;try{d=a.indexOf(b)}catch(e){}return d};b.isHttpUrl=function(a){return\"string\"!=typeof a||null==a?!1:0==b.matchString(a,\"http://\")?!0:0==b.matchString(a,\"https://\")?!0:!1};b.appendTapParams=function(a,f,d){if(!imIsObjValid(f)||!imIsObjValid(d))return a;b.isHttpUrl(a)&&\n(a=-1==b.matchString(a,\"?\")?a+(\"?u-tap-o=\"+f+\",\"+d):a+(\"&u-tap-o=\"+f+\",\"+d));return a};b.performAdClick=function(a,f){f=f||event;if(imIsObjValid(a)){var d=a.clickConfig,e=a.landingConfig;if(!imIsObjValid(d)&&!imIsObjValid(e))b.log(\"click/landing config are invalid, Nothing to process .\"),this.broadcastEvent(\"error\",\"click/landing config are invalid, Nothing to process .\");else{var g=null,h=null,k=null,m=null,n=null,l=null,q=null,p=null;if(imIsObjValid(f))try{m=f.changedTouches[0].pageX,n=f.changedTouches[0].pageY}catch(r){n=\nm=0}imIsObjValid(e)?imIsObjValid(d)?(l=e.url,q=e.fallbackUrl,p=e.urlType,g=d.url,h=d.pingWV,k=d.fr):(l=e.url,p=e.urlType):(l=d.url,p=d.urlType);d=b.getPlatform();try{if(\"boolean\"!=typeof k&&\"number\"!=typeof k||null==k)k=!0;if(0>k||1<k)k=!0;if(\"boolean\"!=typeof h&&\"number\"!=typeof h||null==h)h=!0;if(0>h||1<h)h=!0;if(\"number\"!=typeof p||null==p)p=0;g=b.appendTapParams(g,m,n);imIsObjValid(g)?!0==h?b.pingInWebView(g,k):b.ping(g,k):b.log(\"clickurl provided is null.\");if(imIsObjValid(l))switch(imIsObjValid(g)||\n(l=b.appendTapParams(l,m,n)),p){case 1:b.openEmbedded(l);break;case 2:\"ios\"==d?b.ios.openItunesProductView(l):this.broadcastEvent(\"error\",\"Cannot process openItunesProductView for os\"+d);break;default:b.openExternal(l,q)}else b.log(\"Landing url provided is null.\")}catch(s){}}}else b.log(\" invalid config, nothing to process .\"),this.broadcastEvent(\"error\",\"invalid config, nothing to process .\")};b.performActionClick=function(a,f){f=f||event;if(imIsObjValid(a)){var d=a.clickConfig,e=a.landingConfig;\nif(!imIsObjValid(d)&&!imIsObjValid(e))b.log(\"click/landing config are invalid, Nothing to process .\"),this.broadcastEvent(\"error\",\"click/landing config are invalid, Nothing to process .\");else{var g=null,h=null,k=null,m=null,n=null;if(imIsObjValid(f))try{m=f.changedTouches[0].pageX,n=f.changedTouches[0].pageY}catch(l){n=m=0}imIsObjValid(d)&&(g=d.url,h=d.pingWV,k=d.fr);try{if(\"boolean\"!=typeof k&&\"number\"!=typeof k||null==k)k=!0;if(0>k||1<k)k=!0;if(\"boolean\"!=typeof h&&\"number\"!=typeof h||null==h)h=\n!0;if(0>h||1<h)h=!0;g=b.appendTapParams(g,m,n);imIsObjValid(g)?!0==h?b.pingInWebView(g,k):b.ping(g,k):b.log(\"clickurl provided is null.\");b.onUserInteraction(e)}catch(q){}}}else b.log(\" invalid config, nothing to process .\"),this.broadcastEvent(\"error\",\"invalid config, nothing to process .\")};b.getVersion=function(){return\"1.0\"};b.getPlatform=a.getPlatform;b.getPlatformVersion=a.getPlatformVersion;b.log=a.log;b.openEmbedded=function(b){console.log(\"openEmbedded is deprecated, will be removed in future version\");\nmraidview.detectAndBlockFraud(\"imai.openEmbedded\")||a.openEmbedded(b)};b.openExternal=function(b,f){console.log(\"openExternal is deprecated, will be removed in future version\");mraidview.detectAndBlockFraud(\"imai.openExternal\")||a.openExternal(b,f)};b.ping=a.ping;b.pingInWebView=a.pingInWebView;b.onUserInteraction=a.onUserInteraction;b.getSdkVersion=a.getSdkVersion;b.loadSKStore=a.loadSKStore;b.showSKStore=function(b){mraidview.detectAndBlockFraud(\"imai.showSKStore\")||a.showSKStore(b)};b.ios.openItunesProductView=\nfunction(b){mraidview.detectAndBlockFraud(\"imai.ios.openItunesProductView\")||a.ios.openItunesProductView(b)};b.fireAdReady=a.fireAdReady;b.fireAdFailed=a.fireAdFailed})();";
}
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 == null) {
return a;
}
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f53).a(str3, "Returning fetched Mraid Js string.");
return a;
}
public final K9 getOrientationProperties() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "getOrientationProperties "));
}
return this.r0;
}
public final long getPlacementId() {
return this.L;
}
@Override
public byte getPlacementType() {
return this.b;
}
public InterfaceC0495x getReferenceContainer() {
return this.S;
}
public final JSONArray getRenderableAdIndexes() {
JSONArray N;
Z z = this.V;
return (z == null || (N = ((Q0) z).N()) == null) ? new JSONArray() : N;
}
public final AdConfig.RenderingConfig getRenderingConfig() {
AdConfig adConfig = this.q;
if (adConfig == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig = null;
}
return adConfig.getRendering();
}
public final JSONObject getSafeArea() {
Pd pd = this.y0;
if (pd == null) {
return null;
}
Integer f = N3.f();
Od od = (f == null && (f = N3.g) == null) ? null : (Od) pd.d.get(f);
if (od != null) {
return od.a();
}
return null;
}
public final boolean getShouldFireLandingPageBeacons() {
return this.x0;
}
public final long getShowTimeStamp() {
Z z = this.V;
if (z != null) {
return ((Q0) z).O();
}
return 0L;
}
public Map<String, S0> getTelemetryManagerMap() {
return this.A0;
}
public C0424rc getTelemetryOnAdImpression() {
Map<String, S0> telemetryManagerMap = getTelemetryManagerMap();
return new C0424rc(telemetryManagerMap != null ? telemetryManagerMap.get("AdImpressionSuccessful") : null, this.q0, getCreativeId(), getMarkupType());
}
public final boolean getUnloaded() {
return this.z0;
}
public final rd getVISIBILITY_CHANGE_LISTENER() {
return this.G0;
}
@Override
public View getVideoContainerView() {
return null;
}
public final String getViewState() {
return this.o;
}
@Override
public long getViewTouchTimestamp() {
return this.g;
}
@Override
public com.inmobi.media.AbstractC0352md getViewableAd() {
throw new UnsupportedOperationException("Method not decompiled: com.inmobi.media.Ya.getViewableAd():com.inmobi.media.md");
}
public final int[] getViewableFrameArray() {
return this.d0;
}
public final Md getWindowInsetListener() {
return this.C0;
}
public final void h() {
if (this.D.get()) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).b(str, "fireAdReady called on destroyed view");
return;
}
return;
}
if (this.z0) {
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).a(str2, "fireAdReady " + this + " - Ad is already unloaded");
return;
}
return;
}
C0245fb c0245fb = this.O;
if (c0245fb != null) {
Map a = c0245fb.a();
long j = c0245fb.b;
ScheduledExecutorService scheduledExecutorService = Xc.a;
a.put("latency", Long.valueOf(SystemClock.elapsedRealtime() - j));
C0291ic c0291ic = C0291ic.a;
C0291ic.b("FireAdReady", a, EnumC0351mc.a);
}
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str3 = P0;
((C0254g5) interfaceC0239f53).a(str3, Wa.a(this, str3, "TAG", "fireAdReady "));
}
this.m0 = true;
if (this.j == 0) {
j();
}
y();
getListener().h(this);
}
public final void i() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "fireClickTrackers "));
}
Z2 z2 = this.I0;
if (z2 != null && !z2.g.get()) {
z2.d.g = 1;
Intrinsics.checkNotNull(z2.c);
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f52).a(str2, Wa.a(this, str2, "TAG", "fireOnUserInteraction "));
}
b("window.imraidview.onUserInteraction();");
getListener().b(this);
}
public final void j() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "fireImpression "));
}
if (Intrinsics.areEqual(AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_VIDEO, this.q0) || Intrinsics.areEqual("audio", this.q0)) {
return;
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f52).a(str2, Wa.a(this, str2, "TAG", "recordContextualData "));
}
Z2 z2 = this.I0;
if (z2 != null) {
z2.a();
}
b("window.imraidview.impressionRendered();");
getListener().c(this);
}
public final boolean k() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
StringBuilder a = AbstractC0300j6.a(str, "TAG", "hasUserInteracted ");
a.append(getViewTouchTimestamp());
a.append(' ');
a.append(getRenderingConfig().getUserTouchResetTime());
((C0254g5) interfaceC0239f5).a(str, a.toString());
}
return !getRenderingConfig().getAutoRedirectionEnforcement() || this.U || (getViewTouchTimestamp() != -1 && SystemClock.elapsedRealtime() - getViewTouchTimestamp() < getRenderingConfig().getUserTouchResetTime());
}
public final boolean l() {
return (Intrinsics.areEqual(getAdType(), "banner") && getAdConfig().getMraid3Config().getBannerEnabled()) || (Intrinsics.areEqual(getAdType(), "int") && getAdConfig().getMraid3Config().getInterstitialEnabled());
}
public final void m() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "onUserLandingCompleted "));
}
b("window.imraid.broadcastEvent('onUserLandingCompleted');");
}
public final void n() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "processUnload "));
}
if (this.D.get()) {
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).b(str2, "unload called on destroyed view");
return;
}
return;
}
if (!l()) {
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f53).b(str3, "mraid 3.0 is not enabled");
return;
}
return;
}
if (this.n0) {
InterfaceC0239f5 interfaceC0239f54 = this.i;
if (interfaceC0239f54 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f54).b(str4, "unload called on failed view");
return;
}
return;
}
if (this.z0) {
return;
}
this.z0 = true;
P6 p6 = (P6) AbstractC0343m4.d.getValue();
Runnable runnable = new Runnable() {
@Override
public final void run() {
Ya.b(Ya.this);
}
};
p6.getClass();
Intrinsics.checkNotNullParameter(runnable, "runnable");
p6.a.post(runnable);
}
public final void o() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "setCurrentPosition "));
}
this.u = new JSONObject();
getLocationOnScreen(new int[2]);
try {
JSONObject jSONObject = this.u;
if (jSONObject != null) {
jSONObject.put("x", AbstractC0512y2.b(r0[0] / N3.b()));
}
JSONObject jSONObject2 = this.u;
if (jSONObject2 != null) {
jSONObject2.put("y", AbstractC0512y2.b(r0[1] / N3.b()));
}
int b = AbstractC0512y2.b(getWidth() / N3.b());
int b2 = AbstractC0512y2.b(getHeight() / N3.b());
JSONObject jSONObject3 = this.u;
if (jSONObject3 != null) {
jSONObject3.put("width", b);
}
JSONObject jSONObject4 = this.u;
if (jSONObject4 != null) {
jSONObject4.put("height", b2);
}
} catch (JSONException unused) {
}
synchronized (this.F) {
this.w = false;
this.F.notifyAll();
Unit unit = Unit.INSTANCE;
}
}
@Override
public final void onAttachedToWindow() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "onAttachedToWindow "));
}
super.onAttachedToWindow();
C0241f7 c0241f7 = this.p;
if (c0241f7 != null) {
S6 s6 = c0241f7.d;
if (s6 != null) {
s6.b();
}
S6 s62 = c0241f7.e;
if (s62 != null) {
s62.b();
}
S6 s63 = c0241f7.f;
if (s63 != null) {
s63.b();
}
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f52).c(str2, Wa.a(this, str2, "TAG", "setIsViewHardwareAccelerated "));
}
this.r = isHardwareAccelerated();
if (this.l == null) {
ViewParent parent = getParent();
this.l = new WeakReference(parent instanceof ViewGroup ? (ViewGroup) parent : null);
}
v();
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str3 = P0;
((C0254g5) interfaceC0239f53).a(str3, Wa.a(this, str3, "TAG", "startTrackingExposure "));
}
if (!l() || this.e) {
InterfaceC0239f5 interfaceC0239f54 = this.i;
if (interfaceC0239f54 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f54).b(str4, "exposureTracker is already initialized");
}
} else {
this.v0 = new I(this, getAdConfig().getMraid3Config().getExposureChangeInterval(), this.h0, this.i);
}
I i = this.v0;
if (i != null) {
if (i.i.compareAndSet(false, true)) {
Throwable th = Result.exceptionOrNull-impl(AbstractC0526z2.a(new F(i)));
if (th != null) {
InterfaceC0239f5 interfaceC0239f55 = i.d;
if (interfaceC0239f55 != null) {
((C0254g5) interfaceC0239f55).b("AdExposureTracker", "Error starting exposure tracking - " + th.getMessage());
}
i.i.set(false);
C0487w5 c0487w5 = C0487w5.a;
C0206d2 c0206d2 = new C0206d2(th);
Intrinsics.checkNotNullParameter(c0206d2, "event");
C0487w5.d.a(c0206d2);
}
} else {
InterfaceC0239f5 interfaceC0239f56 = i.d;
if (interfaceC0239f56 != null) {
((C0254g5) interfaceC0239f56).c("AdExposureTracker", "Exposure tracking is already started");
}
}
}
InterfaceC0239f5 interfaceC0239f57 = this.i;
if (interfaceC0239f57 != null) {
String str5 = P0;
((C0254g5) interfaceC0239f57).a(str5, Wa.a(this, str5, "TAG", "startTrackingAudioVolume "));
}
if (l() && !this.e) {
C0425s c0425s = C0425s.a;
C0425s.a(this.i, this.g0);
}
InterfaceC0239f5 interfaceC0239f58 = this.i;
if (interfaceC0239f58 != null) {
String str6 = P0;
Intrinsics.checkNotNullExpressionValue(str6, "TAG");
((C0254g5) interfaceC0239f58).a(str6, "==== CHECKPOINT REACHED - VISIBLE ====");
}
InterfaceC0239f5 interfaceC0239f59 = this.i;
if (interfaceC0239f59 != null) {
((C0254g5) interfaceC0239f59).b();
}
}
@Override
public final void onDetachedFromWindow() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "onDetachedFromWindow "));
}
U3 u3 = this.o0;
C0354n0 c0354n0 = null;
if (u3 != null) {
U3.a(u3, 8, true, null, 12);
}
C0241f7 c0241f7 = this.p;
if (c0241f7 != null) {
S6 s6 = c0241f7.d;
if (s6 != null) {
s6.a();
}
S6 s62 = c0241f7.e;
if (s62 != null) {
s62.a();
}
S6 s63 = c0241f7.f;
if (s63 != null) {
s63.a();
}
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).a(str2, "Detached from window");
}
C0354n0 c0354n02 = this.s0;
if (c0354n02 == null) {
Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
} else {
c0354n0 = c0354n02;
}
if (c0354n0.d.get()) {
c0354n0.a("session end is already triggered");
} else if (!c0354n0.a.getEnabled()) {
c0354n0.a("config kill switch - false. ad quality will skip");
} else if (c0354n0.g == null) {
c0354n0.a("setup not done. ignore trigger");
} else {
c0354n0.d.set(true);
c0354n0.a(false);
}
if (this.t0.get()) {
((ScheduledThreadPoolExecutor) AbstractC0343m4.b.getValue()).schedule(new Runnable() {
@Override
public final void run() {
Ya.a(Ya.this);
}
}, 1L, TimeUnit.SECONDS);
}
v();
u();
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str3 = P0;
((C0254g5) interfaceC0239f53).a(str3, Wa.a(this, str3, "TAG", "stopTrackingAudioVolume "));
}
C0425s c0425s = C0425s.a;
C0425s.c(this.i, this.g0);
try {
super.onDetachedFromWindow();
} catch (IllegalArgumentException e) {
InterfaceC0239f5 interfaceC0239f54 = this.i;
if (interfaceC0239f54 != null) {
String str4 = P0;
StringBuilder a = AbstractC0300j6.a(str4, "TAG", "Detaching WebView from window encountered an error ( ");
a.append(e.getMessage());
a.append(" )");
((C0254g5) interfaceC0239f54).b(str4, a.toString());
}
}
}
@Override
public final boolean onDoubleTap(MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(motionEvent, "e");
if (!getRenderingConfig().getSupportedGestures().contains(1)) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).c(str, "Double tap gesture is disabled from config");
}
return false;
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).a(str2, "onDoubleTapEvent detected \n " + motionEvent);
}
setViewTouchTimestamp(SystemClock.elapsedRealtime());
if (motionEvent.getAction() == 1) {
JSONArray jSONArray = new JSONArray();
try {
jSONArray.put(AbstractC0512y2.c(motionEvent.getX()));
jSONArray.put(AbstractC0512y2.c(motionEvent.getY()));
} catch (JSONException e) {
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f53).a(str3, "Exception in onDoubleTap", e);
}
}
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONArray);
b("window.imraidview.onGestureDetected('1', '" + jSONArray2 + "');");
}
return false;
}
@Override
public final boolean onDoubleTapEvent(MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(motionEvent, "e");
return false;
}
@Override
public final boolean onDown(MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(motionEvent, "e");
return false;
}
@Override
public final boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
Intrinsics.checkNotNullParameter(motionEvent2, "e2");
return false;
}
@Override
public final void onLongPress(MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(motionEvent, "e");
if (!getRenderingConfig().getSupportedGestures().contains(5)) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).c(str, "LongPress gesture is disabled from config");
return;
}
return;
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).a(str2, "onLongPress detected \n " + motionEvent);
}
JSONArray jSONArray = new JSONArray();
try {
jSONArray.put(AbstractC0512y2.c(motionEvent.getX()));
jSONArray.put(AbstractC0512y2.c(motionEvent.getY()));
} catch (JSONException e) {
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f53).a(str3, "Exception in onLongPress", e);
}
}
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONArray);
b("window.imraidview.onGestureDetected('5', '" + jSONArray2 + "');");
}
@Override
public final boolean onScroll(MotionEvent motionEvent, MotionEvent motionEvent2, float f, float f2) {
Intrinsics.checkNotNullParameter(motionEvent2, "e2");
return false;
}
@Override
public final void onShowPress(MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(motionEvent, "e");
}
@Override
public final boolean onSingleTapConfirmed(MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(motionEvent, "e");
if (!getRenderingConfig().getSupportedGestures().contains(0)) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).c(str, "Click gesture is disabled from config");
}
return false;
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).a(str2, "onSingleTapConfirmed detected \n " + motionEvent);
}
JSONArray jSONArray = new JSONArray();
try {
jSONArray.put(AbstractC0512y2.c(motionEvent.getX()));
jSONArray.put(AbstractC0512y2.c(motionEvent.getY()));
} catch (JSONException e) {
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f53).a(str3, "Exception in onSingleTapConfirmed", e);
}
}
JSONArray jSONArray2 = new JSONArray();
jSONArray2.put(jSONArray);
b("window.imraidview.onGestureDetected('0', '" + jSONArray2 + "');");
return false;
}
@Override
public final boolean onSingleTapUp(MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(motionEvent, "e");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "onSingleTapUp detected \n " + motionEvent);
}
setViewTouchTimestamp(SystemClock.elapsedRealtime());
return false;
}
@Override
public final void onSizeChanged(int i, int i2, int i3, int i6) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "onSizeChanged "));
}
super.onSizeChanged(i, i2, i3, i6);
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).a(str2, "onSizeChanged (" + i + ", " + i2 + ')');
}
if (i == 0 || i2 == 0) {
return;
}
int b = AbstractC0512y2.b(i / N3.b());
int b2 = AbstractC0512y2.b(i2 / N3.b());
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f53).a(str3, "fireSizeChanged " + this + " w-" + b + " h-" + b2);
}
b("window.mraidview.broadcastEvent('sizeChange'," + b + ',' + b2 + ");");
}
@Override
public final boolean onTouchEvent(MotionEvent motionEvent) {
Intrinsics.checkNotNullParameter(motionEvent, "event");
if (!Float.isNaN(motionEvent.getX()) && !Float.isNaN(motionEvent.getY())) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "onTouchEvent "));
}
if (this.b == 1) {
this.k0.a(motionEvent);
}
this.l0.onTouchEvent(motionEvent);
setViewTouchTimestamp(SystemClock.elapsedRealtime());
return super.onTouchEvent(motionEvent);
}
if (!this.u0) {
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).b(str2, "onTouchEvent Invalid Coordinates " + motionEvent);
}
this.u0 = true;
}
return super.onTouchEvent(motionEvent);
}
@Override
public final void onWindowFocusChanged(boolean z) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "onWindowFocusChanged " + this + " - " + z);
}
super.onWindowFocusChanged(z);
if (z) {
if (isShown()) {
C0528z4 c0528z4 = C4.k;
if (c0528z4.a(this, this, this.j0, null) && c0528z4.a(this, this, this.j0)) {
z = true;
}
}
z = false;
}
Activity fullScreenActivity = getFullScreenActivity();
if (fullScreenActivity == null || !fullScreenActivity.isInMultiWindowMode()) {
c(z);
}
}
@Override
public final void onWindowVisibilityChanged(int i) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).c(str, "onWindowVisibilityChanged " + this + ' ' + i);
}
super.onWindowVisibilityChanged(i);
boolean z = false;
boolean z2 = i == 0;
if (z2) {
int visibilityTrackingMinPercentage = getVisibilityTrackingMinPercentage();
if (isShown()) {
C0528z4 c0528z4 = C4.k;
if (c0528z4.a(this, this, visibilityTrackingMinPercentage, null) && c0528z4.a(this, this, visibilityTrackingMinPercentage)) {
z = true;
}
}
} else {
z = z2;
}
c(z);
}
public final void p() {
ViewGroup viewGroup;
ViewGroup viewGroup2;
ViewGroup viewGroup3;
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "setDefaultPosition "));
}
int[] iArr = new int[2];
this.t = new JSONObject();
if (this.l == null) {
ViewParent parent = getParent();
this.l = new WeakReference(parent instanceof ViewGroup ? (ViewGroup) parent : null);
}
WeakReference weakReference = this.l;
try {
if ((weakReference != null ? (ViewGroup) weakReference.get() : null) != null) {
WeakReference weakReference2 = this.l;
if (weakReference2 != null && (viewGroup3 = (ViewGroup) weakReference2.get()) != null) {
viewGroup3.getLocationOnScreen(iArr);
}
JSONObject jSONObject = this.t;
if (jSONObject != null) {
jSONObject.put("x", AbstractC0512y2.b(iArr[0] / N3.b()));
}
JSONObject jSONObject2 = this.t;
if (jSONObject2 != null) {
jSONObject2.put("y", AbstractC0512y2.b(iArr[1] / N3.b()));
}
WeakReference weakReference3 = this.l;
int b = AbstractC0512y2.b(((weakReference3 == null || (viewGroup2 = (ViewGroup) weakReference3.get()) == null) ? 0 : viewGroup2.getWidth()) / N3.b());
WeakReference weakReference4 = this.l;
int b2 = AbstractC0512y2.b(((weakReference4 == null || (viewGroup = (ViewGroup) weakReference4.get()) == null) ? 0 : viewGroup.getHeight()) / N3.b());
JSONObject jSONObject3 = this.t;
if (jSONObject3 != null) {
jSONObject3.put("width", b);
}
JSONObject jSONObject4 = this.t;
if (jSONObject4 != null) {
jSONObject4.put("height", b2);
}
} else {
JSONObject jSONObject5 = this.t;
if (jSONObject5 != null) {
jSONObject5.put("x", 0);
}
JSONObject jSONObject6 = this.t;
if (jSONObject6 != null) {
jSONObject6.put("y", 0);
}
JSONObject jSONObject7 = this.t;
if (jSONObject7 != null) {
jSONObject7.put("width", 0);
}
JSONObject jSONObject8 = this.t;
if (jSONObject8 != null) {
jSONObject8.put("height", 0);
}
}
} catch (JSONException unused) {
}
synchronized (this.E) {
this.v = false;
this.E.notifyAll();
Unit unit = Unit.INSTANCE;
}
}
public final void q() {
int webImpressionMinPercentageViewed;
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "setFallbackImpressionMinPercentageViewed "));
}
AdConfig adConfig = null;
if (Intrinsics.areEqual(AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_VIDEO, this.q0)) {
AdConfig adConfig2 = this.q;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
webImpressionMinPercentageViewed = adConfig.getViewability().getVideoImpressionMinPercentageViewed();
} else if (!Intrinsics.areEqual("audio", this.q0)) {
AdConfig adConfig3 = this.q;
if (adConfig3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig3;
}
webImpressionMinPercentageViewed = adConfig.getViewability().getWebImpressionMinPercentageViewed();
} else if (Intrinsics.areEqual("audio", getAdType())) {
AdConfig adConfig4 = this.q;
if (adConfig4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig4;
}
webImpressionMinPercentageViewed = adConfig.getViewability().getAudioImpressionMinPercentageViewed();
} else {
AdConfig adConfig5 = this.q;
if (adConfig5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig5;
}
webImpressionMinPercentageViewed = adConfig.getViewability().getWebImpressionMinPercentageViewed();
}
this.j0 = webImpressionMinPercentageViewed;
}
public final void r() {
int webImpressionMinTimeViewed;
AdConfig adConfig = null;
if (Intrinsics.areEqual(AnalyticsEvents.PARAMETER_SHARE_DIALOG_CONTENT_VIDEO, this.q0)) {
AdConfig adConfig2 = this.q;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
webImpressionMinTimeViewed = adConfig.getViewability().getVideoImpressionMinTimeViewed();
} else if (!Intrinsics.areEqual("audio", this.q0)) {
AdConfig adConfig3 = this.q;
if (adConfig3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig3;
}
webImpressionMinTimeViewed = adConfig.getViewability().getWebImpressionMinTimeViewed();
} else if (Intrinsics.areEqual("audio", getAdType())) {
AdConfig adConfig4 = this.q;
if (adConfig4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig4;
}
webImpressionMinTimeViewed = adConfig.getViewability().getAudioImpressionMinTimeViewed();
} else {
AdConfig adConfig5 = this.q;
if (adConfig5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig5;
}
webImpressionMinTimeViewed = adConfig.getViewability().getWebImpressionMinTimeViewed();
}
this.i0 = webImpressionMinTimeViewed;
}
public final void s() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "setFallbackImpressionParams "));
}
r();
q();
t();
}
public final void setAdPodHandler(Z z) {
this.V = z;
}
public final void setAdSize(String str) {
Intrinsics.checkNotNullParameter(str, b9.h.O);
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f5).a(str2, Wa.a(this, str2, "TAG", "setAdSize "));
}
O3 o3 = N3.a;
this.b0 = (int) (N3.b() * Integer.parseInt(((String[]) new Regex("x").split(str, 0).toArray(new String[0]))[0]));
this.e0 = ((int) (N3.b() * Integer.parseInt(((String[]) new Regex("x").split(str, 0).toArray(new String[0]))[1]))) * this.b0;
}
public void setAdType(String str) {
this.P = str;
}
public final void setAllowAutoRedirection(boolean z) {
this.U = z;
}
public final void setAndUpdateViewState(String str) {
Intrinsics.checkNotNullParameter(str, "state");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f5).c(str2, Wa.a(this, str2, "TAG", "setAndUpdateViewState "));
}
this.o = str;
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str3 = P0;
StringBuilder a = AbstractC0300j6.a(str3, "TAG", "set state:");
a.append(this.o);
((C0254g5) interfaceC0239f52).a(str3, a.toString());
}
Locale locale = Locale.ENGLISH;
Intrinsics.checkNotNullExpressionValue(locale, ViewHierarchyConstants.ENGLISH);
String lowerCase = str.toLowerCase(locale);
Intrinsics.checkNotNullExpressionValue(lowerCase, "this as java.lang.String).toLowerCase(locale)");
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f53).a(str4, "fireStateChange " + this + ' ' + lowerCase);
}
b("window.mraidview.broadcastEvent('stateChange','" + lowerCase + "');");
}
public final void setBeaconUrl(String str) {
this.w0 = str;
}
public final void setBlobProvider(Z1 z1) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "setBlobProvider "));
}
this.R = z1;
}
public final void setCloseAssetArea(Nd nd) {
Intrinsics.checkNotNullParameter(nd, "value");
if (!this.H0) {
Context context = getContext();
Intrinsics.checkNotNullExpressionValue(context, "getContext(...)");
if (!AbstractC0512y2.a(context)) {
return;
}
}
this.M0 = new Nd(0, nd.b, nd.c, 0);
}
public final void setCloseEndCardTracker(String str) {
InterfaceC0322kd d;
C0172ad c0172ad;
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f5).a(str2, Wa.a(this, str2, "TAG", "setCloseEndCardTracker "));
}
InterfaceC0495x referenceContainer = getReferenceContainer();
if (!(referenceContainer instanceof A8) || str == null) {
return;
}
A8 a8 = (A8) referenceContainer;
a8.getClass();
Intrinsics.checkNotNullParameter(str, "url");
InterfaceC0239f5 interfaceC0239f52 = a8.W;
if (interfaceC0239f52 != null) {
String str3 = a8.X;
((C0254g5) interfaceC0239f52).c(str3, AbstractC0315k6.a(str3, "TAG", "Setting close end tracker with URL : ", str));
}
View videoContainerView = a8.getVideoContainerView();
if (videoContainerView instanceof M8) {
Object tag = ((M8) videoContainerView).getVideoView().getTag();
C8 c8 = tag instanceof C8 ? (C8) tag : null;
if (c8 == null || (d = c8.d()) == null || (c0172ad = ((C0307jd) d).j) == null) {
return;
}
C0462u8 c0462u8 = new C0462u8(str, 0, "closeEndCard", null);
Intrinsics.checkNotNullParameter(c0462u8, "tracker");
c0172ad.f.add(c0462u8);
}
}
public final void setConfiguredArea(long j) {
this.e0 = getWidth() * getHeight();
}
public final void setContentURL(String str) {
this.c0 = str;
}
public void setCreativeId(String str) {
this.M = str;
}
public final void setDisableBackButton(boolean z) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "setDisableBackButton "));
}
this.B = z;
}
public final void setEmbeddedBrowserJSCallbacks(S3 s3) {
this.p0 = s3;
}
public void setExitAnimation(int i) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "setExitAnimation "));
}
this.K = i;
}
public void setFriendlyViews(Map<View, ? extends FriendlyObstructionPurpose> map) {
this.Q = map;
}
@Override
public void setFullScreenActivityContext(Activity activity) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "setFullScreenActivityContext "));
}
this.k = new WeakReference(activity);
x();
if (this.e || activity == null) {
return;
}
Pd pd = this.y0;
if (pd != null) {
pd.a();
}
this.y0 = new Pd(activity, this.C0, this.i);
}
public final void setImmersiveMode(boolean z) {
this.H0 = z;
}
public void setImpressionId(String str) {
this.d = str;
}
public final void setLandingPageTelemetryControlInfoOnWebViewClient(C0446t6 c0446t6) {
U3 u3 = this.o0;
if (u3 == null) {
return;
}
u3.i = c0446t6;
u3.j = new C0405q6(c0446t6, u3);
}
public final void setLandingScheme(String str) {
Intrinsics.checkNotNullParameter(str, "<set-?>");
this.f = str;
}
public final void setMarkupTypeAdUnit(String str) {
Intrinsics.checkNotNullParameter(str, "<set-?>");
this.D0 = str;
}
public final void setOrientationProperties(K9 k9) {
Intrinsics.checkNotNullParameter(k9, "orientationProperties");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "setOrientationProperties "));
}
this.r0 = k9;
x();
}
public final void setPlacementId(long j) {
this.L = j;
}
public final void setPreloadView(boolean z) {
this.T = z;
}
public void setReferenceContainer(InterfaceC0495x interfaceC0495x) {
this.S = interfaceC0495x;
}
public final void setRenderViewEventListener(AbstractC0170ab abstractC0170ab) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "setRenderViewEventListener "));
}
this.m = abstractC0170ab;
}
public final void setScrollable(boolean z) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "setScrollable "));
}
setScrollContainer(z);
setVerticalScrollBarEnabled(z);
setHorizontalScrollBarEnabled(z);
}
public final void setShouldFireLandingPageBeacons(boolean z) {
this.x0 = z;
}
public void setTelemetryManagerMap(Map<String, S0> map) {
this.A0 = map;
}
public final void setUnloaded(boolean z) {
this.z0 = z;
}
public final void setUseCustomClose(boolean z) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "setUseCustomClose " + this + ' ' + z);
}
this.x = z;
}
public void setViewTouchTimestamp(long j) {
this.g = j;
}
public final void setWatermark(final WatermarkData watermarkData) {
Intrinsics.checkNotNullParameter(watermarkData, "watermarkData");
if (getAdConfig().getWatermarkEnabled()) {
final byte[] decode = Base64.decode(watermarkData.getWatermarkBase64EncodedString(), 0);
Intrinsics.checkNotNullExpressionValue(decode, "decode(...)");
getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {
@Override
public final void onGlobalLayout() {
Ya.a(Ya.this, decode, watermarkData);
}
});
} else {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).c(str, "Watermark disabled from config. ignoring...");
}
}
}
@Override
public final void stopLoading() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "stopLoading "));
}
if (this.D.get()) {
return;
}
super.stopLoading();
}
public final void t() {
byte interstitialImpressionType;
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "setFallbackImpressionType "));
}
String adType = getAdType();
AdConfig adConfig = null;
if (Intrinsics.areEqual(adType, "banner")) {
AdConfig adConfig2 = this.q;
if (adConfig2 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig2;
}
interstitialImpressionType = adConfig.getViewability().getBannerImpressionType();
} else if (Intrinsics.areEqual(adType, "audio")) {
AdConfig adConfig3 = this.q;
if (adConfig3 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig3;
}
interstitialImpressionType = adConfig.getViewability().getAudioImpressionType();
} else {
AdConfig adConfig4 = this.q;
if (adConfig4 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
} else {
adConfig = adConfig4;
}
interstitialImpressionType = adConfig.getViewability().getInterstitialImpressionType();
}
this.j = interstitialImpressionType;
}
public final void u() {
InterfaceC0239f5 interfaceC0239f5;
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str = P0;
((C0254g5) interfaceC0239f52).a(str, Wa.a(this, str, "TAG", "stopTrackingExposure "));
}
I i = this.v0;
if (i != null) {
if (!i.i.compareAndSet(true, false)) {
InterfaceC0239f5 interfaceC0239f53 = i.d;
if (interfaceC0239f53 != null) {
((C0254g5) interfaceC0239f53).c("AdExposureTracker", "Exposure tracking is already stopped");
return;
}
return;
}
Throwable th = Result.exceptionOrNull-impl(AbstractC0526z2.a(new G(i)));
if (th == null || (interfaceC0239f5 = i.d) == null) {
return;
}
((C0254g5) interfaceC0239f5).b("AdExposureTracker", "Error stopping exposure tracking - " + th.getMessage());
}
}
public final void v() {
new C0498x2(this, !this.x, !this.A, this.i).a(this.M0);
}
public final void w() {
getListener().d(this);
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "ad dismissed");
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
((C0254g5) interfaceC0239f52).a();
}
C0354n0 c0354n0 = this.s0;
if (c0354n0 == null) {
Intrinsics.throwUninitializedPropertyAccessException("adQualityManager");
c0354n0 = null;
}
if (c0354n0.d.get()) {
c0354n0.a("session end is already triggered");
return;
}
if (!c0354n0.a.getEnabled()) {
c0354n0.a("config kill switch - false. ad quality will skip");
} else if (c0354n0.g == null) {
c0354n0.a("setup not done. ignore trigger");
} else {
c0354n0.d.set(true);
c0354n0.a(false);
}
}
public final void x() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "updateActivitiesOrientationProperties "));
}
InMobiAdActivity inMobiAdActivity = (Activity) this.k.get();
if (inMobiAdActivity == null || !(inMobiAdActivity instanceof InMobiAdActivity)) {
return;
}
K9 k9 = this.r0;
Intrinsics.checkNotNullParameter(k9, "orientationProperties");
R4 r42 = inMobiAdActivity.a;
if (r42 == null) {
Intrinsics.throwUninitializedPropertyAccessException("orientationHandler");
r42 = null;
}
r42.a(k9);
}
public final void y() {
((ScheduledThreadPoolExecutor) AbstractC0343m4.b.getValue()).execute(new Runnable() {
@Override
public final void run() {
Ya.c(Ya.this);
}
});
}
@Override
public final void e() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "disableHardwareAcceleration called. "));
}
try {
setLayerType(1, null);
} catch (Exception e) {
C0487w5 c0487w5 = C0487w5.a;
C0487w5.d.a(AbstractC0194c5.a(e, "event"));
}
}
public final void d(boolean z) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "processDisableCloseRegionRequest " + this + ' ' + z);
}
this.A = z;
v();
}
public final void a(String str, String str2, boolean z) {
Activity activity;
Intrinsics.checkNotNullParameter(str, "url");
Intrinsics.checkNotNullParameter(str2, "templateInfoStr");
try {
JSONObject jSONObject = new JSONObject(str2);
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f5).a(str3, "report - " + getAdType() + " type - sdk - " + Build.VERSION.SDK_INT);
}
if (Intrinsics.areEqual(getAdType(), "int") && Build.VERSION.SDK_INT >= 29 && (activity = (Activity) this.k.get()) != null) {
ScheduledExecutorService scheduledExecutorService = C0219e0.a;
C0219e0.a(activity, this, str, z, jSONObject, this.B0);
} else {
ScheduledExecutorService scheduledExecutorService2 = C0219e0.a;
C0219e0.a(this, this, str, z, jSONObject, this.B0);
}
} catch (Exception e) {
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f52).a(str4, "issue wile reporting ad", e);
}
}
}
@Override
public final boolean d() {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "canRedirectExternally Called");
}
return !getRenderingConfig().getAutoRedirectionEnforcement() || (getViewTouchTimestamp() != -1 && SystemClock.elapsedRealtime() - getViewTouchTimestamp() < getRenderingConfig().getUserTouchResetTime());
}
public final boolean e(java.lang.String r6) {
throw new UnsupportedOperationException("Method not decompiled: com.inmobi.media.Ya.e(java.lang.String):boolean");
}
public static void getAdType$annotations() {
}
public static void getCloseAssetArea$annotations() {
}
public static void getImpressionType$annotations() {
}
public static void getMarkupType$annotations() {
}
public static void getMarkupTypeAdUnit$annotations() {
}
public static void getPlacementType$annotations() {
}
public static void getViewState$annotations() {
}
public static void getWindowInsetListener$annotations() {
}
public static final void a(Ya ya) {
InterfaceC0239f5 interfaceC0239f5;
Intrinsics.checkNotNullParameter(ya, "this$0");
if (ya.isAttachedToWindow() || (interfaceC0239f5 = ya.i) == null) {
return;
}
((C0254g5) interfaceC0239f5).a();
}
public final void a(AbstractC0170ab abstractC0170ab, AdConfig adConfig) {
AdConfig adConfig2;
int otherNetworkLoadsLimit;
AdConfig adConfig3;
AdConfig adConfig4;
WebViewClient webViewClient;
Intrinsics.checkNotNullParameter(adConfig, "adConfig");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "initialize "));
}
if (Intrinsics.areEqual(this.D0, "htmlUrl")) {
getSettings().setMixedContentMode(2);
}
this.q = adConfig;
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f52).a(str2, Wa.a(this, str2, "TAG", "setImpressionParams "));
}
if (this.c == null) {
s();
} else {
try {
s();
for (Hc hc : this.c) {
if (hc.a == 2) {
if (hc.b.containsKey("type")) {
Object obj = hc.b.get("type");
Intrinsics.checkNotNull(obj, "null cannot be cast to non-null type kotlin.Int");
this.j = (byte) ((Integer) obj).intValue();
} else {
t();
}
if (hc.b.containsKey("time")) {
Object obj2 = hc.b.get("time");
Intrinsics.checkNotNull(obj2, "null cannot be cast to non-null type kotlin.Int");
this.i0 = ((Integer) obj2).intValue();
} else {
r();
}
if (hc.b.containsKey(ViewHierarchyConstants.VIEW_KEY)) {
Object obj3 = hc.b.get(ViewHierarchyConstants.VIEW_KEY);
Intrinsics.checkNotNull(obj3, "null cannot be cast to non-null type kotlin.Int");
this.j0 = ((Integer) obj3).intValue();
} else {
q();
}
if (this.j == 2) {
if (hc.b.containsKey("pixel")) {
Object obj4 = hc.b.get("pixel");
Intrinsics.checkNotNull(obj4, "null cannot be cast to non-null type kotlin.Int");
this.f0 = ((Integer) obj4).intValue();
} else {
t();
}
if (hc.b.containsKey("frame")) {
Object obj5 = hc.b.get("frame");
JSONArray jSONArray = obj5 instanceof JSONArray ? (JSONArray) obj5 : null;
if (jSONArray != null) {
this.d0 = new int[jSONArray.length()];
int length = jSONArray.length();
for (int i = 0; i < length; i++) {
int[] iArr = this.d0;
if (iArr != null) {
Object obj6 = jSONArray.get(i);
Intrinsics.checkNotNull(obj6, "null cannot be cast to non-null type kotlin.Int");
iArr[i] = ((Integer) obj6).intValue();
}
}
}
} else {
t();
}
}
}
}
} catch (JSONException unused) {
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f53).b(str3, "Exception in parsing the impressionType and pixel frame");
}
s();
} catch (Exception unused2) {
InterfaceC0239f5 interfaceC0239f54 = this.i;
if (interfaceC0239f54 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f54).b(str4, "SDK encountered an unexpected error in parsing impression parameters");
}
s();
}
}
this.m = abstractC0170ab;
ViewParent parent = getParent();
this.l = new WeakReference(parent instanceof ViewGroup ? (ViewGroup) parent : null);
setBackgroundColor(getRenderingConfig().getWebviewBackgroundColor());
new C0166a7(getMraidConfig().getUrl(), getMraidConfig().getMaxRetries(), getMraidConfig().getRetryInterval(), getMraidConfig().getExpiry(), this.i).a();
setImportantForAccessibility(2);
setScrollable(false);
int i2 = Build.VERSION.SDK_INT;
getSettings().setMediaPlaybackRequiresUserGesture(false);
getSettings().setJavaScriptEnabled(true);
getSettings().setDomStorageEnabled(getAdConfig().getRendering().getEnableDomStorage());
getSettings().setGeolocationEnabled(true);
if (this.e) {
InterfaceC0239f5 interfaceC0239f55 = this.i;
if (interfaceC0239f55 != null) {
String str5 = P0;
Intrinsics.checkNotNullExpressionValue(str5, "TAG");
((C0254g5) interfaceC0239f55).c(str5, "view is in-app browser. Using EmbeddedBrowserViewClient.");
}
U3 u3 = new U3("IN_CUSTOM_BROWSER", Ma.a, Na.a, this.i);
this.o0 = u3;
webViewClient = u3;
} else {
InterfaceC0239f5 interfaceC0239f56 = this.i;
if (interfaceC0239f56 != null) {
String str6 = P0;
Intrinsics.checkNotNullExpressionValue(str6, "TAG");
((C0254g5) interfaceC0239f56).c(str6, "view is ad. Using RenderViewClient");
}
Za za = new Za(this.O, this.i, new Oa(this));
String adType = getAdType();
if (Intrinsics.areEqual(adType, "banner")) {
AdConfig adConfig5 = this.q;
if (adConfig5 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig4 = null;
} else {
adConfig4 = adConfig5;
}
otherNetworkLoadsLimit = adConfig4.getRendering().getBannerNetworkLoadsLimit();
} else if (Intrinsics.areEqual(adType, "audio")) {
AdConfig adConfig6 = this.q;
if (adConfig6 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig3 = null;
} else {
adConfig3 = adConfig6;
}
otherNetworkLoadsLimit = adConfig3.getRendering().getAudioNetworkLoadsLimit();
} else {
AdConfig adConfig7 = this.q;
if (adConfig7 == null) {
Intrinsics.throwUninitializedPropertyAccessException("mAdConfig");
adConfig2 = null;
} else {
adConfig2 = adConfig7;
}
otherNetworkLoadsLimit = adConfig2.getRendering().getOtherNetworkLoadsLimit();
}
za.b = otherNetworkLoadsLimit;
webViewClient = za;
}
setWebViewClient(webViewClient);
if (this.e && getAdConfig().getEnableCookiesOnInAppBrowser()) {
CookieManager cookieManager = CookieManager.getInstance();
cookieManager.setAcceptCookie(true);
cookieManager.setAcceptThirdPartyCookies(this, true);
}
setWebChromeClient(this.K0);
if (!this.e) {
X5 x5 = new X5(this.b, this);
InterfaceC0239f5 interfaceC0239f57 = this.i;
if (interfaceC0239f57 != null) {
Intrinsics.checkNotNullParameter(interfaceC0239f57, "logger");
x5.d = interfaceC0239f57;
}
addJavascriptInterface(x5, "sdkController");
}
this.p = new C0241f7(this, this.i);
this.s0 = new C0354n0(adConfig.getAdQuality(), this.i);
if (i2 >= 29) {
setWebViewRenderProcessClient((ScheduledThreadPoolExecutor) AbstractC0343m4.b.getValue(), new C0215db(this.i, this.O));
}
}
@Override
public final boolean c() {
return this.D.get();
}
public final void c(String str) {
C0245fb c0245fb = this.O;
if (c0245fb != null) {
c0245fb.b();
}
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f5).a(str2, Wa.a(this, str2, "TAG", "loadDataInWebView "));
}
this.G = false;
if (this.D.get()) {
return;
}
Intrinsics.checkNotNull(str);
loadDataWithBaseURL("", str, "text/html", "UTF-8", null);
}
public static final void c(Ya ya) {
Intrinsics.checkNotNullParameter(ya, "this$0");
synchronized (ya.n) {
try {
if (Intrinsics.areEqual("Loading", ya.o)) {
InterfaceC0239f5 interfaceC0239f5 = ya.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "updateWebViewLoaded " + ya);
}
ya.getListener().f(ya);
ya.setAndUpdateViewState("Default");
InterfaceC0239f5 interfaceC0239f52 = ya.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f52).a(str2, "updateWebViewLoaded state changed to " + ya.o);
}
}
Unit unit = Unit.INSTANCE;
} catch (Throwable th) {
throw th;
}
}
}
public final void b(final String str) {
Intrinsics.checkNotNullParameter(str, "js");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str2 = P0;
Intrinsics.checkNotNullExpressionValue(str2, "TAG");
((C0254g5) interfaceC0239f5).c(str2, "injectJavaScript " + this + " - " + str);
}
Intrinsics.checkNotNullParameter(str, "value");
new Handler(getContainerContext().getMainLooper()).postAtFrontOfQueue(new Runnable() {
@Override
public final void run() {
Ya.a(Ya.this, str);
}
});
}
public final void b(String str, String str2) {
Intrinsics.checkNotNullParameter(str2, "url");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str3 = P0;
((C0254g5) interfaceC0239f5).a(str3, Wa.a(this, str3, "TAG", "processMediaPlaybackRequest "));
}
if (this.z0) {
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f52).b(str4, "Media playback is not allowed after unload! Ignoring request ...");
return;
}
return;
}
if (1 != this.b) {
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str5 = P0;
Intrinsics.checkNotNullExpressionValue(str5, "TAG");
((C0254g5) interfaceC0239f53).b(str5, "Media playback is only supported on full screen ads! Ignoring request ...");
return;
}
return;
}
Activity activity = (Activity) this.k.get();
if (activity == null) {
InterfaceC0239f5 interfaceC0239f54 = this.i;
if (interfaceC0239f54 != null) {
String str6 = P0;
Intrinsics.checkNotNullExpressionValue(str6, "TAG");
((C0254g5) interfaceC0239f54).b(str6, "Media playback is not allowed before it is visible! Ignoring request ...");
}
a(str, "Media playback is not allowed before it is visible! Ignoring request ...", "playVideo");
return;
}
C0241f7 c0241f7 = this.p;
if (c0241f7 != null) {
c0241f7.a(str2, activity);
}
}
public static final void b(Ya ya) {
Intrinsics.checkNotNullParameter(ya, "this$0");
ya.getListener().j(ya);
}
public final void b(String str, String str2, String str3) {
Intrinsics.checkNotNullParameter(str2, "contentId");
Intrinsics.checkNotNullParameter(str3, "url");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str4 = P0;
((C0254g5) interfaceC0239f5).c(str4, Wa.a(this, str4, "TAG", "processSaveContentRequest "));
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str5 = P0;
Intrinsics.checkNotNullExpressionValue(str5, "TAG");
((C0254g5) interfaceC0239f52).a(str5, "saveContent called: content ID: " + str2 + "; URL: " + str3);
}
if (!e("saveContent")) {
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str6 = P0;
Intrinsics.checkNotNullExpressionValue(str6, "TAG");
((C0254g5) interfaceC0239f53).b(str6, "saveContent called despite the fact that it is not supported");
}
JSONObject jSONObject = new JSONObject();
try {
jSONObject.put("url", str3);
jSONObject.put("reason", 7);
} catch (JSONException unused) {
}
String jSONObject2 = jSONObject.toString();
Intrinsics.checkNotNullExpressionValue(jSONObject2, "toString(...)");
a(str, "sendSaveContentResult(\"saveContent_" + str2 + "\", 'failed', \"" + StringsKt.replace$default(jSONObject2, "\"", "\\\"", false, 4, (Object) null) + "\");");
return;
}
HashSet hashSet = new HashSet();
hashSet.add(new C0534za((byte) -1, str3));
String uuid = UUID.randomUUID().toString();
Intrinsics.checkNotNullExpressionValue(uuid, "toString(...)");
C0308k c0308k = new C0308k(uuid, hashSet, this.L0, str2, 2);
c0308k.c = str;
C0413r1.a(c0308k);
}
public final void b(boolean z) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).c(str, Wa.a(this, str, "TAG", "fireNextAdShowComplete "));
}
String str2 = "window.imraidview.broadcastEvent('adShowSuccess'," + z + ");";
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f52).a(str3, str2 + " Index: " + getCurrentRenderingPodAdIndex());
}
b(str2);
}
@Override
public final void a(byte b, Map map) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).a(str, "fireEvent " + this + " 2");
}
}
@Override
public final void a(String str) {
Intrinsics.checkNotNullParameter(str, "mraidApi");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f5).a(str2, Wa.a(this, str2, "TAG", "sendFraudBeaconAndTelemetryEvent "));
}
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f52).a(str3, "fireDetectAutoRedirectFraud " + this + ' ' + str);
}
b("window.mraidview.fireRedirectFraudBeacon('" + str + "')");
String adType = getAdType();
if (adType == null) {
adType = "banner";
}
InterfaceC0239f5 interfaceC0239f53 = this.i;
if (interfaceC0239f53 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f53).c(str4, "sendTelemetryForAutoRedirectFraud " + this + ' ' + str + ' ' + adType);
}
HashMap hashMap = new HashMap();
String creativeId = getCreativeId();
if (creativeId != null) {
hashMap.put(ImpressionData.IMPRESSION_DATA_KEY_CREATIVE_ID, creativeId);
}
hashMap.put("trigger", str);
String impressionId = getImpressionId();
if (impressionId != null) {
hashMap.put("impressionId", impressionId);
}
hashMap.put("adType", adType);
InterfaceC0239f5 interfaceC0239f54 = this.i;
if (interfaceC0239f54 != null) {
String str5 = P0;
((C0254g5) interfaceC0239f54).a(str5, Wa.a(this, str5, "TAG", "processTelemetryEvent "));
}
getListener().a("BlockAutoRedirection", hashMap);
}
public final void a(boolean z) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "fireNextAdLoadComplete "));
}
String str2 = "window.imraidview.broadcastEvent('adLoadSuccess'," + z + ");";
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f52).c(str3, str2 + " Index: " + getCurrentRenderingPodAdIndex());
}
b(str2);
}
public final void a(String str, String str2, String str3) {
Intrinsics.checkNotNullParameter(str2, "message");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f5).a(str4, "fireError " + this + " - " + str2 + " - " + str3);
}
if (str == null || str3 == null) {
return;
}
a(str, "broadcastEvent('error',\"" + str2 + "\", \"" + str3 + "\")");
}
public final void a(String str, String str2) {
Intrinsics.checkNotNullParameter(str2, "callback");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str3 = P0;
((C0254g5) interfaceC0239f5).a(str3, Wa.a(this, str3, "TAG", "fireJavaScriptCallback "));
}
if (str == null) {
return;
}
b(str + '.' + str2);
}
public static final void a(Ya ya, String str) {
Intrinsics.checkNotNullParameter(ya, "this$0");
Intrinsics.checkNotNullParameter(str, "$js");
try {
if (ya.D.get()) {
return;
}
String str2 = "javascript:try{" + str + "}catch(e){}";
InterfaceC0239f5 interfaceC0239f5 = ya.i;
if (interfaceC0239f5 != null) {
String str3 = P0;
Intrinsics.checkNotNullExpressionValue(str3, "TAG");
((C0254g5) interfaceC0239f5).a(str3, "Injecting javascript");
}
InterfaceC0239f5 interfaceC0239f52 = ya.i;
if (interfaceC0239f52 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f52).c(str4, "evaluateScript " + ya);
}
ya.evaluateJavascript(str2, null);
} catch (Exception e) {
InterfaceC0239f5 interfaceC0239f53 = ya.i;
if (interfaceC0239f53 != null) {
String str5 = P0;
((C0254g5) interfaceC0239f53).b(str5, Ed.a(e, AbstractC0300j6.a(str5, "TAG", "SDK encountered an unexpected error injecting JavaScript in the Ad container; ")));
}
}
}
@Override
public final void a() {
Z z;
Activity fullScreenActivity;
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "dismissCurrentViewContainer "));
}
C0241f7 c0241f7 = this.p;
if (c0241f7 != null) {
V6 v6 = c0241f7.c;
if (v6 != null) {
v6.b();
}
c0241f7.c = null;
}
if (Intrinsics.areEqual("Default", this.o)) {
setAndUpdateViewState("Hidden");
ViewParent parent = getParent();
if (1 == this.b) {
InterfaceC0239f5 interfaceC0239f52 = this.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f52).a(str2, Wa.a(this, str2, "TAG", "finishFullScreenActivity "));
}
SparseArray sparseArray = InMobiAdActivity.k;
Intrinsics.checkNotNullParameter(this, "container");
InMobiAdActivity.k.remove(hashCode());
if (getFullScreenActivity() != null) {
Z z2 = this.V;
if (z2 == null || !z2.a(this)) {
InMobiAdActivity fullScreenActivity2 = getFullScreenActivity();
Intrinsics.checkNotNull(fullScreenActivity2, "null cannot be cast to non-null type com.inmobi.ads.rendering.InMobiAdActivity");
fullScreenActivity2.e = true;
Activity fullScreenActivity3 = getFullScreenActivity();
if (fullScreenActivity3 != null) {
fullScreenActivity3.finish();
}
if (this.K != -1 && (fullScreenActivity = getFullScreenActivity()) != null) {
fullScreenActivity.overridePendingTransition(0, this.K);
}
}
} else {
if (Intrinsics.areEqual("Default", this.o)) {
setAndUpdateViewState("Hidden");
}
w();
}
} else if (parent instanceof ViewGroup) {
((ViewGroup) parent).removeAllViews();
}
}
if (this.z != qd.c || (z = this.V) == null) {
return;
}
z.a(this, getFullScreenActivity());
}
@Override
public final void a(I9 i9) {
Intrinsics.checkNotNullParameter(i9, b9.h.n);
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "onOrientationUpdate "));
}
}
public static final boolean a(Ya ya, JsResult jsResult) {
InterfaceC0239f5 interfaceC0239f5 = ya.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(ya, str, "TAG", "shouldRenderPopup "));
}
if (ya.getRenderingConfig().shouldRenderPopup()) {
return true;
}
jsResult.cancel();
InterfaceC0239f5 interfaceC0239f52 = ya.i;
if (interfaceC0239f52 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f52).a(str2, Wa.a(ya, str2, "TAG", "firePopupBlockedEvent "));
}
ya.b("window.mraidview.popupBlocked('popupBlocked')");
return false;
}
public static final void a(Ya ya, String str, String str2, String str3) {
InterfaceC0239f5 interfaceC0239f5 = ya.i;
if (interfaceC0239f5 != null) {
String str4 = P0;
Intrinsics.checkNotNullExpressionValue(str4, "TAG");
((C0254g5) interfaceC0239f5).a(str4, "onUserLandingInitialized " + ya + " isInAppBrowser: " + ya.e);
}
ya.b("window.imraid.broadcastEvent('onUserLandingInitialized');");
if (str2 == null) {
return;
}
ya.a(str2, "broadcastEvent('" + str + "Successful','" + str3 + "');");
}
public final void a(JSONObject jSONObject) {
Intrinsics.checkNotNullParameter(jSONObject, "jsonObject");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
((C0254g5) interfaceC0239f5).a(str, Wa.a(this, str, "TAG", "onCTLifeCycleEvent "));
}
b("window.imraid.broadcastEvent('onCTLifeCycleEvent', " + jSONObject + ");");
}
public final void a(String str, Map map) {
Intrinsics.checkNotNullParameter(str, "trackerName");
Intrinsics.checkNotNullParameter(map, "macros");
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str2 = P0;
((C0254g5) interfaceC0239f5).a(str2, Wa.a(this, str2, "TAG", "fireLandingPageTracker "));
}
getListener().a(this, str, map);
}
public final void a(boolean z, short s) {
InterfaceC0239f5 interfaceC0239f5 = this.i;
if (interfaceC0239f5 != null) {
String str = P0;
Intrinsics.checkNotNullExpressionValue(str, "TAG");
((C0254g5) interfaceC0239f5).c(str, "fireRenderProcessGoneTelemetry");
}
C0245fb c0245fb = this.O;
if (c0245fb != null) {
Map mutableMapOf = MapsKt.mutableMapOf(new Pair[]{TuplesKt.to(ShareConstants.FEED_SOURCE_PARAM, "render_view_" + c0245fb.a.a.b()), TuplesKt.to("isCrashed", Boolean.valueOf(z)), TuplesKt.to(ImpressionData.IMPRESSION_DATA_KEY_CREATIVE_ID, c0245fb.a.f), TuplesKt.to(IronSourceConstants.EVENTS_ERROR_CODE, Short.valueOf(s))});
C0291ic c0291ic = C0291ic.a;
C0291ic.b("WebViewRenderProcessGoneEvent", mutableMapOf, EnumC0351mc.a);
}
}
}