+
    DiR                      a  0 t $ ^ RIHt ^ RIH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 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]	P>                  ! RRR7      t R]R]R ]/t!R!]"R"&   R3R# 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/ R0 lt)R1 R2 lt*R# )4    )annotationsN)gettext)Argument)Command)Context)Group)Option)	Parameter)ParameterSource)echoc               0    V ^8  d   QhRRRRRRRRRRR	R
/# )   clir   ctx_argscabc.MutableMapping[str, t.Any]	prog_namestrcomplete_varinstructionreturnint )formats   "t/Users/tonyclaw/.openclaw/workspace/services/omi-webhook/venv/lib/python3.14/site-packages/click/shell_completion.py__annotate__r      sD     # #	#-# # 	#
 # 	#    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                  :    ] tR t^9tRtRtR	R R lltR R ltR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RRRRRRRRR	/# )
r   valuet.Anytyper   help
str | Nonekwargsr   Noner   )r   s   "r   r   CompletionItem.__annotate__N   s<     
 

 
 	

 
 

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__N   s     "
	 $	
r   c                    V ^8  d   QhRRRR/# )r   namer   r   r+   r   )r   s   "r   r   r1   Z   s     $ $ $ $r   c                	8    V P                   P                  V4      # r3   )r5   get)r6   r:   s   &&r   __getattr__CompletionItem.__getattr__Z   s    zz~~d##r   )r5   r-   r,   r*   r4   )plainN)	__name__
__module____qualname____firstlineno____doc__	__slots__r7   r=   __static_attributes__r   r   r   r(   r(   9   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                      ] tR t^t$ RtR]R&    R]R&    R R lt]R R l4       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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
zt.ClassVar[str]r:   source_templatec          
     ,    V ^8  d   QhRRRRRRRRRR	/# )
r   r   r   r   r   r   r   r   r   r0   r   )r   s   "r   r   ShellComplete.__annotate__   s<     
) 
)
) 2
) 	
)
 
) 

)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R/# r   r   r   r   )r   s   "r   r   rK      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R/# )r   r   zdict[str, t.Any]r   )r   s   "r   r   rK      s     

 

- 

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   )rZ   r   r   r6   s   &r   source_varsShellComplete.source_vars   s+     T^^D--
 	
r   c                   V ^8  d   QhRR/# rO   r   )r   s   "r   r   rK      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`.
)rI   r`   r_   s   &r   r   ShellComplete.source   s     ##d&6&6&888r   c                   V ^8  d   QhRR/# r   r   ztuple[list[str], str]r   )r   s   "r   r   rK     s     " "%: "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.
NotImplementedErrorr_   s   &r   get_completion_args!ShellComplete.get_completion_args  s
    
 "!r   c               $    V ^8  d   QhRRRRRR/# )r   args	list[str]
incompleter   r   zlist[CompletionItem]r   )r   s   "r   r   rK     s"     
3 
3I 
33 
3CW 
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   rm   ro   ctxobjs   &&&  r   get_completionsShellComplete.get_completions  s?     txxM-cD!!#22r   c                    V ^8  d   QhRRRR/# r   itemr(   r   r   r   )r   s   "r   r   rK     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.
rh   r6   ry   s   &&r   format_completionShellComplete.format_completion  s
     "!r   c                   V ^8  d   QhRR/# rO   r   )r   s   "r   r   rK   #  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.

)rj   ru   r|   join)r6   rm   ro   completionsry   outs   &     r   r    ShellComplete.complete#  sV      335**4<8CD%%d+Dyy~ Es   A)r   r   r   r   N)r@   rA   rB   rC   rD   __annotations__r7   propertyrZ   r`   r   rj   ru   r|   r    rF   r   r   r   rH   rH      s]    
 
 %$
) * *

9"
3"
 
r   rH   c                  h   a  ] tR tRtRtRt]t]R R l4       t	R V 3R llt
R R	 ltR
 R ltRtV ;t# )BashCompletei0  zShell completion for Bash.bashc                   V ^8  d   QhRR/# )r   r   r0   r   )r   s   "r   r   BashComplete.__annotate__7  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PIPErU   searchr   decodegroupsr   r   )r   r   bash_exematchoutputmajorminors          r   _check_versionBashComplete._check_version6  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R/# rO   r   )r   s   "r   r   r   W  s          r   c                	@   < V P                  4        \        SV `	  4       # r3   )r   superr   )r6   	__class__s   &r   r   BashComplete.sourceW  s    w~r   c                   V ^8  d   QhRR/# rf   r   )r   s   "r   r   r   [       
  
 %: 
 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_CWORDrQ   split_arg_stringosenvironr   
IndexErrorr6   cwordscwordrm   ro   s   &    r   rj    BashComplete.get_completion_args[  i    !"**\":;BJJ|,-a	J   	J	   A A$#A$c                    V ^8  d   QhRRRR/# rx   r   )r   s   "r   r   r   g  s     + +n + +r   c                	8    VP                    R VP                   2# ),)r,   r*   r{   s   &&r   r|   BashComplete.format_completiong  s    ))Adjj\**r   r   )r@   rA   rB   rC   rD   r:   _SOURCE_BASHrI   staticmethodr   r   rj   r|   rF   __classcell__)r   s   @r   r   r   0  s<    $D"O @   
 + +r   r   c                  :    ] tR tRtRtRt]tR R ltR R lt	Rt
R	# )
ZshCompleteik  zShell completion for Zsh.zshc                   V ^8  d   QhRR/# rf   r   )r   s   "r   r   ZshComplete.__annotate__q  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   rj   ZshComplete.get_completion_argsq  r   r   c                    V ^8  d   QhRRRR/# rx   r   )r   s   "r   r   r   }  s     0 0n 0 0r   c                	    VP                   ;'       g    R pVR 8w  d   VP                  P                  RR4      MVP                  pVP                   RV RV 2# )r   :z\:r   )r-   r*   rW   r,   )r6   ry   help_r*   s   &&  r   r|   ZshComplete.format_completion}  sR    		  S 383,

""3.DJJ))BugRw//r   r   N)r@   rA   rB   rC   rD   r:   _SOURCE_ZSHrI   rj   r|   rF   r   r   r   r   r   k  s    #D!O
 0 0r   r   c                  :    ] tR tRtRtRt]tR R ltR R lt	Rt
R	# )
FishCompletei  zShell completion for Fish.fishc                   V ^8  d   QhRR/# rf   r   )r   s   "r   r   FishComplete.__annotate__  s        %:  r   c                	   \        \        P                  R ,          4      p\        P                  R,          pV'       d   \        V4      ^ ,          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   ro   rm   s   &   r   rj    FishComplete.get_completion_args  sb    !"**\":;ZZ-
)*5a8Jbz $48z#9HHJr   c                    V ^8  d   QhRRRR/# rx   r   )r   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_FISHrI   rj   r|   rF   r   r   r   r   r     s    $D"O + +r   r   ShellCompleteTypeztype[ShellComplete])boundr   r   r   zdict[str, type[ShellComplete]]_available_shellsc               $    V ^8  d   QhRRRRRR/# )r   clsr   r:   r.   r   r   )r   s   "r   r   r     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:   r   )r   r:   s   &&r   add_completion_classr     s"     |xx!dJr   c                    V ^8  d   QhRRRR/# )r   r#   r   r   ztype[ShellComplete] | Noner   )r   s   "r   r   r     s     ( ( ((B (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/# )r   stringr   r   rn   r   )r   s   "r   r   r     s     " "S "Y "r   c                    ^ RI pVP                  V RR7      pRVn        RVn        . p V F  pVP                  V4       K  	  V#   \         d     TP                  TP
                  4        T# i ; i)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``.
NT)posixrQ   )shlexwhitespace_split
commentersappend
ValueErrortoken)r   r   lexr   r   s   &    r   r   r     sw    $ 
++fD+
)CCCN
CEJJu  J   	

399Js   A &A/.A/c               $    V ^8  d   QhRRRRRR/# )r   rs   r   paramr
   r   boolr   )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)rs   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RR/# )r   rs   r   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)rs   r*   cs   && r   _start_of_optionr     s     aA!!!!r   c               (    V ^8  d   QhRRRRRRRR/# )	r   rs   r   rm   rn   r   r
   r   r   r   )r   s   "r   r   r     s.     A Aw Ai A	 Ad 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 M	  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)rs   rm   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RRRRRRR	R
/# )r   r   r   r   r   r   r   rm   rn   r   r   r   )r   s   "r   r   r   2  s:     : :	:-: : 	:
 :r   c                   RVR&   V P                   ! W#P                  4       3/ VB ;_uu_ 4       pVP                  VP                  ,           pV'       Ed&   VP                  p\        V\        4      '       Ed   VP                  '       gk   VP                  WC4      w  rgpVf   VuuRRR4       # VP                  WcVRR7      ;_uu_ 4       pTpVP                  VP                  ,           pRRR4       K  TpV'       d]   VP                  WC4      w  rgpVf   VuuRRR4       # VP                  VVVRRRR7      ;_uu_ 4       p	T	pVP                  pRRR4       Kd  Tp. VP                  OVP                  OpEK-   RRR4       V#   + '       g   i     EKJ  ; i  + '       g   i     K  ; i  + '       g   i     X# ; i)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_parsingN)parentr  F)r  allow_extra_argsallow_interspersed_argsr  )	make_contextcopy_protected_argsrm   commandr   r   chainresolve_command)
r   r   r   rm   rs   r  r:   cmdsub_ctxsub_sub_ctxs
   &&&&      r   rq   rq   2  s    %)H !			)YY[	=H	=	=""SXX-dkkG'5))}}}&-&=&=c&HODt{" 
>	= ))3$ *   %"22SXX=	  "G*1*A*A#*L4;#&3 
>	=6 !--  #&-149.2 .   )&1G#*<<D  "CDW44Dw||DDS 
>V J=    7 
>	=V JsY   &F.4F.F./F. F	+F.?F.#F.F	*F.F
F.F+%	F..F?	c               (    V ^8  d   QhRRRRRRRR/# )	r   rs   r   rm   rn   ro   r   r   ztuple[Command | Parameter, str]r   )r   s   "r   r   r   o  s,     ,# ,#	,#!,#/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.
=rQ   z--)r   r!   r   r  
get_paramsr  r   )rs   rm   ro   r:   r   r   r   s   &&&    r   rr   rr   o  s     S
	
	/@@(2237D 4,S=={{J&&[[##C(F  E22$$  "3..$$  ;;
""r   r3   )+__conditional_annotations__
__future__r   collections.abcabccabcr   rU   typingtr   r   corer   r   r   r   r	   r
   r   utilsr   r&   r(   r   r   r   rH   r   r   r   TypeVarr   r   r   r   r"   r   r   r   r  rq   rr   )r  s   @r   <module>r&     s    " "  	 	          ! #L"$ "$LL*X.e eP8+= 8+v!0- !0H+= +6 II19NO  L
L	;5 1 (("J2"A2:z,#r   