Ë
    Ã?Æi  ã                  ó|   — d Z ddlmZ ddl­ ddlmZmZmZmZm	Z	 ddl
mZ e	eeeefZdd„Zdd„Zdd„Zdd	„Zdd
„Zy)a  TIN (U.S. Taxpayer Identification Number).

The Taxpayer Identification Number is used used for tax purposes in the
United States. A TIN may be:

* a Social Security Number (SSN)
* an Individual Taxpayer Identification Number (ITIN)
* an Employer Identification Number (EIN)
* a Preparer Tax Identification Number (PTIN)
* an Adoption Taxpayer Identification Number (ATIN)

>>> compact('123-45-6789')
'123456789'
>>> validate('123-45-6789')
'123456789'
>>> validate('07-3456789')
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> guess_type('536-90-4399')
['ssn', 'atin']
>>> guess_type('04-2103594')
['ein']
>>> guess_type('042103594')
['ssn', 'ein', 'atin']
>>> format('042103594')
'042-10-3594'
>>> format('123-456')  # invalid numbers are not reformatted
'123-456'
é    )Úannotations)Ú*)ÚatinÚeinÚitinÚptinÚssn)Ú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.ú-)r
   Ústrip©Únumbers    úT/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/us/tin.pyÚcompactr   =   s   € ô �˜Ó×#Ñ#Ó%Ð%ó    c                óp   — t         D ]  }	 |j                  | «      c S  t        «       ‚# t        $ r Y Œ-w xY w)zgCheck if the number is a valid TIN. This searches for the proper
    sub-type and validates using that.)Ú_tin_modulesÚvalidateÚValidationErrorÚInvalidFormat©r   Úmods     r   r   r   C   sE   € ô ò ˆð	Ø—<‘< Ó'Ò'ðô ‹/Ðøô ò 	Ùð	ús   ‹)©	5´5c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z#Check if the number is a valid TIN.F)Úboolr   r   r   s    r   Úis_validr   O   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                ó�   — t         D �cg c]2  }|j                  | «      r|j                  j                  dd«      d   ‘Œ4 c}S c c}w )zHReturn a list of possible TIN types for which this number is
    valid..ú.é   éÿÿÿÿ)r   r   Ú__name__Úrsplitr   s     r   Ú
guess_typer#   W   sF   € ô $ö%ØØ�|‰|˜FÔ#ð �L‰L×Ñ  QÓ'¨Ó+ò %ð %ùò %s   ‰7Ac                ó~   — t         D ]3  }|j                  | «      sŒt        |d«      sŒ"|j                  | «      c S  | S )z8Reformat the number to the standard presentation format.Úformat)r   r   Úhasattrr%   r   s     r   r%   r%   _   s<   € äò &ˆØ�<‰<˜Õ¤G¨C°Õ$:Ø—:‘:˜fÓ%Ò%ð&ð €Mr   N)r   ÚstrÚreturnr'   )r   r'   r(   r   )r   r'   r(   z	list[str])Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚ	stdnum.usr   r   r   r   r	   Ústdnum.utilr
   r   r   r   r   r#   r%   © r   r   ú<module>r/      sF   ðñ(õ> #ä ß 0Õ 0Ý ð �T˜3  dÐ+€ó&ó	óó%ôr   