
    b?1i              
           d Z ddlmZmZmZmZmZmZ ddlm	Z	 e	ddddde
d	ed
edefd       Ze	ddddde
d	ed
edefd       Zy)zIP Address.    )AddressValueErrorIPv4AddressIPv4NetworkIPv6AddressIPv6NetworkNetmaskValueError   )	validatorTF)cidrstricthost_bitvaluer   r   r   c                   | sy	 |r/|r| j                  d      dk7  rt        d      t        | |       S t        |       S # t        t        t
        f$ r Y yw xY w)a@  Returns whether a given value is a valid IPv4 address.

    From Python version 3.9.5 leading zeros are no longer tolerated
    and are treated as an error. The initial version of ipv4 validator
    was inspired from [WTForms IPAddress validator][1].

    [1]: https://github.com/wtforms/wtforms/blob/master/src/wtforms/validators.py

    Examples:
        >>> ipv4('123.0.0.7')
        # Output: True
        >>> ipv4('1.1.1.1/8')
        # Output: True
        >>> ipv4('900.80.70.11')
        # Output: ValidationError(func=ipv4, args={'value': '900.80.70.11'})

    Args:
        value:
            IP address string to validate.
        cidr:
            IP address string may contain CIDR notation
        strict:
            IP address string is strictly in CIDR notation
        host_bit:
            If `False` and host bits (along with network bits) _are_ set in the supplied
            address, this function raises a validation error. ref [IPv4Network][2].
            [2]: https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv4Network

    Returns:
        (Literal[True]):
            If `value` is a valid IPv4 address.
        (ValidationError):
            If `value` is an invalid IPv4 address.

    Note:
        - *In version 0.14.0*:
            - Add supports for CIDR notation

    > *New in version 0.2.0*
    F/r	   z*IPv4 address was expected in CIDR notationr   )count
ValueErrorr   r   r   r   r   r   r   r   s       _/home/www/therecruiter.miabetepe.com/venv/lib/python3.12/site-packages/validators/ip_address.pyipv4r      sg    T %++c*a/ !MNNu\::5!!)+<=    0A 
A AAc                   | sy	 |r/|r| j                  d      dk7  rt        d      t        | |       S t        |       S # t        t        t
        f$ r Y yw xY w)a  Returns if a given value is a valid IPv6 address.

    Including IPv4-mapped IPv6 addresses. The initial version of ipv6 validator
    was inspired from [WTForms IPAddress validator][1].

    [1]: https://github.com/wtforms/wtforms/blob/master/src/wtforms/validators.py

    Examples:
        >>> ipv6('::ffff:192.0.2.128')
        # Output: True
        >>> ipv6('::1/128')
        # Output: True
        >>> ipv6('abc.0.0.1')
        # Output: ValidationError(func=ipv6, args={'value': 'abc.0.0.1'})

    Args:
        value:
            IP address string to validate.
        cidr:
            IP address string may contain CIDR annotation
        strict:
            IP address string is strictly in CIDR notation
        host_bit:
            If `False` and host bits (along with network bits) _are_ set in the supplied
            address, this function raises a validation error. ref [IPv6Network][2].
            [2]: https://docs.python.org/3/library/ipaddress.html#ipaddress.IPv6Network

    Returns:
        (Literal[True]):
            If `value` is a valid IPv6 address.
        (ValidationError):
            If `value` is an invalid IPv6 address.

    Note:
        - *In version 0.14.0*:
            - Add supports for CIDR notation

    > *New in version 0.2.0*
    Fr   r	   z*IPv6 address was expected in CIDR notationr   )r   r   r   r   r   r   r   s       r   ipv6r   G   sg    R %++c*a/ !MNNu\::5!!)+<= r   N)__doc__	ipaddressr   r   r   r   r   r   utilsr
   strboolr   r        r   <module>r!      s       (,UUY 2 2 2d 2d 2 2j (,UUY 1 1 1d 1d 1 1r    