<commit_before>'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var React = require('react');

module.exports = function enhanceWithClickOutside(WrappedComponent) {
  if (!WrappedComponent.prototype.handleClickOutside) {
    throw new Error(WrappedComponent.displayName + ' must implement `handleClickOutside`.');
  }

  return React.createClass({
    displayName: 'Wrapped' + WrappedComponent.displayName,

    componentDidMount: function componentDidMount() {
      this.__wrappedComponent = this.refs.wrappedComponent;
      document.addEventListener('click', this.handleClickOutside, true);
    },

    componentWillUnmount: function componentWillUnmount() {
      document.removeEventListener('click', this.handleClickOutside, true);
    },

    handleClickOutside: function handleClickOutside(e) {
      if (!React.findDOMNode(this).contains(e.target)) {
        this.refs.wrappedComponent.handleClickOutside(e);
      }
    },

    render: function render() {
      return React.createElement(WrappedComponent, _extends({}, this.props, { ref: 'wrappedComponent' }));
    }
  });
};<commit_msg>Update dist file<commit_after>'use strict';

var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var React = require('react');

module.exports = function enhanceWithClickOutside(WrappedComponent) {
  if (!WrappedComponent.prototype.handleClickOutside) {
    throw new Error(WrappedComponent.displayName + ' must implement handleClickOutside().');
  }

  return React.createClass({
    displayName: 'Wrapped' + WrappedComponent.displayName,

    componentDidMount: function componentDidMount() {
      this.__wrappedComponent = this.refs.wrappedComponent;
      document.addEventListener('click', this.handleClickOutside, true);
    },

    componentWillUnmount: function componentWillUnmount() {
      document.removeEventListener('click', this.handleClickOutside, true);
    },

    handleClickOutside: function handleClickOutside(e) {
      var domNode = React.findDOMNode(this);
      if (!domNode || !domNode.contains(e.target)) {
        this.refs.wrappedComponent.handleClickOutside(e);
      }
    },

    render: function render() {
      return React.createElement(WrappedComponent, _extends({}, this.props, { ref: 'wrappedComponent' }));
    }
  });
};
{'fraction_non_alphanumeric': 0.13103192279138828, 'fraction_numerical': 0.0007423904974016332, 'mean_word_length': 4.444444444444445, 'pattern_counts': {'":': 0, '<': 5, '<?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': '6147916', 'n_tokens_mistral': 771, 'n_tokens_neox': 744, 'n_words': 160}