§
    rŠtjT  ã                   óh   — d dl Z d dlZd dlmZ d dlmZ d dlmZmZ d„ Z	d„ Z
 G d„ dee¦  «        ZdS )	é    N)ÚUserDict)ÚReprHTMLMixin)Úgenerate_link_to_param_docÚget_docstringc                 óä   — t          j        | ¦  «        } t          j        ¦   «         }d|_        d|_        d|_        t          j        |                     |¦  «        ¦  «        }| |v rdnd}|| |dœS )zžCategorizes parameters as 'default' or 'user-set' and formats their values.
    Escapes or truncates parameter values for display safety and readability.
    é   é   é2   zuser-setÚdefault)Ú
param_typeÚ
param_nameÚparam_value)ÚhtmlÚescapeÚreprlibÚReprÚmaxlistÚmaxtupleÚ	maxstringÚrepr)ÚnameÚvalueÚnon_default_paramsÚrÚcleaned_valuer   s         ú]/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/sklearn/utils/_repr_html/params.pyÚ_read_paramsr      sp   € õ Œ;�tÑÔ€DÝŒ‰Œ€AØ€A„IØ€A„JØ€A„KÝ”K §¢ u¡¤Ñ.Ô.€Mà#Ð'9Ð9Ð9��¸y€Jà$°DÈÐWÐWÐWó    c           	      ó´  — d}d}d}g }| D ]¥}t          || |         | j        ¦  «        }t          | j        || j        ¦  «        }t          | j        d|¦  «        }| j        r#|r!|r|                     ||d         |¬¦  «        }	n|d         }	|                      |j        d
i |¤d|	i¤Ž¦  «         Œ¦|                     d                     |¦  «        ¬	¦  «        S )a   Generate HTML representation of estimator parameters.

    Creates an HTML table with parameter names and values, wrapped in a
    collapsible details element. Parameters are styled differently based
    on whether they are default or user-set values.
    a/  
        <div class="estimator-table">
            <details>
                <summary>Parameters</summary>
                <table class="parameters-table">
                  <tbody>
                    {rows}
                  </tbody>
                </table>
            </details>
        </div>
    aW  
        <tr class="{param_type}">
            <td><i class="copy-paste-icon"
                 onclick="copyToClipboard('{param_name}',
                          this.parentElement.nextElementSibling)"
            ></i></td>
            <td class="param">{param_display}</td>
            <td class="value">{param_value}</td>
        </tr>
    aY  
        <a class="param-doc-link"
            style="anchor-name: --doc-link-{param_name};"
            rel="noreferrer" target="_blank" href="{link}">
            {param_name}
            <span class="param-doc-description"
            style="position-anchor: --doc-link-{param_name};">
            {param_description}</span>
        </a>
    Ú
Parametersr   )Úlinkr   Úparam_descriptionÚparam_displayú
)Úrows© )	r   Únon_defaultr   Úestimator_classÚdoc_linkr   ÚformatÚappendÚjoin)
ÚparamsÚPARAMS_TABLE_TEMPLATEÚPARAM_ROW_TEMPLATEÚ!PARAM_AVAILABLE_DOC_LINK_TEMPLATEr%   ÚrowÚparamr!   r"   r#   s
             r   Ú_params_html_reprr3      s  € ðÐð	Ðð	)Ð%ð €DØð Uð UˆÝ˜S &¨¤+¨vÔ/AÑBÔBˆÝ)¨&Ô*@À#ÀvÄÑWÔWˆå)¨&Ô*@À,ÐPSÑTÔTÐàŒ?ð 		0˜tð 		0Ð(9ð 		0à=×DÒDØØ  Ô.Ø"3ð Eñ ô ˆMˆMð " ,Ô/ˆMà�ŠÐ-Ð&Ô-ÐSÐS°ÐSÐSÀ]ÐSÐSÐSÑTÔTÐTÐTà ×'Ò'¨T¯YªY°t©_¬_Ð'Ñ=Ô=Ð=r   c                   óB   ‡ — e Zd ZdZeZd e¦   «         dddœˆ fd„
Zˆ xZS )Ú
ParamsDictaQ  Dictionary-like class to store and provide an HTML representation.

    It builds an HTML structure to be used with Jupyter notebooks or similar
    environments. It allows storing metadata to track non-default parameters.

    Parameters
    ----------
    params : dict, default=None
        The original dictionary of parameters and their values.

    non_default : tuple, default=(,)
        The list of non-default parameters.

    estimator_class : type, default=None
        The class of the estimator. It allows to find the online documentation
        link for each parameter.

    doc_link : str, default=""
        The base URL to the online documentation for the estimator class.
        Used to generate parameter-specific documentation links in the HTML
        representation. If empty, documentation links will not be generated.
    NÚ )r-   r'   r(   r)   c                óx   •— t          ¦   «                              |pi ¦  «         || _        || _        || _        d S )N)ÚsuperÚ__init__r'   r(   r)   )Úselfr-   r'   r(   r)   Ú	__class__s        €r   r9   zParamsDict.__init__z   s<   ø€ õ 	‰Œ×Ò˜˜ 2Ñ&Ô&Ð&Ø&ˆÔØ.ˆÔØ ˆŒˆˆr   )	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r3   Ú
_html_reprÚtupler9   Ú__classcell__)r;   s   @r   r5   r5   `   se   ø€ € € € € ðð ð. #€Jð ¨%¨%©'¬'À4ÐRTð!ð !ð !ð !ð !ð !ð !ð !ð !ð !ð !r   r5   )r   r   Úcollectionsr   Úsklearn.utils._repr_html.baser   Úsklearn.utils._repr_html.commonr   r   r   r3   r5   r&   r   r   ú<module>rF      s½   ðð €€€Ø €€€Ø  Ð  Ð  Ð  Ð  Ð  à 7Ð 7Ð 7Ð 7Ð 7Ð 7ðð ð ð ð ð ð ð ðXð Xð Xð >>ð >>ð >>ðB !ð  !ð  !ð  !ð  !� ñ  !ô  !ð  !ð  !ð  !r   