CrackMe.apk
Download file
package kotlin.text;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import kotlin.Metadata;
import kotlin.collections.CollectionsKt;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.Intrinsics;
import kotlin.sequences.SequencesKt;
@Metadata(d1 = {"\u0000\u001e\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\b\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\b\u000b\u001a!\u0010\u0000\u001a\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00020\u00012\u0006\u0010\u0003\u001a\u00020\u0002H\u0002¢\u0006\u0002\b\u0004\u001a\u0011\u0010\u0005\u001a\u00020\u0006*\u00020\u0002H\u0002¢\u0006\u0002\b\u0007\u001a\u0014\u0010\b\u001a\u00020\u0002*\u00020\u00022\b\b\u0002\u0010\u0003\u001a\u00020\u0002\u001aJ\u0010\t\u001a\u00020\u0002*\b\u0012\u0004\u0012\u00020\u00020\n2\u0006\u0010\u000b\u001a\u00020\u00062\u0012\u0010\f\u001a\u000e\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u00020\u00012\u0014\u0010\r\u001a\u0010\u0012\u0004\u0012\u00020\u0002\u0012\u0006\u0012\u0004\u0018\u00010\u00020\u0001H\b¢\u0006\u0002\b\u000e\u001a\u0014\u0010\u000f\u001a\u00020\u0002*\u00020\u00022\b\b\u0002\u0010\u0010\u001a\u00020\u0002\u001a\u001e\u0010\u0011\u001a\u00020\u0002*\u00020\u00022\b\b\u0002\u0010\u0010\u001a\u00020\u00022\b\b\u0002\u0010\u0012\u001a\u00020\u0002\u001a\n\u0010\u0013\u001a\u00020\u0002*\u00020\u0002\u001a\u0014\u0010\u0014\u001a\u00020\u0002*\u00020\u00022\b\b\u0002\u0010\u0012\u001a\u00020\u0002¨\u0006\u0015"}, d2 = {"getIndentFunction", "Lkotlin/Function1;", "", "indent", "getIndentFunction$StringsKt__IndentKt", "indentWidth", "", "indentWidth$StringsKt__IndentKt", "prependIndent", "reindent", "", "resultSizeEstimate", "indentAddFunction", "indentCutFunction", "reindent$StringsKt__IndentKt", "replaceIndent", "newIndent", "replaceIndentByMargin", "marginPrefix", "trimIndent", "trimMargin", "kotlin-stdlib"}, k = 5, mv = {1, 6, 0}, xi = 49, xs = "kotlin/text/StringsKt")
/* compiled from: Indent.kt */
class StringsKt__IndentKt extends StringsKt__AppendableKt {
public static /* synthetic */ String trimMargin$default(String str, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str2 = "|";
}
return StringsKt.trimMargin(str, str2);
}
public static final String trimMargin(String str, String str2) {
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(str2, "marginPrefix");
return StringsKt.replaceIndentByMargin(str, "", str2);
}
public static /* synthetic */ String replaceIndentByMargin$default(String str, String str2, String str3, int i, Object obj) {
if ((i & 1) != 0) {
str2 = "";
}
if ((i & 2) != 0) {
str3 = "|";
}
return StringsKt.replaceIndentByMargin(str, str2, str3);
}
public static final String replaceIndentByMargin(String str, String str2, String str3) {
int i;
String invoke;
String str4 = str;
String str5 = str3;
Intrinsics.checkNotNullParameter(str4, "<this>");
Intrinsics.checkNotNullParameter(str2, "newIndent");
Intrinsics.checkNotNullParameter(str5, "marginPrefix");
if (!StringsKt.isBlank(str5)) {
List<String> lines = StringsKt.lines(str4);
int length = str.length() + (str2.length() * lines.size());
Function1<String, String> indentFunction$StringsKt__IndentKt = getIndentFunction$StringsKt__IndentKt(str2);
int lastIndex = CollectionsKt.getLastIndex(lines);
Collection arrayList = new ArrayList();
int i2 = 0;
for (Object next : lines) {
int i3 = i2 + 1;
if (i2 < 0) {
CollectionsKt.throwIndexOverflow();
}
String str6 = (String) next;
String str7 = null;
if ((i2 == 0 || i2 == lastIndex) && StringsKt.isBlank(str6)) {
str6 = null;
} else {
CharSequence charSequence = str6;
int length2 = charSequence.length();
int i4 = 0;
while (true) {
if (i4 >= length2) {
i = -1;
break;
} else if (!CharsKt.isWhitespace(charSequence.charAt(i4))) {
i = i4;
break;
} else {
i4++;
}
}
if (i != -1) {
int i5 = i;
if (StringsKt.startsWith$default(str6, str3, i, false, 4, (Object) null)) {
str7 = str6.substring(i5 + str3.length());
Intrinsics.checkNotNullExpressionValue(str7, "this as java.lang.String).substring(startIndex)");
}
}
if (!(str7 == null || (invoke = indentFunction$StringsKt__IndentKt.invoke(str7)) == null)) {
str6 = invoke;
}
}
if (str6 != null) {
arrayList.add(str6);
}
i2 = i3;
}
String sb = ((StringBuilder) CollectionsKt.joinTo$default((List) arrayList, new StringBuilder(length), "\n", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) null, 124, (Object) null)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "mapIndexedNotNull { inde…\"\\n\")\n .toString()");
return sb;
}
throw new IllegalArgumentException("marginPrefix must be non-blank string.".toString());
}
public static final String trimIndent(String str) {
Intrinsics.checkNotNullParameter(str, "<this>");
return StringsKt.replaceIndent(str, "");
}
public static /* synthetic */ String replaceIndent$default(String str, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str2 = "";
}
return StringsKt.replaceIndent(str, str2);
}
public static final String replaceIndent(String str, String str2) {
String invoke;
String str3 = str;
Intrinsics.checkNotNullParameter(str3, "<this>");
Intrinsics.checkNotNullParameter(str2, "newIndent");
List<String> lines = StringsKt.lines(str3);
Iterable iterable = lines;
Collection arrayList = new ArrayList();
for (Object next : iterable) {
if (!StringsKt.isBlank((String) next)) {
arrayList.add(next);
}
}
Iterable<String> iterable2 = (List) arrayList;
Collection arrayList2 = new ArrayList(CollectionsKt.collectionSizeOrDefault(iterable2, 10));
for (String indentWidth$StringsKt__IndentKt : iterable2) {
arrayList2.add(Integer.valueOf(indentWidth$StringsKt__IndentKt(indentWidth$StringsKt__IndentKt)));
}
Integer num = (Integer) CollectionsKt.minOrNull((List) arrayList2);
int i = 0;
int intValue = num != null ? num.intValue() : 0;
int length = str.length() + (str2.length() * lines.size());
Function1<String, String> indentFunction$StringsKt__IndentKt = getIndentFunction$StringsKt__IndentKt(str2);
int lastIndex = CollectionsKt.getLastIndex(lines);
Collection arrayList3 = new ArrayList();
for (Object next2 : iterable) {
int i2 = i + 1;
if (i < 0) {
CollectionsKt.throwIndexOverflow();
}
String str4 = (String) next2;
if ((i == 0 || i == lastIndex) && StringsKt.isBlank(str4)) {
str4 = null;
} else {
String drop = StringsKt.drop(str4, intValue);
if (!(drop == null || (invoke = indentFunction$StringsKt__IndentKt.invoke(drop)) == null)) {
str4 = invoke;
}
}
if (str4 != null) {
arrayList3.add(str4);
}
i = i2;
}
String sb = ((StringBuilder) CollectionsKt.joinTo$default((List) arrayList3, new StringBuilder(length), "\n", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) null, 124, (Object) null)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "mapIndexedNotNull { inde…\"\\n\")\n .toString()");
return sb;
}
public static /* synthetic */ String prependIndent$default(String str, String str2, int i, Object obj) {
if ((i & 1) != 0) {
str2 = " ";
}
return StringsKt.prependIndent(str, str2);
}
public static final String prependIndent(String str, String str2) {
Intrinsics.checkNotNullParameter(str, "<this>");
Intrinsics.checkNotNullParameter(str2, "indent");
return SequencesKt.joinToString$default(SequencesKt.map(StringsKt.lineSequence(str), new StringsKt__IndentKt$prependIndent$1(str2)), "\n", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) null, 62, (Object) null);
}
private static final int indentWidth$StringsKt__IndentKt(String str) {
CharSequence charSequence = str;
int length = charSequence.length();
int i = 0;
while (true) {
if (i >= length) {
i = -1;
break;
} else if (!CharsKt.isWhitespace(charSequence.charAt(i))) {
break;
} else {
i++;
}
}
return i == -1 ? str.length() : i;
}
private static final Function1<String, String> getIndentFunction$StringsKt__IndentKt(String str) {
if (str.length() == 0) {
return StringsKt__IndentKt$getIndentFunction$1.INSTANCE;
}
return new StringsKt__IndentKt$getIndentFunction$2(str);
}
private static final String reindent$StringsKt__IndentKt(List<String> list, int i, Function1<? super String, String> function1, Function1<? super String, String> function12) {
String invoke;
int lastIndex = CollectionsKt.getLastIndex(list);
Collection arrayList = new ArrayList();
int i2 = 0;
for (Object next : list) {
int i3 = i2 + 1;
if (i2 < 0) {
CollectionsKt.throwIndexOverflow();
}
String str = (String) next;
if ((i2 == 0 || i2 == lastIndex) && StringsKt.isBlank(str)) {
str = null;
} else {
String invoke2 = function12.invoke(str);
if (!(invoke2 == null || (invoke = function1.invoke(invoke2)) == null)) {
str = invoke;
}
}
if (str != null) {
arrayList.add(str);
}
i2 = i3;
}
String sb = ((StringBuilder) CollectionsKt.joinTo$default((List) arrayList, new StringBuilder(i), "\n", (CharSequence) null, (CharSequence) null, 0, (CharSequence) null, (Function1) null, 124, (Object) null)).toString();
Intrinsics.checkNotNullExpressionValue(sb, "mapIndexedNotNull { inde…\"\\n\")\n .toString()");
return sb;
}
}
Download file