
    D6iI                     @    d dl mZ d dlmZ d dlmZ ddddddi dfdZy)	    wraps)MemoryCache)ParserFT   c                     	
 t        |r|nd      	t        |||      

j                          	 
fd}|S )a  Decorator to minify endpoint HTML output.

    Parameters
    ----------
        html: bool
            enable minifying HTML content.
        js: bool
            enable minifying JavaScript content.
        cssless: bool
            enable minifying CSS/LESS content.
        cache: bool
            enable caching minifed response.
        caching_limit: int
            to limit the number of minified response variations.
        failsafe: bool
            silence encountered exceptions.
        parsers: dict
            parsers to handle minifying specific tags.
        go: bool
            use optimized golang minifier if available.

    Returns
    -------
        String of minified HTML content.
    r   )goc                 :     t                fd       }|S )Nc                       | i |t        t              xr t        	g      }
fd}|sS j                  |      S )Nc                  (    j                   d      S )Nhtml)minify)contentparsers   Z/home/azureuser/techstart-app/venv/lib/python3.12/site-packages/flask_minify/decorators.py<lambda>z<minify.<locals>.decorator.<locals>.wrapper.<locals>.<lambda>3   s    6==&#A     )
isinstancestrany
get_or_set)argskwargsshould_minifyget_minifiedr   cachingcsslessfunctionr   jsr   s       @r   wrapperz*minify.<locals>.decorator.<locals>.wrapper/   sO    //G&w4QdB=P9QMAL %%g|<<r   r   )r   r    r   r   r   r   r   s   ` r   	decoratorzminify.<locals>.decorator.   s%    	x	= 	= 
	= r   )r   r   update_runtime_options)r   r   r   cachecaching_limit	fail_safeparsersr	   r!   r   r   s   ```      @@r   r   r      sF    F 5-a8GGY2.F
!!$G4  r   N)	functoolsr   flask_minify.cacher   flask_minify.parsersr   r    r   r   <module>r+      s-     * ' 

5r   