Ë
    Ã?ÆiE  ã                  ó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
)uz  Company Number (×ž×¡×¤×¨ ×—×‘×¨×”, or short ×—.×¤. Israeli company number).

It consists of nine digits and includes a check digit. For companies
the first digit is a 5. The first two digits identify the type of
company.

More information:

* https://he.wikipedia.org/wiki/×ª×�×’×™×“#×ž×¡×¤×¨_×¨×™×©×•×�_×”×ª×�×’×™×“
* https://www.oecd.org/tax/automatic-exchange/crs-implementation-and-assistance/tax-identification-numbers/Israel-TIN.pdf
* https://wiki.scn.sap.com/wiki/display/CRM/Israel

>>> validate('516179157')
'516179157'
>>> format(' 5161 79157 ')
'516179157'
>>> validate('516179150')  # invalid check digit
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> validate('490154203237518')  # longer than 9 digits
Traceback (most recent call last):
    ...
InvalidLength: ...
>>> validate('416179157')
Traceback (most recent call last):
    ...
InvalidComponent: ...
é    )Úannotations)Úluhn)Ú*)ÚcleanÚisdigitsc                ó6   — t        | d«      j                  «       S )z‚Convert the number to the minimal representation. This strips the
    number of any separators and removes surrounding whitespace.z -)r   Ústrip©Únumbers    úS/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/il/hp.pyÚcompactr   :   s   € ô �˜Ó×$Ñ$Ó&Ð&ó    c                óà   — t        | «      } t        | «      dk7  r
t        «       ‚t        | «      rt	        | «      dk  r
t        «       ‚| d   dk7  r
t        «       ‚t        j                  | «       | S )úcCheck if the number provided is a valid ID. This checks the length,
    formatting and check digit.é	   r   Ú5)	r   ÚlenÚInvalidLengthr   ÚintÚInvalidFormatÚInvalidComponentr   Úvalidater
   s    r   r   r   @   sb   € ô �V‹_€FÜ
ˆ6ƒ{�aÒÜ‹oÐÜ�FÔœs 6›{¨aÒ/Ü‹oÐØˆa�y�CÒÜÓ Ð Ü‡M�M�&ÔØ€Mr   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   ‚ –	"¡"c                ó   — t        | «      S )z8Reformat the number to the standard presentation format.)r   r
   s    r   Úformatr   W   s   € ä�6‹?Ð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   