
    9 f                         d dl mZ d dlZd dlZd dlZd dlZd dlZd dlZd dlm	Z	 d dl
T d dlmZ d dlmZ g dZd Zdd	Zdd
Zej        fdZd ZdS )    )print_functionN)__version__)*BeautifierOptions)
Beautifier)default_optionsbeautifybeautify_fileusagemainc                      t                      S Nr        I/var/www/equiseq/venv/lib/python3.11/site-packages/cssbeautifier/_main.pyr	   r	   )   s    r   c                 J    t          | |          }|                                S r   )r   r
   )stringoptsbs      r   r
   r
   -   s    64  A::<<r   c                 .    t          | |t                    S r   )process_filer
   )	file_namer   s     r   r   r   2   s    	4222r   c                 b    t          dt          z   dz   |            | t          j        k    rdS dS )Nzcssbeautifier.py@a  

CSS beautifier (https://beautifier.io/)

Usage: cssbeautifier.py [options] <infile>

    <infile> can be "-", which means stdin.

Input options:

 -i,  --stdin                      Read input from stdin

Output options:

 -s,  --indent-size=NUMBER         Indentation size. (default 4).
 -c,  --indent-char=CHAR           Character to indent with. (default space).
 -e,  --eol=STRING                 Character(s) to use as line terminators.
                                   (default first newline in file, otherwise "\n")
 -t,  --indent-with-tabs           Indent with tabs, overrides -s and -c
      --preserve-newlines          Preserve existing line breaks.
      --disable-selector-separator-newline
                                   Do not print each selector on a separate line.
 -b,  --brace-style=collapse       Brace style (collapse, expand)
 -n,  --end-with-newline           End output with newline
      --disable-newline-between-rules
                                   Do not print empty line between rules.
      --space-around-combinator    Print spaces around combinator.
      --indent-empty-lines         Keep indentation on empty lines
 -r,  --replace                    Write output in-place, replacing input
 -o,  --outfile=FILE               Specify a file to output to (default stdout)

Rarely needed options:

 -h,  --help, --usage              Prints this help statement.
 -v,  --version                    Show the version

file   r   )printr   sysstderr)streams    r   r   r   6   sO    	
	$&	N Q) ) ) )T qqr   c                  H   t           j        dd          } 	 t          j        | dg d          \  }}nP# t          j        $ r>}t	          |t           j                   t          t           j                  cY d }~S d }~ww xY wt                      }g }|                    |           d}d}|D ]\  }}	|dv rd}
|d	v r|	}|d
v rd}|dv rt	          t                    c S |dv rt                      c S |dv rt          |	          |_        a|dv r|	|_        m|dv r|	|_        y|dv rd|_        |dv rd|_        |dv rd|_        |dv r|	|_        |dv rd|_        |dv rd|_        |dv rd|_        |dv rd|_        |dv rd|_        	 t/          ||          \  }}|D ]<}|s|}n|}t1          |||d          }t3          ||          }t5          |||           =n# t6          $ r8 t	          dt           j                   t          t           j                   Y dS t8          $ rA}t	          dt           j                   t	          |t           j                   Y d }~dS d }~wt:          $ r&}t	          |t           j                   Y d }~dS d }~ww xY wdS )Nr   zhvio:rs:c:e:tnb:)editorconfighelpr   versionstdinzoutfile=replacezindent-size=zindent-char=zeol=zindent-with-tabszpreserve-newlineszbrace-style=z"disable-selector-separator-newlinezend-with-newlinezdisable-newline-between-ruleszspace-around-combinatorzindent-empty-linesr   stdoutF)z--stdinz-i-)z	--outfilez-o)z	--replacez-rT)z	--versionz-v)z--helpz--usagez-h)z--indent-sizez-s)z--indent-charz-c)z--eolz-e)z--indent-with-tabsz-t)z--preserve-newlines)z$--disable-selector-separator-newline)z--brace-stylez-b)z--end-with-newlinez-n)z--disable-newline-between-rules)z--space-around-combinator)z--indent-empty-lines)z--editorconfigjsz-Must pipe input or define at least one file.
z.Error while decoding input or encoding output:r   )r   argvgetoptGetoptErrorr   r    r   r	   extendr   intindent_sizeindent_chareolindent_with_tabspreserve_newlinesselector_separator_newlinebrace_styleend_with_newlinenewline_between_rulesspace_around_combinatorindent_empty_linesr#   get_filepaths_from_paramsintegrate_editorconfig_optionsr   write_beautified_outputMissingInputStreamErrorUnicodeError	Exception)r+   r   argsexcss_optionsfilepath_paramsoutfile_paramr'   optargr   outfile	filepathsfilepathprettys                  r   r   r   g   s   8ABB<D!]  
 

dd0  ! ! !bsz""""SZ        ! "##KO4   MG #, #,S###DD'''GG'''GG'''%%%%%///77NNN+++&)#hhK##+++&)K##O##!KOO000+/K((,,,,0K))===5:K22+++&)K##000+/K((88805K--22226K//----1K**''''+K$6PP	7! 	B 	BH #'"8+w K #8[99F#FKAAAA	B #   >SZPPPPcjqq   >SZPPPPbsz""""qqqqq   bsz""""qqqqq
 1sF   2 A?3A:4A?:A?AG& &>J'	J06I,,J9JJr   )
__future__r   r   osiorecopyr,   cssbeautifier.__version__r   jsbeautifier.clicssbeautifier.css.optionsr   cssbeautifier.css.beautifierr   __all__r	   r
   r   r(   r   r   r   r   r   <module>rV      s  4 & % % % % % 



 				 				 				   1 1 1 1 1 1     7 7 7 7 7 7 3 3 3 3 3 3
K
K
K     
3 3 3 3  . . . .bl l l l lr   