<commit_before>/*global require: false, module: false */
'use strict';
var React = require('react');
var Grid = require('react-bootstrap/lib/Grid');
var Row = require('react-bootstrap/lib/Row');
var Col = require('react-bootstrap/lib/Col');
var Spreadsheet = require('./spreadsheet');
var AppControls = require('./AppControls');
var KmPlot = require('./kmPlot');
import JSONTree from 'react-json-tree';
var meta = require('./meta');
var _ = require('./underscore_ext');
//var Perf = require('react/addons').addons.Perf;

module.exports = React.createClass({
	getInitialState() {
		return {
			debug: false
		};
	},
	onClick: function (ev) {
		if (ev[meta.key]) {
			this.setState({debug: !this.state.debug});
		}
	},
//	onPerf: function () {
//		this.perf = !this.perf;
//		if (this.perf) {
//			console.log("Starting perf");
//			Perf.start();
//		} else {
//			console.log("Stopping perf");
//			Perf.stop();
//			Perf.printInclusive();
//			Perf.printExclusive();
//			Perf.printWasted();
//		}
//	},
	render: function() {
		let {state, selector, ...otherProps} = this.props,
			{km, ...otherState} = selector(state);

		return (
			<Grid onClick={this.onClick}>
			{/*
				<Row>
					<Button onClick={this.onPerf}>Perf</Button>
				</Row>
			*/}
				<Row>
					<Col md={12}>
						<AppControls {...otherProps} appState={otherState} />
					</Col>
				</Row>
				<Spreadsheet {...otherProps} appState={otherState} />
				{_.getIn(km, ['id']) ? <KmPlot
						callback={this.props.callback}
						km={km}
						features={this.props.appState.features} /> : null}
				<Row>
					<Col md={12}>
						<JSONTree
							id='debug'
							style={{display: this.state.debug ? 'block' : 'none'}}
							data={this.props.appState} />
					</Col>
				</Row>
				<div className='chartRoot' style={{display: 'none'}} />
			</Grid>
		);
	}
});<commit_msg>drop old debug window.<commit_after>/*global require: false, module: false */
'use strict';
var React = require('react');
var Grid = require('react-bootstrap/lib/Grid');
var Row = require('react-bootstrap/lib/Row');
var Col = require('react-bootstrap/lib/Col');
var Spreadsheet = require('./spreadsheet');
var AppControls = require('./AppControls');
var KmPlot = require('./kmPlot');
var _ = require('./underscore_ext');
//var Perf = require('react/addons').addons.Perf;

module.exports = React.createClass({
//	onPerf: function () {
//		this.perf = !this.perf;
//		if (this.perf) {
//			console.log("Starting perf");
//			Perf.start();
//		} else {
//			console.log("Stopping perf");
//			Perf.stop();
//			Perf.printInclusive();
//			Perf.printExclusive();
//			Perf.printWasted();
//		}
//	},
	render: function() {
		let {state, selector, ...otherProps} = this.props,
			{km, ...otherState} = selector(state);

		return (
			<Grid onClick={this.onClick}>
			{/*
				<Row>
					<Button onClick={this.onPerf}>Perf</Button>
				</Row>
			*/}
				<Row>
					<Col md={12}>
						<AppControls {...otherProps} appState={otherState} />
					</Col>
				</Row>
				<Spreadsheet {...otherProps} appState={otherState} />
				{_.getIn(km, ['id']) ? <KmPlot
						callback={this.props.callback}
						km={km}
						features={this.props.appState.features} /> : null}
				<div className='chartRoot' style={{display: 'none'}} />
			</Grid>
		);
	}
});
{'fraction_non_alphanumeric': 0.21347971942665447, 'fraction_numerical': 0.0018298261665141812, 'mean_word_length': 3.0543881334981458, 'pattern_counts': {'":': 0, '<': 36, '<?xml version=': 0, '>': 36, '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': '1630309', 'n_tokens_mistral': 1356, 'n_tokens_neox': 1149, 'n_words': 215}