
    E#i                     x   S SK JrJrJrJrJrJr  S SKrSSKJ	r	  SSK
Jr  SSKJrJr  \\\   /\\   4   r\	" S5      S\S	\4   S
\S\\   S\\\   SS4   4S j5       rS\\S	\4      S\4S jr\	" S5      S\\   S\\   S\\\   SS4   4S j5       rS\S	\4   S\S	\4   S\S\4S jr\S\\\4   S\\\4   S\\\\4   SS4   4S j5       r\	" S5      S\S	\4   S\\   S\\\   SS4   4S j5       rS\\\S	\4   \S	\4   4      S\S\4S jr\S\\\4   S\\\4   S\\\\4   SS4   4S j5       rg)    )AnyCallableDict	GeneratorListTupleN   )return_arg_type)to_dict)composecurry   	formatter.at_indexvaluereturnc              #      #    US-   [        U5      :  a  [        S[        U5       SUS-    35      e[        U5       H  u  p4X1:X  a  U " U5      v   M  Uv   M     g 7f)Nr	   z7Not enough values in iterable to apply formatter. Got: z. Need: )len
IndexError	enumerate)r   r   r   indexitems        m/home/james-whalen/.local/lib/python3.13/site-packages/ccxt/static_dependencies/ethereum/utils/applicators.pyapply_formatter_at_indexr      sk      !|c%j Ec%j\ R\N$
 	
 !'D/!J	 (s   AA
formattersc                     ^ [         R                  " [        S5      SS9  [        [        5      m[        U4S j[        U 5       5       6 $ )Na  combine_argument_formatters(formatter1, formatter2)([item1, item2])has been deprecated and will be removed in a subsequent major version release of the eth-utils library. Update your calls to use apply_formatters_to_sequence([formatter1, formatter2], [item1, item2]) instead.r   )
stacklevelc              3   8   >#    U  H  u  pT" X!5      v   M     g 7fN ).0r   r   _formatter_at_indexs      r   	<genexpr>.combine_argument_formatters.<locals>.<genexpr>7   s#      

$9   	11$9s   )warningswarnDeprecationWarningr   r   r   r   )r   r"   s    @r   combine_argument_formattersr(   )   sN    MM	
 	   89

$-j$9

     sequencec              #   4  #    [        U 5      [        U5      :  a#  [        S[        U 5       S[        U5       35      e[        U 5      [        U5      :  a#  [        S[        U 5       S[        U5       35      e[        X5       H  u  p#U" U5      v   M     g 7f)Nz"Too many formatters for sequence: z formatters for z!Too few formatters for sequence: )r   r   reprzip)r   r*   r   r   s       r   apply_formatters_to_sequencer.   >   s      :X&0Z0AAQH~ 
 	
 
Z3x=	(/J/@@PH~ 
 	

  #:8OID/!  9s   BB	conditionc                 0    U " U5      (       a  U" U5      $ U$ r   r    )r/   r   r   s      r   apply_formatter_ifr1   Q   s     r)   c              #   J  #    UR                  5        H   u  p#X ;   a   X U   " U5      4v   M  X#4v   M"     g ! [         a+  nS[        U5       S[        U5       3n[        U5      UeS nAf[         a+  nS[        U5       S[        U5       3n[        U5      UeS nAff = f7f)NzCould not format invalid value z
 as field zCould not format invalid type )items
ValueErrorr,   	TypeError)r   r   keyr   excnew_error_messages         r   apply_formatters_to_dictr9   Z   s      [[]	<c?4000 )O #  =5d4j\DQTI;W " !!23< <4T$ZL
4PS9+V "   12;	<s1   B#8B#
B &A((B 5&BB  B#c              #   2   #    U H  nU " U5      v   M     g 7fr   r    )r   r   r   s      r   apply_formatter_to_arrayr;   p   s      o s   formatter_condition_pairsc                 \    U  H  u  p#U" U5      (       d  M  U" U5      s  $    [        S5      e)NzBThe provided value did not satisfy any of the formatter conditions)r4   )r<   r   r/   r   s       r   apply_one_of_formattersr>   x   s9     !:	UU## !: P
 	
r)   key_mappingsc              #   L  ^#    [        TR                  5       5      R                  U R                  5       5      R                  U4S jU R	                  5        5       5      nU(       a  [        SU 35      eTR	                  5        H  u  p4X0;   a
  X   U4v   M  X44v   M     g 7f)Nc              3   <   >#    U  H  u  pUT;   d  M  Uv   M     g 7fr   r    )r!   kvr   s      r   r#    apply_key_map.<locals>.<genexpr>   s     G$8DAAJaa$8s   	z3Could not apply key map due to conflicting key(s): )setkeys
differenceintersectionr3   KeyError)r?   r   key_conflictsr6   r   s    `   r   apply_key_maprK      s     
 	EJJL	L%%'	(	GL$6$6$8G	G 
 A-Q
 	
 [[]	#T)))O	 #s   B!B$)typingr   r   r   r   r   r   r%   
decoratorsr
   
functionalr   toolzr   r   
Formattersintr   r(   r.   boolr1   r9   r;   r>   rK   r    r)   r   <module>rS      sc    
 tCyk49,-
 S!-09=ctCy$$% T(382D-E * * "S	"%)#Y"tCy$$%" "$T	"/7S/AJM 	S#X'+CH~uS#Xd*+ 	* S!*.s)tCy$$% 

$U8CH+=xS?Q+Q%RS



 	

 	sCx.)-c3huS#Xd*+ 	r)   