§
    BP„j¡  ã                   ó¢   — d Z ddlZddlZdZdZeg d¢ddgdœeg d¢ddgdœiZ G d	„ d
e¦  «        Z G d„ de¦  «        Zd„ Z	d„ Z
d„ Zd„ Zdd„ZdS )z¦Utilities for reading OAuth 2.0 client secret files.

A client_secrets.json file contains all the information needed to interact with
an OAuth 2.0 protected service.
é    NÚwebÚ	installed)Ú	client_idÚclient_secretÚredirect_urisÚauth_uriÚ	token_urir   r   )ÚrequiredÚstringc                   ó   — e Zd ZdZdS )ÚErrorzBase error for this module.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    ú_/root/disk_3tb/conda_envs/Huy-visual/lib/python3.11/site-packages/oauth2client/clientsecrets.pyr   r   <   s   € € € € € Ø%Ð%Ð%Ð%r   r   c                   ó   — e Zd ZdZdS )ÚInvalidClientSecretsErrorz(Format of ClientSecrets file is invalid.Nr   r   r   r   r   r   @   s   € € € € € Ø2Ð2Ð2Ð2r   r   c                 ó*  — d}| €t          |¦  «        ‚	 |                      ¦   «         \  \  }}n'# t          t          f$ r t          |dz   ¦  «        ‚w xY w|t          vr"t          d                     |¦  «        ¦  «        ‚t          |         d         D ])}||vr#t          d                     ||¦  «        ¦  «        ‚Œ*t          |         d         D ]?}||                              d¦  «        r"t          d	                     |¦  «        ¦  «        ‚Œ@||fS )
zñValidate parsed client secrets from a file.

    Args:
        clientsecrets_dict: dict, a dictionary holding the client secrets.

    Returns:
        tuple, a string of the client type and the information parsed
        from the file.
    ziInvalid file format. See https://developers.google.com/api-client-library/python/guide/aaa_client_secretsNzU Expected a JSON object with a single property for a "web" or "installed" applicationzUnknown client type: {0}.r
   z1Missing property "{0}" in a client type of "{1}".r   z[[z!Property "{0}" is not configured.)r   ÚitemsÚ
ValueErrorÚAttributeErrorÚVALID_CLIENTÚformatÚ
startswith)Úclientsecrets_dictÚ_INVALID_FILE_FORMAT_MSGÚclient_typeÚclient_infoÚ	prop_names        r   Ú_validate_clientsecretsr$   D   sy  € ð	*ð ð
 Ð!Ý'Ð(@ÑAÔAÐAð'Ø&8×&>Ò&>Ñ&@Ô&@Ñ#Ñ"ˆ�k�køÝ�Ð'ð 'ð 'ð 'Ý'Ø$ð (&ñ &ñ'ô 'ð 	'ð'øøøð �,Ð&Ð&Ý'Ø'×.Ò.¨{Ñ;Ô;ñ=ô =ð 	=õ " +Ô.¨zÔ:ð -ð -ˆ	Ø˜KÐ'Ð'Ý+ØC×JÒJØ˜{ñ,ô ,ñ-ô -ð -ð (õ " +Ô.¨xÔ8ð Gð Gˆ	Ø�yÔ!×,Ò,¨TÑ2Ô2ð 	GÝ+Ø3×:Ò:¸9ÑEÔEñGô Gð Gð	Gð ˜Ð#Ð#s	   •/ ¯$Ac                 óH   — t          j        | ¦  «        }t          |¦  «        S ©N)ÚjsonÚloadr$   )ÚfpÚobjs     r   r(   r(   m   s   € Ý
Œ)�B‰-Œ-€CÝ" 3Ñ'Ô'Ð'r   c                 óH   — t          j        | ¦  «        }t          |¦  «        S r&   )r'   Úloadsr$   )Úsr*   s     r   r,   r,   r   s   € Ý
Œ*�Q‰-Œ-€CÝ" 3Ñ'Ô'Ð'r   c                 ó  — 	 t          | d¦  «        5 }t          j        |¦  «        }d d d ¦  «         n# 1 swxY w Y   n3# t          $ r&}t	          d|j        |j        |j        ¦  «        ‚d }~ww xY wt          |¦  «        S )NÚrzError opening file)	Úopenr'   r(   ÚIOErrorr   ÚfilenameÚstrerrorÚerrnor$   )r2   r)   r*   Úexcs       r   Ú	_loadfiler6   w   sÐ   € ðAÝ�(˜CÑ Ô ð 	  BÝ”)˜B‘-”-ˆCð	 ð 	 ð 	 ñ 	 ô 	 ð 	 ð 	 ð 	 ð 	 ð 	 ð 	 øøøð 	 ð 	 ð 	 ð 	 øøåð Að Að AÝ'Ð(<¸c¼lØ(+¬°c´iñAô Að 	AøøøøðAøøøõ # 3Ñ'Ô'Ð's-   ‚? ’3§? ³7·? º7»? ¿
A/Á	!A*Á*A/c                 óø   — d}|st          | ¦  «        S |                     | |¬¦  «        }|€.t          | ¦  «        \  }}||i}|                     | ||¬¦  «         t          t	          j        |¦  «        ¦  «        S )aŸ  Loading of client_secrets JSON file, optionally backed by a cache.

    Typical cache storage would be App Engine memcache service,
    but you can pass in any other cache client that implements
    these methods:

    * ``get(key, namespace=ns)``
    * ``set(key, value, namespace=ns)``

    Usage::

        # without caching
        client_type, client_info = loadfile('secrets.json')
        # using App Engine memcache service
        from google.appengine.api import memcache
        client_type, client_info = loadfile('secrets.json', cache=memcache)

    Args:
        filename: string, Path to a client_secrets.json file on a filesystem.
        cache: An optional cache service client that implements get() and set()
        methods. If not specified, the file is always being loaded from
                 a filesystem.

    Raises:
        InvalidClientSecretsError: In case of a validation error or some
                                   I/O failure. Can happen only on cache miss.

    Returns:
        (client_type, client_info) tuple, as _loadfile() normally would.
        JSON contents is validated only during first load. Cache hits are not
        validated.
    zoauth2client:secrets#ns)Ú	namespace)r6   ÚgetÚsetÚnextÚsixÚ	iteritems)r2   ÚcacheÚ_SECRET_NAMESPACEr*   r!   r"   s         r   Úloadfiler@   �   s‰   € ðB 2Ðàð #Ý˜Ñ"Ô"Ð"à
�)Š)�HÐ(9ˆ)Ñ
:Ô
:€CØ
€{Ý#,¨XÑ#6Ô#6Ñ ˆ�[Ø˜KÐ(ˆØ�	Š	�(˜CÐ+<ˆ	Ñ=Ô=Ð=å•”˜cÑ"Ô"Ñ#Ô#Ð#r   r&   )r   r'   r<   ÚTYPE_WEBÚTYPE_INSTALLEDr   Ú	Exceptionr   r   r$   r(   r,   r6   r@   r   r   r   ú<module>rD      s;  ððð ð €€€à 
€
€
€
ð €Ø€ð ð
ð 
ð 
ð Øð
ðð ð ð
ð 
ð 
ð Øð
ðð ð€ð<&ð &ð &ð &ð &ˆIñ &ô &ð &ð3ð 3ð 3ð 3ð 3 ñ 3ô 3ð 3ð&$ð &$ð &$ðR(ð (ð (ð
(ð (ð (ð
(ð (ð (ð,$ð ,$ð ,$ð ,$ð ,$ð ,$r   