
    q*iE              )       D   S SK r S SKrS SKrS SKrS SKrS SKrS SKJr  S SKJ	r	  S SK
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  SSKJr  SS	KJr  SS
KJr  SSK J!r!  SSK"J#r#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/J0r0J1r1J2r2J3r3J4r4J5r5J6r6J7r7J8r8J9r9J:r:J;r;J<r<J=r=J>r>J?r?J@r@JArAJBrBJCrCJDrDJErEJFrFJGrGJHrHJIrIJJrJJKrKJLrLJMrMJNrNJOrOJPrPJQrQJRrRJSrSJTrTJUrUJVrVJWrWJXrXJYrYJZrZJ[r[J\r\J]r]J^r^J_r_J`r`  SSKaJbrb  SSKcJdrd  SSKeJfrfJgrg  SSKhJiriJjrjJkrk  SSKlJmrmJnrnJoro  SSKpJqrqJrrrJsrsJtrt  SSKuJvrvJwrwJxrxJyryJzrzJ{r{J|r|J}r}J~r~JrJrJrJrJr  SSKJrJrJrJrJrJrJrJrJr  SSKJr  SSKJrJrJrJrJrJrJrJrJrJrJr  SSKJrJrJr  Sr\(       a  S SKJr  O S SKJr  \GRJ                  " S\`SS9  \\   rSSSSS\SSSS.	S \\#\\#   4   S!\\\\4      S"\\   S#\\!\\!   S4   S$\\\R                  \\R                     4      S%\\   S&\\S'      S(\S)\\   S*\\   S+\S,S4S- jjrS.\S/   S0\ GRX                  S,S4S1 jrSSSSS2S3S\S\d\dGR\                  \SSSS4SS5.S \\#\\#   4   S!\\\\4      S"\\   S#\\!\\!   S4   S$\\\R                  \\R                     4      S6\S7\S%\\   S&\\S'      S(\S8\\   S9\S:\\GR`                     S;\S)\\   S*\\   S<\S0\\ GRX                     S+\S,S4(S= jjrS>\\   S,S4S? jr\S@:X  a  \" \GRh                  SS 5        gg! \ a    \r GNf = f)A    N)ArgumentParser)Iterable)suppress)import_module)TYPE_CHECKINGAny	AwaitableCallabler   ListOptionalSetTypeUnioncast   )AbstractAccessLogger)AppKey)access_logger)PathLike)ApplicationCleanupError);HTTPAcceptedHTTPBadGatewayHTTPBadRequestHTTPClientErrorHTTPConflictHTTPCreated	HTTPErrorHTTPExceptionHTTPExpectationFailedHTTPFailedDependencyHTTPForbidden	HTTPFoundHTTPGatewayTimeoutHTTPGoneHTTPInsufficientStorageHTTPInternalServerErrorHTTPLengthRequiredHTTPMethodNotAllowedHTTPMisdirectedRequestHTTPMoveHTTPMovedPermanentlyHTTPMultipleChoices!HTTPNetworkAuthenticationRequiredHTTPNoContentHTTPNonAuthoritativeInformationHTTPNotAcceptableHTTPNotExtendedHTTPNotFoundHTTPNotImplementedHTTPNotModifiedHTTPOkHTTPPartialContentHTTPPaymentRequiredHTTPPermanentRedirectHTTPPreconditionFailedHTTPPreconditionRequiredHTTPProxyAuthenticationRequiredHTTPRedirectionHTTPRequestEntityTooLargeHTTPRequestHeaderFieldsTooLargeHTTPRequestRangeNotSatisfiableHTTPRequestTimeoutHTTPRequestURITooLongHTTPResetContentHTTPSeeOtherHTTPServerErrorHTTPServiceUnavailableHTTPSuccessfulHTTPTemporaryRedirectHTTPTooManyRequestsHTTPUnauthorizedHTTPUnavailableForLegalReasonsHTTPUnprocessableEntityHTTPUnsupportedMediaTypeHTTPUpgradeRequiredHTTPUseProxyHTTPVariantAlsoNegotiatesHTTPVersionNotSupportedNotAppKeyWarning)FileResponse)AccessLogger)
middlewarenormalize_path_middleware)PayloadAccessErrorRequestHandlerRequestPayloadError)BaseRequest	FileFieldRequest)ContentCodingResponseStreamResponsejson_response)AbstractRouteDefRouteDefRouteTableDef	StaticDefdeletegetheadoptionspatchpostputroutestaticview)		AppRunner
BaseRunnerBaseSiteGracefulExitNamedPipeSiteServerRunnerSockSiteTCPSiteUnixSite)Server)AbstractResourceAbstractRouteDynamicResourcePlainResourcePrefixedSubAppResourceResourceResourceRouteStaticResourceUrlDispatcherUrlMappingMatchInfoView)WebSocketReadyWebSocketResponse	WSMsgType)rr   r   r   rR   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rS   rU   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rt   ru   rv   rw   rs   rx   ry   rz   r{   r|   r}   r~   r   r   r   r   r   r   r   r   run_app)
SSLContextignoreT)categoryappend   )	hostportpathsockssl_contextprintbacklogreuse_address
reuse_portappr   r   r   r   r   r   ).Nr   r   r   kwargsreturnc       	           #    [         R                  " U 5      (       a
  U I S h  vN n [        [        U 5      n [	        U 40 U
D6nUR                  5       I S h  vN   / n Ub\  [        U[        5      (       a  UR                  [        UUUUUUU	S95        ONU H!  nUR                  [        UUUUUUU	S95        M#     O&Uc  Ub  Ub  UR                  [        UUUUUU	S95        Ube  [        U[        [        R                  45      (       a  UR                  [        UUUUS95        O$U H  nUR                  [        UUUUS95        M      UbU  [        U[        5      (       d  UR                  [        UUUUS95        O$U H  nUR                  [        UUUUS95        M      U H  nUR                  5       I S h  vN   M     U(       aB  [!        S UR"                   5       5      nU" SR%                  SR'                  U5      5      5         [         R(                  " S5      I S h  vN   M    GN GN Nx N! UR+                  5       I S h  vN    f = f7f)N)r   r   r   r   )r   r   r   r   r   )r   r   c              3   L   #    U  H  n[        UR                  5      v   M     g 7f)N)strname).0ss     K/var/www/html/land-doc-ocr/venv/lib/python3.13/site-packages/aiohttp/web.py	<genexpr>_run_app.<locals>.<genexpr>  s     =13qvv;;s   "$z6======== Running on {} ========
(Press CTRL+C to quit)z, i  )asyncioiscoroutiner   r   ro   setup
isinstancer   r   rv   osr   rw   r   ru   startsortedsitesformatjoinsleepcleanup)r   r   r   r   r   r   r   r   r   r   r   runnerr   hpr   sitenamess                     r   _run_appr   1  s]     3i
{C
 Cs%f%F
,,.E^$$$$/ '&3#-
 ALL" (3$+*7'1
  \dld.>LL +#"/)	 $bkk 233$/ '	 ALL "(3$+	  dH--$/ '	 ALL "(3$+	  D**,  ===E))/		%0@)A --%%% K  j  &nnsk   !IH/3IH2IEH9 <H5=A+H9 (H7)H9 /I2I5H9 7H9 9IIII	to_cancelzasyncio.Task[Any]loopc                 <   U (       d  g U  H  nUR                  5         M     UR                  [        R                  " U SS065        U  HP  nUR	                  5       (       a  M  UR                  5       c  M-  UR                  SUR                  5       US.5        MR     g )Nreturn_exceptionsTz1unhandled exception during asyncio.run() shutdown)message	exceptiontask)cancelrun_until_completer   gather	cancelledr   call_exception_handler)r   r   r   s      r   _cancel_tasksr     s       	GNNINNO>>>>'''R!%!1 	     g      N@g     R@F)r   r   r   r   shutdown_timeoutkeepalive_timeoutr   r   r   access_log_classaccess_log_format
access_loghandle_signalsr   r   handler_cancellationr   r   r   r   r   r   r   r   c          	      v   Uc  [         R                  " 5       nUR                  5       (       a  U(       a  UR                  S:X  av  UR                  [
        R                  :X  a  UR                  [
        R                  5        UR                  5       (       d$  UR                  [
        R                  " 5       5        UR                  [        U 40 SU_SU_SU_SU_SU_SU_S	U_S
U_SU	_SU
_SU_SU_SU_SU_SU_SU_UD65      n [         R                  " U5        UR                  U5         UR%                  5         ['        [         R(                  5         UR                  U5        SSS5        [+        [         R,                  " U5      U5        UR                  UR/                  5       5        UR1                  5         g! [         ["        4 a     Nf = f! , (       d  f       Nt= f! [+        [         R,                  " U5      U5        UR                  UR/                  5       5        UR1                  5         f = f!  UR%                  5         ['        [         R(                  5         UR                  U5        SSS5        O! , (       d  f       O= f[+        [         R,                  " U5      U5        UR                  UR/                  5       5        UR1                  5         f ! [+        [         R,                  " U5      U5        UR                  UR/                  5       5        UR1                  5         f = f= f)zRun an app locallyNzaiohttp.accessr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r   new_event_loop	get_debugr   levelloggingNOTSETsetLevelDEBUGhasHandlers
addHandlerStreamHandlercreate_taskr   set_event_loopr   rr   KeyboardInterruptr   r   CancelledErrorr   	all_tasksshutdown_asyncgensclose)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   	main_tasks                       r   r   r     s   . |%%' ~~J:??>N+Nw~~-.%%''!!'"7"7"9:  	
	
 	
 		

 	
 .	
 0	
 $	
 	
 	
 .	
 0	
 "	
 *	
 (	
  "!	
" "6%	
I.t$	*	'001''	2 2 '++D148##D$;$;$=>JJL +, 
 21 '++D148##D$;$;$=>JJL	'001''	2 211 '++D148##D$;$;$=>JJL '++D148##D$;$;$=>JJLs{   'G /)G) G*G) GH= GH= 
G&"G) )AH:=L8?)K$(J:	K$
JK$AL8$AL55L8argvc                    [        SSS9nUR                  SSSS9  UR                  SS	S
S S9  UR                  SSS[        SS9  UR                  SSSS9  UR                  U 5      u  p#UR                  R                  S5      u  pEnU(       a  U(       d  UR                  S5        UR                  S5      (       a  UR                  S5         [        U5      n [        WU5      n	UR                  b&  [        [        S5      (       d  UR                  S5        [        R                   " [        R"                  S9  UR                  (       a  UR$                  c  S =pO!UR$                  =(       d    S n
UR&                  nW	" U5      n[)        XXR                  S!9  UR+                  S"S#9  g ! [         a!  nUR                  SU SU 35         S nANS nAff = f! [         a    UR                  SU< SU< 35         GNf = f)$Nzaiohttp.web Application serverzaiohttp.web)descriptionprog
entry_funczvCallable returning the `aiohttp.web.Application` instance to run. Should be specified in the 'module:function' syntax.z
entry-func)helpmetavarz-Hz
--hostnamez0TCP/IP hostname to serve on (default: localhost))r   defaultz-Pz--portz.TCP/IP port to serve on (default: %(default)r)i  )r   typer   z-Uz--pathz_Unix file system path to serve on. Can be combined with hostname to serve on both Unix and TCP.)r   :z,'entry-func' not in 'module:function' syntax.z#relative module names not supportedzunable to import z: zmodule z has no attribute AF_UNIXz=file system paths not supported by your operating environment)r   	localhost)r   r   r   zStopped
)r   )r   add_argumentintparse_known_argsr   	partitionerror
startswithr   ImportErrorgetattrAttributeErrorr   hasattrsocketr   basicConfigr   hostnamer   r   exit)r   
arg_parserargs
extra_argvmod_str_func_strmoduleexfuncr   r   r   s                r   mainr     s   4=J H    ?	   =   )   "2248D  ??44S9G7GH#>?>w'Nvx(
 yyWVY%?%?K	
 gmm,yyT]]*t}}+yy
z
CCII6OOKO(/  >,WIRt<==>  N77+-?|LMNs*   F* G *
G4GG#G?>G?__main__)r   r   r   r   syswarningsargparser   collections.abcr   
contextlibr   	importlibr   typingr   r   r	   r
   TypingIterabler   r   r   r   r   r   abcr   helpersr   logr   typedefsr   web_appr   r   web_exceptionsr   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   rE   rF   rG   rH   rI   rJ   rK   rL   rM   rN   rO   rP   rQ   rR   web_fileresponserS   web_logrT   web_middlewaresrU   rV   web_protocolrW   rX   rY   web_requestrZ   r[   r\   web_responser]   r^   r_   r`   web_routedefra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   
web_runnerro   rp   rq   rr   rs   rt   ru   rv   rw   
web_serverrx   web_urldispatcherry   rz   r{   r|   r}   r~   r   r   r   r   r   web_wsr   r   r   __all__sslr   r   objectfilterwarningsr   HostSequencer   r   boolr   AbstractEventLoopr   
LOG_FORMATfloatLoggerr   r   __name__r    r   r   <module>r'     sf     	  
  # $  #    & %   M< < < < < < < < < < < < < < < <z ; ! 
 
     
 
 
 )    @F "
 	  +;D Ic" 04<@JN(,+0$(!%x	{Ik22	3x 5l*+
,x 3-	x
 .2D8
9x 5v}}(EEF
Gx *%x HY'(x x D>x x x 
xv&'/6/H/H	6 04<@JN"#(,+03?)44+8$(!%!&04'E	{Ik22	3E 5l*+
,E 3-	E
 .2D8
9E 5v}}(EEF
GE E E *%E HY'(E E /0E E (E E  D>!E" #E$ %E& 7,,
-'E( )E* 
+EP@)tCy @)T @)F z!" O	  
s   
L LL