+
    ÆÚj“  ã                  óÆ   € ^ RI Ht ^ RIt^ RIt^ RIt^ RIHtH	t	H
t
 ^ RIHt ^ RIHtHt ^RIHtHt ^RIHtHtHt . ROt ! R	 R4      tR
RRRRR/R R lltRR R lltR# )é    )ÚannotationsN)ÚAnyÚCallableÚLiteral)ÚNotFound)ÚMapÚRequestRedirect)ÚRequestÚResponse)ÚServerÚServerConnectionÚserveÚRouterc                  ó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/# )	é   Úurl_mapr   Úserver_nameú
str | NoneÚ
url_schemeÚstrÚreturnÚNone© )Úformats   "Ú�/opt/data/installs/351f81cc06284494/environments/aa258815729c481f8402f54f4c368f83/venv/lib/python3.14/site-packages/websockets/sync/router.pyÚ__annotate__ÚRouter.__annotate__   s2   € ÷ 
"ñ 
"àð
"ð  ð
"ð ð	
"ð
 
ñ
"ó    c                	óz   € Wn         W n        W0n        V P                   P                  4        F
  pR Vn        K  	  R# )TN)r   r   r   Ú
iter_rulesÚ	websocket)Úselfr   r   r   Ú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   Ú
connectionr   Úrequestr
   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)r#   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ÚFOUNDr,   )r#   r(   r0   Úresponses   &&& 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)r3   r4   r5   Ú	NOT_FOUND©r#   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   r)   r
   r   zResponse | Noner   )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   r   )Ú	path_infoÚ
query_argsN)r   Úbindr-   r   ÚurllibÚparseÚurlparseÚpathÚmatchÚqueryr	   r8   Únew_urlr   r>   ÚhandlerÚhandler_kwargs)r#   r(   r)   Úurl_map_adapterÚparsedrM   Úkwargsr8   s   &&&     r   Úroute_requestÚ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   D   s   € ÷ Kñ KÐ"2ð K°tñ Kr   c                ó<   € VP                   ! V3/ VP                  B # )zHandle a connection.)rM   rN   r=   s   &&r   rM   ÚRouter.handlerD   s   € à×!Ò! *ÑJ°
×0IÑ0IÑJÐJr   )r   r   r   )NÚws)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r%   r-   r8   r>   rR   rM   Ú__static_attributes__r   r   r   r   r      s+   † Ù4÷
"õ$õõ
Jõ÷*Kñ Kr   r   ÚsslÚcreate_routerc               ó4   € V ^8„  d   QhRRRRRRRRR	R
RRRR/# )r   r   r   Úargsr   r   r   r^   z,ssl_module.SSLContext | Literal[True] | Noner_   ztype[Router] | NonerQ   r   r   r   )r   s   "r   r   r   I   s`   € ÷ dSñ dSØðdSàðdSð ðdSð 
6ð	dSð
 'ðdSð ðdSð ñdS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.sync.router import route
    from werkzeug.routing import Map, Rule

    def channel_handler(websocket, channel_id):
        ...

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

    with route(url_map, ...) as server:
        server.serve_forever()

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 actually 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.

NrW   ÚwssTr^   Úprocess_requestc               ó$   € V ^8„  d   QhRRRRRR/# rA   r   )r   s   "r   r   Úroute.<locals>.__annotate__¥   s$   € ÷ 	=ñ 	=Ø(ð	=Ø3:ð	=àñ	=r   c                óB   <€ S! W4      pVe   V# SP                  W4      # ©N)rR   )r(   r)   r7   Ú_process_requestÚrouters   && €€r   rd   Úroute.<locals>.process_request¥   s+   ø€ ñ (¨
Ó<ˆHØÒ#Ø�Ø×'Ñ'¨
Ó<Ð<r   )r   ÚpoprR   r   rM   )
r   r   r^   r_   ra   rQ   r   rd   ri   rj   s
   &$$$*,  @@r   Úrouterm   I   s’   ù€ ðJ š‘¨%€JØ
�$ƒ˜3š?Øˆu‰àÒÜˆá˜7°Ó<€Fð 	�
‰
Ð$ dÓ+ð ð Òð × Ñ ñ 	÷	=ñ 	=ô �—‘ÐR $ÒR¸ÐRÈ6ÑRÐRr   c               ó(   € V ^8„  d   QhRRRRRRRR/# )	r   r   r   rI   r   rQ   r   r   r   r   )r   s   "r   r   r   °   s0   € ÷ :ñ :Øð:à
ð:ð ð:ð ñ	:r   c                ó"   € \        V 3RRRV/VB # )a/  
Create a WebSocket Unix server dispatching connections to different handlers.

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

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

ÚunixTrI   )rm   )r   rI   rQ   s   &&,r   Ú
unix_routerq   °   s   € ô  �Ñ9˜tÐ9¨$Ð9°&Ñ9Ð9r   )rm   rq   r   rh   )Ú
__future__r   r4   r^   Ú
ssl_moduleÚurllib.parserF   Útypingr   r   r   Úwerkzeug.exceptionsr   Úwerkzeug.routingr   r	   Úhttp11r
   r   Úserverr   r   r   Ú__all__r   rm   rq   r   r   r   Ú<module>r{      sp   ðÝ "ã Û Û ß )Ñ )å (ß 1ç &ß 3Ñ 3ò ,€÷4Kñ 4KðndSð #ðdSð 9=ð	dSð
 *.÷dS÷N:ñ :r   