+
    O|j"  ã                  ó  € ^ RI Ht ^ RIt^ RIt^ RIt^ RIHtH	t	H
t
Ht ^RIHtHt ^RIHtHtHt . ROt ^ RIHt ^ RIHtHt R	RR
RRR/R R lltRR R llt ! R R4      tR#   ] d    R	RR
RRR/R R lltRR R llt L+i ; i)é    )ÚannotationsN)ÚAnyÚ	AwaitableÚCallableÚLiteral)ÚRequestÚResponse)ÚServerÚServerConnectionÚserveÚRouter)ÚNotFound)ÚMapÚRequestRedirectÚserver_nameÚsslÚcreate_routerc               ó4   € V ^8„  d   QhRRRRRRRRR	R
RRRR/# ©é   Úurl_mapr   Úargsr   r   ú
str | Noner   z,ssl_module.SSLContext | Literal[True] | Noner   ztype[Router] | NoneÚkwargsÚreturnr
   © )Úformats   "ÚRC:\Users\alokc\chatbot\backend\venv\Lib\site-packages\websockets/asyncio/router.pyÚ__annotate__r   (   sW   € ÷ r
ñ r
Øðr
àðr
ð  ðr
ð :ð	r
ð
 +ðr
ð ðr
ð 
ñr
ó    c               óè   aa	€ Vf   RMRpVRJd	   Ve   W%R&   Vf   \         pV! WV4      o	VP                  RR4      oSf   S	P                  pM
R VV	3R llp\        S	P                  .VO5RV/VB # )	a	  
Create a WebSocket server dispatching connections to different handlers.

This feature requires the third-party library `werkzeug`_:

.. code-block:: console

    $ pip install werkzeug

.. _werkzeug: https://werkzeug.palletsprojects.com/

:func:`route` accepts the same arguments as
:func:`~websockets.sync.server.serve`, except as described below.

The first argument is a :class:`werkzeug.routing.Map` that maps URL patterns
to connection handlers. In addition to the connection, handlers receive
parameters captured in the URL as keyword arguments.

Here's an example::

    from websockets.asyncio.router import route
    from werkzeug.routing import Map, Rule

    async def channel_handler(websocket, channel_id):
        ...

    url_map = Map([
        Rule("/channel/<uuid:channel_id>", endpoint=channel_handler),
        ...
    ])

    # set this event to exit the server
    stop = asyncio.Event()

    async with route(url_map, ...) as server:
        await stop.wait()

Refer to the documentation of :mod:`werkzeug.routing` for details.

If you define redirects with ``Rule(..., redirect_to=...)`` in the URL map,
when the server runs behind a reverse proxy that modifies the ``Host``
header or terminates TLS, you need additional configuration:

* Set ``server_name`` to the name of the server as seen by clients. When
  not provided, websockets uses the value of the ``Host`` header.

* Set ``ssl=True`` to generate ``wss://`` URIs without enabling TLS.
  Under the hood, this bind the URL map with a ``url_scheme`` of
  ``wss://`` instead of ``ws://``.

There is no need to specify ``websocket=True`` in each rule. It is added
automatically.

Like :func:`~websockets.sync.server.serve`, :func:`route` returns a
:class:`~websockets.sync.server.Server` that you can also run with
:meth:`~websockets.sync.server.Server.serve_forever`.

Args:
    url_map: Mapping of URL patterns to connection handlers.
    server_name: Name of the server as seen by clients. If :obj:`None`,
        websockets uses the value of the ``Host`` header.
    ssl: Configuration for enabling TLS on the connection. Set it to
        :obj:`True` if a reverse proxy terminates TLS connections.
    create_router: Factory for the :class:`Router` dispatching requests to
        handlers. Set it to a wrapper or a subclass to customize routing.

NÚwsÚwssTr   Úprocess_requestc               ó$   € V ^8„  d   QhRRRRRR/# ©r   Ú
connectionr   Úrequestr   r   zResponse | Noner   )r   s   "r   r   Úroute.<locals>.__annotate__Š   s+   € ÷ 	Añ 	AØ,ð	Aà ð	Að !ñ	Ar    c              “  óŽ   <"  € S! W4      p\        V\        4      '       d   VG R j  x€L
 pVe   V# SP                  W4      #  L5i©N)Ú
isinstancer   Úroute_request)r'   r(   ÚresponseÚ_process_requestÚrouters   && €€r   r$   Úroute.<locals>.process_requestŠ   sG   øé € ñ ,¨JÓ@�Ü˜h¬	×2Ò2Ø%-Ÿ~�HØÒ'Ø#�OØ×+Ñ+¨JÓ@Ð@ñ  .ùs   ƒ$A§A¨A)r   Úpopr-   r   Úhandler)
r   r   r   r   r   r   Ú
url_schemer$   r/   r0   s
   &$$$*,  @@r   Úrouter5   (   s¦   ù€ ðV !š[‘T¨eˆ
Ø�d‹?˜sšØ�5‰MàÒ Ü"ˆMá˜w°ZÓ@ˆð �J‰JÐ(¨$Ó/ð 	ð Ò#ð ×$Ñ$ñ ÷	Añ 	Aô Ø�N‰Nð
àò
ð ,ð
ð ñ	
ð 	
r    c               ó(   € V ^8„  d   QhRRRRRRRR/# ©	r   r   r   Úpathr   r   r   r   r
   r   )r   s   "r   r   r   œ   s0   € ÷ >ñ >Øð>àð>ð ð>ð 
ñ	>r    c                ó"   € \        V 3RRRV/VB # )a2  
Create a WebSocket Unix server dispatching connections to different handlers.

:func:`unix_route` combines the behaviors of :func:`route` and
:func:`~websockets.asyncio.server.unix_serve`.

Args:
    url_map: Mapping of URL patterns to connection handlers.
    path: File system path to the Unix socket.

ÚunixTr8   )r5   ©r   r8   r   s   &&,r   Ú
unix_router<   œ   s   € ô  �WÑ= 4Ð=¨dÐ=°fÑ=Ð=r    c               ó4   € V ^8„  d   QhRRRRRRRRR	R
RRRR/# r   r   )r   s   "r   r   r      sN   € ÷ 7ñ 7Øð7àð7ð  ð7ð :ð	7ð
 +ð7ð ð7ð 
ñ7r    c               ó   € \        R 4      h)zroute() requires werkzeug©ÚImportError)r   r   r   r   r   r   s   &$$$*,r   r5   r5      s   € ô Ð5Ó6Ð6r    c               ó(   € V ^8„  d   QhRRRRRRRR/# r7   r   )r   s   "r   r   r      s0   € ÷ <ñ <Øð<àð<ð ð<ð 
ñ	<r    c                ó   € \        R 4      h)zunix_route() requires werkzeugr?   r;   s   &&,r   r<   r<      s   € ô
 Ð:Ó;Ð;r    c                  óf   € ] tR t^¯tRtRR R lltR R ltR R ltR	 R
 ltR R lt	R R lt
RtR# )r   z*WebSocket router supporting :func:`route`.Nc               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r   r   r   r   r4   Ústrr   ÚNoner   )r   s   "r   r   ÚRouter.__annotate__²   s2   € ÷ 
"ñ 
"àð
"ð  ð
"ð ð	
"ð
 
ñ
"r    c                	óz   € Wn         W n        W0n        V P                   P                  4        F
  pR Vn        K  	  R# )TN)r   r   r4   Ú
iter_rulesÚ	websocket)Úselfr   r   r4   Úrules   &&&& r   Ú__init__ÚRouter.__init__²   s2   € ð ŒØ&ÔØ$ŒØ—L‘L×+Ñ+Ö-ˆDØ!ˆDŽNó .r    c               ó$   € V ^8„  d   QhRRRRRR/# )r   r'   r   r(   r   r   rE   r   )r   s   "r   r   rG   ¾   s#   € ÷ $ñ $Ð*:ð $ÀWð $ÐQTñ $r    c                	ó\   € V P                   f   VP                  R,          # V P                   # )NÚHost)r   Úheaders)rK   r'   r(   s   &&&r   Úget_server_nameÚRouter.get_server_name¾   s)   € Ø×ÑÒ#Ø—?‘? 6Õ*Ð*à×#Ñ#Ð#r    c               ó$   € V ^8„  d   QhRRRRRR/# )r   r'   r   ÚurlrE   r   r	   r   )r   s   "r   r   rG   Ä   s"   € ÷ ñ Ð#3ð ¸#ð À(ñ r    c                	ó|   € VP                  \        P                  P                  R V 24      pW#P                  R&   V# )z	Found at ÚLocation)ÚrespondÚhttpÚ
HTTPStatusÚFOUNDrR   )rK   r'   rV   r.   s   &&& r   ÚredirectÚRouter.redirectÄ   s8   € Ø×%Ñ%¤d§o¡o×&;Ñ&;¸yÈÈÐ=NÓOˆØ'*×Ñ˜Ñ$Øˆr    c               ó    € V ^8„  d   QhRRRR/# )r   r'   r   r   r	   r   )r   s   "r   r   rG   É   s   € ÷ Jñ JÐ$4ð J¸ñ Jr    c                	óV   € VP                  \        P                  P                  R 4      # )z	Not Found)rY   rZ   r[   Ú	NOT_FOUND©rK   r'   s   &&r   Ú	not_foundÚRouter.not_foundÉ   s   € Ø×!Ñ!¤$§/¡/×";Ñ";¸[ÓIÐIr    c               ó$   € V ^8„  d   QhRRRRRR/# r&   r   )r   s   "r   r   rG   Ì   s$   € ÷ ñ Ø*ðØ5<ðà	ñr    c                óÔ  € V P                   P                  V P                  W4      V P                  R7      p \        P
                  P                  VP                  4      pVP                  VP                  VP                  R7      w  rVYVuTn        Tn        R#   \         d&   pT P                  YP                  4      u Rp?# Rp?i\         d    T P                  T4      u # i ; i)zRoute incoming request.)r   r4   )Ú	path_infoÚ
query_argsN)r   ÚbindrS   r4   ÚurllibÚparseÚurlparser8   ÚmatchÚqueryr   r]   Únew_urlr   rc   r3   Úhandler_kwargs)rK   r'   r(   Úurl_map_adapterÚparsedr3   r   r]   s   &&&     r   r-   ÚRouter.route_requestÌ   sÈ   € ð Ÿ,™,×+Ñ+Ø×,Ñ,¨ZÓAØ—‘ð ,ó 
ˆð		.Ü—\‘\×*Ñ*¨7¯<©<Ó8ˆFØ-×3Ñ3Ø Ÿ+™+Ø!Ÿ<™<ð 4ó ‰OˆGð 9@Ð5ˆ
Ô˜JÔ5Ùøô ô 	?Ø—=‘= ×-=Ñ-=Ó>Õ>ûÜô 	.Ø—>‘> *Ó-Ò-ð	.ús*   ¸AB ÂC'Â%CÂ?C'ÃC'ÃC'Ã&C'c               ó    € V ^8„  d   QhRRRR/# )r   r'   r   r   rF   r   )r   s   "r   r   rG   á   s   € ÷ Qñ QÐ(8ð Q¸Tñ Qr    c              ƒ  óX   "  € VP                   ! V3/ VP                  B G Rj  x€L
 #  L5i)zHandle a connection.N)r3   rp   rb   s   &&r   r3   ÚRouter.handlerá   s'   é € à×'Ò'¨
ÑP°j×6OÑ6OÑP×PÐPÑPùs   ‚!*£(¤*)r   r   r4   )Nr"   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rM   rS   r]   rc   r-   r3   Ú__static_attributes__r   r    r   r   r   ¯   s+   † Ù4÷
"õ$õõ
Jõ÷*Qñ Qr    )r5   r<   r   r+   )Ú
__future__r   rZ   r   Ú
ssl_moduleÚurllib.parserj   Útypingr   r   r   r   Úhttp11r   r	   Úserverr
   r   r   Ú__all__Úwerkzeug.exceptionsr   Úwerkzeug.routingr   r   r5   r<   r@   r   r   r    r   Ú<module>r†      s­   ðÝ "ã Û Û ß 4Ó 4ç &ß 3Ñ 3ò ,€ð]>Ý,ß5ð.r
ð #'ðr
ð =Að	r
ð
 .2÷r
÷h>÷&4Qó 4Qøðy ô <ð7ð #'ð7ð =Að	7ð
 .2÷7÷<ñ <ð<ús   ¶A& Á&BÂB