
    !\i                        % S r SSKJr  SSKrSSKrSSKrSSKJr  SSKJ	r	J
r
JrJrJrJrJrJrJrJrJrJrJrJrJr  S/rSr " S S	\5      r\" 5       r " S
 S\5      r " S S\5      rS S S S S S \R@                  \RB                  \RD                  \RF                  \RH                  \RJ                  \RL                  \RN                  \RP                  S.r)0 r*\\+S'   \,\RZ                  \R\                  \R^                  \R`                  \Rb                  S.r2\\+S'   \	" S5      Rg                  \" S5      5      r4\	" S5      Rg                  \" S5      5      r5\	" S5      Rg                  \" S5      5      r6S r7\Rp                  Rg                  \75      r9\" S5      \" S5      -  r:\" S 5      Rw                  5       r<\" S!5      Rw                  5       r=\" S"R}                  \)R                  5       5      5      Rg                  S# 5      r@S$ rA\
" \S%-   5      Rg                  \A5      rB\" S"R}                  \2R                  5       5      5      Rg                  S& 5      rC\" 5       rD\" 5       rE\E\D-  rF " S' S(5      rG\" S)R                  \S%-   5      5      Rg                  S* 5      rI\E\D-  \5-  \6-  \4-  \9-  \I-  \R                  -  \R                  -  \R                  -  \:-  rM\D\" \<\E\@-  \B-  -   \" \M5      -   \=-   5      -    \E\" \<\C-   \4\E-  \@-  \B-  \" \M5      -  -   \" \M5      -   \=-   5      -    S+ rNS, rOS- rPS/S. jrQg)0z#Snuggs are s-expressions for Numpy.    )OrderedDictN)Mapping)KeywordWordoneOfLiteralQuotedStringParseExceptionForwardGroup	OneOrMoreParseResultsRegex
ZeroOrMore	alphanumspyparsing_commonreplace_withevalz1.4.7c                   6    \ rS rSrS rS rS rS	S jrS rSr	g)
ContextG   c                 "    [        5       U l        g Nr   _dataselfs    Z/var/www/html/kml_chatgpt/mouzaenv/lib/python3.13/site-packages/rasterio/_vendor/snuggs.py__init__Context.__init__H        ]
    c                      X R                   U'   g r   r   )r   namevals      r   addContext.addK   s    

4r"   c                      U R                   U   $ r   r$   r   r%   s     r   getContext.getN   s    zz$r"   Nc                     [        U R                  R                  5       5      [        U5      S-
     nU(       a  U[        U5      S-
     $ U$ )N   )listr   valuesint)r   indexsubindexss       r   lookupContext.lookupQ   sB    ""$%c%j1n5S]Q&''Hr"   c                 "    [        5       U l        g r   r   r   s    r   clearContext.clearX   r!   r"   r$   r   )
__name__
__module____qualname____firstlineno__r   r'   r+   r5   r8   __static_attributes__ r"   r   r   r   G   s    # #r"   r   c                   .    \ rS rSrSS jrS rSS jrSrg)	ctx_   Nc                 $    U=(       d    UU l         g r   kwds)r   kwd_dictrE   s      r   r   ctx.__init__`   s    $	r"   c                     [         R                  5         U R                  R                  5        H  u  p[         R	                  X5        M     U $ r   )_ctxr8   rE   itemsr'   )r   kvs      r   	__enter__ctx.__enter__c   s2    

IIOO%DAHHQN &r"   c                 :    S U l         [        R                  5         g r   )rE   rI   r8   )r   exc_typeexc_valexc_tbs       r   __exit__ctx.__exit__i   s    	

r"   rD   r   )NNN)r:   r;   r<   r=   r   rM   rS   r>   r?   r"   r   rA   rA   _   s    %r"   rA   c                        \ rS rSrSrSrSrSrg)ExpressionErrorn   zA Snuggs-specific syntax error.z<string>r.   r?   N)r:   r;   r<   r=   __doc__filenamelinenor>   r?   r"   r   rV   rV   n   s    )HFr"   rV   c                  2    [         R                  " S U 5      $ )Nc                 .    [         R                  " X5      $ r   )operatormulxys     r   <lambda><lambda>.<locals>.<lambda>v       X\\!5Gr"   	functoolsreduceargss    r   rb   rb   v       y''(GNr"   c                  2    [         R                  " S U 5      $ )Nc                 .    [         R                  " X5      $ r   )r]   r'   r_   s     r   rb   rc   w   rd   r"   re   rh   s    r   rb   rb   w   rj   r"   c                  2    [         R                  " S U 5      $ )Nc                 .    [         R                  " X5      $ r   )r]   truedivr_   s     r   rb   rc   x   s    X5E5Ea5Kr"   re   rh   s    r   rb   rb   x   s    y''(KTRr"   c                  2    [         R                  " S U 5      $ )Nc                 .    [         R                  " X5      $ r   )r]   subr_   s     r   rb   rc   y   rd   r"   re   rh   s    r   rb   rb   y   rj   r"   c                  2    [         R                  " S U 5      $ )Nc                 .    [         R                  " X5      $ r   )r]   and_r_   s     r   rb   rc   z   s    X]]15Hr"   re   rh   s    r   rb   rb   z   s    y''(H$Or"   c                  2    [         R                  " S U 5      $ )Nc                 .    [         R                  " X5      $ r   )r]   or_r_   s     r   rb   rc   {   rd   r"   re   rh   s    r   rb   rb   {   rj   r"   )*+/-&|<z<=z==z!=z>=>truthisnotfunc_map)mappartialrg   
attrgettermethodcaller
itemgetterhigher_func_mapnulltrueTfalseFc                      [         R                  US   5      $ ! [         a0    [        SR	                  US   5      5      nXl        US-   Ul        Uef = f)Nr   zname '{}' is not definedr.   )rI   r+   KeyErrorrV   formattextoffsetsourceloctokserrs       r   resolve_varr      sX    xxQ   8??QHI1W
		s	    :A'"() c                     [         US      $ Nr   )op_mapr   r   r   s      r   rb   rb      s    fT!Wor"   c                      [         US      $ ! [        [        4 a0    [        SR	                  US   5      5      nXl        US-   Ul        Uef = f)Nr   z"'{}' is not a function or operatorr.   )r   AttributeErrorr   rV   r   r   r   r   s       r   resolve_funcr      sY    Q  H% BII$q'RS1W
		s
    A A_c                     [         US      $ r   )r   r   s      r   rb   rb      s    od1g6r"   c                       \ rS rSrS rSrg)
KeywordArg   c                     Xl         g r   r%   r*   s     r   r   KeywordArg.__init__   s    	r"   r   N)r:   r;   r<   r=   r   r>   r?   r"   r   r   r      s    r"   r   z:[{}]+c                 $    [        US   SS  5      $ )Nr   r.   )r   r   s      r   rb   rb      s    ja5r"   c                 F    [        U [        5      (       a  [        U 5      $ U $ r   )
isinstancer   processList)args    r   
processArgr      s    #|$$3
r"   c                 ^   U SS   Vs/ s H  n[        U5      PM     nn/ n0 n[        U5      nU HF  n[        U[        5      (       a  [	        U5      nUR
                  nXtU'   M5  UR                  U5        MH     [        U S   5      n	 U	" U0 UD6$ s  snf ! [         a    U	" U40 UD6s $ f = f)Nr.   r   )r   iterr   r   nextr%   append	TypeError)
lstr`   rJ   ri   rE   itemitritemr&   keyfuncs
             r   r   r      s    $'G,GqZ]GE,DD 5kGdJ'' w-C))CIKK  c!fD
"T"T""3 -4  "D!D!!"s   B	B B,+B,c                 N    [         R                  U 5      n[        US   5      $ ! [         au  n[	        U5      n[
        R                  " SU5      nUR                  S5      nSU;   a  Sn[        U5      nXl	        [        UR                  S5      5      S-   Ul        UeS nAff = f)Nr   z-(Expected .+) \(at char (\d+)\), \(line:(\d+)r.   zmap|partialzexpected a function or operator   )exprparseStringr   r
   strresearchgrouprV   r   r1   r   )lineresultexcr   mmsgr   s          r   
handleLiner     s    !!$'6!9%% 	3xIIFMggajC3Cc"_q(
		s   "% 
B$A0BB$c                 z    U=(       d    Un[        U5         [        U 5      sSSS5        $ ! , (       d  f       g= f)a  Evaluate a snuggs expression.

Parameters
----------
source : str
    Expression source.
kwd_dict : dict
    A dict of items that form the evaluation context. Deprecated.
kwds : dict
    A dict of items that form the valuation context.

Returns
-------
object

N)rA   r   )r   rF   rE   s      r   r   r     s'    " 4H	X&! 
s   ,
:r   )RrX   collectionsr   rf   r]   r   typingr   	pyparsingr   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   __all____version__objectr   rI   rA   SyntaxErrorrV   ltleeqnegegtr   is_not_r   r   __annotations__r   r   rg   r   r   r   r   set_parse_actionnilr   r   r   
identifiervarstringsuppresslparenrparenjoinkeysopr   r   higher_func	func_exprhigher_func_exprr   r   r   kwargsci_realrealsigned_integeroperandr   r   r   r   r?   r"   r   <module>r      s   )T $   	     $ (#f #* y& k  
O	N	R	N	O	N	
++
++
++
++	^^
,,==
$ '   %%))%%  fo&&|D'9:v''T(:;)),u*=> !!22;?	c	\#.	.				 				 
388FKKM"#44-
 IO--l;CHH_11345FF6 I	9 )# 
 	iy3/0AA5	
 
  
	

 

     %%	& 
  
U
#d*+i.@@6I  E

"T)Ig,>>@  	 "> "r"   