§
    cŠtj   ã                  óÐ  — U d dl mZ d dlZd dlmZ d dlmZmZmZ d dl	m
Z
 d dlmZ er*d dlmZ d dlmZ d d	lmZ d d
lmZ d dlmZmZmZmZ d dlmZ ddgZdZded<   	  eddd¬¦  «        Z edede¬¦  «        Zed5d„¦   «         Z  G d„ de
eef         eeef         ¦  «        Z! G d„ deeef         ¦  «        Z"ed6d$„¦   «         Z#d7d(„Z$d8d,„Z%d9d.„Z&d:d/„Z'd:d0„Z(d:d1„Z)d;d4„Z*dS )<é    )ÚannotationsN)Úcache)ÚTYPE_CHECKINGÚAnyÚProtocol)ÚCompliantNamespace)ÚTypeVar)ÚIterator)ÚEntryPoints)Ú	TypeAlias)ÚLiteralString)ÚCompliantDataFrameAnyÚCompliantFrameAnyÚCompliantLazyFrameAnyÚCompliantSeriesAny)ÚVersionÚPluginÚfrom_nativezBCompliantDataFrameAny | CompliantLazyFrameAny | CompliantSeriesAnyr   ÚCompliantAnyÚFrameTr   z-CompliantDataFrameAny | CompliantLazyFrameAny)ÚboundÚdefaultÚFromNativeR_coT)r   Ú	covariantr   Úreturnr   c                 ó*   — ddl m}  d} | |¬¦  «        S )Nr   )Úentry_pointsznarwhals.plugins)Úgroup)Úimportlib.metadatar   )Úepsr   s     úN/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/narwhals/plugins.pyÚ_discover_entrypointsr"   +   s,   € à6Ð6Ð6Ð6Ð6Ð6à€EØˆ3�UÐÑÔÐó    c                  ó   — e Zd Zdd„ZdS )ÚPluginNamespaceÚdatar   r   r   c               ó   — d S ©N© )Úselfr&   s     r!   r   zPluginNamespace.from_native4   ó   € € € r#   N)r&   r   r   r   )Ú__name__Ú
__module__Ú__qualname__r   r)   r#   r!   r%   r%   3   s   € € € € € Ø>Ð>Ð>Ð>Ð>Ð>r#   r%   c                  ó6   — e Zd Zedd„¦   «         Zdd„Zdd„ZdS )r   r   r   c                ó   — d S r(   r)   )r*   s    r!   ÚNATIVE_PACKAGEzPlugin.NATIVE_PACKAGE8   s   € Ø/2¨sr#   Úversionr   ú'PluginNamespace[FrameT, FromNativeR_co]c                ó   — d S r(   r)   )r*   r2   s     r!   Ú__narwhals_namespace__zPlugin.__narwhals_namespace__;   s   € à25°#r#   Únative_objectÚobjectÚboolc               ó   — d S r(   r)   )r*   r6   s     r!   Ú	is_nativezPlugin.is_native>   r+   r#   N)r   r   )r2   r   r   r3   )r6   r7   r   r8   )r,   r-   r.   Úpropertyr1   r5   r:   r)   r#   r!   r   r   7   sH   € € € € € ØØ2Ð2Ð2ñ „XØ2ð6ð 6ð 6ð 6ð ?Ð>Ð>Ð>Ð>Ð>r#   ÚclsÚtypeÚtype_Ústrr8   c                ó‚   ‡— 	 t          ˆfd„|                      ¦   «         D ¦   «         ¦  «        S # t          $ r Y dS w xY w)Nc              3  óP   •K  — | ] }‰|j                              d ¦  «        v V — Œ!dS )ú.N)r-   Úsplit)Ú.0Úor>   s     €r!   ú	<genexpr>z_might_be.<locals>.<genexpr>D   s8   øè è € ÐGÐG¸�5˜AœL×.Ò.¨sÑ3Ô3Ð3ÐGÐGÐGÐGÐGÐGr#   F)ÚanyÚmroÚ	TypeError)r<   r>   s    `r!   Ú	_might_berJ   A   sU   ø€ ðÝÐGÐGÐGÐG¸S¿WºW¹Y¼YÐGÑGÔGÑGÔGÐGøÝð ð ð Øˆuˆuðøøøs   ƒ,0 °
>½>r6   r   Úpluginc                ó¶   — |j         }t          j                             |¦  «        d uo1t	          t          | ¦  «        |¦  «        o|                     | ¦  «        S r(   )r1   ÚsysÚmodulesÚgetrJ   r=   r:   )r6   rK   Úpkgs      r!   Ú_is_native_pluginrQ   I   sU   € Ø
Ô
€CåŒ�Š˜ÑÔ DÐ(ð 	,Ý•d˜=Ñ)Ô)¨3Ñ/Ô/ð	,à×Ò˜]Ñ+Ô+ðr#   r2   r   úIterator[CompliantAny]c              #  óÎ   K  — t          ¦   «         D ]S}|                     ¦   «         }t          | |¦  «        r-|                     |¬¦  «        }|                     | ¦  «        V — ŒTd S )N)r2   )r"   ÚloadrQ   r5   r   )r6   r2   Úentry_pointrK   Úcompliant_namespaces        r!   Ú_iter_from_nativerW   R   s   è è € Ý,Ñ.Ô.ð Að AˆØ$×)Ò)Ñ+Ô+ˆÝ˜]¨FÑ3Ô3ð 	AØ"(×"?Ò"?ÈÐ"?Ñ"PÔ"PÐØ%×1Ò1°-Ñ@Ô@Ð@Ð@Ð@øð	Að Ar#   úCompliantAny | Nonec                ó>   — t          t          | |¦  «        d¦  «        S )a¾  Attempt to convert `native_object` to a Compliant object, using any available plugin(s).

    Arguments:
        native_object: Raw object from user.
        version: Narwhals API version.

    Returns:
        If the following conditions are met
            - at least 1 plugin is installed
            - at least 1 installed plugin supports `type(native_object)`

        Then for the **first matching plugin**, the result of the call below.
        This *should* be an object accepted by a Narwhals Dataframe, Lazyframe, or Series:

            plugin: Plugin
            plugin.__narwhals_namespace__(version).from_native(native_object)

        In all other cases, `None` is returned instead.
    N)ÚnextrW   )r6   r2   s     r!   r   r   Z   s   € õ( Õ! -°Ñ9Ô9¸4Ñ@Ô@Ð@r#   c                óN   — ddl m}m}  |t          | |j        ¦  «        ¦  «        S )zQCheck whether an installed plugin converts `native_object` to an eager DataFrame.r   )r   Úis_compliant_dataframe)Únarwhals._utilsr   r\   r   ÚMAIN)r6   r   r\   s      r!   Úis_native_dataframer_   q   ó7   € à?Ð?Ð?Ð?Ð?Ð?Ð?Ð?à!Ð!¥+¨m¸W¼\Ñ"JÔ"JÑKÔKÐKr#   c                óN   — ddl m}m}  |t          | |j        ¦  «        ¦  «        S )zJCheck whether an installed plugin converts `native_object` to a LazyFrame.r   )r   Úis_compliant_lazyframe)r]   r   rb   r   r^   )r6   r   rb   s      r!   Úis_native_lazyframerc   x   r`   r#   c                óN   — ddl m}m}  |t          | |j        ¦  «        ¦  «        S )zGCheck whether an installed plugin converts `native_object` to a Series.r   )r   Úis_compliant_series)r]   r   re   r   r^   )r6   r   re   s      r!   Úis_native_seriesrf      s7   € à<Ð<Ð<Ð<Ð<Ð<Ð<Ð<àÐ�{¨=¸'¼,ÑGÔGÑHÔHÐHr#   Únative_object_typeú
str | Nonec                ó,   — t          | d¦  «        r	 dS d S )NÚdaftz¸Hint: it looks like you passed a `daft.DataFrame` but don't have `narwhals-daft` installed.
Please refer to https://github.com/narwhals-dev/narwhals-daft for installation instructions.)rJ   )rg   s    r!   Ú_show_suggestionsrk   †   s,   € ÝÐ# VÑ,Ô,ð 
ðkð	
ð 	
ð ˆ4r#   )r   r   )r<   r=   r>   r?   r   r8   )r6   r   rK   r   r   r8   )r6   r   r2   r   r   rR   )r6   r   r2   r   r   rX   )r6   r   r   r8   )rg   r=   r   rh   )+Ú
__future__r   rM   Ú	functoolsr   Útypingr   r   r   Únarwhals._compliantr   Únarwhals._typing_compatr	   Úcollections.abcr
   r   r   r   Útyping_extensionsr   Únarwhals._compliant.typingr   r   r   r   Únarwhals.utilsr   Ú__all__r   Ú__annotations__r   r   r"   r%   r   rJ   rQ   rW   r   r_   rc   rf   rk   r)   r#   r!   ú<module>rw      sæ  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à 
€
€
€
Ø Ð Ð Ð Ð Ð Ø /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /Ð /à 2Ð 2Ð 2Ð 2Ð 2Ð 2Ø +Ð +Ð +Ð +Ð +Ð +àð 'Ø(Ð(Ð(Ð(Ð(Ð(Ø.Ð.Ð.Ð.Ð.Ð.Ø Ð Ð Ð Ð Ð à/Ð/Ð/Ð/Ð/Ð/ðð ð ð ð ð ð ð ð ð ð ð ð 'Ð&Ð&Ð&Ð&Ð&ð �]Ð
#€ð Ið ð ð ð ñ ð Hà	ˆØØ
Ø;ð
ñ 
ô 
€ð
 �Ø˜L°DÀ,ðñ ô €ð
 ðð ð ñ „ðð?ð ?ð ?ð ?ð ?Ð(¨°¨Ô5°xÀÈÐ@VÔ7Wñ ?ô ?ð ?ð?ð ?ð ?ð ?ð ?ˆX�f˜nÐ,Ô-ñ ?ô ?ð ?ð ðð ð ñ „ððð ð ð ðAð Að Að AðAð Að Að Að.Lð Lð Lð LðLð Lð Lð LðIð Ið Ið Iðð ð ð ð ð r#   