ok

Mini Shell

Direktori : /opt/cloudlinux/venv/lib64/python3.11/site-packages/guppy/gsl/__pycache__/
Upload File :
Current File : //opt/cloudlinux/venv/lib64/python3.11/site-packages/guppy/gsl/__pycache__/XHTML.cpython-311.pyc

�

�܋f�I��:�Gd�d��ZGd�d��ZdS)c�D�eZdZd5d�Zd�Zd6d�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zd�Zd6d
�Z
d�Zd7d�Zd7d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Z d!�Z!d"�Z"d#�Z#d$�Z$d%�Z%d&�Z&d'�Z'd(�Z(d)�Z)d*�Z*d+�Z+d,�Z,d-�Z-d.�Z.d/�Z/d0�Z0d1�Z1d2�Z2d3�Z3d4�Z4dS)8�
Node2XHTMLNc���||_d|_|jj|_|�|jj}||_|�||_d|_g|_d|_d|_|�	g��d}|j�
|j�dd|j�dd��|j�d	d
|z��f����|�|�|��dSdS)NF��zutf-8�meta�zhttp-equiv=zContent-Type�content=ztext/html; charset=%s)
�mod�valid_html40�encode�encode_name�error_report�
document_lang�header_nodes�indent�
indentstep�set_out�append�node_of_taci�accept)�selfr
�noderr
�charsets      �b/builddir/build/BUILD/cloudlinux-venv-1.0.6/venv/lib64/python3.11/site-packages/guppy/gsl/XHTML.py�__init__zNode2XHTML.__init__s�����!����h�o������(�.�K�&����#� ,�D��!���������������R�������� � ���!6�!6��B���%�%�m�^�D�D���%�%�j�&=��&G�I�I�J�"K�"K�	L�	L�	L����K�K���������c��|���\}}|jj}|jD]#}	|�|���#|$rY� wxYwdS�N)�split_attrsr
�
ReportedError�childrenr)rr�attrs�E�chs     r�_visit_childrenzNode2XHTML._visit_children"sr���&�&�(�(���e��H�"���-�	�	�B�
��	�	�$�������
�
�
���
����	�	s�A�A�Arc���d|z}|r|dz|z}||jjvr|dz
}|dz
}||jjvrd|jdzz|z}|�|��|xj|jz
c_dS)N�<� z /�>�
)r
�_no_end_tag_elements�line_break_allowedrrr)r�tag�arg�ts    r�beginzNode2XHTML.begin,s�����G���	��C��#�
�A��$�(�/�/�/�

��I�A�	�S����$�(�-�-�-��T�[�3�&�&��*�A����A�������t��&����rc�>�|j}|�|��|Sr)�outr)rr2�oos   r�chg_outzNode2XHTML.chg_out<s ��
�X�����S�����	rc��|�|jj��r"|t|jj��d�}nJ�|�|��}|Sr)�
startswithr
�
tgt_prefix�lenr
)r�names  r�encode_link_namezNode2XHTML.encode_link_nameAs[���?�?�4�8�.�/�/�	���D�H�/�0�0�1�1�2�D�D�
�1�����%�%���rc�`�|xj|jzc_|�d|z��dS)Nz</%s>)rrr)rr-s  r�endzNode2XHTML.endMs0�����t��&������G�c�M�"�"�"�"�"rc�2�d|z}|j|g|�Ri|��dS)NzDoc2XHTML: )r�r�msg�args�kwdss    r�errorzNode2XHTML.errorQs5���c�!�����#�-��-�-�-��-�-�-�-�-rc�8�td|d|d|��t�)NzHTML ENCODING ERROR: zargs=zkwds=)�print�
ValueErrorr>s    rrzNode2XHTML.error_reportUs!��
�%�s�G�T�7�D�I�I�I��rc��d}|r|�d��n|�d��|�dd|�|��z��|�d��|D]}|�|���|�d��|�d��|�d��dS)	Nrzp<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
z|<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
�htmlz,lang=%r xmlns="http://www.w3.org/1999/xhtml"�head�body�div)rr0�get_encoded_text�gen_stdhtmlr<)r�langr�strictrs     r�gen_document_headerzNode2XHTML.gen_document_headerYs������		��K�K��
�
�
�
�

�K�K��
�
�
�
	
�
�
�6�A�D�DY�DY��E�E��	�	�	�	
�
�
�6���� �	#�	#�D����T�"�"�"�"���������
�
�6����
	
�
�
�5�����rc��|�d��|�d��|�d��dS)NrJrIrG)r<�rs r�gen_document_trailerzNode2XHTML.gen_document_trailerzs;������������������������rc�\�|�||��|xj|jzc_dSr)r0rr)rr-r.s   r�gen_empty_elmtzNode2XHTML.gen_empty_elmts,���
�
�3��������t��&����rc�|�|�d��|�d��|�dd��|�d��|�d��|�d|jj�|jj�����z��dS)N�hrz
Generated by �az5href="https://zhuyifei1999.github.io/guppy3/gsl.html"zGSL-XHTML 0.1.7z on )rTrr0r<r
�time�asctime�	localtimerQs r�gen_generated_from_gslz!Node2XHTML.gen_generated_from_gsl�s������D�!�!�!����O�$�$�$��
�
�3�O�P�P�P����%�&�&�&�����
�
�
����F�4�8�=�0�0����1H�1H�1J�1J�K�K�K�L�L�L�L�Lrc��|jj}|�|j}|j�|dd|d|��|d|j|j��g����dS)Nrrzname=r	)r
rr-rrr.r!)rrr-�mknodes    r�gen_metazNode2XHTML.gen_meta�s�����&���;��(�C��� � ��F�6�2��F�7�C�(�(��F�:�t�x���?�?�A�
B�
B�	C�	C�	C�	C�	Crc��|�|j}|�|��\}}|�|d�d�|D������||jjvrP|jr|�d|jz��|�|��|xj	|j
zc_	dS|�|��|�|��dS)Nr(c�"�g|]\}}|�d|����
S)�=�)�.0�key�vals   r�
<listcomp>z*Node2XHTML.gen_stdhtml.<locals>.<listcomp>�s7��";�";�";�&0�s�C�.1�S�S�#�#�"6�";�";�";rz*No enclosed text allowed for Html tag: %r.)
r-rr0�joinr
r+r.rB�no_childrenrr�
arg_acceptr<)rrr-�optionsr"s     rrLzNode2XHTML.gen_stdhtml�s����;��(�C��&�&�s�+�+���e��
�
�3����";�";�49�";�";�";�<�<�	=�	=�	=��$�(�/�/�/��x�
M��
�
�@�4�8�K�M�M�M����T�"�"�"��K�K�4�?�*�K�K�K�K��O�O�D�!�!�!��H�H�S�M�M�M�M�Mrc�d�|�g��}|�|�|j����|jD]?}|jdvr|�|���!|�d|jz|���@d�|�|����S)N)�text�charz(Only text and char allowed here, not %r.r)	r4rrr.r!r-rrBrg)rr�old_outr$s    rrKzNode2XHTML.get_encoded_text�s����,�,�r�"�"�����D�K�K���)�)�*�*�*��-�	'�	'�B��v�)�)�)��	�	�$������
�
�E��6�"�#%�'�'�'�'��w�w�t�|�|�G�,�,�-�-�-rc�6�d�|j��S)Nr)rgr2rQs r�get_htmlzNode2XHTML.get_html�s���w�w�t�x� � � rc�d�|jr(|�d|j�d|j�d���dSdS)NzNo children allowed for z. Got children nodes = �.)r!rBr-�rrs  rrhzNode2XHTML.no_children�sN���=�	*��J�J�J�����$�-�-�-�)�
*�
*�
*�
*�
*�	*�	*rc�D�||_|j|_|j|_dSr)r2�extendr)rr2s  rrzNode2XHTML.set_out�s������j����j����rc�0�|�|��dSr)r^rss  r�visit_authorzNode2XHTML.visit_author�s���
�
�d�����rc�0�|�|��dSr�r%rss  r�visit_blockzNode2XHTML.visit_block�������T�"�"�"�"�"rc���|���}||jjvrd|z}n�|dd�dkrt|dd�d��}n=|���rt|��}n|�d|z|��|jj�|��}|�d|z}nd|z}|�|��|�	|��dS)Nz&%s;��0x�zNo such character: %r.z&#%d;)
�get_nameargr
�name2codepoint�int�isdigitrB�codepoint2name�getrr%)rrr9rms    r�
visit_charzNode2XHTML.visit_char�s������!�!���4�8�*�*�*��D�=�D�D��B�Q�B�x�4����4����8�R�(�(��������
B��4�y�y����
�
�3�d�:�D�A�A�A��8�*�.�.�t�4�4�D��|���~�����}�����D�������T�"�"�"�"�"rc�@�|�d|jz��dS)Nz<col width="%s" />)rr.rss  r�visit_col_widthzNode2XHTML.visit_col_width�s"�����(�4�8�3�4�4�4�4�4rc��dSrrbrss  r�
visit_commentzNode2XHTML.visit_comment�s���rc���|j|jjvrF|j|jjvr|j�|��dS|�|��dS|�d|jz|��dS)Nz-I don't know what to generate for the tag %r.)r-r
�stdhtml�_head_elements�
head_nodesrrLrBrss  r�
visit_defaultzNode2XHTML.visit_default�s����8�t�x�'�'�'��x�4�8�2�2�2���&�&�t�,�,�,�,�,�� � ��&�&�&�&�&��J�J�G��x� �!%�
'�
'�
'�
'�
'rc��|�|j��}|�dd|z��|�|��|�d��dS)NrWzname=%r)r:r.r0r%r<�rrr9s   r�visit_definezNode2XHTML.visit_define�sW���$�$�T�X�.�.���
�
�3�	�D�(�)�)�)����T�"�"�"�����
�
�
�
�
rc�t�d|_|�g��}|�|��|�|��}|jj}|j}|s|dd��}d|_|�||j��|j�	|��|�
��dS)Nr}r�enr)rr4r%r
rrrOrr2rurR)rr�oldout�newoutr]rMs      r�visit_documentzNode2XHTML.visit_document�s���������b�!�!�����T�"�"�"����f�%�%����&���!���	1��6�/�4�0�0�D����� � ��t�'8�9�9�9����������!�!�#�#�#�#�#rc�N�|j�|�d|��||_dS)Nz"Duplicate document lang directive.)rrBrss  r�visit_document_langzNode2XHTML.visit_document_langs.����)��J�J�;�T�B�B�B�!����rc�v�|j�|j�d|j����dS)N�title)rrr
rr.rss  r�visit_document_titlezNode2XHTML.visit_document_titles3���� � ���!6�!6�w���!I�!I�J�J�J�J�Jrc���|�d��|jD]A}|�d��|�|��|�d���B|�d��dS)N�ol�li�r0r!rr<�rr�cs   r�visit_enumeratezNode2XHTML.visit_enumerate	�j���
�
�4������	�	�A��J�J�t����
�H�H�T�N�N�N��H�H�T�N�N�N�N���������rc��i|_|jD]:}d�|j�d��D��}|D]}|j|j|<��;dS)Nc�6�g|]}|�����Srb)�strip)rc�xs  rrfz+Node2XHTML.visit_exdefs.<locals>.<listcomp>s ��9�9�9�!�A�G�G�I�I�9�9�9r�,)�symplacer!r.�splitr-)rrr$�syms�syms     r�visit_exdefszNode2XHTML.visit_exdefssj����
��-�	,�	,�B�9�9�r�v�|�|�C�'8�'8�9�9�9�D��
,�
,��%'�V��
�c�"�"�
,�	,�	,rc�.�|���dSr)r[rss  r�visit_generated_from_gslz#Node2XHTML.visit_generated_from_gsls���#�#�%�%�%�%�%rc�D�|j�|j��dSr)rrur!rss  r�visit_headerzNode2XHTML.visit_headers!���� � ���/�/�/�/�/rc���|�d��|jD]A}|�d��|�|��|�d���B|�d��dS)N�ulr�r�r�s   r�
visit_itemizezNode2XHTML.visit_itemizer�rc�p�|j}|jdj}|jdd�}|�d|�|����}|�dd|z��|s)|�|�|����n|D]}|�|���|�d��dS)Nrrz.html#rW�href=%r)r.r!r:r0rrrr<)rrr9�docnamer!�urir$s       r�visit_link_to_externzNode2XHTML.visit_link_to_extern&s����x���-��"�&���=����$��%�g�g�t�'<�'<�T�'B�'B�'B�C���
�
�3�	�C��(�(�(��	 ��K�K����D�)�)�*�*�*�*��
 �
 ���	�	�$���������
�
�
�
�
rc�*�|j}d|�|��z}|�dd|z��|js)|�|�|����n|�|��|�d��dS)Nz#%srWr�)r.r:r0r!rrr%r<)rrr9r�s    r�visit_link_to_localzNode2XHTML.visit_link_to_local3s����x���d�+�+�D�1�1�1���
�
�3�	�C��(�(�(��}�	'��K�K����D�)�)�*�*�*�*�� � ��&�&�&�����
�
�
�
�
rc���|j}|�d��|js)|�|�|����n|�|��|�d��dS)N�em)r.r0r!rrr%r<r�s   r�visit_link_to_unresolvedz#Node2XHTML.visit_link_to_unresolved=sm���x���
�
�4�����}�	'��K�K����D�)�)�*�*�*�*�� � ��&�&�&���������rc�2�|�|d��dS)N�pre)rLrss  r�visit_literal_blockzNode2XHTML.visit_literal_blockFs������u�%�%�%�%�%rc�0�|�|��dSrryrss  r�visit_man_page_modezNode2XHTML.visit_man_page_modeIr{rc�:�|j�|��dSr)�document_metasrrss  r�
visit_metazNode2XHTML.visit_metaLs����"�"�4�(�(�(�(�(rc�0�|�d��dS)Nz<code>:</code>&nbsp;�rrss  r�visit_spc_colonkindzNode2XHTML.visit_spc_colonkindOs��	
���*�+�+�+�+�+rc�0�|�d��dS)Nz <strong>-></strong> r�rss  r�visit_spc_mapstozNode2XHTML.visit_spc_mapstoTs�����+�,�,�,�,�,rc�0�|�|��dSrryrss  r�visit_stringzNode2XHTML.visit_stringWr{rc�0�|�|��dSr)�
visit_textrss  r�visit_symbolzNode2XHTML.visit_symbolZs����������rc���|�|j��}t|��dksd|vr|�d��|�|��|�|��dS)N�Pr*)rr.r8rr%�rrrls   rr�zNode2XHTML.visit_text]sj���{�{�4�8�$�$���t�9�9�r�>�>�T�T�\�\��K�K��������D�������T�"�"�"�"�"rc�0�|�|��dSrryrss  r�visit_to_document_onlyz!Node2XHTML.visit_to_document_onlydr{rc�0�|�|��dSrryrss  r�visit_to_html_onlyzNode2XHTML.visit_to_html_onlygr{rc��dSrrbrss  r�visit_to_tester_onlyzNode2XHTML.visit_to_tester_onlyj����rc��||_|j�d���\}}|�d|�dd��z��dS)NT)�attrdictz�    <a href="http://validator.w3.org/check?uri=referer"><img
        src="%s"
        alt="Valid HTML 4.0 Strict" height="31" width="88" /></a>
�srcz$http://www.w3.org/Icons/valid-html40)rrrr�)rrr"s   r�visit_valid_html40zNode2XHTML.visit_valid_html40msl�� ����'�3�3�T�3�B�B���e�	
�����i�i��=�>�>�	?�	@�	@�	@�	@�	@rc��dSrrbrss  r�
visit_withzNode2XHTML.visit_withyr�rc�0�|�|��dSrryrss  r�
visit_wordzNode2XHTML.visit_word|r{r)NNN)rr)5�__name__�
__module__�__qualname__rr%r0r4r:r<rBrrOrRrTr[r^rLrKrprhrrwrzr�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�r�rbrrrrs*����������@���'�'�'�'� ���

�
�
�#�#�#�.�.�.�������B���
'�'�'�'�M�M�M�C�C�C�C����� 
.�
.�
.�!�!�!�*�*�*�
!�!�!�
���#�#�#�#�#�#�&5�5�5����'�'�'����$�$�$�$"�"�"�
K�K�K����,�,�,�&�&�&�0�0�0�������������&�&�&�#�#�#�)�)�)�,�,�,�
-�-�-�#�#�#����#�#�#�#�#�#�#�#�#�
�
�
�
@�
@�
@�
�
�
�#�#�#�#�#rrc��eZdZdZdZdZdZdZdZdZ	dZ
d	Zd
e
zdzZdZ
d
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZdS)�_GLUECLAMP_)	z_parent:SpecNodesz_parent.SpecNodes:node_of_taciz_parent.Gsml:is_not_asciiz_parent.Main:tgt_prefixz_parent.Main:ReportedErrorz#_root.htmlentitydefs:name2codepointz#_root.htmlentitydefs:codepoint2namez_root:rez
_root:time)�tag_uppercase_name_charsr)7rW�address�area�b�base�big�
blockquoterI�br�caption�center�cite�code�dfn�dt�dl�ddrJr��form�h1�h2�h3�h4�h5�h6rVrG�i�img�input�kbdr�r��option�p�paramr��samp�select�small�strong�style�sub�sup�table�td�textarea�th�theadr��tr�ttr��var)�applet�basefont�dir�font�isindex�strike�u)�script)�abbr�acronym�bdo�button�col�colgroup�del�fieldset�frame�frameset�iframe�ins�label�legend�noframes�noscript�object�optgroup�q�s�span�tbody�tfootr)r�r�linkrrrr�)rr5rrV)rGrHrIr')-r�r�r�r$rJr�r�r�r�r�r�rVr)rr-rr�rr�r�r�r��menur�r�rr�r#r"rr4r3rrrr�r!r%r+rr*rr/rr)r9z
http-equiv�content�schemerMrc�@�|j�d��jS)Nz[A-Za-z]��re�compile�matchrQs r�_get_is_name_starter_charz%_GLUECLAMP_._get_is_name_starter_char�s���w���{�+�+�1�1rc�@�|j�d��jS)Nz[A-Za-z0-9\-_:\.]r:rQs r�_get_is_name_follower_charz&_GLUECLAMP_._get_is_name_follower_char�s���w���3�4�4�:�:rc�H�i}|j|jz|jzD]}d||<�|S�Nr)�_html3_2�_html4_0_deprecated�_html4_0�r�shr�s   r�_get_stdhtmlz_GLUECLAMP_._get_stdhtml�s7��
�����!9�9�D�M�I�	�	�A��B�q�E�E��	rc�(�i}|jD]}d||<�|SrB)�_line_break_allowedrFs   r�_get_line_break_allowedz#_GLUECLAMP_._get_line_break_allowed�s)��
���)�	�	�A��B�q�E�E��	rc���|�||��}|j�|d|z��}|�d||�d|��g��}|S)Nz%s.html�
write_filerl)�doc2text�pathrgr)	r�docrr9r�opts�IOrlrOs	         r�	doc2filerz_GLUECLAMP_.doc2filersh���}�}�S�$�'�'���w�|�|�C��T�!1�2�2��� � ��t�!%�!2�!2�6�4�!@�!@�6B�C�C���rc�`�t|||jj��}|���Sr)r�envrBrp)rrPr�d2hs    rrNz_GLUECLAMP_.doc2texts%����t�S�W�]�3�3���|�|�~�~�rc��|�|��}t|d��5}|�|��ddd��dS#1swxYwYdS)N�w)�	node2text�open�write)rr�filerl�fs     r�	node2filez_GLUECLAMP_.node2files����~�~�d�#�#��
�$��_�_�	��
�G�G�D�M�M�M�	�	�	�	�	�	�	�	�	�	�	�	����	�	�	�	�	�	s�A	�	A
�A
c�J�t||�����}|Sr)rrpr�s   rrYz_GLUECLAMP_.node2texts"���$��%�%�.�.�0�0���rc���|�dd��}|�dd��}|�dd��}|�dd��}|�d	d
��}|S)z-Encode special characters in `text` & return.�&z&amp;r'z&lt;�"z&quot;r)z&gt;�@z&#64;)�replace)rrls  rrz_GLUECLAMP_.encodesh���|�|�C��)�)���|�|�C��(�(���|�|�C��*�*���|�|�C��(�(���|�|�C��)�)���rc�F�|j}g}|j}d}|dd�}|dks|�|��s|d��|dkr|d��|D]�}|dks||��sG|r
|d��d}|d��|dkr|dt|��z��|d���Z|���r"|jr|s
|d��d}||����|r
|d��d}||����|r|d��d�|��S)Nrr�z�-z%dr)�is_name_follower_charr�is_name_starter_char�ord�isupperr�rg)rr9rh�nsr�
upperstater$s       rr
z_GLUECLAMP_.encode_name(sy�� $� :��
������
�
�"�1�"�X��
��9�9�D�5�5�b�9�9�9��F�3�K�K�K��S�y�y���s�����	�	�B��S�y�y� 5� 5�b� 9� 9�y��#��F�3�K�K�K�!"�J���s������9�9��F�4�#�b�'�'�>�*�*�*���s����������	
�$�"?�	
�!�#��F�3�K�K�K�!"�J���r�
�
�
�
��#��F�3�K�K�K�!"�J���r�
�
�
�
��	��F�3�K�K�K��w�w�r�{�{�rN)r�r�r��	_imports_�	_chgable_r�rCrD�_html_avoidrEr�r+rJ�meta_attributesr>r@rHrKrSrNr^rYrr
rbrrr�r��s������
�I�.�I� !���H�"���K�#�H��N����	�����"0�O�2�2�2�;�;�;����������������
������" � � � � rr�N)rr�rbrr�<module>rrsr��|#�|#�|#�|#�|#�|#�|#�|#�~H�H�H�H�H�H�H�H�H�Hr

Zerion Mini Shell 1.0