mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2025-01-09 13:43:22 +00:00
118 lines
14 KiB
Java
118 lines
14 KiB
Java
|
package androidx.compose.foundation.text.modifiers;
|
||
|
|
||
|
import androidx.compose.ui.geometry.Rect;
|
||
|
import androidx.compose.ui.graphics.ColorProducer;
|
||
|
import androidx.compose.ui.graphics.drawscope.ContentDrawScope;
|
||
|
import androidx.compose.ui.layout.IntrinsicMeasurable;
|
||
|
import androidx.compose.ui.layout.IntrinsicMeasureScope;
|
||
|
import androidx.compose.ui.layout.LayoutCoordinates;
|
||
|
import androidx.compose.ui.layout.Measurable;
|
||
|
import androidx.compose.ui.layout.MeasureResult;
|
||
|
import androidx.compose.ui.layout.MeasureScope;
|
||
|
import androidx.compose.ui.node.DelegatingNode;
|
||
|
import androidx.compose.ui.node.DrawModifierNode;
|
||
|
import androidx.compose.ui.node.GlobalPositionAwareModifierNode;
|
||
|
import androidx.compose.ui.node.LayoutModifierNode;
|
||
|
import androidx.compose.ui.node.LayoutModifierNodeKt;
|
||
|
import androidx.compose.ui.text.AnnotatedString;
|
||
|
import androidx.compose.ui.text.Placeholder;
|
||
|
import androidx.compose.ui.text.TextLayoutResult;
|
||
|
import androidx.compose.ui.text.TextStyle;
|
||
|
import androidx.compose.ui.text.font.FontFamily;
|
||
|
import androidx.compose.ui.text.style.TextOverflow;
|
||
|
import io.sentry.protocol.ViewHierarchyNode;
|
||
|
import java.util.List;
|
||
|
import kotlin.Metadata;
|
||
|
import kotlin.Unit;
|
||
|
import kotlin.jvm.functions.Function1;
|
||
|
import kotlin.jvm.internal.DefaultConstructorMarker;
|
||
|
import kotlin.jvm.internal.Intrinsics;
|
||
|
|
||
|
/* compiled from: SelectableTextAnnotatedStringNode.kt */
|
||
|
@Metadata(d1 = {"\u0000¦\u0001\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\u0010\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0010\u000b\n\u0000\n\u0002\u0010\b\n\u0002\b\u0002\n\u0002\u0010 \n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0005\n\u0002\u0018\u0002\n\u0000\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\u0000\u0018\u00002\u00020\u00012\u00020\u00022\u00020\u00032\u00020\u0004B°\u0001\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\u0006\u0010\t\u001a\u00020\n\u0012\u0016\b\u0002\u0010\u000b\u001a\u0010\u0012\u0004\u0012\u00020\r\u0012\u0004\u0012\u00020\u000e\u0018\u00010\f\u0012\b\b\u0002\u0010\u000f\u001a\u00020\u0010\u0012\b\b\u0002\u0010\u0011\u001a\u00020\u0012\u0012\b\b\u0002\u0010\u0013\u001a\u00020\u0014\u0012\b\b\u0002\u0010\u0015\u001a\u00020\u0014\u0012\u0016\b\u0002\u0010\u0016\u001a\u0010\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00190\u0018\u0018\u00010\u0017\u0012\u001e\b\u0002\u0010\u001a\u001a\u0018\u0012\f\u0012\n\u0012\u0006\u0012\u0004\u0018\u00010\u001b0\u0017\u0012\u0004\u0012\u00020\u000e\u0018\u00010\f\u0012\n\b\u0002\u0010\u001c\u001a\u0004\u0018\u00010\u001d\u0012\n\b\u0002\u0010\u001e\u001a\u0004\u0018\u00010\u001fø\u0001\u0000¢\u0006\u0002\u0010 J\u0010\u0010#\u001a\u00020\u000e2\u0006\u0010$\u001a\u00020%H\u0016J©\u0001\u0010&\u001a\u00020\u000e2\u0006\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0007\u001a\u00020\b2\u0014\u0010\u0016\u001a\u0010\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00190\u0018\u0018\u00010\u00172\u0006\u0010\u0015\u001a\u00020\u00142\u0006\u0010\u0013\u001a\u00020\u00142\u0006\u0010\u0011\u001a\u00020\u00122\u0006\u0010\t\u001a\u00020\n2\u0006\u0010\u000f\u001a\u00020\u00102\u0014\u0010\u000b\u001a\u0010\u0012\u0004\u0012\u00020\r\u0012\u0004\u0012\u00020\u000e\u0018\u00010\f2\u001c\u0010\u001a\u001a\u0018\u0012\f\u0012\n\u0012\u0006\u0012\u0004\u0018\u00010\u001b0\u0017\u0012\u0004\u0012\u00020\u000e\u0018\u00010\f2\b\u0010\u001c\u001a\u0004\u0018\u00010\u001d2\b\u0010'\u001a\u0004\u0018\u00010\u001fø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b(\u0010)J\f\u0010*\u001a\u00020\u000e*\u00020+H\u0016J\u001c\u0010,\u001a\u00020\u0014*\u00020-2\u0006\u0010.\u001a\u00020/2\u0006\u00100\u001a\u00020\u0014H\u0016J\u001c\u00101\u001a\u00020\u0014*\u00020-2\u0006\u0010.\u001a\u00020/2\u0006\u00102\u001a\u00020\u0014H\u0016J)\u00103\u001a\u000204*\u0002052\u0006\u0010.\u001a\u0002062\u0006\u00107\u001a\u000208H\u0016ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b9\u0010:J\u001c\u0010;\u001a\u00020\u0014*\u00020-2\u0006\u0010.\u001a\u00020/2\u0006\u00100\u001a\u00020\u0014H\u0016J\u001c\u0010<\u001a\u00020\u0014*\u00020-2\u0006\u0010.\u001a\u00020/2\u0006\u00102\u001a\u00020\u0014H\u0016R\u000e\u0010!\u001a\u00020\"X\u0082\u0004¢\u0006\u0002\n\u0000R\u0010\u0010\u001c\u001a\u0004\u0018\u00010\u001dX\u0082\u0004¢\u0006\u0002\n\u0000\u0082\u0002\u000b\n\u0002\b\u0019\n\u0005\b¡\u001e0\u0001¨\u0006="}, d2 = {"Landroidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringNode;", "Landroidx/compose/ui/node/DelegatingNode;", "Landroidx/compose/ui/node/LayoutModifierNode;", "Landroidx/compose/ui/node/DrawModifierNode;", "Landroidx/compose/ui/node/GlobalPositionAwareModifierNode;", "text", "Landroidx/compose/ui/text/AnnotatedString;", "style", "Landroidx/compose/ui/text/TextStyle;", "fontFamilyResolver", "Landroidx/compose/ui/text/font/FontFamily$Resolver;", "onTextLayout", "Lkotlin/Function1;", "Landroidx/compose/ui/text/TextLayoutResult;", "", "overflow", "Landroidx/compose/ui/text/style/TextOverflow;", "softWrap", "", "maxLines", "", "minLin
|
||
|
/* loaded from: classes.dex */
|
||
|
public final class SelectableTextAnnotatedStringNode extends DelegatingNode implements LayoutModifierNode, DrawModifierNode, GlobalPositionAwareModifierNode {
|
||
|
private final TextAnnotatedStringNode delegate;
|
||
|
private final SelectionController selectionController;
|
||
|
|
||
|
public /* synthetic */ SelectableTextAnnotatedStringNode(AnnotatedString annotatedString, TextStyle textStyle, FontFamily.Resolver resolver, Function1 function1, int i, boolean z, int i2, int i3, List list, Function1 function12, SelectionController selectionController, ColorProducer colorProducer, DefaultConstructorMarker defaultConstructorMarker) {
|
||
|
this(annotatedString, textStyle, resolver, function1, i, z, i2, i3, list, function12, selectionController, colorProducer);
|
||
|
}
|
||
|
|
||
|
public /* synthetic */ SelectableTextAnnotatedStringNode(AnnotatedString annotatedString, TextStyle textStyle, FontFamily.Resolver resolver, Function1 function1, int i, boolean z, int i2, int i3, List list, Function1 function12, SelectionController selectionController, ColorProducer colorProducer, int i4, DefaultConstructorMarker defaultConstructorMarker) {
|
||
|
this(annotatedString, textStyle, resolver, (i4 & 8) != 0 ? null : function1, (i4 & 16) != 0 ? TextOverflow.INSTANCE.m4824getClipgIe3tQ8() : i, (i4 & 32) != 0 ? true : z, (i4 & 64) != 0 ? Integer.MAX_VALUE : i2, (i4 & 128) != 0 ? 1 : i3, (i4 & 256) != 0 ? null : list, (i4 & 512) != 0 ? null : function12, (i4 & 1024) != 0 ? null : selectionController, (i4 & 2048) != 0 ? null : colorProducer, null);
|
||
|
}
|
||
|
|
||
|
private SelectableTextAnnotatedStringNode(AnnotatedString text, TextStyle style, FontFamily.Resolver fontFamilyResolver, Function1<? super TextLayoutResult, Unit> function1, int i, boolean z, int i2, int i3, List<AnnotatedString.Range<Placeholder>> list, Function1<? super List<Rect>, Unit> function12, SelectionController selectionController, ColorProducer colorProducer) {
|
||
|
Intrinsics.checkNotNullParameter(text, "text");
|
||
|
Intrinsics.checkNotNullParameter(style, "style");
|
||
|
Intrinsics.checkNotNullParameter(fontFamilyResolver, "fontFamilyResolver");
|
||
|
this.selectionController = selectionController;
|
||
|
this.delegate = (TextAnnotatedStringNode) delegate(new TextAnnotatedStringNode(text, style, fontFamilyResolver, function1, i, z, i2, i3, list, function12, selectionController, colorProducer, null));
|
||
|
if (selectionController == null) {
|
||
|
throw new IllegalArgumentException("Do not use SelectionCapableStaticTextModifier unless selectionController != null".toString());
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.compose.ui.node.GlobalPositionAwareModifierNode
|
||
|
public void onGloballyPositioned(LayoutCoordinates coordinates) {
|
||
|
Intrinsics.checkNotNullParameter(coordinates, "coordinates");
|
||
|
SelectionController selectionController = this.selectionController;
|
||
|
if (selectionController != null) {
|
||
|
selectionController.updateGlobalPosition(coordinates);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
@Override // androidx.compose.ui.node.DrawModifierNode
|
||
|
public void draw(ContentDrawScope contentDrawScope) {
|
||
|
Intrinsics.checkNotNullParameter(contentDrawScope, "<this>");
|
||
|
this.delegate.drawNonExtension(contentDrawScope);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.compose.ui.node.LayoutModifierNode
|
||
|
/* renamed from: measure-3p2s80s */
|
||
|
public MeasureResult mo247measure3p2s80s(MeasureScope measure, Measurable measurable, long j) {
|
||
|
Intrinsics.checkNotNullParameter(measure, "$this$measure");
|
||
|
Intrinsics.checkNotNullParameter(measurable, "measurable");
|
||
|
return this.delegate.m876measureNonExtension3p2s80s(measure, measurable, j);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.compose.ui.node.LayoutModifierNode
|
||
|
public int minIntrinsicWidth(IntrinsicMeasureScope intrinsicMeasureScope, IntrinsicMeasurable measurable, int i) {
|
||
|
Intrinsics.checkNotNullParameter(intrinsicMeasureScope, "<this>");
|
||
|
Intrinsics.checkNotNullParameter(measurable, "measurable");
|
||
|
return this.delegate.minIntrinsicWidthNonExtension(intrinsicMeasureScope, measurable, i);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.compose.ui.node.LayoutModifierNode
|
||
|
public int minIntrinsicHeight(IntrinsicMeasureScope intrinsicMeasureScope, IntrinsicMeasurable measurable, int i) {
|
||
|
Intrinsics.checkNotNullParameter(intrinsicMeasureScope, "<this>");
|
||
|
Intrinsics.checkNotNullParameter(measurable, "measurable");
|
||
|
return this.delegate.minIntrinsicHeightNonExtension(intrinsicMeasureScope, measurable, i);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.compose.ui.node.LayoutModifierNode
|
||
|
public int maxIntrinsicWidth(IntrinsicMeasureScope intrinsicMeasureScope, IntrinsicMeasurable measurable, int i) {
|
||
|
Intrinsics.checkNotNullParameter(intrinsicMeasureScope, "<this>");
|
||
|
Intrinsics.checkNotNullParameter(measurable, "measurable");
|
||
|
return this.delegate.maxIntrinsicWidthNonExtension(intrinsicMeasureScope, measurable, i);
|
||
|
}
|
||
|
|
||
|
@Override // androidx.compose.ui.node.LayoutModifierNode
|
||
|
public int maxIntrinsicHeight(IntrinsicMeasureScope intrinsicMeasureScope, IntrinsicMeasurable measurable, int i) {
|
||
|
Intrinsics.checkNotNullParameter(intrinsicMeasureScope, "<this>");
|
||
|
Intrinsics.checkNotNullParameter(measurable, "measurable");
|
||
|
return this.delegate.maxIntrinsicHeightNonExtension(intrinsicMeasureScope, measurable, i);
|
||
|
}
|
||
|
|
||
|
/* renamed from: update-L09Iy8E, reason: not valid java name */
|
||
|
public final void m869updateL09Iy8E(AnnotatedString text, TextStyle style, List<AnnotatedString.Range<Placeholder>> placeholders, int minLines, int maxLines, boolean softWrap, FontFamily.Resolver fontFamilyResolver, int overflow, Function1<? super TextLayoutResult, Unit> onTextLayout, Function1<? super List<Rect>, Unit> onPlaceholderLayout, SelectionController selectionController, ColorProducer color) {
|
||
|
Intrinsics.checkNotNullParameter(text, "text");
|
||
|
Intrinsics.checkNotNullParameter(style, "style");
|
||
|
Intrinsics.checkNotNullParameter(fontFamilyResolver, "fontFamilyResolver");
|
||
|
TextAnnotatedStringNode textAnnotatedStringNode = this.delegate;
|
||
|
textAnnotatedStringNode.doInvalidations(textAnnotatedStringNode.updateDraw(color, style), this.delegate.updateText(text), this.delegate.m877updateLayoutRelatedArgsMPT68mk(style, placeholders, minLines, maxLines, softWrap, fontFamilyResolver, overflow), this.delegate.updateCallbacks(onTextLayout, onPlaceholderLayout, selectionController));
|
||
|
LayoutModifierNodeKt.invalidateMeasurement(this);
|
||
|
}
|
||
|
}
|