// Generated by CoffeeScript 1.8.0
(function() {
  var Google, promiseError;

  if (typeof window === 'undefined') {
    throw new Error('Google-maps package can be used only in browser.');
  }

  promiseError = function() {
    throw new Error('Using promises is not supported anymore. Please take a look in new documentation and use callback instead.');
  };

  Google = (function() {
    function Google() {}

    Google.URL = 'https://maps.googleapis.com/maps/api/js';

    Google.KEY = null;

    Google.LIBRARIES = [];

    Google.CLIENT = null;

    Google.SENSOR = false;

    Google._VERSION = "3.14";

    Google.VERSION = Google._VERSION;

    Google.WINDOW_CALLBACK_NAME = '__google_maps_api_provider_initializator__';

    Google.script = null;

    Google.google = null;

    Google.loading = false;

    Google.callbacks = [];

    Google.onLoadEvents = [];

    Google.load = function(fn) {
      if (fn == null) {
        fn = null;
      }
      if (this.google === null) {
        if (this.loading === true) {
          if (fn !== null) {
            this.callbacks.push(fn);
          }
        } else {
          this.loading = true;
          window[this.WINDOW_CALLBACK_NAME] = (function(_this) {
            return function() {
              return _this._ready(fn);
            };
          })(this);
          this.script = document.createElement('script');
          this.script.type = 'text/javascript';
          this.script.src = this.createUrl();
          document.body.appendChild(this.script);
        }
      } else if (fn !== null) {
        fn(this.google);
      }
      return {
        then: function() {
          return promiseError();
        },
        "catch": function() {
          return promiseError();
        },
        fail: function() {
          return promiseError();
        }
      };
    };

    Google.createUrl = function() {
      var url;
      url = this.URL;
      if (this.SENSOR === true || this.SENSOR === "true") {
        url += "?sensor=true";
      } else {
        url += "?sensor=false";
      }
      if (this.KEY != null) {
        url += "&key=" + this.KEY;
      }
      if (this.LIBRARIES.length > 0) {
        url += "&libraries=" + (this.LIBRARIES.join(','));
      }
      if (this.CLIENT != null) {
        url += "&client=" + this.CLIENT + "&v=" + this.VERSION;
      }
      url += "&callback=" + this.WINDOW_CALLBACK_NAME;
      return url;
    };

    Google.release = function(fn) {
      var _release;
      _release = (function(_this) {
        return function() {
          _this.KEY = null;
          _this.LIBRARIES = [];
          _this.CLIENT = null;
          _this.SENSOR = false;
          _this.VERSION = _this._VERSION;
          _this.google = null;
          _this.loading = false;
          _this.callbacks = [];
          _this.onLoadEvents = [];
          if (typeof window.google !== 'undefined') {
            delete window.google;
          }
          if (typeof window[_this.WINDOW_CALLBACK_NAME] !== 'undefined') {
            delete window[_this.WINDOW_CALLBACK_NAME];
          }
          if (_this.script !== null) {
            _this.script.parentElement.removeChild(_this.script);
            _this.script = null;
          }
          return fn();
        };
      })(this);
      if (this.loading) {
        return this.load(function() {
          return _release();
        });
      } else {
        return _release();
      }
    };

    Google.onLoad = function(fn) {
      return this.onLoadEvents.push(fn);
    };

    Google._ready = function(fn) {
      var event, _i, _j, _len, _len1, _ref, _ref1;
      if (fn == null) {
        fn = null;
      }
      Google.loading = false;
      if (Google.google === null) {
        Google.google = window.google;
      }
      _ref = Google.onLoadEvents;
      for (_i = 0, _len = _ref.length; _i < _len; _i++) {
        event = _ref[_i];
        event(Google.google);
      }
      if (fn !== null) {
        fn(Google.google);
      }
      _ref1 = Google.callbacks;
      for (_j = 0, _len1 = _ref1.length; _j < _len1; _j++) {
        fn = _ref1[_j];
        fn(Google.google);
      }
      return Google.callbacks = [];
    };

    return Google;

  })();

  if (typeof module === 'object') {
    module.exports = Google;
  } else {
    window.GoogleMapsLoader = Google;
  }

}).call(this);

@@ -604,9 +604,9 @@
 %223.1
-4
+8
 %22;%0A%0A

Update compiled version