Ë
    Ã?ÆiO	  ã                  óN   — d 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	)am  Euro banknote serial numbers.

The serial number consists of one letter and 11 digits, or two letters and 10
digits for the new series banknotes.

More information:

* https://en.wikipedia.org/wiki/Euro_banknotes#Serial_number

>>> validate('P36007033744')
'P36007033744'
>>> validate('P36007033743')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
é    )Úannotations)Ú*)ÚcleanÚisdigitsc                óR   — t        | d«      j                  «       j                  «       S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.ú )r   ÚupperÚstrip©Únumbers    úY/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/eu/banknote.pyÚcompactr   +   s#   € ô �˜Ó×#Ñ#Ó%×+Ñ+Ó-Ð-ó    c                ó,   — t        d„ | D «       «      dz  S )z'Calculate the checksum over the number.c              3  ó^   K  — | ]%  }t        |«      rt        |«      n
t        |«      –— Œ' y ­w)N)r   ÚintÚord)Ú.0Úxs     r   ú	<genexpr>zchecksum.<locals>.<genexpr>4   s#   è ø€ ÒA°Qœ !œŒs�1Œv¬#¨a«&Ó0ÑAùs   ‚+-é	   )Úsumr   s    r   Úchecksumr   1   s   € ô ÑA¸&ÔAÓAÀAÑEÐEr   c                óô   — t        | «      } | dd j                  «       rt        | dd «      s
t        «       ‚t	        | «      dk7  r
t        «       ‚| d   dvr
t        «       ‚t        | «      dk7  r
t        «       ‚| S )ú6Check if the number is a valid banknote serial number.Né   é   r   ÚBCDEFGHJLMNPRSTUVWXYZ)	r   Úisalnumr   ÚInvalidFormatÚlenÚInvalidLengthÚInvalidComponentr   ÚInvalidChecksumr   s    r   Úvalidater%   7   sw   € ä�V‹_€FØ�"�1ˆ:×ÑÔ¤x°°q°r°
Ô';Ü‹oÐÜ
ˆ6ƒ{�bÒÜ‹oÐØˆa�yÐ/Ñ/ÜÓ Ð Ü�Ó˜1ÒÜÓÐØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)r   F)Úboolr%   ÚValidationErrorr   s    r   Úis_validr)   E   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r   ÚstrÚreturnr*   )r   r*   r+   r   )r   r*   r+   r'   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r%   r)   © r   r   ú<module>r1      s*   ðñ(õ" #ä ß 'ó.óFóôr   