<commit_before>/**
 * CaptureConfigs
 *
 * @author VinhLH
 */

'use strict';

var CaptureConfigs = (function () {
    var _configs = {
        liveReload: false,
        canvas: {
            colors: ['#c0392b', '#d35400', '#f39c12', '#f1c40f', '#16a085', '#2cc36b', '#2980b9', '#8e44ad', '#2c3e50', '#ecf0f1']
        },
        APIs: {
            auth: '/rest/auth/latest/session?os_authType=none',
            info: {
                projects: '/rest/api/2/project',
                priorities: '/rest/api/2/priority',
                issue_types: '/rest/api/2/issuetype',
                // issue_types: '/rest/api/2/issue/createmeta'
            },
            search: '/rest/api/2/search',
            search_issue: '/rest/api/2/search?jql=project={projectId}&maxResults=1000&fields=id,key,summary',
            get_attachment: '/rest/api/2/issue/{issueId}?fields=attachment',
            create_issue: '/rest/api/2/issue',
            attach_to_issue: '/rest/api/2/issue/{issueId}/attachments',
            log_out: '/rest/auth/latest/session',
        },
        app: {
            url: 'src/app.html'
        },
        storage: {
            prefix: 'com.zalora.capture.'
        },
        playback: {
            url: 'src/playback.html',
            type: 'popup',
            left: 5,
            top: 5,
            width: 500,
            height: 800
        },
        icons: {
            default: {
                "19": "images/icons/icon19.png"
            },
            recording: {
                "19": "images/icons/recording-icon19.png"
            }
        }
    },
    _initLiveReload = function () {
        document.write('<script src="http://' + (location.host || 'localhost').split(':')[0] + ':35729/livereload.js?snipver=1"></' + 'script>');
    },
    _init = function () {
        if (_configs.liveReload) {
            _initLiveReload();
        }
    };

    return {
        get: function (group, key) {
            if (typeof _configs[group] === 'undefined') {
                throw "No group config '" + group + "'  available!";
            }

            if (typeof key === 'undefined') {
                return _configs[group];
            }

            if (typeof _configs[group][key] === 'undefined') {
                throw "No config '" + key + "'  available in group '" + group + "'!";
            }

            return _configs[group][key];
        }
    };
})();<commit_msg>add reload config<commit_after>/**
 * CaptureConfigs
 *
 * @author VinhLH
 */

'use strict';

var CaptureConfigs = (function () {
    var _configs = {
        liveReload: false,
        canvas: {
            colors: ['#c0392b', '#d35400', '#f39c12', '#f1c40f', '#16a085', '#2cc36b', '#2980b9', '#8e44ad', '#2c3e50', '#ecf0f1']
        },
        APIs: {
            auth: '/rest/auth/latest/session?os_authType=none',
            info: {
                projects: '/rest/api/2/project',
                priorities: '/rest/api/2/priority',
                issue_types: '/rest/api/2/issuetype',
                // issue_types: '/rest/api/2/issue/createmeta'
            },
            search: '/rest/api/2/search',
            search_issue: '/rest/api/2/search?jql=project={projectId}&maxResults=1000&fields=id,key,summary',
            get_attachment: '/rest/api/2/issue/{issueId}?fields=attachment',
            create_issue: '/rest/api/2/issue',
            attach_to_issue: '/rest/api/2/issue/{issueId}/attachments',
            log_out: '/rest/auth/latest/session',
        },
        app: {
            url: 'src/app.html'
        },
        storage: {
            prefix: 'com.zalora.capture.'
        },
        playback: {
            url: 'src/playback.html',
            type: 'popup',
            left: 5,
            top: 5,
            width: 500,
            height: 800
        },
        icons: {
            default: {
                "19": "images/icons/icon19.png"
            },
            recording: {
                "19": "images/icons/recording-icon19.png"
            }
        }
    },
    _initLiveReload = function () {
        document.write('<script src="http://localhost:35729/livereload.js?snipver=1"></' + 'script>');
    },
    _init = function () {
        if (_configs.liveReload) {
            _initLiveReload();
        }
    };

    _init();

    return {
        get: function (group, key) {
            if (typeof _configs[group] === 'undefined') {
                throw "No group config '" + group + "'  available!";
            }

            if (typeof key === 'undefined') {
                return _configs[group];
            }

            if (typeof _configs[group][key] === 'undefined') {
                throw "No config '" + key + "'  available in group '" + group + "'!";
            }

            return _configs[group][key];
        }
    };
})();

{'fraction_non_alphanumeric': 0.1639751552795031, 'fraction_numerical': 0.030434782608695653, 'mean_word_length': 1.518769551616267, 'pattern_counts': {'":': 4, '<': 7, '<?xml version=': 0, '>': 7, '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': '7024977', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1481, 'n_words': 246}