+
    +O|jy  ã                   óÀ   € R t ^ RIt^ RIHtHt ^ RIt^ RIt]P                  t]P                  t	R R lt
R R ltR R ltR	 R
 ltR R ltRR R lltR tR R ltR# )z*Generic Internet address helper functions.N)ÚAnyÚTuplec                ó<   € V ^8„  d   QhR\         R\        R\        /# )é   ÚfamilyÚtextÚreturn)ÚintÚstrÚbytes)Úformats   "ÚAC:\Users\alokc\chatbot\backend\venv\Lib\site-packages\dns/inet.pyÚ__annotate__r   !   s!   € ÷ "ñ "”cð "¤ð "¬ñ "ó    c                ó¸   € V \         8X  d    \        P                  P                  V4      # V \        8X  d!   \        P
                  P                  VR4      # \        h)a  Convert the textual form of a network address into its binary form.

*family* is an ``int``, the address family.

*text* is a ``str``, the textual address.

Raises ``NotImplementedError`` if the address family specified is not
implemented.

Returns a ``bytes``.
T)ÚAF_INETÚdnsÚipv4Ú	inet_atonÚAF_INET6Úipv6ÚNotImplementedError)r   r   s   &&r   Ú	inet_ptonr   !   sF   € ð ”ÔÜ�x‰x×!Ñ! $Ó'Ð'Ø	”8Ô	Ü�x‰x×!Ñ! $¨Ó-Ð-ä!Ð!r   c                ó<   € V ^8„  d   QhR\         R\        R\        /# )r   r   Úaddressr   )r	   r   r
   )r   s   "r   r   r   6   s!   € ÷ "ñ "”cð "¤Eð "¬cñ "r   c                ó¶   € V \         8X  d    \        P                  P                  V4      # V \        8X  d    \        P
                  P                  V4      # \        h)a  Convert the binary form of a network address into its textual form.

*family* is an ``int``, the address family.

*address* is a ``bytes``, the network address in binary form.

Raises ``NotImplementedError`` if the address family specified is not
implemented.

Returns a ``str``.
)r   r   r   Ú	inet_ntoar   r   r   )r   r   s   &&r   Ú	inet_ntopr   6   sD   € ð ”ÔÜ�x‰x×!Ñ! 'Ó*Ð*Ø	”8Ô	Ü�x‰x×!Ñ! 'Ó*Ð*ä!Ð!r   c                ó0   € V ^8„  d   QhR\         R\        /# ©r   r   r   )r
   r	   )r   s   "r   r   r   K   s   € ÷ ñ œð ¤ñ r   c                óè   €  \         P                  P                  V 4       \        #   \         d@     \         P
                  P                  T R4       \        u #   \         d    \        hi ; ii ; i)zÐDetermine the address family of a textual-form network address.

*text*, a ``str``, the textual address.

Raises ``ValueError`` if the address family cannot be determined
from the input.

Returns an ``int``.
T)r   r   r   r   Ú	Exceptionr   r   Ú
ValueError©r   s   &r   Úaf_for_addressr$   K   s`   € ðÜ�‰×Ñ˜4Ô ÜˆøÜô ð	Ü�H‰H×Ñ˜t TÔ*ÜŠOøÜô 	ÜÐð	úð	ús    ‚$' §A1³%AÁA1ÁA-Á-A1c                ó0   € V ^8„  d   QhR\         R\        /# r   ©r
   Úbool)r   s   "r   r   r   a   s   € ÷ ñ ”sð œtñ r   c                ó  €  \         P                  P                  V 4      ^ ,          pV^à8¬  ;'       d    V^ï8*  #   \         dF     \         P                  P                  T R4      ^ ,          pT^ÿ8H  u #   \         d    \
        hi ; ii ; i)zÉIs the textual-form network address a multicast address?

*text*, a ``str``, the textual address.

Raises ``ValueError`` if the address family cannot be determined
from the input.

Returns a ``bool``.
T)r   r   r   r!   r   r"   )r   Úfirsts   & r   Úis_multicastr*   a   s„   € ðÜ—‘×"Ñ" 4Ó(¨Õ+ˆØ˜‰|×,Ð, ¨¡Ð,øÜô ð	Ü—H‘H×&Ñ& t¨TÓ2°1Õ5ˆEØ˜C‘<ÒøÜô 	ÜÐð	úð	ús%   ‚1: ´: ºB
Á+A4Á1B
Á4BÂB
c                ó0   € V ^8„  d   QhR\         R\        /# r   r&   )r   s   "r   r   r   w   s   € ÷ ñ ”Sð œTñ r   c                óÒ   €  \         P                  P                  V 4       R#   \         d9     \         P                  P                  T R4        R#   \         d      R# i ; ii ; i)zoIs the specified string an IPv4 or IPv6 address?

*text*, a ``str``, the textual address.

Returns a ``bool``.
TF)r   r   r   r!   r   r#   s   &r   Ú
is_addressr-   w   sY   € ðÜ�‰×Ñ˜4Ô ÙøÜô ð	Ü�H‰H×Ñ˜t TÔ*ÚøÜô 	Ûð	úð	ús&   ‚# £A&¯ AÁA"ÁA&Á!A"Á"A&c                ól   € V ^8„  d   QhR\         \        \        3,          R\        R,          R\        /# )r   Ú
high_tupleÚafNr   )r   r
   r	   r   )r   s   "r   r   r   Š   s3   € ÷ Bñ B¬¬c´3¨h­ð B¼SÀ4½Zð BÔSVñ Br   c                óÊ  € V w  r#Vf   \        V4      pV\        8X  d   W#3# V\        8X  dl   VP                  R4      pV^ 8  d   W#^ ^ 3# VRV pW$^,           R pVP	                  4       '       d   WS^ \        V4      3#  WS^ \        P                  ! V4      3# \        RV 24      h  \         d2    \        P                  p\        P                  ! Y#TR7      vEv r‰pT	u # i ; i)a@  Given a "high-level" address tuple, i.e.
an (address, port) return the appropriate "low-level" address tuple
suitable for use in socket calls.

If an *af* other than ``None`` is provided, it is assumed the
address in the high-level tuple is valid and has that af.  If af
is ``None``, then af_for_address will be called.
NÚ%)Úflagsúunknown address family )r$   r   r   ÚfindÚisdigitr	   ÚsocketÚif_nametoindexÚAttributeErrorÚAI_NUMERICHOSTÚgetaddrinfor   )
r/   r0   r   ÚportÚiÚaddrpartÚscopeÚai_flagsÚ_Útups
   &&        r   Úlow_level_address_tuplerC   Š   sò   € ð �M€GØ	‚zÜ˜GÓ$ˆØ	ŒW„}ØˆÐØ	ŒxŒØ�L‰L˜ÓˆØˆqŒ5à 1 aÐ(Ð(à˜2˜A�;ˆØ˜A�˜Ð ˆØ�=‰=�?Š?Ø A¤s¨5£zÐ2Ð2ð	Ø A¤v×'<Ò'<¸UÓ'CÐDÐDô "Ð$;¸B¸4Ð"@ÓAÐAøô ô 	Ü×,Ñ,ˆHÜ$×0Ò0°ÀhÔOˆO‰Yˆq˜ØŠJð	ús   Á?B& Â&9C"Ã!C"c                óz   € V \         P                  8X  d   R# V \         P                  8X  d   R# \        RV  24      h)z:Return the 'any' address for the specified address family.z0.0.0.0z::r4   )r7   r   r   r   )r0   s   &r   Ú
any_for_afrE   ¬   s3   € à	ŒV�^‰^ÔÙØ	Œv�‰Ô	ÙÜ
Ð 7¸°tÐ<Ó
=Ð=r   c                ó0   € V ^8„  d   QhR\         R\         /# r   )r
   )r   s   "r   r   r   µ   s   € ÷ ñ ”sð œsñ r   c                óÎ   €  \         P                  P                  V 4      #   \         d9     \         P                  P                  T 4      u #   \         d    \
        hi ; ii ; i)zðVerify that *address* is a valid text form IPv4 or IPv6 address and return its
canonical text form.  IPv6 addresses with scopes are rejected.

*text*, a ``str``, the address in textual form.

Raises ``ValueError`` if the text is not valid.
)r   r   Úcanonicalizer!   r   r"   r#   s   &r   rH   rH   µ   sZ   € ðÜ�x‰x×$Ñ$ TÓ*Ð*øÜô ð	Ü—8‘8×(Ñ(¨Ó.Ò.øÜô 	ÜÐð	úðús    ‚! ¡A$­AÁA$ÁA Á A$)N)Ú__doc__r7   Útypingr   r   Údns.ipv4r   Údns.ipv6r   r   r   r   r$   r*   r-   rC   rE   rH   © r   r   Ú<module>rN      sT   ðñ$ 1ã ß ã Û ð
 �.‰.€Ø�?‰?€õ"õ*"õ*õ,õ,÷&BòD>÷r   