%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/rich/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/rich/__pycache__/_wrap.cpython-312.pyc

�

"T�eL
��v�ddlmZddlZddlmZddlmZddlmZm	Z	ejd�Zdd�Zddd	�Z
ed
k(r{ddlmZed�
�Zej#d�ee	dd��ed�
�Zej%�ej#d�ej%�ej#d�yy)�)�annotationsN)�Iterable�)�	loop_last)�cell_len�
chop_cellsz	\s*\S+\s*c#��K�d}tj||�}|�E|j�\}}|jd�}|||f��tj||�}|��Dyy�w)z�Yields each word from the text as a tuple
    containing (start_index, end_index, word). A "word" in this context may
    include the actual word and any whitespace to the right.
    rN)�re_word�match�span�group)�text�position�
word_match�start�end�words      �,/usr/lib/python3/dist-packages/rich/_wrap.py�wordsrsh����
�H����t�X�.�J�
�
 ��_�_�&�
��s�����"���S�$����]�]�4��-�
�	�
 �s�AA#�!A#c��g}|j}d}t}t|�D]�\}}}	||	j��}
||z
}||
k\}|r|||	�z
}�5|
|kDrY|rDt	|	|��}
t|
�D](\}}|r||�|r	||�}�|t
|�z
}�*��|r||�||	�}��|s��|s��||�||	�}��|S)a�Given a string of text, and a width (measured in cells), return a list
    of cell offsets which the string should be split at in order for it to fit
    within the given width.

    Args:
        text: The text to examine.
        width: The available cell width.
        fold: If True, words longer than `width` will be folded onto a new line.

    Returns:
        A list of indices to break the line at.
    r��width)�appendrr�rstriprr�len)rr�fold�break_positionsr�cell_offset�	_cell_lenr�_endr�word_length�remaining_space�word_fits_remaining_space�folded_word�last�lines                r�divide_liner's���"$�O�
�
#�
#�F��K��I�"�4�[� .���t�T�����
�.���+�-��$3�{�$B�!�$��9�T�?�*�K��U�"��",�T��"?�K�&/��&<�/�
��d� �"�5�M��*3�D�/�K�!�S��Y�.�E�
/���u�
�"+�D�/�K����u�
�'��o��A .�D���__main__)�Console�
rz@12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345�abcdefghijklmnopqrstuvwxyz�uRTextualはPythonの高速アプリケーション開発フレームワークですu4アプリケーションは1670万色を使用でき)r�str�returnzIterable[tuple[int, int, str]])T)rr.r�intr�boolr/z	list[int])�
__future__r�re�typingr�_loopr�cellsrr�compiler
rr'�__name__�consoler*�print�rule�r(r�<module>r=s���"�	���'�
�"�*�*�\�
"��.�4�n�z�� ��B��G��M�M�T�U�	�*�1�2�
6�7��B��G��L�L�N��M�M�f�g��L�L�N��M�M�H�I�r(

Zerion Mini Shell 1.0