
    .iH              :      8   d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl	m
Z
 d dlmZ d dlmZmZmZ d dlZd dlZd dlmZ d dlmZmZmZmZmZmZmZmZmZmZm Z  d dl!m"Z" d d	l#m$Z$m%Z%  ejL                   e' ejP                                     Z) ejL                   e' ejP                                     Z* ejL                  e      Z+dd
Z,dZ- ej\                  d      Z/ddZ0 ejb                  ddi       ejd                  dd       ejf                  de4ddd       ejf                  de5ddd       ejf                  de4dd       ejf                  de5dd        ejf                  d!dd"d#$       ejf                  d%d&dd' ejl                  d(      )       ejf                  d*d+dd,-       ejf                  d.d/dd0-       ejf                  d1e7d2dd34       ejf                  d5de5d67       ejf                  d8e4 e,e      d9d:d;       ejf                  d<e4 e,e      d9d=d;       ejf                  d>e4 e,e       d9d?d;       ejf                  d@e5dAdBd       ejf                  dCe5dDdEd       ejf                  dFe7dGdHd       ejf                  dIe7dGdJd       ejf                  dKe8ddLd       ejf                  dMe*d9dNd       ejf                  dOe+d9dPd       ejf                  dQ ejl                  d(      ddRd       ejf                  dS ejl                  d(      ddTd       ejf                  dUe)ddVd       ejf                  dWdddX$       ejf                  dYdddZ$       ejf                  d[ddd\$       ejf                  d]ddd^$       ejf                  d_ddd`$       ejf                  dae4ddb       ejf                  dce4ddde       ejf                  dfe5ddg       ejf                  dhe5didj       ejf                  dke5ddl       ejf                  dme5d dnd       ejf                  doe5dpdqd       ejf                  dre5dds       ejf                  dte5dpdud       ejf                  dve4ddwd       ejf                  dxe4ddyd       ejf                  dze4dd{d       ejf                  d|e5 e5e      d}d       ejf                  d~e5 e5ejr                        dd       ejf                  de4ddd       ejf                  de4ddd       ejf                  dddd-       ejf                  dde0d"dd       ejf                  ddddd       ejf                  dde5dd       ejf                  ddd"dd       ejf                  ddd"dd      	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 dd                                                                                                                                                                                                                                                                                                                                                                            Z:ddddd9d9d9dAdDdGdGdd9d9d"dddd2ddeddddddddddidd dpddpdddeejr                  dddddd"dd"d1	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 ddZ;ddZ<e=dk(  r e:        yy)    )annotationsN)Callable)RawConfigParser)IOAnyget_args)ASGIApplication)
INTERFACESLIFESPAN
LOG_LEVELSLOGGING_CONFIGSSL_PROTOCOL_VERSIONConfigHTTPProtocolTypeInterfaceTypeLifespanTypeLoopFactoryTypeWSProtocolType)Server)ChangeReloadMultiprocessc                L    ddj                  d t        |       D               dS )N[|c              3  ,   K   | ]  }|d k7  s	|  yw)noneN ).0keys     >/root/launch/venv/lib/python3.12/site-packages/uvicorn/main.py	<genexpr>z%_metavar_from_type.<locals>.<genexpr>(   s     H#-Hs   
])joinr   )_types    r    _metavar_from_typer%   '   s%    sxxHxHHIKK       uvicorn.errorc           	        |r| j                   ry t        j                  dj                  t        j
                  t        j                         t        j                         t        j                                      | j                          y )NzKRunning uvicorn {version} with {py_implementation} {py_version} on {system})versionpy_implementation
py_versionsystem)resilient_parsingclickechoformatuvicorn__version__platformpython_implementationpython_versionr-   exit)ctxparamvalues      r    print_versionr;   0   sf    C))	JJU\\''&<<>..0??$	 	] 	
 HHJr&   auto_envvar_prefixUVICORN)context_settingsappUVICORN_APP)envvarz--hostz	127.0.0.1zBind socket to this host.T)typedefaulthelpshow_defaultz--porti@  zABind socket to this port. If 0, an available port will be picked.z--udszBind to a UNIX domain socket.)rB   rC   rD   z--fdz)Bind to socket from this file descriptor.z--reloadFzEnable auto-reload.)is_flagrC   rD   z--reload-dirreload_dirszRSet reload directories explicitly, instead of using the current working directory.)exists)multiplerD   rB   z--reload-includereload_includeszSet glob patterns to include while watching for files. Includes '*.py' by default; these defaults can be overridden with `--reload-exclude`. This option has no effect unless watchfiles is installed.)rI   rD   z--reload-excludereload_excludeszSet glob patterns to exclude while watching for files. Includes '.*, .py[cod], .sw.*, ~*' by default; these defaults can be overridden with `--reload-include`. This option has no effect unless watchfiles is installed.z--reload-delayg      ?zTDelay between previous and next check if application needs to be. Defaults to 0.25s.)rB   rC   rE   rD   z	--workersz~Number of worker processes. Defaults to the $WEB_CONCURRENCY environment variable if available, or 1. Not valid with --reload.)rC   rB   rD   z--loopautoz"Event loop factory implementation.)rB   metavarrC   rD   rE   z--httpzHTTP protocol implementation.z--wsz"WebSocket protocol implementation.z--ws-max-sizei   z#WebSocket max size message in bytesz--ws-max-queue    z2The maximum length of the WebSocket message queue.z--ws-ping-intervalg      4@z#WebSocket ping interval in seconds.z--ws-ping-timeoutz"WebSocket ping timeout in seconds.z--ws-per-message-deflatez)WebSocket per-message-deflate compressionz
--lifespanzLifespan implementation.z--interfacez:Select ASGI3, ASGI2, or WSGI as the application interface.z
--env-filezEnvironment configuration file.z--log-configzBLogging configuration file. Supported formats: .ini, .json, .yaml.z--log-levelzLog level. [default: info]z--access-log/--no-access-logzEnable/Disable access log.z--use-colors/--no-use-colorsz!Enable/Disable colorized logging.z"--proxy-headers/--no-proxy-headerszaEnable/Disable X-Forwarded-Proto, X-Forwarded-For to populate url scheme and remote address info.z"--server-header/--no-server-headerz%Enable/Disable default Server header.z--date-header/--no-date-headerz#Enable/Disable default Date header.z--forwarded-allow-ipszComma separated list of IP Addresses, IP Networks, or literals (e.g. UNIX Socket path) to trust with proxy headers. Defaults to the $FORWARDED_ALLOW_IPS environment variable if available, or '127.0.0.1'. The literal '*' means trust everything.z--root-path zLSet the ASGI 'root_path' for applications submounted below a given URL path.z--limit-concurrencyz^Maximum number of concurrent connections or tasks to allow, before issuing HTTP 503 responses.z	--backlogi   z0Maximum number of connections to hold in backlogz--limit-max-requestszEMaximum number of requests to service before terminating the process.z--limit-max-requests-jitterzuMaximum jitter to add to limit_max_requests. Staggers worker restarts to avoid all workers restarting simultaneously.z--timeout-keep-alive   zYClose Keep-Alive connections if no new data is received within this timeout (in seconds).z--timeout-graceful-shutdownz8Maximum number of seconds to wait for graceful shutdown.z--timeout-worker-healthcheckzKMaximum number of seconds to wait for a worker to respond to a healthcheck.z--ssl-keyfilezSSL key filez--ssl-certfilezSSL certificate filez--ssl-keyfile-passwordzSSL keyfile passwordz--ssl-versionz,SSL version to use (see stdlib ssl module's)z--ssl-cert-reqsz@Whether client certificate is required (see stdlib ssl module's)z--ssl-ca-certszCA certificates filez--ssl-ciphersTLSv1z(Ciphers to use (see stdlib ssl module's)z--headerheaderszASpecify custom default HTTP response headers as a Name:Value pairz	--versionz%Display the uvicorn version and exit.)rF   callbackexpose_valueis_eagerrD   z	--app-dirzuLook for APP in the specified directory, by adding this to the PYTHONPATH. Defaults to the current working directory.)rC   rE   rD   z--h11-max-incomplete-event-sizeh11_max_incomplete_event_sizezFFor h11, the maximum number of bytes to buffer of an incomplete event.z--reset-contextvarszXRun each ASGI request in a fresh contextvars.Context. Hides context set in the lifespan.)rF   rC   rD   rE   z	--factoryzFTreat APP as an application factory, i.e. a () -> <ASGI app> callable.c2                   t        | fi d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|t        n|d|d|d|d|d|xs d d|xs d d|xs d d|d|d|d|d|d|d|d|d|d | d!|!d"|"d#|#d$|$d%|%d&|&d'|'d(|(d)|)d*|*d+|+d,|,D 2cg c]  }2|2j                  d-d.       c}2d/|-d0|1d1|.d2|/d3|0 y c c}2w )4Nhostportudsfdloophttpwsws_max_sizews_max_queuews_ping_intervalws_ping_timeoutws_per_message_deflatelifespanenv_file
log_config	log_level
access_log	interfacereloadrG   rJ   rK   reload_delayworkersproxy_headersserver_headerdate_headerforwarded_allow_ips	root_pathlimit_concurrencybackloglimit_max_requestslimit_max_requests_jittertimeout_keep_alivetimeout_graceful_shutdowntimeout_worker_healthcheckssl_keyfilessl_certfilessl_keyfile_passwordssl_versionssl_cert_reqsssl_ca_certsssl_ciphersrR   :   
use_colorsfactoryapp_dirrV   reset_contextvars)runr   split)3r?   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   ri   rj   rG   rJ   rK   rk   rl   re   rf   rg   rh   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   rR   r   r   rV   r   r   headers3                                                      r    mainr   >   sU   v 33 3 	3
 3 3 3 3  3 "3 *3 (3  63 3 3  &0%7>Z!3" #3$ %3& '3( )3*  '4+3, (/4-3. (/4/30 "132 334 $536 $738  93: 0;3< =3> ,?3@ A3B .C3D #<E3F .G3H #<I3J $>K3L  M3N "O3P 2Q3R  S3T $U3V "W3X  Y3Z 5<<&c1%<[3\ ]3^ _3` a3b 'Dc3d ,e3Z =s   #C)1rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   ri   rj   rG   rJ   rK   rk   rl   re   rf   rg   rh   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   rR   r   r   r   rV   r   c       1           |. t         j                  j                  d|.       t        | fi d|d|d|d|d|d|d|d	|d
|	d|
d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d |d!| d"|!d#|"d$|#d%|$d&|%d'|&d(|'d)|(d*|)d+|*d,|+d-|,d.|-d/|/d0|0d1|1}2t	        |22      }3|2j
                  s|2j                  d3kD  rKt        | t              s;t        j                  d4      }4|4j                  d5       t        j                  d3       	 |2j                  r8|2j                         }5t        |2|3j                   |5g6      j!                          nW|2j                  d3kD  r8|2j                         }5t#        |2|3j                   |5g6      j!                          n|3j!                          |2j&                  rIt(        j                  j+                  |2j&                        r t)        j,                  |2j&                         	 |3j.                  s7|2j                  s*|2j                  d3k(  rt        j                  t0               y y y y # t$        $ r Y w xY w# |2j&                  rJt(        j                  j+                  |2j&                        r t)        j,                  |2j&                         w w w xY w)7Nr   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   ri   rj   rG   rJ   rK   rk   rl   re   rf   rg   rh   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   rR   r   r   rV   r   )configr   r(   zRYou must pass the application as an import string to enable 'reload' or 'workers'.)targetsockets)syspathinsertr   r   rj   rl   
isinstancestrlogging	getLoggerwarningr7   should_reloadbind_socketr   r   r   KeyboardInterruptrZ   osrH   removestartedSTARTUP_FAILURE)6r?   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   ri   rj   rG   rJ   rK   rk   rl   re   rf   rg   rh   rm   rn   ro   rp   rq   rr   rs   rt   ru   rv   rw   rx   ry   rz   r{   r|   r}   r~   r   rR   r   r   r   rV   r   r   serverloggersocks6                                                         r    r   r     s   j 7#22 2 	2
 2 2 2 2  2 "2 *2 (2  62 2 2  !2"  #2$ (%2& ('2( ")2* +2, -2. /20 122 324 $526 $728  92: 0;2< =2> ,?2@ A2B .C2D #<E2F .G2H #<I2J $>K2L  M2N "O2P 2Q2R  S2T $U2V "W2X  Y2Z [2\ ]2^ _2` 'Da2b ,c2Ff 6"F!+ZS5I""?3kl"%%'D

TFCGGI^^a%%'D

TFCGGIJJL ::"''..4IIfjj!>>&"6"66>>Q;N! <O"6>   ::"''..4IIfjj! 5:s&   0BI$ $	I0-I3 /I00I3 3AKc                z    | dk(  r"t        j                  dt               ddlm} |S t        dt         d|        )NServerStatezOuvicorn.main.ServerState is deprecated, use uvicorn.server.ServerState instead.r   )r   zmodule z has no attribute )warningswarnDeprecationWarninguvicorn.serverr   AttributeError__name__)namer   s     r    __getattr__r   t  s@    }]	
 	/
78*,>tfE
FFr&   __main__)r$   r   returnr   )r8   zclick.Contextr9   zclick.Parameterr:   boolr   None)fr?   r   rX   r   rY   intrZ   r   r[   r   r\   LoopFactoryType | strr]   zHTTPProtocolType | strr^   zWSProtocolType | strr_   r   r`   r   ra   floatrb   r   rc   r   rd   r   ri   r   rj   r   rG   	list[str]rJ   r   rK   r   rk   r   rl   r   re   r   rf   r   rg   r   rh   r   rm   r   rn   r   ro   r   rp   r   rq   r   rr   r   rs   r   rt   r   ru   r   rv   r   rw   
int | Nonerx   r   ry   r   rz   r   r{   r   r|   r   r}   r   r~   r   r   r   rR   r   r   r   r   r   rV   r   r   r   r   r   r   r   )fr?   z*ASGIApplication | Callable[..., Any] | strrX   r   rY   r   rZ   
str | Noner[   r   r\   r   r]   z/type[asyncio.Protocol] | HTTPProtocolType | strr^   z-type[asyncio.Protocol] | WSProtocolType | strr_   r   r`   r   ra   float | Nonerb   r   rc   r   rd   r   ri   r   rj   r   rG   list[str] | str | NonerJ   r   rK   r   rk   r   rl   r   re   str | os.PathLike[str] | Nonerf   zJdict[str, Any] | str | os.PathLike[str] | RawConfigParser | IO[Any] | Nonerg   zstr | int | Nonerh   r   rm   r   rn   r   ro   r   rp   r   rq   r   rr   r   rs   r   rt   r   ru   r   rv   r   rw   r   rx   r   ry   r   rz   r   r{   r   r|   r   r}   r   r~   r   r   r   rR   zlist[tuple[str, str]] | Noner   zbool | Noner   r   r   r   rV   r   r   r   r   r   )r   r   r   r   )>
__future__r   asyncior   r   r4   sslr   r   collections.abcr   configparserr   typingr   r   r   r/   r2   uvicorn._typesr	   uvicorn.configr
   r   r   r   r   r   r   r   r   r   r   r   r   uvicorn.supervisorsr   r   ChoicelistkeysLEVEL_CHOICESLIFESPAN_CHOICESINTERFACE_CHOICESr%   r   r   r   r;   commandargumentoptionr   r   Pathr   r   	CERT_NONEr   r   r   r   r   r&   r    <module>r      sv   "   	  
 
  $ ( $ $   *    " :T/*//"3455<<]X]]_ 56  ELL, L 			?	+ !5y ABm,		$ 		L gC4STf33^_j$<QR	]	4	  
@	 
	 		_ 	
=	 	/	- 	/0	( 
	~.	- 		. 		= 		. 		- 		4 		# 		E 	4	 	* 	4	 	M 		% "	%	 "	,	 (	l	 (	0	 $	.	 	
.	 		W	 		i	 		;	 		P	 !	
P 		d !		C	 "		V oCNY]^		 		 	$%	7 		K 		 		3 	L	 	0 
2	 %#		Q 	c 	Qg	g
g g 
	g
 	g  g !g 	g g g g g !g g g  !g" #g$ %g& 'g( )g* +g, -g. /g0 1g2 3g4 5g6 7g8 9g: ;g< =g> ?g@ AgB CgD  #EgF GgH  *IgJ !$KgL MgN OgP QgR SgT UgV WgX YgZ [g\ ]g^ _g` $.agb cgd egf 
gg _ S ` U - CN
gZ "(<B8>%)$(#'#%*..2.2.2]k"&26$(%)%&,0&'1526'++26,0"04#gB"	3B" B" 	B"
 
B" 	B"  B" :B" 	6B" B" B" #B" "B" !B" B"  !B"" #B"$ (%B"& ,'B"( ,)B"* +B", -B". ,/B"0 [1B"2  3B"4 5B"6 7B"8 9B": ;B"< 0=B"> ?B"@ "AB"B CB"D #EB"F  #GB"H IB"J  *KB"L !$MB"N /OB"P 0QB"R %SB"T UB"V WB"X 0YB"Z [B"\ *]B"^ _B"` aB"b cB"d $.eB"f gB"h 
iB"J	G zF r&   