o
    i~                     @   s   d dl mZ d dl mZ d dlmZ d dlmZ d dlmZ d dl	m
Z
 d dlmZ d dlmZ d d	lmZ 	
	
ddee dee defddZd
S )    )Any)Optional)PromptSession)to_formatted_text)KeyBindings)Keys)Style)Question)merge_styles_defaultNmessagestylekwargsc                    sd   t |g}du rdfdd}dd  t }|tj fdd}tt|f||d	|jS )
a  Wait until user presses any key to continue.

    Example:
        >>> import questionary
        >>> questionary.press_any_key_to_continue().ask()
         Press any key to continue...
        ''

    Args:
        message: Question text. Defaults to ``"Press any key to continue..."``

        style: A custom color and style for the question parts. You can
               configure colors as well as font types for different elements.

    Returns:
        :class:`Question`: Question instance, ready to be prompted (using ``.ask()``).
    NzPress any key to continue...c                     s"   g } |  dd  df t| S )Nzclass:question )appendr   )tokens)r    a/home/ubuntu/.local/lib/python3.10/site-packages/questionary/prompts/press_any_key_to_continue.pyget_prompt_tokens)   s   z4press_any_key_to_continue.<locals>.get_prompt_tokensc                 S   s   | j jd d d S )N)result)appexiteventr   r   r   exit_with_result0   s   z3press_any_key_to_continue.<locals>.exit_with_resultc                    s    |  d S )Nr   r   )r   r   r   any_key5   s   z*press_any_key_to_continue.<locals>.any_key)key_bindingsr   )r
   r   addr   r   r	   r   r   )r   r   r   merged_styler   bindingsr   r   )r   r   r   press_any_key_to_continue   s$   

r   )NN)typingr   r   prompt_toolkitr   prompt_toolkit.formatted_textr   prompt_toolkit.key_bindingr   prompt_toolkit.keysr   prompt_toolkit.stylesr   questionary.questionr	   questionary.stylesr
   strr   r   r   r   r   <module>   s$    