// Generated by CoffeeScript 2.3.2
(function() {
  var Attribute, Geolocation;

  Attribute = require("./attribute");

  module.exports = Geolocation = class Geolocation extends Attribute {
    filter(parmString) {
      var dist, field, lat, lon, ref, ref1;
      [lat, lon, dist] = parmString.trim().split(/\s*,\s*/);
      field = (ref = (ref1 = this._options) != null ? ref1.field : void 0) != null ? ref : 'geolocation';
      return {
        geo_distance: {
          distance: dist,
          [`${field}`]: {
            lat: lat,
            lon: lon
          }
        }
      };
    }

  };

}).call(this);
