
     h                     <    d dl mZ d dlmZ d dlmZ 	 	 	 	 	 ddZdS )	    )Decimal)settings)	mark_safeN Fc           	         |p|du ot           j        ot           j        }|p|}|o|dk    }t          | t                    r|s|st          |           S d}t          | t                    r?dt          |                                           v rt          t          |                     } t          | t                    r|Ht          dd
                    |d          z             }	t          |           |	k     rt          d          } |                                 \  }
}}t          |          t          |          z   dk    rXd	                    |           } |                     d          \  }}t          |||||||          }d
                    ||          S d                    |           }nt          |           }|d         dk    rd}|dd         }d|v r%|                    d          \  }}|
|d|         }n|d}}||d|t          |          z
  z  z   }|o||z   }|r	 t!          |          }n# t"          $ r |dg}Y nw xY w|                    d          }d}d}|ddd         D ]=}|r/||k    r)|r|                    d          p|}||ddd         z  }d}||z  }|dz  }>|ddd         }||z   |z   S )aT  
    Get a number (as a number or string), and return it as a string,
    using formats defined as arguments:

    * decimal_sep: Decimal separator symbol (for example ".")
    * decimal_pos: Number of decimal positions
    * grouping: Number of digits in every group limited by thousand separator.
        For non-uniform digit grouping, it can be a sequence with the number
        of digit group sizes following the format used by the Python locale
        module in locale.localeconv() LC_NUMERIC grouping (e.g. (3, 2, 0)).
    * thousand_sep: Thousand separator symbol (for example ",")
    Nr   r   ez0.10   z{:e}z{}e{}z{:f}-   .)r   USE_L10NUSE_THOUSAND_SEPARATOR
isinstanceintr   floatstrlowerr   rjustabsas_tuplelenformatsplitlist	TypeErrorpop)numberdecimal_sepdecimal_posgroupingthousand_sepforce_groupinguse_l10nuse_groupingsigncutoff_digitsexponentcoefficient
str_numberint_partdec_part	intervalsactive_intervalint_part_gdcntdigits                         U/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/django/utils/numberformat.pyr   r      sH   , 	<X%;(*;*

)   1>L1HML&# !| !K !   D&%   &SCKK,=,=,?,?%?%?V%%&'"" !" TCIIk3$?$??@@F6{{V##  %oo//68x==3v;;&,,]]6**F$*LL$5$5!K  K >>+x888v..JJ[[
!}^

j'--c22("-H'(skCMM&ABC2K(2H %	&XII 	& 	& 	&!1III	& $--**ddd^ 	 	E so-- J&/mmA&6&6&I/O|DDbD115 K1HCCttt$(?X%%s   )H9 9I
	I
)Nr   r   FN)decimalr   django.confr   django.utils.safestringr   r        r6   <module>r<      sp                      - - - - - - a& a& a& a& a& a&r;   