<commit_before>/// <reference path="../typings/molecules.d.ts" />

import {Component, OnInit} from '@angular/core';
import {SiteInteractionService} from "../Services/site-interaction.service";
import {DnaComponent} from "../Abstract/DnaComponent";
import {SiteEnum} from "../Enums/site-enum";
import {DnaEnum} from "../Enums/dna-enum";
import {Kind, Molecule} from "../../Libraries/Molvwr/molecule";
import * as helper from '../../Webpack/helpers/path.helper';
//import * as MoleculeViewer from '../../Libraries/Molvwr/molvwr');



//let Adenine = require( '../Molecules/A.pdb');
import A from '../Molecules/A.pdb';
import C from '../Molecules/C.pdb';
//let Adenine = require("expose-loader?a!../Molecules/A.pdb");
import aTxt from 'raw-loader!../Molecules/A.pdb';
import cTxt from 'raw-loader!../Molecules/G.pdb';



//https://github.com/webpack-contrib/bundle-loader
let loadG = require("bundle-loader?lazy&name=[name]!../Molecules/G.pdb");
let strT = require('includes-loader!../Molecules/T.pdb');


//require('../../Libraries/Molvwr/hand');
//require('expose-loader?HANDJS!../../Libraries/Molvwr/hand');

//let BABYLON = require('exports-loader?BABYLON!../../Libraries/Molvwr/babylon');
let BABYLON = require("expose-loader?BABYLON!../../Libraries/Molvwr/babylon");
//let Molvwr = require('../../Libraries/Molvwr/molvwr');
//import * as MoleculeViewer from '../../Libraries/Molvwr/molvwr');

//require("expose-loader?BABYLON!../../Libraries/Molvwr/molvwr");
let MoleculeViewer = require("exports-loader?Molvwr,BabylonContext=Molvwr.BabylonContext!../../Libraries/Molvwr/molvwr");
let $ = require("expose-loader?$!jquery");


/*
NOTE: leading -!(before raw-loader) is prepended to ignore other preLoaders and loaders configured by webpack
 adding ! to a request will disable configured preLoaders
     require("!raw!./script.coffee")
 adding !! to a request will disable all loaders specified in the configuration
    require("!!raw!./script.coffee")
 adding -! to a request will disable configured preLoaders and loaders but not the postLoaders
    require("-!raw!./script.coffee")
 */
const Adenine = require('-!raw-loader!../Molecules/A.mol');
import * as Cytosine from '-!raw-loader!../Molecules/C.mol';
const Guanine  = require('-!raw-loader!../Molecules/G.mol');
import * as Thymine from '-!raw-loader!../Molecules/T.mol';
const Uracil = require('-!raw-loader!../Molecules/U.mol');

@Component({
    moduleId: module.id,
    selector: 'molecule-viewer',
    templateUrl: '../Html/molecule-viewer.component.html'
})

export class MoleculeViewerComponent extends DnaComponent implements OnInit {
    constructor(private siteInteraction: SiteInteractionService) {
        super();
    }

    ngOnInit() {
        this.siteInteraction.siteHovered$.subscribe(
            site => this.displayMolecule(site),
            err => this.error(err)
        );

        // The chunk is not requested(with option 'lazy') until you call the load function:
        loadG(function(file: string) {
            // use file like it was required with
            // var file = require("./file.js");
            console.log(`Molecule PDB file: ${file} has been downloaded.`);<commit_msg>Added comments<commit_after>/// <reference path="../typings/molecules.d.ts" />

import {Component, OnInit} from '@angular/core';
import {SiteInteractionService} from "../Services/site-interaction.service";
import {DnaComponent} from "../Abstract/DnaComponent";
import {SiteEnum} from "../Enums/site-enum";
import {DnaEnum} from "../Enums/dna-enum";
import {Kind, Molecule} from "../../Libraries/Molvwr/molecule";
import * as helper from '../../Webpack/helpers/path.helper';
//import * as MoleculeViewer from '../../Libraries/Molvwr/molvwr');



//let Adenine = require( '../Molecules/A.pdb');
import A from '../Molecules/A.pdb';
import C from '../Molecules/C.pdb';
//let Adenine = require("expose-loader?a!../Molecules/A.pdb");
import aTxt from 'raw-loader!../Molecules/A.pdb';
import cTxt from 'raw-loader!../Molecules/G.pdb';



//https://github.com/webpack-contrib/bundle-loader
let loadG = require("bundle-loader?lazy&name=[name]!../Molecules/G.pdb");
let strT = require('includes-loader!../Molecules/T.pdb');


//require('../../Libraries/Molvwr/hand');
//require('expose-loader?HANDJS!../../Libraries/Molvwr/hand');

//let BABYLON = require('exports-loader?BABYLON!../../Libraries/Molvwr/babylon');
let BABYLON = require("expose-loader?BABYLON!../../Libraries/Molvwr/babylon");
//let Molvwr = require('../../Libraries/Molvwr/molvwr');
//import * as MoleculeViewer from '../../Libraries/Molvwr/molvwr');

//require("expose-loader?BABYLON!../../Libraries/Molvwr/molvwr");
let MoleculeViewer = require("exports-loader?Molvwr,BabylonContext=Molvwr.BabylonContext!../../Libraries/Molvwr/molvwr");
let $ = require("expose-loader?$!jquery");


/*
NOTE: leading -!(before raw-loader) is prepended to ignore other preLoaders and loaders configured by webpack
 adding ! to a request will disable configured preLoaders
     require("!raw!./script.coffee")
 adding -! to a request will disable configured preLoaders and loaders but not the postLoaders
    require("-!raw!./script.coffee")
 adding !! to a request will disable all loaders(pre, normal and post) specified in the configuration
 require("!!raw!./script.coffee")

 //https://webpack.js.org/configuration/module/#rule-enforce
 All normal loaders can be omitted (overridden) by prefixing ! in the request.
 All normal and pre loaders can be omitted (overridden) by prefixing -! in the request.
 All normal, post and pre loaders can be omitted (overridden) by prefixing !! in the request.
 */
const Adenine = require('-!raw-loader!../Molecules/A.mol');
import * as Cytosine from '-!raw-loader!../Molecules/C.mol';
const Guanine  = require('-!raw-loader!../Molecules/G.mol');
import * as Thymine from '-!raw-loader!../Molecules/T.mol';
const Uracil = require('-!raw-loader!../Molecules/U.mol');

@Component({
    moduleId: module.id,
    selector: 'molecule-viewer',
    templateUrl: '../Html/molecule-viewer.component.html'
})

export class MoleculeViewerComponent extends DnaComponent implements OnInit {
    constructor(private siteInteraction: SiteInteractionService) {
        super();
    }

    ngOnInit() {
        this.siteInteraction.siteHovered$.subscribe(
            site => this.displayMolecule(site),
            err => this.error(err)
        );

        // The chunk is not requested(with option 'lazy') until you call the load function:
        loadG(function(file: string) {
            // use file like it was required with
            // var file = require("./file.js");
            console.log(`Molecule PDB file: ${file} has been downloaded.`);
{'fraction_non_alphanumeric': 0.17391304347826086, 'fraction_numerical': 0.0, 'mean_word_length': 3.6486111111111112, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2493981', 'n_tokens_mistral': 2206, 'n_tokens_neox': 2125, 'n_words': 481}