<commit_before>/* JS App Files */
{% include("jsapi/setup/passphrase.js") %}
{% include("jsapi/setup/profiles.js") %}
{% include("jsapi/setup/sources.js") %}
{% include("jsapi/setup/sending.js") %}
{% include("jsapi/setup/advanced.js") %}
{% include("jsapi/setup/security.js") %}
{% include("jsapi/setup/backups.js") %}
{% include("jsapi/setup/access.js") %}
{% include("jsapi/setup/router.js") %}

var SetupApp = (function ($, Backbone, global) {

    var init = function() {

      // Views
      global.PassphraseView = new PassphraseView({ model: new PassphraseModel(), el: $('#setup') });
      global.ProfilesView   = new ProfilesView({ model: new ProfilesModel(), el: $('#setup') });
      global.SourcesView    = new SourcesView({ model: new SourceModel(), el: $('#setup') });
      global.SendingView    = new SendingView({ el: $('#setup') });
      global.AdvancedView   = new AdvancedView({ el: $('#setup') });
      global.SecurityView   = new SecurityView({ el: $('#setup') });
      global.BackupsView    = new BackupsView({ el: $('#setup') });
      global.AccessView     = new AccessView({ el: $('#setup') });

  		// Router
  		global.Router = new SetupRouter($('#setup'));

      // Start Backbone History
      Backbone.history.start();<commit_msg>Made JS validation feedback use global logic<commit_after>/* JS App Files */
{% include("jsapi/setup/passphrase.js") %}
{% include("jsapi/setup/profiles.js") %}
{% include("jsapi/setup/sources.js") %}
{% include("jsapi/setup/sending.js") %}
{% include("jsapi/setup/advanced.js") %}
{% include("jsapi/setup/security.js") %}
{% include("jsapi/setup/backups.js") %}
{% include("jsapi/setup/access.js") %}
{% include("jsapi/setup/router.js") %}

/* Validation UI Feedback */
_.extend(Backbone.Validation.callbacks, {
  valid: function(view, attr, selector) {
    // do something
  },
  invalid: function(view, attr, error, selector) {
    $('#error-setup-' + attr).html(error);
  }
});

/* Main Init Call */
var SetupApp = (function ($, Backbone, global) {

    var init = function() {

      // Views
      global.PassphraseView = new PassphraseView({ model: new PassphraseModel(), el: $('#setup') });
      global.ProfilesView   = new ProfilesView({ model: new ProfilesModel(), el: $('#setup') });
      global.SourcesView    = new SourcesView({ model: new SourceModel(), el: $('#setup') });
      global.SendingView    = new SendingView({ el: $('#setup') });
      global.AdvancedView   = new AdvancedView({ el: $('#setup') });
      global.SecurityView   = new SecurityView({ el: $('#setup') });
      global.BackupsView    = new BackupsView({ el: $('#setup') });
      global.AccessView     = new AccessView({ el: $('#setup') });

  		// Router
  		global.Router = new SetupRouter($('#setup'));

      // Start Backbone History
      Backbone.history.start();
{'fraction_non_alphanumeric': 0.20374955783516094, 'fraction_numerical': 0.0, 'mean_word_length': 3.651315789473684, 'pattern_counts': {'":': 0, '<': 3, '<?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': '3617768', 'n_tokens_mistral': 905, 'n_tokens_neox': 849, 'n_words': 183}