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

The Taxpayer Identification Number is used for tax purposes in the Thailand.
This number consists of 13 digits which the last is a check digit.

Personal income taxpayers use Personal Identification Number (PIN) while
companies use Memorandum of Association (MOA).

>>> validate('1-2345-45678-78-1')
'1234545678781'
>>> validate('0-99-4-000-61772-1')
'0994000617721'
>>> validate('1234545678789')
Traceback (most recent call last):
    ...
InvalidFormat: ...
>>> tin_type('1-2345-45678-78-1')
'pin'
>>> tin_type('0-99-4-000-61772-1')
'moa'
>>> format('3100600445635')
'3-1006-00445-63-5'
>>> format('0993000133978')
'0-99-3-000-13397-8'
é    )Úannotations)Ú*)ÚmoaÚpin)Ú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/th/tin.pyÚcompactr   8   s   € ô �˜Ó×$Ñ$Ó&Ð&ó    c                ó”   — t        | «      } t        D ]4  }|j                  | «      sŒ|j                  j	                  dd«      d   c S  y)z-Return a TIN type which this number is valid.ú.é   éÿÿÿÿN)r   Ú_tin_modulesÚis_validÚ__name__Úrsplit©r   Úmods     r   Útin_typer   >   sG   € ä�V‹_€FÜò 3ˆØ�<‰<˜ÕØ—<‘<×&Ñ& s¨AÓ.¨rÑ2Ò2ð3ð r   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.)r   ÚvalidateÚValidationErrorÚInvalidFormatr   s     r   r   r   H   sE   € ô ò ˆð	Ø—<‘< Ó'Ò'ðô ‹/Ðøô ò 	Ùð	ús   ‹)©	5´5c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z"Check whether the number is valid.F)Úboolr   r   r
   s    r   r   r   T   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                ód   — t         D ]&  }|j                  | «      sŒ|j                  | «      c S  | S )z8Reformat the number to the standard presentation format.)r   r   Úformatr   s     r   r!   r!   \   s3   € äò &ˆØ�<‰<˜ÕØ—:‘:˜fÓ%Ò%ð&ð €Mr   N)r   ÚstrÚreturnr"   )r   r"   r#   z
str | None)r   r"   r#   r   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚ	stdnum.thr   r   Ústdnum.utilr   r   r   r   r   r   r!   © r   r   ú<module>r*      s<   ðñ(õ4 #ä ß Ý ð �Sˆz€ó'óó	óôr   