
    ztf                         d dl mZ d dlZd dlmZmZ d dlmZmZm	Z	 ddl
mZmZ ddlmZ ddlmZ d	gZ	 d	 	 	 	 	 dd
Zy)    )annotationsN)TextIOcast)get_bell_environment_variableget_term_environment_variableis_conemu_ansi   )DummyOutputOutput)
ColorDepth)PlainTextOutputcreate_outputc                   t               }t               }t        j                         }| Nt        j
                  } |r<t        j
                  t        j                  fD ]  }||j                         s|}  n | 
t               S ddl	m
} t        | |      r| j                  } t        | |      rt        j                  dk(  r_ddlm} ddlm} ddlm}	m}
  |
       rt+        t,         |	| |            S t/               rt+        t,         || |            S  || |      S dd	lm} | j                         st5        |       S |j7                  | |||
      S )aX  
    Return an :class:`~prompt_toolkit.output.Output` instance for the command
    line.

    :param stdout: The stdout object
    :param always_prefer_tty: When set, look for `sys.stderr` if `sys.stdout`
        is not a TTY. Useful if `sys.stdout` is redirected to a file, but we
        still want user input and output on the terminal.

        By default, this is `False`. If `sys.stdout` is not a terminal (maybe
        it's redirected to a file), then a `PlainTextOutput` will be returned.
        That way, tools like `print_formatted_text` will write plain text into
        that file.
    r   )StdoutProxywin32r	   )ConEmuOutput)Win32Output)Windows10_Outputis_win_vt100_enabled)default_color_depth)Vt100_Output)termr   enable_bell)r   r   r   from_envsysstdoutstderrisattyr
   prompt_toolkit.patch_stdoutr   
isinstanceoriginal_stdoutplatformconemur   r   r   	windows10r   r   r   r   r   vt100r   r   from_pty)r   always_prefer_ttyterm_from_envbell_from_envcolor_depth_from_envior   r   r   r   r   r   s               h/var/www/html/software/conda/envs/higlass/lib/python3.12/site-packages/prompt_toolkit/output/defaults.pyr   r      sC   ( 23M13M%..0~ zz3::. >biikF	 ~}
 8
V[
)'' V[
) ||w(&E! =QR  VAUV  v;OPP'
 }}"6**$$ 4%	 % 
 	
    )NF)r   zTextIO | Noner'   boolreturnr   )
__future__r   r   typingr   r   prompt_toolkit.utilsr   r   r   baser
   r   color_depthr   
plain_textr   __all__r    r-   r,   <module>r8      sV    " 
   & # '  =BQ
Q
59Q
Q
r-   