
    ei                     (    d ddZ d Zd Zd Zd Zy)T)convert_underscoresc                     | rd }nd }|D cg c]
  } ||       }}|j                         D ]  \  }}|s	|j                   ||             ! dj                  |      S c c}w )aB  Join multiple class names with spaces between them.

    Example
    -------

    >>> classes("foo", "bar", baz=False, boz=True, long_name=True)
    "foo bar boz long-name"

    Or, if you want to keep the underscores:

    >>> classes("foo", "bar", long_name=True, convert_underscores=False)
    "foo bar long_name"

    c                 &    | j                  dd      S )N_-)replacenames    Q/var/www/html/glpi_dashboard/venv/lib/python3.12/site-packages/htbuilder/utils.pycleanzclasses.<locals>.clean   s    <<S))    c                     | S N r   s    r
   r   zclasses.<locals>.clean"   s    Kr    )itemsappendjoin)r   namesnames_and_boolsr   r	   classesincludes          r
   r   r      so     	*	 (--tuT{-G-(..0 (gNN5;'( 88G .s   A"c                      t        | t              st        d      dj                  d | j	                         D              S )a  Create a style string from Python objects.

    For rules that have multiple components use tuples or lists. Tuples are
    joined with spaces " ", lists are joined with commas ",". And although you
    can use lists for font-family rules, we also provide a helper called
    `fonts()` that wraps font names in quotes as well. See example below.

    Example
    -------

    >>> px = unit.px
    >>> rgba = func.rgba
    >>> bottom_margin = 10
    >>>
    >>> styles(
    ...     color="black",
    ...     font_family=fonts("Comic Sans", "sans"),
    ...     margin=(0, 0, px(bottom_margin), 0),
    ...     box_shadow=[
    ...         (0, 0, "10px", rgba(0, 0, 0, 0.1)),
    ...         (0, 0, "2px", rgba(0, 0, 0, 0.5)),
    ...     ],
    ... )
    ...
    "color:black;font-family:"Comic Sans","sans";margin:0 0 10px 0;
    box-shadow:0 0 10px rgba(0,0,0,0.1),0 0 2px rgba(0,0,0,0.5)"

    zStyle must be a dict;c              3   b   K   | ]'  \  }}|j                  d d      dt        |       ) yw)r   r   :N)r   _parse_style_value).0kvs      r
   	<genexpr>zstyles.<locals>.<genexpr>N   s2      Q 99S#&(:1(=>s   -/)
isinstancedict	TypeErrorr   r   r   r   )ruless    r
   stylesr%   .   s>    : eT".//88 kkm  r   c                     t        | t              rdj                  d | D              S t        | t              rdj                  d | D              S t	        |       S )Nr   c              3   2   K   | ]  }t        |        y wr   r   r   xs     r
   r    z%_parse_style_value.<locals>.<genexpr>X        >!*1->   ,c              3   2   K   | ]  }t        |        y wr   r(   r)   s     r
   r    z%_parse_style_value.<locals>.<genexpr>[   r+   r,   )r!   tupler   liststr)styles    r
   r   r   V   sJ    %xx>>>>%xx>>>>u:r   c                  2    dj                  d | D              S )zfJoin fonts with quotes and commas.

    >>> fonts("Comic Sans, "sans")
    ""Comic Sans", "Sans""
    r-   c              3   &   K   | ]	  }d |z    yw)z"%s"Nr   )r   r	   s     r
   r    zfonts.<locals>.<genexpr>f   s     4dFTM4s   )r   )r   s    r
   fontsr5   `   s     884e444r   c                  B    dj                  |       dt        di |dS )Nr-   z {}r   )r   r%   )	selectors
propertiess     r
   ruler:   i   s#     r   N)r   r%   r   r5   r:   r   r   r
   <module>r;      s$    )- >%!P5r   