§
    sŠtj¬  ã                   óT   — d dl Z d dlZd dlZdd„Z G d„ de¦  «        Zd„ Zd„ Zd„ ZdS )	é    Nc                 ó¼   — |€g }t          | |¦  «                             |¦  «                             ¦   «                              ¦   «                              ¦   «         S )a¿  Return an internet-friendly user_agent string.

    The majority of this code has been wilfully stolen from the equivalent
    function in Requests.

    :param name: The intended name of the user-agent, e.g. "python-requests".
    :param version: The version of the user-agent, e.g. "0.0.1".
    :param extras: List of two-item tuples that are added to the user-agent
        string.
    :returns: Formatted user-agent string
    :rtype: str
    )ÚUserAgentBuilderÚinclude_extrasÚinclude_implementationÚinclude_systemÚbuild)ÚnameÚversionÚextrass      ú`/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/requests_toolbelt/utils/user_agent.pyÚ
user_agentr      sZ   € ð €~ØˆåØ�'ñ
ô 
ç
Š.Øñ
ô 
ç
 Ò
 ñ 
ô 
ß
Š.Ñ
Ô
Ÿ5š5™7œ7ð#ó    c                   ó4   — e Zd ZdZdZd„ Zd„ Zd„ Zd„ Zd„ Z	dS )	r   aï  Class to provide a greater level of control than :func:`user_agent`.

    This is used by :func:`user_agent` to build its User-Agent string.

    .. code-block:: python

        user_agent_str = UserAgentBuilder(
                name='requests-toolbelt',
                version='17.4.0',
            ).include_implementation(
            ).include_system(
            ).include_extras([
                ('requests', '2.14.2'),
                ('urllib3', '1.21.2'),
            ]).build()

    ú%s/%sc                 ó>   — t          j        ||fg¦  «        | _        dS )zÕInitialize our builder with the name and version of our user agent.

        :param str name:
            Name of our user-agent.
        :param str version:
            The version string for user-agent.
        N)ÚcollectionsÚdequeÚ_pieces)Úselfr	   r
   s      r   Ú__init__zUserAgentBuilder.__init__4   s!   € õ #Ô(¨4°¨/Ð):Ñ;Ô;ˆŒˆˆr   c                 óP   ‡ — d                      ˆ fd„‰ j        D ¦   «         ¦  «        S )z„Finalize the User-Agent string.

        :returns:
            Formatted User-Agent string.
        :rtype:
            str
        ú c                 ó$   •— g | ]}‰j         |z  ‘ŒS © )Úformat_string)Ú.0Úpiecer   s     €r   ú
<listcomp>z*UserAgentBuilder.build.<locals>.<listcomp>F   s!   ø€ ÐNÐNÐN¸˜Ô+¨eÑ3ÐNÐNÐNr   )Újoinr   ©r   s   `r   r   zUserAgentBuilder.build>   s.   ø€ ð �xŠxÐNÐNÐNÐNÀÄÐNÑNÔNÑOÔOÐOr   c                 óŠ   — t          d„ |D ¦   «         ¦  «        rt          d¦  «        ‚| j                             |¦  «         | S )zŠInclude extra portions of the User-Agent.

        :param list extras:
            list of tuples of extra-name and extra-version
        c              3   ó<   K  — | ]}t          |¦  «        d k    V — ŒdS )é   N)Úlen)r   Úextras     r   ú	<genexpr>z2UserAgentBuilder.include_extras.<locals>.<genexpr>N   s,   è è € Ð3Ð3 5�s�5‰zŒz˜QŠÐ3Ð3Ð3Ð3Ð3Ð3r   z/Extras should be a sequence of two item tuples.)ÚanyÚ
ValueErrorr   Úextend)r   r   s     r   r   zUserAgentBuilder.include_extrasH   sN   € õ Ð3Ð3¨FÐ3Ñ3Ô3Ñ3Ô3ð 	PÝÐNÑOÔOÐOàŒ×Ò˜FÑ#Ô#Ð#Øˆr   c                 óR   — | j                              t          ¦   «         ¦  «         | S )z¦Append the implementation string to the user-agent string.

        This adds the the information that you're using CPython 2.7.13 to the
        User-Agent.
        )r   ÚappendÚ_implementation_tupler    s    r   r   z'UserAgentBuilder.include_implementationT   s&   € ð 	Œ×ÒÕ1Ñ3Ô3Ñ4Ô4Ð4Øˆr   c                 óR   — | j                              t          ¦   «         ¦  «         | S )z2Append the information about the Operating System.)r   r+   Ú_platform_tupler    s    r   r   zUserAgentBuilder.include_system]   s#   € àŒ×Ò�OÑ-Ô-Ñ.Ô.Ð.Øˆr   N)
Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r   r   r   r   r   r      ss   € € € € € ðð ð$ €Mð<ð <ð <ðPð Pð Pð
ð 
ð 
ðð ð ðð ð ð ð r   r   c                  óÂ  — t          j        ¦   «         } | dk    rt          j        ¦   «         }n¯| dk    rst          j        j        ›dt          j        j        ›dt          j        j        ›�}t          j        j        dk    r&d 	                    |t          j        j        g¦  «        }n6| dk    rt          j        ¦   «         }n| dk    rt          j        ¦   «         }nd}| |fS )	aÎ  Return the tuple of interpreter name and version.

    Returns a string that provides both the name and the version of the Python
    implementation currently running. For example, on CPython 2.7.5 it will
    return "CPython/2.7.5".

    This function works best on CPython and PyPy: in particular, it probably
    doesn't work for Jython or IronPython. Future investigation should be done
    to work out the correct shape of the code for those platforms.
    ÚCPythonÚPyPyú.ÚfinalÚ ÚJythonÚ
IronPythonÚUnknown)
ÚplatformÚpython_implementationÚpython_versionÚsysÚpypy_version_infoÚmajorÚminorÚmicroÚreleaselevelr   )ÚimplementationÚimplementation_versions     r   r,   r,   c   só   € õ Ô3Ñ5Ô5€Nà˜Ò"Ð"Ý!)Ô!8Ñ!:Ô!:ÐÐØ	˜6Ò	!Ð	!Ý/2Ô/DÔ/JÐ/JÐ/JÝ/2Ô/DÔ/JÐ/JÐ/JÝ/2Ô/DÔ/JÐ/Jð"LÐõ Ô Ô-°Ò8Ð8Ø%'§W¢WØ&­Ô(=Ô(Jð.ñ &ô &Ð"øð 
˜8Ò	#Ð	#Ý!)Ô!8Ñ!:Ô!:ÐÐØ	˜<Ò	'Ð	'Ý!)Ô!8Ñ!:Ô!:ÐÐà!*ÐàÐ2Ð3Ð3r   c                  ó$   — dt          ¦   «         z  S )Nr   )r,   r   r   r   Ú_implementation_stringrH   „   s   € ØÕ*Ñ,Ô,Ñ,Ð,r   c                  ó‚   — 	 t          j        ¦   «         } t          j        ¦   «         }n# t          $ r d} d}Y nw xY w| |fS )Nr;   )r<   ÚsystemÚreleaseÚIOError)Úp_systemÚ	p_releases     r   r.   r.   ˆ   sZ   € ðÝ”?Ñ$Ô$ˆÝÔ$Ñ&Ô&ˆ	ˆ	øÝð ð ð ØˆØˆ	ˆ	ˆ	ðøøøð �iÐ Ð s   ‚&) ©:¹:)N)	r   r<   r?   r   Úobjectr   r,   rH   r.   r   r   r   ú<module>rP      s¢   ðà Ð Ð Ð Ø €€€Ø 
€
€
€
ð#ð #ð #ð #ð0Að Að Að Að A�vñ Aô Að AðH4ð 4ð 4ðB-ð -ð -ð!ð !ð !ð !ð !r   