


"""simple docstring"""




import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
   import ctypes
   import msvcrt  # noqa





   class __snake_case		(       ctypes.Structure   ):







      """simple docstring"""




      lowerCAmelCase_					: Union[str, Any]  						=      [('''size''', ctypes.c_int), ('''visible''', ctypes.c_byte)]



def     __a   (	):





       """simple docstring"""







       if os.name == "nt":
              _a							 =					CursorInfo()
              _a							 =					ctypes.windll.kernelaa.GetStdHandle(-1_1       )
              ctypes.windll.kernelaa.GetConsoleCursorInfo(_snake_case,		ctypes.byref(_snake_case       )       )
              _a							 =					False
              ctypes.windll.kernelaa.SetConsoleCursorInfo(_snake_case,		ctypes.byref(_snake_case       )       )
       elif os.name == "posix":
              sys.stdout.write("\033[?25l"       )
              sys.stdout.flush()



def     __a   (	):





       """simple docstring"""







       if os.name == "nt":
              _a							 =					CursorInfo()
              _a							 =					ctypes.windll.kernelaa.GetStdHandle(-1_1       )
              ctypes.windll.kernelaa.GetConsoleCursorInfo(_snake_case,		ctypes.byref(_snake_case       )       )
              _a							 =					True
              ctypes.windll.kernelaa.SetConsoleCursorInfo(_snake_case,		ctypes.byref(_snake_case       )       )
       elif os.name == "posix":
              sys.stdout.write("\033[?25h"       )
              sys.stdout.flush()



@contextmanager
def     __a   (	):





       """simple docstring"""







       try:
              hide_cursor()
              yield
       finally:
              show_cursor()








from dataclasses import dataclass
from enum import Enum
from typing import List, Optional, Union

import numpy as np
import PIL
from PIL import Image

from ...utils import BaseOutput, is_torch_available, is_transformers_available






@dataclass
class 					SCREAMING_SNAKE_CASE_  (       _a ):
       """simple docstring"""


       __lowerCAmelCase    :		Union[List[PIL.Image.Image], np.ndarray]
       __lowerCAmelCase    :		Optional[List[bool]]


if is_transformers_available() and is_torch_available():
    from .pipeline_semantic_stable_diffusion import SemanticStableDiffusionPipeline


