403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/babel/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/babel/__pycache__/localedata.cpython-39.pyc
a


�4d/ �@sHUdZddlmZddlZddlZddlZddlZddlZddlm	Z	ddl
mZmZm
Z
ddlmZddlmZddlmZiZd	ed
<e��Zej�ej�e�d�Ze�dej�Zd
dd�dd�Z dd
d�dd�Z!d
dd�dd�Z"edd�dd�dd��Z#d+ddd	d�dd �Z$d!d"d#d$�d%d&�Z%Gd'd(�d(�Z&Gd)d*�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)�Anyzdict[str, Any]�_cachezlocale-dataz%^(con|prn|aux|nul|com[0-9]|lpt[0-9])$�strz
str | None)�name�returncCsL|rt|t�sdS|����}t�tt�g�D]}||��kr.|Sq.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Z	locale_id�r�4/usr/lib/python3.9/site-packages/babel/localedata.py�normalize_locale!srzos.PathLike[str] | strcCsPtj�|�}tjdkr<t�tj�|�d�r<td|�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rrr�resolve_locale_filename/s r#�boolcCsB|rt|t�sdS|tvrdStj�t|��}|r6dStt|��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Z
file_foundrrrr%?sr%)�maxsizez	list[str]�r
cCsdd�dd�t�t�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)
    cSs$g|]\}}|dkr|dkr|�qS)r�rootr)�.0�stem�	extensionrrr�
<listcomp>Zs�z&locale_identifiers.<locals>.<listcomp>css|]}tj�|�VqdS�N)rrr)r)�filenamerrr�	<genexpr>]�z%locale_identifiers.<locals>.<genexpr>)r�listdirr"rrrrrNs�rT)r�merge_inheritedr
cCs
tj�|�}t��z�t�|�}|s�|dks0|s6i}nVddlm}|d��|�}|s�|�	d�}t
|�dkrndnd�|dd��}t|��
�}t|�}t|d	��8}|dkr�|r�t|t�|��n
t�|�}Wd�n1s�0Y|t|<|Wt��St��0dS)
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
    r(r)�
get_globalZparent_exceptions�_�N����rb)rrr�_cache_lock�acquirer
�getZ
babel.corer3�split�lenr!�load�copyr#�open�merge�pickle�release)rr2�datar3�parent�partsr.Zfileobjrrrr=bs.

"(�r=zMutableMapping[Any, Any]zMapping[Any, Any]�None)�dict1�dict2r
cCs�|��D]�\}}|dur|�|�}t|t�r�|dur8i}t|t�rL||f}q�t|t�rz|\}}|��}t||�||f}q�|��}t||�n|}|||<qdS)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)�itemsr:r�dict�Alias�tupler>r@)rGrH�keyZval2Zval1�alias�othersrrrr@�s"






r@c@s>eZdZdZddd�dd�Zdd�d	d
�Zddd�d
d�ZdS)rKz�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`.
    ztuple[str, ...]rF)�keysr
cCst|�|_dSr-)rLrP)�selfrPrrr�__init__�szAlias.__init__rr'cCsdt|�j�d|j�d�S)N�<� �>)�type�__name__rP�rQrrr�__repr__�szAlias.__repr__zMapping[str | int | None, Any])rCr
cCsN|}|jD]}||}q
t|t�r.|�|�}nt|t�rJ|\}}|�|�}|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`
        )rPrrK�resolverL)rQrC�baserMrNrOrrrrZ�s	




z
Alias.resolveN)rW�
__module__�__qualname__�__doc__rRrYrZrrrrrK�srKc@s~eZdZdZdddd�dd�Zdd	�d
d�Zdd	�d
d�Zddd�dd�Zdddd�dd�Zddd�dd�Z	dd	�dd�Z
dS)�LocaleDataDictzUDictionary wrapper that automatically resolves aliases to the actual
    values.
    Nz%MutableMapping[str | int | None, Any]z%Mapping[str | int | None, Any] | None)rCr[cCs||_|dur|}||_dSr-)�_datar[)rQrCr[rrrrR�szLocaleDataDict.__init__�intr'cCs
t|j�Sr-)r<r`rXrrr�__len__�szLocaleDataDict.__len__zIterator[str | int | None]cCs
t|j�Sr-)�iterr`rXrrr�__iter__�szLocaleDataDict.__iter__zstr | int | Noner	)rMr
cCs~|j|}}t|t�r$|�|j�}t|t�rP|\}}|�|j���}t||�t|t�rht	||jd�}||urz||j|<|S�N)r[)
r`rrKrZr[rLr>r@rJr_)rQrMZorig�valrNrOrrr�__getitem__�s




zLocaleDataDict.__getitem__rF)rM�valuer
cCs||j|<dSr-�r`)rQrMrhrrr�__setitem__�szLocaleDataDict.__setitem__cCs|j|=dSr-ri)rQrMrrr�__delitem__�szLocaleDataDict.__delitem__cCst|j��|jd�Sre)r_r`r>r[rXrrrr>�szLocaleDataDict.copy)N)rWr\r]r^rRrbrdrgrjrkr>rrrrr_�sr_)T)(r^Z
__future__rrrA�rer�	threading�collectionsr�collections.abcrrr�	functoolsr�	itertoolsr�typingr	r
�__annotations__�RLockr8rr!�dirname�__file__r"�compile�Irrr#r%rr=r@rKr_rrrr�<module>s0
4!!

Youez - 2016 - github.com/yon3zu
LinuXploit