Ë
    Ã?Æ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ï  Orgnr (Organisationsnummer, Swedish company number).

The Orgnr (Organisationsnummer) is the national number to identify Swedish
companies and consists of 10 digits. These are the first 10 digits in the
Swedish VAT number, i.e. it's the VAT number without the 'SE' in front and
the '01' at the end.

>>> validate('1234567897')
'1234567897'
>>> validate('1234567891')  # invalid check digits
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> format('123456-7897')
'123456-7897'
é    )Úannotations)Úluhn)Ú*)ÚcleanÚisdigitsc                ó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    úV/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/se/orgnr.pyÚcompactr   .   s   € ô �˜Ó×%Ñ%Ó'Ð'ó    c                óœ   — t        | «      } t        | «      s
t        «       ‚t        | «      dk7  r
t	        «       ‚t        j                  | «      S )zkCheck if the number is a valid organisation number. This checks
    the length, formatting and check digit.é
   )r   r   ÚInvalidFormatÚlenÚInvalidLengthr   Úvalidater
   s    r   r   r   4   s@   € ô �V‹_€FÜ�FÔÜ‹oÐÜ
ˆ6ƒ{�bÒÜ‹oÐÜ�=‰=˜Ó Ð r   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z2Check if the number is a valid organisation numberF)Úboolr   ÚValidationErrorr
   s    r   Úis_validr   ?   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                ó4   — t        | «      } | dd dz   | dd z   S )z8Reformat the number to the standard presentation format.Né   ú-)r   r
   s    r   Úformatr   G   s'   € ä�V‹_€FØ�"�1ˆ:˜Ñ˜f Q R˜jÑ(Ð(r   N)r   ÚstrÚreturnr   )r   r   r   r   )Ú__doc__Ú
__future__r   Ústdnumr   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r   r   © r   r   ú<module>r%      s,   ðñ,õ" #å Ü ß 'ó(ó!óô)r   