package androidx.compose.ui.window; import android.graphics.Rect; import android.view.View; import android.view.ViewGroup; import android.view.WindowManager; import androidx.compose.runtime.Applier; import androidx.compose.runtime.ComposablesKt; import androidx.compose.runtime.Composer; import androidx.compose.runtime.ComposerKt; import androidx.compose.runtime.CompositionLocalKt; import androidx.compose.runtime.CompositionLocalMap; import androidx.compose.runtime.ProvidableCompositionLocal; import androidx.compose.runtime.ProvidedValue; import androidx.compose.runtime.RecomposeScopeImplKt; import androidx.compose.runtime.ScopeUpdateScope; import androidx.compose.runtime.SkippableUpdater; import androidx.compose.runtime.State; import androidx.compose.runtime.Updater; import androidx.compose.ui.Modifier; import androidx.compose.ui.layout.LayoutKt; import androidx.compose.ui.node.ComposeUiNode; import androidx.compose.ui.unit.IntRect; import io.sentry.protocol.ViewHierarchyNode; import kotlin.Metadata; import kotlin.Unit; import kotlin.jvm.functions.Function0; import kotlin.jvm.functions.Function2; import kotlin.jvm.functions.Function3; import kotlin.jvm.internal.Intrinsics; /* compiled from: AndroidPopup.android.kt */ @Metadata(d1 = {"\u0000^\n\u0000\n\u0002\u0018\u0002\n\u0002\u0010\u000e\n\u0002\b\u0003\n\u0002\u0010\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\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\b\u0006\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u000b\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0002\u001aX\u0010\u0005\u001a\u00020\u00062\b\b\u0002\u0010\u0007\u001a\u00020\b2\b\b\u0002\u0010\t\u001a\u00020\n2\u0010\b\u0002\u0010\u000b\u001a\n\u0012\u0004\u0012\u00020\u0006\u0018\u00010\f2\b\b\u0002\u0010\r\u001a\u00020\u000e2\u0011\u0010\u000f\u001a\r\u0012\u0004\u0012\u00020\u00060\f¢\u0006\u0002\b\u0010H\u0007ø\u0001\u0000ø\u0001\u0001¢\u0006\u0004\b\u0011\u0010\u0012\u001aD\u0010\u0005\u001a\u00020\u00062\u0006\u0010\u0013\u001a\u00020\u00142\u0010\b\u0002\u0010\u000b\u001a\n\u0012\u0004\u0012\u00020\u0006\u0018\u00010\f2\b\b\u0002\u0010\r\u001a\u00020\u000e2\u0011\u0010\u000f\u001a\r\u0012\u0004\u0012\u00020\u00060\f¢\u0006\u0002\b\u0010H\u0007¢\u0006\u0002\u0010\u0015\u001a(\u0010\u0016\u001a\u00020\u00062\u0006\u0010\u0017\u001a\u00020\u00022\u0011\u0010\u000f\u001a\r\u0012\u0004\u0012\u00020\u00060\f¢\u0006\u0002\b\u0010H\u0001¢\u0006\u0002\u0010\u0018\u001a+\u0010\u0019\u001a\u00020\u00062\u0006\u0010\u001a\u001a\u00020\u001b2\u0013\b\b\u0010\u000f\u001a\r\u0012\u0004\u0012\u00020\u00060\f¢\u0006\u0002\b\u0010H\u0083\b¢\u0006\u0002\u0010\u001c\u001a\u001a\u0010\u001d\u001a\u00020\u001e2\u0006\u0010\u001f\u001a\u00020 2\n\b\u0002\u0010!\u001a\u0004\u0018\u00010\u0002\u001a\f\u0010\"\u001a\u00020\u001e*\u00020 H\u0000\u001a\f\u0010#\u001a\u00020$*\u00020%H\u0002\"\u001a\u0010\u0000\u001a\b\u0012\u0004\u0012\u00020\u00020\u0001X\u0080\u0004¢\u0006\b\n\u0000\u001a\u0004\b\u0003\u0010\u0004\u0082\u0002\u000b\n\u0005\b¡\u001e0\u0001\n\u0002\b\u0019¨\u0006&²\u0006\u0015\u0010'\u001a\r\u0012\u0004\u0012\u00020\u00060\f¢\u0006\u0002\b\u0010X\u008a\u0084\u0002"}, d2 = {"LocalPopupTestTag", "Landroidx/compose/runtime/ProvidableCompositionLocal;", "", "getLocalPopupTestTag", "()Landroidx/compose/runtime/ProvidableCompositionLocal;", "Popup", "", "alignment", "Landroidx/compose/ui/Alignment;", "offset", "Landroidx/compose/ui/unit/IntOffset;", "onDismissRequest", "Lkotlin/Function0;", "properties", "Landroidx/compose/ui/window/PopupProperties;", "content", "Landroidx/compose/runtime/Composable;", "Popup-K5zGePQ", "(Landroidx/compose/ui/Alignment;JLkotlin/jvm/functions/Function0;Landroidx/compose/ui/window/PopupProperties;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V", "popupPositionProvider", "Landroidx/compose/ui/window/PopupPositionProvider;", "(Landroidx/compose/ui/window/PopupPositionProvider;Lkotlin/jvm/functions/Function0;Landroidx/compose/ui/window/PopupProperties;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;II)V", "PopupTestTag", ViewHierarchyNode.JsonKeys.TAG, "(Ljava/lang/String;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V", "SimpleStack", "modifier", "Landroidx/compose/ui/Modifier;", "(Landroidx/compose/ui/Modifier;Lkotlin/jvm/functions/Function2;Landroidx/compose/runtime/Composer;I)V", "isPopupLayout", "", "view", "Landroid/view/View;", "testTag", "isFlagSecureEnabled", "toIntBounds", "Landroidx/compose/ui/unit/IntRect;", "Landroid/graphics/Rect;", "ui_release", "currentContent"}, k = 2, mv = {1, 8, 0}, xi = 48) /* loaded from: classes.dex */ public final class AndroidPopup_androidKt { private static final ProvidableCompositionLocal LocalPopupTestTag = CompositionLocalKt.compositionLocalOf$default(null, new Function0() { // from class: androidx.compose.ui.window.AndroidPopup_androidKt$LocalPopupTestTag$1 @Override // kotlin.jvm.functions.Function0 public final String invoke() { return "DEFAULT_TEST_TAG"; } }, 1, null); public static final ProvidableCompositionLocal getLocalPopupTestTag() { return LocalPopupTestTag; } /* JADX WARN: Removed duplicated region for block: B:10:0x0055 */ /* JADX WARN: Removed duplicated region for block: B:14:0x0071 */ /* JADX WARN: Removed duplicated region for block: B:18:0x008d */ /* JADX WARN: Removed duplicated region for block: B:21:0x00aa */ /* JADX WARN: Removed duplicated region for block: B:26:0x0157 */ /* JADX WARN: Removed duplicated region for block: B:29:? A[RETURN, SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:31:0x00bc */ /* JADX WARN: Removed duplicated region for block: B:33:0x00c7 */ /* JADX WARN: Removed duplicated region for block: B:36:0x00d0 */ /* JADX WARN: Removed duplicated region for block: B:38:0x00d3 */ /* JADX WARN: Removed duplicated region for block: B:41:0x00f0 */ /* JADX WARN: Removed duplicated region for block: B:44:0x0114 */ /* JADX WARN: Removed duplicated region for block: B:48:0x0149 */ /* JADX WARN: Removed duplicated region for block: B:51:0x00c4 */ /* JADX WARN: Removed duplicated region for block: B:52:0x0090 */ /* JADX WARN: Removed duplicated region for block: B:59:0x0074 */ /* JADX WARN: Removed duplicated region for block: B:66:0x0058 */ /* renamed from: Popup-K5zGePQ */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static final void m5124PopupK5zGePQ(androidx.compose.ui.Alignment r24, long r25, kotlin.jvm.functions.Function0 r27, androidx.compose.ui.window.PopupProperties r28, final kotlin.jvm.functions.Function2 r29, androidx.compose.runtime.Composer r30, final int r31, final int r32) { /* Method dump skipped, instructions count: 361 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.window.AndroidPopup_androidKt.m5124PopupK5zGePQ(androidx.compose.ui.Alignment, long, kotlin.jvm.functions.Function0, androidx.compose.ui.window.PopupProperties, kotlin.jvm.functions.Function2, androidx.compose.runtime.Composer, int, int):void"); } /* JADX WARN: Removed duplicated region for block: B:10:0x0055 */ /* JADX WARN: Removed duplicated region for block: B:14:0x0071 */ /* JADX WARN: Removed duplicated region for block: B:17:0x008b */ /* JADX WARN: Removed duplicated region for block: B:22:0x02ae */ /* JADX WARN: Removed duplicated region for block: B:25:? A[RETURN, SYNTHETIC] */ /* JADX WARN: Removed duplicated region for block: B:28:0x009c */ /* JADX WARN: Removed duplicated region for block: B:30:0x00a3 */ /* JADX WARN: Removed duplicated region for block: B:33:0x00c3 */ /* JADX WARN: Removed duplicated region for block: B:36:0x0158 */ /* JADX WARN: Removed duplicated region for block: B:39:0x0220 */ /* JADX WARN: Removed duplicated region for block: B:42:0x022c */ /* JADX WARN: Removed duplicated region for block: B:45:0x0255 */ /* JADX WARN: Removed duplicated region for block: B:49:0x02a0 */ /* JADX WARN: Removed duplicated region for block: B:52:0x0230 */ /* JADX WARN: Removed duplicated region for block: B:53:0x019e */ /* JADX WARN: Removed duplicated region for block: B:54:0x00bb */ /* JADX WARN: Removed duplicated region for block: B:55:0x009f */ /* JADX WARN: Removed duplicated region for block: B:56:0x0074 */ /* JADX WARN: Removed duplicated region for block: B:63:0x0058 */ /* Code decompiled incorrectly, please refer to instructions dump. To view partially-correct add '--show-bad-code' argument */ public static final void Popup(final androidx.compose.ui.window.PopupPositionProvider r35, kotlin.jvm.functions.Function0 r36, androidx.compose.ui.window.PopupProperties r37, final kotlin.jvm.functions.Function2 r38, androidx.compose.runtime.Composer r39, final int r40, final int r41) { /* Method dump skipped, instructions count: 706 To view this dump add '--comments-level debug' option */ throw new UnsupportedOperationException("Method not decompiled: androidx.compose.ui.window.AndroidPopup_androidKt.Popup(androidx.compose.ui.window.PopupPositionProvider, kotlin.jvm.functions.Function0, androidx.compose.ui.window.PopupProperties, kotlin.jvm.functions.Function2, androidx.compose.runtime.Composer, int, int):void"); } public static final void PopupTestTag(final String tag, final Function2 content, Composer composer, final int i) { int i2; Intrinsics.checkNotNullParameter(tag, "tag"); Intrinsics.checkNotNullParameter(content, "content"); Composer startRestartGroup = composer.startRestartGroup(-498879600); ComposerKt.sourceInformation(startRestartGroup, "C(PopupTestTag)P(1)332@13834L75:AndroidPopup.android.kt#2oxthz"); if ((i & 14) == 0) { i2 = (startRestartGroup.changed(tag) ? 4 : 2) | i; } else { i2 = i; } if ((i & 112) == 0) { i2 |= startRestartGroup.changedInstance(content) ? 32 : 16; } if ((i2 & 91) != 18 || !startRestartGroup.getSkipping()) { if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventStart(-498879600, i2, -1, "androidx.compose.ui.window.PopupTestTag (AndroidPopup.android.kt:331)"); } CompositionLocalKt.CompositionLocalProvider((ProvidedValue[]) new ProvidedValue[]{LocalPopupTestTag.provides(tag)}, content, startRestartGroup, (i2 & 112) | 8); if (ComposerKt.isTraceInProgress()) { ComposerKt.traceEventEnd(); } } else { startRestartGroup.skipToGroupEnd(); } ScopeUpdateScope endRestartGroup = startRestartGroup.endRestartGroup(); if (endRestartGroup == null) { return; } endRestartGroup.updateScope(new Function2() { // from class: androidx.compose.ui.window.AndroidPopup_androidKt$PopupTestTag$1 /* JADX INFO: Access modifiers changed from: package-private */ /* JADX WARN: 'super' call moved to the top of the method (can break code semantics) */ /* JADX WARN: Multi-variable type inference failed */ { super(2); } @Override // kotlin.jvm.functions.Function2 public /* bridge */ /* synthetic */ Unit invoke(Composer composer2, Integer num) { invoke(composer2, num.intValue()); return Unit.INSTANCE; } public final void invoke(Composer composer2, int i3) { AndroidPopup_androidKt.PopupTestTag(tag, content, composer2, RecomposeScopeImplKt.updateChangedFlags(i | 1)); } }); } private static final void SimpleStack(Modifier modifier, Function2 function2, Composer composer, int i) { composer.startReplaceableGroup(1406149896); ComposerKt.sourceInformation(composer, "CC(SimpleStack)P(1)340@14172L979:AndroidPopup.android.kt#2oxthz"); AndroidPopup_androidKt$SimpleStack$1 androidPopup_androidKt$SimpleStack$1 = AndroidPopup_androidKt$SimpleStack$1.INSTANCE; int i2 = ((i << 3) & 112) | ((i >> 3) & 14); composer.startReplaceableGroup(-1323940314); ComposerKt.sourceInformation(composer, "CC(Layout)P(!1,2)77@3132L23,79@3222L420:Layout.kt#80mrfh"); int currentCompositeKeyHash = ComposablesKt.getCurrentCompositeKeyHash(composer, 0); CompositionLocalMap currentCompositionLocalMap = composer.getCurrentCompositionLocalMap(); Function0 constructor = ComposeUiNode.INSTANCE.getConstructor(); Function3, Composer, Integer, Unit> modifierMaterializerOf = LayoutKt.modifierMaterializerOf(modifier); int i3 = ((i2 << 9) & 7168) | 6; if (!(composer.getApplier() instanceof Applier)) { ComposablesKt.invalidApplier(); } composer.startReusableNode(); if (composer.getInserting()) { composer.createNode(constructor); } else { composer.useNode(); } Composer m2273constructorimpl = Updater.m2273constructorimpl(composer); Updater.m2280setimpl(m2273constructorimpl, androidPopup_androidKt$SimpleStack$1, ComposeUiNode.INSTANCE.getSetMeasurePolicy()); Updater.m2280setimpl(m2273constructorimpl, currentCompositionLocalMap, ComposeUiNode.INSTANCE.getSetResolvedCompositionLocals()); Function2 setCompositeKeyHash = ComposeUiNode.INSTANCE.getSetCompositeKeyHash(); if (m2273constructorimpl.getInserting() || !Intrinsics.areEqual(m2273constructorimpl.rememberedValue(), Integer.valueOf(currentCompositeKeyHash))) { m2273constructorimpl.updateRememberedValue(Integer.valueOf(currentCompositeKeyHash)); m2273constructorimpl.apply(Integer.valueOf(currentCompositeKeyHash), setCompositeKeyHash); } modifierMaterializerOf.invoke(SkippableUpdater.m2264boximpl(SkippableUpdater.m2265constructorimpl(composer)), composer, Integer.valueOf((i3 >> 3) & 112)); composer.startReplaceableGroup(2058660585); function2.invoke(composer, Integer.valueOf((i3 >> 9) & 14)); composer.endReplaceableGroup(); composer.endNode(); composer.endReplaceableGroup(); composer.endReplaceableGroup(); } public static final boolean isFlagSecureEnabled(View view) { Intrinsics.checkNotNullParameter(view, ""); ViewGroup.LayoutParams layoutParams = view.getRootView().getLayoutParams(); WindowManager.LayoutParams layoutParams2 = layoutParams instanceof WindowManager.LayoutParams ? (WindowManager.LayoutParams) layoutParams : null; return (layoutParams2 == null || (layoutParams2.flags & 8192) == 0) ? false : true; } public static final IntRect toIntBounds(Rect rect) { return new IntRect(rect.left, rect.top, rect.right, rect.bottom); } public static /* synthetic */ boolean isPopupLayout$default(View view, String str, int i, Object obj) { if ((i & 2) != 0) { str = null; } return isPopupLayout(view, str); } public static final boolean isPopupLayout(View view, String str) { Intrinsics.checkNotNullParameter(view, "view"); return (view instanceof PopupLayout) && (str == null || Intrinsics.areEqual(str, ((PopupLayout) view).getTestTag())); } public static final Function2 Popup$lambda$1(State> state) { return (Function2) state.getValue(); } }