§
    #ˆtjZX  ã                  óê  — U d dl mZ d dlmZ d dlZd dlZd dl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lmZ dTd„Zej        rd dlmZ  eddej        ¬¦  «        Zn ej        dd¬¦  «        Z G d„ dej        e         ¦  «        ZdZd Zd!Z G d"„ d#ej         ¦  «        Z! G d$„ d%¦  «        Z" G d&„ d'e"¦  «        Z# G d(„ d)e"¦  «        Z$ G d*„ d+e"¦  «        Z%e#e%e$d,œZ&d-e'd.<    ej        d/d%¬0¦  «        Z(	 dUdVd5„Z)ej*        dWd9„¦   «         Z+ej*        dXd<„¦   «         Z+ej*        dYd?„¦   «         Z+ej*        dZdA„¦   «         Z+dZdB„Z+d[dE„Z,d\dK„Z-d]dM„Z.d^dO„Z/d_dP„Z0d`dS„Z1dS )aé    )ÚannotationsN)Úgettexté   )ÚArgument)ÚCommand)ÚContext)ÚGroup)ÚOption)Ú	Parameter)ÚParameterSource)ÚechoÚclir   Úctx_argsúcabc.MutableMapping[str, t.Any]Ú	prog_nameÚstrÚcomplete_varÚinstructionÚreturnút.Literal[0, 1]c                ój  — |                      d¦  «        \  }}}t          |¦  «        }|€dS  || |||¦  «        }|dk    r7t          |                     ¦   «                              ¦   «         d¬¦  «         dS |dk    r5t          |                     ¦   «                              ¦   «         ¦  «         dS dS )	a   Perform shell completion for the given CLI program.

    :param cli: Command being called.
    :param ctx_args: Extra arguments to pass to
        ``cli.make_context``.
    :param prog_name: Name of the executable in the shell.
    :param complete_var: Name of the environment variable that holds
        the completion instruction.
    :param instruction: Value of ``complete_var`` with the completion
        instruction and shell, in the form ``instruction_shell``.
    :return: Status code to exit with.
    Ú_Nr   ÚsourceF)Únlr   Úcomplete)Ú	partitionÚget_completion_classr   r   Úencoder   )	r   r   r   r   r   Úshellr   Úcomp_clsÚcomps	            úT/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/click/shell_completion.pyÚshell_completer#      s»   € ð& (×1Ò1°#Ñ6Ô6Ñ€Eˆ1ˆkÝ# EÑ*Ô*€HàÐØˆqàˆ8�C˜ 9¨lÑ;Ô;€Dð �hÒÐÝˆT�[Š[‰]Œ]×!Ò!Ñ#Ô#¨Ð.Ñ.Ô.Ð.Øˆqà�jÒ Ð ÝˆT�]Š]‰_Œ_×#Ò#Ñ%Ô%Ñ&Ô&Ð&Øˆqàˆ1ó    )ÚTypeVarÚ
_ValueT_coT)Ú	covariantÚdefault)r'   c                  ó,   — e Zd ZdZdZ	 	 ddd„Zdd„ZdS )ÚCompletionItema)  Represents a completion value and metadata about the value. The
    default metadata is ``type`` to indicate special shell handling,
    and ``help`` if a shell supports showing a help string next to the
    value.

    Arbitrary parameters can be passed when creating the object, and
    accessed using ``item.attr``. If an attribute wasn't passed,
    accessing it returns ``None``.

    :param value: The completion suggestion.
    :param type: Tells the shell script to provide special completion
        support for the type. Click uses ``"dir"`` and ``"file"``.
    :param help: String shown next to the value if supported.
    :param kwargs: Arbitrary metadata. The built-in implementations
        don't use this, but custom type completions paired with custom
        shell support could use it.
    ©ÚvalueÚtypeÚhelpÚ_infoÚplainNr,   r&   r-   r   r.   ú
str | NoneÚkwargsút.Anyr   ÚNonec                ó>   — || _         || _        || _        || _        d S ©Nr+   )Úselfr,   r-   r.   r2   s        r"   Ú__init__zCompletionItem.__init__X   s$   € ð "'ˆŒ
ØˆŒ	Ø $ˆŒ	ØˆŒ
ˆ
ˆ
r$   Únamec                ó6   — | j                              |¦  «        S r6   )r/   Úget)r7   r9   s     r"   Ú__getattr__zCompletionItem.__getattr__d   s   € ØŒz�~Š~˜dÑ#Ô#Ð#r$   )r0   N)
r,   r&   r-   r   r.   r1   r2   r3   r   r4   )r9   r   r   r3   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r8   r<   © r$   r"   r*   r*   C   sZ   € € € € € ðð ð$ 3€Ið
 Øð	
ð 
ð 
ð 
ð 
ð$ð $ð $ð $ð $ð $r$   r*   a¢  %(complete_func)s() {
    local IFS=$'\n'
    local response

    response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD %(complete_var)s=bash_complete $1)

    for completion in $response; do
        IFS=',' read type value <<< "$completion"

        if [[ $type == 'dir' ]]; then
            COMPREPLY=()
            compopt -o dirnames
        elif [[ $type == 'file' ]]; then
            COMPREPLY=()
            compopt -o default
        elif [[ $type == 'plain' ]]; then
            COMPREPLY+=($value)
        fi
    done

    return 0
}

%(complete_func)s_setup() {
    complete -o nosort -F %(complete_func)s %(prog_name)s
}

%(complete_func)s_setup;
a¦  #compdef %(prog_name)s

%(complete_func)s() {
    local -a completions
    local -a completions_with_descriptions
    local -a response
    (( ! $+commands[%(prog_name)s] )) && return 1

    response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) %(complete_var)s=zsh_complete %(prog_name)s)}")

    for type key descr in ${response}; do
        if [[ "$type" == "plain" ]]; then
            if [[ "$descr" == "_" ]]; then
                completions+=("$key")
            else
                completions_with_descriptions+=("$key":"$descr")
            fi
        elif [[ "$type" == "dir" ]]; then
            _path_files -/
        elif [[ "$type" == "file" ]]; then
            _path_files -f
        fi
    done

    if [ -n "$completions_with_descriptions" ]; then
        _describe -V unsorted completions_with_descriptions -U
    fi

    if [ -n "$completions" ]; then
        compadd -U -V unsorted -a completions
    fi
}

if [[ $zsh_eval_context[-1] == loadautofunc ]]; then
    # autoload from fpath, call function directly
    %(complete_func)s "$@"
else
    # eval/source/. command, register function for later
    compdef %(complete_func)s %(prog_name)s
fi
af  function %(complete_func)s;
    set -l response (env %(complete_var)s=fish_complete COMP_WORDS=(commandline -cp) COMP_CWORD=(commandline -t) %(prog_name)s);

    for completion in $response;
        set -l metadata (string split "," $completion);

        if test $metadata[1] = "dir";
            __fish_complete_directories $metadata[2];
        else if test $metadata[1] = "file";
            __fish_complete_path $metadata[2];
        else if test $metadata[1] = "plain";
            echo $metadata[2];
        end;
    end;
end;

complete --no-files --command %(prog_name)s --arguments "(%(complete_func)s)";
c                  ó.   — e Zd ZU ded<   ded<   ded<   dS )Ú_SourceVarsDictr   Úcomplete_funcr   r   N)r=   r>   r?   Ú__annotations__rB   r$   r"   rD   rD   Ò   s1   € € € € € € ØÐÐÑØÐÐÑØ€N€N�N€N€Nr$   rD   c                  ó¤   — e Zd ZU dZded<   	 ded<   	 ded<   ded<   d	ed
<   d	ed<   dd„Zed d„¦   «         Zd!d„Zd d„Z	d"d„Z
d#d„Zd$d„Zd d„ZdS )%ÚShellCompletea¯  Base class for providing shell completion support. A subclass for
    a given shell will override attributes and methods to implement the
    completion instructions (``source`` and ``complete``).

    :param cli: Command being called.
    :param prog_name: Name of the executable in the shell.
    :param complete_var: Name of the environment variable that holds
        the completion instruction.

    .. versionadded:: 8.0
    út.ClassVar[str]r9   Úsource_templater   r   r   r   r   r   r   r   r4   c                ó>   — || _         || _        || _        || _        d S r6   )r   r   r   r   )r7   r   r   r   r   s        r"   r8   zShellComplete.__init__õ   s'   € ð ˆŒØ ˆŒØ"ˆŒØ(ˆÔÐÐr$   c                ó„   — t          j        dd| j                             dd¦  «        t           j        ¬¦  «        }d|› d�S )zQThe name of the shell function defined by the completion
        script.
        z\W*Ú ú-r   )ÚflagsÚ_completion)ÚreÚsubr   ÚreplaceÚASCII)r7   Ú	safe_names     r"   Ú	func_namezShellComplete.func_name  sA   € õ
 ”F˜6 2 t¤~×'=Ò'=¸cÀ3Ñ'GÔ'GÍrÌxÐXÑXÔXˆ	Ø)�9Ð)Ð)Ð)Ð)r$   rD   c                ó,   — | j         | j        | j        dœS )z—Vars for formatting :attr:`source_template`.

        By default this provides ``complete_func``, ``complete_var``,
        and ``prog_name``.
        )rE   r   r   )rV   r   r   ©r7   s    r"   Úsource_varszShellComplete.source_vars	  s#   € ð "œ^Ø Ô-Øœð
ð 
ð 	
r$   c                ó:   — | j         |                      ¦   «         z  S )zÊProduce the shell script that defines the completion
        function. By default this ``%``-style formats
        :attr:`source_template` with the dict returned by
        :meth:`source_vars`.
        )rJ   rY   rX   s    r"   r   zShellComplete.source  s   € ð Ô# d×&6Ò&6Ñ&8Ô&8Ñ8Ð8r$   útuple[list[str], str]c                ó   — t           ‚)z˜Use the env vars defined by the shell script to return a
        tuple of ``args, incomplete``. This must be implemented by
        subclasses.
        ©ÚNotImplementedErrorrX   s    r"   Úget_completion_argsz!ShellComplete.get_completion_args  s
   € õ
 "Ð!r$   Úargsú	list[str]Ú
incompleteúlist[CompletionItem[str]]c                ó˜   — t          | j        | j        | j        |¦  «        }t	          |||¦  «        \  }}|                     ||¦  «        S )aT  Determine the context and last complete command or parameter
        from the complete args. Call that object's ``shell_complete``
        method to get the completions for the incomplete value.

        :param args: List of complete args before the incomplete value.
        :param incomplete: Value being completed. May be empty.
        )Ú_resolve_contextr   r   r   Ú_resolve_incompleter#   )r7   r`   rb   ÚctxÚobjs        r"   Úget_completionszShellComplete.get_completions$  sH   € õ ˜tœx¨¬¸¼ÈÑMÔMˆÝ-¨c°4¸ÑDÔD‰ˆˆZØ×!Ò! # zÑ2Ô2Ð2r$   ÚitemúCompletionItem[str]c                ó   — t           ‚)z°Format a completion item into the form recognized by the
        shell script. This must be implemented by subclasses.

        :param item: Completion item to format.
        r]   ©r7   rj   s     r"   Úformat_completionzShellComplete.format_completion2  s
   € õ "Ð!r$   c                ó¤   ‡ — ‰                       ¦   «         \  }}‰                      ||¦  «        }ˆ fd„|D ¦   «         }d                     |¦  «        S )zÛProduce the completion data to send back to the shell.

        By default this calls :meth:`get_completion_args`, gets the
        completions, then calls :meth:`format_completion` for each
        completion.
        c                ó:   •— g | ]}‰                      |¦  «        ‘ŒS rB   )rn   )Ú.0rj   r7   s     €r"   ú
<listcomp>z*ShellComplete.complete.<locals>.<listcomp>C  s'   ø€ ÐDÐDÐD°ˆt×%Ò% dÑ+Ô+ÐDÐDÐDr$   ú
)r_   ri   Újoin)r7   r`   rb   ÚcompletionsÚouts   `    r"   r   zShellComplete.complete:  sY   ø€ ð  ×3Ò3Ñ5Ô5ÑˆˆjØ×*Ò*¨4°Ñ<Ô<ˆØDÐDÐDÐD¸ÐDÑDÔDˆØ�yŠy˜‰~Œ~Ðr$   N)
r   r   r   r   r   r   r   r   r   r4   ©r   r   )r   rD   ©r   r[   )r`   ra   rb   r   r   rc   ©rj   rk   r   r   )r=   r>   r?   r@   rF   r8   ÚpropertyrV   rY   r   r_   ri   rn   r   rB   r$   r"   rH   rH   Ø   s  € € € € € € ð
ð 
ð ÐÐÑðð
 %Ð$Ð$Ñ$ðð €L€L�LØ-Ð-Ð-Ñ-Ø€N€N�NØÐÐÑð
)ð 
)ð 
)ð 
)ð ð*ð *ð *ñ „Xð*ð

ð 

ð 

ð 

ð9ð 9ð 9ð 9ð"ð "ð "ð "ð3ð 3ð 3ð 3ð"ð "ð "ð "ð
ð 
ð 
ð 
ð 
ð 
r$   rH   c                  ój   ‡ — e Zd ZU dZdZded<   eZded<   edd„¦   «         Z	dˆ fd
„Z
dd„Zdd„Zˆ xZS )ÚBashCompletezShell completion for Bash.ÚbashrI   r9   rJ   r   r4   c                 ó¼  — dd l } dd l}|                      d¦  «        }|€d }nL|                     |dddg|j        ¬¦  «        }t          j        d|j                             ¦   «         ¦  «        }|�M| 	                    ¦   «         \  }}|dk     s|dk    r&|dk     r"t          t          d	¦  «        d
¬¦  «         d S d S d S t          t          d¦  «        d
¬¦  «         d S )Nr   r}   z--norcz-czecho "${BASH_VERSION}")Ústdoutz^(\d+)\.(\d+)\.\d+Ú4zCShell completion is not supported for Bash versions older than 4.4.T)Úerrz@Couldn't detect Bash version, shell completion is not supported.)ÚshutilÚ
subprocessÚwhichÚrunÚPIPErQ   Úsearchr   ÚdecodeÚgroupsr   r   )r‚   rƒ   Úbash_exeÚmatchÚoutputÚmajorÚminors          r"   Ú_check_versionzBashComplete._check_versionM  s&  € àˆˆˆØÐÐÐà—<’< Ñ'Ô'ˆàÐØˆEˆEà—^’^Ø˜8 TÐ+CÐDØ!”ð $ñ ô ˆFõ ”IÐ3°V´]×5IÒ5IÑ5KÔ5KÑLÔLˆEàÐØ Ÿ<š<™>œ>‰LˆE�5à�sŠ{ˆ{˜e sšl˜l¨u°sª{¨{ÝÝð4ñô ð ðñ ô ð ð ð ð +˜l¨{¨{õ ÝÐTÑUÔUØðñ ô ð ð ð r$   r   c                ól   •— |                       ¦   «          t          ¦   «                              ¦   «         S r6   )r�   Úsuperr   )r7   Ú	__class__s    €r"   r   zBashComplete.sourcen  s)   ø€ Ø×ÒÑÔÐÝ‰wŒw�~Š~ÑÔÐr$   r[   c                óÒ   — t          t          j        d         ¦  «        }t          t          j        d         ¦  «        }|d|…         }	 ||         }n# t          $ r d}Y nw xY w||fS ©NÚ
COMP_WORDSÚ
COMP_CWORDr   rM   ©Úsplit_arg_stringÚosÚenvironÚintÚ
IndexError©r7   ÚcwordsÚcwordr`   rb   s        r"   r_   z BashComplete.get_completion_argsr  óx   € Ý!¥"¤*¨\Ô":Ñ;Ô;ˆÝ•B”J˜|Ô,Ñ-Ô-ˆØ�a˜�gŒˆð	Ø œˆJˆJøÝð 	ð 	ð 	ØˆJˆJˆJð	øøøð �ZÐÐó   Á
A ÁA"Á!A"rj   úCompletionItem[t.Any]c                ó$   — |j         › d|j        › �S )Nú,)r-   r,   rm   s     r"   rn   zBashComplete.format_completion~  s   € Ø”)Ð*Ð*˜dœjÐ*Ð*Ð*r$   )r   r4   rw   rx   )rj   r¢   r   r   )r=   r>   r?   r@   r9   rF   Ú_SOURCE_BASHrJ   Ústaticmethodr�   r   r_   rn   Ú__classcell__)r’   s   @r"   r|   r|   G  s®   ø€ € € € € € Ø$Ð$à"€DÐ"Ð"Ð"Ñ"Ø'3€OÐ3Ð3Ð3Ñ3àðð ð ñ „\ðð@ ð  ð  ð  ð  ð  ð
 ð 
 ð 
 ð 
 ð+ð +ð +ð +ð +ð +ð +ð +r$   r|   c                  ó@   — e Zd ZU dZdZded<   eZded<   dd„Zdd„Z	dS )ÚZshCompletezShell completion for Zsh.ÚzshrI   r9   rJ   r   r[   c                óÒ   — t          t          j        d         ¦  «        }t          t          j        d         ¦  «        }|d|…         }	 ||         }n# t          $ r d}Y nw xY w||fS r”   r—   r�   s        r"   r_   zZshComplete.get_completion_argsˆ  r    r¡   rj   rk   r   c                ó‚   — |j         pd}|dk    r|j                             dd¦  «        n|j        }|j        › d|› d|› �S )Nr   ú:z\:rs   )r.   r,   rS   r-   )r7   rj   Úhelp_r,   s       r"   rn   zZshComplete.format_completion”  sT   € Ø”	Ð ˜Sˆð 38¸3²,°,�”
×"Ò" 3¨Ñ.Ô.Ð.ÀDÄJˆØ”)Ð/Ð/˜uÐ/Ð/¨Ð/Ð/Ð/r$   Nrx   ry   )
r=   r>   r?   r@   r9   rF   Ú_SOURCE_ZSHrJ   r_   rn   rB   r$   r"   r©   r©   ‚  sf   € € € € € € Ø#Ð#à!€DÐ!Ð!Ð!Ñ!Ø'2€OÐ2Ð2Ð2Ñ2ð
 ð 
 ð 
 ð 
 ð0ð 0ð 0ð 0ð 0ð 0r$   r©   c                  ó@   — e Zd ZU dZdZded<   eZded<   dd„Zdd„Z	dS )ÚFishCompletezShell completion for Fish.ÚfishrI   r9   rJ   r   r[   c                óö   — t          t          j        d         ¦  «        }t          j        d         }|rt          |¦  «        d         }|dd …         }|r"|r |d         |k    r|                     ¦   «          ||fS )Nr•   r–   r   r   éÿÿÿÿ)r˜   r™   rš   Úpop)r7   rž   rb   r`   s       r"   r_   z FishComplete.get_completion_args¬  s€   € Ý!¥"¤*¨\Ô":Ñ;Ô;ˆÝ”Z Ô-ˆ
Øð 	9Ý)¨*Ñ5Ô5°aÔ8ˆJØ�a�b�bŒzˆð ð 	˜$ð 	 4¨¤8¨zÒ#9Ð#9Ø�HŠH‰JŒJˆJà�ZÐÐr$   rj   rk   r   c                ó¸   — |j         rC|j                              dd¦  «                             dd¦  «        }|j        › d|j        › d|› �S |j        › d|j        › �S )z¸
        .. versionchanged:: 8.4.2
            Escape newlines and replace tabs with spaces in the help text to
            fix completion errors with multi-line help strings.
        rs   z\nú	ú r¤   )r.   rS   r-   r,   )r7   rj   r®   s      r"   rn   zFishComplete.format_completionº  sm   € ð Œ9ð 	8Ø”I×%Ò% d¨EÑ2Ô2×:Ò:¸4ÀÑEÔEˆEØ”iÐ7Ð7 $¤*Ð7Ð7°Ð7Ð7Ð7à”)Ð*Ð*˜dœjÐ*Ð*Ð*r$   Nrx   ry   )
r=   r>   r?   r@   r9   rF   Ú_SOURCE_FISHrJ   r_   rn   rB   r$   r"   r±   r±   ¦  sf   € € € € € € Ø$Ð$à"€DÐ"Ð"Ð"Ñ"Ø'3€OÐ3Ð3Ð3Ñ3ð ð  ð  ð  ð+ð +ð +ð +ð +ð +r$   r±   )r}   r²   rª   z't.Final[dict[str, type[ShellComplete]]]Ú_available_shellsÚ_ShellCompleteT)ÚboundÚclsútype[_ShellCompleteT]r9   r1   c                ó,   — |€| j         }| t          |<   | S )am  Register a :class:`ShellComplete` subclass under the given name.
    The name will be provided by the completion instruction environment
    variable during completion.

    :param cls: The completion class that will handle completion for the
        shell.
    :param name: Name to register the class under. Defaults to the
        class's ``name`` attribute.
    )r9   rº   )r½   r9   s     r"   Úadd_completion_classrÀ   Ô  s    € ð €|ØŒxˆà!Õ�dÑà€Jr$   r   út.Literal['bash']útype[BashComplete]c                ó   — d S r6   rB   ©r   s    r"   r   r   è  ó   € ØJMÈ#r$   út.Literal['fish']útype[FishComplete]c                ó   — d S r6   rB   rÄ   s    r"   r   r   ê  rÅ   r$   út.Literal['zsh']útype[ZshComplete]c                ó   — d S r6   rB   rÄ   s    r"   r   r   ì  s   € ØHKÈr$   útype[ShellComplete] | Nonec                ó   — d S r6   rB   rÄ   s    r"   r   r   î  s   € ØDGÀCr$   c                ó6   — t                                | ¦  «        S )zñLook up a registered :class:`ShellComplete` subclass by the name
    provided by the completion instruction environment variable. If the
    name isn't registered, returns ``None``.

    :param shell: Name the class is registered under.
    )rº   r;   rÄ   s    r"   r   r   ð  s   € õ × Ò  Ñ'Ô'Ð'r$   Ústringra   c                óè   — ddl }|                      | d¬¦  «        }d|_        d|_        g }	 |D ]}|                     |¦  «         Œn*# t          $ r |                     |j        ¦  «         Y nw xY w|S )aó  Split an argument string as with :func:`shlex.split`, but don't
    fail if the string is incomplete. Ignores a missing closing quote or
    incomplete escape sequence and uses the partial token as-is.

    .. code-block:: python

        split_arg_string("example 'my file")
        ["example", "my file"]

        split_arg_string("example my\")
        ["example", "my"]

    :param string: String to split.

    .. versionchanged:: 8.2
        Moved to ``shell_completion`` from ``parser``.
    r   NT)ÚposixrM   )ÚshlexÚwhitespace_splitÚ
commentersÚappendÚ
ValueErrorÚtoken)rÏ   rÒ   Úlexrv   r×   s        r"   r˜   r˜   ú  s¢   € ð$ €L€L€Là
�+Š+�f Dˆ+Ñ
)Ô
)€CØ€CÔØ€C„NØ
€CðØð 	ð 	ˆEØ�JŠJ�uÑÔÐÐð	øåð ð ð ð 	�
Š
�3”9ÑÔÐÐÐð	øøøð €Js   ­A Á$A/Á.A/rg   r   Úparamr   Úboolc                óN  — t          |t          ¦  «        sdS | j                             |j        ¦  «        }|j        dk    pd|                      |j        ¦  «        t          j        up>|j        dk    o3t          |t          t          f¦  «        ot          |¦  «        |j        k     S )zìDetermine if the given parameter is an argument that can still
    accept values.

    :param ctx: Invocation context for the command represented by the
        parsed complete args.
    :param param: Argument object being checked.
    Fr´   r   )Ú
isinstancer   Úparamsr;   r9   ÚnargsÚget_parameter_sourcer   ÚCOMMANDLINEÚtupleÚlistÚlen)rg   rÙ   r,   s      r"   Ú_is_incomplete_argumenträ     sš   € õ �e�XÑ&Ô&ð ØˆuàŒJ�NŠN˜5œ:Ñ&Ô&€EàŒ�rÒð 	
Ø×#Ò# E¤JÑ/Ô/µÔ7RÐRð	
ð ŒK˜!ŠOð )Ý˜5¥5­$ -Ñ0Ô0ð)å�E‘
”
˜Uœ[Ò(ðr$   r,   c                ó,   — |sdS |d         }|| j         v S )z5Check if the value looks like the start of an option.Fr   )Ú_opt_prefixes)rg   r,   Úcs      r"   Ú_start_of_optionrè   6  s&   € àð ØˆuàˆaŒ€AØ�Ô!Ð!Ð!r$   r`   c                óú   — t          |t          ¦  «        sdS |j        s|j        rdS d}t	          t          |¦  «        ¦  «        D ])\  }}|dz   |j        k    r nt          | |¦  «        r|} nŒ*|duo||j        v S )zºDetermine if the given parameter is an option that needs a value.

    :param args: List of complete args before the incomplete value.
    :param param: Option object being checked.
    FNr   )	rÜ   r
   Úis_flagÚcountÚ	enumerateÚreversedrÞ   rè   Úopts)rg   r`   rÙ   Úlast_optionÚindexÚargs         r"   Ú_is_incomplete_optionrò   ?  s©   € õ �e�VÑ$Ô$ð Øˆuà„}ð ˜œð Øˆuà€Kå¥¨¡¤Ñ/Ô/ð ð ‰
ˆˆsØ�1‰9�u”{Ò"Ð"ØˆEå˜C Ñ%Ô%ð 	ØˆKØˆEð	ð ˜dÐ"Ð@ {°e´jÐ'@Ð@r$   c           	     óÌ  — d|d<    | j         ||                     ¦   «         fi |¤Ž5 }|j        |j        z   }|�r|j        }t          |t          ¦  «        ró|j        sm|                     ||¦  «        \  }}}|€|cddd¦  «         S |                      |||d¬¦  «        5 }|}|j        |j        z   }ddd¦  «         n# 1 swxY w Y   n€|}|rh|                     ||¦  «        \  }}}|€|cddd¦  «         S |                      |||ddd¬¦  «        5 }	|	}|j        }ddd¦  «         n# 1 swxY w Y   |°h|}g |j        ¢|j        ¢}nn|�°ddd¦  «         n# 1 swxY w Y   |S )a`  Produce the context hierarchy starting with the command and
    traversing the complete arguments. This only follows the commands,
    it doesn't trigger input prompts or callbacks.

    :param cli: Command being called.
    :param prog_name: Name of the executable in the shell.
    :param args: List of complete args before the incomplete value.
    TÚresilient_parsingN)Úparentrô   F)rõ   Úallow_extra_argsÚallow_interspersed_argsrô   )	Úmake_contextÚcopyÚ_protected_argsr`   ÚcommandrÜ   r	   ÚchainÚresolve_command)
r   r   r   r`   rg   rû   r9   ÚcmdÚsub_ctxÚsub_sub_ctxs
             r"   re   re   X  sÁ  € ð %)€HÐ Ñ!Ø	ˆÔ	˜) T§Y¢Y¡[¤[Ð	=Ð	=°HÐ	=Ð	=ð )ÀØÔ" S¤XÑ-ˆàñ &	Ø”kˆGå˜'¥5Ñ)Ô)ð #Ø”}ð  EØ&-×&=Ò&=¸cÀ4Ñ&HÔ&H‘O�D˜#˜tà�{Ø"ð)ð )ð )ð )ñ )ô )ð )ð )ð ×)Ò)Ø˜d¨3À$ð *ñ ô ð >à Ø%˜Ø"Ô2°S´XÑ=˜ð	>ð >ð >ñ >ô >ð >ð >ð >ð >ð >ð >øøøð >ð >ð >ð >øð "�Gàð 0Ø*1×*AÒ*AÀ#ÀtÑ*LÔ*L™˜˜c 4à˜;Ø#&ð3)ð )ð )ð )ñ )ô )ð )ð )ð6 !×-Ò-Ø Ø Ø#&Ø-1Ø49Ø.2ð .ñ ô ð 	0ð )Ø&1˜GØ#*¤<˜Dð	0ð 	0ð 	0ñ 	0ô 	0ð 	0ð 	0ð 	0ð 	0ð 	0ð 	0øøøð 	0ð 	0ð 	0ð 	0ð ð 0ð" "�CØD˜WÔ4ÐD°w´|ÐD�D�DàðM ñ &	ð)ð )ð )ñ )ô )ð )ð )ð )ð )ð )ð )øøøð )ð )ð )ð )ðV €Jsf   §AEÂEÂ B>Â2EÂ>C	ÃEÃC	Ã%EÃ8EÄ
D)ÄEÄ)D-	Ä-EÄ0D-	Ä1EÅEÅ Erb   útuple[Command | Parameter, str]c                ó†  — |dk    rd}nBd|v r>t          | |¦  «        r.|                     d¦  «        \  }}}|                     |¦  «         d|vrt          | |¦  «        r	| j        |fS | j                             | ¦  «        }|D ]}t          | ||¦  «        r||fc S Œ|D ]}t          | |¦  «        r||fc S Œ| j        |fS )ah  Find the Click object that will handle the completion of the
    incomplete value. Return the object and the incomplete value.

    :param ctx: Invocation context for the command represented by
        the parsed complete args.
    :param args: List of complete args before the incomplete value.
    :param incomplete: Value being completed. May be empty.
    ú=rM   z--)rè   r   rÕ   rû   Ú
get_paramsrò   rä   )rg   r`   rb   r9   r   rÝ   rÙ   s          r"   rf   rf   •  s  € ð �SÒÐØˆ
ˆ
Ø	�
Ð	Ð	Õ/°°ZÑ@Ô@Ð	Ø(×2Ò2°3Ñ7Ô7Ñˆˆa�Ø�Š�DÑÔÐð �4ÐÐÕ,¨S°*Ñ=Ô=ÐØŒ{˜JÐ&Ð&àŒ[×#Ò# CÑ(Ô(€Fð ð %ð %ˆÝ   d¨EÑ2Ô2ð 	%Ø˜*Ð$Ð$Ð$Ð$ð	%ð
 ð %ð %ˆÝ" 3¨Ñ.Ô.ð 	%Ø˜*Ð$Ð$Ð$Ð$ð	%ð
 Œ;˜
Ð"Ð"r$   )r   r   r   r   r   r   r   r   r   r   r   r   r6   )r½   r¾   r9   r1   r   r¾   )r   rÁ   r   rÂ   )r   rÆ   r   rÇ   )r   rÉ   r   rÊ   )r   r   r   rÌ   )rÏ   r   r   ra   )rg   r   rÙ   r   r   rÚ   )rg   r   r,   r   r   rÚ   )rg   r   r`   ra   rÙ   r   r   rÚ   )
r   r   r   r   r   r   r`   ra   r   r   )rg   r   r`   ra   rb   r   r   r  )2Ú
__future__r   Úcollections.abcÚabcÚcabcr™   rQ   ÚtypingÚtr   r   Úcorer   r   r   r	   r
   r   r   Úutilsr   r#   ÚTYPE_CHECKINGÚtyping_extensionsr%   ÚAnyr&   ÚGenericr*   r¥   r¯   r¹   Ú	TypedDictrD   rH   r|   r©   r±   rº   rF   r»   rÀ   Úoverloadr   r˜   rä   rè   rò   re   rf   rB   r$   r"   ú<module>r     sÙ  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à Ð Ð Ð Ð Ð Ø 	€	€	€	Ø 	€	€	€	Ø Ð Ð Ð Ø  Ð  Ð  Ð  Ð  Ð  à Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø !Ð !Ð !Ð !Ð !Ð !Ø Ð Ð Ð Ð Ð ð$ð $ð $ð $ðN „?ð 9Ø)Ð)Ð)Ð)Ð)Ð)ð �˜°¸q¼uÐEÑEÔE€J€Jà�”˜<°4Ð8Ñ8Ô8€Jð"$ð "$ð "$ð "$ð "$�Q”Y˜zÔ*ñ "$ô "$ð "$ðL€ðL*€ðX€ð.ð ð ð ð �a”kñ ô ð ðlð lð lð lð lñ lô lð lð^8+ð 8+ð 8+ð 8+ð 8+�=ñ 8+ô 8+ð 8+ðv!0ð !0ð !0ð !0ð !0�-ñ !0ô !0ð !0ðH"+ð "+ð "+ð "+ð "+�=ñ "+ô "+ð "+ðL ØØð>ð >Ð ð ð ð ñ ð �!”)Ð-°_ÐEÑEÔE€ð 48ðð ð ð ð ð( „Ø MÐ MÐ Mñ „Ø MØ„Ø MÐ MÐ Mñ „Ø MØ„Ø KÐ KÐ Kñ „Ø KØ„Ø GÐ GÐ Gñ „Ø Gð(ð (ð (ð (ð"ð "ð "ð "ðJð ð ð ð."ð "ð "ð "ðAð Að Að Að2:ð :ð :ð :ðz,#ð ,#ð ,#ð ,#ð ,#ð ,#r$   