Ë
    W¼Sfù
  ã                   ó0  — d 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dlmZ dZddej                  fd	„Z G d
„ d«      Zy# e$ r	  ed«      ‚w xY w)zÆCloud Firestore module.

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

    Args:
      app: An App instance (optional).

    Returns:
      google.cloud.firestore.Firestore: A `Firestore 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 Client: https://googlecloudplatform.github.io/google-cloud-python/latest          /firestore/client.html
    )r   Úget_app_serviceÚ_FIRESTORE_ATTRIBUTEÚ_FirestoreClientÚfrom_appÚget)ÚappÚ	fs_clients     úWC:\Users\user\Documents\project_loop\venv\Lib\site-packages\firebase_admin/firestore.pyÚclientr   %   s,   € ô  ×&Ñ& sÔ,@ÔBR×B[ÑB[Ó\€IØ�=‰=‹?Ðó    c                   ó,   — e Zd ZdZd„ Zd„ Zed„ «       Zy)r   z/Holds a Google Cloud Firestore client instance.c                 ó<   — t        j                  ||¬«      | _        y )N)ÚcredentialsÚproject)r   ÚClientÚ_client)Úselfr   r   s      r   Ú__init__z_FirestoreClient.__init__<   s   € Ü ×'Ñ'°KÈÔQˆ�r   c                 ó   — | j                   S ©N)r   )r   s    r   r   z_FirestoreClient.get?   s   € Ø�|‰|Ðr   c                 ó€   — |j                   j                  «       }|j                  }|st        d«      ‚t	        ||«      S )z5Creates a new _FirestoreClient 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_FirestoreClient.from_appB   sC   € ð —n‘n×3Ñ3Ó5ˆØ—.‘.ˆÙÜð(ó)ð )ô   ¨WÓ5Ð5r   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   Úclassmethodr   © r   r   r   r   9   s$   „ Ù9òRòð ñ	6ó ñ	6r   r   r   )r&   Úgoogle.cloudr   ÚglobalsÚkeysÚexistingÚ__dict__ÚitemsÚkeyÚvalueÚ
startswithÚImportErrorÚfirebase_adminr   r
   r   r   r   r(   r   r   ú<module>r4      s²   ðñðIÝ&Ù‹y�~‰~Ó€HØ×(Ñ(×.Ñ.Ó0ò #‰
ˆˆUØ�~‰~˜cÕ" s°(Ò':Ø"‰G‹I�cŠNñ#õ "ð $Ð ñ˜	×(Ñ(ó ÷(6ò 6øð= ò IÙ
ð Hó Ið IðIús   „AB ÁB ÁB ÂB