Ë
    R>{in  ã                  ó  — d dl mZ d dlZd dlZddlmZ ddlmZmZ ej                  ej                  eeej                  eef   f      Zej                  rddlmZ dd„Zeddf	 	 	 	 	 	 	 	 	 dd	„Z	 	 	 	 	 	 dd
„Zdd„Zdd„Z ed«      Zy)é    )ÚannotationsNé   )ÚLocationParseErroré   )Ú_DEFAULT_TIMEOUTÚ_TYPE_TIMEOUT)ÚBaseHTTPConnectionc                ó   — | j                    S )z�
    Returns True if the connection is dropped and should be closed.
    :param conn: :class:`urllib3.connection.HTTPConnection` object.
    )Úis_connected)Úconns    úU/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/urllib3/util/connection.pyÚis_connection_droppedr      s   € ð
 × Ñ Ð Ð ó    c                ó~  — | \  }}|j                  d«      r|j                  d«      }d}t        «       }	 |j                  d«       t        j                  |||t        j                  «      D ]r  }|\  }	}
}}}d}	 t        j                  |	|
|«      }t        ||«       |t        ur|j                  |«       |r|j                  |«       |j                  |«       d}|c S  |�	 |‚t        d«      ‚# t        $ r t        d|› d�«      d‚w xY w# t        $ r}|}|�|j                  «        Y d}~ŒÄd}~ww xY w# d}w xY w)ak  Connect to *address* and return the socket object.

    Convenience function.  Connect to *address* (a 2-tuple ``(host,
    port)``) and return the socket object.  Passing the optional
    *timeout* parameter will set the timeout on the socket instance
    before attempting to connect.  If no *timeout* is supplied, the
    global default timeout setting returned by :func:`socket.getdefaulttimeout`
    is used.  If *source_address* is set it must be a tuple of (host, port)
    for the socket to bind as a source address before making the connection.
    An host of '' or port 0 tells the OS to use the default.
    ú[z[]NÚidnaú'z', label empty or too longz!getaddrinfo returns an empty list)Ú
startswithÚstripÚallowed_gai_familyÚencodeÚUnicodeErrorr   ÚsocketÚgetaddrinfoÚSOCK_STREAMÚ_set_socket_optionsr   Ú
settimeoutÚbindÚconnectÚOSErrorÚclose)ÚaddressÚtimeoutÚsource_addressÚsocket_optionsÚhostÚportÚerrÚfamilyÚresÚafÚsocktypeÚprotoÚ	canonnameÚsaÚsockÚ_s                   r   Úcreate_connectionr2      sZ  € ð$ �J€Dˆ$Ø‡��sÔØ�z‰z˜$ÓˆØ
€Cô
  Ó!€FðQØ�‰�FÔô ×!Ñ! $¨¨f´f×6HÑ6HÓIò ˆØ-0Ñ*ˆˆH�e˜Y¨Øˆð	Ü—=‘=  X¨uÓ5ˆDô    nÔ5àÔ.Ñ.Ø—‘ Ô(ÙØ—	‘	˜.Ô)Ø�L‰L˜ÔàˆCØŠKð!ð. €ð	ØˆIô
 Ð9Ó:Ð:øôC ò QÜ  1 T FÐ*DÐ!EÓFÈDÐPðQûô* ò 	ØˆCØÐØ—
‘
”ÿøð	ûð ‰Cús0   µC1 Á:A#DÃ$D8 Ã1DÄ	D5ÄD0Ä0D5Ä8D<c                ó6   — |€y |D ]  } | j                   |Ž  Œ y )N)Ú
setsockopt)r0   ÚoptionsÚopts      r   r   r   ]   s)   € ð €Øàò ˆØˆ�‰˜Òñr   c                 óR   — t         j                  } t        rt         j                  } | S )z³This function is designed to work in the context of
    getaddrinfo, where family=socket.AF_UNSPEC is the default and
    will perform a DNS search for both IPv6 and IPv4 records.)r   ÚAF_INETÚHAS_IPV6Ú	AF_UNSPEC)r)   s    r   r   r   g   s    € ô
 �^‰^€FÝÜ×!Ñ!ˆØ€Mr   c                óâ   — d}d}t         j                  r9	 t        j                   t         j                  «      }|j                  | df«       d}|r|j                  «        |S # t        $ r Y Œw xY w)z4Returns True if the system can bind an IPv6 address.NFr   T)r   Úhas_ipv6ÚAF_INET6r   Ú	Exceptionr!   )r&   r0   r<   s      r   Ú	_has_ipv6r?   r   sf   € à€DØ€Hä‡‚ð	Ü—=‘=¤§¡Ó1ˆDØ�I‰I�t˜Q�iÔ ØˆHñ Ø�
‰
ŒØ€Oøô ò 	Ùð	ús   –8A" Á"	A.Á-A.z::1)r   r	   ÚreturnÚbool)
r"   ztuple[str, int]r#   r   r$   ztuple[str, int] | Noner%   ú_TYPE_SOCKET_OPTIONS | Noner@   úsocket.socket)r0   rC   r5   rB   r@   ÚNone)r@   zsocket.AddressFamily)r&   Ústrr@   rA   )Ú
__future__r   r   ÚtypingÚ
exceptionsr   r#   r   r   ÚSequenceÚTupleÚintÚUnionÚbytesÚ_TYPE_SOCKET_OPTIONSÚTYPE_CHECKINGÚ_base_connectionr	   r   r2   r   r   r?   r9   © r   r   ú<module>rR      sÄ   ðÝ "ã Û å +ß 4à—‘ v§|¡|°C¸¸f¿l¹lÈ3ÐPUÈ:Ñ>VÐ4VÑ'WÑXÐ à	×ÒÝ5ó!ð .Ø-1Ø26ð	?;Øð?;àð?;ð +ð?;ð 0ð	?;ð
 ó?;ðDØ
ðØ"=ðà	óóóñ. �UÓ�r   