+
    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t^RIHtHt ^RIHtHtHt RR.t ^ RIHt ^ R	IHtHt R
RRRRRR]P4                  /R R llt ! R R4      tR#   ] d    R
RRRRRR]P4                  /R R llt L/i ; i)é    )ÚannotationsN)ÚAnyÚ	AwaitableÚCallableÚLiteral)ÚRequestÚResponse)ÚServerÚServerConnectionÚserveÚrouteÚRouter)ÚNotFound)ÚMapÚRequestRedirectÚserver_nameÚsslÚcreate_routerÚtask_statusc               ó8   € V ^8„  d   QhRR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] | Noner   ztrio.TaskStatus[Server]ÚkwargsÚreturnÚNone© )Úformats   "ÚOC:\Users\alokc\chatbot\backend\venv\Lib\site-packages\websockets/trio/router.pyÚ__annotate__r"   $   sb   € ÷ t
ñ t
Øðt
àðt
ð  ðt
ð :ð	t
ð
 +ðt
ð -ðt
ð ðt
ð 
ñt
ó    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R	V/VB G Rj  x€L
 #  L5i)
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.trio.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.trio.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 = trio.Event()

    with trio.open_nursery() as nursery:
        server = await nursery.start(route, url_map, ...)
        async with 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.

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.
    task_status: For compatibility with :meth:`nursery.start
        <trio.Nursery.start>`.

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   )r   Úpopr/   r   Úhandler)r   r   r   r   r   r   r   Ú
url_schemer'   r1   r2   s   &$$$$*,  @@r!   r   r   $   s½   ùé € ðX !š[‘T¨eˆ
Ø�d‹?˜sšØ�5‰MàÒ Ü"ˆMá˜w°ZÓ@ˆð �J‰JÐ(¨$Ó/ð 	ð Ò#ð ×$Ñ$ñ ÷	Añ 	Aô Ø�N‰Nð
àò
ð ,ð
ð $ð	
ð
 ñ
÷ 
ð 	
ñ 
ùs   „A7BÁ;B Á<Bc               ó8   € V ^8„  d   QhRRRRRRRRR	R
RRRRRR/# r   r   )r    s   "r!   r"   r"      sX   € ÷ 	7ñ 	7Øð	7àð	7ð  ð	7ð :ð		7ð
 +ð	7ð -ð	7ð ð	7ð 
ñ	7r#   c             �  ó    "  € \        R 4      h5i)zroute() requires werkzeug)ÚImportError)r   r   r   r   r   r   r   s   &$$$$*,r!   r   r      s   é € ô Ð5Ó6Ð6ùs   ‚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   r6   Ústrr   r   r   )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   r6   Ú
iter_rulesÚ	websocket)Úselfr   r   r6   Ú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   r<   r   )r    s   "r!   r"   r=   ª   s#   € ÷ $ñ $Ð*:ð $ÀWð $ÐQTñ $r#   c                	ó\   € V P                   f   VP                  R,          # V P                   # )NÚHost)r   Úheaders)rA   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   Úurlr<   r   r	   r   )r    s   "r!   r"   r=   °   s"   € ÷ ñ Ð#3ð ¸#ð À(ñ r#   c                	ó|   € VP                  \        P                  P                  R V 24      pW#P                  R&   V# )z	Found at ÚLocation)ÚrespondÚhttpÚ
HTTPStatusÚFOUNDrH   )rA   r*   rL   r0   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"   r=   µ   s   € ÷ Jñ JÐ$4ð J¸ñ Jr#   c                	óV   € VP                  \        P                  P                  R 4      # )z	Not Found)rO   rP   rQ   Ú	NOT_FOUND©rA   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"   r=   ¸   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   r6   )Ú	path_infoÚ
query_argsN)r   ÚbindrI   r6   ÚurllibÚparseÚurlparseÚpathÚmatchÚqueryr   rS   Únew_urlr   rY   r5   Úhandler_kwargs)rA   r*   r+   Úurl_map_adapterÚparsedr5   r   rS   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   r   r   )r    s   "r!   r"   r=   Í   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)r5   rg   rX   s   &&r!   r5   ÚRouter.handlerÍ   s'   é € à×'Ò'¨
ÑP°j×6OÑ6OÑP×PÐPÑPùs   ‚!*£(¤*)r   r   r6   )Nr%   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__rC   rI   rS   rY   r/   r5   Ú__static_attributes__r   r#   r!   r   r   ›   s+   † Ù4÷
"õ$õõ
Jõ÷*Qñ Qr#   )Ú
__future__r   rP   r   Ú
ssl_moduleÚurllib.parser`   Útypingr   r   r   r   ÚtrioÚhttp11r   r	   Úserverr
   r   r   Ú__all__Úwerkzeug.exceptionsr   Úwerkzeug.routingr   r   ÚTASK_STATUS_IGNOREDr   r9   r   r   r#   r!   Ú<module>r      sÌ   ðÝ "ã Û Û ß 4Ó 4ã ç &ß 3Ñ 3ð �HÐ
€ðG
Ý,ß5ð"t
ð #'ðt
ð =Að	t
ð
 .2ðt
ð 04×/GÑ/G÷t
÷n4Qó 4QøðM ô 7ð	7ð #'ð	7ð =Að		7ð
 .2ð	7ð 04×/GÑ/G÷	7ñ 	7ð7ús   ºA. Á.!BÂB