o
    }j6hs  ã                   @   s    d dl Z dd„ Zdd„ ZdZdS )é    Nc                  C   s0   zddl m}  d}W |S  ty   d}Y |S w )Nr   )Ú_messageTF)Úgoogle._upbr   ÚImportError)r   Úhas_upb© r   úZ/var/www/html/chefvision.cloud.itp360.com/venv/lib/python3.10/site-packages/proto/utils.pyr      s   þþr   c                    s   t  ˆ ¡‡ fdd„ƒ}t|ƒS )zöMake the callable into a cached property.

    Similar to @property, but the function will only be called once per
    object.

    Args:
        fx (Callable[]): The property function.

    Returns:
        Callable[]: The wrapped function.
    c                    s@   t | dƒst | di ¡ ˆ j| jvrˆ | ƒ| jˆ j< | jˆ j S )NÚ_cached_values)ÚhasattrÚobjectÚ__setattr__Ú__name__r   )Úself©Úfxr   r   Úinner)   s
   
zcached_property.<locals>.inner)Ú	functoolsÚwrapsÚproperty)r   r   r   r   r   Úcached_property   s   r   )r   )r   r   r   Ú__all__r   r   r   r   Ú<module>   s   
