HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //snap/certbot/4965/lib/python3.12/site-packages/certbot/display/__pycache__/util.cpython-312.pyc
�

N�h3��
�dZddlmZddlmZddlmZejZ	ejZ	dZde	ddfd	�Z
		dd
e	deded
ededdfd�Z		dd
e	dee
e	e
ee	e	ffdeedee	d
edee	effd�Z		dd
e	dee	dee	d
edee	e	ff
d�Z			dd
e	de	de	deedee	d
edefd�Z			dd
e	de
e	dee
e	dee	d
edee	e
e	ffd�Z		dd
e	dee	dee	d
edee	e	ff
d�Zde	de	de	d
eddf
d�Zy) a$Certbot display.

This module (`certbot.display.util`) or its companion `certbot.display.ops`
should be used whenever:

- Displaying status information to the user on the terminal
- Collecting information from the user via prompts

Other messages can use the `logging` module. See `log.py`.

�)�Optional)�Union)�obj�H�msg�returnNc�R�tj�j|ddd��y)zMDisplay a basic status message.

    :param str msg: message to display

    F)�pause�decorate�wrapN�r�get_display�notification)rs ��/build/snapcraft-certbot-c9561b03ef7f16aa90eb6754ca5f17a1/parts/certbot/install/lib/python3.12/site-packages/certbot/display/util.py�notifyrs"���O�O��"�"�3�e�e�%�"�P��messager
r�force_interactiverc�T�tj�j|||||��y)a�Displays a notification and waits for user acceptance.

    :param str message: Message to display
    :param bool pause: Whether or not the program should pause for the
        user's confirmation
    :param bool wrap: Whether or not the application should wrap text
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions
    :param bool decorate: Whether to surround the message with a
        decorated frame

    )r
rrrNr
)rr
rrrs     rrr$s+���O�O��"�"�7�%�d�5F�QY�#�[r�choices�default�cli_flagc�R�tj�j|||||��S)aDisplay a menu.

    .. todo:: This doesn't enable the help label/button (I wasn't sold on
        any interface I came up with for this). It would be a nice feature.

    :param str message: title of menu
    :param choices: Menu lines, len must be > 0
    :type choices: list of tuples (tag, item) or
        list of descriptions (tags will be enumerated)
    :param default: default value to return, if interaction is not possible
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

    :returns: tuple of (`code`, `index`) where
        `code` - str display exit code
        `index` - int index of the user's selection

    :rtype: tuple

    �rrr)rr�menu)rrrrrs     rrr6s0��0�?�?��!�!�'�7�G�h�4E�"�G�Grc�P�tj�j||||��S)a�Accept input from the user.

    :param str message: message to display to the user
    :param default: default value to return, if interaction is not possible
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

    :returns: tuple of (`code`, `input`) where
        `code` - str display exit code
        `input` - str of the user's input
    :rtype: tuple

    r)rr�input�rrrrs    r�
input_textrRs.�� �?�?��"�"�7�G�h�5F�#�H�Hr�	yes_label�no_labelc�T�tj�j||||||��S)a~Query the user with a yes/no question.

    Yes and No label must begin with different letters, and must contain at
    least one letter each.

    :param str message: question for the user
    :param str yes_label: Label of the "Yes" parameter
    :param str no_label: Label of the "No" parameter
    :param default: default value to return, if interaction is not possible
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

    :returns: True for "Yes", False for "No"
    :rtype: bool

    )r r!rrr)rr�yesno)rr r!rrrs      rr#r#fs4��(�?�?��"�"�7�i�(�\c�,4�HY�#�[�[r�tagsc�R�tj�j|||||��S)a'Display a checklist.

    :param str message: Message to display to user
    :param list tags: `str` tags to select, len(tags) > 0
    :param default: default value to return, if interaction is not possible
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

    :returns: tuple of (`code`, `tags`) where
        `code` - str display exit code
        `tags` - list of selected tags
    :rtype: tuple

    r)rr�	checklist)rr$rrrs     rr&r&~s1��$�?�?��&�&�w��g�PX�9J�'�L�Lrc�P�tj�j||||��S)a�Display a directory selection screen.

    :param str message: prompt to give the user
    :param default: default value to return, if interaction is not possible
    :param str cli_flag: option used to set this value with the CLI
    :param bool force_interactive: True if it's safe to prompt the user
        because it won't cause any workflow regressions

    :returns: tuple of the form (`code`, `string`) where
        `code` - display exit code
        `string` - input entered by the user

    r)rr�directory_selectrs    rr(r(�s/���?�?��-�-�g�w�QY�@Q�.�S�Sr�promptc�j�dj|�}|r|dj|�z
}|�
|sJ|��yy)a0Verify that provided arguments is a valid display call.

    :param str prompt: prompt for the user
    :param default: default answer to prompt
    :param str cli_flag: command line option for setting an answer
        to this question
    :param bool force_interactive: if interactivity is forced

    z)Invalid display call for this prompt:
{0}z7
You can set an answer to this prompt with the {0} flagN)�format)r)rrrrs     r�assert_valid_callr,�sK��7�
=�
=�f�
E�C���0�06��x�0@�	B����"3�8�S�8�3�"3�r)TTFT)NNF)�Yes�NoNNF)�__doc__�typingrr�certbot._internal.displayr�OK�CANCEL�WIDTH�strr�boolr�list�tuple�intrrr#r&r(r,�rr�<module>r;sv��
���)�	�V�V��3�	����9�
��Q��Q��Q�AE�CG�[�#�[�d�[��[�$(�[�<@�[�LP�[�&CG�#(�G�#�G��d�3�i��e�C��H�o�1F�&F� G�G��3�-�G�2:�3�-�G� �G�-2�3��8�_�G�8W[�).�H��H�h�s�m�H�h�s�m�H�"&�H�38��c��?�H�(AE�DH�$)�[�3�[�3�[�#�[��D�>�[�4<�S�M�[�!�[�.2�[�0MQ�(,�(-�L�s�L�$�s�)�L�h�t�C�y�6I�L� ��
�L�!%�L�27��T�#�Y��2G�L�,]a�/4�S�c�S�H�S�M�S�H�UX�M�S�(,�S�9>�s�C�x��S�&9�c�9�C�9�3�9�SW�9�\`�9r