§
    (ê[f  ã                   óD   — d Z ddlmZmZmZ ddlmZ d
d„Zd„ Zd„ Z	d	„ Z
dS )zå
    authlib.spec.rfc5849.parameters
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    This module contains methods related to `section 3.5`_ of the OAuth 1.0a spec.

    .. _`section 3.5`: https://tools.ietf.org/html/rfc5849#section-3.5
é    )ÚurlparseÚ
url_encodeÚextract_paramsé   )ÚescapeNc                 ór   — |pi }d                      d„ | D ¦   «         ¦  «        }|r	d|› d�|z   }d|› �|d<   |S )a  **Prepare the Authorization header.**
    Per `section 3.5.1`_ of the spec.

    Protocol parameters can be transmitted using the HTTP "Authorization"
    header field as defined by `RFC2617`_ with the auth-scheme name set to
    "OAuth" (case insensitive).

    For example::

        Authorization: OAuth realm="Photos",
            oauth_consumer_key="dpf43f3p2l4k3l03",
            oauth_signature_method="HMAC-SHA1",
            oauth_timestamp="137131200",
            oauth_nonce="wIjqoS",
            oauth_callback="http%3A%2F%2Fprinter.example.com%2Fready",
            oauth_signature="74KNZJeDHnMBp0EMJ9ZHt%2FXKycU%3D",
            oauth_version="1.0"

    .. _`section 3.5.1`: https://tools.ietf.org/html/rfc5849#section-3.5.1
    .. _`RFC2617`: https://tools.ietf.org/html/rfc2617
    z, c                 ó‚   — g | ]<\  }}|                      d ¦  «        ¯t          |¦  «        › dt          |¦  «        › d�‘Œ=S )Úoauth_z="ú")Ú
startswithr   )Ú.0ÚkÚvs      úU/var/www/piapp/venv/lib/python3.11/site-packages/authlib/oauth1/rfc5849/parameters.pyú
<listcomp>z#prepare_headers.<locals>.<listcomp>&   s[   € ð #ð #ð #Ù)-¨¨AØ�<Š<˜Ñ!Ô!ð#Ý�!‰9Œ9Ð$Ð$�˜q™	œ	Ð$Ð$Ð$ð#ð #ð #ó    zrealm="z", zOAuth ÚAuthorization)Újoin)Úoauth_paramsÚheadersÚrealmÚheader_parameterss       r   Úprepare_headersr      s{   € ð, ˆm˜€Gð Ÿ	š	ð #ð #Ø1=ð#ñ #ô #ñ ô Ðð ð Eà0 eÐ0Ð0Ð0Ð3DÑDÐð  <Ð(9Ð;Ð;€GˆOÑØ€Nr   c                 ó|   — t          |¦  «        }|                     | ¦  «         |                     d„ ¬¦  «         |S )a>  Append OAuth params to an existing set of parameters.

    Both params and oauth_params is must be lists of 2-tuples.

    Per `section 3.5.2`_ and `3.5.3`_ of the spec.

    .. _`section 3.5.2`: https://tools.ietf.org/html/rfc5849#section-3.5.2
    .. _`3.5.3`: https://tools.ietf.org/html/rfc5849#section-3.5.3

    c                 ó8   — | d                               d¦  «        S )Nr   r
   )r   )Úis    r   ú<lambda>z _append_params.<locals>.<lambda>I   s   € ˜a œdŸošo¨hÑ7Ô7€ r   )Úkey)ÚlistÚextendÚsort)r   ÚparamsÚmergeds      r   Ú_append_paramsr$   8   s@   € õ �&‰\Œ\€FØ
‡M‚M�,ÑÔÐð
 ‡K‚KÐ7Ð7€KÑ8Ô8Ð8Ø€Mr   c                 ó<   — t          t          | |¦  «        ¦  «        S )z—Prepare the Form-Encoded Body.

    Per `section 3.5.2`_ of the spec.

    .. _`section 3.5.2`: https://tools.ietf.org/html/rfc5849#section-3.5.2

    )r   r$   )r   Úbodys     r   Úprepare_form_encoded_bodyr'   M   s   € õ •n \°4Ñ8Ô8Ñ9Ô9Ð9r   c                 óÄ   — t          j         |¦  «        \  }}}}}}t          t          | t          |¦  «        pg ¦  «        ¦  «        }t          j        ||||||f¦  «        S )z—Prepare the Request URI Query.

    Per `section 3.5.3`_ of the spec.

    .. _`section 3.5.3`: https://tools.ietf.org/html/rfc5849#section-3.5.3

    )r   r   r$   r   Ú
urlunparse)r   ÚuriÚschÚnetÚpathÚparÚqueryÚfras           r   Úprepare_request_uri_queryr1   Y   sj   € õ '/Ô&7¸Ñ&<Ô&<Ñ#€Cˆˆd�C˜ ÝÝ�|¥^°EÑ%:Ô%:Ð%@¸bÑAÔAñCô C€EåÔ  S¨$°°U¸CÐ@ÑAÔAÐAr   )NN)Ú__doc__Úauthlib.common.urlsr   r   r   Úutilr   r   r$   r'   r1   © r   r   ú<module>r6      s“   ððð ð EÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DÐ DØ Ð Ð Ð Ð Ð ð(ð (ð (ð (ðVð ð ð*	:ð 	:ð 	:ðBð Bð Bð Bð Br   