Kufar v3.2.0版本的 MD5 值为:6a4d203db1c561c7e3bcd50d23fed59f
以下内容为反编译后的 SmsCodeVerificationFragment.java 源代码,内容仅作参考
package by.kufar.code.ui;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.text.Editable;
import android.text.SpannableStringBuilder;
import android.text.TextPaint;
import android.text.TextWatcher;
import android.text.method.LinkMovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.EditText;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.autofill.HintConstants;
import androidx.core.content.ContextCompat;
import androidx.core.os.BundleKt;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentActivity;
import androidx.fragment.app.FragmentViewModelLazyKt;
import androidx.lifecycle.HasDefaultViewModelProviderFactory;
import androidx.lifecycle.Observer;
import androidx.lifecycle.ViewModelProvider;
import androidx.lifecycle.ViewModelStore;
import androidx.lifecycle.ViewModelStoreOwner;
import androidx.lifecycle.viewmodel.CreationExtras;
import by.kufar.code.R$color;
import by.kufar.code.R$id;
import by.kufar.code.R$layout;
import by.kufar.code.R$string;
import by.kufar.core.android.fragment.BaseFragment;
import by.kufar.re.ui.widget.InputView;
import by.kufar.re.ui.widget.button.ProgressButton;
import by.kufar.re.ui.widget.webview.WebViewActivity;
import by.kufar.sharedmodels.entity.SpanContent;
import com.google.android.material.snackbar.Snackbar;
import com.mbridge.msdk.playercommon.exoplayer2.util.MimeTypes;
import db.h0;
import db.i;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.g0;
import kotlin.jvm.internal.o0;
import kotlin.reflect.KProperty;
import o4.e;
@Metadata(d1 = {"\u0000 \u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0010\b\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\u0000\n\u0002\u0018\u0002\n\u0002\b\b\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u000e\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u000e\u0018\u0000 m2\u00020\u00012\u00020\u0002:\u0001nB\u0007¢\u0006\u0004\bk\u0010lJ\b\u0010\u0004\u001a\u00020\u0003H\u0002J\b\u0010\u0005\u001a\u00020\u0003H\u0002J\b\u0010\u0006\u001a\u00020\u0003H\u0002J\b\u0010\u0007\u001a\u00020\u0003H\u0002J$\u0010\f\u001a\u00020\u00032\u001a\u0010\u000b\u001a\u0016\u0012\u0004\u0012\u00020\t\u0012\u0004\u0012\u00020\t\u0018\u00010\bj\u0004\u0018\u0001`\nH\u0002J\u0012\u0010\u000f\u001a\u00020\u00032\b\u0010\u000e\u001a\u0004\u0018\u00010\rH\u0016J&\u0010\u0015\u001a\u0004\u0018\u00010\u00142\u0006\u0010\u0011\u001a\u00020\u00102\b\u0010\u0013\u001a\u0004\u0018\u00010\u00122\b\u0010\u000e\u001a\u0004\u0018\u00010\rH\u0016J\u001a\u0010\u0017\u001a\u00020\u00032\u0006\u0010\u0016\u001a\u00020\u00142\b\u0010\u000e\u001a\u0004\u0018\u00010\rH\u0016J\b\u0010\u0018\u001a\u00020\u0003H\u0016J\b\u0010\u0019\u001a\u00020\u0003H\u0016J\b\u0010\u001a\u001a\u00020\u0003H\u0016J\"\u0010\u001f\u001a\u00020\u00032\u0006\u0010\u001b\u001a\u00020\t2\u0006\u0010\u001c\u001a\u00020\t2\b\u0010\u001e\u001a\u0004\u0018\u00010\u001dH\u0016J\u0012\u0010\"\u001a\u00020\u00032\b\u0010!\u001a\u0004\u0018\u00010 H\u0016R\"\u0010$\u001a\u00020#8\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b$\u0010%\u001a\u0004\b&\u0010'\"\u0004\b(\u0010)R\"\u0010+\u001a\u00020*8\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b+\u0010,\u001a\u0004\b-\u0010.\"\u0004\b/\u00100R\"\u00102\u001a\u0002018\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b2\u00103\u001a\u0004\b4\u00105\"\u0004\b6\u00107R\"\u00109\u001a\u0002088\u0006@\u0006X\u0087.¢\u0006\u0012\n\u0004\b9\u0010:\u001a\u0004\b;\u0010<\"\u0004\b=\u0010>R\u001b\u0010C\u001a\u00020 8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b?\u0010@\u001a\u0004\bA\u0010BR\u001b\u0010F\u001a\u00020 8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bD\u0010@\u001a\u0004\bE\u0010BR\u001b\u0010K\u001a\u00020G8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bH\u0010@\u001a\u0004\bI\u0010JR\u001b\u0010P\u001a\u00020L8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bM\u0010@\u001a\u0004\bN\u0010OR\u001b\u0010V\u001a\u00020Q8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bR\u0010S\u001a\u0004\bT\u0010UR\u001b\u0010[\u001a\u00020W8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bX\u0010S\u001a\u0004\bY\u0010ZR\u001b\u0010`\u001a\u00020\\8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\b]\u0010S\u001a\u0004\b^\u0010_R\u001b\u0010e\u001a\u00020a8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bb\u0010S\u001a\u0004\bc\u0010dR\u001b\u0010\u001b\u001a\u00020\\8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bf\u0010S\u001a\u0004\bg\u0010_R\u001b\u0010j\u001a\u00020a8BX\u0082\u0084\u0002¢\u0006\f\n\u0004\bh\u0010S\u001a\u0004\bi\u0010d¨\u0006o"}, d2 = {"Lby/kufar/code/ui/SmsCodeVerificationFragment;", "Lby/kufar/core/android/fragment/BaseFragment;", "Lln/d;", "", "setupActions", "setUpViewModel", "setUpFields", "changePhoneNumber", "Lkotlin/Pair;", "", "Lby/kufar/code/ui/data/Time;", "time", "setUpRequestCodeButton", "Landroid/os/Bundle;", "savedInstanceState", "onCreate", "Landroid/view/LayoutInflater;", "inflater", "Landroid/view/ViewGroup;", "container", "Landroid/view/View;", "onCreateView", "view", "onViewCreated", "onStart", "onStop", "onInject", "requestCode", "resultCode", "Landroid/content/Intent;", "data", "onActivityResult", "", "sms", "onSmsRetrieved", "Landroidx/lifecycle/ViewModelProvider$Factory;", "viewModelFactory", "Landroidx/lifecycle/ViewModelProvider$Factory;", "getViewModelFactory", "()Landroidx/lifecycle/ViewModelProvider$Factory;", "setViewModelFactory", "(Landroidx/lifecycle/ViewModelProvider$Factory;)V", "Lln/a;", "smsRetrieverClient", "Lln/a;", "getSmsRetrieverClient", "()Lln/a;", "setSmsRetrieverClient", "(Lln/a;)V", "Lm4/b;", "tracker", "Lm4/b;", "getTracker", "()Lm4/b;", "setTracker", "(Lm4/b;)V", "Lcb/b;", "mediator", "Lcb/b;", "getMediator", "()Lcb/b;", "setMediator", "(Lcb/b;)V", "token$delegate", "Ld80/j;", "getToken", "()Ljava/lang/String;", "token", "phoneNum$delegate", "getPhoneNum", "phoneNum", "Ldb/i$a;", "source$delegate", "getSource", "()Ldb/i$a;", "source", "Lby/kufar/code/ui/SmsCodeVerificationVM;", "viewModel$delegate", "getViewModel", "()Lby/kufar/code/ui/SmsCodeVerificationVM;", "viewModel", "Landroid/widget/ImageView;", "close$delegate", "Li6/c;", "getClose", "()Landroid/widget/ImageView;", "close", "Lby/kufar/re/ui/widget/InputView;", "smsCodeInput$delegate", "getSmsCodeInput", "()Lby/kufar/re/ui/widget/InputView;", "smsCodeInput", "Lby/kufar/re/ui/widget/button/ProgressButton;", "verifyCode$delegate", "getVerifyCode", "()Lby/kufar/re/ui/widget/button/ProgressButton;", "verifyCode", "Landroid/widget/TextView;", "phone$delegate", "getPhone", "()Landroid/widget/TextView;", HintConstants.AUTOFILL_HINT_PHONE, "requestCode$delegate", "getRequestCode", "openHelpCenter$delegate", "getOpenHelpCenter", "openHelpCenter", "<init>", "()V", "Companion", "a", "feature-code-verification_googleRelease"}, k = 1, mv = {1, 9, 0})
public final class SmsCodeVerificationFragment extends BaseFragment implements ln.d {
static final KProperty<Object>[] $$delegatedProperties = {o0.i(new g0(SmsCodeVerificationFragment.class, "close", "getClose()Landroid/widget/ImageView;", 0)), o0.i(new g0(SmsCodeVerificationFragment.class, "smsCodeInput", "getSmsCodeInput()Lby/kufar/re/ui/widget/InputView;", 0)), o0.i(new g0(SmsCodeVerificationFragment.class, "verifyCode", "getVerifyCode()Lby/kufar/re/ui/widget/button/ProgressButton;", 0)), o0.i(new g0(SmsCodeVerificationFragment.class, HintConstants.AUTOFILL_HINT_PHONE, "getPhone()Landroid/widget/TextView;", 0)), o0.i(new g0(SmsCodeVerificationFragment.class, "requestCode", "getRequestCode()Lby/kufar/re/ui/widget/button/ProgressButton;", 0)), o0.i(new g0(SmsCodeVerificationFragment.class, "openHelpCenter", "getOpenHelpCenter()Landroid/widget/TextView;", 0))};
public static final Companion INSTANCE = new Companion(null);
private static final String KEY_PHONE_NUM = "PHONE_NUM";
private static final String KEY_SOURCE = "SOURCE";
private static final String KEY_TOKEN = "TOKEN";
private static final int SMS_RETRIEVE_REQUEST_CODE = 1000;
private final i6.c close;
public cb.b mediator;
private final i6.c openHelpCenter;
private final i6.c phone;
private final i6.c requestCode;
private final i6.c smsCodeInput;
public ln.a smsRetrieverClient;
public m4.b tracker;
private final i6.c verifyCode;
private final d80.j viewModel;
public ViewModelProvider.Factory viewModelFactory;
private final d80.j token = d80.k.b(new v());
private final d80.j phoneNum = d80.k.b(new c());
private final d80.j source = d80.k.b(new q());
@Metadata(d1 = {"\u0000&\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\u0010\u000e\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\b\n\u0002\b\u0005\b\u0086\u0003\u0018\u00002\u00020\u0001B\t\b\u0002¢\u0006\u0004\b\u0010\u0010\u0011J\u001e\u0010\b\u001a\u00020\u00072\u0006\u0010\u0003\u001a\u00020\u00022\u0006\u0010\u0004\u001a\u00020\u00022\u0006\u0010\u0006\u001a\u00020\u0005R\u0014\u0010\t\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\t\u0010\nR\u0014\u0010\u000b\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u000b\u0010\nR\u0014\u0010\f\u001a\u00020\u00028\u0002X\u0082T¢\u0006\u0006\n\u0004\b\f\u0010\nR\u0014\u0010\u000e\u001a\u00020\r8\u0002X\u0082T¢\u0006\u0006\n\u0004\b\u000e\u0010\u000f¨\u0006\u0012"}, d2 = {"Lby/kufar/code/ui/SmsCodeVerificationFragment$a;", "", "", "token", "phoneNum", "Ldb/i$a;", "source", "Landroidx/fragment/app/Fragment;", "a", "KEY_PHONE_NUM", "Ljava/lang/String;", "KEY_SOURCE", "KEY_TOKEN", "", "SMS_RETRIEVE_REQUEST_CODE", "I", "<init>", "()V", "feature-code-verification_googleRelease"}, k = 1, mv = {1, 9, 0})
public static final class Companion {
public Companion() {
}
public Companion(DefaultConstructorMarker defaultConstructorMarker) {
this();
}
public final Fragment a(String token, String phoneNum, i.a source) {
kotlin.jvm.internal.s.j(token, "token");
kotlin.jvm.internal.s.j(phoneNum, "phoneNum");
kotlin.jvm.internal.s.j(source, "source");
SmsCodeVerificationFragment smsCodeVerificationFragment = new SmsCodeVerificationFragment();
smsCodeVerificationFragment.setArguments(BundleKt.bundleOf(d80.u.a(SmsCodeVerificationFragment.KEY_SOURCE, source.toString()), d80.u.a(SmsCodeVerificationFragment.KEY_TOKEN, token), d80.u.a(SmsCodeVerificationFragment.KEY_PHONE_NUM, phoneNum)));
return smsCodeVerificationFragment;
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public class b {
public static final int[] $EnumSwitchMapping$0;
static {
int[] iArr = new int[i.a.values().length];
try {
iArr[i.a.f73647c.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[i.a.f73648d.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[i.a.f73649e.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
try {
iArr[i.a.f73650f.ordinal()] = 4;
} catch (NoSuchFieldError unused4) {
}
$EnumSwitchMapping$0 = iArr;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class c extends kotlin.jvm.internal.u implements Function0<String> {
public c() {
super(0);
}
@Override
public final String invoke() {
Bundle arguments = SmsCodeVerificationFragment.this.getArguments();
String string = arguments != null ? arguments.getString(SmsCodeVerificationFragment.KEY_PHONE_NUM) : null;
if (string == null) {
throw new IllegalArgumentException("Phone number must be set when start SmsCodeVerificationFragment".toString());
}
kotlin.jvm.internal.s.i(string, "requireNotNull(...)");
return string;
}
}
@Metadata(k = 3, mv = {1, 9, 0}, xi = 48)
public static final class d implements Observer, kotlin.jvm.internal.m {
public final Function1 f5652b;
public d(Function1 function) {
kotlin.jvm.internal.s.j(function, "function");
this.f5652b = function;
}
public final boolean equals(Object obj) {
if (!(obj instanceof Observer) || !(obj instanceof kotlin.jvm.internal.m)) {
return false;
}
return kotlin.jvm.internal.s.e(getFunctionDelegate(), ((kotlin.jvm.internal.m) obj).getFunctionDelegate());
}
@Override
public final d80.f<?> getFunctionDelegate() {
return this.f5652b;
}
public final int hashCode() {
return getFunctionDelegate().hashCode();
}
@Override
public final void onChanged(Object obj) {
this.f5652b.invoke(obj);
}
}
@Metadata(d1 = {"\u0000\u0017\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0002\b\u0002*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0012\u0010\u0005\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0016¨\u0006\u0006"}, d2 = {"by/kufar/code/ui/SmsCodeVerificationFragment$e", "Lh5/a;", "Landroid/text/Editable;", "s", "", "afterTextChanged", "feature-code-verification_googleRelease"}, k = 1, mv = {1, 9, 0})
public static final class e extends h5.a {
public e() {
}
@Override
public void afterTextChanged(Editable s11) {
boolean z11;
super.afterTextChanged(s11);
ProgressButton verifyCode = SmsCodeVerificationFragment.this.getVerifyCode();
if (s11 != null && s11.length() != 0) {
z11 = false;
} else {
z11 = true;
}
verifyCode.setEnabled(!z11);
}
}
@Metadata(d1 = {"\u0000\u001d\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0010\u0010\u0005\u001a\u00020\u00042\u0006\u0010\u0003\u001a\u00020\u0002H\u0016J\u0010\u0010\b\u001a\u00020\u00042\u0006\u0010\u0007\u001a\u00020\u0006H\u0016¨\u0006\t"}, d2 = {"by/kufar/code/ui/SmsCodeVerificationFragment$f", "Landroid/text/style/ClickableSpan;", "Landroid/text/TextPaint;", "ds", "", "updateDrawState", "Landroid/view/View;", "widget", "onClick", "core-android_googleRelease"}, k = 1, mv = {1, 9, 0})
public static final class f extends ClickableSpan {
public final Integer f5654b;
public final boolean f5655c;
public final SmsCodeVerificationFragment f5656d;
public f(Integer num, boolean z11, SmsCodeVerificationFragment smsCodeVerificationFragment) {
this.f5654b = num;
this.f5655c = z11;
this.f5656d = smsCodeVerificationFragment;
}
@Override
public void onClick(View widget) {
kotlin.jvm.internal.s.j(widget, "widget");
this.f5656d.changePhoneNumber();
}
@Override
public void updateDrawState(TextPaint ds2) {
kotlin.jvm.internal.s.j(ds2, "ds");
Integer num = this.f5654b;
if (num != null) {
ds2.setColor(num.intValue());
}
ds2.setUnderlineText(this.f5655c);
}
}
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lby/kufar/core/android/arch/a;", "", "kotlin.jvm.PlatformType", "it", "", "a", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class g extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends Integer>, Unit> {
public g() {
super(1);
}
public final void a(by.kufar.core.android.arch.a<Integer> aVar) {
Integer a11 = aVar.a();
if (a11 != null) {
Snackbar s11 = ek.b.s(ek.b.f75340a, SmsCodeVerificationFragment.this.getView(), SmsCodeVerificationFragment.this.getString(a11.intValue()), 0, null, 0, null, 60, null);
if (s11 != null) {
s11.W();
}
}
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends Integer> aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\u0003\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lby/kufar/core/android/arch/a;", "", "kotlin.jvm.PlatformType", "it", "", "a", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class h extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends Throwable>, Unit> {
public h() {
super(1);
}
public final void a(by.kufar.core.android.arch.a<? extends Throwable> aVar) {
Snackbar t11;
Throwable a11 = aVar.a();
if (a11 != null && (t11 = ek.b.t(ek.b.f75340a, SmsCodeVerificationFragment.this.getView(), a11, 0, null, 0, null, 60, null)) != null) {
t11.W();
}
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends Throwable> aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lby/kufar/core/android/arch/a;", "Lby/kufar/sharedmodels/entity/SpanContent;", "kotlin.jvm.PlatformType", "it", "", "a", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class i extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends SpanContent>, Unit> {
public i() {
super(1);
}
public final void a(by.kufar.core.android.arch.a<SpanContent> aVar) {
boolean z11;
SpanContent a11 = aVar.a();
if (a11 == null) {
return;
}
if (a11.getText().length() > 0) {
z11 = true;
} else {
z11 = false;
}
if (z11) {
Snackbar r11 = ek.b.r(ek.b.f75340a, SmsCodeVerificationFragment.this.getView(), a11, 0, null, 0, null, 60, null);
if (r11 != null) {
r11.W();
return;
}
return;
}
Snackbar s11 = ek.b.s(ek.b.f75340a, SmsCodeVerificationFragment.this.getView(), SmsCodeVerificationFragment.this.getString(R$string.f5537k), 0, null, 0, null, 60, null);
if (s11 != null) {
s11.W();
}
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends SpanContent> aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lby/kufar/core/android/arch/a;", "", "kotlin.jvm.PlatformType", "it", "", "a", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class j extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends Integer>, Unit> {
public j() {
super(1);
}
public final void a(by.kufar.core.android.arch.a<Integer> aVar) {
Integer a11 = aVar.a();
if (a11 != null) {
SmsCodeVerificationFragment.this.getSmsCodeInput().setError(SmsCodeVerificationFragment.this.getString(a11.intValue()));
}
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends Integer> aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u0014\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0005\u001a\u00020\u00042\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0005\u0010\u0006"}, d2 = {"Lby/kufar/core/android/arch/a;", "Lby/kufar/sharedmodels/entity/SpanContent;", "kotlin.jvm.PlatformType", "it", "", "a", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class k extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends SpanContent>, Unit> {
public k() {
super(1);
}
public final void a(by.kufar.core.android.arch.a<SpanContent> aVar) {
boolean z11;
CharSequence string;
SpanContent a11 = aVar.a();
if (a11 == null) {
return;
}
if (a11.getText().length() > 0) {
z11 = true;
} else {
z11 = false;
}
if (z11) {
string = o5.d.c(o5.d.f87043a, a11, false, null, null, 14, null);
} else {
string = SmsCodeVerificationFragment.this.getString(R$string.f5537k);
kotlin.jvm.internal.s.i(string, "getString(...)");
}
SmsCodeVerificationFragment.this.getSmsCodeInput().setError(string);
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends SpanContent> aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u00032\u000e\u0010\u0002\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"", "kotlin.jvm.PlatformType", "it", "", "a", "(Ljava/lang/Boolean;)V"}, k = 3, mv = {1, 9, 0})
public static final class l extends kotlin.jvm.internal.u implements Function1<Boolean, Unit> {
public l() {
super(1);
}
public final void a(Boolean bool) {
ProgressButton requestCode = SmsCodeVerificationFragment.this.getRequestCode();
kotlin.jvm.internal.s.g(bool);
requestCode.e(bool.booleanValue());
}
@Override
public Unit invoke(Boolean bool) {
a(bool);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0002\u0010\u000b\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0004\u001a\u00020\u00032\u000e\u0010\u0002\u001a\n \u0001*\u0004\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"", "kotlin.jvm.PlatformType", "it", "", "a", "(Ljava/lang/Boolean;)V"}, k = 3, mv = {1, 9, 0})
public static final class m extends kotlin.jvm.internal.u implements Function1<Boolean, Unit> {
public m() {
super(1);
}
public final void a(Boolean bool) {
ProgressButton verifyCode = SmsCodeVerificationFragment.this.getVerifyCode();
kotlin.jvm.internal.s.g(bool);
verifyCode.e(bool.booleanValue());
}
@Override
public Unit invoke(Boolean bool) {
a(bool);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\f\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0002\b\u0004\u0010\u0004\u001a\u00020\u00012\u001a\u0010\u0003\u001a\u0016\u0012\u0004\u0012\u00020\u0001 \u0002*\n\u0012\u0004\u0012\u00020\u0001\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0004\u0010\u0005"}, d2 = {"Lby/kufar/core/android/arch/a;", "", "kotlin.jvm.PlatformType", "it", "a", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class n extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends Unit>, Unit> {
public n() {
super(1);
}
public final void a(by.kufar.core.android.arch.a<Unit> aVar) {
FragmentActivity activity = SmsCodeVerificationFragment.this.getActivity();
if (activity != null) {
activity.setResult(-1);
}
FragmentActivity activity2 = SmsCodeVerificationFragment.this.getActivity();
if (activity2 != null) {
activity2.finish();
}
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends Unit> aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\u001c\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0002\n\u0002\b\u0002\u0010\u0007\u001a\u00020\u00062B\u0010\u0005\u001a>\u0012\u0018\u0012\u0016\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0002\u0018\u00010\u0001j\u0004\u0018\u0001`\u0003 \u0004*\u001e\u0012\u0018\u0012\u0016\u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0002\u0018\u00010\u0001j\u0004\u0018\u0001`\u0003\u0018\u00010\u00000\u0000H\n¢\u0006\u0004\b\u0007\u0010\b"}, d2 = {"Lby/kufar/core/android/arch/a;", "Lkotlin/Pair;", "", "Lby/kufar/code/ui/data/Time;", "kotlin.jvm.PlatformType", "it", "", "a", "(Lby/kufar/core/android/arch/a;)V"}, k = 3, mv = {1, 9, 0})
public static final class o extends kotlin.jvm.internal.u implements Function1<by.kufar.core.android.arch.a<? extends Pair<? extends Integer, ? extends Integer>>, Unit> {
public o() {
super(1);
}
public final void a(by.kufar.core.android.arch.a<Pair<Integer, Integer>> aVar) {
if (!aVar.getHasBeenHandled()) {
SmsCodeVerificationFragment.this.setUpRequestCodeButton(aVar.a());
}
}
@Override
public Unit invoke(by.kufar.core.android.arch.a<? extends Pair<? extends Integer, ? extends Integer>> aVar) {
a(aVar);
return Unit.f82492a;
}
}
@Metadata(d1 = {"\u0000\b\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0001\u001a\u00020\u0000H\n¢\u0006\u0004\b\u0001\u0010\u0002"}, d2 = {"Ldb/i$a;", "b", "()Ldb/i$a;"}, k = 3, mv = {1, 9, 0})
public static final class q extends kotlin.jvm.internal.u implements Function0<i.a> {
public q() {
super(0);
}
@Override
public final i.a invoke() {
String str;
Bundle arguments = SmsCodeVerificationFragment.this.getArguments();
if (arguments != null) {
str = arguments.getString(SmsCodeVerificationFragment.KEY_SOURCE);
} else {
str = null;
}
if (str != null) {
kotlin.jvm.internal.s.i(str, "requireNotNull(...)");
try {
return i.a.valueOf(str);
} catch (Throwable unused) {
return i.a.f73648d;
}
}
throw new IllegalArgumentException("Source must be set when start SmsCodeVerificationFragment".toString());
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/fragment/app/Fragment;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$5"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class r extends kotlin.jvm.internal.u implements Function0<Fragment> {
public final Fragment f5668d;
public r(Fragment fragment) {
super(0);
this.f5668d = fragment;
}
@Override
public final Fragment invoke() {
return this.f5668d;
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/lifecycle/ViewModelStoreOwner;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$owner$4"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class s extends kotlin.jvm.internal.u implements Function0<ViewModelStoreOwner> {
public final Function0 f5669d;
public s(Function0 function0) {
super(0);
this.f5669d = function0;
}
@Override
public final ViewModelStoreOwner invoke() {
return (ViewModelStoreOwner) this.f5669d.invoke();
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/lifecycle/ViewModelStore;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$6"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class t extends kotlin.jvm.internal.u implements Function0<ViewModelStore> {
public final d80.j f5670d;
public t(d80.j jVar) {
super(0);
this.f5670d = jVar;
}
@Override
public final ViewModelStore invoke() {
ViewModelStore viewModelStore = FragmentViewModelLazyKt.m4200access$viewModels$lambda1(this.f5670d).getViewModelStore();
kotlin.jvm.internal.s.i(viewModelStore, "owner.viewModelStore");
return viewModelStore;
}
}
@Metadata(d1 = {"\u0000\u0010\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\u0010\u0000\u001a\u00020\u0001\"\n\b\u0000\u0010\u0002\u0018\u0001*\u00020\u0003H\n¢\u0006\u0002\b\u0004¨\u0006\u0005"}, d2 = {"<anonymous>", "Landroidx/lifecycle/viewmodel/CreationExtras;", "VM", "Landroidx/lifecycle/ViewModel;", "invoke", "androidx/fragment/app/FragmentViewModelLazyKt$viewModels$7"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class u extends kotlin.jvm.internal.u implements Function0<CreationExtras> {
public final Function0 f5671d;
public final d80.j f5672e;
public u(Function0 function0, d80.j jVar) {
super(0);
this.f5671d = function0;
this.f5672e = jVar;
}
@Override
public final CreationExtras invoke() {
CreationExtras creationExtras;
Function0 function0 = this.f5671d;
if (function0 != null && (creationExtras = (CreationExtras) function0.invoke()) != null) {
return creationExtras;
}
ViewModelStoreOwner m4200access$viewModels$lambda1 = FragmentViewModelLazyKt.m4200access$viewModels$lambda1(this.f5672e);
HasDefaultViewModelProviderFactory hasDefaultViewModelProviderFactory = m4200access$viewModels$lambda1 instanceof HasDefaultViewModelProviderFactory ? (HasDefaultViewModelProviderFactory) m4200access$viewModels$lambda1 : null;
CreationExtras defaultViewModelCreationExtras = hasDefaultViewModelProviderFactory != null ? hasDefaultViewModelProviderFactory.getDefaultViewModelCreationExtras() : null;
return defaultViewModelCreationExtras == null ? CreationExtras.Empty.INSTANCE : defaultViewModelCreationExtras;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0010\u000e\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class v extends kotlin.jvm.internal.u implements Function0<String> {
public v() {
super(0);
}
@Override
public final String invoke() {
Bundle arguments = SmsCodeVerificationFragment.this.getArguments();
String string = arguments != null ? arguments.getString(SmsCodeVerificationFragment.KEY_TOKEN) : null;
if (string == null) {
throw new IllegalArgumentException("Token must be set when start SmsCodeVerificationFragment".toString());
}
kotlin.jvm.internal.s.i(string, "requireNotNull(...)");
return string;
}
}
@Metadata(d1 = {"\u0000\b\n\u0000\n\u0002\u0018\u0002\n\u0000\u0010\u0000\u001a\u00020\u0001H\n¢\u0006\u0002\b\u0002"}, d2 = {"<anonymous>", "Landroidx/lifecycle/ViewModelProvider$Factory;", "invoke"}, k = 3, mv = {1, 9, 0}, xi = 48)
public static final class w extends kotlin.jvm.internal.u implements Function0<ViewModelProvider.Factory> {
public w() {
super(0);
}
@Override
public final ViewModelProvider.Factory invoke() {
return SmsCodeVerificationFragment.this.getViewModelFactory();
}
}
public SmsCodeVerificationFragment() {
w wVar = new w();
d80.j a11 = d80.k.a(d80.m.f73493d, new s(new r(this)));
this.viewModel = FragmentViewModelLazyKt.createViewModelLazy(this, o0.b(SmsCodeVerificationVM.class), new t(a11), new u(null, a11), wVar);
this.close = bindView(R$id.f5518a);
this.smsCodeInput = bindView(R$id.f5523f);
this.verifyCode = bindView(R$id.f5524g);
this.phone = bindView(R$id.f5521d);
this.requestCode = bindView(R$id.f5522e);
this.openHelpCenter = bindView(R$id.f5520c);
}
public final void changePhoneNumber() {
Intent a11;
Context context = getContext();
if (context == null) {
return;
}
int i11 = b.$EnumSwitchMapping$0[getSource().ordinal()];
if (i11 != 1) {
if (i11 != 2) {
if (i11 != 3) {
if (i11 != 4) {
a11 = null;
} else {
a11 = getMediator().F().b(context);
}
} else {
a11 = getMediator().p().a(context, h0.b.f73642c);
}
} else {
a11 = getMediator().p().a(context, h0.b.f73643d);
}
} else {
a11 = getMediator().p().a(context, h0.b.f73641b);
}
if (a11 != null) {
startActivity(a11);
FragmentActivity activity = getActivity();
if (activity != null) {
activity.finish();
}
}
}
private final ImageView getClose() {
return (ImageView) this.close.getValue(this, $$delegatedProperties[0]);
}
private final TextView getOpenHelpCenter() {
return (TextView) this.openHelpCenter.getValue(this, $$delegatedProperties[5]);
}
private final TextView getPhone() {
return (TextView) this.phone.getValue(this, $$delegatedProperties[3]);
}
private final String getPhoneNum() {
return (String) this.phoneNum.getValue();
}
public final ProgressButton getRequestCode() {
return (ProgressButton) this.requestCode.getValue(this, $$delegatedProperties[4]);
}
public final InputView getSmsCodeInput() {
return (InputView) this.smsCodeInput.getValue(this, $$delegatedProperties[1]);
}
private final i.a getSource() {
return (i.a) this.source.getValue();
}
private final String getToken() {
return (String) this.token.getValue();
}
public final ProgressButton getVerifyCode() {
return (ProgressButton) this.verifyCode.getValue(this, $$delegatedProperties[2]);
}
private final SmsCodeVerificationVM getViewModel() {
return (SmsCodeVerificationVM) this.viewModel.getValue();
}
private final void setUpFields() {
int i11;
getSmsCodeInput().getEditText().addTextChangedListener(new e());
getPhone().setMovementMethod(LinkMovementMethod.getInstance());
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
boolean z11 = true;
StyleSpan styleSpan = new StyleSpan(1);
int length = spannableStringBuilder.length();
spannableStringBuilder.append((CharSequence) (getPhoneNum() + " "));
spannableStringBuilder.setSpan(styleSpan, length, spannableStringBuilder.length(), 17);
if (getSource() == i.a.f73646b) {
z11 = false;
}
if (z11) {
Context context = getContext();
if (context != null) {
i11 = ContextCompat.getColor(context, R$color.f5517a);
} else {
i11 = -16711936;
}
ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(i11);
int length2 = spannableStringBuilder.length();
f fVar = new f(null, false, this);
int length3 = spannableStringBuilder.length();
spannableStringBuilder.append((CharSequence) getString(R$string.f5527a));
spannableStringBuilder.setSpan(fVar, length3, spannableStringBuilder.length(), 17);
spannableStringBuilder.setSpan(foregroundColorSpan, length2, spannableStringBuilder.length(), 17);
}
getPhone().setText(spannableStringBuilder);
}
public final void setUpRequestCodeButton(Pair<Integer, Integer> time) {
getRequestCode().e(false);
if (time == null) {
getRequestCode().setEnabled(true);
getRequestCode().setText(getString(R$string.f5535i));
} else {
getRequestCode().setEnabled(false);
getRequestCode().setText(getString(R$string.f5534h, time.c(), time.d()));
}
}
private final void setUpViewModel() {
SmsCodeVerificationVM viewModel = getViewModel();
viewModel.setUp(getToken(), getPhoneNum());
viewModel.getSnackErrorInt().observe(getViewLifecycleOwner(), new d(new g()));
viewModel.getSnackError().observe(getViewLifecycleOwner(), new d(new h()));
viewModel.getSnackErrorSpan().observe(getViewLifecycleOwner(), new d(new i()));
viewModel.getInputErrorInt().observe(getViewLifecycleOwner(), new d(new j()));
viewModel.getInputErrorSpan().observe(getViewLifecycleOwner(), new d(new k()));
viewModel.getRequestProgress().observe(getViewLifecycleOwner(), new d(new l()));
viewModel.getVerifyProgress().observe(getViewLifecycleOwner(), new d(new m()));
viewModel.getFinish().observe(getViewLifecycleOwner(), new d(new n()));
viewModel.getTime().observe(getViewLifecycleOwner(), new d(new o()));
}
private final void setupActions() {
getClose().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
SmsCodeVerificationFragment.setupActions$lambda$0(SmsCodeVerificationFragment.this, view);
}
});
getRequestCode().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
SmsCodeVerificationFragment.setupActions$lambda$1(SmsCodeVerificationFragment.this, view);
}
});
getOpenHelpCenter().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
SmsCodeVerificationFragment.setupActions$lambda$2(SmsCodeVerificationFragment.this, view);
}
});
getSmsCodeInput().getEditText().addTextChangedListener(new p());
s5.f.d(getSmsCodeInput().getEditText(), 4);
getSmsCodeInput().getEditText().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
SmsCodeVerificationFragment.setupActions$lambda$4(SmsCodeVerificationFragment.this, view);
}
});
getVerifyCode().setOnClickListener(new View.OnClickListener() {
@Override
public final void onClick(View view) {
SmsCodeVerificationFragment.setupActions$lambda$5(SmsCodeVerificationFragment.this, view);
}
});
}
public static final void setupActions$lambda$0(SmsCodeVerificationFragment this$0, View view) {
kotlin.jvm.internal.s.j(this$0, "this$0");
this$0.getTracker().e();
FragmentActivity activity = this$0.getActivity();
if (activity != null) {
activity.setResult(0);
}
FragmentActivity activity2 = this$0.getActivity();
if (activity2 != null) {
activity2.finish();
}
}
public static final void setupActions$lambda$1(SmsCodeVerificationFragment this$0, View view) {
kotlin.jvm.internal.s.j(this$0, "this$0");
this$0.getTracker().d();
this$0.getViewModel().requestCode();
}
public static final void setupActions$lambda$2(SmsCodeVerificationFragment this$0, View view) {
kotlin.jvm.internal.s.j(this$0, "this$0");
this$0.getTracker().g();
Context context = this$0.getContext();
if (context == null) {
return;
}
this$0.startActivity(WebViewActivity.Companion.b(WebViewActivity.INSTANCE, context, "https://support.kufar.by/hc/ru/sections/360000114885", false, null, false, false, 60, null));
}
public static final void setupActions$lambda$4(SmsCodeVerificationFragment this$0, View view) {
kotlin.jvm.internal.s.j(this$0, "this$0");
this$0.getSmsCodeInput().setError("");
}
public static final void setupActions$lambda$5(SmsCodeVerificationFragment this$0, View view) {
kotlin.jvm.internal.s.j(this$0, "this$0");
this$0.getTracker().b();
a6.d.f263a.i(this$0.getView());
this$0.getVerifyCode().setClickable(false);
this$0.getViewModel().verifySMSCode(this$0.getSmsCodeInput().getEditText().getText().toString());
}
public final cb.b getMediator() {
cb.b bVar = this.mediator;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.s.B("mediator");
return null;
}
public final ln.a getSmsRetrieverClient() {
ln.a aVar = this.smsRetrieverClient;
if (aVar != null) {
return aVar;
}
kotlin.jvm.internal.s.B("smsRetrieverClient");
return null;
}
public final m4.b getTracker() {
m4.b bVar = this.tracker;
if (bVar != null) {
return bVar;
}
kotlin.jvm.internal.s.B("tracker");
return null;
}
public final ViewModelProvider.Factory getViewModelFactory() {
ViewModelProvider.Factory factory = this.viewModelFactory;
if (factory != null) {
return factory;
}
kotlin.jvm.internal.s.B("viewModelFactory");
return null;
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 1000 && resultCode == -1) {
getSmsRetrieverClient().b(data);
}
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
getTracker().a();
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
kotlin.jvm.internal.s.j(inflater, "inflater");
return inflater.inflate(R$layout.f5526b, container, false);
}
@Override
public void onInject() {
super.onInject();
e.a a11 = o4.c.a();
Object obj = m5.a.d(this).get(o4.a.class);
if (obj != null) {
a11.a((o4.a) obj, getSource()).a(this);
return;
}
throw new NullPointerException("null cannot be cast to non-null type by.kufar.code.di.CodeVerificationDependencies");
}
@Override
public void onSmsRetrieved(String sms) {
String str;
EditText editText = getSmsCodeInput().getEditText();
if (sms != null) {
StringBuilder sb2 = new StringBuilder();
int length = sms.length();
for (int i11 = 0; i11 < length; i11++) {
char charAt = sms.charAt(i11);
if (Character.isDigit(charAt)) {
sb2.append(charAt);
}
}
str = sb2.toString();
kotlin.jvm.internal.s.i(str, "filterTo(StringBuilder(), predicate).toString()");
} else {
str = null;
}
editText.setText(str);
}
@Override
public void onStart() {
super.onStart();
getSmsRetrieverClient().c(this);
getSmsRetrieverClient().e(this, k6.b.VERIFICATION_PHONE, 1000);
}
@Override
public void onStop() {
super.onStop();
getSmsRetrieverClient().f(this);
}
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
kotlin.jvm.internal.s.j(view, "view");
super.onViewCreated(view, savedInstanceState);
setupActions();
setUpFields();
setUpViewModel();
}
public final void setMediator(cb.b bVar) {
kotlin.jvm.internal.s.j(bVar, "<set-?>");
this.mediator = bVar;
}
public final void setSmsRetrieverClient(ln.a aVar) {
kotlin.jvm.internal.s.j(aVar, "<set-?>");
this.smsRetrieverClient = aVar;
}
public final void setTracker(m4.b bVar) {
kotlin.jvm.internal.s.j(bVar, "<set-?>");
this.tracker = bVar;
}
public final void setViewModelFactory(ViewModelProvider.Factory factory) {
kotlin.jvm.internal.s.j(factory, "<set-?>");
this.viewModelFactory = factory;
}
@Metadata(d1 = {"\u0000#\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u0002\n\u0000\n\u0002\u0010\r\n\u0000\n\u0002\u0010\b\n\u0002\b\b*\u0001\u0000\b\n\u0018\u00002\u00020\u0001J\u0012\u0010\u0005\u001a\u00020\u00042\b\u0010\u0003\u001a\u0004\u0018\u00010\u0002H\u0016J*\u0010\f\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\n\u001a\u00020\b2\u0006\u0010\u000b\u001a\u00020\bH\u0016J*\u0010\u000e\u001a\u00020\u00042\b\u0010\u0007\u001a\u0004\u0018\u00010\u00062\u0006\u0010\t\u001a\u00020\b2\u0006\u0010\r\u001a\u00020\b2\u0006\u0010\n\u001a\u00020\bH\u0016¨\u0006\u000f¸\u0006\u0010"}, d2 = {"androidx/core/widget/TextViewKt$addTextChangedListener$textWatcher$1", "Landroid/text/TextWatcher;", "Landroid/text/Editable;", "s", "", "afterTextChanged", "", MimeTypes.BASE_TYPE_TEXT, "", "start", "count", "after", "beforeTextChanged", "before", "onTextChanged", "core-ktx_release", "androidx/core/widget/TextViewKt$doOnTextChanged$$inlined$addTextChangedListener$default$1"}, k = 1, mv = {1, 9, 0})
public static final class p implements TextWatcher {
public p() {
}
@Override
public void onTextChanged(CharSequence text, int start, int before, int count) {
SmsCodeVerificationFragment.this.getSmsCodeInput().setError(null);
}
@Override
public void afterTextChanged(Editable s11) {
}
@Override
public void beforeTextChanged(CharSequence text, int start, int count, int after) {
}
}
}