Rabbit-R1/android (non root)/java/sources/androidx/compose/foundation/text/modifiers/SelectableTextAnnotatedStringElement.java

180 lines
17 KiB
Java
Raw Normal View History

2024-05-21 21:08:36 +00:00
package androidx.compose.foundation.text.modifiers;
import androidx.compose.ui.geometry.Rect;
import androidx.compose.ui.graphics.ColorProducer;
import androidx.compose.ui.node.ModifierNodeElement;
import androidx.compose.ui.platform.InspectorInfo;
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 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: SelectableTextAnnotatedStringElement.kt */
@Metadata(d1 = {"\u0000z\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\u0016\n\u0002\u0010\u0000\n\u0002\b\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0000\b\u0080\b\u0018\u00002\b\u0012\u0004\u0012\u00020\u00020\u0001B°\u0001\u0012\u0006\u0010\u0003\u001a\u00020\u0004\u0012\u0006\u0010\u0005\u001a\u00020\u0006\u0012\u0006\u0010\u0007\u001a\u00020\b\u0012\u0016\b\u0002\u0010\t\u001a\u0010\u0012\u0004\u0012\u00020\u000b\u0012\u0004\u0012\u00020\f\u0018\u00010\n\u0012\b\b\u0002\u0010\r\u001a\u00020\u000e\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\u0012\u0012\u0016\b\u0002\u0010\u0014\u001a\u0010\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00170\u0016\u0018\u00010\u0015\u0012\u001e\b\u0002\u0010\u0018\u001a\u0018\u0012\f\u0012\n\u0012\u0006\u0012\u0004\u0018\u00010\u00190\u0015\u0012\u0004\u0012\u00020\f\u0018\u00010\n\u0012\n\b\u0002\u0010\u001a\u001a\u0004\u0018\u00010\u001b\u0012\n\b\u0002\u0010\u001c\u001a\u0004\u0018\u00010\u001dø\u0001\u0000¢\u0006\u0002\u0010\u001eJ\t\u0010 \u001a\u00020\u0004HÂ\u0003J\u001f\u0010!\u001a\u0018\u0012\f\u0012\n\u0012\u0006\u0012\u0004\u0018\u00010\u00190\u0015\u0012\u0004\u0012\u00020\f\u0018\u00010\nHÂ\u0003J\u000b\u0010\"\u001a\u0004\u0018\u00010\u001bHÂ\u0003J\u000b\u0010#\u001a\u0004\u0018\u00010\u001dHÂ\u0003J\t\u0010$\u001a\u00020\u0006HÂ\u0003J\t\u0010%\u001a\u00020\bHÂ\u0003J\u0017\u0010&\u001a\u0010\u0012\u0004\u0012\u00020\u000b\u0012\u0004\u0012\u00020\f\u0018\u00010\nHÂ\u0003J\u0019\u0010'\u001a\u00020\u000eHÂ\u0003ø\u0001\u0002ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b(\u0010)J\t\u0010*\u001a\u00020\u0010HÂ\u0003J\t\u0010+\u001a\u00020\u0012HÂ\u0003J\t\u0010,\u001a\u00020\u0012HÂ\u0003J\u0017\u0010-\u001a\u0010\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00170\u0016\u0018\u00010\u0015HÂ\u0003JÄ\u0001\u0010.\u001a\u00020\u00002\b\b\u0002\u0010\u0003\u001a\u00020\u00042\b\b\u0002\u0010\u0005\u001a\u00020\u00062\b\b\u0002\u0010\u0007\u001a\u00020\b2\u0016\b\u0002\u0010\t\u001a\u0010\u0012\u0004\u0012\u00020\u000b\u0012\u0004\u0012\u00020\f\u0018\u00010\n2\b\b\u0002\u0010\r\u001a\u00020\u000e2\b\b\u0002\u0010\u000f\u001a\u00020\u00102\b\b\u0002\u0010\u0011\u001a\u00020\u00122\b\b\u0002\u0010\u0013\u001a\u00020\u00122\u0016\b\u0002\u0010\u0014\u001a\u0010\u0012\n\u0012\b\u0012\u0004\u0012\u00020\u00170\u0016\u0018\u00010\u00152\u001e\b\u0002\u0010\u0018\u001a\u0018\u0012\f\u0012\n\u0012\u0006\u0012\u0004\u0018\u00010\u00190\u0015\u0012\u0004\u0012\u00020\f\u0018\u00010\n2\n\b\u0002\u0010\u001a\u001a\u0004\u0018\u00010\u001b2\n\b\u0002\u0010\u001c\u001a\u0004\u0018\u00010\u001dHÆ\u0001ø\u0001\u0001ø\u0001\u0000¢\u0006\u0004\b/\u00100J\b\u00101\u001a\u00020\u0002H\u0016J\u0013\u00102\u001a\u00020\u00102\b\u00103\u001a\u0004\u0018\u000104H\u0096\u0002J\b\u00105\u001a\u00020\u0012H\u0016J\t\u00106\u001a\u000207HÖ\u0001J\u0010\u00108\u001a\u00020\f2\u0006\u00109\u001a\u00020\u0002H\u0016J\f\u0010:\u001a\u00020\f*\u00020;H\u0016R\u0010\u0010\u001c\u001a\u0004\u0018\u00010\u001dX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0007\u001a\u00020\bX\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0011\u001a\u00020\u0012X\u0082\u0004¢\u0006\u0002\n\u0000R\u000e\u0010\u0013\u001a\u00020\u0012X\u0082\u0004¢\u0006\u0002\n\u0000R$\u0010\u0018\u001a\u0018\u0012\f\u0012\n\u0012\u0006\u0012\u0004\u0018\u00010\u00190\u0015\u0012\u0004\u0012\u00020\f\u0018\u00010\nX\u0082\u0004¢\u0006\u0002\n\u0000R\u001c\u0010\t\u001a\u0010\u0012\u0004\u0012\u00020\u000b\u0012\u0004\u0012\u00020\f\u0018\u00010\nX\u0082\u0004¢\u0006\u0002\n\u0000R\u0019\u0010\r\u001a\u00020\
/* loaded from: classes.dex */
public final /* data */ class SelectableTextAnnotatedStringElement extends ModifierNodeElement<SelectableTextAnnotatedStringNode> {
private final ColorProducer color;
private final FontFamily.Resolver fontFamilyResolver;
private final int maxLines;
private final int minLines;
private final Function1<List<Rect>, Unit> onPlaceholderLayout;
private final Function1<TextLayoutResult, Unit> onTextLayout;
private final int overflow;
private final List<AnnotatedString.Range<Placeholder>> placeholders;
private final SelectionController selectionController;
private final boolean softWrap;
private final TextStyle style;
private final AnnotatedString text;
public /* synthetic */ SelectableTextAnnotatedStringElement(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);
}
/* renamed from: component1, reason: from getter */
private final AnnotatedString getText() {
return this.text;
}
private final Function1<List<Rect>, Unit> component10() {
return this.onPlaceholderLayout;
}
/* renamed from: component11, reason: from getter */
private final SelectionController getSelectionController() {
return this.selectionController;
}
/* renamed from: component12, reason: from getter */
private final ColorProducer getColor() {
return this.color;
}
/* renamed from: component2, reason: from getter */
private final TextStyle getStyle() {
return this.style;
}
/* renamed from: component3, reason: from getter */
private final FontFamily.Resolver getFontFamilyResolver() {
return this.fontFamilyResolver;
}
private final Function1<TextLayoutResult, Unit> component4() {
return this.onTextLayout;
}
/* renamed from: component5-gIe3tQ8, reason: not valid java name and from getter */
private final int getOverflow() {
return this.overflow;
}
/* renamed from: component6, reason: from getter */
private final boolean getSoftWrap() {
return this.softWrap;
}
/* renamed from: component7, reason: from getter */
private final int getMaxLines() {
return this.maxLines;
}
/* renamed from: component8, reason: from getter */
private final int getMinLines() {
return this.minLines;
}
private final List<AnnotatedString.Range<Placeholder>> component9() {
return this.placeholders;
}
/* renamed from: copy-VhcvRP8, reason: not valid java name */
public final SelectableTextAnnotatedStringElement m868copyVhcvRP8(AnnotatedString text, TextStyle style, FontFamily.Resolver fontFamilyResolver, Function1<? super TextLayoutResult, Unit> onTextLayout, int overflow, boolean softWrap, int maxLines, int minLines, List<AnnotatedString.Range<Placeholder>> placeholders, Function1<? super List<Rect>, Unit> onPlaceholderLayout, SelectionController selectionController, ColorProducer color) {
Intrinsics.checkNotNullParameter(text, "text");
Intrinsics.checkNotNullParameter(style, "style");
Intrinsics.checkNotNullParameter(fontFamilyResolver, "fontFamilyResolver");
return new SelectableTextAnnotatedStringElement(text, style, fontFamilyResolver, onTextLayout, overflow, softWrap, maxLines, minLines, placeholders, onPlaceholderLayout, selectionController, color, null);
}
@Override // androidx.compose.ui.node.ModifierNodeElement
public void inspectableProperties(InspectorInfo inspectorInfo) {
Intrinsics.checkNotNullParameter(inspectorInfo, "<this>");
}
public String toString() {
StringBuilder sb = new StringBuilder("SelectableTextAnnotatedStringElement(text=");
sb.append((Object) this.text).append(", style=").append(this.style).append(", fontFamilyResolver=").append(this.fontFamilyResolver).append(", onTextLayout=").append(this.onTextLayout).append(", overflow=").append((Object) TextOverflow.m4819toStringimpl(this.overflow)).append(", softWrap=").append(this.softWrap).append(", maxLines=").append(this.maxLines).append(", minLines=").append(this.minLines).append(", placeholders=").append(this.placeholders).append(", onPlaceholderLayout=").append(this.onPlaceholderLayout).append(", selectionController=").append(this.selectionController).append(", color=");
sb.append(this.color).append(')');
return sb.toString();
}
public /* synthetic */ SelectableTextAnnotatedStringElement(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);
}
/* JADX WARN: Multi-variable type inference failed */
private SelectableTextAnnotatedStringElement(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.text = text;
this.style = style;
this.fontFamilyResolver = fontFamilyResolver;
this.onTextLayout = function1;
this.overflow = i;
this.softWrap = z;
this.maxLines = i2;
this.minLines = i3;
this.placeholders = list;
this.onPlaceholderLayout = function12;
this.selectionController = selectionController;
this.color = colorProducer;
}
/* JADX WARN: Can't rename method to resolve collision */
@Override // androidx.compose.ui.node.ModifierNodeElement
public SelectableTextAnnotatedStringNode create() {
return new SelectableTextAnnotatedStringNode(this.text, this.style, this.fontFamilyResolver, this.onTextLayout, this.overflow, this.softWrap, this.maxLines, this.minLines, this.placeholders, this.onPlaceholderLayout, this.selectionController, this.color, null);
}
@Override // androidx.compose.ui.node.ModifierNodeElement
public void update(SelectableTextAnnotatedStringNode node) {
Intrinsics.checkNotNullParameter(node, "node");
node.m869updateL09Iy8E(this.text, this.style, this.placeholders, this.minLines, this.maxLines, this.softWrap, this.fontFamilyResolver, this.overflow, this.onTextLayout, this.onPlaceholderLayout, this.selectionController, this.color);
}
@Override // androidx.compose.ui.node.ModifierNodeElement
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof SelectableTextAnnotatedStringElement)) {
return false;
}
SelectableTextAnnotatedStringElement selectableTextAnnotatedStringElement = (SelectableTextAnnotatedStringElement) other;
return Intrinsics.areEqual(this.color, selectableTextAnnotatedStringElement.color) && Intrinsics.areEqual(this.text, selectableTextAnnotatedStringElement.text) && Intrinsics.areEqual(this.style, selectableTextAnnotatedStringElement.style) && Intrinsics.areEqual(this.placeholders, selectableTextAnnotatedStringElement.placeholders) && Intrinsics.areEqual(this.fontFamilyResolver, selectableTextAnnotatedStringElement.fontFamilyResolver) && Intrinsics.areEqual(this.onTextLayout, selectableTextAnnotatedStringElement.onTextLayout) && TextOverflow.m4817equalsimpl0(this.overflow, selectableTextAnnotatedStringElement.overflow) && this.softWrap == selectableTextAnnotatedStringElement.softWrap && this.maxLines == selectableTextAnnotatedStringElement.maxLines && this.minLines == selectableTextAnnotatedStringElement.minLines && Intrinsics.areEqual(this.onPlaceholderLayout, selectableTextAnnotatedStringElement.onPlaceholderLayout) && Intrinsics.areEqual(this.selectionController, selectableTextAnnotatedStringElement.selectionController);
}
@Override // androidx.compose.ui.node.ModifierNodeElement
public int hashCode() {
int hashCode = ((((this.text.hashCode() * 31) + this.style.hashCode()) * 31) + this.fontFamilyResolver.hashCode()) * 31;
Function1<TextLayoutResult, Unit> function1 = this.onTextLayout;
int hashCode2 = (((((((((hashCode + (function1 != null ? function1.hashCode() : 0)) * 31) + TextOverflow.m4818hashCodeimpl(this.overflow)) * 31) + Boolean.hashCode(this.softWrap)) * 31) + this.maxLines) * 31) + this.minLines) * 31;
List<AnnotatedString.Range<Placeholder>> list = this.placeholders;
int hashCode3 = (hashCode2 + (list != null ? list.hashCode() : 0)) * 31;
Function1<List<Rect>, Unit> function12 = this.onPlaceholderLayout;
int hashCode4 = (hashCode3 + (function12 != null ? function12.hashCode() : 0)) * 31;
SelectionController selectionController = this.selectionController;
int hashCode5 = (hashCode4 + (selectionController != null ? selectionController.hashCode() : 0)) * 31;
ColorProducer colorProducer = this.color;
return hashCode5 + (colorProducer != null ? colorProducer.hashCode() : 0);
}
}