Ë
    Ã?Æiœ	  ã                  óZ   — d Z ddlmZ ddlmZ ddl­ ddlmZmZ dd„Z	dd„Z
dd„Zdd	„Zy
)a|  UID (Umsatzsteuer-Identifikationsnummer, Austrian VAT number).

The Austrian UID is a 9-digit number that starts with a U (optionally
preceded with AT). The last digit is a check digit.

>>> validate('AT U13585627')
'U13585627'
>>> calc_check_digit('U1358562')
'7'
>>> validate('U13585626')  # incorrect check digit
Traceback (most recent call last):
    ...
InvalidChecksum: ...
é    )Úannotations)Úluhn)Ú*)ÚcleanÚisdigitsc                ó‚   — t        | d«      j                  «       j                  «       } | j                  d«      r| dd } | S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.z -./ÚATé   N)r   ÚupperÚstripÚ
startswith©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/at/uid.pyÚcompactr   *   s@   € ô �6˜6Ó"×(Ñ(Ó*×0Ñ0Ó2€FØ×Ñ˜ÔØ˜˜�ˆØ€Mó    c                óP   — t        dt        j                  | dd «      z
  dz  «      S )zZCalculate the check digit. The number passed should not have the
    check digit included.é   é   Né
   )Ústrr   Úchecksumr   s    r   Úcalc_check_digitr   3   s(   € ô �”D—M‘M &¨¨ *Ó-Ñ-°Ñ3Ó4Ð4r   c                óÈ   — t        | «      } | dd dk7  st        | dd «      s
t        «       ‚t        | «      dk7  r
t	        «       ‚t        | dd «      | d   k7  r
t        «       ‚| S )zbCheck if the number is a valid VAT number. This checks the length,
    formatting and check digit.Nr   ÚUé	   éÿÿÿÿ)r   r   ÚInvalidFormatÚlenÚInvalidLengthr   ÚInvalidChecksumr   s    r   Úvalidater"   9   si   € ô �V‹_€FØˆbˆq€z�SÒ¤¨°°¨Ô 4Ü‹oÐÜ
ˆ6ƒ{�aÒÜ‹oÐÜ˜˜s ˜Ó$¨¨r©
Ò2ÜÓÐØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z*Check if the number is a valid VAT number.F)Úboolr"   ÚValidationErrorr   s    r   Úis_validr&   F   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r   r   Úreturnr   )r   r   r'   r$   )Ú__doc__Ú
__future__r   Ústdnumr   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r"   r&   © r   r   ú<module>r.      s,   ðñ(õ #å Ü ß 'óó5ó
ôr   