403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/docutils/parsers/rst/directives/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/docutils/parsers/rst/directives/__pycache__/tables.cpython-311.pyc
�

M=&b�V����dZdZddlZddlZddlZddlmZmZm	Z	m
Z
ddlmZddl
mZddl
mZd�ZGd	�d
e��ZGd�de��ZGd
�de��ZGd�de��ZdS)z 
Directives for table elements.
�reStructuredText�N)�io�nodes�statemachine�utils)�SystemMessagePropagation)�	Directive)�
directivesc�,�tj|d��S)N)�left�center�right)r
�choice)�arguments �H/usr/lib/python3/dist-packages/docutils/parsers/rst/directives/tables.py�alignrs����X�'B�C�C�C�c��eZdZdZdZdZejeje	ej
ejdej��d�Z
dZd�Zd�Zd�Zd	�Zed
���Zd�Zd�Zd
S)�Tablez#
    Generic table base class.
    �T)�auto�grid)�class�namer�width�widthsc��|jrp|jd}|j�||j��\}}t	j|dg|�R�}|j�|j��\|_|_	nd}g}||fS)Nr�)
�	arguments�state�inline_text�linenor�title�
state_machine�get_source_and_line�source�line)�self�
title_text�
text_nodes�messagesr#s     r�
make_titlezTable.make_title*s����>�		����*�J�#'�:�#9�#9�*�:>�+�$G�$G� �J���K�
�B�<��<�<�<�E��-�A�A�$�+�N�N�
�U�\�
�Z�Z��E��H��h��rc�&�|j�|jdz
��}g}d}d|jvr_|�|jd�d��|���|��\}}|�|��||fS)Nrr�header�
)r$�
get_sourcer"�options�parse_csv_data_into_rows�split�
HeaderDialect�extend)r(r&�
table_head�max_header_cols�rowss     r�process_header_optionzTable.process_header_option7s����#�.�.�t�{�Q��?�?���
����t�|�#�#�$(�$A�$A���X�&�,�,�T�2�2�D�4F�4F�4H�4H��%�%�!�D�/�
���d�#�#�#��?�*�*rc	��t|��|kri|j�|�dt|���d|j�d�t	j|j|j��|j���}t|���t|��|cxkrdkrjnng|j�dt|���d|j�d�t	j|j|j��|j���}t|���|D�]}t|��|kri|j�|�d	t|���d
|j�d�t	j|j|j��|j���}t|���t|��|cxkrdkrjn��|j�dt|���d|j�d�t	j|j|j��|j���}t|�����dS)Nz" header row(s) specified but only z row(s) of data supplied ("z
" directive).�r'rzInsufficient data supplied (z9 row(s)); no data remaining for table body, required by "z" directive.z# stub column(s) specified but only z columns(s) of data supplied ("z= columns(s)); no data remaining for table body, required by ")	�len�reporter�errorrr�
literal_block�
block_textr"r)r(r8�header_rows�stub_columnsr>�rows      r�check_table_dimensionszTable.check_table_dimensionsBsM���t�9�9�{�"�"��M�'�'��;�;��D�	�	�	�	�4�9�9�9�)6��#�D�O�T�_�E�E��[�	(�"�"�E�
+�5�1�1�1��t�9�9��'�'�'�'�a�'�'�'�'�'��M�'�'�8�s�4�y�y�8�8� $�	�8�8�8��#�D�O�T�_�E�E��[�(�"�"�E�+�5�1�1�1��	6�	6�C��3�x�x�,�&�&��
�+�+�#�2�2� #�C���2�2���2�2�2��'�����I�I���,�&�&��/�u�5�5�5��3�x�x�<�+�+�+�+�!�+�+�+�+�+��
�+�+�+�-0��H�H�H�H�d�i�i�i�A��'�����I�I���,�&�&��/�u�5�5�5�,�	6�	6rc�V�d|jvr|j�d��|d<dSdS)Nr�r1�get)r(�
table_nodes  r�set_table_widthzTable.set_table_widthds7���d�l�"�"�"&�,�"2�"2�7�";�";�J�w����#�"rc�8�|j�dd��S)NrrrF�r(s rrzTable.widthshs���|����"�-�-�-rc���t|jt��rzt|j��|krZ|j�d|j�d|�d�tj|j	|j	��|j
���}t|���|j}nZ|r
d|zg|z}nN|j�dtj|j	|j	��|j
���}t|���|S)N�"z6" widths do not match the number of columns in table (�).r;�dz#No table data detected in CSV file.)�
isinstancer�listr<r=r>rrr?r@r"r)r(�n_colsr>�
col_widthss    r�get_column_widthszTable.get_column_widthsls����d�k�4�(�(�	2��4�;���6�)�)��
�+�+�+�:>�)�)�)�V�V�V�-M��'�����I�I���,�&�&��/�u�5�5�5���J�J�
�	2���-��6�1�J�J��M�'�'�(M��#�D�O�T�_�E�E��[�(�"�"�E�+�5�1�1�1��rc	��|D]G}|D]B}t|��|kr-|�dddgfg|t|��z
z���C�HdS)Nr)r<r5)r(�columns�parts�partrCs     r�"extend_short_rows_with_empty_cellsz(Table.extend_short_rows_with_empty_cellsst���	G�	G�D��
G�
G���s�8�8�g�%�%��J�J��A�q�"�
��'�C��H�H�2D�E�F�F�F��
G�	G�	GrN)�__name__�
__module__�__qualname__�__doc__�optional_arguments�final_argument_whitespacer
�class_option�	unchangedr� length_or_percentage_or_unitless�value_or�positive_int_list�option_spec�has_contentr,r9rDrI�propertyrrTrY�rrrrs����������� $��&�3�%�/�!�&�G�0�Z�0�1A�1;�1M�O�O�	P�P�K��K����	+�	+�	+� 6� 6� 6�D<�<�<��.�.��X�.����&G�G�G�G�Grrc��eZdZd�ZdS)�RSTTablec��|jsJ|j�d|jzt	j|j|j��|j���}|gS|���\}}t	j	��}|j
�|j|j|��t|��dks t|dtj��sJ|j�d|jzt	j|j|j��|j���}|gS|d}|dxx|j�dg��z
cc<|�|��d|jvr|j�d��|d<t|jt*��rv|d}	|�|d	��}n%#t.$r}	|	jdgcYd}	~	Sd}	~	wwxYwd
�|jD��}
t5|
|��D]
\}}||d<�|jdkr|dxxd
gz
cc<n|jr|dxxdgz
cc<|�|��|r|�d|��|g|zS)Nz:Content block expected for the "%s" directive; none found.r;rrzOError parsing content block for the "%s" directive: exactly one table expected.�classesrr�colsc�(�g|]}|jdk�
|��S)�colspec)�tagname)�.0�childs  r�
<listcomp>z RSTTable.run.<locals>.<listcomp>�s.��7�7�7�%� �=�I�5�5��5�5�5r�colwidthr�colwidths-auto�colwidths-given)�contentr=�warningrrr?r@r"r,�Elementr �nested_parse�content_offsetr<rP�tabler>r1rGrIrrQrTr�args�children�zip�add_name�insert)
r(rxr#r+�noder>rH�tgrouprS�detail�colspecsro�	col_widths
             r�runzRSTTable.run�s����|�	��m�+�+�-6�8<�	�-B��#�D�O�T�_�E�E��[�,�"�"�G��9���/�/�+�+���x��}�����
�����d�.A�4�H�H�H��t�9�9��>�>��D��G�U�[�!A�!A�>��M�'�'�)>�@D�	�)J��#�D�O�T�_�E�E��[�(�"�"�E��7�N��!�W�
��9������!1�!1�'�2�!>�!>�>�������Z�(�(�(��d�l�"�"�"&�,�"2�"2�7�";�";�J�w���d�k�4�(�(�		0���]�F�
(�!�3�3�F�6�N�C�C�
�
��+�
(�
(�
(���A��'�'�'�'�'�'�'�����
(����7�7�6�?�7�7�7�H�&)�(�J�&?�&?�
0�
0�"���&/��
�#�#��;�&� � ��y�!�!�!�&6�%7�7�!�!�!�!�
�[�	9��y�!�!�!�&7�%8�8�!�!�!��
�
�j�!�!�!��	(����a��'�'�'��|�h�&�&s�.G
�

G,�
G'�!G,�'G,N)rZr[r\r�rhrrrjrj�s#������&'�&'�&'�&'�&'rrjc�l�eZdZejejejejejdej��ej	ej
ejejeje
ejejejejd�ZGd�dej��ZGd�dej��Zd�Zd�Zd	�Zed
���Zed���Zd�Zd
S)�CSVTable�r)�header-rows�stub-columnsr.rr�file�url�encodingrrr�delim�	keepspace�quote�escapec�>�eZdZdZdZdZdZdZdZdZ	e
jZd�Z
dS)�CSVTable.DocutilsDialectz&CSV dialect for `csv_table` directive.�,rMTr/c���d|vr
|d|_d|vrd|_d|vr
|d|_d|vrd|_|d|_t
j�|��dS)Nr�r�Fr�r�)�	delimiter�skipinitialspace�	quotechar�doublequote�
escapechar�csv�Dialect�__init__)r(r1s  rr�z!CSVTable.DocutilsDialect.__init__�s~���'�!�!�!(��!1����g�%�%�(-��%��'�!�!�!(��!1����7�"�"�#(�� �")�(�"3����K� � ��&�&�&�&�&rN)rZr[r\r]r�r�r�r��strict�lineterminatorr��
QUOTE_MINIMAL�quotingr�rhrr�DocutilsDialectr��sP������4�4��	��	����������#��
	'�
	'�
	'�
	'�
	'rr�c�<�eZdZdZdZdZdZdZdZdZ	dZ
ejZ
dS)	�CSVTable.HeaderDialectz0CSV dialect to use for the "header" option data.r�rM�\FTr/N)rZr[r\r]r�r�r�r�r�r�r�r�r�r�rhrrr4r��s@������>�>��	��	��
����������#���rr4c��dS)NrhrKs r�check_requirementszCSVTable.check_requirements�s���rc��	|jjjjs\d|jvs	d|jvrJ|j�d|jztj	|j
|j
��|j���}|gS|���|�
��\}}|���\}}|���\}}|�||�|j��|��\}}	t%|	|��}	|j�dd��}
|j�dd��}|�||
|��|�|d|
���||
d�}|�|	��}
|�|	||f��n�#t0$r}|jdgcYd}~Sd}~wt4j$rf}t9|��}|j�d|j�d	|��tj	|j
|j
��|j���}|gcYd}~Sd}~wwxYw|
||f}|j�||j||j �
��}|dxx|j�dg��z
cc<d
|jvr|j�d
��|d
<|�!|��|�"|��|r|�#d|��|g|zS)Nr�r�z9File and URL access deactivated; ignoring "%s" directive.r;r�rr�zError with CSV data in "z
" directive:
)rrlrr)$r �document�settings�file_insertion_enabledr1r=rxrrr?r@r"r�r,�get_csv_datar9r2r��maxrGrDr5rTrYrr}r��Error�strr>�build_tabler{rrIr�r�)r(rxr#r+�csv_datar&r6r7r8�max_colsrArB�
table_bodyrSr��messager>r|rHs                   rr�zCSVTable.run�sb�� 	��J�'�0�G�
!��t�|�+�+����-�-��-�/�/�1<�>B�i�1H��'�����I�I���0�&�&�� �y� ��#�#�%�%�%�"�o�o�/�/�O�E�8�#�0�0�2�2��H�f�*.�*D�*D�*F�*F�'�J��!�:�:��$�.�.�t�|�<�<�f�F�F�N�D�(��8�_�5�5�H��,�*�*�=�!�<�<�K��<�+�+�N�A�>�>�L��'�'��k�<�H�H�H����d�<�K�<�0�1�1�1��k�l�l�+�J��/�/��9�9�J��3�3�H�5?��4L�
N�
N�
N�
N��'�	$�	$�	$��K��N�#�#�#�#�#�#�#������y�	�	�	��&�k�k�G��M�'�'�'�-1�Y�Y�Y���)A��#�D�O�T�_�E�E��[�(�"�"�E��7�N�N�N�N�N�N�����
	�����Z��4���Z�+�+�E�4�3F�,8���,�N�N�
��9������!1�!1�'�2�!>�!>�>�����d�l�"�"�"&�,�"2�"2�7�";�";�J�w�����Z�(�(�(��
�
�j�!�!�!��	(����a��'�'�'��|�h�&�&s8�A1F1�4D<F1�1
I�;
G�I�I� AI�;I�Ic
�^�|j�d|jjjj��}|jjjj}|jr�d|jvs	d|jvrV|j�	d|j
ztj|j
|j
��|j���}t|���|j�d��}|j}�nSd|jv�r�d|jvrV|j�	d|j
ztj|j
|j
��|j���}t|���t"j�t"j�|jjj����}t"j�t"j�||jd����}t1jd|��}	t5j|||�	��}|������}|jjjj�|���n�#t@$r_}|j�!d
|j
�d|�d�tj|j
|j
��|j���}t|���d}~wwxYwd|jv�r
dd
l"m#}	ddl$m%}
|jd}	|	|�����}n�#|
t@tLf$rm}|j�!d
|j
�d|jd�d|�d�tj|j
|j
��|j���}t|���d}~wwxYwt5j'||||jjjj���}|������}nV|j�(d|j
ztj|j
|j
��|j���}t|���||fS)zr
        Get CSV data from the directive content, from an external
        file, or from a URL reference.
        r�r�r�zF"%s" directive may not both specify an external file and have content.r;rzXThe "file" and "url" options may not be simultaneously specified for the "%s" directive.N)�source_pathr��
error_handlerzProblems with "z" directive path:
�.)�urlopen)�URLErrorz" directive URL "z":
)r&r�r�r�z3The "%s" directive requires content; none supplied.))r1rGr r�r��input_encoding�input_encoding_error_handlerrwr=r>rrr?r@r"rr&�os�path�dirname�abspath�current_source�normpath�joinr�
relative_pathr�	FileInput�read�
splitlines�record_dependencies�add�OSError�severe�urllib.requestr��urllib.errorr��
ValueError�StringInputrx)r(r�r�r>r&r��
source_dir�csv_filer�r�r��csv_texts            rr�zCSVTable.get_csv_datas=��
�<�#�#���
�+�4�C�E�E���
�+�4�Q�
��<�C	2����%�%��$�,�)>�)>��
�+�+�-A�CG�9�-M��'�����I�I���,�&�&��/�u�5�5�5��\�(�(��+�+�F��|�H�H�
�t�|�
#�
#����$�$��
�+�+�-.�04�	�-:��'�����I�I���	,�&�&��
/�u�5�5�5����������
� 3� B�C�C�E�E�J��W�%�%�b�g�l�l�:�37�<��3G�'I�'I�J�J�F��(��v�6�6�F�

M��<�F�19�6C�E�E�E��$�=�=�?�?�5�5�7�7���
�#�,�@�D�D�V�L�L�L�L���
7�
7�
7���-�-�-��y�y�y�%�%�%�)��'�����I�I���	.�&�&��
/�v�6�6�6�����

7�����d�l�
"�
"�

/�.�.�.�.�.�-�-�-�-�-�-��\�%�(�F�
7�"�7�6�?�?�/�/�1�1�����g�z�2�
7�
7�
7���-�-�-�����D�L��$7�$7�$7����@��)�$�/�4�?�K�K��;�	.�(�(��
/�v�6�6�6�����

7�����~��V�h�#�z�2�;�;�>�>�>�H� �}�}���1�1�3�3�H�H��M�)�)�E��)���#�D�O�T�_�E�E��[�	*�"�"�E�
+�5�1�1�1����s2�*=I�
J;�AJ6�6J;�"L�M?�A(M:�:M?c�>�tjdtd���|S)NzgCSVTable.decode_from_csv() is not required with Python 3 and will be removed in Docutils 0.21 or later.���
stacklevel��warnings�warn�DeprecationWarning��ss r�decode_from_csvzCSVTable.decode_from_csvl�/���
�D�%��	4�	4�	4�	4��rc�>�tjdtd���|S)NzgCSVTable.encode_from_csv() is not required with Python 3 and will be removed in Docutils 0.21 or later.r�r�r�r�s r�encode_for_csvzCSVTable.encode_for_csvtr�rc	�P�tjd�|D��|���}g}d}|D]|}g}|D]C}	dddtj|	���|���f}
|�|
���D|�|��t
|t|����}�}||fS)Nc��g|]}|dz��S)r/rh)rqr's  rrsz5CSVTable.parse_csv_data_into_rows.<locals>.<listcomp>}s�� B� B� B����� B� B� Br)�dialectr)r&)r��readerr�
StringListr��appendr�r<)r(r�r�r&�
csv_readerr8r�rC�row_data�cell�	cell_datas           rr2z!CSVTable.parse_csv_data_into_rows|s����Z� B� B�� B� B� B�(/�1�1�1�
������	/�	/�C��H��
+�
+����1�l�&=��O�O�%�%�f�'6�'6�'6�7�	����	�*�*�*�*��K�K��!�!�!��8�S��X�X�.�.�H�H��X�~�rN)rZr[r\r
�nonnegative_intrarbrcrdr��urir�r`r�$single_char_or_whitespace_or_unicode�flag�single_char_or_unicoderer�r�r�r4r�r�r��staticmethodr�r�r2rhrrr�r��s[������",�"<�#-�#=�'�1�&�G�0�Z�0��1;�1M�O�O�%�?�$�.�)�2�&�3�%�/�!�&�K� *��&�=�'�>�'@�@�K�*'�'�'�'�'�#�+�'�'�'�0$�$�$�$�$���$�$�$�
�
�
�,'�,'�,'�\L �L �L �\����\������\��
�
�
�
�
rr�c��eZdZdZejejejejdej��ej	ej
ed�Zd�Z
d�Zd�ZdS)�	ListTablez�
    Implement tables whose data is encoded as a uniform two-level bullet list.
    For further ideas, see
    https://docutils.sourceforge.io/docs/dev/rst/alternatives.html#list-driven-tables
    r�)r�r�rrrrrc���|jsJ|j�d|jzt	j|j|j��|j���}|gS|���\}}t	j	��}|j
�|j|j|��	|�
|��\}}d�|dD��}|j�dd��}|j�dd��}	|�|||	��n%#t"$r}
|
jdgcYd}
~
Sd}
~
wwxYw|�||||	��}d|jvr|j�d��|d<|dxx|j�d	g��z
cc<|�|��|�|��|r|�d|��|g|zS)
Nz.The "%s" directive is empty; content required.r;c�2�g|]}d�|dD����S)c��g|]	}|j��
Srh)r~)rq�items  rrsz,ListTable.run.<locals>.<listcomp>.<listcomp>�s��A�A�A�T�4�=�A�A�Arrrh)rq�row_lists  rrsz!ListTable.run.<locals>.<listcomp>�s;��3�3�3�&�B�A�X�a�[�A�A�A�3�3�3rrr�r�rrlr)rwr=r>rrr?r@r"r,ryr rzr{�check_list_contentr1rGrDrr}�build_table_from_listrIr�r�)r(r>r#r+r��num_colsrS�
table_datarArBr�rHs            rr�z
ListTable.run�s!���|�	��M�'�'�)$�&*�i�)0��#�D�O�T�_�E�E��[�(�"�"�E��7�N��/�/�+�+���x��}�����
�����d�.A�4�H�H�H�	$�#'�#:�#:�4�#@�#@� �H�j�3�3�*.�q�'�3�3�3�J��,�*�*�=�!�<�<�K��<�+�+�N�A�>�>�L��'�'�
�K��N�N�N�N��'�	$�	$�	$��K��N�#�#�#�#�#�#�#�����	$�����/�/�
�J�0;�\�K�K�
��d�l�"�"�"&�,�"2�"2�7�";�";�J�w���9������!1�!1�'�2�!>�!>�>�������Z�(�(�(��
�
�j�!�!�!��	(����a��'�'�'��|�h�&�&s�#A7D�
D=�%
D8�2D=�8D=c��t|��dks t|dtj��sV|j�d|jztj|j|j��|j	���}t|���|d}d}tt|����D�]C}||}t|��dks t|dtj��s]|j�d|j�d|dz�d�tj|j|j��|j	���}t|���|r�t|d��|krv|j�d|j�d|dz�d	t|d���d
|�d�	tj|j|j��|j	���}t|�����.t|d��}��E|�|��}||fS)NrrzUError parsing content block for the "%s" directive: exactly one bullet list expected.r;z%Error parsing content block for the "z5" directive: two-level bullet list expected, but row z- does not contain a second-level bullet list.z=" directive: uniform two-level bullet list expected, but row z5 does not contain the same number of items as row 1 (z vs rN)
r<rPr�bullet_listr=r>rr?r@r"r�rangerT)r(r�r>�	list_noder��
item_indexr�rSs        rr�zListTable.check_list_content�s���t�9�9��>�>��D��G�U�5F�!G�!G�>��M�'�'�4�6:�i�@��#�D�O�T�_�E�E��[�	(�"�"�E�
+�5�1�1�1���G�	�����I���/�/�	(�	(�J��Z�(�D��4�y�y�A�~�~�Z��Q���9J�%K�%K�~��
�+�+�+��y�y�y�*�q�.�.�.�2��'�����I�I���
,�&�&��/�u�5�5�5��
(��t�A�w�<�<�8�+�+� �M�/�/�/�
 �9�9�9�j�1�n�n�n�c�$�q�'�l�l�l�l�H�H�H�	N�
�+�D�O�T�_�M�M�!�[�0�*�*�E�3�5�9�9�9�,��t�A�w�<�<����+�+�H�5�5�
���#�#rc���tj��}|jdkr|dxxdgz
cc<n|jr|dxxdgz
cc<tjt	|�����}||z
}|D]7}tj��}|�
||jd<|rd|jd<|dz}||z
}�8g}	|D]L}
tj��}|
D]}tj��}
|
|z
}
||
z
}� |	�	|���M|r5tj
��}|�|	d|���||z
}tj��}|�|	|d���||z
}|S)	Nrrlrurv)rmrtr�stub)
rr|rr�r<ro�
attributesrC�entryr��theadr5�tbody)r(r�rSrArBr|r�r�ror8rC�row_noder�rrrs                rr�zListTable.build_table_from_list�s�����
�
���;�&� � ��)����!1� 2�2�����
�[�	4��)����!2� 3�3������3�z�?�?�3�3�3��
����#�	�	�I��m�o�o�G��$�1:��"�:�.��
"�-.��"�6�*���!���g��F�F����	"�	"�C��y�{�{�H��
"�
"����
�
����
���E�!����K�K��!�!�!�!��	��K�M�M�E��L�L��l�{�l�+�,�,�,��e�O�F���
�
��
���T�+�,�,�'�(�(�(��%����rN)rZr[r\r]r
r�rbrcrdr`rarrer�r�r�rhrrr�r��s���������#-�"<�#-�#=�&�G�0�Z�0��1;�1M�O�O�&�3�%�/�!�#�#�K�'�'�'�<$$�$$�$$�L � � � � rr�)r]�
__docformat__r��os.pathr�r��docutilsrrrr�docutils.utilsr�docutils.parsers.rstr	r
rrrjr�r�rhrr�<module>rsv��
��#�
��
�
�
���������3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�3�*�*�*�*�*�*�+�+�+�+�+�+�D�D�D�iG�iG�iG�iG�iG�I�iG�iG�iG�X('�('�('�('�('�u�('�('�('�VX�X�X�X�X�u�X�X�X�vu�u�u�u�u��u�u�u�u�ur

Youez - 2016 - github.com/yon3zu
LinuXploit