HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1991111/cwd/usr/lib/python3/dist-packages/babel/__pycache__/
Upload File :
Current File : //proc/1991111/cwd/usr/lib/python3/dist-packages/babel/__pycache__/plural.cpython-311.pyc
�

ƪbQV�	�b�dZddlZddlZdZdZd�ZGd�d��Zd�Zd	�Zd
�Z	d�Z
d�Zd
�ZGd�de
��Zhd�Zdejdej��fdejdd�e���d���fdejd��fdejd��fdejdej��fgZd�Zd2d�Zd2d�Zd�Zd �Zd!�Zd"�ZGd#�d$��Zd%�Zd&�Zd'�ZGd(�d)��ZGd*�d+e��Z Gd,�d-e��Z!Gd.�d/e!��Z"Gd0�d1e��Z#dS)3z�
    babel.numbers
    ~~~~~~~~~~~~~

    CLDR Plural support.  See UTS #35.

    :copyright: (c) 2013-2022 by the Babel Team.
    :license: BSD, see LICENSE for more details.
�N)�zero�one�two�few�many�otherrc�j�t|��}t|��}t|t��r*||kr|}n!t	jt
|����}t|tj��r�|���}|j}|dkr|j	|d�nd}d�
d�|D����}|�d��}t|��}t|��}	t|pd��}
t|pd��}ndx}x}	x}
}dx}}
||||	|
|||
fS)u�Extract operands from a decimal, a float or an int, according to `CLDR rules`_.

    The result is a 8-tuple (n, i, v, w, f, t, c, e), where those symbols are as follows:

    ====== ===============================================================
    Symbol Value
    ------ ---------------------------------------------------------------
    n      absolute value of the source number (integer and decimals).
    i      integer digits of n.
    v      number of visible fraction digits in n, with trailing zeros.
    w      number of visible fraction digits in n, without trailing zeros.
    f      visible fractional digits in n, with trailing zeros.
    t      visible fractional digits in n, without trailing zeros.
    c      compact decimal exponent value: exponent of the power of 10 used in compact decimal formatting.
    e      currently, synonym for ‘c’. however, may be redefined in the future.
    ====== ===============================================================

    .. _`CLDR rules`: https://www.unicode.org/reports/tr35/tr35-61/tr35-numbers.html#Operands

    :param source: A real number
    :type source: int|float|decimal.Decimal
    :return: A n-i-v-w-f-t-c-e tuple
    :rtype: tuple[decimal.Decimal, int, int, int, int, int, int, int]
    rN��c3�4K�|]}t|��V��dS�N��str)�.0�ds  �./usr/lib/python3/dist-packages/babel/plural.py�	<genexpr>z#extract_operands.<locals>.<genexpr>As(����;�;�a�3�q�6�6�;�;�;�;�;�;��0)
�abs�int�
isinstance�float�decimal�Decimalr�as_tuple�exponent�digits�join�rstrip�len)�source�n�i�	dec_tuple�exp�fraction_digits�trailing�no_trailing�v�w�f�t�c�es              r�extract_operandsr0s<��2	�F���A��A���A��!�U���(���6�6��A�A����A���'�'�A��!�W�_�%�%���J�J�L�L�	�� ��47�!�G�G�)�*�3�4�4�0�0����7�7�;�;�?�;�;�;�;�;���o�o�c�*�*����M�M���������
�A������ �q�!�!�������A���A�
�I�A���a��A�q�!�Q��!�!rc�|�eZdZdZdZd�Zd�Zed���Ze	d���Z
e	d�d�	��Zd
�Zd�Z
d�Zd
S)�
PluralRuleafRepresents a set of language pluralization rules.  The constructor
    accepts a list of (tag, expr) tuples or a dict of `CLDR rules`_. The
    resulting object is callable and accepts one parameter with a positive or
    negative number (both integer and float) for the number that indicates the
    plural form for a string and returns the tag for the format:

    >>> rule = PluralRule({'one': 'n is 1'})
    >>> rule(1)
    'one'
    >>> rule(2)
    'other'

    Currently the CLDR defines these tags: zero, one, two, few, many and
    other where other is an implicit default.  Rules should be mutually
    exclusive; for a given numeric value, only one rule should apply (i.e.
    the condition should only be true for one of the plural rule elements.

    .. _`CLDR rules`: https://www.unicode.org/reports/tr35/tr35-33/tr35-numbers.html#Language_Plural_Rules
    )�abstract�_funcc��t|t��r|���}t��}g|_tt
|����D]}\}}|tvrtd|z���||vrtd|z���|�	|��t|��j}|r|j�||f���~dS)a$Initialize the rule instance.

        :param rules: a list of ``(tag, expr)``) tuples with the rules
                      conforming to UTS #35 or a dict with the tags as keys
                      and expressions as values.
        :raise RuleError: if the expression is malformed
        zunknown tag %rztag %r defined twiceN)
r�dict�items�setr3�sorted�list�_plural_tags�
ValueError�add�_Parser�ast�append)�self�rules�found�key�exprr?s      r�__init__zPluralRule.__init__ds����e�T�"�"�	"��K�K�M�M�E�������
���U���,�,�	1�	1�I�C���,�&�&� �!1�C�!7�8�8�8����� �!7�#�!=�>�>�>��I�I�c�N�N�N��$�-�-�#�C��
1��
�$�$�c�3�Z�0�0�0��	1�	1rc���|j�dt|��j�dd��fd�tD�����d�S)N�<� �, c�2��g|]}|�v�|�d�|����S)z: r
)r�tagrBs  �r�
<listcomp>z'PluralRule.__repr__.<locals>.<listcomp>~s8���(�(�(����,�,�$'�3�3��c�
�
�3�&�,�,r�>)rB�type�__name__rr;)rArBs @r�__repr__zPluralRule.__repr__zsh����
�����J�J�����I�I�(�(�(�(�|�(�(�(�
)�
)�
)�
)�
�	
rc�<�t||��r|S||��S)a
Create a `PluralRule` instance for the given rules.  If the rules
        are a `PluralRule` object, that object is returned.

        :param rules: the rules as list or dict, or a `PluralRule` object
        :raise RuleError: if the expression is malformed
        )r)�clsrBs  r�parsezPluralRule.parse�s)���e�S�!�!�	��L��s�5�z�z�rc�P��t��j��fd�|jD��S)z�The `PluralRule` as a dict of unicode plural rules.

        >>> rule = PluralRule({'one': 'n is 1'})
        >>> rule.rules
        {'one': 'n is 1'}
        c�.��i|]\}}|�|����Sr
r
)rrLr?�_compiles   �r�
<dictcomp>z$PluralRule.rules.<locals>.<dictcomp>�s'���A�A�A�x�s�C��X�X�c�]�]�A�A�Ar)�_UnicodeCompiler�compiler3)rArWs @rrBzPluralRule.rules�s/���$�%�%�-��A�A�A�A�4�=�A�A�A�Arc�>�td�|jD����S)Nc3�&K�|]}|dV��
dS)rNr
)rr$s  rrz&PluralRule.<lambda>.<locals>.<genexpr>�s&����'A�'A���!��'A�'A�'A�'A�'A�'Ar)�	frozensetr3��xs r�<lambda>zPluralRule.<lambda>�s��i�'A�'A�a�j�'A�'A�'A�A�A�rz�
        A set of explicitly defined tags in this rule.  The implicit default
        ``'other'`` rules is not part of this set unless there is an explicit
        rule for it.)�docc��|jSr
�r3�rAs r�__getstate__zPluralRule.__getstate__�s
���}�rc��||_dSr
rc)rAr3s  r�__setstate__zPluralRule.__setstate__�s
�� ��
�
�
rc�t�t|d��st|��|_|�|��S)Nr4)�hasattr�	to_pythonr4)rAr#s  r�__call__zPluralRule.__call__�s1���t�W�%�%�	)�"�4���D�J��z�z�!�}�}�rN)rP�
__module__�__qualname__�__doc__�	__slots__rFrQ�classmethodrT�propertyrB�tagsrergrkr
rrr2r2Ms���������(&�I�1�1�1�,
�
�
��	�	��[�	��B�B��X�B��8�A�A�H����D�
���!�!�!�����rr2c�$�t��j}dg}t�|��jD])\}}|�||���d|�d����*|�dtz��d�|��S)a�Convert a list/dict of rules or a `PluralRule` object into a JavaScript
    function.  This function depends on no external library:

    >>> to_javascript({'one': 'n is 1'})
    "(function(n) { return (n == 1) ? 'one' : 'other'; })"

    Implementation detail: The function generated will probably evaluate
    expressions involved into range operations multiple times.  This has the
    advantage that external helper functions are not required and is not a
    big performance hit for these simple calculations.

    :param rule: the rules as list or dict, or a `PluralRule` object
    :raise RuleError: if the expression is malformed
    z(function(n) { return z ? z : z%r; })r)�_JavaScriptCompilerrZr2rTr3r@�
_fallback_tagr)�rule�to_js�resultrLr?s     r�
to_javascriptry�s���
 �!�!�)�E�&�
'�F��$�$�T�*�*�3�8�8���S��
�
�e�e�C�j�j�j�j�#�#�#�6�7�7�7�7�
�M�M�(�]�*�+�+�+�
�7�7�6�?�?�rc	���ttttd�}t	��j}ddg}t�|��jD]6\}}|�	d||���dt|�������7|�	dtz��td�|��dd	��}t||��|d
S)a<Convert a list/dict of rules or a `PluralRule` object into a regular
    Python function.  This is useful in situations where you need a real
    function and don't are about the actual rule object:

    >>> func = to_python({'one': 'n is 1', 'few': 'n in 2..4'})
    >>> func(1)
    'one'
    >>> func(3)
    'few'
    >>> func = to_python({'one': 'n in 1,11', 'few': 'n in 3..10,13..19'})
    >>> func(11)
    'one'
    >>> func(15)
    'few'

    :param rule: the rules as list or dict, or a `PluralRule` object
    :raise RuleError: if the expression is malformed
    )�IN�WITHIN�MODr0zdef evaluate(n):z- n, i, v, w, f, t, c, e = extract_operands(n)z if (z
): return z
 return %r�
z<rule>�exec�evaluate)�
in_range_list�within_range_list�cldr_modulor0�_PythonCompilerrZr2rTr3r@rrur�eval)rv�	namespace�to_python_funcrxrLr?�codes       rrjrj�s���(�#��,�	��I�%�&�&�.�N��7��F��$�$�T�*�*�3�O�O���S�	�
�
�
�~�~�c�/B�/B�/B�/B�C��H�H�H�M�N�N�N�N�
�M�M�,��.�/�/�/��4�9�9�V�$�$�h��7�7�D���y�����Z� � rc���t�|��}|jthz�t	��j}�fd�tD��j}dt���zg}|j	D]1\}}|�
d||��||��fz���2|�
d|t��z��d�|��S)aThe plural rule as gettext expression.  The gettext expression is
    technically limited to integers and returns indices rather than tags.

    >>> to_gettext({'one': 'n is 1', 'two': 'n is 2'})
    'nplurals=3; plural=((n == 1) ? 0 : (n == 2) ? 1 : 2);'

    :param rule: the rules as list or dict, or a `PluralRule` object
    :raise RuleError: if the expression is malformed
    c���g|]}|�v�|��	Sr
r
)rrL�	used_tagss  �rrMzto_gettext.<locals>.<listcomp>�s#���B�B�B�#��	�1A�1A�#�1A�1A�1Arznplurals=%d; plural=(z
%s ? %d : z%d);r)r2rTrrru�_GettextCompilerrZr;�indexr!r3r@r)rvrW�
_get_indexrxrLr?r�s      @r�
to_gettextr��s�������D�!�!�D��	�]�O�+�I��!�!�)�H�B�B�B�B��B�B�B�H�J�%��I���6�
7�F��M�G�G���S��
�
�l�h�h�s�m�m�Z�Z��_�_�%E�E�F�F�F�F�
�M�M�&�:�:�m�4�4�4�5�5�5�
�7�7�6�?�?�rc�H�|t|��kot||��S)a�Integer range list test.  This is the callback for the "in" operator
    of the UTS #35 pluralization rule language:

    >>> in_range_list(1, [(1, 3)])
    True
    >>> in_range_list(3, [(1, 3)])
    True
    >>> in_range_list(3, [(1, 3), (5, 8)])
    True
    >>> in_range_list(1.2, [(1, 4)])
    False
    >>> in_range_list(10, [(1, 4)])
    False
    >>> in_range_list(10, [(1, 4), (6, 8)])
    False
    )rr���num�
range_lists  rr�r�s$��"�#�c�(�(�?�A�0��j�A�A�Arc�:��t�fd�|D����S)a�Float range test.  This is the callback for the "within" operator
    of the UTS #35 pluralization rule language:

    >>> within_range_list(1, [(1, 3)])
    True
    >>> within_range_list(1.0, [(1, 3)])
    True
    >>> within_range_list(1.2, [(1, 4)])
    True
    >>> within_range_list(8.8, [(1, 4), (7, 15)])
    True
    >>> within_range_list(10, [(1, 4)])
    False
    >>> within_range_list(10.5, [(1, 4), (20, 30)])
    False
    c3�6�K�|]\}}�|ko�|kV��dSr
r
)r�min_�max_r�s   �rrz$within_range_list.<locals>.<genexpr>%s4�����H�H�z�t�T�s�d�{�*�s�d�{�H�H�H�H�H�Hr)�anyr�s` rr�r�s(���"�H�H�H�H�Z�H�H�H�H�H�Hrc�R�d}|dkr|dz}d}|dkr|dz}||z}|r|dz}|S)z�Javaish modulo.  This modulo operator returns the value with the sign
    of the dividend rather than the divisor like Python does:

    >>> cldr_modulo(-3, 5)
    -3
    >>> cldr_modulo(-3, -5)
    -3
    >>> cldr_modulo(3, 5)
    3
    r����r
)�a�b�reverse�rvs    rr�r�(sQ���G��1�u�u�	�R������1�u�u�	�R���	
�Q��B���
�b���
�Irc��eZdZdZdS)�	RuleErrorzRaised if a rule is malformed.N)rPrlrmrnr
rrr�r�?s������(�(�(�(rr�>r.r/r,r$r#r-r*r+z\s+�wordz"\b(and|or|is|(?:with)?in|not|mod|[rz])\b�valuez\d+�symbolz%|,|!=|=�ellipsisz\.{2,3}|\u2026c��|�d��d}g}d}t|��}||kr�tD]^\}}|�||��}|�A|���}|r)|�||���f��n�_td||z���||k��|ddd�S)N�@rz5malformed CLDR pluralization rule.  Got unexpected %rr�)�splitr!�_RULES�match�endr@�groupr�)�srx�posr��tokrvr�s       r�
tokenize_ruler�Vs���	������Q��A�
�F�
�C�

�a�&�&�C�

��)�)��		:�		:�I�C���J�J�q�#�&�&�E�� ��i�i�k�k���8��M�M�3����
�
�"6�7�7�7���	!��0�23�C�&�9�:�:�
:���)�)��$�$�B�$�<�rc�V�|o'|dd|ko|dup|dd|kS)Nr�rr�r
��tokens�type_r�s   r�test_next_tokenr�is<���2�f�R�j��m�u�,�2�	�$��	0�&��*�Q�-�5�0�2rc�P�t|||��r|���SdSr
)r��popr�s   r�
skip_tokenr�ns.���v�u�e�,�,���z�z�|�|���rc��d|ffS)Nr�r
)r�s r�
value_noder�ss���U�I��rc�
�|dfS)Nr
r
)�names r�
ident_noder�ws����8�Orc�
�d|fS)Nr�r
)r�s r�range_list_noder�{s
����#�#rc��d|ffS)N�notr
)r�s r�negater�s���2�%�<�rc�P�eZdZdZd�Zd
d�Zd�Zd�Zd�Zd�Z	d	�Z
d
�Zd�Zd�Z
dS)r>u�Internal parser.  This class can translate a single rule into an abstract
    tree of tuples. It implements the following grammar::

        condition     = and_condition ('or' and_condition)*
                        ('@integer' samples)?
                        ('@decimal' samples)?
        and_condition = relation ('and' relation)*
        relation      = is_relation | in_relation | within_relation
        is_relation   = expr 'is' ('not')? value
        in_relation   = expr (('not')? 'in' | '=' | '!=') range_list
        within_relation = expr ('not')? 'within' range_list
        expr          = operand (('mod' | '%') value)?
        operand       = 'n' | 'i' | 'f' | 't' | 'v' | 'w'
        range_list    = (range | value) (',' range_list)*
        value         = digit+
        digit         = 0|1|2|3|4|5|6|7|8|9
        range         = value'..'value
        samples       = sampleRange (',' sampleRange)* (',' ('…'|'...'))?
        sampleRange   = decimalValue '~' decimalValue
        decimalValue  = value ('.' value)?

    - Whitespace can occur between or around any of the above tokens.
    - Rules should be mutually exclusive; for a given numeric value, only one
      rule should apply (i.e. the condition should only be true for one of
      the plural rule elements).
    - The in and within relations can take comma-separated lists, such as:
      'n in 3,5,7..15'.
    - Samples are ignored.

    The translator parses the expression on instanciation into an attribute
    called `ast`.
    c���t|��|_|js	d|_dS|���|_|jr#t	d|jddz���dS)NzExpected end of rule, got %rr�r�)r�r�r?�	conditionr�)rA�strings  rrFz_Parser.__init__�sv��#�F�+�+����{�	��D�H��F��>�>�#�#����;�	0��:� �K��O�A�.�/�0�0�
0�	0�	0rNc���t|j||��}|�|S|�t|dur|p|��}|jstd|z���td|�d|jdd�����)Nz#expected %s but end of rule reachedz	expected z	 but got r�r�)r�r��reprr�)rAr�r��term�tokens     r�expectz_Parser.expect�s����4�;��u�5�5�����L��<����
�/�%�8�5�9�9�D��{�	J��A�D�H�I�I�I��i�D�D�D�$�+�b�/�!�:L�:L�M�N�N�Nrc��|���}t|jdd��r.d||���ff}t|jdd���.|S)Nr��or)�
and_conditionr�r��rA�ops  rr�z_Parser.condition�sa��
�
�
�
!�
!�����f�d�3�3�	2���D�.�.�0�0�1�1�B����f�d�3�3�	2��	rc��|���}t|jdd��r.d||���ff}t|jdd���.|S)Nr��and)�relationr�r�r�s  rr�z_Parser.and_condition�sY��
�]�]�_�_�����f�e�4�4�	.���T�]�]�_�_�-�-�B����f�e�4�4�	.��	rc���|���}t|jdd��r0t|jdd��rdpd||���ffSt|jdd��}d}t|jdd��rd}n<t|jdd��s&|rt	d���|�|��Sd|||���ff}|rt|��n|S)	Nr��isr��isnot�in�withinz#Cannot negate operator based rules.r�)rEr�r�r�r��newfangled_relationr�r�)rA�left�negated�methodr�s     rr�z_Parser.relation�s���y�y�{�{���d�k�6�4�0�0�	%��d�k�6�5�9�9�E�g�M���t�z�z�|�|�$�%�
%��T�[�&�%�8�8�����d�k�6�8�4�4�	6��F�F��d�k�6�4�8�8�
6��K�#�$I�J�J�J��/�/��5�5�5�
�&�$����(9�(9�:�
:��$�,�v�b�z�z�z�"�,rc���t|jdd��rd}n(t|jdd��rd}ntd���dd||���ff}|rt	|��n|S)	Nr��=Fz!=Tz'Expected "=" or "!=" or legacy relationr�r�)r�r�r�r�r�)rAr�r�r�s    rr�z_Parser.newfangled_relation�s}���d�k�8�S�1�1�	G��G�G�
���X�t�
4�
4�	G��G�G��E�F�F�F�
�$��d�o�o�&7�&7�8�
8��$�,�v�b�z�z�z�"�,rc��|���}t|jd��r||���fS||fS)Nr�)r�r�r�)rAr�s  r�range_or_valuez_Parser.range_or_value�s@���z�z�|�|���d�k�:�.�.�	�������%�%���:�rc���|���g}t|jdd��r=|�|�����t|jdd���=t	|��S)Nr��,)r�r�r�r@r�)rAr�s  rr�z_Parser.range_list�sr���)�)�+�+�,�
����h��4�4�	5����d�1�1�3�3�4�4�4����h��4�4�	5��z�*�*�*rc�Z�t|jd��}|�|dtvrtd���|d}t|jdd��rd|df|���ffSt|jdd��rd|df|���ffSt|��S)Nr�r�zExpected identifier variable�modr
r��%)r�r��_VARSr�r�r�)rAr�r�s   rrEz_Parser.expr�s����$�+�v�.�.���<�4��7�%�/�/��:�;�;�;��A�w���d�k�6�5�1�1�	5��D�"�:�t�z�z�|�|�4�4�4�
���X�s�
3�
3�	5��D�"�:�t�z�z�|�|�4�4�4��$���rc�l�tt|�d��d����S)Nr�r�)r�rr�rds rr�z
_Parser.value�s)���#�d�k�k�'�2�2�1�5�6�6�7�7�7r)NN)rPrlrmrnrFr�r�r�r�r�r�r�rEr�r
rrr>r>�s���������B
0�
0�
0�O�O�O�O�������-�-�-�"-�-�-����+�+�+�	 �	 �	 �8�8�8�8�8rr>c����fd�S)�%Compiler factory for the `_Compiler`.c�^���|�|��|�|��fzSr
�rZ)rA�l�r�tmpls   �rr`z"_binary_compiler.<locals>.<lambda>s%���d�d�l�l�1�o�o�t�|�|�A���%G�G�rr
�r�s`r�_binary_compilerr��s���G�G�G�G�Grc����fd�S)r�c�4���|�|��zSr
r�)rAr_r�s  �rr`z!_unary_compiler.<locals>.<lambda>s���4�$�,�,�q�/�/�1�rr
r�s`r�_unary_compilerr�s���1�1�1�1�1rc��dS)Nrr
r^s rr`r`s���rc���eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ed��Zed
��Zed��Zed��Zed��Zed��Zd�ZdS)�	_CompilerzZThe compilers are able to transform the expressions into multiple
    output formats.
    c�8�|\}}t|d|z��|�S)N�compile_)�getattr)rA�argr��argss    rrZz_Compiler.compiles&�����D�-�w�t�Z�"�_�-�-�t�4�4rc��dS)Nr#r
r^s rr`z_Compiler.<lambda>���#�rc��dS)Nr$r
r^s rr`z_Compiler.<lambda>r�rc��dS)Nr*r
r^s rr`z_Compiler.<lambda>r�rc��dS)Nr+r
r^s rr`z_Compiler.<lambda>r�rc��dS)Nr,r
r^s rr`z_Compiler.<lambda>r�rc��dS)Nr-r
r^s rr`z_Compiler.<lambda>r�rc��dS)Nr.r
r^s rr`z_Compiler.<lambda>r�rc��dS)Nr/r
r^s rr`z_Compiler.<lambda>r�rc� �t|��Sr
r)r_r*s  rr`z_Compiler.<lambda>s���Q���rz
(%s && %s)z
(%s || %s)z(!%s)z
(%s %% %s)z
(%s == %s)z
(%s != %s)c��t���r
)�NotImplementedError)rAr�rEr�s    r�compile_relationz_Compiler.compile_relation$s��!�#�#�#rN)rPrlrmrnrZ�	compile_n�	compile_i�	compile_v�	compile_w�	compile_f�	compile_t�	compile_c�	compile_e�
compile_valuer��compile_and�
compile_orr��compile_not�compile_mod�
compile_is�
compile_isnotrr
rrr�r�s���������5�5�5��
�I��
�I��
�I��
�I��
�I��
�I��
�I��
�I�'�'�M�"�"�<�0�0�K�!�!�,�/�/�J�!�/�'�*�*�K�"�"�<�0�0�K�!�!�,�/�/�J�$�$�\�2�2�M�$�$�$�$�$rr�c�p�eZdZdZed��Zed��Zed��Zed��Z	d�Z
dS)r�z!Compiles an expression to Python.z(%s and %s)z
(%s or %s)z(not %s)zMOD(%s, %s)c���dd��fd�|dD����z}|����d��|���d|�d�S)Nz[%s]r�c	�Z��g|]'}dtt�j|����z��(S)z(%s, %s))�tuple�maprZ)r�range_rAs  �rrMz4_PythonCompiler.compile_relation.<locals>.<listcomp>2sB���
*�
*�
*���%��D�L�&� 9� 9�:�:�
:�
*�
*�
*rr��(rJ�))r�upperrZ)rAr�rEr��compile_range_lists`    rrz _PythonCompiler.compile_relation0s����#�c�h�h�
*�
*�
*�
*�%�a�=�
*�
*�
*�'+�'+�+�� &�|�|�~�~�~�~�t�|�|�D�/A�/A�/A�/A�1�1�1�3�	3rN)rPrlrmrnr�rrr�rrrr
rrr�r�(sh������+�+�"�"�=�1�1�K�!�!�,�/�/�J�!�/�*�-�-�K�"�"�=�1�1�K�3�3�3�3�3rr�c�6�eZdZdZejZeZeZ	eZ
eZd�ZdS)r�z)Compile into a gettext plural expression.c�z�g}|�|��}|dD]�}|d|dkr6|�d|�d|�|d���d����Jt|j|��\}}|�d|�d|�d|�d|�d�	����d	d
�|��zS)Nr�rrz == rz >= � && z <= z(%s)z || )rZr@rr)rAr�rEr�r��item�min�maxs        rrz!_GettextCompiler.compile_relationAs���
���|�|�D�!�!���q�M�
	�
	�D��A�w�$�q�'�!�!��	�	�	��D�D��L�L��a��)�)�)�)������
�t�|�T�2�2���S��	�	�	��D�D��C�C��D�D��C�C�	���������B���'�'rN)
rPrlrmrnr�r	r
�compile_zerorrr
rrr
rrr�r�8sE������3�3��#�I��I��I��I��I�(�(�(�(�(rr�c�.�eZdZdZd�ZeZeZeZeZ	d�Z
dS)rtz/Compiles the expression to plain of JavaScript.c��dS)NzparseInt(n, 10)r
r^s rr`z_JavaScriptCompiler.<lambda>Zs��+�rc��t�||||��}|dkr!|�|��}d|�d|�d|�d�}|S)Nr�z
(parseInt(z	, 10) == r$r)r�rrZ)rAr�rEr�r�s     rrz$_JavaScriptCompiler.compile_relation`sY���0�0��&�$�
�,�,���T�>�>��<�<��%�%�D�D�7;�t�t�T�T�T�4�4�4�H�D��rN)rPrlrmrnr
r(rrr
rrr
rrrtrtUsG������9�9�,�+�I��I��I��I��I�����rrtc��eZdZdZed��Zed��Zed��Zed��Zed��Z	d�Z
dd	�Zd
S)rYz+Returns a unicode pluralization rule again.z%s is %sz%s is not %sz	%s and %sz%s or %sz	%s mod %sc�(�|j|dddi�S)Nr�r�T)r)rAr�s  rrz_UnicodeCompiler.compile_notvs��$�t�$�H�Q�K�@�T�@�@�@rFc
�z�g}|dD]{}|d|dkr/|�|�|d�����C|�dtt|j|����z���||�|���|rdpd�d|�dd�|����S)Nr�rz%s..%sz notrrIr�)r@rZrrr)rAr�rEr�r��rangesr%s       rrz!_UnicodeCompiler.compile_relationys������q�M�	I�	I�D��A�w�$�q�'�!�!��
�
�d�l�l�4��7�3�3�4�4�4�4��
�
�h��s�4�<��/F�/F�)G�)G�G�H�H�H�H��L�L������ 2�F� 8�b� 8� 8��F�F�C�H�H�V�$�$�$�
�	
rN)F)rPrlrmrnr�rrrrrrrr
rrrYrYis�������5�5�"�!�*�-�-�J�$�$�^�4�4�M�"�"�;�/�/�K�!�!�*�-�-�J�"�"�;�/�/�K�A�A�A�

�

�

�

�

�

rrYr
)$rnr�rer;rur0r2ryrjr�r�r�r��	Exceptionr�r�rZ�UNICODErr�r�r�r�r�r�r�r�r>r�r�r(r�r�r�rtrYr
rr�<module>r3sA��������	�	�	�	�>���
�8"�8"�8"�vZ�Z�Z�Z�Z�Z�Z�Z�z���.%!�%!�%!�P���.B�B�B�(I�I�I�(���.)�)�)�)�)�	�)�)�)�		�		�		��
�:�2�:�f�b�j�)�)�*��Z�R�Z�R�b�g�g�e�n�n�R�R�R�
S�
S�T��j�b�j�� � �!�
�z�r�z�+�&�&�'�����-�r�z�:�:�;�
�����&2�2�2�2�
����
������$�$�$����x8�x8�x8�x8�x8�x8�x8�x8�vH�H�H�
2�2�2�
�}��$�$�$�$�$�$�$�$�:
3�
3�
3�
3�
3�i�
3�
3�
3� (�(�(�(�(�y�(�(�(�:�����*����(
�
�
�
�
�y�
�
�
�
�
r