// Generated by CoffeeScript 1.3.3

define(['jquery', 'utils/numbers', 'utils/grouper', 'behavior/pending-requests', 'behavior/staff-only', 'plugins/js', 'plugins/backbone-ajax-queue', 'plugins/backbone-deferrable', 'plugins/underscore-mustache', 'plugins/bootstrap', 'plugins/bootstrap-typeahead', 'plugins/jquery-csrf', 'plugins/jquery-ui', 'plugins/jquery-easing', 'plugins/jquery-panels', 'plugins/jquery-scroller'], function($, Numbers, Grouper) {
  var App, defaultEnv;
  App = this.App;
  App.Numbers = Numbers;
  App.Grouper = Grouper;
  if (!(App.SCRIPT_NAME != null)) {
    throw Error('Global "SCRIPT_NAME" not defined');
  }
  if (!(App.CSRF_TOKEN != null)) {
    throw Error('Global "CSRF_TOKEN" not defined');
  }
  defaultEnv = {
    urls: {},
    ajax: {
      maxAttempts: 3
    }
  };
  $.extend(true, App, defaultEnv, App);
  App.state = {};
  App.state.ajaxAttempts = 0;
  App.Models = {};
  App.Views = {};
  App.absolutePath = function(path) {
    return (App.SCRIPT_NAME + path).replace(/\/{2,}/g, '/');
  };
  return App;
});
