Ë
    qûàgZŠ  ã                   ód  — d Z ddlZddlZddlmZ ddlmZmZm	Z	m
Z
mZ ddlmZ ddlmZ ddlmZ dd	lmZmZ dd
lmZ ddlmZmZmZmZmZmZmZ ddlmZ  ddlm!Z!m"Z"m#Z# ddl$m%Z%m&Z&m'Z' ddl(m)Z)m*Z*m+Z+m,Z,m-Z-m.Z. ddl(mZ/ ddl(m0Z0 ddl(mZ1 ddl(m2Z2 ddl3m4Z4 ddl5m6Z6 ddl7m8Z8 ddl9m:Z:m;Z;m<Z<m=Z=m>Z>m?Z?m@Z@mAZAmBZBmCZC e6jˆ                  e6jŠ                  e6jŒ                  e6jŽ                  e6j�                  fZIdZJdZKdZL G d„ d«      ZM G d„ d«      ZN G d„ d eN«      ZO G d!„ d"eMeN«      ZP G d#„ d$«      ZQy)%z`
requests.models
~~~~~~~~~~~~~~~

This module contains the primary objects that power Requests.
é    N)ÚUnsupportedOperation)ÚDecodeErrorÚLocationParseErrorÚProtocolErrorÚReadTimeoutErrorÚSSLError)ÚRequestField)Úencode_multipart_formdata)Ú	parse_urlé   )Úto_native_stringÚunicode_is_ascii)ÚHTTPBasicAuth)ÚCallableÚJSONDecodeErrorÚMappingÚ
basestringÚbuiltin_strÚchardetÚ	cookielib)Újson)Ú	urlencodeÚurlsplitÚ
urlunparse)Ú_copy_cookie_jarÚcookiejar_from_dictÚget_cookie_header)ÚChunkedEncodingErrorÚConnectionErrorÚContentDecodingErrorÚ	HTTPErrorÚInvalidJSONErrorÚ
InvalidURL)r   )ÚMissingSchema)r   )ÚStreamConsumedError)Údefault_hooks)Úcodes)ÚCaseInsensitiveDict)
Úcheck_header_validityÚget_auth_from_urlÚguess_filenameÚguess_json_utfÚiter_slicesÚparse_header_linksÚrequote_uriÚstream_decode_response_unicodeÚ	super_lenÚto_key_val_listé   i (  i   c                   ó<   — e Zd Zed„ «       Zed„ «       Zed„ «       Zy)ÚRequestEncodingMixinc                 óô   — g }t        | j                  «      }|j                  }|sd}|j                  |«       |j                  }|r"|j                  d«       |j                  |«       dj                  |«      S )zBuild the path URL to use.ú/ú?Ú )r   ÚurlÚpathÚappendÚqueryÚjoin)Úselfr:   Úpr;   r=   s        úM/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/requests/models.pyÚpath_urlzRequestEncodingMixin.path_urlU   se   € ð ˆä�T—X‘XÓˆà�v‰vˆÙØˆDà�
‰
�4Ôà—‘ˆÙØ�J‰J�sŒOØ�J‰J�uÔà�w‰w�s‹|Ðó    c           	      óª  — t        | t        t        f«      r| S t        | d«      r| S t        | d«      r g }t	        | «      D ]ƒ  \  }}t        |t
        «      st        |d«      s|g}|D ]Z  }|€Œ|j                  t        |t        «      r|j                  d«      n|t        |t        «      r|j                  d«      n|f«       Œ\ Œ… t        |d¬«      S | S )züEncode parameters in a piece of data.

        Will successfully encode parameters when passed as a dict or a list of
        2-tuples. Order is retained if data is a list of 2-tuples but arbitrary
        if parameters are supplied as a dict.
        ÚreadÚ__iter__úutf-8T)Údoseq)	Ú
isinstanceÚstrÚbytesÚhasattrr2   r   r<   Úencoder   )ÚdataÚresultÚkÚvsÚvs        rA   Ú_encode_paramsz#RequestEncodingMixin._encode_paramsj   sÎ   € ô �dœS¤%˜LÔ)ØˆKÜ�T˜6Ô"ØˆKÜ�T˜:Ô&ØˆFÜ(¨Ó.ò 
‘��2Ü˜b¤*Ô-´W¸RÀÔ5LØ˜�BØò �AØ‘}ØŸ™ä5?ÀÄ3Ô5G §¡¨Ô 1ÈQÜ5?ÀÄ3Ô5G §¡¨Ô 1ÈQðõñð
ô ˜V¨4Ô0Ð0àˆKrC   c           	      ó¬  — | st        d«      ‚t        |t        «      rt        d«      ‚g }t        |xs i «      }t        | xs i «      } |D ]ž  \  }}t        |t        «      st	        |d«      s|g}|D ]u  }|€Œt        |t
        «      st        |«      }|j                  t        |t
        «      r|j                  d«      n|t        |t        «      r|j                  d«      n|f«       Œw Œ  | D ]Ó  \  }}d}d}	t        |t        t        f«      r1t        |«      dk(  r|\  }
}n.t        |«      dk(  r|\  }
}}n|\  }
}}}	nt        |«      xs |}
|}t        |t        t
        t        f«      r|}n"t	        |d«      r|j                  «       }n|€Œ |}t!        |||
|	¬	«      }|j#                  |¬
«       |j                  |«       ŒÕ t%        |«      \  }}||fS )a¥  Build the body for a multipart/form-data request.

        Will successfully encode files when passed as a dict or a list of
        tuples. Order is retained if data is a list of tuples but arbitrary
        if parameters are supplied as a dict.
        The tuples may be 2-tuples (filename, fileobj), 3-tuples (filename, fileobj, contentype)
        or 4-tuples (filename, fileobj, contentype, custom_headers).
        zFiles must be provided.zData must not be a string.rF   NrG   é   é   rE   )ÚnamerN   ÚfilenameÚheaders)Úcontent_type)Ú
ValueErrorrI   r   r2   rL   rK   rJ   r<   ÚdecoderM   ÚtupleÚlistÚlenr+   Ú	bytearrayrE   r	   Úmake_multipartr
   )ÚfilesrN   Ú
new_fieldsÚfieldsÚfieldÚvalrR   rP   ÚftÚfhÚfnÚfpÚfdataÚrfÚbodyrZ   s                   rA   Ú_encode_filesz"RequestEncodingMixin._encode_filesˆ   sà  € ñ ÜÐ6Ó7Ð7Ü˜œjÔ)ÜÐ9Ó:Ð:àˆ
Ü  ¢¨Ó,ˆÜ ¢¨Ó,ˆà ò 	‰JˆE�3Ü˜#œzÔ*´'¸#¸zÔ2JØ�e�Øò �Ø‘=ä% a¬Ô/Ü ›F˜à×%Ñ%ô  *¨%´Ô7ð "ŸL™L¨Ô1à!&Ü1;¸A¼sÔ1C˜AŸH™H WÔ-Èð	õñð	ð$ ò 	"‰DˆAˆqàˆBØˆBÜ˜!œe¤T˜]Ô+Ü�q“6˜Q’;Ø‘F�B™Ü˜“V˜q’[Ø!"‘J�B˜™Bà%&‘N�B˜˜B¡ä# AÓ&Ò+¨!�Ø�ä˜"œs¤E¬9Ð5Ô6Ø‘Ü˜˜VÔ$ØŸ™›	‘Ø�Øà�ä 1¨5¸2ÀrÔJˆBØ×Ñ¨2ÐÔ.Ø×Ñ˜bÕ!ð5	"ô8 7°zÓBÑˆˆlà�\Ð!Ð!rC   N)Ú__name__Ú
__module__Ú__qualname__ÚpropertyrB   ÚstaticmethodrS   rn   © rC   rA   r5   r5   T   s>   „ Øñó ðð( ñó ðð: ñB"ó ñB"rC   r5   c                   ó   — e Zd Zd„ Zd„ Zy)ÚRequestHooksMixinc                 ó   — || j                   vrt        d|› d�«      ‚t        |t        «      r| j                   |   j	                  |«       yt        |d«      r&| j                   |   j                  d„ |D «       «       yy)zProperly register a hook.z.Unsupported event specified, with event name "ú"rF   c              3   óB   K  — | ]  }t        |t        «      sŒ|–— Œ y ­w©N)rI   r   )Ú.0Úhs     rA   ú	<genexpr>z2RequestHooksMixin.register_hook.<locals>.<genexpr>Ø   s   è ø€ Ò$P¨1¼
À1ÄhÕ8O¤QÑ$Pùs   ‚˜N)Úhooksr[   rI   r   r<   rL   Úextend©r?   ÚeventÚhooks      rA   Úregister_hookzRequestHooksMixin.register_hookÏ   ss   € ð ˜Ÿ
™
Ñ"ÜÐMÈeÈWÐTUÐVÓWÐWä�dœHÔ%Ø�J‰J�uÑ×$Ñ$ TÕ*Ü�T˜:Ô&Ø�J‰J�uÑ×$Ñ$Ñ$P°Ô$PÕPð 'rC   c                 ó`   — 	 | j                   |   j                  |«       y# t        $ r Y yw xY w)ziDeregister a previously registered hook.
        Returns True if the hook existed, False if not.
        TF)r~   Úremover[   r€   s      rA   Úderegister_hookz!RequestHooksMixin.deregister_hookÚ   s3   € ð
	Ø�J‰J�uÑ×$Ñ$ TÔ*ØøÜò 	Ùð	ús   ‚! ¡	-¬-N)ro   rp   rq   rƒ   r†   rt   rC   rA   rv   rv   Î   s   „ ò	Qó	rC   rv   c                   ó8   — e Zd ZdZ	 	 	 	 	 	 	 	 	 	 dd„Zd„ Zd„ Zy)ÚRequesta{  A user-created :class:`Request <Request>` object.

    Used to prepare a :class:`PreparedRequest <PreparedRequest>`, which is sent to the server.

    :param method: HTTP method to use.
    :param url: URL to send.
    :param headers: dictionary of headers to send.
    :param files: dictionary of {filename: fileobject} files to multipart upload.
    :param data: the body to attach to the request. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param json: json for the body to attach to the request (if files or data is not specified).
    :param params: URL parameters to append to the URL. If a dictionary or
        list of tuples ``[(key, value)]`` is provided, form-encoding will
        take place.
    :param auth: Auth handler or (user, pass) tuple.
    :param cookies: dictionary or CookieJar of cookies to attach to this request.
    :param hooks: dictionary of callback hooks, for internal usage.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> req.prepare()
      <PreparedRequest [GET]>
    Nc                 óD  — |€g n|}|€g n|}|€i n|}|€i n|}|	€i n|	}	t        «       | _        t        |	j                  «       «      D ]  \  }}| j	                  ||¬«       Œ || _        || _        || _        || _        || _	        |
| _
        || _        || _        || _        y )N)r�   r‚   )r&   r~   r^   Úitemsrƒ   Úmethodr:   rY   rb   rN   r   ÚparamsÚauthÚcookies)r?   r‹   r:   rY   rb   rN   rŒ   r�   rŽ   r~   r   rP   rR   s                rA   Ú__init__zRequest.__init__  s¶   € ð �\‰r tˆØ�m‘¨ˆØ˜‘"¨WˆØ�~‘¨6ˆØ�m‘¨ˆä"“_ˆŒ
Ü˜Ÿ™›Ó'ò 	0‰DˆAˆqØ×Ñ Q¨QÐÕ/ð	0ð ˆŒØˆŒØˆŒØˆŒ
ØˆŒ	ØˆŒ	ØˆŒØˆŒ	Øˆ�rC   c                 ó"   — d| j                   › d�S )Nz
<Request [ú]>©r‹   ©r?   s    rA   Ú__repr__zRequest.__repr__$  s   € Ø˜DŸK™K˜=¨Ð+Ð+rC   c                 ó  — t        «       }|j                  | j                  | j                  | j                  | j
                  | j                  | j                  | j                  | j                  | j                  | j                  ¬«
       |S )zXConstructs a :class:`PreparedRequest <PreparedRequest>` for transmission and returns it.)
r‹   r:   rY   rb   rN   r   rŒ   r�   rŽ   r~   )ÚPreparedRequestÚpreparer‹   r:   rY   rb   rN   r   rŒ   r�   rŽ   r~   ©r?   r@   s     rA   r—   zRequest.prepare'  sh   € äÓˆØ	�	‰	Ø—;‘;Ø—‘Ø—L‘LØ—*‘*Ø—‘Ø—‘Ø—;‘;Ø—‘Ø—L‘LØ—*‘*ð 	ô 	
ð ˆrC   ©
NNNNNNNNNN)ro   rp   rq   Ú__doc__r�   r”   r—   rt   rC   rA   rˆ   rˆ   æ   s7   „ ñð: ØØØØØØØØØó òD,órC   rˆ   c                   ó‚   — e Zd ZdZd„ Z	 	 	 	 	 	 	 	 	 	 dd„Zd„ Zd„ Zd„ Ze	d„ «       Z
d	„ Zd
„ Zdd„Zd„ Zdd„Zd„ Zd„ Zy)r–   a)  The fully mutable :class:`PreparedRequest <PreparedRequest>` object,
    containing the exact bytes that will be sent to the server.

    Instances are generated from a :class:`Request <Request>` object, and
    should not be instantiated manually; doing so may produce undesirable
    effects.

    Usage::

      >>> import requests
      >>> req = requests.Request('GET', 'https://httpbin.org/get')
      >>> r = req.prepare()
      >>> r
      <PreparedRequest [GET]>

      >>> s = requests.Session()
      >>> s.send(r)
      <Response [200]>
    c                 óv   — d | _         d | _        d | _        d | _        d | _        t        «       | _        d | _        y rz   )r‹   r:   rY   Ú_cookiesrm   r&   r~   Ú_body_positionr“   s    rA   r�   zPreparedRequest.__init__N  s8   € àˆŒàˆŒàˆŒð ˆŒàˆŒ	ä"“_ˆŒ
à"ˆÕrC   Nc                 óú   — | j                  |«       | j                  ||«       | j                  |«       | j                  |«       | j	                  |||
«       | j                  ||«       | j                  |	«       y)z6Prepares the entire request with the given parameters.N)Úprepare_methodÚprepare_urlÚprepare_headersÚprepare_cookiesÚprepare_bodyÚprepare_authÚprepare_hooks)r?   r‹   r:   rY   rb   rN   rŒ   r�   rŽ   r~   r   s              rA   r—   zPreparedRequest.prepare_  sp   € ð 	×Ñ˜FÔ#Ø×Ñ˜˜fÔ%Ø×Ñ˜WÔ%Ø×Ñ˜WÔ%Ø×Ñ˜$  tÔ,Ø×Ñ˜$ Ô$ð 	×Ñ˜5Õ!rC   c                 ó"   — d| j                   › d�S )Nz<PreparedRequest [r‘   r’   r“   s    rA   r”   zPreparedRequest.__repr__{  s   € Ø# D§K¡K =°Ð3Ð3rC   c                 óR  — t        «       }| j                  |_        | j                  |_        | j                  �| j                  j	                  «       nd |_        t        | j                  «      |_        | j                  |_        | j                  |_        | j                  |_	        |S rz   )
r–   r‹   r:   rY   Úcopyr   r�   rm   r~   rž   r˜   s     rA   r©   zPreparedRequest.copy~  sx   € ÜÓˆØ—;‘;ˆŒØ—‘ˆŒØ+/¯<©<Ð+C�D—L‘L×%Ñ%Ô'ÈˆŒ	Ü% d§m¡mÓ4ˆŒ
Ø—‘ˆŒØ—*‘*ˆŒØ×.Ñ.ˆÔØˆrC   c                 ó|   — || _         | j                   �)t        | j                   j                  «       «      | _         yy)zPrepares the given HTTP method.N)r‹   r   Úupper)r?   r‹   s     rA   r    zPreparedRequest.prepare_method‰  s1   € àˆŒØ�;‰;Ð"Ü*¨4¯;©;×+<Ñ+<Ó+>Ó?ˆD�Kð #rC   c                 ó†   — dd l }	 |j                  | d¬«      j                  d«      } | S # |j                  $ r t        ‚w xY w)Nr   T)Úuts46rG   )ÚidnarM   r\   Ú	IDNAErrorÚUnicodeError)Úhostr®   s     rA   Ú_get_idna_encoded_hostz&PreparedRequest._get_idna_encoded_host�  sI   € ãð	Ø—;‘;˜t¨4�;Ó0×7Ñ7¸Ó@ˆDð ˆøð �~‰~ò 	ÜÐð	ús	   †"* ªA c           
      ó2  — t        |t        «      r|j                  d«      }nt        |«      }|j	                  «       }d|v r'|j                  «       j                  d«      s|| _        y	 t        |«      \  }}}}}}}	|st        d|›d|› d�«      ‚|st        d|›d�«      ‚t        |«      s	 | j                  |«      }n|j                  d
«      rt        d	«      ‚|xs d}|r|dz  }||z  }|r|d|› �z  }|sd}t        |t        t        f«      rt!        |«      }| j#                  |«      }|r|r|› d|› �}n|}t%        t'        |||d||	g«      «      }|| _        y# t        $ r}
t        |
j                  Ž ‚d}
~
ww xY w# t        $ r t        d	«      ‚w xY w)zPrepares the given HTTP URL.Úutf8ú:ÚhttpNzInvalid URL z0: No scheme supplied. Perhaps you meant https://r8   z: No host suppliedzURL has an invalid label.)Ú*ú.r9   ú@r7   ú&)rI   rK   r\   rJ   ÚlstripÚlowerÚ
startswithr:   r   r   r#   Úargsr$   r   r²   r°   r   rS   r/   r   )r?   r:   rŒ   Úschemer�   r±   Úportr;   r=   ÚfragmentÚeÚnetlocÚ
enc_paramss                rA   r¡   zPreparedRequest.prepare_url™  sÓ  € ô �cœ5Ô!Ø—*‘*˜VÓ$‰Cä�c“(ˆCð �j‰j‹lˆð
 �#‰:˜cŸi™i›k×4Ñ4°VÔ<ØˆDŒHØð	&Ü>GÈ»nÑ;ˆF�D˜$  d¨E°8ñ ÜØ˜s˜gð &-Ø-0¨E°ð4óð ñ
 Ü˜|¨C¨7Ð2DÐEÓFÐFô   Ô%ð>Ø×2Ñ2°4Ó8‘ð �_‰_˜ZÔ(ÜÐ8Ó9Ð9ð ’˜ˆÙØ�c‰MˆFØ�$‰ˆÙØ˜˜$˜�jÑ ˆFñ ØˆDä�fœs¤E˜lÔ+Ü% fÓ-ˆFà×(Ñ(¨Ó0ˆ
ÙÙØ ˜'  : ,Ð/‘à"�äœ* f¨f°d¸DÀ%ÈÐ%RÓSÓTˆØˆ�øô_ "ò 	&Ü˜aŸf™fÐ%Ð%ûð	&ûô&  ò >Ü Ð!<Ó=Ð=ð>ús$   Á*E Â.F Å	E>Å'E9Å9E>ÆFc                 ó¢   — t        «       | _        |r>|j                  «       D ]*  }t        |«       |\  }}|| j                  t	        |«      <   Œ, yy)z Prepares the given HTTP headers.N)r(   rY   rŠ   r)   r   )r?   rY   ÚheaderrW   Úvalues        rA   r¢   zPreparedRequest.prepare_headersã  sP   € ô +Ó,ˆŒÙØ!Ÿ-™-›/ò =�ä% fÔ-Ø$‘��eØ7<�—‘Ô-¨dÓ3Ò4ñ	=ð rC   c           
      ó¢  — d}d}|s=|�;d}	 t        j                  |d¬«      }t	        |t
        «      s|j                  d«      }t        t        |d«      t	        |t        t        t        t        f«       g«      }|rw	 t        |«      }|}t#        |dd«      �	 |j%                  «       | _        |rt-        d	«      ‚|r t/        |«      | j0                  d
<   || _        yd| j0                  d<   || _        y|r| j3                  ||«      \  }}n4|r2| j5                  |«      }t	        |t        «      st        |d«      rd}nd}| j7                  |«       |rd| j0                  vr|| j0                  d<   || _        y# t        $ r}t        || ¬«      ‚d}~ww xY w# t        t        t         f$ r d}Y �Œ&w xY w# t(        $ r t+        «       | _        Y �Œ w xY w)z"Prepares the given HTTP body data.Nzapplication/jsonF)Ú	allow_nan)ÚrequestrG   rF   Útellz1Streamed bodies and files are mutually exclusive.úContent-LengthÚchunkedzTransfer-EncodingrE   z!application/x-www-form-urlencodedzcontent-typezContent-Type)ÚcomplexjsonÚdumpsr[   r"   rI   rK   rM   ÚallrL   r   r^   r]   r   r1   Ú	TypeErrorÚAttributeErrorr   ÚgetattrrË   rž   ÚOSErrorÚobjectÚNotImplementedErrorr   rY   rn   rS   Úprepare_content_lengthrm   )	r?   rN   rb   r   rm   rZ   ÚveÚ	is_streamÚlengths	            rA   r¤   zPreparedRequest.prepare_bodyî  sâ  € ð ˆØˆá˜Ð(ð .ˆLð9Ü"×(Ñ(¨¸Ô?�ô ˜d¤EÔ*Ø—{‘{ 7Ó+�ää˜˜jÓ)Ü˜t¤j´$¼¼wÐ%GÓHÐHðó
ˆ	ñ ðÜ" 4›�ð ˆDä�t˜V TÓ*Ð6ð3Ø*.¯)©)«+�DÔ'ñ Ü)ØGóð ñ Ü1<¸VÓ1D�—‘Ð-Ñ.ð* ˆ�	ð' 5>�—‘Ð0Ñ1ð& ˆ�	ñ! Ø'+×'9Ñ'9¸%ÀÓ'FÑ$�‘|áØ×.Ñ.¨tÓ4�DÜ! $¬
Ô3´w¸tÀVÔ7LØ'+™à'J˜à×'Ñ'¨Ô-ñ  °t·|±|Ñ!CØ/;�—‘˜^Ñ,àˆ�	øôw ò 9Ü& r°4Ô8Ð8ûð9ûô  œ~Ô/CÐDò Ø“ðûô ò 3ô +1«(�D×'ð3ús;   ŒE7 Á=F ÂF2 Å7	FÆ FÆFÆF/Æ.F/Æ2GÇGc                 óÊ   — |�'t        |«      }|rt        |«      | j                  d<   yy| j                  dvr,| j                  j	                  d«      €d| j                  d<   yyy)z>Prepare Content-Length header based on request method and bodyNrÌ   )ÚGETÚHEADÚ0)r1   r   rY   r‹   Úget)r?   rm   rÚ   s      rA   r×   z&PreparedRequest.prepare_content_length<  sn   € àÐÜ˜t“_ˆFÙô 2=¸VÓ1D�—‘Ð-Ò.ð ð
 �K‰K˜Ñ.Ø—‘× Ñ Ð!1Ó2Ð:ð .1ˆD�L‰LÐ)Ò*ð	 ;ð /rC   c                 ó2  — |€$t        | j                  «      }t        |«      r|nd}|rot        |t        «      rt        |«      dk(  rt        |Ž } || «      }| j                  j                  |j                  «       | j                  | j                  «       yy)z"Prepares the given HTTP auth data.NrU   )r*   r:   ÚanyrI   r]   r_   r   Ú__dict__Úupdater×   rm   )r?   r�   r:   Úurl_authÚrs        rA   r¥   zPreparedRequest.prepare_authL  s�   € ð ˆ<Ü(¨¯©Ó2ˆHÜ" 8œ}‘8°$ˆDáÜ˜$¤Ô&¬3¨t«9¸ª>ä$ dÐ+�ñ �T“
ˆAð �M‰M× Ñ  §¡Ô,ð ×'Ñ'¨¯	©	Õ2ð rC   c                 ó¸   — t        |t        j                  «      r|| _        nt	        |«      | _        t        | j                  | «      }|�|| j                  d<   yy)a  Prepares the given HTTP cookie data.

        This function eventually generates a ``Cookie`` header from the
        given cookies using cookielib. Due to cookielib's design, the header
        will not be regenerated if it already exists, meaning this function
        can only be called once for the life of the
        :class:`PreparedRequest <PreparedRequest>` object. Any subsequent calls
        to ``prepare_cookies`` will have no actual effect, unless the "Cookie"
        header is removed beforehand.
        NÚCookie)rI   r   Ú	CookieJarr�   r   r   rY   )r?   rŽ   Úcookie_headers      rA   r£   zPreparedRequest.prepare_cookiesb  sP   € ô �gœy×2Ñ2Ô3Ø#ˆD�Mä/°Ó8ˆDŒMä)¨$¯-©-¸Ó>ˆØÐ$Ø%2ˆD�L‰L˜Ò"ð %rC   c                 óH   — |xs g }|D ]  }| j                  |||   «       Œ y)zPrepares the given hooks.N)rƒ   )r?   r~   r�   s      rA   r¦   zPreparedRequest.prepare_hooksv  s0   € ð
 ’˜ˆØò 	4ˆEØ×Ñ˜u e¨E¡lÕ3ñ	4rC   r™   rz   )r9   )ro   rp   rq   rš   r�   r—   r”   r©   r    rs   r²   r¡   r¢   r¤   r×   r¥   r£   r¦   rt   rC   rA   r–   r–   9  s|   „ ñò(#ð& ØØØØØØØØØó"ò84ò	ò@ð ñó ðòHòT	=óLò\1ó 3ò,3ó(4rC   r–   c                   óö   — e Zd ZdZg d¢Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	„ Zd
„ Zd„ Zed„ «       Zed„ «       Zed„ «       Zed„ «       Zed„ «       Zdd„Zeddfd„Zed„ «       Zed„ «       Zd„ Zed„ «       Zd„ Zd„ Zy)ÚResponsezhThe :class:`Response <Response>` object, which contains a
    server's response to an HTTP request.
    )
Ú_contentÚstatus_coderY   r:   ÚhistoryÚencodingÚreasonrŽ   ÚelapsedrÊ   c                 ó  — d| _         d| _        d | _        d | _        t	        «       | _        d | _        d | _        d | _        g | _	        d | _
        t        i «      | _        t        j                  d«      | _        d | _        y )NFr   )rí   Ú_content_consumedÚ_nextrî   r(   rY   Úrawr:   rð   rï   rñ   r   rŽ   ÚdatetimeÚ	timedeltarò   rÊ   r“   s    rA   r�   zResponse.__init__’  s†   € ØˆŒØ!&ˆÔØˆŒ
ð  ˆÔô
 +Ó,ˆŒð
 ˆŒð ˆŒð ˆŒð
 ˆŒð ˆŒô +¨2Ó.ˆŒô  ×)Ñ)¨!Ó,ˆŒð ˆ�rC   c                 ó   — | S rz   rt   r“   s    rA   Ú	__enter__zResponse.__enter__Á  s   € ØˆrC   c                 ó$   — | j                  «        y rz   )Úclose)r?   r¾   s     rA   Ú__exit__zResponse.__exit__Ä  s   € Ø�
‰
�rC   c           	      óˆ   — | j                   s| j                   | j                  D �ci c]  }|t        | |d «      “Œ c}S c c}w rz   )rô   ÚcontentÚ	__attrs__rÓ   )r?   Úattrs     rA   Ú__getstate__zResponse.__getstate__Ç  s:   € ð ×%Ò%Ø�LŠLà<@¿N¹NÖK°D�”g˜d D¨$Ó/Ñ/ÒKÐKùÒKs   §?c                 ó‚   — |j                  «       D ]  \  }}t        | ||«       Œ t        | dd«       t        | dd «       y )Nrô   Trö   )rŠ   Úsetattr)r?   ÚstaterW   rÇ   s       rA   Ú__setstate__zResponse.__setstate__Ï  sB   € Ø Ÿ;™;›=ò 	'‰KˆD�%Ü�D˜$ Õ&ð	'ô 	�Ð)¨4Ô0Ü��e˜TÕ"rC   c                 ó"   — d| j                   › d�S )Nz<Response [r‘   )rî   r“   s    rA   r”   zResponse.__repr__×  s   € Ø˜T×-Ñ-Ð.¨bÐ1Ð1rC   c                 ó   — | j                   S ©ak  Returns True if :attr:`status_code` is less than 400.

        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code, is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        ©Úokr“   s    rA   Ú__bool__zResponse.__bool__Ú  ó   € ð �w‰wˆrC   c                 ó   — | j                   S r	  r
  r“   s    rA   Ú__nonzero__zResponse.__nonzero__ä  r  rC   c                 ó$   — | j                  d«      S )z,Allows you to use a response as an iterator.é€   )Úiter_contentr“   s    rA   rF   zResponse.__iter__î  s   € à× Ñ  Ó%Ð%rC   c                 óD   — 	 | j                  «        y# t        $ r Y yw xY w)ax  Returns True if :attr:`status_code` is less than 400, False if not.

        This attribute checks if the status code of the response is between
        400 and 600 to see if there was a client error or a server error. If
        the status code is between 200 and 400, this will return True. This
        is **not** a check to see if the response code is ``200 OK``.
        FT)Úraise_for_statusr!   r“   s    rA   r  zResponse.okò  s,   € ð	Ø×!Ñ!Ô#ð øô ò 	Ùð	ús   ‚ “	žc                 óF   — d| j                   v xr | j                  t        v S )zšTrue if this Response is a well-formed HTTP redirect that could have
        been processed automatically (by :meth:`Session.resolve_redirects`).
        Úlocation)rY   rî   ÚREDIRECT_STATIr“   s    rA   Úis_redirectzResponse.is_redirect  s#   € ð
 ˜TŸ\™\Ð)ÒP¨d×.>Ñ.>Ä.Ð.PÐPrC   c                 óz   — d| j                   v xr, | j                  t        j                  t        j                  fv S )z@True if this Response one of the permanent versions of redirect.r  )rY   rî   r'   Úmoved_permanentlyÚpermanent_redirectr“   s    rA   Úis_permanent_redirectzResponse.is_permanent_redirect  s?   € ð ˜TŸ\™\Ð)ò 
¨d×.>Ñ.>Ü×#Ñ#Ü×$Ñ$ðC
ð /
ð 	
rC   c                 ó   — | j                   S )zTReturns a PreparedRequest for the next request in a redirect chain, if there is one.)rõ   r“   s    rA   ÚnextzResponse.next  s   € ð �z‰zÐrC   c                 óT   — t         �"t        j                  | j                  «      d   S y)zOThe apparent encoding, provided by the charset_normalizer or chardet libraries.rð   rG   )r   Údetectrÿ   r“   s    rA   Úapparent_encodingzResponse.apparent_encoding  s'   € ô ÐÜ—>‘> $§,¡,Ó/°
Ñ;Ð;ð rC   Fc                 ó@  ‡ ‡— ˆˆ fd„}‰ j                   r$t        ‰ j                  t        «      r
t	        «       ‚‰�(t        ‰t
        «      st        dt        ‰«      › d�«      ‚t        ‰ j                  ‰«      } |«       }‰ j                   r|n|}|rt        |‰ «      }|S )aø  Iterates over the response data.  When stream=True is set on the
        request, this avoids reading the content at once into memory for
        large responses.  The chunk size is the number of bytes it should
        read into memory.  This is not necessarily the length of each item
        returned as decoding can take place.

        chunk_size must be of type int or None. A value of None will
        function differently depending on the value of `stream`.
        stream=True will read data as it arrives in whatever size the
        chunks are received. If stream=False, data is returned as
        a single chunk.

        If decode_unicode is True, content will be decoded using the best
        available encoding based on the response.
        c               3   ó²  •K  — t        ‰j                  d«      r.	 ‰j                  j                  ‰d¬«      E d {  –—†  d‰_        y 	 ‰j                  j                  ‰«      }|s		 d‰_        y |–— Œ+7 Œ8# t        $ r} t	        | «      ‚d } ~ wt
        $ r} t        | «      ‚d } ~ wt        $ r} t        | «      ‚d } ~ wt        $ r} t        | «      ‚d } ~ ww xY w­w)NÚstreamT)Údecode_content)rL   rö   r$  r   r   r   r    r   r   r   ÚRequestsSSLErrorrE   rô   )rÂ   ÚchunkÚ
chunk_sizer?   s     €€rA   Úgeneratez'Response.iter_content.<locals>.generate0  sÍ   øè ø€ ä�t—x‘x Ô*ð	.Ø#Ÿx™xŸ™¨zÈ$˜ÓO×OÐOð" &*ˆDÕ"ð Ø ŸH™HŸM™M¨*Ó5�EÙ Øð &*ˆDÕ"ð  ’Kð	 ð PùÜ$ò 2Ü.¨qÓ1Ð1ûÜ"ò 2Ü.¨qÓ1Ð1ûÜ'ò -Ü)¨!Ó,Ð,ûÜò .Ü*¨1Ó-Ð-ûð.üs\   ƒC› A6 »A4¼A6 Á 4CÁ4A6 Á6	CÁ?B
Â
CÂB!Â!CÂ-B8Â8CÃCÃCÃCz+chunk_size must be an int, it is instead a r¸   )
rô   rI   rí   Úboolr%   ÚintrÑ   Útyper-   r0   )r?   r(  Údecode_unicoder)  Úreused_chunksÚstream_chunksÚchunkss   ``     rA   r  zResponse.iter_content  s“   ù€ õ"	*ð. ×!Ò!¤j°·±ÄÔ&EÜ%Ó'Ð'ØÐ#¬J°zÄ3Ô,GÜØ=¼dÀ:Ó>NÐ=OÈqÐQóð ô $ D§M¡M°:Ó>ˆá ›
ˆà"&×"8Ò"8‘¸mˆáÜ3°F¸DÓAˆFàˆrC   Nc              #   ó  K  — d}| j                  ||¬«      D ]a  }|�||z   }|r|j                  |«      }n|j                  «       }|r&|d   r!|r|d   d   |d   k(  r|j                  «       }nd}|E d{  –—†  Œc |�|–— yy7 Œ­w)zõIterates over the response data, one line at a time.  When
        stream=True is set on the request, this avoids reading the
        content at once into memory for large responses.

        .. note:: This method is not reentrant safe.
        N)r(  r-  éÿÿÿÿ)r  ÚsplitÚ
splitlinesÚpop)r?   r(  r-  Ú	delimiterÚpendingr'  Úliness          rA   Ú
iter_lineszResponse.iter_linesY  s¯   è ø€ ð ˆà×&Ñ&Ø!°.ð 'ó 
ò 	ˆEð Ð"Ø %™�áØŸ™ IÓ.‘à×(Ñ(Ó*�á˜˜rš¡u°°r±¸2±À%ÈÁ)Ò1KØŸ)™)›+‘à�à×Ñð!	ð$ ÐØ‹Mð ð ús   ‚A3BÁ5BÁ6Bc                 ó  — | j                   du rg| j                  rt        d«      ‚| j                  dk(  s| j                  €d| _         n-dj                  | j                  t        «      «      xs d| _         d| _        | j                   S )z"Content of the response, in bytes.Fz2The content for this response was already consumedr   NrC   T)rí   rô   ÚRuntimeErrorrî   rö   r>   r  ÚCONTENT_CHUNK_SIZEr“   s    rA   rÿ   zResponse.contentz  sy   € ð �=‰=˜EÑ!à×%Ò%Ü"Ð#WÓXÐXà×Ñ 1Ò$¨¯©Ð(8Ø $�•à #§¡¨×):Ñ):Ô;MÓ)NÓ OÒ VÐSV�”à!%ˆÔð �}‰}ÐrC   c                 óø   — d}| j                   }| j                  sy| j                   €| j                  }	 t        | j                  |d¬«      }|S # t        t
        f$ r t        | j                  d¬«      }Y |S w xY w)aÚ  Content of the response, in unicode.

        If Response.encoding is None, encoding will be guessed using
        ``charset_normalizer`` or ``chardet``.

        The encoding of the response content is determined based solely on HTTP
        headers, following RFC 2616 to the letter. If you can take advantage of
        non-HTTP knowledge to make a better guess at the encoding, you should
        set ``r.encoding`` appropriately before accessing this property.
        Nr9   Úreplace)Úerrors)rð   rÿ   r!  rJ   ÚLookupErrorrÑ   )r?   rÿ   rð   s      rA   ÚtextzResponse.text�  s~   € ð ˆØ—=‘=ˆà�|Š|Øð �=‰=Ð Ø×-Ñ-ˆHð		:Ü˜$Ÿ,™,¨¸ÔCˆGð ˆøô œYÐ'ò 	:ô ˜$Ÿ,™,¨yÔ9‰Gàˆð	:ús   µA Á&A9Á8A9c                 ó6  — | j                   sk| j                  r_t        | j                  «      dkD  rGt        | j                  «      }|�0	 t	        j
                  | j                  j                  |«      fi |¤ŽS 	 t	        j
                  | j                  fi |¤ŽS # t        $ r Y Œ,t        $ r0}t        |j                  |j                  |j                  «      ‚d}~ww xY w# t        $ r0}t        |j                  |j                  |j                  «      ‚d}~ww xY w)zýReturns the json-encoded content of a response, if any.

        :param \*\*kwargs: Optional arguments that ``json.loads`` takes.
        :raises requests.exceptions.JSONDecodeError: If the response body does not
            contain valid json.
        rV   N)rð   rÿ   r_   r,   rÎ   Úloadsr\   ÚUnicodeDecodeErrorr   ÚRequestsJSONDecodeErrorÚmsgÚdocÚposrA  )r?   Úkwargsrð   rÂ   s       rA   r   zResponse.json³  së   € ð �}Š} §¢´#°d·l±lÓ2CÀaÒ2Gô
 & d§l¡lÓ3ˆHØÐ#ð	GÜ&×,Ñ,¨T¯\©\×-@Ñ-@ÀÓ-JÑUÈfÑUÐUð	?Ü×$Ñ$ T§Y¡YÑ9°&Ñ9Ð9øô *ò ñ
 Ü&ò GÜ1°!·%±%¸¿¹ÀÇÁÓFÐFûðGûô
 ò 	?ô *¨!¯%©%°·±¸¿¹Ó>Ð>ûð	?ús6   Á	.B Á9C Â	CÂ$CÂ,+CÃCÃ	DÃ(+DÄDc                 óº   — | j                   j                  d«      }i }|r;t        |«      }|D ]+  }|j                  d«      xs |j                  d«      }|||<   Œ- |S )z8Returns the parsed header links of the response, if any.ÚlinkÚrelr:   )rY   rß   r.   )r?   rÆ   Úresolved_linksÚlinksrK  Úkeys         rA   rN  zResponse.linksÔ  se   € ð —‘×!Ñ! &Ó)ˆàˆáÜ& vÓ.ˆEàò +�Ø—h‘h˜u“oÒ8¨¯©°%«�Ø&*�˜sÒ#ð+ð ÐrC   c                 óÚ  — d}t        | j                  t        «      r	 | j                  j                  d«      }n| j                  }d| j
                  cxk  rdk  r"n n| j
                  › d|› d| j                  › �}n6d| j
                  cxk  rdk  r!n n| j
                  › d	|› d| j                  › �}|rt        || ¬
«      ‚y# t        $ r | j                  j                  d«      }Y Œ£w xY w)z+Raises :class:`HTTPError`, if one occurred.r9   rG   z
iso-8859-1i�  iô  z Client Error: z
 for url: iX  z Server Error: )ÚresponseN)rI   rñ   rK   r\   rD  rî   r:   r!   )r?   Úhttp_error_msgrñ   s      rA   r  zResponse.raise_for_statuså  sç   € ð ˆÜ�d—k‘k¤5Ô)ð
:ØŸ™×+Ñ+¨GÓ4‘ð —[‘[ˆFà�$×"Ñ"Ô( SÕ(à×#Ñ#Ð$ O°F°8¸:ÀdÇhÁhÀZÐPñ ð �D×$Ñ$Ô* sÕ*à×#Ñ#Ð$ O°F°8¸:ÀdÇhÁhÀZÐPð ñ Ü˜N°TÔ:Ð:ð øô &ò :ØŸ™×+Ñ+¨LÓ9’ð:ús   žC Ã$C*Ã)C*c                 ó’   — | j                   s| j                  j                  «        t        | j                  dd«      }|� |«        yy)zØReleases the connection back to the pool. Once this method has been
        called the underlying ``raw`` object must not be accessed again.

        *Note: Should not normally need to be called explicitly.*
        Úrelease_connN)rô   rö   rü   rÓ   )r?   rT  s     rA   rü   zResponse.close  s=   € ð ×%Ò%Ø�H‰H�N‰NÔä˜tŸx™x¨¸Ó>ˆØÐ#Ù�Nð $rC   )r   F)ro   rp   rq   rš   r   r�   rú   rý   r  r  r”   r  r  rF   rr   r  r  r  r  r!  r  ÚITER_CHUNK_SIZEr9  rÿ   rA  r   rN  r  rü   rt   rC   rA   rì   rì   €  s  „ ñò€Iò-ò^òòLò#ò2òòò&ð ñó ðð ñQó ðQð ñ
ó ð
ð ñó ðð ñó ðó8ðv )¸È$óðB ñó ðð$ ñ#ó ð#òJ?ðB ñó ðò ;ó:rC   rì   )Rrš   r÷   Úencodings.idnaÚ	encodingsÚior   Úurllib3.exceptionsr   r   r   r   r   Úurllib3.fieldsr	   Úurllib3.filepostr
   Úurllib3.utilr   Ú_internal_utilsr   r   r�   r   Úcompatr   r   r   r   r   r   r   r   rÎ   r   r   r   rŽ   r   r   r   Ú
exceptionsr   r   r    r!   r"   r#   rE  r$   r&  r%   r~   r&   Ústatus_codesr'   Ú
structuresr(   Úutilsr)   r*   r+   r,   r-   r.   r/   r0   r1   r2   ÚmovedÚfoundÚotherÚtemporary_redirectr  r  ÚDEFAULT_REDIRECT_LIMITr<  rU  r5   rv   rˆ   r–   rì   rt   rC   rA   ú<module>rh     s  ðñó ó
 Ý #÷õ õ (Ý 6Ý "ç ?Ý ÷÷ ñ õ (ß 3Ñ 3ß MÑ M÷÷ õ CÝ %Ý 4Ý +Ý  Ý Ý +÷÷ ÷ ð  
‡K�KØ	‡K�KØ	‡K�KØ	×ÑØ	×Ñð€ð Ð ØÐ Ø€÷w"ñ w"÷tñ ô0PÐô PôfD4Ð*Ð,=ô D4÷N
Mò MrC   