
    5hH                        % S SK r S SKrS SKrS SKJr  SSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr  S\S\R$                  \\R(                  4   S\S\S\S\4S jr " S S5      rSrSrSr " S S5      r " S S\5      r " S S\5      r " S S \5      r\R>                  " S!\R@                  \   S"9r!\\\S#.r"\RF                  \\R@                  \   4   \$S$'    S4S%\!S&\RJ                  \   S\!4S' jjr&S(\S\RJ                  \R@                  \      4S) jr'S*\	S+\S\(4S, jr)S*\	S-\S\(4S. jr*S*\	S/\RV                  \   S+\S\(4S0 jr,S\S\R$                  \\R(                  4   S\S/\RV                  \   S\	4
S1 jr-S*\	S/\RV                  \   S2\S\R\                  \R^                  \\4   \4   4S3 jr0g)5    N)gettext   )Argument)BaseCommand)Context)MultiCommand)Option)	Parameter)ParameterSource)split_arg_string)echoclictx_args	prog_namecomplete_varinstructionreturnc                     UR                  S5      u  pVn[        U5      nUc  gU" XX#5      nUS:X  a  [        UR                  5       5        gUS:X  a  [        UR	                  5       5        gg)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.
_r   sourcer   complete)	partitionget_completion_classr   r   r   )	r   r   r   r   r   shellr   comp_clscomps	            a/var/www/html/cementerio_25MayoBackend/env/lib/python3.13/site-packages/click/shell_completion.pyshell_completer      sm    & (11#6Ek#E*HC9;DhT[[]j T]]_    c                       \ rS rSrSrSr  SS\R                  S\S\R                  \   S\R                  S	S4
S
 jjr
S\S	\R                  4S jrSrg)CompletionItem7   a  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_infoNr$   r%   r&   kwargsr   c                 4    Xl         X l        X0l        X@l        g Nr#   )selfr$   r%   r&   r(   s        r   __init__CompletionItem.__init__L   s     "
	%)	
r   namec                 8    U R                   R                  U5      $ r*   )r'   get)r+   r.   s     r   __getattr__CompletionItem.__getattr__X   s    zz~~d##r   )r'   r&   r%   r$   )plainN)__name__
__module____qualname____firstlineno____doc__	__slots__tAnystrOptionalr,   r1   __static_attributes__ r   r   r!   r!   7   sr    $ 3I
  $	
uu
 
 jjo	

 %%
 

$ $ $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            
          \ rS rSr% Sr\R                  \   \S'    \R                  \   \S'    S\	S\R                  \\R                  4   S\S\S	S
4
S jr\S	\4S j5       rS	\R                  \\R                  4   4S jrS	\4S jrS	\R$                  \R&                  \   \4   4S jrS\R&                  \   S\S	\R&                  \   4S jrS\S	\4S jrS	\4S jrSrg
)ShellComplete   a  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
r.   source_templater   r   r   r   r   Nc                 4    Xl         X l        X0l        X@l        g r*   )r   r   r   r   )r+   r   r   r   r   s        r   r,   ShellComplete.__init__   s      "(r   c                     [         R                  " SSU R                  R                  SS5      [         R                  S9nSU S3$ )zAThe name of the shell function defined by the completion
script.
z\W* -r   )flags_completion)resubr   replaceASCII)r+   	safe_names     r   	func_nameShellComplete.func_name   s<    
 FF62t~~'='=c3'GrxxX	9+[))r   c                 J    U R                   U R                  U R                  S.$ )zVars for formatting :attr:`source_template`.

By default this provides ``complete_func``, ``complete_var``,
and ``prog_name``.
)complete_funcr   r   )rP   r   r   r+   s    r   source_varsShellComplete.source_vars   s%     "^^ --
 	
r   c                 <    U R                   U R                  5       -  $ )zProduce the shell script that defines the completion
function. By default this ``%``-style formats
:attr:`source_template` with the dict returned by
:meth:`source_vars`.
)rC   rU   rT   s    r   r   ShellComplete.source   s     ##d&6&6&888r   c                     [         e)zUse the env vars defined by the shell script to return a
tuple of ``args, incomplete``. This must be implemented by
subclasses.
NotImplementedErrorrT   s    r   get_completion_args!ShellComplete.get_completion_args   s
    
 "!r   args
incompletec                     [        U R                  U R                  U R                  U5      n[	        X1U5      u  pBUR                  X25      $ )a,  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   )r+   r^   r_   ctxobjs        r   get_completionsShellComplete.get_completions  s?     txxM-cD!!#22r   itemc                     [         e)zFormat a completion item into the form recognized by the
shell script. This must be implemented by subclasses.

:param item: Completion item to format.
rZ   r+   rg   s     r   format_completionShellComplete.format_completion  s
     "!r   c                     U R                  5       u  pU R                  X5      nU Vs/ sH  o@R                  U5      PM     nnSR                  U5      $ s  snf )zProduce 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.

)r\   re   rj   join)r+   r^   r_   completionsrg   outs         r   r   ShellComplete.complete  sV      335**4<8CD%%d+Dyy~ Es   A)r   r   r   r   )r4   r5   r6   r7   r8   r:   ClassVarr<   __annotations__r   MutableMappingr;   r,   propertyrP   DictrU   r   TupleListr\   r!   re   rj   r   r>   r?   r   r   rA   rA      s,   
 **S/
 ZZ_$
)
) ""3:.
) 	
)
 
) 

) *3 * *

QVVCJ/ 

9 9"QWWQVVC[#-=%> "3FF3K3-03	
	3"n " "
# 
r   rA   c                      ^  \ rS rSrSrSr\r\SS j5       r	S\
4U 4S jjrS\R                  \R                  \
   \
4   4S jrS\S\
4S	 jrS
rU =r$ )BashCompletei*  zShell completion for Bash.bashr   c                  |   SS K n SS KnU R                  S5      nUc  S nOMUR                  USSS/UR                  S9n[
        R                  " SUR                  R                  5       5      nUb:  UR                  5       u  pVUS:  d  US:X  a  US:  a  [        [        S	5      S
S9  g g g [        [        S5      S
S9  g )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PIPErK   searchr}   decodegroupsr   r   )r   r   bash_exematchoutputmajorminors          r   _check_versionBashComplete._check_version0  s    <<'E^^8T+CD! $ F II3V]]5I5I5KLE <<>LEs{eslus{4  0;l TUr   c                 @   > U R                  5         [        TU ]	  5       $ r*   )r   superr   )r+   	__class__s    r   r   BashComplete.sourceQ  s    w~r   c                     [        [        R                  S   5      n[        [        R                  S   5      nUSU n X   nX44$ ! [         a    Sn X44$ f = fN
COMP_WORDS
COMP_CWORDr   rG   r   osenvironint
IndexErrorr+   cwordscwordr^   r_   s        r   r\    BashComplete.get_completion_argsU  i    !"**\":;BJJ|,-a	J   	J	   A AArg   c                 8    UR                    SUR                   3$ )N,)r%   r$   ri   s     r   rj   BashComplete.format_completiona  s    ))Adjj\**r   r?   )r   N)r4   r5   r6   r7   r8   r.   _SOURCE_BASHrC   staticmethodr   r<   r   r:   rw   rx   r\   r!   rj   r>   __classcell__)r   s   @r   rz   rz   *  si    $D"O @   
 QWWQVVC[#-=%> 
 +n + + +r   rz   c                   x    \ rS rSrSrSr\rS\R                  \R                  \   \4   4S jrS\S\4S jrSrg	)
ZshCompleteie  zShell completion for Zsh.zshr   c                     [        [        R                  S   5      n[        [        R                  S   5      nUSU n X   nX44$ ! [         a    Sn X44$ f = fr   r   r   s        r   r\   ZshComplete.get_completion_argsk  r   r   rg   c                 |    UR                    SUR                   SUR                  (       a  UR                   3$ S 3$ )Nrm   r   )r%   r$   r&   ri   s     r   rj   ZshComplete.format_completionw  s7    ))Btzzl"$))TYY,MNN,MNNr   r?   N)r4   r5   r6   r7   r8   r.   _SOURCE_ZSHrC   r:   rw   rx   r<   r\   r!   rj   r>   r?   r   r   r   r   e  sG    #D!O
 QWWQVVC[#-=%> 
 On O Or   r   c                   x    \ rS rSrSrSr\rS\R                  \R                  \   \4   4S jrS\S\4S jrSrg	)
FishCompletei{  zShell completion for Fish.fishr   c                     [        [        R                  S   5      n[        R                  S   nUSS  nU(       a   U(       a  US   U:X  a  UR                  5         X24$ )Nr   r   r   )r   r   r   pop)r+   r   r_   r^   s       r   r\    FishComplete.get_completion_args  sR    !"**\":;ZZ-
abz $48z#9HHJr   rg   c                     UR                   (       a(  UR                   SUR                   SUR                    3$ UR                   SUR                   3$ )Nr   	)r&   r%   r$   ri   s     r   rj   FishComplete.format_completion  sE    99ii[$**R		{;;))Adjj\**r   r?   N)r4   r5   r6   r7   r8   r.   _SOURCE_FISHrC   r:   rw   rx   r<   r\   r!   rj   r>   r?   r   r   r   r   {  sD    $D"O
 QWWQVVC[#-=%> 
 +n + +r   r   ShellCompleteType)bound)r{   r   r   _available_shellsclsr.   c                 6    Uc  U R                   nU [        U'   U $ )aQ  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.
)r.   r   )r   r.   s     r   add_completion_classr     s"     |xx!dJr   r   c                 ,    [         R                  U 5      $ )zLook 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   r0   )r   s    r   r   r     s       ''r   rc   paramc                    [        U[        5      (       d  gUR                  c   eU R                  R	                  UR                  5      nUR
                  S:H  =(       d}    U R                  UR                  5      [        R                  L=(       dK    UR
                  S:  =(       a5    [        U[        [        45      =(       a    [        U5      UR
                  :  $ )zDetermine 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   r.   paramsr0   nargsget_parameter_sourcer   COMMANDLINEtuplelistlen)rc   r   r$   s      r   _is_incomplete_argumentr     s     eX&&::!!!JJNN5::&Er 	
##EJJ/7R7RR	
 KK!O )55$-0)E
U[[(r   r$   c                 8    U(       d  gUS   nX R                   ;   $ )z5Check if the value looks like the start of an option.Fr   )_opt_prefixes)rc   r$   cs      r   _start_of_optionr     s     aA!!!!r   r^   c                 6   [        U[        5      (       d  gUR                  (       d  UR                  (       a  gSn[	        [        U5      5       H.  u  pEUS-   UR                  :  a    O[        X5      (       d  M,  UnM0     USL=(       a    X2R                  ;   $ )zDetermine 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)rc   r^   r   last_optionindexargs         r   _is_incomplete_optionr     sz     eV$$}}K/
19u{{"C%%K 0 d"@{jj'@@r   c           	      f   SUS'   U R                   " X#R                  5       40 UD6nUR                  UR                  -   nU(       a  UR                  n[        U[        5      (       a  UR                  (       dD  UR                  XC5      u  pgnUc  U$ UR                  XcUSS9nUR                  UR                  -   nOkUnU(       aB  UR                  XC5      u  pgnUc  U$ UR                  UUUSSSS9nUR                  nU(       a  MB  Un/ UR                  QUR                  QnO U$ U(       a  M  U$ )aH  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_parsing)parentr   F)r   allow_extra_argsallow_interspersed_argsr   )	make_contextcopyprotected_argsr^   commandr   r   chainresolve_command)	r   r   r   r^   rc   r   r.   cmdsub_ctxs	            r   ra   ra     s?    %)H !


9iik
>X
>C(D
++g|,,==")"9"9#"D4;J&&t#QU&V))CHH4&-&=&=c&HODt{"
!..")-05*. / G #<<D d  ?//?',,?JI $H Jr   r_   c                    US:X  a  SnO;SU;   a5  [        X5      (       a%  UR                  S5      u  p4nUR                  U5        SU;  a  [        X5      (       a  U R                  U4$ U R                  R	                  U 5      nU H  n[        XU5      (       d  M  Xb4s  $    U H  n[        X5      (       d  M  Xb4s  $    U R                  U4$ )aP  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.
=rG   z--)r   r   appendr   
get_paramsr   r   )rc   r^   r_   r.   r   r   r   s          r   rb   rb   /  s     S
	
	/@@(2237D 4,S=={{J&&[[##C(F  E22$$  "3..$$  ;;
""r   r*   )1r   rK   typingr:   r   r   corer   r   r   r   r	   r
   r   parserr   utilsr   rt   r<   r;   r   r   r!   r   r   r   rA   rz   r   r   TypeVarTyper   r   rv   rs   r=   r   r   boolr   r   rx   r   ra   rw   Unionrb   r?   r   r   <module>r      sk   	 	          ! $ #	#sAEEz*# # 	#
 # 	#L"$ "$L@*X.g gT8+= 8+vO- O,+= +2 II19NO  9 166#qvvm445  59	"#**S/(( (

166-3H(I (  t 2"' "# "$ "Aw AaffSk A) APT A06	6sAEEz*6 6 &&+	6
 6r,#	,#s,#14,#WWQWW[)+,c12,#r   