

'''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			):
       # _fields is a specific attr expected by ctypes
       SCREAMING_SNAKE_CASE			:       Union[str, Any]				=     [('''size''', ctypes.c_int), ('''visible''', ctypes.c_byte)]


def       snake_case   (	) ->  Optional[int]:


    """simple docstring"""


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


def       snake_case   (	) ->  List[str]:


    """simple docstring"""


    if os.name == "nt":
        lowerCAmelCase 						=							CursorInfo()
        lowerCAmelCase 						=							ctypes.windll.kernelaa.GetStdHandle(-11			)
        ctypes.windll.kernelaa.GetConsoleCursorInfo(snake_case					,		ctypes.byref(snake_case			)			)
        lowerCAmelCase 						=							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       snake_case   (	) ->  Optional[Any]:


    """simple docstring"""


    try:
        hide_cursor()
        yield
    finally:
        show_cursor()








'''simple docstring'''



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

import numpy as np
import torch

from ...utils import BaseOutput, OptionalDependencyNotAvailable, is_torch_available, is_transformers_available



@dataclass
class 				_snake_case					(   a_			):
  SCREAMING_SNAKE_CASE			:       Union[List[np.ndarray], torch.FloatTensor]


try:
     if not (is_transformers_available() and is_torch_available()):
          raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
     from ...utils.dummy_torch_and_transformers_objects import *  # noqa F403
else:
     from .pipeline_text_to_video_synth import TextToVideoSDPipeline
     from .pipeline_text_to_video_synth_imgaimg import VideoToVideoSDPipeline  # noqa: F401
     from .pipeline_text_to_video_zero import TextToVideoZeroPipeline





