# Path: yaspin/base_spinner.py
# class Spinner:
# 
# Path: yaspin/constants.py
# COLOR_ATTRS = COLOR_MAP.keys()
# 
# COLOR_MAP = {
#     # name: type
#     "blink": "attrs",
#     "bold": "attrs",
#     "concealed": "attrs",
#     "dark": "attrs",
#     "reverse": "attrs",
#     "underline": "attrs",
#     "blue": "color",
#     "cyan": "color",
#     "green": "color",
#     "magenta": "color",
#     "red": "color",
#     "white": "color",
#     "yellow": "color",
#     "on_blue": "on_color",
#     "on_cyan": "on_color",
#     "on_green": "on_color",
#     "on_grey": "on_color",
#     "on_magenta": "on_color",
#     "on_red": "on_color",
#     "on_white": "on_color",
#     "on_yellow": "on_color",
# }
# 
# SPINNER_ATTRS = [
#     "aesthetic",
#     "arc",
#     "arrow",
#     "arrow2",
#     "arrow3",
#     "balloon",
#     "balloon2",
#     "betaWave",
#     "bluePulse",
#     "bounce",
#     "bouncingBall",
#     "bouncingBar",
#     "boxBounce",
#     "boxBounce2",
#     "christmas",
#     "circle",
#     "circleHalves",
#     "circleQuarters",
#     "clock",
#     "dots",
#     "dots10",
#     "dots11",
#     "dots12",
#     "dots2",
#     "dots3",
#     "dots4",
#     "dots5",
#     "dots6",
#     "dots7",
#     "dots8",
#     "dots8Bit",
#     "dots9",
#     "dqpb",
#     "earth",
#     "fingerDance",
#     "fistBump",
#     "flip",
#     "grenade",
#     "growHorizontal",
#     "growVertical",
#     "hamburger",
#     "hearts",
#     "layer",
#     "line",
#     "line2",
#     "material",
#     "mindblown",
#     "monkey",
#     "moon",
#     "noise",
#     "orangeBluePulse",
#     "orangePulse",
#     "pipe",
#     "point",
#     "pong",
#     "runner",
#     "shark",
#     "simpleDots",
#     "simpleDotsScrolling",
#     "smiley",
#     "soccerHeader",
#     "speaker",
#     "squareCorners",
#     "squish",
#     "star",
#     "star2",
#     "timeTravel",
#     "toggle",
#     "toggle10",
#     "toggle11",
#     "toggle12",
#     "toggle13",
#     "toggle2",
#     "toggle3",
#     "toggle4",
#     "toggle5",
#     "toggle6",
#     "toggle7",
#     "toggle8",
#     "toggle9",
#     "triangle",
#     "weather",
# ]
# 
# Path: yaspin/helpers.py
# def to_unicode(text_type, encoding=ENCODING):
#     if isinstance(text_type, bytes):
#         return text_type.decode(encoding)
#     return text_type


import contextlib
import datetime
import functools
import itertools
import signal
import sys
import threading
import time
from typing import List, Set, Union
from termcolor import colored
from .base_spinner import Spinner, default_spinner
from .constants import COLOR_ATTRS, COLOR_MAP, SPINNER_ATTRS
from .helpers import to_unicode
            from .spinners import Spinners  # pylint: disable=import-outside-toplevel
        available_values = [k for k, v in COLOR_MAP.items() if v == "attrs"]
        for attr in attrs:
            if attr not in available_values:
                raise ValueError(
                    "'{0}': unsupported attribute value. "
                    "Use one of the: {1}".format(attr, ", ".join(available_values))
                )
        return set(attrs)

    @staticmethod
    def _set_spinner(spinner):
        if hasattr(spinner, "frames") and hasattr(spinner, "interval"):
            if not spinner.frames or not spinner.interval:
                sp = default_spinner
            else:
                sp = spinner
        else:
            sp = default_spinner

        return sp

    @staticmethod
    def _set_side(side: str) -> str:
        if side not in ("left", "right"):
            raise ValueError(
                "'{0}': unsupported side value. " "Use either 'left' or 'right'."
            )
        return side

    @staticmethod

# Path: yaspin/base_spinner.py
# class Spinner:
# 
# Path: yaspin/constants.py
# COLOR_ATTRS = COLOR_MAP.keys()
# 
# COLOR_MAP = {
#     # name: type
#     "blink": "attrs",
#     "bold": "attrs",
#     "concealed": "attrs",
#     "dark": "attrs",
#     "reverse": "attrs",
#     "underline": "attrs",
#     "blue": "color",
#     "cyan": "color",
#     "green": "color",
#     "magenta": "color",
#     "red": "color",
#     "white": "color",
#     "yellow": "color",
#     "on_blue": "on_color",
#     "on_cyan": "on_color",
#     "on_green": "on_color",
#     "on_grey": "on_color",
#     "on_magenta": "on_color",
#     "on_red": "on_color",
#     "on_white": "on_color",
#     "on_yellow": "on_color",
# }
# 
# SPINNER_ATTRS = [
#     "aesthetic",
#     "arc",
#     "arrow",
#     "arrow2",
#     "arrow3",
#     "balloon",
#     "balloon2",
#     "betaWave",
#     "bluePulse",
#     "bounce",
#     "bouncingBall",
#     "bouncingBar",
#     "boxBounce",
#     "boxBounce2",
#     "christmas",
#     "circle",
#     "circleHalves",
#     "circleQuarters",
#     "clock",
#     "dots",
#     "dots10",
#     "dots11",
#     "dots12",
#     "dots2",
#     "dots3",
#     "dots4",
#     "dots5",
#     "dots6",
#     "dots7",
#     "dots8",
#     "dots8Bit",
#     "dots9",
#     "dqpb",
#     "earth",
#     "fingerDance",
#     "fistBump",
#     "flip",
#     "grenade",
#     "growHorizontal",
#     "growVertical",
#     "hamburger",
#     "hearts",
#     "layer",
#     "line",
#     "line2",
#     "material",
#     "mindblown",
#     "monkey",
#     "moon",
#     "noise",
#     "orangeBluePulse",
#     "orangePulse",
#     "pipe",
#     "point",
#     "pong",
#     "runner",
#     "shark",
#     "simpleDots",
#     "simpleDotsScrolling",
#     "smiley",
#     "soccerHeader",
#     "speaker",
#     "squareCorners",
#     "squish",
#     "star",
#     "star2",
#     "timeTravel",
#     "toggle",
#     "toggle10",
#     "toggle11",
#     "toggle12",
#     "toggle13",
#     "toggle2",
#     "toggle3",
#     "toggle4",
#     "toggle5",
#     "toggle6",
#     "toggle7",
#     "toggle8",
#     "toggle9",
#     "triangle",
#     "weather",
# ]
# 
# Path: yaspin/helpers.py
# def to_unicode(text_type, encoding=ENCODING):
#     if isinstance(text_type, bytes):
#         return text_type.decode(encoding)
#     return text_type


# Path: yaspin/core.py
import contextlib
import datetime
import functools
import itertools
import signal
import sys
import threading
import time
from typing import List, Set, Union
from termcolor import colored
from .base_spinner import Spinner, default_spinner
from .constants import COLOR_ATTRS, COLOR_MAP, SPINNER_ATTRS
from .helpers import to_unicode
            from .spinners import Spinners  # pylint: disable=import-outside-toplevel

        available_values = [k for k, v in COLOR_MAP.items() if v == "attrs"]
        for attr in attrs:
            if attr not in available_values:
                raise ValueError(
                    "'{0}': unsupported attribute value. "
                    "Use one of the: {1}".format(attr, ", ".join(available_values))
                )
        return set(attrs)

    @staticmethod
    def _set_spinner(spinner):
        if hasattr(spinner, "frames") and hasattr(spinner, "interval"):
            if not spinner.frames or not spinner.interval:
                sp = default_spinner
            else:
                sp = spinner
        else:
            sp = default_spinner

        return sp

    @staticmethod
    def _set_side(side: str) -> str:
        if side not in ("left", "right"):
            raise ValueError(
                "'{0}': unsupported side value. " "Use either 'left' or 'right'."
            )
        return side

    @staticmethod

    def _set_frames(spinner: Spinner, reversal: bool) -> Union[str, List]: