package androidx.compose.ui; import androidx.compose.ui.node.DelegatableNode; import androidx.compose.ui.node.DelegatableNodeKt; import androidx.compose.ui.node.NodeCoordinator; import androidx.compose.ui.node.ObserverNodeOwnerScope; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function1; import kotlin.jvm.functions.Function2; import kotlin.jvm.internal.Intrinsics; import kotlinx.coroutines.CoroutineScope; import kotlinx.coroutines.CoroutineScopeKt; import kotlinx.coroutines.Job; import kotlinx.coroutines.JobKt; /* compiled from: Modifier.kt */ @Metadata(d1 = {"\u0000$\n\u0002\u0018\u0002\n\u0002\u0010\u0000\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\b\bg\u0018\u0000 \u00112\u00020\u0001:\u0003\u0011\u0012\u0013J\u001c\u0010\u0002\u001a\u00020\u00032\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00030\u0005H&J\u001c\u0010\u0007\u001a\u00020\u00032\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u00020\u00030\u0005H&J5\u0010\b\u001a\u0002H\t\"\u0004\b\u0000\u0010\t2\u0006\u0010\n\u001a\u0002H\t2\u0018\u0010\u000b\u001a\u0014\u0012\u0004\u0012\u0002H\t\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u0002H\t0\fH&¢\u0006\u0002\u0010\rJ5\u0010\u000e\u001a\u0002H\t\"\u0004\b\u0000\u0010\t2\u0006\u0010\n\u001a\u0002H\t2\u0018\u0010\u000b\u001a\u0014\u0012\u0004\u0012\u00020\u0006\u0012\u0004\u0012\u0002H\t\u0012\u0004\u0012\u0002H\t0\fH&¢\u0006\u0002\u0010\rJ\u0011\u0010\u000f\u001a\u00020\u00002\u0006\u0010\u0010\u001a\u00020\u0000H\u0096\u0004ø\u0001\u0000\u0082\u0002\u0006\n\u0004\b!0\u0001¨\u0006\u0014À\u0006\u0003"}, d2 = {"Landroidx/compose/ui/Modifier;", "", "all", "", "predicate", "Lkotlin/Function1;", "Landroidx/compose/ui/Modifier$Element;", "any", "foldIn", "R", "initial", "operation", "Lkotlin/Function2;", "(Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;", "foldOut", "then", "other", "Companion", "Element", "Node", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public interface Modifier { /* renamed from: Companion, reason: from kotlin metadata */ public static final Companion INSTANCE = Companion.$$INSTANCE; boolean all(Function1 predicate); boolean any(Function1 predicate); R foldIn(R initial, Function2 operation); R foldOut(R initial, Function2 operation); /* compiled from: Modifier.kt */ @Metadata(k = 3, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public static final class DefaultImpls { @Deprecated public static Modifier then(Modifier modifier, Modifier other) { Intrinsics.checkNotNullParameter(other, "other"); return Modifier.super.then(other); } } default Modifier then(Modifier other) { Intrinsics.checkNotNullParameter(other, "other"); return other == INSTANCE ? this : new CombinedModifier(this, other); } /* compiled from: Modifier.kt */ @Metadata(d1 = {"\u0000 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0003\bf\u0018\u00002\u00020\u0001J\u001c\u0010\u0002\u001a\u00020\u00032\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0000\u0012\u0004\u0012\u00020\u00030\u0005H\u0016J\u001c\u0010\u0006\u001a\u00020\u00032\u0012\u0010\u0004\u001a\u000e\u0012\u0004\u0012\u00020\u0000\u0012\u0004\u0012\u00020\u00030\u0005H\u0016J5\u0010\u0007\u001a\u0002H\b\"\u0004\b\u0000\u0010\b2\u0006\u0010\t\u001a\u0002H\b2\u0018\u0010\n\u001a\u0014\u0012\u0004\u0012\u0002H\b\u0012\u0004\u0012\u00020\u0000\u0012\u0004\u0012\u0002H\b0\u000bH\u0016¢\u0006\u0002\u0010\fJ5\u0010\r\u001a\u0002H\b\"\u0004\b\u0000\u0010\b2\u0006\u0010\t\u001a\u0002H\b2\u0018\u0010\n\u001a\u0014\u0012\u0004\u0012\u00020\u0000\u0012\u0004\u0012\u0002H\b\u0012\u0004\u0012\u0002H\b0\u000bH\u0016¢\u0006\u0002\u0010\fø\u0001\u0000\u0082\u0002\u0006\n\u0004\b!0\u0001¨\u0006\u000eÀ\u0006\u0003"}, d2 = {"Landroidx/compose/ui/Modifier$Element;", "Landroidx/compose/ui/Modifier;", "all", "", "predicate", "Lkotlin/Function1;", "any", "foldIn", "R", "initial", "operation", "Lkotlin/Function2;", "(Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;", "foldOut", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public interface Element extends Modifier { /* compiled from: Modifier.kt */ @Metadata(k = 3, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public static final class DefaultImpls { @Deprecated public static Modifier then(Element element, Modifier other) { Intrinsics.checkNotNullParameter(other, "other"); return Element.super.then(other); } @Deprecated public static R foldIn(Element element, R r, Function2 operation) { Intrinsics.checkNotNullParameter(operation, "operation"); return (R) Element.super.foldIn(r, operation); } @Deprecated public static R foldOut(Element element, R r, Function2 operation) { Intrinsics.checkNotNullParameter(operation, "operation"); return (R) Element.super.foldOut(r, operation); } @Deprecated public static boolean any(Element element, Function1 predicate) { Intrinsics.checkNotNullParameter(predicate, "predicate"); return Element.super.any(predicate); } @Deprecated public static boolean all(Element element, Function1 predicate) { Intrinsics.checkNotNullParameter(predicate, "predicate"); return Element.super.all(predicate); } } @Override // androidx.compose.ui.Modifier default R foldIn(R initial, Function2 operation) { Intrinsics.checkNotNullParameter(operation, "operation"); return operation.invoke(initial, this); } @Override // androidx.compose.ui.Modifier default R foldOut(R initial, Function2 operation) { Intrinsics.checkNotNullParameter(operation, "operation"); return operation.invoke(this, initial); } @Override // androidx.compose.ui.Modifier default boolean any(Function1 predicate) { Intrinsics.checkNotNullParameter(predicate, "predicate"); return predicate.invoke(this).booleanValue(); } @Override // androidx.compose.ui.Modifier default boolean all(Function1 predicate) { Intrinsics.checkNotNullParameter(predicate, "predicate"); return predicate.invoke(this).booleanValue(); } } /* compiled from: Modifier.kt */ @Metadata(d1 = {"\u0000L\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\b\n\u0002\b\n\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u000b\n\u0002\b\u000e\n\u0002\u0018\u0002\n\u0002\b\u0010\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010\u0002\n\u0002\b\u0011\n\u0002\u0018\u0002\n\u0002\b\u0003\b'\u0018\u00002\u00020\u0001B\u0005¢\u0006\u0002\u0010\u0002J\"\u00106\u001a\u00020\u00182\n\u00107\u001a\u0006\u0012\u0002\b\u000308H\u0080\bø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b9\u0010:J\r\u0010;\u001a\u00020\u001a\u00020", "Landroidx/compose/ui/node/NodeCoordinator;", "coordinator", "getCoordinator$ui_release", "()Landroidx/compose/ui/node/NodeCoordinator;", "coroutineScope", "Lkotlinx/coroutines/CoroutineScope;", "getCoroutineScope", "()Lkotlinx/coroutines/CoroutineScope;", "insertedNodeAwaitingAttachForInvalidation", "", "getInsertedNodeAwaitingAttachForInvalidation$ui_release", "()Z", "setInsertedNodeAwaitingAttachForInvalidation$ui_release", "(Z)V", "isAttached", "kindSet", "getKindSet$ui_release", "setKindSet$ui_release", "node", "getNode$annotations", "getNode", "onAttachRunExpected", "onDetachRunExpected", "ownerScope", "Landroidx/compose/ui/node/ObserverNodeOwnerScope;", "getOwnerScope$ui_release", "()Landroidx/compose/ui/node/ObserverNodeOwnerScope;", "setOwnerScope$ui_release", "(Landroidx/compose/ui/node/ObserverNodeOwnerScope;)V", "parent", "getParent$ui_release", "setParent$ui_release", "scope", "shouldAutoInvalidate", "getShouldAutoInvalidate$annotations", "getShouldAutoInvalidate", "updatedNodeAwaitingAttachForInvalidation", "getUpdatedNodeAwaitingAttachForInvalidation$ui_release", "setUpdatedNodeAwaitingAttachForInvalidation$ui_release", "isKind", "kind", "Landroidx/compose/ui/node/NodeKind;", "isKind-H91voCI$ui_release", "(I)Z", "markAsAttached", "", "markAsAttached$ui_release", "markAsDetached", "markAsDetached$ui_release", "onAttach", "onDetach", "onReset", "reset", "reset$ui_release", "runAttachLifecycle", "runAttachLifecycle$ui_release", "runDetachLifecycle", "runDetachLifecycle$ui_release", "setAsDelegateTo", "owner", "setAsDelegateTo$ui_release", "sideEffect", "effect", "Lkotlin/Function0;", "updateCoordinator", "updateCoordinator$ui_release", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public static abstract class Node implements DelegatableNode { public static final int $stable = 8; private Node child; private NodeCoordinator coordinator; private boolean insertedNodeAwaitingAttachForInvalidation; private boolean isAttached; private int kindSet; private boolean onAttachRunExpected; private boolean onDetachRunExpected; private ObserverNodeOwnerScope ownerScope; private Node parent; private CoroutineScope scope; private boolean updatedNodeAwaitingAttachForInvalidation; private Node node = this; private int aggregateChildKindSet = -1; public static /* synthetic */ void getNode$annotations() { } public static /* synthetic */ void getShouldAutoInvalidate$annotations() { } /* renamed from: getAggregateChildKindSet$ui_release, reason: from getter */ public final int getAggregateChildKindSet() { return this.aggregateChildKindSet; } /* renamed from: getChild$ui_release, reason: from getter */ public final Node getChild() { return this.child; } /* renamed from: getCoordinator$ui_release, reason: from getter */ public final NodeCoordinator getCoordinator() { return this.coordinator; } /* renamed from: getInsertedNodeAwaitingAttachForInvalidation$ui_release, reason: from getter */ public final boolean getInsertedNodeAwaitingAttachForInvalidation() { return this.insertedNodeAwaitingAttachForInvalidation; } /* renamed from: getKindSet$ui_release, reason: from getter */ public final int getKindSet() { return this.kindSet; } @Override // androidx.compose.ui.node.DelegatableNode public final Node getNode() { return this.node; } /* renamed from: getOwnerScope$ui_release, reason: from getter */ public final ObserverNodeOwnerScope getOwnerScope() { return this.ownerScope; } /* renamed from: getParent$ui_release, reason: from getter */ public final Node getParent() { return this.parent; } public boolean getShouldAutoInvalidate() { return true; } /* renamed from: getUpdatedNodeAwaitingAttachForInvalidation$ui_release, reason: from getter */ public final boolean getUpdatedNodeAwaitingAttachForInvalidation() { return this.updatedNodeAwaitingAttachForInvalidation; } /* renamed from: isAttached, reason: from getter */ public final boolean getIsAttached() { return this.isAttached; } public void onAttach() { } public void onDetach() { } public void onReset() { } public final void setAggregateChildKindSet$ui_release(int i) { this.aggregateChildKindSet = i; } public final void setAsDelegateTo$ui_release(Node owner) { Intrinsics.checkNotNullParameter(owner, "owner"); this.node = owner; } public final void setChild$ui_release(Node node) { this.child = node; } public final void setInsertedNodeAwaitingAttachForInvalidation$ui_release(boolean z) { this.insertedNodeAwaitingAttachForInvalidation = z; } public final void setKindSet$ui_release(int i) { this.kindSet = i; } public final void setOwnerScope$ui_release(ObserverNodeOwnerScope observerNodeOwnerScope) { this.ownerScope = observerNodeOwnerScope; } public final void setParent$ui_release(Node node) { this.parent = node; } public final void setUpdatedNodeAwaitingAttachForInvalidation$ui_release(boolean z) { this.updatedNodeAwaitingAttachForInvalidation = z; } public void updateCoordinator$ui_release(NodeCoordinator coordinator) { this.coordinator = coordinator; } public final CoroutineScope getCoroutineScope() { CoroutineScope coroutineScope = this.scope; if (coroutineScope != null) { return coroutineScope; } Node node = this; CoroutineScope CoroutineScope = CoroutineScopeKt.CoroutineScope(DelegatableNodeKt.requireOwner(node).getCoroutineContext().plus(JobKt.Job((Job) DelegatableNodeKt.requireOwner(node).getCoroutineContext().get(Job.INSTANCE)))); this.scope = CoroutineScope; return CoroutineScope; } /* renamed from: isKind-H91voCI$ui_release, reason: not valid java name */ public final boolean m2291isKindH91voCI$ui_release(int kind) { return (getKindSet() & kind) != 0; } public void markAsAttached$ui_release() { if (!(!this.isAttached)) { throw new IllegalStateException("node attached multiple times".toString()); } if (this.coordinator == null) { throw new IllegalStateException("attach invoked on a node without a coordinator".toString()); } this.isAttached = true; this.onAttachRunExpected = true; } public void runAttachLifecycle$ui_release() { if (!this.isAttached) { throw new IllegalStateException("Must run markAsAttached() prior to runAttachLifecycle".toString()); } if (!this.onAttachRunExpected) { throw new IllegalStateException("Must run runAttachLifecycle() only once after markAsAttached()".toString()); } this.onAttachRunExpected = false; onAttach(); this.onDetachRunExpected = true; } public void runDetachLifecycle$ui_release() { if (!this.isAttached) { throw new IllegalStateException("node detached multiple times".toString()); } if (this.coordinator == null) { throw new IllegalStateException("detach invoked on a node without a coordinator".toString()); } if (!this.onDetachRunExpected) { throw new IllegalStateException("Must run runDetachLifecycle() once after runAttachLifecycle() and before markAsDetached()".toString()); } this.onDetachRunExpected = false; onDetach(); } public void markAsDetached$ui_release() { if (!this.isAttached) { throw new IllegalStateException("Cannot detach a node that is not attached".toString()); } if (!(!this.onAttachRunExpected)) { throw new IllegalStateException("Must run runAttachLifecycle() before markAsDetached()".toString()); } if (!(!this.onDetachRunExpected)) { throw new IllegalStateException("Must run runDetachLifecycle() before markAsDetached()".toString()); } this.isAttached = false; CoroutineScope coroutineScope = this.scope; if (coroutineScope != null) { CoroutineScopeKt.cancel(coroutineScope, new ModifierNodeDetachedCancellationException()); this.scope = null; } } public void reset$ui_release() { if (!this.isAttached) { throw new IllegalStateException("Check failed.".toString()); } onReset(); } public final void sideEffect(Function0 effect) { Intrinsics.checkNotNullParameter(effect, "effect"); DelegatableNodeKt.requireOwner(this).registerOnEndApplyChangesListener(effect); } } /* compiled from: Modifier.kt */ @Metadata(d1 = {"\u0000,\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0010\u000e\n\u0000\b\u0086\u0003\u0018\u00002\u00020\u0001B\u0007\b\u0002¢\u0006\u0002\u0010\u0002J\u001c\u0010\u0003\u001a\u00020\u00042\u0012\u0010\u0005\u001a\u000e\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u00040\u0006H\u0016J\u001c\u0010\b\u001a\u00020\u00042\u0012\u0010\u0005\u001a\u000e\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u00020\u00040\u0006H\u0016J5\u0010\t\u001a\u0002H\n\"\u0004\b\u0000\u0010\n2\u0006\u0010\u000b\u001a\u0002H\n2\u0018\u0010\f\u001a\u0014\u0012\u0004\u0012\u0002H\n\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u0002H\n0\rH\u0016¢\u0006\u0002\u0010\u000eJ5\u0010\u000f\u001a\u0002H\n\"\u0004\b\u0000\u0010\n2\u0006\u0010\u000b\u001a\u0002H\n2\u0018\u0010\f\u001a\u0014\u0012\u0004\u0012\u00020\u0007\u0012\u0004\u0012\u0002H\n\u0012\u0004\u0012\u0002H\n0\rH\u0016¢\u0006\u0002\u0010\u000eJ\u0011\u0010\u0010\u001a\u00020\u00012\u0006\u0010\u0011\u001a\u00020\u0001H\u0096\u0004J\b\u0010\u0012\u001a\u00020\u0013H\u0016¨\u0006\u0014"}, d2 = {"Landroidx/compose/ui/Modifier$Companion;", "Landroidx/compose/ui/Modifier;", "()V", "all", "", "predicate", "Lkotlin/Function1;", "Landroidx/compose/ui/Modifier$Element;", "any", "foldIn", "R", "initial", "operation", "Lkotlin/Function2;", "(Ljava/lang/Object;Lkotlin/jvm/functions/Function2;)Ljava/lang/Object;", "foldOut", "then", "other", "toString", "", "ui_release"}, k = 1, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public static final class Companion implements Modifier { static final /* synthetic */ Companion $$INSTANCE = new Companion(); @Override // androidx.compose.ui.Modifier public boolean all(Function1 predicate) { Intrinsics.checkNotNullParameter(predicate, "predicate"); return true; } @Override // androidx.compose.ui.Modifier public boolean any(Function1 predicate) { Intrinsics.checkNotNullParameter(predicate, "predicate"); return false; } @Override // androidx.compose.ui.Modifier public R foldIn(R initial, Function2 operation) { Intrinsics.checkNotNullParameter(operation, "operation"); return initial; } @Override // androidx.compose.ui.Modifier public R foldOut(R initial, Function2 operation) { Intrinsics.checkNotNullParameter(operation, "operation"); return initial; } @Override // androidx.compose.ui.Modifier public Modifier then(Modifier other) { Intrinsics.checkNotNullParameter(other, "other"); return other; } public String toString() { return "Modifier"; } private Companion() { } } }