Ë
    Ã?Æi	
  ã                  ó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	)ak  V-number (Vinnutal, Faroe Islands tax number).

In the Faroe Islands the legal persons TIN equals the V number issued by the
Faroese Tax Administration. It is a consecutive number.

More information:

* https://www.taks.fo/fo/borgari/bolkar/at-stovna-virki/
* https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Faroe-islands-TIN.pdf

>>> validate('623857')
'623857'
>>> validate('1234')
Traceback (most recent call last):
    ...
InvalidLength: ...
>>> validate('12345X')
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> format('602 590')
'602590'
é    )Úannotations)Ú*)ÚcleanÚisdigitsc                ó‚   — t        | d«      j                  «       j                  «       } | j                  d«      r| dd S | S )z’Convert the number to the minimal representation.

    This strips the number of any valid separators and removes surrounding
    whitespace.
    z -.ÚFOé   N)r   ÚupperÚstripÚ
startswith©Únumbers    úS/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/fo/vn.pyÚcompactr   3   sA   € ô �6˜5Ó!×'Ñ'Ó)×/Ñ/Ó1€FØ×Ñ˜ÔØ�a�bˆzÐØ€Mó    c                óv   — t        | «      } t        | «      dk7  r
t        «       ‚t        | «      s
t	        «       ‚| S )znCheck if the number is a valid Faroe Islands V-number number.

    This checks the length and formatting.
    é   )r   ÚlenÚInvalidLengthr   ÚInvalidFormatr   s    r   Úvalidater   ?   s6   € ô
 �V‹_€FÜ
ˆ6ƒ{�aÒÜ‹oÐÜ�FÔÜ‹oÐØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z=Check if the number is a valid Faroe Islands V-number number.F)Úboolr   ÚValidationErrorr   s    r   Úis_validr   L   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                ó   — t        | «      S )z8Reformat the number to the standard presentation format.)r   r   s    r   Úformatr   T   s   € ä�6‹?Ðr   N)r   ÚstrÚreturnr   )r   r   r   r   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r   r   © r   r   ú<module>r%      s)   ðñ*õ0 #ä ß 'ó	ó
óôr   