package com.ironsource.adqualitysdk.sdk.i; import android.content.Context; import android.graphics.Color; import android.os.Build; import android.os.Process; import android.os.SystemClock; import android.text.TextUtils; import android.view.Gravity; import android.view.KeyEvent; import android.view.View; import android.view.ViewConfiguration; import android.widget.ExpandableListView; import com.facebook.internal.FacebookRequestErrorClassification; import com.ironsource.adqualitysdk.sdk.IronSourceAdQuality; import java.util.Calendar; import org.json.JSONException; import org.json.JSONObject; /* loaded from: classes4.dex */ public class js { /* renamed from: ﱟ, reason: contains not printable characters */ private static int f2754 = 1; /* renamed from: ﻏ, reason: contains not printable characters */ private static int f2755; /* renamed from: ﻐ, reason: contains not printable characters */ private long f2758; /* renamed from: ヌ, reason: contains not printable characters */ private Context f2759; /* renamed from: メ, reason: contains not printable characters */ private al f2760; /* renamed from: k, reason: contains not printable characters */ private static char[] f2757 = {'l', 223, 231, 212, 207, 230, '9', 'r', 'n', 'f', 't', 229, 235, ':', 'l', ':', 'w', '6', 'n', 'i', 'd', 'h', '_', 193, 194, 188, 191, 188, 184, 192, '2', 'f', 'l', 'p', 'k', 'i', 'g', ';', 'r', 'q', '6', 'p', 'l', 'l', '\"', '[', 'r', 'p', 'p', 'I', '@', 'b', 'd', 'f', 'k', 'j', 'C', 'F', 'i', 'l', 'j', '@', 'B', 'b', 'j', 'j', '@', 'E', 'n', 'q', 'n', 'G', 'J', 'q', 'G', 'B', 'm', 'm', 'i', 'q'}; /* renamed from: ﻛ, reason: contains not printable characters */ private static int f2756 = 87; public js(Context context, al alVar, long j) { this.f2759 = context; this.f2760 = alVar; this.f2758 = j; new gi(context); } /* renamed from: ヌ */ public JSONObject mo931(JSONObject jSONObject, boolean z, boolean z2, boolean z3) throws JSONException { int tapTimeout; int keyRepeatTimeout; int longPressTimeout; JSONObject m3324 = jx.m3324(jSONObject == null ? new JSONObject() : jSONObject); m3324.put(m3275("\u0000\u0001\u0000\u0001\u0000\u0000", false, new int[]{0, 6, 119, 0}).intern(), this.f2760.m1064()); String m1070 = this.f2760.m1070(); if (!TextUtils.isEmpty(m1070)) { int i = f2754 + 49; f2755 = i % 128; m3324.put((i % 2 != 0 ? m3275("\u0000\u0001\u0000\u0000", true, new int[]{6, 4, 0, 3}) : m3275("\u0000\u0001\u0000\u0000", true, new int[]{6, 4, 0, 3})).intern(), m1070); } if (z2) { if (this.f2758 > 0) { int i2 = f2755 + 99; f2754 = i2 % 128; if (i2 % 2 == 0) { tapTimeout = 3244 >>> (ViewConfiguration.getTapTimeout() % 82); keyRepeatTimeout = (ViewConfiguration.getKeyRepeatTimeout() / 16) + 2; longPressTimeout = 3 >>> (ViewConfiguration.getLongPressTimeout() >> 51); } else { tapTimeout = 196 - (ViewConfiguration.getTapTimeout() >> 16); keyRepeatTimeout = 4 - (ViewConfiguration.getKeyRepeatTimeout() >> 16); longPressTimeout = (ViewConfiguration.getLongPressTimeout() >> 16) + 3; } m3324.put(m3276(true, "\u0007\ufff6\uffff\u0006", tapTimeout, keyRepeatTimeout, longPressTimeout).intern(), this.f2758); } m3324.put(m3276(true, "\ufff9\ufff7\u0006\u0006\u0005", ExpandableListView.getPackedPositionType(0L) + 193, Color.argb(0, 0, 0, 0) + 5, 1 - (ViewConfiguration.getScrollDefaultDelay() >> 16)).intern(), this.f2760.m1072()); m3324.put(m3276(false, "\ufffe\t\ufff9", (ViewConfiguration.getTouchSlop() >> 8) + 194, (ViewConfiguration.getKeyRepeatDelay() >> 16) + 3, 2 - (ViewConfiguration.getPressedStateDuration() >> 16)).intern(), this.f2760.m1061()); m3324.put(m3275("\u0000\u0001\u0001", false, new int[]{10, 3, 127, 2}).intern(), this.f2760.m1066()); m3324.put(m3275("\u0001\u0000", false, new int[]{13, 2, 0, 2}).intern(), this.f2760.m1075()); m3324.put(m3275("\u0000\u0000", true, new int[]{15, 2, 0, 1}).intern(), Calendar.getInstance().getTimeZone().getRawOffset() / 3600000.0d); m3324.put(m3276(true, "\t■\u0007\u000b", 192 - (ViewConfiguration.getJumpTapTimeout() >> 16), 4 - TextUtils.indexOf((CharSequence) "", '0', 0, 0), 5 - (Process.myTid() >> 22)).intern(), IronSourceAdQuality.getSDKVersion()); m3324.put(m3276(false, "\u0000", ((byte) KeyEvent.getModifierMetaStateMask()) + 204, 1 - Gravity.getAbsoluteGravity(0, 0), (SystemClock.elapsedRealtime() > 0L ? 1 : (SystemClock.elapsedRealtime() == 0L ? 0 : -1))).intern(), jt.m3280()); m3324.put(m3275("\u0001\u0000\u0001\u0001\u0001", false, new int[]{17, 5, 0, 5}).intern(), Build.MODEL); m3324.put(m3276(true, "\n\u0003\ufff6\u0002\u0007\ufffa\u0007\n\t\ufff8\ufff6\ufffb", (ViewConfiguration.getScrollFriction() > 0.0f ? 1 : (ViewConfiguration.getScrollFriction() == 0.0f ? 0 : -1)) + 193, 12 - TextUtils.indexOf("", ""), KeyEvent.normalizeMetaState(0) + 4).intern(), Build.MANUFACTURER); m3324.put(m3275("\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0000", true, new int[]{22, 8, 82, 0}).intern(), m3275("\u0000\u0001\u0000\u0001\u0000\u0000\u0001", true, new int[]{30, 7, 0, 0}).intern()); m3324.put(m3275("\u0000\u0001\u0000", false, new int[]{37, 3, 0, 1}).intern(), ju.m3305()); jt.m3278(this.f2759, m3324); ju.m3296(this.f2759, m3324); ju.m3298(this.f2759, m3324, z3); ju.m3300(m3324); ju.m3303(m3324); m3324.put(m3276(false, "\uffff\b\ufff2\u0007", 197 - Process.getGidForName(""), TextUtils.indexOf((CharSequence) "", '0') + 5, 4 - ExpandableListView.getPackedPositionGroup(0L)).intern(), z); ju.m3291(this.f2759, m3324); ju.m3292(m3324); try { JSONObject jSONObject2 = new JSONObject(this.f2760.m1063()); if (jSONObject2.length() > 0) { m3324.putOpt(m3275("\u0001\u0001\u0000\u0000", false, new int[]{40, 4, 0, 0}).intern(), jSONObject2); } int i3 = f2754 + 7; f2755 = i3 % 128; int i4 = i3 % 2; } catch (Exception e) { l.m3428(m3276(true, "\u0012\r\u0002\u0005\ufffa\u000e↑�ᅳ\u000b\b\r\ufffa\u000b\ufffe\u0007\ufffe¢\r\f\ufffe\u000e\n\ufffe→", View.combineMeasuredStates(0, 0) + FacebookRequestErrorClassification.EC_INVALID_TOKEN, 25 - (ViewConfiguration.getMaximumFlingVelocity() >> 16), 8 - TextUtils.indexOf((CharSequence) "", '0', 0, 0)).intern(), m3275("\u0001\u0001\u0000\u0001\u0001\u0000\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0001\u0000\u0001\u0001\u0001\u0000\u0001\u0001\u0001\u0001\u0000\u0001\u0000\u0001\u0000\u0000\u0001\u0001\u0001\u0001\u0001\u0001\u0000", false, new int[]{44, 36, 0, 0}).intern(), e); } } int i5 = f2755 + 89; f2754 = i5 % 128; int i6 = i5 % 2; return m3324; } /* renamed from: ﻛ, reason: contains not printable characters */ public final al m3277() { int i = f2754; int i2 = i + 3; f2755 = i2 % 128; int i3 = i2 % 2; al alVar = this.f2760; int i4 = i + 97; f2755 = i4 % 128; int i5 = i4 % 2; return alVar; } /* renamed from: ﻛ, reason: contains not printable characters */ private static String m3275(String str, boolean z, int[] iArr) { String str2; byte[] bArr = str; if (str != null) { bArr = str.getBytes("ISO-8859-1"); } byte[] bArr2 = bArr; synchronized (g.f2033) { try { int i = iArr[0]; int i2 = iArr[1]; int i3 = iArr[2]; int i4 = iArr[3]; char[] cArr = new char[i2]; System.arraycopy(f2757, i, cArr, 0, i2); if (bArr2 != null) { char[] cArr2 = new char[i2]; g.f2032 = 0; char c = 0; while (true) { int i5 = g.f2032; if (i5 >= i2) { break; } if (bArr2[i5] == 1) { cArr2[i5] = (char) (((cArr[i5] << 1) + 1) - c); } else { cArr2[i5] = (char) ((cArr[i5] << 1) - c); } c = cArr2[i5]; g.f2032 = i5 + 1; } cArr = cArr2; } if (i4 > 0) { char[] cArr3 = new char[i2]; System.arraycopy(cArr, 0, cArr3, 0, i2); int i6 = i2 - i4; System.arraycopy(cArr3, 0, cArr, i6, i4); System.arraycopy(cArr3, i4, cArr, 0, i6); } if (z) { char[] cArr4 = new char[i2]; g.f2032 = 0; while (true) { int i7 = g.f2032; if (i7 >= i2) { break; } cArr4[i7] = cArr[(i2 - i7) - 1]; g.f2032 = i7 + 1; } cArr = cArr4; } if (i3 > 0) { g.f2032 = 0; while (true) { int i8 = g.f2032; if (i8 >= i2) { break; } cArr[i8] = (char) (cArr[i8] - iArr[2]); g.f2032 = i8 + 1; } } str2 = new String(cArr); } catch (Throwable th) { throw th; } } return str2; } /* renamed from: ﻛ, reason: contains not printable characters */ private static String m3276(boolean z, String str, int i, int i2, int i3) { String str2; char[] cArr = str; if (str != null) { cArr = str.toCharArray(); } char[] cArr2 = cArr; synchronized (a.f57) { try { char[] cArr3 = new char[i2]; a.f56 = 0; while (true) { int i4 = a.f56; if (i4 >= i2) { break; } a.f54 = cArr2[i4]; cArr3[a.f56] = (char) (a.f54 + i); int i5 = a.f56; cArr3[i5] = (char) (cArr3[i5] - f2756); a.f56 = i5 + 1; } if (i3 > 0) { a.f55 = i3; char[] cArr4 = new char[i2]; System.arraycopy(cArr3, 0, cArr4, 0, i2); int i6 = a.f55; System.arraycopy(cArr4, 0, cArr3, i2 - i6, i6); int i7 = a.f55; System.arraycopy(cArr4, i7, cArr3, 0, i2 - i7); } if (z) { char[] cArr5 = new char[i2]; a.f56 = 0; while (true) { int i8 = a.f56; if (i8 >= i2) { break; } cArr5[i8] = cArr3[(i2 - i8) - 1]; a.f56 = i8 + 1; } cArr3 = cArr5; } str2 = new String(cArr3); } catch (Throwable th) { throw th; } } return str2; } }