Warkop v5.73.0版本的 MD5 值为:a4330ec2d6f5e146f59fc7622f3cdb45
以下内容为反编译后的 TypeformFragment.java 源代码,内容仅作参考
package sinet.startup.inDriver.feature.photocontrol_brand.ui.typeform;
import aj2.p;
import android.content.Context;
import android.os.Bundle;
import android.view.View;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.view.a0;
import androidx.view.r0;
import androidx.view.u0;
import androidx.view.x0;
import bo.a;
import co.k;
import co.o;
import java.util.LinkedList;
import kotlin.Metadata;
import kotlin.jvm.internal.g0;
import kotlin.jvm.internal.p0;
import kotlin.jvm.internal.q;
import kotlin.jvm.internal.u;
import n91.w0;
import org.jetbrains.annotations.NotNull;
import qo.l;
import sinet.startup.inDriver.core.common.extensions.ViewBindingDelegate;
import sinet.startup.inDriver.feature.webview.BaseWebView;
import xo.m;
@Metadata(d1 = {"\u0000n\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\b\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\f\n\u0002\u0018\u0002\n\u0002\b\t\b\u0000\u0018\u0000 @2\u00020\u00012\u00020\u00022\u00020\u0003:\u0001AB\u0007¢\u0006\u0004\b>\u0010?J\u0010\u0010\u0007\u001a\u00020\u00062\u0006\u0010\u0005\u001a\u00020\u0004H\u0002J\b\u0010\b\u001a\u00020\u0006H\u0002J\u0010\u0010\u000b\u001a\u00020\u00062\u0006\u0010\n\u001a\u00020\tH\u0016J\u001a\u0010\u0010\u001a\u00020\u00062\u0006\u0010\r\u001a\u00020\f2\b\u0010\u000f\u001a\u0004\u0018\u00010\u000eH\u0016J\u0010\u0010\u0013\u001a\u00020\u00062\u0006\u0010\u0012\u001a\u00020\u0011H\u0016J\b\u0010\u0015\u001a\u00020\u0014H\u0016R\u001a\u0010\u001b\u001a\u00020\u00168\u0016X\u0096\u0004¢\u0006\f\n\u0004\b\u0017\u0010\u0018\u001a\u0004\b\u0019\u0010\u001aR\u001b\u0010!\u001a\u00020\u001c8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b\u001d\u0010\u001e\u001a\u0004\b\u001f\u0010 R\u001d\u0010'\u001a\u0004\u0018\u00010\"8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b#\u0010$\u001a\u0004\b%\u0010&R\u001d\u0010*\u001a\u0004\u0018\u00010\"8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b(\u0010$\u001a\u0004\b)\u0010&R(\u00103\u001a\b\u0012\u0004\u0012\u00020,0+8\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b-\u0010.\u001a\u0004\b/\u00100\"\u0004\b1\u00102R#\u00108\u001a\n 4*\u0004\u0018\u00010,0,8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b5\u0010$\u001a\u0004\b6\u00107R\u001b\u0010=\u001a\u0002098BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b:\u0010$\u001a\u0004\b;\u0010<¨\u0006B"}, d2 = {"Lsinet/startup/inDriver/feature/photocontrol_brand/ui/typeform/TypeformFragment;", "Lz81/b;", "Lhu2/g;", "", "Lt91/f;", "command", "Lco/g0;", "Sa", "R5", "Landroid/content/Context;", "context", "onAttach", "Landroid/view/View;", "view", "Landroid/os/Bundle;", "savedInstanceState", "onViewCreated", "Lhu2/h;", "pageType", "E4", "", "onBackPressed", "", "S", "I", "Fa", "()I", "layoutRes", "Lyi2/c;", "T", "Lto/d;", "Ma", "()Lyi2/c;", "binding", "", "X", "Lco/k;", "Pa", "()Ljava/lang/String;", "url", "Y", "Oa", "snackbarText", "Lbo/a;", "Laj2/p;", "Z", "Lbo/a;", "Ra", "()Lbo/a;", "setViewModelProvider", "(Lbo/a;)V", "viewModelProvider", "kotlin.jvm.PlatformType", "a0", "Qa", "()Laj2/p;", "viewModel", "Lzi2/e;", "k0", "Na", "()Lzi2/e;", "componentHolder", "<init>", "()V", "Companion", "a", "photocontrol-brand_release"}, k = 1, mv = {1, 8, 0})
public final class TypeformFragment extends z81.b implements hu2.g {
private final int layoutRes = ui2.c.f157978c;
@NotNull
private final to.d binding = new ViewBindingDelegate(this, p0.c(yi2.c.class));
@NotNull
private final k url;
@NotNull
private final k snackbarText;
public a<p> viewModelProvider;
@NotNull
private final k viewModel;
@NotNull
private final k componentHolder;
static final m<Object>[] f140566l0 = {p0.l(new g0(TypeformFragment.class, "binding", "getBinding()Lsinet/startup/inDriver/feature/photocontrol_brand/databinding/FragmentPhotocontrolBrandTypeformBinding;", 0))};
@NotNull
public static final Companion INSTANCE = new Companion(null);
@Metadata(d1 = {"\u0000\u0018\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\t\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\f\u0010\rJ\u001c\u0010\u0006\u001a\u00020\u00052\b\u0010\u0003\u001a\u0004\u0018\u00010\u00022\b\u0010\u0004\u001a\u0004\u0018\u00010\u0002H\u0007R\u0014\u0010\u0007\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u0007\u0010\bR\u0014\u0010\t\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\t\u0010\bR\u0014\u0010\n\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\n\u0010\bR\u0014\u0010\u000b\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u000b\u0010\b¨\u0006\u000e"}, d2 = {"Lsinet/startup/inDriver/feature/photocontrol_brand/ui/typeform/TypeformFragment$a;", "", "", "url", "snackbarText", "Lsinet/startup/inDriver/feature/photocontrol_brand/ui/typeform/TypeformFragment;", "a", "ARG_URL", "Ljava/lang/String;", "DEFAULT_SNACKBAR_TEXT", "DEFAULT_URL", "TYPEFORM_SNACKBAR_TEXT", "<init>", "()V", "photocontrol-brand_release"}, k = 1, mv = {1, 8, 0})
public static final class Companion {
private Companion() {
}
public Companion(kotlin.jvm.internal.k kVar) {
this();
}
@NotNull
public final TypeformFragment a(String url, String snackbarText) {
TypeformFragment typeformFragment = new TypeformFragment();
Bundle bundle = new Bundle();
bundle.putString("ARG_URL", url);
bundle.putString("ARG_TEXT", snackbarText);
typeformFragment.setArguments(bundle);
return typeformFragment;
}
}
@Metadata(d1 = {"\u0000\u001a\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0007\u001a\u00020\u0006\"\n\b\u0000\u0010\u0001\u0018\u0001*\u00020\u0000\"\u0010\b\u0001\u0010\u0003\u0018\u0001*\b\u0012\u0004\u0012\u00028\u00000\u00022\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00028\u00000\u0004H\n¢\u0006\u0004\b\u0007\u0010\b"}, d2 = {"", "T", "Lt91/b;", "L", "Ljava/util/LinkedList;", "commands", "Lco/g0;", "a", "(Ljava/util/LinkedList;)V"}, k = 3, mv = {1, 8, 0})
public static final class b<T> implements a0 {
final l f140569c;
public b(l lVar) {
this.f140569c = lVar;
}
@Override
public final void onChanged(@NotNull LinkedList<T> linkedList) {
T poll;
do {
poll = linkedList.poll();
if (poll != null) {
this.f140569c.invoke(poll);
}
} while (poll != null);
}
}
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
class c extends q implements l<t91.f, co.g0> {
c(Object obj) {
super(1, obj, TypeformFragment.class, "handleCommand", "handleCommand(Lsinet/startup/inDriver/core/common/mvvm/ViewCommand;)V", 0);
}
public final void b(@NotNull t91.f fVar) {
((TypeformFragment) this.receiver).Sa(fVar);
}
@Override
public co.g0 invoke(t91.f fVar) {
b(fVar);
return co.g0.f25238a;
}
}
@Metadata(k = 3, mv = {1, 8, 0}, xi = 48)
class d extends q implements l<String, Boolean> {
d(Object obj) {
super(1, obj, p.class, "handleUrl", "handleUrl(Ljava/lang/String;)Z", 0);
}
@Override
@NotNull
public final Boolean invoke(@NotNull String str) {
return Boolean.valueOf(((p) this.receiver).S(str));
}
}
@Metadata(d1 = {"\u0000\u000e\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0003\u0010\u0004"}, d2 = {"Landroid/view/View;", "it", "Lco/g0;", "a", "(Landroid/view/View;)V"}, k = 3, mv = {1, 8, 0})
static final class e extends u implements l<View, co.g0> {
e() {
super(1);
}
public final void a(@NotNull View view) {
TypeformFragment.this.Qa().T();
}
@Override
public co.g0 invoke(View view) {
a(view);
return co.g0.f25238a;
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u0004\u0018\u00018\u0000\"\u0006\b\u0000\u0010\u0000\u0018\u0001H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 8, 0})
public static final class f extends u implements qo.a<String> {
final Fragment f140571l;
final String f140572m;
public f(Fragment fragment, String str) {
super(0);
this.f140571l = fragment;
this.f140572m = str;
}
@Override
public final String invoke() {
Object obj;
Bundle arguments = this.f140571l.getArguments();
Object obj2 = null;
if (arguments != null) {
obj = arguments.get(this.f140572m);
} else {
obj = null;
}
if (obj instanceof String) {
obj2 = obj;
}
return (String) obj2;
}
}
@Metadata(d1 = {"\u0000\u0004\n\u0002\b\u0004\u0010\u0003\u001a\u0004\u0018\u00018\u0000\"\u0006\b\u0000\u0010\u0000\u0018\u0001H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"T", "invoke", "()Ljava/lang/Object;", "<anonymous>"}, k = 3, mv = {1, 8, 0})
public static final class g extends u implements qo.a<String> {
final Fragment f140573l;
final String f140574m;
public g(Fragment fragment, String str) {
super(0);
this.f140573l = fragment;
this.f140574m = str;
}
@Override
public final String invoke() {
Object obj;
Bundle arguments = this.f140573l.getArguments();
Object obj2 = null;
if (arguments != null) {
obj = arguments.get(this.f140574m);
} else {
obj = null;
}
if (obj instanceof String) {
obj2 = obj;
}
return (String) obj2;
}
}
@Metadata(d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0002\u001a\u00028\u0000\"\n\b\u0000\u0010\u0001\u0018\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Landroidx/lifecycle/r0;", "VM", "b", "()Landroidx/lifecycle/r0;"}, k = 3, mv = {1, 8, 0})
public static final class h extends u implements qo.a<p> {
final x0 f140575l;
final TypeformFragment f140576m;
@Metadata(d1 = {"\u0000\u0017\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J'\u0010\u0006\u001a\u00028\u0000\"\b\b\u0000\u0010\u0003*\u00020\u00022\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00028\u00000\u0004H\u0016¢\u0006\u0004\b\u0006\u0010\u0007¨\u0006\b"}, d2 = {"sinet/startup/inDriver/core/common/mvvm/LiveDataExtensionsKt$viewModels$1$factory$1", "Landroidx/lifecycle/u0$b;", "Landroidx/lifecycle/r0;", "VM", "Ljava/lang/Class;", "modelClass", "create", "(Ljava/lang/Class;)Landroidx/lifecycle/r0;", "common_release"}, k = 1, mv = {1, 8, 0})
public static final class a implements u0.b {
final TypeformFragment f140577a;
public a(TypeformFragment typeformFragment) {
this.f140577a = typeformFragment;
}
@Override
@NotNull
public <VM extends r0> VM create(@NotNull Class<VM> modelClass) {
return this.f140577a.Ra().get();
}
}
public h(x0 x0Var, TypeformFragment typeformFragment) {
super(0);
this.f140575l = x0Var;
this.f140576m = typeformFragment;
}
@Override
@NotNull
public final p invoke() {
return new u0(this.f140575l, new a(this.f140576m)).a(p.class);
}
}
@Metadata(d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0003\u0010\u0002\u001a\u00028\u0000\"\n\b\u0000\u0010\u0001\u0018\u0001*\u00020\u0000H\n¢\u0006\u0004\b\u0002\u0010\u0003"}, d2 = {"Landroidx/lifecycle/r0;", "VM", "b", "()Landroidx/lifecycle/r0;"}, k = 3, mv = {1, 8, 0})
public static final class i extends u implements qo.a<zi2.e> {
final x0 f140578l;
final TypeformFragment f140579m;
@Metadata(d1 = {"\u0000\u0017\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J'\u0010\u0006\u001a\u00028\u0000\"\b\b\u0000\u0010\u0003*\u00020\u00022\f\u0010\u0005\u001a\b\u0012\u0004\u0012\u00028\u00000\u0004H\u0016¢\u0006\u0004\b\u0006\u0010\u0007¨\u0006\b"}, d2 = {"sinet/startup/inDriver/core/common/mvvm/LiveDataExtensionsKt$viewModels$1$factory$1", "Landroidx/lifecycle/u0$b;", "Landroidx/lifecycle/r0;", "VM", "Ljava/lang/Class;", "modelClass", "create", "(Ljava/lang/Class;)Landroidx/lifecycle/r0;", "common_release"}, k = 1, mv = {1, 8, 0})
public static final class a implements u0.b {
final TypeformFragment f140580a;
public a(TypeformFragment typeformFragment) {
this.f140580a = typeformFragment;
}
@Override
@NotNull
public <VM extends r0> VM create(@NotNull Class<VM> modelClass) {
Object applicationContext = this.f140580a.requireContext().getApplicationContext();
l91.f fVar = (l91.f) applicationContext;
return new zi2.e(zi2.b.a().a(fVar.s(), fVar.k(), ((zd1.b) applicationContext).n(), ((xf1.b) applicationContext).d(), fVar.e()));
}
}
public i(x0 x0Var, TypeformFragment typeformFragment) {
super(0);
this.f140578l = x0Var;
this.f140579m = typeformFragment;
}
@Override
@NotNull
public final zi2.e invoke() {
return new u0(this.f140578l, new a(this.f140579m)).a(zi2.e.class);
}
}
public TypeformFragment() {
k b15;
k b16;
k a15;
k a16;
b15 = co.m.b(new f(this, "ARG_URL"));
this.url = b15;
b16 = co.m.b(new g(this, "ARG_TEXT"));
this.snackbarText = b16;
o oVar = o.NONE;
a15 = co.m.a(oVar, new h(this, this));
this.viewModel = a15;
a16 = co.m.a(oVar, new i(this, this));
this.componentHolder = a16;
}
private final yi2.c Ma() {
return (yi2.c) this.binding.a(this, f140566l0[0]);
}
private final zi2.e Na() {
return (zi2.e) this.componentHolder.getValue();
}
private final String Oa() {
return (String) this.snackbarText.getValue();
}
private final String Pa() {
return (String) this.url.getValue();
}
public final p Qa() {
return (p) this.viewModel.getValue();
}
private final void R5() {
ConstraintLayout a15 = Ma().a();
String Oa = Oa();
if (Oa == null) {
Oa = "Your application has been sent";
}
w0.m(a15, Oa, 0, null, 6, null);
}
public final void Sa(t91.f fVar) {
if (fVar instanceof bj2.i) {
R5();
}
}
@Override
public void E4(@NotNull hu2.h hVar) {
boolean z15;
if (getView() != null) {
BaseWebView baseWebView = Ma().f179980c;
if (hVar == hu2.h.WEB_PAGE) {
z15 = true;
} else {
z15 = false;
}
zh1.l.J(baseWebView, z15, null, 2, null);
}
}
@Override
public int getLayoutRes() {
return this.layoutRes;
}
@NotNull
public final a<p> Ra() {
a<p> aVar = this.viewModelProvider;
if (aVar != null) {
return aVar;
}
return null;
}
@Override
public void onAttach(@NotNull Context context) {
Na().getComponent().b(this);
super.onAttach(context);
}
@Override
public boolean onBackPressed() {
Qa().T();
return true;
}
@Override
public void onViewCreated(@NotNull View view, Bundle bundle) {
super.onViewCreated(view, bundle);
Qa().B().observe(getViewLifecycleOwner(), new b(new c(this)));
yi2.c Ma = Ma();
Ma.f179980c.setUrlLoadingHandler(new d(Qa()));
Ma.f179980c.setWebViewPageListener(this);
BaseWebView baseWebView = Ma.f179980c;
String Pa = Pa();
if (Pa == null) {
Pa = "https://form.typeform.com/to/haQye1TJ";
}
baseWebView.loadUrl(Pa);
zh1.l.E(Ma.f179979b, 0L, new e(), 1, null);
}
}