Picsart v24.6版本的 MD5 值为:21a61631d94e54da68d2ad9268b8b9d9
以下内容为反编译后的 WelcomeClassicFragment.java 源代码,内容仅作参考
package com.picsart.auth.impl.welcome.presentation.classic;
import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.Intent;
import android.content.res.ColorStateList;
import android.graphics.drawable.ColorDrawable;
import android.os.Bundle;
import android.text.SpannableStringBuilder;
import android.text.SpannedString;
import android.text.method.LinkMovementMethod;
import android.text.style.ForegroundColorSpan;
import android.text.style.StyleSpan;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.constraintlayout.widget.ConstraintLayout;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.e;
import androidx.navigation.NavBackStackEntry;
import androidx.navigation.NavController;
import com.applovin.sdk.AppLovinEventTypes;
import com.ds.picsart.view.text.PicsartTextView;
import com.facebook.drawee.view.SimpleDraweeView;
import com.fyber.inneractive.sdk.external.InneractiveMediationNameConsts;
import com.google.android.gms.common.Scopes;
import com.picsart.auth.impl.common.entity.model.settings.SettingsButton;
import com.picsart.auth.impl.common.entity.model.settings.SettingsClickableText;
import com.picsart.auth.impl.common.entity.model.settings.SettingsRegButtonType;
import com.picsart.auth.impl.social.presentation.SocialSignInFragment;
import com.picsart.auth.impl.social.presentation.SocialSignInSharedViewModel;
import com.picsart.auth.impl.welcome.entity.enums.IconType;
import com.picsart.auth.impl.welcome.presentation.classic.WelcomeClassicFragment;
import com.picsart.growth.core.mvi.BaseMviFragment;
import com.picsart.studio.R;
import com.picsart.studio.common.constants.EventParam;
import com.picsart.studio.common.constants.SourceParam;
import com.picsart.studio.reusableviews.alertview.AlertView;
import com.picsart.studio.reusableviews.button.PicsartButton;
import com.picsart.studio.views.PicsartProgressBar;
import com.picsart.subscription.OpenSubscriptionValues;
import com.picsart.viewbinding.ViewBindingDelegate;
import com.tokens.spacing.SpacingSystem;
import com.tokens.typography.api.FontWights;
import com.tokens.typography.api.Typography;
import java.util.List;
import java.util.Locale;
import java.util.WeakHashMap;
import kotlin.LazyThreadSafetyMode;
import kotlin.Metadata;
import kotlin.Pair;
import kotlin.Unit;
import kotlin.coroutines.intrinsics.CoroutineSingletons;
import kotlin.jvm.functions.Function0;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.functions.Function2;
import kotlin.jvm.internal.Intrinsics;
import kotlin.jvm.internal.PropertyReference1Impl;
import kotlinx.coroutines.flow.FlowKt__TransformKt$filterNotNull$$inlined$unsafeTransform$1;
import kotlinx.coroutines.flow.FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1;
import kotlinx.coroutines.flow.StateFlowImpl;
import myobfuscated.d4.m;
import myobfuscated.el2.j;
import myobfuscated.fi2.a;
import myobfuscated.h4.a0;
import myobfuscated.h4.k;
import myobfuscated.h4.z;
import myobfuscated.ik2.h;
import myobfuscated.jk2.o;
import myobfuscated.m3.g0;
import myobfuscated.m3.k0;
import myobfuscated.m3.l0;
import myobfuscated.m3.m0;
import myobfuscated.m3.q0;
import myobfuscated.m3.w;
import myobfuscated.m3.w0;
import myobfuscated.mk2.c;
import myobfuscated.sz.f;
import myobfuscated.t10.b;
import myobfuscated.t10.d;
import myobfuscated.tw.g;
import myobfuscated.tz.p;
import myobfuscated.u42.p6;
import myobfuscated.u42.w2;
import myobfuscated.u42.x2;
import myobfuscated.xk2.q;
import myobfuscated.xk2.r;
import myobfuscated.xl1.b;
import org.jetbrains.annotations.NotNull;
@Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0002\b\u0003\b\u0000\u0018\u00002 \u0012\u0004\u0012\u00020\u0002\u0012\u0004\u0012\u00020\u0003\u0012\u0004\u0012\u00020\u0004\u0012\u0004\u0012\u00020\u0005\u0012\u0004\u0012\u00020\u00060\u00012\u00020\u0007B\u0007¢\u0006\u0004\b\b\u0010\t¨\u0006\n"}, d2 = {"Lcom/picsart/auth/impl/welcome/presentation/classic/WelcomeClassicFragment;", "Lcom/picsart/growth/core/mvi/BaseMviFragment;", "Lmyobfuscated/t10/b;", "Lmyobfuscated/t10/a;", "Lmyobfuscated/t10/d;", "Lcom/picsart/auth/impl/welcome/presentation/classic/a;", "Lmyobfuscated/tz/p;", "", "<init>", "()V", "_growth_registration_impl_compileGlobalReleaseKotlin"}, k = 1, mv = {1, 9, 0})
public final class WelcomeClassicFragment extends BaseMviFragment<myobfuscated.t10.b, myobfuscated.t10.a, d, com.picsart.auth.impl.welcome.presentation.classic.a, p> {
public static final j<Object>[] t;
@NotNull
public final ViewBindingDelegate c = myobfuscated.we2.a.a(this, WelcomeClassicFragment$viewBinding$2.INSTANCE);
@NotNull
public final h d;
@NotNull
public final h e;
@NotNull
public final h f;
@NotNull
public final h g;
@NotNull
public final h h;
@NotNull
public final h i;
@NotNull
public final myobfuscated.ts0.a j;
@NotNull
public final myobfuscated.ts0.a k;
@NotNull
public final myobfuscated.ts0.a l;
@NotNull
public final myobfuscated.ts0.a m;
@NotNull
public final myobfuscated.ts0.a n;
@NotNull
public final myobfuscated.ts0.a o;
@NotNull
public final h p;
@NotNull
public final h q;
@NotNull
public final h r;
public boolean s;
public class a {
public static final int[] a;
static {
int[] iArr = new int[IconType.values().length];
try {
iArr[IconType.NONE.ordinal()] = 1;
} catch (NoSuchFieldError unused) {
}
try {
iArr[IconType.SKIP.ordinal()] = 2;
} catch (NoSuchFieldError unused2) {
}
try {
iArr[IconType.SETTINGS.ordinal()] = 3;
} catch (NoSuchFieldError unused3) {
}
a = iArr;
}
}
public static final class b implements x2 {
public final androidx.fragment.app.h b;
public final w2 c;
public final Intent d;
public b(androidx.fragment.app.h hVar, w2 w2Var, Intent intent) {
this.b = hVar;
this.c = w2Var;
this.d = intent;
}
@Override
public final void a(@NotNull OpenSubscriptionValues value) {
Intrinsics.checkNotNullParameter(value, "value");
j<Object>[] jVarArr = WelcomeClassicFragment.t;
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
int N3 = welcomeClassicFragment.N3();
androidx.fragment.app.h hVar = this.b;
if (N3 == 0 && ((d) kotlinx.coroutines.flow.a.b(welcomeClassicFragment.I3().e).b.getValue()).o) {
((p6) welcomeClassicFragment.g.getValue()).b(hVar, this.c, value, null);
}
String name = value.name();
Intent intent = this.d;
intent.putExtra("open_subscription_value", name);
String name2 = WelcomeClassicFragment.class.getName();
Intrinsics.checkNotNullExpressionValue(name2, "getName(...)");
myobfuscated.a0.a.v("reg value ready: ", value.name(), name2);
hVar.setResult(-1, intent);
hVar.finish();
}
}
static {
PropertyReference1Impl propertyReference1Impl = new PropertyReference1Impl(WelcomeClassicFragment.class, "viewBinding", "getViewBinding()Lcom/picsart/auth/impl/databinding/FragmentWelcomeClassicBinding;", 0);
r rVar = q.a;
t = new j[]{rVar.f(propertyReference1Impl), myobfuscated.a0.a.l(WelcomeClassicFragment.class, "iconType", "getIconType()I", 0, rVar), myobfuscated.a0.a.l(WelcomeClassicFragment.class, "actionTouchPoint", "getActionTouchPoint()Ljava/lang/String;", 0, rVar), myobfuscated.a0.a.l(WelcomeClassicFragment.class, "forceShowSkipButton", "getForceShowSkipButton()Z", 0, rVar), myobfuscated.a0.a.l(WelcomeClassicFragment.class, "source", "getSource()Ljava/lang/String;", 0, rVar), myobfuscated.a0.a.l(WelcomeClassicFragment.class, "action", "getAction()Ljava/lang/String;", 0, rVar), myobfuscated.a0.a.l(WelcomeClassicFragment.class, "sourceSid", "getSourceSid()Ljava/lang/String;", 0, rVar)};
}
public WelcomeClassicFragment() {
final Function0<Fragment> function0 = new Function0<Fragment>() {
{
super(0);
}
@Override
@NotNull
public final Fragment invoke() {
return Fragment.this;
}
};
LazyThreadSafetyMode lazyThreadSafetyMode = LazyThreadSafetyMode.NONE;
this.d = kotlin.a.a(lazyThreadSafetyMode, new Function0<com.picsart.auth.impl.welcome.presentation.classic.a>() {
{
super(0);
}
@Override
@NotNull
public final a invoke() {
myobfuscated.i4.a defaultViewModelCreationExtras;
Fragment fragment = Fragment.this;
myobfuscated.yp2.a aVar = r2;
Function0 function02 = function0;
Function0 function03 = r4;
Function0 function04 = r5;
z viewModelStore = ((a0) function02.invoke()).getViewModelStore();
if (function03 == null || (defaultViewModelCreationExtras = (myobfuscated.i4.a) function03.invoke()) == null) {
defaultViewModelCreationExtras = fragment.getDefaultViewModelCreationExtras();
Intrinsics.checkNotNullExpressionValue(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
}
return myobfuscated.op2.a.a(q.a.b(a.class), viewModelStore, null, defaultViewModelCreationExtras, aVar, myobfuscated.jp2.a.a(fragment), function04);
}
});
final Function0<androidx.fragment.app.h> function02 = new Function0<androidx.fragment.app.h>() {
{
super(0);
}
@Override
@NotNull
public final androidx.fragment.app.h invoke() {
androidx.fragment.app.h requireActivity = Fragment.this.requireActivity();
Intrinsics.checkNotNullExpressionValue(requireActivity, "requireActivity()");
return requireActivity;
}
};
this.e = kotlin.a.a(lazyThreadSafetyMode, new Function0<SocialSignInSharedViewModel>() {
{
super(0);
}
@Override
@NotNull
public final SocialSignInSharedViewModel invoke() {
myobfuscated.i4.a defaultViewModelCreationExtras;
Fragment fragment = Fragment.this;
myobfuscated.yp2.a aVar = r2;
Function0 function03 = function02;
Function0 function04 = r4;
Function0 function05 = r5;
z viewModelStore = ((a0) function03.invoke()).getViewModelStore();
if (function04 == null || (defaultViewModelCreationExtras = (myobfuscated.i4.a) function04.invoke()) == null) {
defaultViewModelCreationExtras = fragment.getDefaultViewModelCreationExtras();
Intrinsics.checkNotNullExpressionValue(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
}
return myobfuscated.op2.a.a(q.a.b(SocialSignInSharedViewModel.class), viewModelStore, null, defaultViewModelCreationExtras, aVar, myobfuscated.jp2.a.a(fragment), function05);
}
});
final Function0<Fragment> function03 = new Function0<Fragment>() {
{
super(0);
}
@Override
@NotNull
public final Fragment invoke() {
return Fragment.this;
}
};
this.f = kotlin.a.a(lazyThreadSafetyMode, new Function0<com.picsart.auth.impl.common.presentation.a>() {
{
super(0);
}
@Override
@NotNull
public final com.picsart.auth.impl.common.presentation.a invoke() {
myobfuscated.i4.a defaultViewModelCreationExtras;
Fragment fragment = Fragment.this;
myobfuscated.yp2.a aVar = r2;
Function0 function04 = function03;
Function0 function05 = r4;
Function0 function06 = r5;
z viewModelStore = ((a0) function04.invoke()).getViewModelStore();
if (function05 == null || (defaultViewModelCreationExtras = (myobfuscated.i4.a) function05.invoke()) == null) {
defaultViewModelCreationExtras = fragment.getDefaultViewModelCreationExtras();
Intrinsics.checkNotNullExpressionValue(defaultViewModelCreationExtras, "this.defaultViewModelCreationExtras");
}
return myobfuscated.op2.a.a(q.a.b(com.picsart.auth.impl.common.presentation.a.class), viewModelStore, null, defaultViewModelCreationExtras, aVar, myobfuscated.jp2.a.a(fragment), function06);
}
});
LazyThreadSafetyMode lazyThreadSafetyMode2 = LazyThreadSafetyMode.SYNCHRONIZED;
this.g = kotlin.a.a(lazyThreadSafetyMode2, new Function0<p6>() {
{
super(0);
}
@Override
@NotNull
public final p6 invoke() {
ComponentCallbacks componentCallbacks = this;
myobfuscated.yp2.a aVar = r2;
return myobfuscated.jp2.a.a(componentCallbacks).b(r3, q.a.b(p6.class), aVar);
}
});
this.h = kotlin.a.a(lazyThreadSafetyMode2, new Function0<myobfuscated.x72.a>() {
{
super(0);
}
@Override
@NotNull
public final myobfuscated.x72.a invoke() {
ComponentCallbacks componentCallbacks = this;
myobfuscated.yp2.a aVar = r2;
return myobfuscated.jp2.a.a(componentCallbacks).b(r3, q.a.b(myobfuscated.x72.a.class), aVar);
}
});
this.i = kotlin.a.a(lazyThreadSafetyMode2, new Function0<myobfuscated.u10.a>() {
{
super(0);
}
@Override
@NotNull
public final myobfuscated.u10.a invoke() {
ComponentCallbacks componentCallbacks = this;
myobfuscated.yp2.a aVar = r2;
return myobfuscated.jp2.a.a(componentCallbacks).b(r3, q.a.b(myobfuscated.u10.a.class), aVar);
}
});
this.j = new myobfuscated.ts0.a("icon_type", -1);
this.k = new myobfuscated.ts0.a("key_login_touch_point", "");
this.l = new myobfuscated.ts0.a("force_show_skip_button", Boolean.FALSE);
this.m = new myobfuscated.ts0.a("source", "");
this.n = new myobfuscated.ts0.a("action", "");
this.o = new myobfuscated.ts0.a("source_sid", "");
this.p = kotlin.a.b(new Function0<Integer>() {
@Override
@NotNull
public final Integer invoke() {
return Integer.valueOf(View.generateViewId());
}
});
this.q = kotlin.a.b(new Function0<AlertView>() {
{
super(0);
}
@Override
public final AlertView invoke() {
AlertView s;
androidx.fragment.app.h activity = WelcomeClassicFragment.this.getActivity();
if (activity == null || (s = b.s(activity, true)) == null) {
return null;
}
s.setAnalyticsModel(new myobfuscated.o22.a(SourceParam.REGISTRATION.getValue(), SourceParam.LOGIN.getValue(), null, 4));
return s;
}
});
this.r = kotlin.a.b(new Function0<AlertView>() {
{
super(0);
}
@Override
public final AlertView invoke() {
AlertView u;
androidx.fragment.app.h activity = WelcomeClassicFragment.this.getActivity();
if (activity == null || (u = b.u(activity, true)) == null) {
return null;
}
u.setAutoHide(true);
u.setAnalyticsModel(new myobfuscated.o22.a(SourceParam.REGISTRATION.getValue(), SourceParam.LOGIN.getValue(), null, 4));
return u;
}
});
}
public static final Object J3(WelcomeClassicFragment welcomeClassicFragment, String str, c cVar) {
Object a2;
androidx.fragment.app.h activity = welcomeClassicFragment.getActivity();
if (activity == null) {
return Unit.a;
}
d dVar = (d) kotlinx.coroutines.flow.a.b(welcomeClassicFragment.I3().e).b.getValue();
return (dVar.o && (a2 = welcomeClassicFragment.I3().n.a(activity, str, dVar.k, cVar)) == CoroutineSingletons.COROUTINE_SUSPENDED) ? a2 : Unit.a;
}
public static void L3(WelcomeClassicFragment welcomeClassicFragment, Intent intent, boolean z, Boolean bool, boolean z2, int i) {
if ((i & 2) != 0) {
z = false;
}
if ((i & 4) != 0) {
bool = null;
}
if ((i & 8) != 0) {
z2 = false;
}
androidx.fragment.app.h activity = welcomeClassicFragment.getActivity();
if (activity == null) {
return;
}
intent.putExtra("registration_sid", ((d) kotlinx.coroutines.flow.a.b(welcomeClassicFragment.I3().e).b.getValue()).k);
if (z2 && bool != null) {
com.picsart.auth.impl.welcome.presentation.classic.a I3 = welcomeClassicFragment.I3();
boolean booleanValue = bool.booleanValue();
I3.getClass();
String name = com.picsart.auth.impl.welcome.presentation.classic.a.class.getName();
Intrinsics.checkNotNullExpressionValue(name, "getName(...)");
myobfuscated.v10.a aVar = I3.l;
aVar.b(name, booleanValue);
aVar.a();
}
int N3 = welcomeClassicFragment.N3();
if (N3 == 0) {
activity.setResult(-1, intent);
activity.finish();
} else if (N3 != 1) {
} else {
Pair pair = z ? new Pair(SourceParam.REGISTRATION_SKIP.getValue(), "registration_skip") : new Pair(SourceParam.SIGN_IN.getValue(), "sign_in");
String str = (String) pair.component1();
Intrinsics.e(str);
((p6) welcomeClassicFragment.g.getValue()).g(activity, com.picsart.auth.impl.welcome.util.b.d(str, (String) pair.component2(), ((d) kotlinx.coroutines.flow.a.b(welcomeClassicFragment.I3().e).b.getValue()).k), new myobfuscated.s10.b(intent, activity));
}
}
@Override
public final int E3() {
return R.layout.fragment_welcome_classic;
}
@Override
public final void G3(@NotNull View view, Bundle bundle) {
Pair pair;
Intent intent;
String stringExtra;
Intrinsics.checkNotNullParameter(view, "view");
super.G3(view, bundle);
SourceParam sourceParam = SourceParam.REGISTRATION;
String value = sourceParam.getValue();
Intrinsics.checkNotNullExpressionValue(value, "getValue(...)");
H3(new b.c(value));
androidx.fragment.app.h activity = getActivity();
if (activity != null && (intent = activity.getIntent()) != null && (stringExtra = intent.getStringExtra("URI")) != null && (kotlin.text.d.w(stringExtra, "https://picsart.com/sign-in", false) || kotlin.text.d.w(stringExtra, "picsart://sign-in", false))) {
String value2 = sourceParam.getValue();
Intrinsics.checkNotNullExpressionValue(value2, "getValue(...)");
R3("", value2);
}
p P3 = P3();
ImageView ivSettings = P3.g;
Intrinsics.checkNotNullExpressionValue(ivSettings, "ivSettings");
myobfuscated.l22.c.a(ivSettings, new Function1<View, Unit>() {
{
super(1);
}
@Override
public Unit invoke(View view2) {
invoke2(view2);
return Unit.a;
}
public final void invoke2(@NotNull View it) {
Intrinsics.checkNotNullParameter(it, "it");
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
j<Object>[] jVarArr = WelcomeClassicFragment.t;
androidx.fragment.app.h activity2 = welcomeClassicFragment.getActivity();
if (activity2 == null) {
return;
}
a I3 = welcomeClassicFragment.I3();
I3.getClass();
I3.g.a(new g("self_profile_actions", com.appsflyer.internal.c.u(EventParam.ACTION.getValue(), SourceParam.SETTINGS.getValue())));
Intent intent2 = new Intent();
intent2.setClassName(activity2.getPackageName(), "com.socialin.android.preference.PreferencesActivity");
welcomeClassicFragment.startActivity(intent2);
}
});
SimpleDraweeView dwBackground = P3.c;
Intrinsics.checkNotNullExpressionValue(dwBackground, "dwBackground");
myobfuscated.ir0.d dVar = I3().o;
Context context = dwBackground.getContext();
Intrinsics.checkNotNullExpressionValue(context, "getContext(...)");
com.picsart.imageloader.a.b(dwBackground, Integer.valueOf(f.b(dVar, context)), null, 6);
ConstraintLayout constraintLayout = P3.a;
Intrinsics.checkNotNullExpressionValue(constraintLayout, "getRoot(...)");
myobfuscated.l22.c.a(constraintLayout, new Function1<View, Unit>() {
{
super(1);
}
@Override
public Unit invoke(View view2) {
invoke2(view2);
return Unit.a;
}
public final void invoke2(@NotNull View it) {
Intrinsics.checkNotNullParameter(it, "it");
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
b.i iVar = new b.i(false);
j<Object>[] jVarArr = WelcomeClassicFragment.t;
welcomeClassicFragment.H3(iVar);
}
});
final p P32 = P3();
ConstraintLayout constraintLayout2 = P32.a;
w wVar = new w() {
@Override
public final w0 a(View view2, w0 windowInsets) {
j<Object>[] jVarArr = WelcomeClassicFragment.t;
p this_with = p.this;
Intrinsics.checkNotNullParameter(this_with, "$this_with");
Intrinsics.checkNotNullParameter(view2, "<anonymous parameter 0>");
Intrinsics.checkNotNullParameter(windowInsets, "windowInsets");
myobfuscated.e3.f g = windowInsets.a.g(7);
Intrinsics.checkNotNullExpressionValue(g, "getInsets(...)");
PicsartTextView tvSkip = this_with.m;
Intrinsics.checkNotNullExpressionValue(tvSkip, "tvSkip");
myobfuscated.dx0.a.g(tvSkip, 0, g.b, 0, 0, 13);
ImageView ivOnBoarding = this_with.f;
Intrinsics.checkNotNullExpressionValue(ivOnBoarding, "ivOnBoarding");
myobfuscated.dx0.a.g(ivOnBoarding, 0, SpacingSystem.S64.getPxValueInt() + g.b, 0, 0, 13);
return w0.b;
}
};
WeakHashMap<View, q0> weakHashMap = g0.a;
g0.i.u(constraintLayout2, wVar);
p P33 = P3();
if (getResources().getConfiguration().screenWidthDp >= 600) {
pair = new Pair(Integer.valueOf(SpacingSystem.S72.getPxValueInt()), Integer.valueOf(SpacingSystem.S0.getPxValueInt()));
} else {
boolean c = Intrinsics.c(M3(), Scopes.PROFILE);
Integer valueOf = Integer.valueOf(SpacingSystem.S64.getPxValueInt());
int pxValueInt = SpacingSystem.S72.getPxValueInt();
if (c) {
pxValueInt -= SpacingSystem.S56.getPxValueInt();
}
pair = new Pair(valueOf, Integer.valueOf(pxValueInt));
}
int intValue = ((Number) pair.component1()).intValue();
int intValue2 = ((Number) pair.component2()).intValue();
SpacingSystem spacingSystem = SpacingSystem.S16;
int pxValueInt2 = spacingSystem.getPxValueInt();
ImageView ivOnBoarding = P33.f;
Intrinsics.checkNotNullExpressionValue(ivOnBoarding, "ivOnBoarding");
myobfuscated.dx0.a.g(ivOnBoarding, 0, intValue, 0, 0, 13);
LinearLayout containerButtons = P33.b;
Intrinsics.checkNotNullExpressionValue(containerButtons, "containerButtons");
myobfuscated.dx0.a.g(containerButtons, 0, pxValueInt2, 0, 0, 13);
PicsartTextView tvReadTerms = P33.l;
Intrinsics.checkNotNullExpressionValue(tvReadTerms, "tvReadTerms");
myobfuscated.dx0.a.g(tvReadTerms, 0, pxValueInt2, 0, 0, 13);
PicsartTextView tvAlreadyHaveAnAccount = P33.i;
Intrinsics.checkNotNullExpressionValue(tvAlreadyHaveAnAccount, "tvAlreadyHaveAnAccount");
myobfuscated.dx0.a.g(tvAlreadyHaveAnAccount, 0, 0, 0, intValue2, 7);
p P34 = P3();
int pxValueInt3 = spacingSystem.getPxValueInt();
int pxValueInt4 = SpacingSystem.S24.getPxValueInt();
PicsartTextView picsartTextView = P34.m;
Intrinsics.e(picsartTextView);
picsartTextView.setPadding(pxValueInt3, pxValueInt3, pxValueInt3, pxValueInt3);
Typography typography = Typography.T4;
FontWights fontWights = FontWights.SEMI_BOLD;
picsartTextView.setTypographyApiModel(new myobfuscated.ri2.b(typography, fontWights));
picsartTextView.setTextColor(myobfuscated.fi2.a.e.a);
picsartTextView.setDarkMode(false);
ImageView imageView = P34.g;
Intrinsics.e(imageView);
imageView.setPadding(pxValueInt3, pxValueInt3, pxValueInt3, pxValueInt3);
imageView.setImageResource(R.drawable.icon_settings);
imageView.setImageTintList(ColorStateList.valueOf(myobfuscated.fi2.a.e.a.c()));
PicsartTextView picsartTextView2 = P34.k;
Intrinsics.e(picsartTextView2);
myobfuscated.dx0.a.g(picsartTextView2, 0, pxValueInt3, 0, 0, 13);
picsartTextView2.setTypographyApiModel(new myobfuscated.ri2.b(Typography.T7, fontWights));
picsartTextView2.setTextColor(myobfuscated.fi2.a.e.a);
picsartTextView2.setDarkMode(false);
Typography typography2 = Typography.T5;
FontWights fontWights2 = FontWights.MEDIUM;
myobfuscated.ri2.b bVar = new myobfuscated.ri2.b(typography2, fontWights2);
PicsartTextView picsartTextView3 = P34.l;
picsartTextView3.setTypographyApiModel(bVar);
picsartTextView3.setTextColor(myobfuscated.fi2.a.e.a);
picsartTextView3.setDarkMode(false);
PicsartTextView picsartTextView4 = P34.i;
Intrinsics.e(picsartTextView4);
myobfuscated.dx0.a.g(picsartTextView4, pxValueInt4, 0, pxValueInt4, 0, 10);
picsartTextView4.setPadding(picsartTextView4.getPaddingLeft(), pxValueInt3, picsartTextView4.getPaddingRight(), pxValueInt3);
picsartTextView4.setTypographyApiModel(new myobfuscated.ri2.b(typography, fontWights2));
picsartTextView4.setTextColor(myobfuscated.fi2.a.e.a);
picsartTextView4.setDarkMode(false);
m.b(this, "key_register_skipped", new Function2<String, Bundle, Unit>() {
{
super(2);
}
@Override
public Unit invoke(String str, Bundle bundle2) {
invoke2(str, bundle2);
return Unit.a;
}
public final void invoke2(@NotNull String key, @NotNull Bundle data2) {
Intrinsics.checkNotNullParameter(key, "key");
Intrinsics.checkNotNullParameter(data2, "data");
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
j<Object>[] jVarArr = WelcomeClassicFragment.t;
welcomeClassicFragment.getClass();
if (Intrinsics.c(key, "key_register_skipped") && data2.containsKey("key_register_skipped") && data2.getBoolean("key_register_skipped", false)) {
welcomeClassicFragment.H3(new b.j(true));
}
}
});
m.b(this, "key_open_sign_in", new Function2<String, Bundle, Unit>() {
{
super(2);
}
@Override
public Unit invoke(String str, Bundle bundle2) {
invoke2(str, bundle2);
return Unit.a;
}
public final void invoke2(@NotNull String str, @NotNull Bundle data2) {
Intrinsics.checkNotNullParameter(str, "<anonymous parameter 0>");
Intrinsics.checkNotNullParameter(data2, "data");
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
j<Object>[] jVarArr = WelcomeClassicFragment.t;
welcomeClassicFragment.getClass();
String string = data2.getString("key_existing_email");
String value3 = SourceParam.LOGIN.getValue();
Intrinsics.checkNotNullExpressionValue(value3, "getValue(...)");
welcomeClassicFragment.H3(new b.d(false, value3));
if (string == null) {
string = "";
}
String value4 = SourceParam.EMAIL.getValue();
Intrinsics.checkNotNullExpressionValue(value4, "getValue(...)");
welcomeClassicFragment.R3(string, value4);
}
});
m.b(this, "request_finish_register", new Function2<String, Bundle, Unit>() {
{
super(2);
}
@Override
public Unit invoke(String str, Bundle bundle2) {
invoke2(str, bundle2);
return Unit.a;
}
public final void invoke2(@NotNull String str, @NotNull Bundle data2) {
Intrinsics.checkNotNullParameter(str, "<anonymous parameter 0>");
Intrinsics.checkNotNullParameter(data2, "data");
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
j<Object>[] jVarArr = WelcomeClassicFragment.t;
androidx.fragment.app.h activity2 = welcomeClassicFragment.getActivity();
Intent intent2 = activity2 != null ? activity2.getIntent() : null;
if (intent2 == null) {
return;
}
boolean z = data2.getBoolean("from_sign_up", false);
boolean z2 = data2.getBoolean("key_register_skipped", false);
intent2.putExtra("from_sign_up", z);
intent2.putExtra("key_register_skipped", z2);
intent2.putExtra("registration_sid", ((d) kotlinx.coroutines.flow.a.b(welcomeClassicFragment.I3().e).b.getValue()).k);
welcomeClassicFragment.K3(0, null);
}
});
m.b(this, "key_success_signin", new Function2<String, Bundle, Unit>() {
{
super(2);
}
@Override
public Unit invoke(String str, Bundle bundle2) {
invoke2(str, bundle2);
return Unit.a;
}
public final void invoke2(@NotNull String str, @NotNull Bundle data2) {
Intrinsics.checkNotNullParameter(str, "<anonymous parameter 0>");
Intrinsics.checkNotNullParameter(data2, "data");
boolean z = data2.getBoolean("arg_is_signup", false);
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
j<Object>[] jVarArr = WelcomeClassicFragment.t;
androidx.fragment.app.h activity2 = welcomeClassicFragment.getActivity();
Intent intent2 = activity2 != null ? activity2.getIntent() : null;
if (intent2 == null) {
intent2 = new Intent();
}
Intent intent3 = intent2;
intent3.putExtra("from_sign_up", z);
intent3.putExtra("from_sign_in", !z);
WelcomeClassicFragment.L3(welcomeClassicFragment, intent3, false, Boolean.valueOf(z), false, 2);
}
});
m.b(this, "key_reg_finished", new Function2<String, Bundle, Unit>() {
{
super(2);
}
@Override
public Unit invoke(String str, Bundle bundle2) {
invoke2(str, bundle2);
return Unit.a;
}
public final void invoke2(@NotNull String str, @NotNull Bundle data2) {
Intrinsics.checkNotNullParameter(str, "<anonymous parameter 0>");
Intrinsics.checkNotNullParameter(data2, "data");
if (((d) kotlinx.coroutines.flow.a.b(WelcomeClassicFragment.this.I3().e).b.getValue()).q) {
return;
}
WelcomeClassicFragment.this.H3(new b.j(data2.getBoolean("arg_is_network_error", false)));
}
});
SocialSignInSharedViewModel socialSignInSharedViewModel = (SocialSignInSharedViewModel) this.e.getValue();
StateFlowImpl stateFlowImpl = socialSignInSharedViewModel.m;
Lifecycle lifecycle = getLifecycle();
Intrinsics.checkNotNullExpressionValue(lifecycle, "<get-lifecycle>(...)");
Lifecycle.State state = Lifecycle.State.STARTED;
kotlinx.coroutines.flow.a.v(new FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1(new WelcomeClassicFragment$onLayoutReady$2$1(this), new FlowKt__TransformKt$filterNotNull$$inlined$unsafeTransform$1(e.a(stateFlowImpl, lifecycle, state))), androidx.lifecycle.d.a(this));
Lifecycle lifecycle2 = getLifecycle();
Intrinsics.checkNotNullExpressionValue(lifecycle2, "<get-lifecycle>(...)");
kotlinx.coroutines.flow.a.v(new FlowKt__TransformKt$onEach$$inlined$unsafeTransform$1(new WelcomeClassicFragment$onLayoutReady$2$2(this), new FlowKt__TransformKt$filterNotNull$$inlined$unsafeTransform$1(e.a(socialSignInSharedViewModel.n, lifecycle2, state))), androidx.lifecycle.d.a(this));
Lifecycle.State state2 = Lifecycle.State.CREATED;
kotlinx.coroutines.flow.f fVar = socialSignInSharedViewModel.l;
k viewLifecycleOwner = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner), null, null, new WelcomeClassicFragment$onLayoutReady$lambda$3$$inlined$collectWithLifecycle$1(viewLifecycleOwner, state2, fVar, null, this), 3);
kotlinx.coroutines.flow.f fVar2 = socialSignInSharedViewModel.o;
k viewLifecycleOwner2 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner2, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner2), null, null, new WelcomeClassicFragment$onLayoutReady$lambda$3$$inlined$collectWithLifecycle$2(viewLifecycleOwner2, state2, fVar2, null, this), 3);
kotlinx.coroutines.flow.f fVar3 = socialSignInSharedViewModel.q;
k viewLifecycleOwner3 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner3, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner3), null, null, new WelcomeClassicFragment$onLayoutReady$lambda$3$$inlined$collectWithLifecycle$3(viewLifecycleOwner3, state2, fVar3, null, this), 3);
kotlinx.coroutines.flow.f fVar4 = socialSignInSharedViewModel.p;
k viewLifecycleOwner4 = getViewLifecycleOwner();
Intrinsics.checkNotNullExpressionValue(viewLifecycleOwner4, "viewLifecycleOwner");
kotlinx.coroutines.b.c(androidx.lifecycle.d.a(viewLifecycleOwner4), null, null, new WelcomeClassicFragment$onLayoutReady$lambda$3$$inlined$collectWithLifecycle$4(viewLifecycleOwner4, state2, fVar4, null, this), 3);
}
public final void K3(int i, Intent intent) {
String stringExtra;
androidx.fragment.app.h activity = getActivity();
if (activity == null) {
return;
}
String value = SourceParam.REGISTRATION.getValue();
Intrinsics.checkNotNullExpressionValue(value, "getValue(...)");
w2 d = com.picsart.auth.impl.welcome.util.b.d(value, AppLovinEventTypes.USER_CREATED_ACCOUNT, ((d) kotlinx.coroutines.flow.a.b(I3().e).b.getValue()).k);
if (N3() != 2) {
((p6) this.g.getValue()).g(activity, d, new b(activity, d, activity.getIntent()));
} else if (i == 0) {
if (intent != null && (stringExtra = intent.getStringExtra("existing_email")) != null && stringExtra.length() > 0) {
String value2 = SourceParam.LOGIN.getValue();
Intrinsics.checkNotNullExpressionValue(value2, "getValue(...)");
H3(new b.d(false, value2));
String value3 = SourceParam.EMAIL.getValue();
Intrinsics.checkNotNullExpressionValue(value3, "getValue(...)");
R3(stringExtra, value3);
}
if (intent != null) {
boolean booleanExtra = intent.getBooleanExtra("key_skip_visibility", false);
H3(b.h.a);
H3(new b.j(booleanExtra));
S3();
}
}
}
public final String M3() {
return (String) this.k.getValue(this, t[2]);
}
public final int N3() {
return ((Number) this.j.getValue(this, t[1])).intValue();
}
public final String O3() {
return (String) this.m.getValue(this, t[4]);
}
@NotNull
public final p P3() {
return (p) this.c.getValue(this, t[0]);
}
@Override
@NotNull
public final com.picsart.auth.impl.welcome.presentation.classic.a I3() {
return (com.picsart.auth.impl.welcome.presentation.classic.a) this.d.getValue();
}
public final void R3(String str, String str2) {
NavController a2;
if (this.s) {
return;
}
this.s = true;
d dVar = (d) kotlinx.coroutines.flow.a.b(I3().e).b.getValue();
String str3 = dVar.k;
boolean z = dVar.e;
boolean z2 = dVar.f;
boolean z3 = dVar.o;
String str4 = dVar.i;
String keyLoginTouchPoint = dVar.d;
try {
a2 = myobfuscated.o4.d.a(this);
} catch (Exception unused) {
androidx.fragment.app.h activity = getActivity();
a2 = activity != null ? androidx.navigation.a.a(activity, R.id.contentLayout) : null;
}
NavController navController = a2;
if (navController != null) {
boolean z4 = N3() == 2;
Intrinsics.checkNotNullParameter(keyLoginTouchPoint, "keyLoginTouchPoint");
myobfuscated.s10.d directions = new myobfuscated.s10.d(str3, str, z, z4, str4, str2, keyLoginTouchPoint, z3, z, z2);
NavBackStackEntry m = navController.m();
if ((m != null ? m.b : null) == null) {
Intrinsics.checkNotNullParameter(directions, "directions");
navController.o(R.id.action_welcome_to_sign_in, directions.a(), null, null);
}
}
}
public final void S3() {
androidx.fragment.app.h activity = getActivity();
Intent intent = activity != null ? activity.getIntent() : null;
if (intent == null) {
return;
}
intent.putExtra("key_register_skipped", true);
L3(this, intent, true, null, false, 12);
}
@Override
public final void onActivityResult(int i, int i2, Intent intent) {
androidx.fragment.app.h activity;
String stringExtra;
super.onActivityResult(i, i2, intent);
if (1112 != i || (activity = getActivity()) == null) {
return;
}
if (-1 == i2) {
Intent intent2 = activity.getIntent();
Intrinsics.checkNotNullExpressionValue(intent2, "getIntent(...)");
if (intent != null) {
boolean booleanExtra = intent.getBooleanExtra("from_sign_up", false);
boolean booleanExtra2 = intent.getBooleanExtra("key_register_skipped", false);
intent2.putExtra("from_sign_up", booleanExtra);
intent2.putExtra("key_register_skipped", booleanExtra2);
intent2.putExtra("registration_sid", ((d) kotlinx.coroutines.flow.a.b(I3().e).b.getValue()).k);
}
K3(i2, intent);
} else if (i2 != 0 || intent == null || (stringExtra = intent.getStringExtra("existing_email")) == null || stringExtra.length() <= 0) {
} else {
com.picsart.auth.impl.welcome.presentation.classic.a I3 = I3();
String value = SourceParam.EMAIL_PASSWORD_REGISTRATION.getValue();
Intrinsics.checkNotNullExpressionValue(value, "getValue(...)");
I3.j4(value, ((d) kotlinx.coroutines.flow.a.b(I3.e).b.getValue()).h);
String value2 = SourceParam.EMAIL.getValue();
Intrinsics.checkNotNullExpressionValue(value2, "getValue(...)");
R3(stringExtra, value2);
}
}
@Override
public final void onCreate(Bundle bundle) {
super.onCreate(bundle);
com.picsart.auth.impl.welcome.presentation.classic.a I3 = I3();
I3.getClass();
I3.j.a(new myobfuscated.b72.g("registration_load"));
int N3 = N3();
j<?>[] jVarArr = t;
boolean booleanValue = ((Boolean) this.l.getValue(this, jVarArr[3])).booleanValue();
String M3 = M3();
boolean c = Intrinsics.c(M3(), "appStart");
boolean c2 = Intrinsics.c(M3(), Scopes.PROFILE);
H3(new b.a(N3, M3, O3(), (String) this.n.getValue(this, jVarArr[5]), (String) this.o.getValue(this, jVarArr[6]), booleanValue, c, c2));
}
@Override
public final void onDestroyView() {
if (((d) kotlinx.coroutines.flow.a.b(I3().e).b.getValue()).f && !this.s) {
String value = SourceParam.CANCEL.getValue();
Intrinsics.checkNotNullExpressionValue(value, "getValue(...)");
H3(new b.C1489b(value));
}
this.s = false;
super.onDestroyView();
onDetach();
Fragment F = getParentFragmentManager().F("tag_social_login_fragment");
if (F != null) {
FragmentManager parentFragmentManager = getParentFragmentManager();
Intrinsics.checkNotNullExpressionValue(parentFragmentManager, "getParentFragmentManager(...)");
parentFragmentManager.getClass();
androidx.fragment.app.b bVar = new androidx.fragment.app.b(parentFragmentManager);
Intrinsics.checkNotNullExpressionValue(bVar, "beginTransaction()");
bVar.m(F);
bVar.t(true);
}
P3().b.removeAllViews();
}
@Override
public final void onResume() {
super.onResume();
I3().j.b("registration_load");
}
@Override
public final void t0(myobfuscated.vs0.f fVar) {
boolean z;
IconType iconType;
String str;
LinearLayout linearLayout;
List<SettingsButton> list;
boolean z2;
String str2;
List<SettingsButton> list2;
String str3;
String str4;
int i;
SettingsClickableText settingsClickableText;
d state = (d) fVar;
Intrinsics.checkNotNullParameter(state, "state");
com.picsart.auth.impl.common.entity.model.settings.a aVar = state.l;
final p P3 = P3();
String str5 = state.d;
if (aVar != null) {
String str6 = aVar.n;
if (str6 == null) {
str6 = "";
}
if (aVar.k) {
Context context = getContext();
int h0 = myobfuscated.sr.e.h0(myobfuscated.an2.r.K(context != null ? Boolean.valueOf(myobfuscated.qr0.d.f(context)) : null) ? 96.0f : 16.0f);
int top = P3.j.getTop();
ImageView ivOnBoarding = P3.f;
boolean z3 = top - ivOnBoarding.getBottom() > h0;
Intrinsics.checkNotNullExpressionValue(ivOnBoarding, "ivOnBoarding");
ivOnBoarding.setVisibility(z3 ? 0 : 8);
if (!z3) {
boolean c = Intrinsics.c(InneractiveMediationNameConsts.OTHER, str5);
String str7 = aVar.m;
if (!c || str7.length() <= 0) {
str6 = str7;
}
myobfuscated.rr0.f.b(str6, new Function1<String, Unit>() {
{
super(1);
}
@Override
public Unit invoke(String str8) {
invoke2(str8);
return Unit.a;
}
public final void invoke2(@NotNull String it) {
Intrinsics.checkNotNullParameter(it, "it");
PicsartTextView tvOnBoardingSubtitle = p.this.k;
Intrinsics.checkNotNullExpressionValue(tvOnBoardingSubtitle, "tvOnBoardingSubtitle");
com.picsart.extensions.android.b.h(tvOnBoardingSubtitle);
p.this.k.setText(it);
}
});
}
} else {
ImageView ivOnBoarding2 = P3.f;
Intrinsics.checkNotNullExpressionValue(ivOnBoarding2, "ivOnBoarding");
com.picsart.extensions.android.b.c(ivOnBoarding2);
}
}
TextView textView = P3().j;
com.picsart.auth.impl.common.entity.model.settings.a aVar2 = state.l;
if (aVar2 != null) {
String str8 = aVar2.j.get(str5);
String str9 = str8 != null ? str8 : "";
if (str9.length() != 0) {
Intrinsics.e(textView);
com.picsart.extensions.android.b.h(textView);
textView.setText(str9);
if (state.e) {
textView.setTextSize(24.0f);
textView.setTypeface(textView.getTypeface(), 1);
}
}
}
p P32 = P3();
int[] iArr = a.a;
IconType iconType2 = state.a;
int i2 = iArr[iconType2.ordinal()];
if (i2 == 1) {
PicsartTextView tvSkip = P32.m;
Intrinsics.checkNotNullExpressionValue(tvSkip, "tvSkip");
com.picsart.extensions.android.b.b(tvSkip);
ImageView ivSettings = P32.g;
Intrinsics.checkNotNullExpressionValue(ivSettings, "ivSettings");
com.picsart.extensions.android.b.b(ivSettings);
} else if (i2 == 2) {
PicsartTextView tvSkip2 = P32.m;
Intrinsics.checkNotNullExpressionValue(tvSkip2, "tvSkip");
com.picsart.extensions.android.b.h(tvSkip2);
ImageView ivSettings2 = P32.g;
Intrinsics.checkNotNullExpressionValue(ivSettings2, "ivSettings");
com.picsart.extensions.android.b.b(ivSettings2);
} else if (i2 == 3) {
PicsartTextView tvSkip3 = P32.m;
Intrinsics.checkNotNullExpressionValue(tvSkip3, "tvSkip");
com.picsart.extensions.android.b.b(tvSkip3);
ImageView ivSettings3 = P32.g;
Intrinsics.checkNotNullExpressionValue(ivSettings3, "ivSettings");
com.picsart.extensions.android.b.h(ivSettings3);
}
String str10 = state.k;
String str11 = state.d;
String str12 = " ";
boolean z4 = state.g;
if (aVar2 != null) {
List<SettingsButton> list3 = aVar2.a;
int i3 = 0;
for (Object obj : list3) {
int i4 = i3 + 1;
if (i3 < 0) {
o.m();
throw null;
}
final SettingsButton settingsButton = (SettingsButton) obj;
SettingsRegButtonType settingsRegButtonType = settingsButton.f;
if (settingsRegButtonType == null) {
break;
}
if (!(settingsRegButtonType instanceof SettingsRegButtonType.Skip)) {
z = z4;
if ((settingsRegButtonType instanceof SettingsRegButtonType.Main) || Intrinsics.c(settingsRegButtonType, SettingsRegButtonType.Magic.a)) {
LinearLayout linearLayout2 = P3().b;
Intrinsics.e(linearLayout2);
l0 c2 = m0.c(m0.b(linearLayout2).a);
while (true) {
if (c2.hasNext()) {
if (Intrinsics.c(((View) c2.next()).getContentDescription(), "get_started_button")) {
break;
}
} else {
Context context2 = linearLayout2.getContext();
Intrinsics.checkNotNullExpressionValue(context2, "getContext(...)");
PicsartButton a2 = com.picsart.auth.impl.welcome.util.b.a(this, context2, settingsButton, new Function0<Unit>() {
{
super(0);
}
@Override
public Unit invoke() {
invoke2();
return Unit.a;
}
public final void invoke2() {
NavController a3;
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
b.f fVar2 = b.f.a;
j<Object>[] jVarArr = WelcomeClassicFragment.t;
welcomeClassicFragment.H3(fVar2);
final WelcomeClassicFragment welcomeClassicFragment2 = WelcomeClassicFragment.this;
if (settingsButton.f == null) {
welcomeClassicFragment2.getClass();
} else if (welcomeClassicFragment2.s) {
} else {
final boolean z5 = true;
welcomeClassicFragment2.s = true;
d dVar = (d) kotlinx.coroutines.flow.a.b(welcomeClassicFragment2.I3().e).b.getValue();
final String str13 = dVar.k;
final boolean z6 = dVar.e || Intrinsics.c(welcomeClassicFragment2.M3(), "homeSignUp");
if (dVar.b || Intrinsics.c(welcomeClassicFragment2.O3(), SourceParam.AI_AVATAR.getValue()) || Intrinsics.c(welcomeClassicFragment2.O3(), SourceParam.AI_TEXT_TO_IMAGE.getValue()) || Intrinsics.c(welcomeClassicFragment2.O3(), SourceParam.AI_REPLACE.getValue())) {
z5 = false;
}
if (dVar.c) {
((myobfuscated.u10.a) welcomeClassicFragment2.i.getValue()).a(false, dVar.h, dVar.j, welcomeClassicFragment2.getParentFragmentManager(), new Function0<Unit>() {
{
super(0);
}
@Override
public Unit invoke() {
invoke2();
return Unit.a;
}
public final void invoke2() {
NavController a4;
WelcomeClassicFragment welcomeClassicFragment3 = WelcomeClassicFragment.this;
String str14 = str13;
boolean z7 = z6;
boolean z8 = z5;
j<Object>[] jVarArr2 = WelcomeClassicFragment.t;
welcomeClassicFragment3.getClass();
try {
a4 = myobfuscated.o4.d.a(welcomeClassicFragment3);
} catch (Exception unused) {
androidx.fragment.app.h activity = welcomeClassicFragment3.getActivity();
a4 = activity != null ? androidx.navigation.a.a(activity, R.id.contentLayout) : null;
}
if (a4 != null) {
myobfuscated.s10.c directions = new myobfuscated.s10.c(str14, z7, z8);
NavBackStackEntry m = a4.m();
if ((m != null ? m.b : null) == null) {
Intrinsics.checkNotNullParameter(directions, "directions");
a4.o(R.id.action_welcome_to_register, directions.a(), null, null);
}
}
}
});
return;
}
try {
a3 = myobfuscated.o4.d.a(welcomeClassicFragment2);
} catch (Exception unused) {
androidx.fragment.app.h activity = welcomeClassicFragment2.getActivity();
a3 = activity != null ? androidx.navigation.a.a(activity, R.id.contentLayout) : null;
}
if (a3 != null) {
myobfuscated.s10.c directions = new myobfuscated.s10.c(str13, z6, z5);
NavBackStackEntry m = a3.m();
if ((m != null ? m.b : null) == null) {
Intrinsics.checkNotNullParameter(directions, "directions");
a3.o(R.id.action_welcome_to_register, directions.a(), null, null);
}
}
}
}
});
Intrinsics.checkNotNullParameter(this, "<this>");
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(-1, -2);
layoutParams.setMargins(0, 0, 0, SpacingSystem.S16.getPxValueInt());
linearLayout2.addView(a2, layoutParams);
break;
}
}
} else if (settingsRegButtonType instanceof SettingsRegButtonType.Socials) {
p P33 = P3();
LinearLayout containerButtons = P33.b;
Intrinsics.checkNotNullExpressionValue(containerButtons, "containerButtons");
l0 c3 = m0.c(m0.b(containerButtons).a);
while (true) {
boolean hasNext = c3.hasNext();
h hVar = this.p;
if (!hasNext) {
int intValue = ((Number) hVar.getValue()).intValue();
Intrinsics.checkNotNullParameter(this, "<this>");
iconType = iconType2;
LinearLayout linearLayout3 = new LinearLayout(getContext());
linearLayout3.setId(intValue);
linearLayout3.setOrientation(1);
linearLayout3.setContentDescription("socials_container");
if (i3 == 0) {
Context context3 = P33.a.getContext();
Intrinsics.checkNotNullExpressionValue(context3, "getContext(...)");
Intrinsics.checkNotNullParameter(this, "<this>");
Intrinsics.checkNotNullParameter(context3, "context");
String text = settingsButton.b;
Intrinsics.checkNotNullParameter(text, "text");
Intrinsics.checkNotNullParameter(context3, "context");
myobfuscated.ri.b bVar = new myobfuscated.ri.b(context3);
str = str12;
bVar.setTypographyApiModel(new myobfuscated.ri2.b(Typography.T4, FontWights.MEDIUM));
bVar.setTextColor(myobfuscated.fi2.a.e.a);
bVar.setDarkMode(false);
bVar.setGravity(1);
bVar.setText(text);
linearLayout = bVar;
} else {
str = str12;
linearLayout = com.picsart.auth.impl.welcome.util.b.c(this);
}
LinearLayout linearLayout4 = P33.b;
linearLayout4.addView(linearLayout);
SpacingSystem spacingSystem = SpacingSystem.S16;
int pxValueInt = spacingSystem.getPxValueInt();
int pxValueInt2 = SpacingSystem.S8.getPxValueInt();
myobfuscated.dx0.a.g(linearLayout, 0, 0, 0, pxValueInt, 7);
Intrinsics.checkNotNullParameter(this, "<this>");
LinearLayout.LayoutParams layoutParams2 = new LinearLayout.LayoutParams(-1, -2);
layoutParams2.setMargins(0, 0, 0, spacingSystem.getPxValueInt());
linearLayout4.addView(linearLayout3, layoutParams2);
if (i3 == 0 && list3.size() > 1) {
LinearLayout c4 = com.picsart.auth.impl.welcome.util.b.c(this);
linearLayout4.addView(c4);
myobfuscated.dx0.a.g(c4, 0, 0, 0, pxValueInt2, 7);
}
int intValue2 = ((Number) hVar.getValue()).intValue();
FragmentManager parentFragmentManager = getParentFragmentManager();
if (parentFragmentManager.I || parentFragmentManager.S()) {
list = list3;
z2 = z;
} else {
SocialSignInFragment.a aVar3 = SocialSignInFragment.v;
String value = SourceParam.REGISTRATION.getValue();
Intrinsics.checkNotNullExpressionValue(value, "getValue(...)");
aVar3.getClass();
list = list3;
z2 = z;
SocialSignInFragment a3 = SocialSignInFragment.a.a(value, str10, str11, str10, true, 1);
try {
androidx.fragment.app.b bVar2 = new androidx.fragment.app.b(parentFragmentManager);
Intrinsics.checkNotNullExpressionValue(bVar2, "beginTransaction()");
bVar2.k(intValue2, a3, "tag_social_login_fragment", 1);
bVar2.u();
} catch (Exception unused) {
}
}
PicsartTextView tvReadTerms = P33.l;
Intrinsics.checkNotNullExpressionValue(tvReadTerms, "tvReadTerms");
com.picsart.extensions.android.b.h(tvReadTerms);
Integer valueOf = Integer.valueOf(myobfuscated.dx0.a.d(aVar2.i));
if (valueOf.intValue() == -1) {
valueOf = null;
}
PicsartTextView picsartTextView = P3().l;
myobfuscated.r10.b bVar3 = state.n;
int i5 = bVar3.a;
int intValue3 = valueOf != null ? valueOf.intValue() : a.d.g.a.a.a(false);
String string = getString(bVar3.b);
boolean z5 = bVar3.d;
if (z5) {
Intrinsics.e(string);
Locale locale = Locale.getDefault();
Intrinsics.checkNotNullExpressionValue(locale, "getDefault(...)");
Intrinsics.checkNotNullExpressionValue(string.toUpperCase(locale), "this as java.lang.String).toUpperCase(locale)");
}
Intrinsics.checkNotNullExpressionValue(string, "apply(...)");
str2 = str10;
list2 = list;
String str13 = str;
str3 = str11;
str4 = str13;
String r = myobfuscated.mn2.k.r(string, str4, " ", false);
String string2 = getString(bVar3.c);
if (z5) {
Intrinsics.e(string2);
Locale locale2 = Locale.getDefault();
Intrinsics.checkNotNullExpressionValue(locale2, "getDefault(...)");
Intrinsics.checkNotNullExpressionValue(string2.toUpperCase(locale2), "this as java.lang.String).toUpperCase(locale)");
}
Intrinsics.checkNotNullExpressionValue(string2, "apply(...)");
String r2 = myobfuscated.mn2.k.r(string2, str4, " ", false);
String string3 = i5 == R.string.registration_terms_privacy ? getString(R.string.registration_terms_privacy, getString(R.string.register_terms_of_service), getString(R.string.privacy_policy)) : getString(i5);
if (z5) {
Intrinsics.e(string3);
Locale locale3 = Locale.getDefault();
Intrinsics.checkNotNullExpressionValue(locale3, "getDefault(...)");
Intrinsics.checkNotNullExpressionValue(string3.toUpperCase(locale3), "this as java.lang.String).toUpperCase(locale)");
}
Intrinsics.checkNotNullExpressionValue(string3, "apply(...)");
String r3 = myobfuscated.mn2.k.r(myobfuscated.mn2.k.r(string3, string, r, true), string2, r2, true);
Intrinsics.e(picsartTextView);
com.picsart.auth.impl.welcome.util.a.a(picsartTextView, r3, r, r2, intValue3, intValue3, new WelcomeClassicFragment$addClickableAreasToTermsAndPrivacy$1$1(this));
} else if (((View) c3.next()).getId() == ((Number) hVar.getValue()).intValue()) {
break;
}
}
}
} else {
LinearLayout linearLayout5 = P3().b;
Intrinsics.e(linearLayout5);
k0 b2 = m0.b(linearLayout5);
boolean z6 = iconType2 == IconType.SKIP && z4;
ViewGroup viewGroup = b2.a;
l0 c5 = m0.c(viewGroup);
while (true) {
if (!c5.hasNext()) {
z = z4;
Context context4 = linearLayout5.getContext();
Intrinsics.checkNotNullExpressionValue(context4, "getContext(...)");
linearLayout5.addView(com.picsart.auth.impl.welcome.util.b.b(this, context4, settingsButton, z6, new Function0<Unit>() {
{
super(0);
}
@Override
public Unit invoke() {
invoke2();
return Unit.a;
}
public final void invoke2() {
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
b.h hVar2 = b.h.a;
j<Object>[] jVarArr = WelcomeClassicFragment.t;
welcomeClassicFragment.H3(hVar2);
WelcomeClassicFragment.this.S3();
}
}));
Unit unit = Unit.a;
break;
}
z = z4;
if (Intrinsics.c(((View) c5.next()).getContentDescription(), "skip_button")) {
l0 c6 = m0.c(viewGroup);
int i6 = 0;
while (true) {
if (!c6.hasNext()) {
i6 = -1;
break;
}
Object next = c6.next();
if (i6 < 0) {
o.m();
throw null;
} else if (Intrinsics.c(((View) next).getContentDescription(), "skip_button")) {
break;
} else {
i6++;
}
}
} else {
z4 = z;
}
}
}
str2 = str10;
str3 = str11;
iconType = iconType2;
str4 = str12;
list2 = list3;
z2 = z;
str12 = str4;
z4 = z2;
i3 = i4;
iconType2 = iconType;
str11 = str3;
str10 = str2;
list3 = list2;
}
}
IconType iconType3 = iconType2;
String str14 = str12;
boolean z7 = z4;
PicsartTextView picsartTextView2 = P3().m;
SettingsButton settingsButton2 = state.m;
if (settingsButton2 != null) {
boolean z8 = iconType3 == IconType.SKIP && z7;
picsartTextView2.setText(settingsButton2.b);
picsartTextView2.setTextColor(myobfuscated.dx0.a.d(settingsButton2.c));
myobfuscated.l22.c.a(picsartTextView2, new Function1<View, Unit>() {
{
super(1);
}
@Override
public Unit invoke(View view) {
invoke2(view);
return Unit.a;
}
public final void invoke2(@NotNull View it) {
Intrinsics.checkNotNullParameter(it, "it");
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
b.h hVar2 = b.h.a;
j<Object>[] jVarArr = WelcomeClassicFragment.t;
welcomeClassicFragment.H3(hVar2);
WelcomeClassicFragment.this.S3();
}
});
picsartTextView2.setVisibility(z8 ? 0 : 8);
}
PicsartTextView picsartTextView3 = P3().i;
if (aVar2 == null || (settingsClickableText = aVar2.e) == null) {
i = 0;
} else {
picsartTextView3.setTypographyApiModel(new myobfuscated.ri2.b(Typography.T4, FontWights.MEDIUM));
Integer valueOf2 = Integer.valueOf(myobfuscated.dx0.a.d(settingsClickableText.e));
if (valueOf2.intValue() == -1) {
valueOf2 = null;
}
int intValue4 = valueOf2 != null ? valueOf2.intValue() : myobfuscated.fi2.a.e.a.a(false);
Integer valueOf3 = Integer.valueOf(myobfuscated.dx0.a.d(settingsClickableText.d));
Integer num = valueOf3.intValue() != -1 ? valueOf3 : null;
int intValue5 = num != null ? num.intValue() : a.b.a.a.c.c();
SpannableStringBuilder spannableStringBuilder = new SpannableStringBuilder();
ForegroundColorSpan foregroundColorSpan = new ForegroundColorSpan(intValue4);
int length = spannableStringBuilder.length();
spannableStringBuilder.append((CharSequence) settingsClickableText.c);
spannableStringBuilder.setSpan(foregroundColorSpan, length, spannableStringBuilder.length(), 17);
spannableStringBuilder.append((CharSequence) str14);
StyleSpan styleSpan = new StyleSpan(1);
int length2 = spannableStringBuilder.length();
ForegroundColorSpan foregroundColorSpan2 = new ForegroundColorSpan(intValue5);
int length3 = spannableStringBuilder.length();
spannableStringBuilder.append((CharSequence) settingsClickableText.a);
spannableStringBuilder.setSpan(foregroundColorSpan2, length3, spannableStringBuilder.length(), 17);
spannableStringBuilder.setSpan(styleSpan, length2, spannableStringBuilder.length(), 17);
picsartTextView3.setText(new SpannedString(spannableStringBuilder));
final String str15 = state.h;
myobfuscated.l22.c.a(picsartTextView3, new Function1<View, Unit>() {
{
super(1);
}
@Override
public Unit invoke(View view) {
invoke2(view);
return Unit.a;
}
public final void invoke2(@NotNull View it) {
Intrinsics.checkNotNullParameter(it, "it");
WelcomeClassicFragment welcomeClassicFragment = WelcomeClassicFragment.this;
String value2 = SourceParam.LOGIN.getValue();
Intrinsics.checkNotNullExpressionValue(value2, "getValue(...)");
b.d dVar = new b.d(true, value2);
j<Object>[] jVarArr = WelcomeClassicFragment.t;
welcomeClassicFragment.H3(dVar);
WelcomeClassicFragment.this.R3("", str15);
}
});
picsartTextView3.setMovementMethod(LinkMovementMethod.getInstance());
i = 0;
picsartTextView3.setBackground(new ColorDrawable(0));
}
PicsartProgressBar progressBar = P3().h;
Intrinsics.checkNotNullExpressionValue(progressBar, "progressBar");
progressBar.setVisibility(state.p ? i : 8);
}
}