package androidx.fragment.app;

import D.AbstractC0031b;
import android.animation.Animator;
import android.annotation.SuppressLint;
import android.app.Activity;
import android.app.Application;
import android.content.ComponentCallbacks;
import android.content.Context;
import android.content.ContextWrapper;
import android.content.Intent;
import android.content.IntentSender;
import android.content.res.Configuration;
import android.content.res.Resources;
import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.util.Log;
import android.util.SparseArray;
import android.view.ContextMenu;
import android.view.LayoutInflater;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.view.animation.Animation;
import androidx.lifecycle.AbstractC0309p;
import androidx.lifecycle.C0315w;
import androidx.lifecycle.EnumC0307n;
import androidx.lifecycle.EnumC0308o;
import androidx.lifecycle.InterfaceC0303j;
import androidx.lifecycle.InterfaceC0313u;
import com.riyaz.zvytour.R;
import f.AbstractC0580c;
import f.AbstractC0585h;
import f.C0587j;
import f.InterfaceC0579b;
import g.AbstractC0604a;
import g0.C0611a;
import io.flutter.embedding.android.FlutterFragmentActivity;
import java.io.FileDescriptor;
import java.io.PrintWriter;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.UUID;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.concurrent.atomic.AtomicReference;
import k0.AbstractC0807a;
import p0.AbstractC0928a;
import r4.AbstractC0983h;

/* JADX INFO: loaded from: classes.dex */
public abstract class I implements ComponentCallbacks, View.OnCreateContextMenuListener, InterfaceC0313u, androidx.lifecycle.d0, InterfaceC0303j, v0.g {
    static final int ACTIVITY_CREATED = 4;
    static final int ATTACHED = 0;
    static final int AWAITING_ENTER_EFFECTS = 6;
    static final int AWAITING_EXIT_EFFECTS = 3;
    static final int CREATED = 1;
    static final int INITIALIZING = -1;
    static final int RESUMED = 7;
    static final int STARTED = 5;
    static final Object USE_DEFAULT_TRANSITION = new Object();
    static final int VIEW_CREATED = 2;
    boolean mAdded;
    F mAnimationInfo;
    Bundle mArguments;
    int mBackStackNesting;
    boolean mBeingSaved;
    private boolean mCalled;
    ViewGroup mContainer;
    int mContainerId;
    private int mContentLayoutId;
    androidx.lifecycle.a0 mDefaultFactory;
    boolean mDeferStart;
    boolean mDetached;
    int mFragmentId;
    h0 mFragmentManager;
    boolean mFromLayout;
    boolean mHasMenu;
    boolean mHidden;
    boolean mHiddenChanged;
    T mHost;
    boolean mInLayout;
    boolean mIsCreated;
    LayoutInflater mLayoutInflater;
    C0315w mLifecycleRegistry;
    I mParentFragment;
    boolean mPerformedCreateView;
    Handler mPostponedHandler;
    public String mPreviousWho;
    boolean mRemoving;
    boolean mRestored;
    boolean mRetainInstance;
    boolean mRetainInstanceChangedWhileDetached;
    Bundle mSavedFragmentState;
    v0.f mSavedStateRegistryController;
    Boolean mSavedUserVisibleHint;
    Bundle mSavedViewRegistryState;
    SparseArray<Parcelable> mSavedViewState;
    String mTag;
    I mTarget;
    int mTargetRequestCode;
    boolean mTransitioning;
    View mView;
    A0 mViewLifecycleOwner;
    int mState = -1;
    String mWho = UUID.randomUUID().toString();
    String mTargetWho = null;
    private Boolean mIsPrimaryNavigationFragment = null;
    h0 mChildFragmentManager = new i0();
    boolean mMenuVisible = true;
    boolean mUserVisibleHint = true;
    Runnable mPostponedDurationRunnable = new RunnableC0293z(this, 0);
    EnumC0308o mMaxState = EnumC0308o.f4481o;
    androidx.lifecycle.D mViewLifecycleOwnerLiveData = new androidx.lifecycle.D();
    private final AtomicInteger mNextLocalRequestCode = new AtomicInteger();
    private final ArrayList<G> mOnPreAttachedListeners = new ArrayList<>();
    private final G mSavedStateAttachListener = new A(this);

    public I() {
        d();
    }

    @Deprecated
    public static I instantiate(Context context, String str) {
        return instantiate(context, str, null);
    }

    public final F a() {
        if (this.mAnimationInfo == null) {
            F f6 = new F();
            f6.i = null;
            Object obj = USE_DEFAULT_TRANSITION;
            f6.f4167j = obj;
            f6.f4168k = null;
            f6.f4169l = obj;
            f6.f4170m = null;
            f6.f4171n = obj;
            f6.q = 1.0f;
            f6.f4173r = null;
            this.mAnimationInfo = f6;
        }
        return this.mAnimationInfo;
    }

    public final int b() {
        EnumC0308o enumC0308o = this.mMaxState;
        return (enumC0308o == EnumC0308o.f4478l || this.mParentFragment == null) ? enumC0308o.ordinal() : Math.min(enumC0308o.ordinal(), this.mParentFragment.b());
    }

    public final I c(boolean z5) {
        String str;
        if (z5) {
            g0.c cVar = g0.d.f6417a;
            g0.d.b(new g0.f(this, "Attempting to get target fragment from fragment " + this));
            g0.d.a(this).getClass();
        }
        I i = this.mTarget;
        if (i != null) {
            return i;
        }
        h0 h0Var = this.mFragmentManager;
        if (h0Var == null || (str = this.mTargetWho) == null) {
            return null;
        }
        return h0Var.f4277c.b(str);
    }

    public void callStartTransitionListener(boolean z5) {
        ViewGroup viewGroup;
        h0 h0Var;
        F f6 = this.mAnimationInfo;
        if (f6 != null) {
            f6.f4174s = false;
        }
        if (this.mView == null || (viewGroup = this.mContainer) == null || (h0Var = this.mFragmentManager) == null) {
            return;
        }
        C0285q c0285qJ = C0285q.j(viewGroup, h0Var);
        c0285qJ.k();
        if (z5) {
            this.mHost.f4197m.post(new r(1, c0285qJ));
        } else {
            c0285qJ.e();
        }
        Handler handler = this.mPostponedHandler;
        if (handler != null) {
            handler.removeCallbacks(this.mPostponedDurationRunnable);
            this.mPostponedHandler = null;
        }
    }

    public Q createFragmentContainer() {
        return new B(this);
    }

    public final void d() {
        this.mLifecycleRegistry = new C0315w(this);
        this.mSavedStateRegistryController = new v0.f(this);
        this.mDefaultFactory = null;
        if (this.mOnPreAttachedListeners.contains(this.mSavedStateAttachListener)) {
            return;
        }
        G g5 = this.mSavedStateAttachListener;
        if (this.mState >= 0) {
            g5.a();
        } else {
            this.mOnPreAttachedListeners.add(g5);
        }
    }

    public void dump(String str, FileDescriptor fileDescriptor, PrintWriter printWriter, String[] strArr) {
        printWriter.print(str);
        printWriter.print("mFragmentId=#");
        printWriter.print(Integer.toHexString(this.mFragmentId));
        printWriter.print(" mContainerId=#");
        printWriter.print(Integer.toHexString(this.mContainerId));
        printWriter.print(" mTag=");
        printWriter.println(this.mTag);
        printWriter.print(str);
        printWriter.print("mState=");
        printWriter.print(this.mState);
        printWriter.print(" mWho=");
        printWriter.print(this.mWho);
        printWriter.print(" mBackStackNesting=");
        printWriter.println(this.mBackStackNesting);
        printWriter.print(str);
        printWriter.print("mAdded=");
        printWriter.print(this.mAdded);
        printWriter.print(" mRemoving=");
        printWriter.print(this.mRemoving);
        printWriter.print(" mFromLayout=");
        printWriter.print(this.mFromLayout);
        printWriter.print(" mInLayout=");
        printWriter.println(this.mInLayout);
        printWriter.print(str);
        printWriter.print("mHidden=");
        printWriter.print(this.mHidden);
        printWriter.print(" mDetached=");
        printWriter.print(this.mDetached);
        printWriter.print(" mMenuVisible=");
        printWriter.print(this.mMenuVisible);
        printWriter.print(" mHasMenu=");
        printWriter.println(this.mHasMenu);
        printWriter.print(str);
        printWriter.print("mRetainInstance=");
        printWriter.print(this.mRetainInstance);
        printWriter.print(" mUserVisibleHint=");
        printWriter.println(this.mUserVisibleHint);
        if (this.mFragmentManager != null) {
            printWriter.print(str);
            printWriter.print("mFragmentManager=");
            printWriter.println(this.mFragmentManager);
        }
        if (this.mHost != null) {
            printWriter.print(str);
            printWriter.print("mHost=");
            printWriter.println(this.mHost);
        }
        if (this.mParentFragment != null) {
            printWriter.print(str);
            printWriter.print("mParentFragment=");
            printWriter.println(this.mParentFragment);
        }
        if (this.mArguments != null) {
            printWriter.print(str);
            printWriter.print("mArguments=");
            printWriter.println(this.mArguments);
        }
        if (this.mSavedFragmentState != null) {
            printWriter.print(str);
            printWriter.print("mSavedFragmentState=");
            printWriter.println(this.mSavedFragmentState);
        }
        if (this.mSavedViewState != null) {
            printWriter.print(str);
            printWriter.print("mSavedViewState=");
            printWriter.println(this.mSavedViewState);
        }
        if (this.mSavedViewRegistryState != null) {
            printWriter.print(str);
            printWriter.print("mSavedViewRegistryState=");
            printWriter.println(this.mSavedViewRegistryState);
        }
        I iC = c(false);
        if (iC != null) {
            printWriter.print(str);
            printWriter.print("mTarget=");
            printWriter.print(iC);
            printWriter.print(" mTargetRequestCode=");
            printWriter.println(this.mTargetRequestCode);
        }
        printWriter.print(str);
        printWriter.print("mPopDirection=");
        printWriter.println(getPopDirection());
        if (getEnterAnim() != 0) {
            printWriter.print(str);
            printWriter.print("getEnterAnim=");
            printWriter.println(getEnterAnim());
        }
        if (getExitAnim() != 0) {
            printWriter.print(str);
            printWriter.print("getExitAnim=");
            printWriter.println(getExitAnim());
        }
        if (getPopEnterAnim() != 0) {
            printWriter.print(str);
            printWriter.print("getPopEnterAnim=");
            printWriter.println(getPopEnterAnim());
        }
        if (getPopExitAnim() != 0) {
            printWriter.print(str);
            printWriter.print("getPopExitAnim=");
            printWriter.println(getPopExitAnim());
        }
        if (this.mContainer != null) {
            printWriter.print(str);
            printWriter.print("mContainer=");
            printWriter.println(this.mContainer);
        }
        if (this.mView != null) {
            printWriter.print(str);
            printWriter.print("mView=");
            printWriter.println(this.mView);
        }
        if (getAnimatingAway() != null) {
            printWriter.print(str);
            printWriter.print("mAnimatingAway=");
            printWriter.println(getAnimatingAway());
        }
        if (getContext() != null) {
            AbstractC0807a.a(this).b(str, printWriter);
        }
        printWriter.print(str);
        printWriter.println("Child " + this.mChildFragmentManager + ":");
        this.mChildFragmentManager.v(s0.c.c(str, "  "), fileDescriptor, printWriter, strArr);
    }

    public final C0292y e(AbstractC0604a abstractC0604a, D d3, InterfaceC0579b interfaceC0579b) {
        if (this.mState > 1) {
            throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " is attempting to registerForActivityResult after being created. Fragments must call registerForActivityResult() before they are created (i.e. initialization, onAttach(), or onCreate())."));
        }
        E e2 = new E(this, d3, new AtomicReference(), abstractC0604a, interfaceC0579b);
        if (this.mState >= 0) {
            e2.a();
        } else {
            this.mOnPreAttachedListeners.add(e2);
        }
        return new C0292y();
    }

    public final boolean equals(Object obj) {
        return super.equals(obj);
    }

    public I findFragmentByWho(String str) {
        return str.equals(this.mWho) ? this : this.mChildFragmentManager.f4277c.c(str);
    }

    public String generateActivityResultKey() {
        return "fragment_" + this.mWho + "_rq#" + this.mNextLocalRequestCode.getAndIncrement();
    }

    public final N getActivity() {
        T t4 = this.mHost;
        if (t4 == null) {
            return null;
        }
        return t4.f4195k;
    }

    public boolean getAllowEnterTransitionOverlap() {
        Boolean bool;
        F f6 = this.mAnimationInfo;
        if (f6 == null || (bool = f6.p) == null) {
            return true;
        }
        return bool.booleanValue();
    }

    public boolean getAllowReturnTransitionOverlap() {
        Boolean bool;
        F f6 = this.mAnimationInfo;
        if (f6 == null || (bool = f6.f4172o) == null) {
            return true;
        }
        return bool.booleanValue();
    }

    public View getAnimatingAway() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        f6.getClass();
        return null;
    }

    public final Bundle getArguments() {
        return this.mArguments;
    }

    public final h0 getChildFragmentManager() {
        if (this.mHost != null) {
            return this.mChildFragmentManager;
        }
        throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " has not been attached yet."));
    }

    public Context getContext() {
        T t4 = this.mHost;
        if (t4 == null) {
            return null;
        }
        return t4.f4196l;
    }

    @Override // androidx.lifecycle.InterfaceC0303j
    public j0.b getDefaultViewModelCreationExtras() {
        Application application;
        Context applicationContext = requireContext().getApplicationContext();
        while (true) {
            if (!(applicationContext instanceof ContextWrapper)) {
                application = null;
                break;
            }
            if (applicationContext instanceof Application) {
                application = (Application) applicationContext;
                break;
            }
            applicationContext = ((ContextWrapper) applicationContext).getBaseContext();
        }
        if (application == null && h0.J(3)) {
            Log.d("FragmentManager", "Could not find Application instance from Context " + requireContext().getApplicationContext() + ", you will not be able to use AndroidViewModel with the default ViewModelProvider.Factory");
        }
        j0.c cVar = new j0.c(0);
        LinkedHashMap linkedHashMap = cVar.f8555a;
        if (application != null) {
            linkedHashMap.put(androidx.lifecycle.Y.f4457a, application);
        }
        linkedHashMap.put(androidx.lifecycle.S.f4439a, this);
        linkedHashMap.put(androidx.lifecycle.S.f4440b, this);
        if (getArguments() != null) {
            linkedHashMap.put(androidx.lifecycle.S.f4441c, getArguments());
        }
        return cVar;
    }

    public androidx.lifecycle.a0 getDefaultViewModelProviderFactory() {
        Application application;
        if (this.mFragmentManager == null) {
            throw new IllegalStateException("Can't access ViewModels from detached fragment");
        }
        if (this.mDefaultFactory == null) {
            Context applicationContext = requireContext().getApplicationContext();
            while (true) {
                if (!(applicationContext instanceof ContextWrapper)) {
                    application = null;
                    break;
                }
                if (applicationContext instanceof Application) {
                    application = (Application) applicationContext;
                    break;
                }
                applicationContext = ((ContextWrapper) applicationContext).getBaseContext();
            }
            if (application == null && h0.J(3)) {
                Log.d("FragmentManager", "Could not find Application instance from Context " + requireContext().getApplicationContext() + ", you will need CreationExtras to use AndroidViewModel with the default ViewModelProvider.Factory");
            }
            this.mDefaultFactory = new androidx.lifecycle.V(application, this, getArguments());
        }
        return this.mDefaultFactory;
    }

    public int getEnterAnim() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return 0;
        }
        return f6.f4160b;
    }

    public Object getEnterTransition() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        return f6.i;
    }

    public D.b0 getEnterTransitionCallback() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        f6.getClass();
        return null;
    }

    public int getExitAnim() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return 0;
        }
        return f6.f4161c;
    }

    public Object getExitTransition() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        return f6.f4168k;
    }

    public D.b0 getExitTransitionCallback() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        f6.getClass();
        return null;
    }

    public View getFocusedView() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        return f6.f4173r;
    }

    @Deprecated
    public final h0 getFragmentManager() {
        return this.mFragmentManager;
    }

    public final Object getHost() {
        T t4 = this.mHost;
        if (t4 == null) {
            return null;
        }
        return ((M) t4).f4186o;
    }

    public final int getId() {
        return this.mFragmentId;
    }

    public final LayoutInflater getLayoutInflater() {
        LayoutInflater layoutInflater = this.mLayoutInflater;
        return layoutInflater == null ? performGetLayoutInflater(null) : layoutInflater;
    }

    @Override // androidx.lifecycle.InterfaceC0313u
    public AbstractC0309p getLifecycle() {
        return this.mLifecycleRegistry;
    }

    @Deprecated
    public AbstractC0807a getLoaderManager() {
        return AbstractC0807a.a(this);
    }

    public int getNextTransition() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return 0;
        }
        return f6.f4164f;
    }

    public final I getParentFragment() {
        return this.mParentFragment;
    }

    public final h0 getParentFragmentManager() {
        h0 h0Var = this.mFragmentManager;
        if (h0Var != null) {
            return h0Var;
        }
        throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " not associated with a fragment manager."));
    }

    public boolean getPopDirection() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return false;
        }
        return f6.f4159a;
    }

    public int getPopEnterAnim() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return 0;
        }
        return f6.f4162d;
    }

    public int getPopExitAnim() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return 0;
        }
        return f6.f4163e;
    }

    public float getPostOnViewCreatedAlpha() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return 1.0f;
        }
        return f6.q;
    }

    public Object getReenterTransition() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        Object obj = f6.f4169l;
        return obj == USE_DEFAULT_TRANSITION ? getExitTransition() : obj;
    }

    public final Resources getResources() {
        return requireContext().getResources();
    }

    @Deprecated
    public final boolean getRetainInstance() {
        g0.c cVar = g0.d.f6417a;
        g0.d.b(new g0.e(this, "Attempting to get retain instance for fragment " + this));
        g0.d.a(this).getClass();
        return this.mRetainInstance;
    }

    public Object getReturnTransition() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        Object obj = f6.f4167j;
        return obj == USE_DEFAULT_TRANSITION ? getEnterTransition() : obj;
    }

    @Override // v0.g
    public final v0.e getSavedStateRegistry() {
        return this.mSavedStateRegistryController.f10403b;
    }

    public Object getSharedElementEnterTransition() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        return f6.f4170m;
    }

    public Object getSharedElementReturnTransition() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return null;
        }
        Object obj = f6.f4171n;
        return obj == USE_DEFAULT_TRANSITION ? getSharedElementEnterTransition() : obj;
    }

    public ArrayList<String> getSharedElementSourceNames() {
        ArrayList<String> arrayList;
        F f6 = this.mAnimationInfo;
        return (f6 == null || (arrayList = f6.f4165g) == null) ? new ArrayList<>() : arrayList;
    }

    public ArrayList<String> getSharedElementTargetNames() {
        ArrayList<String> arrayList;
        F f6 = this.mAnimationInfo;
        return (f6 == null || (arrayList = f6.f4166h) == null) ? new ArrayList<>() : arrayList;
    }

    public final String getString(int i) {
        return getResources().getString(i);
    }

    public final String getTag() {
        return this.mTag;
    }

    @Deprecated
    public final I getTargetFragment() {
        return c(true);
    }

    @Deprecated
    public final int getTargetRequestCode() {
        g0.c cVar = g0.d.f6417a;
        g0.d.b(new g0.f(this, "Attempting to get target request code from fragment " + this));
        g0.d.a(this).getClass();
        return this.mTargetRequestCode;
    }

    public final CharSequence getText(int i) {
        return getResources().getText(i);
    }

    @Deprecated
    public boolean getUserVisibleHint() {
        return this.mUserVisibleHint;
    }

    public View getView() {
        return this.mView;
    }

    public InterfaceC0313u getViewLifecycleOwner() {
        A0 a02 = this.mViewLifecycleOwner;
        if (a02 != null) {
            return a02;
        }
        throw new IllegalStateException(AbstractC0928a.k("Can't access the Fragment View's LifecycleOwner for ", this, " when getView() is null i.e., before onCreateView() or after onDestroyView()"));
    }

    public androidx.lifecycle.C getViewLifecycleOwnerLiveData() {
        return this.mViewLifecycleOwnerLiveData;
    }

    @Override // androidx.lifecycle.d0
    public androidx.lifecycle.c0 getViewModelStore() {
        if (this.mFragmentManager == null) {
            throw new IllegalStateException("Can't access ViewModels from detached fragment");
        }
        if (b() == 1) {
            throw new IllegalStateException("Calling getViewModelStore() before a Fragment reaches onCreate() when using setMaxLifecycle(INITIALIZED) is not supported");
        }
        HashMap map = this.mFragmentManager.f4273N.f4313f;
        androidx.lifecycle.c0 c0Var = (androidx.lifecycle.c0) map.get(this.mWho);
        if (c0Var != null) {
            return c0Var;
        }
        androidx.lifecycle.c0 c0Var2 = new androidx.lifecycle.c0();
        map.put(this.mWho, c0Var2);
        return c0Var2;
    }

    @SuppressLint({"KotlinPropertyAccess"})
    public final boolean hasOptionsMenu() {
        return this.mHasMenu;
    }

    public final int hashCode() {
        return super.hashCode();
    }

    public void initState() {
        d();
        this.mPreviousWho = this.mWho;
        this.mWho = UUID.randomUUID().toString();
        this.mAdded = false;
        this.mRemoving = false;
        this.mFromLayout = false;
        this.mInLayout = false;
        this.mRestored = false;
        this.mBackStackNesting = 0;
        this.mFragmentManager = null;
        this.mChildFragmentManager = new i0();
        this.mHost = null;
        this.mFragmentId = 0;
        this.mContainerId = 0;
        this.mTag = null;
        this.mHidden = false;
        this.mDetached = false;
    }

    public final boolean isAdded() {
        return this.mHost != null && this.mAdded;
    }

    public final boolean isDetached() {
        return this.mDetached;
    }

    public final boolean isHidden() {
        if (this.mHidden) {
            return true;
        }
        h0 h0Var = this.mFragmentManager;
        if (h0Var != null) {
            I i = this.mParentFragment;
            h0Var.getClass();
            if (i == null ? false : i.isHidden()) {
                return true;
            }
        }
        return false;
    }

    public final boolean isInBackStack() {
        return this.mBackStackNesting > 0;
    }

    public final boolean isInLayout() {
        return this.mInLayout;
    }

    public final boolean isMenuVisible() {
        if (!this.mMenuVisible) {
            return false;
        }
        if (this.mFragmentManager != null) {
            I i = this.mParentFragment;
            if (!(i == null ? true : i.isMenuVisible())) {
                return false;
            }
        }
        return true;
    }

    public boolean isPostponed() {
        F f6 = this.mAnimationInfo;
        if (f6 == null) {
            return false;
        }
        return f6.f4174s;
    }

    public final boolean isRemoving() {
        return this.mRemoving;
    }

    public final boolean isResumed() {
        return this.mState >= 7;
    }

    public final boolean isStateSaved() {
        h0 h0Var = this.mFragmentManager;
        if (h0Var == null) {
            return false;
        }
        return h0Var.f4269G || h0Var.f4270H;
    }

    public final boolean isVisible() {
        View view;
        return (!isAdded() || isHidden() || (view = this.mView) == null || view.getWindowToken() == null || this.mView.getVisibility() != 0) ? false : true;
    }

    public void noteStateNotSaved() {
        this.mChildFragmentManager.O();
    }

    @Deprecated
    public void onActivityCreated(Bundle bundle) {
        this.mCalled = true;
    }

    public void onActivityResult(int i, int i5, Intent intent) {
        if (h0.J(2)) {
            Log.v("FragmentManager", "Fragment " + this + " received the following in onActivityResult(): requestCode: " + i + " resultCode: " + i5 + " data: " + intent);
        }
    }

    public void onAttach(Context context) {
        this.mCalled = true;
        T t4 = this.mHost;
        N n5 = t4 == null ? null : t4.f4195k;
        if (n5 != null) {
            this.mCalled = false;
            onAttach((Activity) n5);
        }
    }

    @Deprecated
    public void onAttachFragment(I i) {
    }

    @Override // android.content.ComponentCallbacks
    public void onConfigurationChanged(Configuration configuration) {
        this.mCalled = true;
    }

    public boolean onContextItemSelected(MenuItem menuItem) {
        return false;
    }

    public void onCreate(Bundle bundle) {
        this.mCalled = true;
        restoreChildFragmentState();
        h0 h0Var = this.mChildFragmentManager;
        if (h0Var.f4292u >= 1) {
            return;
        }
        h0Var.f4269G = false;
        h0Var.f4270H = false;
        h0Var.f4273N.i = false;
        h0Var.u(1);
    }

    public Animation onCreateAnimation(int i, boolean z5, int i5) {
        return null;
    }

    public Animator onCreateAnimator(int i, boolean z5, int i5) {
        return null;
    }

    @Override // android.view.View.OnCreateContextMenuListener
    public void onCreateContextMenu(ContextMenu contextMenu, View view, ContextMenu.ContextMenuInfo contextMenuInfo) {
        requireActivity().onCreateContextMenu(contextMenu, view, contextMenuInfo);
    }

    @Deprecated
    public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
    }

    public View onCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        int i = this.mContentLayoutId;
        if (i != 0) {
            return layoutInflater.inflate(i, viewGroup, false);
        }
        return null;
    }

    public void onDestroy() {
        this.mCalled = true;
    }

    @Deprecated
    public void onDestroyOptionsMenu() {
    }

    public void onDestroyView() {
        this.mCalled = true;
    }

    public void onDetach() {
        this.mCalled = true;
    }

    public LayoutInflater onGetLayoutInflater(Bundle bundle) {
        return getLayoutInflater(bundle);
    }

    public void onHiddenChanged(boolean z5) {
    }

    public void onInflate(Context context, AttributeSet attributeSet, Bundle bundle) {
        this.mCalled = true;
        T t4 = this.mHost;
        N n5 = t4 == null ? null : t4.f4195k;
        if (n5 != null) {
            this.mCalled = false;
            onInflate((Activity) n5, attributeSet, bundle);
        }
    }

    @Override // android.content.ComponentCallbacks
    public void onLowMemory() {
        this.mCalled = true;
    }

    public void onMultiWindowModeChanged(boolean z5) {
    }

    @Deprecated
    public boolean onOptionsItemSelected(MenuItem menuItem) {
        return false;
    }

    @Deprecated
    public void onOptionsMenuClosed(Menu menu) {
    }

    public void onPause() {
        this.mCalled = true;
    }

    public void onPictureInPictureModeChanged(boolean z5) {
    }

    @Deprecated
    public void onPrepareOptionsMenu(Menu menu) {
    }

    public void onPrimaryNavigationFragmentChanged(boolean z5) {
    }

    public void onRequestPermissionsResult(int i, String[] strArr, int[] iArr) {
    }

    public void onResume() {
        this.mCalled = true;
    }

    public abstract void onSaveInstanceState(Bundle bundle);

    public void onStart() {
        this.mCalled = true;
    }

    public void onStop() {
        this.mCalled = true;
    }

    public void onViewCreated(View view, Bundle bundle) {
    }

    public void onViewStateRestored(Bundle bundle) {
        this.mCalled = true;
    }

    public void performActivityCreated(Bundle bundle) {
        this.mChildFragmentManager.O();
        this.mState = 3;
        this.mCalled = false;
        onActivityCreated(bundle);
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onActivityCreated()"));
        }
        if (h0.J(3)) {
            Log.d("FragmentManager", "moveto RESTORE_VIEW_STATE: " + this);
        }
        if (this.mView != null) {
            Bundle bundle2 = this.mSavedFragmentState;
            restoreViewState(bundle2 != null ? bundle2.getBundle("savedInstanceState") : null);
        }
        this.mSavedFragmentState = null;
        h0 h0Var = this.mChildFragmentManager;
        h0Var.f4269G = false;
        h0Var.f4270H = false;
        h0Var.f4273N.i = false;
        h0Var.u(4);
    }

    public void performAttach() {
        Iterator<G> it = this.mOnPreAttachedListeners.iterator();
        while (it.hasNext()) {
            it.next().a();
        }
        this.mOnPreAttachedListeners.clear();
        this.mChildFragmentManager.b(this.mHost, createFragmentContainer(), this);
        this.mState = 0;
        this.mCalled = false;
        onAttach((Context) this.mHost.f4196l);
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onAttach()"));
        }
        Iterator it2 = this.mFragmentManager.f4288o.iterator();
        while (it2.hasNext()) {
            ((m0) it2.next()).a(this);
        }
        h0 h0Var = this.mChildFragmentManager;
        h0Var.f4269G = false;
        h0Var.f4270H = false;
        h0Var.f4273N.i = false;
        h0Var.u(0);
    }

    public void performConfigurationChanged(Configuration configuration) {
        onConfigurationChanged(configuration);
    }

    public boolean performContextItemSelected(MenuItem menuItem) {
        if (this.mHidden) {
            return false;
        }
        if (onContextItemSelected(menuItem)) {
            return true;
        }
        return this.mChildFragmentManager.j(menuItem);
    }

    public void performCreate(Bundle bundle) {
        this.mChildFragmentManager.O();
        this.mState = 1;
        this.mCalled = false;
        this.mLifecycleRegistry.a(new C(this));
        onCreate(bundle);
        this.mIsCreated = true;
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onCreate()"));
        }
        this.mLifecycleRegistry.e(EnumC0307n.ON_CREATE);
    }

    public boolean performCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {
        boolean z5 = false;
        if (this.mHidden) {
            return false;
        }
        if (this.mHasMenu && this.mMenuVisible) {
            onCreateOptionsMenu(menu, menuInflater);
            z5 = true;
        }
        return this.mChildFragmentManager.k(menu, menuInflater) | z5;
    }

    public void performCreateView(LayoutInflater layoutInflater, ViewGroup viewGroup, Bundle bundle) {
        this.mChildFragmentManager.O();
        this.mPerformedCreateView = true;
        this.mViewLifecycleOwner = new A0(this, getViewModelStore(), new RunnableC0291x(0, this));
        View viewOnCreateView = onCreateView(layoutInflater, viewGroup, bundle);
        this.mView = viewOnCreateView;
        if (viewOnCreateView == null) {
            if (this.mViewLifecycleOwner.f4130n != null) {
                throw new IllegalStateException("Called getViewLifecycleOwner() but onCreateView() returned null");
            }
            this.mViewLifecycleOwner = null;
            return;
        }
        this.mViewLifecycleOwner.b();
        if (h0.J(3)) {
            Log.d("FragmentManager", "Setting ViewLifecycleOwner on View " + this.mView + " for Fragment " + this);
        }
        View view = this.mView;
        A0 a02 = this.mViewLifecycleOwner;
        AbstractC0983h.e("<this>", view);
        view.setTag(R.id.view_tree_lifecycle_owner, a02);
        View view2 = this.mView;
        A0 a03 = this.mViewLifecycleOwner;
        AbstractC0983h.e("<this>", view2);
        view2.setTag(R.id.view_tree_view_model_store_owner, a03);
        View view3 = this.mView;
        A0 a04 = this.mViewLifecycleOwner;
        AbstractC0983h.e("<this>", view3);
        view3.setTag(R.id.view_tree_saved_state_registry_owner, a04);
        this.mViewLifecycleOwnerLiveData.setValue(this.mViewLifecycleOwner);
    }

    public void performDestroy() {
        this.mChildFragmentManager.l();
        this.mLifecycleRegistry.e(EnumC0307n.ON_DESTROY);
        this.mState = 0;
        this.mCalled = false;
        this.mIsCreated = false;
        onDestroy();
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onDestroy()"));
        }
    }

    public void performDestroyView() {
        this.mChildFragmentManager.u(1);
        if (this.mView != null) {
            A0 a02 = this.mViewLifecycleOwner;
            a02.b();
            if (a02.f4130n.f4487c.compareTo(EnumC0308o.f4479m) >= 0) {
                this.mViewLifecycleOwner.a(EnumC0307n.ON_DESTROY);
            }
        }
        this.mState = 1;
        this.mCalled = false;
        onDestroyView();
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onDestroyView()"));
        }
        r.k kVar = AbstractC0807a.a(this).f8605b.f8603d;
        if (kVar.f9621m <= 0) {
            this.mPerformedCreateView = false;
        } else {
            kVar.f9620l[0].getClass();
            throw new ClassCastException();
        }
    }

    public void performDetach() {
        this.mState = -1;
        this.mCalled = false;
        onDetach();
        this.mLayoutInflater = null;
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onDetach()"));
        }
        h0 h0Var = this.mChildFragmentManager;
        if (h0Var.I) {
            return;
        }
        h0Var.l();
        this.mChildFragmentManager = new i0();
    }

    public LayoutInflater performGetLayoutInflater(Bundle bundle) {
        LayoutInflater layoutInflaterOnGetLayoutInflater = onGetLayoutInflater(bundle);
        this.mLayoutInflater = layoutInflaterOnGetLayoutInflater;
        return layoutInflaterOnGetLayoutInflater;
    }

    public void performLowMemory() {
        onLowMemory();
    }

    public void performMultiWindowModeChanged(boolean z5) {
        onMultiWindowModeChanged(z5);
    }

    public boolean performOptionsItemSelected(MenuItem menuItem) {
        if (this.mHidden) {
            return false;
        }
        if (this.mHasMenu && this.mMenuVisible && onOptionsItemSelected(menuItem)) {
            return true;
        }
        return this.mChildFragmentManager.p(menuItem);
    }

    public void performOptionsMenuClosed(Menu menu) {
        if (this.mHidden) {
            return;
        }
        if (this.mHasMenu && this.mMenuVisible) {
            onOptionsMenuClosed(menu);
        }
        this.mChildFragmentManager.q(menu);
    }

    public void performPause() {
        this.mChildFragmentManager.u(5);
        if (this.mView != null) {
            this.mViewLifecycleOwner.a(EnumC0307n.ON_PAUSE);
        }
        this.mLifecycleRegistry.e(EnumC0307n.ON_PAUSE);
        this.mState = 6;
        this.mCalled = false;
        onPause();
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onPause()"));
        }
    }

    public void performPictureInPictureModeChanged(boolean z5) {
        onPictureInPictureModeChanged(z5);
    }

    public boolean performPrepareOptionsMenu(Menu menu) {
        boolean z5 = false;
        if (this.mHidden) {
            return false;
        }
        if (this.mHasMenu && this.mMenuVisible) {
            onPrepareOptionsMenu(menu);
            z5 = true;
        }
        return this.mChildFragmentManager.t(menu) | z5;
    }

    public void performPrimaryNavigationFragmentChanged() {
        this.mFragmentManager.getClass();
        boolean zM = h0.M(this);
        Boolean bool = this.mIsPrimaryNavigationFragment;
        if (bool == null || bool.booleanValue() != zM) {
            this.mIsPrimaryNavigationFragment = Boolean.valueOf(zM);
            onPrimaryNavigationFragmentChanged(zM);
            h0 h0Var = this.mChildFragmentManager;
            h0Var.d0();
            h0Var.r(h0Var.f4296y);
        }
    }

    public void performResume() {
        this.mChildFragmentManager.O();
        this.mChildFragmentManager.z(true);
        this.mState = 7;
        this.mCalled = false;
        onResume();
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onResume()"));
        }
        C0315w c0315w = this.mLifecycleRegistry;
        EnumC0307n enumC0307n = EnumC0307n.ON_RESUME;
        c0315w.e(enumC0307n);
        if (this.mView != null) {
            this.mViewLifecycleOwner.f4130n.e(enumC0307n);
        }
        h0 h0Var = this.mChildFragmentManager;
        h0Var.f4269G = false;
        h0Var.f4270H = false;
        h0Var.f4273N.i = false;
        h0Var.u(7);
    }

    public void performSaveInstanceState(Bundle bundle) {
        onSaveInstanceState(bundle);
    }

    public void performStart() {
        this.mChildFragmentManager.O();
        this.mChildFragmentManager.z(true);
        this.mState = 5;
        this.mCalled = false;
        onStart();
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onStart()"));
        }
        C0315w c0315w = this.mLifecycleRegistry;
        EnumC0307n enumC0307n = EnumC0307n.ON_START;
        c0315w.e(enumC0307n);
        if (this.mView != null) {
            this.mViewLifecycleOwner.f4130n.e(enumC0307n);
        }
        h0 h0Var = this.mChildFragmentManager;
        h0Var.f4269G = false;
        h0Var.f4270H = false;
        h0Var.f4273N.i = false;
        h0Var.u(5);
    }

    public void performStop() {
        h0 h0Var = this.mChildFragmentManager;
        h0Var.f4270H = true;
        h0Var.f4273N.i = true;
        h0Var.u(4);
        if (this.mView != null) {
            this.mViewLifecycleOwner.a(EnumC0307n.ON_STOP);
        }
        this.mLifecycleRegistry.e(EnumC0307n.ON_STOP);
        this.mState = 4;
        this.mCalled = false;
        onStop();
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onStop()"));
        }
    }

    public void performViewCreated() {
        Bundle bundle = this.mSavedFragmentState;
        onViewCreated(this.mView, bundle != null ? bundle.getBundle("savedInstanceState") : null);
        this.mChildFragmentManager.u(2);
    }

    public void postponeEnterTransition() {
        a().f4174s = true;
    }

    public final <I, O> AbstractC0580c registerForActivityResult(AbstractC0604a abstractC0604a, InterfaceC0579b interfaceC0579b) {
        return e(abstractC0604a, new D(0, this), interfaceC0579b);
    }

    public void registerForContextMenu(View view) {
        view.setOnCreateContextMenuListener(this);
    }

    @Deprecated
    public final void requestPermissions(String[] strArr, int i) {
        if (this.mHost == null) {
            throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " not attached to Activity"));
        }
        h0 parentFragmentManager = getParentFragmentManager();
        if (parentFragmentManager.f4266D == null) {
            parentFragmentManager.f4293v.getClass();
            AbstractC0983h.e("permissions", strArr);
        } else {
            parentFragmentManager.f4267E.addLast(new C0269d0(this.mWho, i));
            parentFragmentManager.f4266D.a(strArr);
        }
    }

    public final N requireActivity() {
        N activity = getActivity();
        if (activity != null) {
            return activity;
        }
        throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " not attached to an activity."));
    }

    public final Bundle requireArguments() {
        Bundle arguments = getArguments();
        if (arguments != null) {
            return arguments;
        }
        throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " does not have any arguments."));
    }

    public final Context requireContext() {
        Context context = getContext();
        if (context != null) {
            return context;
        }
        throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " not attached to a context."));
    }

    @Deprecated
    public final h0 requireFragmentManager() {
        return getParentFragmentManager();
    }

    public final Object requireHost() {
        Object host = getHost();
        if (host != null) {
            return host;
        }
        throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " not attached to a host."));
    }

    public final I requireParentFragment() {
        I parentFragment = getParentFragment();
        if (parentFragment != null) {
            return parentFragment;
        }
        if (getContext() == null) {
            throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " is not attached to any Fragment or host"));
        }
        throw new IllegalStateException("Fragment " + this + " is not a child Fragment, it is directly attached to " + getContext());
    }

    public final View requireView() {
        View view = getView();
        if (view != null) {
            return view;
        }
        throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " did not return a View from onCreateView() or this was called before onCreateView()."));
    }

    public void restoreChildFragmentState() {
        Bundle bundle;
        Bundle bundle2 = this.mSavedFragmentState;
        if (bundle2 == null || (bundle = bundle2.getBundle("childFragmentManager")) == null) {
            return;
        }
        this.mChildFragmentManager.U(bundle);
        h0 h0Var = this.mChildFragmentManager;
        h0Var.f4269G = false;
        h0Var.f4270H = false;
        h0Var.f4273N.i = false;
        h0Var.u(1);
    }

    public final void restoreViewState(Bundle bundle) {
        SparseArray<Parcelable> sparseArray = this.mSavedViewState;
        if (sparseArray != null) {
            this.mView.restoreHierarchyState(sparseArray);
            this.mSavedViewState = null;
        }
        this.mCalled = false;
        onViewStateRestored(bundle);
        if (!this.mCalled) {
            throw new G0(AbstractC0928a.k("Fragment ", this, " did not call through to super.onViewStateRestored()"));
        }
        if (this.mView != null) {
            this.mViewLifecycleOwner.a(EnumC0307n.ON_CREATE);
        }
    }

    public void setAllowEnterTransitionOverlap(boolean z5) {
        a().p = Boolean.valueOf(z5);
    }

    public void setAllowReturnTransitionOverlap(boolean z5) {
        a().f4172o = Boolean.valueOf(z5);
    }

    public void setAnimations(int i, int i5, int i6, int i7) {
        if (this.mAnimationInfo == null && i == 0 && i5 == 0 && i6 == 0 && i7 == 0) {
            return;
        }
        a().f4160b = i;
        a().f4161c = i5;
        a().f4162d = i6;
        a().f4163e = i7;
    }

    public void setArguments(Bundle bundle) {
        if (this.mFragmentManager != null && isStateSaved()) {
            throw new IllegalStateException("Fragment already added and state has been saved");
        }
        this.mArguments = bundle;
    }

    public void setEnterSharedElementCallback(D.b0 b0Var) {
        a().getClass();
    }

    public void setEnterTransition(Object obj) {
        a().i = obj;
    }

    public void setExitSharedElementCallback(D.b0 b0Var) {
        a().getClass();
    }

    public void setExitTransition(Object obj) {
        a().f4168k = obj;
    }

    public void setFocusedView(View view) {
        a().f4173r = view;
    }

    @Deprecated
    public void setHasOptionsMenu(boolean z5) {
        if (this.mHasMenu != z5) {
            this.mHasMenu = z5;
            if (!isAdded() || isHidden()) {
                return;
            }
            ((M) this.mHost).f4186o.invalidateMenu();
        }
    }

    public void setInitialSavedState(H h3) {
        Bundle bundle;
        if (this.mFragmentManager != null) {
            throw new IllegalStateException("Fragment already added");
        }
        if (h3 == null || (bundle = h3.f4180k) == null) {
            bundle = null;
        }
        this.mSavedFragmentState = bundle;
    }

    public void setMenuVisibility(boolean z5) {
        if (this.mMenuVisible != z5) {
            this.mMenuVisible = z5;
            if (this.mHasMenu && isAdded() && !isHidden()) {
                ((M) this.mHost).f4186o.invalidateMenu();
            }
        }
    }

    public void setNextTransition(int i) {
        if (this.mAnimationInfo == null && i == 0) {
            return;
        }
        a();
        this.mAnimationInfo.f4164f = i;
    }

    public void setPopDirection(boolean z5) {
        if (this.mAnimationInfo == null) {
            return;
        }
        a().f4159a = z5;
    }

    public void setPostOnViewCreatedAlpha(float f6) {
        a().q = f6;
    }

    public void setReenterTransition(Object obj) {
        a().f4169l = obj;
    }

    @Deprecated
    public void setRetainInstance(boolean z5) {
        g0.c cVar = g0.d.f6417a;
        g0.d.b(new g0.e(this, "Attempting to set retain instance for fragment " + this));
        g0.d.a(this).getClass();
        this.mRetainInstance = z5;
        h0 h0Var = this.mFragmentManager;
        if (h0Var == null) {
            this.mRetainInstanceChangedWhileDetached = true;
        } else if (z5) {
            h0Var.f4273N.c(this);
        } else {
            h0Var.f4273N.g(this);
        }
    }

    public void setReturnTransition(Object obj) {
        a().f4167j = obj;
    }

    public void setSharedElementEnterTransition(Object obj) {
        a().f4170m = obj;
    }

    public void setSharedElementNames(ArrayList<String> arrayList, ArrayList<String> arrayList2) {
        a();
        F f6 = this.mAnimationInfo;
        f6.f4165g = arrayList;
        f6.f4166h = arrayList2;
    }

    public void setSharedElementReturnTransition(Object obj) {
        a().f4171n = obj;
    }

    @Deprecated
    public void setTargetFragment(I i, int i5) {
        if (i != null) {
            g0.c cVar = g0.d.f6417a;
            g0.d.b(new g0.f(this, "Attempting to set target fragment " + i + " with request code " + i5 + " for fragment " + this));
            g0.d.a(this).getClass();
        }
        h0 h0Var = this.mFragmentManager;
        h0 h0Var2 = i != null ? i.mFragmentManager : null;
        if (h0Var != null && h0Var2 != null && h0Var != h0Var2) {
            throw new IllegalArgumentException(AbstractC0928a.k("Fragment ", i, " must share the same FragmentManager to be set as a target fragment"));
        }
        for (I iC = i; iC != null; iC = iC.c(false)) {
            if (iC.equals(this)) {
                throw new IllegalArgumentException("Setting " + i + " as the target of " + this + " would create a target cycle");
            }
        }
        if (i == null) {
            this.mTargetWho = null;
            this.mTarget = null;
        } else if (this.mFragmentManager == null || i.mFragmentManager == null) {
            this.mTargetWho = null;
            this.mTarget = i;
        } else {
            this.mTargetWho = i.mWho;
            this.mTarget = null;
        }
        this.mTargetRequestCode = i5;
    }

    @Deprecated
    public void setUserVisibleHint(boolean z5) {
        g0.c cVar = g0.d.f6417a;
        g0.d.b(new C0611a(this, "Attempting to set user visible hint to " + z5 + " for fragment " + this));
        g0.d.a(this).getClass();
        boolean z6 = false;
        if (!this.mUserVisibleHint && z5 && this.mState < 5 && this.mFragmentManager != null && isAdded() && this.mIsCreated) {
            h0 h0Var = this.mFragmentManager;
            p0 p0VarG = h0Var.g(this);
            I i = p0VarG.f4351c;
            if (i.mDeferStart) {
                if (h0Var.f4276b) {
                    h0Var.J = true;
                } else {
                    i.mDeferStart = false;
                    p0VarG.k();
                }
            }
        }
        this.mUserVisibleHint = z5;
        if (this.mState < 5 && !z5) {
            z6 = true;
        }
        this.mDeferStart = z6;
        if (this.mSavedFragmentState != null) {
            this.mSavedUserVisibleHint = Boolean.valueOf(z5);
        }
    }

    public boolean shouldShowRequestPermissionRationale(String str) {
        T t4 = this.mHost;
        if (t4 != null) {
            return AbstractC0031b.f(((M) t4).f4186o, str);
        }
        return false;
    }

    public void startActivity(Intent intent) {
        startActivity(intent, null);
    }

    @Deprecated
    public void startActivityForResult(Intent intent, int i) {
        startActivityForResult(intent, i, null);
    }

    @Deprecated
    public void startIntentSenderForResult(IntentSender intentSender, int i, Intent intent, int i5, int i6, int i7, Bundle bundle) {
        if (this.mHost == null) {
            throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " not attached to Activity"));
        }
        if (h0.J(2)) {
            Log.v("FragmentManager", "Fragment " + this + " received the following in startIntentSenderForResult() requestCode: " + i + " IntentSender: " + intentSender + " fillInIntent: " + intent + " options: " + bundle);
        }
        h0 parentFragmentManager = getParentFragmentManager();
        if (parentFragmentManager.f4265C == null) {
            T t4 = parentFragmentManager.f4293v;
            t4.getClass();
            AbstractC0983h.e("intent", intentSender);
            if (i != -1) {
                throw new IllegalStateException("Starting intent sender with a requestCode requires a FragmentActivity host");
            }
            N n5 = t4.f4195k;
            if (n5 == null) {
                throw new IllegalStateException("Starting intent sender with a requestCode requires a FragmentActivity host");
            }
            n5.startIntentSenderForResult(intentSender, i, intent, i5, i6, i7, bundle);
            return;
        }
        if (bundle != null) {
            if (intent == null) {
                intent = new Intent();
                intent.putExtra("androidx.fragment.extra.ACTIVITY_OPTIONS_BUNDLE", true);
            }
            if (h0.J(2)) {
                Log.v("FragmentManager", "ActivityOptions " + bundle + " were added to fillInIntent " + intent + " for fragment " + this);
            }
            intent.putExtra("androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE", bundle);
        }
        AbstractC0983h.e("intentSender", intentSender);
        C0587j c0587j = new C0587j(intentSender, intent, i5, i6);
        parentFragmentManager.f4267E.addLast(new C0269d0(this.mWho, i));
        if (h0.J(2)) {
            Log.v("FragmentManager", "Fragment " + this + "is launching an IntentSender for result ");
        }
        parentFragmentManager.f4265C.a(c0587j);
    }

    public void startPostponedEnterTransition() {
        if (this.mAnimationInfo == null || !a().f4174s) {
            return;
        }
        if (this.mHost == null) {
            a().f4174s = false;
        } else if (Looper.myLooper() != this.mHost.f4197m.getLooper()) {
            this.mHost.f4197m.postAtFrontOfQueue(new RunnableC0293z(this, 1));
        } else {
            callStartTransitionListener(true);
        }
    }

    public String toString() {
        StringBuilder sb = new StringBuilder(128);
        sb.append(getClass().getSimpleName());
        sb.append("{");
        sb.append(Integer.toHexString(System.identityHashCode(this)));
        sb.append("} (");
        sb.append(this.mWho);
        if (this.mFragmentId != 0) {
            sb.append(" id=0x");
            sb.append(Integer.toHexString(this.mFragmentId));
        }
        if (this.mTag != null) {
            sb.append(" tag=");
            sb.append(this.mTag);
        }
        sb.append(")");
        return sb.toString();
    }

    public void unregisterForContextMenu(View view) {
        view.setOnCreateContextMenuListener(null);
    }

    @Deprecated
    public static I instantiate(Context context, String str, Bundle bundle) {
        try {
            I i = (I) C0263a0.b(context.getClassLoader(), str).getConstructor(new Class[0]).newInstance(new Object[0]);
            if (bundle == null) {
                return i;
            }
            bundle.setClassLoader(i.getClass().getClassLoader());
            i.setArguments(bundle);
            return i;
        } catch (IllegalAccessException e2) {
            throw new A2.u(AbstractC0928a.l("Unable to instantiate fragment ", str, ": make sure class name exists, is public, and has an empty constructor that is public"), e2);
        } catch (InstantiationException e6) {
            throw new A2.u(AbstractC0928a.l("Unable to instantiate fragment ", str, ": make sure class name exists, is public, and has an empty constructor that is public"), e6);
        } catch (NoSuchMethodException e7) {
            throw new A2.u(AbstractC0928a.l("Unable to instantiate fragment ", str, ": could not find Fragment constructor"), e7);
        } catch (InvocationTargetException e8) {
            throw new A2.u(AbstractC0928a.l("Unable to instantiate fragment ", str, ": calling Fragment constructor caused an exception"), e8);
        }
    }

    public final String getString(int i, Object... objArr) {
        return getResources().getString(i, objArr);
    }

    public final void postponeEnterTransition(long j5, TimeUnit timeUnit) {
        a().f4174s = true;
        Handler handler = this.mPostponedHandler;
        if (handler != null) {
            handler.removeCallbacks(this.mPostponedDurationRunnable);
        }
        h0 h0Var = this.mFragmentManager;
        if (h0Var != null) {
            this.mPostponedHandler = h0Var.f4293v.f4197m;
        } else {
            this.mPostponedHandler = new Handler(Looper.getMainLooper());
        }
        this.mPostponedHandler.removeCallbacks(this.mPostponedDurationRunnable);
        this.mPostponedHandler.postDelayed(this.mPostponedDurationRunnable, timeUnit.toMillis(j5));
    }

    public final <I, O> AbstractC0580c registerForActivityResult(AbstractC0604a abstractC0604a, AbstractC0585h abstractC0585h, InterfaceC0579b interfaceC0579b) {
        return e(abstractC0604a, new D(1, abstractC0585h), interfaceC0579b);
    }

    public void startActivity(Intent intent, Bundle bundle) {
        T t4 = this.mHost;
        if (t4 == null) {
            throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " not attached to Activity"));
        }
        AbstractC0983h.e("intent", intent);
        t4.f4196l.startActivity(intent, bundle);
    }

    @Deprecated
    public void startActivityForResult(Intent intent, int i, Bundle bundle) {
        if (this.mHost == null) {
            throw new IllegalStateException(AbstractC0928a.k("Fragment ", this, " not attached to Activity"));
        }
        h0 parentFragmentManager = getParentFragmentManager();
        if (parentFragmentManager.f4264B != null) {
            parentFragmentManager.f4267E.addLast(new C0269d0(this.mWho, i));
            if (bundle != null) {
                intent.putExtra("androidx.activity.result.contract.extra.ACTIVITY_OPTIONS_BUNDLE", bundle);
            }
            parentFragmentManager.f4264B.a(intent);
            return;
        }
        T t4 = parentFragmentManager.f4293v;
        t4.getClass();
        AbstractC0983h.e("intent", intent);
        if (i != -1) {
            throw new IllegalStateException("Starting activity with a requestCode requires a FragmentActivity host");
        }
        t4.f4196l.startActivity(intent, bundle);
    }

    @Deprecated
    public LayoutInflater getLayoutInflater(Bundle bundle) {
        T t4 = this.mHost;
        if (t4 != null) {
            FlutterFragmentActivity flutterFragmentActivity = ((M) t4).f4186o;
            LayoutInflater layoutInflaterCloneInContext = flutterFragmentActivity.getLayoutInflater().cloneInContext(flutterFragmentActivity);
            layoutInflaterCloneInContext.setFactory2(this.mChildFragmentManager.f4280f);
            return layoutInflaterCloneInContext;
        }
        throw new IllegalStateException("onGetLayoutInflater() cannot be executed until the Fragment is attached to the FragmentManager.");
    }

    @Deprecated
    public void onAttach(Activity activity) {
        this.mCalled = true;
    }

    @Deprecated
    public void onInflate(Activity activity, AttributeSet attributeSet, Bundle bundle) {
        this.mCalled = true;
    }
}
