
    ?Ki_                     r   S SK r S SKrS SKrS SKJrJrJr  S SKJrJ	r	  S SK
J
r
J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  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'J(r(J)r)J*r*J+r+J,r,  S S	K-J.r.  S S
K/J0r0J1r1  S SK2J3r3  S SK4J5r5  S SK6J7r7  S SK8J9r9  S SK:J;r;  S SK<J=r=J>r>  S SK?J@r@JArA  S SKBJCrC  S S	KDJ.rE  S SKFJGrG  S SKHJIrIJJrJJKrKJLrLJMrM  S SKNJOrOJPrP  S SKQJRrR  S SKSJTrT  S SKUJVrV  SrWSrXSeS jrYS\R                  S\[S\34S jr\S SSS!.S"\3S#\]S$\^\;   S-  S%\^\[   S-  S\34
S& jjr_S'\^\   S\^\   4S( jr`S"\3S\^\   4S) jraS*\S+\4   S\R                  4S, jrcS*\S+\4   S\R                  4S- jrdS.\S/\e\[\4   S\4S0 jrfS*\S+\4   S\4S1 jrgSSSS2SS3.S\[S*\S+\4   S4\[S-  S5\^\[   S-  S%\^\[   S-  S6\]S7\S8   S-  S\34S9 jjrhS:\[S;\S"\3S\]S-  4S< jri\ " S= S>5      5       rjS:\[S.\S?\S@\]S\j4
SA jrkSB\S"\3SS4SC jrlS"\3SD\SE\e\[\4   S\4SF jrm\ " SG SH5      5       rnSSSSSSI.SJ\P\T-  S"\3SK\e\[\4   \I-  S-  SL\ES-  SM\RS-  SN\S-  SO\e\;\4   S-  SP\SQ\]S\n4SR jjroSB\S?\SS\e\[\4   ST\p\[S+4   S\p\\^\   4   4
SU jrqSB\S\]4SV jrr SfSB\SS\\[\4   SW\[S-  S\4SX jjrsS'\\   SY\\[\4   \L-  \J-  S\p\e\[\4   \^\   4   4SZ jrtS[\S\]4S\ jruS'\^\   S\]4S] jrvS^\^\   S_\IS\e\[\4   4S` jrwS^\^\   S_\e\[\4   \I-  S-  SQ\]S\p\e\[\4   \^\e\[\4      4   4Sa jrxSb\3S4\[SQ\]S\S-  4Sc jrySB\S\[4Sd jrzg)g    N)CallableMappingSequence)AsyncExitStackcontextmanager)copydeepcopy)	dataclass)	AnnotatedAny
ForwardRefLiteralUnioncastget_args
get_origin)params)
ModelFieldRequiredParam	Undefinedcopy_field_infocreate_body_modelevaluate_forwardreffield_annotation_is_scalar#field_annotation_is_scalar_sequencefield_annotation_is_sequenceget_cached_model_fieldsget_missing_field_error$is_bytes_or_nonable_bytes_annotationis_bytes_sequence_annotationis_scalar_field.is_uploadfile_or_nonable_uploadfile_annotation!is_uploadfile_sequence_annotationlenient_issubclasssequence_typesserialize_sequence_valuevalue_is_sequence)BackgroundTasks)asynccontextmanagercontextmanager_in_threadpool)	Dependant)DependencyScopeError)logger)SecurityScopes)DependencyCacheKey)create_model_fieldget_path_param_names)	BaseModelJson)	FieldInfo)run_in_threadpool)FormDataHeadersImmutableMultiDictQueryParams
UploadFile)HTTPConnectionRequest)Response)	WebSocket)is_typealiastypezForm data requires "python-multipart" to be installed. 
You can install "python-multipart" with: 

pip install python-multipart
zForm data requires "python-multipart" to be installed. It seems you installed "multipart" instead. 
You can remove "multipart" with: 

pip uninstall multipart

And then install "python-multipart" with: 

pip install python-multipart
returnc                  n    SSK Jn   U S:  d   eg ! [        [        4 a     SSKJn   U (       d   e SSKJn  U(       d   e g ! [         a+    [        R                  " [        5        [        [        5      S ef = f! [         a+    [        R                  " [        5        [        [        5      S ef = ff = f)Nr   )__version__z0.0.12)parse_options_header)python_multipartrB   ImportErrorAssertionError	multipartmultipart.multipartrC   r-   error!multipart_incorrect_install_errorRuntimeErrormultipart_not_installed_error)rB   rC   s     \/var/www/html/dynamic-report/venv/lib/python3.13/site-packages/fastapi/dependencies/utils.pyensure_multipart_is_installedrN   T   s    H0 X%%%( H	H-;	P ,++ P>?"#DE4OP  	HLL67<=4G	H!Hs+    B4A;A5A88A;;5B00B4dependspathc                    [        U R                  5      (       d   S5       e/ n[        U [        R                  5      (       a,  U R
                  (       a  UR                  U R
                  5        [        UU R                  U R                  US9$ )Nz;A parameter-less dependency must have a callable dependency)rP   callscopeown_oauth_scopes)	callable
dependency
isinstancer   Securityscopesextendget_dependantrS   )rO   rP   rT   s      rM   get_parameterless_sub_dependantr\   o   sw    G&&'' E' #%'6??++/mm)	     Fskip_repeatsvisitedparent_oauth_scopes	dependantr_   r`   ra   c                `   Uc  / nUR                  U R                  5        U=(       d    / U R                  =(       d    / -   n[        S0 SU R                  R                  5       _SU R                  R                  5       _SU R                  R                  5       _SU R                  R                  5       _SU R                  R                  5       _SU R                  _SU R                  _SU R                  _S	U R                  _S
U R                  _SU R                  _SU R                   _SU R"                  _SU R$                  _SU_SU R&                  _SU R(                  _SU R*                  _6nU R,                   GH,  nU(       a  UR                  U;   a  M  [/        UUUUR                  S9nUR,                  R                  U5        UR                  R1                  UR                  5        UR                  R1                  UR                  5        UR                  R1                  UR                  5        UR                  R1                  UR                  5        UR                  R1                  UR                  5        UR,                  R1                  UR,                  5        GM/     U$ )Npath_paramsquery_paramsheader_paramscookie_paramsbody_paramsnamerR   request_param_namewebsocket_param_namehttp_connection_param_nameresponse_param_namebackground_tasks_param_namesecurity_scopes_param_namerT   ra   	use_cacherP   rS   r^    )append	cache_keyoauth_scopesr+   rd   r   re   rf   rg   rh   ri   rR   rj   rk   rl   rm   rn   ro   rT   rp   rP   rS   dependenciesget_flat_dependantrZ   )rb   r_   r`   ra   use_parent_oauth_scopesflat_dependantsub_dependantflat_subs           rM   rv   rv   ~   s    NN9&&'28b$"  ))..0++002  --224  --224	
 ))..0 ^^ ^^ %77 ';; $-#G#G &99 %.$I$I $-#G#G #33 4  %%!" ^^#$ oo%N( #//M33w>%% . ; ;	
 	##**84""))(*>*>?##**8+@+@A$$++H,B,BC$$++H,B,BC""))(*>*>?##**8+@+@A 0" r]   fieldsc                     U (       d  U $ U S   n[        U 5      S:X  aJ  [        UR                  R                  [        5      (       a!  [        UR                  R                  5      nU$ U $ )Nr      )lenr$   
field_info
annotationr2   r   )r{   first_fieldfields_to_extracts      rM   _get_flat_fields_from_paramsr      sa    )K
6{a.))9  4K4J4J4U4UV  Mr]   c                     [        U SS9n[        UR                  5      n[        UR                  5      n[        UR                  5      n[        UR
                  5      nX#-   U-   U-   $ )NT)r_   )rv   r   rd   re   rf   rg   )rb   rx   rd   re   rf   rg   s         rM   get_flat_paramsr      sa    '	EN.~/I/IJK/0K0KLL01M1MNM01M1MNM%5EEr]   rR   .c                      [         R                  " U SS9nU$ ! [         aU    [        R                  S:  a'  SSKJn  [         R                  " XR                  S9n U$ [         R                  " U 5      n U$ f = f)NT)eval_str)      r   )Format)annotation_format)inspect	signature	NameErrorsysversion_infoannotationlibr   
FORWARDREF)rR   r   r   s      rM   _get_signaturer      s{    
0%%dT:	   0 w&,))$BSBSTI   ))$/I0s    AA8A87A8c                 z   [        U 5      n[        R                  " U 5      n[        US0 5      nUR                  R                  5        Vs/ s HL  n[        R                  " UR                  UR                  UR                  [        UR                  U5      S9PMN     nn[        R                  " U5      nU$ s  snf )N__globals__)ri   kinddefaultr   )r   r   unwrapgetattr
parametersvalues	Parameterri   r   r   get_typed_annotationr   	Signature)rR   r   	unwrappedglobalnsparamtyped_paramstyped_signatures          rM   get_typed_signaturer      s    t$It$Iy-4H ))002 3E 	MM+E,<,<hG		
 3   ''5Os   AB8r   r   c                 |    [        U [        5      (       a&  [        U 5      n [        XU5      n U [	        S 5      L a  g U $ N)rW   strr   r   type)r   r   s     rM   r   r      s:    *c""
+
(xH
d#r]   c                     [        U 5      n[        R                  " U 5      nUR                  nU[        R                  R
                  L a  g [        US0 5      n[        X45      $ )Nr   )r   r   r   return_annotationr   emptyr   r   )rR   r   r   r   r   s        rM   get_typed_return_annotationr      sU    t$It$I,,JW&&,,,y-4H
55r]   T)ri   rT   ra   rp   rS   ri   rT   rp   rS   )functionrequestc                 p   [        UUU UUUUS9nU=(       d    / U=(       d    / -   n[        U 5      n	[        U5      n
U
R                  nUR	                  5        GHX  u  pX;   n[        UUR                  UR                  US9nUR                  Gbm  UR                  R                  (       d   eUR                  (       d  UR                  (       a`  UR                  S:X  aP  UR                  R                  S:X  a6  UR                  (       d   e[        SUR                  R                    S35      e/ n[#        UR                  [$        R&                  5      (       a:  UR                  R(                  (       a  [+        UR                  R(                  5      n[-        U UR                  R                  UUUUR                  R.                  UR                  R                  S9nUR0                  R3                  U5        GM  [5        UUR6                  US9(       a  UR8                  b   S	U< 35       eGM  UR8                  c   e[#        UR8                  R:                  [$        R<                  5      (       a(  UR>                  R3                  UR8                  5        GMD  [A        UR8                  US
9  GM[     U$ )N)rR   ri   rP   rp   rS   rT   ra   )
param_namer   valueis_path_paramr   r   zThe dependency "zS" has a scope of "request", it cannot depend on dependencies with scope "function".)rP   rR   ri   rT   ra   rp   rS   r   type_annotationrb   z0Cannot specify multiple FastAPI annotations for )fieldrb   )!r+   r1   r   r   itemsanalyze_paramr   r   rO   rV   is_gen_callableis_async_gen_callablecomputed_scoperS   rR   r,   __name__rW   r   rX   rY   listr[   rp   ru   rr   !add_non_field_param_to_dependencyr   r   r   Bodyrh   add_param_to_fields)rP   rR   ri   rT   ra   rp   rS   rb   current_scopespath_param_namesendpoint_signaturesignature_paramsr   r   r   param_detailssub_own_oauth_scopesry   s                     rM   r[   r[      sm    )/I */R4D4JKN+D1,T2)44-335
"6%!''--'	
   , ((3333**i.M.M,,	9!))//:= ~~%~*&y~~'>'>&? @Y Y  /1 -//AA ((//+/0E0E0L0L+M()"**55!5$2'//99#++11M ""))-8,!)99

 !&&. B:.Q. ""...m))44fkkBB!!(()<)<=m&9&9YOa 6b r]   r   r   c                 T   [        U[        5      (       a  Xl        g[        U[        5      (       a  Xl        g[        U[
        5      (       a  Xl        g[        U[        5      (       a  Xl        g[        U[        5      (       a  Xl
        g[        U[        5      (       a  Xl        gg )NT)r$   r<   rj   r>   rk   r;   rl   r=   rm   StarletteBackgroundTasksrn   r.   ro   r   s      rM   r   r   I  s     /733'1$	OY	7	7)3&	O^	<	</9,	OX	6	6(2%	O-E	F	F0:-	O^	<	</9,r]   c                   T    \ rS rSr% \\S'   \R                  S-  \S'   \S-  \S'   Sr	g)ParamDetailsia  r   NrO   r   rq   )
r   
__module____qualname____firstlineno__r   __annotations__r   Dependsr   __static_attributes__rq   r]   rM   r   r   a  s"    ^^d""r]   r   r   r   c           	      
   S nS n[         n[         n[        U5      (       a  UR                  nU[        R                  R
                  La  UnUn[        U5      [        L Gav  [        U5      nUS   nUSS   V	s/ s H,  n	[        U	[        [        R                  45      (       d  M*  U	PM.     n
n	U
 V	s/ s HE  n	[        U	[        R                  [        R                  [        R                  45      (       d  MC  U	PMG     nn	U(       a  US   nOS n[        U[        5      (       a  [        UUS9nUR                   ["        :X  d7  UR                   [$        :X  d#   SUR&                  R(                   SU < S35       eU[        R                  R
                  La  U(       a   S5       eX$l        O-[$        Ul        O![        U[        R                  5      (       a  Un[        U[        R                  5      (       a  Ub   S	U < 35       eUb   S
U < 35       eUnO@[        U[        5      (       a+  Ub   SU < 35       eUn[        U[        5      (       a  Xdl        Ub,  UR,                  c  [/        U5      n[0        R2                  " XVS9nUc>  [5        U[6        [8        [:        [<        [>        [@        45      (       a  Ub   SU< 35       eOUc  Uc  U[        R                  R
                  La  UO[$        nU(       a  [        RB                  " US9nOl[E        U5      (       d  [G        U5      (       a  [        RH                  " X}S9nO7[K        US9(       d  [        R                  " X}S9nO[        RL                  " X}S9nS nUGb  U(       aB  [        U[        RB                  5      (       d"   SUR&                  R(                   SU < 35       eOL[        U[        R                  5      (       a-  [O        USS 5      c  [        RP                  RR                  Ul*        Un[        U[        RV                  5      (       a
  [Y        5         URZ                  (       d%  [O        USS 5      (       a  U R3                  SS5      nOURZ                  =(       d    U nUUl-        []        U UUR                   UUS9nU(       a  [_        US9(       d   S5       eO[        U[        RL                  5      (       ai  [_        U5      (       dY  [a        URb                  R*                  5      (       d5  [5        URb                  R*                  [d        5      (       d   SU < S35       e[g        XeUS9$ s  sn	f s  sn	f )Nr   r}   )r   r   `z1` default value cannot be set in `Annotated` for z). Set the default value with `=` instead.z*Path parameters cannot have default valueszGCannot specify `Depends` in `Annotated` and default value together for zaCannot specify a FastAPI annotation in `Annotated` and `Depends` as a default value together for zQCannot specify FastAPI annotations in `Annotated` and default value together for )rV   z+Cannot specify FastAPI annotation for type )r   )r   r   zCannot use `z` for path param in_convert_underscores_-)ri   type_r   aliasr   r   z1Path params must be of one of the supported typeszQuery parameter z# must be one of the supported types)r   rO   r   )4r   r?   	__value__r   r   r   r   r   r   rW   r4   r   r   Paramr   r   r   r   r   	__class__r   r   rV   r   dataclassesreplacer$   r<   r>   r;   r=   r   r.   Pathr"   r#   Filer   Queryr   
ParamTypesqueryr   FormrN   r   r0   r!   r   r   r2   r   )r   r   r   r   r   rO   r   use_annotationannotated_argsargfastapi_annotationsfastapi_specific_annotationsfastapi_annotationdefault_valuer   use_annotation_from_field_infor   s                    rM   r   r   h  s    JGON
##))
**000#$.!Y.!*-(+ &ab)
)#	6>>:; ) 	 
 +(
*LLKKNN * 	% (
 (,R0  "&()44(-)J
 ""i/:3E3E3V J((112 3$$.>1Z\V
 G--333(V*VV(%*"%2
"*FNN;;(G%(( 	
'N,	
 ! 	
++5.:	
! 	E9	%	%! 	
'N,	
! 
j),,$3! w119w-%%gJ
 -$	

 
 ! 	
9/9LM	
! 
	!&g.?.?.E.E!E=  ?J;
 
.??VJ+GVJWJEj&++66 z33<<= >>#6
 z6<<00
E408#..44JN)7&j&++..)+GJ8Mt$T$T&&sC0E$$2
E 
"0&&!
 "/ C/ 
FLL11&&6u7G7G7R7RSS%e&6&6&A&A9MMT "*/RS	TN
 PUVVc

(
s   8)U%U1AU7Ur   c                 ,   U R                   n[        USS 5      nU[        R                  R                  :X  a  UR
                  R                  U 5        g U[        R                  R                  :X  a  UR                  R                  U 5        g U[        R                  R                  :X  a  UR                  R                  U 5        g U[        R                  R                  :X  d   SU R                   35       eUR                  R                  U 5        g )Nr   z>non-body parameters must be in path, query, header or cookie: )r   r   r   r   rP   rd   rr   r   re   headerrf   cookieri   rg   )r   rb   r   field_info_ins       rM   r   r     s    !!JJt4M))...$$U+	&++11	1%%e,	&++22	2&&u- 1 1 8 88 	
LUZZLY	
8 	&&u-r]   stack
sub_valuesc                 *  #    U R                   (       d   eU R                  (       a  [        U R                   5      " S0 UD6nO5U R                  (       a$  [	        [        U R                   5      " S0 UD65      nUR                  W5      I S h  vN $  N7f)Nrq   )rR   r   r)   r   r*   r   enter_async_context)rb   r   r   cms       rM   _solve_generatorr   !  sm      >>>&& 0>:>		"	").*H*V:*VW**2....s   B
BBBc                   h    \ rS rSr% \\\4   \S'   \\   \S'   \	S-  \S'   \
\S'   \\\4   \S'   Srg)	SolvedDependencyi,  r   errorsNbackground_tasksresponsedependency_cacherq   )r   r   r   r   dictr   r   r   r   r   r=   r/   r   rq   r]   rM   r   r   ,  s<    cNI.55-s233r]   r   )bodyr   r   dependency_overrides_providerr   r   r   r   r   r   r   async_exit_stackembed_body_fieldsc        	         
  #    U R                   R                  S5      n	[        U	[        5      (       d   S5       eU R                   R                  S5      n
[        U
[        5      (       d   S5       e0 n/ nUc  [	        5       nUR
                  S	 S Ul        Uc  0 nUR                   GH  n[        [        S[        4   UR                  5      Ul        UR                  nUnU(       aq  UR                  (       a`  UR                  n[        US0 5      R                  UU5      nUR                  n[        UUUR                   UR"                  UR                   S9n[%        U UUUUUUUUS	9	I S h  vN nUR&                  nUR(                  (       a  UR+                  UR(                  5        GM  UR,                  (       a  UR.                  U;   a  XmR.                     nOUR0                  (       d  UR2                  (       a2  U	nUR                   S
:X  a  U
n[5        UUUR6                  S9I S h  vN nOJUR8                  (       a  U" S0 UR6                  D6I S h  vN nO[;        U40 UR6                  D6I S h  vN nUR                   b  UXR                   '   UR.                  U;  d  GM  UXmR.                  '   GM     [=        UR>                  U R>                  5      u  nn[=        UR@                  U R@                  5      u  nn[=        URB                  U R
                  5      u  nn[=        URD                  U RF                  5      u  nnURI                  U5        URI                  U5        URI                  U5        URI                  U5        UUU-   U-   U-   -  nURJ                  (       aB  [M        URJ                  UUS9I S h  vN u  nnURI                  U5        UR+                  U5        URN                  (       a  XURN                  '   URP                  (       a$  [        U [R        5      (       a  XURP                  '   O4URT                  (       a#  [        U [V        5      (       a  XURT                  '   URX                  (       a  Uc
  [[        5       nX;URX                  '   UR\                  (       a  XKUR\                  '   UR^                  (       a  [a        UR"                  S9XR^                  '   [c        UUUUUS9$  GN GN GN GN GNF7f)Nfastapi_inner_astackz/fastapi_inner_astack not found in request scopefastapi_function_astackz2fastapi_function_astack not found in request scopezcontent-length.dependency_overrides)rP   rR   ri   ra   rS   )	r   rb   r   r   r   r   r   r   r  r   )rb   r   r   )body_fieldsreceived_bodyr  )rY   )r   r   r   r   r   rq   )2rS   getrW   r   r=   headersstatus_coderu   r   r   r   rR   r  r   rP   r[   ri   rt   solve_dependenciesr   r   rZ   rp   rs   r   r   r   r   is_coroutine_callabler5   request_params_to_argsrd   re   rf   rg   cookiesupdaterh   request_body_to_argsrl   rj   r<   rk   r>   rn   r(   rm   ro   r.   r   )r   rb   r   r   r   r   r   r   r  request_astackfunction_astackr   r   ry   rR   use_sub_dependantoriginal_calluse_pathsolved_resultsolved
use_astackpath_valuespath_errorsquery_valuesquery_errorsheader_valuesheader_errorscookie_valuescookie_errorsbody_valuesbody_errorss                                  rM   r  r  5  s     ]]&&'=>Nnn55 95 mm''(ABOo~66 <6  FF:-.#"//!(38"4m6H6HI!!))-BB)..M-/Erc-/  *..H -"''$1$>$>#))! 1'-*G--/

 

 )99MM-../""}'>'>BR'R%&=&=>F--1B1X1X'J""j0,
++ (// F
 447-"6"677F,TJ]5I5IJJF))/F%%&""*::8>445q 0r  6w22 K "8 4 4"L, $:$ M= $:$ M= MM+
MM,
MM- 
MM- 
kL(=8=HHF '!--/
 
	
 	k"k"++7>y334##
7G(D(D/6y++,		'	'Jw	,J,J18y--.,,#.08Hy445$$08y,,-++7E))8
334 )) a

. 8J4
sc   E+T-S=.B=T+T ,+TTT6T7-T)DTT	D:T TTT	Tr   locc                     UcB  U R                   R                  5       (       a  S [        US9/4$ [        U R                  5      / 4$ U R                  XUS9$ )N)r#  )r   is_requiredr   r	   r   validater   r   r   r#  s       rM    _validate_value_with_model_fieldr(    sY     }''))1c:;;;EMM*B..>>%S>11r]   c                 N    [        S U R                  R                   5       5      $ )Nc              3   D   #    U  H  n[        U5      [        L v   M     g 7fr   )r   r3   ).0items     rM   	<genexpr>!_is_json_field.<locals>.<genexpr>  s     H.GdtDzT!.Gs    )anyr   metadatar   s    rM   _is_json_fieldr1    s    He.>.>.G.GHHHr]   r   c                 r   U=(       d    [        U 5      n[        U 5      (       dQ  [        U R                  R                  5      (       a-  [        U[        [        45      (       a  UR                  U5      nOUR                  US 5      nUbw  [        U R                  [        R                  5      (       a  [        U[        5      (       a  US:X  d3  [        U R                  R                  5      (       aD  [        U5      S:X  a5  U R                  R                  5       (       a  g [        U R                   5      $ U$ )N r   )get_validation_aliasr1  r   r   r   rW   r8   r7   getlistr  r   r   r   r~   r%  r	   r   )r   r   r   r   s       rM   _get_multidict_valuer6    s     0)%0EE""()9)9)D)DEEv 2G<==u%

5$'u''555#&& ))9)9)D)DEEE
a ''))EMM**Lr]   received_paramsc                    0 n/ nU (       d  X#4$ U S   nU nSnSn[        U 5      S:X  aa  [        UR                  R                  [        5      (       a8  [        UR                  R                  5      nSn[        UR                  SS5      n0 n[        5       n	U H  n
S n[        U[        5      (       aJ  [        U
R                  SU5      nU(       a,  [        U
5      nXR                  :X  a  UR                  SS5      n[        XUS9nUb  X[        U
5      '   U	R                  U=(       d    [        U
5      5        M     UR                  5        Hr  nX;  d  M
  [!        US	5      (       aD  UR#                  U5      n[        U[$        5      (       a  [        U5      S:X  a	  US   X'   MY  XU'   M_  UR'                  U5      X'   Mt     U(       ag  UR                  n[        U[(        R*                  5      (       d   S
5       eUR,                  R.                  4n[1        XHUUS9u  nnUR                  U0U4$ U  H  n
[        X5      nU
R                  n[        U[(        R*                  5      (       d   S
5       eUR,                  R.                  [        U
5      4n[1        XUUS9u  nnU(       a  UR3                  U5        M  UX*R                  '   M     X#4$ )Nr   FTr}   r   r   r   )r   r5  z"Params must be subclasses of Paramr'  )r~   r$   r   r   r2   r   r   setrW   r7   r4  ri   r   r6  addkeyshasattrr5  r   r  r   r   r   r   r(  rZ   )r{   r7  r   r   r   r   single_not_embedded_fielddefault_convert_underscoresparams_to_processprocessed_keysr   r   r   r   keyr   r#  v_errors_s                      rM   r  r    s     F#%F~)K %"&
6{a.))9  4K4J4J4U4UV$(! '.""$94'
# )+UN"ow// #*  "79T# #,U3JJ&!MM#s3E$U5I=B259:5?$8$?@ #" ##%$	22'//4eT**E
a-21X%*-2c*)8)<)<S)A!& & ! ++
*fll33 	
0	
3 !+ 4 466v3
G   "%w..$U<%%
*fll33 	
0	
3 ~~##%9%%@A6V
G MM'"!#F::  >r]   
field_typec                     SSK Jn  [        U 5      nU[        La  X!La  g[	        U 5      nU H  n[        U[        5      (       a  M    g   g)zJCheck if field type is a Union where all members are BaseModel subclasses.r   )	UnionTypeFT)fastapi.typesrF  r   r   r   r$   r2   )rD  rF  origin
union_argsr   s        rM   is_union_of_base_modelsrJ  D  sJ    '
#F Uv6*%J!#y11  r]   c                    U (       d  gU  Vs1 s H  oR                   iM     nn[        U5      S:  a  gU S   n[        UR                  SS 5      (       a  g[	        UR                  [
        R                  5      (       aN  [        UR                  R                  [        5      (       d%  [        UR                  R                  5      (       d  ggs  snf )NFr}   Tr   embed)ri   r~   r   r   rW   r   r   r$   r   r2   rJ  )r{   r   body_param_names_setr   s       rM   _should_embed_body_fieldsrN  W  s     5;;F5JJF;
 1$)K{%%w55 	;))6;;77";#9#9#D#DiPP'(>(>(I(IJJ! <s   Cr  r  c                   #    0 nU  GHD  n[        X15      nUR                  n[        U[        R                  5      (       aR  [        UR                  R                  5      (       a.  [        U[        5      (       a  UR                  5       I S h  vN nO[        UR                  R                  5      (       a  [        U[        R                  5      (       ab  [        U5      (       aR  [        U[        5      (       d   e/ nU H*  nUR                  UR                  5       I S h  vN 5        M,     [        X6S9nUc  GM7  XB[        U5      '   GMG     U  Vs1 s H  n[        U5      iM     nnUR                  5        H7  n	X;  d  M
  UR!                  U	5      n
[#        U
5      S:X  a	  U
S   X)'   M3  XU	'   M9     U$  GN+ Ns  snf 7f)N)r   r   r}   r   )r6  r   rW   r   r   r   r   r:   readr    r'   r%   rr   r&   r4  r;  r5  r~   )r  r  r   r   r   r   results	sub_valuefield_aliasesrA  param_valuess              rM   _extract_form_bodyrU  o  su     F$U:%%
z6;;//4U5E5E5P5PQQ5*--**,&E()9)9)D)DEE:v{{33!%(( e^4444)+G"	Y^^%556 #,5HE27'./+ , ?JJkU)%0kMJ!!##(005L< A%*1o*s $ M- '  6 KsC   BGF8BG"F;#G>GF=)G4G;G=Gc                   #    0 n/ nU (       d   S5       e[        U 5      S:H  =(       a    U(       + nU S   nUnU nU(       a]  [        UR                  R                  [        5      (       a4  [        U[        5      (       a  [        UR                  R                  5      n[        U[        5      (       a  [        X5      I S h  vN nU(       a  Sn	[        XgX9S9u  pUR                  U
0U4$ U  Hd  nS[        U5      4n	S nUb   UR                  [        U5      5      n[        XX9S9u  pU(       a  UR!                  U5        MV  XUR                  '   Mf     X44$  N! [         a    UR                  [        U	5      5         M  f = f7f)Nz3request_body_to_args() should be called with fieldsr}   r   )r   r'  r   )r~   r$   r   r   r2   rW   r6   r   rU  r(  ri   r4  r  AttributeErrorrr   r   rZ   )r  r  r  r   r   r=  r   body_to_processr   r#  rB  rC  r   r   s                 rM   r  r    s    
  F#%FMMM; #K 0A 5 O>O:Oa.K#O*5 	"{55@@)LL}h//3K4J4J4U4UV-** 23D TT (6V
   "%w..+E23 &'++,@,GH
 7V
 MM'"!#5::! " >3 U " 5c:;s7   B?FEA FE<F$F>FFFrx   c           
         U R                   (       d  gU R                   S   nU(       d  U$ SU-   n[        U R                   US9n[        S U R                    5       5      nUSS.nU(       d  SUS'   [        S	 U R                    5       5      (       a  [        R                  nO[        S
 U R                    5       5      (       a  [        R
                  nO[        R                  nU R                    V	s/ s HD  n	[        U	R                  [        R                  5      (       d  M.  U	R                  R                  PMF     n
n	[        [        U
5      5      S:X  a  U
S   US'   [        SUSU" S0 UD6S9nU$ s  sn	f )a{  
Get a ModelField representing the request body for a path operation, combining
all body parameters into a single field if necessary.

Used to check if it's form data (with `isinstance(body_field, params.Form)`)
or JSON and to generate the JSON Schema for a request body.

This is **not** used to validate/parse the request body, that's done with each
individual body parameter.
Nr   Body_)r{   
model_namec              3   f   #    U  H'  oR                   R                  5       (       d  M#  S v   M)     g7f)TN)r   r%  r+  fs     rM   r-  !get_body_field.<locals>.<genexpr>  s#      0LL4L4L4N0s   "1	1r   )r   r   r   c              3   j   #    U  H)  n[        UR                  [        R                  5      v   M+     g 7fr   )rW   r   r   r   r]  s     rM   r-  r_    s$     
U:TQ:allFKK00:T   13c              3   j   #    U  H)  n[        UR                  [        R                  5      v   M+     g 7fr   )rW   r   r   r   r]  s     rM   r-  r_    s$     W<VqZfkk22<Vra  r}   
media_type)ri   r   r   r   rq   )rh   r   r/  r   r   r   r   rW   r   rc  r~   r9  r0   )rx   ri   r  first_paramr[  	BodyModelrequiredBodyFieldInfo_kwargsBodyFieldInfor^  body_param_media_typesfinal_fields               rM   get_body_fieldrk    sf    %% ,,Q/K4J!))jI  $00 H  , *.Y'

U.:T:T
UUU+1;;	WN<V<VW	W	W $//"
/!,,4 $ALL##/ 	 "

 s)*+q01G1J .$ 8#78	K "
s   3-E4$E4c                 F    [        U SS 5      nU=(       d    U R                  $ )Nvalidation_alias)r   r   )r   vas     rM   r4  r4    s     	*D	1Br]   )r@   Nr   ){r   r   r   collections.abcr   r   r   
contextlibr   r   r   r	   r
   typingr   r   r   r   r   r   r   r   fastapir   fastapi._compatr   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   fastapi.backgroundr(   fastapi.concurrencyr)   r*   fastapi.dependencies.modelsr+   fastapi.exceptionsr,   fastapi.loggerr-   fastapi.security.oauth2r.   rG  r/   fastapi.utilsr0   r1   pydanticr2   r3   pydantic.fieldsr4   starlette.backgroundr   starlette.concurrencyr5   starlette.datastructuresr6   r7   r8   r9   r:   starlette.requestsr;   r<   starlette.responsesr=   starlette.websocketsr>    typing_inspection.typing_objectsr?   rL   rJ   rN   r   r   r\   boolr   rv   r   r   r   r   r   r   r   r   r[   r   r   r   r   r   r   r  tupler(  r1  r6  r  rJ  rN  rU  r  rk  r4  rq   r]   rM   <module>r     s     
 7 7 5  !	 	 	      , / 2 3 ! 2 , B $ % L 3  7 ( * =% % "H6 c i $ /3,033 3 $%,	3
 cT)3 3l	j)9 	d:>N 	Fy FT*-= F#s(+ 0A0A hsCx0 W5F5F "S DcN s 	6hsCx&8 	6S 	6  )-,037H
H 38
H *	H
 3i$&H cT)H H ()D0H HV),9B	D[0   fWfW fW 	fW
 fW fWR.* . .t . //$2/@DS#X// 4 4 4 .28< $04=AIy I I sCx.8
#d
*	I
 /5I oI $':I -s23d:I %I I IX22!$2.238n2CHc?2
3S	>2I* I I
 GK&sCx09<t>RZ RS#X&4w>R 4S>49$%Rj  &d:&6 4 0$j!$$ 
#s(^$N/j!/S>H,t3/ / 4S>4S#X//0	/d3 3(+3@D3$3l
 s r]   