# Add project specific ProGuard rules here.
# You can control the set of applied configuration files using the
# proguardFiles setting in build.gradle.
#
# For more details, see
#   http://developer.android.com/guide/developing/tools/proguard.html

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
#   public *;
#}

# Uncomment this to preserve the line number information for
# debugging stack traces.
#-keepattributes SourceFile,LineNumberTable

# If you keep the line number information, uncomment this to
# hide the original source file name.
#-renamesourcefileattribute SourceFile

-keep class com.microsoft.clarity.models.** {*;}
-keep class com.microsoft.clarity.Clarity {*;}
-keep class com.microsoft.clarity.ClarityConfig {*;}

# Needed to prevent obfuscated class name conflicts and to allow Sapphire to make the needed Bytecode replacements.
-flattenpackagehierarchy 'com.microsoft.clarity'

# To prevent the reflection used by the protobuf Lite runtime from failing due to obfuscation
# https://github.com/protocolbuffers/protobuf/blob/main/java/lite.md
-keep class * extends com.google.protobuf.GeneratedMessageLite { *; }


# Compose Capturer needed classes:

-keep class androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate {
    boolean isPlaced;
}

-keep class androidx.compose.ui.node.LayoutNode {
    androidx.compose.ui.Modifier modifier;
    void setModifier(androidx.compose.ui.Modifier);
    void forEachChild(kotlin.jvm.functions.Function1);
    void draw$ui_release(androidx.compose.ui.graphics.Canvas);
    androidx.compose.ui.node.LayoutNodeLayoutDelegate$MeasurePassDelegate getMeasurePassDelegate$ui_release();
}

-keep class androidx.compose.ui.platform.AndroidComposeView {
    androidx.compose.ui.semantics.SemanticsOwner semanticsOwner;
    androidx.compose.ui.node.LayoutNode root;
    ** dirtyLayers;
}

-keep class androidx.compose.ui.node.OwnedLayer {
    void invalidate();
}

-keep class androidx.compose.ui.semantics.SemanticsNode {
    boolean isTransparent$ui_release();
}

-keep class com.microsoft.clarity.modifiers.** {*;}

