<commit_before>/*global app*/
// This app view is responsible for rendering all content that goes into
// <html>. It's initted right away and renders itself on DOM ready.

// This view also handles all the 'document' level events such as keyboard shortcuts.
var log = require('bows')('base');
var View = require('ampersand-view');
var ViewSwitcher = require('ampersand-view-switcher');
var _ = require('client/js/helpers/underscore');
var domify = require('domify');
var dom = require('ampersand-dom');
var templates = require('../templates');
var setFavicon = require('favicon-setter');
var BaseForm = require('client/js/forms/base');
var NotificationView = require('client/js/views/notifications');
var $ = require('client/js/helpers/jquery');
var singular = require('client/js/helpers/singular');
var plural = require('client/js/helpers/plural');

var searchTypeTimeout = null;

module.exports = View.extend({
  template: templates.body,
  initialize: function (options) {
    // this marks the correct nav item selected
    this.listenTo(app.router, 'page', this.handleNewPage);
  },
  events: {
    'click #logout': 'logout',
    'click a[href]': 'handleLinkClick',
    'click [data-hook~=notifications]': 'handleNotificationsClick',
    'change [data-hook~=base-form] select': 'handleEventChange',
    'input [data-hook~=base-form] input': 'handleSearchInput',
    'keydown [data-hook~=base-form] input': 'handleSearchKeydown',
    'click .left-drawer-trigger': 'toggleLeftDrawer'
  },
  bindings: {
    'model.unreadCount':[
      {
        hook: 'notification-count'
      },
      {
        hook: 'notifications',
        type: 'booleanClass',
        yes: 'unread',
        no: 'empty'
      },
      {
        hook: 'plural',
        type: function (el, value, previousValue) {
          if(value === 1){
            singular(el);
          }
          if(previousValue === 1){
            plural(el);
          }
        }
      }
    ],
    'model.online': {
      type: 'booleanClass',
      hook: 'status',
      yes: 'online',
      no: 'offline'
    },
    'model.reconnecting': {<commit_msg>Toggle left-drwaer when a 'a' is clicked<commit_after>/*global app*/
// This app view is responsible for rendering all content that goes into
// <html>. It's initted right away and renders itself on DOM ready.

// This view also handles all the 'document' level events such as keyboard shortcuts.
var log = require('bows')('base');
var View = require('ampersand-view');
var ViewSwitcher = require('ampersand-view-switcher');
var _ = require('client/js/helpers/underscore');
var domify = require('domify');
var dom = require('ampersand-dom');
var templates = require('../templates');
var setFavicon = require('favicon-setter');
var BaseForm = require('client/js/forms/base');
var NotificationView = require('client/js/views/notifications');
var $ = require('client/js/helpers/jquery');
var singular = require('client/js/helpers/singular');
var plural = require('client/js/helpers/plural');

var searchTypeTimeout = null;

module.exports = View.extend({
  template: templates.body,
  initialize: function (options) {
    // this marks the correct nav item selected
    this.listenTo(app.router, 'page', this.handleNewPage);
  },
  events: {
    'click #logout': 'logout',
    'click a[href]': 'handleLinkClick',
    'click [data-hook~=notifications]': 'handleNotificationsClick',
    'change [data-hook~=base-form] select': 'handleEventChange',
    'input [data-hook~=base-form] input': 'handleSearchInput',
    'keydown [data-hook~=base-form] input': 'handleSearchKeydown',
    'click .left-drawer-trigger': 'toggleLeftDrawer',
    'click .left-drawer a': 'toggleLeftDrawer',
  },
  bindings: {
    'model.unreadCount':[
      {
        hook: 'notification-count'
      },
      {
        hook: 'notifications',
        type: 'booleanClass',
        yes: 'unread',
        no: 'empty'
      },
      {
        hook: 'plural',
        type: function (el, value, previousValue) {
          if(value === 1){
            singular(el);
          }
          if(previousValue === 1){
            plural(el);
          }
        }
      }
    ],
    'model.online': {
      type: 'booleanClass',
      hook: 'status',
      yes: 'online',
      no: 'offline'
    },
    'model.reconnecting': {
{'fraction_non_alphanumeric': 0.15463437354448067, 'fraction_numerical': 0.0009315323707498836, 'mean_word_length': 3.1061185468451242, 'pattern_counts': {'":': 0, '<': 5, '<?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': '5180844', 'n_tokens_mistral': 1316, 'n_tokens_neox': 1301, 'n_words': 320}