"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.GeoRequest=void 0;var Geo_1=require("../mongo-builder/Geo");var GeoRequest=function(){function i(r,t){if(t===void 0){t=""}this.data=r;this.prefix=t}i.prototype.stringify=function(){var r=this;if(Array.isArray(this.data)){return this.data.map(function(u,f){return new i(u,"".concat(r.prefix,".$.").concat(f)).stringify()})}if(this.data instanceof Geo_1.Geometry){return this.data.toJSON()}if(this.data===null||this.data instanceof Date){return this.data}if(typeof this.data==="object"){var t={};for(var e in this.data){var n=this.prefix?"".concat(this.prefix,".").concat(e):e;var s=this.data[e];var o=new i(s,n);var a=o.stringify();if(a!==void 0){t[e]=a}}return t}return this.data};return i}();exports.GeoRequest=GeoRequest;