<commit_before><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>js-orgChart v2 by Rchockxm</title>
<link rel="stylesheet" type="text/css" href="css/template.css" />
<script language="javascript" src="../js/js-orgchart-2.js"></script>
<script language="javascript" src="data/data.js"></script>
</head>

<body>
    <div id="form-content" style="">
        <div id="search">
            <select id="search-type">
                <option value="0">All</option>
                <option value="1">Caption</option>
                <option value="2">Description</option>
            </select>
            <input type="text" id="search-text" value="" />
            <input type="button" id="search-submit" value="Search" />
        </div>
        <div id="orgchart"></div>
    </div>
</body>

<script language="javascript">
// Custom event for search input.
document.getElementById("search-submit").onclick = function() {
    var strSearch = document.getElementById("search-text").value;
    var type = document.getElementById("search-type").value;
    
    searchNodesByData(pOrgNodes, strSearch, type);
};

// Search by customParams data.
function searchNodesByData(pData, strSearch, type) {
    strSearch = strSearch.toLowerCase();
    
    if (typeof pData === "object" && pData !== null) {
        if (typeof pData.customParams === "object" && pData.customParams !== null) {
            var isFind = false;
            
            switch (parseInt(type)) {
                case 0:
                    isFind = (pData.customParams.caption.toLowerCase().indexOf(strSearch) >= 0) ? true : isFind;
                    
                    if (isFind == false) {
                        isFind = (pData.customParams.description.toLowerCase().indexOf(strSearch) >= 0) ? true : isFind;
                    }
                break;
                
                case 1:
                    isFind = (pData.customParams.caption.toLowerCase().indexOf(strSearch) >= 0) ? true : isFind;
                break;
                
                case 2:
                    isFind = (pData.customParams.description.toLowerCase().indexOf(strSearch) >= 0) ? true : isFind;
                break;
            }
            
            var elm = document.getElementById(pData.node.idt1);
            
            if (isFind == true) {
                elm.className = "node-light";
            }
            else {
                elm.className = "";
            }
        }
        
        if (typeof pData.nodes === "object" && pData.nodes !== null) {
            for (var i = 0; i < pData.nodes.length; i ++) {
                searchNodesByData(pData.nodes[i], strSearch, type);
            }
        }
    }
}

(function() {
    // Create params for chart.
    var chartParams = {
        options: {
            top: 30,
            left: 12,
            line: {
                size: 2,
                color: "#3388dd"
            },
            node: {
                width: 64,<commit_msg>Update node-search.html<commit_after><!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<title>js-orgChart v2 by Rchockxm</title>
<link rel="stylesheet" type="text/css" href="css/template.css" />
<script language="javascript" src="../js/js-orgchart-2.js"></script>
<script language="javascript" src="data/data.js"></script>
</head>

<body>
    <div id="form-content" style="">
        <div id="search">
            <select id="search-type">
                <option value="0">All</option>
                <option value="1">Caption</option>
                <option value="2">Description</option>
            </select>
            <input type="text" id="search-text" value="" />
            <input type="button" id="search-submit" value="Search" />
        </div>
        <div id="orgchart"></div>
    </div>
</body>

<script language="javascript">
// Custom event for search input.
document.getElementById("search-submit").onclick = function() {
    var strSearch = document.getElementById("search-text").value;
    var type = document.getElementById("search-type").value;
    
    searchNodesByData(pOrgNodes, strSearch, type);
};

// Search by customParams data.
function searchNodesByData(pData, strSearch, type) {
    strSearch = strSearch.toLowerCase();
    
    if (typeof pData === "object" && pData !== null) {
        if (typeof pData.customParams === "object" && pData.customParams !== null) {
            var isFind = false;
            
            switch (parseInt(type)) {
                case 0:
                    isFind = (pData.customParams.caption.toLowerCase().indexOf(strSearch) >= 0) ? true : isFind;
                    
                    if (isFind == false) {
                        isFind = (pData.customParams.description.toLowerCase().indexOf(strSearch) >= 0) ? true : isFind;
                    }
                break;
                
                case 1:
                    isFind = (pData.customParams.caption.toLowerCase().indexOf(strSearch) >= 0) ? true : isFind;
                break;
                
                case 2:
                    isFind = (pData.customParams.description.toLowerCase().indexOf(strSearch) >= 0) ? true : isFind;
                break;
            }
            
            var elm = document.getElementById(pData.node.idt1);
            
            if (isFind == true && strSearch.length > 0) {
                elm.className = "node-light";
            }
            else {
                elm.className = "";
            }
        }
        
        if (typeof pData.nodes === "object" && pData.nodes !== null) {
            for (var i = 0; i < pData.nodes.length; i ++) {
                searchNodesByData(pData.nodes[i], strSearch, type);
            }
        }
    }
}

(function() {
    // Create params for chart.
    var chartParams = {
        options: {
            top: 30,
            left: 12,
            line: {
                size: 2,
                color: "#3388dd"
            },
            node: {
                width: 64,
{'fraction_non_alphanumeric': 0.1449694631951141, 'fraction_numerical': 0.008518161362905818, 'mean_word_length': 1.690445309122352, 'pattern_counts': {'":': 0, '<': 69, '<?xml version=': 0, '>': 76, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4857375', 'n_tokens_mistral': 1802, 'n_tokens_neox': 1730, 'n_words': 356}