<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
U
    ʗRe0                     @   s   d dl Z d dlmZmZmZ ddlmZ ddlmZm	Z	 e 
dZeeeeeef  ddd	Zdeeeee dddZedkrddlmZ eddZed ee	dddd dS )    N)IterableListTuple   )	loop_last)cell_len
chop_cellsz	\s*\S+\s*)textreturnc                 c   sL   d}t | |}|d k	rH| \}}|d}|||fV  t | |}qd S )Nr   )re_wordmatchspangroup)r	   position
word_matchstartendword r   /builddir/build/BUILDROOT/alt-python38-pip-22.2.1-2.el8.x86_64/opt/alt/python38/lib/python3.8/site-packages/pip/_vendor/rich/_wrap.pywords
   s    
r   T)r	   widthfoldr
   c                 C   s   g }|j }d}t}t| D ]\}}}	||	 }
||
 |kr|
|kr|rt|	|dd}t|D ].\}}|rr|| |r||}q^|t|7 }q^q|r|| ||	}q|r|r|| ||	}q|||	7 }q|S )Nr   )max_sizer   )appendr   r   rstripr   r   len)r	   r   r   dividesr   line_position	_cell_lenr   _endr   word_lengthchopped_wordslastliner   r   r   divide_line   s0    


r%   __main__)Console
   )r   z@12345 abcdefghijklmnopqrstuvwyxzABCDEFGHIJKLMNOPQRSTUVWXYZ 12345abcdefghijklmnopqrstuvwxyz   )r   )T)retypingr   r   r   _loopr   cellsr   r   compiler   strintr   boolr%   __name__consoler'   printr   r   r   r   <module>   s   



