python (3.11.7)

(root)/
lib/
python3.11/
html/
__pycache__/
parser.cpython-311.opt-1.pyc

eBdZddlZddlZddlmZdgZejdZejdZejdZ	ejdZ
ejd	Zejd
ZejdZ
ejdZejd
ZejdejZejd
ZejdZGddejZdS)zA parser for HTML and XHTML.N)unescape
HTMLParserz[&<]z
&[a-zA-Z#]z%&([a-zA-Z][-.a-zA-Z0-9]*)[^a-zA-Z0-9]z)&#(?:[0-9]+|[xX][0-9a-fA-F]+)[^0-9a-fA-F]z	<[a-zA-Z]>z--\s*>z+([a-zA-Z][^\t\n\r\f />\x00]*)(?:\s|/(?!>))*z]((?<=[\'"\s/])[^\s/>][^\s/=>]*)(\s*=+\s*(\'[^\']*\'|"[^"]*"|(?![\'"])[^>\s]*))?(?:\s|/(?!>))*aF
  <[a-zA-Z][^\t\n\r\f />\x00]*       # tag name
  (?:[\s/]*                          # optional whitespace before attribute name
    (?:(?<=['"\s/])[^\s/>][^\s/=>]*  # attribute name
      (?:\s*=+\s*                    # value indicator
        (?:'[^']*'                   # LITA-enclosed value
          |"[^"]*"                   # LIT-enclosed value
          |(?!['"])[^>\s]*           # bare value
         )
        \s*                          # possibly followed by a space
       )?(?:\s|/(?!>))*
     )*
   )?
  \s*                                # trailing whitespace
z#</\s*([a-zA-Z][-.a-zA-Z0-9:_]*)\s*>ceZdZdZdZdddZdZdZdZd	Z	d
Z
dZdZd
Z
dZddZdZdZdZdZdZdZdZdZdZdZdZdZdZdZd	S) raEFind tags and other markup and call handler functions.

    Usage:
        p = HTMLParser()
        p.feed(data)
        ...
        p.close()

    Start tags are handled by calling self.handle_starttag() or
    self.handle_startendtag(); end tags by self.handle_endtag().  The
    data between tags is passed from the parser to the derived class
    by calling self.handle_data() with the data as argument (the data
    may be split up in arbitrary chunks).  If convert_charrefs is
    True the character references are converted automatically to the
    corresponding Unicode character (and self.handle_data() is no
    longer split in chunks), otherwise they are passed by calling
    self.handle_entityref() or self.handle_charref() with the string
    containing respectively the named or numeric reference as the
    argument.
    )scriptstyleT)convert_charrefsc<||_|dS)zInitialize and reset this instance.

        If convert_charrefs is True (the default), all character references
        are automatically converted to the corresponding Unicode characters.
        N)r	reset)selfr	s  ?/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/html/parser.py__init__zHTMLParser.__init__Vs!1

cd|_d|_t|_d|_t
j|dS)z1Reset this instance.  Loses all unprocessed data.z???N)rawdatalasttaginteresting_normalinteresting
cdata_elem_markupbase
ParserBaserrs r
rzHTMLParser.reset_s<-$$T*****rcN|j|z|_|ddS)zFeed data to the parser.

        Call this as often as you want, with as little or as much text
        as you want (may include '\n').
        rN)rgoaheadrdatas  r
feedzHTMLParser.feedgs%|d*Qrc0|ddS)zHandle any buffered data.N)rrs r
closezHTMLParser.closepsQrNc|jS)z)Return full source of start tag: '<...>'.)_HTMLParser__starttag_textrs r
get_starttag_textzHTMLParser.get_starttag_textvs##rc||_tjd|jztj|_dS)Nz</\s*%s\s*>)lowerrrecompileIr)relems  r
set_cdata_modezHTMLParser.set_cdata_modezs4**,,:nt&FMMrc,t|_d|_dSN)rrrrs r
clear_cdata_modezHTMLParser.clear_cdata_mode~s-rc|j}d}t|}||kr|jr}|jsv|d|}|dkrY|dt
||dz
}|dkr*tjd	||sn|}n=|j
	||}|r|}n|jrnZ|}||krV|jr2|js+|t|||n|||||||}||krn|j}|d|rt ||r||}	n|d|r||}	n|d|r||}	nj|d|r||}	nH|d	|r||}	n&|d
z|kr|d|d
z}	nn|	dkr|sn|d|d
z}	|	dkr%|d|d
z}	|	dkr|d
z}	n|	d
z
}	|jr2|js+|t|||	n||||	|||	}n#|d|rt.||}|rq|d
d}
||
|}	|d|	d
z
s|	d
z
}	|||	}d||dvr9||||d
z|||d
z}nI|d|r5t6||}|rj|d
}
||
|}	|d|	d
z
s|	d
z
}	|||	}kt:||}|rX|rU|||dkr5|}	|	|kr|}	|||d
z}n@|d
z|kr/|d|||d
z}nn||k|ry||krs|jsl|jr2|js+|t|||n|||||||}||d|_dS)Nr<&"z[\s;]z</<!--z<?z<!r rz&#;)rlenr	rfindrfindmaxr'r(searchrstarthandle_datar	updatepos
startswithstarttagopenmatchparse_starttagparse_endtag
parse_commentparse_piparse_html_declarationcharrefgrouphandle_charrefend	entityrefhandle_entityref
incomplete)rrJrinjampposrAr?knames           r
rzHTMLParser.goaheads),
LL!ee$
T_
LLa((q55%]]3Aqt==F!Jx0077HH$A(//;;

AAA1uu(33$$Xgacl%;%;<<<<$$WQqS\222q!$$AAvvu +Jz#q!!J
6%%gq11++A..AAZa(())!,,AAZ**
**1--AAZa((

a((AAZa((33A66AA!eq[[$$S)))AAAq55S!a%00A1uu#LLa!e44q55 !AAQ,7T_7(('!A#,)?)?@@@@((1666NN1a((D!$$+
6

gq11 ;;==2.D''---		A%:c1Q3//"Eq!,,Agabbk))((1Q3888 NN1ac22C##
6!33 ;;q>>D))$///		A%:c1Q3//"Eq!,,A"((!445u{{}};;!IIKK66 !A NN1a!e44!eq[[$$S)))q!a%00AAO!eeV	%1q555$
/T_
/  '!A#,!7!78888  1...q!$$Aqrr{rc|j}|||dzdkr||S|||dzdkr||S|||dzdkrF|d|dz}|dkrdS|||d	z||d
zS||S)Nr3z<![	z	<!doctyperr5r4r )rrDparse_marked_sectionr&r8handle_declparse_bogus_comment)rrNrgtposs    r
rFz!HTMLParser.parse_html_declarations,1QqS5>V##%%a(((
QqsU^u
$
$,,Q///
QqsU^
!
!
#
#{
2
2LLac**E{{rWQqSY/0007N++A...rr c|j}|d|dz}|dkrdS|r |||dz||dzS)Nrr4r5r )rr8handle_comment)rrNreportrposs     r
rZzHTMLParser.parse_bogus_commentsb,ll3!$$"992	2!C 0111Qwrc|j}t||dz}|sdS|}|||dz||}|S)Nr4r5)rpicloser;r<	handle_pirJ)rrNrrArPs     r
rEzHTMLParser.parse_pi sj,w!,,	2KKMMwqsAv'''IIKKrc>d|_||}|dkr|S|j}||||_g}t||dz}|}|dx|_}||krt||}|sn|ddd\}	}
}|
sd}nI|dddcxkr|ddks"n|dddcxkr|ddkr
nn
|dd}|rt|}||	|f|}||k|||}|dvr|
||||S|d	r|||n4|||||jvr|||S)
Nrr r4rV'r5")r/>rf)r#check_for_whole_start_tagrtagfind_tolerantrArJrHr&rattrfind_tolerantrappendstripr=endswithhandle_startendtaghandle_starttagCDATA_CONTENT_ELEMENTSr+)
rrNendposrattrsrArRtagmattrnamerest	attrvaluerJs
             r
rBzHTMLParser.parse_starttag,sU#//22A::M,&qx0 &&w!44IIKK"[[^^11333s&jj!''33A
()1a(8(8%HdI
, 		2A2$8888)BCC.88882A2#777723377777%adO	
0$Y//	LL(..**I6777A&jjah%%''k!!WQvX.///M<<	)##C////  e,,,d111##C(((
rc|j}t||}|r|}|||dz}|dkr|dzS|dkr@|d|r|dzS|d|rdS||kr|S|dzS|dkrdS|dvrdS||kr|S|dzStd	)
Nr r/rfr4r5rz6abcdefghijklmnopqrstuvwxyz=/ABCDEFGHIJKLMNOPQRSTUVWXYZzwe should not get here!)rlocatestarttagend_tolerantrArJr?AssertionError)rrNrrsrPnexts      r
rgz$HTMLParser.check_for_whole_start_tagXs,&,,Wa88	A1QqS5>Ds{{1us{{%%dA..!q5L%%c1--2q55Hq5Lrzzr566r1uu1u6777rcp|j}t||dz}|sdS|}t||}|s|j|||||St||dz}|s+|||dzdkr|dzS|	|S|
d}|d|}|
||dzS|
d}|j*||jkr|||||S|
|||S)Nr r5r4rVz</>r)r	endendtagr;rJ
endtagfindrArr=rhrZrHr&r8
handle_endtagr.)rrNrrAr[	namematchtagnamer*s        r
rCzHTMLParser.parse_endtagzs,  !A#..	2		  !,,	*  5!1222(..w!<<I
71QqS5>U**Q3J33A666ooa((..00G
LLimmoo66Ew'''7N{{1~~##%%?&t&&  5!12224   rc\|||||dSr-)rnrrrrrqs   r
rmzHTMLParser.handle_startendtags2S%(((3rcdSr-rs   r
rnzHTMLParser.handle_starttagrcdSr-r)rrrs  r
rzHTMLParser.handle_endtagrrcdSr-rrrSs  r
rIzHTMLParser.handle_charrefrrcdSr-rrs  r
rLzHTMLParser.handle_entityrefrrcdSr-rrs  r
r=zHTMLParser.handle_datarrcdSr-rrs  r
r]zHTMLParser.handle_commentrrcdSr-r)rdecls  r
rYzHTMLParser.handle_declrrcdSr-rrs  r
rbzHTMLParser.handle_pirrcdSr-rrs  r
unknown_declzHTMLParser.unknown_declrr)r )__name__
__module____qualname____doc__rorrrr!r#r$r+r.rrFrZrErBrgrCrmrnrrIrLr=r]rYrbrrrr
rr>s*1+/+++O$$$NNNu#u#u#t///*							(((X888D%%%P   





























r)rr'rhtmlr__all__r(rrMrKrGr@racommentcloserhriVERBOSEryr}r~rrrrr
<module>rsm""
			. RZ''
RZ
%
%
BJ>??	
"*@
A
Arz+&&
"*S//rz)$$2:LMMBJ=>>(RZ)Z
BJsOO	RZ>
?
?
I
I
I
I
I
'I
I
I
I
I
r