+
    	ic                    6   ^RI Ht ^RIHtHtHtHtHtHtH	t	H
t
HtHtHtHtHtHt ^RIHt ^RIHtHt RSR lt ! R R4      tR t ! R	 R
4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t ! R R]4      t  ! R R]4      t! ! R R]4      t" ! R R]4      t# ! R R ]4      t$ ! R! R"]4      t% ! R# R$]4      t& ! R% R&]4      t' ! R' R(]4      t( ! R) R*]4      t) ! R+ R,]4      t* ! R- R.]4      t+ ! R/ R0]4      t, ! R1 R2]4      t- ! R3 R4]4      t. ! R5 R6]4      t/ ! R7 R8]4      t0/ R9]bR:]bR;]bR<]bR=]bR>]bR?] bR@]!bRA]"bRB]#bRC]$bRD]%bRE]&bRF]'bRG](bRH])bRI]*bRJ]+RK],RL]-RM].RN]/RO]0/Ct1RP t2RTRR lt3RQ# )U   )inputstream)ReparseErrorTokenadjust_foreign_attributesadjust_mathml_attributesadjust_svg_attributesascii_upper_to_lowercdata_elementsheading_elementshtml_integration_point_elements&mathml_text_integration_point_elements
namespacesrcdata_elementsspace_charactersspecial_elements)HTMLTokenizer)MarkerTreeBuilderc                :    \        V4      P                  ! V 3/ VB # )up  Parse an HTML document into a tree.

:param document:
    The document to parse as a HTML string, filename, file-like object.
:type document:
    :class:`str`, :class:`bytes`, :class:`pathlib.Path` or
    :term:`file object`
:param bool namespace_html_elements:
    Whether or not to namespace HTML elements.

Extra parameters can be provided to define possible encodings if the
document is given as :class:`bytes`.

:param override_encoding: Forced encoding provided by user agent.
:type override_encoding: str or bytes
:param transport_encoding: Encoding provided by transport layout.
:type transport_encoding: str or bytes
:param same_origin_parent_encoding: Parent document encoding.
:type same_origin_parent_encoding: str or bytes
:param likely_encoding: Possible encoding provided by user agent.
:type likely_encoding: str or bytes
:param default_encoding: Encoding used as fallback.
:type default_encoding: str or bytes

:returns: :class:`xml.etree.ElementTree.Element`.

Example:

>>> from tinyhtml5 import parse
>>> parse('<html><body><p>This is a doc</p></body></html>')
<Element '{http://www.w3.org/1999/xhtml}html' at …>

)
HTMLParserparse)documentnamespace_html_elementskwargss   &&,V/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/tinyhtml5/parser.pyr   r      s!    D -.44XHHH    c                      a  ] tR t^;t o RtRR ltRR ltR t]R 4       t	R t
R tR	 tRR
 ltRR ltRR ltR tR tR tR tR tRtV tR# )r   zUHTML parser.

Generate a tree structure from a stream of (possibly malformed) HTML.

c           	         \        V4      V n        . V n        \        P	                  4        UUu/ uF  w  r#W#! W P                  4      bK  	  uppV n        R # u uppi N)r   treeerrors_phasesitemsphases)selfr   nameclss   &&  r   __init__HTMLParser.__init__B   sE     78	CJ==?S?idtSyy11?SSs   ANc                    W n         W0n        \        V3R V /VB V n        V P	                  4         V P                  4        R#   \         d%    T P	                  4        T P                  4         R# i ; i)parserN)	container	scriptingr   	tokenizerreset	main_loopr   )r%   streamr,   r-   r   s   &&&&,r   _parseHTMLParser._parseG   s\    ""&vEdEfE

	NN 	JJLNN	s   A +A21A2c                   V P                   P                  4        R V n        . V n        RV n        V P
                  '       d   V P
                  \        9   d'   V P                  P                  V P                  n	        MsV P
                  \        9   d'   V P                  P                  V P                  n	        M8V P
                  R8X  d'   V P                  P                  V P                  n	        M V P                  R,          V n        V P                  P                  4        V P!                  4        MV P                  R,          V n        RV n        RV n        RV n        R# )Fz	no quirks	plaintextbefore htmlinitialNT)r    r/   first_start_tagr!   compatibility_moder,   r
   r.   rcdata_statestater   rawtext_stateplaintext_stater$   phase_insert_html_elementreset_insertion_mode
last_phasebefore_rcdata_phaseframeset_okr%   s   &r   r/   HTMLParser.resetR   s    		$"->>>~~/'+~~'B'B$?2'+~~'C'C$;.'+~~'E'E$ ]3DJJJ++-%%'Y/DJ#' r   c                    \        V R4      '       d2   V P                  P                  P                  ^ ,          P                  # R# )zvName of the character encoding that was used to decode the input stream.

:obj:`None` if that is not determined yet.

r.   N)hasattrr.   r1   encodingr&   rD   s   &r   rH   HTMLParser.encodingo   s7     4%%>>((11!4999 &r   c                    VP                   VP                  3pV\        R ,          R38X  dA   RVP                  9   ;'       d*    VP                  R,          P	                  \
        4      R9   # V\        9   # )mathmlannotation-xmlrH   )z	text/htmlzapplication/xhtml+xml)	namespacer&   r   
attributes	translater	   r   r%   element	full_names   && r   is_html_integration_point$HTMLParser.is_html_integration_pointy   sv    &&5	H-/?@@g000 7 7"":.889MN678 ;;;r   c                D    VP                   VP                  3pV\        9   # r   )rM   r&   r   rP   s   && r    is_mathml_text_integration_point+HTMLParser.is_mathml_text_integration_point   s"    &&5	BBBr   c                   V P                    EFa  pR pTpVEe   TpV P                  P                  '       d   V P                  P                  R,          MR pV'       d   VP                  MR pV'       d   VP                  MR pVR,          pV\
        P                  8X  d.   V P                  VR,          VP                  R/ 4      4       R pK  \        V P                  P                  4      ^ 8X  Eg   WPP                  P                  8X  g   V P                  V4      '       dT   V\
        P                  8X  d   VR,          \        RR.4      9  g   V\
        P                  \
        P                  39   g   V\         R,          8X  d+   VR8X  d$   V\
        P                  8X  d   VR,          R	8X  gL   V P#                  V4      '       dB   V\
        P                  \
        P                  \
        P                  39   d   V P$                  pMV P&                  R
,          pV\
        P                  8X  d   VP)                  V4      pEK2  V\
        P                  8X  d   VP+                  V4      pEK[  V\
        P                  8X  d   VP-                  V4      pEK  V\
        P.                  8X  d   VP1                  V4      pEK  V\
        P2                  8X  d   VP5                  V4      pEK  V\
        P6                  8X  g   EK  VP9                  V4      pEK  X\
        P                  8X  g   EK"  VR,          '       g   EK4  VR,          '       d   EKF  V P                  RRVR,          /4       EKd  	  Rp	. p
V	'       dU   V
P;                  V P$                  4       V P$                  P=                  4       p	V	'       g   KG  V P$                  V
9  d   KZ  Q hR # )Ntypedatadatavarsr&   mglyph
malignmarkrK   rL   svgin foreign contentselfClosingselfClosingAcknowledgedz&non-void-element-with-trailing-solidusT)r.   r    open_elementsrM   r&   r   PARSE_ERRORparse_errorgetlendefault_namespacerV   	START_TAG	frozenset
CHARACTERSSPACE_CHARACTERSr   rS   r>   r$   process_charactersprocess_space_charactersprocess_start_tagEND_TAGprocess_end_tagCOMMENTprocess_commentDOCTYPEprocess_doctypeappendprocess_eof)r%   tokenprevious_token	new_tokencurrent_nodecurrent_node_namespacecurrent_node_namerY   r>   	reprocessr$   s   &          r   r0   HTMLParser.main_loop   s   ^^E!NI'!*37993J3J3JDII++B/PT  /;L** '9EL$5$54! (5,,,$$Yv%6	jRT8UV $IDII3349.))2M2MM>>|LL5??2 =	8\:R0SS5#3#3U5K5K"LL/:h3GG*.>>0v%/77EE$!OOU-=-=!22S4 K4 !%

 $,@ Au///$)$<$<Y$G	!7!77$)$B$B9$M	0$)$;$;I$F	.$)$9$9)$D	.$)$9$9)$D	.$)$9$9)$D	'N=,I,I&'@AA  <^F346c $l 	MM$**%

..0Iyzz///	 r   c                ^    V P                   ! V3/ VB  V P                  P                  V4      # )zfParse a HTML document into a well-formed tree.

If ``full_tree`` is ``True``, return the whole tree.

)r2   r    get_document)r%   r1   	full_treer   s   &&&,r   r   HTMLParser.parse   s*     	F%f%yy%%i00r   c                `    V P                   ! V3RV/VB  V P                  P                  4       # )uw   Parse a HTML fragment into a well-formed tree fragment.

``container`` is the tag name of the fragment’s container.

r,   )r2   r    get_fragment)r%   r1   r,   r   s   &&&,r   parse_fragmentHTMLParser.parse_fragment   s-     	F:i:6:yy%%''r   c                    Vf   / pV P                   P                  V P                  P                  P	                  4       W34       R # r   )r!   rv   r.   r1   position)r%   	errorcoder[   s   &&&r   re   HTMLParser.parse_error   s7    HDNN11::<iRSr   c                &    \        V\        4       R # r   )adjust_attributesr   r%   rx   s   &&r   r   #HTMLParser.adjust_mathml_attributes   s    %!9:r   c                &    \        V\        4       R # r   )r   r   r   s   &&r   r    HTMLParser.adjust_svg_attributes   s    %!67r   c                &    \        V\        4       R # r   )r   r   r   s   &&r   r   $HTMLParser.adjust_foreign_attributes   s    %!:;r   c                T   R pRRRRRRRRRR	R
R	RR	RRRRRRRRRRRRRR/pV P                   P                  RRR1,           F  pVP                  pRpW0P                   P                  ^ ,          8X  d#   V P                  '       g   Q hRpV P                  pVR9   d   V P                  '       g   Q hV'       g(   VP                  V P                   P
                  8w  d   K  WB9   d   V P                  W$,          ,          p M!V'       g   K  V P                  R,          p M	  XV n        R# )Fselect	in selecttdin cellthtrin rowtbodyin table bodytheadtfootcaption
in captioncolgroupin column grouptablein tableheadin bodybodyframesetin framesethtmlbefore headNTrb   )r   r   r   r   )r    rc   r&   r,   rM   rh   r$   r>   )r%   last	new_modesnode	node_name	new_phases   &     r   r@   HTMLParser.reset_insertion_mode   s#    k))(___|)ZIIM
	  II++DbD11D		IIyy..q11~~~%~ NN	BB~~~%~DNNdii.I.II% KK	(<=	 KK	2	' 2* 
r   c                D   VR9   g   Q hV P                   P                  V4       VR 8X  d'   V P                  P                  V P                  n        M%V P                  P
                  V P                  n        V P                  V n        V P                  R,          V n        R# )RAWTEXTtextN)r   RCDATA)	r    insert_elementr.   r<   r;   r:   r>   original_phaser$   )r%   rx   content_types   &&&r   parse_rcdata_rawtextHTMLParser.parse_rcdata_rawtext  ss    4444		  '9$#'>>#?#?DNN #'>>#>#>DNN "jj[[(
r   )rB   r9   r,   r!   r8   rC   rA   r   r>   r$   r-   r.   r    T)NF)F)divr   )__name__
__module____qualname____firstlineno____doc__r(   r2   r/   propertyrH   rS   rV   r0   r   r   re   r   r   r   r@   r   __static_attributes____classdictcell____classdict__s   @r   r   r   ;   sn     T
	 : : :<C=0~1(T
;8<)V) )r   r   c           	          V  UUUu/ uF)  w  r\        V\        4      '       d   V3MT F  pW2bK  	  K+  	  uppp# u upppi r   )
isinstancestr)r#   keysvaluekeys   &   r   dispatchr      sM     ! KD)$44TG$>C 	
> 	   s   /;c                   ^   a  ] tR tRt o RtRtR tR tR tR t	R t
R tR	 tR
 tR tRtV tR# )Phasei(  z?Base class for helper that implements each phase of processing.c                :    Wn         W n        / V n        / V n        R # r   )r+   r    _Phase__start_tag_cache_Phase__end_tag_cache)r%   r+   r    s   &&&r   r(   Phase.__init__,  s    	!#!r   c                    \         hr   )NotImplementedErrorrD   s   &r   rw   Phase.process_eof2  s    !!r   c                r    V P                   P                  WP                   P                  R,          4       R# r   Nrb   r    insert_commentrc   r   s   &&r   rs   Phase.process_comment5  s%     			  		(?(?(CDr   c                <    V P                   P                  R 4       R# )zunexpected-doctypeNr+   re   r   s   &&r   ru   Phase.process_doctype:  s     45r   c                J    V P                   P                  VR ,          4       R# rZ   Nr    insert_textr   s   &&r   rm   Phase.process_characters=      		eFm,r   c                J    V P                   P                  VR ,          4       R# r   r   r   s   &&r   rn   Phase.process_space_characters@  r   r   c                   VR ,          pW P                   9   d   V P                   V,          pMV P                  P                  V\        V 4      P                  4      ;q0P                   V&   \        V P                   4      \        V P                  4      R,          8  d:   V P                   P                  \        \        V P                   4      4      4       Km  V! W4      # r&   g?)	r   start_tag_handlerrf   rY   start_tag_otherrg   popnextiterr%   rx   r&   functions   &&  r   ro   Phase.process_start_tagC  s    V} )))--d3H6:6L6L6P6Pd4j0072 2H--d3 d,,-D4J4J0Kc0QQ&&**4T5K5K0L+MN$$r   c                   V P                   P                  '       g*   VR ,          R8X  d   V P                   P                  R4       VR,          P                  4        F[  w  r#W P                  P
                  ^ ,          P                  9  g   K2  W0P                  P
                  ^ ,          P                  V&   K]  	  RV P                   n        R# )r&   r   znon-html-rootrZ   FN)r+   r8   re   r#   r    rc   rN   r%   rx   attrr   s   &&  r   start_tag_htmlPhase.start_tag_htmlR  s    {{***uV}/FKK##O4 !=..0KD992215@@@>C		''*55d; 1 ',#r   c                   VR ,          pW P                   9   d   V P                   V,          pMV P                  P                  V\        V 4      P                  4      ;q0P                   V&   \        V P                   4      \        V P                  4      R,          8  d:   V P                   P                  \        \        V P                   4      4      4       Km  V! W4      # r   )	r   end_tag_handlerrf   rY   end_tag_otherrg   r   r   r   r   s   &&  r   rq   Phase.process_end_tag\  s    V} '''++D1H484H4H4L4Ld4j..50 0H++D1 d**+c$2F2F.G#.MM$$((d43G3G.H)IJ$$r   )__end_tag_cache__start_tag_cacher+   r    N)r   r   r   r   r   	__slots__r(   rw   rs   ru   rm   rn   ro   r   rq   r   r   r   s   @r   r   r   (  s@     IJI""E
6--%,% %r   r   c                   ^   a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
tV tR# )InitialPhaseil  c                    R # r    r   s   &&r   rn   %InitialPhase.process_space_characterso      r   c                d    V P                   P                  WP                   P                  4       R # r   r    r   r   r   s   &&r   rs   InitialPhase.process_commentr      		  		(:(:;r   c                   VR ,          pVR,          pVR,          pVR,          pVR8w  g   Vf   Ve#   VR8w  d   V P                   P                  R4       Vf   RpV P                  P                  V4       VR8w  d   VP	                  \
        4      pV'       de   VR ,          R8w  gW   VP                  R4      '       g@   VR9   g9   VP                  R4      '       d   Ve   V'       d(   VP                  4       R	8X  d   R
V P                   n        MCVP                  R4      '       g   VP                  R4      '       d   Ve   RV P                   n        V P                   P                  R,          V P                   n
        R# )r&   publicIdsystemIdcorrectr   Nzabout:legacy-compatzunknown-doctype z:http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtdquirkszlimited quirksr6   )7z*+//silmaril//dtd html pro v0r11 19970101//z4-//advasoft ltd//dtd html 3.0 aswedit + extensions//z*-//as//dtd html 3.0 aswedit + extensions//z-//ietf//dtd html 2.0 level 1//z-//ietf//dtd html 2.0 level 2//z&-//ietf//dtd html 2.0 strict level 1//z&-//ietf//dtd html 2.0 strict level 2//z-//ietf//dtd html 2.0 strict//z-//ietf//dtd html 2.0//z-//ietf//dtd html 2.1e//z-//ietf//dtd html 3.0//z-//ietf//dtd html 3.2 final//z-//ietf//dtd html 3.2//z-//ietf//dtd html 3//z-//ietf//dtd html level 0//z-//ietf//dtd html level 1//z-//ietf//dtd html level 2//z-//ietf//dtd html level 3//z"-//ietf//dtd html strict level 0//z"-//ietf//dtd html strict level 1//z"-//ietf//dtd html strict level 2//z"-//ietf//dtd html strict level 3//z-//ietf//dtd html strict//z-//ietf//dtd html//z(-//metrius//dtd metrius presentational//z5-//microsoft//dtd internet explorer 2.0 html strict//z.-//microsoft//dtd internet explorer 2.0 html//z0-//microsoft//dtd internet explorer 2.0 tables//z5-//microsoft//dtd internet explorer 3.0 html strict//z.-//microsoft//dtd internet explorer 3.0 html//z0-//microsoft//dtd internet explorer 3.0 tables//z#-//netscape comm. corp.//dtd html//z*-//netscape comm. corp.//dtd strict html//z*-//o'reilly and associates//dtd html 2.0//z3-//o'reilly and associates//dtd html extended 1.0//z;-//o'reilly and associates//dtd html extended relaxed 1.0//zN-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//zE-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//z$-//spyglass//dtd html 2.0 extended//z+-//sq//dtd html 2.0 hotmetal + extensions//z--//sun microsystems corp.//dtd hotjava html//z4-//sun microsystems corp.//dtd hotjava strict html//z-//w3c//dtd html 3 1995-03-24//z-//w3c//dtd html 3.2 draft//z-//w3c//dtd html 3.2 final//z-//w3c//dtd html 3.2//z-//w3c//dtd html 3.2s draft//z-//w3c//dtd html 4.0 frameset//z#-//w3c//dtd html 4.0 transitional//z(-//w3c//dtd html experimental 19960712//z&-//w3c//dtd html experimental 970421//z-//w3c//dtd w3 html//z-//w3o//dtd w3 html 3.0//z#-//webtechs//dtd mozilla html 2.0//z-//webtechs//dtd mozilla html//)z$-//w3o//dtd w3 html strict 3.0//en//z"-/w3c/dtd html 4.0 transitional/enr   )z -//w3c//dtd html 4.01 frameset//z$-//w3c//dtd html 4.01 transitional//)z -//w3c//dtd xhtml 1.0 frameset//z$-//w3c//dtd xhtml 1.0 transitional//)r+   re   r    insert_doctyperO   r	   
startswithlowerr9   r$   r>   )r%   rx   r&   	public_id	system_idr  s   &&    r   ru   InitialPhase.process_doctypeu  se   V}*%	*%		"FNi3&98M+MKK##$56I		  '?!++,@AI5=F2$$8899 99t  & & %%=> > !y0L M-5DKK*""9: : ##;< < #-=DKK* KK..}=r   c                    R V P                   n        V P                   P                  R,          V P                   n        R# )r  r6   N)r+   r9   r$   r>   rD   s   &r   anything_elseInitialPhase.anything_else  s)    )1& KK..}=r   c                \    V P                   P                  R 4       V P                  4        V# )zexpected-doctype-but-got-charsr+   re   r  r   s   &&r   rm   InitialPhase.process_characters  s&     @Ar   c                p    V P                   P                  R RVR,          /4       V P                  4        V# )z"expected-doctype-but-got-start-tagr&   r  r   s   &&r   ro   InitialPhase.process_start_tag  s4    065=2I	Kr   c                p    V P                   P                  R RVR,          /4       V P                  4        V# )z expected-doctype-but-got-end-tagr&   r  r   s   &&r   rq   InitialPhase.process_end_tag  s4    .v0G	Ir   c                \    V P                   P                  R 4       V P                  4        R# )zexpected-doctype-but-got-eofTr  rD   s   &r   rw   InitialPhase.process_eof  s$     >?r   r  N)r   r   r   r   tupler   rn   rs   ru   r  rm   ro   rq   rw   r   r   r   s   @r   r   r   l  s;     I<`>D>
 r   r   c                   X   a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	tV tR
# )BeforeHtmlPhasei  c                    V P                   P                  \        R R4      4       V P                  P                  R,          V P                  n        R# )r   ri   r   N)r    insert_rootimplied_tag_tokenr+   r$   r>   rD   s   &r   r?   $BeforeHtmlPhase._insert_html_element  s7    		/DE KK..}=r   c                &    V P                  4        R # r   r?   rD   s   &r   rw   BeforeHtmlPhase.process_eof  s    !!#r   c                d    V P                   P                  WP                   P                  4       R # r   r  r   s   &&r   rs   BeforeHtmlPhase.process_comment  r  r   c                    R # r   r  r   s   &&r   rn   (BeforeHtmlPhase.process_space_characters   r  r   c                &    V P                  4        V# r   r(  r   s   &&r   rm   "BeforeHtmlPhase.process_characters  s    !!#r   c                d    VR ,          R8X  d   RV P                   n        V P                  4        V# )r&   r   T)r+   r8   r?   r   s   &&r   ro   !BeforeHtmlPhase.process_start_tag  s+    =F"*.DKK'!!#r   c                    VR ,          R9  d(   V P                   P                  RR VR ,          /4       R# V P                  4        V# )r&   zunexpected-end-tag-before-htmlNr   r   r   br)r+   re   r?   r   s   &&r   rq   BeforeHtmlPhase.process_end_tag  sC    = >>KK##065=2IK %%'Lr   r  N)r   r   r   r   r   r   r?   rw   rs   rn   rm   ro   rq   r   r   r   s   @r   r"  r"    s4     I>< r   r"  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 t]! R
]	3R]
3.4      t]! R]3.4      tRtV tR# )BeforeHeadPhasei  c                <    V P                  \        R R4      4       R# )r   ri   Tstart_tag_headr%  rD   s   &r   rw   BeforeHeadPhase.process_eof  s    -fkBCr   c                    R # r   r  r   s   &&r   rn   (BeforeHeadPhase.process_space_characters  r  r   c                <    V P                  \        R R4      4       V# r   ri   r9  r   s   &&r   rm   "BeforeHeadPhase.process_characters       -fkBCr   c                Z    V P                   P                  R ,          P                  V4      # r   r+   r$   ro   r   s   &&r   r   BeforeHeadPhase.start_tag_html$  "    {{!!),>>uEEr   c                    V P                   P                  V4       V P                   P                  R,          V P                   n        V P                  P
                  R,          V P                  n        R# )r   in headNrb   )r    r   rc   head_elementr+   r$   r>   r   s   &&r   r:  BeforeHeadPhase.start_tag_head'  sJ    		  '!%!8!8!<		 KK..y9r   c                <    V P                  \        R R4      4       V# r?  r9  r   s   &&r   r   BeforeHeadPhase.start_tag_other,  rA  r   c                <    V P                  \        R R4      4       V# r?  r9  r   s   &&r   end_tag_imply_head"BeforeHeadPhase.end_tag_imply_head0  rA  r   c                P    V P                   P                  R RVR,          /4       R# )zend-tag-after-implied-rootr&   Nr   r   s   &&r   r   BeforeHeadPhase.end_tag_other4  s      <vuV}>UVr   r   r   r  Nr3  )r   r   r   r   r   r   rw   rn   rm   r   r:  r   rN  r   r   r   r   r   r   r   s   @r   r7  r7    sr     IF:
W !	 	 " 
 	');<  Or   r7  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
 tR tR tR tR tR tR t]! R]3R]3R]3R]3R]3R]
3R]3R]	3.4      t]! R]3R]3.4      tRtV tR# )InHeadPhaseiA  c                &    V P                  4        R # r   r  rD   s   &r   rw   InHeadPhase.process_eofE      r   c                &    V P                  4        V# r   rU  r   s   &&r   rm   InHeadPhase.process_charactersI      r   c                Z    V P                   P                  R ,          P                  V4      # rC  rD  r   s   &&r   r   InHeadPhase.start_tag_htmlM  rF  r   c                <    V P                   P                  R 4       R# )z!two-heads-are-not-better-than-oneNr   r   s   &&r   r:  InHeadPhase.start_tag_headP  s     CDr   c                    V P                   P                  V4       V P                   P                  P                  4        R VR&   R# Tra   Nr    r   rc   r   r   s   &&r   start_tag_base_link_command'InHeadPhase.start_tag_base_link_commandS  5    		  '		##%+/'(r   c                   V P                   P                  V4       V P                   P                  P                  4        R VR&   VR,          pV P                  P
                  P                  P                  ^,          R8X  d   RV9   d9   V P                  P
                  P                  P                  VR,          4       R	# RV9   d   RV9   d   VR,          P                  4       R8X  d   \        P                  ! VR,          P                  R4      4      p\        P                  ! V4      pVP                  4       pV P                  P
                  P                  P                  V4       R	# R	# R	# R	# R	# )
Tra   rZ   	tentativecharsetcontentz
http-equivzcontent-typezutf-8N)r    r   rc   r   r+   r.   r1   rH   change_encodingr  r   EncodingBytesencodeContentAttributeParserr   )r%   rx   rN   rZ   r+   codecs   &&    r   start_tag_metaInHeadPhase.start_tag_metaX  s#   		  '		##%+/'(6]
;;  ''003{BJ&%%,,<<Z	=RSz)*,\*002nD
 #00I1F1M1Mg1VW$;;DA%%,,<<UC E - * Cr   c                >    V P                   P                  VR 4       R# )r   Nr+   r   r   s   &&r   start_tag_titleInHeadPhase.start_tag_titlem  s    ((9r   c                >    V P                   P                  VR 4       R# r   Nrq  r   s   &&r   start_tag_noframes_style$InHeadPhase.start_tag_noframes_stylep  s    ((	:r   c                   V P                   P                  '       d   V P                   P                  VR 4       R# V P                  P	                  V4       V P                   P
                  R,          V P                   n        R# )r   in head noscriptN)r+   r-   r   r    r   r$   r>   r   s   &&r   start_tag_noscriptInHeadPhase.start_tag_noscriptt  sT    ;;   KK,,UI>II$$U+ $ 2 23E FDKKr   c                P   V P                   P                  V4       V P                  P                  P                  V P                  P                  n        V P                  P                  V P                  n        V P                  P                  R ,          V P                  n        R# )r   N)	r    r   r+   r.   script_data_stater;   r>   r   r$   r   s   &&r   start_tag_scriptInHeadPhase.start_tag_script{  sg    		  '&*kk&;&;&M&M#%)[[%6%6" KK..v6r   c                &    V P                  4        V# r   rU  r   s   &&r   r   InHeadPhase.start_tag_other  rZ  r   c                   V P                   P                  P                  P                  4       pVP                  R 8X  g   Q RVP                   24       hV P                   P
                  R,          V P                   n        R# )r   zExpected head got 
after headNr+   r    rc   r   r&   r$   r>   r%   rx   r   s   && r   end_tag_headInHeadPhase.end_tag_head  s^    {{--113yyF"D&8$DD" KK..|<r   c                &    V P                  4        V# r   rU  r   s   &&r   end_tag_html_body_br InHeadPhase.end_tag_html_body_br  rZ  r   c                P    V P                   P                  R RVR,          /4       R# unexpected-end-tagr&   Nr   r   s   &&r   r   InHeadPhase.end_tag_other        4vuV}6MNr   c                :    V P                  \        R 4      4       R# )r   N)r  r%  rD   s   &r   r  InHeadPhase.anything_else  s    +F34r   r   titlenoscriptscriptmetar   r  N)noframesstyle)basebasefontbgsoundcommandlink)r4  r   r   )r   r   r   r   r   r   rw   rm   r   r:  rb  rn  rr  rv  rz  r~  r   r  r  r   r  r   r   r   r   r   r   s   @r   rS  rS  A  s     IFE0
D*:;G7=
O5 !	 	/"	 89	'(	#$	;	$	&	 	 
" 
 		!56  Or   rS  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
 tR tR tR t]! R]
3R]3R]3.4      t]! R]3R]3.4      tRtV tR# )InHeadNoscriptPhasei  c                \    V P                   P                  R 4       V P                  4        R# )zeof-in-head-noscriptTr  rD   s   &r   rw   InHeadNoscriptPhase.process_eof  s$     67r   c                Z    V P                   P                  R ,          P                  V4      # rH  )r+   r$   rs   r   s   &&r   rs   #InHeadNoscriptPhase.process_comment  "    {{!!),<<UCCr   c                \    V P                   P                  R 4       V P                  4        V# )zchar-in-head-noscriptr  r   s   &&r   rm   &InHeadNoscriptPhase.process_characters  s&     78r   c                Z    V P                   P                  R ,          P                  V4      # r  r+   r$   rn   r   s   &&r   rn   ,InHeadNoscriptPhase.process_space_characters  "    {{!!),EEeLLr   c                Z    V P                   P                  R ,          P                  V4      # rC  rD  r   s   &&r   r   "InHeadNoscriptPhase.start_tag_html  rF  r   c                Z    V P                   P                  R ,          P                  V4      # r  rD  r   s   &&r   rb  /InHeadNoscriptPhase.start_tag_base_link_command  rF  r   c                P    V P                   P                  R RVR,          /4       R# unexpected-start-tagr&   Nr   r   s   &&r   start_tag_head_noscript+InHeadNoscriptPhase.start_tag_head_noscript        6v8OPr   c                p    V P                   P                  R RVR,          /4       V P                  4        V# zunexpected-inhead-noscript-tagr&   r  r   s   &&r   r   #InHeadNoscriptPhase.start_tag_other  4    ,vuV}.E	Gr   c                   V P                   P                  P                  P                  4       pVP                  R 8X  g   Q RVP                   24       hV P                   P
                  R,          V P                   n        R# )r  zExpected noscript got rH  Nr  r  s   && r   end_tag_noscript$InHeadNoscriptPhase.end_tag_noscript  s^    {{--113yyJ&L*@(LL& KK..y9r   c                p    V P                   P                  R RVR,          /4       V P                  4        V# r  r  r   s   &&r   
end_tag_brInHeadNoscriptPhase.end_tag_br  r  r   c                P    V P                   P                  R RVR,          /4       R# r  r   r   s   &&r   r   !InHeadNoscriptPhase.end_tag_other  r  r   c                :    V P                  \        R 4      4       R# )r  N)r  r%  rD   s   &r   r  !InHeadNoscriptPhase.anything_else  s    /
;<r   r   r  r4  r  N)r  r  r  r  r  r  )r   r  )r   r   r   r   r   r   rw   rs   rm   rn   r   rb  r  r   r  r  r   r  r   r   r   r   r   r   s   @r   r  r    s     I
D
MFFQ:
O= !	 	E	$	&	67	"  	%&	z  Or   r  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
 tR tR t]! R]3R]	3R]
3R]3R]3.4      t]! R]3.4      tRtV tR# )AfterHeadPhasei  c                &    V P                  4        R # r   rU  rD   s   &r   rw   AfterHeadPhase.process_eof  rW  r   c                &    V P                  4        V# r   rU  r   s   &&r   rm   !AfterHeadPhase.process_characters  rZ  r   c                Z    V P                   P                  R ,          P                  V4      # rC  rD  r   s   &&r   r   AfterHeadPhase.start_tag_html  rF  r   c                    R V P                   n        V P                  P                  V4       V P                   P                  R,          V P                   n        R# )Fr   N)r+   rC   r    r   r$   r>   r   s   &&r   start_tag_bodyAfterHeadPhase.start_tag_body  s;    "'		  ' KK..y9r   c                    V P                   P                  V4       V P                  P                  R ,          V P                  n        R# )r   N)r    r   r+   r$   r>   r   s   &&r   start_tag_frameset!AfterHeadPhase.start_tag_frameset  s/    		  ' KK..}=r   c                   V P                   P                  R RVR,          /4       V P                  P                  P	                  V P                  P
                  4       V P                   P                  R,          P                  V4       V P                  P                  RRR1,           F<  pVP                  R8X  g   K  V P                  P                  P                  V4        R# 	  R# )z#unexpected-start-tag-out-of-my-headr&   rH  Nr   rb   )
r+   re   r    rc   rv   rI  r$   ro   r&   remover  s   && r   start_tag_from_head"AfterHeadPhase.start_tag_from_head  s    1FE&M3J	L		&&tyy'='=>9%77>II++DbD11DyyF"		''..t4 2r   c                P    V P                   P                  R RVR,          /4       R# r  r   r   s   &&r   r:  AfterHeadPhase.start_tag_head  r  r   c                &    V P                  4        V# r   rU  r   s   &&r   r   AfterHeadPhase.start_tag_other  rZ  r   c                &    V P                  4        V# r   rU  r   s   &&r   r  #AfterHeadPhase.end_tag_html_body_br  rZ  r   c                P    V P                   P                  R RVR,          /4       R# r  r   r   s   &&r   r   AfterHeadPhase.end_tag_other  r  r   c                    V P                   P                  \        R R4      4       V P                  P                  R,          V P                  n        RV P                  n        R# )r   ri   r   TN)r    r   r%  r+   r$   r>   rC   rD   s   &r   r  AfterHeadPhase.anything_else  sC    		  !26;!GH KK..y9"&r   r   r   r   r   r  N)	r  r  r  r  r  r  r  r  r  )r   r   r4  )r   r   r   r   r   r   rw   rm   r   r  r  r  r:  r   r  r   r  r   r   r   r   r   r   s   @r   r  r    s     IF:
>QO'
 !	 	 	'(
0	2	 "  	!56  Or   r  c                     a a ] tR tRt oRKtV 3R ltR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!R t"R  t#R! t$R" t%R# t&R$ t'R% t(R& t)R' t*R( t+R) t,R* t-R+ t.R, t/R- t0R. t1R/ t2R0 t3R1 t4R2 t5R3 t6R4 t7]8! . R5]9Pt                  3NRL]3NR6]3NR7]3NRM]3N];]3NRN]3NR9]3NRO]3NR:]3NR;]3NRP]3NR<]3NR=]3NRQ]3NR>]3NR?]3NRR]3NRS]3NRA]3NRB]3NRC] 3NRD]!3NRE]"3NRF]#3NRG]$3NRT]%3NRH]'3NRU](3NRV]&3NRI])3NRJ]*3NRW]+3N4      t<]8! R6].3R5]/3RX]03R9]13R8]-3RY]23];]33RZ]43RQ]53R@]63.
4      t=RKt>Vt?V ;t@# )[InBodyPhasei(  c                J   < \         SV `  ! V/ VB  V P                  V n        R # r   )superr(    process_space_characters_non_prern   r%   argsr   	__class__s   &*,r   r(   InBodyPhase.__init__-  s#    $)&)(,(M(M%r   c                    VP                   VP                   8H  ;'       d;    VP                  VP                  8H  ;'       d    VP                  VP                  8H  # r   )r&   rM   rN   )r%   node1node2s   &&&r   is_matching_formatting_element*InBodyPhase.is_matching_formatting_element2  sO    JJ%**$ 1 1OOu.1 1 0 00	2r   c                   V P                   P                  V4       V P                   P                  R,          p. pV P                   P                  RRR1,           F9  pV\        J d    M.V P                  WB4      '       g   K(  VP                  V4       K;  	  \        V4      ^8:  g   Q h\        V4      ^8X  d-   V P                   P                  P                  VR,          4       V P                   P                  P                  V4       R# r   )	r    r   rc   active_formatting_elementsr   r  rv   rg   r  )r%   rx   rQ   matching_elementsr   s   &&   r   add_formatting_element"InBodyPhase.add_formatting_element8  s    		  '))))"-II882>>Dv~44TCC!((.	 ? $%*** !Q&II00778I"8MN		,,33G<r   c                    \        R4      pV P                  P                  RRR1,           F2  pVP                  V9  g   K  V P                  P                  R4        R# 	  R# )ddNz expected-closing-tag-but-got-eof)r  dtlipr   r   r   r   r   r   r   r   rb   )rj   r    rc   r&   r+   re   )r%   allowed_elementsr   s   &  r   rw   InBodyPhase.process_eofI  sW    $ &  II++DbD11Dyy 00''(JK 2r   c                   VR ,          pV P                   V n        VP                  R4      '       dg   V P                  P                  R,          P
                  R9   d;   V P                  P                  R,          P                  4       '       g
   VR,          pV'       d8   V P                  P                  4        V P                  P                  V4       R# R# )rZ   
:r   NNNrb   )prelistingtextarea)	r  rn   r  r    rc   r&   has_content&reconstruct_active_formatting_elementsr   )r%   rx   rZ   s   && r   %process_space_characters_drop_newline1InBodyPhase.process_space_characters_drop_newlineT  s     V}(,(M(M%OOD!!II##B',,0NNII++B/;;==8DII<<>II!!$' r   c                   VR ,          R8X  d   R# V P                   P                  4        V P                   P                  VR ,          4       V P                  P                  '       d^   \
        ;QJ d#    R VR ,           4       F  '       g   K   RM	  RM! R VR ,           4       4      '       d   RV P                  n        R# R# R# )rZ    Nc              3   2   "   T F  q\         9  x  K  	  R # 5ir   r   .0chars   & r   	<genexpr>1InBodyPhase.process_characters.<locals>.<genexpr>h  s      +H9F,,   TF)r    r  r   r+   rC   anyr   s   &&r   rm   InBodyPhase.process_charactersa  s    =H$		88:		eFm,;;"""ss +H9>v+Hsss +H9>v+H (H (H&+DKK#(H"r   c                ~    V P                   P                  4        V P                   P                  VR ,          4       R# r   )r    r  r   r   s   &&r   r  ,InBodyPhase.process_space_characters_non_prel  s(    		88:		eFm,r   c                Z    V P                   P                  R ,          P                  V4      # r  rD  r   s   &&r   start_tag_process_in_head%InBodyPhase.start_tag_process_in_headp  rF  r   c                0   V P                   P                  R RR/4       \        V P                  P                  4      ^8X  g-   V P                  P                  ^,          P
                  R8w  d!   V P                   P                  '       g   Q hR# RV P                   n        VR,          P                  4        F[  w  r#W P                  P                  ^,          P                  9  g   K2  W0P                  P                  ^,          P                  V&   K]  	  R# )r  r&   r   FrZ   N)
r+   re   rg   r    rc   r&   r,   rC   r#   rN   r   s   &&  r   r  InBodyPhase.start_tag_bodys  s     68HI		''(A-		''*//69;;(((((&+DKK#$V}224yy66q9DDDBGII++A.99$?  5r   c                   V P                   P                  R RR/4       \        V P                  P                  4      ^8X  g-   V P                  P                  ^,          P
                  R8w  d!   V P                   P                  '       g   Q hR# V P                   P                  '       g   R# V P                  P                  ^,          P                  '       dR   V P                  P                  ^,          P                  P                  V P                  P                  ^,          4       V P                  P                  R,          P
                  R8w  d'   V P                  P                  P                  4        KR  V P                  P                  V4       V P                   P                  R,          V P                   n        R# )r  r&   r   r   r   r   Nrb   )r+   re   rg   r    rc   r&   r,   rC   parentremove_childr   r   r$   r>   r   s   &&r   r  InBodyPhase.start_tag_frameset~  s)    68LM		''(A-		''*//69;;((((((((yy&&q)000		''*11>>II++A.0))))"-22f<		''++-II$$U+ $ 2 2= ADKKr   c                    V P                   P                  R RR7      '       d   V P                  \        R 4      4       V P                   P	                  V4       R# r  buttonvariantN)r    element_in_scope	end_tag_pr%  r   r   s   &&r   start_tag_close_pInBodyPhase.start_tag_close_p  s@    99%%c8%<<NN,S12		  'r   c                    V P                   P                  R RR7      '       d   V P                  \        R 4      4       V P                   P	                  V4       RV P
                  n        V P                  V n        R# )r  r  r  FN)	r    r  r  r%  r   r+   rC   r   rn   r   s   &&r   start_tag_pre_listing!InBodyPhase.start_tag_pre_listing  sZ    99%%c8%<<NN,S12		  '"'(,(R(R%r   c                   V P                   P                  '       d!   V P                  P                  R RR/4       R# V P                   P	                  RRR7      '       d   V P                  \        R4      4       V P                   P                  V4       V P                   P                  R,          V P                   n        R# )r  r&   formr  r  r  Nrb   )	r    form_elementr+   re   r  r  r%  r   rc   r   s   &&r   start_tag_formInBodyPhase.start_tag_form  s    99!!!KK##$:VV<LMyy))#x)@@056II$$U+%)YY%<%<R%@DII"r   c                n   R V P                   n        RR.RRR.RRR./pW!R,          ,          p\        V P                  P                  4       Fx  pVP
                  V9   d;   V P                   P                  P                  \        VP
                  4      4        M.VP                  \        9   g   Ke  VP
                  R	9  g   Kx   M	  V P                  P                  RRR7      '       d/   V P                   P                  P                  \        R4      4       V P                  P                  V4       R# )
Fr  r  r  r&   r  r  r  N)addressr   r  )r+   rC   reversedr    rc   r&   r>   rq   r%  
name_tupler   r  r   )r%   rx   stop_names_map
stop_namesr   s   &&   r   start_tag_list_itemInBodyPhase.start_tag_list_item  s    "'tTlD4,O#&M2
TYY445DyyJ&!!11%dii02#33II%<< 6 99%%c8%<<KK--.?.DE		  'r   c                (   V P                   P                  R RR7      '       d   V P                  \        R 4      4       V P                   P	                  V4       V P
                  P                  P                  V P
                  P                  n        R# r  )	r    r  r  r%  r   r+   r.   r=   r;   r   s   &&r   start_tag_plaintextInBodyPhase.start_tag_plaintext  sb    99%%c8%<<NN,S12		  '&*kk&;&;&K&K#r   c                   V P                   P                  R RR7      '       d   V P                  \        R 4      4       V P                   P                  R,          P
                  \        9   dJ   V P                  P                  RRVR,          /4       V P                   P                  P                  4        V P                   P                  V4       R# )r  r  r  r  r&   Nrb   )r    r  r  r%  rc   r&   r   r+   re   r   r   r   s   &&r   start_tag_headingInBodyPhase.start_tag_heading  s    99%%c8%<<NN,S1299""2&++/??KK##$:VU6]<STII##'')		  'r   c                   V P                   P                  R 4      pV'       d   V P                  P                  RRR RR /4       V P	                  \        R 4      4       W P                   P                  9   d&   V P                   P                  P                  V4       W P                   P                  9   d&   V P                   P                  P                  V4       V P                   P                  4        V P                  V4       R# )a$unexpected-start-tag-implies-end-tag	startNameendNameN)r    %element_in_active_formatting_elementsr+   re   end_tag_formattingr%  rc   r  r  r  r  )r%   rx   afe_a_elements   && r   start_tag_aInBodyPhase.start_tag_a  s    		GGLKK##6c9c24 ##$5c$:;		 7 77		''..}=		 D DD		44;;MJ		88:##E*r   c                \    V P                   P                  4        V P                  V4       R # r   )r    r  r  r   s   &&r   start_tag_formatting InBodyPhase.start_tag_formatting  s     		88:##E*r   c                F   V P                   P                  4        V P                   P                  R 4      '       dU   V P                  P	                  RRR RR /4       V P                  \        R 4      4       V P                   P                  4        V P                  V4       R# )nobrr:  r;  r<  N)r    r  r  r+   re   rq   r%  r  r   s   &&r   start_tag_nobrInBodyPhase.start_tag_nobr  s|    		88:99%%f--KK##6fi8:   !26!:;II<<>##E*r   c                L   V P                   P                  R 4      '       d=   V P                  P                  RRR RR /4       V P	                  \        R 4      4       V# V P                   P                  4        V P                   P                  V4       RV P                  n        R# )r  r:  r;  r<  FN)	r    r  r+   re   rq   r%  r  r   rC   r   s   &&r   start_tag_buttonInBodyPhase.start_tag_button  s    99%%h//KK##6h	8<>   !28!<=LII<<>II$$U+&+DKK#r   c                    V P                   P                  4        V P                   P                  V4       V P                   P                  P	                  \
        4       R V P                  n        R# FN)r    r  r   r  rv   r   r+   rC   r   s   &&r   start_tag_applet_marquee_object+InBodyPhase.start_tag_applet_marquee_object  sH    		88:		  '		,,33F;"'r   c                   V P                   P                  R RR7      '       d   V P                  \        R 4      4       V P                   P	                  4        RV P
                  n        V P
                  P                  VR4       R# )r  r  r  Fr   N)r    r  r  r%  r  r+   rC   r   r   s   &&r   start_tag_xmpInBodyPhase.start_tag_xmp  s^    99%%c8%<<NN,S12		88:"'((	:r   c                f   V P                   P                  R 8w  d>   V P                  P                  RRR7      '       d   V P	                  \        R4      4       V P                  P                  V4       RV P                   n        V P                   P                  R,          V P                   n	        R# )r  r  r  r  Fr   N)
r+   r9   r    r  rq   r%  r   rC   r$   r>   r   s   &&r   start_tag_tableInBodyPhase.start_tag_table  s{    ;;))X5yy))#x)@@$$%6s%;<		  '"' KK..z:r   c                    V P                   P                  4        V P                   P                  V4       V P                   P                  P	                  4        R VR&   RV P
                  n        R# )Tra   FN)r    r  r   rc   r   r+   rC   r   s   &&r   start_tag_void_formatting%InBodyPhase.start_tag_void_formatting  sQ    		88:		  '		##%+/'("'r   c                    V P                   P                  pV P                  V4       R VR,          9   d=   VR,          R ,          P                  \        4      R8X  d   W P                   n        R# R# R# )rY   rZ   hiddenN)r+   rC   rW  rO   r	   )r%   rx   rC   s   && r   start_tag_inputInBodyPhase.start_tag_input	  s]    kk--&&u-eFm#ff%//0DEQ&1KK# R $r   c                    V P                   P                  V4       V P                   P                  P                  4        R VR&   R# r`  ra  r   s   &&r   start_tag_param_source"InBodyPhase.start_tag_param_source  rd  r   c                *   V P                   P                  R RR7      '       d   V P                  \        R 4      4       V P                   P	                  V4       V P                   P
                  P                  4        RVR&   RV P                  n        R# )r  r  r  Tra   FN)	r    r  r  r%  r   rc   r   r+   rC   r   s   &&r   start_tag_hrInBodyPhase.start_tag_hr  sm    99%%c8%<<NN,S12		  '		##%+/'("'r   c           	         V P                   P                  R RRRR/4       V P                  \        RRVR,          VR,          R7      4       R	# )
zunexpected-start-tag-treated-asoriginalNameimagenewNameimgri   rZ   r`   rN   self_closingN)r+   re   ro   r%  r   s   &&r   start_tag_imageInBodyPhase.start_tag_image  sN    -Wi7	9 	0;5=}- / 	0r   c           	     :   V P                   P                  R RR/4       V P                  P                  '       d   R# / pRVR,          9   d   VR,          R,          VR&   V P	                  \        RRVR7      4       V P	                  \        R	R4      4       V P	                  \        R
R4      4       RVR,          9   d   VR,          R,          pMRpV P                  R\        P                  RV/4       VR,          P                  4       pRV9   d   VR RV9   d   VR RVR&   V P	                  \        RRVVR,          R7      4       V P                  \        R
4      4       V P	                  \        R	R4      4       V P                  \        R4      4       R# )zdeprecated-tagr&   isindexNactionrZ   r&  ri   )rN   hrlabelpromptz3This is a searchable index. Enter search keywords: rY   inputr`   rh  )r+   re   r    r'  ro   r%  rm   r   rk   copyrq   )r%   rx   
form_attrsrq  rN   s   &&   r   start_tag_isindexInBodyPhase.start_tag_isindex'  sw    0692EF99!!!
uV}$#(=#:Jx fkjI	K0{CD0+FGuV}$6]8,FJF)9)966 JK6]'')
z!8$z!8$&
60[Z}- / 	0 	.w780{CD.v67r   c                    V P                   P                  V4       V P                  P                  P                  V P                  P                  n        V P                  V n        R V P                  n        R# rM  )	r    r   r+   r.   r:   r;   r   rn   rC   r   s   &&r   start_tag_textareaInBodyPhase.start_tag_textareaE  sP    		  '&*kk&;&;&H&H#(,(R(R%"'r   c                J    R V P                   n        V P                  V4       R# rM  )r+   rC   start_tag_rawtextr   s   &&r   start_tag_iframeInBodyPhase.start_tag_iframeK  s    "'u%r   c                    V P                   P                  '       d   V P                  V4       R # V P                  V4       R # r   )r+   r-   r{  r   r   s   &&r   rz  InBodyPhase.start_tag_noscriptO  s.    ;;   ""5)  'r   c                >    V P                   P                  VR 4       R# ru  rq  r   s   &&r   r{  InBodyPhase.start_tag_rawtextU  s    ((	:r   c                8   V P                   P                  R,          P                  R8X  d/   V P                  P                  P                  \        R4      4       V P                   P                  4        V P                  P                   P                  V4       R# r   optionNrb   )	r    rc   r&   r+   r>   rq   r%  r  r   r   s   &&r   start_tag_optInBodyPhase.start_tag_optX  se    99""2&++x7KK--.?.IJ		88:''.r   c                   V P                   P                  4        V P                   P                  V4       R V P                  n        V P                  P
                  V P                  P                  R,          V P                  P                  R,          V P                  P                  R,          V P                  P                  R,          V P                  P                  R,          V P                  P                  R,          39   d/   V P                  P                  R,          V P                  n        R	# V P                  P                  R,          V P                  n        R	# )
Fr   r   r   r   r   r   in select in tabler   N)r    r  r   r+   rC   r>   r$   r   s   &&r   start_tag_selectInBodyPhase.start_tag_select^  s    		88:		  '"';;"":.""<0""#45""?3""8,""9-!/ / !% 2 23G HDKK $ 2 2; ?DKKr   c                @   V P                   P                  R 4      '       db   V P                   P                  4        V P                   P                  R,          P                  R 8w  d   V P
                  P                  R4       V P                   P                  V4       R# )rubyzrp-or-rt-tag-not-in-ruby-scopeNrb   )r    r  generate_implied_end_tagsrc   r&   r+   re   r   r   s   &&r   start_tag_rp_rtInBodyPhase.start_tag_rp_rtm  si    99%%f--II//1yy&&r*//69''(HI		  'r   c                p   V P                   P                  4        V P                  P                  V4       V P                  P	                  V4       \
        R ,          VR&   V P                   P                  V4       VR,          '       d,   V P                   P                  P                  4        RVR&   R# R# )rK   rM   r`   Tra   N)	r    r  r+   r   r   r   r   rc   r   r   s   &&r   start_tag_mathInBodyPhase.start_tag_matht  s    		88:,,U3--e4'1k		  ' II##'')/3E+,  r   c                p   V P                   P                  4        V P                  P                  V4       V P                  P	                  V4       \
        R ,          VR&   V P                   P                  V4       VR,          '       d,   V P                   P                  P                  4        RVR&   R# R# )r^   rM   r`   Tra   N)	r    r  r+   r   r   r   r   rc   r   r   s   &&r   start_tag_svgInBodyPhase.start_tag_svg  s    		88:))%0--e4'.k		  ' II##'')/3E+,  r   c                P    V P                   P                  RRVR,          /4       R# )zElements that should be children of other elements.

Here they are ignored: "caption", "col", "colgroup", "frame",
"frameset", "head", "option", "optgroup", "tbody", "td", "tfoot",
"th", "thead", "tr", "noscript".

zunexpected-start-tag-ignoredr&   Nr   r   s   &&r   start_tag_misplacedInBodyPhase.start_tag_misplaced  s"     	 >v@WXr   c                p    V P                   P                  4        V P                   P                  V4       R # r   )r    r  r   r   s   &&r   r   InBodyPhase.start_tag_other  s$    		88:		  'r   c                v   V P                   P                  R RR7      '       gV   V P                  \        R R4      4       V P                  P                  RRR /4       V P                  \        R 4      4       R# V P                   P                  R 4       V P                   P                  R,          P                  R 8w  d   V P                  P                  RRR /4       V P                   P                  P                  4       pVP                  R 8w  d'   V P                   P                  P                  4       pK7  R# )r  r  r  ri   r  r&   Nrb   )r    r  r   r%  r+   re   r  r  rc   r&   r   r  s   && r   r  InBodyPhase.end_tag_p  s    yy))#x)@@""#4S+#FGKK##$863-HNN,S12II//4yy&&r*//36''(<vsmL99**..0D))s"yy..224 #r   c                   V P                   P                  R 4      '       g!   V P                  P                  RRR /4       R# V P                   P                  R	,          P
                  R 8w  dk   V P                   P                  R,           FI  pVP
                  \        R
4      9  g   K  V P                  P                  RRR RVP
                  /4        M	  V P                  P                  R,          V P                  n        R# )r   r  r&   N:   NN$expected-one-end-tag-but-got-anothergotNameexpectedName
after bodyrb   )r  r  r  optgroupr  r  rprtr   r   r   r   r   r   r   r   )	r    r  r+   re   rc   r&   rj   r$   r>   r  s   && r   end_tag_bodyInBodyPhase.end_tag_body  s    yy))&11KK##$866:JKYY$$R(--7		//3399I /U %V V KK++>"FNDIIFH  4 !KK..|<r   c                    V P                   P                  R 4      '       d   V P                  \        R 4      4       V# R# )r   N)r    r  r  r%  r   s   &&r   end_tag_htmlInBodyPhase.end_tag_html  s5    99%%f--/78L .r   c                T   VR ,          R8X  d   V P                   V n        V P                  P                  VR ,          4      pV'       d   V P                  P	                  4        V P                  P
                  R,          P                  VR ,          8w  d&   V P                  P                  RR VR ,          /4       V'       de   V P                  P
                  P                  4       pVP                  VR ,          8w  d'   V P                  P
                  P                  4       pK>  R# R# )r&   r  end-tag-too-earlyNrb   )
r  rn   r    r  r  rc   r&   r+   re   r   )r%   rx   in_scoper   s   &&  r   end_tag_blockInBodyPhase.end_tag_block  s    =E!,0,Q,QD)99--eFm<II//199""2&++uV}<KK##$7&%-9PQ99**..0D))uV},yy..224 - r   c                   V P                   P                  pR V P                   n        Ve"   V P                   P                  V4      '       g!   V P                  P	                  RRR/4       R # V P                   P                  4        V P                   P                  R,          V8w  d   V P                  P	                  RRR/4       V P                   P                  P                  V4       R # )Nr  r&   r&  zend-tag-too-early-ignoredrb   )r    r'  r  r+   re   r  rc   r  r  s   && r   end_tag_formInBodyPhase.end_tag_form  s    yy%%!%		<tyy99$??KK##$866:JKII//1yy&&r*d2''(CffEUVII##**40r   c                   VR ,          R8X  d   RpMRpV P                   P                  VR ,          VR7      '       g(   V P                  P                  RR VR ,          /4       R# V P                   P	                  VR ,          R7       V P                   P
                  R,          P                  VR ,          8w  d&   V P                  P                  RR VR ,          /4       V P                   P
                  P                  4       pVP                  VR ,          8w  d'   V P                   P
                  P                  4       pK>  R# )	r&   r  listNr  r  excluder  rb   )r    r  r+   re   r  rc   r&   r   )r%   rx   r  r   s   &&  r   end_tag_list_itemInBodyPhase.end_tag_list_item  s    =D GGyy))%-)IIKK##$865=:QRII//f/Fyy&&r*//5=@''(;feFm=TU99**..0D))uV},yy..224 -r   c                j   \          F@  pV P                  P                  V4      '       g   K&  V P                  P                  4         M	  V P                  P                  R,          P
                  VR,          8w  d&   V P                  P                  RRVR,          /4       \          F  pV P                  P                  V4      '       g   K&  V P                  P                  P                  4       pVP
                  \         9  d'   V P                  P                  P                  4       pK;   R# 	  R# )r   r&   r  Nrb   )	r   r    r  r  rc   r&   r+   re   r   )r%   rx   items   && r   end_tag_headingInBodyPhase.end_tag_heading  s    $Dyy))$//		335 % 99""2&++uV}<KK##$7&%-9PQ$Dyy))$//yy..224ii'779922668D %r   c                   ^ pV^8  Ed   V^,          pV P                   P                  VR,          4      pV'       dF   W0P                   P                  9   d?   V P                   P                  VP                  4      '       g   V P                  V4       R# W0P                   P                  9  dM   V P                  P                  RRVR,          /4       V P                   P                  P                  V4       R# V P                   P                  VP                  4      '       g(   V P                  P                  RRVR,          /4       R# W0P                   P                  R,          8w  d&   V P                  P                  RRVR,          /4       V P                   P                  P                  V4      pRpV P                   P                  VR  F  pVP                  \        9   g   K  Tp M	  Vfx   V P                   P                  P                  4       pWc8w  d'   V P                   P                  P                  4       pK,  V P                   P                  P                  V4       R# V P                   P                  V^,
          ,          pV P                   P                  P                  V4      pT;r^ pV P                   P                  P                  V
4      pV^8  Edv   V^,          pV^,          pV P                   P                  V,          p
WP                   P                  9  d(   V P                   P                  P                  V
4       Kx  W8X  d   MW8X  d-   V P                   P                  P                  V
4      ^,           pV
P                  4       pVV P                   P                  V P                   P                  P                  V
4      &   WP                   P                  V P                   P                  P                  V
4      &   Tp
V	P                  '       d   V	P                  P!                  V	4       V
P#                  V	4       T
p	EK}  V	P                  '       d   V	P                  P!                  V	4       VP                  \%        R4      9   d/   V P                   P'                  4       w  rVP)                  W4       MVP#                  V	4       VP                  4       pVP+                  V4       VP#                  V4       V P                   P                  P                  V4       V P                   P                  P-                  W4       V P                   P                  P                  V4       V P                   P                  P-                  V P                   P                  P                  V4      ^,           V4       EK  R# )z*The much-feared adoption agency algorithm.r&   Nzadoption-agency-1.2zadoption-agency-4.4zadoption-agency-1.3rb   r   r   r   r   r   )r    r=  rc   r  r&   r   r+   re   r  r  indexr-  r   r   cloner  r  append_childrj   !get_table_misnested_node_positioninsert_beforereparent_childreninsert)r%   rx   outer_loop_counterformatting_element	afe_indexfurthest_blockrQ   common_ancestorbookmark	last_noder   inner_loop_counterr  r  r  r  s   &&              r   r>  InBodyPhase.end_tag_formatting  s     !1$ !# "&!P!Pf"&&))*A*AA		223E3J3JKK ""5) $99+B+BB''(=f?VW		44;;<NO YY//0B0G0GHH''(=f?VW &)@)@)DDKK++-f/FH 		//556HII!N99229:>%%)99%,N ? %))115573"ii5599;G		44;;GD #ii55i!mDO yy;;AABTUH  .-I!"II++11$7E$q("a'"
yy..u5yyCCCII++2248-.#yyCCII$ORSSH

 IN 		44II88>>tDFOT		''		(?(?(E(Ed(KL ###$$11)<!!), 	   --i8##y 2> (? ?(,		(S(S(U%$$Y>,,Y7 ',,.E ,,U3 ''. II00778JKII0077H II##**+=>II##**		''--n=A5Ju %r   c                   V P                   P                  VR ,          4      '       d   V P                   P                  4        V P                   P                  R,          P                  VR ,          8w  d&   V P
                  P                  RR VR ,          /4       V P                   P                  VR ,          4      '       d   V P                   P                  P                  4       pVP                  VR ,          8w  d'   V P                   P                  P                  4       pK>  V P                   P                  4        R# R# )r&   r  Nrb   )	r    r  r  rc   r&   r+   re   r    clear_active_formatting_elements)r%   rx   rQ   s   && r   end_tag_applet_marquee_object)InBodyPhase.end_tag_applet_marquee_object  s    99%%eFm44II//199""2&++uV}<KK##$7&%-9PQ99%%eFm44ii--113G,,%-/))11557II668	 5r   c                   V P                   P                  R RRRR/4       V P                  P                  4        V P                  P	                  \        RR4      4       V P                  P                  P                  4        R# )zunexpected-end-tag-treated-asrd  r4  rf  z
br elementri   N)r+   re   r    r  r   r%  rc   r   r   s   &&r   r  InBodyPhase.end_tag_br  se    +T9l;	= 			88:		  !24!EF		##%r   c                R   V P                   P                  R R R1,           EF  pVP                  VR,          8X  d   V P                   P                  VR,          R7       V P                   P                  R,          P                  VR,          8w  d&   V P                  P                  RRVR,          /4       V P                   P                  P                  4       V8w  d   K+   R # VP                  \        9   g   K  V P                  P                  RRVR,          /4        R # 	  R # )Nr&   r  r  rb   )	r    rc   r&   r  r+   re   r   r-  r   r  s   && r   r   InBodyPhase.end_tag_other  s    II++DbD11DyyE&M)		33E&M3J99**2.33uV}DKK++,vuV}.EGii--113t;??&66KK++,vuV}.EG 2r   r   r   r   r  r&  r5   r9  rF  r  xmpr   r4  rr  ro  re  rm  r  iframer  r   mathr^   )rn   )	r  r  r  r  r  r  r  r  r  )r+  articleaside
blockquotecenterdetailsdirr   dlfieldset
figcaptionfigurefooterheaderhgroupmainmenunavolr  sectionsummaryul)r  r  )r  r  r  )bbigcodeemfontissmallstrikestrongttu)appletmarqueeobject)arear4  embedrg  keygenwbr)paramsourcetrack)noembedr  )r  r  )r  r  )r   colr   framer   r   r   r   r   r   r   )r+  r  r  r  r  r  r  dialogr  r   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  )r  r  r  )r9  r  r  r  r  r  r  rF  r  r  r  r  r  r  )Ar   r   r   r   r   r(   r  r  rw   r   rm   r  r  r  r  r   r#  r(  r0  r3  r6  r@  rC  rG  rJ  rN  rQ  rT  rW  r[  r^  ra  rj  ru  rx  r|  rz  r{  r  r  r  r  r  r  r   r  r  r  r  r  r  r  r>  r  r  r   r   r   r   r   r   r   r   r   __classcell__r  r   s   @@r   r  r  (  s     .IN
2="(	,-F	HB (
SA(&L(++	+
,(;;(20
(08<(&(;/@(
4
4Y(5= 5	15dJL
9&  ! ("	%%&("
&'@	B(" 
 	("
 
'(("
& (9	:(" 
,-(" 
23(" 
 (" 
01(" 
)*(" 
k(" 
 4	6!("$ 
 %("& 
#$'("( 
)*IJ)("* 
+(", 
/"-(". 
9:ST/("0 
&'=>1("2 
/"3("4 
|5("6 
/"7("8 
%&9(": 
'(;("< 
#$=("> 
'(?("@ 
!"34A("B 
#$C("D 
'E("F 
 /G("H >"I("J - K("L
78K	MM(" (T 		
& (5	6 
	i	./	?+
)*<	>	(*GH	z  OOr   r  c                   r   a  ] tR tRt o ]! 4       tR tR tR tR t	R t
]! . 4      t]! R]	3.4      tRtV tR	# )
	TextPhasei  c                J    V P                   P                  VR ,          4       R# r   r   r   s   &&r   rm   TextPhase.process_characters  r   r   c                   V P                   P                  R RV P                  P                  R,          P                  /4       V P                  P                  P                  4        V P                   P                  V P                   n        R# )z&expected-named-closing-tag-but-got-eofr&   Trb   )r+   re   r    rc   r&   r   r   r>   rD   s   &r   rw   TextPhase.process_eof   se    4TYY,,R0556	8 			##% KK66r   c                .    \        R VR,           R24      h)zTried to process start tag r&   z in RCDATA/RAWTEXT mode)
ValueErrorr   s   &&r   r   TextPhase.start_tag_other  s"    )%-8OPR 	Rr   c                    V P                   P                  P                  4       pVP                  R 8X  g   Q hV P                  P
                  V P                  n        R# )r  N)r    rc   r   r&   r+   r   r>   r  s   && r   end_tag_scriptTextPhase.end_tag_script  sB    yy&&**,yyH$$$ KK66r   c                    V P                   P                  P                  4        V P                  P                  V P                  n        R # r   )r    rc   r   r+   r   r>   r   s   &&r   r   TextPhase.end_tag_other  s.    		##% KK66r   r  r  N)r   r   r   r   r   r   rm   rw   r   r  r   r   r   r   r   r   r   s   @r   r  r    sD     I-R77 !> :;<Or   r  c                     a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
 tR tR tR tR tR tR tR tR tR t]! R]P4                  3R]3R]3R]3R]3R]3R]3R]3R]3R]3.
4      t]! R]3R ]3.4      tRtV tR# )!InTablePhasei  c                    V P                   P                  R,          P                  R9  d'   V P                   P                  P                  4        KR  R# )r   Nrb   )r   r   )r    rc   r&   r   rD   s   &r   _clear_stack_to_table_context*InTablePhase._clear_stack_to_table_context  s>    ii%%b)..6GG II##'') Hr   c                    V P                   P                  R,          P                  R8w  d   V P                  P	                  R4       R# V P                  P
                  '       g   Q hR# )r   r   zeof-in-tableNrb   r    rc   r&   r+   re   r,   rD   s   &r   rw   InTablePhase.process_eof'  sG    99""2&++v5KK##N3;;(((((r   c                   V P                   P                  pV P                   P                  R ,          V P                   n        W P                   P                  n        V P                   P                  P	                  V4       R# in table textN)r+   r>   r$   r   rn   r%   rx   r   s   && r   rn   %InTablePhase.process_space_characters.  sT    ** KK..?+9(2259r   c                   V P                   P                  pV P                   P                  R ,          V P                   n        W P                   P                  n        V P                   P                  P	                  V4       R# r!  )r+   r>   r$   r   rm   r#  s   && r   rm   InTablePhase.process_characters4  sT    ** KK..?+9(,,U3r   c                    R V P                   n        V P                  P                  R,          P	                  V4       RV P                   n        R# )Tr   FN)r    insert_from_tabler+   r$   rm   r   s   &&r   r   InTablePhase.insert_text:  s9     '+		#9%88?&+		#r   c                   V P                  4        V P                  P                  P                  \        4       V P                  P                  V4       V P                  P                  R ,          V P                  n        R# )r   N)	r  r    r  rv   r   r   r+   r$   r>   r   s   &&r   start_tag_captionInTablePhase.start_tag_captionA  sS    **,		,,33F;		  ' KK..|<r   c                    V P                  4        V P                  P                  V4       V P                  P                  R ,          V P                  n        R# )r   Nr  r    r   r+   r$   r>   r   s   &&r   start_tag_colgroupInTablePhase.start_tag_colgroupG  s<    **,		  ' KK../@Ar   c                <    V P                  \        R R4      4       V# )r   ri   )r/  r%  r   s   &&r   start_tag_colInTablePhase.start_tag_colL  s     1*k JKr   c                    V P                  4        V P                  P                  V4       V P                  P                  R ,          V P                  n        R# )r   Nr.  r   s   &&r   start_tag_rowgroupInTablePhase.start_tag_rowgroupP  s;    **,		  ' KK..?r   c                <    V P                  \        R R4      4       V# )r   ri   )r5  r%  r   s   &&r   start_tag_imply_tbody"InTablePhase.start_tag_imply_tbodyU  s     1'; GHr   c                    V P                   P                  R RRRR/4       V P                   P                  P                  \	        R4      4       V P                   P
                  '       g   V# R# )r:  r;  r   r<  N)r+   re   r>   rq   r%  r,   r   s   &&r   rT  InTablePhase.start_tag_tableY  s]    2'9g6	8 	))*;G*DE{{$$$L %r   c                Z    V P                   P                  R ,          P                  V4      # r  rD  r   s   &&r   start_tag_style_script#InTablePhase.start_tag_style_scripta  rF  r   c                L   R VR,          9   d   VR,          R ,          P                  \        4      R8X  d]   V P                  P                  R4       V P                  P                  V4       V P                  P                  P                  4        R# V P                  V4       R# )rY   rZ   rZ  z unexpected-hidden-input-in-tableN)	rO   r	   r+   re   r    r   rc   r   r   r   s   &&r   r[  InTablePhase.start_tag_inputd  st    eFm#ff%//0DEQKK##$FGII$$U+II##'')  'r   c                F   V P                   P                  R 4       V P                  P                  fn   V P                  P	                  V4       V P                  P
                  R,          V P                  n        V P                  P
                  P                  4        R# R# )zunexpected-form-in-tableNrb   )r+   re   r    r'  r   rc   r   r   s   &&r   r(  InTablePhase.start_tag_formn  sm     :;99!!)II$$U+%)YY%<%<R%@DII"II##'') *r   c                    V P                   P                  R RVR,          /4       RV P                  n        V P                   P                  R,          P                  V4       RV P                  n        R# )z)unexpected-start-tag-implies-table-voodoor&   Tr   FN)r+   re   r    r(  r$   ro   r   s   &&r   r   InTablePhase.start_tag_otheru  sZ    7&%-9P	R '+		#9%77>&+		#r   c                   V P                   P                  R R R7      '       Ed   V P                   P                  4        V P                   P                  R,          P                  R 8w  dF   V P
                  P                  RRR RV P                   P                  R,          P                  /4       V P                   P                  R,          P                  R 8w  d'   V P                   P                  P                  4        KR  V P                   P                  P                  4        V P
                  P                  4        R# V P
                  P                  '       g   Q hV P
                  P                  RRVR,          /4       R# )	r   r  zend-tag-too-early-namedr  r  r  r&   Nrb   )
r    r  r  rc   r&   r+   re   r   r@   r,   r   s   &&r   end_tag_tableInTablePhase.end_tag_table}  s   99%%gw%??II//1yy&&r*//7:''(Aw"DII$;$;B$?$D$DDF G ))))"-22g=		''++-II##'')KK,,. ;;(((((KK##$865=:QRr   c                P    V P                   P                  R RVR,          /4       R# r  r   r   s   &&r   end_tag_ignoreInTablePhase.end_tag_ignore  r  r   c                    V P                   P                  R RVR,          /4       RV P                  n        V P                   P                  R,          P                  V4       RV P                  n        R# )z'unexpected-end-tag-implies-table-voodoor&   Tr   FN)r+   re   r    r(  r$   rq   r   s   &&r   r   InTablePhase.end_tag_other  sZ    5f7N	P '+		#9%55e<&+		#r   r   r   r   r  r   rr  r&  r  Nr   r   r   )r   r   r   )r  r  )r   r   r  r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r  rw   rn   rm   r   r+  r/  r2  r5  r8  rT  r=  r[  r(  r   rF  rI  r   r   r   r   r   r   r   r   r   s   @r   r  r    s     I*):4,=B
@
F(*,S O, !	%%&	%&	'(		$&89	23	/"	45	/"	 "  	- 
()7	9  Or   r  c                   `   a a ] tR tRt oR
tV 3R ltR tR tR tR t	R t
R tR	 tR
tVtV ;t# )InTableTextPhasei  c                D   < \         SV `  ! V/ VB  R V n        . V n        R # r   )r  r(   r   character_tokensr  s   &*,r   r(   InTableTextPhase.__init__  s%    $)&)" "r   c                   R P                  V P                   Uu. uF  qR,          NK  	  up4      p\        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       dB   R\        P                  RV/pV P
                  P                  R,          P                  V4       M#V'       d   V P                  P                  V4       . V n        R# u upi )r  rZ   c              3   2   "   T F  q\         9  x  K  	  R # 5ir   r  )r  r  s   & r   r	  4InTableTextPhase.flush_characters.<locals>.<genexpr>  s     =++r  TFrY   r   N)	joinrQ  r  r   rk   r+   r$   r   r    )r%   r  rZ   rx   s   &   r   flush_characters!InTableTextPhase.flush_characters  s    ww1F1FG1FV1FGH3==333====U--vt<EKKz*66u=II!!$' " Hs   Cc                \    V P                  4        V P                  V P                  n        V# r   rW  r   r+   r>   r   s   &&r   rs    InTableTextPhase.process_comment  %     //r   c                \    V P                  4        V P                  V P                  n        R # r   rZ  rD   s   &r   rw   InTableTextPhase.process_eof  s#     //r   c                \    VR ,          R8X  d   R# V P                   P                  V4       R# rZ   r  NrQ  rv   r   s   &&r   rm   #InTableTextPhase.process_characters  s%    =H$$$U+r   c                <    V P                   P                  V4       R # r   ra  r   s   &&r   rn   )InTableTextPhase.process_space_characters  s    $$U+r   c                \    V P                  4        V P                  V P                  n        V# r   rZ  r   s   &&r   ro   "InTableTextPhase.process_start_tag  r\  r   c                \    V P                  4        V P                  V P                  n        V# r   rZ  r   s   &&r   rq    InTableTextPhase.process_end_tag  r\  r   )rQ  r   )r   r   r   r   r   r(   rW  rs   rw   rm   rn   ro   rq   r   r   r  r	  s   @@r   rO  rO    s7     6I#
#

,
,

 r   rO  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
 t]! R]P"                  3R]	3.4      t]! R]3R]3R]3.4      tRtV tR# )InCaptionPhasei  c                F    V P                   P                  R RR7      '       * # )r   r   r  r    r  rD   s   &r   ignore_end_tag_caption%InCaptionPhase.ignore_end_tag_caption  s    99--i-IIIr   c                \    V P                   P                  R ,          P                  4        R# r   Nr+   r$   rw   rD   s   &r   rw   InCaptionPhase.process_eof      9%113r   c                Z    V P                   P                  R ,          P                  V4      # rC  r+   r$   rm   r   s   &&r   rm   !InCaptionPhase.process_characters  "    {{!!),??FFr   c                    V P                   P                  R 4       V P                  4       pV P                   P                  P	                  \        R4      4       V'       g   V# R# )z%unexpected-table-start-tag-in-captionr   Nr+   re   rm  r>   rq   r%  r%   rx   ignore_end_tags   && r   start_tag_table_element&InCaptionPhase.start_tag_table_element  sN     GH446))*;I*FGL r   c                Z    V P                   P                  R ,          P                  V4      # rC  rD  r   s   &&r   r   InCaptionPhase.start_tag_other  rF  r   c                L   V P                  4       '       EgJ   V P                  P                  4        V P                  P                  R	,          P                  R8w  dF   V P
                  P                  RRRRV P                  P                  R	,          P                  /4       V P                  P                  R	,          P                  R8w  d'   V P                  P                  P                  4        KR  V P                  P                  P                  4        V P                  P                  4        V P
                  P                  R,          V P
                  n
        R# V P
                  P                  '       g   Q hV P
                  P                  RRVR,          /4       R# )
r   r   r  r  r  r   r  r&   Nrb   )rm  r    r  rc   r&   r+   re   r   r  r$   r>   r,   r   s   &&r   end_tag_captionInCaptionPhase.end_tag_caption  s&   **,,II//1yy&&r*//9<''(Ny"DII$;$;B$?$D$DQF G ))))"-22i?		''++-II##'')II668 $ 2 2: >DKK ;;(((((KK##$865=:QRr   c                    V P                   P                  R 4       V P                  4       pV P                   P                  P	                  \        R4      4       V'       g   V# R# )z#unexpected-table-end-tag-in-captionr   Nry  rz  s   && r   rF  InCaptionPhase.end_tag_table  sN     EF446))*;I*FGL r   c                P    V P                   P                  R RVR,          /4       R# r  r   r   s   &&r   rI  InCaptionPhase.end_tag_ignore  r  r   c                Z    V P                   P                  R ,          P                  V4      # rC  r+   r$   rq   r   s   &&r   r   InCaptionPhase.end_tag_other  r  r   r   r   r   r  N	r   r  r   r   r   r   r   r   r   )
r   r  r   r   r   r   r   r   r   r   )r   r   r   r   r   r   rm  rw   rm   r|  r   r  rF  rI  r   r   r   r   r   r   r   r   r   s   @r   rj  rj    s     IJ4GFS$OD !	%%&
1	3"  	O$	- 
(	*  Or   rj  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 t]! R
]P                   3R]	3.4      t]! R]3R]3.4      tRtV tR# )InColumnGroupPhasei!  c                V    V P                   P                  R,          P                  R8H  # )r   r   rb   )r    rc   r&   rD   s   &r   ignore_end_tag_colgroup*InColumnGroupPhase.ignore_end_tag_colgroup%  s"    yy&&r*//699r   c                   V P                   P                  R,          P                  R8X  d!   V P                  P                  '       g   Q hR# V P                  4       pV P                  \        R4      4       V'       g   R# R# )r   r   Nr   Trb   )r    rc   r&   r+   r,   r  end_tag_colgroupr%  )r%   r{  s   & r   rw   InColumnGroupPhase.process_eof(  se    99""2&++v5;;(((((!99;N!!"3J"?@! "r   c                n    V P                  4       pV P                  \        R 4      4       V'       g   V# R# r   Nr  r  r%  rz  s   && r   rm   %InColumnGroupPhase.process_characters2  1    557/
;<L r   c                    V P                   P                  V4       V P                   P                  P                  4        R VR&   R# r`  ra  r   s   &&r   r2   InColumnGroupPhase.start_tag_col8  rd  r   c                n    V P                  4       pV P                  \        R 4      4       V'       g   V# R# r  r  rz  s   && r   r   "InColumnGroupPhase.start_tag_other=  r  r   c                \   V P                  4       '       dF   V P                  P                  '       g   Q hV P                  P                  R RVR,          /4       R# V P                  P
                  P                  4        V P                  P                  R,          V P                  n        R# )r  r&   r   N)	r  r+   r,   re   r    rc   r   r$   r>   r   s   &&r   r  #InColumnGroupPhase.end_tag_colgroupC  sv    ''));;(((((KK##$865=:QRII##'') $ 2 2: >DKKr   c                B    V P                   P                  R RR/4       R# )z
no-end-tagr&   r  Nr   r   s   &&r   end_tag_colInColumnGroupPhase.end_tag_colL  s    vuo>r   c                n    V P                  4       pV P                  \        R 4      4       V'       g   V# R# r  r  rz  s   && r   r    InColumnGroupPhase.end_tag_otherO  r  r   r   r  r   r  N)r   r   r   r   r   r   r  rw   rm   r2  r   r  r  r   r   r   r   r   r   r   r   r   s   @r   r  r  !  s~     I:0
?? !	%%&	" 
 	%&	  Or   r  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
 tR tR tR t]! R]P(                  3R]
3R]3R]3.4      t]! R]3R]3R]3.4      tRtV tR# )InTableBodyPhasei`  c                B   V P                   P                  R,          P                  R9  d'   V P                   P                  P                  4        KR  V P                   P                  R,          P                  R8X  d!   V P                  P
                  '       g   Q hR# R# )r   r   Nrb   )r   r   r   r   )r    rc   r&   r   r+   r,   rD   s   &r   "_clear_stack_to_table_body_context3InTableBodyPhase._clear_stack_to_table_body_contextd  st    ii%%b).. 73 3 II##'')99""2&++v5;;((((( 6r   c                \    V P                   P                  R ,          P                  4        R# r   Nrq  rD   s   &r   rw   InTableBodyPhase.process_eofm      :&224r   c                Z    V P                   P                  R ,          P                  V4      # r   r  r   s   &&r   rn   )InTableBodyPhase.process_space_charactersp  "    {{!!*-FFuMMr   c                Z    V P                   P                  R ,          P                  V4      # r  ru  r   s   &&r   rm   #InTableBodyPhase.process_characterss  "    {{!!*-@@GGr   c                    V P                  4        V P                  P                  V4       V P                  P                  R ,          V P                  n        R# )r   N)r  r    r   r+   r$   r>   r   s   &&r   start_tag_trInTableBodyPhase.start_tag_trv  s;    //1		  ' KK..x8r   c                    V P                   P                  R RVR,          /4       V P                  \        RR4      4       V# )zunexpected-cell-in-table-bodyr&   r   ri   )r+   re   r  r%  r   s   &&r   start_tag_table_cell%InTableBodyPhase.start_tag_table_cell{  s>    +feFm-D	F+D+>?r   c                    V P                   P                  R RR7      '       gG   V P                   P                  RRR7      '       g$   V P                   P                  RRR7      '       dR   V P                  4        V P                  \	        V P                   P
                  R,          P                  4      4       V# V P                  P                  '       g   Q hV P                  P                  RRVR,          /4       R# )	r   r   r  r   r   z!unexpected-start-tag-out-of-tabler&   Nrb   
r    r  r  end_tag_table_rowgroupr%  rc   r&   r+   r,   re   r   s   &&r   start_tag_table_other&InTableBodyPhase.start_tag_table_other  s    II&&w&@@		**7G*DD		**7G*DD335''!$))"9"9""="B"BCEL ;;(((((KK##3feFm5LNr   c                Z    V P                   P                  R ,          P                  V4      # r  rD  r   s   &&r   r    InTableBodyPhase.start_tag_other  "    {{!!*-??FFr   c                h   V P                   P                  VR ,          RR7      '       dc   V P                  4        V P                   P                  P	                  4        V P
                  P                  R,          V P
                  n        R# V P
                  P                  RR VR ,          /4       R# )r&   r   r  r    unexpected-end-tag-in-table-bodyN)	r    r  r  rc   r   r+   r$   r>   re   r   s   &&r   r  'InTableBodyPhase.end_tag_table_rowgroup  s~    99%%eFmW%EE335II##'') $ 2 2: >DKKKK##2VU6]4KMr   c                    V P                   P                  R RR7      '       gG   V P                   P                  RRR7      '       g$   V P                   P                  RRR7      '       dR   V P                  4        V P                  \	        V P                   P
                  R,          P                  4      4       V# V P                  P                  '       g   Q hV P                  P                  RRVR,          /4       R# )	r   r   r  r   r   r  r&   Nrb   r  r   s   &&r   rF  InTableBodyPhase.end_tag_table  s    II&&w&@@		**7G*DD		**7G*DD335''!$))"9"9""="B"BCEL ;;(((((KK##$865=:QRr   c                P    V P                   P                  R RVR,          /4       R# )r  r&   Nr   r   s   &&r   rI  InTableBodyPhase.end_tag_ignore  #    .v0G	Ir   c                Z    V P                   P                  R ,          P                  V4      # r  r  r   s   &&r   r   InTableBodyPhase.end_tag_other  "    {{!!*-==eDDr   r   r   r   r  Nr   r   )r   r  r   r   r   r   rM  )r   r   r  r   r   r   r   r   )r   r   r   r   r   r   r  rw   rn   rm   r  r  r  r   r  rF  rI  r   r   r   r   r   r   r   r   r   s   @r   r  r  `  s     I)5NH9
NGMSIE !	%%&	|	+,	B		"  	$&<=	- 
	!  Or   r  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
 tR tR tR tR t]! R]P*                  3R]3R]3.4      t]! R]3R]3R]3R]3.4      tRtV tR# )
InRowPhasei  c                0   V P                   P                  R,          P                  R9  dj   V P                  P	                  RRV P                   P                  R,          P                  /4       V P                   P                  P                  4        K  R# )r   z'unexpected-implied-end-tag-in-table-rowr&   Nrb   )r   r   )r    rc   r&   r+   re   r   rD   s   &r   !_clear_stack_to_table_row_context,InRowPhase._clear_stack_to_table_row_context  so    ii%%b)..nDKK##900499:< II##'')	 Er   c                F    V P                   P                  R RR7      '       * # )r   r   r  rl  rD   s   &r   ignore_end_tag_trInRowPhase.ignore_end_tag_tr  s    99--dG-DDDr   c                \    V P                   P                  R ,          P                  4        R# r  rq  rD   s   &r   rw   InRowPhase.process_eof  r  r   c                Z    V P                   P                  R ,          P                  V4      # r  r  r   s   &&r   rn   #InRowPhase.process_space_characters  r  r   c                Z    V P                   P                  R ,          P                  V4      # r  ru  r   s   &&r   rm   InRowPhase.process_characters  r  r   c                   V P                  4        V P                  P                  V4       V P                  P                  R ,          V P                  n        V P                  P                  P                  \        4       R# )r   N)	r  r    r   r+   r$   r>   r  rv   r   r   s   &&r   r  InRowPhase.start_tag_table_cell  sS    ..0		  ' KK..y9		,,33F;r   c                n    V P                  4       pV P                  \        R 4      4       V'       g   V# R# r   Nr  
end_tag_trr%  rz  s   && r   r   InRowPhase.start_tag_table_other  s/    //1)$/0L r   c                Z    V P                   P                  R ,          P                  V4      # r  rD  r   s   &&r   r   InRowPhase.start_tag_other  r  r   c                |   V P                  4       '       gc   V P                  4        V P                  P                  P	                  4        V P
                  P                  R ,          V P
                  n        R# V P
                  P                  '       g   Q hV P
                  P                  RRVR,          /4       R# )r   r  r&   N)
r  r  r    rc   r   r+   r$   r>   r,   re   r   s   &&r   r  InRowPhase.end_tag_tr  s    %%''224II##'') $ 2 2? CDKK ;;(((((KK##$865=:QRr   c                n    V P                  4       pV P                  \        R 4      4       V'       g   V# R# r  r  rz  s   && r   rF  InRowPhase.end_tag_table  s1    //1)$/0 L r   c                    V P                   P                  VR ,          RR7      '       d   V P                  \        R4      4       V# V P                  P                  RR VR ,          /4       R# )r&   r   r  r   r  N)r    r  r  r%  r+   re   r   s   &&r   r  !InRowPhase.end_tag_table_rowgroup  sU    99%%eFmW%EEOO-d34LKK##$865=:QRr   c                P    V P                   P                  R RVR,          /4       R# )zunexpected-end-tag-in-table-rowr&   Nr   r   s   &&r   rI  InRowPhase.end_tag_ignore   s#    -f/F	Hr   c                Z    V P                   P                  R ,          P                  V4      # r  r  r   s   &&r   r   InRowPhase.end_tag_other  r  r   r   r   r   r  Nr  )r   r  r   r   r   r   r   rM  )r   r   r  r   r   r   r   )r   r   r   r   r   r   r  r  rw   rn   rm   r  r  r   r  rF  r  rI  r   r   r   r   r   r   r   r   r   s   @r   r  r    s     I*E5NH<GSSHE !	%%&	+,
&	("  	z	- 	$&<=	C^T	  Or   r  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
 t]! R]P"                  3R]	3.4      t]! R]3R]3R]3.4      tRtV tR# )InCellPhasei  c                   V P                   P                  R RR7      '       d   V P                  \        R 4      4       R# V P                   P                  RRR7      '       d   V P                  \        R4      4       R# R# )r   r   r  r   N)r    r  end_tag_table_cellr%  rD   s   &r   _close_cellInCellPhase._close_cell  sc    99%%dG%<<##$5d$;<YY''g'>>##$5d$;< ?r   c                \    V P                   P                  R ,          P                  4        R# rp  rq  rD   s   &r   rw   InCellPhase.process_eof   rs  r   c                Z    V P                   P                  R ,          P                  V4      # rC  ru  r   s   &&r   rm   InCellPhase.process_characters#  rw  r   c                <   V P                   P                  R RR7      '       g$   V P                   P                  RRR7      '       d   V P                  4        V# V P                  P                  '       g   Q hV P                  P                  RRVR,          /4       R# )r   r   r  r   z&unexpected-start-tag-out-of-table-cellr&   N)r    r  r  r+   r,   re   r   s   &&r   r  !InCellPhase.start_tag_table_other&  s    II&&tW&==		**4*AAL ;;(((((KK##865=:QSr   c                Z    V P                   P                  R ,          P                  V4      # rC  rD  r   s   &&r   r   InCellPhase.start_tag_other1  rF  r   c                   V P                   P                  VR ,          RR7      '       Ed'   V P                   P                  VR ,          4       V P                   P                  R,          P                  VR ,          8w  df   V P
                  P                  RR VR ,          /4        V P                   P                  P                  4       pVP                  VR ,          8X  g   K?  M$V P                   P                  P                  4        V P                   P                  4        V P
                  P                  R,          V P
                  n
        R# V P
                  P                  RR VR ,          /4       R# )r&   r   r  zunexpected-cell-end-tagr   r  Nrb   )r    r  r  rc   r&   r+   re   r   r  r$   r>   r  s   && r   r  InCellPhase.end_tag_table_cell4  s   99%%eFmW%EEII//f>yy&&r*//5=@''-f/FH9922668DyyE&M1		''++-II668 $ 2 28 <DKKKK##$865=:QRr   c                P    V P                   P                  R RVR,          /4       R# r  r   r   s   &&r   rI  InCellPhase.end_tag_ignoreE  r  r   c                    V P                   P                  VR ,          RR7      '       d   V P                  4        V# V P                  P	                  RR VR ,          /4       R# )r&   r   r  r  N)r    r  r  r+   re   r   s   &&r   end_tag_implyInCellPhase.end_tag_implyH  sQ    99%%eFmW%EEL KK##$865=:QRr   c                Z    V P                   P                  R ,          P                  V4      # rC  r  r   s   &&r   r   InCellPhase.end_tag_otherP  r  r   r   r  Nr  r  )r   r   r  r   r   r  )r   r   r   r   r   r   r  rw   rm   r  r   r  rI  r  r   r   r   r   r   r   r   r   r   s   @r   r  r    s     I=4G	SFS"OSD !	%%&
/	1"  	)*	7H	3]C  Or   r  c            	          a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 tR
 tR tR tR t]! R]P(                  3R]3R]	3R]
3R]3R]3.4      t]! R]3R]3R]3.4      tRtV tR# )InSelectPhasei`  c                    V P                   P                  R,          P                  R8w  d   V P                  P	                  R4       R# V P                  P
                  '       g   Q hR# )r   r   zeof-in-selectNrb   r  rD   s   &r   rw   InSelectPhase.process_eofd  sG    99""2&++v5KK##O4;;(((((r   c                j    VR ,          R8X  d   R# V P                   P                  VR ,          4       R# r`  r   r   s   &&r   rm    InSelectPhase.process_charactersj  s'    =H$		eFm,r   c                    V P                   P                  R,          P                  R8X  d%   V P                   P                  P                  4        V P                   P	                  V4       R# r  r    rc   r&   r   r   r   s   &&r   start_tag_optionInSelectPhase.start_tag_optiono  sG    99""2&++x7II##'')		  'r   c                |   V P                   P                  R,          P                  R8X  d%   V P                   P                  P                  4        V P                   P                  R,          P                  R8X  d%   V P                   P                  P                  4        V P                   P	                  V4       R# )r   r  r  Nrb   r  r   s   &&r   start_tag_optgroup InSelectPhase.start_tag_optgroupu  sz    99""2&++x7II##'')99""2&++z9II##'')		  'r   c                p    V P                   P                  R 4       V P                  \        R4      4       R# )zunexpected-select-in-selectr   N)r+   re   end_tag_selectr%  r   s   &&r   r  InSelectPhase.start_tag_select|  s)     =>-h78r   c                    V P                   P                  R 4       V P                  P                  RRR7      '       d   V P	                  \        R4      4       V# V P                   P                  '       g   Q hR# )zunexpected-input-in-selectr   r  N)r+   re   r    r  r  r%  r,   r   s   &&r   r[  InSelectPhase.start_tag_input  s^     <=99%%h%AA 1( ;<L;;(((((r   c                Z    V P                   P                  R ,          P                  V4      # r  rD  r   s   &&r   r~  InSelectPhase.start_tag_script  rF  r   c                P    V P                   P                  R RVR,          /4       R# )zunexpected-start-tag-in-selectr&   Nr   r   s   &&r   r   InSelectPhase.start_tag_other  #    ,vuV}.E	Gr   c                    V P                   P                  R,          P                  R8X  d'   V P                   P                  P                  4        R# V P                  P                  RRR/4       R# )r   r  unexpected-end-tag-in-selectr&   Nrb   r    rc   r&   r   r+   re   r   s   &&r   end_tag_optionInSelectPhase.end_tag_option  sO    99""2&++x7II##'')KK##$BVXDVWr   c                   V P                   P                  R,          P                  R8X  dQ   V P                   P                  R,          P                  R8X  d%   V P                   P                  P                  4        V P                   P                  R,          P                  R8X  d'   V P                   P                  P                  4        R# V P                  P                  RRR/4       R# )r   r  r  r  r&   Nrb   r  r   s   &&r   end_tag_optgroupInSelectPhase.end_tag_optgroup  s    II##B',,8		''+00J>II##'')99""2&++z9II##'') KK##.0DFr   c                   V P                   P                  R R R7      '       dx   V P                   P                  P                  4       pVP                  R 8w  d'   V P                   P                  P                  4       pK7  V P
                  P                  4        R# V P
                  P                  '       g   Q hV P
                  P                  RRVR,          /4       R# )r   r  r  r&   N)	r    r  rc   r   r&   r+   r@   r,   re   r  s   && r   r  InSelectPhase.end_tag_select  s    99%%h%AA99**..0D))x'yy..224KK,,. ;;(((((KK##$865=:QRr   c                P    V P                   P                  R RVR,          /4       R# )r  r&   Nr   r   s   &&r   r   InSelectPhase.end_tag_other  s      >v@WXr   r   r  r  r   r  r  N)rr  r  r  )r   r   r   r   r   r   rw   rm   r  r  r  r[  r~  r   r  r#  r  r   r   r   r   r   r   r   r   r   s   @r   r  r  `  s     I)-
((9)FGXF	SY !	%%&	#$	'(	#$	(/:	#$"  	>"	%&	>"  Or   r  c                   ~   a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R t]! R
]3.4      t]! R
]
3.4      tRtV tR	# )InSelectInTablePhasei  c                \    V P                   P                  R ,          P                  4        R# )r   Nrq  rD   s   &r   rw    InSelectInTablePhase.process_eof  s    ;'335r   c                Z    V P                   P                  R ,          P                  V4      # r   ru  r   s   &&r   rm   'InSelectInTablePhase.process_characters  s"    {{!!+.AA%HHr   c                    V P                   P                  R RVR,          /4       V P                  \        R4      4       V# )z5unexpected-table-element-start-tag-in-select-in-tabler&   r   )r+   re   r   r%  r   s   &&r   rT  $InSelectInTablePhase.start_tag_table  s>    CU6]#	% 	,X67r   c                Z    V P                   P                  R ,          P                  V4      # r.  rD  r   s   &&r   r   $InSelectInTablePhase.start_tag_other  s"    {{!!+.@@GGr   c                    V P                   P                  R RVR,          /4       V P                  P                  VR,          RR7      '       d   V P	                  \        R4      4       V# R# )z3unexpected-table-element-end-tag-in-select-in-tabler&   r   r  r   N)r+   re   r    r  r   r%  r   s   &&r   rF  "InSelectInTablePhase.end_tag_table  sb    AU6]#	% 99%%eFmW%EE0:;L Fr   c                Z    V P                   P                  R ,          P                  V4      # r.  r  r   s   &&r   r   "InSelectInTablePhase.end_tag_other  s"    {{!!+.>>uEEr   r  N)r   r   r   r   r   r   r   r   )r   r   r   r   r   r   rw   rm   rT  r   rF  r   r   r   r   r   r   r   s   @r   r*  r*    sf     I6IHF !	J		" 
 	J		  Or   r*  c                     a  ] tR tRt o ]! 4       t]! . RNRNRNRNRNRNRNR	NR
NRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNRNR NR!NR"NR#NR$NR%NR&NR'NR(NR)NR*NR+NR,NR-N4      tR. tR/ t	R0 t
R1 tR2tV tR3# )4InForeignContentPhasei  r  r  r  r   r4  r  r  r  r   r  r  r  r  h1h2h3h4h5h6r   ro  r  rg  r  r  r  r  rF  r  r  r  r  r  r  spanr  r  subsupr   r  r  r  varc                *   / R RbRRbRRbRRbRR	bR
RbRRbRRbRRbRRbRRbRRbRRbRRbRRbRRbR R!b/ R"R#bR$R%bR&R'bR(R)bR*R+bR,R-bR.R/bR0R1bR2R3bR4R5bR6R7bR8R9bR:R;bR<R=bR>R?bR@RAbRBRCbCRDRERFRG/CpVRH,          V9   d   W!RH,          ,          VRH&   RI# RI# )JaltglyphaltGlyphaltglyphdefaltGlyphDefaltglyphitemaltGlyphItemanimatecoloranimateColoranimatemotionanimateMotionanimatetransformanimateTransformclippathclipPathfeblendfeBlendfecolormatrixfeColorMatrixfecomponenttransferfeComponentTransferfecompositefeCompositefeconvolvematrixfeConvolveMatrixfediffuselightingfeDiffuseLightingfedisplacementmapfeDisplacementMapfedistantlightfeDistantLightfefloodfeFloodfefuncafeFuncAfefuncbfeFuncBfefuncgfeFuncGfefuncrfeFuncRfegaussianblurfeGaussianBlurfeimagefeImagefemergefeMergefemergenodefeMergeNodefemorphologyfeMorphologyfeoffsetfeOffsetfepointlightfePointLightfespecularlightingfeSpecularLightingfespotlightfeSpotLightfetilefeTilefeturbulencefeTurbulenceforeignobjectforeignObjectglyphrefglyphReflineargradientlinearGradientradialgradientradialGradienttextpathtextPathr&   Nr  )r%   rx   replacementss   && r   adjust_svg_tag_names*InForeignContentPhase.adjust_svg_tag_names  s   %

%
=%
 N%
 N	%

 _%
  2%
 
%
 y%
 _%
 "#8%
 =%
  2%
  !4%
  !4%
 .%
  y!%
" y#%
$ y%%
& y'%
( y)%
* .+%
, y-%
. y/%
0 =1%
2 N3%
4 
5%
6 N7%
8 !"69%
: =;%
< h=%
> N?%
@ _A%
B 
C%
D .E%
F .
I%
N =L((v7E&M )r   c                B   VR ,          R8X  d   RVR &   MuV P                   P                  '       dZ   \        ;QJ d#    R VR ,           4       F  '       g   K   RM	  RM! R VR ,           4       4      '       d   RV P                   n        \        P	                  W4       R# )rZ   r  u   �c              3   2   "   T F  q\         9  x  K  	  R # 5ir   r  r  s   & r   r	  ;InForeignContentPhase.process_characters.<locals>.<genexpr>"	  s     I=4..=r  TFN)r+   rC   r  r   rm   r   s   &&r   rm   (InForeignContentPhase.process_characters	  sj    =H$$E&Mkk%%%cI5=IcccI5=III&+DKK#  -r   c                   V P                   P                  R,          pVR,          V P                  9   g@   VR,          R8X  Ed6   \        VR,          P	                  4       4      0 Rm,          '       Ed   V P
                  P                  RRVR,          /4       V P                   P                  R,          P                  V P                   P                  8w  d   V P
                  P                  V P                   P                  R,          4      '       gc   V P
                  P                  V P                   P                  R,          4      '       g'   V P                   P                  P                  4        K  V# VP                  \        R,          8X  d   V P
                  P                  V4       MHVP                  \        R,          8X  d-   V P                  V4       V P
                  P                  V4       V P
                  P!                  V4       VP                  VR&   V P                   P#                  V4       VR,          '       d,   V P                   P                  P                  4        R	VR
&   R# R# )r   r&   r  rZ   z*unexpected-html-element-in-foreign-contentrK   r^   rM   r`   Tra   Nrb   >   facesizecolor)r    rc   breakout_elementssetr   r+   re   rM   rh   rS   rV   r   r   r   r  r   r   r   )r%   rx   r{   s   && r   ro   'InForeignContentPhase.process_start_tag&	  s   yy..r2&MT333f'E&M&&(),EEEKK##<vuV}>UW99**2.8899../{{<<yy..r24 4{{CCyy..r24 4		''++-L %%H)==44U;'':e+<<))%011%8KK11%8!-!7!7E+II$$U+]##		''++-37/0 $r   c                   \        V P                  P                  4      ^,
          pV P                  P                  R,          pVP                  P	                  \
        4      VR,          8w  d&   V P                  P                  RRVR,          /4        VP                  P	                  \
        4      VR,          8X  d   V P                  P                  V P                  P                  R,          8X  dT   V P                  P                  P                  4        V P                  P                  P                  V P                  n        V P                  P                  P                  4       V8w  d!   V P                  P                  '       d   KG  Q hRp V# V^,          pV P                  P                  V,          pVP                  V P                  P                  8w  d   EKQ  V P                  P                  P                  V4      p V# )r   r&   r  r"  Nrb   )rg   r    rc   r&   rO   r	   r+   re   r>   r$   rW  r   r   rM   rh   rq   )r%   rx   
node_indexr   rz   s   &&   r   rq   %InForeignContentPhase.process_end_tagC	  sw   001A5
yy&&r*9934fEKK##$865=:QRyy""#78E&MI;;$$(:(:?(KKKK%%668(,(9(9(H(HDKK%ii--113t;9922222 	  !OJ99**:6D~~!<!<< KK--==eD	r   r  N)r   r   r   r   r   r   rj   r  r  rm   ro   rq   r   r   r   s   @r   r9  r9    s    I! ### #"(#*.#08#:@#BF#HM#OS####!##'#)-#/3#59#;?#AG#IM#OR# 	# # # !'# )/# 17# 9=# ?B# DI# KQ# SV# 		# 	# "	# $,	# .3	# 5:	# <C	# EI	# KN	# PT	#
 	# )8V.8: r   r9  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR t]! R	]	3.4      t]! R	]3.4      tR
tV tR# )AfterBodyPhasei^	  c                    R # r   r  rD   s   &r   rw   AfterBodyPhase.process_eofa	      r   c                r    V P                   P                  WP                   P                  ^ ,          4       R# )    Nr   r   s   &&r   rs   AfterBodyPhase.process_commente	  s%     			  		(?(?(BCr   c                    V P                   P                  R 4       V P                   P                  R,          V P                   n        V# )zunexpected-char-after-bodyr   r+   re   r$   r>   r   s   &&r   rm   !AfterBodyPhase.process_charactersj	  s5     <= KK..y9r   c                Z    V P                   P                  R ,          P                  V4      # rC  rD  r   s   &&r   r   AfterBodyPhase.start_tag_htmlo	  rF  r   c                    V P                   P                  R RVR,          /4       V P                   P                  R,          V P                   n        V# )zunexpected-start-tag-after-bodyr&   r   r  r   s   &&r   r   AfterBodyPhase.start_tag_otherr	  sC    -f/F	H KK..y9r   c                    V P                   P                  '       d   V P                   P                  R 4       R# V P                   P                  R,          V P                   n        R# )z'unexpected-end-tag-after-body-innerhtmlafter after bodyN)r+   r,   re   r$   r>   )r%   r&   s   &&r   r  AfterBodyPhase.end_tag_htmlx	  sA    ;;   KK##$MN $ 2 23E FDKKr   c                    V P                   P                  R RVR,          /4       V P                   P                  R,          V P                   n        V# )zunexpected-end-tag-after-bodyr&   r   r  r   s   &&r   r   AfterBodyPhase.end_tag_other~	  sC    +feFm-D	F KK..y9r   r   r  N)r   r   r   r   r   r   rw   rs   rm   r   r   r  r   r   r   r   r   r   r   s   @r   r  r  ^	  s`     ID

FG !	 "   678Or   r  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 t]! R
]P                   3R]3R]	3R]
3.4      t]! R]3.4      tRtV tR# )InFramesetPhasei	  c                    V P                   P                  R,          P                  R8w  d   V P                  P	                  R4       R# V P                  P
                  '       g   Q hR# )r   r   zeof-in-framesetNrb   r  rD   s   &r   rw   InFramesetPhase.process_eof	  sH    99""2&++v5KK##$56;;(((((r   c                <    V P                   P                  R 4       R# )zunexpected-char-in-framesetNr   r   s   &&r   rm   "InFramesetPhase.process_characters	  s     =>r   c                <    V P                   P                  V4       R # r   )r    r   r   s   &&r   r  "InFramesetPhase.start_tag_frameset	  s    		  'r   c                    V P                   P                  V4       V P                   P                  P                  4        R # r   ra  r   s   &&r   start_tag_frameInFramesetPhase.start_tag_frame	  s*    		  '		##%r   c                Z    V P                   P                  R ,          P                  V4      # rC  rD  r   s   &&r   start_tag_noframes"InFramesetPhase.start_tag_noframes	  rF  r   c                P    V P                   P                  R RVR,          /4       R# )z unexpected-start-tag-in-framesetr&   Nr   r   s   &&r   r   InFramesetPhase.start_tag_other	  r  r   c                   V P                   P                  R,          P                  R8X  d   V P                  P	                  R4       M$V P                   P                  P                  4        V P                  P                  '       g]   V P                   P                  R,          P                  R8w  d/   V P                  P                  R,          V P                  n        R# R# R# )r   r   z)unexpected-frameset-in-frameset-innerhtmlr   after framesetNrb   )	r    rc   r&   r+   re   r   r,   r$   r>   r   s   &&r   end_tag_frameset InFramesetPhase.end_tag_frameset	  s    99""2&++v5KK##$OPII##'')%%%		''+00J> !% 2 23C DDKK ? &r   c                P    V P                   P                  R RVR,          /4       R# )zunexpected-end-tag-in-framesetr&   Nr   r   s   &&r   r   InFramesetPhase.end_tag_other	  r  r   r   r   r  r  r  N)r   r   r   r   r   r   rw   rm   r  r  r  r   r  r   r   r   r   r   r   r   r   r   s   @r   r  r  	  s     I)?(&FI
EG !	%%&	'(	/"	'(	"  	%&  Or   r  c                      a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R t]! R]P                  3R	]3.4      t]! R]
3.4      tR
tV tR# )AfterFramesetPhasei	  c                    R # r   r  rD   s   &r   rw   AfterFramesetPhase.process_eof	  r  r   c                <    V P                   P                  R 4       R# )zunexpected-char-after-framesetNr   r   s   &&r   rm   %AfterFramesetPhase.process_characters	  s     @Ar   c                Z    V P                   P                  R ,          P                  V4      # r  rD  r   s   &&r   r  %AfterFramesetPhase.start_tag_noframes	  rF  r   c                P    V P                   P                  R RVR,          /4       R# )z#unexpected-start-tag-after-framesetr&   Nr   r   s   &&r   r   "AfterFramesetPhase.start_tag_other	  s#    1FE&M3J	Lr   c                ^    V P                   P                  R ,          V P                   n        R# )after after framesetN)r+   r$   r>   r   s   &&r   r  AfterFramesetPhase.end_tag_html	  s     KK../EFr   c                P    V P                   P                  R RVR,          /4       R# )z!unexpected-end-tag-after-framesetr&   Nr   r   s   &&r   r    AfterFramesetPhase.end_tag_other	  s#    /&%-1H	Jr   r   r  r  N)r   r   r   r   r   r   rw   rm   r  r   r  r   r   r   r   r   r   r   r   r   s   @r   r  r  	  sq     IBFLGJ !	%%&	'(" 
 	  Or   r  c                   n   a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR t]! R	]
3.4      tR
tV tR# )AfterAfterBodyPhasei	  c                    R # r   r  rD   s   &r   rw   AfterAfterBodyPhase.process_eof	  r  r   c                d    V P                   P                  WP                   P                  4       R # r   r  r   s   &&r   rs   #AfterAfterBodyPhase.process_comment	  r  r   c                Z    V P                   P                  R ,          P                  V4      # rC  r  r   s   &&r   rn   ,AfterAfterBodyPhase.process_space_characters	  r  r   c                    V P                   P                  R 4       V P                   P                  R,          V P                   n        V# )expected-eof-but-got-charr   r  r   s   &&r   rm   &AfterAfterBodyPhase.process_characters	  s5     ;< KK..y9r   c                Z    V P                   P                  R ,          P                  V4      # rC  rD  r   s   &&r   r   "AfterAfterBodyPhase.start_tag_html	  rF  r   c                    V P                   P                  R RVR,          /4       V P                   P                  R,          V P                   n        V# )expected-eof-but-got-start-tagr&   r   r  r   s   &&r   r   #AfterAfterBodyPhase.start_tag_other	  sC    ,vuV}.E	G KK..y9r   c                    V P                   P                  R RVR,          /4       V P                   P                  R,          V P                   n        V# )expected-eof-but-got-end-tagr&   r   r  r   s   &&r   rq   #AfterAfterBodyPhase.process_end_tag	  sC    *VU6],C	E KK..y9r   r   r  N)r   r   r   r   r   r   rw   rs   rn   rm   r   r   rq   r   r   r   r   r   s   @r   r  r  	  sK     I<M
F !	 " r   r  c                   z   a  ] tR tRt o ]! 4       tR tR tR tR t	R t
R tR tR	 t]! R
]
3R]3.4      tRtV tR# )AfterAfterFramesetPhasei

  c                    R # r   r  rD   s   &r   rw   #AfterAfterFramesetPhase.process_eof
  r  r   c                d    V P                   P                  WP                   P                  4       R # r   r  r   s   &&r   rs   'AfterAfterFramesetPhase.process_comment
  r  r   c                Z    V P                   P                  R ,          P                  V4      # rC  r  r   s   &&r   rn   0AfterAfterFramesetPhase.process_space_characters
  r  r   c                <    V P                   P                  R 4       R# )r  Nr   r   s   &&r   rm   *AfterAfterFramesetPhase.process_characters
  s     ;<r   c                Z    V P                   P                  R ,          P                  V4      # rC  rD  r   s   &&r   r   &AfterAfterFramesetPhase.start_tag_html
  rF  r   c                Z    V P                   P                  R ,          P                  V4      # r  rD  r   s   &&r   r  *AfterAfterFramesetPhase.start_tag_noframes
  rF  r   c                P    V P                   P                  R RVR,          /4       R# )r  r&   Nr   r   s   &&r   r   'AfterAfterFramesetPhase.start_tag_other
  r  r   c                P    V P                   P                  R RVR,          /4       R# )r  r&   Nr   r   s   &&r   rq   'AfterAfterFramesetPhase.process_end_tag#
  s#    *VU6],C	Er   r   r  r  N)r   r   r   r   r   r   rw   rs   rn   rm   r   r  r   rq   r   r   r   r   r   s   @r   r  r  

  s\     I<M=FFGE !	 	'(" r   r  r7   r6   r   rH  ry  r  r   r   r   r"  r   r   r   r   r   r   r  r_   r  r   r  r  r  c                    a V R ,          P                  4       SP                  4       ,          '       d=   \        V R ,          4      ! V3R lV R ,          P                  4        4       4      V R &   R# R# )rZ   c              3   N   <"   T F  w  rSP                  W4      V3x  K  	  R # 5ir   )rf   )r  r   r   r  s   &  r   r	  $adjust_attributes.<locals>.<genexpr>J
  s(      ,YBWJC\c'/BWs   "%N)r   rY   r#   )rx   r  s   &fr   r   r   H
  s]    V}l//111U6]+ ,YBG-BUBUBW,Y Yf 2r   Nc                 >    R \         V,          RT RVf   / RV/# TRV/# )rY   r&   rZ   r`   )r   )r&   rY   rN   ri  s   &&&&r   r%  r%  N
  s=    dj(|	  /9|	 r   r   )rp   NF)4r  r   	constantsr   r   r   r   r   r	   r
   r   r   r   r   r   r   r   r.   r   treebuilderr   r   r   r   r   r   r   r"  r7  rS  r  r  r  r  r  rO  rj  r  r  r  r  r  r*  r9  r  r  r  r  r  r"   r   r%  r  r   r   <module>r     s        % ,"IJb) b)JA% A%HC5 CL!e !H(e (Vb% bJ>% >B>U >BO% Od= =BN5 Nb-u -`BU BJ< <~]u ]@S SlG% GT]E ]@&5 &RrE rj*9U *9Z4e 4n   F"% "J e  F|? ? {	
 + . { I  % . ) % j {  !" .#$ /.?(+3/6Yr   