<commit_before>import React, { PropTypes } from 'react';
import classNames from 'classnames';
import bindAll from 'lodash/bindAll';
import pick from 'lodash/pick';
import { CommonPropTypes, PureComponent } from '../../../utils';
import { getBackgroundColor } from '../../../utils/window';

import { containerStore } from './ExpansionContainer';
import styles from './expansion-container.css';

/* Adapted from is.js */
const userAgent = (navigator && navigator.userAgent || '').toLowerCase();

function isFirefox() {
  const match = userAgent.match(/(?:firefox|fxios)\/(\d+)/);
  return !!match;
}

const LAYOUT_STYLES = [
  'alignContent',
  'alignItems',
  'display',
  'flexDirection',
  'flexWrap',
  'justifyContent',
];

const EXPANDABLE_PADDING_RIGHT =  20;

/**
 * <Expandable /> is a *mostly* drop in replacement for a layout <div /> that gives its contents
 * expanding powers, and must accompany an <ExpansionContainer /> of the same `group` (default
 * group is 'default'). Flex related layout styles are passed directly to a content <div />, and
 * additional styles like `border`, `margin`, etc. must be supplied via the `expandableClassName`
 * and `expandableStyle` props.
 *
 * Note: Transitions on the restore event do not execute on FireFox, and thus have been disabled.
 */
export default class Expandable extends PureComponent {<commit_msg>delint<commit_after>import React, { PropTypes } from 'react';
import classNames from 'classnames';
import bindAll from 'lodash/bindAll';
import pick from 'lodash/pick';
import { CommonPropTypes, PureComponent } from '../../../utils';
import { getBackgroundColor } from '../../../utils/window';

import { containerStore } from './ExpansionContainer';
import styles from './expansion-container.css';

/* Adapted from is.js */
const userAgent = (navigator && navigator.userAgent || '').toLowerCase();

function isFirefox() {
  const match = userAgent.match(/(?:firefox|fxios)\/(\d+)/);
  return !!match;
}

const LAYOUT_STYLES = [
  'alignContent',
  'alignItems',
  'display',
  'flexDirection',
  'flexWrap',
  'justifyContent',
];

const EXPANDABLE_PADDING_RIGHT = 20;

/**
 * <Expandable /> is a *mostly* drop in replacement for a layout <div /> that gives its contents
 * expanding powers, and must accompany an <ExpansionContainer /> of the same `group` (default
 * group is 'default'). Flex related layout styles are passed directly to a content <div />, and
 * additional styles like `border`, `margin`, etc. must be supplied via the `expandableClassName`
 * and `expandableStyle` props.
 *
 * Note: Transitions on the restore event do not execute on FireFox, and thus have been disabled.
 */
export default class Expandable extends PureComponent {
{'fraction_non_alphanumeric': 0.1348563006632277, 'fraction_numerical': 0.0014738393515106854, 'mean_word_length': 4.408366533864542, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, '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': '5442298', 'n_tokens_mistral': 782, 'n_tokens_neox': 772, 'n_words': 278}