Ë
    ™2Úi&™  ã            	       ó–  — d Z ddlZddlZddlZddlmZmZmZmZm	Z	m
Z
mZmZmZ ddlmZ ddlmZ eeef   Z ede¬«      Zeeegef   Zd	ed
efd„Z G d„ de«      Z G d„ dej4                  ¬«      Z G d„ de«      Z ej:                  d«      Zd	ed
ee   fd„Zded
efd„Z dee   dee   d
eee   ee   f   fd„Z! G d„ de«      Z"y)zŠ
.. testsetup::

    from packaging.specifiers import Specifier, SpecifierSet, InvalidSpecifier
    from packaging.version import Version
é    N)	ÚCallableÚIterableÚIteratorÚListÚOptionalÚSetÚTupleÚTypeVarÚUnioné   )Úcanonicalize_version)ÚVersionÚUnparsedVersionVar)ÚboundÚversionÚreturnc                 ó<   — t        | t        «      st        | «      } | S ©N)Ú
isinstancer   )r   s    úK/var/www/html/acx/venv/lib/python3.12/site-packages/packaging/specifiers.pyÚ_coerce_versionr   "   s   € Ü�gœwÔ'Ü˜'Ó"ˆØ€Nó    c                   ó   — e Zd ZdZy)ÚInvalidSpecifiera  
    Raised when attempting to create a :class:`Specifier` with a specifier
    string that is invalid.

    >>> Specifier("lolwat")
    Traceback (most recent call last):
        ...
    packaging.specifiers.InvalidSpecifier: Invalid specifier: 'lolwat'
    N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   r   r   (   s   „ òr   r   c            	       óx  — e Zd Zej                  defd„«       Zej                  defd„«       Zej                  de	de
fd„«       Zeej                  dee
   fd„«       «       Zej                  de
ddfd	„«       Zej                  dd
edee
   de
fd„«       Zej                  	 ddee   dee
   dee   fd„«       Zy)ÚBaseSpecifierr   c                  ó   — y)zŽ
        Returns the str representation of this Specifier-like object. This
        should be representative of the Specifier itself.
        Nr   ©Úselfs    r   Ú__str__zBaseSpecifier.__str__5   ó   � r   c                  ó   — y)zF
        Returns a hash value for this Specifier-like object.
        Nr   r#   s    r   Ú__hash__zBaseSpecifier.__hash__<   r&   r   Úotherc                  ó   — y)z«
        Returns a boolean representing whether or not the two Specifier-like
        objects are equal.

        :param other: The other object to check against.
        Nr   ©r$   r)   s     r   Ú__eq__zBaseSpecifier.__eq__B   r&   r   c                  ó   — y)zîWhether or not pre-releases as a whole are allowed.

        This can be set to either ``True`` or ``False`` to explicitly enable or disable
        prereleases or it can be set to ``None`` (the default) to use default semantics.
        Nr   r#   s    r   ÚprereleaseszBaseSpecifier.prereleasesK   r&   r   ÚvalueNc                  ó   — y)zQSetter for :attr:`prereleases`.

        :param value: The value to set.
        Nr   ©r$   r/   s     r   r.   zBaseSpecifier.prereleasesT   r&   r   Úitemr.   c                  ó   — y)zR
        Determines if the given item is contained within this specifier.
        Nr   )r$   r2   r.   s      r   ÚcontainszBaseSpecifier.contains[   r&   r   Úiterablec                  ó   — y)z•
        Takes an iterable of items and filters them so that only items which
        are contained within this specifier are allowed in it.
        Nr   )r$   r5   r.   s      r   ÚfilterzBaseSpecifier.filtera   r&   r   r   )r   r   r   ÚabcÚabstractmethodÚstrr%   Úintr(   ÚobjectÚboolr,   Úpropertyr   r.   Úsetterr4   r   r   r   r7   r   r   r   r!   r!   4   s7  „ Ø×Ñð˜ò ó ðð 	×Ñð˜#ò ó ðð
 	×Ñð˜Fð  tò ó ðð Ø×Ñð˜X d™^ò ó ó ðð ×Ñð ð ¨$ò ó ðð 	×Ññ˜Sð ¨x¸©~ð Èò ó ðð
 	×ÑàTXñØ Ð!3Ñ4ðØCKÈDÁ>ðà	Ð$Ñ	%òó ñr   r!   )Ú	metaclassc            	       ó†  — e Zd ZdZdZdZ ej                  dez   ez   dz   ej                  ej                  z  «      Z
dddd	d
ddddœZd0dedee   ddfd„Zedefd„«       Zej$                  deddfd„«       Zedefd„«       Zedefd„«       Zdefd„Zdefd„Zedeeef   fd„«       Zdefd„Zdedefd„Zdedefd „Zd!ededefd"„Z d!ededefd#„Z!d!ededefd$„Z"d!ededefd%„Z#d!ededefd&„Z$d!ed'edefd(„Z%d!ed'edefd)„Z&d!ededefd*„Z'd+e(eef   defd,„Z)	 d1d+e*dee   defd-„Z+	 d1d.e,e-   dee   de.e-   fd/„Z/y)2Ú	Specifiera?  This class abstracts handling of version specifiers.

    .. tip::

        It is generally not required to instantiate this manually. You should instead
        prefer to work with :class:`SpecifierSet` instead, which can parse
        comma-separated version specifiers (which is what package metadata contains).
    z8
        (?P<operator>(~=|==|!=|<=|>=|<|>|===))
        aÈ  
        (?P<version>
            (?:
                # The identity operators allow for an escape hatch that will
                # do an exact string match of the version you wish to install.
                # This will not be parsed by PEP 440 and we cannot determine
                # any semantic meaning from it. This operator is discouraged
                # but included entirely as an escape hatch.
                (?<====)  # Only match for the identity operator
                \s*
                [^\s;)]*  # The arbitrary version can be just about anything,
                          # we match everything except for whitespace, a
                          # semi-colon for marker support, and a closing paren
                          # since versions can be enclosed in them.
            )
            |
            (?:
                # The (non)equality operators allow for wild card and local
                # versions to be specified so we have to define these two
                # operators separately to enable that.
                (?<===|!=)            # Only match for equals and not equals

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release

                # You cannot use a wild card and a pre-release, post-release, a dev or
                # local version together so group them with a | and make them optional.
                (?:
                    \.\*  # Wild card syntax of .*
                    |
                    (?:                                  # pre release
                        [-_\.]?
                        (alpha|beta|preview|pre|a|b|c|rc)
                        [-_\.]?
                        [0-9]*
                    )?
                    (?:                                  # post release
                        (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                    )?
                    (?:[-_\.]?dev[-_\.]?[0-9]*)?         # dev release
                    (?:\+[a-z0-9]+(?:[-_\.][a-z0-9]+)*)? # local
                )?
            )
            |
            (?:
                # The compatible operator requires at least two digits in the
                # release segment.
                (?<=~=)               # Only match for the compatible operator

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)+   # release  (We have a + instead of a *)
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
            |
            (?:
                # All other operators only allow a sub set of what the
                # (non)equality operators do. Specifically they do not allow
                # local versions to be specified nor do they allow the prefix
                # matching wild cards.
                (?<!==|!=|~=)         # We have special cases for these
                                      # operators so we want to make sure they
                                      # don't match here.

                \s*
                v?
                (?:[0-9]+!)?          # epoch
                [0-9]+(?:\.[0-9]+)*   # release
                (?:                   # pre release
                    [-_\.]?
                    (alpha|beta|preview|pre|a|b|c|rc)
                    [-_\.]?
                    [0-9]*
                )?
                (?:                                   # post release
                    (?:-[0-9]+)|(?:[-_\.]?(post|rev|r)[-_\.]?[0-9]*)
                )?
                (?:[-_\.]?dev[-_\.]?[0-9]*)?          # dev release
            )
        )
        z^\s*z\s*$Ú
compatibleÚequalÚ	not_equalÚless_than_equalÚgreater_than_equalÚ	less_thanÚgreater_thanÚ	arbitrary)ú~=ú==z!=ú<=ú>=ú<ú>ú===NÚspecr.   r   c                 óð   — | j                   j                  |«      }|st        d|› d�«      ‚|j                  d«      j	                  «       |j                  d«      j	                  «       f| _        || _        y)að  Initialize a Specifier instance.

        :param spec:
            The string representation of a specifier which will be parsed and
            normalized before use.
        :param prereleases:
            This tells the specifier if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.
        :raises InvalidSpecifier:
            If the given specifier is invalid (i.e. bad syntax).
        zInvalid specifier: 'ú'Úoperatorr   N)Ú_regexÚsearchr   ÚgroupÚstripÚ_specÚ_prereleases)r$   rR   r.   Úmatchs       r   Ú__init__zSpecifier.__init__æ   so   € ð —‘×"Ñ" 4Ó(ˆÙÜ"Ð%9¸$¸¸qÐ#AÓBÐBð �K‰K˜
Ó#×)Ñ)Ó+Ø�K‰K˜	Ó"×(Ñ(Ó*ð'
ˆŒ
ð (ˆÕr   c                 ó¼   — | j                   �| j                   S | j                  \  }}|dv r1|dk(  r|j                  d«      r|d d }t        |«      j                  ryy)N)rL   rN   rM   rK   rQ   rL   ú.*éþÿÿÿTF)r[   rZ   Úendswithr   Úis_prerelease)r$   rU   r   s      r   r.   zSpecifier.prereleases   sm   € ð ×ÑÐ(Ø×$Ñ$Ð$ð
 !ŸJ™JÑˆ�'ØÐ6Ñ6ð ˜4Ò G×$4Ñ$4°TÔ$:Ø! # 2˜,�ô �wÓ×-Ò-Øàr   r/   c                 ó   — || _         y r   ©r[   r1   s     r   r.   zSpecifier.prereleases  ó
   € à!ˆÕr   c                 ó    — | j                   d   S )z`The operator of this specifier.

        >>> Specifier("==1.2.3").operator
        '=='
        r   ©rZ   r#   s    r   rU   zSpecifier.operator  ó   € ð �z‰z˜!‰}Ðr   c                 ó    — | j                   d   S )zaThe version of this specifier.

        >>> Specifier("==1.2.3").version
        '1.2.3'
        r   rg   r#   s    r   r   zSpecifier.version%  rh   r   c                 óŒ   — | j                   �d| j                  ›�nd}d| j                  j                  › dt	        | «      ›|› d�S )aT  A representation of the Specifier that shows all internal state.

        >>> Specifier('>=1.0.0')
        <Specifier('>=1.0.0')>
        >>> Specifier('>=1.0.0', prereleases=False)
        <Specifier('>=1.0.0', prereleases=False)>
        >>> Specifier('>=1.0.0', prereleases=True)
        <Specifier('>=1.0.0', prereleases=True)>
        ú, prereleases=Ú rO   ú(ú)>)r[   r.   Ú	__class__r   r:   ©r$   Úpres     r   Ú__repr__zSpecifier.__repr__.  sU   € ð × Ñ Ð,ð ˜T×-Ñ-Ð0Ñ1àð 	ð �4—>‘>×*Ñ*Ð+¨1¬S°«Y¨M¸#¸¸bÐAÐAr   c                 ó4   —  dj                   | j                  Ž S )zÐA string representation of the Specifier that can be round-tripped.

        >>> str(Specifier('>=1.0.0'))
        '>=1.0.0'
        >>> str(Specifier('>=1.0.0', prereleases=False))
        '>=1.0.0'
        z{}{})ÚformatrZ   r#   s    r   r%   zSpecifier.__str__@  s   € ð ˆv�}‰}˜dŸj™jÐ)Ð)r   c                 óx   — t        | j                  d   | j                  d   dk7  ¬«      }| j                  d   |fS )Nr   r   rK   ©Ústrip_trailing_zero)r   rZ   )r$   Úcanonical_versions     r   Ú_canonical_speczSpecifier._canonical_specJ  s>   € ä0Ø�J‰J�q‰MØ!%§¡¨A¡°$Ñ!6ô
Ðð �z‰z˜!‰}Ð/Ð/Ð/r   c                 ó,   — t        | j                  «      S r   )Úhashry   r#   s    r   r(   zSpecifier.__hash__R  s   € Ü�D×(Ñ(Ó)Ð)r   r)   c                 óî   — t        |t        «      r	 | j                  t        |«      «      }nt        || j                  «      st        S | j
                  |j
                  k(  S # t        $ r	 t        cY S w xY w)a>  Whether or not the two Specifier-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> Specifier("==1.2.3") == Specifier("== 1.2.3.0")
        True
        >>> (Specifier("==1.2.3", prereleases=False) ==
        ...  Specifier("==1.2.3", prereleases=True))
        True
        >>> Specifier("==1.2.3") == "==1.2.3"
        True
        >>> Specifier("==1.2.3") == Specifier("==1.2.4")
        False
        >>> Specifier("==1.2.3") == Specifier("~=1.2.3")
        False
        )r   r:   ro   r   ÚNotImplementedry   r+   s     r   r,   zSpecifier.__eq__U  si   € ô& �eœSÔ!ð&ØŸ™¤s¨5£zÓ2‘ô ˜E 4§>¡>Ô2Ü!Ð!à×#Ñ# u×'<Ñ'<Ñ<Ð<øô $ò &Ü%Ò%ð&ús   ’A" Á"A4Á3A4Úopc                 ó>   — t        | d| j                  |   › �«      }|S )NÚ	_compare_)ÚgetattrÚ
_operators)r$   r~   Úoperator_callables      r   Ú_get_operatorzSpecifier._get_operatorr  s+   € Ü.5Ø�I˜dŸo™o¨bÑ1Ð2Ð3ó/
Ðð !Ð r   Úprospectivec           
      óì   — dj                  t        t        j                  t        t        |«      «      «      d d «      }|dz  } | j                  d«      ||«      xr  | j                  d«      ||«      S )Nú.éÿÿÿÿr_   rN   rL   )ÚjoinÚlistÚ	itertoolsÚ	takewhileÚ_is_not_suffixÚ_version_splitr„   )r$   r…   rR   Úprefixs       r   Ú_compare_compatiblezSpecifier._compare_compatiblex  s{   € ð —‘Ü”×$Ñ$¤^´^ÀDÓ5IÓJÓKÈCÈRÐPó
ˆð
 	�$‰ˆà'ˆt×!Ñ! $Ó'¨°TÓ:ò 
Ð?W¸t×?QÑ?QÐRVÓ?WØ˜ó@
ð 	
r   c                 óD  — |j                  d«      r_t        |j                  d¬«      }t        |d d d¬«      }t        |«      }t        |«      }t	        ||«      \  }}|d t        |«       }	|	|k(  S t        |«      }
|
j                  st        |j                  «      }||
k(  S )Nr_   Frv   r`   )ra   r   ÚpublicrŽ   Ú_pad_versionÚlenr   Úlocal)r$   r…   rR   Únormalized_prospectiveÚnormalized_specÚ
split_specÚsplit_prospectiveÚpadded_prospectiveÚ_Úshortened_prospectiveÚspec_versions              r   Ú_compare_equalzSpecifier._compare_equal�  sº   € ð �=‰=˜Ôä%9Ø×"Ñ"¸ô&Ð"ô 3°4¸¸°9ÐRWÔXˆOô (¨Ó8ˆJô
 !/Ð/EÓ FÐô %1Ð1BÀJÓ$OÑ!Ð ð
 %7Ð7H¼¸Z»Ð$IÐ!à(¨JÑ6Ð6ô # 4›=ˆLð
  ×%Ò%Ü% k×&8Ñ&8Ó9�à ,Ñ.Ð.r   c                 ó(   — | j                  ||«       S r   )rž   ©r$   r…   rR   s      r   Ú_compare_not_equalzSpecifier._compare_not_equal¶  s   € Ø×&Ñ& {°DÓ9Ð9Ð9r   c                 óD   — t        |j                  «      t        |«      k  S r   ©r   r’   r    s      r   Ú_compare_less_than_equalz"Specifier._compare_less_than_equal¹  ó   € ô
 �{×)Ñ)Ó*¬g°d«mÑ;Ð;r   c                 óD   — t        |j                  «      t        |«      k\  S r   r£   r    s      r   Ú_compare_greater_than_equalz%Specifier._compare_greater_than_equalÀ  r¥   r   Úspec_strc                 ó®   — t        |«      }||k  sy|j                  s8|j                  r,t        |j                  «      t        |j                  «      k(  ryy©NFT)r   rb   Úbase_version©r$   r…   r¨   rR   s       r   Ú_compare_less_thanzSpecifier._compare_less_thanÇ  sT   € ô �xÓ ˆð
 ˜TÒ!Øð ×!Ò! k×&?Ò&?Ü�{×/Ñ/Ó0´G¸D×<MÑ<MÓ4NÒNØð
 r   c                 ó  — t        |«      }||kD  sy|j                  s8|j                  r,t        |j                  «      t        |j                  «      k(  ry|j                  �,t        |j                  «      t        |j                  «      k(  ryyrª   )r   Úis_postreleaser«   r•   r¬   s       r   Ú_compare_greater_thanzSpecifier._compare_greater_thanà  sƒ   € ô �xÓ ˆð
 ˜TÒ!Øð ×"Ò" {×'AÒ'AÜ�{×/Ñ/Ó0´G¸D×<MÑ<MÓ4NÒNØð ×ÑÐ(Ü�{×/Ñ/Ó0´G¸D×<MÑ<MÓ4NÒNØð
 r   c                 óh   — t        |«      j                  «       t        |«      j                  «       k(  S r   )r:   Úlowerr    s      r   Ú_compare_arbitraryzSpecifier._compare_arbitraryÿ  s&   € Ü�;Ó×%Ñ%Ó'¬3¨t«9¯?©?Ó+<Ñ<Ð<r   r2   c                 ó$   — | j                  |«      S )a;  Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in Specifier(">=1.2.3")
        True
        >>> Version("1.2.3") in Specifier(">=1.2.3")
        True
        >>> "1.0.0" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3")
        False
        >>> "1.3.0a1" in Specifier(">=1.2.3", prereleases=True)
        True
        ©r4   ©r$   r2   s     r   Ú__contains__zSpecifier.__contains__  ó   € ð& �}‰}˜TÓ"Ð"r   c                 ó®   — |€| j                   }t        |«      }|j                  r|sy| j                  | j                  «      } ||| j
                  «      S )al  Return whether or not the item is contained in this specifier.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this Specifier. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> Specifier(">=1.2.3").contains("1.2.3")
        True
        >>> Specifier(">=1.2.3").contains(Version("1.2.3"))
        True
        >>> Specifier(">=1.2.3").contains("1.0.0")
        False
        >>> Specifier(">=1.2.3").contains("1.3.0a1")
        False
        >>> Specifier(">=1.2.3", prereleases=True).contains("1.3.0a1")
        True
        >>> Specifier(">=1.2.3").contains("1.3.0a1", prereleases=True)
        True
        F)r.   r   rb   r„   rU   r   )r$   r2   r.   Únormalized_itemrƒ   s        r   r4   zSpecifier.contains  sY   € ð8 ÐØ×*Ñ*ˆKô *¨$Ó/ˆð
 ×(Ò(±Øð /3×.@Ñ.@ÀÇÁÓ.OÐÙ  °$·,±,Ó?Ð?r   r5   c              #   óö   K  — d}g }d|�|ndi}|D ]S  }t        |«      } | j                  |fi |¤ŽsŒ"|j                  r |s| j                  s|j	                  |«       ŒNd}|–— ŒU |s|r|D ]  }|–— Œ yyy­w)aO  Filter items in the given iterable, that match the specifier.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(Specifier().contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.2.3", "1.3", Version("1.4")]))
        ['1.2.3', '1.3', <Version('1.4')>]
        >>> list(Specifier(">=1.2.3").filter(["1.2", "1.5a1"]))
        ['1.5a1']
        >>> list(Specifier(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(Specifier(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        Fr.   NT)r   r4   rb   r.   Úappend)r$   r5   r.   ÚyieldedÚfound_prereleasesÚkwr   Úparsed_versions           r   r7   zSpecifier.filterE  s¥   è ø€ ð< ˆØÐà¨KÐ,C™[ÈÐNˆð  ò 	"ˆGÜ,¨WÓ5ˆNàˆt�}‰}˜^Ñ2¨rÓ2ð "×/Ò/Ù 4×#3Ò#3à%×,Ñ,¨WÕ5ð #�GØ!“Mð	"ñ( Ñ,Ø,ò �Ø“ñð -ˆwùs   ‚0A9³AA9©rl   Nr   )0r   r   r   r   Ú_operator_regex_strÚ_version_regex_strÚreÚcompileÚVERBOSEÚ
IGNORECASErV   r‚   r:   r   r=   r]   r>   r.   r?   rU   r   rr   r%   r	   ry   r;   r(   r<   r,   ÚCallableOperatorr„   r   r�   rž   r¡   r¤   r§   r­   r°   r³   r   r·   ÚUnparsedVersionr4   r   r   r   r7   r   r   r   rB   rB   k   sÅ  „ ñðÐð\Ðð| ˆR�Z‰ZØÐ%Ñ%Ð(:Ñ:¸WÑDØ
�
‰
�R—]‘]Ñ"ó€Fð ØØØØ"ØØØñ	€Jñ(˜Sð (°H¸T±Nð (Èdó (ð4 ð˜Tò ó ðð. ×Ñð" ð "¨$ò "ó ð"ð ð˜#ò ó ðð ð˜ò ó ððB˜#ó Bð$*˜ó *ð ð0  s¨C x¡ò 0ó ð0ð*˜#ó *ð=˜Fð = tó =ð:! ð !Ð(8ó !ð
¨wð 
¸cð 
Àdó 
ð*'/¨'ð '/¸ð '/Àó '/ðR:¨gð :¸Sð :ÀTó :ð<°Gð <À3ð <È4ó <ð<°wð <Àcð <Èdó <ð¨gð Àð Èó ð2°ð ÀCð ÈDó ð>=¨gð =¸Sð =ÀTó =ð#  s¨G |Ñ!4ð #¸ó #ð, DHñ,@Ø#ð,@Ø2:¸4±.ð,@à	ó,@ð^ UYñ;Ø Ð!3Ñ4ð;ØCKÈDÁ>ð;à	Ð$Ñ	%ô;r   rB   z^([0-9]+)((?:a|b|c|rc)[0-9]+)$c                 óÆ   — g }| j                  d«      D ]J  }t        j                  |«      }|r |j                  |j	                  «       «       Œ:|j                  |«       ŒL |S )Nr‡   )ÚsplitÚ_prefix_regexrW   ÚextendÚgroupsr¼   )r   Úresultr2   r\   s       r   rŽ   rŽ   †  sW   € Ø€FØ—‘˜cÓ"ò  ˆÜ×$Ñ$ TÓ*ˆÙØ�M‰M˜%Ÿ,™,›.Õ)à�M‰M˜$Õð ð €Mr   Úsegmentc                 ó.   ‡ — t        ˆ fd„dD «       «       S )Nc              3   ó@   •K  — | ]  }‰j                  |«      –— Œ y ­wr   )Ú
startswith)Ú.0r�   rÐ   s     €r   ú	<genexpr>z!_is_not_suffix.<locals>.<genexpr>’  s!   øè ø€ ò Ø'-ˆ×Ñ˜6×"ñùs   ƒ)ÚdevÚaÚbÚrcÚpost)Úany)rÐ   s   `r   r�   r�   ‘  s"   ø€ Üó Ø1Pôó ð ð r   ÚleftÚrightc                 óž  — g g }}|j                  t        t        j                  d„ | «      «      «       |j                  t        t        j                  d„ |«      «      «       |j                  | t	        |d   «      d  «       |j                  |t	        |d   «      d  «       |j                  ddgt        dt	        |d   «      t	        |d   «      z
  «      z  «       |j                  ddgt        dt	        |d   «      t	        |d   «      z
  «      z  «       t        t        j                  |Ž «      t        t        j                  |Ž «      fS )Nc                 ó"   — | j                  «       S r   ©Úisdigit©Úxs    r   ú<lambda>z_pad_version.<locals>.<lambda>›  s   € ¸¿¹»€ r   c                 ó"   — | j                  «       S r   rà   râ   s    r   rä   z_pad_version.<locals>.<lambda>œ  s   € ¸!¿)¹)»+€ r   r   r   Ú0)r¼   rŠ   r‹   rŒ   r”   ÚinsertÚmaxÚchain)rÜ   rÝ   Ú
left_splitÚright_splits       r   r“   r“   —  s"  € Ø  "�€Jð ×Ñ”dœ9×.Ñ.Ñ/DÀdÓKÓLÔMØ×Ñ”tœI×/Ñ/Ñ0EÀuÓMÓNÔOð ×Ñ�dœ3˜z¨!™}Ó-Ð/Ð0Ô1Ø×Ñ�uœS ¨Q¡Ó0Ð2Ð3Ô4ð ×Ñ�a˜#˜¤ Q¬¨K¸©NÓ(;¼cÀ*ÈQÁ-Ó>PÑ(PÓ!QÑQÔRØ×Ñ�q˜3˜%¤# a¬¨Z¸©]Ó);¼cÀ+ÈaÁ.Ó>QÑ)QÓ"RÑRÔSä”—‘ *Ð-Ó.´´Y·_±_ÀkÐ5RÓ0SÐTÐTr   c            	       óH  — e Zd ZdZ	 ddedee   ddfd„Zedee   fd„«       Z	e	j                  deddfd	„«       Z	defd
„Zdefd„Zdefd„Zded ef   dd fd„Zdedefd„Zdefd„Zdee   fd„Zdedefd„Z	 	 ddedee   dee   defd„Z	 ddee   dee   dee   fd„Zy)ÚSpecifierSetzÌThis class abstracts handling of a set of version specifiers.

    It can be passed a single specifier (``>=3.0``), a comma-separated list of
    specifiers (``>=3.0,!=3.1``), or no specifier at all.
    NÚ
specifiersr.   r   c                 ó  — |j                  d«      D �cg c]#  }|j                  «       sŒ|j                  «       ‘Œ% }}t        «       }|D ]  }|j                  t	        |«      «       Œ t        |«      | _        || _        yc c}w )aN  Initialize a SpecifierSet instance.

        :param specifiers:
            The string representation of a specifier or a comma-separated list of
            specifiers which will be parsed and normalized before use.
        :param prereleases:
            This tells the SpecifierSet if it should accept prerelease versions if
            applicable or not. The default of ``None`` will autodetect it from the
            given specifiers.

        :raises InvalidSpecifier:
            If the given ``specifiers`` are not parseable than this exception will be
            raised.
        ú,N)rË   rY   ÚsetÚaddrB   Ú	frozensetÚ_specsr[   )r$   rî   r.   ÚsÚsplit_specifiersÚparsedÚ	specifiers          r   r]   zSpecifierSet.__init__°  sx   € ð( 0:×/?Ñ/?ÀÓ/DÖR¨!ÈÏÉÍ	˜AŸG™G�IÐRÐÐRô "%£ˆØ)ò 	-ˆIØ�J‰J”y Ó+Õ,ð	-ô   Ó'ˆŒð (ˆÕùò Ss
   ”BªBc                 ó„   — | j                   �| j                   S | j                  sy t        d„ | j                  D «       «      S )Nc              3   ó4   K  — | ]  }|j                   –— Œ y ­wr   ©r.   ©rÔ   rõ   s     r   rÕ   z+SpecifierSet.prereleases.<locals>.<genexpr>â  s   è ø€ Ò6 Q�1—=•=Ñ6ùs   ‚)r[   rô   rÛ   r#   s    r   r.   zSpecifierSet.prereleasesÓ  s?   € ð ×ÑÐ(Ø×$Ñ$Ð$ð
 �{Š{Øô Ñ6¨$¯+©+Ô6Ó6Ð6r   r/   c                 ó   — || _         y r   rd   r1   s     r   r.   zSpecifierSet.prereleasesä  re   r   c                 ó^   — | j                   �d| j                  ›�nd}dt        | «      ›|› d�S )a  A representation of the specifier set that shows all internal state.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> SpecifierSet('>=1.0.0,!=2.0.0')
        <SpecifierSet('!=2.0.0,>=1.0.0')>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=False)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=False)>
        >>> SpecifierSet('>=1.0.0,!=2.0.0', prereleases=True)
        <SpecifierSet('!=2.0.0,>=1.0.0', prereleases=True)>
        rk   rl   z<SpecifierSet(rn   )r[   r.   r:   rp   s     r   rr   zSpecifierSet.__repr__è  sD   € ð × Ñ Ð,ð ˜T×-Ñ-Ð0Ñ1àð 	ð  ¤ D£	˜}¨S¨E°Ð4Ð4r   c                 óX   — dj                  t        d„ | j                  D «       «      «      S )an  A string representation of the specifier set that can be round-tripped.

        Note that the ordering of the individual specifiers within the set may not
        match the input string.

        >>> str(SpecifierSet(">=1.0.0,!=1.0.1"))
        '!=1.0.1,>=1.0.0'
        >>> str(SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False))
        '!=1.0.1,>=1.0.0'
        rð   c              3   ó2   K  — | ]  }t        |«      –— Œ y ­wr   )r:   rü   s     r   rÕ   z'SpecifierSet.__str__.<locals>.<genexpr>  s   è ø€ Ò;¨!œs 1ŸvÑ;ùs   ‚)r‰   Úsortedrô   r#   s    r   r%   zSpecifierSet.__str__ý  s"   € ð �x‰xœÑ;¨t¯{©{Ô;Ó;Ó<Ð<r   c                 ó,   — t        | j                  «      S r   )r{   rô   r#   s    r   r(   zSpecifierSet.__hash__
  s   € Ü�D—K‘KÓ Ð r   r)   c                 óâ  — t        |t        «      rt        |«      }nt        |t        «      st        S t        «       }t	        | j
                  |j
                  z  «      |_        | j                  €|j                  �|j                  |_        |S | j                  �|j                  €| j                  |_        |S | j                  |j                  k(  r| j                  |_        |S t        d«      ‚)a‚  Return a SpecifierSet which is a combination of the two sets.

        :param other: The other object to combine with.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") & '<=2.0.0,!=2.0.1'
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        >>> SpecifierSet(">=1.0.0,!=1.0.1") & SpecifierSet('<=2.0.0,!=2.0.1')
        <SpecifierSet('!=1.0.1,!=2.0.1,<=2.0.0,>=1.0.0')>
        zFCannot combine SpecifierSets with True and False prerelease overrides.)r   r:   rí   r}   ró   rô   r[   Ú
ValueError)r$   r)   rø   s      r   Ú__and__zSpecifierSet.__and__  så   € ô �eœSÔ!Ü  Ó'‰EÜ˜E¤<Ô0Ü!Ð!ä “Nˆ	Ü$ T§[¡[°5·<±<Ñ%?Ó@ˆ	Ôà×ÑÐ$¨×);Ñ);Ð)GØ%*×%7Ñ%7ˆIÔ"ð Ðð ×ÑÐ*¨u×/AÑ/AÐ/IØ%)×%6Ñ%6ˆIÔ"ð Ðð ×Ñ %×"4Ñ"4Ò4Ø%)×%6Ñ%6ˆIÔ"ð Ðô ðóð r   c                 ó¶   — t        |t        t        f«      rt        t        |«      «      }nt        |t        «      st        S | j
                  |j
                  k(  S )a¡  Whether or not the two SpecifierSet-like objects are equal.

        :param other: The other object to check against.

        The value of :attr:`prereleases` is ignored.

        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> (SpecifierSet(">=1.0.0,!=1.0.1", prereleases=False) ==
        ...  SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == ">=1.0.0,!=1.0.1"
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1") == SpecifierSet(">=1.0.0,!=1.0.2")
        False
        )r   r:   rB   rí   r}   rô   r+   s     r   r,   zSpecifierSet.__eq__-  sD   € ô& �eœc¤9Ð-Ô.Ü ¤ U£Ó,‰EÜ˜E¤<Ô0Ü!Ð!à�{‰{˜eŸl™lÑ*Ð*r   c                 ó,   — t        | j                  «      S )z7Returns the number of specifiers in this specifier set.)r”   rô   r#   s    r   Ú__len__zSpecifierSet.__len__G  s   € ä�4—;‘;ÓÐr   c                 ó,   — t        | j                  «      S )zð
        Returns an iterator over all the underlying :class:`Specifier` instances
        in this specifier set.

        >>> sorted(SpecifierSet(">=1.0.0,!=1.0.1"), key=str)
        [<Specifier('!=1.0.1')>, <Specifier('>=1.0.0')>]
        )Úiterrô   r#   s    r   Ú__iter__zSpecifierSet.__iter__K  s   € ô �D—K‘KÓ Ð r   r2   c                 ó$   — | j                  |«      S )ar  Return whether or not the item is contained in this specifier.

        :param item: The item to check for.

        This is used for the ``in`` operator and behaves the same as
        :meth:`contains` with no ``prereleases`` argument passed.

        >>> "1.2.3" in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> Version("1.2.3") in SpecifierSet(">=1.0.0,!=1.0.1")
        True
        >>> "1.0.1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1")
        False
        >>> "1.3.0a1" in SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True)
        True
        rµ   r¶   s     r   r·   zSpecifierSet.__contains__U  r¸   r   Ú	installedc                 óú   ‡‡— t        ‰t        «      st        ‰«      Š‰€| j                  Š‰s‰j                  ry|r!‰j                  rt        ‰j                  «      Št        ˆˆfd„| j                  D «       «      S )a´  Return whether or not the item is contained in this SpecifierSet.

        :param item:
            The item to check for, which can be a version string or a
            :class:`Version` instance.
        :param prereleases:
            Whether or not to match prereleases with this SpecifierSet. If set to
            ``None`` (the default), it uses :attr:`prereleases` to determine
            whether or not prereleases are allowed.

        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.2.3")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains(Version("1.2.3"))
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.0.1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1")
        False
        >>> SpecifierSet(">=1.0.0,!=1.0.1", prereleases=True).contains("1.3.0a1")
        True
        >>> SpecifierSet(">=1.0.0,!=1.0.1").contains("1.3.0a1", prereleases=True)
        True
        Fc              3   óD   •K  — | ]  }|j                  ‰‰¬ «      –— Œ y­w)rû   Nrµ   )rÔ   rõ   r2   r.   s     €€r   rÕ   z(SpecifierSet.contains.<locals>.<genexpr>¡  s   øè ø€ ÒRÀ�1—:‘:˜d°�:×<ÑRùs   ƒ )r   r   r.   rb   r«   Úallrô   )r$   r2   r.   r  s    `` r   r4   zSpecifierSet.containsj  sm   ù€ ô< ˜$¤Ô(Ü˜4“=ˆDð
 ÐØ×*Ñ*ˆKñ ˜t×1Ò1Øá˜×+Ò+Ü˜4×,Ñ,Ó-ˆDô ÔRÀdÇkÁkÔRÓRÐRr   r5   c                 ór  — |€| j                   }| j                  r8| j                  D ]  }|j                  |t        |«      ¬«      }Œ  t	        |«      S g }g }|D ]A  }t        |«      }|j                  r|s|rŒ|j                  |«       Œ1|j                  |«       ŒC |s|r|€t	        |«      S t	        |«      S )a.  Filter items in the given iterable, that match the specifiers in this set.

        :param iterable:
            An iterable that can contain version strings and :class:`Version` instances.
            The items in the iterable will be filtered according to the specifier.
        :param prereleases:
            Whether or not to allow prereleases in the returned iterator. If set to
            ``None`` (the default), it will be intelligently decide whether to allow
            prereleases or not (based on the :attr:`prereleases` attribute, and
            whether the only versions matching are prereleases).

        This method is smarter than just ``filter(SpecifierSet(...).contains, [...])``
        because it implements the rule from :pep:`440` that a prerelease item
        SHOULD be accepted if no other versions match the given specifier.

        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.3", Version("1.4")]))
        ['1.3', <Version('1.4')>]
        >>> list(SpecifierSet(">=1.2.3").filter(["1.2", "1.5a1"]))
        []
        >>> list(SpecifierSet(">=1.2.3").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet(">=1.2.3", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']

        An "empty" SpecifierSet will filter items based on the presence of prerelease
        versions in the set.

        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"]))
        ['1.3']
        >>> list(SpecifierSet("").filter(["1.5a1"]))
        ['1.5a1']
        >>> list(SpecifierSet("", prereleases=True).filter(["1.3", "1.5a1"]))
        ['1.3', '1.5a1']
        >>> list(SpecifierSet("").filter(["1.3", "1.5a1"], prereleases=True))
        ['1.3', '1.5a1']
        rû   )r.   rô   r7   r=   r
  r   rb   r¼   )r$   r5   r.   rR   Úfilteredr¾   r2   rÀ   s           r   r7   zSpecifierSet.filter£  sÈ   € ðX ÐØ×*Ñ*ˆKð
 �;Š;ØŸ™ò P�ØŸ;™; x¼TÀ+Ó=N˜;ÓO‘ðPä˜“>Ð!ð
 24ˆHØ:<Ðà ò 	*�Ü!0°Ó!6�ð "×/Ò/¹Ú#Ø)×0Ñ0°Õ6à—O‘O DÕ)ð	*ñ Ñ 1°kÐ6IÜÐ-Ó.Ð.ä˜“>Ð!r   rÁ   )NNr   )r   r   r   r   r:   r   r=   r]   r>   r.   r?   rr   r%   r;   r(   r   r  r<   r,   r  r   rB   r  rÉ   r·   r4   r   r   r7   r   r   r   rí   rí   ©  su  „ ñð CGñ!(Øð!(Ø19¸$±ð!(à	ó!(ðF ð7˜X d™^ò 7ó ð7ð  ×Ñð" ð "¨$ò "ó ð"ð5˜#ó 5ð*=˜ó =ð!˜#ó !ð˜U >°3Ð#6Ñ7ð ¸Nó ð@+˜Fð + tó +ð4 ˜ó  ð!˜( 9Ñ-ó !ð# ð #°Tó #ð0 '+Ø$(ñ	7Sàð7Sð ˜d‘^ð7Sð ˜D‘>ð	7Sð
 
ó7Sðt UYñM"Ø Ð!3Ñ4ðM"ØCKÈDÁ>ðM"à	Ð$Ñ	%ôM"r   rí   )#r   r8   r‹   rÄ   Útypingr   r   r   r   r   r   r	   r
   r   Úutilsr   r   r   r:   rÉ   r   r=   rÈ   r   r  r   ÚABCMetar!   rB   rÅ   rÌ   rŽ   r�   r“   rí   r   r   r   ú<module>r     s  ðñó Û Û 	÷
÷ 
õ 
õ (Ý à˜ ˜Ñ%€ÙÐ1¸ÔIÐ Ø˜W c˜N¨DÐ0Ñ1Ð ð˜_ð °ó ô	�zô 	ô4˜cŸk™kõ 4ônU�ô Uðp �—
‘
Ð<Ó=€ð˜Cð  D¨¡Ió ð˜Cð  Dó ðU�t˜C‘yð U¨¨c©ð U°u¸TÀ#¹YÈÈSÉ	Ð=QÑ7Ró Uô$G"�=õ G"r   