python (3.11.7)

(root)/
lib/
python3.11/
urllib/
__pycache__/
parse.cpython-311.pyc

e+,dZddlmZddlZddlZddlZddlZddlZddlZgdZ	gdZ
gdZgdZgdZ
gd	Zgd
ZdZdZgd
ZdZdZdZdZeefdZeefdZdZGddeZGddeZGddeZGddeeZGddeeZedd Z ed!d"Z!ed#d$Z"d%e _d&e j#_d'e j$_d(e!_d)e!j%_d*e!j&_d+e!j'_d,e!j(_d-e!j$_d.e"_e!j%je"j%_e!j&je"j&_e!j'je"j'_d/e"j)_e!j(je"j(_e!j$je"j$_eZ*Gd0de eZ+Gd1d!e!eZ,Gd2d#e"eZ-Gd3d4e eZ.Gd5d6e!eZ/Gd7d8e"eZ0d9Z1e1[1dtd<Z2d=Z3dud>Z4d?Z5d@Z6ej7d;AdtdBZ8dCZ9dDZ:dvdEZ;dFZ<dGZ=da>dHZ?ej@dIZAdwdLZB		dxdOZC		dxdPZDdwdQZEeFdRZGeHeGZIdSZJGdTdUeKZLdydWZMdzdXZNej7dYZOd{dZZPdMd:ddeNfd[ZQd\ZRd]ZSd^ZTd_ZUdaVd`ZWdaZXdaYdbZZdcZ[ddZ\deZ]dfZ^dgZ_da`dhZad|djZbd|dkZcdlZddmZednZfdoZgdpZhdqZidrZjdsZkdS)}a3Parse (absolute and relative) URLs.

urlparse module is based upon the following RFC specifications.

RFC 3986 (STD66): "Uniform Resource Identifiers" by T. Berners-Lee, R. Fielding
and L.  Masinter, January 2005.

RFC 2732 : "Format for Literal IPv6 Addresses in URL's by R.Hinden, B.Carpenter
and L.Masinter, December 1999.

RFC 2396:  "Uniform Resource Identifiers (URI)": Generic Syntax by T.
Berners-Lee, R. Fielding, and L. Masinter, August 1998.

RFC 2368: "The mailto URL scheme", by P.Hoffman , L Masinter, J. Zawinski, July 1998.

RFC 1808: "Relative Uniform Resource Locators", by R. Fielding, UC Irvine, June
1995.

RFC 1738: "Uniform Resource Locators (URL)" by T. Berners-Lee, L. Masinter, M.
McCahill, December 1994

RFC 3986 is considered the current standard and any future changes to
urlparse module should conform with it.  The urlparse module is
currently not entirely compliant with this RFC due to defacto
scenarios for parsing, and for backward compatibility purposes, some
parsing quirks from older RFCs are retained. The testcases in
test_urlparse.py provides a good indicator of parsing behavior.

The WHATWG URL Parser spec should also be considered.  We are not compliant with
it either due to existing user code API behavior expectations (Hyrum's Law).
It serves as a useful guide when making changes.
)
namedtupleN)urlparse
urlunparseurljoin	urldefragurlsplit
urlunsplit	urlencodeparse_qs	parse_qslquote
quote_plusquote_from_bytesunquoteunquote_plusunquote_to_bytesDefragResultParseResultSplitResultDefragResultBytesParseResultBytesSplitResultBytes)ftphttpgophernntpimapwaisfilehttpsshttpmmsprosperortsprtspsrtspusftpsvnsvn+sshwswss)rrrrrtelnetrrr r#r!r"snewsr$r%r&r'rsyncr)r*r(nfsgitzgit+sshr+r,)rrhdlr$rrr!r"r%r&r'sipsipsr#r(tel)
rr2mailtonewsr-rrr.r3r4)
rrrrr!r"r#rr%r&r'r3r4)
rrr2rrr7rrr!r"r.r r$zAabcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.z!	

 )	

cjttdS)zDClear internal performance caches. Undocumented; some tests want it.N)rcache_clear_byte_quoter_factory@/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/urllib/parse.pyclear_cacherA^s,$$&&&&&r?asciistrictc|SNr>)objs r@_nooprGlsJr?c.|||SrEencode)rFencodingerrorss   r@_encode_resultrMos::h'''r?c>tfd|DS)Nc3LK|]}|r|ndVdS)rNdecode.0xrKrLs  r@	<genexpr>z_decode_args.<locals>.<genexpr>us;GGQq8(F+++bGGGGGGr?)tuple)argsrKrLs ``r@_decode_argsrXss*GGGGG$GGGGGGr?ct|dt}|ddD],}|r(t|t|krtd-|r|tfzSt	|t
fzS)Nrz$Cannot mix str and non-str arguments)
isinstancestr	TypeErrorrGrXrM)rW	str_inputargs   r@_coerce_argsr`ws47C((IABBxDD	D:c3''944BCCCuh 111r?ceZdZdZdZddZdS)_ResultMixinStrz>Standard approach to encoding parsed results from str to bytesr>rBrCc4|jfd|DS)Nc3DK|]}|VdSrErIrRs  r@rUz)_ResultMixinStr.encode.<locals>.<genexpr>1*T*T!188Hf+E+E*T*T*T*T*T*Tr?)_encoded_counterpartselfrKrLs ``r@rJz_ResultMixinStr.encode,(t(*T*T*T*T*Tt*T*T*TUUr?NrBrC)__name__
__module____qualname____doc__	__slots__rJr>r?r@rbrb9HHIVVVVVVr?rbceZdZdZdZddZdS)_ResultMixinBytesz>Standard approach to decoding parsed results from bytes to strr>rBrCc4|jfd|DS)Nc3DK|]}|VdSrErPrRs  r@rUz+_ResultMixinBytes.decode.<locals>.<genexpr>rer?)_decoded_counterpartrgs ``r@rQz_ResultMixinBytes.decoderir?Nrj)rkrlrmrnrorQr>r?r@rrrrrpr?rrceZdZdZdZedZedZedZedZ	e
ejZ
dS)_NetlocResultMixinBasezHShared methods for the parsed result objects containing a netloc elementr>c|jdS)Nr	_userinforhs r@usernamez_NetlocResultMixinBase.username~a  r?c|jdS)NrZryr{s r@passwordz_NetlocResultMixinBase.passwordr}r?c|jd}|sdSt|trdnd}||\}}}||z|zS)Nr%%)	_hostinfor[r\	partitionlower)rhhostname	separatorpercentzones     r@rz_NetlocResultMixinBase.hostnamesi>!$	4&h44>CC$	"*"4"4Y"?"?'4~~')D00r?c|jd}|h|r$|rt|}nt	d|d|cxkrdksnt	d|S)NrZz+Port could not be cast to integer value as rizPort out of range 0-65535)risdigitisasciiint
ValueError)rhports  r@rz_NetlocResultMixinBase.ports~a ||~~
Y$,,..
Y4yy !Wt!W!WXXX&&&&&&&& !<===r?N)rkrlrmrnropropertyr|rrrclassmethodtypesGenericAlias__class_getitem__r>r?r@rwrwsRRI
!!X!!!X!11X1		X	$E$677r?rwc>eZdZdZedZedZdS)_NetlocResultMixinStrr>c|j}|d\}}}|r|d\}}}|sd}ndx}}||fS)N@:netloc
rpartitionrrhruserinfo	have_infohostinfor|
have_passwordrs        r@rzz_NetlocResultMixinStr._userinfosh(.(9(9#(>(>%)X	'080B0B30G0G-HmX 
 "&&Hx!!r?c |j}|d\}}}|d\}}}|r3|d\}}}|d\}}}n|d\}}}|sd}||fS)Nr[]rrrhr_rhave_open_br	bracketedrrs        r@rz_NetlocResultMixinStr._hostinfos**3//1h%-%7%7%<%<"<	8 ) 3 3C 8 8Ha,,JAq$$ ( 2 23 7 7Ha	D~r?Nrkrlrmrorrzrr>r?r@rrMI
	"	"X	"Xr?rc>eZdZdZedZedZdS)_NetlocResultMixinBytesr>c|j}|d\}}}|r|d\}}}|sd}ndx}}||fS)N@:rrs        r@rzz!_NetlocResultMixinBytes._userinfosh(.(9(9$(?(?%)X	'080B0B40H0H-HmX 
 "&&Hx!!r?c |j}|d\}}}|d\}}}|r3|d\}}}|d\}}}n|d\}}}|sd}||fS)Nr[]rrrs        r@rz!_NetlocResultMixinBytes._hostinfos**4001h%-%7%7%=%="<	9 ) 3 3D 9 9Ha--JAq$$ ( 2 24 8 8Ha	D~r?Nrr>r?r@rrrr?rrzurl fragmentrz!scheme netloc path query fragmentrz(scheme netloc path params query fragmentz
DefragResult(url, fragment)

A 2-tuple that contains the url without fragment identifier and the fragment
identifier as a separate argument.
z$The URL with no fragment identifier.z
Fragment identifier separated from URL, that allows indirect identification of a
secondary resource by reference to a primary resource and additional identifying
information.
z
SplitResult(scheme, netloc, path, query, fragment)

A 5-tuple that contains the different components of a URL. Similar to
ParseResult, but does not split params.
z%Specifies URL scheme for the request.z0
Network location where the request is made to.
z@
The hierarchical path, such as the path to a file to download.
z
The query component, that contains non-hierarchical data, that along with data
in path component, identifies a resource in the scope of URI's scheme and
network location.
z
Fragment identifier, that allows indirect identification of a secondary resource
by reference to a primary resource and additional identifying information.
zq
ParseResult(scheme, netloc, path, params, query, fragment)

A 6-tuple that contains components of a parsed URL.
z
Parameters for last path element used to dereference the URI in order to provide
access to perform some operation on the resource.
ceZdZdZdZdS)rr>cB|jr|jdz|jzS|jS)N#fragmenturlr{s r@geturlzDefragResult.geturlEs&=	8c>DM118Or?Nrkrlrmrorr>r?r@rrC(Ir?ceZdZdZdZdS)rr>c t|SrEr	r{s r@rzSplitResult.geturlM$r?Nrr>r?r@rrK(I     r?ceZdZdZdZdS)rr>c t|SrErr{s r@rzParseResult.geturlRrr?Nrr>r?r@rrPrr?ceZdZdZdZdS)rr>cB|jr|jdz|jzS|jS)N#rr{s r@rzDefragResultBytes.geturlXs&=	8d?T]228Or?Nrr>r?r@rrVrr?rceZdZdZdZdS)rr>c t|SrErr{s r@rzSplitResultBytes.geturl`rr?Nrr>r?r@rr^rr?rceZdZdZdZdS)rr>c t|SrErr{s r@rzParseResultBytes.geturlerr?Nrr>r?r@rrcrr?rcttfttftt
ff}|D]\}}||_||_dSrE)rrrrrrrfru)
_result_pairs_decoded_encodeds   r@_fix_result_transcodingrisW	()	&'	&'M
,11((0%(0%%11r?rTct||\}}}t|||}|\}}}}}|tvrd|vrt|\}}nd}t	||||||}	||	S)aParse a URL into 6 components:
    <scheme>://<netloc>/<path>;<params>?<query>#<fragment>

    The result is a named 6-tuple with fields corresponding to the
    above. It is either a ParseResult or ParseResultBytes object,
    depending on the type of the url parameter.

    The username, password, hostname, and port sub-components of netloc
    can also be accessed as attributes of the returned object.

    The scheme argument provides the default value of the scheme
    component when no scheme is found in url.

    If allow_fragments is False, no attempt is made to separate the
    fragment component from the previous component, which can be either
    path or query.

    Note that % escapes are not expanded.
    ;r)r`ruses_params_splitparamsr)
rschemeallow_fragments_coerce_resultsplitresultrqueryrparamsresults
          r@rrvs(#/sF";";C388K+6(FFC
"3''VV
feX
F
FF>&!!!r?cd|vr4|d|d}|dkr|dfSn|d}|d|||dzdfS)N/rrrrZ)findrfind)ris  r@rrso
s{{HHS#))C..))q557N
HHSMMrr7C!Ir?ct|}dD].}|||}|dkrt||}/|||||dfS)Nz/?#r)lenrmin)rstartdelimcwdelims     r@_splitnetlocrsdHHE
''!U##Q;;v&&EuU{S[((r?cl|r|rdSddl}|dd}|dd}|dd}|dd}|d|}||krdSdD]}||vrt	d	|zd
zdzdS)Nrrrrr?NFKCz/?#@:znetloc 'z' contains invalid z#characters under NFKC normalization)runicodedatareplace	normalizer)rrnnetloc2rs     r@_checknetlocrsV^^%%sBA			#rA			#rA			#rA##FA..GG||
DD<<Z&03HHBCDD
DDDr?c|dr&tjd|stddSt	j|}t
|tjrtddS)Nvz\Av[a-fA-F0-9]+\..+\ZzIPvFuture address is invalidz%An IPv4 address cannot be in brackets)
startswithrematchr	ipaddress
ip_addressr[IPv4Address)rips  r@_check_bracketed_hostrs3Gx0(;;	><===	>	>
!(
+
+b)/00	GEFFF	G	Gr?)typedc0t||\}}}|t}|t}tD].}||d}||d}/t
|}dx}x}}|d}|dkru|dr[|d	rA|d|D]
}	|	tvrn*|d|||dzd}}|dddkr}t|d\}}d|vrd	|vsd	|vrd|vrtd
d|vrGd	|vrC|ddd	d}
t|
|rd|vr|dd\}}d|vr|dd\}}t#|t%|||||}||S)
aParse a URL into 5 components:
    <scheme>://<netloc>/<path>?<query>#<fragment>

    The result is a named 5-tuple with fields corresponding to the
    above. It is either a SplitResult or SplitResultBytes object,
    depending on the type of the url parameter.

    The username, password, hostname, and port sub-components of netloc
    can also be accessed as attributes of the returned object.

    The scheme argument provides the default value of the scheme
    component when no scheme is found in url.

    If allow_fragments is False, no attempt is made to separate the
    fragment component from the previous component, which can be either
    path or query.

    Note that % escapes are not expanded.
    rrrNrZ//rrzInvalid IPv6 URLrr)r`lstrip_WHATWG_C0_CONTROL_OR_SPACEstrip_UNSAFE_URL_BYTES_TO_REMOVErboolrrisalphascheme_charsrrrrrsplitrr)rrrrbrrrrrbracketed_hostrs            r@rrs?,#/sF";";C**0
1
1C
\\5
6
6F
(''kk!R  2&&?++O ""F"UX

A1uuQ!!uc!fnn&6&6uRaR	5	5A$$%bqb'--//3qstt9CF
2A2w$"3**
F]]s&003f#4#4/000&==SF]]#--c2215??DDQGN!.111*3#::		#q))
X
czzYYsA&&
UFFC99A>!r?c	pt|\}}}}}}}|r|d|}|t|||||fS)zPut a parsed URL back together again.  This may result in a
    slightly different, but equivalent URL, if the URL that was parsed
    originally had redundant delimiters, e.g. a ? with an empty query
    (the draft states that these are equivalent).r)r`r	)
componentsrrrrrrrs        r@rrs[3?
2KAFFC.
&ff%>*ffc5(%KLLMMMr?ct|\}}}}}}|s|r6|tvr-|dddkr|r|dddkrd|z}d|pdz|z}|r|dz|z}|r|dz|z}|r|d	z|z}||S)
akCombine the elements of a tuple as returned by urlsplit() into a
    complete URL as a string. The data argument can be any five-item iterable.
    This may result in a slightly different, but equivalent URL, if the URL that
    was parsed originally had unnecessary delimiters (for example, a ? with an
    empty query; the RFC states that these are equivalent).NrrrZrrrrr)r`uses_netloc)r
rrrrrrs       r@r	r	s+7
*C9FFC.
*&*V{22s2A2w$23rr7c>>s3fl#c)
!slS  Ci%#Ci(">#r?c
|s|S|s|St||\}}}t|d|\}}}}}}	t|||\}
}}}
}}|
|ks	|
tvr||S|
tvr"|r|t	|
|||
||fS|}|s(|
s&|}|}
|s|}|t	|
|||
||fS|d}|ddkr|d=|dddkr|d}n5||dz}t
d|dd|dd<g}|D]J}|dkr&	|#t$rY*wxYw|dkr5|	|K|ddvr|	d|t	|
|d
|pd|
||fS)	zaJoin a base URL and a possibly relative URL to form an absolute
    interpretation of the latter.rrNrZ...)rr)r`r
uses_relativerrrfilterpop
IndexErrorappendjoin)baserrrbschemebnetlocbpathbparamsbquery	bfragmentrrpathrrr
base_partssegments
resolved_pathsegs                    r@rrs
 ,T3 7 7D#~T2//8GWeWfi
S'?332FFD&%F-77~c"""
	I!>*ffd.4eX.G#H#HII
IEE	E~j&&$*0%*CDDEE	ES!!J"~
rNBQBx3::c??

3/ hqtn552M&&$;;
!!####



CZZ  %%%%|{""	R   >*ffchh777vuh&899:::sE
E('E(ct|\}}d|vr,t|\}}}}}}t|||||df}nd}|}|t||S)zRemoves any existing fragment from URL.

    Returns a tuple of the defragmented URL and the fragment.  If
    the URL contained no fragments, the second element is the
    empty string.
    rr)r`rrr)	rrsrpaqfragdefrags	         r@rr`sw's++C
czz&smm1aAtQ1aB/00>,vt44555r?0123456789ABCDEFabcdefc|s	|jdSt|tr|d}|d}t	|dkr|S|dg}|j}tdtDa|ddD]Z}	|t|dd||dd5#t$r|d||YWwxYwd	|S)	z,unquote_to_bytes('abc%20def') -> b'abc def'.r?utf-8rrZrNci|]?}tD]5}||zt||z6@Sr>)_hexdigrJbytesfromhex)rSr&rs   r@
<dictcomp>z$unquote_to_bytes.<locals>.<dictcomp>s\99999+,1unn&&

a!e(<(<9999r?r)
rr[r\rJrr
_hextobyter.KeyErrorr)stringbitsresritems     r@rrss7s&#(w''<<D
4yyA~~
7)C
ZF99&999
QRR	F:d2A2h'(((F48			F4LLLF4LLLLL	88C==s1C C*)C*z([-]+)r,rct|tr#t|||Sd|vr	|j|S|d}|d}t
|}|dg}|j}tdt|dD]H}|t|||||||dzId	|S)	aReplace %xx escapes by their single-character equivalent. The optional
    encoding and errors parameters specify how to decode percent-encoded
    sequences into Unicode characters, as accepted by the bytes.decode()
    method.
    By default, percent-encoded sequences are decoded with UTF-8, and invalid
    sequences are replaced by a placeholder character.

    unquote('abc%20def') -> 'abc def'.
    rNr,rrrZrr)
r[r/rrQr_asciirerrangerr)r4rKrLr5r6rrs       r@rrs&%  A''..x@@@
&

~>>&!!D7)C
ZF
1c$ii
#
#Q((//&AABBBtAE{
773<<r?F&c	i}t|||||||}|D]+\}	}
|	|vr||	|
%|
g||	<,|S)aXParse a query given as a string argument.

        Arguments:

        qs: percent-encoded query string to be parsed

        keep_blank_values: flag indicating whether blank values in
            percent-encoded queries should be treated as blank strings.
            A true value indicates that blanks should be retained as
            blank strings.  The default false value indicates that
            blank values are to be ignored and treated as if they were
            not included.

        strict_parsing: flag indicating what to do with parsing errors.
            If false (the default), errors are silently ignored.
            If true, errors raise a ValueError exception.

        encoding and errors: specify how to decode percent-encoded sequences
            into Unicode characters, as accepted by the bytes.decode() method.

        max_num_fields: int. If set, then throws a ValueError if there
            are more than n fields read by parse_qsl().

        separator: str. The symbol to use for separating the query arguments.
            Defaults to &.

        Returns a dictionary.
    )rKrLmax_num_fieldsr)rr)qskeep_blank_valuesstrict_parsingrKrLr=r
parsed_resultpairsnamevalues           r@rrs<Mb+^'%3y
J
J
JE**e=  $&&u----#('M$r?cDt|\}}t|\}}|rt|ttfst	d|1|rd||znd}	||	krt	dg}
|r||ng}|D]}|s|s|dd}
t|
dkr-|rt	d||r|
d	n]t|
ds|r|
d	d
d}t|||}||}|
d	d
d}t|||}||}|
||f|
S)
aXParse a query given as a string argument.

        Arguments:

        qs: percent-encoded query string to be parsed

        keep_blank_values: flag indicating whether blank values in
            percent-encoded queries should be treated as blank strings.
            A true value indicates that blanks should be retained as blank
            strings.  The default false value indicates that blank values
            are to be ignored and treated as if they were  not included.

        strict_parsing: flag indicating what to do with parsing errors. If
            false (the default), errors are silently ignored. If true,
            errors raise a ValueError exception.

        encoding and errors: specify how to decode percent-encoded sequences
            into Unicode characters, as accepted by the bytes.decode() method.

        max_num_fields: int. If set, then throws a ValueError
            if there are more than n fields read by parse_qsl().

        separator: str. The symbol to use for separating the query arguments.
            Defaults to &.

        Returns a list, as G-d intended.
    z*Separator must be of type string or bytes.NrZrzMax number of fields exceeded=rzbad query field: r+ )rKrL)r`r[r\r/rcountrrrrr)r>r?r@rKrLr=rrr
num_fieldsr
query_args
name_valuenvrCrDs                r@rrs:&b))B	**LIqGZ	C<@@GEFFF
!029Q),,,,
J&&<===
A(*2)$$$J $$
	.	


c1
%
%r77a<<
H j**!FGGG 
		"



r!u::	$*	$a5==c**D4(6BBBD!>$''DqEMM#s++EEHVDDDE"N5))E
HHdE]###Hr?cP|dd}t|||S)zLike unquote(), but also replace plus signs by spaces, as required for
    unquoting HTML form values.

    unquote_plus('%7e/abc+def') -> '~/abc def'
    rGrH)rr)r4rKrLs   r@rrs)^^C
%
%F68V,,,r?sBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_.-~c|dkr#tjdtdtSt	dt
d|)NQuoterzoDeprecated in 3.11. urllib.parse.Quoter will be removed in Python 3.14. It was not intended to be a public API.r
stacklevelzmodule z has no attribute )warningswarnDeprecationWarning_QuoterAttributeErrorrk)rCs r@__getattr__rY+sYx
@)Q	8	8	8	8
I8IIII
J
JJr?c$eZdZdZdZdZdZdS)rWzA mapping from bytes numbers (in range(0,256)) to strings.

    String values are percent-encoded byte values, unless the key < 128, and
    in either of the specified safe set, or the always safe set.
    cDt||_dS)zsafe: bytes object.N)_ALWAYS_SAFEunionsafe)rhr^s  r@__init__z_Quoter.__init__<s &&t,,			r?c(dt|dS)Nz<Quoter >)dictr{s r@__repr__z_Quoter.__repr__@s)$t**))))r?cj||jvrt|nd|}|||<|S)Nz%{:02X})r^chrformat)rhrr6s   r@__missing__z_Quoter.__missing__Cs7TYc!fffI,<,<Q,?,?Q
r?N)rkrlrmrnr_rcrgr>r?r@rWrW4sK---***r?rWrct|tr#|s|S|d}|d}|||}n"|td|tdt	||S)aquote('abc def') -> 'abc%20def'

    Each part of a URL, e.g. the path info, the query, etc., has a
    different set of reserved characters that must be quoted. The
    quote function offers a cautious (not minimal) way to quote a
    string for most of these parts.

    RFC 3986 Uniform Resource Identifier (URI): Generic Syntax lists
    the following (un)reserved characters.

    unreserved    = ALPHA / DIGIT / "-" / "." / "_" / "~"
    reserved      = gen-delims / sub-delims
    gen-delims    = ":" / "/" / "?" / "#" / "[" / "]" / "@"
    sub-delims    = "!" / "$" / "&" / "'" / "(" / ")"
                  / "*" / "+" / "," / ";" / "="

    Each of the reserved characters is reserved in some component of a URL,
    but not necessarily in all of them.

    The quote function %-escapes all characters that are neither in the
    unreserved chars ("always safe") nor the additional chars set via the
    safe arg.

    The default for the safe arg is '/'. The character is reserved, but in
    typical usage the quote function is being called on a path where the
    existing slash characters are to be preserved.

    Python 3.7 updates from using RFC 2396 to RFC 3986 to quote URL strings.
    Now, "~" is included in the set of unreserved characters.

    string and safe may be either str or bytes objects. encoding and errors
    must not be specified if string is a bytes object.

    The optional encoding and errors parameters specify how to deal with
    non-ASCII characters, as accepted by the str.encode method.
    By default, encoding='utf-8' (characters are encoded with UTF-8), and
    errors='strict' (unsupported characters raise a UnicodeEncodeError).
    Nr,rCz,quote() doesn't support 'encoding' for bytesz*quote() doesn't support 'errors' for bytes)r[r\rJr]r)r4r^rKrLs    r@r
r
IsN&#J	MH>Fx00JKKKHIIIFD)))r?ct|trd|vst|trd|vrt||||St|trd}nd}t|||z||}|ddS)zLike quote(), but also replace ' ' with '+', as required for quoting
    HTML form values. Plus signs in the original string are escaped unless
    they are included in safe. It also does not have safe default to '/'.
    rH rG)r[r\r/r
r)r4r^rKrLspaces     r@rrs
FC	 	 5S%6%6	FE	"	"&7'+6'9'9VT8V444$
64%<6
:
:F>>#s###r?c*t|jSrE)rW__getitem__)r^s r@r=r=s4==$$r?ct|ttfstd|sdSt|tr|dd}ntd|D}|t|zs|St|d
fd|DS)zLike quote(), but accepts a bytes object rather than a str, and does
    not perform string-to-bytes encoding.  It always returns an ASCII string.
    quote_from_bytes(b'abc def?') -> 'abc%20def%3f'
    z!quote_from_bytes() expected bytesrrBignorecg|]
}|dk|S)r>)rSrs  r@
<listcomp>z$quote_from_bytes.<locals>.<listcomp>s111ASar?c&g|]
}|Sr>r>)rScharquoters  r@rrz$quote_from_bytes.<locals>.<listcomp>s!000TFF4LL000r?)r[r/	bytearrayr]r\rJrstrip_ALWAYS_SAFE_BYTESrQr=r)bsr^rus  @r@rrs
b5),--=;<<<
r$3{{7H--1111122
99'$.//yy{{
!$
'
'F
770000R000111r?cTt|dr|}nU	t|r"t|dtst
n"#t
$r}td|d}~wwxYwg}|s|D]\}}	t|tr
|||}n|t||||}t|	tr
||	|}	n|t|	|||}	||dz|	znw|D]s\}}	t|tr
|||}n|t||||}t|	tr(||	|}	||dz|	zt|	tr*||	|||}	||dz|	z	t|	}
|	D]Z}t|tr
|||}n|t||||}||dz|z[.#t
$r:|t|	|||}	||dz|	zYqwxYwd	|S)a^Encode a dict or sequence of two-element tuples into a URL query string.

    If any values in the query arg are sequences and doseq is true, each
    sequence element is converted to a separate parameter.

    If the query arg is a sequence of two-element tuples, the order of the
    parameters in the output will match the order of parameters in the
    input.

    The components of a query arg may each be either a string or a bytes type.

    The safe, encoding, and errors parameters are passed down to the function
    specified by quote_via (encoding and errors only if a component is a str).
    itemsrz1not a valid non-string sequence or mapping objectNrFr;)
hasattrr{rr[rVr]r/r\rr)rdoseqr^rKrL	quote_viaerrlkrrTelts            r@r
r
s"ug:

	:5zz
 *U1Xu"="=
 
	:	:	:01169
:	:	A(0
	"
	"DAq!U##
>Ia&&Ic!ffdHf==!U##
>Ia&&Ic!ffdHf==
HHQWq[!!!!
	"	0	0DAq!U##
>Ia&&Ic!ffdHf==!U##
0Ia&&S1%%%%As##
0Iax88S1%%%%0AA !00%c511N"+)C"6"6CC"+)CHHdHf"M"MCS3////0
!***!	#a&&$&AAAHHQWq[)))))*88A;;s*1A
A8#A33A8 IAJJcXtjdtdt|S)Nz/urllib.parse.to_bytes() is deprecated as of 3.8rrR)rTrUrV	_to_bytesrs r@to_bytesrs/MC$4444S>>r?ct|trY	|d}n0#t$r#t	dt|zdzwxYw|S)zto_bytes(u"URL") --> 'URL'.ASCIIzURL z contains non-ASCII characters)r[r\rJrQUnicodeErrorreprrs r@rrs
#sA	A**W%%,,..CC	A	A	AvS		1? @AA
A	AJs	'?-A,ct|}|dddkr*|dddkr|dd}|dddkr|dd}|S)zTransform a string like '<URL:scheme://host/path>' into 'scheme://host/path'.

    The string is returned unchanged if it's not a wrapped URL.
    NrZ<rrazURL:)r\rrs r@unwrapr
s~
c((..

C
2A2w#~~#bcc(c//!B$ioo
2A2w&!""gmmooJr?cXtjdtdt|S)NzUurllib.parse.splittype() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrR)rTrUrV
_splittypers r@	splittyper3M8$4444c??r?cttjdtjat|}|r-|\}}||fSd|fS)z:splittype('type:opaquestring') --> 'type', 'opaquestring'.Nz
([^/:]+):(.*))	_typeprogrcompileDOTALLrgroupsr)rrrdatas    r@rr"sdJ	::	OOC  E$||~~||~~t##9r?cXtjdtdt|S)NzUurllib.parse.splithost() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrR)rTrUrV
_splithostrs r@	splithostr/rr?cttjdtjat|}|r.|\}}|r|ddkrd|z}||fSd|fS)z;splithost('//host[:port]/path') --> 'host[:port]', '/path'.Nz//([^/#?]*)(.*)rr)	_hostprogrrrrr)rr	host_portrs    r@rr7syJ0")<<	OOC  E,,..	4	DGsNN:D$9r?cXtjdtdt|S)NzUurllib.parse.splituser() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrR)rTrUrV
_splituserhosts r@	splituserrF5M8$4444dr?cD|d\}}}|r|nd|fS)zJsplituser('user[:passwd]@host[:port]') --> 'user[:passwd]', 'host[:port]'.rNr)ruserrs   r@rrMs.,,D%#DDtd**r?cXtjdtdt|S)NzWurllib.parse.splitpasswd() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrR)rTrUrV_splitpasswd)rs r@splitpasswdrSs5M8$4444r?cD|d\}}}||r|ndfS)z/splitpasswd('user:passwd') -> 'user', 'passwd'.rNr)rrpasswds   r@rrZs...--D%E+&&t,,r?cXtjdtdt|S)NzUurllib.parse.splitport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrR)rTrUrV
_splitportrs r@	splitportr`rr?cttjdtjat|}|r|\}}|r||fS|dfS)z*splitport('host:port') --> 'host', 'port'.Nz
(.*):([0-9]*))	_portprogrrr	fullmatchr)rrrs   r@rriseJ	::	%%E\\^^
d	::r?rcZtjdtdt||S)NzVurllib.parse.splitnport() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrR)rTrUrV_splitnport)rdefports  r@
splitnportrws7M8$4444tW%%%r?c|d\}}}|s|}n@|r>|r$|rt|}nd}||fS||fS)zSplit host and port, returning numeric port.
    Return given default port if no ':' found; defaults to -1.
    Return numerical port if a valid number is found after ':'.
    Return None if ':' but not a valid number.rN)rrrr)rrrrnports     r@rr~sx
,,D%	
<<>>	dllnn	IIEEEU{=r?cXtjdtdt|S)NzVurllib.parse.splitquery() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrR)rTrUrV_splitqueryrs r@
splitqueryrs5M8$4444sr?cH|d\}}}|r||fS|dfS)z/splitquery('/path?query') --> '/path', 'query'.rNr)rrrrs    r@rrs6,,D%U{9r?cXtjdtdt|S)NzTurllib.parse.splittag() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrR)rTrUrV	_splittagrs r@splittagrs3M8$4444S>>r?cH|d\}}}|r||fS|dfS)z)splittag('/path#tag') --> '/path', 'tag'.rNr)rrrtags    r@rrs6~~c**D%Sy9r?cXtjdtdt|S)NzUurllib.parse.splitattr() is deprecated as of 3.8, use urllib.parse.urlparse() insteadrrR)rTrUrV
_splitattrrs r@	splitattrrrr?cP|d}|d|ddfS)zksplitattr('/path;attr1=value1;attr2=value2;...') ->
        '/path', ['attr1=value1', 'attr2=value2', ...].rrrZN)r)rwordss  r@rrs*
IIcNNE8U122Yr?cXtjdtdt|S)NzWurllib.parse.splitvalue() is deprecated as of 3.8, use urllib.parse.parse_qsl() insteadrrR)rTrUrV_splitvalue)attrs r@
splitvaluers5M9$4444tr?cD|d\}}}||r|ndfS)z-splitvalue('attr=value') --> 'attr', 'value'.rFNr)rrrDs   r@rrs.,,D%5*%%d++r?)rT)r)T)r,r)FFr,rNr;)rNN)rNN)r)r)lrncollectionsr	functoolsrsysrrTr__all__rrrnon_hierarchical
uses_query
uses_fragmentrrrrA_implicit_encoding_implicit_errorsrGrMrXr`objectrbrrrwrr_DefragResultBase_SplitResultBase_ParseResultBaserrrrrrr
ResultBaserrrrrrrrrrrr	lru_cacherrr	rrr.r2rrr9rrrr	frozensetr\r/rxrYrbrWr
rr=rr
rrrrrrrrrrrrrrrrrrrrrrrrrrr>r?r@<module>rsB#"""""				



HHH000
---FFFAAA
%%%
\100'''"4/((((!3.HHHH222"VVVVVfVVVVVVVVVVV#8#8#8#8#8V#8#8#8L2O<46G<J~~>>:688:=??!K&"#N#!"%!
#3"9"A"2"9"A 0 5 =#
"2!7!?$4$=$E!#
$o     "$9   
     "$9   )+<     ')@   
     ')@   111""""<))))DDD(GGG4   666! 6p	N	N	N&B:B:B:B:J666 #

<2:&''8:?PS''''T;@QTA
A
A
A
F----y!""U<((KKKd*4*4*4*4*l$$$$$%%%2222(!rD"MMMM`



	



	+++---
	&&&&",,,,,r?