<commit_before>/*
 * Angular 2 decorators and services
 */
import {
    Component,
    OnInit,
    ViewEncapsulation,
    Inject
} from '@angular/core';
import { AppState } from './app.service';

import { AuthService, authServiceToken } from './domain/auth';
import { ProfilingService } from './core/profiling';
import { LoadingBlockService } from './components';

/*
 * App Component
 * Top Level Component
 */
@Component({
    selector: 'app',
    encapsulation: ViewEncapsulation.None,
    template: require('./app.component.html'),
    styleUrls: [
        './app.component.scss'
    ]
})
export class AppComponent implements OnInit {
    public currentPage: string;
    public loadingBlockIsVisible: boolean;

    public pages = {
        login: 'login',
        search: 'search',
    };

    constructor(
        public appState: AppState,
        @Inject(authServiceToken)
        private readonly authService: AuthService,
        private readonly profilingService: ProfilingService,
        private readonly loadingBlockService: LoadingBlockService
    ) { }

    public ngOnInit() {
        console.log('Initial App State', this.appState.state);

        this.currentPage = this.authService.IsAuthenticated()
            ? this.pages.search
            : this.pages.login;

        this.profilingService.beginProfiling();

        this.loadingBlockService.visible.subscribe(isVisible => {
            this.loadingBlockIsVisible = isVisible;
        });
    }

    public loginSucceeded() {
        this.currentPage = this.pages.search;
    }<commit_msg>Removed profiling.<commit_after>/*
 * Angular 2 decorators and services
 */
import {
    Component,
    OnInit,
    ViewEncapsulation,
    Inject
} from '@angular/core';
import { AppState } from './app.service';

import { AuthService, authServiceToken } from './domain/auth';
import { ProfilingService } from './core/profiling';
import { LoadingBlockService } from './components';

/*
 * App Component
 * Top Level Component
 */
@Component({
    selector: 'app',
    encapsulation: ViewEncapsulation.None,
    template: require('./app.component.html'),
    styleUrls: [
        './app.component.scss'
    ]
})
export class AppComponent implements OnInit {
    public currentPage: string;
    public loadingBlockIsVisible: boolean;

    public pages = {
        login: 'login',
        search: 'search',
    };

    constructor(
        public appState: AppState,
        @Inject(authServiceToken)
        private readonly authService: AuthService,
        private readonly profilingService: ProfilingService,
        private readonly loadingBlockService: LoadingBlockService
    ) { }

    public ngOnInit() {
        console.log('Initial App State', this.appState.state);

        this.currentPage = this.authService.IsAuthenticated()
            ? this.pages.search
            : this.pages.login;

        this.loadingBlockService.visible.subscribe(isVisible => {
            this.loadingBlockIsVisible = isVisible;
        });
    }

    public loginSucceeded() {
        this.currentPage = this.pages.search;
    }
{'fraction_non_alphanumeric': 0.10966904607397794, 'fraction_numerical': 0.0006489292667099286, 'mean_word_length': 2.7551766138855056, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6167383', 'n_tokens_mistral': 855, 'n_tokens_neox': 823, 'n_words': 192}