CrackMe.apk

Download file
    package expo.modules.kotlin.functions;

import androidx.autofill.HintConstants;
import com.facebook.react.bridge.Dynamic;
import com.facebook.react.bridge.ReadableArray;
import com.facebook.react.bridge.ReadableType;
import expo.modules.kotlin.AppContext;
import expo.modules.kotlin.ReadableArrayIterator;
import expo.modules.kotlin.ReadableArrayIteratorKt;
import expo.modules.kotlin.exception.ArgumentCastException;
import expo.modules.kotlin.exception.CodedException;
import expo.modules.kotlin.exception.InvalidArgsNumberException;
import expo.modules.kotlin.exception.UnexpectedException;
import expo.modules.kotlin.jni.ExpectedType;
import expo.modules.kotlin.jni.JavaScriptModuleObject;
import expo.modules.kotlin.types.AnyType;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.collections.ArraysKt;
import kotlin.collections.IndexedValue;
import kotlin.jvm.internal.ArrayIteratorKt;
import kotlin.jvm.internal.Intrinsics;
import kotlin.reflect.KType;

@Metadata(d1 = {"\u0000J\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\u0011\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\b\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0000\b&\u0018\u00002\u00020\u0001B\u001b\u0012\u0006\u0010\u0002\u001a\u00020\u0003\u0012\f\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005¢\u0006\u0002\u0010\u0007J\u001d\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0015\u001a\u00020\u0016H ¢\u0006\u0002\b\u0017J\u001f\u0010\u0018\u001a\f\u0012\b\b\u0001\u0012\u0004\u0018\u00010\u00010\u00052\u0006\u0010\u0019\u001a\u00020\u001aH\u0004¢\u0006\u0002\u0010\u001bJ'\u0010\u0018\u001a\f\u0012\b\b\u0001\u0012\u0004\u0018\u00010\u00010\u00052\u000e\u0010\u0019\u001a\n\u0012\u0006\u0012\u0004\u0018\u00010\u00010\u0005H\u0004¢\u0006\u0002\u0010\u001cJ\f\u0010\u001d\u001a\b\u0012\u0004\u0012\u00020\u001f0\u001eR\u0014\u0010\b\u001a\u00020\t8@X€\u0004¢\u0006\u0006\u001a\u0004\b\n\u0010\u000bR\u001c\u0010\u0004\u001a\b\u0012\u0004\u0012\u00020\u00060\u0005X„\u0004¢\u0006\n\n\u0002\u0010\u000e\u001a\u0004\b\f\u0010\rR\u0014\u0010\u0002\u001a\u00020\u0003X„\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u000f\u0010\u0010¨\u0006 "}, d2 = {"Lexpo/modules/kotlin/functions/AnyFunction;", "", "name", "", "desiredArgsTypes", "", "Lexpo/modules/kotlin/types/AnyType;", "(Ljava/lang/String;[Lexpo/modules/kotlin/types/AnyType;)V", "argsCount", "", "getArgsCount$expo_modules_core_release", "()I", "getDesiredArgsTypes", "()[Lexpo/modules/kotlin/types/AnyType;", "[Lexpo/modules/kotlin/types/AnyType;", "getName", "()Ljava/lang/String;", "attachToJSObject", "", "appContext", "Lexpo/modules/kotlin/AppContext;", "jsObject", "Lexpo/modules/kotlin/jni/JavaScriptModuleObject;", "attachToJSObject$expo_modules_core_release", "convertArgs", "args", "Lcom/facebook/react/bridge/ReadableArray;", "(Lcom/facebook/react/bridge/ReadableArray;)[Ljava/lang/Object;", "([Ljava/lang/Object;)[Ljava/lang/Object;", "getCppRequiredTypes", "", "Lexpo/modules/kotlin/jni/ExpectedType;", "expo-modules-core_release"}, k = 1, mv = {1, 6, 0}, xi = 48)
/* compiled from: AnyFunction.kt */
public abstract class AnyFunction {
    private final AnyType[] desiredArgsTypes;
    private final String name;

    public abstract void attachToJSObject$expo_modules_core_release(AppContext appContext, JavaScriptModuleObject javaScriptModuleObject);

    public AnyFunction(String str, AnyType[] anyTypeArr) {
        Intrinsics.checkNotNullParameter(str, HintConstants.AUTOFILL_HINT_NAME);
        Intrinsics.checkNotNullParameter(anyTypeArr, "desiredArgsTypes");
        this.name = str;
        this.desiredArgsTypes = anyTypeArr;
    }

    /* access modifiers changed from: protected */
    public final String getName() {
        return this.name;
    }

    /* access modifiers changed from: protected */
    public final AnyType[] getDesiredArgsTypes() {
        return this.desiredArgsTypes;
    }

    public final int getArgsCount$expo_modules_core_release() {
        return this.desiredArgsTypes.length;
    }

    /* access modifiers changed from: protected */
    public final Object[] convertArgs(ReadableArray readableArray) throws CodedException {
        Intrinsics.checkNotNullParameter(readableArray, "args");
        if (this.desiredArgsTypes.length == readableArray.size()) {
            int length = this.desiredArgsTypes.length;
            Object[] objArr = new Object[length];
            for (int i = 0; i < length; i++) {
                objArr[i] = null;
            }
            ReadableArrayIterator it = ReadableArrayIteratorKt.iterator(readableArray);
            for (IndexedValue indexedValue : ArraysKt.withIndex((T[]) this.desiredArgsTypes)) {
                int component1 = indexedValue.component1();
                AnyType anyType = (AnyType) indexedValue.component2();
                Dynamic next = it.next();
                try {
                    objArr[component1] = anyType.convert(next);
                    Unit unit = Unit.INSTANCE;
                    Unit unit2 = Unit.INSTANCE;
                    next.recycle();
                } catch (CodedException e) {
                    KType kType = anyType.getKType();
                    ReadableType type = next.getType();
                    Intrinsics.checkNotNullExpressionValue(type, SessionDescription.ATTR_TYPE);
                    throw new ArgumentCastException(kType, component1, type, e);
                } catch (expo.modules.core.errors.CodedException e2) {
                    String code = e2.getCode();
                    Intrinsics.checkNotNullExpressionValue(code, "e.code");
                    CodedException codedException = new CodedException(code, e2.getMessage(), e2.getCause());
                    KType kType2 = anyType.getKType();
                    ReadableType type2 = next.getType();
                    Intrinsics.checkNotNullExpressionValue(type2, SessionDescription.ATTR_TYPE);
                    throw new ArgumentCastException(kType2, component1, type2, codedException);
                } catch (Throwable th) {
                    next.recycle();
                    throw th;
                }
            }
            return objArr;
        }
        throw new InvalidArgsNumberException(readableArray.size(), this.desiredArgsTypes.length);
    }

    /* access modifiers changed from: protected */
    public final Object[] convertArgs(Object[] objArr) throws CodedException {
        Intrinsics.checkNotNullParameter(objArr, "args");
        AnyType[] anyTypeArr = this.desiredArgsTypes;
        if (anyTypeArr.length == objArr.length) {
            int length = anyTypeArr.length;
            Object[] objArr2 = new Object[length];
            for (int i = 0; i < length; i++) {
                objArr2[i] = null;
            }
            Iterator it = ArrayIteratorKt.iterator(objArr);
            for (IndexedValue indexedValue : ArraysKt.withIndex((T[]) this.desiredArgsTypes)) {
                int component1 = indexedValue.component1();
                AnyType anyType = (AnyType) indexedValue.component2();
                try {
                    objArr2[component1] = anyType.convert(it.next());
                    Unit unit = Unit.INSTANCE;
                } catch (CodedException e) {
                    throw new ArgumentCastException(anyType.getKType(), component1, ReadableType.String, e);
                } catch (expo.modules.core.errors.CodedException e2) {
                    String code = e2.getCode();
                    Intrinsics.checkNotNullExpressionValue(code, "e.code");
                    throw new ArgumentCastException(anyType.getKType(), component1, ReadableType.String, new CodedException(code, e2.getMessage(), e2.getCause()));
                } catch (Throwable th) {
                    throw new ArgumentCastException(anyType.getKType(), component1, ReadableType.String, new UnexpectedException(th));
                }
            }
            return objArr2;
        }
        throw new InvalidArgsNumberException(objArr.length, this.desiredArgsTypes.length);
    }

    public final List<ExpectedType> getCppRequiredTypes() {
        AnyType[] anyTypeArr = this.desiredArgsTypes;
        Collection arrayList = new ArrayList(anyTypeArr.length);
        int length = anyTypeArr.length;
        int i = 0;
        while (i < length) {
            AnyType anyType = anyTypeArr[i];
            i++;
            arrayList.add(anyType.getCppRequiredTypes());
        }
        return (List) arrayList;
    }
}
    
Download file