Ë
    Ã?ÆiM  ã                  ó^   — d Z ddlmZ ddl­ ddlmZmZ  ed«      Zdd„Z	dd„Z
dd„Zdd	„Zy
)a
  Finnish Association Identifier.

The number consists of 1 to 6 digits that are normally separated with a dot
in groups of 0-3 and 0-3 numbers. E.g. 123.123, 12.123, 1.123, 123 or 1.

>>> validate('123.123')
'123123'
>>> validate('1123')
'1123'
>>> validate('123123123')
Traceback (most recent call last):
  ...
InvalidLength: The number has an invalid length.
>>> validate('12df')
Traceback (most recent call last):
  ...
InvalidFormat: The number has an invalid format.
>>> format('123')
'123'
>>> format('1234')
'1.234'
é    )Úannotations)Ú*)ÚcleanÚisdigits)*é   é   é   é	   é   é   é   é   é   é   é   é   é   é   é   é#   é$   é&   é(   é)   é*   é+   é-   é.   é2   é4   é7   é:   é<   é@   éA   éD   éH   éK   éL   éM   éN   éS   éT   éU   éY   é\   c                ó6   — t        | d«      j                  «       S )zˆConvert the number to the minimal representation. This strips the
    number of any valid separators and removes surrounding whitespace.z -._+)r   Ústrip©Únumbers    ú^/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/fi/associationid.pyÚcompactr6   :   s   € ô �˜Ó!×'Ñ'Ó)Ð)ó    c                óä   — t        | «      } t        | «      s
t        «       ‚t        | «      dk  st        | «      dkD  r
t	        «       ‚t        | «      dk  rt        | «      t        vr
t        «       ‚| S )zjCheck if the number is a valid Finnish association register number.
    This checks the length and format.r   r   é   )r6   r   ÚInvalidFormatÚlenÚInvalidLengthÚintÚ_lownumbersÚInvalidComponentr3   s    r5   Úvalidater@   @   s^   € ô �V‹_€FÜ�FÔÜ‹oÐÜ
ˆ6ƒ{�Q‚œ#˜f›+¨š/Ü‹oÐÜ
ˆ6ƒ{�Q‚œ3˜v›;¬kÑ9ÜÓ Ð Ø€Mr7   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z;Check if the number is a valid association register number.F)Úboolr@   ÚValidationErrorr3   s    r5   Úis_validrD   M   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                óT   — t        | «      } t        | «      dk  r| S | dd dz   | dd z   S )z8Reformat the number to the standard presentation format.r9   Néýÿÿÿú.)r6   r;   r3   s    r5   ÚformatrH   U   s8   € ä�V‹_€FÜ
ˆ6ƒ{�aÒØˆà�c�rˆ{˜SÑ  6¨"¨# ;Ñ.Ð.r7   N)r4   ÚstrÚreturnrI   )r4   rI   rJ   rB   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   Úsetr>   r6   r@   rD   rH   © r7   r5   ú<module>rQ      s:   ðñ,õ. #ä ß 'ñ ð ó €ó*ó
óô/r7   