Wallkin v1.86859532693版本的 MD5 值为:c3099a56aae2c3706b2239994117cc3a
以下内容为反编译后的 d.java 源代码,内容仅作参考
package com.joaomgcd.taskerm.helper.actions;
import android.app.Activity;
import android.content.Context;
import android.location.Location;
import android.os.Bundle;
import android.widget.EditText;
import android.widget.Spinner;
import com.joaomgcd.taskerm.action.system.bb;
import com.joaomgcd.taskerm.dialog.ac;
import com.joaomgcd.taskerm.dialog.ae;
import com.joaomgcd.taskerm.location.MapType;
import com.joaomgcd.taskerm.settings.ai;
import com.joaomgcd.taskerm.util.al;
import com.joaomgcd.taskerm.util.an;
import com.joaomgcd.taskerm.util.ao;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import net.danlew.android.joda.R;
import net.dinglisch.android.taskerm.ActionEdit;
import net.dinglisch.android.taskerm.bg;
import net.dinglisch.android.taskerm.ft;
public final class d extends com.joaomgcd.taskerm.helper.i<com.joaomgcd.taskerm.action.a<?, ? extends com.joaomgcd.taskerm.helper.actions.c<?>, ?>, net.dinglisch.android.taskerm.c, net.dinglisch.android.taskerm.m, com.joaomgcd.taskerm.action.e, ActionEdit> {
static final c.j.g[] f7388a = {c.f.b.x.a(new c.f.b.v(c.f.b.x.a(d.class), "javaNameHints", "getJavaNameHints()Lio/reactivex/Single;"))};
private final c.e f7389c;
public static final class p extends c.f.b.l implements c.f.a.b<String, String> {
public static final p f7439a = new p();
p() {
super(1);
}
@Override
public final String invoke(String str) {
c.f.b.k.b(str, "it");
return str;
}
}
private final b.a.l<HashMap<String, String>> y() {
c.e eVar = this.f7389c;
c.j.g gVar = f7388a[0];
return (b.a.l) eVar.b();
}
public static final class aa extends c.f.b.l implements c.f.a.r<Integer, String, String, c.f.a.a<? extends String>, e> {
final x f7394b;
aa(x xVar) {
super(4);
this.f7394b = xVar;
}
@Override
public e a(Integer num, String str, String str2, c.f.a.a<? extends String> aVar) {
return a(num.intValue(), str, str2, (c.f.a.a<String>) aVar);
}
public static e a(aa aaVar, int i, String str, String str2, c.f.a.a aVar, int i2, Object obj) {
if ((i2 & 1) != 0) {
str = aaVar.f7394b.a(i);
}
return aaVar.a(i, str, str2, aVar);
}
public final e a(int i, String str, String str2, c.f.a.a<String> aVar) {
c.f.b.k.b(str, "title");
c.f.b.k.b(aVar, "inputHandler");
return new e(d.this, str, aVar, str2);
}
}
public static final class ab extends c.f.b.l implements c.f.a.r<Integer, String, String, Map<String, ? extends String>, g> {
final List f7396b;
final w f7397c;
ab(List list, w wVar) {
super(4);
this.f7396b = list;
this.f7397c = wVar;
}
@Override
public g a(Integer num, String str, String str2, Map<String, ? extends String> map) {
return a(num.intValue(), str, str2, (Map<String, String>) map);
}
public static g a(ab abVar, int i, String str, String str2, Map map, int i2, Object obj) {
if ((i2 & 1) != 0) {
str = null;
}
if ((i2 & 2) != 0) {
str2 = abVar.f7397c.a(i);
}
if ((i2 & 4) != 0) {
map = null;
}
return abVar.a(i, str, str2, map);
}
public final g a(int i, String str, String str2, Map<String, String> map) {
c.f.b.k.b(str2, "title");
return new g(d.this, str2, str, this.f7396b, d.this.d(), map);
}
}
public static final class h extends c.f.b.l implements c.f.a.b<String, c.s> {
h() {
super(1);
}
@Override
public c.s invoke(String str) {
a(str);
return c.s.f2131a;
}
public final void a(String str) {
c.f.b.k.b(str, "taskName");
((ActionEdit) d.this.d()).a(0, str);
}
}
public static final class i extends c.f.b.l implements c.f.a.b<ae<ft>, c.s> {
final h f7426a;
i(h hVar) {
super(1);
this.f7426a = hVar;
}
@Override
public c.s invoke(ae<ft> aeVar) {
a(aeVar);
return c.s.f2131a;
}
public final void a(ae<ft> aeVar) {
String m;
c.f.b.k.b(aeVar, "it");
ft b2 = aeVar.b();
if (b2 == null || (m = b2.m()) == null) {
return;
}
this.f7426a.a(m);
}
}
public static final class k extends c.f.b.l implements c.f.a.a<c.s> {
final String f7430a;
final ActionEdit f7431b;
final int f7432c;
k(String str, ActionEdit actionEdit, int i) {
super(0);
this.f7430a = str;
this.f7431b = actionEdit;
this.f7432c = i;
}
@Override
public c.s invoke() {
a();
return c.s.f2131a;
}
public final void a() {
com.joaomgcd.taskerm.location.h d2 = com.joaomgcd.taskerm.location.a.a(this.f7431b, new com.joaomgcd.taskerm.location.b(null, true, com.joaomgcd.taskerm.location.h.f7942a.a(this.f7430a), MapType.Hybrid, 1, null)).b().d();
if (d2 != null) {
Location a2 = d2.a();
ActionEdit actionEdit = this.f7431b;
int i = this.f7432c;
StringBuilder sb = new StringBuilder();
sb.append(a2.getLatitude());
sb.append(',');
sb.append(a2.getLongitude());
sb.append(',');
sb.append(d2.f());
actionEdit.a(i, sb.toString());
}
}
}
public static final class w extends c.f.b.l implements c.f.a.b<Integer, String> {
w() {
super(1);
}
@Override
public String invoke(Integer num) {
return a(num.intValue());
}
public final String a(int i) {
return an.a(i, (Context) d.this.d(), new Object[0]);
}
}
public static final class x extends c.f.b.l implements c.f.a.b<Integer, String> {
x() {
super(1);
}
@Override
public String invoke(Integer num) {
return a(num.intValue());
}
public final String a(int i) {
return an.a((int) R.string.array_option, (Context) d.this.d(), an.a(i, (Context) d.this.d(), new Object[0]));
}
}
public static final class y extends c.f.b.l implements c.f.a.m<Integer, String, c> {
final x f7455b;
y(x xVar) {
super(2);
this.f7455b = xVar;
}
@Override
public c invoke(Integer num, String str) {
return a(num.intValue(), str);
}
public final c a(int i, String str) {
c.f.b.k.b(str, "expression");
return new c(d.this, this.f7455b.a(i), str);
}
}
public d(ActionEdit actionEdit) {
super(actionEdit);
c.f.b.k.b(actionEdit, "activity");
this.f7389c = c.f.a(new j(actionEdit));
}
@Override
public com.joaomgcd.taskerm.action.e g() {
return com.joaomgcd.taskerm.action.d.a();
}
@Override
public com.joaomgcd.taskerm.helper.l<net.dinglisch.android.taskerm.c, ?, ActionEdit> a(ActionEdit actionEdit, com.joaomgcd.taskerm.action.a<?, ? extends com.joaomgcd.taskerm.helper.actions.c<?>, ?> aVar) {
c.f.b.k.b(actionEdit, "receiver$0");
c.f.b.k.b(aVar, "configurable");
return aVar.a((com.joaomgcd.taskerm.action.a<?, ? extends com.joaomgcd.taskerm.helper.actions.c<?>, ?>) actionEdit);
}
public final void r(int i2) {
d(i2);
}
public final boolean s(int i2) {
return e(i2);
}
public final boolean t(int i2) {
return j(i2);
}
public final void a(Spinner[] spinnerArr, EditText[] editTextArr) {
c.f.b.k.b(spinnerArr, "argSpinners");
c.f.b.k.b(editTextArr, "argEditTextViews");
com.joaomgcd.taskerm.helper.h.a(this, spinnerArr, editTextArr, true, null, 8, null);
}
public final void i(int i2, int i3) {
boolean z2 = i3 == 123;
int a2 = ai.a((Context) d());
String str = "localhost";
if (!z2) {
com.joaomgcd.taskerm.helper.l<net.dinglisch.android.taskerm.c, ?, ActionEdit> e2 = e();
bb bbVar = (bb) (e2 != null ? e2.j() : null);
if (bbVar != null) {
a2 = bbVar.getPortNotNull(d());
str = ao.A(bbVar.getHostNotNull());
if (str == null) {
str = "localhost";
}
}
}
((ActionEdit) d()).a(i2, com.joaomgcd.taskerm.dialog.y.a((Activity) d(), a2, str, z2, (com.joaomgcd.taskerm.b.d) null, 16, (Object) null));
}
public final void u(int i2) {
ActionEdit actionEdit = (ActionEdit) d();
com.joaomgcd.taskerm.rx.h.c(new k(actionEdit.e(i2), actionEdit, i2));
}
public final Integer[] w() {
com.joaomgcd.taskerm.helper.l<net.dinglisch.android.taskerm.c, ?, ActionEdit> e2 = e();
if (e2 != null) {
return e2.e();
}
return null;
}
@Override
public c.s a(net.dinglisch.android.taskerm.c cVar, String str) {
c.f.b.k.b(cVar, "hasArgs");
c(cVar.i(), str);
return super.a((d) cVar, str);
}
private final void c(int i2, String str) {
if (i2 != 130) {
return;
}
String str2 = str;
if ((str2 == null || str2.length() == 0) || an.a(an.a((int) R.string.an_run_task, (Context) d(), new Object[0]), str)) {
return;
}
ArrayList<ft> b2 = ((ActionEdit) d()).e().b(-2, ft.c.Alpha);
c.f.b.k.a((Object) b2, "allTasks");
ArrayList arrayList = new ArrayList();
for (Object obj : b2) {
ft ftVar = (ft) obj;
c.f.b.k.a((Object) ftVar, "it");
if (an.a(ftVar.m(), str)) {
arrayList.add(obj);
}
}
ArrayList arrayList2 = arrayList;
if (arrayList2.isEmpty()) {
return;
}
h hVar = new h();
if (arrayList2.size() != 1) {
b.a.l a2 = com.joaomgcd.taskerm.dialog.y.a((Activity) d(), ((ActionEdit) d()).e(), (String) null, (List) arrayList2, false, 16, (Object) null);
if (a2 != null) {
com.joaomgcd.taskerm.rx.h.a(a2, (Context) d(), new i(hVar));
return;
}
return;
}
Object obj2 = arrayList2.get(0);
c.f.b.k.a(obj2, "matchingTasks[0]");
String m2 = ((ft) obj2).m();
c.f.b.k.a((Object) m2, "matchingTasks[0].name");
hVar.a(m2);
}
@Override
public String d(int i2, int i3) {
return net.dinglisch.android.taskerm.n.a(i2, i3);
}
@Override
public boolean h(int i2, int i3) {
if (i2 == 47 && an.a(Integer.valueOf(i3), 9, 10)) {
return true;
}
return net.dinglisch.android.taskerm.n.i(i2, i3);
}
public abstract class a {
final d f7390a;
private final String f7391b;
private final String f7392c;
public abstract String a(String str, String str2);
public abstract String b(String str);
public a(d dVar, String str, String str2) {
c.f.b.k.b(str, "title");
this.f7390a = dVar;
this.f7391b = str;
this.f7392c = str2;
}
public final String b() {
return this.f7391b;
}
public final String a() {
String a2;
String str = this.f7392c;
if (str == null || (a2 = c.l.n.a(str, "<", "<", false, 4, (Object) null)) == null) {
return null;
}
return c.l.n.a(a2, ">", ">", false, 4, (Object) null);
}
public final String a(String str) {
c.f.b.k.b(str, "varName");
return a(b(str), str);
}
}
public abstract class b extends a {
final d f7410b;
public b(d dVar, String str, String str2) {
super(dVar, str, str2);
c.f.b.k.b(str, "title");
this.f7410b = dVar;
}
@Override
public String a(String str, String str2) {
String b2;
c.f.b.k.b(str2, "varName");
b2 = com.joaomgcd.taskerm.helper.actions.e.b(str, str2);
return b2;
}
}
public final String a(String str, Context context) {
String str2;
if (str == null) {
return an.a((int) R.string.show_variable_value, context, new Object[0]);
}
if (str.length() > 20) {
StringBuilder sb = new StringBuilder();
String substring = str.substring(0, 19);
c.f.b.k.a((Object) substring, "(this as java.lang.Strin…ing(startIndex, endIndex)");
sb.append(substring);
sb.append("…");
str2 = sb.toString();
} else {
str2 = str;
}
if (!(str2.length() == 0)) {
str = str2;
}
String a2 = an.a((int) R.string.sn_variable_value, context, new Object[0]);
return "<b>" + a2 + "</b>: " + str;
}
public final class f extends b {
final d f7419c;
public Void c(String str) {
c.f.b.k.b(str, "varName");
return null;
}
public f(d dVar, Context context, String str) {
super(dVar, dVar.a(str, context), null);
c.f.b.k.b(context, "context");
this.f7419c = dVar;
}
@Override
public String b(String str) {
return (String) c(str);
}
}
public final class c extends b {
final d f7411c;
private final String f7412d;
public c(d dVar, String str, String str2) {
super(dVar, str, str2);
c.f.b.k.b(str, "title");
c.f.b.k.b(str2, "expression");
this.f7411c = dVar;
this.f7412d = str2;
}
@Override
public String b(String str) {
c.f.b.k.b(str, "varName");
return this.f7412d;
}
}
public final class C0173d extends b {
final d f7413c;
private final int f7414d;
private final Integer f7415e;
private final String f7416f;
private final List<String> g;
private final boolean h;
private final boolean i;
private final Activity j;
private final c.f.a.b<String, String> k;
public C0173d(d dVar, String str, String str2, String str3, List<String> list, boolean z, boolean z2, Activity activity, c.f.a.b<? super String, String> bVar) {
super(dVar, str, str3);
c.f.b.k.b(str, "title");
c.f.b.k.b(activity, "activity");
c.f.b.k.b(bVar, "inputHandler");
this.f7413c = dVar;
this.f7416f = str2;
this.g = list;
this.h = z;
this.i = z2;
this.j = activity;
this.k = bVar;
this.f7414d = this.h ? 20 : 4;
this.f7415e = this.i ? 3 : null;
}
@Override
public String b(String str) {
b.a.l a2;
boolean z;
c.f.b.k.b(str, "varName");
Activity activity = this.j;
com.joaomgcd.taskerm.util.k kVar = new com.joaomgcd.taskerm.util.k(b());
String str2 = this.f7416f;
a2 = com.joaomgcd.taskerm.dialog.y.a(activity, kVar, (r13 & 4) != 0 ? null : str2 != null ? new com.joaomgcd.taskerm.util.k(str2) : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : Integer.valueOf(this.f7414d), (r13 & 32) != 0 ? null : this.f7415e, (r13 & 64) != 0 ? null : this.i ? null : this.g);
String str3 = (String) a2.b();
if (this.i) {
c.f.b.k.a((Object) str3, "fromInput");
List<String> b2 = c.l.n.b((CharSequence) str3, new String[]{","}, false, 0, 6, (Object) null);
ArrayList arrayList = new ArrayList(c.a.j.a((Iterable) b2, 10));
for (String str4 : b2) {
arrayList.add(c.l.n.c(str4));
}
ArrayList arrayList2 = arrayList;
boolean z2 = false;
if (!(arrayList2 instanceof Collection) || !arrayList2.isEmpty()) {
Iterator it = arrayList2.iterator();
while (true) {
if (!it.hasNext()) {
break;
}
if (((Integer) it.next()) == null) {
z = true;
continue;
} else {
z = false;
continue;
}
if (z) {
z2 = true;
break;
}
}
}
if (z2) {
String str5 = "Invalid input " + str3 + ". Must be numeric.";
ao.b(str5, this.j);
throw new RuntimeException(str5);
}
}
c.f.a.b<String, String> bVar = this.k;
c.f.b.k.a((Object) str3, "fromInput");
return bVar.invoke(str3);
}
}
public final class e extends b {
final d f7417c;
private final c.f.a.a<String> f7418d;
public e(d dVar, String str, c.f.a.a<String> aVar, String str2) {
super(dVar, str, str2);
c.f.b.k.b(str, "title");
c.f.b.k.b(aVar, "inputHandler");
this.f7417c = dVar;
this.f7418d = aVar;
}
@Override
public String b(String str) {
c.f.b.k.b(str, "varName");
return this.f7418d.invoke();
}
}
public final class g extends a {
final d f7420b;
private final String f7421c;
private final List<String> f7422d;
private final Activity f7423e;
private final Map<String, String> f7424f;
public g(d dVar, String str, String str2, List<String> list, Activity activity, Map<String, String> map) {
super(dVar, str, null);
c.f.b.k.b(str, "title");
c.f.b.k.b(activity, "activity");
this.f7420b = dVar;
this.f7421c = str2;
this.f7422d = list;
this.f7423e = activity;
this.f7424f = map;
}
@Override
public String b(String str) {
b.a.l a2;
c.f.b.k.b(str, "varName");
Activity activity = this.f7423e;
com.joaomgcd.taskerm.util.k kVar = new com.joaomgcd.taskerm.util.k(b());
String str2 = this.f7421c;
a2 = com.joaomgcd.taskerm.dialog.y.a(activity, kVar, (r13 & 4) != 0 ? null : str2 != null ? new com.joaomgcd.taskerm.util.k(str2) : null, (r13 & 8) != 0 ? null : null, (r13 & 16) != 0 ? null : 4, (r13 & 32) != 0 ? null : null, (r13 & 64) != 0 ? null : this.f7422d);
String str3 = (String) a2.b();
c.f.b.k.a((Object) str3, "fromInput");
return str3;
}
@Override
public String a(String str, String str2) {
String str3;
c.f.b.k.b(str2, "varName");
String str4 = str;
if (str4 == null || str4.length() == 0) {
return null;
}
if (this.f7424f != null) {
String str5 = str;
for (c.k kVar : c.a.z.d(this.f7424f)) {
str5 = str5 != null ? c.l.n.a(str5, (String) kVar.a(), (String) kVar.b(), false, 4, (Object) null) : null;
}
str3 = str5;
} else {
str3 = str;
}
String str6 = str2 + '[' + str3 + ']';
if (com.joaomgcd.taskerm.dialog.y.a(new com.joaomgcd.taskerm.dialog.h(this.f7423e, ao.D(b()), an.b((int) R.string.get_first_or_multiple, this.f7423e), an.b((int) R.string.first, this.f7423e), an.b((int) R.string.ml_multiple, this.f7423e), null, false, 4, null, 0, null, null, null, 8032, null)).b().e()) {
str6 = (String) this.f7420b.a(str6, true, this.f7422d).b();
}
if (((com.joaomgcd.taskerm.dialog.x) com.joaomgcd.taskerm.dialog.y.a(this.f7423e, (int) R.string.learn_more, (int) R.string.want_to_learn_more_about_structure_reading, (com.joaomgcd.taskerm.util.i) null, 8, (Object) null).b()).d()) {
al.a((Context) this.f7423e, "https://tasker.joaoapps.com/userguide/en/variables.html#json", true, false, true, 4, (Object) null);
}
return str6;
}
}
public final b.a.l<String> a(String str, String str2, List<String> list) {
return a(str, false, list);
}
public final b.a.l<String> a(String str, boolean z2, List<String> list) {
String str2 = str;
if (str2 == null || str2.length() == 0) {
b.a.l<String> a2 = b.a.l.a("");
c.f.b.k.a((Object) a2, "Single.just(\"\")");
return a2;
}
String a3 = ((ActionEdit) d()).i.a(str);
l lVar = new l(a3);
w wVar = new w();
x xVar = new x();
y yVar = new y(xVar);
z zVar = new z(list, xVar);
aa aaVar = new aa(xVar);
ab abVar = new ab(list, wVar);
ArrayList arrayList = new ArrayList();
if (!z2) {
if (a3 != null) {
arrayList.addAll(c.a.j.a(lVar.invoke()));
}
arrayList.addAll(c.a.j.b(ab.a(abVar, R.string.json_get_value, wVar.a(R.string.json_structure_key_to_get), null, null, 6, null), ab.a(abVar, R.string.html_xml_get_value, wVar.a(R.string.html_xml_structure_key_to_get), null, an.a((Map) com.joaomgcd.taskerm.l.a.f7871a.a()), 2, null), ab.a(abVar, R.string.csv_get_value, wVar.a(R.string.csv_structure_key_to_get), null, null, 6, null)));
}
ac acVar = new ac(list);
ad adVar = new ad(list, acVar);
m mVar = new m(adVar);
n nVar = new n(aaVar, adVar);
arrayList.addAll(c.a.j.b(yVar.a(R.string.pl_count, "#"), yVar.a(R.string.all_elements_seperated_commas, ""), z.a(zVar, R.string.join_elements_with_given_characters, wVar.a(R.string.which_characters_use_as_variable_joiner), null, "+", true, false, o.f7438a, 18, null), z.a(zVar, R.string.element_with_a_given_index, wVar.a(R.string.element_index), null, "x", false, true, p.f7439a, 10, null), n.a(nVar, R.string.multiple_elements_with_given_indexes, R.string.multiple_indexes_separate_comma, "x,y,z", true, null, 8, null), aa.a(aaVar, R.string.values_of_matching_elements, null, "$?", m.a(mVar, null, 1, null), 1, null), aa.a(aaVar, R.string.values_of_regex_matching_elements, null, "$?~R", mVar.invoke("~R"), 1, null), z.a(zVar, R.string.indexes_of_matching_elements, wVar.a(R.string.expression_to_match), null, "#?", false, false, q.f7440a, 26, null), z.a(zVar, R.string.indexes_of_regex_matching_elements, wVar.a(R.string.regex_to_match), null, "#?~R", false, false, r.f7441a, 26, null), yVar.a(R.string.random_element_from_array, "*"), yVar.a(R.string.first_defined_element, ">"), yVar.a(R.string.last_defined_element, "<"), yVar.a(R.string.index_of_first_defined_element, "#>"), yVar.a(R.string.index_of_last_defined_element, "#<"), nVar.a(R.string.elements_starting_at_given_index, R.string.index_of_start_element, "x:", true, s.f7442a), nVar.a(R.string.elements_ending_at_given_index, R.string.index_of_end_element, ":x", true, t.f7443a), aa.a(aaVar, R.string.elements_with_indexes_between_2_numbers, null, "x:y", new u(acVar), 1, null)));
return b(new v(str, arrayList));
}
public static final class l extends c.f.b.l implements c.f.a.a<f> {
final String f7434b;
l(String str) {
super(0);
this.f7434b = str;
}
@Override
public final f invoke() {
return new f(d.this, d.this.d(), this.f7434b);
}
}
public static final class z extends c.f.b.l implements c.f.a.u<Integer, String, String, String, Boolean, Boolean, c.f.a.b<? super String, ? extends String>, C0173d> {
final List f7457b;
final x f7458c;
z(List list, x xVar) {
super(7);
this.f7457b = list;
this.f7458c = xVar;
}
public static C0173d a(z zVar, int i, String str, String str2, String str3, boolean z, boolean z2, c.f.a.b bVar, int i2, Object obj) {
return zVar.a(i, (i2 & 1) != 0 ? null : str, (i2 & 2) != 0 ? zVar.f7458c.a(i) : str2, str3, (i2 & 8) != 0 ? false : z, (i2 & 16) != 0 ? false : z2, bVar);
}
public final C0173d a(int i, String str, String str2, String str3, boolean z, boolean z2, c.f.a.b<? super String, String> bVar) {
c.f.b.k.b(str2, "title");
c.f.b.k.b(bVar, "inputHandler");
return new C0173d(d.this, str2, str, str3, this.f7457b, z, z2, d.this.d(), bVar);
}
}
public static final class ac extends c.f.b.l implements c.f.a.a<String> {
final List f7399b;
ac(List list) {
super(0);
this.f7399b = list;
}
public static final class AnonymousClass1 extends c.f.b.l implements c.f.a.a<String> {
AnonymousClass1() {
super(0);
}
@Override
public final String invoke() {
return (String) com.joaomgcd.taskerm.dialog.y.a((Activity) d.this.d(), (int) R.string.values_of_matching_elements, Integer.valueOf((int) R.string.optional_joiner_for_expression_matches), (com.joaomgcd.taskerm.util.i) null, (Integer) 20, (Integer) null, ac.this.f7399b, 40, (Object) null).b();
}
}
@Override
public final String invoke() {
String str = (String) an.a((c.f.a.b) null, new AnonymousClass1(), 1, (Object) null);
return str != null ? str : "";
}
}
public static final class ad extends c.f.b.l implements c.f.a.v<Integer, Integer, Boolean, String, String, String, Boolean, c.f.a.b<? super String, ? extends String>, c.f.a.a<? extends String>> {
final List f7402b;
final ac f7403c;
ad(List list, ac acVar) {
super(8);
this.f7402b = list;
this.f7403c = acVar;
}
public static final class AnonymousClass1 extends c.f.b.l implements c.f.a.a<String> {
final boolean f7405b;
final int f7406c;
final int f7407d;
final c.f.a.b f7408e;
final boolean f7409f;
final String g;
final String h;
final String i;
AnonymousClass1(boolean z, int i, int i2, c.f.a.b bVar, boolean z2, String str, String str2, String str3) {
super(0);
this.f7405b = z;
this.f7406c = i;
this.f7407d = i2;
this.f7408e = bVar;
this.f7409f = z2;
this.g = str;
this.h = str2;
this.i = str3;
}
@Override
public final String invoke() {
String str = (String) com.joaomgcd.taskerm.dialog.y.a((Activity) d.this.d(), this.f7406c, Integer.valueOf(this.f7407d), (com.joaomgcd.taskerm.util.i) null, (Integer) 4, this.f7405b ? 3 : null, ad.this.f7402b, 8, (Object) null).b();
String invoke = ad.this.f7403c.invoke();
if (this.f7408e != null) {
c.f.a.b bVar = this.f7408e;
c.f.b.k.a((Object) str, "expression");
str = (String) bVar.invoke(str);
}
if (!this.f7409f) {
if (invoke.length() == 0) {
StringBuilder sb = new StringBuilder();
String str2 = this.g;
if (str2 == null) {
str2 = "";
}
sb.append(str2);
sb.append(str);
return sb.toString();
}
}
StringBuilder sb2 = new StringBuilder();
sb2.append(this.h);
sb2.append(invoke);
sb2.append(this.i);
String str3 = this.g;
if (str3 == null) {
str3 = "";
}
sb2.append(str3);
sb2.append(str);
return sb2.toString();
}
}
public static c.f.a.a a(ad adVar, int i, int i2, boolean z, String str, String str2, String str3, boolean z2, c.f.a.b bVar, int i3, Object obj) {
return adVar.a(i, i2, z, (i3 & 8) != 0 ? null : str, str2, str3, z2, (i3 & 128) != 0 ? null : bVar);
}
public final c.f.a.a<String> a(int i, int i2, boolean z, String str, String str2, String str3, boolean z2, c.f.a.b<? super String, String> bVar) {
c.f.b.k.b(str2, "charStartJoiner");
c.f.b.k.b(str3, "charEndJoiner");
return new AnonymousClass1(z, i, i2, bVar, z2, str, str2, str3);
}
}
public static final class m extends c.f.b.l implements c.f.a.b<String, c.f.a.a<? extends String>> {
final ad f7435a;
m(ad adVar) {
super(1);
this.f7435a = adVar;
}
public static c.f.a.a a(m mVar, String str, int i, Object obj) {
if ((i & 1) != 0) {
str = null;
}
return mVar.invoke(str);
}
@Override
public final c.f.a.a<String> invoke(String str) {
return ad.a(this.f7435a, R.string.values_of_matching_elements, R.string.expression_to_match, false, str, "$", "?", true, null, 128, null);
}
}
public static final class n extends c.f.b.l implements c.f.a.s<Integer, Integer, String, Boolean, c.f.a.b<? super String, ? extends String>, e> {
final aa f7436a;
final ad f7437b;
n(aa aaVar, ad adVar) {
super(5);
this.f7436a = aaVar;
this.f7437b = adVar;
}
public static e a(n nVar, int i, int i2, String str, boolean z, c.f.a.b bVar, int i3, Object obj) {
c.f.a.b bVar2 = bVar;
if ((i3 & 8) != 0) {
bVar2 = null;
}
return nVar.a(i, i2, str, z, bVar2);
}
public final e a(int i, int i2, String str, boolean z, c.f.a.b<? super String, String> bVar) {
c.f.b.k.b(str, "functionIdentifier");
return aa.a(this.f7436a, i, null, str, this.f7437b.a(i, i2, z, null, "+", "+", false, bVar), 1, null);
}
}
public static final class o extends c.f.b.l implements c.f.a.b<String, String> {
public static final o f7438a = new o();
o() {
super(1);
}
@Override
public final String invoke(String str) {
c.f.b.k.b(str, "it");
return '+' + str;
}
}
public static final class q extends c.f.b.l implements c.f.a.b<String, String> {
public static final q f7440a = new q();
q() {
super(1);
}
@Override
public final String invoke(String str) {
c.f.b.k.b(str, "it");
return "#?" + str;
}
}
public static final class r extends c.f.b.l implements c.f.a.b<String, String> {
public static final r f7441a = new r();
r() {
super(1);
}
@Override
public final String invoke(String str) {
c.f.b.k.b(str, "it");
return "#?~R" + str;
}
}
public static final class s extends c.f.b.l implements c.f.a.b<String, String> {
public static final s f7442a = new s();
s() {
super(1);
}
@Override
public final String invoke(String str) {
c.f.b.k.b(str, "it");
return str + ':';
}
}
public static final class t extends c.f.b.l implements c.f.a.b<String, String> {
public static final t f7443a = new t();
t() {
super(1);
}
@Override
public final String invoke(String str) {
c.f.b.k.b(str, "it");
return ':' + str;
}
}
public static final class u extends c.f.b.l implements c.f.a.a<String> {
final ac f7445b;
u(ac acVar) {
super(0);
this.f7445b = acVar;
}
@Override
public final String invoke() {
String str = (String) com.joaomgcd.taskerm.dialog.y.a((Activity) d.this.d(), (int) R.string.index_of_start_element, (Integer) null, (com.joaomgcd.taskerm.util.i) null, (Integer) 4, (Integer) 2, (List) null, 76, (Object) null).b();
String str2 = (String) com.joaomgcd.taskerm.dialog.y.a((Activity) d.this.d(), (int) R.string.index_of_end_element, (Integer) null, (com.joaomgcd.taskerm.util.i) null, (Integer) 4, (Integer) 2, (List) null, 76, (Object) null).b();
String invoke = this.f7445b.invoke();
if (invoke.length() == 0) {
return str + ':' + str2;
}
return '+' + invoke + '+' + str + ':' + str2;
}
}
public static final class v extends c.f.b.l implements c.f.a.a<String> {
final String f7447b;
final ArrayList f7448c;
v(String str, ArrayList arrayList) {
super(0);
this.f7447b = str;
this.f7448c = arrayList;
}
public static final class b extends c.f.b.l implements c.f.a.b<a, com.joaomgcd.taskerm.dialog.w> {
public static final b f7451a = new b();
b() {
super(1);
}
@Override
public final com.joaomgcd.taskerm.dialog.w invoke(a aVar) {
String str;
c.f.b.k.b(aVar, "it");
String a2 = aVar.a();
String str2 = a2;
if (str2 == null || str2.length() == 0) {
str = aVar.b();
} else {
str = "<b>" + a2 + "</b> - " + aVar.b();
}
return new com.joaomgcd.taskerm.dialog.w(str, null, false, 6, null);
}
}
@Override
public final String invoke() {
String str;
a aVar = (a) ((ae) com.joaomgcd.taskerm.dialog.k.a(new com.joaomgcd.taskerm.dialog.ad(d.this.d(), an.a((int) R.string.variable_actions, (Context) d.this.d(), this.f7447b), this.f7448c, false, b.f7451a, null, null, true, true, null, null, null, null, null, null, null, null, 130656, null)).b()).b();
if (aVar == null || (str = (String) an.a((c.f.a.b) null, new a(aVar), 1, (Object) null)) == null) {
return "";
}
com.joaomgcd.taskerm.dialog.y.b((Activity) d.this.d(), (int) R.string.variable_expressions_not_all_variables).b();
return str;
}
public static final class a extends c.f.b.l implements c.f.a.a<String> {
final a f7450b;
a(a aVar) {
super(0);
this.f7450b = aVar;
}
@Override
public final String invoke() {
return this.f7450b.a(v.this.f7447b);
}
}
}
public static final class j extends c.f.b.l implements c.f.a.a<b.a.l<HashMap<String, String>>> {
final ActionEdit f7428b;
j(ActionEdit actionEdit) {
super(0);
this.f7428b = actionEdit;
}
public static final class AnonymousClass1 extends c.f.b.l implements c.f.a.a<HashMap<String, String>> {
AnonymousClass1() {
super(0);
}
@Override
public final HashMap<String, String> invoke() {
String[] stringArray;
HashMap<String, String> b2;
com.joaomgcd.taskerm.dialog.ac a2 = ac.a.a(com.joaomgcd.taskerm.dialog.ac.f6387a, d.this.u(), R.string.getting_java_references, false, 4, null);
try {
HashMap<String, String> hashMap = new HashMap<>();
Bundle bundle = j.this.f7428b.f10857b;
j.this.f7428b.e().a(d.this.u(), bundle != null ? bundle.getInt("tid") : -1, hashMap);
if (bundle != null && (stringArray = bundle.getStringArray("jos")) != null && (b2 = bg.b(stringArray)) != null) {
hashMap.putAll(b2);
}
return hashMap;
} finally {
com.joaomgcd.taskerm.dialog.ac.a(a2, null, 1, null);
}
}
}
@Override
public final b.a.l<HashMap<String, String>> invoke() {
return d.this.b(new AnonymousClass1()).a();
}
}
public final void a(com.joaomgcd.taskerm.util.b<HashMap<String, String>> bVar) {
c.f.b.k.b(bVar, "action");
b.a.l<HashMap<String, String>> y2 = y();
c.f.b.k.a((Object) y2, "javaNameHints");
a(y2, bVar);
}
public final boolean j(int i2, int i3) {
c.k<Integer, Integer> kVar = com.joaomgcd.taskerm.action.d.d().get(Integer.valueOf(i2));
if (kVar != null) {
c.f.b.k.a((Object) kVar, "actionsWithRootAndGlobal…tionCode] ?: return false");
if (i3 != kVar.a().intValue()) {
return false;
}
return !((ActionEdit) d()).g(kVar.b().intValue()).booleanValue();
}
return false;
}
public final void k(int i2, int i3) {
c.k<Integer, Integer> kVar = com.joaomgcd.taskerm.action.d.d().get(Integer.valueOf(i2));
if (kVar != null) {
c.f.b.k.a((Object) kVar, "actionsWithRootAndGlobal…ons[actionCode] ?: return");
if (i3 != kVar.b().intValue()) {
return;
}
((ActionEdit) d()).a(kVar.a().intValue());
}
}
public final void x() {
b(R.string.http_action_can_send_personal_data_info);
}
}