
    lϞiG              9         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      	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 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d0	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 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     N/var/www/html/jploft-chatbot/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	--factoryzFTreat APP as an application factory, i.e. a () -> <ASGI app> callable.)rF   rC   rD   rE   c1                   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 1cg c]  }1|1j                  d-d.       c}1d/|-d0|0d1|.d2|/ y c c}1w )3N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   )runr   split)2r?   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   headers2                                                     r    mainr   >   sI   f 22 2 	2
 2 2 2 2  2 "2 *2 (2  62 2 2  &0%7>Z!2" #2$ %2& '2( )2*  '4+2, (/4-2. (/4/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 5<<&c1%<[2\ ]2^ _2` a2b 'Dc2Z =s   #C)0rX   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   c       0           |. 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}1t	        |11      }2|1j
                  s|1j                  d2kD  rKt        | t              s;t        j                  d3      }3|3j                  d4       t        j                  d2       	 |1j                  r8|1j                         }4t        |1|2j                   |4g5      j!                          nW|1j                  d2kD  r8|1j                         }4t#        |1|2j                   |4g5      j!                          n|2j!                          |1j&                  rIt(        j                  j+                  |1j&                        r t)        j,                  |1j&                         	 |2j.                  s7|1j                  s*|1j                  d2k(  rt        j                  t0               y y y y # t$        $ r Y w xY w# |1j&                  rJt(        j                  j+                  |1j&                        r t)        j,                  |1j&                         w w w xY w)6Nr   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   )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)5r?   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   serverloggersocks5                                                        r    r   r     s   h 7#11 1 	1
 1 1 1 1  1 "1 *1 (1  61 1 1  !1"  #1$ (%1& ('1( ")1* +1, -1. /10 112 314 $516 $718  91: 0;1< =1> ,?1@ A1B .C1D #<E1F .G1H #<I1J $>K1L  M1N "O1P 2Q1R  S1T $U1V "W1X  Y1Z [1\ ]1^ _1` 'Da1Fd 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&   -BI! !	I-*I0 ,I--I0 0A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   i  s@    }]	
 	/
78*,>tfE
FFr&   __main__)r$   r   returnr   )r8   zclick.Contextr9   zclick.Parameterr:   boolr   None)dr?   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   )dr?   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   z7dict[str, Any] | 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   )>
__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      s5   "   	  
 
  $ ( $ $   *    " :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 	Qe	e
e e 
	e
 	e  e !e 	e e e e e !e e e  !e" #e$ %e& 'e( )e* +e, -e. /e0 1e2 3e4 5e6 7e8 9e: ;e< =e> ?e@ AeB CeD  #EeF GeH  *IeJ !$KeL MeN OeP QeR SeT UeV WeX YeZ [e\ ]e^ _e` $.aeb ced 
ee _ S ` U - C@
eV "(<B8>%)$(#'#%*..2.2.2JX"&26$(%)%&,0&'1526'++26,0"04e@"	3@" @" 	@"
 
@" 	@"  @" :@" 	6@" @" @" #@" "@" !@" @"  !@"" #@"$ (%@"& ,'@"( ,)@"* +@", -@". ,/@"0 H1@"2  3@"4 5@"6 7@"8 9@": ;@"< 0=@"> ?@"@ "A@"B C@"D #E@"F  #G@"H I@"J  *K@"L !$M@"N /O@"P 0Q@"R %S@"T U@"V W@"X 0Y@"Z [@"\ *]@"^ _@"` a@"b c@"d $.e@"f 
g@"F	G zF r&   