+
    Q(if                     <   ^ RI t ^ RIt^ RIHtHt ^ RIHt ^ RIHt ^ RI	H
t
 ^ RIHt ^ RIHtHt ^ RIHtHt ^ R	IHtHt ^ R
IHt ^ RIHt ]'       d   ^ RIHt ]! RR7       ! R R]4      4       t ! R R4      t] ! R R]4      4       t] ! R R]4      4       tR# )    N)ABCabstractmethod)Iterable)suppress)chain)Path)TYPE_CHECKINGAny)definefield)ArgumentCollectionupdate_argument_collection)CycloptsError)to_tuple_converter)AppT)kw_onlyc                      a  ] tR t^t o Rt]! R]R7      t]! RR7      t]! RR7      t	]! RRR7      t
]]V 3R	 lR
 l4       4       t]]V 3R lR l4       4       tV 3R lR ltV 3R ltRtV tR# )
ConfigBasezBase class for configuration sources.

Handles the common logic of processing configuration dictionaries
and updating ArgumentCollections.
)default	converterF)r   TNsource)r   aliasc                6   < V ^8  d   QhRS[ S[S[3,          /#    returndictstrr
   )format__classdict__s   "]/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/cyclopts/config/_common.py__annotate__ConfigBase.__annotate__#   s     " "S#X "    c                    \         h)z$Return the configuration dictionary.NotImplementedErrorselfs   &r"   configConfigBase.config!   
     "!r%   c                    < V ^8  d   QhRS[ /# r   r   )r    r!   s   "r"   r#   r$   )   s     " " "r%   c                    \         hHReturn a string identifying the configuration source for error messages.r'   r)   s   &r"   r   ConfigBase.source'   r-   r%   c                >   < V ^8  d   QhRRRS[ S[R3,          RS[/# )r   appr   commands.	arguments)tupler   r   )r    r!   s   "r"   r#   r$   -   s1     
 

 S/
 &	
r%   c           	     @   V P                   P                  4       p \        V P                  V P                  '       d   TMR4       F  pWE,          pK  	  T P                  '       d   TpM'\        R TP                  P                   4       T4      pTP                  4        UUu/ uF  w  rxYv9  g   K  YxbK  	  ppp\        TT P                  TTP                  P                  R,          T P                  T P                  R7       R #   \
         d     R # i ; iu uppi )Nc              3   L   "   T F  qP                   '       d   K  Vx  K  	  R # 5iN)_meta_parent).0as   & r"   	<genexpr>&ConfigBase.__call__.<locals>.<genexpr>>   s     \*EQ^^qq*Es   $
$)	root_keysallow_unknown )r+   copyr   rA   use_commands_as_keysKeyErrornext	app_stackcurrent_frameitemsr   r   stackrB   )	r*   r5   r6   r7   r+   key
filter_appkvs	   &&&&     r"   __call__ConfigBase.__call__-   s     "&!1!1!3	T^^9R9R9RXXZ[ \ $$$J\#--*E*E\^abJ#)<<>I>41Q5H$!$>I"KKMM#nn,,	
  		 Js   9D $
D3DDDc                h   < V ^8  d   Qh/ S[ S[,          ;R&   S[;R&   S[;R&   S[R,          ;R&   # )r   rA   rB   rF   N_source)r   r   bool)r    r!   s   "r"   r#   r$      sA      }N  .  4  4Z= r%   rC   )__name__
__module____qualname____firstlineno____doc__r   r   rA   rB   rF   rT   propertyr   r+   r   rQ   __annotate_func____static_attributes____classdictcell__r!   s   @r"   r   r      s       %R;MNI.M!&t!4H=G"  " "  "
 
3  r%   r   c                   <   a  ] tR t^Kt o RtV 3R lR ltR tRtV tR# )FileCacheKeyzAbstraction to quickly check if a file needs to be read again.

If a newly instantiated ``CacheKey`` doesn't equal a previously instantiated ``CacheKey``,
then the file needs to be re-read.
c                0   < V ^8  d   QhRS[ S[,          /# )r   path)r   r   )r    r!   s   "r"   r#   FileCacheKey.__annotate__R   s      S4Z r%   c                   \        V4      P                  4       V n        V P                  P                  4       '       d?   V P                  P	                  4       pVP
                  V n        VP                  V n        R # R V n        R V n        R # r;   )	r   absoluterc   existsstatst_mtime_mtimest_size_size)r*   rc   rh   s   && r"   __init__FileCacheKey.__init__R   s]    J'')	9999>>#D--DKDJDKDJr%   c                    \        V\        V 4      4      '       g   R # V P                  VP                  8H  ;'       d;    V P                  VP                  8H  ;'       d    V P                  VP                  8H  # )F)
isinstancetyperj   rl   rc   )r*   others   &&r"   __eq__FileCacheKey.__eq__\   sV    %d,,{{ell*ddtzzU[[/HddTYYZ_ZdZdMddr%   )rj   rl   rc   N)	rV   rW   rX   rY   rZ   rm   rs   r]   r^   r_   s   @r"   ra   ra   K   s       e er%   ra   c                     a  ] tR t^ct o Rt]! ]R7      t]! RRR7      t]! RRR7      t	]! RRRR7      t
 ]! RRRR7      t ]V 3R lR	 l4       t]V 3R
 lR l4       t]V 3R lR l4       t]P"                  V 3R lR l4       tV 3R ltRtV tR# )ConfigFromFilezdConfiguration source that loads from a file.

Supports file caching and parent directory searching.
)r   FT)r   r   N)r   initreprc                <   < V ^8  d   QhRS[ RS[S[S[3,          /# )r   rc   r   )r   r   r   r
   )r    r!   s   "r"   r#   ConfigFromFile.__annotate__u   s#     " " "$sCx. "r%   c                    \         h)zLoad the config dictionary from path.

Do **not** do any downstream caching; ``ConfigFromFile`` handles caching.

Parameters
----------
path: Path
    Path to the file. Guaranteed to exist.

Returns
-------
dict
    Loaded configuration.
r'   )r*   rc   s   &&r"   _load_configConfigFromFile._load_configt   s
      "!r%   c                6   < V ^8  d   QhRS[ S[S[3,          /# r   r   )r    r!   s   "r"   r#   rz      s     " "S#X "r%   c           	        \        V P                  \        4      '       g   Q hV P                  P                  4       P	                  4       P                  4       P                   EF
  pWP                  P                  ,          pVP                  4       '       d`   \        V4      pV P                  V8X  d   V P                  ;'       g    / u #  V P                  V4      V n        W0n
        T P                  u # V P(                  '       d   K  V P*                  '       g   K  \-        \.        P0                  \2        P4                  ! \.        P0                  4      \7        V P                  4      4      h	  V P*                  '       dQ   \-        \.        P0                  \2        P4                  ! \.        P0                  4      \7        V P                  4      4      h/ V n        V P                  #   \         d    h \         d   p\        \!        T4      R R4      p\#        \$        4      ;_uu_ 4        TP&                  ^ ,          pT'       d
   TR,          pYV,          pRRR4       M  + '       g   i     M; i\        TR7      ThRp?ii ; i)rV    z: N)msg)rp   rc   r   
expanduserresolverf   parentsnamerg   ra   _config_cache_key_configr|   r   	Exceptiongetattrrq   r   
IndexErrorargssearch_parents
must_existFileNotFoundErrorerrnoENOENTosstrerrorr   )r*   parent	candidate	cache_keyer   exception_msgs   &      r"   r+   ConfigFromFile.config   s   $))T****ii**,446??AIIF/I!!(3	))Y6<<--2-8#'#4#4Y#?DL-6* ||#$$$'bkk%,,6OQTUYU^U^Q_``3 J8 ???#ELL"++ell2KSQUQZQZ^\\||- %   8!$q':r:C!*--()q	4KC,	 .---
 (C0a78s6   G''J<J=-J *-I 		J  I0+J  Jc                    < V ^8  d   QhRS[ /# r   r/   )r    r!   s   "r"   r#   rz      s     ) ) )r%   c                    V P                   e   V P                   # \        V P                  \        4      '       g   Q h\	        V P                  P                  4       4      # r1   )rT   rp   rc   r   r   rf   r)   s   &r"   r   ConfigFromFile.source   sG     <<#<<$))T****499%%'((r%   c                $   < V ^8  d   QhRS[ RR/# r   valuer   Nr/   )r    r!   s   "r"   r#   rz            C D r%   c                    Wn         R # r;   rT   r*   r   s   &&r"   r   r          r%   c                   < V ^8  d   Qh/ S[ S[,          ;R&   S[;R&   S[;R&   S[S[ S[3,          R,          ;R&   S[R,          ;R&   # )r   rc   r   r   Nr   r   )r   r   rU   r   r
   ra   )r    r!   s   "r"   r#   rz   c   s\      *,  9  =  #s(^d"P  $d*X r%   )r   r   rT   )rV   rW   rX   rY   rZ   r   r   rc   r   r   r   r   r   r|   r[   r+   r   setterr\   r]   r^   r_   s   @r"   rv   rv   c   s     
 t,DUD9J =N%*4e%%PGZ-24eRW-X4" "" " "H ) ) ]] c  r%   rv   c                      a  ] tR t^t o Rt]V 3R lR l4       t]V 3R lR l4       t]P                  V 3R lR l4       tV 3R lt	R	t
V tR
# )DictzjConfiguration source from an in-memory dictionary.

Useful for programmatically generated configurations.
c                6   < V ^8  d   QhRS[ S[S[3,          /# r   r   )r    r!   s   "r"   r#   Dict.__annotate__   s      S#X r%   c                    V P                   # r;   )datar)   s   &r"   r+   Dict.config   s    yyr%   c                    < V ^8  d   QhRS[ /# r   r/   )r    r!   s   "r"   r#   r      s       r%   c                :    V P                   e   V P                   # R# )r2   r   r   r)   s   &r"   r   Dict.source   s     <<#<<r%   c                $   < V ^8  d   QhRS[ RR/# r   r/   )r    r!   s   "r"   r#   r      r   r%   c                    Wn         R # r;   r   r   s   &&r"   r   r      r   r%   c                <   < V ^8  d   Qh/ S[ S[S[3,          ;R&   # )r   r   r   )r    r!   s   "r"   r#   r      s      sCx. r%   r   N)rV   rW   rX   rY   rZ   r[   r+   r   r   r\   r]   r^   r_   s   @r"   r   r      sQ          ]] +  r%   r   ) r   r   abcr   r   collections.abcr   
contextlibr   	itertoolsr   pathlibr   typingr	   r
   attrsr   r   cyclopts.argumentr   r   cyclopts.exceptionsr   cyclopts.utilsr   cyclopts.corer   r   ra   rv   r   rC   r%   r"   <module>r      s     	 # $    %  L - -! 3
 3
 3
le e0 QZ Q Qh :  r%   