Ë
    Ã?ÆiÉ	  ã                  óV   — d 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
dd	„Zy
)a—  Belgian OGM-VCS.

The OGM-VCS is used in bank transfer as structured communication.

* https://febelfin.be/en/publications/2023/febelfin-banking-standards-for-online-banking

>>> validate('+++010/8068/17183+++')
'010806817183'
>>> validate('010/8068/17180')
Traceback (most recent call last):
    ...
InvalidChecksum: ...
>>> format('010806817183')
'010/8068/17183'
>>> calc_check_digits('0108068171')
'83'
é    )Úannotations)Ú*)ÚcleanÚisdigitsc                ó6   — t        | d«      j                  «       S )zŠConvert the number to the minimal representation. This strips the number
    of any invalid separators and removes surrounding whitespace.z +/)r   Ústrip©Únumbers    úX/var/www/html/myprovider/mon_projet_qr/lib/python3.12/site-packages/stdnum/be/ogm_vcs.pyÚcompactr   -   s   € ô �˜Ó×%Ñ%Ó'Ð'ó    c                óH   — t        | «      } dt        | dd «      dz  xs dz  S )z/Calculate the check digit that should be added.z%02dNé
   éa   )r   Úintr	   s    r   Úcalc_check_digitsr   3   s+   € ä�V‹_€FØ”c˜&  "˜+Ó&¨Ñ+Ò2°Ñ3Ð3r   c                óÈ   — t        | «      } t        | «      rt        | «      dk  r
t        «       ‚t	        | «      dk7  r
t        «       ‚t        | «      | dd k7  r
t        «       ‚| S )z'Check if the number is a valid OGM-VCS.r   é   éþÿÿÿN)r   r   r   ÚInvalidFormatÚlenÚInvalidLengthr   ÚInvalidChecksumr	   s    r   Úvalidater   9   s[   € ä�V‹_€FÜ�FÔœs 6›{¨aÒ/Ü‹oÐÜ
ˆ6ƒ{�bÒÜ‹oÐÜ˜Ó  F¨2¨3 KÒ/ÜÓÐØ€Mr   c                óJ   — 	 t        t        | «      «      S # t        $ r Y yw xY w)z*Check if the number is a valid VAT number.F)Úboolr   ÚValidationErrorr	   s    r   Úis_validr   E   s)   € ðÜ”H˜VÓ$Ó%Ð%øÜò Ùðús   ‚ –	"¡"c                ób   — t        | «      } | j                  dd«      } | dd › d| dd › d| dd › �S )z&Format the number provided for output.r   Ú0Né   ú/é   )r   Úrjustr	   s    r   Úformatr%   M   sD   € ä�V‹_€FØ�\‰\˜"˜cÓ"€FØ�R�aˆjˆ\˜˜6 ! A˜;˜- q¨°°¨¨Ð5Ð5r   N)r
   ÚstrÚreturnr&   )r
   r&   r'   r   )Ú__doc__Ú
__future__r   Ústdnum.exceptionsÚstdnum.utilr   r   r   r   r   r   r%   © r   r   ú<module>r-      s.   ðñ*õ$ #ä ß 'ó(ó4ó	óô6r   