Your IP : 18.119.123.10


Current Path : /opt/imunify360/venv/lib64/python3.11/site-packages/babel/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib64/python3.11/site-packages/babel/__pycache__/localedata.cpython-311.pyc

�

Q�Dg/ ����UdZddlmZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
ddlmZddlmZddlmZiZd	ed
<ej��Zej�ej�e��d��Zejdej��Zd&d�Z d'd�Z!d(d�Z"ed���d)d���Z#d*d+d�Z$d,d!�Z%Gd"�d#��Z&Gd$�d%e	j
��Z'dS)-aG
    babel.localedata
    ~~~~~~~~~~~~~~~~

    Low-level locale data access.

    :note: The `Locale` class, which uses this module under the hood, provides a
           more convenient interface for accessing the locale data.

    :copyright: (c) 2013-2023 by the Babel Team.
    :license: BSD, see LICENSE for more details.
�)�annotationsN)�abc)�Iterator�Mapping�MutableMapping)�	lru_cache)�chain)�Any�dict[str, Any]�_cachezlocale-dataz%^(con|prn|aux|nul|com[0-9]|lpt[0-9])$�name�str�return�
str | Nonec��|rt|t��sdS|������}t	jtt��g��D]}||���kr|cS�dS)z�Normalize a locale ID by stripping spaces and apply proper casing.

    Returns the normalized locale ID string or `None` if the ID is not
    recognized.
    N)�
isinstancer�strip�lowerr	�
from_iterabler�locale_identifiers)r
�	locale_ids  �p/builddir/build/BUILD/imunify360-venv-2.4.0/opt/imunify360/venv/lib/python3.11/site-packages/babel/localedata.py�normalize_localer!s�����z�$��,�,���t��:�:�<�<�����D��(�&�2D�2F�2F�)G�H�H���	��9�?�?�$�$�$�$�����%����os.PathLike[str] | strc�P�tj�|��}tjdkrPt
�tj�|��d��rtd|�d����tj�	t|�d���S)z?
    Resolve a locale identifier to a `.dat` path on disk.
    �win32rzName z is invalid on Windows�.dat)�os�path�basename�sys�platform�_windows_reserved_name_re�match�splitext�
ValueError�join�_dirname)r
s r�resolve_locale_filenamer*/s����7���D�!�!�D��|�w���#<�#B�#B�2�7�CS�CS�TX�CY�CY�Z[�C\�#]�#]���=��=�=�=�>�>�>��7�<�<��T�-�-�-�0�0�0r�boolc���|rt|t��sdS|tvrdStj�t
|����}|rdntt|����S)z�Check whether locale data is available for the given locale.

    Returns `True` if it exists, `False` otherwise.

    :param name: the locale identifier string
    FT)	rrrrr �existsr*r+r)r
�
file_founds  rr-r-?sl����z�$��,�,���u��v�~�~��t����� 7�� =� =�>�>�J��?�4�4�4�(8��(>�(>�#?�#?�?r)�maxsize�	list[str]c�\�d�d�tjt��D��D��S)a&Return a list of all locale identifiers for which locale data is
    available.

    This data is cached after the first invocation.
    You can clear the cache by calling `locale_identifiers.cache_clear()`.

    .. versionadded:: 0.8.1

    :return: a list of locale identifiers (strings)
    c�0�g|]\}}|dk�|dk�|��S)r�root�)�.0�stem�	extensions   r�
<listcomp>z&locale_identifiers.<locals>.<listcomp>Zs9������D�)�����4�6�>�>�	
�$2�>�>rc3�TK�|]#}tj�|��V��$dS�N)rr r&)r5�filenames  r�	<genexpr>z%locale_identifiers.<locals>.<genexpr>]s2����I�I����	�	�(�	#�	#�I�I�I�I�I�Ir)r�listdirr)r4rrrrNs>����	J�I�B�J�x�4H�4H�I�I�I����rT�merge_inheritedc�R�tj�|��}t���	t
�|��}|�s|dks|si}n�ddlm}|d���|��}|sG|�	d��}t|��dkrdnd�|dd���}t|���
��}t|��}t|d	��5}|dkr%|r#t!|t#j|����nt#j|��}ddd��n#1swxYwY|t
|<|t���S#t���wxYw)
afLoad the locale data for the given locale.

    The locale data is a dictionary that contains much of the data defined by
    the Common Locale Data Repository (CLDR). This data is stored as a
    collection of pickle files inside the ``babel`` package.

    >>> d = load('en_US')
    >>> d['languages']['sv']
    u'Swedish'

    Note that the results are cached, and subsequent requests for the same
    locale return the same dictionary:

    >>> d1 = load('en_US')
    >>> d2 = load('en_US')
    >>> d1 is d2
    True

    :param name: the locale identifier string (or "root")
    :param merge_inherited: whether the inherited data should be merged into
                            the data of the requested locale
    :raise `IOError`: if no locale data file is found for the given locale
                      identifier, or one of the locales it inherits from
    r3r)�
get_global�parent_exceptions�_�N����rb)rr r!�_cache_lock�acquirer�get�
babel.corer@�split�lenr(�load�copyr*�open�merge�pickle�release)r
r>�datar@�parent�partsr;�fileobjs        rrLrLbs���2�7���D�!�!�D���������z�z�$�����	 ��v�~�~�_�~����1�1�1�1�1�1�#��$7�8�8�<�<�T�B�B���Q� �J�J�s�O�O�E�'*�5�z�z�Q���V�V�C�H�H�U�3�B�3�Z�<P�<P�F��F�|�|�(�(�*�*��.�t�4�4�H��h��%�%�
0���6�>�>�o�>��$���G� 4� 4�5�5�5�5�!�;�w�/�/�D�	
0�
0�
0�
0�
0�
0�
0�
0�
0�
0�
0����
0�
0�
0�
0�
 �F�4�L�������������������s1�CF�AE�F�E�F�"E�#F�F&�dict1�MutableMapping[Any, Any]�dict2�Mapping[Any, Any]�Nonec��|���D]�\}}|��|�|��}t|t��r�|�i}t|t��r||f}njt|t
��r.|\}}|���}t||��||f}n'|���}t||��n|}|||<��dS)anMerge the data from `dict2` into the `dict1` dictionary, making copies
    of nested dictionaries.

    >>> d = {1: 'foo', 3: 'baz'}
    >>> merge(d, {1: 'Foo', 2: 'Bar'})
    >>> sorted(d.items())
    [(1, 'Foo'), (2, 'Bar'), (3, 'baz')]

    :param dict1: the dictionary to merge into
    :param dict2: the dictionary containing the data that should be merged
    N)�itemsrHr�dict�Alias�tuplerMrO)rVrX�key�val2�val1�alias�otherss       rrOrO�s����[�[�]�]���	��T����9�9�S�>�>�D��$��%�%�
��<��D��d�E�*�*�	&� �$�<�D�D���e�,�,�&�$(�M�E�6�#�[�[�]�]�F��&�$�'�'�'�!�6�?�D�D��9�9�;�;�D��$��%�%�%�%����E�#�J��%�rc�*�eZdZdZd
d�Zdd�Zdd�ZdS)r^z�Representation of an alias in the locale data.

    An alias is a value that refers to some other part of the locale data,
    as specified by the `keys`.
    �keys�tuple[str, ...]rrZc�.�t|��|_dSr:)r_rf)�selfrfs  r�__init__zAlias.__init__�s���$�K�K��	�	�	rrc�B�dt|��j�d|j�d�S)N�<� �>)�type�__name__rf�ris r�__repr__zAlias.__repr__�s&��7�4��:�:�&�7�7���7�7�7�7rrR�Mapping[str | int | None, Any]c���|}|jD]
}||}�t|t��r|�|��}n/t|t��r|\}}|�|��}|S)z�Resolve the alias based on the given data.

        This is done recursively, so if one alias resolves to a second alias,
        that second alias will also be resolved.

        :param data: the locale data
        :type data: `dict`
        )rfrr^�resolver_)rirR�baser`rcrds      rruz
Alias.resolve�s{�����9�	�	�C���9�D�D��d�E�"�"�	'��<�<��%�%�D�D�
��e�
$�
$�	'� �M�E�6��=�=��&�&�D��rN)rfrgrrZ)rr)rRrsrrs)rp�
__module__�__qualname__�__doc__rjrrrur4rrr^r^�sZ�������� � � � �8�8�8�8������rr^c�L�eZdZdZddd�Zdd
�Zdd�Zdd�Zdd�Zdd�Z	dd�Z
dS)�LocaleDataDictzUDictionary wrapper that automatically resolves aliases to the actual
    values.
    NrR�%MutableMapping[str | int | None, Any]rv�%Mapping[str | int | None, Any] | Nonec�*�||_|�|}||_dSr:)�_datarv)rirRrvs   rrjzLocaleDataDict.__init__�s����
��<��D���	�	�	rr�intc�*�t|j��Sr:)rKrrqs r�__len__zLocaleDataDict.__len__�s���4�:���r�Iterator[str | int | None]c�*�t|j��Sr:)�iterrrqs r�__iter__zLocaleDataDict.__iter__�s���D�J���rr`�str | int | Noner
c��|j|x}}t|t��r|�|j��}t|t
��rA|\}}|�|j�����}t||��t|t��rt||j���}||ur
||j|<|S�N)rv)
rrr^rurvr_rMrOr]r{)rir`�orig�valrcrds      r�__getitem__zLocaleDataDict.__getitem__�s����Z��_�$��s��c�5�!�!�	)��+�+�d�i�(�(�C��c�5�!�!�	��M�E�6��-�-��	�*�*�/�/�1�1�C��#�v�����c�4� � �	6� ��4�9�5�5�5�C��d�?�?�!�D�J�s�O��
r�valuerZc��||j|<dSr:�r)rir`r�s   r�__setitem__zLocaleDataDict.__setitem__�s����
�3���rc��|j|=dSr:r�)rir`s  r�__delitem__zLocaleDataDict.__delitem__�s���J�s�O�O�Orc�\�t|j���|j���Sr�)r{rrMrvrqs rrMzLocaleDataDict.copy�s#���d�j�o�o�/�/�d�i�@�@�@�@rr:)rRr|rvr})rr�)rr�)r`r�rr
)r`r�r�r
rrZ)r`r�rrZ)rr{)rprwrxryrjr�r�r�r�r�rMr4rrr{r{�s������������������ � � � ����� � � � �����A�A�A�A�A�Arr{)r
rrr)r
rrr)r
rrr+)rr0)T)r
rr>r+rr)rVrWrXrYrrZ)(ry�
__future__rrrP�rer"�	threading�collectionsr�collections.abcrrr�	functoolsr�	itertoolsr	�typingr
r�__annotations__�RLockrFr r(�dirname�__file__r)�compile�Ir$rr*r-rrLrOr^r{r4rr�<module>r�s!�����#�"�"�"�"�"�	�	�	�	�
�
�
�
�	�	�	�	�
�
�
�
�����������=�=�=�=�=�=�=�=�=�=��������������������������i�o����
�7�<�<������1�1�=�A�A��&�B�J�'N�PR�PT�U�U������
1�
1�
1�
1� @�@�@�@���4����������&1�1�1�1�1�h����B��������B&A�&A�&A�&A�&A�S�'�&A�&A�&A�&A�&Ar

?>