<commit_before>/*global FormplayerFrontend */

FormplayerFrontend.module("Entities", function (Entities, FormplayerFrontend, Backbone, Marionette, $) {

    Entities.UserModel = Backbone.Model.extend({});

    Entities.MenuSelect = Backbone.Model.extend({
        urlRoot: "menuSelects",
    });

    Entities.MenuSelectCollection = Backbone.Collection.extend({

        model: Entities.MenuSelect,

        parse: function (response) {
            this.sequenceId = response.seq_id;
            this.title = response.title;

            if (response.commands) {
                this.type = "commands";
                return response.commands;
            }
            else if (response.entities) {
                this.type = "entities";
                this.action = response.action;
                this.styles = response.styles;
                return response.entities;
            }
            else if (response.details) {
                this.type = "details";
                this.styles = response.styles;
                this.headers = response.headers;
                this.details = response.details;

                var model = [];
                for (var i = 0; i < this.details.length; i += 1) {
                    var current = {'header': this.headers[i], 'data': this.details[i]};
                    model.push(current);
                }
                return model;
            }
        },

        initialize: function (params) {
            this.domain = params.domain;
            this.app_id = params.app_id;
            this.fetch = params.fetch;
            this.sequenceId = params.sequenceId;
            this.selection = params.selection;
        },
    });

    var API = {

        getDetail: function (model) {

            var defer = $.Deferred();
            var mCollection = new Backbone.Collection.extend({<commit_msg>delete unused details function<commit_after>/*global FormplayerFrontend */

FormplayerFrontend.module("Entities", function (Entities, FormplayerFrontend, Backbone, Marionette, $) {

    Entities.UserModel = Backbone.Model.extend({});

    Entities.MenuSelect = Backbone.Model.extend({
        urlRoot: "menuSelects",
    });

    Entities.MenuSelectCollection = Backbone.Collection.extend({

        model: Entities.MenuSelect,

        parse: function (response) {
            this.sequenceId = response.seq_id;
            this.title = response.title;

            if (response.commands) {
                this.type = "commands";
                return response.commands;
            }
            else if (response.entities) {
                this.type = "entities";
                this.action = response.action;
                this.styles = response.styles;
                return response.entities;
            }
        },

        initialize: function (params) {
            this.domain = params.domain;
            this.app_id = params.app_id;
            this.fetch = params.fetch;
            this.sequenceId = params.sequenceId;
            this.selection = params.selection;
        },
    });

    var API = {

        getDetail: function (model) {

            var defer = $.Deferred();
            var mCollection = new Backbone.Collection.extend({
{'fraction_non_alphanumeric': 0.10715391762155466, 'fraction_numerical': 0.0006193868070610096, 'mean_word_length': 1.65625, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 3, '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': '5630412', 'n_tokens_mistral': 845, 'n_tokens_neox': 805, 'n_words': 166}