# Path: pysubs2/common.py
# class Color:
#     def __init__(self, r: int, g: int, b: int, a: int = 0):
# VERSION = "1.4.1"
# 
# Path: pysubs2/time.py
# def ms_to_str(ms: IntOrFloat, fractions: bool=False) -> str:
#     """
#     Prettyprint milliseconds to [-]H:MM:SS[.mmm]
#     
#     Handles huge and/or negative times. Non-negative times with ``fractions=True``
#     are matched by :data:`pysubs2.time.TIMESTAMP`.
#     
#     Arguments:
#         ms: Number of milliseconds (int, float or other numeric class).
#         fractions: Whether to print up to millisecond precision.
#     
#     Returns:
#         str
#     
#     """
#     sgn = "-" if ms < 0 else ""
#     h, m, s, ms = ms_to_times(abs(ms))
#     if fractions:
#         return f"{sgn}{h:01d}:{m:02d}:{s:02d}.{ms:03d}"
#     else:
#         return f"{sgn}{h:01d}:{m:02d}:{s:02d}"
# 
# def make_time(h: IntOrFloat=0, m: IntOrFloat=0, s: IntOrFloat=0, ms: IntOrFloat=0,
#               frames: Optional[int]=None, fps: Optional[float]=None):
#     """
#     Convert time to milliseconds.
# 
#     See :func:`pysubs2.time.times_to_ms()`. When both frames and fps are specified,
#     :func:`pysubs2.time.frames_to_ms()` is called instead.
# 
#     Raises:
#         ValueError: Invalid fps, or one of frames/fps is missing.
# 
#     Example:
#         >>> make_time(s=1.5)
#         1500
#         >>> make_time(frames=50, fps=25)
#         2000
# 
#     """
#     if frames is None and fps is None:
#         return times_to_ms(h, m, s, ms)
#     elif frames is not None and fps is not None:
#         return frames_to_ms(frames, fps)
#     else:
#         raise ValueError("Both fps and frames must be specified")


import re
import warnings
import dataclasses
from typing import Optional, Dict, Any, ClassVar
from .common import IntOrFloat
from .time import ms_to_str, make_time
        from .substation import parse_tags
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return self.start == other.start and self.end == other.end

    def __ne__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return self.start != other.start or self.end != other.end

    def __lt__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return (self.start, self.end) < (other.start, other.end)

    def __le__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return (self.start, self.end) <= (other.start, other.end)

    def __gt__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return (self.start, self.end) > (other.start, other.end)

    def __ge__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return (self.start, self.end) >= (other.start, other.end)

    def __repr__(self):

# Path: pysubs2/common.py
# class Color:
#     def __init__(self, r: int, g: int, b: int, a: int = 0):
# VERSION = "1.4.1"
# 
# Path: pysubs2/time.py
# def ms_to_str(ms: IntOrFloat, fractions: bool=False) -> str:
#     """
#     Prettyprint milliseconds to [-]H:MM:SS[.mmm]
#     
#     Handles huge and/or negative times. Non-negative times with ``fractions=True``
#     are matched by :data:`pysubs2.time.TIMESTAMP`.
#     
#     Arguments:
#         ms: Number of milliseconds (int, float or other numeric class).
#         fractions: Whether to print up to millisecond precision.
#     
#     Returns:
#         str
#     
#     """
#     sgn = "-" if ms < 0 else ""
#     h, m, s, ms = ms_to_times(abs(ms))
#     if fractions:
#         return f"{sgn}{h:01d}:{m:02d}:{s:02d}.{ms:03d}"
#     else:
#         return f"{sgn}{h:01d}:{m:02d}:{s:02d}"
# 
# def make_time(h: IntOrFloat=0, m: IntOrFloat=0, s: IntOrFloat=0, ms: IntOrFloat=0,
#               frames: Optional[int]=None, fps: Optional[float]=None):
#     """
#     Convert time to milliseconds.
# 
#     See :func:`pysubs2.time.times_to_ms()`. When both frames and fps are specified,
#     :func:`pysubs2.time.frames_to_ms()` is called instead.
# 
#     Raises:
#         ValueError: Invalid fps, or one of frames/fps is missing.
# 
#     Example:
#         >>> make_time(s=1.5)
#         1500
#         >>> make_time(frames=50, fps=25)
#         2000
# 
#     """
#     if frames is None and fps is None:
#         return times_to_ms(h, m, s, ms)
#     elif frames is not None and fps is not None:
#         return frames_to_ms(frames, fps)
#     else:
#         raise ValueError("Both fps and frames must be specified")


# Path: pysubs2/ssaevent.py
import re
import warnings
import dataclasses
from typing import Optional, Dict, Any, ClassVar
from .common import IntOrFloat
from .time import ms_to_str, make_time
        from .substation import parse_tags

        if not isinstance(other, SSAEvent):
            return NotImplemented
        return self.start == other.start and self.end == other.end

    def __ne__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return self.start != other.start or self.end != other.end

    def __lt__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return (self.start, self.end) < (other.start, other.end)

    def __le__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return (self.start, self.end) <= (other.start, other.end)

    def __gt__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return (self.start, self.end) > (other.start, other.end)

    def __ge__(self, other) -> bool:
        if not isinstance(other, SSAEvent):
            return NotImplemented
        return (self.start, self.end) >= (other.start, other.end)

    def __repr__(self):

        return f"<SSAEvent type={self.type} start={ms_to_str(self.start)} end={ms_to_str(self.end)} text={self.text!r}>"