// Copyright (c) 2015, XhiveFramework Technologies Pvt. Ltd. and Contributors
// MIT License. See license.txt

// provide a namespace
if (!window.xhiveframework) window.xhiveframework = {};

xhiveframework.provide = function (namespace) {
	// docs: create a namespace //
	var nsl = namespace.split(".");
	var parent = window;
	for (var i = 0; i < nsl.length; i++) {
		var n = nsl[i];
		if (!parent[n]) {
			parent[n] = {};
		}
		parent = parent[n];
	}
	return parent;
};

xhiveframework.provide("locals");
xhiveframework.provide("xhiveframework.flags");
xhiveframework.provide("xhiveframework.settings");
xhiveframework.provide("xhiveframework.utils");
xhiveframework.provide("xhiveframework.ui.form");
xhiveframework.provide("xhiveframework.modules");
xhiveframework.provide("xhiveframework.templates");
xhiveframework.provide("xhiveframework.test_data");
xhiveframework.provide("xhiveframework.utils");
xhiveframework.provide("xhiveframework.model");
xhiveframework.provide("xhiveframework.user");
xhiveframework.provide("xhiveframework.session");
xhiveframework.provide("xhiveframework._messages");
xhiveframework.provide("locals.DocType");

// for listviews
xhiveframework.provide("xhiveframework.listview_settings");
xhiveframework.provide("xhiveframework.tour");
xhiveframework.provide("xhiveframework.listview_parent_route");

// constants
window.NEWLINE = "\n";
window.TAB = 9;
window.UP_ARROW = 38;
window.DOWN_ARROW = 40;

// proxy for user globals defined in desk.js

// API globals
window.cur_frm = null;
