
    <i                        d dl Z d dlZd dlmZmZ d dlmZmZ d dlm	Z	m
Z
mZmZmZ d dlmZ d dlmZ d dlmZ d dlmZ ej,                  d	k\  rd d
l mZ nd d
lmZ dee
de	f      de	fdZde
de	f   de
de	f   fdZe G d d             Zy)    N)	dataclassfield)cached_propertypartial)AnyCallableListOptionalUnion)
ModelField)SecurityBase)DependencyCacheKey)Literal)      )iscoroutinefunctioncall.returnc                 J    | | S t        j                  t        |             }|S N)inspectunwrap
_impartial)r   	unwrappeds     `/home/www/utuvibe.miabetepe.com/venv/lib/python3.12/site-packages/fastapi/dependencies/models.py_unwrapped_callr      s%    |z$/0I    funcc                 `    t        | t              r| j                  } t        | t              r| S r   )
isinstancer   r   )r   s    r   r   r      s&    
T7
#yy T7
#Kr   c                      e Zd ZU  ee      Zee   ed<    ee      Z	ee   ed<    ee      Z
ee   ed<    ee      Zee   ed<    ee      Zee   ed<    ee      Zed    ed<   dZee   ed	<   dZeed
ef      ed<   dZee   ed<   dZee   ed<   dZee   ed<   dZee   ed<   dZee   ed<   dZee   ed<   dZeee      ed<   dZeee      ed<   dZeed<   dZee   ed<   dZe e!d   df   ed<   e"dee   fd       Z#e"de$fd       Z%e"defd       Z&e"defd       Z'e"de(fd       Z)e"ded    fd       Z*e"defd        Z+e"defd!       Z,e"defd"       Z-e"de edf   fd#       Z.y)$	Dependant)default_factorypath_paramsquery_paramsheader_paramscookie_paramsbody_paramsdependenciesNname.r   request_param_namewebsocket_param_namehttp_connection_param_nameresponse_param_namebackground_tasks_param_namesecurity_scopes_param_nameown_oauth_scopesparent_oauth_scopesT	use_cachepath)functionrequestscoper   c                     | j                   r| j                   j                         ng }| j                  xs g D ]  }||vs|j                  |        |S r   )r2   copyr1   append)selfscopesr7   s      r   oauth_scopeszDependant.oauth_scopes5   sV    484L4L))..0RT**0b 	%EF"e$	% r   c                     | j                   r+t        t        t        | j                  xs g                   nd}| j
                  || j                  xs dfS )N  )_uses_scopestuplesortedsetr=   r   computed_scope)r;   scopes_for_caches     r   	cache_keyzDependant.cache_key>   sV     <@;L;LE&T..4"567RT 	 II%2
 	
r   c                     | j                   ry| j                  y| j                  ry| j                  D ]  }|j                  s y y)NTF)r1   r0   _is_security_schemer)   rA   )r;   sub_deps     r   rA   zDependant._uses_scopesI   sO      **6##(( 	G##	 r   c                 f    | j                   yt        | j                         }t        |t              S )NF)r   r   r    r   r;   r   s     r   rI   zDependant._is_security_schemeV   s*    99#DII.	)\22r   c                 T    t        | j                        }t        |t              sJ |S r   )r   r   r    r   rL   s     r   _security_schemezDependant._security_scheme^   s&    #DII.	)\222r   c                 \    | j                   D cg c]  }|j                  s| }}|S c c}w r   )r)   rI   )r;   depsecurity_depss      r   _security_dependenciesz Dependant._security_dependenciesd   s/    (,(9(9US=T=TUU Vs   ))c                    | j                   yt        j                  t        | j                               s(t        j                  t	        | j                               ryt        j
                  t	        | j                               ryt        t        | j                         dd       }|yt        j                  t        |            st        j                  t	        |            ryt        t	        | j                         dd       }|yt        j                  t        |            st        j                  t	        |            ryyNFT__call__)r   r   isgeneratorfunctionr   r   isclassgetattrr;   dunder_calldunder_unwrapped_calls      r   is_gen_callablezDependant.is_gen_callablei   s    99&&tyy!
(()CD???49956j3ZF&&{#
(()EF '		(BJPT U (&&,-
((9N)OPr   c                    | j                   yt        j                  t        | j                               s(t        j                  t	        | j                               ryt        j
                  t	        | j                               ryt        t        | j                         dd       }|yt        j                  t        |            st        j                  t	        |            ryt        t	        | j                         dd       }|yt        j                  t        |            st        j                  t	        |            ryyrT   )r   r   isasyncgenfunctionr   r   rW   rX   rY   s      r   is_async_gen_callablezDependant.is_async_gen_callable   s    99%%tyy!
''		(BC???49956j3ZF%%{#
''(DE '		(BJPT U (%%,-
''8M(NOr   c                    | j                   yt        j                  t        | j                               rt	        t        | j                               ryt        j                  t        | j                               rt	        t        | j                               ryt        j                  t        | j                               ryt        t        | j                         dd       }|yt	        t        |            st	        t        |            ryt        t        | j                         dd       }|yt	        t        |            st	        t        |            ryyrT   )r   r   	isroutiner   r   r   rW   rX   rY   s      r   is_coroutine_callablezDependant.is_coroutine_callable   s   99Z		238Ktyy!9
 _TYY78=PDII&>
 ???49956j3ZFz+67;NK(<
  '		(BJPT U (,-
 1F!GHr   c                 f    | j                   r| j                   S | j                  s| j                  ryy )Nr6   )r7   r\   r_   )r;   s    r   rE   zDependant.computed_scope   s*    ::::4#=#=r   )/__name__
__module____qualname__r   listr$   r	   r   __annotations__r%   r&   r'   r(   r)   r*   r
   strr   r   r   r+   r,   r-   r.   r/   r0   r1   r2   r3   boolr4   r7   r   r   r   r=   r   rG   rA   rI   r   rN   rR   r\   r_   rb   rE   r?   r   r   r"   r"      ss   $)$$?Kj!?%*4%@L$z"@&+D&AM4
#A&+D&AM4
#A$)$$?Kj!?&+D&AL${#AD(3-)-D(8CH%
&-(,,*.(3-.044)-#-15#5044,0htCy)0/3$s),3ItD(3-9=E5./56=d3i   
- 
 
 
d 
 
 3T 3 3 ,  
 [(9     2 t  2 t  : c4i 0  r   r"   )r   sysdataclassesr   r   	functoolsr   r   typingr   r   r	   r
   r   fastapi._compatr   fastapi.security.baser   fastapi.typesr   typing_extensionsr   version_infor   asyncior   r   r"   r?   r   r   <module>ru      s     
 ( . 7 7 & . , %w++(8CH#56 3 Xc3h' HS#X,>  a a ar   