<commit_before>'use strict';

define(['angular', 'Cookies', 'munchkin', 'services', 'smartforms', 'sf-fields', 'angularCookies'], function (angular, Cookies, munchkin, services, smartforms, sfFields) {

	/* Controllers */
	
	return angular.module('myApp.controllers', ['myApp.services', 'ngCookies'])
		// Sample controller where service is being used
		.controller('RegistrationController', ['$scope', 'userConfirmed', 'MarketoInfo', 'MunckinHash', '$cookieStore',
			function ($scope, userConfirmed, MarketoInfo, MunckinHash, $cookieStore) {
				$scope.userInfo = null;
				$scope.marketoInfo = MarketoInfo;
				$scope.sfFields = sfFields;
				$scope.userConfirmed = userConfirmed;

				$scope.cookie = function ()  {
					return $cookieStore.get("RMCPRegistered");
				}

				$scope.haveMarketoInfo = function () {
					return $scope.marketoInfo.receivedData && $scope.marketoInfo.userInfo.HaveData;
				}

				$scope.haveCookieInfo = function () {
					return !!$scope.cookie();
				}

				$scope.confirmUser = function () {
					$scope.userConfirmed.confirm();
					if (!$scope.haveCookieInfo()) {
						$cookieStore.put("RMCPRegistered", {
							'Email': $scope.marketoInfo.userInfo.Email,
							'FirstName': $scope.marketoInfo.userInfo.FirstName,
							'LastName': $scope.marketoInfo.userInfo.LastName
						});
					}
				}

				$scope.sendRegistration = function () {
					MunckinHash.get($scope.userInfo.Email).success(function (data) {
						Munchkin.munchkinFunction('associateLead', $scope.userInfo, data.hashSig);
						$cookieStore.put("RMCPRegistered", {
							'Email': $scope.userInfo.Email,
							'FirstName': $scope.userInfo.FirstName,
							'LastName': $scope.userInfo.LastName
						});
						$scope.marketoInfo.userInfo = $scope.userInfo;
					});
					$scope.confirmUser();
				}

				$scope.wrongUser = function () {
					$cookieStore.remove("RMCPRegistered");
					$scope.marketoInfo.userInfo = {HaveData:false};
				}

				$scope.haveUserInfo = function () {
					return $scope.haveCookieInfo() || $scope.haveMarketoInfo();
				}

				$scope.showMarketoBox = function () {
					return $scope.haveMarketoInfo() && !$scope.haveCookieInfo() && !$scope.userConfirmed.status;
				}

				$scope.showCookieBox = function () {
					return $scope.haveCookieInfo() && !$scope.userConfirmed.status;
				}
			}
		])
		.controller('NavbarCtrl', ['$scope', '$location', function($scope, $location) {
			$scope.isActive = function (route) {
				return route === $location.path();
			}
		}])
		.controller('HomeCtrl', [function(){
			
		}])
		.controller('InfographicCtrl', [function(){
			
		}])
		.controller('DataCtrl', [function(){
			
		}])
		.controller('ReportCtrl', [function(){
			
		}])
		.controller('AboutCtrl', [function(){
			
		}])
		.controller('DefinitionsCtrl', [function(){
			
		}]);
});
<commit_msg>Added chart data to controller<commit_after>'use strict';

define(['angular', 'Cookies', 'munchkin', 'services', 'smartforms', 'sf-fields', 'angularCookies'], function (angular, Cookies, munchkin, services, smartforms, sfFields) {

	/* Controllers */
	
	return angular.module('myApp.controllers', ['myApp.services', 'ngCookies'])
		// Sample controller where service is being used
		.controller('RegistrationCtrl', ['$scope', 'userConfirmed', 'MarketoInfo', 'MunckinHash', '$cookieStore',
			function ($scope, userConfirmed, MarketoInfo, MunckinHash, $cookieStore) {
				$scope.userInfo = null;
				$scope.marketoInfo = MarketoInfo;
				$scope.sfFields = sfFields;
				$scope.userConfirmed = userConfirmed;

				$scope.cookie = function ()  {
					return $cookieStore.get("RMCPRegistered");
				}

				$scope.haveMarketoInfo = function () {
					return $scope.marketoInfo.receivedData && $scope.marketoInfo.userInfo.HaveData;
				}

				$scope.haveCookieInfo = function () {
					return !!$scope.cookie();
				}

				$scope.confirmUser = function () {
					$scope.userConfirmed.confirm();
					if (!$scope.haveCookieInfo()) {
						$cookieStore.put("RMCPRegistered", {
							'Email': $scope.marketoInfo.userInfo.Email,
							'FirstName': $scope.marketoInfo.userInfo.FirstName,
							'LastName': $scope.marketoInfo.userInfo.LastName
						});
					}
				}

				$scope.sendRegistration = function () {
					MunckinHash.get($scope.userInfo.Email).success(function (data) {
						Munchkin.munchkinFunction('associateLead', $scope.userInfo, data.hashSig);
						$cookieStore.put("RMCPRegistered", {
							'Email': $scope.userInfo.Email,
							'FirstName': $scope.userInfo.FirstName,
							'LastName': $scope.userInfo.LastName
						});
						$scope.marketoInfo.userInfo = $scope.userInfo;
					});
					$scope.confirmUser();
				}

				$scope.wrongUser = function () {
					$cookieStore.remove("RMCPRegistered");
					$scope.marketoInfo.userInfo = {HaveData:false};
				}

				$scope.haveUserInfo = function () {
					return $scope.haveCookieInfo() || $scope.haveMarketoInfo();
				}

				$scope.showMarketoBox = function () {
					return $scope.haveMarketoInfo() && !$scope.haveCookieInfo() && !$scope.userConfirmed.status;
				}

				$scope.showCookieBox = function () {
					return $scope.haveCookieInfo() && !$scope.userConfirmed.status;
				}
			}
		])
		.controller('NavbarCtrl', ['$scope', '$location', function($scope, $location) {
			$scope.isActive = function (route) {
				return route === $location.path();
			}
		}])
		.controller('HomeCtrl', [function(){
			
		}])
		.controller('InfographicCtrl', [function(){
			
		}])
		.controller('DataCtrl', ['$scope', 'ChartData', function ($scope, ChartData) {
			$scope.chartData = ChartData;
			$scope.currentSet = ChartData.defaultView;

			$scope.currentChartData = function () {
				return $scope.chartData[$scope.currentSet];
			}
		}])
		.controller('ReportCtrl', [function(){
			
		}])
		.controller('AboutCtrl', [function(){
			
		}])
		.controller('DefinitionsCtrl', [function(){
			
		}]);
});

{'fraction_non_alphanumeric': 0.1688994403934204, 'fraction_numerical': 0.0, 'mean_word_length': 3.6258823529411766, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1509732', 'n_tokens_mistral': 2354, 'n_tokens_neox': 1850, 'n_words': 284}