<commit_before>/*globals define, _, DEBUG*/

/**
 * @author rkereskenyi / https://github.com/rkereskenyi
 * @author nabana / https://github.com/nabana
 */
var WebGMEGlobal = WebGMEGlobal || {};
WebGMEGlobal.version = 'x';
WebGMEGlobal['SUPPORTS_TOUCH'] = 'ontouchstart' in window || navigator.msMaxTouchPoints;


// let require load all the toplevel needed script and call us on domReady
define(['logManager',
    'text!/gmeConfig.json',
    'text!/package.json',
    'js/client',
    'js/Constants',
    'js/Utils/GMEConcepts',
    'js/Utils/GMEVisualConcepts',
    'js/Utils/ExportManager',
    'js/Utils/ImportManager',
    'js/Utils/StateManager',
    'js/Utils/WebGMEUrlManager',
    'js/LayoutManager/LayoutManager',
    'js/Decorators/DecoratorManager',
    'js/KeyboardManager/KeyboardManager',
    'js/PanelManager/PanelManager',
    './WebGME.History',
    'js/Utils/METAAspectHelper',
    'js/Utils/PreferencesHelper',
    'js/Dialogs/Projects/ProjectsDialog',
    'js/Utils/InterpreterManager'], function (logManager,
                                            gmeConfigJson,
                                            packagejson,
                                            Client,
                                            CONSTANTS,
                                            GMEConcepts,
                                            GMEVisualConcepts,
                                            ExportManager,
                                            ImportManager,
                                            StateManager,
                                            WebGMEUrlManager,
                                            LayoutManager,
                                            DecoratorManager,
                                            KeyboardManager,
                                            PanelManager,
                                            WebGMEHistory,
                                            METAAspectHelper,
                                            PreferencesHelper,
                                            ProjectsDialog,
                                            InterpreterManager) {

    "use strict";

    var npmJSON = JSON.parse(packagejson),
        gmeConfig = JSON.parse(gmeConfigJson);
    WebGMEGlobal.version = npmJSON.version;


    var _webGMEStart = function ( afterPanelsLoaded ) {
        var layoutManager,
            client,
            loadPanels,
            logger = logManager.create('WebGME'),
            selectObject,
            loadBranch,
            initialThingsToDo = WebGMEUrlManager.parseInitialThingsToDoFromUrl(),
            projectOpenDialog,
            openProjectLoadDialog;

        // URL query has higher priority than the config.
        initialThingsToDo.projectToLoad = initialThingsToDo.projectToLoad || gmeConfig.client.defaultProject.name;
        initialThingsToDo.branchToLoad = initialThingsToDo.branchToLoad ||  gmeConfig.client.defaultProject.branch;
        initialThingsToDo.objectToLoad = initialThingsToDo.objectToLoad || gmeConfig.client.defaultProject.node;

        layoutManager = new LayoutManager();
        layoutManager.loadLayout(initialThingsToDo.layoutToLoad, function () {
            var panels = [],<commit_msg>#245 Disregard gmeConfig when project or create in url.<commit_after>/*globals define, _, DEBUG*/

/**
 * @author rkereskenyi / https://github.com/rkereskenyi
 * @author nabana / https://github.com/nabana
 */
var WebGMEGlobal = WebGMEGlobal || {};
WebGMEGlobal.version = 'x';
WebGMEGlobal['SUPPORTS_TOUCH'] = 'ontouchstart' in window || navigator.msMaxTouchPoints;


// let require load all the toplevel needed script and call us on domReady
define(['logManager',
    'text!/gmeConfig.json',
    'text!/package.json',
    'js/client',
    'js/Constants',
    'js/Utils/GMEConcepts',
    'js/Utils/GMEVisualConcepts',
    'js/Utils/ExportManager',
    'js/Utils/ImportManager',
    'js/Utils/StateManager',
    'js/Utils/WebGMEUrlManager',
    'js/LayoutManager/LayoutManager',
    'js/Decorators/DecoratorManager',
    'js/KeyboardManager/KeyboardManager',
    'js/PanelManager/PanelManager',
    './WebGME.History',
    'js/Utils/METAAspectHelper',
    'js/Utils/PreferencesHelper',
    'js/Dialogs/Projects/ProjectsDialog',
    'js/Utils/InterpreterManager'], function (logManager,
                                            gmeConfigJson,
                                            packagejson,
                                            Client,
                                            CONSTANTS,
                                            GMEConcepts,
                                            GMEVisualConcepts,
                                            ExportManager,
                                            ImportManager,
                                            StateManager,
                                            WebGMEUrlManager,
                                            LayoutManager,
                                            DecoratorManager,
                                            KeyboardManager,
                                            PanelManager,
                                            WebGMEHistory,
                                            METAAspectHelper,
                                            PreferencesHelper,
                                            ProjectsDialog,
                                            InterpreterManager) {

    "use strict";

    var npmJSON = JSON.parse(packagejson),
        gmeConfig = JSON.parse(gmeConfigJson);
    WebGMEGlobal.version = npmJSON.version;


    var _webGMEStart = function ( afterPanelsLoaded ) {
        var layoutManager,
            client,
            loadPanels,
            logger = logManager.create('WebGME'),
            selectObject,
            loadBranch,
            initialThingsToDo = WebGMEUrlManager.parseInitialThingsToDoFromUrl(),
            projectOpenDialog,
            openProjectLoadDialog;

        // URL query has higher priority than the config.
        if ((initialThingsToDo.projectToLoad || initialThingsToDo.createNewProject) === false) {
            initialThingsToDo.projectToLoad = gmeConfig.client.defaultProject.name;
            initialThingsToDo.branchToLoad = initialThingsToDo.branchToLoad ||  gmeConfig.client.defaultProject.branch;
            initialThingsToDo.objectToLoad = initialThingsToDo.objectToLoad || gmeConfig.client.defaultProject.node;
        }


        layoutManager = new LayoutManager();
        layoutManager.loadLayout(initialThingsToDo.layoutToLoad, function () {
            var panels = [],
{'fraction_non_alphanumeric': 0.08123965698811494, 'fraction_numerical': 0.00045133142771174966, 'mean_word_length': 1.4174545454545455, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 76, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5489452', 'n_tokens_mistral': 1548, 'n_tokens_neox': 1511, 'n_words': 255}