Ë
    W¼Sfe  ã                   ó\  — U d Z ddlmZ ddlmZmZ ddlmZ 	 ddlm	Z	  e
«       j                  «       Ze	j                  j                  «       D ]&  \  ZZej#                  d«      rŒeevsŒe e
«       e<   Œ( 	 dZeed	<   ddede	j,                  fd„Z G d„ d«      Zy
# e$ r	  ed«      ‚w xY w)zÚCloud Firestore Async module.

This module contains utilities for asynchronusly accessing the Google Cloud Firestore databases
associated with Firebase apps. This requires the ``google-cloud-firestore`` Python module.
é    )ÚType)ÚAppÚ_utils)ÚBase)Ú	firestoreÚ_zrFailed to import the Cloud Firestore library for Python. Make sure to install the "google-cloud-firestore" module.Ú_firestore_asyncÚ_FIRESTORE_ASYNC_ATTRIBUTENÚappÚreturnc                 ót   — t        j                  | t        t        j                  «      }|j                  «       S )a÷  Returns an async client that can be used to interact with Google Cloud Firestore.

    Args:
      app: An App instance (optional).

    Returns:
      google.cloud.firestore.Firestore_Async: A `Firestore Async Client`_.

    Raises:
      ValueError: If a project ID is not specified either via options, credentials or
          environment variables, or if the specified project ID is not a valid string.

    .. _Firestore Async Client: https://googleapis.dev/python/firestore/latest/client.html
    )r   Úget_app_servicer
   Ú_FirestoreAsyncClientÚfrom_appÚget)r   Ú	fs_clients     ú]C:\Users\user\Documents\project_loop\venv\Lib\site-packages\firebase_admin/firestore_async.pyÚclientr   *   s0   € ô ×&Ñ&ØÔ'Ô)>×)GÑ)GóI€Ià�=‰=‹?Ðó    c                   ód   — e Zd ZdZdee   deddfd„Zdej                  fd„Z
ededd fd	„«       Zy)
r   z5Holds a Google Cloud Firestore Async Client instance.ÚcredentialsÚprojectr   Nc                 ó<   — t        j                  ||¬«      | _        y )N)r   r   )r   ÚAsyncClientÚ_client)Úselfr   r   s      r   Ú__init__z_FirestoreAsyncClient.__init__A   s   € Ü ×,Ñ,¸ÈgÔVˆ�r   c                 ó   — | j                   S ©N)r   )r   s    r   r   z_FirestoreAsyncClient.getD   s   € Ø�|‰|Ðr   r   c                 ó€   — |j                   j                  «       }|j                  }|st        d«      ‚t	        ||«      S )z:Creates a new _FirestoreAsyncClient for the specified app.z²Project ID is required to access Firestore. Either set the projectId option, or use service account credentials. Alternatively, set the GOOGLE_CLOUD_PROJECT environment variable.)Ú
credentialÚget_credentialÚ
project_idÚ
ValueErrorr   )Úclsr   r   r   s       r   r   z_FirestoreAsyncClient.from_appG   sC   € ð —n‘n×3Ñ3Ó5ˆØ—.‘.ˆÙÜð(ó)ð )ô % [°'Ó:Ð:r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Ústrr   r   r   r   Úclassmethodr   r   © r   r   r   r   >   s\   „ Ù?ðW D¨¡Jð W¸ð WÀó Wð�Y×*Ñ*ó ð ð
;˜3ð 
;Ð#:ò 
;ó ñ
;r   r   r   )r)   Útypingr   Úfirebase_adminr   r   Úfirebase_admin.credentialsr   Úgoogle.cloudr   ÚglobalsÚkeysÚexistingÚ__dict__ÚitemsÚkeyÚvalueÚ
startswithÚImportErrorr
   r*   Ú__annotations__r   r   r   r,   r   r   ú<module>r;      sÈ   ðòõ ÷õ ,ðIÝ&Ù‹y�~‰~Ó€HØ×(Ñ(×.Ñ.Ó0ò #‰
ˆˆUØ�~‰~˜cÕ" s°(Ò':Ø"‰G‹I�cŠNñ#ð #5Ð ˜CÓ 4ñ�ð ˜y×4Ñ4ó ÷(;ò ;øð7 ò IÙ
ð Hó Ið IðIús   ™AB Á&B Á+B ÂB+