OwlCyberSecurity - MANAGER
Edit File: text.cpython-39.pyc
a ���e�9 � @ s� d dl Z d dlZd dlZd dlZd dl mZ d dl mZ d dlmZ d dl m Z d dlmZm Z mZ d dlmZ d dlmZ d d lmZmZ e d d� �Zedej�Zed ej�Zedej�Zed�Zed�Ze dd� �ZG dd� de�Ze dd� �Ze ed�fdd��Z e dd� �Z!e dd� �Z"dd� Z#dd �d!d"�Z$G d#d$� d$e�Z%dd �d%d&�Z&ed'ej'�Z(d(d)� Z)e d*d+� �Z*e d3d-d.��Z+d/d0� Z,d1d2� Z-ee-e.�Z/dS )4� N)�GzipFile)�compress)�BytesIO)�SuspiciousFileOperation)�SimpleLazyObject�keep_lazy_text�lazy)�_lazy_re_compile)�gettext)�gettext_lazy�pgettextc C s2 | s| S t | t�st| �} | d �� | dd� S )z(Capitalize the first letter of a string.r � N)� isinstance�str�upper)�x� r �R/home/gouroczh/virtualenv/pat/3.9/lib/python3.9/site-packages/django/utils/text.py�capfirst s r z<[^>]+?>|([^<>\s]+)z<[^>]+?>|(.)z<(/)?(\S+?)(?:(\s*/)|\s.*?)?>z\r\n|\rz&(((?<=[a-z])[A-Z])|([A-Z](?![A-Z]|$)))c s � �fdd�}d� |� �S )aC A word-wrap function that preserves existing line breaks. Expects that existing line breaks are posix newlines. Preserve all white space except added line breaks consume the space on which they break the line. Don't wrap long words, thus the output text may have lines longer than ``width``. c 3 s� � � d�D ]�} t| �d�r"�d p$���}t| �|kr�| d |d � �d�d }|dkrz| �d�d }|dkrz| V d} q�d| d |d � V | |d � } t| �d�r��d p����}q*| r | V q d S )NT� r � r � z%s )� splitlines�min�endswith�len�rfind�find)�line� max_width�space��text�widthr r � _generator/ s zwrap.<locals>._generatorr )�join)r"