"use strict";var __extends=this&&this.__extends||function(){var t=function(n,r){t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(a,o){a.__proto__=o}||function(a,o){for(var e in o)if(Object.prototype.hasOwnProperty.call(o,e))a[e]=o[e]};return t(n,r)};return function(n,r){if(typeof r!=="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");t(n,r);function a(){this.constructor=n}n.prototype=r===null?Object.create(r):(a.prototype=r.prototype,new a)}}();Object.defineProperty(exports,"__esModule",{value:true});exports.CommandChain=exports.AggregateCommand=exports.EvaluationQueryCommand=exports.GeoCommand=exports.LogicQueryCommand=exports.QueryCommand=exports.QueryUpdateArrayCommand=exports.UpdateArrayCommand=exports.QueryUpdateCommand=exports.UpdateCommand=exports.AbstractCommand=void 0;var AbstractCommand=function(){function t(){}return t}();exports.AbstractCommand=AbstractCommand;var UpdateCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(AbstractCommand);exports.UpdateCommand=UpdateCommand;var QueryUpdateCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(UpdateCommand);exports.QueryUpdateCommand=QueryUpdateCommand;var UpdateArrayCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(UpdateCommand);exports.UpdateArrayCommand=UpdateArrayCommand;var QueryUpdateArrayCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryUpdateCommand);exports.QueryUpdateArrayCommand=QueryUpdateArrayCommand;var QueryCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(AbstractCommand);exports.QueryCommand=QueryCommand;var LogicQueryCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryCommand);exports.LogicQueryCommand=LogicQueryCommand;var GeoCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryCommand);exports.GeoCommand=GeoCommand;var EvaluationQueryCommand=function(t){__extends(n,t);function n(){return t!==null&&t.apply(this,arguments)||this}return n}(QueryCommand);exports.EvaluationQueryCommand=EvaluationQueryCommand;var AggregateCommand=function(t){__extends(n,t);function n(r,a){var o=t.call(this)||this;o.name="$"+r;o.value=a;return o}n.prototype.stringify=function(){var r;return r={},r[this.name]=this.value,r};return n}(AbstractCommand);exports.AggregateCommand=AggregateCommand;var CommandChain=function(){function t(n){this.lastCmd=n}t.unchain=function(n){return n instanceof t?n.lastCmd:n};return t}();exports.CommandChain=CommandChain;