<commit_before>/** @jsx React.DOM */
/* These are the React components we are using */

(function () {

var UI = window.UI = {};

/* This is the avatar of yourself in the header */
var SelfAvatar = UI.SelfAvatar = React.createClass({
  render: function () {
    return (
      <div className="wrapper">
        <div className="main" style={ {background: "url(" + this.props.avatar + ")"} }>
          <div className="username">
            me
          </div>
          <div className="overlay">
            <div className="row">
              <div className="container text-center">
                <div className="col-xs-12">
                  <a href="#" className="btn btn-default btn-sm" role="button">
                    Take photo
                  </a>
                  <a href="#" className="btn btn-default btn-sm" role="button">
                    Settings
                  </a>
                  <a href="#" className="btn btn-default btn-sm" role="button">
                    Profile
                  </a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    );
  }
});

/* This is the big invite button */
var InviteAvatar = UI.InviteAvatar = React.createClass({
  render: function () {
    return (
      <div className="wrapper">
        <div className="main">
          <div className="row">
            <div className="col-xs-12 text-center inviteNewperson">
              <button type="button" className="btn btn-default btn-sm">
                <span className="glyphicon glyphicon-plus-sign"></span> Invite
              </button>
            </div>
          </div>
        </div>
      </div>
    );
  }
});

/* And then a blank space */
var BlankAvatar = UI.BlankAvatar = React.createClass({
  render: function () {
    return (
      <div className="wrapper">
        <div className="main">
          <div className="overlay">
            <div className="row">
            </div>
          </div>
        </div>
      </div>
    );
  }
});


/* This is the avatar of anyone else */
var PeerAvatar = UI.PeerAvatar = React.createClass({
  render: function () {
    return (
      <div className="wrapper">
        <div className="main" style={ {background: "url(" + this.props.avatar + "}"} }>
          <div className="username">
            {this.props.name}
          </div>
          <div className="overlay">
            <div className="row">
              <div className="container text-center">
                <div className="col-xs-12">
                  <a href="" className="btn btn-default btn-sm" role="button">
                    Talk
                  </a>
                  <a href="" className="btn btn-default btn-sm" role="button">
                    Profile
                  </a>
                  <a href="" className="btn btn-default btn-sm" role="button">
                    Invite
                  </a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    );
  }
});



var UserGrid = UI.UserGrid = React.createClass({
  getInitialState: function () {
    return {};
  },
  render: function () {
    var children = this.state.users || [];
    if (children.length < 4) {
      children.push(<InviteAvatar />);
    }
    while (children.length < 4) {
      children.push(<BlankAvatar />);
    }
    return (
      <div id="users">
        <div className="row">
          {children[0]}
          {children[1]}
        </div>
        <div className="row">
          {children[2]}
          {children[3]}
        </div>
      </div>
    );
  }
});

var Activity = UI.Activity = React.createClass({
  render: function () {
    return (
      <li className="media" key={this.props.key}>
        <a className="pull-left" href="#">
          <div className="sm-avatar">
            <img className="media-object user-avatar" src={this.props.avatar} alt="" />
          </div>
        </a>
        <div className="media-body">
          {this.props.children}
        </div>
      </li>
    );
  }
});

/* This is a page visit activity */
var PageVisit = UI.PageVisit = React.createClass({
  render: function () {
    return (
      <Activity name={this.props.name} avatar={this.props.avatar} key={this.props.key}>
        <a className="glyphicon glyphicon-eye-open pull-right spectate-page" href="#" title="Spectate on their page" data-toggle="tooltip" data-placement="left"></a>
        <h4 className="media-heading username">{this.props.name}</h4>
        is currently on <a className="current-location" href={this.props.url}>{this.props.title}</a>
      </Activity>
    );
  }<commit_msg>Fix tooltip display<commit_after>/** @jsx React.DOM */
/* These are the React components we are using */

(function () {

var UI = window.UI = {};

var DynamicMixin = {
  /* This function will be called with a DOM node that has just been
     created, and you can enable any Bootstrap (or other) widgety things
     through this. */
  componentDidMount: function (rootNode) {
    $("*[data-toggle=tooltip]", rootNode).tooltip();
  }
};

/* This is the avatar of yourself in the header */
var SelfAvatar = UI.SelfAvatar = React.createClass({
  render: function () {
    return (
      <div className="wrapper">
        <div className="main" style={ {background: "url(" + this.props.avatar + ")"} }>
          <div className="username">
            me
          </div>
          <div className="overlay">
            <div className="row">
              <div className="container text-center">
                <div className="col-xs-12">
                  <a href="#" className="btn btn-default btn-sm" role="button">
                    Take photo
                  </a>
                  <a href="#" className="btn btn-default btn-sm" role="button">
                    Settings
                  </a>
                  <a href="#" className="btn btn-default btn-sm" role="button">
                    Profile
                  </a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    );
  }
});

/* This is the big invite button */
var InviteAvatar = UI.InviteAvatar = React.createClass({
  render: function () {
    return (
      <div className="wrapper">
        <div className="main">
          <div className="row">
            <div className="col-xs-12 text-center inviteNewperson">
              <button type="button" className="btn btn-default btn-sm">
                <span className="glyphicon glyphicon-plus-sign"></span> Invite
              </button>
            </div>
          </div>
        </div>
      </div>
    );
  }
});

/* And then a blank space */
var BlankAvatar = UI.BlankAvatar = React.createClass({
  render: function () {
    return (
      <div className="wrapper">
        <div className="main">
          <div className="overlay">
            <div className="row">
            </div>
          </div>
        </div>
      </div>
    );
  }
});


/* This is the avatar of anyone else */
var PeerAvatar = UI.PeerAvatar = React.createClass({
  render: function () {
    return (
      <div className="wrapper">
        <div className="main" style={ {background: "url(" + this.props.avatar + "}"} }>
          <div className="username">
            {this.props.name}
          </div>
          <div className="overlay">
            <div className="row">
              <div className="container text-center">
                <div className="col-xs-12">
                  <a href="" className="btn btn-default btn-sm" role="button">
                    Talk
                  </a>
                  <a href="" className="btn btn-default btn-sm" role="button">
                    Profile
                  </a>
                  <a href="" className="btn btn-default btn-sm" role="button">
                    Invite
                  </a>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
    );
  }
});



var UserGrid = UI.UserGrid = React.createClass({
  getInitialState: function () {
    return {};
  },
  render: function () {
    var children = this.state.users || [];
    if (children.length < 4) {
      children.push(<InviteAvatar />);
    }
    while (children.length < 4) {
      children.push(<BlankAvatar />);
    }
    return (
      <div id="users">
        <div className="row">
          {children[0]}
          {children[1]}
        </div>
        <div className="row">
          {children[2]}
          {children[3]}
        </div>
      </div>
    );
  }
});

var Activity = UI.Activity = React.createClass({
  render: function () {
    return (
      <li className="media" key={this.props.key}>
        <a className="pull-left" href="#">
          <div className="sm-avatar">
            <img className="media-object user-avatar" src={this.props.avatar} alt="" />
          </div>
        </a>
        <div className="media-body">
          {this.props.children}
        </div>
      </li>
    );
  }
});

/* This is a page visit activity */
var PageVisit = UI.PageVisit = React.createClass({
  mixins: [DynamicMixin],
  render: function () {
    return (
      <Activity name={this.props.name} avatar={this.props.avatar} key={this.props.key}>
        <a className="glyphicon glyphicon-eye-open pull-right spectate-page" href="#" title="Spectate on their page" data-toggle="tooltip" data-placement="left"></a>
        <h4 className="media-heading username">{this.props.name}</h4>
        is currently on <a className="current-location" href={this.props.url}>{this.props.title}</a>
      </Activity>
    );
  }
{'fraction_non_alphanumeric': 0.15488425205024395, 'fraction_numerical': 0.0029066749714522994, 'mean_word_length': 1.709985935302391, 'pattern_counts': {'":': 0, '<': 177, '<?xml version=': 0, '>': 173, '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': '5083882', 'n_tokens_mistral': 2803, 'n_tokens_neox': 2703, 'n_words': 655}