+
    wiH                       a  R. t'0 t ^ RIt^ RIt^ RIt^ RIHt ^RIHt ^RIH	t	 ^RIH
t
 ^RIHt ^RIHt ^RIHt ^R	IHt ^R
IHt ^RIHt R R lt ! R R4      tRtRtRt ! R R4      t ! R R]4      t ! R R]4      t ! R R]4      t]P8                  ! R]P:                  ],          R7      tR]R]R]/t] ^ k R/R  R! llt R" R# lt!R$ R% lt"R& R' lt#R( R) lt$R* R+ lt%R, R- lt&R# )0    N)gettext)Argument)BaseCommand)Context)MultiCommand)Option)	Parameter)ParameterSource)split_arg_string)echoc                    V ^8  d   QhR\         R\        P                  \        \        P                  3,          R\        R\        R\        R\
        /# )   clictx_args	prog_namecomplete_varinstructionreturn)r   tMutableMappingstrAnyint)formats   "e/Users/ahmad/.openclaw/workspace/scripts/.venv/lib/python3.14/site-packages/click/shell_completion.py__annotate__r      sW     # #	#sAEEz*# # 	#
 # 	#    c                    VP                  R4      w  rVp\        V4      pVf   ^# V! WW#4      pVR8X  d   \        VP                  4       4       ^ # VR8X  d   \        VP	                  4       4       ^ # ^# )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.
_sourcecomplete)	partitionget_completion_classr   r    r!   )	r   r   r   r   r   shellr   comp_clscomps	   &&&&&    r   shell_completer'      sm    & (11#6Ek#E*HC9;DhT[[]j T]]_r   c                   P   a  ] tR t^7t o RtRtR	V 3R lR lltV 3R lR ltRtV t	R# )
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.
Nc          
         < V ^8  d   QhRS[ P                  RS[RS[ P                  S[,          RS[ P                  RR/# )r   valuetypehelpkwargsr   N)r   r   r   Optional)r   __classdict__s   "r   r   CompletionItem.__annotate__L   sM     
 
uu
 
 jjo	

 %%
 

r   c                6    Wn         W n        W0n        W@n        R # Nr+   r,   r-   _info)selfr+   r,   r-   r.   s   &&&&,r   __init__CompletionItem.__init__L   s     "
	%)	
r   c                :   < V ^8  d   QhRS[ RS[P                  /# )r   namer   )r   r   r   )r   r0   s   "r   r   r1   X   s     $ $ $ $r   c                8    V P                   P                  V4      # r3   )r5   get)r6   r:   s   &&r   __getattr__CompletionItem.__getattr__X   s    zz~~d##r   )r5   r-   r,   r+   r4   )plainN)
__name__
__module____qualname____firstlineno____doc__	__slots__r7   r=   __static_attributes____classdictcell__r0   s   @r   r)   r)   7   s%     $ 3I
 
$ $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                      a  ] tR t^t o Rt  V 3R lR lt]V 3R lR l4       tV 3R lR ltV 3R lR	 lt	V 3R
 lR lt
V 3R lR ltV 3R lR ltV 3R lR ltV 3R ltRtV tR# )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
c          
      t   < V ^8  d   QhRS[ RS[P                  S[S[P                  3,          RS[RS[RR/# )r   r   r   r   r   r   N)r   r   r   r   r   )r   r0   s   "r   r   ShellComplete.__annotate__   sP     
) 
)
) ""3:.
) 	
)
 
) 

)r   c                6    Wn         W n        W0n        W@n        R # r3   )r   r   r   r   )r6   r   r   r   r   s   &&&&&r   r7   ShellComplete.__init__   s      "(r   c                    < V ^8  d   QhRS[ /# r   r   r   )r   r0   s   "r   r   rL      s     * *3 *r   c                    \         P                  ! RRV P                  P                  RR4      \         P                  R7      pRV R2# )zAThe name of the shell function defined by the completion
script.
z\W* -r   )flags_completion)resubr   replaceASCII)r6   	safe_names   & r   	func_nameShellComplete.func_name   s<    
 FF62t~~'='=c3'GrxxX	9+[))r   c                ^   < V ^8  d   QhRS[ P                  S[S[ P                  3,          /# rP   )r   Dictr   r   )r   r0   s   "r   r   rL      s%     

 

QVVCJ/ 

r   c                N    RV P                   RV P                  RV P                  /# )zVars for formatting :attr:`source_template`.

By default this provides ``complete_func``, ``complete_var``,
and ``prog_name``.
complete_funcr   r   )r\   r   r   r6   s   &r   source_varsShellComplete.source_vars   s+     T^^D--
 	
r   c                    < V ^8  d   QhRS[ /# rP   rQ   )r   r0   s   "r   r   rL      s     9 9 9r   c                D    V P                   V P                  4       ,          # )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`.
)source_templaterc   rb   s   &r   r    ShellComplete.source   s     ##d&6&6&888r   c                n   < V ^8  d   QhRS[ P                  S[ P                  S[,          S[3,          /# rP   r   TupleListr   )r   r0   s   "r   r   rL      s*     " "QWWQVVC[#-=%> "r   c                    \         h)zUse the env vars defined by the shell script to return a
tuple of ``args, incomplete``. This must be implemented by
subclasses.
NotImplementedErrorrb   s   &r   get_completion_args!ShellComplete.get_completion_args   s
    
 "!r   c                t   < V ^8  d   QhRS[ P                  S[,          RS[RS[ P                  S[,          /# )r   args
incompleter   )r   rl   r   r)   )r   r0   s   "r   r   rL     s6     3 3FF3K3-03	
	3r   c                    \        V P                  V P                  V P                  V4      p\	        W1V4      w  rBVP                  W24      # )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'   )r6   rs   rt   ctxobjs   &&&  r   get_completionsShellComplete.get_completions  s?     txxM-cD!!#22r   c                &   < V ^8  d   QhRS[ RS[/# r   itemr   r)   r   )r   r0   s   "r   r   rL     s     " "n " "r   c                    \         h)zFormat a completion item into the form recognized by the
shell script. This must be implemented by subclasses.

:param item: Completion item to format.
rn   r6   r~   s   &&r   format_completionShellComplete.format_completion  s
     "!r   c                    < V ^8  d   QhRS[ /# rP   rQ   )r   r0   s   "r   r   rL     s     
 
# 
r   c                    V P                  4       w  rV P                  W4      pV Uu. uF  q@P                  V4      NK  	  ppRP                  V4      # u upi )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.

)rp   rz   r   join)r6   rs   rt   completionsr~   outs   &     r   r!   ShellComplete.complete  sV      335**4<8CD%%d+Dyy~ Es   Ac                z   < V ^8  d   Qh/ S[ P                  S[,          ;R&   S[ P                  S[,          ;R&   # )r   r:   rg   )r   ClassVarr   )r   r0   s   "r   r   rL      s/      **S/ & ZZ_$' r   )r   r   r   r   N)r@   rA   rB   rC   rD   r7   propertyr\   rc   r    rp   rz   r   r!   __annotate_func__rF   rG   rH   s   @r   rJ   rJ      sv     

) 
) * *

 

9 9" "3 3" "
 
{  r   rJ   c                      a a ] tR tRt oRtRt]t]V3R lR l4       t	V3R lV 3R llt
V3R lR	 ltV3R
 lR ltRtVtV ;t# )BashCompletei*  zShell completion for Bash.bashc                   < V ^8  d   QhRR/# )r   r   N )r   r0   s   "r   r   BashComplete.__annotate__1  s      D r   c                    ^ RI p ^ RIpV P                  R4      pVf   RpMPVP                  VRRR.VP                  R7      p\
        P                  ! RVP                  P                  4       4      pVeD   VP                  4       w  rVVR8  g   VR8X  d"   VR8  d   \        \        R	4      R
R7       R# R# R# \        \        R4      R
R7       R# )r   Nr   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PIPErW   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                    < V ^8  d   QhRS[ /# rP   rQ   )r   r0   s   "r   r   r   Q  s          r   c                @   < V P                  4        \        SV `	  4       # r3   )r   superr    )r6   	__class__s   &r   r    BashComplete.sourceQ  s    w~r   c                n   < V ^8  d   QhRS[ P                  S[ P                  S[,          S[3,          /# rP   rj   )r   r0   s   "r   r   r   U  *     
  
 QWWQVVC[#-=%> 
 r   c                    \        \        P                  R ,          4      p\        \        P                  R,          4      pV^V p W,          pW43#   \         d    Rp Y43# i ; i
COMP_WORDS
COMP_CWORDrS   r   osenvironr   
IndexErrorr6   cwordscwordrs   rt   s   &    r   rp    BashComplete.get_completion_argsU  i    !"**\":;BJJ|,-a	J   	J	   A A$#A$c                &   < V ^8  d   QhRS[ RS[/# r}   r   )r   r0   s   "r   r   r   a  s     + +n + +r   c                8    VP                    R VP                   2# ),)r,   r+   r   s   &&r   r   BashComplete.format_completiona  s    ))Adjj\**r   r   )r@   rA   rB   rC   rD   r:   _SOURCE_BASHrg   staticmethodr   r    rp   r   rF   rG   __classcell__)r   r0   s   @@r   r   r   *  sH     $D"O @   
  
 + + +r   r   c                   P   a  ] tR tRt o RtRt]tV 3R lR ltV 3R lR lt	Rt
V tR	# )
ZshCompleteie  zShell completion for Zsh.zshc                n   < V ^8  d   QhRS[ P                  S[ P                  S[,          S[3,          /# rP   rj   )r   r0   s   "r   r   ZshComplete.__annotate__k  r   r   c                    \        \        P                  R ,          4      p\        \        P                  R,          4      pV^V p W,          pW43#   \         d    Rp Y43# i ; ir   r   r   s   &    r   rp   ZshComplete.get_completion_argsk  r   r   c                &   < V ^8  d   QhRS[ RS[/# r}   r   )r   r0   s   "r   r   r   w  s     O On O Or   c                ~    VP                    R VP                   R VP                  '       d   VP                   2# R 2# )r   r   )r,   r+   r-   r   s   &&r   r   ZshComplete.format_completionw  s9    ))Btzzl"$)))TYY,MNN,MNNr   r   N)r@   rA   rB   rC   rD   r:   _SOURCE_ZSHrg   rp   r   rF   rG   rH   s   @r   r   r   e  s(     #D!O
  
 O Or   r   c                   P   a  ] tR tRt o RtRt]tV 3R lR ltV 3R lR lt	Rt
V tR	# )
FishCompletei{  zShell completion for Fish.fishc                n   < V ^8  d   QhRS[ P                  S[ P                  S[,          S[3,          /# rP   rj   )r   r0   s   "r   r   FishComplete.__annotate__  r   r   c                    \        \        P                  R ,          4      p\        P                  R,          pVR,          pV'       d'   V'       d   VR,          V8X  d   VP                  4        W23# )r   r   :   NN)r   r   r   pop)r6   r   rt   rs   s   &   r   rp    FishComplete.get_completion_args  sP    !"**\":;ZZ-
bz $48z#9HHJr   c                &   < V ^8  d   QhRS[ RS[/# r}   r   )r   r0   s   "r   r   r     s     + +n + +r   c                    VP                   '       d)   VP                   R VP                   RVP                    2# VP                   R VP                   2# )r   	)r-   r,   r+   r   s   &&r   r   FishComplete.format_completion  sG    999ii[$**R		{;;))Adjj\**r   r   N)r@   rA   rB   rC   rD   r:   _SOURCE_FISHrg   rp   r   rF   rG   rH   s   @r   r   r   {  s&     $D"O
  
 + +r   r   ShellCompleteType)boundr   r   r   c                f    V ^8  d   QhR\         R\        P                  \        ,          R\         /# )r   clsr:   r   )r   r   r/   r   )r   s   "r   r   r     s,      	"#**S/r   c                8    Vf   V P                   pV \        V&   V # )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:   _available_shells)r   r:   s   &&r   add_completion_classr     s"     |xx!dJr   c                    V ^8  d   QhR\         R\        P                  \        P                  \        ,          ,          /# )r   r$   r   )r   r   r/   TyperJ   )r   s   "r   r   r     s,     ( ( (

166-3H(I (r   c                ,    \         P                  V 4      # )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   r<   )r$   s   &r   r#   r#     s       ''r   c                <    V ^8  d   QhR\         R\        R\        /# )r   rx   paramr   )r   r	   bool)r   s   "r   r   r     s!        t r   c                   \        V\        4      '       g   R# VP                  f   Q hV P                  P	                  VP                  4      pVP
                  R8H  ;'       g    V P                  VP                  4      \        P                  J;'       gN    VP
                  ^8  ;'       d7    \        V\        \        34      ;'       d    \        V4      VP
                  8  # )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   )
isinstancer   r:   paramsr<   nargsget_parameter_sourcer
   COMMANDLINEtuplelistlen)rx   r   r+   s   && r   _is_incomplete_argumentr     s     eX&&::!!!JJNN5::&Er 	
 	
##EJJ/7R7RR	
 	
 KK!O ) )55$-0) )E
U[[(r   c                <    V ^8  d   QhR\         R\        R\        /# )r   rx   r+   r   )r   r   r   )r   s   "r   r   r     s!     " "' "# "$ "r   c                D    V'       g   R# V^ ,          pW P                   9   # )z5Check if the value looks like the start of an option.F)_opt_prefixes)rx   r+   cs   && r   _start_of_optionr     s     aA!!!!r   c                r    V ^8  d   QhR\         R\        P                  \        ,          R\        R\
        /# )r   rx   rs   r   r   )r   r   rl   r   r	   r   )r   s   "r   r   r     s7     A Aw AaffSk A) APT Ar   c                N   \        V\        4      '       g   R# VP                  '       g   VP                  '       d   R# Rp\	        \        V4      4       F4  w  rEV^,           VP                  8  d    M\        W4      '       g   K2  TpK6  	  VRJ;'       d    W2P                  9   # )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.
FN)	r   r   is_flagcount	enumeratereversedr   r   opts)rx   rs   r   last_optionindexargs   &&&   r   _is_incomplete_optionr    s     eV$$}}}K/
19u{{"C%%K 0 d"@@{jj'@@r   c          
          V ^8  d   QhR\         R\        P                  \        \        P                  3,          R\        R\        P
                  \        ,          R\        /# )r   r   r   r   rs   r   )r   r   r   r   r   rl   r   )r   s   "r   r   r     sU     6 6	6sAEEz*6 6 &&+	6
 6r   c           	     r   RVR&   V P                   ! W#P                  4       3/ VB pVP                  VP                  ,           pV'       d   VP                  p\        V\        4      '       d   VP                  '       gN   VP                  WC4      w  rgpVf   V# VP                  WcVRR7      pVP                  VP                  ,           pK  TpV'       d@   VP                  WC4      w  rgpVf   V# VP                  VVVRRRR7      pVP                  pKG  Tp. VP                  OVP                  OpK   V# V# )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_argsrs   commandr   r   chainresolve_command)	r   r   r   rs   rx   r  r:   cmdsub_ctxs	   &&&&     r   rv   rv     s,    %)H !


9iik
>X
>C(D
++g|,,===")"9"9#"D4;J&&t#QU&V))CHH4&-&=&=c&HODt{"
!..")-05*. / G #<<D?//?',,?J3Jr   c                    V ^8  d   QhR\         R\        P                  \        ,          R\        R\        P                  \        P
                  \        \        3,          \        3,          /# )r   rx   rs   rt   r   )r   r   rl   r   rk   Unionr   r	   )r   s   "r   r   r   /  sP     ,# ,#	,#s,#14,#WWQWW[)+,c12,#r   c                   VR8X  d   RpM=RV9   d7   \        W4      '       d&   VP                  R4      w  r4pVP                  V4       RV9  d    \        W4      '       d   V P                  V3# V P                  P	                  V 4      pV F  p\        WV4      '       g   K  Wb3u # 	  V F  p\        W4      '       g   K  Wb3u # 	  V P                  V3# )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.
=rS   z--)r   r"   appendr  
get_paramsr  r   )rx   rs   rt   r:   r   r   r   s   &&&    r   rw   rw   /  s     S
	
	/@@(2237D 4,S=={{J&&[[##C(F  E22$$  "3..$$  ;;
""r   c                    V ^8  d   Qh/ ^ \         9   d:   \        P                  \        \        P                  \
        ,          3,          ;R&   # )r   r   )__conditional_annotations__r   r_   r   r   rJ   )r   s   "r   r   r      s5    		l 166#qvvm445 m 
r   r3   )(r  r   rW   typingr   r   r   corer   r   r   r   r   r	   r
   parserr   utilsr   r'   r)   r   r   r   rJ   r   r   r   TypeVarr   r   r   r   r#   r   r   r  rv   rw   r   )r  s   @r   <module>r      s    		 	          ! $ #L"$ "$L@*X.g gT8+= 8+vO- O,+= +2 II19NO  L
L	;9  ((2"A06r,#r   