Ë
    Ã?Æiï  ã                  óR   — d Z ddlmZ ddl­ ddlmZ ddlmZmZ d
d„Z	d
d„Z
dd„Zy	)aÇ  OIB (Osobni identifikacijski broj, Croatian identification number).

The personal identification number is used to identify persons and legal
entities in Croatia. It has 11 digits (sometimes prefixed by HR), contains
no personal information and uses the ISO 7064 Mod 11, 10 checksum algorithm.

>>> validate('HR 33392005961')
'33392005961'
>>> validate('33392005962')  # invalid check digit
Traceback (most recent call last):
    ...
InvalidChecksum: ...
é    )Úannotations)Ú*)Ú	mod_11_10)Ú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 -ÚHRé   N)r   ÚupperÚstripÚ
startswith©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/hr/oib.pyÚcompactr   *   s@   € ô �6˜4Ó ×&Ñ&Ó(×.Ñ.Ó0€FØ×Ñ˜ÔØ˜˜�ˆØ€Mó    c                ó    — t        | «      } t        | «      s
t        «       ‚t        | «      dk7  r
t	        «       ‚t        j                  | «       | S )zbCheck if the number is a valid OIB number. This checks the length,
    formatting and check digit.é   )r   r   ÚInvalidFormatÚlenÚInvalidLengthr   Úvalidater   s    r   r   r   3   sD   € ô �V‹_€FÜ�FÔÜ‹oÐÜ
ˆ6ƒ{�bÒÜ‹oÐÜ×Ñ�vÔØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z*Check if the number is a valid OIB number.F)Úboolr   ÚValidationErrorr   s    r   Úis_validr   ?   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r   ÚstrÚreturnr   )r   r   r   r   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.iso7064r   Ústdnum.utilr   r   r   r   r   © r   r   ú<module>r%      s'   ðñ*õ #ä Ý $ß 'óó	ôr   