Ë
    Q5ýjT(  ã                   óx  — d Z ddlmZ ddlmZmZ ddlZddlZddl	Zddl
ZddlZ G d„ dej                  j                  «      Z	 	 	 	 ddej                  j                   ez  ded	ej&                  j(                  ez  d
ej*                  j,                  ez  dee   dej                  j.                  dz  dej                  j                   dz  dedej                  j                   dz  defd„Zdej                  j                   ez  ded	ej&                  j(                  ez  d
ej*                  j,                  ez  dedefd„Z	 ddej                  j                   ez  dedeej6                  j8                     dej                  j.                  dz  def
d„Zdej                  j                   ez  dededefd„Zy)z)DNS RRsets (an RRset is a named rdataset)é    )Ú
Collection)ÚAnyÚcastNc                   óâ  ‡ — e Zd ZdZddgZej                  j                  dfdej                  j                  dej                  j                  dej                  j                  dej                  j                  dej                  j                  dz  f
ˆ fd„Zˆ fd	„Zd
„ Zd„ Zˆ fd„Zdededefˆ fd„Z	 ddej                  j                  dej                  j                  dej                  j                  dej                  j                  dej                  j                  dz  defˆ fd„Z	 	 	 	 ddej                  j                  dz  dededej,                  j.                  dz  dedefd„Zdej,                  j.                  defˆ fd„Z	 	 ddedej                  j6                  dz  dej                  j                  dz  dedef
ˆ fd„Zdej,                  j<                  fd„Zˆ xZ S ) ÚRRseta6  A DNS RRset (named rdataset).

    RRset inherits from Rdataset, and RRsets can be treated as
    Rdatasets in most cases.  There are, however, a few notable
    exceptions.  RRsets have different to_wire() and to_text() method
    arguments, reflecting the fact that RRsets always have an owner
    name.
    ÚnameÚdeletingNÚrdclassÚrdtypeÚcoversc                 óD   •— t         ‰| �  |||«       || _        || _        y)zCreate a new RRset.N)ÚsuperÚ__init__r   r	   ©Úselfr   r
   r   r   r	   Ú	__class__s         €úC/root/telegram-saas/.venv/lib/python3.12/site-packages/dns/rrset.pyr   zRRset.__init__*   s$   ø€ ô 	‰Ñ˜ &¨&Ô1ØˆŒ	Ø ˆ�ó    c                 ó„   •— t        t        t        ‰| �  «       «      }| j                  |_        | j
                  |_        |S ©N)r   r   r   Ú_cloner   r	   )r   Úobjr   s     €r   r   zRRset._clone8   s1   ø€ Ü”5œ%™'™.Ó*Ó+ˆØ—9‘9ˆŒØ—}‘}ˆŒØˆ
r   c                 ó  — | j                   dk(  rd}n/dt        j                  j                  | j                   «      z   dz   }| j                  �-dt        j
                  j                  | j                  «      z   }nd}dt        | j                  «      z   dz   t        j
                  j                  | j                  «      z   dz   t        j                  j                  | j                  «      z   |z   |z   dz   | j                  «       z   d	z   S )
Nr   Ú ú(ú)z delete=z<DNS ú z RRset: ú>)r   ÚdnsÚ	rdatatypeÚto_textr	   Ú
rdataclassÚstrr   r
   r   Ú_rdata_repr)r   ÚctextÚdtexts      r   Ú__repr__zRRset.__repr__>   s   € Ø�;‰;˜!ÒØ‰Eàœ#Ÿ-™-×/Ñ/°·±Ó<Ñ<¸sÑBˆEØ�=‰=Ð$Ø¤§¡×!7Ñ!7¸¿¹Ó!FÑF‰EàˆEàÜ�$—)‘)‹nñàñô �n‰n×$Ñ$ T§\¡\Ó2ñ3ð ñ	ô
 �m‰m×#Ñ# D§K¡KÓ0ñ1ð ñð ñð ñð ×ÑÓ ñ	!ð ñ
ð	
r   c                 ó"   — | j                  «       S r   )r!   ©r   s    r   Ú__str__zRRset.__str__U   s   € Ø�|‰|‹~Ðr   c                 óÀ   •— t        |t        «      r| j                  |j                  k7  r&yt        |t        j                  j
                  «      syt        ‰| �  |«      S )NF)Ú
isinstancer   r   r   ÚrdatasetÚRdatasetr   Ú__eq__)r   Úotherr   s     €r   r/   zRRset.__eq__X   sF   ø€ Ü�eœUÔ#Ø�y‰y˜EŸJ™JÒ&ØÜ˜E¤3§<¡<×#8Ñ#8Ô9ØÜ‰w‰~˜eÓ$Ð$r   ÚargsÚkwargsÚreturnc                 ó”   •— t        |d   t        j                  j                  «      r | j                  |i |¤ŽS t        ‰| �  |i |¤ŽS )aÐ  Does this rrset match the specified attributes?

        Behaves as :py:func:`full_match()` if the first argument is a
        ``dns.name.Name``, and as :py:func:`dns.rdataset.Rdataset.match()`
        otherwise.

        (This behavior fixes a design mistake where the signature of this
        method became incompatible with that of its superclass.  The fix
        makes RRsets matchable as Rdatasets while preserving backwards
        compatibility.)
        r   )r,   r   r   ÚNameÚ
full_matchr   Úmatch)r   r1   r2   r   s      €r   r7   zRRset.match`   sE   ø€ ô �d˜1‘gœsŸx™xŸ}™}Ô-Ø"�4—?‘? DÐ3¨FÑ3Ð3ä‘7‘= $Ð1¨&Ñ1Ð1r   c                 óh   •— t         ‰| �  |||«      sy| j                  |k7  s| j                  |k7  ryy)ztReturns ``True`` if this rrset matches the specified name, class,
        type, covers, and deletion state.
        FT)r   r7   r   r	   r   s         €r   r6   zRRset.full_matchq   s5   ø€ ô ‰w‰}˜W f¨fÔ5ØØ�9‰9˜Ò §¡°Ò 9ØØr   ÚoriginÚ
relativizeÚwant_commentsÚstyleÚkwc                 ó¸   — |€H|j                  «       }||d<   ||d<   ||d<   t        j                  j                  j	                  |«      }| j                  |«      S )a=  Convert the RRset into DNS zone file format.

        See ``dns.name.Name.choose_relativity`` for more information
        on how *origin* and *relativize* determine the way names
        are emitted.

        Any additional keyword arguments are passed on to the rdata
        ``to_text()`` method.

        :param origin: The origin for relative names.
        :type origin: :py:class:`dns.name.Name` or ``None``
        :param relativize: If ``True``, names will be relativized to *origin*.
        :type relativize: bool
        :param want_comments: If ``True``, emit comments for rdata which have
            them. The default is ``False``.
        :type want_comments: bool
        :param style: If specified, overrides the other parameters.
        :type style: :py:class:`dns.rdataset.RdatasetStyle` or ``None``
        r9   r:   r;   )Úcopyr   r-   ÚRdatasetStyleÚfrom_keywordsÚto_styled_text)r   r9   r:   r;   r<   r=   s         r   r!   zRRset.to_text„   s\   € ð6 ˆ=Ø—‘“ˆBØ!ˆBˆx‰LØ)ˆBˆ|ÑØ"/ˆBˆÑÜ—L‘L×.Ñ.×<Ñ<¸RÓ@ˆEØ×"Ñ" 5Ó)Ð)r   c                 óˆ   •— | j                   �|j                  | j                   ¬«      }t        ‰| �  || j                  «      S )as  Convert the RRset to styled text.

        A new style is made from the specified style setting the ``override_rdclass``
        attribute appropriately for the deleting status of the RRset.

        *style*, a :py:class:`dns.rdataset.RdatasetStyle` or ``None`` (the default).  If
        specified, the style overrides the other parameters.

        :rtype: str
        )Úoverride_rdclass)r	   Úreplacer   rB   r   )r   r<   r   s     €r   rB   zRRset.to_styled_text§   s9   ø€ ð �=‰=Ð$Ø—M‘M°4·=±=�MÓAˆEÜ‰wÑ% e¨T¯Y©YÓ7Ð7r   ÚfileÚcompressc                 óT   •— t        ‰| �  | j                  |||| j                  fi |¤ŽS )zàConvert the RRset to wire format.

        All keyword arguments are passed to ``dns.rdataset.to_wire()``; see
        that function for details.

        :returns: The number of records emitted.
        :rtype: int
        )r   Úto_wirer   r	   )r   rF   rG   r9   r=   r   s        €r   rI   zRRset.to_wire¶   s*   ø€ ô  ‰w‰˜tŸy™y¨$°¸&À$Ç-Á-ÑVÐSUÑVÐVr   c                 óh   — t         j                  j                  | j                  t	        | «      «      S )z^Convert an RRset into an Rdataset.

        :rtype: :py:class:`dns.rdataset.Rdataset`
        )r   r-   Úfrom_rdata_listÚttlÚlistr)   s    r   Úto_rdatasetzRRset.to_rdatasetÊ   s#   € ô
 �|‰|×+Ñ+¨D¯H©H´d¸4³jÓAÐAr   r   )NTFN)NN)!Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú	__slots__r   r    ÚNONEr   r5   r"   Ú
RdataClassÚ	RdataTyper   r   r'   r*   r/   r   Úboolr7   r6   r-   r@   r#   r!   rB   ÚCompressTypeÚintrI   r.   rN   Ú__classcell__)r   s   @r   r   r      s5  ø„ ñð ˜Ð$€Ið +.¯-©-×*<Ñ*<Ø59ñ!à�h‰h�m‰mð!ð —‘×*Ñ*ð!ð —‘×'Ñ'ð	!ð
 —‘×'Ñ'ð!ð —.‘.×+Ñ+¨dÑ2õ!ôò
ò.ô%ð2˜3ð 2¨#ð 2°$õ 2ð. 6:ñà�h‰h�m‰mðð —‘×*Ñ*ðð —‘×'Ñ'ð	ð
 —‘×'Ñ'ðð —.‘.×+Ñ+¨dÑ2ðð 
õð* (,ØØ#Ø37ñ!*à—‘—‘ Ñ$ð!*ð ð!*ð ð	!*ð
 �|‰|×)Ñ)¨DÑ0ð!*ð ð!*ð 
ó!*ðF8 C§L¡L×$>Ñ$>ð 8À3õ 8ð$ 26Ø'+ñ	WàðWð —(‘(×'Ñ'¨$Ñ.ðWð —‘—‘ Ñ$ð	Wð
 ðWð 
õWð(B˜SŸ\™\×2Ñ2÷ Br   r   r   rL   r
   r   Útext_rdatasÚ
idna_codecr9   r:   Úrelativize_tor3   c	           
      óì  — t        | t        «      r"t        j                  j	                  | d|¬«      } t        j
                  j                  j                  |«      }t        j                  j                  j                  |«      }t        | ||«      }	|	j                  |«       |D ]L  }
t        j                  j	                  |	j                  |	j                  |
||||«      }|	j                  |«       ŒN |	S )aÛ  Create an RRset with the specified name, TTL, class, and type, and with
    the specified list of rdatas in text format.

    :param idna_codec: Specifies the IDNA encoder/decoder. If ``None``, the
        default IDNA 2003 encoder/decoder is used.
    :type idna_codec: :py:class:`dns.name.IDNACodec` or ``None``
    :param origin: The origin to use for relative names.
    :type origin: :py:class:`dns.name.Name` or ``None``
    :param relativize: If ``True``, names will be relativized.
    :type relativize: bool
    :param relativize_to: The origin to use when relativizing names. If not
        set, *origin* is used.
    :type relativize_to: :py:class:`dns.name.Name` or ``None``
    :rtype: :py:class:`dns.rrset.RRset`
    N©r\   )r,   r#   r   r   Ú	from_textr"   rU   Úmaker    rV   r   Ú
update_ttlÚrdatar
   r   Úadd)r   rL   r
   r   r[   r\   r9   r:   r]   ÚrÚtÚrds               r   Úfrom_text_listrh   Ò   sÅ   € ô6 �$œÔÜ�x‰x×!Ñ! $¨¸Ð!ÓDˆÜ�n‰n×'Ñ'×,Ñ,¨WÓ5€GÜ�]‰]×$Ñ$×)Ñ)¨&Ó1€FÜˆd�G˜VÓ$€AØ‡L�L�ÔØò ˆÜ�Y‰Y× Ñ Ø�I‰I�q—x‘x  F¨J¸Àzó
ˆð 	
�‰ˆb�	ð	ð
 €Hr   c           
      óJ   — t        | |||t        t        t           |«      «      S )z�Create an RRset with the specified name, TTL, class, and type and with
    the specified rdatas in text format.

    :rtype: :py:class:`dns.rrset.RRset`
    )rh   r   r   r#   )r   rL   r
   r   r[   s        r   r`   r`   û   s'   € ô Øˆc�7˜F¤D¬´C©¸+Ó$Fóð r   Úrdatasc                 ó@  — t        | t        «      r"t        j                  j	                  | d|¬«      } t        |«      dk(  rt        d«      ‚d}|D ]G  }|€2t        | |j                  |j                  «      }|j                  |«       |j                  |«       ŒI |€J ‚|S )aP  Create an RRset with the specified name and TTL, and with
    the specified list of rdata objects.

    :param idna_codec: Specifies the IDNA encoder/decoder. If ``None``, the
        default IDNA 2003 encoder/decoder is used.
    :type idna_codec: :py:class:`dns.name.IDNACodec` or ``None``
    :rtype: :py:class:`dns.rrset.RRset`
    Nr_   r   zrdata list must not be empty)r,   r#   r   r   r`   ÚlenÚ
ValueErrorr   r
   r   rb   rd   )r   rL   rj   r\   re   rg   s         r   rK   rK     s˜   € ô �$œÔÜ�x‰x×!Ñ! $¨¸Ð!ÓDˆä
ˆ6ƒ{�aÒÜÐ7Ó8Ð8Ø€AØò ˆØˆ9Ü�d˜BŸJ™J¨¯	©	Ó2ˆAØ�L‰L˜ÔØ	�‰ˆb�	ð	ð
 ˆ=Ðˆ=Ø€Hr   c                 ón   — t        | |t        t        t        j                  j
                     |«      «      S )zˆCreate an RRset with the specified name and TTL, and with
    the specified rdata objects.

    :rtype: :py:class:`dns.rrset.RRset`
    )rK   r   r   r   rc   ÚRdata)r   rL   rj   s      r   Ú
from_rdatarp   +  s'   € ô ˜4 ¤d¬:´c·i±i·o±oÑ+FÈÓ&OÓPÐPr   )NNTNr   )rR   Úcollections.abcr   Útypingr   r   Údns.namer   Ú	dns.rdataÚdns.rdataclassÚdns.rdatasetÚdns.rdatatyper-   r.   r   r   r5   r#   rY   r"   rU   r    rV   Ú	IDNACodecrW   rh   r`   rc   ro   rK   rp   © r   r   ú<module>rz      s  ðñ$ 0å &ß ã Û Û Û Û ôqBˆC�L‰L×!Ñ!ô qBðt -1Ø#'ØØ*.ñ&Ø
�(‰(�-‰-˜#Ñ
ð&à	ð&ð �^‰^×&Ñ&¨Ñ,ð&ð �M‰M×#Ñ# cÑ)ð	&ð
 ˜C‘ð&ð —‘×"Ñ" TÑ)ð&ð �H‰H�M‰M˜DÑ ð&ð ð&ð —8‘8—=‘= 4Ñ'ð&ð ó&ðRØ
�(‰(�-‰-˜#Ñ
ðà	ðð �^‰^×&Ñ&¨Ñ,ðð �M‰M×#Ñ# cÑ)ð	ð
 ðð óð, -1ñ	Ø
�(‰(�-‰-˜#Ñ
ðà	ðð �s—y‘y—‘Ñ'ðð —‘×"Ñ" TÑ)ð	ð
 óð<Q�S—X‘X—]‘] SÑ(ð Q¨sð Q¸Sð QÀUô Qr   