<commit_before>var settings_invites = (function () {

var exports = {};

var meta = {
    loaded: false,
};

exports.reset = function () {
    meta.loaded = false;
};

function failed_listing_invites(xhr) {
    loading.destroy_indicator($('#admin_page_invites_loading_indicator'));
    ui_report.error(i18n.t("Error listing invites"), xhr, $("#organization-status"));
}

function populate_invites(invites_data) {
    if (!meta.loaded) {
        return;
    }
    var invites_table = $("#admin_invites_table").expectOne();

    list_render(invites_table, invites_data.invites, {
        name: "admin_invites_list",
        modifier: function (item) {
            item.invited = timerender.absolute_time(item.invited * 1000);
            return templates.render("admin_invites_list", { invite: item });
        },
        filter: {
            element: invites_table.closest(".settings-section").find(".search"),
            callback: function (item, value) {
                return item.email.toLowerCase().indexOf(value) >= 0;
            },
        },
    }).init();

    loading.destroy_indicator($('#admin_page_invites_loading_indicator'));
}


exports.set_up = function () {<commit_msg>invites ui: fixed rerendering of invites list<commit_after>var settings_invites = (function () {

var exports = {};

var meta = {
    loaded: false,
};

exports.reset = function () {
    meta.loaded = false;
};

function failed_listing_invites(xhr) {
    loading.destroy_indicator($('#admin_page_invites_loading_indicator'));
    ui_report.error(i18n.t("Error listing invites"), xhr, $("#organization-status"));
}

function populate_invites(invites_data) {
    if (!meta.loaded) {
        return;
    }
    var invites_table = $("#admin_invites_table").expectOne();

    var admin_invites_list = list_render.get("admin_invites_list");

    if (admin_invites_list) {
        admin_invites_list.data(invites_data.invites);
        admin_invites_list.set_container(invites_table);
        admin_invites_list.render();
    } else {
        list_render(invites_table, invites_data.invites, {
            name: "admin_invites_list",
            modifier: function (item) {
                item.invited = timerender.absolute_time(item.invited * 1000);
                return templates.render("admin_invites_list", { invite: item });
            },
            filter: {
                element: invites_table.closest(".settings-section").find(".search"),
                callback: function (item, value) {
                    return item.email.toLowerCase().indexOf(value) >= 0;
                },
            },
        }).init();
    }

    loading.destroy_indicator($('#admin_page_invites_loading_indicator'));
}


exports.set_up = function () {
{'fraction_non_alphanumeric': 0.13584767484437935, 'fraction_numerical': 0.005126327352618088, 'mean_word_length': 2.930935251798561, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5499839', 'n_tokens_mistral': 844, 'n_tokens_neox': 805, 'n_words': 129}