Ë
    Ã?Æi›
  ã                  óV   — d Z ddlmZ ddlmZ ddl­ ddlmZ dd„Zdd„Z	dd„Z
dd	„Zy
)a  Swiss social security number ("Sozialversicherungsnummer").

Also known as "Neue AHV Nummer". The Swiss Sozialversicherungsnummer is used
to identify individuals for taxation and pension purposes.

The number is validated using EAN-13, though dashes are substituted for dots.

More information:

* https://en.wikipedia.org/wiki/National_identification_number#Switzerland
* https://de.wikipedia.org/wiki/Sozialversicherungsnummer#Versichertennummer

>>> validate('7569217076985')
'7569217076985'
>>> validate('756.9217.0769.85')
'7569217076985'
>>> validate('756.9217.0769.84')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> validate('123.4567.8910.19')
Traceback (most recent call last):
    ...
InvalidComponent: ...
>>> format('7569217076985')
'756.9217.0769.85'
é    )Úannotations)Úean)Ú*)Úcleanc                ó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    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/ch/ssn.pyÚcompactr   8   s   € ô �˜Ó×$Ñ$Ó&Ð&ó    c                óZ   — t        | «      } dj                  | dd | dd | dd | dd f«      S )z8Reformat the number to the standard presentation format.ú.Né   é   é   )r   Újoinr	   s    r   Úformatr   >   s;   € ä�V‹_€FØ�8‰8�V˜B˜Q�Z ¨¨! ¨f°Q°r¨l¸FÀ2À3¸KÐHÓIÐIr   c                ó¨   — t        | «      } t        | «      dk7  r
t        «       ‚| j                  d«      s
t	        «       ‚t        j                  | «      S )ú?Check if the number is a valid Swiss Sozialversicherungsnummer.é   Ú756)r   ÚlenÚInvalidLengthÚ
startswithÚInvalidComponentr   Úvalidater	   s    r   r   r   D   sE   € ä�V‹_€FÜ
ˆ6ƒ{�bÒÜ‹oÐØ×Ñ˜UÔ#ÜÓ Ð Ü�<‰<˜ÓÐr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)r   F)Úboolr   ÚValidationErrorr	   s    r   Úis_validr!   N   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"N)r
   ÚstrÚreturnr"   )r
   r"   r#   r   )Ú__doc__Ú
__future__r   Ústdnumr   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r!   © r   r   ú<module>r*      s-   ðñ*õ8 #å Ü Ý ó'óJó ôr   