Ë
    Q5ýjüñ  ã                   ó
	  — d Z ddlZddlZddlZddlZddlmZmZmZm	Z	 ddl
mZmZmZmZ ddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlZddlm Z m!Z!m"Z"  G d„ dejF                  jH                  «      Z% G d„ d	e%«      Z& G d
„ de%«      Z' G d„ de%«      Z( G d„ dejF                  jH                  «      Z) G d„ dejF                  jH                  «      Z* G d„ dejF                  jH                  «      Z+ G d„ dejF                  jH                  «      Z,dejZ                  j\                  dejZ                  j\                  dz  de/dejZ                  j\                  fd„Z0 ejb                  d¬«       G d„ dejd                  jf                  «      «       Z4 G d„ d ejj                  jl                  «      Z7 G d!„ d"ejd                  jp                  «      Z9ejt                  jt                   G d#„ d$e9«      «       Z; G d%„ d&«      Z< G d'„ d(e<«      Z=ejt                  jt                   G d)„ d*e<«      «       Z> G d+„ d,ejj                  j~                  «      Z?dej€                  j‚                  de7dd-dddddfd.edejZ                  j\                  eBz  dz  d/ej€                  j†                  de/d0ed1eBdz  d2e/d3e/d4ejZ                  jˆ                  dz  d5e/eeB   z  d6eejj                  j~                  gdf   dz  d7e/de7fd8„ZEdej€                  j‚                  de7dd-dddddfd.eBdejZ                  j\                  eBz  dz  d/ej€                  j†                  de/d0ed1eBdz  d2e/d3e/d4ejZ                  jˆ                  dz  d5e/eeB   z  d6eejj                  j~                  gdf   dz  d7e/de7fd9„ZFdej€                  j‚                  de7dddddddfd:eBejŽ                  z  ez  dejZ                  j\                  eBz  dz  d/ej€                  j†                  de/d0ed1eBdz  d2e/d3e/d4ejZ                  jˆ                  dz  d5e/eeB   z  d6eejj                  j~                  gdf   dz  d7e/de7fd;„ZHe7ddfd<ed0ede/d3e/de7f
d=„ZIy)>z
DNS Zones.é    N)ÚCallableÚIterableÚIteratorÚMutableMapping)ÚAnyÚBinaryIOÚTextIOÚcast)ÚDigestHashAlgorithmÚDigestSchemeÚ_digest_hashersc                   ó   — e Zd ZdZy)ÚBadZonezThe DNS zone is malformed.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úB/root/telegram-saas/.venv/lib/python3.12/site-packages/dns/zone.pyr   r   -   s   „ Ú$r   r   c                   ó   — e Zd ZdZy)ÚNoSOAz)The DNS zone has no SOA RR at its origin.Nr   r   r   r   r   r   1   s   „ Ú3r   r   c                   ó   — e Zd ZdZy)ÚNoNSz+The DNS zone has no NS RRset at its origin.Nr   r   r   r   r   r   5   s   „ Ú5r   r   c                   ó   — e Zd ZdZy)ÚUnknownOriginz!The DNS zone's origin is unknown.Nr   r   r   r   r   r   9   s   „ Ú+r   r   c                   ó   — e Zd ZdZy)ÚUnsupportedDigestSchemez(The zone digest's scheme is unsupported.Nr   r   r   r   r   r   =   ó   „ Ú2r   r   c                   ó   — e Zd ZdZy)ÚUnsupportedDigestHashAlgorithmz(The zone digest's origin is unsupported.Nr   r   r   r   r"   r"   A   r    r   r"   c                   ó   — e Zd ZdZy)ÚNoDigestz/The DNS zone has no ZONEMD RRset at its origin.Nr   r   r   r   r$   r$   E   s   „ Ú9r   r$   c                   ó   — e Zd ZdZy)ÚDigestVerificationFailurez#The ZONEMD digest failed to verify.Nr   r   r   r   r&   r&   I   s   „ Ú-r   r&   ÚnameÚoriginÚ
relativizeÚreturnc                 ó&  — |€t        d«      ‚| j                  «       r1| j                  |«      st        d«      ‚|r| j                  |«      } | S 	 | j	                  |«      }|s|} | S # t
        j                  j                  $ r t        d«      ‚w xY w)Nzno zone origin is definedz5name parameter must be a subdomain of the zone originzrelative name too long for zone)ÚKeyErrorÚis_absoluteÚis_subdomainr)   ÚderelativizeÚdnsr'   ÚNameTooLong)r'   r(   r)   Úabs_names       r   Ú_validate_namer3   M   s¤   € ð €~ô Ð2Ó3Ð3Ø×ÑÔØ× Ñ  Ô(ÜÐRÓSÐSÙØ—?‘? 6Ó*ˆDð €Kð	>Ø×(Ñ(¨Ó0ˆHñ
 ð ˆDØ€Køô �x‰x×#Ñ#ò 	>ô Ð<Ó=Ð=ð	>ús   ÁA' Á')BT)Úfrozenc                   óP   — e Zd ZU dZdZeed<   dZedz  ed<   dZ	eed<   dZ
eed<   y)	Ú	ZoneStyleaê  Zone text styles.

    A :py:class:`dns.zone.ZoneStyle` is also a :py:class:`dns.name.NameStyle`,
    :py:class:`dns.rdata.RdataStyle`, :py:class:`dns.rdataset.RdatasetStyle`,
    and :py:class:`dns.node.NodeStyle`.
    See those classes for a description of their options.

    :param bool sorted: If ``True`` (the default), the file will be written
        with the names sorted in DNSSEC order from least to greatest.
        Otherwise the names will be written in whatever order they happen
        to have in the zone's dictionary.
    :param nl: The end of line string.  If ``None`` (the default), the
        output will use the platform's native end-of-line marker (i.e. LF
        on POSIX, CRLF on Windows).
    :type nl: str or ``None``
    :param bool want_origin: If ``True``, emit a ``$ORIGIN`` line at the
        start of the output.  If ``False`` (the default), do not emit one.
    :param bool want_unicode_directive: If ``True`` and the zone has a
        non-empty ``unicode`` attribute, then emit a ``$UNICODE`` line in
        the output.  This directive is not standard, but allows dnspython
        and other aware software to read and write Unicode zonefiles without
        changing the rendering of names and TXT-like records.
    TÚsortedNÚnlFÚwant_originÚwant_unicode_directive)r   r   r   r   r7   ÚboolÚ__annotations__r8   Ústrr9   r:   r   r   r   r6   r6   m   s6   … ñð0 €FˆDÓØ€Bˆˆd‰
ÓØ€K�ÓØ#'Ð˜DÔ'r   r6   c                   óh  — e Zd ZU dZej
                  j                  Zeg ej
                  j                  f   e	d<   e
Zeg eej                  j                  ej
                  j                  f   f   e	d<   dZed egdf   dz  e	d<   dZedgdf   dz  e	d<   g d¢Zej&                  j(                  d	fd
ej                  j                  ez  dz  dej&                  j,                  defd„Zd„ Zd„ Zdej                  j                  ez  dej                  j                  fd„Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z d„ Z!d„ Z"d„ Z#	 dIdej                  j                  ez  dedej
                  j                  fd„Z$	 dIdej                  j                  ez  dedej
                  j                  dz  fd„Z%dej                  j                  ez  ddfd „Z&ejN                  jP                  dfdej                  j                  ez  d!ejN                  jR                  ez  d"ejN                  jR                  ez  dedejT                  jV                  f
d#„Z,ejN                  jP                  dfdej                  j                  ez  d!ejN                  jR                  ez  d"ejN                  jR                  ez  dedejT                  jV                  dz  f
d$„Z-ejN                  jP                  fdej                  j                  ez  d!ejN                  jR                  ez  d"ejN                  jR                  ez  ddfd%„Z.dej                  j                  ez  d&ejT                  jV                  ddfd'„Z/ejN                  jP                  fdej                  j                  ez  d!ejN                  jR                  ez  d"ejN                  jR                  ez  dej`                  jb                  fd(„Z2ejN                  jP                  fdej                  j                  ez  d!ejN                  jR                  ez  d"ejN                  jR                  ez  dej`                  jb                  dz  fd)„Z3ejN                  jh                  ejN                  jP                  fd!ejN                  jR                  ez  d"ejN                  jR                  ez  de5e6ej                  j                  ejT                  jV                  f      fd*„Z7ejN                  jh                  ejN                  jP                  fd!ejN                  jR                  ez  d"ejN                  jR                  ez  de5e6ej                  j                  e8ejr                  jt                  f      fd+„Z;	 	 	 	 	 	 dJd,ee<jz                  z  e>z  e?z  d-eded.ee@z  dz  d/ed0ed1eAdz  ddfd2„ZBd3„ ZCd1eAd,ee<jz                  z  e>z  e?z  ddfd4„ZD	 	 	 	 	 	 dJd-eded.edz  d/ed0ed1eAdz  defd5„ZEd1eAfd6„ZFdKd7„ZG	 dLd8ej�                  j’                  dz  dej”                  jh                  j–                  j–                  fd9„ZLeMjœ                  fd:eOd;eMde@fd<„ZPeMjœ                  fd:eOd;eMdej”                  jh                  j¢                  j¢                  fd=„ZR	 dLd>ej”                  jh                  j¢                  j¢                  dz  ddfd?„ZSdMdA„ZTdId&edd@fdB„ZUde6ej                  j                  dz  eej                  j                  dz  f   fdC„ZVdD„ ZWdE„ ZXdF„ ZYdG„ ZZde8fdH„Z[y)NÚZoneaz  A DNS zone.

    A ``Zone`` is a mapping from names to nodes.  The zone object may be
    treated like a Python dictionary, e.g. ``zone[name]`` will retrieve
    the node associated with that name.  The *name* may be a
    ``dns.name.Name object``, or it may be a string.  In either case,
    if the name is relative it is treated as relative to the origin of
    the zone.
    Únode_factoryÚmap_factoryNÚVersionÚwritable_version_factoryÚimmutable_version_factory)Úrdclassr(   Únodesr)   Tr(   rE   r)   c                 ón  — |�zt        |t        «      r t        j                  j	                  |«      }n/t        |t        j                  j
                  «      st        d«      ‚|j                  «       st        d«      ‚|| _        || _	        | j                  «       | _        || _        t        «       | _        y)a^  Initialize a zone object.

        :param origin: The origin of the zone.  It may be a
            :py:class:`dns.name.Name`, a ``str``, or ``None``.  If ``None``,
            then the zone's origin will be set by the first ``$ORIGIN`` line
            in a zone file.
        :type origin: :py:class:`dns.name.Name`, str, or ``None``
        :param rdclass: The zone's rdata class; the default is class IN.
        :type rdclass: :py:class:`dns.rdataclass.RdataClass`
        :param bool relativize: Whether domain names are relativized to the
            zone's origin.  The default is ``True``.
        Nz2origin parameter must be convertible to a DNS namez)origin parameter must be an absolute name)Ú
isinstancer=   r0   r'   Ú	from_textÚNameÚ
ValueErrorr-   r(   rE   rA   rF   r)   ÚsetÚunicode)Úselfr(   rE   r)   s       r   Ú__init__zZone.__init__¡   sŒ   € ð& ÐÜ˜&¤#Ô&ÜŸ™×+Ñ+¨FÓ3‘Ü ¬¯©¯©Ô6Ü Ð!UÓVÐVØ×%Ñ%Ô'Ü Ð!LÓMÐMØ,2ˆŒØˆŒØCG×CSÑCSÓCUˆŒ
Ø$ˆŒÜ!$£ˆ�r   c                 ó¾   — t        |t        «      sy| j                  |j                  k7  s2| j                  |j                  k7  s| j                  |j                  k7  ryy)zjTwo zones are equal if they have the same origin, class, and
        nodes.

        :rtype: bool
        FT)rH   r?   rE   r(   rF   ©rN   Úothers     r   Ú__eq__zZone.__eq__Á   sG   € ô ˜%¤Ô&Øà�L‰L˜EŸM™MÒ)Ø�{‰{˜eŸl™lÒ*Ø�z‰z˜UŸ[™[Ò(àØr   c                 ó&   — | j                  |«       S )z7Are two zones not equal?

        :rtype: bool
        )rS   rQ   s     r   Ú__ne__zZone.__ne__Ò   s   € ð —;‘;˜uÓ%Ð%Ð%r   r'   r*   c                 ó  — t        |t        «      r!t        j                  j	                  |d «      }n/t        |t        j                  j
                  «      st        d«      ‚t        || j                  | j                  «      S )Nz0name parameter must be convertible to a DNS name)
rH   r=   r0   r'   rI   rJ   r,   r3   r(   r)   ©rN   r'   s     r   r3   zZone._validate_nameÚ   sY   € ô �dœCÔ Ü—8‘8×%Ñ% d¨DÓ1‰DÜ˜D¤#§(¡(§-¡-Ô0ÜÐMÓNÐNÜ˜d D§K¡K°·±ÓAÐAr   c                 óB   — | j                  |«      }| j                  |   S ©N©r3   rF   ©rN   Úkeys     r   Ú__getitem__zZone.__getitem__ã   s    € Ø×!Ñ! #Ó&ˆØ�z‰z˜#‰Ðr   c                 óD   — | j                  |«      }|| j                  |<   y rY   rZ   )rN   r\   Úvalues      r   Ú__setitem__zZone.__setitem__ç   s   € Ø×!Ñ! #Ó&ˆØˆ�
‰
�3Šr   c                 ó@   — | j                  |«      }| j                  |= y rY   rZ   r[   s     r   Ú__delitem__zZone.__delitem__ë   s   € Ø×!Ñ! #Ó&ˆØ�J‰J�s‰Or   c                 ó6   — | j                   j                  «       S rY   )rF   Ú__iter__©rN   s    r   rd   zZone.__iter__ï   s   € Ø�z‰z×"Ñ"Ó$Ð$r   c                 ó6   — | j                   j                  «       S rY   ©rF   Úkeysre   s    r   rh   z	Zone.keysò   ó   € Ø�z‰z�‰Ó Ð r   c                 ó6   — | j                   j                  «       S rY   )rF   Úvaluesre   s    r   rk   zZone.valuesõ   s   € Ø�z‰z× Ñ Ó"Ð"r   c                 ó6   — | j                   j                  «       S rY   ©rF   Úitemsre   s    r   rn   z
Zone.itemsø   ó   € Ø�z‰z×ÑÓ!Ð!r   c                 óZ   — | j                  |«      }| j                  j                  |«      S rY   ©r3   rF   Úgetr[   s     r   rr   zZone.getû   s%   € Ø×!Ñ! #Ó&ˆØ�z‰z�~‰~˜cÓ"Ð"r   c                 ó@   — | j                  |«      }|| j                  v S rY   rZ   r[   s     r   Ú__contains__zZone.__contains__ÿ   s!   € Ø×!Ñ! #Ó&ˆØ�d—j‘jÐ Ð r   FÚcreatec                 ó°   — | j                  |«      }| j                  j                  |«      }|€'|st        ‚| j	                  «       }|| j                  |<   |S )a¨  Find a node in the zone, possibly creating it.

        :param name: The name of the node to find.  The value may be a
            :py:class:`dns.name.Name` or a ``str``.  If absolute, the name
            must be a subdomain of the zone's origin.  If ``zone.relativize``
            is ``True``, then the name will be relativized.
        :type name: :py:class:`dns.name.Name` or str
        :param bool create: If ``True``, the node will be created if it does
            not exist.
        :raises KeyError: if the name is not known and *create* was not
            specified, or if the name was not a subdomain of the origin.
        :rtype: :py:class:`dns.node.Node`
        )r3   rF   rr   r,   r@   ©rN   r'   ru   Únodes       r   Ú	find_nodezZone.find_node  sT   € ð" ×"Ñ" 4Ó(ˆØ�z‰z�~‰~˜dÓ#ˆØˆ<ÙÜ�Ø×$Ñ$Ó&ˆDØ#ˆD�J‰J�tÑØˆr   c                 óP   — 	 | j                  ||«      }|S # t        $ r d}Y |S w xY w)aà  Get a node in the zone, possibly creating it.

        This method is like :py:meth:`find_node`, except it returns ``None``
        instead of raising an exception if the node does not exist and
        creation has not been requested.

        :param name: The name of the node to find.  The value may be a
            :py:class:`dns.name.Name` or a ``str``.  If absolute, the name
            must be a subdomain of the zone's origin.  If ``zone.relativize``
            is ``True``, then the name will be relativized.
        :type name: :py:class:`dns.name.Name` or str
        :param bool create: If ``True``, the node will be created if it does
            not exist.
        :rtype: :py:class:`dns.node.Node` or ``None``
        N)ry   r,   rw   s       r   Úget_nodezZone.get_node  s9   € ð&	Ø—>‘> $¨Ó/ˆDð ˆøô ò 	Ø‰DØˆð	ús   ‚ –%¤%c                 ó^   — | j                  |«      }|| j                  v r| j                  |= yy)a¼  Delete the specified node if it exists.

        It is not an error if the node does not exist.

        :param name: The name of the node to delete.  The value may be a
            :py:class:`dns.name.Name` or a ``str``.  If absolute, the name
            must be a subdomain of the zone's origin.  If ``zone.relativize``
            is ``True``, then the name will be relativized.
        :type name: :py:class:`dns.name.Name` or str
        NrZ   rW   s     r   Údelete_nodezZone.delete_node6  s1   € ð ×"Ñ" 4Ó(ˆØ�4—:‘:ÑØ—
‘
˜4Ñ ð r   ÚrdtypeÚcoversc                 ó(  — | j                  |«      }t        j                  j                  j	                  |«      }t        j                  j                  j	                  |«      }| j                  ||«      }|j                  | j                  |||«      S )aw  Look for an rdataset with the specified name and type in the zone,
        and return an rdataset encapsulating it.

        The rdataset returned is not a copy; changes to it will change
        the zone.

        :param name: The name of the node to find.  The value may be a
            :py:class:`dns.name.Name` or a ``str``.  If absolute, the name
            must be a subdomain of the zone's origin.  If ``zone.relativize``
            is ``True``, then the name will be relativized.
        :type name: :py:class:`dns.name.Name` or str
        :param rdtype: The rdata type desired.
        :type rdtype: :py:class:`dns.rdatatype.RdataType` or str
        :param covers: The covered type.  Usually :py:attr:`dns.rdatatype.NONE`,
            but if *rdtype* is :py:attr:`dns.rdatatype.SIG` or
            :py:attr:`dns.rdatatype.RRSIG`, then this is the rdata type the
            SIG/RRSIG covers.  The library treats the SIG and RRSIG types as
            a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).
        :type covers: :py:class:`dns.rdatatype.RdataType` or str
        :param bool create: If ``True``, the node will be created if it does
            not exist.
        :raises KeyError: if the name or type are not found and *create* was
            not specified, or if the name was not a subdomain of the origin.
        :rtype: :py:class:`dns.rdataset.Rdataset`
        )r3   r0   Ú	rdatatypeÚ	RdataTypeÚmakery   Úfind_rdatasetrE   )rN   r'   r~   r   ru   rx   s         r   r„   zZone.find_rdatasetF  st   € ðB ×"Ñ" 4Ó(ˆÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆØ�~‰~˜d FÓ+ˆØ×!Ñ! $§,¡,°¸ÀÓGÐGr   c                 óT   — 	 | j                  ||||«      }|S # t        $ r d}Y |S w xY w)a~  Look for an rdataset with the specified name and type in the zone.

        This method is like :py:meth:`find_rdataset`, except it returns
        ``None`` instead of raising an exception if the rdataset does not
        exist and creation has not been requested.

        The rdataset returned is not a copy; changes to it will change
        the zone.

        :param name: The name of the node to find.  The value may be a
            :py:class:`dns.name.Name` or a ``str``.  If absolute, the name
            must be a subdomain of the zone's origin.  If ``zone.relativize``
            is ``True``, then the name will be relativized.
        :type name: :py:class:`dns.name.Name` or str
        :param rdtype: The rdata type desired.
        :type rdtype: :py:class:`dns.rdatatype.RdataType` or str
        :param covers: The covered type.  Usually :py:attr:`dns.rdatatype.NONE`,
            but if *rdtype* is :py:attr:`dns.rdatatype.SIG` or
            :py:attr:`dns.rdatatype.RRSIG`, then this is the rdata type the
            SIG/RRSIG covers.  The library treats the SIG and RRSIG types as
            a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).
        :type covers: :py:class:`dns.rdatatype.RdataType` or str
        :param bool create: If ``True``, the node will be created if it does
            not exist.
        :rtype: :py:class:`dns.rdataset.Rdataset` or ``None``
        N)r„   r,   )rN   r'   r~   r   ru   Úrdatasets         r   Úget_rdatasetzZone.get_rdatasetm  s@   € ðD	Ø×)Ñ)¨$°¸ÀÓGˆHð ˆøô ò 	Ø‰HØˆð	ús   ‚ ˜'¦'c                 ól  — | j                  |«      }t        j                  j                  j	                  |«      }t        j                  j                  j	                  |«      }| j                  |«      }|�>|j                  | j                  ||«       t        |«      dk(  r| j                  |«       yyy)a¡  Delete the rdataset matching *rdtype* and *covers*, if it
        exists at the node specified by *name*.

        It is not an error if the node does not exist, or if there is no
        matching rdataset at the node.  If the node has no rdatasets after
        the deletion, it will itself be deleted.

        :param name: The name of the node.  The value may be a
            :py:class:`dns.name.Name` or a ``str``.  If absolute, the name
            must be a subdomain of the zone's origin.  If ``zone.relativize``
            is ``True``, then the name will be relativized.
        :type name: :py:class:`dns.name.Name` or str
        :param rdtype: The rdata type desired.
        :type rdtype: :py:class:`dns.rdatatype.RdataType` or str
        :param covers: The covered type.  Usually :py:attr:`dns.rdatatype.NONE`,
            but if *rdtype* is :py:attr:`dns.rdatatype.SIG` or
            :py:attr:`dns.rdatatype.RRSIG`, then this is the rdata type the
            SIG/RRSIG covers.  The library treats the SIG and RRSIG types as
            a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).
        :type covers: :py:class:`dns.rdatatype.RdataType` or str
        Nr   )
r3   r0   r�   r‚   rƒ   r{   Údelete_rdatasetrE   Úlenr}   ©rN   r'   r~   r   rx   s        r   r‰   zZone.delete_rdataset•  s•   € ð8 ×"Ñ" 4Ó(ˆÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆØ�}‰}˜TÓ"ˆØÐØ× Ñ  §¡¨v°vÔ>Ü�4‹y˜AŠ~Ø× Ñ  Õ&ð ð r   Úreplacementc                 ó’   — |j                   | j                   k7  rt        d«      ‚| j                  |d«      }|j                  |«       y)a-  Replace an rdataset at name.

        It is not an error if there is no rdataset matching *replacement*.

        Ownership of the *replacement* object is transferred to the zone;
        in other words, this method does not store a copy of *replacement*
        at the node, it stores *replacement* itself.  If the node does not
        exist, it is created.

        :param name: The name of the node.  The value may be a
            :py:class:`dns.name.Name` or a ``str``.  If absolute, the name
            must be a subdomain of the zone's origin.  If ``zone.relativize``
            is ``True``, then the name will be relativized.
        :type name: :py:class:`dns.name.Name` or str
        :param replacement: The replacement rdataset.
        :type replacement: :py:class:`dns.rdataset.Rdataset`
        z#replacement.rdclass != zone.rdclassTN)rE   rK   ry   Úreplace_rdataset)rN   r'   rŒ   rx   s       r   rŽ   zZone.replace_rdatasetº  s@   € ð* ×Ñ $§,¡,Ò.ÜÐBÓCÐCØ�~‰~˜d DÓ)ˆØ×Ñ˜kÕ*r   c                 óš  — | j                  |«      }t        j                  j                  j	                  |«      }t        j                  j                  j	                  |«      }| j
                  |   j                  | j                  ||«      }t        j                  j                  || j                  ||«      }|j                  |«       |S )a/  Look for an rdataset with the specified name and type in the zone,
        and return an RRset encapsulating it.

        This method is less efficient than the similar
        :py:meth:`find_rdataset` because it creates an RRset instead of
        returning the matching rdataset.  It may be more convenient for some
        uses since it returns an object which binds the owner name to the
        rdataset.

        This method may not be used to create new nodes or rdatasets;
        use :py:meth:`find_rdataset` instead.

        :param name: The name of the node to find.  The value may be a
            :py:class:`dns.name.Name` or a ``str``.  If absolute, the name
            must be a subdomain of the zone's origin.  If ``zone.relativize``
            is ``True``, then the name will be relativized.
        :type name: :py:class:`dns.name.Name` or str
        :param rdtype: The rdata type desired.
        :type rdtype: :py:class:`dns.rdatatype.RdataType` or str
        :param covers: The covered type.  Usually :py:attr:`dns.rdatatype.NONE`,
            but if *rdtype* is :py:attr:`dns.rdatatype.SIG` or
            :py:attr:`dns.rdatatype.RRSIG`, then this is the rdata type the
            SIG/RRSIG covers.  The library treats the SIG and RRSIG types as
            a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).
        :type covers: :py:class:`dns.rdatatype.RdataType` or str
        :raises KeyError: if the name or type are not found, or if the name
            was not a subdomain of the origin.
        :rtype: :py:class:`dns.rrset.RRset`
        )r3   r0   r�   r‚   rƒ   rF   r„   rE   ÚrrsetÚRRsetÚupdate)rN   r'   r~   r   Úvnamer†   r�   s          r   Ú
find_rrsetzZone.find_rrsetÔ  s—   € ðH ×#Ñ# DÓ)ˆÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆØ—:‘:˜eÑ$×2Ñ2°4·<±<ÀÈÓPˆÜ—	‘	—‘  t§|¡|°V¸VÓDˆØ�‰�XÔØˆr   c                 óR   — 	 | j                  |||«      }|S # t        $ r d}Y |S w xY w)a¶  Look for an rdataset with the specified name and type in the zone,
        and return an RRset encapsulating it.

        This method is less efficient than the similar :py:meth:`get_rdataset`
        because it creates an RRset instead of returning the matching
        rdataset.  It may be more convenient for some uses since it returns
        an object which binds the owner name to the rdataset.

        This method may not be used to create new nodes or rdatasets;
        use :py:meth:`get_rdataset` instead.

        :param name: The name of the node to find.  The value may be a
            :py:class:`dns.name.Name` or a ``str``.  If absolute, the name
            must be a subdomain of the zone's origin.  If ``zone.relativize``
            is ``True``, then the name will be relativized.
        :type name: :py:class:`dns.name.Name` or str
        :param rdtype: The rdata type desired.
        :type rdtype: :py:class:`dns.rdatatype.RdataType` or str
        :param covers: The covered type.  Usually :py:attr:`dns.rdatatype.NONE`,
            but if *rdtype* is :py:attr:`dns.rdatatype.SIG` or
            :py:attr:`dns.rdatatype.RRSIG`, then this is the rdata type the
            SIG/RRSIG covers.  The library treats the SIG and RRSIG types as
            a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).
        :type covers: :py:class:`dns.rdatatype.RdataType` or str
        :rtype: :py:class:`dns.rrset.RRset` or ``None``
        N)r”   r,   )rN   r'   r~   r   r�   s        r   Ú	get_rrsetzZone.get_rrset   s<   € ðB	Ø—O‘O D¨&°&Ó9ˆEð ˆøô ò 	Ø‰EØˆð	ús   ‚ —&¥&c              #   ót  K  — t         j                  j                  j                  |«      }t         j                  j                  j                  |«      }| j	                  «       D ]O  \  }}|D ]E  }|t         j                  j
                  k(  s |j                  |k(  sŒ0|j                  |k(  sŒ@||f–— ŒG ŒQ y­w)a*  Return a generator which yields ``(name, rdataset)`` tuples for
        all rdatasets in the zone which have the specified *rdtype* and
        *covers*.  If *rdtype* is :py:attr:`dns.rdatatype.ANY` (the default),
        then all rdatasets will be matched.

        :param rdtype: The rdata type desired.
        :type rdtype: :py:class:`dns.rdatatype.RdataType` or str
        :param covers: The covered type.  Usually :py:attr:`dns.rdatatype.NONE`,
            but if *rdtype* is :py:attr:`dns.rdatatype.SIG` or
            :py:attr:`dns.rdatatype.RRSIG`, then this is the rdata type the
            SIG/RRSIG covers.  The library treats the SIG and RRSIG types as
            a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).
        :type covers: :py:class:`dns.rdatatype.RdataType` or str
        N)r0   r�   r‚   rƒ   rn   ÚANYr~   r   )rN   r~   r   r'   rx   Úrdss         r   Úiterate_rdatasetszZone.iterate_rdatasets'  s—   è ø€ ô( —‘×(Ñ(×-Ñ-¨fÓ5ˆÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆØŸ*™*›,ò 	&‰JˆD�$Øò &�ØœSŸ]™]×.Ñ.Ò.Ø—J‘J &Ó(¨S¯Z©Z¸6Ó-Aà ˜+Ó%ñ	&ñ	&ùs   ‚BB8ÂB8Â-B8c              #   ó˜  K  — t         j                  j                  j                  |«      }t         j                  j                  j                  |«      }| j	                  «       D ]a  \  }}|D ]W  }|t         j                  j
                  k(  s |j                  |k(  sŒ0|j                  |k(  sŒ@|D ]  }||j                  |f–— Œ ŒY Œc y­w)a%  Return a generator which yields ``(name, ttl, rdata)`` tuples for
        all rdatas in the zone which have the specified *rdtype* and *covers*.
        If *rdtype* is :py:attr:`dns.rdatatype.ANY` (the default), then all
        rdatas will be matched.

        :param rdtype: The rdata type desired.
        :type rdtype: :py:class:`dns.rdatatype.RdataType` or str
        :param covers: The covered type.  Usually :py:attr:`dns.rdatatype.NONE`,
            but if *rdtype* is :py:attr:`dns.rdatatype.SIG` or
            :py:attr:`dns.rdatatype.RRSIG`, then this is the rdata type the
            SIG/RRSIG covers.  The library treats the SIG and RRSIG types as
            a family of types, e.g. RRSIG(A), RRSIG(NS), RRSIG(SOA).
        :type covers: :py:class:`dns.rdatatype.RdataType` or str
        N)	r0   r�   r‚   rƒ   rn   r˜   r~   r   Úttl)rN   r~   r   r'   rx   r™   Úrdatas          r   Úiterate_rdataszZone.iterate_rdatasD  s­   è ø€ ô( —‘×(Ñ(×-Ñ-¨fÓ5ˆÜ—‘×(Ñ(×-Ñ-¨fÓ5ˆØŸ*™*›,ò 	5‰JˆD�$Øò 5�ØœSŸ]™]×.Ñ.Ò.Ø—J‘J &Ó(¨S¯Z©Z¸6Ó-Aà!$ò 5˜Ø# S§W¡W¨eÐ4Ó4ñ5ñ	5ñ	5ùs   ‚BC
ÂC
Â-C
Úfr7   r8   Úwant_commentsr9   Ústylec                 óÈ   — |€Oi }||d<   ||d<   |r| j                   €J ‚| j                   |d<   ||d<   ||d<   ||d<   t        j                  |«      }| j                  ||«      S )a8  Write a zone to a file.

        :param f: A file object, a ``str`` filename, or an ``os.PathLike``.
            If not a file object, it is treated as the name of a file to
            open.
        :param bool sorted: If ``True`` (the default), the file will be
            written with the names sorted in DNSSEC order from least to
            greatest.  Otherwise the names will be written in whatever order
            they happen to have in the zone's dictionary.
        :param bool relativize: If ``True`` (the default), domain names in
            the output will be relativized to the zone's origin if possible.
        :param nl: The end of line string.  If ``None`` (the default), the
            output will use the platform's native end-of-line marker (i.e. LF
            on POSIX, CRLF on Windows).
        :type nl: str, bytes, or ``None``
        :param bool want_comments: If ``True``, emit end-of-line comments as
            part of writing the file.  If ``False`` (the default), do not
            emit them.
        :param bool want_origin: If ``True``, emit a ``$ORIGIN`` line at the
            start of the file.  If ``False`` (the default), do not emit one.
        :param style: If specified, the style overrides the other parameters.
        :type style: :py:class:`dns.zone.ZoneStyle` or ``None``
        r7   r)   r(   r8   r    r9   )r(   r6   Úfrom_keywordsÚto_styled_file)	rN   rŸ   r7   r)   r8   r    r9   r¡   Úkws	            r   Úto_filezZone.to_fileb  s‚   € ðB ˆ=ØˆBØ!ˆBˆx‰LØ)ˆBˆ|ÑÙØ—{‘{Ð.Ð.Ð.Ø#Ÿ{™{��8‘ØˆBˆt‰HØ"/ˆBˆÑØ +ˆBˆ}ÑÜ×+Ñ+¨BÓ/ˆEØ×"Ñ" 5¨!Ó,Ð,r   c                 óì   — 	 t        t        |«      }|j                  |«       |j                  |«       y # t        $ r5 t        t        |«      }|j                  |«       |j                  |«       Y y w xY wrY   )r
   r   ÚwriteÚ	TypeErrorr	   )rN   ÚoutputÚlÚl_br8   Únl_bÚboutÚtouts           r   Ú_write_linezZone._write_line�  s[   € ð	Üœ &Ó)ˆDØ�J‰J�sŒOØ�J‰J�tÕøÜò 	Üœ Ó'ˆDØ�J‰J�qŒMØ�J‰J�rŽNð	ús   ‚25 µ;A3Á2A3c           	      óT  — |j                   r�|j                  }d| j                  v rt        j                  j
                  }n(d| j                  v rt        j                  j                  }d| j                  v rd}n|j                  }|j                  ||¬«      }t        j                  j                  |d«      5 }t        |dd«      }|€d	}|j                  €"t        j                  j                  |«      }d
}nht!        |j                  t"        «      r(|j                  j                  |«      }|j                  }n&|j                  }|j                  j%                  «       }|€J ‚|€J ‚|j                   ret'        | j                  «      dkD  rMddj)                  t+        | j                  «      «      z   }	|	j                  |«      }
| j-                  ||	|
||«       |j.                  rd| j0                  €J ‚|j                  d¬«      }d| j0                  j3                  |«      z   }	|	j                  |«      }
| j-                  ||	|
||«       |j4                  �5d|j4                  › �}	|	j                  |«      }
| j-                  ||	|
||«       |j*                  r*t7        | j9                  «       «      }|j;                  «        n| j9                  «       }|D ]=  }| |   j3                  ||«      }	|	j                  |«      }
| j-                  ||	|
||«       Œ? 	 ddd«       y# 1 sw Y   yxY w)a-  Write a zone to a styled file.

        :param style: The style to apply.
        :type style: :py:class:`dns.zone.ZoneStyle`
        :param f: A file object, a ``str`` filename, or an ``os.PathLike``.
            If not a file object, it is treated as the name of a file to
            open.
        Ú2008Ú2003ÚTXTT)Ú
idna_codecÚtxt_is_utf8ÚwbÚencodingNúutf-8ú
r   z	$UNICODE ú )r(   z$ORIGIN z$TTL )r:   rµ   rM   r0   r'   ÚIDNA_2008_PracticalÚIDNA_2003_Practicalr¶   ÚreplaceÚ
_file_utilÚ
maybe_openÚgetattrr8   ÚosÚlinesepÚencoderH   r=   ÚdecoderŠ   Újoinr7   r°   r9   r(   Úto_styled_textÚdefault_ttlÚlistrh   Úsort)rN   r¡   rŸ   rµ   r¶   rª   Úfile_encr­   r8   r«   r¬   Úorigin_styleÚnamesÚns                 r   r¤   zZone.to_styled_fileš  s´  € ð ×'Ò'Ø49×4DÑ4DˆJØ˜Ÿ™Ñ%Ü ŸX™X×9Ñ9‘
Ø˜4Ÿ<™<Ñ'Ü ŸX™X×9Ñ9�
Ø˜Ÿ™Ñ$Ø"‘à#×/Ñ/�Ø—M‘M¨ZÀ[�MÓQˆEÜ�^‰^×&Ñ& q¨$Ó/ð ,	;°6ô ˜q *¨dÓ3ˆHØÐØ"�à�x‰xÐä—z‘z×(Ñ(¨Ó2�Ø‘Ü˜EŸH™H¤cÔ*Ø—x‘x—‘ xÓ0�Ø—X‘X‘à—x‘x�Ø—X‘X—_‘_Ó&�Ø�>Ð!�>ØÐ#Ð#Ð#à×+Ò+´°D·L±LÓ0AÀAÒ0EØ #§(¡(¬6°$·,±,Ó+?Ó"@Ñ@�Ø—h‘h˜xÓ(�Ø× Ñ  ¨¨C°°TÔ:Ø× Ò Ø—{‘{Ð.Ð.Ð.à$Ÿ}™}°D˜}Ó9�Ø §¡×!;Ñ!;¸LÓ!IÑI�Ø—h‘h˜xÓ(�Ø× Ñ  ¨¨C°°TÔ:Ø× Ñ Ð,Ø˜E×-Ñ-Ð.Ð/�Ø—h‘h˜xÓ(�Ø× Ñ  ¨¨C°°TÔ:à�|Š|Ü˜TŸY™Y›[Ó)�Ø—
‘
•àŸ	™	›�Øò ;�Ø˜‘G×*Ñ*¨5°!Ó4�Ø—h‘h˜xÓ(�Ø× Ñ  ¨¨C°°TÕ:ñ;÷S,	;÷ ,	;ñ ,	;ús   Â:ILÌL'c           	      óœ   — t        j                  «       }| j                  |||||||«       |j                  «       }|j	                  «        |S )a±  Return a zone's text as though it were written to a file.

        :param bool sorted: If ``True`` (the default), the output will be
            written with the names sorted in DNSSEC order from least to
            greatest.  Otherwise the names will be written in whatever order
            they happen to have in the zone's dictionary.
        :param bool relativize: If ``True`` (the default), domain names in
            the output will be relativized to the zone's origin if possible.
        :param nl: The end of line string.  If ``None`` (the default), the
            output will use the platform's native end-of-line marker (i.e. LF
            on POSIX, CRLF on Windows).
        :type nl: str or ``None``
        :param bool want_comments: If ``True``, emit end-of-line comments as
            part of the output.  If ``False`` (the default), do not emit them.
        :param bool want_origin: If ``True``, emit a ``$ORIGIN`` line at the
            start of the output.  If ``False`` (the default), do not emit one.
        :param style: If specified, the style overrides the other parameters.
        :type style: :py:class:`dns.zone.ZoneStyle` or ``None``
        :rtype: str
        )ÚioÚStringIOr¦   ÚgetvalueÚclose)	rN   r7   r)   r8   r    r9   r¡   Útemp_bufferÚreturn_values	            r   Úto_textzZone.to_textâ  sL   € ô: —k‘k“mˆØ�‰Ø˜ ¨R°ÀÈUô	
ð #×+Ñ+Ó-ˆØ×ÑÔØÐr   c                 ó’   — t        j                  «       }| j                  ||«       |j                  «       }|j	                  «        |S )a1  Return a zone's styled text as though it were written to a file.

        See the documentation for :py:class:`dns.zone.ZoneStyle` for a description
        of the style parameters.

        :param style: The style to apply.
        :type style: :py:class:`dns.zone.ZoneStyle`
        :rtype: str
        )rÐ   rÑ   r¤   rÒ   rÓ   )rN   r¡   rÔ   rÕ   s       r   rÇ   zZone.to_styled_text  s?   € ô —k‘k“mˆØ×Ñ˜E ;Ô/Ø"×+Ñ+Ó-ˆØ×ÑÔØÐr   c                 óF  — | j                   rt        j                  j                  }n| j                  €J ‚| j                  }| j                  |t        j                  j                  «      €t        ‚| j                  |t        j                  j                  «      €t        ‚y)zßDo some simple checking of the zone's origin.

        :raises dns.zone.NoSOA: if there is no SOA RRset.
        :raises dns.zone.NoNS: if there is no NS RRset.
        :raises KeyError: if there is no origin node.
        N)r)   r0   r'   Úemptyr(   r‡   r�   ÚSOAr   ÚNSr   rW   s     r   Úcheck_originzZone.check_origin  sz   € ð �?Š?Ü—8‘8—>‘>‰Dà—;‘;Ð*Ð*Ð*Ø—;‘;ˆDØ×Ñ˜T¤3§=¡=×#4Ñ#4Ó5Ð=ÜˆKØ×Ñ˜T¤3§=¡=×#3Ñ#3Ó4Ð<ÜˆJð =r   Útxnc                 óÄ  — | j                   rt        j                  j                  }n| j                  €t
        ‚| j                  }|r+|j                  |t        j                  j                  «      }n*| j                  |t        j                  j                  «      }|€t
        ‚t        t        j                  j                  j                  j                  |d   «      }|S )z�Get the zone SOA rdata.

        :raises dns.zone.NoSOA: if there is no SOA RRset.
        :rtype: :py:class:`dns.rdtypes.ANY.SOA.SOA`
        r   )r)   r0   r'   rÙ   r(   r   rr   r�   rÚ   r‡   r
   Úrdtypesr˜   )rN   rÝ   Úorigin_nameÚsoa_rdsÚsoas        r   Úget_soazZone.get_soa)  sž   € ð �?Š?ÜŸ(™(Ÿ.™.‰Kà�{‰{Ð"ô �ØŸ+™+ˆKáØ—g‘g˜k¬3¯=©=×+<Ñ+<Ó=‰Gà×'Ñ'¨´S·]±]×5FÑ5FÓGˆGØˆ?ÜˆKä”s—{‘{—‘×*Ñ*×.Ñ.°¸±
Ó;ˆCØˆJr   Úhash_algorithmÚschemec           	      óˆ  — t        j                  |«      }|st        ‚|t        j                  k7  rt
        ‚| j                  rt        j                  j                  }n| j                  €J ‚| j                  } |«       }t        | j                  «       «      D �]  \  }}|j                  | j                  «      }t        |d„ ¬«      D ]á  }	||k(  r3t        j                  j                  |	j                   |	j"                  fv rŒ;t%        j&                  d|	j                   |	j(                  |	j*                  «      }
|	D �cg c]  }|j                  | j                  «      ‘Œ }}t        |«      D ];  }t%        j&                  dt-        |«      «      }|j/                  ||
z   |z   |z   «       Œ= Œã �Œ |j1                  «       S c c}w )Nc                 ó2   — | j                   | j                  fS rY   )r~   r   )r™   s    r   ú<lambda>z&Zone._compute_digest.<locals>.<lambda>W  s   € ¸#¿*¹*ÀcÇjÁjÐ9Q€ r   )r\   z!HHIz!H)r   rr   r"   r   ÚSIMPLEr   r)   r0   r'   rÙ   r(   r7   rn   Úto_digestabler�   ÚZONEMDr~   r   ÚstructÚpackrE   rœ   rŠ   r’   Údigest)rN   rä   rå   Úhashinforà   Úhasherr'   rx   Ú	rrnamebufr†   Úrrfixedr�   ÚrdatasÚrrlens                 r   Ú_compute_digestzZone._compute_digestD  s‡  € ô
 #×&Ñ& ~Ó6ˆÙÜ0Ð0Ø”\×(Ñ(Ò(Ü)Ð)à�?Š?ÜŸ(™(Ÿ.™.‰Kà—;‘;Ð*Ð*Ð*ØŸ+™+ˆKÙ“ˆÜ  §¡£Ó.ó 	G‰JˆD�$Ø×*Ñ*¨4¯;©;Ó7ˆIÜ" 4Ñ-QÔRò G�Ø˜;Ò&¬3¯=©=×+?Ñ+?Ø—O‘OØ—O‘OðDñ ,ð Ü Ÿ+™+Ø˜HŸO™O¨X×-=Ñ-=¸x¿|¹|ó�ð IQÖQ¸u˜%×-Ñ-¨d¯k©kÕ:ÐQ�ÐQÜ# F›^ò G�EÜ"ŸK™K¨¬c°%«jÓ9�EØ—M‘M )¨gÑ"5¸Ñ"=ÀÑ"EÕFñGòGð	Gð �}‰}‹Ðùò	 Rs   Ä="F?c                 ó  — | j                  «       j                  }| j                  ||«      }t        j                  j
                  j                  j                  | j                  t        j                  j                  ||||«      S rY   )	rã   Úserialrõ   r0   rß   r˜   rë   rE   r�   )rN   rä   rå   r÷   rî   s        r   Úcompute_digestzZone.compute_digestf  sd   € ð
 —‘“×&Ñ&ˆØ×%Ñ% n°fÓ=ˆÜ�{‰{�‰×%Ñ%×,Ñ,Ø�L‰Lœ#Ÿ-™-×.Ñ.°¸ÀÐPVó
ð 	
r   Úzonemdc                 ó²  — |r|g}nL| j                   €J ‚| j                  | j                   t        j                  j                  «      }|€t
        ‚|}	 | j                  «       j                  }t        «       }t        «       }|D ]@  }|j                  |j                  f}||v r|j                  |«       |j                  |«       ŒB |D ]e  }|j                  |j                  f|v rŒ|j                  |k7  rŒ.	 | j                  |j                  |j                  «      }	|	|j                  k(  r y Œg t        ‚# t        $ r t        ‚w xY w# t         $ r Y ŒŒw xY wrY   )r(   r‡   r0   r�   rë   r$   rã   r÷   r   r&   rL   rå   rä   Úaddrõ   rî   Ú	Exception)
rN   rù   Údigestsr™   r÷   Ú
duplicatedÚseenrî   r\   Úcomputeds
             r   Úverify_digestzZone.verify_digestq  sW  € ñ Ø�h‰Gà—;‘;Ð*Ð*Ð*Ø×#Ñ# D§K¡K´·±×1EÑ1EÓFˆCØˆ{Ü�ØˆGð	,Ø—\‘\“^×*Ñ*ˆFô ,/«5ˆ
Ü%(£UˆØò 	ˆFØ—=‘= &×"7Ñ"7Ð8ˆCØ�d‰{Ø—‘˜sÔ#Ø�H‰H�S�Mð		ð
 ò 	ˆFØ—‘˜v×4Ñ4Ð5¸ÑCØð �}‰} Ò&ØðØ×/Ñ/°×0EÑ0EÀvÇ}Á}ÓU�Ø˜vŸ}™}Ò,Ùð -ð	ô (Ð'øô5 ò 	,ä+Ð+ð	,ûô0 ò Ùðús   ÁD7 Ã85E
Ä7EÅ
	EÅEÚTransactionc           
      ó\   — t        | dt        | d| j                  | j                  «      «      S )NFé   )r  rB   rF   r(   re   s    r   ÚreaderzZone.reader�  s$   € Ü˜4 ¬°°a¸¿¹ÀTÇ[Á[Ó(QÓRÐRr   c                 ó>   — t        | |«      }|j                  «        |S rY   )r  Ú_setup_version)rN   rŒ   rÝ   s      r   ÚwriterzZone.writer   s   € Ü˜$ Ó,ˆØ×ÑÔØˆ
r   c                 óš   — | j                   rt        j                  j                  }n| j                  }| j                  | j                   |fS rY   )r)   r0   r'   rÙ   r(   )rN   Ú	effectives     r   Úorigin_informationzZone.origin_information¥  s6   € ð �?Š?ÜŸ™Ÿ™‰IàŸ™ˆIØ—‘˜TŸ_™_¨iÐ8Ð8r   c                 ó   — | j                   S rY   )rE   re   s    r   Ú	get_classzZone.get_class¯  s   € Ø�|‰|Ðr   c                  ó   — y rY   r   ©rN   rÝ   s     r   Ú	_end_readzZone._end_read´  ó   € Ør   c                  ó   — y rY   r   r  s     r   Ú
_end_writezZone._end_write·  r  r   c                 óN   — |j                   | _         | j                  €|| _        y y rY   )rF   r(   )rN   rÝ   Úversionr(   s       r   Ú_commit_versionzZone._commit_versionº  s#   € Ø—]‘]ˆŒ
Ø�;‰;ÐØ ˆD�Kð r   c                  ó   — y)Nr  r   re   s    r   Ú_get_next_version_idzZone._get_next_version_id¿  s   € àr   ©F)TTNFFN)r*   NrY   )r*   r  )\r   r   r   r   r0   rx   ÚNoder@   r   r<   ÚdictrA   r   r'   rJ   rC   r;   rD   Ú	__slots__Ú
rdataclassÚINr=   Ú
RdataClassrO   rS   rU   r3   r]   r`   rb   rd   rh   rk   rn   rr   rt   ry   r{   r}   r�   ÚNONEr‚   r†   ÚRdatasetr„   r‡   r‰   rŽ   r�   r‘   r”   r–   r˜   r   Útuplerš   Úintr�   ÚRdatarž   rÂ   ÚPathLiker   r	   Úbytesr6   r¦   r°   r¤   rÖ   rÇ   rÜ   Útransactionr  rß   rÚ   rã   r   ré   r   rõ   rë   rø   r  r  r  r  r  r  r  r  r  r   r   r   r?   r?   �   sæ  … ñð 14·±·±€L�(˜2˜sŸx™xŸ}™}Ð,Ñ-Ó=ØNR€K�˜"˜n¨S¯X©X¯]©]¸C¿H¹H¿M¹MÐ-IÑJÐJÑKÓRð LPÐ˜h¨° ~°yÐ'@ÑAÀDÑHÓOØIMÐ˜x¨¨°YÐ(>Ñ?À$ÑFÓMâ<€Ið
 .1¯^©^×->Ñ->Øñ	'à—‘—‘ Ñ# dÑ*ð'ð —‘×*Ñ*ð'ð ó	'ò@ò"&ðB 3§8¡8§=¡=°3Ñ#6ð B¸3¿8¹8¿=¹=ó Bòò òò%ò!ò#ò"ò#ò!ð
 9>ñØ—H‘H—M‘M CÑ'ðØ15ðà	�‰�‰óð6 9>ñØ—H‘H—M‘M CÑ'ðØ15ðà	�‰�‰˜Ñ	óð2! §¡§¡°Ñ 3ð !¸ó !ð( 14·±×0BÑ0BØñ%Hà�h‰h�m‰m˜cÑ!ð%Hð —‘×'Ñ'¨#Ñ-ð%Hð —‘×'Ñ'¨#Ñ-ð	%Hð
 ð%Hð 
�‰×	Ñ	ó%HðV 14·±×0BÑ0BØñ&à�h‰h�m‰m˜cÑ!ð&ð —‘×'Ñ'¨#Ñ-ð&ð —‘×'Ñ'¨#Ñ-ð	&ð
 ð&ð 
�‰×	Ñ	 Ñ	%ó&ðX 14·±×0BÑ0Bñ	#'à�h‰h�m‰m˜cÑ!ð#'ð —‘×'Ñ'¨#Ñ-ð#'ð —‘×'Ñ'¨#Ñ-ð	#'ð
 
ó#'ðJ+Ø—H‘H—M‘M CÑ'ð+Ø69·l±l×6KÑ6Kð+à	ó+ð< 14·±×0BÑ0Bñ	*à�h‰h�m‰m˜cÑ!ð*ð —‘×'Ñ'¨#Ñ-ð*ð —‘×'Ñ'¨#Ñ-ð	*ð
 
�‰�‰ó*ð` 14·±×0BÑ0Bñ	%à�h‰h�m‰m˜cÑ!ð%ð —‘×'Ñ'¨#Ñ-ð%ð —‘×'Ñ'¨#Ñ-ð	%ð
 
�‰�‰˜4Ñ	ó%ðR 14·±×0AÑ0AØ03·±×0BÑ0Bñ&à—‘×'Ñ'¨#Ñ-ð&ð —‘×'Ñ'¨#Ñ-ð&ð 
�%˜Ÿ™Ÿ™ s§|¡|×'<Ñ'<Ð<Ñ=Ñ	>ó	&ð> 14·±×0AÑ0AØ03·±×0BÑ0Bñ5à—‘×'Ñ'¨#Ñ-ð5ð —‘×'Ñ'¨#Ñ-ð5ð 
�%˜Ÿ™Ÿ™ s¨C¯I©I¯O©OÐ;Ñ<Ñ	=ó	5ðB ØØ!%Ø#Ø!Ø"&ñ,-à�—‘Ñ˜xÑ'¨&Ñ0ð,-ð ð,-ð ð	,-ð
 �%‰K˜$Ñð,-ð ð,-ð ð,-ð ˜4Ñð,-ð 
ó,-ò\ðF;àðF;ð �—‘Ñ˜xÑ'¨&Ñ0ðF;ð 
ó	F;ðT ØØØ#Ø!Ø"&ñ#àð#ð ð#ð �$‰Jð	#ð
 ð#ð ð#ð ˜4Ñð#ð 
ó#ðJ Ió ó"ð$ 9=ñØ—?‘?×.Ñ.°Ñ5ðà	�‰�‰×	Ñ	×	 Ñ	 óð<  ,×2Ñ2ñ à+ð ð ð ð 
ó	 ðJ  ,×2Ñ2ñ	
à+ð	
ð ð	
ð 
�‰�‰×	Ñ	×	&Ñ	&ó		
ð >Bñ((Ø—k‘k—o‘o×,Ñ,×3Ñ3°dÑ:ð((à	ó((óXSñ $ð °=ó ð
9à	ˆs�x‰x�}‰}˜tÑ# T¨3¯8©8¯=©=¸4Ñ+?Ð?Ñ	@ó9òò
òò!ð
 cô r   r?   c                   ó$   ‡ — e Zd ZdgZˆ fd„Zˆ xZS )ÚVersionedNodeÚidc                 ó0   •— t         ‰| �  «        d| _        y ©Nr   )ÚsuperrO   r*  )rN   Ú	__class__s    €r   rO   zVersionedNode.__init__Ï  s   ø€ Ü‰ÑÔàˆ�r   )r   r   r   r  rO   Ú__classcell__©r.  s   @r   r)  r)  Ì  s   ø„ Ø�€I÷ð r   r)  c                   ó   ‡ — e Zd Zˆ fd„Zej
                  j                  dfdej                  j                  dej
                  j                  dej
                  j                  de
dej                  j                  f
ˆ fd„Zej
                  j                  dfdej                  j                  dej
                  j                  dej
                  j                  de
dej                  j                  d	z  f
ˆ fd
„Zej
                  j                  fdej                  j                  dej
                  j                  dej
                  j                  dd	fd„Zdej                  j                  dd	fd„Zde
fd„Zˆ xZS )ÚImmutableVersionedNodec                 óØ   •— t         ‰| �  «        |j                  | _        t        |j                  D �cg c]!  }t
        j                  j                  |«      ‘Œ# c}«      | _        y c c}w rY   )r-  rO   r*  r"  Ú	rdatasetsr0   r†   ÚImmutableRdataset)rN   rx   r™   r.  s      €r   rO   zImmutableVersionedNode.__init__×  sI   ø€ Ü‰ÑÔØ—'‘'ˆŒÜØ<@¿N¹NÖK°SŒS�\‰\×+Ñ+¨CÕ0ÒKó
ˆ�ùÚKs   ´&A'FrE   r~   r   ru   r*   c                 óB   •— |rt        d«      ‚t        ‰| �	  |||d«      S ©NÚ	immutableF)r©   r-  r„   ©rN   rE   r~   r   ru   r.  s        €r   r„   z$ImmutableVersionedNode.find_rdatasetÞ  s)   ø€ ñ Ü˜KÓ(Ð(Ü‰wÑ$ W¨f°f¸eÓDÐDr   Nc                 óB   •— |rt        d«      ‚t        ‰| �	  |||d«      S r7  )r©   r-  r‡   r9  s        €r   r‡   z#ImmutableVersionedNode.get_rdataseté  s)   ø€ ñ Ü˜KÓ(Ð(Ü‰wÑ# G¨V°V¸UÓCÐCr   c                 ó   — t        d«      ‚©Nr8  ©r©   )rN   rE   r~   r   s       r   r‰   z&ImmutableVersionedNode.delete_rdatasetô  s   € ô ˜Ó$Ð$r   rŒ   c                 ó   — t        d«      ‚r<  r=  )rN   rŒ   s     r   rŽ   z'ImmutableVersionedNode.replace_rdatasetü  s   € Ü˜Ó$Ð$r   c                  ó   — y)NTr   re   s    r   Úis_immutablez#ImmutableVersionedNode.is_immutableÿ  s   € Ør   )r   r   r   rO   r0   r�   r   r  r  r‚   r;   r†   r!  r„   r‡   r‰   rŽ   r@  r/  r0  s   @r   r2  r2  Õ  sx  ø„ ô
ð +.¯-©-×*<Ñ*<Øñ	Eà—‘×*Ñ*ð	Eð —‘×'Ñ'ð	Eð —‘×'Ñ'ð		Eð
 ð	Eð 
�‰×	Ñ	õ	Eð +.¯-©-×*<Ñ*<Øñ	Dà—‘×*Ñ*ð	Dð —‘×'Ñ'ð	Dð —‘×'Ñ'ð		Dð
 ð	Dð 
�‰×	Ñ	 Ñ	%õ	Dð +.¯-©-×*<Ñ*<ñ	%à—‘×*Ñ*ð%ð —‘×'Ñ'ð%ð —‘×'Ñ'ð	%ð
 
ó%ð%¨C¯L©L×,AÑ,Að %Àdó %ð˜d÷ r   r2  c            
       óH  — e Zd Z	 	 ddededeej                  j                  ej                  j                  f   dz  dej                  j                  dz  fd„Zdej                  j                  dej                  j                  fd	„Zdej                  j                  dej                  j                  dz  fd
„Zdej                  j                  dej                  j                  dej                  j                  dej                   j"                  dz  fd„Zd„ Zd„ Zy)rB   NÚzoner*  rF   r(   c                 óz   — || _         || _        |�|| _        || _        y |j                  «       | _        || _        y rY   )rB  r*  rF   rA   r(   )rN   rB  r*  rF   r(   s        r   rO   zVersion.__init__  sA   € ð ˆŒ	ØˆŒØÐØˆDŒJð ˆ�ð ×)Ñ)Ó+ˆDŒJØˆ�r   r'   r*   c                 óX   — t        || j                  | j                  j                  «      S rY   )r3   r(   rB  r)   rW   s     r   r3   zVersion._validate_name  s   € Ü˜d D§K¡K°·±×1EÑ1EÓFÐFr   c                 óZ   — | j                  |«      }| j                  j                  |«      S rY   rq   rW   s     r   r{   zVersion.get_node  s%   € Ø×"Ñ" 4Ó(ˆØ�z‰z�~‰~˜dÓ#Ð#r   r~   r   c                 óx   — | j                  |«      }|€y |j                  | j                  j                  ||«      S rY   )r{   r‡   rB  rE   r‹   s        r   r‡   zVersion.get_rdataset  s9   € ð �}‰}˜TÓ"ˆØˆ<ØØ× Ñ  §¡×!2Ñ!2°F¸FÓCÐCr   c                 ó6   — | j                   j                  «       S rY   rg   re   s    r   rh   zVersion.keys%  ri   r   c                 ó6   — | j                   j                  «       S rY   rm   re   s    r   rn   zVersion.items(  ro   r   )NN)r   r   r   r?   r#  r   r0   r'   rJ   rx   r  rO   r3   r{   r�   r‚   r†   r!  r‡   rh   rn   r   r   r   rB   rB     s  „ ð
 FJØ'+ñàðð ðð ˜cŸh™hŸm™m¨S¯X©X¯]©]Ð:Ñ;¸dÑBð	ð
 —‘—‘ Ñ$óðG 3§8¡8§=¡=ð G°S·X±X·]±]ó Gð$˜SŸX™XŸ]™]ð $¨s¯x©x¯}©}¸tÑ/Có $ð	Dà�h‰h�m‰mð	Dð —‘×'Ñ'ð	Dð —‘×'Ñ'ð		Dð
 
�‰×	Ñ	 Ñ	%ó	Dò!ó"r   rB   c                   óH  ‡ — e Zd Zddedefˆ fd„Zdej                  j                  de	ej                  j                  ej                  j                  f   fd„Zdej                  j                  dej                  j                  fd„Zdej                  j                  ddfd	„Zdej                  j                  d
ej                  j                   ddfd„Zdej                  j                  dej$                  j&                  dej$                  j&                  ddfd„Zˆ xZS )ÚWritableVersionrB  rŒ   c                 óÔ   •— |j                  «       }t        ‰| �	  ||«       |s%| j                  j	                  |j                  «       |j
                  | _        t        «       | _        y rY   )r  r-  rO   rF   r’   r(   rL   Úchanged)rN   rB  rŒ   r*  r.  s       €r   rO   zWritableVersion.__init__-  sS   ø€ ð ×&Ñ&Ó(ˆÜ‰Ñ˜˜rÔ"Ùð
 �J‰J×Ñ˜dŸj™jÔ)ð —k‘kˆŒÜ+.«5ˆ�r   r'   r*   c                 óš  — | j                  |«      }| j                  j                  |«      }|�|| j                  vrŒ| j                  j                  «       }t        |d«      r| j                  |_        |�%|j                  j                  |j                  «       || j                  |<   | j                  j                  |«       ||fS ||fS )Nr*  )r3   rF   rr   rL  rB  r@   Úhasattrr*  r4  Úextendrû   )rN   r'   rx   Únew_nodes       r   Ú_maybe_cow_with_namez$WritableVersion._maybe_cow_with_name=  s²   € ð ×"Ñ" 4Ó(ˆØ�z‰z�~‰~˜dÓ#ˆØˆ<˜4 t§|¡|Ñ3Ø—y‘y×-Ñ-Ó/ˆHÜ�x Ô&ð #Ÿg™g�”ØÐà×"Ñ"×)Ñ)¨$¯.©.Ô9Ø'ˆD�J‰J�tÑØ�L‰L×Ñ˜TÔ"Ø˜dÐ#Ð#à˜$�<Ðr   c                 ó*   — | j                  |«      d   S r,  )rQ  rW   s     r   Ú
_maybe_cowzWritableVersion._maybe_cowU  s   € Ø×(Ñ(¨Ó.¨qÑ1Ð1r   Nc                 ó”   — | j                  |«      }|| j                  v r)| j                  |= | j                  j                  |«       y y rY   )r3   rF   rL  rû   rW   s     r   r}   zWritableVersion.delete_nodeX  sA   € Ø×"Ñ" 4Ó(ˆØ�4—:‘:ÑØ—
‘
˜4Ð Ø�L‰L×Ñ˜TÕ"ð r   r†   c                 óH   — | j                  |«      }|j                  |«       y rY   )rS  rŽ   )rN   r'   r†   rx   s       r   Úput_rdatasetzWritableVersion.put_rdataset^  s    € ð �‰˜tÓ$ˆØ×Ñ˜hÕ'r   r~   r   c                 ó²   — | j                  |«      \  }}|j                  | j                  j                  ||«       t	        |«      dk(  r| j
                  |= y y r,  )rQ  r‰   rB  rE   rŠ   rF   r‹   s        r   r‰   zWritableVersion.delete_rdatasetd  sP   € ð ×.Ñ.¨tÓ4‰
ˆˆdØ×Ñ˜TŸY™Y×.Ñ.°¸Ô?Üˆt‹9˜Š>Ø—
‘
˜4Ñ ð r   r  )r   r   r   r?   r;   rO   r0   r'   rJ   r"  rx   r  rQ  rS  r}   r†   r!  rV  r�   r‚   r‰   r/  r0  s   @r   rJ  rJ  ,  s  ø„ ñ1˜Tð 1°õ 1ð  Ø—H‘H—M‘Mð à	ˆs�x‰x�}‰}˜cŸh™hŸm™mÐ+Ñ	,ó ð02˜sŸx™xŸ}™}ð 2°·±·±ó 2ð# §¡§¡ð #°$ó #ð(Ø—H‘H—M‘Mð(Ø-0¯\©\×-BÑ-Bð(à	ó(ð	!à�h‰h�m‰mð	!ð —‘×'Ñ'ð	!ð —‘×'Ñ'ð		!ð
 
÷	!r   rJ  c                   ó$   ‡ — e Zd Zdefˆ fd„Zˆ xZS )ÚImmutableVersionr  c                 óÊ  •— t        |t        «      st        d«      ‚t        ‰| �  |j
                  d«       |j                  | _        |j                  | _        |j                  D ]8  }|j                  j                  |«      }|sŒ!t        |«      |j                  |<   Œ: t        j                  j                  |j                  d| j
                  j                  «      | _	        y )Nz?a dns.zone.ImmutableVersion requires a dns.zone.WritableVersionT)rH   rJ  rK   r-  rO   rB  r*  r(   rL  rF   rr   r2  r0   r8  ÚDictrA   )rN   r  r'   rx   r.  s       €r   rO   zImmutableVersion.__init__r  s´   ø€ Ü˜'¤?Ô3ÜØQóð ô 	‰Ñ˜Ÿ™ tÔ,à—*‘*ˆŒà—n‘nˆŒà—O‘Oò 	CˆDØ—=‘=×$Ñ$ TÓ*ˆDâÜ&<¸TÓ&B�—‘˜dÒ#ð		Cô —]‘]×'Ñ'Ø�M‰M˜4 §¡×!6Ñ!6ó
ˆ�
r   )r   r   r   rB   rO   r/  r0  s   @r   rY  rY  p  s   ø„ ð
 ÷ 
ñ 
r   rY  c            	       ó  ‡ — e Zd Z	 	 ddedededz  defˆ fd„Zedefd„«       Zd	„ Z	d
„ Z
d„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zd„ Zdeej.                  j0                  dz  eej.                  j0                  dz  f   fd„Zˆ xZS )r  NrB  rŒ   r  Úmake_immutablec                 óL   •— |d u}t         ‰| �  |||«       || _        || _        y rY   )r-  rO   r  r]  )rN   rB  rŒ   r  r]  Ú	read_onlyr.  s         €r   rO   zTransaction.__init__�  s/   ø€ ð  4Ð'ˆ	Ü‰Ñ˜˜{¨IÔ6ØˆŒØ,ˆÕr   r*   c                 ó6   — t        t        | j                  «      S rY   )r
   r?   Úmanagerre   s    r   rB  zTransaction.zone™  s   € ä”D˜$Ÿ,™,Ó'Ð'r   c                 ó    — | j                   �J ‚| j                  j                  }|€t        } || j                  | j
                  «      | _         y rY   )r  ra  rC   rJ  rB  rŒ   )rN   Úfactorys     r   r  zTransaction._setup_version�  sC   € Ø�|‰|Ð#Ð#Ð#Ø—,‘,×7Ñ7ˆØˆ?Ü%ˆGÙ˜tŸy™y¨$×*:Ñ*:Ó;ˆ�r   c                 óX   — | j                   €J ‚| j                   j                  |||«      S rY   )r  r‡   )rN   r'   r~   r   s       r   Ú_get_rdatasetzTransaction._get_rdataset¤  s+   € Ø�|‰|Ð'Ð'Ð'Ø�|‰|×(Ñ(¨¨v°vÓ>Ð>r   c                 ó”   — | j                   rJ ‚| j                  €J ‚t        t        | j                  «      }|j	                  ||«       y rY   )r_  r  r
   rJ  rV  )rN   r'   r†   r  s       r   Ú_put_rdatasetzTransaction._put_rdataset¨  s?   € Ø—>’>Ð!Ð!Ø�|‰|Ð'Ð'Ð'Ü”¨¯©Ó5ˆØ×Ñ˜T 8Õ,r   c                 ó’   — | j                   rJ ‚| j                  €J ‚t        t        | j                  «      }|j	                  |«       y rY   )r_  r  r
   rJ  r}   )rN   r'   r  s      r   Ú_delete_namezTransaction._delete_name®  s=   € Ø—>’>Ð!Ð!Ø�|‰|Ð'Ð'Ð'Ü”¨¯©Ó5ˆØ×Ñ˜DÕ!r   c                 ó–   — | j                   rJ ‚| j                  €J ‚t        t        | j                  «      }|j	                  |||«       y rY   )r_  r  r
   rJ  r‰   )rN   r'   r~   r   r  s        r   Ú_delete_rdatasetzTransaction._delete_rdataset´  sA   € Ø—>’>Ð!Ð!Ø�|‰|Ð'Ð'Ð'Ü”¨¯©Ó5ˆØ×Ñ  f¨fÕ5r   c                 óX   — | j                   €J ‚| j                   j                  |«      d uS rY   ©r  r{   rW   s     r   Ú_name_existszTransaction._name_existsº  s,   € Ø�|‰|Ð'Ð'Ð'Ø�|‰|×$Ñ$ TÓ*°$Ð6Ð6r   c                 ó   — | j                   ry| j                  €J ‚t        t        | j                  «      }t	        |j
                  «      dkD  xs0 | j                  xr" t	        | j                  j                  «      dkD  S )NFr   )	r_  r  r
   rJ  rŠ   rL  rŒ   rB  rF   )rN   r  s     r   Ú_changedzTransaction._changed¾  sg   € Ø�>Š>Øà—<‘<Ð+Ð+Ð+Üœ?¨D¯L©LÓ9ˆGÜ�w—‘Ó'¨!Ñ+ò Ø× Ñ Ò=¤S¨¯©¯©Ó%9¸AÑ%=ðr   c                 óÜ  — | j                   €J ‚| j                  €J ‚| j                  r| j                   j                  | «       y |r‹| j	                  «       r{| j
                  r1| j                  j                  }|€t        } || j                  «      }n| j                  }| j                   j                  | || j                  j                  «       y | j                   j                  | «       y rY   )rB  r  r_  r  rp  r]  ra  rD   rY  r  r(   r  )rN   Úcommitrc  r  s       r   Ú_end_transactionzTransaction._end_transactionÈ  s¶   € Ø�y‰yÐ$Ð$Ð$Ø�|‰|Ð'Ð'Ð'Ø�>Š>Ø�I‰I×Ñ Õ%Ù˜Ÿ™œØ×"Ò"ØŸ,™,×@Ñ@�Ø�?Ü.�GÙ! $§,¡,Ó/‘àŸ,™,�Ø�I‰I×%Ñ%Ø�g˜tŸ|™|×2Ñ2õð �I‰I× Ñ  Õ&r   c                 óp   — | j                   €J ‚| j                   j                  €|| j                   _        y y rY   )r  r(   )rN   r(   s     r   Ú_set_originzTransaction._set_originÝ  s3   € Ø�|‰|Ð'Ð'Ð'Ø�<‰<×ÑÐ&Ø"(ˆD�L‰LÕð 'r   c              #   ó†   K  — | j                   €J ‚| j                   j                  «       D ]  \  }}|D ]  }||f–— Œ
 Œ y ­wrY   )r  rn   )rN   r'   rx   r†   s       r   Ú_iterate_rdatasetszTransaction._iterate_rdatasetsâ  sP   è ø€ Ø�|‰|Ð'Ð'Ð'ØŸ,™,×,Ñ,Ó.ò 	'‰JˆD�$Ø ò '�Ø˜XÐ&Ó&ñ'ñ	'ùs   ‚?Ac                 óR   — | j                   €J ‚| j                   j                  «       S rY   )r  rh   re   s    r   Ú_iterate_nameszTransaction._iterate_namesè  s%   € Ø�|‰|Ð'Ð'Ð'Ø�|‰|× Ñ Ó"Ð"r   c                 óT   — | j                   €J ‚| j                   j                  |«      S rY   rm  rW   s     r   Ú	_get_nodezTransaction._get_nodeì  s'   € Ø�|‰|Ð'Ð'Ð'Ø�|‰|×$Ñ$ TÓ*Ð*r   c                 óþ   — | j                   €J ‚| j                  j                  «       \  }}}|€K| j                   j                  �5| j                   j                  }|rt        j
                  j                  }n|}|||fS rY   )r  ra  r  r(   r0   r'   rÙ   )rN   Úabsoluter)   r
  s       r   Ú_origin_informationzTransaction._origin_informationð  su   € ð �|‰|Ð'Ð'Ð'Ø*.¯,©,×*IÑ*IÓ*KÑ'ˆ�*˜iØÐ §¡× 3Ñ 3Ð ?ð —|‘|×*Ñ*ˆHÙÜŸH™HŸN™N‘	à$�	Ø˜* iÐ0Ð0r   )NF)r   r   r   r?   r;   rB   rO   ÚpropertyrB  r  re  rg  ri  rk  rn  rp  rs  ru  rw  ry  r{  r"  r0   r'   rJ   r~  r/  r0  s   @r   r  r  Œ  sÄ   ø„ ð
 #'Ø$ñ
-àð
-ð ð
-ð ˜4‘ð	
-ð
 õ
-ð ð(�dò (ó ð(ò<ò?ò-ò"ò6ò7òò'ò*)ò
'ò#ò+ð1à	ˆs�x‰x�}‰}˜tÑ# T¨3¯8©8¯=©=¸4Ñ+?Ð?Ñ	@÷1r   r  FÚtextrE   Úzone_factoryÚfilenameÚallow_includerÜ   rµ   Úallow_directivesÚtransaction_setupÚrfc2308_ttlc           	      óÊ  — |€d} ||||¬«      }|j                  d«      5 }|
� |
|«       t        j                  j                  | ||¬«      }t        j                  j                  |||||	|¬«      }	 |j                  «        |j                  |_        	 d d d «       |r|j                  «        |S # t        j                  j                  $ r t        ‚w xY w# 1 sw Y   ŒDxY w)Nz<string>©r)   T)rµ   )rƒ  r„  r†  )
r  r0   Ú	tokenizerÚ	TokenizerÚzonefileÚReaderÚreadrM   r   rÜ   )r€  r(   rE   r)   r�  r‚  rƒ  rÜ   rµ   r„  r…  r†  rB  rÝ   Útokr  s                   r   Ú
_from_textr�     sä   € ð* ÐØˆÙ˜ °JÔ?€DØ	�‰�TÓ	ð  ˜cØÐ(Ù˜cÔ"Ü�m‰m×%Ñ% d¨HÀÐ%ÓLˆÜ—‘×$Ñ$ØØØØ'Ø-Ø#ð %ó 
ˆð	 Ø�K‰KŒMØŸ;™;ˆD�L÷ ñ& Ø×ÑÔØ€Køô �|‰|×)Ñ)ò 	 äÐð	 ú÷ ð  ús   ¡ACÁ4!B2Â2$CÃCÃC"c                 ó.   — t        | |||||||||	|
|«      S )ah  Build a zone object from a zone file format string.

    :param str text: The zone file format input.
    :param origin: The origin of the zone.  If not specified, the first
        ``$ORIGIN`` statement in the zone file will determine the origin.
    :type origin: :py:class:`dns.name.Name`, str, or ``None``
    :param rdclass: The zone's rdata class; the default is class IN.
    :type rdclass: :py:class:`dns.rdataclass.RdataClass`
    :param bool relativize: Whether domain names are relativized to the
        zone's origin.  The default is ``True``.
    :param zone_factory: The zone factory to use.  If ``None``, then
        :py:class:`dns.zone.Zone` will be used.  The value may be any class
        or callable that returns a subclass of :py:class:`dns.zone.Zone`.
    :param filename: The filename to emit when describing where an error
        occurred; the default is ``'<string>'``.
    :type filename: str or ``None``
    :param bool allow_include: If ``True`` (the default), then ``$INCLUDE``
        directives are permitted.  If ``False``, then encountering a
        ``$INCLUDE`` will raise a :py:exc:`SyntaxError`.
    :param bool check_origin: If ``True`` (the default), then sanity checks
        of the origin node will be made by calling
        :py:meth:`dns.zone.Zone.check_origin`.
    :param idna_codec: The IDNA encoder/decoder.  If ``None``, the default
        IDNA encoder/decoder is used.
    :type idna_codec: :py:class:`dns.name.IDNACodec` or ``None``
    :param allow_directives: If ``True`` (the default), directives are
        permitted and *allow_include* controls ``$INCLUDE``.  If ``False``
        or an empty iterable, no directive processing is done.  If a
        non-empty iterable, only the listed directives (including the ``$``)
        are allowed.
    :type allow_directives: bool or Iterable[str]
    :param transaction_setup: If not ``None``, it is called with the just-created
        transaction.  This lets the caller alter the transaction's configuration
        before it is used, for example adding checking policies.
    :type transaction_setup: ``None`` or ``Callable[[dns.transaction.Transaction], None]``.
    :param bool rfc2308_ttl: If ``True``, the default, then RFC 2308 section 4
        is followed and the SOA MINIMUM field is not treated as a source of the
        default TTL; a record with no TTL instead inherits the most recently
        stated TTL, per RFC 1035 section 5.1.  The SOA MINIMUM is still used as a
        last resort if no TTL has been stated at all.  If ``False``, then a master
        file with no ``$TTL`` directive gets its default TTL from the SOA MINIMUM
        field, which is the pre-RFC 2308 behavior.
    :raises dns.zone.NoSOA: if there is no SOA RRset.
    :raises dns.zone.NoNS: if there is no NS RRset.
    :raises KeyError: if there is no origin node.
    :returns: A subclass of :py:class:`dns.zone.Zone`.
    )r�  )r€  r(   rE   r)   r�  r‚  rƒ  rÜ   rµ   r„  r…  r†  s               r   rI   rI   0  s6   € ôz ØØØØØØØØØØØØóð r   rŸ   c                 óâ   — |€t         j                  j                  | «      }t         j                  j                  | d¬«      5 }t	        ||||||||||	|
|«      cddd«       S # 1 sw Y   nxY wJ ‚)aÁ  Read a zone file and build a zone object.

    :param f: A file object, a ``str`` filename, or an ``os.PathLike``.  If
        not a file object, it is treated as the name of a file to open.
    :param origin: The origin of the zone.  If not specified, the first
        ``$ORIGIN`` statement in the zone file will determine the origin.
    :type origin: :py:class:`dns.name.Name`, str, or ``None``
    :param rdclass: The zone's rdata class; the default is class IN.
    :type rdclass: :py:class:`dns.rdataclass.RdataClass`
    :param bool relativize: Whether domain names are relativized to the
        zone's origin.  The default is ``True``.
    :param zone_factory: The zone factory to use.  If ``None``, then
        :py:class:`dns.zone.Zone` will be used.  The value may be any class
        or callable that returns a subclass of :py:class:`dns.zone.Zone`.
    :param filename: The filename to emit when describing where an error
        occurred; the default is ``'<string>'``.
    :type filename: str or ``None``
    :param bool allow_include: If ``True`` (the default), then ``$INCLUDE``
        directives are permitted.  If ``False``, then encountering a
        ``$INCLUDE`` will raise a :py:exc:`SyntaxError`.
    :param bool check_origin: If ``True`` (the default), then sanity checks
        of the origin node will be made by calling
        :py:meth:`dns.zone.Zone.check_origin`.
    :param idna_codec: The IDNA encoder/decoder.  If ``None``, the default
        IDNA encoder/decoder is used.
    :type idna_codec: :py:class:`dns.name.IDNACodec` or ``None``
    :param allow_directives: If ``True`` (the default), directives are
        permitted and *allow_include* controls ``$INCLUDE``.  If ``False``
        or an empty iterable, no directive processing is done.  If a
        non-empty iterable, only the listed directives (including the ``$``)
        are allowed.
    :type allow_directives: bool or Iterable[str]
    :param transaction_setup: If not ``None``, it is called with the just-created
        transaction.  This lets the caller alter the transaction's configuration
        before it is used, for example adding checking policies.
    :type transaction_setup: ``None`` or ``Callable[[dns.transaction.Transaction], None]``.
    :param bool rfc2308_ttl: If ``True``, the default, then RFC 2308 section 4
        is followed and the SOA MINIMUM field is not treated as a source of the
        default TTL; a record with no TTL instead inherits the most recently
        stated TTL, per RFC 1035 section 5.1.  The SOA MINIMUM is still used as a
        last resort if no TTL has been stated at all.  If ``False``, then a master
        file with no ``$TTL`` directive gets its default TTL from the SOA MINIMUM
        field, which is the pre-RFC 2308 behavior.
    :raises dns.zone.NoSOA: if there is no SOA RRset.
    :raises dns.zone.NoNS: if there is no NS RRset.
    :raises KeyError: if there is no origin node.
    :returns: A subclass of :py:class:`dns.zone.Zone`.
    Nr¹   )r¸   )r0   r¿   Úas_filenamerÀ   r�  )rŸ   r(   rE   r)   r�  r‚  rƒ  rÜ   rµ   r„  r…  r†  Úfps                r   Ú	from_filer”  }  s€   € ð~ ÐÜ—>‘>×-Ñ-¨aÓ0ˆÜ	�‰×	"Ñ	" 1¨wÐ	"Ó	7ð 
¸2ÜØØØØØØØØØØØØó
÷
÷ 
ò 
úð ˆ5s   ÁA#Á#A,Úxfrc                 ó:  — d}| D �]ó  }|€L|r|j                   }n|j                  d   j                  }|j                  d   j                  } ||||¬«      }|j                  D �]’  }|j                   �–|j                  j	                  |j                   «      }	|	j                  |j                   «      sŒQ|j                  t        j                  j                  k(  r.|	|j                   k7  rt        j                  j                  d«      ‚|j                  |j                  k7  rt        j                  j                  d«      ‚|j                  j                  |j                  «      }
|
s)|j                  «       }
|
|j                  |j                  <   |
j                  |j                  |j                  |j                   d«      }|j#                  |j$                  «       |D ]  }|j'                  |«       Œ �Œ• �Œö |€t)        d«      ‚|r|j+                  «        |S )aÍ  Convert the output of a zone transfer generator into a zone object.

    :param xfr: A generator of :py:class:`dns.message.Message` objects,
        typically from :py:func:`dns.query.xfr`.
    :param zone_factory: The zone factory to use.  If ``None``, then
        :py:class:`dns.zone.Zone` will be used.
    :param bool relativize: Whether domain names are relativized to the
        zone's origin.  The default is ``True``.  It is essential that this
        setting matches the one specified to the generator.
    :param bool check_origin: If ``True`` (the default), then sanity checks
        of the origin node will be made by calling
        :py:meth:`dns.zone.Zone.check_origin`.
    :raises dns.zone.NoSOA: if there is no SOA RRset.
    :raises dns.zone.NoNS: if there is no NS RRset.
    :raises KeyError: if there is no origin node.
    :raises ValueError: if no messages are yielded by the generator.
    :returns: A subclass of :py:class:`dns.zone.Zone`.
    Nr   rˆ  znon-origin SOA in zone transferzwrong rdclass in zone transferTzempty transfer)r(   Úanswerr'   rE   r/   r.   r~   r0   r�   rÚ   Ú	exceptionÚ	FormErrorrF   rr   r@   r„   r   Ú
update_ttlrœ   rû   rK   rÜ   )r•  r�  r)   rÜ   ÚzÚrr(   rE   r�   r'   ÚznodeÚzrdsÚrds                r   Úfrom_xfrr   Ð  s¯  € ð2 	€AØó ˆØˆ9ÙØŸ™‘àŸ™ !™×)Ñ)�Ø—h‘h˜q‘k×)Ñ)ˆGÙ˜V W¸ÔDˆAØ—X‘Xó 	ˆEð �x‰xÐ#Ø—z‘z×.Ñ.¨q¯x©xÓ8�Ø×(Ñ(¨¯©Ô2àØ—<‘<¤3§=¡=×#4Ñ#4Ò4¸ÀÇÁÒ9IÜŸ-™-×1Ñ1Ð2SÓTÐTØ�}‰} §	¡	Ò)Ü—m‘m×-Ñ-Ð.NÓOÐOØ—G‘G—K‘K §
¡
Ó+ˆEÙØŸ™Ó(�Ø&+�—‘˜Ÿ
™
Ñ#Ø×&Ñ& u§}¡}°e·l±lÀEÇLÁLÐRVÓWˆDØ�O‰O˜EŸI™IÔ&Øò �Ø—‘˜•òò%	ðð8 	€yÜÐ)Ó*Ð*ÙØ	�‰ÔØ€Hr   )Jr   ÚdataclassesrÐ   rÂ   rì   Úcollections.abcr   r   r   r   Útypingr   r   r	   r
   Údns._file_utilr0   Údns.exceptionÚdns.immutableÚdns.nameÚdns.nodeÚ	dns.rdataÚdns.rdataclassÚdns.rdatasetÚdns.rdatatypeÚdns.rdtypes.ANY.SOAÚdns.rdtypes.ANY.ZONEMDÚ	dns.rrsetÚdns.tokenizerÚdns.transactionÚdns.zonefileÚdns.zonetypesr   r   r   r˜  ÚDNSExceptionr   r   r   r   r   r"   r$   r&   r'   rJ   r;   r3   Ú	dataclassrx   Ú	NodeStyler6   r'  ÚTransactionManagerr?   r  r)  r8  r2  rB   rJ  rY  r  r  r  r=   r  Ú	IDNACodecr�  rI   r%  r”  r   r   r   r   ú<module>r¹     s‚  ðñ$ ã Û 	Û 	Û ß HÓ Hß .Ó .ã Û Û Û Û Û Û Û Û Û Û Û Û Û Û ß LÑ Lô%ˆc�m‰m×(Ñ(ô %ô4ˆGô 4ô6ˆ7ô 6ô,�Gô ,ô3˜cŸm™m×8Ñ8ô 3ô3 S§]¡]×%?Ñ%?ô 3ô:ˆs�}‰}×)Ñ)ô :ô. §¡× :Ñ :ô .ðØ
�(‰(�-‰-ðà�H‰H�M‰M˜DÑ ðð ðð 	‡X�X‡]�]ó	ð@ €×Ñ˜dÔ#ô(�—‘×"Ñ"ó (ó $ð(ô>tˆ3�?‰?×-Ñ-ô tô~�C—H‘H—M‘Mô ð ‡�×Ñô*˜]ó *ó ð*÷Z&"ñ &"ôRA!�gô A!ðH ‡�×Ñô
�wó 
ó ð
ô6q1�#—/‘/×-Ñ-ô q1ðl *.Ø),¯©×):Ñ):ØØØØØØ,0Ø-1ØNRØñ-Ø
ð-à�H‰H�M‰M˜CÑ $Ñ&ð-ð �^‰^×&Ñ&ð-ð ð	-ð
 ð-ð �D‰jð-ð ð-ð ð-ð —‘×"Ñ" TÑ)ð-ð ˜X c™]Ñ*ð-ð   §¡×!<Ñ!<Ð =¸tÐ CÑDÀtÑKð-ð ð-ð 
ó-ðd *.Ø),¯©×):Ñ):ØØØØØØ,0Ø-1ØNRØñJØ
ðJà�H‰H�M‰M˜CÑ $Ñ&ðJð �^‰^×&Ñ&ðJð ð	Jð
 ðJð �D‰jðJð ðJð ðJð —‘×"Ñ" TÑ)ðJð ˜X c™]Ñ*ðJð   §¡×!<Ñ!<Ð =¸tÐ CÑDÀtÑKðJð ðJð 
óJð^ *.Ø),¯©×):Ñ):ØØØØØØ,0Ø-1ØNRØñPØ
ˆR�[‰[Ñ˜6Ñ!ðPà�H‰H�M‰M˜CÑ $Ñ&ðPð �^‰^×&Ñ&ðPð ð	Pð
 ðPð �D‰jðPð ðPð ðPð —‘×"Ñ" TÑ)ðPð ˜X c™]Ñ*ðPð   §¡×!<Ñ!<Ð =¸tÐ CÑDÀtÑKðPð ðPð 
óPðj ØØñ	:Ø	ð:àð:ð ð:ð ð	:ð
 
ô:r   