+
    0j                         R t ^ RIt^ RIt]! ]R4      '       d   ]P                  tR# ]P
                  t]P                  t ! R R]4      tR# )zBackport of @functools.singledispatchmethod to Python <3.7.

Adapted from https://github.com/ikalnytskyi/singledispatchmethod
removing 2.7 specific code.
Nsingledispatchmethodc                   z   a  ] tR t^t o RtV 3R lR ltRV 3R lR lltV 3R lR lt]V 3R	 lR
 l4       t	Rt
V tR# )r   a  Single-dispatch generic method descriptor.

TODO: Figure out how to type this:

`mypy --strict` returns errors like the following for all decorated methods:
"Untyped decorator makes function "send" untyped."

But this is not a normal function-base decorator, it's a class and it
doesn't have a __call__ method. When decorating the "base" method
__init__ is called, but of course its return type is None.
c                `   < V ^8  d   QhRS[ P                  RS[ P                  3,          RR/# )   func.returnN)typingCallableAny)format__classdict__s   "c/Users/mitch_tango/dev/rabbit-r1-livekit/agent/.venv/lib/python3.14/site-packages/socksio/compat.py__annotate__!singledispatchmethod.__annotate__!   s,     	 	fjj!A 	d 	    c                    \        V4      '       g-   \        VR 4      '       g   \        RP                  V4      4      h\	        V4      V n        Wn        R# )__get__z${!r} is not callable or a descriptorN)callablehasattr	TypeErrorr   singledispatch
dispatcherr   )selfr   s   &&r   __init__singledispatchmethod.__init__!   s?    D>>'$	*B*B F M Md STT,T2DOIr   Nc                  < V ^8  d   QhRS[ P                  RS[ P                  3,          RS[ P                  S[ P                  RS[ P                  3,          ,          RS[ P                  RS[ P                  3,          /# )r   cls.methodr   )r   r	   r
   Optional)r   r   s   "r   r   r   (   se     	> 	>fjj1	> OOFOOCO$DE	> __S&**_-		>r   c                :    V P                   P                  WR7      # )a~  Register a method on a class for a particular type.

Note in Python <= 3.6 this methods cannot infer the type from the
argument's type annotation, users *must* supply it manually on
decoration, i.e.

@my_method.register(TypeToDispatch)
def _(self, arg: TypeToDispatch) -> None:
    ...

Versus in Python 3.7+:

@my_method.register
def _(self, arg: TypeToDispatch) -> None:
    ...

)r   )r   register)r   r   r   s   &&&r   r    singledispatchmethod.register(   s    4 ??++C+==r   c                   < V ^8  d   QhRS[ P                  RS[ P                  S[ P                  .S[ P                  3,          RS[ P                  RS[ P                  3,          /# )r   objr   r   .)r   r
   r	   )r   r   s   "r   r   r   D   sR     	 	zz	(.fjj8P(Q	__S&**_-	r   c                   a aa R  VVV 3R llpS P                   Vn         S P                  Vn        \        VS P                  4       V# )c                x    V ^8  d   QhR\         P                  R\         P                  R\         P                  /# )r   argskwargsr   r   r
   )r   s   "r   r   2singledispatchmethod.__get__.<locals>.__annotate__G   s2     A Avzz AVZZ AFJJ Ar   c                     < SP                   P                  V ^ ,          P                  4      pVP                  SS4      ! V / VB # )    )r   dispatch	__class__r   )r&   r'   r   r   r#   r   s   *, r   _method-singledispatchmethod.__get__.<locals>._methodG   s<    11$q'2C2CD~~c3/@@@r   )__isabstractmethod__r    update_wrapperr   )r   r#   r   r.   s   fff r   r   singledispatchmethod.__get__D   s>    A A ,0+D+DG(#}}G7DII.Nr   c                4   < V ^8  d   QhRS[ P                  /# )r   r   r(   )r   r   s   "r   r   r   U   s     	E 	E&** 	Er   c                0    \        V P                  R R4      # )r0   F)getattrr   )r   s   &r   r0   )singledispatchmethod.__isabstractmethod__T   s    499&<eDDr   )r   r   )N)__name__
__module____qualname____firstlineno____doc__r   r    r   propertyr0   __static_attributes____classdictcell__)r   s   @r   r   r      s>     
		 		> 	>8	 	  
	E 
	Er   )r;   	functoolsr   r   r   r1   r   object r   r   <module>rB      sR     
9,--$99--N--NBEv BEr   