<commit_before>import React, { Component } from "react";

import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent";
import LinearProgress from "@material-ui/core/LinearProgress";
import PasswordRequirementsComponent from '../Login/PasswordRequirementsComponent'
import Typography from "@material-ui/core/Typography";
import TextField from "@material-ui/core/TextField";

import './UserAccountComponent.css';

import {
	Dialog,
	DialogActions,
	DialogContent,
	DialogContentText,
	DialogTitle
} from "@material-ui/core";

import Button from "@material-ui/core/Button";
import CardActions from "@material-ui/core/CardActions";

import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import ListItemText from "@material-ui/core/ListItemText";
import Divider from "@material-ui/core/Divider";

import FormGroup from "@material-ui/core/FormGroup";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import Switch from "@material-ui/core/Switch";

import { validPassword } from "../../constants";

import {
	changePassword,
	getUser,
	updateSaveOAuth,
	saveOAuthCredentials
} from "../../APICalls/APICalls";
import { eventEmitter, store } from "../../App.js";

import {
	logoutAction,
	accountPreferenceToggledAction,
} from "../../model/actions";
import { cookies } from "../../model/reducers";
import { DROPBOX_NAME, GOOGLEDRIVE_NAME } from "../../constants";

import { updateGAPageView } from '../../analytics/ga'
import IconButton from '@material-ui/core/IconButton';
import Tooltip from '@material-ui/core/Tooltip';
import InfoOutlined from '@material-ui/icons/InfoOutlined';
import { makeStyles } from '@material-ui/core/styles';

const useStylesBootstrap = makeStyles(theme => ({
	arrow: {
	  color: theme.palette.common.black,
	},
	tooltip: {
	  color: theme.palette.common.white,
	  backgroundColor: theme.palette.common.black,
	  maxWidth: 180,
	  fontSize: theme.typography.pxToRem(17),
	},
  }));

 const BootstrapTooltip = (props) => {
	const classes = useStylesBootstrap();
	return <Tooltip arrow={true} classes={classes} {...props} />;
}

import VisibilityOutlinedIcon from '@material-ui/icons/VisibilityOutlined';
import VisibilityOffOutlinedIcon from '@material-ui/icons/VisibilityOffOutlined';
import InputAdornment from '@material-ui/core/InputAdornment';
import IconButton from '@material-ui/core/IconButton';

export default class UserAccountComponent extends Component {
	constructor() {
		super();
		this.state = {
			isSmall: window.innerWidth <= 640,
			loading: true,
			oldPassword: "",
			newPassword: "",
			confirmNewPassword: "",
			isValidNewPassword: true,
			isValidConfirmPassword: true,
			errorMsg: null,
			userEmail: store.getState().email,
			userOrganization: "...",
			fName: "...",
			lName: "...",
			openAlertDialog: false,
			saveOAuthTokens: false,
			canSubmit: false,
			isOldPwdVisible: false,
			isNewPwdVisible: false,
			isConfirmPwdVisible: false

		};
		this.displayText = "When enabled, all your endpoint authentication tokens will be saved by OneDataShare. \<commit_msg>Had to fix the formatting of UserAccountComponent.js. There was an issue with a component being imported twice and some imports came after constants. Both issues caused compiling issues.<commit_after>import React, { Component } from "react";

import Card from "@material-ui/core/Card";
import CardContent from "@material-ui/core/CardContent";
import LinearProgress from "@material-ui/core/LinearProgress";
import PasswordRequirementsComponent from '../Login/PasswordRequirementsComponent'
import Typography from "@material-ui/core/Typography";
import TextField from "@material-ui/core/TextField";

import './UserAccountComponent.css';

import {
	Dialog,
	DialogActions,
	DialogContent,
	DialogContentText,
	DialogTitle
} from "@material-ui/core";

import Button from "@material-ui/core/Button";
import CardActions from "@material-ui/core/CardActions";

import List from "@material-ui/core/List";
import ListItem from "@material-ui/core/ListItem";
import ListItemText from "@material-ui/core/ListItemText";
import Divider from "@material-ui/core/Divider";

import FormGroup from "@material-ui/core/FormGroup";
import FormControlLabel from "@material-ui/core/FormControlLabel";
import Switch from "@material-ui/core/Switch";

import { validPassword } from "../../constants";

import {
	changePassword,
	getUser,
	updateSaveOAuth,
	saveOAuthCredentials
} from "../../APICalls/APICalls";
import { eventEmitter, store } from "../../App.js";

import {
	logoutAction,
	accountPreferenceToggledAction,
} from "../../model/actions";
import { cookies } from "../../model/reducers";
import { DROPBOX_NAME, GOOGLEDRIVE_NAME } from "../../constants";

import { updateGAPageView } from '../../analytics/ga'
import IconButton from '@material-ui/core/IconButton';
import Tooltip from '@material-ui/core/Tooltip';
import InfoOutlined from '@material-ui/icons/InfoOutlined';
import { makeStyles } from '@material-ui/core/styles';

import VisibilityOutlinedIcon from '@material-ui/icons/VisibilityOutlined';
import VisibilityOffOutlinedIcon from '@material-ui/icons/VisibilityOffOutlined';
import InputAdornment from '@material-ui/core/InputAdornment';

const useStylesBootstrap = makeStyles(theme => ({
	arrow: {
	  color: theme.palette.common.black,
	},
	tooltip: {
	  color: theme.palette.common.white,
	  backgroundColor: theme.palette.common.black,
	  maxWidth: 180,
	  fontSize: theme.typography.pxToRem(17),
	},
  }));

 const BootstrapTooltip = (props) => {
	const classes = useStylesBootstrap();
	return <Tooltip arrow={true} classes={classes} {...props} />;
}

export default class UserAccountComponent extends Component {
	constructor() {
		super();
		this.state = {
			isSmall: window.innerWidth <= 640,
			loading: true,
			oldPassword: "",
			newPassword: "",
			confirmNewPassword: "",
			isValidNewPassword: true,
			isValidConfirmPassword: true,
			errorMsg: null,
			userEmail: store.getState().email,
			userOrganization: "...",
			fName: "...",
			lName: "...",
			openAlertDialog: false,
			saveOAuthTokens: false,
			canSubmit: false,
			isOldPwdVisible: false,
			isNewPwdVisible: false,
			isConfirmPwdVisible: false

		};
		this.displayText = "When enabled, all your endpoint authentication tokens will be saved by OneDataShare. \
{'fraction_non_alphanumeric': 0.13330185709789108, 'fraction_numerical': 0.0025180988353792886, 'mean_word_length': 4.824931255728689, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '3522300', 'n_tokens_mistral': 1960, 'n_tokens_neox': 1885, 'n_words': 463}