package com.ss.android.ugc.aweme.editSticker.model;

import X.0HH;
import X.C38896fH;
import X.C38906fI;
import android.os.Parcel;
import android.os.Parcelable;
import android.text.TextUtils;
import com.bytedance.covode.number.Covode;
import com.google.gson.a.c;
import java.io.Serializable;

public class StickerItemModel implements Parcelable, Serializable, Cloneable {
    public static final Parcelable.Creator<StickerItemModel> CREATOR = new Parcelable.Creator<StickerItemModel>() {
        static {
            Covode.recordClassIndex(73531);
        }

        public final /* bridge */ /* synthetic */ Object[] newArray(int i) {
            return new StickerItemModel[i];
        }

        public final /* synthetic */ Object createFromParcel(Parcel parcel) {
            return new StickerItemModel(parcel);
        }
    };
    public transient boolean LIZ;
    @c(LIZ = "current_offsetX")
    public float currentOffsetX;
    @c(LIZ = "current_offsetY")
    public float currentOffsetY;
    @c(LIZ = "cutout")
    public boolean cutout;
    @c(LIZ = "deletable")
    public boolean deletable;
    @c(LIZ = "end_time")
    public int endTime;
    @c(LIZ = "extra")
    public String extra;
    @c(LIZ = "extra2")
    public String extra2;
    @c(LIZ = "extra3")
    public String extra3;
    @c(LIZ = "h")
    public float h;
    public int id;
    @c(LIZ = "in_duration")
    public int inDuration;
    @c(LIZ = "in_path")
    public String inPath;
    @c(LIZ = "in_sticker_id")
    public String inStickerId;
    @c(LIZ = "init_height")
    public float initHeight;
    @c(LIZ = "init_width")
    public float initWidth;
    @c(LIZ = "is_add_veeditor_success")
    public boolean isAddVEEditorSuccess;
    @c(LIZ = "isAnimate")
    public boolean isAnimate;
    @c(LIZ = "is_animation_loop")
    public boolean isAnimationLoop;
    @c(LIZ = "is_enable_interaction")
    public boolean isEnableInteraction;
    public boolean isImageStickerLayer;
    @c(LIZ = "is_pin")
    public boolean isPin;
    @c(LIZ = "layer_weight")
    public int layerWeight;
    public transient String lyricSrtPath;
    @c(LIZ = "lyric_color")
    public int mLyricColor;
    @c(LIZ = "lyric_fontId")
    public String mLyricFontId;
    @c(LIZ = "lyric_fontPath")
    public String mLyricFontPath;
    @c(LIZ = "lyric_in_point")
    public int mLyricInPoint;
    @c(LIZ = "lyric_info")
    public String mLyricInfo;
    @c(LIZ = "lyric_music_loop")
    public boolean mLyricMusicLoop;
    @c(LIZ = "lyric_out_point")
    public int mLyricOutPoint;
    @c(LIZ = "lyric_start_time")
    public int mLyricStartTime;
    @c(LIZ = "max_scale")
    public float maxScale;
    @c(LIZ = "min_scale")
    public float minScale;
    @c(LIZ = "normalized_height")
    public float normalizedHeight;
    @c(LIZ = "normalized_width")
    public float normalizedWidth;
    public int originalEndTime;
    public int originalStartTime;
    @c(LIZ = "out_duration")
    public int outDuration;
    @c(LIZ = "out_path")
    public String outPath;
    @c(LIZ = "path")
    @C38906fI
    @C38896fH
    public String path;
    @c(LIZ = "pin_algorithm_file")
    @C38896fH
    public String pinAlgorithmFile;
    @c(LIZ = "ratio")
    public float ratio;
    @c(LIZ = "angle")
    public float rotateAngle;
    @c(LIZ = "scale")
    public float scale;
    @c(LIZ = "start_time")
    public int startTime;
    @c(LIZ = "stickerDrawScale")
    public float stickerDrawScale;
    @c(LIZ = "sticker_id")
    public String stickerId;
    @c(LIZ = "tab_id")
    public String tabId;
    public int type;
    @c(LIZ = "ui_end_time")
    public int uiEndTime;
    @c(LIZ = "ui_start_time")
    public int uiStartTime;
    @c(LIZ = "uuid")
    public String uuid;
    public transient int viewHash;
    @c(LIZ = "w")
    public float w;
    @c(LIZ = "x")
    public float x;
    @c(LIZ = "y")
    public float y;

    public int describeContents() {
        return 0;
    }

    public int getId() {
        return this.id;
    }

    public int getOriginalEndTime() {
        return this.originalEndTime;
    }

    public int getOriginalStartTime() {
        return this.originalStartTime;
    }

    public String getPinAlgorithmFile() {
        return this.pinAlgorithmFile;
    }

    public String getText() {
        return this.path;
    }

    public boolean isFromSearch() {
        return this.LIZ;
    }

    public boolean isPin() {
        return this.isPin;
    }

    public boolean isNormalInfoSticker() {
        if (this.type == 0) {
            return true;
        }
        return false;
    }

    static {
        Covode.recordClassIndex(73530);
    }

    /* renamed from: LIZ */
    public final StickerItemModel clone() {
        try {
            return (StickerItemModel) super.clone();
        } catch (CloneNotSupportedException e) {
            0HH.LIZ(e);
            return null;
        }
    }

    public boolean isAnimTimestampSticker() {
        if (this.type == 14) {
            return true;
        }
        return false;
    }

    public boolean isImageSticker() {
        if (this.type == 11) {
            return true;
        }
        return false;
    }

    public boolean isLocalHashTagSticker() {
        if (this.type == 13) {
            return true;
        }
        return false;
    }

    public boolean isLyric() {
        int i = this.type;
        if (i == 3 || i == 17) {
            return true;
        }
        return false;
    }

    public boolean isMagnifier() {
        return "MagnifierSticker".equals(this.extra);
    }

    public boolean isNormalTextSticker() {
        if (this.type == 2) {
            return true;
        }
        return false;
    }

    public boolean isSubtitleRule() {
        return "subtitle_rule".equals(this.extra);
    }

    public boolean isTextSticker() {
        int i = this.type;
        if (i == 2 || i == 20) {
            return true;
        }
        return false;
    }

    public boolean isTextTemplateSticker() {
        if (this.type == 23) {
            return true;
        }
        return false;
    }

    public boolean isSubtitle() {
        if ("subtitle".equals(this.extra) || this.type == 5) {
            return true;
        }
        return false;
    }

    public StickerItemModel() {
        this.scale = 1.0f;
        this.stickerDrawScale = 1.0f;
        this.currentOffsetX = 0.5f;
        this.currentOffsetY = 0.5f;
        this.mLyricColor = -1;
        this.mLyricMusicLoop = true;
        this.tabId = "";
        this.w = 1.0f;
        this.h = 1.0f;
        this.ratio = 1.0f;
        this.deletable = true;
        this.isEnableInteraction = true;
        this.normalizedWidth = -1.0f;
        this.normalizedHeight = -1.0f;
    }

    public int hashCode() {
        int i;
        int i2;
        int id2 = getId() * 31;
        String str = this.stickerId;
        int i3 = 0;
        if (str != null) {
            i = str.hashCode();
        } else {
            i = 0;
        }
        int i4 = (id2 + i) * 31;
        String str2 = this.path;
        if (str2 != null) {
            i2 = str2.hashCode();
        } else {
            i2 = 0;
        }
        int i5 = (i4 + i2) * 31;
        String str3 = this.extra;
        if (str3 != null) {
            i3 = str3.hashCode();
        }
        return i5 + i3;
    }

    public StickerItemModel dumpClonedData() {
        StickerItemModel stickerItemModel = new StickerItemModel(this.stickerId, this.path, this.extra, this.layerWeight, this.isAnimate, this.startTime, this.endTime, this.type);
        stickerItemModel.id = this.id;
        stickerItemModel.scale = this.scale;
        stickerItemModel.maxScale = this.maxScale;
        stickerItemModel.minScale = this.minScale;
        stickerItemModel.rotateAngle = this.rotateAngle;
        stickerItemModel.initHeight = this.initHeight;
        stickerItemModel.initWidth = this.initWidth;
        stickerItemModel.currentOffsetX = this.currentOffsetX;
        stickerItemModel.currentOffsetY = this.currentOffsetY;
        stickerItemModel.isAnimate = this.isAnimate;
        stickerItemModel.isImageStickerLayer = this.isImageStickerLayer;
        stickerItemModel.pinAlgorithmFile = this.pinAlgorithmFile;
        stickerItemModel.isPin = this.isPin;
        stickerItemModel.x = this.x;
        stickerItemModel.y = this.y;
        stickerItemModel.w = this.w;
        stickerItemModel.h = this.h;
        stickerItemModel.isAnimationLoop = this.isAnimationLoop;
        stickerItemModel.inStickerId = this.inStickerId;
        stickerItemModel.inPath = this.inPath;
        stickerItemModel.inDuration = this.inDuration;
        stickerItemModel.outPath = this.outPath;
        stickerItemModel.outDuration = this.outDuration;
        stickerItemModel.ratio = this.ratio;
        return stickerItemModel;
    }

    public String toString() {
        return "StickerItemModel{id=" + getId() + ", stickerId='" + this.stickerId + '\'' + ", path='" + this.path + '\'' + ", extra='" + this.extra + '\'' + ", scale=" + this.scale + ", rotateAngle=" + this.rotateAngle + ", layerWeight=" + this.layerWeight + ", startTime=" + this.startTime + ", endTime=" + this.endTime + ", initWidth=" + this.initWidth + ", initHeight=" + this.initHeight + ", currentOffsetX=" + this.currentOffsetX + ", currentOffsetY=" + this.currentOffsetY + ", normalizedWidth=" + this.normalizedWidth + ", normalizedHeight=" + this.normalizedHeight + '}';
    }

    public void setFromSearch(boolean z) {
        this.LIZ = z;
    }

    public void setId(int i) {
        this.id = i;
    }

    public void setOriginalEndTime(int i) {
        this.originalEndTime = i;
    }

    public void setOriginalStartTime(int i) {
        this.originalStartTime = i;
    }

    public void setPin(boolean z) {
        this.isPin = z;
    }

    public void setPinAlgorithmFile(String str) {
        this.pinAlgorithmFile = str;
    }

    public void updateLayerWeight(int i) {
        this.layerWeight = i;
    }

    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (!(obj instanceof StickerItemModel)) {
            return false;
        }
        StickerItemModel stickerItemModel = (StickerItemModel) obj;
        if (TextUtils.isEmpty(this.uuid) || getId() == 0) {
            if (getId() != stickerItemModel.getId()) {
                return false;
            }
        } else if (!TextUtils.equals(this.uuid, stickerItemModel.uuid)) {
            return false;
        }
        String str = this.path;
        if (str != null && !str.equals(stickerItemModel.path)) {
            return false;
        }
        String str2 = this.stickerId;
        if (str2 != null && !str2.equals(stickerItemModel.stickerId)) {
            return false;
        }
        String str3 = this.extra;
        String str4 = stickerItemModel.extra;
        if (str3 != null) {
            return str3.equals(str4);
        }
        if (str4 == null) {
            return true;
        }
        return false;
    }

    public StickerItemModel(Parcel parcel) {
        boolean z;
        boolean z2;
        boolean z3;
        boolean z4;
        boolean z5;
        boolean z6;
        boolean z7;
        boolean z8;
        this.scale = 1.0f;
        this.stickerDrawScale = 1.0f;
        this.currentOffsetX = 0.5f;
        this.currentOffsetY = 0.5f;
        this.mLyricColor = -1;
        boolean z9 = true;
        this.mLyricMusicLoop = true;
        this.tabId = "";
        this.w = 1.0f;
        this.h = 1.0f;
        this.ratio = 1.0f;
        this.deletable = true;
        this.isEnableInteraction = true;
        this.normalizedWidth = -1.0f;
        this.normalizedHeight = -1.0f;
        this.stickerId = parcel.readString();
        this.path = parcel.readString();
        this.extra = parcel.readString();
        this.extra2 = parcel.readString();
        this.extra3 = parcel.readString();
        this.scale = parcel.readFloat();
        this.stickerDrawScale = parcel.readFloat();
        this.rotateAngle = parcel.readFloat();
        this.layerWeight = parcel.readInt();
        this.startTime = parcel.readInt();
        this.endTime = parcel.readInt();
        this.uiStartTime = parcel.readInt();
        this.uiEndTime = parcel.readInt();
        this.initWidth = parcel.readFloat();
        this.initHeight = parcel.readFloat();
        this.currentOffsetX = parcel.readFloat();
        this.currentOffsetY = parcel.readFloat();
        if (parcel.readByte() != 0) {
            z = true;
        } else {
            z = false;
        }
        this.isAnimate = z;
        if (parcel.readByte() != 0) {
            z2 = true;
        } else {
            z2 = false;
        }
        this.isImageStickerLayer = z2;
        this.type = parcel.readInt();
        this.pinAlgorithmFile = parcel.readString();
        if (parcel.readByte() != 0) {
            z3 = true;
        } else {
            z3 = false;
        }
        this.isPin = z3;
        this.mLyricInfo = parcel.readString();
        this.mLyricFontPath = parcel.readString();
        this.mLyricFontId = parcel.readString();
        this.mLyricColor = parcel.readInt();
        this.mLyricInPoint = parcel.readInt();
        this.mLyricStartTime = parcel.readInt();
        this.mLyricOutPoint = parcel.readInt();
        this.tabId = parcel.readString();
        this.x = parcel.readFloat();
        this.y = parcel.readFloat();
        this.w = parcel.readFloat();
        this.h = parcel.readFloat();
        if (parcel.readByte() != 0) {
            z4 = true;
        } else {
            z4 = false;
        }
        this.cutout = z4;
        if (parcel.readByte() != 0) {
            z5 = true;
        } else {
            z5 = false;
        }
        this.deletable = z5;
        if (parcel.readByte() != 0) {
            z6 = true;
        } else {
            z6 = false;
        }
        this.isEnableInteraction = z6;
        if (parcel.readByte() != 0) {
            z7 = true;
        } else {
            z7 = false;
        }
        this.mLyricMusicLoop = z7;
        if (parcel.readByte() != 0) {
            z8 = true;
        } else {
            z8 = false;
        }
        this.isAnimationLoop = z8;
        this.inStickerId = parcel.readString();
        this.inPath = parcel.readString();
        this.inDuration = parcel.readInt();
        this.outPath = parcel.readString();
        this.outDuration = parcel.readInt();
        this.normalizedWidth = parcel.readFloat();
        this.normalizedHeight = parcel.readFloat();
        this.isAddVEEditorSuccess = parcel.readByte() == 0 ? false : z9;
        this.uuid = parcel.readString();
        this.maxScale = parcel.readFloat();
        this.minScale = parcel.readFloat();
        this.ratio = parcel.readFloat();
    }

    public void writeToParcel(Parcel parcel, int i) {
        parcel.writeString(this.stickerId);
        parcel.writeString(this.path);
        parcel.writeString(this.extra);
        parcel.writeString(this.extra2);
        parcel.writeString(this.extra3);
        parcel.writeFloat(this.scale);
        parcel.writeFloat(this.stickerDrawScale);
        parcel.writeFloat(this.rotateAngle);
        parcel.writeInt(this.layerWeight);
        parcel.writeInt(this.startTime);
        parcel.writeInt(this.endTime);
        parcel.writeInt(this.uiStartTime);
        parcel.writeInt(this.uiEndTime);
        parcel.writeFloat(this.initWidth);
        parcel.writeFloat(this.initHeight);
        parcel.writeFloat(this.currentOffsetX);
        parcel.writeFloat(this.currentOffsetY);
        parcel.writeByte(this.isAnimate ? (byte) 1 : 0);
        parcel.writeByte(this.isImageStickerLayer ? (byte) 1 : 0);
        parcel.writeInt(this.type);
        parcel.writeString(this.pinAlgorithmFile);
        parcel.writeByte(this.isPin ? (byte) 1 : 0);
        parcel.writeString(this.mLyricInfo);
        parcel.writeString(this.mLyricFontPath);
        parcel.writeString(this.mLyricFontId);
        parcel.writeInt(this.mLyricColor);
        parcel.writeInt(this.mLyricInPoint);
        parcel.writeInt(this.mLyricStartTime);
        parcel.writeInt(this.mLyricOutPoint);
        parcel.writeString(this.tabId);
        parcel.writeFloat(this.x);
        parcel.writeFloat(this.y);
        parcel.writeFloat(this.w);
        parcel.writeFloat(this.h);
        parcel.writeByte(this.cutout ? (byte) 1 : 0);
        parcel.writeByte(this.deletable ? (byte) 1 : 0);
        parcel.writeByte(this.isEnableInteraction ? (byte) 1 : 0);
        parcel.writeByte(this.mLyricMusicLoop ? (byte) 1 : 0);
        parcel.writeByte(this.isAnimationLoop ? (byte) 1 : 0);
        parcel.writeString(this.inStickerId);
        parcel.writeString(this.inPath);
        parcel.writeInt(this.inDuration);
        parcel.writeString(this.outPath);
        parcel.writeInt(this.outDuration);
        parcel.writeFloat(this.normalizedWidth);
        parcel.writeFloat(this.normalizedHeight);
        parcel.writeByte(this.isAddVEEditorSuccess ? (byte) 1 : 0);
        parcel.writeString(this.uuid);
        parcel.writeFloat(this.maxScale);
        parcel.writeFloat(this.minScale);
        parcel.writeFloat(this.ratio);
    }

    public StickerItemModel(String str, String str2, String str3, int i, boolean z, int i2, int i3, int i4) {
        this.scale = 1.0f;
        this.stickerDrawScale = 1.0f;
        this.currentOffsetX = 0.5f;
        this.currentOffsetY = 0.5f;
        this.mLyricColor = -1;
        this.mLyricMusicLoop = true;
        this.tabId = "";
        this.w = 1.0f;
        this.h = 1.0f;
        this.ratio = 1.0f;
        this.deletable = true;
        this.isEnableInteraction = true;
        this.normalizedWidth = -1.0f;
        this.normalizedHeight = -1.0f;
        this.stickerId = str;
        this.path = str2;
        this.extra = str3;
        this.layerWeight = i;
        this.isAnimate = z;
        this.startTime = i2;
        this.endTime = i3;
        this.type = i4;
    }
}
