§
]<ˆjL
ã ó¸ — d dl mZ d dlZd dlmZ ddlmZ ddlmZm Z ej
d¦ « Zdd„Zddd„Z
edk rœddlmZ ed¬¦ « Ze d¦ « e e dd¦ « ¦ « ed¬¦ « Ze ¦ « e d¦ « e ¦ « e d¦ « dS dS ) é )ÚannotationsN)ÚIterableé )Ú loop_last)Úcell_lenÚ
chop_cellsz \s*\S+\s*ÚtextÚstrÚreturnúIterable[tuple[int, int, str]]c # óì K — d}t | |¦ « }|�R| ¦ « \ }}| d¦ « }|||fV — t | |¦ « }|PdS dS )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.
r N)Úre_wordÚmatchÚspanÚgroup)r ÚpositionÚ
word_matchÚstartÚendÚwords úh/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/pip/_vendor/rich/_wrap.pyÚwordsr s† è è € ð
€HÝ—’˜t XÑ.Ô.€JØ
Ð
Ø—_’_Ñ&Ô&‰
ˆˆsØ×Ò Ñ"Ô"ˆØ�S˜$ÐÐÐÐÝ—]’] 4¨Ñ-Ô-ˆ
ð Ð
Ð
Ð
Ð
Ð
ó TÚwidthÚintÚfoldÚboolú list[int]c óæ — g }|j }d}t }t | ¦ « D ]Î\ }}} || ¦ « ¦ « }
||z
}||
k }|r| || ¦ « z
}Œ?|
|k ro|rTt | |¬¦ « }
t |
¦ « D ]2\ }}|r ||¦ « |r ||¦ « }Œ |t
|¦ « z
}Œ3Œ›|r ||¦ « || ¦ « }Œ´|r|r ||¦ « || ¦ « }ŒÏ|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 ©r )Úappendr r Úrstripr r Úlen)r r r Ú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Ø�i §¢¡
¤
Ñ.Ô.ˆØ +Ñ-ˆØ$3°{Ò$BÐ!à$ð .à˜9˜9 T™?œ?Ñ*ˆKˆKð ˜UÒ"Ð"ð ð 2å",¨T¸Ð"?Ñ"?Ô"?�KÝ&/°Ñ&<Ô&<ð /ð /™
˜˜dØ ð *Ø"˜F 5™MœM˜MØð /Ø*3¨)°D©/¬/˜K˜Kà!¥S¨¡Y¤YÑ.˜E˜Eð
/ð ð &ؘ˜u™
œ
˜
Ø"+ )¨D¡/¤/�K�KØð
. ð
.ð ��u‘
”
�
Ø'˜i¨™oœo�øàÐr Ú__main__)ÚConsoleé
r z@12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345Úabcdefghijklmnopqrstuvwxyzé uR Textualã�¯Pythonã�®é«˜é€Ÿã‚¢ãƒ—リケーション開発フレームワークã�§ã�™u4 アプリケーションã�¯1670万色を使用ã�§ã��)r r
r r )T)r r
r r r r r r )Ú
__future__r ÚreÚtypingr Ú_loopr Úcellsr r Úcompiler r r. Ú__name__Úconsoler0 ÚprintÚrule© r r ú