Rabbit-R1/original r1/java/sources/androidx/compose/foundation/layout/UnspecifiedConstraintsNode.java
2024-05-21 17:08:36 -04:00

128 lines
9.5 KiB
Java

package androidx.compose.foundation.layout;
import androidx.compose.ui.Modifier;
import androidx.compose.ui.layout.IntrinsicMeasurable;
import androidx.compose.ui.layout.IntrinsicMeasureScope;
import androidx.compose.ui.layout.Measurable;
import androidx.compose.ui.layout.MeasureResult;
import androidx.compose.ui.layout.MeasureScope;
import androidx.compose.ui.layout.Placeable;
import androidx.compose.ui.node.LayoutModifierNode;
import androidx.compose.ui.unit.Constraints;
import androidx.compose.ui.unit.ConstraintsKt;
import androidx.compose.ui.unit.Dp;
import io.sentry.protocol.ViewHierarchyNode;
import kotlin.Metadata;
import kotlin.Unit;
import kotlin.jvm.functions.Function1;
import kotlin.jvm.internal.DefaultConstructorMarker;
import kotlin.jvm.internal.Intrinsics;
import kotlin.ranges.RangesKt;
/* compiled from: Size.kt */
@Metadata(d1 = {"\u0000>\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\n\n\u0002\u0010\b\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0004\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0005\b\u0002\u0018\u00002\u00020\u00012\u00020\u0002B\u001c\u0012\b\b\u0002\u0010\u0003\u001a\u00020\u0004\u0012\b\b\u0002\u0010\u0005\u001a\u00020\u0004ø\u0001\u0000¢\u0006\u0002\u0010\u0006J\u001c\u0010\u000e\u001a\u00020\u000f*\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u000fH\u0016J\u001c\u0010\u0014\u001a\u00020\u000f*\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0015\u001a\u00020\u000fH\u0016J)\u0010\u0016\u001a\u00020\u0017*\u00020\u00182\u0006\u0010\u0011\u001a\u00020\u00192\u0006\u0010\u001a\u001a\u00020\u001bH\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b\u001c\u0010\u001dJ\u001c\u0010\u001e\u001a\u00020\u000f*\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0013\u001a\u00020\u000fH\u0016J\u001c\u0010\u001f\u001a\u00020\u000f*\u00020\u00102\u0006\u0010\u0011\u001a\u00020\u00122\u0006\u0010\u0015\u001a\u00020\u000fH\u0016R%\u0010\u0005\u001a\u00020\u0004X\u0086\u000eø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0010\n\u0002\u0010\u000b\u001a\u0004\b\u0007\u0010\b\"\u0004\b\t\u0010\nR%\u0010\u0003\u001a\u00020\u0004X\u0086\u000eø\u0001\u0000ø\u0001\u0001ø\u0001\u0002¢\u0006\u0010\n\u0002\u0010\u000b\u001a\u0004\b\f\u0010\b\"\u0004\b\r\u0010\n\u0082\u0002\u000f\n\u0002\b\u0019\n\u0005\\u001e0\u0001\n\u0002\b!¨\u0006 "}, d2 = {"Landroidx/compose/foundation/layout/UnspecifiedConstraintsNode;", "Landroidx/compose/ui/node/LayoutModifierNode;", "Landroidx/compose/ui/Modifier$Node;", "minWidth", "Landroidx/compose/ui/unit/Dp;", "minHeight", "(FFLkotlin/jvm/internal/DefaultConstructorMarker;)V", "getMinHeight-D9Ej5fM", "()F", "setMinHeight-0680j_4", "(F)V", "F", "getMinWidth-D9Ej5fM", "setMinWidth-0680j_4", "maxIntrinsicHeight", "", "Landroidx/compose/ui/layout/IntrinsicMeasureScope;", "measurable", "Landroidx/compose/ui/layout/IntrinsicMeasurable;", ViewHierarchyNode.JsonKeys.WIDTH, "maxIntrinsicWidth", ViewHierarchyNode.JsonKeys.HEIGHT, "measure", "Landroidx/compose/ui/layout/MeasureResult;", "Landroidx/compose/ui/layout/MeasureScope;", "Landroidx/compose/ui/layout/Measurable;", "constraints", "Landroidx/compose/ui/unit/Constraints;", "measure-3p2s80s", "(Landroidx/compose/ui/layout/MeasureScope;Landroidx/compose/ui/layout/Measurable;J)Landroidx/compose/ui/layout/MeasureResult;", "minIntrinsicHeight", "minIntrinsicWidth", "foundation-layout_release"}, k = 1, mv = {1, 8, 0}, xi = 48)
/* loaded from: classes.dex */
final class UnspecifiedConstraintsNode extends Modifier.Node implements LayoutModifierNode {
private float minHeight;
private float minWidth;
public /* synthetic */ UnspecifiedConstraintsNode(float f, float f2, DefaultConstructorMarker defaultConstructorMarker) {
this(f, f2);
}
/* renamed from: getMinHeight-D9Ej5fM, reason: not valid java name and from getter */
public final float getMinHeight() {
return this.minHeight;
}
/* renamed from: getMinWidth-D9Ej5fM, reason: not valid java name and from getter */
public final float getMinWidth() {
return this.minWidth;
}
/* renamed from: setMinHeight-0680j_4, reason: not valid java name */
public final void m558setMinHeight0680j_4(float f) {
this.minHeight = f;
}
/* renamed from: setMinWidth-0680j_4, reason: not valid java name */
public final void m559setMinWidth0680j_4(float f) {
this.minWidth = f;
}
public /* synthetic */ UnspecifiedConstraintsNode(float f, float f2, int i, DefaultConstructorMarker defaultConstructorMarker) {
this((i & 1) != 0 ? Dp.INSTANCE.m4903getUnspecifiedD9Ej5fM() : f, (i & 2) != 0 ? Dp.INSTANCE.m4903getUnspecifiedD9Ej5fM() : f2, null);
}
private UnspecifiedConstraintsNode(float f, float f2) {
this.minWidth = f;
this.minHeight = f2;
}
@Override // androidx.compose.ui.node.LayoutModifierNode
/* renamed from: measure-3p2s80s */
public MeasureResult mo247measure3p2s80s(MeasureScope measure, Measurable measurable, long j) {
int m4841getMinWidthimpl;
int m4840getMinHeightimpl;
Intrinsics.checkNotNullParameter(measure, "$this$measure");
Intrinsics.checkNotNullParameter(measurable, "measurable");
if (!Dp.m4888equalsimpl0(this.minWidth, Dp.INSTANCE.m4903getUnspecifiedD9Ej5fM()) && Constraints.m4841getMinWidthimpl(j) == 0) {
m4841getMinWidthimpl = RangesKt.coerceAtLeast(RangesKt.coerceAtMost(measure.mo329roundToPx0680j_4(this.minWidth), Constraints.m4839getMaxWidthimpl(j)), 0);
} else {
m4841getMinWidthimpl = Constraints.m4841getMinWidthimpl(j);
}
int m4839getMaxWidthimpl = Constraints.m4839getMaxWidthimpl(j);
if (!Dp.m4888equalsimpl0(this.minHeight, Dp.INSTANCE.m4903getUnspecifiedD9Ej5fM()) && Constraints.m4840getMinHeightimpl(j) == 0) {
m4840getMinHeightimpl = RangesKt.coerceAtLeast(RangesKt.coerceAtMost(measure.mo329roundToPx0680j_4(this.minHeight), Constraints.m4838getMaxHeightimpl(j)), 0);
} else {
m4840getMinHeightimpl = Constraints.m4840getMinHeightimpl(j);
}
final Placeable mo3876measureBRTryo0 = measurable.mo3876measureBRTryo0(ConstraintsKt.Constraints(m4841getMinWidthimpl, m4839getMaxWidthimpl, m4840getMinHeightimpl, Constraints.m4838getMaxHeightimpl(j)));
return MeasureScope.layout$default(measure, mo3876measureBRTryo0.getWidth(), mo3876measureBRTryo0.getHeight(), null, new Function1<Placeable.PlacementScope, Unit>() { // from class: androidx.compose.foundation.layout.UnspecifiedConstraintsNode$measure$1
/* JADX INFO: Access modifiers changed from: package-private */
{
super(1);
}
@Override // kotlin.jvm.functions.Function1
public /* bridge */ /* synthetic */ Unit invoke(Placeable.PlacementScope placementScope) {
invoke2(placementScope);
return Unit.INSTANCE;
}
/* renamed from: invoke, reason: avoid collision after fix types in other method */
public final void invoke2(Placeable.PlacementScope layout) {
Intrinsics.checkNotNullParameter(layout, "$this$layout");
Placeable.PlacementScope.placeRelative$default(layout, Placeable.this, 0, 0, 0.0f, 4, null);
}
}, 4, null);
}
@Override // androidx.compose.ui.node.LayoutModifierNode
public int minIntrinsicWidth(IntrinsicMeasureScope intrinsicMeasureScope, IntrinsicMeasurable measurable, int i) {
Intrinsics.checkNotNullParameter(intrinsicMeasureScope, "<this>");
Intrinsics.checkNotNullParameter(measurable, "measurable");
return RangesKt.coerceAtLeast(measurable.minIntrinsicWidth(i), !Dp.m4888equalsimpl0(this.minWidth, Dp.INSTANCE.m4903getUnspecifiedD9Ej5fM()) ? intrinsicMeasureScope.mo329roundToPx0680j_4(this.minWidth) : 0);
}
@Override // androidx.compose.ui.node.LayoutModifierNode
public int maxIntrinsicWidth(IntrinsicMeasureScope intrinsicMeasureScope, IntrinsicMeasurable measurable, int i) {
Intrinsics.checkNotNullParameter(intrinsicMeasureScope, "<this>");
Intrinsics.checkNotNullParameter(measurable, "measurable");
return RangesKt.coerceAtLeast(measurable.maxIntrinsicWidth(i), !Dp.m4888equalsimpl0(this.minWidth, Dp.INSTANCE.m4903getUnspecifiedD9Ej5fM()) ? intrinsicMeasureScope.mo329roundToPx0680j_4(this.minWidth) : 0);
}
@Override // androidx.compose.ui.node.LayoutModifierNode
public int minIntrinsicHeight(IntrinsicMeasureScope intrinsicMeasureScope, IntrinsicMeasurable measurable, int i) {
Intrinsics.checkNotNullParameter(intrinsicMeasureScope, "<this>");
Intrinsics.checkNotNullParameter(measurable, "measurable");
return RangesKt.coerceAtLeast(measurable.minIntrinsicHeight(i), !Dp.m4888equalsimpl0(this.minHeight, Dp.INSTANCE.m4903getUnspecifiedD9Ej5fM()) ? intrinsicMeasureScope.mo329roundToPx0680j_4(this.minHeight) : 0);
}
@Override // androidx.compose.ui.node.LayoutModifierNode
public int maxIntrinsicHeight(IntrinsicMeasureScope intrinsicMeasureScope, IntrinsicMeasurable measurable, int i) {
Intrinsics.checkNotNullParameter(intrinsicMeasureScope, "<this>");
Intrinsics.checkNotNullParameter(measurable, "measurable");
return RangesKt.coerceAtLeast(measurable.maxIntrinsicHeight(i), !Dp.m4888equalsimpl0(this.minHeight, Dp.INSTANCE.m4903getUnspecifiedD9Ej5fM()) ? intrinsicMeasureScope.mo329roundToPx0680j_4(this.minHeight) : 0);
}
}