+
    Ŝi(                      a  0 t $ ^ RIHt ^ RIHtHtHtHtHtH	t	H
t
Ht ^ RIHt ^ RIHt ]
'       d   ^ RIHt  ! R R]4      t ! R R	]4      t ! R
 R]4      t]! ]P*                  R7      ]P,                  R&   ]! ]P.                  RRR7      ]P,                  R&   ]! ]P*                  RRR7      ]P,                  R&   ]! ]P0                  R7      ]P,                  R&   ]! RR7      ]P,                  R&   ]! ]P*                  R7      ]P,                  R&   ]! ]P0                  R7      ]P,                  R&   ]! RR7      ]P,                  R&   ]].]3,          tR]R&   ]]]3,          tR# )    )annotations)CallableDictIterableOptionalSetTupleTYPE_CHECKINGUnion)	TypeAlias)EntitySubstitution)_AttributeValuec                      ] tR t^
t$ RtRtR]R&   RtR]R&   ]! ]	! RR.4      R	7      t
R
]R&   R]R&   R]R&   R]R&   R]R&   R]R&   R]R&   R R ltR"R R lltR R ltR R ltR R  ltR!tR# )#	Formattera  Describes a strategy to use when outputting a parse tree to a string.

Some parts of this strategy come from the distinction between
HTML4, HTML5, and XML. Others are configurable by the user.

Formatters are passed in as the `formatter` argument to methods
like `bs4.element.Tag.encode`. Most people won't need to
think about formatters, and most people who need to think about
them can pass in one of these predefined strings as `formatter`
rather than making a new Formatter object:

For HTML documents:
 * 'html' - HTML entity substitution for generic HTML documents. (default)
 * 'html5' - HTML entity substitution for HTML5 documents, as
             well as some optimizations in the way tags are rendered.
 * 'html5-4.12.0' - The version of the 'html5' formatter used prior to
                    Beautiful Soup 4.13.0.
 * 'minimal' - Only make the substitutions necessary to guarantee
               valid HTML.
 * None - Do not perform any substitution. This will be faster
          but may result in invalid markup.

For XML documents:
 * 'html' - Entity substitution for XHTML documents.
 * 'minimal' - Only make the substitutions necessary to guarantee
               valid XML. (default)
 * None - Do not perform any substitution. This will be faster
          but may result in invalid markup.

htmlstrHTMLxmlXMLscriptstyle)cdata_containing_tagszDict[str, Set[str]]HTML_DEFAULTSOptional[str]language%Optional[_EntitySubstitutionFunction]entity_substitutionvoid_element_close_prefixSet[str]r   indentboolempty_attributes_are_booleansc               (    V ^8  d   QhRRRRRRRR/# )   r   r   valueOptional[Set[str]]kwargreturnr    )formats   "V/Users/mibo/.openclaw/workspace/.venv-ak/lib/python3.14/site-packages/bs4/formatter.py__annotate__Formatter.__annotate__B   s,     ) ))$6)?B)	)    c                	h    Ve   V# WP                   8X  d   \        4       # V P                  V,          # )N)r   setr   )selfr   r%   r'   s   &&&&r+   _defaultFormatter._defaultB   s5     Lxx 5L !!%((r.   Nc               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r$   r   r   r   r   r   r   r   r&   r"   r!   r    Union[int, str]r)   )r*   s   "r+   r,   r-   O   sG     9! 9!9! C9! $'	9!
  29! (,9! 9!r.   c                D   T;'       g    V P                   V n        W n        W0n        V P	                  V P                  VR4      V n        WPn        Vf   ^ p\        V\        4      '       d   V^ 8  d   ^ pRV,          pM\        V\        4      '       d   TpMRpWpn
        R# )a  Constructor.

:param language: This should be `Formatter.XML` if you are formatting
   XML markup and `Formatter.HTML` if you are formatting HTML markup.

:param entity_substitution: A function to call to replace special
   characters with XML/HTML entities. For examples, see
   bs4.dammit.EntitySubstitution.substitute_html and substitute_xml.
:param void_element_close_prefix: By default, void elements
   are represented as <tag/> (XML rules) rather than <tag>
   (HTML rules). To get <tag>, pass in the empty string.
:param cdata_containing_tags: The set of tags that are defined
   as containing CDATA in this dialect. For example, in HTML,
   <script> and <style> tags are defined as containing CDATA,
   and their contents should not be formatted.
:param empty_attributes_are_booleans: If this is set to true,
  then attributes whose values are sent to the empty string
  will be treated as `HTML boolean
  attributes<https://dev.w3.org/html5/spec-LC/common-microsyntaxes.html#boolean-attributes>`_. (Attributes
  whose value is None are always rendered this way.)
:param indent: If indent is a non-negative integer or string,
    then the contents of elements will be indented
    appropriately when pretty-printing. An indent level of 0,
    negative, or "" will only insert newlines. Using a
    positive integer indent indents that many spaces per
    level. If indent is a string (such as "\t"), that string
    is used to indent each level. The default behavior is to
    indent one space per level.

r   N )r   r   r   r   r2   r   r"   
isinstanceintr   r    )r1   r   r   r   r   r"   r    
indent_strs   &&&&&&& r+   __init__Formatter.__init__O   s    N !--DII#6 )B&%)]]MM02I&
" .K*>Ffc""zvJ$$JJ r.   c                    V ^8  d   QhRRRR/# )r$   nsr   r(   r)   )r*   s   "r+   r,   r-      s     , ,S ,S ,r.   c                    V P                   '       g   V# ^RIHp \        W4      '       d6   VP                  e(   VP                  P
                  V P                  9   d   V# V P                  V4      # )zProcess a string that needs to undergo entity substitution.
This may be a string encountered in an attribute value or as
text.

:param ns: A string.
:return: The same string but with certain characters replaced by named
   or numeric entities.
)NavigableString)r   elementr@   r8   parentnamer   )r1   r>   r@   s   && r+   
substituteFormatter.substitute   s]     '''I, r++		%		$"<"<< I''++r.   c                    V ^8  d   QhRRRR/# )r$   r%   r   r(   r)   )r*   s   "r+   r,   r-      s     & &S &S &r.   c                $    V P                  V4      # )zProcess the value of an attribute.

:param ns: A string.
:return: A string with certain characters replaced by named
   or numeric entities.
)rD   )r1   r%   s   &&r+   attribute_valueFormatter.attribute_value   s     u%%r.   c                    V ^8  d   QhRRRR/# )r$   tagzbs4.element.Tagr(   z/Iterable[Tuple[str, Optional[_AttributeValue]]]r)   )r*   s   "r+   r,   r-      s     
 
"
	8
r.   c                   a  VP                   f   . # \        VP                   P                  4       4      p\        V 3R lV 4       4      # )ax  Reorder a tag's attributes however you want.

By default, attributes are sorted alphabetically. This makes
behavior consistent between Python 2 and Python 3, and preserves
backwards compatibility with older versions of Beautiful Soup.

If `empty_attributes_are_booleans` is True, then
attributes whose values are set to the empty string will be
treated as boolean attributes.
c              3  f   <"   T F&  w  rTSP                   '       d
   VR 8X  d   RMT3x  K(  	  R# 5i) N)r"   ).0kvr1   s   &  r+   	<genexpr>'Formatter.attributes.<locals>.<genexpr>   s2      
 ;;;RQPs   .1)attrslistitemssorted)r1   rK   rV   s   f& r+   
attributesFormatter.attributes   sC     99I7;CIIOO<M7N 

 
 	
r.   )r   r"   r   r    r   r   )NN/NF   )__name__
__module____qualname____firstlineno____doc__r   __annotations__r   dictr0   r   r2   r;   rD   rH   rX   __static_attributes__r)   r.   r+   r   r   
   s    @ D# C *.!8W"56*M&  >>""##K $(')9!v,.&
 
r.   r   c                  F   a  ] tR t^t$ Rt/ tR]R&   RR V 3R llltRtV ;t	# )HTMLFormatterzA generic Formatter for HTML.z"Dict[Optional[str], HTMLFormatter]REGISTRYc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# r$   r   r   r   r   r   r&   r"   r!   r    r5   r)   )r*   s   "r+   r,   HTMLFormatter.__annotate__   <     
 
B
 $'
  2	

 (,
 
r.   c           	     	N   < \         \        V `  V P                  VVVVVR 7       R# )r    N)superre   r;   r   r1   r   r   r   r"   r    	__class__s   &&&&&&r+   r;   HTMLFormatter.__init__   s/     	mT+II%!) 	, 	
r.   r)   NrZ   NFr[   
r\   r]   r^   r_   r`   rf   ra   r;   rc   __classcell__ro   s   @r+   re   re      s     '35H05
 
 
r.   re   c                  F   a  ] tR t^t$ Rt/ tR]R&   RR V 3R llltRtV ;t	# )XMLFormatterzA generic Formatter for XML.z!Dict[Optional[str], XMLFormatter]rf   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# rh   r)   )r*   s   "r+   r,   XMLFormatter.__annotate__   rj   r.   c           	     	N   < \         \        V `  V P                  VVVVVR 7       R# rl   )rm   rv   r;   r   rn   s   &&&&&&r+   r;   XMLFormatter.__init__   s/     	lD*HH%!) 	+ 	
r.   r)   rq   rr   rt   s   @r+   rv   rv      s     &24H/4
 
 
r.   rv   )r   r   rN   T)r   r   r"   html5z
html5-4.12minimalNr   _EntitySubstitutionFunction)__conditional_annotations__
__future__r   typingr   r   r   r   r   r	   r
   r   typing_extensionsr   
bs4.dammitr   bs4._typingr   r   re   rv   substitute_htmlrf   substitute_html5substitute_xmlr   r}   ra   _FormatterOrName)r~   s   @r+   <module>r      sj   " " W W W ' )+t
" t
n
I 
.
9 
0 "/*::"  v  #0*;; "&#  w 
 (5*:: "&(  | $
 %2*99%  y !  -F  t  ,*::!  f  $0*99$  i   +tD  d  *23%*)= Y = C( r.   